IRC channel logs

2014-12-08.log

back to list of logs

<cky>We should define new macros for Scheme Procedure and C Procedure. :-D
<cky>(Re Texinfo.)
<cky>e.g., @defscm and @defc
<cky>I'm not sure how to do that at the makeinfo level, though. At the TeX level, easy.
<cky>davexunit: ^
<davexunit>cky: yeah, that would be convenient.
<davexunit>for now I'm just regexp replacing what guile generates for me.
<cky>Aye.
<cky>If someone does what civodul suggests (and ports makeinfo to Guile), they should totally add macro functionality. :-P
<davexunit>would make good sense to use guile instead of perl
<cky>There's only one difficulty with that: almost 100% of Unix systems have Perl. not very many Unix systems have Guile.
<davexunit>one day :)
<cky>:-D
*davexunit sucks at technical writing
<davexunit>gotta hack this manual together...
<davexunit>I threw bootstrap.css at the HTML version of the manual. an easy way to improve the presentation of the default makeinfo output.
<cky>:-D
<davexunit>I need to figure out how the lillypond folks drastically changed the generated HTML so I can have a cool sidebar, too.
<nalaginrut>mornign guilers~
<davexunit>hey nalaginrut
<nalaginrut>heya
<artyom-poptsov>Hi nalaginrut
<nalaginrut>heya artyom-poptsov
*nalaginrut is writing Artanis manual with org-mode...
<davexunit>cool
*davexunit is writing sly manual with plain texinfo
<nalaginrut>davexunit: hehe
<davexunit>I have the skeleton done, now to fill it out with API docs.
<nalaginrut>it's easy if you want to port your doc to org-mode someday
<davexunit>cool :)
<nalaginrut>the CSS could be customized, so it's cool if you want to make your own design
<davexunit>nalaginrut: for now, I told makeinfo to use bootstrap css when building the html version. looks pretty decent.
<nalaginrut>davexunit: yeah, I want to play bootstrap later
<nalaginrut>besides, someone introduced Foundation5 to me, which is similar to bootstrap
<nalaginrut>but seems its docs is well
<davexunit>haven't heard of that
<nalaginrut>there're so many such things nowadays ;-D
<davexunit>yay for us devs with no design skills!
<nalaginrut>I always get sarcastic comments from designers...
<ArneBab>taylanub:
<ArneBab>taylanub: there are quite a few places where I use sexp in wisp-code: For things like lambda (and some others) they simply look better. Wisp is mostly about getting rid of superfluous parens (those which can be reconstructed trivially from indentation). But as long as there’s no paredit for it, wisp development is missing a major UI, I guess. To see what I need to do, I’ll have to learn writing scheme with paredit, though.
<amirouche>ArneBab: what is wisp-code ?
<ArneBab>sneep: later tell davexunit: cool!
<ArneBab>amirouche: a project I’m working on to infer parentheses from indentation: http://draketo.de/light/english/wisp-lisp-indentation-preprocessor
<civodul>Hello Guilers!
<wingo>moin :)
*wingo had a good idea for speeding up the scheme evaluator yesterday that doesn't involve more c :)
<nalaginrut>wingo: !!!
<amirouche>ArneBab: what is the let syntax you use in https://bitbucket.org/ArneBab/wisp#markdown-header-wisp-and-curly-infix-srfi-105
<nalaginrut>don't tell me "just compile the evaluator with another AOT"... ;-S
<amirouche>ArneBab: It allows to create a recursive function without lambda ?
<ArneBab>amirouche: you can do that with guile
<ArneBab>amirouche: it’s called named let.
<amirouche>ArneBab: ah ok, I will check the documentation of let then
<amirouche>ArneBab: regarding wisp, I wondering how macro works
<ArneBab>(let <name> ((<arg> <initial value>)) (name <arg>)
<amirouche>the syntax is pretty clean
<amirouche>thx :)
<wingo>nalaginrut: nah :) but we can implement a small optimizer in eval.scm
<ArneBab>amirouche: wisp simply turns into scheme - all the tricky stuff is done by scheme.
<nalaginrut>amirouche: there's always lambda, you can't escape from it, in principle ;-P
<wingo>really a compiler, not an optimizer
<nalaginrut>well, the way to accelerate a compiler is to add one more compiler inside huh?
<wingo>haha
<nalaginrut>;-D
<nalaginrut>I expect to see it anyway
<amirouche>relevant meme https://www.rfk.id.au/blog/entry/pypy-js-poc-jit/resources/yo-dawg-jit.png
<amirouche>it even has a domain now http://pypyjs.org/demo/
<ArneBab>amirouche: *gg*
<nilg>hi, how to get the path of the file being current executed? For guile 2.0?
<taylanub>nilg: BTW the Guile manual is at http://www.gnu.org/software/guile/manual/html_node/ (might also be on your system in Info format)
<taylanub>found `current-file-name' in (info "(guile) Source Properties")
<taylanub>err, `current-filename'
<taylanub>nilg: calling "(current-filename)" (actually a macro) should give it
<nilg>oh, I don't know if I would have thought of looking there, thank you!
<taylanub>np
<nilg>taylanub: it returns #f
<taylanub>nilg: that would be expected in an interacted session, or when the code is fed through a pipe, etc., but in a file that's interpreted or compiled it should work fine...
<taylanub>interactive*
<nilg>I see... yes Iy
<nilg>I guess the code is somewhat fed through a pipe, I'll check
<cky>amirouche: http://qr.ae/qp3K3 <-- my blog post about named let
<cky>amirouche: Implementation details, what it's all about, etc.
<cky>ArneBab: Since you're on Quora, you might like this too. :-)
<ArneBab>cky: oh, I’m on quora… ah, yes… and I have pending notifications… ☺
<davexunit>cky: cool blog post. I didn't about 'rect'
<davexunit>I mean, 'rec'
<ArneBab>cky: I linked to your post. That saves me from translating my text on named let ☺ http://draketo.de/licht/freie-software/let-rekursion
<ArneBab>cky: 24 lines for a killer feature of a language - nice!
<cky>ArneBab: Thanks!
<cky>davexunit: `rec` is awesome.
<nalaginrut>ha, I just took a look at Rust, and I thought it's wisp ;-)
<cky>Lol.
<nalaginrut>well, more like sweet-expression
<nalaginrut> http://en.wikipedia.org/wiki/Rust_(programming_language)
<cky>Speaking of Rust and sweet-expressions, another Mozilla invention is sweet.js.
<nalaginrut>oh
<nalaginrut>I wish there could be a Scheme dialect in JS, in product level
<nalaginrut>I hate the scope in JS...
<ArneBab>cky: dang… ☺
*ArneBab won’t mind the name, though…
<nalaginrut>ArneBab: oh, wisp for coffee-script?!
<nalaginrut>maybe just an accident
*nalaginrut is looking coffee-script for Scheme js
<ArneBab>nalaginrut: there is a wisp in javascript - the names clashed on marmalade ☺
<ArneBab>nalaginrut: you could try to compile guile for asm.js ☺
<ArneBab> http://repl.it/languages/Scheme
<ArneBab>^ scheme for js
<nalaginrut>it's similar, clojure implementation, I thought it's wisp
<nalaginrut>ArneBab: no, I don't mean Scheme repl in js
<nalaginrut>I mean to write Scheme for web frontend
<ArneBab>well, the idea behind wisp isn’t *that* new (how old is SRFI-49?). Wisp is just a try to clean it up.
<ArneBab>ah, ok
<ArneBab>nalaginrut: like sxml for the web?
<nalaginrut>ArneBab: no, sxml is for html layout
<taylanub>compiling Scheme to JS?
<nalaginrut>I want this: <script language=scheme>(display "hello")</script>
<nalaginrut>taylanub: it's one of the approaches ;-)
<nalaginrut>I think biwa-scheme is close to what I want
<nalaginrut>but last time I tried it, there're few problems, last year IMO
<ArneBab>taylanub: that sounds like REPL in scheme without showing the REPL ☺
<ArneBab>(well, with access to the DOM)
<taylanub>if browsers tend to ignore <script> tags with an unknown 'language' attribute, then one could really use <script language=scheme>...</script>, which is run by some <script language=ecmascript src="execute-scheme-script-tags.js" />
<ArneBab>taylanub: yes, that’s what I would assume.
<nalaginrut>taylanub: yes, it works if you embed a Scheme compiler in js
<nalaginrut>or interpreter
<nalaginrut>whatever
<ArneBab>what would be interesting is a browser built on Guile: It already has some JS and I would hope that much of the HTML rendering in Firefox or Chrome is written in Javascript, so that might be reusable. (wingo might know more here)
<ArneBab>(but likely far too much work)
<ArneBab>(and the necessary jailing of JS could be a major roadblock)
<taylanub>Gecko and WebKit are both written in C++
<taylanub>they need to be super performant, thanks to the state of the World Wide Bloat
<nalaginrut>ArneBab: I like this idea, but for efficient consideration, unless we have AOT in Guile
<davexunit>when guile-gnome is good shape, it should be "easy enough" to throw in a webkit widget and have a guile browser.
<nalaginrut>or the speed for running JS is now enough
<ArneBab>taylanub: yes…
<nalaginrut>s/now/not
<davexunit>we wouldn't have control over the rendering engine, but we would be able to provide unparalleled extensibility
<davexunit>conkeror, but better. :)
<davexunit>I like conkeror, but it doesn't have developer tools so I can't use it for real work.
<nalaginrut>and the JS engine of them are highly optimized
<ArneBab>taylanub: I’d hoped that rendering would move into JS - after all JS takes the highest toll on the rendering nowadays…
<nalaginrut>JSC in webkit has JIT, V8 is optimized with ASM code
<ArneBab>nalaginrut: I’d like to see how far native compilation can push guile
<nalaginrut>ArneBab: the AOT means continuous optimizing, which is challenging and interesting work
<nalaginrut>;-P
<taylanub>.oO( I'd like to see the module system cleaned/improved so we can optimize inherently more things... )
<ArneBab>wish Guile had a big enough userbase that a fundraiser could provide enough money to make that paid work :)
<nalaginrut>it's not as good as we thought while we've done AOT
<nalaginrut>but will be better and better
<nalaginrut>compilation optimizing will never end, this is the most interesting part for me
<nalaginrut>ArneBab: yeah
<cky>You know, I _don't_ want <script type="text/scheme"> to become mainstream. All the horrible hacky JS scriptlets people write are then going to land on our shores, and I'd cry my eyes out.
<daviid>:)
<cky>nalaginrut: JS scope is exactly what you'd expect, except that blocks are not an implicit let.
<cky>nalaginrut: Which is fine, since in Scheme, lets _are_ lambdas.
<cky>So just write your JS functions like you'd write them in Scheme, and you'd be fine.
<nalaginrut>well, it's not block scope as I expected
<cky>Well, if you don't rely on any mutability (like in Scheme), then it won't make a difference anyway.
<taylanub>JS also hoists vars, though if you limit var declarations/initializations to the beginnings of scopes then you practically get letrec*/internal-define behavior
<cky>Yep.
<nalaginrut>it's hard to avoid mutability when you write more code in a project, hmm...
<nalaginrut>actually, sometimes we do need to rely mutability
<cky>Yes, but you can seriously limit it, just like in Scheme.
<nalaginrut>after all, JS is not a real FP, so the programming pattern is not so nice to keep it functional
<cky>Also, in JS, local variables are not as commonly used (except for implementing "private" "class" members), usually you'd alter object properties for state.
<nalaginrut>but when you use these cooked OOP feature, you're not using an original JS, it's a wrapper for new language ;-P
<nalaginrut>I just need one more step, a wrapper for Scheme
<nalaginrut>I would say so, nowadays, no one really use `JS', but dialect or frontend wrappers based on JS
<nalaginrut>this looks very similar to the situation of Lisp...
<nalaginrut>but JS is not so nice compared to Lisp..
<nalaginrut>people don't really use Lisp but the DSL of their macros...
<ArneBab>nalaginrut: isn’t that the reason why multiple lisp-on-javascript implementations exist?
<ArneBab>(though I don’t really like having too many mutually excluding DSLs - I’m used to consistency and canonical code from Python)
<nalaginrut>ArneBab: yes there're some, but I wonder if anyone use lisp-on-js to write product
<ArneBab>(too big DSLs make it hard to just start hacking on the code of someone else)
<ArneBab>nalaginrut: I only know that people use clojure, but not about lisp-on-js
<ArneBab>A friend of mine works is a company which uses clojure. He said “I always wanted to earn my money by writing lisp”.
<ArneBab>
<ArneBab>is→in
<nalaginrut>ArneBab: I don't like the abuse of DSL too, however, JS is becoming so
<nalaginrut>there're lot of DSL of JS, I just learned to play AngularJS this morning ;-D
<nalaginrut>ArneBab: I want to do it too, but I wish it's Scheme ;-P
<ArneBab>I guess that’s what Guido van Rossum wanted to fight when he stated that Python is an experiment how much Freedom developers truly need.
<nalaginrut>hmm...maybe he succeed, but I don't think the problem of Python is about the syntax
<nalaginrut>although I don't like indent-oriented coding, my Emacs don't config to highlight whitespaces
<nalaginrut>scope in Python is not my tea too, I love scope in Scheme and C, very simple ;-)
<ArneBab>nalaginrut: I think Guido succeeded: Python-code is normally very easy to understand. However for me it grew limiting (and boring) last year. That’s why I started learning Scheme.
<ArneBab>I needed more freedom
*davexunit just wrote some python
*davexunit likes ruby a lot more
*ArneBab is writing Python every day
<nalaginrut>ArneBab: "easy to understand" before people take a look inside
<nalaginrut>it looks easy
<nalaginrut>Scheme is reversed side, it looks hard...
<dsmith-work>Morning Greetings, Guilers
<dsmith-work>sneek seems to be gone. :(
<ArneBab>nalaginrut: most code you actually change is easy to understand. As soon as you go for the metaprogramming in Python it is much, much harder to understand than Scheme. But I think that’s intentional: Make the things easy which you want people to use.
<flaggy>metaprogramming in python is not hard, it's just featureless :P
<ArneBab>flaggy: it’s ugly with lots of rough edges
<ArneBab>that’s not to say that you can’t do metaprogramming in Python - most internals are exposed to the programmer as dictionaries - but whenever you touch it, Python reminds you that you’re not intended to do this regularly.
<ArneBab>whether that’s a good thing is up for debate. For many things I like it (I can actually read the code from my collegues, because they stick to conventional style), but at some point I felt like it limited my thinking too much.
<nalaginrut>hah, years ago I saw lambda in Python, then my function become more reasonable. And I wonder if they can add 'begin' since lambda in Python accepts only one line, they said "we are not building Lisp". Actually, Guido's explain is not convincible to me. I understand if he accept `begin', it's unavoidable to add more Scheme features then...
<taylanub>solution: just use Scheme from the beginning :P
<nalaginrut>yeah, that's what I want to say... ;-D
*nalaginrut has to go to bed...
<nalaginrut>night guilers~
<nalaginrut>zzzZZZZZ
<flaggy>I rather use python and write my own ad hoc, informally-specified, bug-ridden, slow implementation of half of scheme.
<taylanub>:)
<nalaginrut>flaggy: how about reversed way? use Scheme for a half-baked Python dialect ;-P
*nalaginrut shut down
<flaggy>I have not enough practice in scheme yet :(
<mark_weaver>dsmith-work: I asked sneek to tell you that he thinks it's May, but he's not around to tell you :-/
<dsmith-work>mark_weaver: Yeah, we had a power clitch a while ago.
<dsmith-work>mark_weaver: I thought I had things configured to set the time with ntp, but it looks like that didn't happen.
<dsmith-work>Might be that the Inet was not fully up yet.
<mark_wea`>wow, ever since I moved my server to a new ISP, my connections to freenode are getting dropped like 10 times per day :-(
<mark_wea`>so much for being able to keep a continuous backlog of my channels of interest in ERC
<daviid>mark_wea: this is terrible indeed, almost depressing,i've been there in not such a long time ago!
<daviid>and right at this moment i'm trying to run our s/w [guile 'based'] on 1 of our lab customer, that for some internal rules can _not_ use internet, so they kind of counter this rule putting a 3g modem, the signal is low [9 bytes to 19kB], and sometimes dies, it drives me crasy
<daviid> and these conditions almost always end-up guile's threads, running clojure and octave scripts, mainly, in sleep mode, for ever, i have no idea why
<daviid>just wrote a quizz to clojure the channel, but no answer, not even we don't know or try this...
<daviid>[ in these conditons, debian updates can take up to 11 days, how is that about "can'i be patient..." haha ]
<mark_weaver>ouch
<daviid>anyone here knows, maybe, if there is a better way to trigger [as many as cores] java [clojure code] scripts? here is what I do: http://paste.lisp.org/display/144632
<daviid>i am thinking in a way to launch a java server instead of many "java -cp ..." and that could, maybe, reduce the 'sleeping' problem i'm facing
<daviid>this 'sleep mode' problem especially occurs while working remotely, and the problem gets worth as bandwidth gets slow, like this 3g modem situation. here is the basic sequence i do: "ssh -CX <host>", then "cd <where images are>; <a-guile-script>", which will trigger thousands of threads, using par-map [patched by mark_weaver]. here you can see all threads went to sleep: http://paste.lisp.org/display/144632#1
<daviid>i'am sharing in case someone has an idea, because i still have absolutely no clue why these threads tend to land in sleep mode. i am not saying it is guile, just looking for help...
<daviid>s/worth/worst
<daviid>in the following paste, look at the top, the watershed procedure, what happewns if the clojure scripts does write anything?
<daviid> http://paste.lisp.org/display/144632
<daviid>sorry that sentence was not clear! what happens if clojure does _not_ write anything to sdtout ? will guile hang for ever? or will it receive eof? and proceed?
<mark_weaver>daviid: if the subprocess exits without outputting anything, then the 'read-line' call will return EOF and proceed. but you could test this yourself by just changing the command to "sleep 10" or some such.
<mark_weaver>bah