These are chat archives for learnclang/general

12th
Jan 2015
Fredrik Averpil
@fredrikaverpil
Jan 12 2015 07:31
@alexwidener awesome guide for OS X, thanks for putting that together!
Alex Widener
@alexwidener
Jan 12 2015 07:33
You’re welcome.
Marcus Ottosson
@mottosso
Jan 12 2015 09:10

Next Project - User Interface and Software Distribution

After the great success of the Hello, World! project, in which we've managed to fully document and understand every corner of getting up to speed with C in terms of choosing a compiler and text editor on major platforms, time has now come to produce a first user-facing interface in the form of a console-based download application.

We'll then distribute this application as though it was the greatest thing ever (which it will be, obviously) with it's own dedicated website and automate as much of the bundling and packaging as we can for it to align with major platforms like Windows, OSX and Linux; including documentation, an installer and splash-image.

Once we've covered writing a user interface and distributed it to our target audience, we'll be fully equipped to make a living selling our great software to end-users across the globe. All we need from there on out is skill. Simple. :)

Join

2 weeks in and we are now 56 enthusiasts interested in the art of C, 3 screencasts recorded by Sebastian Thiel a.k.a. Byron on the basics of C, available on YouTube with more coming up on live streams via Twitch.

Have a look at the project-goals in it's repository, and if you have any questions, head on back here and talk about it. :)

Let's nail this thing.

Sebastian Thiel
@Byron
Jan 12 2015 11:43

Episode 4 of the RPS screencast series airs tonight at 8pm GMT+0

@/all Read more about its contents on github
Marcus Ottosson
@mottosso
Jan 12 2015 12:05
Cool! Looking forward to it!
Fredrik Averpil
@fredrikaverpil
Jan 12 2015 14:39
@mottosso Would it be questionable to add this link to the Visual Studio guide? You can download Windows 7 from there, provided that you have a serial number or intend to just try the software out: https://sites.google.com/site/linuxlablibrary/windows-iso
Marcus Ottosson
@mottosso
Jan 12 2015 17:07
@fredrikaverpil The site does look a little shady, probably better to leave that one be, imo.
Fredrik Averpil
@fredrikaverpil
Jan 12 2015 17:22
@mottosso It's the links to the ISO files, really. But yeah, that's what my initial impression was too. Let's leave it.
Sebastian Thiel
@Byron
Jan 12 2015 19:33

Episode 4 of the RPS screencast series airs in 30 minutes

@/all Read more about its contents on github
Marcus Ottosson
@mottosso
Jan 12 2015 20:11
Cesar Saez
@csaez
Jan 12 2015 20:51
Q: @Byron called free(p1); twice, does it matter or the compiler is smart enough to do the right thing?
elpie89
@elpie89
Jan 12 2015 20:51
excellent lesson @Byron
Sebastian Thiel
@Byron
Jan 12 2015 20:51
After the first free, the program returns, so the second free invocation doesn't matter anymore
Thanks @elpie89
Btw, it's bad if you don't set the pointer to 0 after the free, as I did (or didn't)
free(0) is valid, so pointers should be set to 0 after freeing to prevent a double free in the future
also makes debugging easier
so in short, its always something like
free(p1);
p1 = 0;
Cesar Saez
@csaez
Jan 12 2015 20:56
Oh I see, makes sense!
Thanks for another great screencast :)
Sebastian Thiel
@Byron
Jan 12 2015 21:00

Episode 4 screencast code and youtube links now available on github

@/all It can be found in the readme file.
Marcus Ottosson
@mottosso
Jan 12 2015 21:29
Here's an alternative introduction to Valgrind.
http://c.learncodethehardway.org/book/ex4.html
Alex Widener
@alexwidener
Jan 12 2015 21:30
I was super bummed about valgrind not being out for Yosemite.
I wish they would get on that. Apparently they’re always behind.
Sebastian Thiel
@Byron
Jan 12 2015 21:33
Just found this hint, valgrind on OSX 10.10 actually works
Alex Widener
@alexwidener
Jan 12 2015 21:33
Yeah, I saw that last month.
But it lists it as “basic” support, not full support.
Ah, wait, I didn’t see the one from December 10, I saw the November one from the Dev.
I’ll install that dev version later.
Sebastian Thiel
@Byron
Jan 12 2015 21:38
I just tried it with the RPS program, and verified it works. Certainly it's a simple program, but it looks like valgrind is usable on OSX.
Alex Widener
@alexwidener
Jan 12 2015 21:38
Thanks @Byron