ReMark Posted June 4, 2009 Posted June 4, 2009 1990 seems to have been a good year. I had that book too but unfortunately a leaky ceiling ruined it along with some of my earlier versions of AutoCAD manuals. Wish I could have salvaged them. In any event, either I am younger than I look or you are older than you look. LOL Quote
Lee Mac Posted June 4, 2009 Posted June 4, 2009 1990 seems to have been a good year. I had that book too but unfortunately a leaky ceiling ruined it along with some of my earlier versions of AutoCAD manuals. Wish I could have salvaged them. In any event, either I am younger than I look or you are older than you look. LOL Well, that book was published when I was 1 year old.. I got hold of it when I was digging through an old cupboard at my old job... believe it or not, they were going to throw it out! Quote
ReMark Posted June 4, 2009 Posted June 4, 2009 We have a budding archeologist in our midst. Nice save. I think, given the command of programming you have, that 1 year's old is when you started reading up on LISP! Quote
Lee Mac Posted June 4, 2009 Posted June 4, 2009 We have a budding archeologist in our midst. Nice save. I think, given the command of programming you have, that 1 year's old is when you started reading up on LISP! Thanks Mark, But I still consider myself a beginner compared to the folks over at theSwamp... mind-blowing stuff Quote
The Buzzard Posted June 4, 2009 Posted June 4, 2009 Listen, lad. I built this kingdom up from nothing. When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands. Quote
Lee Mac Posted June 4, 2009 Posted June 4, 2009 Listen, lad. I built this kingdom up from nothing. When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands. Thats quite an analogy Buzzard Thanls Quote
The Buzzard Posted June 4, 2009 Posted June 4, 2009 Lee, Not mine. Thats a scene from Monty Python and the Holy Grail about Swamp Castle. Quote
Freerefill Posted June 4, 2009 Posted June 4, 2009 She's got huge........ tracks of land.. EDIT: That's all I'm gonna do, because I could go home and get my two coconut halves (yes, I did buy a coconut specifically for that reason) and recite the movie front to back, which wouldn't have anything to do with LISP. Quote
The Buzzard Posted June 4, 2009 Posted June 4, 2009 I don't want any of that, I just want to sing. Quote
Freerefill Posted June 4, 2009 Posted June 4, 2009 *twitch twitch* No.. must.. respect.. internet.. forum.. must.. have.. good.. netiquette.. must.. not.. derail.. topic.. for.. Monty Python.. must.. stop.. speaking.. in.. fragments.. Quote
The Buzzard Posted June 4, 2009 Posted June 4, 2009 Then let me offer this. See link below. http://arxdummies.blogspot.com/ Quote
The Buzzard Posted June 4, 2009 Posted June 4, 2009 Sorry about that. I had to fix the above link pasting error. Quote
flowerrobot Posted June 5, 2009 Posted June 5, 2009 Initial Challenge: Here’s a starter project that isn’t that far removed from “Hello World.” Create a C++ Command Prompt program to calculate the volume of a Pipe Arc segment. Input: Pipe radius, Pipe Arc Radius at Centerline, Angle of Arc in Degrees between 0 and 360. Return: Volume of Pipe My friend, nice but you forgot the pause at the end so people can read the area. Also put a couple of notes on it hope you dont mind #include <iostream> #include <cmath> using namespace std; int main() { // This declares them so they can be used. // Aswell as that type of number it will be "double" = real "0.00" double pi = 4.0 * atan(1.0); double pipeRad; double profileArea; double bendRad; double angInDegrees; double angInRads; double vol; //count is similar to princ. cin is will save the input to that value // similar to (setq piperade (getreal "\nEnter pipe radius :" cout << "Enter Pipe Radius: "; cin >> pipeRad; // simple calc setting the thing to profile area // similar to (setq profilearea (* (* piperad piperad) pi)) profileArea = pow(pipeRad, 2.0) * pi; //Same as above // (setq bendrad (getreal "\n Enter Bend radius at pipe centerline : ") cout << "Enter Bend Radius at Pipe centerline: "; cin >> bendRad; // A simle if statement // Notice you dont need progn if (bendRad < pipeRad) { cout << "Inproper Bend Radius - Self intersecting Pipe!"; return 0; } //Same as above // (setq angindegrees (getreal "\nEnter Degrees of Pipe arc [0 < Degrees < 360]: " : ") cout << "Enter Degrees of Pipe arc [0 < Degrees < 360]: "; cin >> angInDegrees; // Normal if statement if (angInDegrees < 0.0 || angInDegrees > 360.0) { cout << "Inproper Angle Value!"; return 0; } //simple calc same as above angInRads = angInDegrees * pi / 180.0; vol = angInRads * bendRad * profileArea; //you can put mulitble things to the screan // Simimlar to (princ (strcat "\nVolume of the pipe arc is :" vol ")) (princ) cout << "Volume of the Pipe Arc is: " [color=red]<< vol[/color] [color=red]<< "\n";[/color] // This pauses the console so things can be read [color=red]system("PAUSE");[/color] return 0; } Quote
SEANT Posted June 5, 2009 Posted June 5, 2009 Nice additional comments. That will help the Lisp to C++ transition. With regard to the pause; I intended this as a command prompt app (i.e., not necessarily a VS console app) which stays fixed. Good heads up for those running this via the VS environment. Quote
flowerrobot Posted June 5, 2009 Posted June 5, 2009 Ahh i see, Im useing dev-C++ So it makes it an exe to run.. Have you done the thing on pointers? Im not understanding the point of them... Which is reducing my understandablity of them flower Quote
SEANT Posted June 5, 2009 Posted June 5, 2009 I am studying those now. In fact, I was giving thought on how to incorporate the need for Pointers in another Cad”centric” challenge. I certainly appreciate the concept of the pointer when passing parameters by reference. I can also see how they complement array processing. I imagine those two things alone are not the full extent of their usefulness. I’d guess their full power comes into play when optimizing how a program manages memory. Quote
flowerrobot Posted June 5, 2009 Posted June 5, 2009 Thats my point.... I have no idear.... Im really just not getting the point of them, and why they are needed. And again not sure why people use them with array,. But that could also because ive being reading snippets not a code that uses it...yet. I look forward to the next example... Quote
Freerefill Posted June 5, 2009 Posted June 5, 2009 Optimizing code is slowly being phased out. Computers nowadays are becoming incredibly powerful, and the difference between a short and a double long is becoming moot. Some day, those who don't get the point of why they're needed simply won't have to, as they won't be needed. Back in the day, however, when a computers memory was small enough that you could keep track of each bit on paper (literally, in some cases), knowing exactly where a certain sequence information started was incredibly convenient. Quote
SEANT Posted June 5, 2009 Posted June 5, 2009 Optimizing code is slowly being phased out. Computers nowadays are becoming incredibly powerful, and the difference between a short and a double long is becoming moot. Some day, those who don't get the point of why they're needed simply won't have to, as they won't be needed. Back in the day, however, when a computers memory was small enough that you could keep track of each bit on paper (literally, in some cases), knowing exactly where a certain sequence information started was incredibly convenient. I tend to agree with that sentiment, especially for the size and complexity of the code I’d be likely to create. However, I do think optimization will continue to play a role in application size projects as software bloat negates hardware improvements. Some of the later features in AutoCAD seem to support that notion. The modeless Layer Properties Manager (written with the more modern .NET WPF – to avoid the need of more direct code optimization) suffers a performance hit. Not a huge problem, necessarily, but a noticeable hit nonetheless. Quote
Shawndoe Posted June 5, 2009 Author Posted June 5, 2009 Actually optimizing code never becomes mute. It may not be as nessesary with PCs, but C++ is not just used to program PCs. Get an 8bit microcontroler with 4K ROM and 128bytes of RAM. You may well find optimization nessesary. In fact it might be so nessesary that you end up coding in assembly in places to achive that efficiency. Now that's fun Shawndoe Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.