IRC channel logs

2017-06-26.log

back to list of logs

<mwette>you guys using erc in emacs? How do I address a message to someone? Just type in or is there a key-command?
<mwette>b
<mekeor>mwette: please consult #emacs or #erc. you can join those channels by typing "/join #emacs" or "/join #erc"
<paroneayea>amz3: I don't know anything about terminite, but it's very similar to erlang in that they both use the actor model and message passing heavily
<wingo>moin
<manumanumanu>moin!
<manumanumanu>anyone knows why this: https://pastebin.com/GP0yW8jU doesn't match the literal in-list?
<civodul>hello!
<manumanumanu>I'm trying to be friendly, but it is acting up and also matches in-vector
<manumanumanu>and actually, everything I put there
<civodul>manumanumanu: pastebin.com isn't accessible from Tor, could you use, say, paste.lisp.org?
<manumanumanu>civodul: http://paste.lisp.org/display/349515
<manumanumanu>I'm not great with macros...
<civodul>(for/list ((x (in-list y))) a b c) should work
<civodul>does it work?
<civodul>but see the bits about syntax literal matching in NEWS if you're using Guile 2.2
<manumanumanu>that works, but it also matches (for/list ((x (in-vector (vector 1 2 3))) (display x))
<manumanumanu>will do
<civodul>hmm
<manumanumanu>in guile 2.2
<civodul>only 'in-list' matches for me in a fresh REPL
<civodul>so you'd have to check whether there's a 'in-list' binding in scope at the macro definition point or macro use point
<manumanumanu>i have an (in-list) procedure that is visible
<manumanumanu>shit
<manumanumanu>I am always bitten by that stuff
<manumanumanu>civodul: thanks.
<civodul>yw
<wingo>i wonder if there are useful warnings we can make there -- like if you override a syntactic keyword...
<wingo>like you rarely want to override "else" or even "_"
<wingo>dunno
<civodul>warnings for common mistakes like these might be helpful
<civodul>though it wouldn't help in this case
<wingo>because in-list is a procedure?
<civodul>because "in-list" is not "else" :-)
<civodul>so we'd need a warning that says "literal is shadowed by binding"
<wingo>i wasn't proposing to add hard-coded cases :)
<wingo>rather just observing that it's rare to shadow a macro
<wingo>hard-coded cases could be interesting though of course
<civodul>that said, if we add warnings, that's because it's not obvious to everyone that "literals" aren't matched literally anymore
<civodul>which to me sounds like bad feedback :-)
<lloda>I overrode $ in one of my libraries and that broke ice-9 match
<civodul>yeah i think a lot of Scheme code was written in the spirit that literals are literals
<civodul>it's tough!
<civodul>ACTION goes for lunch
<wingo>ACTION lunchies too
<manumanumanu>wingo: I do it all the time. If I had 333k dollars for every time I spent way to much time debugging a forgotten aux keyword export I would have a million dollars
<manumanumanu>but it is only the second time I override literals
<wingo>:)
<dsmith-work>Hey hey
<wingo>heya dsmith-work
<civodul>hmm #:count-calls? in (statprof) doesn't work for me
<manumanumanu>is there anything similar to racket's define-for-syntax ?
<manumanumanu>define within an evan-when perhaps?
<manumanumanu>ah, yes. it works
<paroneayea>is there a name for this function? I seem to use it everywhere
<paroneayea>(lambda (object pred)
<paroneayea> (and (pred object) object))
<paroneayea>in otherwords, return the object if it matches predicate, otherwise return #f
<paroneayea>seems common enough to have a name, the way and=> has a name
<civodul>ACTION doesn't know of a good name for this
<daviid>pred=>
<daviid>not so sure, just shooting :)
<paroneayea>I sometimes call it %maybe and use it like
<paroneayea>
<paroneayea>(let ((obj (or (%maybe (get-an-object) looks-right)
<paroneayea> backup-val)))
<paroneayea> foo...)
<paroneayea>
<daviid>hello civodul, paroneayea, wingo ... guilers! greet alls...
<paroneayea>hi daviid
<dsmith-work>ACTION waves
<daviid>have to run, bbl of course...
<ijp>paroneayea: the pattern (or (%maybe) foo) is what haskellers would call fromMaybe
<ijp>assuming #f is disjoint, maybe is fine
<paroneayea>thanks ijp :)
<paroneayea>huh
<paroneayea>srfi-35's support for compound conditions is pretty interesting.
<sporgj>hello fella schemers
<OrangeShark>hello
<sporgj>any interesting links, I'm bored lol
<OrangeShark>someone posted a link to an interesting C++ library they were writing experimental bindings for
<OrangeShark>sporgj: https://github.com/arximboldi/immer
<sporgj>was messing around with Guile over the weekend
<sporgj>best intro to scheme I've had
<OrangeShark>immutable data structures, they have a persistent vector implementation. There is a preprint of their research paper in the README
<sporgj>oh immutable structures
<sporgj>sounds like Javascript schpiel
<OrangeShark>I've been fascinated by them recently. Some functional languages have them built in
<ijp>"Postmodern"
<ijp>I wrote a library of scheme functional datastructures that no-one ever used
<ijp>well, except me
<OrangeShark>ijp: I was actually looking at your library the other week
<OrangeShark>was looking into getting it into guix
<avoine>ijp: I know amz use your fingertree.sls
<ijp>it's a bit of exaggeration. I know some people avoid it because of the record overhead
<paroneayea>ijp: wingo used it :)
<paroneayea>ijp: it's in guile-fibers
<paroneayea>one of the structures is
<paroneayea>it's used for the scheduler
<avoine>that true, deque
<paroneayea>I'd like to get pfds packaged in guix
<paroneayea>I haven't gotten to it yet
<paroneayea>some day!
<OrangeShark>paroneayea: I am almost done packaging it
<paroneayea>OrangeShark: oh nice :)
<avoine>oops no it's Priority Search Queues
<OrangeShark>hey amz3
<amz3>hey OrangeShark, sorry I completly forgot about the release and the org
<amz3>I guess I am distracted those days
<OrangeShark>amz3: I've been distracted too.
<ArneBab>ijp: that there at 19:23 shows the complications of estimating the impact of your work :)
<amz3>ijp: I did use the fingertrees for making a small editor
<amz3>text editor that is
<amz3>ArneBab: you are talking about which vidoe?
<ArneBab>amz3: I’m talking about [19:23:36] <ijp> I wrote a library of scheme functional datastructures that no-one ever used
<ArneBab>followed by 3 people giving examples of usage :)
<ArneBab>^ which is awesome
<amz3>ijp: here is the code defining the buffer data structure of the text editor https://github.com/amirouche/azul.scm/blob/master/buffer.scm
<amz3>:)
<amz3> https://github.com/ijp/pfds is very useful, also 43 star is not bad for an obscure dialect of lisp
<amz3>I have 54 repositories on github, 90% are projects of mine (others are forks) and the most popular is 50 star
<amz3>I used to have repository with 500 stars, but I deleted it!
<amz3>never. delete. anything.
<amz3>now it has 2 stars
<amz3>anyway... sorry!
<OrangeShark>amz3: what had 500 stars?
<catonano>ijp: be faithful ! Your immutable data structures are awesome !
<amz3>OrangeShark: a Python to Javascript "compiler" https://github.com/amirouche/pythonium
<catonano>I was always fascinated by the Clojure maps. You made a whole set of fuunctional data structures !
<ijp>thank you all for this ego boost
<OrangeShark>amz3: oh wow, didn't know there was a python to javascript compiler, but I guess what doesn't have that nowadays? (Someone is working on one for guile :D )
<amz3>ijp: well, pdfs not used to power space rockets yet, but it's useful
<amz3>paroneayea: ah yes thanks, 'termite' is a erlang-like library for gambit-c and chicken scheme
<manumanumanu>So, if anyone is interested, I have implemented something similar (but still not equivilent) of racket's for-loops in guile. One construct to loop through lists, strings, vectors and hashes (although that one is ugly): https://bitbucket.org/bjoli/guile-for-loops
<ijp>fwiw stis has implemented racket's for
<manumanumanu>ijp: not with #:when and #:breaks iirc.
<manumanumanu>his is probably better though :)
<stis_>manumanumanu: did you check out https://gitlab.com/tampe/guile-for
<stis_>that is a later version which contains much more
<manumanumanu>stis_: Cool! I did mine mostly to become better at macros
<stis_>contains #:when and #:break
<stis_>manumanumanu:
<stis_>if you make a system under just guile maxros without syntax-parse you have an edge up
<manumanumanu>stis_: I use only syntax-case, but the code is a mess
<manumanumanu>I am but a lowly classical musician coding in my free time
<stis_>manumanumanu: I don't think that is a negative skillset.
<manumanumanu>Next up, I am writing a more general emit-case built on fold, that allows me to properly support rackets for-system (that uses one accumulator for for/list, regardless of #:when-exprissions)
<stis_>coolio
<manumanumanu>Rackets for/list macros sometimes (always?) expand to something that isn't tail-recursive, which I find odd.
<manumanumanu>but that makes the whole sub-loop-with-the-same-accumulator much easier
<manumanumanu>stis_: I documented how it works: https://bitbucket.org/bjoli/guile-for-loops if you are feeling masochistic
<paroneayea>janneke: https://gitlab.com/janneke/mes/issues/1
<janneke>paroneayea: thanks...yeah, please add: http://lists.gnu.org/archive/html/guix-patches/2017-06/msg00844.html
<paroneayea>janneke: oic :)
<paroneayea>janneke: what I usually do is I add these to the guix.scm until they arrive upstream in guix
<paroneayea>then I remove them
<janneke>paroneayea: right, that's trttd
<janneke>ACTION goes to add mescc-tools 
<paroneayea>janneke: there's a stray semicolon at the end of the home-page line in that patch
<paroneayea>janneke: (hope you don't mind these comments, I think Mes is a great project! trying to see if I can get it up and running locally enough for me to understand it)
<janneke>paroneayea: ouch!?
<janneke>paroneayea: no, it must be some encoding/ml archive artifact it's not in the 0001*patch ... there's also one in the Release_ line
<paroneayea>oh :)
<paroneayea>must be!
<janneke>paroneayea: i like all comments!
<paroneayea>janneke: I was reading gc.scm
<janneke>worst is people who see stuff and complain to others (in their blog or so)...
<janneke>:-)
<paroneayea>janneke: there's a lot of (display) at the bottom, and manual calls to (gc-show), is that for debugging?
<janneke>paroneayea: yeah, gc.scm is not used anymore--prolly should delete that
<janneke>was for prototyping, scaffolding my gc in c: src/gc.c
<paroneayea>janneke: aha :)
<janneke>and getting to understand SICP's gc
<paroneayea>janneke: yes, I'm getting close to that chapter in sicp
<paroneayea>I'm finally in part 5, but it's going very slow for me
<janneke>paroneayea: i skipped from 2.3.something some years ago, straight into 5.3.1: GC
<amz3> https://bitbucket.org/bjoli/guile-for-loops/raw/54568a4a459175bc9b58db82337ef4f6bddfe135/for-loops.scm
<amz3>sorry!
<paroneayea>janneke: ha, cool :)
<manumanumanu>amz3: at least someone is looking at it :D
<amz3>manumanumanu: I am low on skills regarding macros
<manumanumanu>amz3: so am I. This is the result of code growing from bottom to top and top to bottom and not meeting in the middle :)
<manumanumanu>I am getting better however!
<manumanumanu>I just started grokking it 2 months ago
<sporgj>will "guile-lib" qualify as the standard library?
<sporgj>how do I go about timing a procedure?
<sporgj>oh saw it lol
<manumanumanu>amz3: if you want to grok how most macros work, open the cut srfi code and stare at it until you understand it
<manumanumanu>that was how I finally understood syntax-rules.
<amz3>manumanumanu: oh
<amz3>manumanumanu: nice trick
<amz3>it's like parsing a dictionary for the correct info
<amz3>Overview of the Scheme language
<amz3> http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/overview.pdf
<amz3>now I remember learning from this book ^
<amz3>«But riding the rails of time would be the ultimate functional superpower.»
<amz3>that's what git does ^
<civodul>:-)
<amz3>and persistent datastructure allows actually
<ijp>I think I've stubbed as much as I can without actually implementing the module system
<ijp>which seems to get me about 60% of the way through boot-9
<paroneayea>ijp: nice work :)
<ijp>so many functions only returning #f...