You are not logged in.
Hi all, first post; Sorry if this has been done elsewhere.
I'm interested to see how you develop in C or C++!
Personally, I write up code in leafpad or the likes, and compile on the command line using a Makefile.
I'm aware of IDE's like Codeblocks, but i'm interested to see different processes.
Offline
emacs, of course.
Specifically using autocomplete with clang. Enable EDE extensions. Extra bonus points for enabling source control through git.
Edit: Oh, and autotools
Last edited by ewaller (2017-09-17 23:06:26)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Vim, of course.
Lately I've been becoming aware of just how gnu-dependent much of my code has been. So now (partially for learning purposes) I'm avoiding as much gnu-anything as possible*. So I've also been dabbling with clang as well as musl libc. And I now write portable makefiles (tested with bmake) with no gnu-isms ... and so definitely no autotools. And Fossil for DVCS is replacing git for me.
(* - I tried switching to a BSD. That was painful. It's easy to get up and running if you like all the default settings/ports, but those defaults are so insanely bloated it's ridiculous. And the approach of going through a near infinitely-regress of blue `dialog` screens to deselect all the silly options ... no way. Such a good idea, such bad execution.)
Last edited by Trilby (2017-09-18 00:04:49)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Leafpad for small changes, geany for more complex ones.
Offline
Also Vim with ctags plugin and Makefiles. But I've only done smaller university C{,++} projects.
(* - I tried switching to a BSD. That was painful. It's easy to get up and running if you like all the default settings/ports, but those defaults are so insanely bloated it's ridiculous. And the approach of going through a near infinitely-regress of blue `dialog` screens to deselect all the silly options ... no way. Such a good idea, such bad execution.)
That's why there is the /etc/make.conf where you can (and definitely should) set defaults for most of the common options (see $PORTDIR/Mk/bsd.options.desc.mk [FreeBSD] for a list). This will skip most of the dialog screens and you get consistent options all over your ports. Also you can just set the options there that you care about (like no X11 and no SSL2+3) and choose default options otherwise.
Last edited by null (2017-09-18 09:24:08)
Offline
Emacs, of course. Because Emacs.
(* - I tried switching to a BSD. That was painful. It's easy to get up and running if you like all the default settings/ports, but those defaults are so insanely bloated it's ridiculous.
FreeBSD is "a BSD", accidentally the one which tries to be as easy to use as possible for Linux refugees. It is probably not the best choice for everyone though.
Offline
Oh man, where to begin!
Vim is my text editor of choice.
One day, I realized that the reason I wasn't working on my programming projects as much as I wanted to was because it took me FOREVER to get back to where I was the last time I was programming. So, I solved it by creating a silly little script called "drc-ide". Now, I can sit down at my computer, hit a shortcut on my keyboard, and be ready to code!
My script does a few things: You send it one command line argument, which is the name of the project to work on (for example, a software project named "chickenblaster"). First, it creates a giant terminal window near the center of the monitor, in the directory "~/Projects/chickenblaster", inside a tmux session. Next, it creates a slightly smaller winder to the right of that window, for anything I want to look at while working on another file (header files, data files, man pages...). Finally, it creates a tiny window near the bottom of the monitor in the directory "~/Projects/chickenblaster/dev/buildit", ready to compile and run the project.
I don't have access to my computer at the moment, but a screenshot would totally look like this:
Next... I setup GNU Autotools for my new projects as soon as possible, making compiling super simple. Learning GNU Autotools is not super simple, but once I got it working one time it's been pretty easy to use in my other projects. I documented my efforts in these files: autotools-templates
Next... What's in the "buildit" directory you ask? Well, I created my own set of GNU Autotools "helper" scripts, called buildit (that's "build it"). They make my life so much easier! I can just type "./run" or "./debug", and it will do everything needed (clean, build...). And it does it all in a directory in "/tmp/chickenblaster-drcouzelis". It even has a "./wipe" command to delete (as safely as possible) ALL unneeded project files.
...and that's pretty much it! It's very tailored to my needs, but it has helped me enjoy working on my programming projects a lot more, now that I don't have to futz with window placement, makefiles, and building.
And I only do C programming! None of that nasty C++ garbage. In my opinion it should be called "C--".
Offline
Sorry if this has been done elsewhere.
https://bbs.archlinux.org/viewtopic.php?id=47105
To the topic at hand - I use QtCreator and on Windows, Visual Studio. Both combine to about 20GB of files!
Last edited by Alad (2017-09-18 14:46:55)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
#!/bin/bash
# wrapper for leafpad to set tab size to 4
leafpad --tab-width=4 $@ &
exit 0
You're just jealous because the voices only talk to me.
Offline
For those who program using Leafpad...
You really code without syntax highlighting? O_O
Offline
Interesting! Thank you.
I have to say I quite like the idea of having a script that sets up a few terminal windows etc.
And yes, as long as indenting is a thing, for smaller projects I can survive without syntax highlighting.. ~sometimes
Last edited by bloodh101 (2017-09-18 19:07:20)
Offline
For those who program using Leafpad...
You really code without syntax highlighting? O_O
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
For those who program using Leafpad...
You really code without syntax highlighting? O_O
Yes... almost everything I contributed to pacman has been done that way!
Offline
I develope and navigate code using vim and ctags/cscope. I keep tags and cscope databases at the root of each project and autoload them when anywhere within the tree (like git searches for .git dirs). Cscope does a bit more than ctags In particular, it gives "find functions calling this function" from a key mapping.
Offline
Holy cow, that article has produced a full decade's worth of comments! Talk about a sensitive subject.
I disagree that disabling syntax highlighting will help me with programming, but I can't complain... I'm one of those idiots that prefers fewer monitors, smaller screen sizes, lower resolutions, and smaller windows, to help me focus on what I'm looking at.
ctags
Woah. I can't wait to try this out. It's time for me to up my Vim game!
Offline
kate, nano and sometimes mcedit
Offline
I use vim, with enhanced C syntax highlighting, clang with -Weverything and a bunch of hardening options (I would switch back to gcc in a heartbeat if they added -Weverything—though I'd miss leaksan), and though I had a brief affair with Tup, I'm heading back to plain Makefiles again for build-system. I've poked around with ctags, but haven't gotten it into my workflow well enough that I rely on it (probably because I haven't gotten around to setting up a make target to generate them for me or anything).
I've used IntelliJ in college, Visual Studios and vim professionally, and poked around with a littany of other environments, and I sill prefer, by far, vim for essentially everything.
All the best,
-HG
Offline
... with enhanced C syntax highlighting,
At first I thought "oh cool, what's that". Then suddenly the previously-mentioned case against syntax suddenly made a bit more sense. Really that enhancement just looks like different colors for every possible thing in the code just for the sake of having more colors.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
At first I thought "oh cool, what's that". Then suddenly the previously-mentioned case against syntax suddenly made a bit more sense. Really that enhancement just looks like different colors for every possible thing in the code just for the sake of having more colors.
Really, the biggest thing for me is just that operators get highlighted, which I find really nice.
All the best,
-HG
Offline
I run acme. Generally, I'll have the main file I'm working on at the moment as the only visible window in the main (left) column, with things like current directory listing, shell for testing or whatever, build output, misc. notes I've taken, relevant manpage, etc., in the right. (Not all of those things at once, generally, just whichever are relevant at the moment).
Offline
That's an interesting article.
I'm glad to hear that most people seem to do the compiling 'themselves' instead of using an IDE.. but then again I don't really know what I expected! If I'm on Windows I always just use Visual Studio because, although bulky, it's easier and I'm lazy. I much prefer developing on Linux though, as it's faster and of course you have more control.
I might have another look at Vim, i've always avoided it because of the control scheme, and once again, I'm lazy and didn't fiddle with it.
Last edited by bloodh101 (2017-09-22 06:41:10)
Offline
I might have another look at Vim, i've always avoided it because of the control scheme, and once again, I'm lazy and didn't fiddle with it.
Once you go past the initial barrier, you'll never look back; or at least you will find Vim to be *highly* useful.
I use vim for everything - taking notes, writing HTML markup, C programs, text documents and sometimes also as a pager instead of less. The only place I find it difficult to use is Java development, but Java is a defferent territory altogether.
Offline
and sometimes also as a pager instead of less.
I just recently set my "PAGER" variable to "vimpager"!
Offline
The only place I find it difficult to use is Java development, but Java is a defferent territory altogether.
It's been said before that the difference between emacs and vim is that emacs does everything; vim does everything worth doing. So use emacs for java
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
As an emacs user, I can poke fun at it with the old cliché that emacs is a great operating system in search of a good editor ....
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline