kmj
10-09-2000, 01:33 PM
did you decide if you were going to put those examples up on your page for now?
|
Click to See Complete Forum and Search --> : Hey LinuxDuck, kmj 10-09-2000, 01:33 PM did you decide if you were going to put those examples up on your page for now? TheLinuxDuck 10-10-2000, 11:22 AM Originally posted by kmj: did you decide if you were going to put those examples up on your page for now? yes, I can do that. I've got them all somewhere around here.. http://www.linuxnewbie.org/ubb/smile.gif I have been sick lately, so I haven't done much of anything. I'll prop them up on my site today. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-10-2000, 01:35 PM Originally posted by TheLinuxDuck: yes, I can do that. I've got them all somewhere around here.. http://www.linuxnewbie.org/ubb/smile.gif I have been sick lately, so I haven't done much of anything. I'll prop them up on my site today. http://www.linuxnewbie.org/ubb/smile.gif No problem, brutha-man. I've been chasing my tail around for the past few days trying not to fall behind in school myself. And now I have to start my research project. http://www.linuxnewbie.org/ubb/smile.gif D'oh! ------------------ -Pacotron- You are what you edit- vi -------- GAIM: KMJ2L Don't be left out! STAND UP AN BE COUNTED! (http://www.cs.rit.edu/~kmj9907/cgi-bin/pollster.cgi) --*real men use man*-- -The only reason I keep my DOS partition is so I can mount it like the b*tch that it is. TheLinuxDuck 10-10-2000, 02:31 PM Originally posted by kmj: No problem, brutha-man. I've been chasing my tail around for the past few days trying not to fall behind in school myself. And now I have to start my research project. http://www.linuxnewbie.org/ubb/smile.gif D'oh! http://www.linuxnewbie.org/ubb/smile.gif You said that the early part of the week was the busiest for you, with classes and all.. I don't know if I could handle school now. I've been out so long, I think I'd have to learn how to learn again.. http://www.linuxnewbie.org/ubb/smile.gif Good luck on the research project. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq TheLinuxDuck 10-10-2000, 03:14 PM http://www.geocities.com/bfkester/ccae.html It's very simple, and doesn't have any additional functionality, other than just stright display. Once we start getting more code, I'll consider a search/database method. ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq dunno 10-10-2000, 05:59 PM What exactly is that site for? TheLinuxDuck 10-10-2000, 10:15 PM Originally posted by dunno: What exactly is that site for? kmj and I are trying to build a site dedicated to learning how to code. The code will be commented, and once there is enough of it, it will be put into a database and will let the user peruse the code looking for code examples of all sorts of different things, from how to use pointers, to using classes, to streamlining perl code. He and I are the only two coding right now, but hopefully more will be interested in provided commented code for anyone to follow. We are just looking for a way to give programmers a good reference to look up all the little and big things they want to learn how to do. This way, they have hands on examples with comments, etc to learn from. I think it could be a nice handy thing to have.. You wanna contribute? http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq Strike 10-10-2000, 10:51 PM Hey TLD, you can have at the snippet in JMRMW's thread ("I'm a terrible programmer" or whatever). That's a good "call by reference vs. call by value" example in C. TheLinuxDuck 10-10-2000, 11:42 PM Originally posted by Strike: Hey TLD, you can have at the snippet in JMRMW's thread ("I'm a terrible programmer" or whatever). That's a good "call by reference vs. call by value" example in C. Qool! http://www.linuxnewbie.org/ubb/smile.gif I'll grab it and work it, yeah! Work it baby! http://www.linuxnewbie.org/ubb/smile.gif Thanks, dood! http://www.linuxnewbie.org/ubb/smile.gif I saw the post, and admired it's funkocity. http://www.linuxnewbie.org/ubb/biggrin.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq JoniMitchellRockedMyWorld 10-11-2000, 12:13 AM I checked out the site and it looks very promising. Once you get more on it I'll definetly be visiting it regularly http://www.linuxnewbie.org/ubb/smile.gif TheLinuxDuck 10-11-2000, 12:21 AM Originally posted by JoniMitchellRockedMyWorld: I checked out the site and it looks very promising. Once you get more on it I'll definetly be visiting it regularly http://www.linuxnewbie.org/ubb/smile.gif Thanks!! It's not much.. we're at very humble beginnings.. it will just take some time to get enough code to really get going. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq JoniMitchellRockedMyWorld 10-11-2000, 12:23 AM I'd love to contribute some code but I'm afraid I'm only a C newbie. Maybe someday I'll have something of use to contribute. TheLinuxDuck 10-11-2000, 12:29 AM Originally posted by JoniMitchellRockedMyWorld: I'd love to contribute some code but I'm afraid I'm only a C newbie. Maybe someday I'll have something of use to contribute. http://www.linuxnewbie.org/ubb/smile.gif If you ever feel like contributing, just let me know. Heck, if you just wanna shoot the poo with someone, let me know.. http://www.linuxnewbie.org/ubb/wink.gif Are you getting a better grasp on the passing by address and such? ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq JoniMitchellRockedMyWorld 10-11-2000, 12:37 AM Are you getting a better grasp on the passing by address and such? Yeah kinda. I actually went to the library and got a new book on C because the one I have wasn't doing much for me. I think my biggest problem right now is figuring out a little project for myself. Any suggestions? Phuzon 10-11-2000, 03:27 AM Come up with an old atari game and rewrite it. It's what I'm doing. kmj 10-11-2000, 09:14 AM Originally posted by JoniMitchellRockedMyWorld: Yeah kinda. I actually went to the library and got a new book on C because the one I have wasn't doing much for me. I think my biggest problem right now is figuring out a little project for myself. Any suggestions? The type of project you would choose depends mostly on what part of C you want to learn, what level you are, and what you're interested in. I always have trouble coming up with things, I've written "Life" in about 4 or 5 different languages. That would make a good project, in fact. Or tic tac toe. or blackjack. ------------------ -Pacotron- You are what you edit- vi -------- GAIM: KMJ2L Don't be left out! STAND UP AN BE COUNTED! (http://www.cs.rit.edu/~kmj9907/cgi-bin/pollster.cgi) --*real men use man*-- -The only reason I keep my DOS partition is so I can mount it like the b*tch that it is. TheLinuxDuck 10-11-2000, 11:15 AM kmj: http://www.geocities.com/bfkester/ccae.html Check it out. I added a few more bits of code, thanks to Strike, and redid the way the code is grouped. Let me know what you think about it. jmrmw: It's hard for me to determine what might be a good project for you to learn with.. when I wanted to learn perl, I decided to write alog file parser for the server at my office, and to write a file system integrity checker, that keeps tabs on all the files on the system, notifying me if they change. They were projects that I wanted anyway, and figgered I could learn them. Why don't you take a gander at the new site (at the link above), and peruse some of the C code and let me know what you think about it, if you feel that it is explanatory enough, and hopefully that will give you some ideas. Is there any kind of a database that you want for you rown personal use? ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-11-2000, 12:54 PM coolness. looks great for now; I have to submit my java "finger" and "daytime" clients tonight for class, so maybe I'll get them nice enough to put up there... the only thing is that my experience with java in limited so it may look like sht*t even though it works. Strike 10-11-2000, 02:14 PM TLD - a suggestion, could you sort of color-code the code by providing an HTML'ized version that has a color scheme (my suggestion would of course be one akin to the vi color scheme with comments in blue, standard data types in green, other reserved words in yellow, strings in red, characters in purple, etc). This is just because as is you've got heavily commented code with code snippets in it and it's hard to tell which lines are actual code because you have to look for the beginning and end of the blockquote. kmj 10-11-2000, 02:20 PM That's a good idea. For now, since they're just text, you can always d/l them and open them in vim. http://www.linuxnewbie.org/ubb/smile.gif We're not too worried about pretty presentation right now, since we've both got alot of other things on our minds and we want to stock up a decent pile before we actually work on what kind of interface this beast will have. ...course, anyone who wants to help should feel free. http://www.linuxnewbie.org/ubb/smile.gif TheLinuxDuck 10-11-2000, 02:37 PM Strike: I agree, that is a really good idea. http://www.linuxnewbie.org/ubb/smile.gif I wanted to make the interface as painless as possible, so I just used .txt extensions.. http://www.linuxnewbie.org/ubb/wink.gif it really wouldn't be too hard to edit them and add in colors.. It seems to me that we would want to keep the colors pretty basic, for the most part.. maybe only seperating comments from code.. tis a good idea, however.. to be quite honest, the thought hadn't even crossed my mind.. http://www.linuxnewbie.org/ubb/wink.gif Thanks for the input, meester strike! http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-11-2000, 03:49 PM that'd make a good example; a perl script that takes a text file as input and makes as output an html file with tags for color around specific words. i guess you'd have to use <pre></pre> to keep everything lined up properly. I don't know html really, though, so I'll just shut up now. TheLinuxDuck 10-11-2000, 04:09 PM Originally posted by kmj: <pre></pre> to keep everything lined up properly. <html newbie>What does <pre> do? </html newbie> ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq Stuka 10-11-2000, 04:16 PM <pre></pre> is for preformatted text - afaik the browser leaves it just like it is. TheLinuxDuck 10-11-2000, 04:18 PM Originally posted by Stuka: <pre></pre> is for preformatted text - afaik the browser leaves it just like it is. That may very well be the answer I am looking for. http://www.linuxnewbie.org/ubb/smile.gif Thanks, Stuka!! ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq TheLinuxDuck 10-11-2000, 04:40 PM Ok, I added the pre tags and some basic color to the ascii example, in C. Anybody wanna take a look at it and tell me if they think the colors are calm enough. I don't want something that's hard to read, or noone will want to look at it. http://www.linuxnewbie.org/ubb/smile.gif (I know that some of the symbols are not displayed properly.. I'm working on that.. http://www.linuxnewbie.org/ubb/smile.gif) I will eventually write something in perl to parse the code, and add in html tags, but for now, I'm going to do it manually.. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-11-2000, 04:42 PM kule; it's a good start. now onto that perl script... http://www.linuxnewbie.org/ubb/biggrin.gif Defnitely helps out what Strike was pointing out, methinkth. TheLinuxDuck 10-11-2000, 04:59 PM Originally posted by kmj: kule; it's a good start. now onto that perl script... http://www.linuxnewbie.org/ubb/biggrin.gif Erp.. I want to think about the code a little before I delve into it.. I've got my brain in so many places right now, that I know I'm wearing thin, like the elbow of a jacket. I did actually start the perl script, but I haven't gotten very far.. http://www.linuxnewbie.org/ubb/wink.gif Defnitely helps out what Strike was pointing out, methinkth. Definitely.. I was kinda weired out by the code because it was all bunched together.. I never even considered using color to break up the klumping. http://www.linuxnewbie.org/ubb/smile.gif Shows where my brain is.. (DON'T SAY IT!) ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq Strike 10-11-2000, 05:55 PM Well, the text version would still be nice to have. Perhaps put a "(download text version here)" (with a link on "here") after each one of the programs? Because Netscape's copy and paste options aren't exactly the best ... *ahem* I was thinking you could have both up there, sorry if I miscommunicated that at first. Perl script, hmm? Sounds like maybe just the thing I could do to hone my beginner Perl skills... TheLinuxDuck 10-11-2000, 06:02 PM Originally posted by Strike: Well, the text version would still be nice to have. Perhaps put a "(download text version here)" (with a link on "here") after each one of the programs? I already added them.. http://www.linuxnewbie.org/ubb/smile.gif See? Weird people do think alike... ::heh heh:: Perl script, hmm? Sounds like maybe just the thing I could do to hone my beginner Perl skills... OooOOo!! That sounds like an offer!! http://www.linuxnewbie.org/ubb/biggrin.gif If you feel like putting some time in, I know I'd get good use of the program.. I converted another one to the simple color scheme, btw. The filesize one for C. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq JoniMitchellRockedMyWorld 10-12-2000, 11:54 PM LD: The colors used in the examples are nice. Not too harsh or anything. Now all you have to do is get someone other than geocities to host your site. I hate that damn popup! hehe http://www.linuxnewbie.org/ubb/tongue.gif TheLinuxDuck 10-13-2000, 09:33 AM Originally posted by JoniMitchellRockedMyWorld: LD: The colors used in the examples are nice. Not too harsh or anything. Now all you have to do is get someone other than geocities to host your site. I hate that damn popup! hehe http://www.linuxnewbie.org/ubb/tongue.gif http://www.linuxnewbie.org/ubb/smile.gif Me too.. but, they're offering a free site. I can live with it for now.. once the CCAE get's bigger, I might have to move just because I'll need more room. http://www.linuxnewbie.org/ubb/smile.gif But, I guess if it really gets to this point, then I'll just register a domain name and pay for a site. Might as well, in that case... ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-13-2000, 12:35 PM Originally posted by TheLinuxDuck: http://www.linuxnewbie.org/ubb/smile.gif Me too.. but, they're offering a free site. I can live with it for now.. once the CCAE get's bigger, I might have to move just because I'll need more room. http://www.linuxnewbie.org/ubb/smile.gif But, I guess if it really gets to this point, then I'll just register a domain name and pay for a site. Might as well, in that case... yeah... we could always use sourceforge, too, if we get to it.. :wq Ha! Now, I know you're a convert! TheLinuxDuck 10-13-2000, 02:43 PM Originally posted by kmj: Ha! Now, I know you're a convert! LOL! You know, I type :wq in every editor I use now. Even in notepad and other windows editors.. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-13-2000, 02:54 PM http://www.linuxnewbie.org/ubb/biggrin.gif Be careful if you use IE; if you accidently press ESC (which I do all the time), you'll clear whatever input box you might be editting. Many many divine thoughts have been lost forever when I was done entering text and subconsciously press Esc! TheLinuxDuck 10-13-2000, 03:08 PM Originally posted by kmj: Be careful if you use IE; if you accidently press ESC (which I do all the time), you'll clear whatever input box you might be editting. Many many divine thoughts have been lost forever when I was done entering text and subconsciously press Esc! The warning is much appreciated my dear friend of vi(m). However, I have already do so several times. I typically use netscape, however, there are times when I am forced to use IE. I believe that I am ready for the next step in vim editing. I now use syntax highlighting, searching by /, (multiline) yanking/pasting, line deletion (dd). These have proven to be valuable to me. I would like something new to try. Can you suggest something for me to learn? Yes, I know I can go and read the NHF on vi, but I think that you, as a fellow programmer, can offer me something that I might find useful. http://www.linuxnewbie.org/ubb/smile.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-13-2000, 03:21 PM Well, you know there's two NHF's: a crash course (by X_Console, iirc) and an intro to programming with vim (http://linuxnewbie.internet.com/nhf/intel/programming/intro_c++.html) (by yours falsly), cuz if you don't know ctags, you don't know nuthin'! Also, take a look at :h map and :h imap to ease those repetive tasks. If you're programming with vim, you should be using ctags and cindenting at the bare minimum; completely customizable to your style. Something I didn't mention in that NHF-> when you jump from tag to tag, you can use ctrl+t to jump back. That comes in handy. kmj 10-13-2000, 03:24 PM One thing I have to start learning is how to setup my .vimrc to recognize java and perl files, so it knows to turn on cindent for me with those; I can use the C stuff as a model... :h autocmd, :h BufReadPre TheLinuxDuck 10-13-2000, 03:31 PM Ok, ok, hold on now.. I'm still a vim newbie.. understand that my background for editing has been limited to simply copy/paste/delete/typing, etc.. nothing too major.. I don't get the map thing.. I looked at the help display, but it looks like a bunch of nonsense to me.. http://www.linuxnewbie.org/ubb/wink.gif What is cindent? What does autocmd and BufReadPre do? Remember I'm just a vim newbie.. I'm not used to an editing environment that makes programming easier.. http://www.linuxnewbie.org/ubb/wink.gif When I programmed in DOS, I used edit. Does this give you my background for programming editors? So, with that said, you may need to baby step me through some of these things you're talking about... http://www.linuxnewbie.org/ubb/frown.gif ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq kmj 10-13-2000, 04:23 PM first, check that link I gave you. Then type :h ctags, read everything you can; then type :h cindent, read everything you can. Your .vimrc might already have cindent and other stuff setup for you, mine did. Ctags Rock for larg projects; you put your cursor on a keyword (variable, constant, function, etc) and press CTRL+]; it takes you to the definition of that keyword. Then press CTRL+t to get back where you were. It's an invaluable resource. It uses a database that it creates when you run ctags *.*; you need to run that in the project directory in order to use ctags. Play with this first and get used to it. Cindent- Basically, everyone's got their own indenting style; cindent (and cinoptions) lets you customize exactly how you want vim to auto indent things for you. Don't worry about BufReadPre or autocmd, they're used in your .vimrc to tell vim what you want it to do when it loads certain types of files. I'm not really familiar with these yet. kmj 10-17-2000, 10:47 AM Perl script, hmm? Sounds like maybe just the thing I could do to hone my beginner Perl skills... You still thinking about doing this, Strike? I think for now we definitely need something like this. If you want to do that'd be great; if not I'll give it a whirl. TheLinuxDuck 10-17-2000, 11:10 AM Originally posted by kmj: Perl script, hmm? Sounds like maybe just the thing I could do to hone my beginner Perl skills... You still thinking about doing this, Strike? I think for now we definitely need something like this. If you want to do that'd be great; if not I'll give it a whirl. I hope someone else will do this.. I don't really wanna.. http://www.linuxnewbie.org/ubb/smile.gif Heck, I can't even seem to get the linked list example to work.. ::sigh:: I've been having trouble today getting on to geocities.. I'm going to try again. ------------------ TheLinuxDuck Wait... that's a penguin?!?!? :wq EyesWideOpen 10-17-2000, 02:35 PM Originally posted by TheLinuxDuck: I hope someone else will do this.. I don't really wanna.. :) Heck, I can't even seem to get the linked list example to work.. ::sigh:: I've been having trouble today getting on to geocities.. I'm going to try again. I did something like this a while back. It was a bit buggy though. I haven't looked at it in months but you are welcome to take a look. If I have time maybe I'll even try to retest it. It worked well enough... http://cams88.tripod.com/html_convert_pl.txt http://cams88.tripod.com/TagCon_pm.txt Edit: I just remembered what it actually does! It will output an html page that consists of the filename at the top, followed by a table of contents of sorts that contains the names of any and all subroutines within the code. The subroutine names are links to the actual subroutines definitions in the body of the code. Above each subroutine definition will be a link back to the top of the page(you may or may not want all of this). The code is placed in <PRE></PRE> tags in the body of the HTML doc with less than(< ), greater than(> ), and semicolons( ;) converted to their html equivalents(<, >, " respectively) so they will output correctly when viewed by the browser. Edit #2: This was made for converting Perl code to HTML so modifications will be necessary for any other language... [This message has been edited by EyesWideOpen (edited 17 October 2000).] justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |