IRC channel logs

2015-03-23.log

back to list of logs

<nalaginrut>morning guilers~
<sneek>Welcome back nalaginrut, you have 1 message.
<sneek>nalaginrut, ArneBab says: yay on a blog post about FFI!
<nalaginrut>ArneBab: ;-P
<nalaginrut>is it proper if I set "pcre_free" pointer to a pcre object pointer?
<nalaginrut>I didn't free it explicitly since it always crash while freeing
<mark_weaver>I don't understand the question
<mark_weaver>what do you mean by "set 'pcre_free' pointer to a pcre object pointer?" ?
<mark_weaver>also, you might consider using irregex instead
<nalaginrut>mark_weaver: yes irregex works, but I've tried FFI to bind libpcre
<nalaginrut>mark_weaver: https://github.com/NalaGinrut/guile-pcre-ffi/blob/master/nala/pcre.scm
<nalaginrut>mark_weaver: now I think it's reasonable to free the pcre object returned by pcre_compile
<nalaginrut>but it always crash
<nalaginrut>dunno why, it's not null pointer
<nalaginrut>it's segmentation fault
<nalaginrut>and I think irregex doesn't support full PCRE according to the manual, what's strange is that it claims PCRE has full support in the end, which sounds do contradict
<nalaginrut>s/do/so
***michel_mno_afk is now known as michel_mno
<ArneBab_>When given a symbol in a list I want to eval later, can I add source-properties? (supports-source-properties? obj) only answers yes for very few expressions (like strings and quoted lists), but (set-source-property obj prop value) works for many more.
<ArneBab_>For some symbols I get “Wrong type argument in position 1 (expecting non-immediate)”
<taylanub>ArneBab_: perhaps you can turn them into syntax early on?
<ArneBab_>how would I do that?
<ArneBab_>I call read on ports which already seeked to the symbol
<taylanub>never mind, I guess that doesn't work if you aren't evaling anything yet
<taylanub>maybe you can compile the data incrementally or so
<ArneBab_>I fear that might give trouble because I still need to restructure parts of it (replacing temporary symbols and such)
<ArneBab_>(I use match for that)
***michel_mno is now known as michel_mno_afk
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
***michel_mno_afk is now known as michel_mno
<b4283>is there a cross-platform variable for newline ?
<b4283>there's (newline) but it's only for ports, and i'm looking for a string
<artyom-poptsov>b4283: Hi. Probably #\\newline character is what you're looking for.
<b4283>thx artyom-poptsov
<b4283>but i wonder does it expand to CRLF under windows...
<taylanub>nope, it's explicitly the LF character. a cross-platform newline could be made like (with-output-to-string (newline))
<taylanub>ASSUMING our newline procedure does the right thing under Windows
<b4283>wow, thanks a lot taylanub
<taylanub>np. (and dunno if there's perhaps a shorter way)
<b4283>(with-output-to-string (lambda () (newline)))
<b4283>it asks for a thunk so
<taylanub>ah, then just pass 'newline'
<taylanub>(with-output-to-string newline)
<b4283>taylanub: that IS short ! ha, thanks again
<taylanub>b4283: hm, I'm reading libguile/print.c where newline is defined, and I think it only outputs \\n :\\
<b4283>aw, that's great
<b4283>i'll just define it as #\\newline then, deal with it later
<taylanub>#\\newline is a character constant. you could bind it to some variable.
<b4283>yeah, roger that
<wingo>#\\newline is not a platform-independant thing
<wingo>it is one specific unicode codepoint
<wingo>if you have a port open in text mode i think #\\newline generates CR+LF on windows; not sure tho
<civodul>Hello Guilers!
<artyom-poptsov>Hi civodul
<dsmith-work>Morning Greetings, Guilers
<wingo>meep
<artyom-poptsov>Evening greetings, dsmith-work ;-)
<dsmith-work>artyom-poptsov: ;^)
***dje is now known as xdje
<paron_remote>hi dsmith-work
<dsmith-work>wingo: Just curious: Any more major changes/improvements for 2.2?
<wingo>dsmith-work: dunno :) i might redo the intermediate language; we might get unboxed float arithmetic; who knows what could happen if we incorporate libgc...
<wingo>dunno :)
<wingo>but we need to get the train rolling
<wingo>but, i wanted to give a crack to the IL because maybe it would make bootstrap less terrible
<davexunit>>we might get unboxed float arithmetic
*davexunit salivates
<dsmith-work>wingo: Wasn't the unboxing only useful on 64bit machines?
<mark_weaver>dsmith-work: no, you are thinking of nan-boxing
<mark_weaver>(or that's my guess anyway)
<davexunit>I had a good chat about Scheme with Geoffrey Knauth, the FSF's treasurer, at LibrePlanet.
<davexunit>I didn't realize who he was at first, I just noticed that he had a Racket sticker on his laptop.
<mark_weaver>ah, I didn't realize that Geoffrey was a schemer!
<mark_weaver>I've only spoken to him once, about 14 years ago or so
<b4283>i'm trying to use characters as assoc-list keys, and assq-ref to retrieve them
<mark_weaver>b4283: technically, eq? is not safe to use on characters
<b4283>but i'm not sure if this is ok since assq-ref uses eq? to test them
<b4283>mark_weaver: yeah, that was my question
<mark_weaver>in practice, it currently works on Guile and most Schemes, but you should use assv-ref instead.
<b4283>yes, thank you
<mark_weaver>np!
<dsmith-work>mark_weaver: Ahh. Ok.
***michel_mno is now known as michel_mno_afk
<daviid>is there a way to ask guild compile to first import a module?
<mark_weaver>daviid: apparently not. what's your use case? why not just add a 'use-modules' form to the file you're compiling?
<daviid>mark_weaver: brb!
<daviid>mark_weaver: i will try something else, tx
<mark_weaver>np!
<ArneBab_>mark_weaver: I managed to preserve parts of the source-properties in the wisp-parsing, but I’m stuck at making it work for everything. Could you have a look?
<ArneBab_>http://paste.lisp.org/display/146460
<ArneBab_>the main parts are in (wisp-propagate-source-properties code) and (wisp-add-source-properties-from source target)
<ArneBab_>(the paste shows the scheme-version)
<ArneBab_>bbl
<ArneBab_>(or tomorrow)
<mark_weaver>ArneBab_: what properties aren't being propagated?