These are chat archives for learnclang/general

25th
Jan 2015
elpie89
@elpie89
Jan 25 2015 00:34
Good ...i had not tought to libgen
In my implementation i set Null in curlopt_writefunction instead write_data
Marcus Ottosson
@mottosso
Jan 25 2015 10:23
@elpie89 That's really good to know, I was wondering why there had to be a dedicated function to write the file, it seems like quite the common thing to do and could have been provided by the library.
You mean that if you set it to Null, it will still write to a file?
elpie89
@elpie89
Jan 25 2015 10:49
yes,beacuse it use a default function
Marcus Ottosson
@mottosso
Jan 25 2015 10:59
Just tested this, and it works fine, even without that line altogether. Thanks @elpie89. :)
elpie89
@elpie89
Jan 25 2015 11:05
:+1:
Marcus Ottosson
@mottosso
Jan 25 2015 11:30

Updated the Wiki, let me know what you think, and if there's anything unclear. If you can, give the guide a go to make sure it works for all of us.

Wiki

Next and final step is distribution, to which I'd imagine we need:

  1. Builds (and guides) for each major platform
  2. Build-system for cross-platform compatibility, @csaez is this something you could head up?
  3. Presentation/Working website

Also had a quick look at PortAudio and found that they had a quite interesting tutorial on how to get started programming with sound.

Along with a free book on audio programming theory by the same author as the library.

And a full example of generating a sine-wave.

Cesar Saez
@csaez
Jan 25 2015 16:40
@mottosso Silly question: Should we close the file (via fclose) after libcurl do its thing?
Marcus Ottosson
@mottosso
Jan 25 2015 16:44
That's a good question
I would think so.
Maybe libcurl does this during it's own clean-up cycle, but I would personally want to make it explicit and close it myself.
if fclose the way to do that?
Cesar Saez
@csaez
Jan 25 2015 16:48
In addition, it would be good to include something about dependencies on the website (unless libcurl is linked statically).
Marcus Ottosson
@mottosso
Jan 25 2015 16:48
I'm linking it statically at least.
In my case, it was a matter of:
  1. Download
  2. Compile libcurl
  3. Compile the Terminal app, using -l curl to link.
No other dependencies were required, in a vanilla install of Ubuntu.
Cesar Saez
@csaez
Jan 25 2015 16:54

Can you run the executable without libcurl installed on the system? That's great! :)

And yes, I think fopen and fclose work in tandem.

Marcus Ottosson
@mottosso
Jan 25 2015 16:57

Can you run the executable without libcurl installed on the system? That's great!

That is a good question!

Do you know if this is true?
Cesar Saez
@csaez
Jan 25 2015 17:07
I think the current setup is assuming that libcurl is installed as it is not part of the source code (it's treated as a prerequisite), so I assume I would need libcurl installed on the system to run the binary, but I have no idea and I'm probably wrong... Maybe @Byron could shed some light on this?!
Marcus Ottosson
@mottosso
Jan 25 2015 17:12
I'll simply give it a try, on a system without libcurl.
It certainly does work!
If you have Linux handy, give it a try.
14kb
My understanding is that, statically linked libraries are "baked" into the binary, whereas dynamically linked libraries are not, and are therefore a dependency
Cesar Saez
@csaez
Jan 25 2015 17:18
It works! :D
Marcus Ottosson
@mottosso
Jan 25 2015 17:19
Woho!
Which distribution?
Cesar Saez
@csaez
Jan 25 2015 17:19
Seems like there's no new line at the end of "Please enter an URL" :)
Marcus Ottosson
@mottosso
Jan 25 2015 17:19
I'm curious about exactly where it actually runs.
Cesar Saez
@csaez
Jan 25 2015 17:19
I'm using arch linux
Marcus Ottosson
@mottosso
Jan 25 2015 17:19
Aaah, good catch! I never actually tried that one.
Ah, perfect! Another distribution than Ubuntu.
Do you know if that's Debian-based?
Bug logged here: learnclang/current#1
Cesar Saez
@csaez
Jan 25 2015 17:23
Arch is not debian based :)
Looks like "linux fragmentation" is not that bad, hehe
Marcus Ottosson
@mottosso
Jan 25 2015 17:25
Perfect, that's perfect. I wonder what constitutes a compatible Linux for this binary, could it be the Kernel version? :S
What is linux fragmentation?
Cesar Saez
@csaez
Jan 25 2015 17:33
When people develop for linux there's a belief that it's almost impossible to cover so many distribution (a.k.a. linux fragmentation), but in reality binaries are compatible and there are only small differences.
Do not mind, it was the Tux in me talking.
Marcus Ottosson
@mottosso
Jan 25 2015 17:33
Ah I see