IRC channel logs

2015-04-22.log

back to list of logs

<nalaginrut>morning guilers~
*nalaginrut is learning HTTP/2 for future Artanis...
<ArneBab_>nalaginrut: moin moin
<nalaginrut>ArneBab_: heya
<ArneBab_>nalaginrut: what are the key benefits of HTTP/2?
<ArneBab_>I’m not sure which of the new developments of the past decade are part of that…
<nalaginrut>ArneBab_: I don't know yet, seems just more secure, and introduced much complexity
<ArneBab_>does it include web pushing?
<ArneBab_>s/pushing/sockets/?
<nalaginrut>dunno, I still can't confirm if server-push will replace websocket
<ArneBab_>hm
<nalaginrut>anyway, it's a too new things, not well learned by most people
<ArneBab_>I personally love it that this becomes a capability: Now it would be possible to implement Gnutella completely on top of standard HTTP
<nalaginrut>oh, seems WS can be implemented on top of HTTP2
<nalaginrut> https://github.com/yutakahirano/ws-over-http2/blob/master/ws-over-http2-message-mapping.md
<nalaginrut>I need a good plan to consider how to implement them in Artanis, without any redundant work
<nalaginrut>ArneBab_: out of topic. Do you ever want to use Scheme to write web?
<ArneBab_>why not?
<ArneBab_>nalaginrut: the decision I see is static sites, PHP (for commodity servers) or *whatever I like* (on my own server).
<nalaginrut>ArneBab_: I mean use Scheme to replace JS
<ArneBab_>that would be cool - if I could use all Guile features.
<ArneBab_>afaik there’s Biwa which provides scheme on javascript, but there’s much more to Guile than implementing Scheme http://www.biwascheme.org/
<ArneBab_>also cool would be a Guile Browser: Using Guile to interpret Javascript - but also providing all other Guile languages.
<ArneBab_>with Guile compiled to asm.js as fallback for websites who use that.
<ArneBab_>“if you used the Guile browser, this would be much faster” ☺
<ArneBab_>guile-emacs using eww with Guile as backend for running JS code
<ArneBab_>→ full javascript-capable emacs-based browser
<nalaginrut>ArneBab_: yes, but I found biwascheme doesn't contain all the Scheme features. jsScheme seems contain most of the features so far I found
<nalaginrut>but biwaScheme is good at DOM handling
<ArneBab_>I did not yet try either
<nalaginrut>ArneBab_: http://ceaude.twoticketsplease.de/js-lisps.html
<nalaginrut>I'm trying to write one which looks like Guile, and good at DOM
<nalaginrut>I do this because it's easier to generate frontend in Artanis if the frontend also accept s-expr
<nalaginrut>rather than JS
<nalaginrut>of course, I can use other JS dialect, like other web framework does, but I still prefer Scheme
<ArneBab_>that would be cool
<ArneBab_>somehow the inverse of node.js :)
<nalaginrut>well...but in the beginning, they said it's Scheme they chosen for web
<nalaginrut>but became ecmascript finally
<nalaginrut>too bad
<nalaginrut>but ecmascript also has kind of homoiconicity to provide JSON
<nalaginrut>ArneBab_: maybe we can make a special HTTP protocol in SXML over websocket
<nalaginrut>hmm...maybe no need to do so, just return S
<nalaginrut>hmm...maybe no need to do so, just return SXML as response-body
<ArneBab_>jupp
<ArneBab_>I think JS won, because it was already there.
<ArneBab_>the beginnings were horrible, but it was the only option people had.
<nalaginrut>ArneBab_: there still is a relative perfect way to do what I said for frontend, but maybe harder. To write a asm.js compiler for Artanis...
<ArneBab_>it might be possible to compile Guile to asm.js
<ArneBab_>I just wish there were emscripten for GCC
<nalaginrut>ArneBab_: well, seems it's possibly be done with MELT
<nalaginrut>a GCC plugin to explore its IR, and it's a lisp dialect
<ArneBab_> http://gcc-melt.org/tutomeltlang.html
<ArneBab_>though I think what would be needed is retargeting: http://www.drdobbs.com/retargeting-the-gnu-c-compiler/184401529
<nalaginrut>ArneBab_: hmm...you mean add a new backend to GCC?
<nalaginrut>I don't know which way is easier, but the later sounds cool
<nalaginrut>ArneBab_: the former needs to send patches to emscripten, the later for GCC
<ArneBab_>yes
<ArneBab_> https://gcc.gnu.org/onlinedocs/gccint/Back-End.html#Back-End
<ArneBab_>There is explicit support in GCC for adding new backends, but it doesn’t look easy.
<ArneBab_>emscripten might already have additional infrastructure in place, though I would prefer to compile with plain GCC.
<ArneBab_>here’s a description for writing a machine description: http://www.cse.iitb.ac.in/grc/intdocs/gcc-writing-md.html
<nalaginrut>the only good news is that it's necessary to deal with a Lisp dialect, MELT for emscripten, MD for GCC ;-P
<ArneBab_>
<nalaginrut>ArneBab_: I'll mark all these docs and learn how possibly to go
<ArneBab_>that sounds awesome! I fear I won’t have the time to do it myself, but I would love seeing it become a reality!
<nalaginrut>ArneBab_: oh, you want to do it too?
<ArneBab_>I wanted to do it when I first saw emscripten, but the reality then was the same as today: The project was too daunting to tackle in my free time.
<nalaginrut>yes, the only thing I fear is huge workload, not the complexity...
<ArneBab_>yes…
<nalaginrut>let me see the relative smaller backend, say, AVR...
<nalaginrut>hmm...25k lines
<nalaginrut>oh, blackfin backend only 12k lines
*nalaginrut just want to confirm the possible least LOC
<nalaginrut>well, mmix only 5k LOC
<nalaginrut>maybe a good start...
<ArneBab_>5k sounds doable…
<ArneBab_>though still lots of work
<nalaginrut>at least learn-able before you want to drop ;-)
<ArneBab_>
<nalaginrut>ArneBab_: oh, pdp11 has 4.3K
<nalaginrut>anyway, asm.js backend doesn't need elf, so maybe save some work
<ArneBab_>how much space does ELF writing take up in the definition?
<nalaginrut>ArneBab_: dunno, I saw there're various elf headers in others' backend, but I still don't know how to evaluate the workload
<ArneBab_>same for me
<ArneBab_>Interesting Article: #JavaScript Isn't #Scheme: http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/
<nalaginrut>ArneBab_: oh
<ArneBab_>doesn’t mean that it can’t be used to implement a scheme program - C isn’t scheme either :)
<nalaginrut>ArneBab_: one more thing, emscripten also compile graphic lib calling to html5, it's worth to consider if gcc can do so. My understand is that gcc only generate the asm code
<nalaginrut>but it's possible to add libs, just like gccgo
<nalaginrut>dunno, but seems emscripten breaks KISS principle
<ArneBab_>yes
<ArneBab_>on the other hand, it makes games in the browser work
<nalaginrut>yes, especially games
<nalaginrut>especially for games
<ArneBab_>maybe those html5-porting parts could be reused.
<nalaginrut>I believe it can, but I don't know if it's proper to put it in gcc
<ArneBab_>Maybe emscripten could use gcc with an asm.js target
<ArneBab_>→ keep those parts in emscripten, but enhance it to use GCC
<nalaginrut>ArneBab_: it sounds the first way, using MELT
<nalaginrut>;-P
<nalaginrut>ArneBab_: alright, I think it's possible to generate GIMPLE from gcc, and compile GIMPLE to js
<nalaginrut>but it depends on emscripten, it'll be hard if emscripten coupled with LLVM too tight
<nalaginrut>ArneBab_: after took a look at emscripten's code, I don't think this point is optimistic...
<nalaginrut>it's not a flexible design to support multi-backend, actually, 'backend' is not proper here, such kind of compiler uses IR from another compiler as its frontend...
<nalaginrut>if it's flexible as Guile then things will be better...
<nalaginrut>if it's any possible to start a new alike project, I would like to suggest use Guile to parse GIMPLE then generate JS
<nalaginrut>write asm.js backend for GCC/Guile directly seems not competition for emscripten...
<ArneBab_>I’d have wished it were simpler
***mario-go` is now known as mario-goulart
<dsmith-work>Wednesday Greetings, Guilers
<paroneayea>o/
<mark_weaver>dsmith-work: sneek thinks it's May 8
<mark_weaver>sneek: seen mark_weaver
<sneek>mark_weaver was here May 08 at 08:10 am UTC, saying: sneek: seen mark_weaver.
***michel_mno is now known as michel_mno_afk
<dsmith-work>mark_weaver: Thanks.
<dsmith-work>!uptime
<sneek> 09:11:58 up 23 days, 9:21, 0 users, load average: 0.00, 0.01, 0.05
<dsmith-work>Hmm.
<dsmith-work>We did lose power a few weeks ago. I wonder if the bot has been time challenged since then.
<mark_weaver>maybe install openntpd?
<dsmith-work>mark_weaver: I think what happens is after a power outage, it reboots quicker than the router, and the initial ntpdate fails.
<dsmith-work>mark_weaver: BTW: I can't seem to get my rpi to boot anymore. Not sure if it's broke or the microSD to SD adapter I'm using doesn't work.
<dsmith-work>sneek likes the beaglebone black much better
*sneek wags
<ArneBab_>how can I show a representation of arbitrary data which I can read back into the REPL?
<ArneBab_>something like (write '(1 2 3)) → (1 2 3) ⇒ (quote (1 2 3))
<ArneBab_>can I also output it as '(1 2 3)?
<artyom-poptsov1>ArneBab_: Hi. To my understanding, 'write' prints data to stdout, so I think one could print the data to a string and then read the string as Scheme code.
<ArneBab_>what I wonder is why (write '(1 2 3)) gives (1 2 3) and not '(1 2 3)
<ijp>because then READing that output wouldn't give you the same data
<ijp>that said, not everything write produces can be read back in
<ArneBab_>ijp: ah, ok
<ArneBab_>(with-input-from-string "(1 2 3)" read )
<ArneBab_>I just discovered that I don’t need to use special ,X command but can simply use (help <something>) to get information on a topic
<dsmith-work>ArneBab_: Check this out vv
<dsmith-work>sneek: guile help cons
<sneek>`cons' is a procedure in the (guile) module.
<sneek>- Scheme Procedure: cons x y
<sneek> Return a newly allocated pair whose car is X and whose cdr is Y.
<sneek> The pair is guaranteed to be different (in the sense of `eq?') from
<sneek> every previously existing object.
<dsmith-work>ArneBab_: uses (help <something>)
<ArneBab_>nice
<ArneBab_>sneek: guile help (lambda (write 1))
<sneek>Did not find any object named `#{\\x28;lambda \\x28;write 1\\x29;\\x29;}#'
<ArneBab_>ah, it has a safeguard ☺
<ArneBab_>dsmith-work: would have been too easy ☺
<ArneBab_>sneek: guile help foo bar baz
<sneek>Did not find any object named `#{foo bar baz}#'
<ArneBab_>dsmith-work: is there a short command for (help <foo>)?
<ArneBab_>something along the lines of ,d help, but which gives (help help)?
<ArneBab_>bbad - happy hacking!
<dsmith-work>ArneBab_: nope
<dsmith-work>ArneBab_: nothing other than "sneek help"