Fork me on GitHub
#planck
<
2016-06-21
>
johanatan02:06:46

do i need to pull?

mfikes02:06:53

I think so, yes

mfikes02:06:34

@johanatan: The root cause of this is that I had Planck in dev set to use HEAD of the ClojureScript compiler, which changed.

johanatan02:06:47

ahh, interesting

mfikes02:06:56

It is now set to use a fixed version of the compiler

johanatan02:06:12

so, are the cljs parts of planck-c zipped up and placed in bundle.c ?

mfikes02:06:57

Yes, essentially planck-cljs produces a bunch of JavaScript which ends up being bundled in bundle.c

johanatan02:06:12

ahh, nice. so the cljs parts are constant between 1.0 and 2.0 ?

mfikes02:06:35

Yes. It hasn’t changed a bit 🙂 Only the native half.

mfikes12:06:39

@tord: The crash you mentioned should now be fixed on master. https://github.com/mfikes/planck/issues/326

tord13:06:25

Cool, thanks, @mfikes!

johanatan23:06:47

@mfikes: unfortunately shell exec in plain C is more compliated than it needs to be due to popen not allowing stderr to be read as a pipe

johanatan23:06:12

probably going to have to end up with a solution like the last code sample from this page (which only returns stderr instead of both stderr and stdout): http://stackoverflow.com/questions/280571/how-to-control-popen-stdin-stdout-stderr-redirection

johanatan23:06:28

i.e., the one posted by kangear

johanatan23:06:23

it would've been like a few liner if I could've used system() or if popen() supported stderr

johanatan23:06:43

as it stands now, it looks like it will be roughly the same number of lines as the obj-c one (give or take)

johanatan23:06:39

@mfikes: just discovered a perhaps simpler way. use popen() in 'r' mode to get stdout. also use freopen() to redirect the parent process' stderr (which is where the child's stderr output is sent) to a tmp file. then read stderr from the tmpfile and freopen() back to original stderr stream.

johanatan23:06:47

does that sound acceptable to you?

johanatan23:06:45

[this would be far less code but a bit more complex in that a tmp file is involved]