IRC channel logs

2017-05-09.log

back to list of logs

<ArneBab>CharlieBrown: that’s something you need to do by hand. You could start with sweeten by the readable project: https://sourceforge.net/p/readable/code/ci/develop/tree/src/sweeten.sscm
<ArneBab>CharlieBrown: however the easier way is to just guild compile *.scm and then import from wisp
<paroneayea>ArneBab: it would be interesting to write a wisp pretty-printer if there isn't one
<paroneayea>ArneBab: though it might also be interesting to have a scm -> wisp that preserves indentation and etc exactly the same... that would be harder to write though :)
<CharlieBrown>ArneBab: How would I "guile compile *.scm and then import from wisp"?
<daviid>CharlieBrown: any url of this similar app you were refering to that compares to foliot?
<daviid>hello guilers!
<daviid>bbl, have to temp leave...
<CharlieBrown>daviid: I thought I linked it. http://delwink.com/software/patts
<nikita1>nalaginrut: hello!
<nikita1>nalaginrut: I have a question concerning artanis build process. Don't you object if I make the Makefile more polite with respect to *BSD systems? I have a lot of BSD installations where I'd use artanis.. and I'm porting it now on kqueue
<codemac>is there any way to list all bound variables?
<codemac>'(i should say i mean symbols)
<ArneBab_>paroneayea: a wisp pretty-printer would be great! scm->wisp with preserved indentation *and comments* is harder, because it requires doing actual parsing by hand (you can’t just defer everything to (read)).
<ArneBab_>CharlieBrown: you just create a module, i.e. (example) in example.scm, call guild example.scm (creates the *.scm.go cache file), then you can use "import : example" to get the module
<ArneBab_>CharlieBrown: see https://www.gnu.org/software/guile/manual/html_node/Creating-Guile-Modules.html
<ArneBab_>CharlieBrown: since wisp and regular scheme both use the same bytecode (and libraries and so on), you can call any scheme module from wisp — as soon as it has been compiled.
<rlb>codemac: depending on what you want to do, this might be useful: https://www.gnu.org/software/guile/manual/html_node/Evaluation-Model.html#Evaluation-Model
<ArneBab_>CharlieBrown: you might need to add the load path: `guile -L .` ← add current folder to load path
<ArneBab_>manumanumanu: I did not realize that you’re the author of Nietzsche — kudos to that the great tools!
<manumanumanu>ArneBab_: Thanks. The only things I end up using in my projects are some of the io things, the therading macros and the conditionals (if-let,cond-let and such)
<manumanumanu>some of that stuff is already in guile, but it is nice to not have to change anything to get it to run on chez as well
<ArneBab_>yes
<ArneBab_>it would be cool to have a compatibility layer for each pair of racket/chez/guile/chicken
<ArneBab_>(the big ones)
<ArneBab_>ideally one which provides somewhat performant schims
<ArneBab_>manumanumanu: why do you need fixnums?
<ArneBab_>in the mutable-heap?
<manumanumanu>ArneBab_: I don't, but for chez it is a marginal gain
<manumanumanu>for guile it is a big loss :(
<manumanumanu>so they are going out
<ArneBab_>I just removed them, do you want a paste?
<ArneBab_>or a pull-request?
<ArneBab_>manumanumanu: do you allow (or rather: not explicitely forbid) secondary licenses in Nietzsche? (needed for GPL compatibility)
<ArneBab_>manumanumanu: https://bitbucket.org/bjoli/nietzsche/pull-requests/1/data-mutable-heapscm-replace-fixnum-fx/diff
<manumanumanu>ArneBab_: I permit it.
<ArneBab_>thank you!
<manumanumanu>I am going to rewrite some parts of it to not depend on other parts, so that one can just pick and choose the files they want
<manumanumanu>ArneBab_: wow :) My first pull request :)
<ArneBab_>:)
<nalaginrut>nikita1: it's ok to be compatible with BSD, only if not break GNU things
<nalaginrut>nikita1: and if you want to modify Makefile, please modify Makefile.in
<nikita1>nalaginrut: sure. Why don't you use automake?
<manumanumanu>If I am writing a library using the r6rs library syntax, is there any way to import the "default" guile environment? (import (guile)) works, but doesn't give me vector-copy
<manumanumanu>Which could be imported by importing srfi-43, but it would be much neater if I could just get the default environment
<lloda>manumanumanu: (import (guile-user)) ?
<ArneBab_>manumanumanu: if you call ,use in the guile shell, you get the imported modules
<ArneBab_>,m shows the current module: guile-user
<manumanumanu>Are the repl modules different from the default modules when run as "guile file.scm"?
<manumanumanu>thanks for the help.
<ArneBab_>yes
<ArneBab_>the REPL has additional tools you need to import when you run a file
<ArneBab_>ecraven: could you re-run the guile part of your benchmark with guile-2.2.2?
<ArneBab_>ecraven: … checking the 2.2.2 log does not show the low-level speedup change I thought was in there. Sorry :( ¹: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=shortlog;h=refs/tags/v2.2.2
<nalaginrut>nikita1: when you can write compact and simpler Makefile easily, you never want to use automake
<nikita1>nalaginrut: agree... I've just thought that automake is de-facto standard for any guile library...
<nikita1>Is there some convinient way for guile applications/libraries packaging (like pip or CPAN)?
<nalaginrut>nikita1: autoconf and make is the standard, but the tool generating them is unnecessary to be so
<nalaginrut>I ever want to write a new tool in Scheme to replace configure, but compatible with configure, it's possible if we implement m4 language on Guile
<nalaginrut>m4 sucks, I dare to say...
<nalaginrut>nikita1: you may take a look at guildhall and guix, the packaging info file is good to be followed
<nikita1>what's the current status of guildhall? I see, it is far from critical mass of packages ..
<ecraven>ArneBab_: I will, just need to update all packages on the benchmark machine
<nalaginrut>nikita1: there will be a package manager for Artanis since 0.3 for building good community, it's welcome to contribute
<nikita1>nalaginrut: you mean -- it will be a package of Artanis for guildhall/guix? or another one package manager for web applications/modules?
<nalaginrut>nikita1: I've explain 3 kinds of package managers
<nalaginrut>nikita1: in the mailing list before
<nalaginrut>nikita1: https://lists.gnu.org/archive/html/guile-user/2017-03/msg00123.html
<nikita1>nalaginrut: thanks!
<nikita1>Is there a one single repository for such modules as guile-json, guile-redis, guile-dbi ?
<ArneBab_>nikita1: guildhall could be, but is not — the current momentum rather points towards using guix
<OrangeShark>ArneBab_ and nikita1: There is also guix potluck which is being worked on as a possible alternative. https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00859.html
<paroneayea>ArneBab_: eah
<paroneayea>yeah
<janneke>i have a spawn that takes some time (minutes) and sends partial results to stdout, progress to stderr
<janneke>is there a recipe/example for that for me to steal?
<ArneBab>janneke: is the spawn the program you want to write?
<ArneBab>OrangeShark: guix potluck was what I meant — thank you!
<janneke>ArneBab: I'm spawning a c++ binary from Guile
<janneke>i would usually do open-pipe to read it all in one go
<ArneBab>that’s also what I’m typically doing — add some char-ready? and drain-input to check for more input.
<ArneBab>(and get it)
<ArneBab>janneke: I’d guess that the ideal option would be a coroutine
<ArneBab>but I did not write that yet
<janneke>Hmm, I just want an async pipe and register handlers on stdout, stderr, close
<ArneBab>you could use a thread
<ArneBab>meeting the wordcount challenge with Guile: https://github.com/juditacs/wordcount/pull/95
***micro` is now known as Guest24478
<janneke>ArneBab: yes, probably...easier to steal a solution, though :-)
<ArneBab>janneke: I wish I could help you :)
<ArneBab>(and keep the result ☺)
<janneke>:-)
<janneke>thank you
<spk121>So, I tried to take some C code from POSIX 'ed' and convert it to Scheme. After a few days of this, I am both in awe of and horrified by that codebase.
<janneke>spk121: a friend of mine is trying to reimplement bash in Scheme, so I have some ideas. Would you like to elaborate on the `awe' you felt?
<spk121>janneke: There is a the mix of hand-written C parsers and global state. It is hard to tell what controls what.
<spk121>janneke: plus the interpretation of some of the tokens depends on later tokens, so it can't be parsed in order
<spk121>janneke: but on the face of it, it looks so simple...
<janneke>spk121: is it amazingly elegant, or is it a terrible hack -- that idea...
<spk121>janneke: yeah
<janneke>ed in Scheme...why; what are you doing?
<spk121>janneke: OK. I have a document made of a list of strings. I want to describe changes to that document as a series of 'opcodes'.
<spk121>Like 'add character' 'split line'. This would allow distributed editing of the document by sending just the opcodes.
<janneke>yes, that sounds like `ed'
<janneke>i was just wondering...
<spk121>So my test driver was already something like ed, so I got sidetracked trying to actually replicate ed.
<janneke>nice
<spk121>functional doc creation! (append-string " world!" (append-line "hello" (empty)))
<wingo>meep
<janneke>spk121: nice!
<amz3`>janneke: do you know open-process? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15228
<janneke>well, there's a monad somewhere?
<janneke>amz3`: no...that may be what I need...thanks
<amz3`>janneke: re your issue you were... ok
<janneke>i was thinking i would need to go fibers or async
<amz3`>scroll at the bottom there is an example, but maybe not exactly like you describe, for the simple case where you need to close de input port before reading from output port
<janneke>create my own soft-port and handle it there...nice
<janneke>yeah
<amz3`>maybe i dunno fibers that well, I am not even sure susupendable port work on file ports
<wingo>suspendable ports works on files if they are marked nonblocking and if the underlying file will actually return -EWOULDBLOCK
<paroneayea>hi everyone
<wingo>which is not the case for files on disk but oh well
<wingo>hello paroneayea
<wingo>but for processes it should work as the ports are pipes
<janneke>nice
<janneke>hi paroneayea!
<amz3`>I yes, those are pipes ok
<amz3`>paroneayea: o/
<avoine>spk121: I made some progress on porting chez's repl to guile: https://paste.debian.net/931663/
<avoine>It still have some issues like when you hit enter it doesn't return the cursor to the first column or moving the cursor with the arrow is not visible immediately
<avoine>also I needed to add a read-char/usleep loop because it was not blocking on eof (I'm obviously missing something here)
<amz3`> (define-immutable-record-type <pos>
<amz3`> (make-pos row col)
<amz3`> pos?
<amz3`> (row pos-row pos-row-set!)
<amz3`>is it legal to have exclamation mark procedures when the record is immutable?
<amz3`>avoine: ^
<avoine>amz3`: oops, I'll fix that
<avoine>thanks amz3`
<amz3`>yw
<avoine>ACTION runs catch his train
<amz3`> https://github.com/vishesh/racketscript
<spk121>sneek: later tell avoine that GNU Teseq is useful for debugging escape sequence output. I'll check out the code when I'm back home.
<sneek>Will do.
<amz3`>nikita1: what's the library you use to render graphs?
<amz3`>is it gnuplot?
<paroneayea>davexunit: https://www.w3.org/TR/activitypub/#Overview :)
<paroneayea>sneaked in some SICP characters into ActivityPub and they got illusttrated by mray
<paroneayea>which I think makes this the first fanart of the SICP characters I know of ;)
<civodul>cute illustrations!
<civodul>paroneayea: so "Candidate Recommendation", what does that mean in the W3C process?
<paroneayea>civodul: it means it's on track to become an official recommendation, and we're now in the "please implement, we think it's ready for real implementations" phase
<paroneayea>the next phase, after we're sure the implementations are working together
<paroneayea>is to make it an actual Proposed Recommendation to the W3C
<paroneayea>which the W3C and its members will put to a vote to ratify or not as a real Recommendation
<civodul>woow, that sounds pretty encouraging no?
<civodul>plus the implementation phase must be pretty fun i guess :-)
<paroneayea>civodul: yeah... though I'm stuck on writing the test suite for the next couple weeks, which isn't fun :)
<paroneayea>civodul: but!
<paroneayea>the upside:
<paroneayea>I've deployed a Guile application using http + websockets on Guix on DigitalOcean!
<paroneayea>with a lets encrypt cert!
<paroneayea> https://test.activitypub.rocks/ it's er... not ready yet :)
<paroneayea>but it is running on GuixSD!
<paroneayea>"wait that looks like mudsync's UI"
<paroneayea>shhhhh
<civodul>paroneayea: indeed, sounds like a déjà vu :-)
<civodul>that's awesome!
<civodul>real fun
<civodul>you managed to make a test suite look fun :-)
<paroneayea>:)