PDA

View Full Version : IDE's and contributions


Sirridan
January 27, 2010, 21:42
Hello, I'm a recent linux convert, and while my computers both still have win7, I find I'm liking linux a bit more and more every day. Anyway, does anyone have a good recommendation for an IDE for c development? I've been using Visual studio at work and home and I would rather not use eclipse.

Thanks for suggestions, I hope I can contribute something meaningful to V soon.

Magnate
January 27, 2010, 22:00
Hello, I'm a recent linux convert, and while my computers both still have win7, I find I'm liking linux a bit more and more every day. Anyway, does anyone have a good recommendation for an IDE for c development? I've been using Visual studio at work and home and I would rather not use eclipse.

Thanks for suggestions, I hope I can contribute something meaningful to V soon.What's wrong with eclipse?? It's the one used by most linux devs I know. (Personally I don't bother with this new-fangled "gooey" stuff, I write aliases for grep to do what I want it to do from a command line, and do my coding in nano.)

Sirridan
January 27, 2010, 22:09
What's wrong with eclipse?? It's the one used by most linux devs I know. (Personally I don't bother with this new-fangled "gooey" stuff, I write aliases for grep to do what I want it to do from a command line, and do my coding in nano.)

Eclipse is fine, I should probably spend more time learning it though.

On another note, how does one write aliases for grep? I've just recently discovered how useful that command can be.

Derakon
January 27, 2010, 22:51
alias egrep='grep -E'

Stick that into your .login file and it'll get evaluated every time you log in.

Personally I use vim for my development work, with, yes, a large helping of grep. I don't use aliases though.

Magnate
January 29, 2010, 03:49
I use

alias grip='grep -r --exclude-dir=.svn --exclude=*.o'

and I stick it in ~/.bashrc

YMMV

d_m
January 29, 2010, 04:05
As long as we're all showing off:

I use a shell script called sgrep which handles these issues in a pretty nice way:

#!/bin/sh
grep --binary-files=without-match \
--exclude-dir=CVS \
--exclude-dir=.svn \
--exclude-dir=.hg \
--exclude-dir=.git \
--exclude '*~' \
--exclude '.#*' \
--exclude '#*' \
--exclude '*-' \
"$@"

I prefer not to hardcode -r since sometimes I'm only interested in the current directory. I also prefer to exclude all binary files rather than just "*.o" explicitly.

KarlM
January 29, 2010, 13:29
I include --color and -n in my alias. Nice --binary-files switch!

EDIT: vim for my IDE :)

Sirridan
January 29, 2010, 16:14
Some nifty things there, thank ya much, ill mess around and see what I like. For sure using vi(m) though, its been a blast using it so far.

Magnate
January 29, 2010, 18:03
I am outgrepped!

Nick
January 29, 2010, 22:36
I am outgrepped!

Me too, massively. Can I start an emacs/vi war now?

Marble Dice
January 29, 2010, 22:37
emacs/vi war now?

nano 4 lyfe

PowerDiver
January 30, 2010, 01:14
Me too, massively. Can I start an emacs/vi war now?

Only if you are suitably crazy.

I heard about someone who made emacs his default *shell*. That's true love. Can you imagine such dedication?

I always figured the original rogue was meant to teach people to use the vi movement keys. I suppose some would reverse that implication. :)

Nick
January 30, 2010, 01:27
Only I heard about someone who made emacs his default *shell*.

Yes, I've heard of that too - I'm not nearly that hard core. I also know someone who does everything in a series of 'screen's...

d_m
January 30, 2010, 06:35
screen(1) cures the blind, heals the sick and *slays* dragons.

fizzix
January 30, 2010, 15:04
Only if you are suitably crazy.

I heard about someone who made emacs his default *shell*. That's true love. Can you imagine such dedication?

I always figured the original rogue was meant to teach people to use the vi movement keys. I suppose some would reverse that implication. :)

Was it Richard Stallman?

Having had several conversations with the guy, I'm convinced he is the most socially awkward person I have ever met...

Magnate
January 30, 2010, 18:21
Was it Richard Stallman?

Having had several conversations with the guy, I'm convinced he is the most socially awkward person I have ever met...Prophets usually are.

PowerDiver
January 30, 2010, 18:40
Was it Richard Stallman?

I don't think so. A reputable source in 1993 told me he "knew someone" who did it, and he knew I knew who Stallman was so he would have used that name. It wasn't "friend of a friend", but I don't remember a name [or even whether he told me the name] so I can't be 100% sure it wasn't made up.

Sirridan
January 30, 2010, 21:03
I can't stand emacs, I should learn it but I had a CS prof. Who was obcessed with it and gave exams over emacs commands (it was a comp. Architecture class) He ruined it for me, but I suppose I *should* still try and learn, at least for SLIME.

Notepad ftw though.

fizzix
January 30, 2010, 21:09
I can't stand emacs, I should learn it but I had a CS prof. Who was obcessed with it and gave exams over emacs commands (it was a comp. Architecture class) He ruined it for me, but I suppose I *should* still try and learn, at least for SLIME.

Notepad ftw though.

the biggest problem I have with emacs is that the default shortcut for delete or cut is the same as close window in firefox...

I've actually lost some fairly long posts on this forum because of that...

d_m
January 31, 2010, 00:03
the biggest problem I have with emacs is that the default shortcut for delete or cut is the same as close window in firefox...

I've actually lost some fairly long posts on this forum because of that...

Ask yourself though, is that Emacs' problem or firefox's?

I think a good text editor is more important than a good web browser but that's just me. Also FWIW I don't use Emacs right now.

PowerDiver
January 31, 2010, 00:42
You know you're a dinosaur if ...

You remember when "Eight Megs And Constantly Swapping" was true and funny.

Nick
January 31, 2010, 02:19
OK, so here's a related question. I've been doing my windows compiles using msys and mingw, which has worked fine with main-win.c and Makefile.win. Now, if I understand correctly, something similar can be done to compile using SDL for windows, basically by replacing main-win.c by main-sdl.c. But I'm having a lot of trouble getting the various SDL libraries (a) compiled and (b) in the right place.

So I'm looking for advice, especially advice that doesn't involve using some IDE :)

d_m
January 31, 2010, 04:39
Everyone has probably seen this already, but it *is* the final word on editors:

http://www.gnu.org/fun/jokes/ed.msg

Magnate
January 31, 2010, 07:51
Everyone has probably seen this already, but it *is* the final word on editors:

http://www.gnu.org/fun/jokes/ed.msgI hadn't - and being old enough to remember Eddie's joke, my favourite bit was the size of the emacs executable.

Sirridan
January 31, 2010, 08:59
On a related note, nano and d_m's sgrep script are helping quite a bit. Learned a lot about object generation and description already... oh and remembering that one wrong array index can cause baffling things.

PowerDiver
January 31, 2010, 18:27
Everyone has probably seen this already, but it *is* the final word on editors:

http://www.gnu.org/fun/jokes/ed.msg

Somehow that reminded me of something funny about maybe "real programmers"? All I remember is some offhand comment about putting the instructions or maybe the data in precise locations on the drum so that instead of fetching you read directly based on the time the drum spun between instructions. Any idea what I am talking about?

Nick
January 31, 2010, 20:52
Somehow that reminded me of something funny about maybe "real programmers"? All I remember is some offhand comment about putting the instructions or maybe the data in precise locations on the drum so that instead of fetching you read directly based on the time the drum spun between instructions. Any idea what I am talking about?

Yeah, I read that. It would be more than 15 years ago. It think it started by saying something about how people say that real programmers use fortran (or maybe assembler), then described this guy who used ISTR a bunch of tricks based on hardware, and the one about the drum was kind of the punchline. I have no idea where I read it though.

KarlM
January 31, 2010, 20:57
Are you thinking of
http://catb.org/jargon/html/story-of-mel.html
??

Nick
January 31, 2010, 21:02
Yep, that's it.

takkaria
January 31, 2010, 21:29
OK, so here's a related question. I've been doing my windows compiles using msys and mingw, which has worked fine with main-win.c and Makefile.win. Now, if I understand correctly, something similar can be done to compile using SDL for windows, basically by replacing main-win.c by main-sdl.c. But I'm having a lot of trouble getting the various SDL libraries (a) compiled and (b) in the right place.

So I'm looking for advice, especially advice that doesn't involve using some IDE :)

Are you cross-compiling or doing it on Windows itself?

Nick
January 31, 2010, 21:58
Are you cross-compiling or doing it on Windows itself?

On windows. I hadn't thought of cross-compiling - that might work better. How do I do that?

takkaria
February 1, 2010, 00:42
BTW, you might find http://www.netadelica.com/coding/sdl/install.html useful for getting SDL up and running on Windows.

On windows. I hadn't thought of cross-compiling - that might work better. How do I do that?

Well, cross-compiling in V (for the native Windows port) is a case of installing the cross-compiler (on Debian-based distros this is mingw32), and running

make -f Makefile.win CROSS="i586-mingw32msvc-" MINGW=yes

If you're looking at using SDL too, you want to build and install SDL into a folder somewhere, then add "-I<path to SDL headers>" to CFLAGS and the paths to the various libraries to LIBS, so something like:


LIBS=/path/to/SDL.lib /path/to/SDLmain.lib /path/to/SDL_ttf.lib


I assume, anyway. YMMV, this is just based on when I have crosscompiled to Windows using PDCurses.

Derakon
February 1, 2010, 00:48
The Story of Mel is a description of the "canonical hacker". Real Programmer jokes are about writing software using increasingly bizarre limitations on your toolkits, e.g.

"Real Programmers use emacs."
"No, Real Programmers would never use such a bloated program. Real Programmers use ed."
"No, Real Programmers use cat. Text editors are for the weak."
"No, Real Programmers use a magnetized needle and a steady hand."

Magnate
February 2, 2010, 20:21
The Story of Mel is a description of the "canonical hacker". Real Programmer jokes are about writing software using increasingly bizarre limitations on your toolkits, e.g.

"Real Programmers use emacs."
"No, Real Programmers would never use such a bloated program. Real Programmers use ed."
"No, Real Programmers use cat. Text editors are for the weak."
"No, Real Programmers use a magnetized needle and a steady hand."Maybe someone here can help me unearth another gem that I once saw and cannot now find. It was a list of different approaches to "hello world", starting with the basic novice's C program and ending up with the company CEO's email to the novice saying "write me a program that says 'hello world'". In between there were a dozen different takes on it. Does this ring any bells with anyone?

PowerDiver
February 2, 2010, 23:38
Maybe someone here can help me unearth another gem that I once saw and cannot now find. It was a list of different approaches to "hello world", starting with the basic novice's C program and ending up with the company CEO's email to the novice saying "write me a program that says 'hello world'". In between there were a dozen different takes on it. Does this ring any bells with anyone?

Google on hello world joke

Pete Mack
February 3, 2010, 08:42
Google on hello world joke

The 'seasoned programmer' version is by far the funniest. I actually did write a hello world that was ~200 lines long, prior to a partial rewrite of the OSX port. (It had font & size selection via menu, and a few other "features" that I forget now.)

Magnate
February 3, 2010, 18:42
Google on hello world jokeThank you. Funny how sometimes you just can't see the obvious search term.