<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>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))))) <jmd>I thought it was the same as map, but didn't have a return value. <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 <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>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 <random_nick>hm, hurd has common lisp bindings but not guile bindings <wleslie>I think the official approach to hurd binding now is 'have mig generate platform code' and 'build traditional wrappers for the store libraries' <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 <wleslie>that will be the coolest thing ever. <wleslie>Good [appropriate time] dsmith-work! <civodul>"nice" refers to the fact that it's been freed, not to the fact that it uses a non-copyleft license ;-) <davexunit>I wonder if there are any juicy implementation details that guile can snarf <wleslie>'inlining is copy-propogation applied to lambda forms' was stuck in wingo's head for a while, I think <davexunit>I wonder what kind of impact this will have on the free schemes out there <wingo>i think it can only improve everything <wingo>more buzz around scheme, more good quality implementations <davexunit>like, will people abandon the current free schemes and move to chez? <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 :-) <wingo>i heard also that chez's performance could be better; but now we can benchmark it properly <wingo>before, it was never properly benchmarked publically due to nda's etc <rain1>interesting that they use nanopass! <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 <random_nick>why doesn't guile use readline? because readline is GPL and guile is LGPL? <paroneayea>random_nick: guile has readline, but yes it's not enabled by default for that reason <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 <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 <cky>I will, I'll be meeting them at a meetup on Thursday. <rain1>im running the make test after bootstrapping it on <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 <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. <cky>random_nick: And let's not forget Cygwin! <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 <cky>That's fantastic news. :-D <paroneayea>random_nick: there's a guix project for adding bournish (or is it bashish?) <paroneayea>it's about adding a layer to the guile compiler tower <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" <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. <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. <paroneayea>if leveling up means forging into a world of unreadable code, I think I'll stay at my present level :) <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. ;-) <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>are there binary blobs other than bootstrap binaries? <davexunit>if it's a self-hosting compiler and those blobs are just a pre-built version of itself, then that's normal enough. <rain1>even chicken scheme has a problem with bootstrap code <rain1>I'm trying to find out how to cross compile, to create bootstrap bins for other systems <davexunit>mario-goulart: it's just the general problem with self-hosting compilers <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. <rain1>A nice project might be: Bootstrap chez from guile <davexunit>I would like to reduce the amount of unbootstrappable compilers to 1: 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>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 <rain1>Available machine types: a6le, a6nt, a6osx, i3le, i3nt, i3osx, ta6le, ta6nt, ta6osx, ti3le, ti3nt, and ti3osx <rain1>maybe t is target architecture? <df_>I wonder if they'll give scheme.com to the community too <random_nick>how small is the subset of r6rs scheme that is implemented in racket, chez, chicken, racket and guile? <rain1>it would take some serious research to work that <df_>or a test suite... ? <random_nick>I think that in that subset syntax-rules is the only macro system <df_>I take it there isn't an r6rs test suite then? <nalaginrut>dunno if it has delimited-continuation which I really care about... <cojy>but there's al ibrary that implements them on top of call/cc <taylan>cojy: AFAIK delimited continuations can't be "properly" implemented atop call/cc, FSVO "properly". don't ask for details tho... <rain1>I would go with reset/shift as a base to implement other things with <nalaginrut>I think it can mimic reset/shift, but there're some other operators for delimited-continuations <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>"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 <df_>have you tried heroin? <nalaginrut>it's also joyful to read the stupid comments and encourage them to say more <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 <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 <xieyuheng>sadly, one can not write portable scheme code. <davexunit>Scheme is best thought of as a language family <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" <rain1>there's no good gained telling them they are wrong <rain1>just have to continue to do cool stuff with scheme <nalaginrut>me too, but I'm a little regret since I may want to use Artanis with chez, but anyway, forget about it <nalaginrut>random_nick: it almost work, I need to take care of loop and break, and tables, then release a preview <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>lua on guile will be a compiler taking advantage of guile backend <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 <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 <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 <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>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 <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 <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>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 <wingo>do guile's symbols have them? <wingo>i don't think so but i could be misremembering <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