IRC channel logs

2016-04-26.log

back to list of logs

<handsome_pirate>Hey, y'all, just as a quick heads up, I'm taking over maintainership of guile-lib in Fedora
<cky>handsome_pirate: guile-lib is still a thing? :-O
<floor13>am I doing this wrong? reading a port doesn't toggle off (char-ready? port). ex code here https://bpaste.net/show/54e16b000638
<floor13>raw: https://bpaste.net/raw/54e16b000638
<handsome_pirate>cky: heh
<floor13>meh, found a work around. I read the port, then drained it. lame, but it works.
<jmd>Anyone here got experience with guile-ncurses ?
<jmd>What's the deterministic version of for-each ?
<davexunit>jmd: I don't understand. what is nondeterministic about it?
<jmd>davexunit: The order.
<janneke>something like: (let loop ((lst lst)) (if (null? lst) '() (cons (f (car lst)) (loop (cdr lst)))))
<davexunit>jmd: for-each moves from left to right
<janneke>/me: oops
<jmd>I thought it was the same as map, but didn't have a return value.
<davexunit>no
<jmd>Hmm.
<davexunit>in map, the order truly does not matter
<davexunit>but in for-each, where the proc is evaluated specifically for side-effects, order is indeed very important.
<davexunit>the Guile manual states that for-each is "like ‘map’, but the procedure is always applied from left to right..."
<wingo>in guile it is fair to assume that map goes in order
<lloda``>I wouldn't assume that, since there's map-in-order
***lloda`` is now known as lloda
<wingo>is there another sensible option?
<lloda>probably not, but then it should be guaranteed and map-in-order removed
<wingo>yeah i think i agree with you
<wingo>i suppose you could imagine a map that builds its results from the end
<wingo>*shrug
<wleslie>the day someone makes an optimisaion that say, 'hey, this will be faster if we build its results in a different order and yet be observably not in-order", I hang up my hat.
<wingo>that was a proposal at one point!
<wingo>from aubrey jaffer
<wingo>to allow map to map in parallel
<wingo>it was deemed unacceptable by the committee because although the order is unspecified, it is specified that there should be an order
<wingo>#language-lawyering
<random_nick>hm, hurd has common lisp bindings but not guile bindings
<random_nick>weird
<wleslie>I think the official approach to hurd binding now is 'have mig generate platform code' and 'build traditional wrappers for the store libraries'
<wleslie>which is maybe quite a bit of work.
<random_nick>the common lisp bindings were made by a GSoC student in 2008
<wleslie>you'd certainly get more up-to-date information in #hurd
<wleslie>who is doing most of the development now? youpi?
<random_nick>well currently it looks like the gsoc students are about to do a loy
<random_nick>lot*
<random_nick>the hurd gsoc projects are guix and xattr
<random_nick>guix on hurd is interesting
<wleslie>guix on hurd will be amazing
<wleslie>it will have storefs integration?
<random_nick>idk, but I know it will use stowfs
<wleslie>stow! that's the one
<wleslie>that will be the coolest thing ever.
<dsmith-work>[appropriate time] Greetings, Guilers
<wleslie>Good [appropriate time] dsmith-work!
<dsmith-work>;^)
<taylan> https://github.com/cisco/ChezScheme repo is populated with source code now :)
<davexunit>wow!
<civodul>woow, incredible!
<civodul>Apache 2.0
<civodul>nice
<wleslie>?
<civodul>"nice" refers to the fact that it's been freed, not to the fact that it uses a non-copyleft license ;-)
<wleslie>ah, chez
<davexunit>I wonder if there are any juicy implementation details that guile can snarf
<wleslie>besides those it already had ;)
<civodul>heh
<wleslie>'inlining is copy-propogation applied to lambda forms' was stuck in wingo's head for a while, I think
<wingo>whatttttt!!!!!
<civodul>* wingo drops the mic, quits Guile
<wleslie>entire channel gapes in awe
<wingo>hehe
<davexunit>I wonder what kind of impact this will have on the free schemes out there
<wingo>that's super-cool, yo
<wingo>i think it can only improve everything
<rain1>yes! \\o/
<rain1>so exciting
<wingo>more buzz around scheme, more good quality implementations
<wingo>a good r6rs implementation
<wingo>more code to steal :)
<davexunit>like, will people abandon the current free schemes and move to chez?
<holomorph>chezemacs ;)
<wingo>probably some people. but probably not all, i mean schemes are tribes anyway
<civodul>i wonder if schemers will be disappointed when they look at the code, that's always a possibility :-)
<wleslie>holomorph: gold
<wingo>haha that's possible
<wingo>i heard also that chez's performance could be better; but now we can benchmark it properly
<civodul>yeah
<wingo>before, it was never properly benchmarked publically due to nda's etc
<rain1>interesting that they use nanopass!
<davexunit>what's nanopass?
<wleslie>Nanopass Compiler Infrastructure
<civodul>i didn't know about it but it looks nice: https://github.com/nanopass/nanopass-framework-scheme/raw/221eecb965d9dfacccd97d1cb73f2a31c4119d3a/doc/user-guide.pdf
<davexunit>should guile use it?
<wleslie>nah guile should use https://bitbucket.org/william_ml_leslie/python-firm (:
<paroneayea>wow
<paroneayea>I did *something* wrong in 8sync :)
<paroneayea>when an exception happens, I have it recursively capture all the stacks from where it happened through the delimited continuations to where the original call was starting all the coroutines
<paroneayea>it turns out
<paroneayea>that can be like 200 coroutines
<random_nick>why doesn't guile use readline? because readline is GPL and guile is LGPL?
<paroneayea>pages and pages of exceptions printed
<paroneayea>random_nick: guile has readline, but yes it's not enabled by default for that reason
<paroneayea>random_nick: (use-modules (ice-9 readline))
<paroneayea>(activate-readline)
<paroneayea>put that in ~/.guile
<wingo>rain1: i think andy keep came up with the nanopass thing iirc
<wingo>and he worked for dybvig iirc? not sure
<rain1>maybe they loved it so much that it inspired them to free chez too?
<davexunit>I imagine it was because Cisco doesn't make much money selling a Scheme compiler
<wingo>haha maybe :) i'm sure that since cadence systems was bought, they didn't need to sell chez any more, and rather wanted to share out of pride
<wingo>i think you couldn't even buy a copy of chez lately
<wingo>b/c cisco wasn't selling it iirc
<davexunit>ah
<cky>I know a couple of people in the Chez team in Cisco. :-)
<cky>I'm so glad it's been open sourced!
<cky>Oh wait, this is a GNU channel. I'm so glad Chez has been released under a free licence! :-D
<rain1>haha
<rain1>please thank them from us!
<cky>I will, I'll be meeting them at a meetup on Thursday.
<rain1>im running the make test after bootstrapping it on
<rain1>linux
<cky>rain1: GNU/Linux, or Android/Linux? ;-) (Just kidding, but I'd love to see Chez running on Android!)
<cky>I actually do like saying GNU/Linux because Linux is used in so many embedded environments (like Android) that it makes it clearer what we're talking about. So that's the non-political version of why to say GNU/Linux. :-D
<random_nick>cky: Android is always on Linux, but Linux isn't always below GNU and GNU isn't always on Linux
<cky>random_nick: Correct.
<nalaginrut>well, I just get up and say a word: chezscheme really opened
<rain1>nalaginrut, isn't it great!
<cky>random_nick: Hence it's important to distinguish between GNU/Linux (what you see in most distros today) and Android and other embedded Linux scenarios.
<cky>random_nick: And yes, you can find GNU on GNU/Hurd, GNU/kFreeBSD, etc.
<nalaginrut>rain1: yeah, I can hardly fall asleep tonight
<cky>random_nick: And let's not forget Cygwin!
<rain1>:D
<cky>random_nick: There's also GNU-Darwin (don't ask me why they used a hyphen instead of a slash).
<random_nick>cky: hopefully by the end of this summer we will have a GNU system on a GNU kernel with a GNU package manager and GNU init system :-)
<cky>random_nick: GuixSD is being ported to Hurd? :-O
<random_nick>the only problem is sound :-)
<rain1>cky yes !
<cky>Very nice. :-D
<random_nick>cky: yep, in a GSoC project!
<cky>That's fantastic news. :-D
<random_nick>did guile get any GSoC projects?
<df_>there's also gnu/illumos: http://osdyson.org/projects/dyson/wiki
<cky>df_: Oh, nice. :-)
<nalaginrut>well, so many AOTs, include ARM
<paroneayea>random_nick: there's a guix project for adding bournish (or is it bashish?)
<paroneayea>which is kind of a guile project
<paroneayea>it's about adding a layer to the guile compiler tower
<davexunit>interesting use of Guile: https://news.ycombinator.com/item?id=11573007
<davexunit>"We have a macro expander for pascal written in scheme... We had some performance problems... I just switched to guile... and got a 3x speedup"
<random_nick>what?
<df_>wonder what they were using before
<davexunit>the Chez Scheme code is pretty intimidating. there aren't really any comments and everything has crazy names.
<mario-goulart>and some binary blobs, it seems
<cky>davexunit: That just means it's time for some levelling up, young whippersnapper. ;-)
<davexunit>cky: I can only spend so much time reading poorly written code.
<davexunit>mario-goulart: I also noticed that.
<paroneayea>if leveling up means forging into a world of unreadable code, I think I'll stay at my present level :)
<cky>Hahahahahahaha.
<davexunit>Chez is cool and all, but the source wasn't exactly written for anyone beyond the author to read.
<davexunit>which makes sense given its origins as proprietary software.
<cky>Someone should refactor it to be more readable and submit a pull request. ;-)
<nalaginrut>davexunit: interesting
<davexunit>someone who is familiar enough with compilers could figure out what's going on
<davexunit>and then maybe annotate the code with comments
<davexunit>but if you're like me and don't know much about compilers, it's a rough place to start. ;)
<cky>I wish I had more free time. It'd be a fun project for me to work on.
<rain1>mario-goulart, huh?
<rain1>are there binary blobs other than bootstrap binaries?
<mario-goulart>rain1: yeah, the bootstrap binaries
<davexunit>I don't know what the blobs are for
<df_>is it self-hosting?
<rain1>thats normal
<rain1>yes df_
<davexunit>if it's a self-hosting compiler and those blobs are just a pre-built version of itself, then that's normal enough.
<davexunit>but if they are secret components
<rain1>even chicken scheme has a problem with bootstrap code
<davexunit>then Chez is nonfree
<rain1>I'm trying to find out how to cross compile, to create bootstrap bins for other systems
<mario-goulart>rain1: what's the problem with chicken's bootstrap?
<davexunit>mario-goulart: it's just the general problem with self-hosting compilers
<davexunit>you cannot bootstrap them from source
<df_>(including gcc)
<davexunit>right
<mario-goulart>indeed
<davexunit>Guile is a rare exception
<cky>I want to create a Scheme implementation which is bootstrappable with a first-stage compiler which is runnable in a mainstream Scheme implementation like Guile or Racket. :-P
<davexunit>it can be bootstrapped from a small interpreter written in C.
<cky>Oh, that too. :-P
<rain1>A nice project might be: Bootstrap chez from guile
<cky>rain1: +1
<cojy>i like that idea
<rain1>or larceny
<davexunit>I would like to reduce the amount of unbootstrappable compilers to 1: gcc
<davexunit>and then tackle gcc
<cky>davexunit: Make a clang->gcc bootstrap path. ;-)
<rain1>I wish there was more diversity in C compilers
<rain1>beyond gcc and llvm, you can not really get anywhere with other C compilers its a shame
<cky>rain1: There's a huge diversity in C compilers in the proprietary software world.
<df_>I wish there was less C code in the world :p
<cky>Just not in libre C compilers. ;-)
<rain1>oh yeah i mean I only have free software in mind here
<davexunit>cky: heh
<davexunit>but seriously, guix will go down this road eventually
<rain1>that's actually surprising to me
<davexunit>as will the rest of the reproducible builds project.
<rain1>what are these proprietary c compilers for?
<rain1>aha: make -f Mf-cross m=i3le xm=i3osx
<cky>rain1: ICC, for example, is advertised to provide extreme optimisation to code running on Intel processors (and pessimisation for code running on non-Intel processors).
<df_>the ones I can think of are highly optimised for a particular platform
<cky>df_: Right.
<rain1>alright!
<nalaginrut>cky: a bootstrapping interpreter writtern in Guile, you may take a look at this https://github.com/kanaka/mal/tree/master/guile
<nalaginrut>but for a bootstrapping compiler, hmm...
<cky>Hmm is right. :-)
<nalaginrut>bootstrap from Guile +1
<rain1>Available machine types: a6le, a6nt, a6osx, i3le, i3nt, i3osx, ta6le, ta6nt, ta6osx, ti3le, ti3nt, and ti3osx
<rain1>any idea what a vs ti is?
<rain1>maybe t is target architecture?
<df_>texus instruments?
<df_>*texas
<rain1>maybe :)
<df_>oh: http://www.scheme.com/csv8.4/8.4.html
<rain1>ah!
<df_>I wonder if they'll give scheme.com to the community too
<nalaginrut>Ti ? oh
<rain1> http://scheme.com/csug8/
<random_nick>how small is the subset of r6rs scheme that is implemented in racket, chez, chicken, racket and guile?
<random_nick>as in implemented in all of them
<rain1>nice question!
<rain1>it would take some serious research to work that
<rain1>out
<df_>or a test suite... ?
<random_nick>I think that in that subset syntax-rules is the only macro system
<rain1>"or"?
<df_>I take it there isn't an r6rs test suite then?
<taylan>there's #chez now it seems
<nalaginrut>dunno if it has delimited-continuation which I really care about...
<cojy>it doesn't
<cojy>but there's al ibrary that implements them on top of call/cc
<nalaginrut>cool enough
<taylan>cojy: AFAIK delimited continuations can't be "properly" implemented atop call/cc, FSVO "properly". don't ask for details tho...
<taylan>maybe it's just inefficient
<cojy>it can be
<cojy> http://okmij.org/ftp/continuations/implementations.html#delimcc-scheme
<rain1>I would go with reset/shift as a base to implement other things with
<rain1>if it weer up to me
<nalaginrut>I think it can mimic reset/shift, but there're some other operators for delimited-continuations
<nalaginrut>Guile has them all
<nalaginrut>hmm...one Guile rule them all
<davexunit>"there is a reason that C is the foundation of computing rather than Lisp. I don't think anybody really thinks otherwise anymore."
<davexunit>#ShitHNSays
<nalaginrut>davexunit: then he doesn't know "computing"
<davexunit>nalaginrut: precisely.
<davexunit>"As I said, I think it's outstanding research, but if you are trying to build an entire computing universe out of it, that's folly. Good luck."
<davexunit>" It's just not powerful enough -- once you add all the stuff you actually need, you're not far from the complexity of C."
<nalaginrut>interesting, for most of lispers, if we add all the stuffs we need in serious programming, we're not far from Lisp
<df_>davexunit: I gave up reading HN a while back, and I think it did wonders for my mental health
<rain1>df++
<davexunit>I hear it does
<davexunit>but I... can't... stop...
<df_>have you tried heroin?
<davexunit>not yet
<nalaginrut>it's also joyful to read the stupid comments and encourage them to say more
<rain1>haha
<paroneayea>merged the actor system into 8sync master
<lumidragon>Hey guys is it possible to get the dhclient in GuixSD to send the hostname to the dhcp server? I found that debian has a config that has this already, so I'm wondering how I could replicate this on Guix.
<davexunit>nalaginrut: the user is trying to bait me on another subthread
<lumidragon>oh shocks sry wrong channel :)
<davexunit> https://news.ycombinator.com/item?id=11574380
<random_nick>that reason was that lisp machines were slow?
<davexunit>>scheme isn't practical
<davexunit>hey uh I use Scheme every day to real work
<davexunit>>yeah I don't think that's very practical
<davexunit>o-okay
<davexunit>s/to real work/to do real work/
<nalaginrut>davexunit: but to be fair, Guile scheme is real practical, while many r5rs implementations are not
<davexunit>nalaginrut: but it's frustrating when I point out tools I use every day that are written in Scheme that work for me and they are brushed off because the narrative *must be* that Scheme is forever an impractical language for academics.
<nalaginrut>different from other languages, say, python, Scheme has too many implementations, so that we have to say the implementation explicitly when discussing, but when people talk about python, they mean CPython
<nalaginrut>so when they say "python is practical", it means CPython is practical, not guile-python which I'm planning to go
<nalaginrut>;-P
<xieyuheng>sadly, one can not write portable scheme code.
<davexunit>Scheme is best thought of as a language family
<davexunit>not a single language
<nalaginrut>but they would say "scheme is not practical" while there're lot of implementations are practical, but they actaually mean "the scheme SICP introduced is not practical"
<nalaginrut>unfair #sad
<rain1>there's no good gained telling them they are wrong
<rain1>just have to continue to do cool stuff with scheme
<nalaginrut>xieyuheng: blame the RnRS commitee ;(
<davexunit>I don't care much about portable Scheme
<nalaginrut>me too, but I'm a little regret since I may want to use Artanis with chez, but anyway, forget about it
<random_nick>what happened to that lua on guile project?
<nalaginrut>random_nick: it almost work, I need to take care of loop and break, and tables, then release a preview
<random_nick>lua seems like a language very close to the lisps
<random_nick>except for data storage
<nalaginrut>random_nick: just don't have much time these days, but Artanis can be called with lua on guile https://github.com/NalaGinrut/guile-lua-rebirth
<nalaginrut>which means other projects in Guile should too
<random_nick>nalaginrut: doesn't guile provide a while loop that can be broken from?
<nalaginrut>random_nick: if I just use `while...break' with Guile code directly, it's interpreter way
<nalaginrut>I have to transform the AST to be proper tree-il code
<nalaginrut>which is actually delimited continuations game
<stis>hej guilers!
<random_nick>"interpreter way"? you mean imperative?
<nalaginrut>lua on guile will be a compiler taking advantage of guile backend
<random_nick>nalaginrut: so guile's while is just macros?
<rain1>hello
<nalaginrut>random_nick: no, I'm not writing an lua interpreter on guile, so I can't just write scheme code to simulate the functionality
<random_nick>stis: hello
<nalaginrut>random_nick: it is a macro
<random_nick>nalaginrut: ok
<random_nick>nalaginrut: I know about the compiler tower
<nalaginrut>ok
<nalaginrut>stis: hello
<nalaginrut>I even want to do some pre-optimizing before Guile handle it, but won't be appear in first version. Although folks may think it's unnecessary, I just want to practice
<random_nick>nalaginrut: do you use the bison port that is included with guile or is lua too ambitious for that?
<nalaginrut>random_nick: no, there's LALR module built-in Guile
<nalaginrut>and I write lexer manually, it's OK
<random_nick>nalaginrut: that's basically a port of GNU bison to scheme
<nalaginrut>and the lexer and parser are tested, maybe add more test cases, but it's fine enough at present IMO
<nalaginrut>random_nick: ah year, you can say so
<random_nick>nalaginrut: and since it's based on bison it's made to go after a tokenizer which you have to write yourself anyway
<nalaginrut>yes, unfortunately, at that time we don't have good lexer generator
<nalaginrut>but manual lexer (tokenizer) is slightly better than generated one
<nalaginrut>people just lazy to write it
<random_nick>nalaginrut: how do you handle metatables?
<nalaginrut>random_nick: tables are still undone, I just write some code, but not complete, and I haven't focused on it yet. More works are in compile-tree-il at present
<nalaginrut>maybe just use tables for metatables, dunno, or there's better way, I've no idea about it at present
<nalaginrut>current tables implementation is based on Lua5.2 algorithm, static vector for integer index and plus hashtable for other keys
<nalaginrut>something like that
<wingo>lol, i just realized most of the existing port-locking code in guile master was bogus
<wingo>most of the locks would not be undone on nonlocal exit within the critical section
<wingo>wtffff
<random_nick>nalaginrut: if you really wanted to save memory you could make a hashx with a special case for integer keys
<wingo>(to be clear i am at fault there :P)
<nalaginrut>wingo: oh, which means I wasted may circles in my server before
<nalaginrut>s/may/many
<nalaginrut>random_nick: I just followed 5.2 spec, haven't thought about optimizing, don't optimizing before you think it's ready
<nalaginrut>and I removed optimizing in the code, Knuth is right
<random_nick>how is elisp's function namespace implemented in terms of language interoperability?
<wingo>i think functions and values live in different guile modules
<random_nick>so they didn't use symbol function slots?
<wingo>don't think so, no
<random_nick>so is there a reason for function slots anymore?
<wingo>do guile's symbols have them?
<rain1> http://emacshorrors.com/posts/unexecute.html
<wingo>i don't think so but i could be misremembering
<rain1>this is spectacular
<random_nick>rain1: yeah unexec is fascinatingly terrible
<rain1>pretty cool that guile emacs was able to remove it
<random_nick>afaik they still haven't recovered the performance disadvantage of not doing that craziness