IRC channel logs

2015-08-24.log

back to list of logs

<please_help>How do I go about parsing a struct that contains a union and C++ bools exposed through a C interface?
<please_help>actually making such a struct really.
***karswell` is now known as karswell
<paroneayea>huh interesting
<paroneayea>... behaves differently in ice-9 match than in sxml-match
<paroneayea>ie you can do ((litem ...)
<paroneayea> (run-foo litem ...)) in sxml-match
<paroneayea>but in ice-9 match
<paroneayea>... is not available in the body it looks like
<davexunit>in 'match', (litem ...) matches a list and binds the list to 'litem'
<paroneayea>davexunit: yeah seems that way
<paroneayea>seems different in sxml-match
<paroneayea>davexunit: I've managed to mostly convert activitystuff over to using (ice-9 json), though now I'm wondering if I really need these <as-obj> structs
<paroneayea>I could just leave things in that representation
<paroneayea>oh well, I'll leave it as is for now, and noodle on it later!
<paroneayea>pretty cool to see it working though.
<paroneayea>er, just leave things in the json scm representation that (read-json) gives
<davexunit>paroneayea: 'sxml-match' uses a completely different, more primitive type of pattern matching syntax.
<paroneayea>davexunit: ah, hm
<cky>taylanub: I'm sure I have no feedback regarding your SRFI that others haven't already expressed, but I just wanted to fix one little typo: "a SRFI-17 setter", not "an SRFI-17 setter". (See http://srfi.schemers.org/srfi-faq.html re pronunciation of SRFI.)
<cky>(I get that that page itself has references to _both_ "a SRFI" and "an SRFI", and they really need to standardise on the former; maybe I'll submit a pull request.)
<cky> https://github.com/scheme-requests-for-implementation/srfi-common/pull/1 :-D
<paroneayea>ACTION deeply considers going down the rabbit hole of implementing full json-ld for guile...
<adhoc>paroneayea: whats the "-ld
<adhoc>" part ?
<paroneayea>adhoc: https://www.youtube.com/watch?v=vioCbTo3C-4 https://www.youtube.com/watch?v=UmvWk_TQ30A https://www.youtube.com/watch?v=Tm3fD89dqRE
<paroneayea>some reasonable intros
<paroneayea>activitypump / activitystreams use it
<paroneayea>but it's really a way to make json less ambiguous, add types, etc
<paroneayea>but see also term "linked data"
<adhoc>paroneayea: -LD sounds like a useful thing =)
<adhoc>its like what HTML was for
<adhoc>linking documents together ;)
<paroneayea>yes there's a reason timbl likes it ;)
<adhoc>i wonder if there will be a way to refer back dead links ;)
<paroneayea>the web needs more content addressed storage ;)
<adhoc>thats a nice intro video =)
<paroneayea>manu sporny makes great videos
<paroneayea>and is great generally
<adhoc>so a .jsonld file is like an XML scheme/DTD ?
<paroneayea>well, a jsonld context
<adhoc>context == schema
<paroneayea>and yeah it has some similaritiesk, but
<paroneayea>there are some differences
<paroneayea>but pretty close
<nalaginrut>morning guilers~
<lloda`>please_help: in guile-ploy there's (amend! A data indices ...) that is similar to (array-indexes-set!). But (array-indexes-set!) seems to do sparse indexing while (amend!) does cartesian-product indexing.
<lloda`>sparse indexing can be replicated with simple looping, so cartesian-product indexing seems more useful to me, it's what APL does.
<nalaginrut>seems partial-continuations can't be used for make-stack...
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
<nalaginrut>ACTION fixed to run (start n), n is arbitrary pings, https://gist.github.com/NalaGinrut/7fdf328fc4c856145ab5
<nalaginrut>well, it's time to try this actor model for a server now...
<amz3>héllo :)
<nalaginrut>heya
<amz3>what is (% ?
<amz3>in the scheduler code ?
***michel_mno_afk is now known as michel_mno
<nalaginrut>amz3: https://www.gnu.org/software/guile/manual/html_node/Shift-and-Reset.html
<amz3>shift and reset :>
<amz3>I want to learnthat
<nalaginrut>amz3: it's delimited-continuation, which is the black magic of high concurrent nowadays
<amz3>ah yes, I don't know that magic
<amz3>Did you see my question on SO ?
<nalaginrut>amz3: well, but you know Scala/Erlang...
<amz3>About improved generators?
<amz3>nalaginrut: yes?... :p
<nalaginrut>amz3: they
<nalaginrut>they are the black magic behind their syntax
<nalaginrut>s/they are/it is
<amz3> http://stackoverflow.com/questions/30614788/implement-yield-and-send-in-scheme
<nalaginrut>I fixed the code, now it looks more like erlang, if you get rid of parens, it's erlang
<amz3>yield and send are the thing behind the Python asynchrnous framework
<amz3>You read erlang code?
<nalaginrut>amz3: just looks like, I don't mean they are same ;-)
<nalaginrut>but erlang has serlizable-continuations, which is another thing I have to implement
<amz3>are you serious.
<amz3>You will implement that feature?
<nalaginrut>amz3: for Artanis, it has to be
<amz3>are you planning a making guile a scheme-erlang of some sort
<amz3>well, if you want to turn guile in a erlang vm yes :)
<nalaginrut>well, I may implement Artanis server core with that erlang syntax, but I hope people use the framework in Scheme way
<amz3>serializable continuation is like serializing thread and moving it to another processus or machine right ?
<nalaginrut>anyway, it's possible to provide another framework of actor-model in case folks don't need http stuff
<amz3>Getting together to get an actor-model that everybody like is hard
<amz3>I think dave or paroneayea is working on something like that
<nalaginrut>amz3: yes, I think it's very similar to what you said, and it's good for scalable
<nalaginrut>amz3: I have to say, it's too easy to implement various actor-model with delimited-continuations and pattern matching
<nalaginrut>so I'm no surprise people write many
<nalaginrut>;-P
<nalaginrut>but for a product quality one, it's not so easy
<nalaginrut>amz3: the link you provided is implemented with call/cc which is full-continuation
<nalaginrut>it's too heavy since we have delimited-continuations
<amz3>yes, I believe you
<amz3>I asked that question to be able to fiddle myself with delimited continuation
<amz3>Now I guess, I only need to have a look at your code ^^
<taylanub>cky: heh, interesting, I'm used to pronouncing the letters individually, but I guess I'll readjust.
<nalaginrut>amz3: you know, Schemers always want to write things all by themselves, since almost all the things become easy when you have Scheme, which is a common delusion ;-D
<nalaginrut>but now that I've started, I decide to done it ;-)
<amz3>it's good that you know that :p
<amz3>anyway, I think the truth about this, is that you need to code the thing to really grok it
<amz3>at some point, or take another implemenetation and study it
<amz3>but I think it's less effective
<amz3>Machine Learning art (music and painting) seem the thing of the summer
<amz3>*seem to be the thing
<nalaginrut>amz3: we don't have actor-model in Guile, so Artanis needs it, I'm not going to do redundant work, as you may know, I borrowed guile-json in Artanis
<amz3>nalaginrut: anyway I'm good, I'm not here to patronizing people :p
<nalaginrut>well, you may say I read erlang and learned its syntax ;-)
<amz3>ACTION discovered a new way to build a graphdb using a tuple space, like the one used in datomic!
<amz3>nalaginrut: I didn't.
<nalaginrut>amz3: but it's true, I took another implementation and study it ;-)
<amz3>I need to finish my SO project before being to start again doing guile, that the main issue
<amz3>(and find a job)
<nalaginrut>amz3: good luck
<amz3>thx ^^
<wleslie>carl hewitt tends to use actorscript in personal correspondance these days, I'm guessing he finds that closest to what he conceived the actor model to be
***michel_mno is now known as michel_mno_afk
***michel_mno_afk is now known as michel_mno
<stis>heya guilers!
<stis>tjena prologurs!
<stis>oups, wrong channel :-)
<dsmith-work>Monday Greetings, Guilers
<artyom-poptsov>Evening greetings, dsmith-work
<zacts>hi guilers
***dje is now known as dje42
***michel_mno is now known as michel_mno_afk
<paroneayea>davexunit: glad to see this at the top of hacker news https://groups.google.com/forum/?hl=en#!topic/racket-users/yjRuIxypUQc
<paroneayea>john carmack's son's game in racket
<davexunit>paroneayea: I saw that. very neat.
<davexunit>although I don't think it's playable on gnu/linux
<davexunit>I also couldn't find source
<davexunit>"I’m not sure yet if we are going to migrate to the regular GUI code for upcoming work, or jump all the way to OpenGL so he can learn the joys of “Why is the screen all black?”"
<davexunit>that is OpenGL in a nutshell
<davexunit>paroneayea: "he's already through algebra 2"
<davexunit>god damn.
<daviid>it's being said we should avoid cadr ans friends
<daviid>how would i write this then
<daviid>scheme@(guile-user)> (get-children-meta-attachment grid)
<daviid>$7 = ((0 0 1 1) (1 0 1 1))
<daviid>as an example
<daviid>(reduce max 0 (map caddr $7)) [which gives the max width of a grid]
<davexunit>use 'match' from (ice-9 match)
<daviid>davexunit: i know match, but in this particular case of map
<daviid>?
<davexunit>(reduce max 0 (map (match-lambda ((_ _ w _) w)) $7))
<mark_weaver>(match $7 ((_ _ w _) ...) (reduce max 0 w))
<daviid>ah ok
<daviid>great, tx
<mark_weaver>w ends up being bound to a list of all the w's
<daviid>perfect
<davexunit>awesome
<davexunit>yeah, mark_weaver wins this round of code golf
<mark_weaver>heh :)
<davexunit>very awesome property of 'match'
<daviid>haha, awesome, and so happy to get better thanks to you guys!
<mark_weaver>you're welcome!
<daviid>mark_weaver: i get socket:54:0: In procedure module-lookup: Unbound variable: w
<mark_weaver>it sounds like you haven't imported (ice-9 match)
<mark_weaver>oh, wait, I missed a layer of parens
<mark_weaver>(match $7 (((_ _ w _) ...) (reduce max 0 w)))
<daviid>great! [i could find out by myself, but i was lazy :)]
<daviid>tx
<daviid>this way of writing is really powerful!
<davexunit>yes indeed :)
<daviid>should I say max-col-span, max-cols-span or the same but no hiphen between col and span [english quizz]
<mark_weaver>daviid: max-col-span
<daviid>mark_weaver: than you I did think so too, nice to get the confirmation
<paroneayea>davexunit: didn't I see you making some sort of syntax like this
<paroneayea>(-> "initial_arg" func1 func2 func3)
<paroneayea>which would do (func3 (func2 (func1 "initial_arg")))
<davexunit>paroneayea: yeah I did that for Sly
<davexunit> https://git.dthompson.us/sly.git/blob/HEAD:/sly/utils.scm#l71
<paroneayea>davexunit: aha