News for hackers. Stuff that matters.
Re:Gambit in Emacs in the browser by jpolitz on Monday December 01, 2014 @02:20PM (#8683047)
The best thing about this is that there is emulated thread management via setTimeout going on underneath to allow for Ctrl-C and other interactivity while things are running. No background workers, no running things on the server, this is some single-page engineering goodness.

It implements proper tail calls, too, so it looks like you can run `(define (f) (f)) (f)` forever.

Cool stuff, this is one of the most robust single-page REPL experiences I've seen.

Re:Gambit in Emacs in the browser by alcoholiday on Monday December 01, 2014 @02:01PM (#8682937)
This is hilariously awesome! Aparently it's using ymacs (which I didn't know about until now) http://www.ymacs.org/ for the 'emacs'and an emscripten compiled version of Gambit (scheme).

So wrong, yet so right. I would hire this guy.

(working swell in Chrome)

Re:Gambit in Emacs in the browser by feeley on Monday December 01, 2014 @07:45PM (#8685070)
I'm glad you guys appreciate the hack value! I'm personally amazed at Mihai Bazon's work on ymacs. By the way, if you want to drive the DOM from Scheme, there's the builtin function jseval:

(jseval "alert('hello')")

Re:Gambit in Emacs in the browser by JasonFruit on Monday December 01, 2014 @03:41PM (#8683635)
Interacting with the REPL directly works for a few forms, and then it seems to get confused, interpreting output as part of the next form (I'm on Chrome for Linux version 38.0.2125.104 (64-bit)). However, when I open a buffer and write the Scheme over there, sending expressions as I usually do when developing, it works beautifully. An example:

    > (display "help!")
    help!>(newline)
    *** ERROR IN (console)@2.1 -- Unbound variable: help!>
That problem aside, this is really, really cool, and I enjoyed playing with it using a separate buffer.
Re:Gambit in Emacs in the browser by nmcfarl on Monday December 01, 2014 @03:33PM (#8683587)
Re:Gambit in Emacs in the browser by mike_ivanov on Monday December 01, 2014 @01:18PM (#8682666)
This thing just has killed my browser.
Re:Gambit in Emacs in the browser by psibi on Monday December 01, 2014 @01:58PM (#8682909)
Can confirm it on Firefox 33.1 in Linux. The memory usage shot upto 98% and swap got filled by 50%. Had to kill the process.
Re:Gambit in Emacs in the browser by TomDavey on Monday December 01, 2014 @01:28PM (#8682724)
What browser is that? I'm using Firefox 33.1.1 on Windows 7 and it's working fine, although I've just begun to explore the app. I'm not trying to deliberately break it.

So far this is rather impressive. A Scheme REPL in the browser, not bad!

Edit: I meant Firefox 33.1.1, not 31.1.1.

Re:Gambit in Emacs in the browser by agumonkey on Monday December 01, 2014 @01:26PM (#8682711)
Needs at least 2GB of available ram to build (5-10 secs on a Core2Duo laptop)

ps: Firefox Nightly 37a / Archlinux / 4GB

Re:Gambit in Emacs in the browser by smlacy on Monday December 01, 2014 @01:28PM (#8682721)
What's Gambit? Links like this without context aren't useful.
Re:Gambit in Emacs in the browser by tokenrove on Monday December 01, 2014 @01:41PM (#8682813)
It's an excellent Scheme implementation: http://dynamo.iro.umontreal.ca/wiki/index.php/Main_Page

I agree with your sentiment in general, although I feel Gambit is pretty well-known, especially because of its merits for application delivery.

Re:Gambit in Emacs in the browser by erikcw on Monday December 01, 2014 @01:40PM (#8682809)
Agreed in principle. In this case it looks like a Gambit Scheme REPL.
Re:Gambit in Emacs in the browser by asolove on Monday December 01, 2014 @04:14PM (#8683848)
Does it have tail calls, dynamic-wind, and hygienic macros? If so, I have a very interesting use for this in creating visualizations of microkanren execution traces.
Re:Gambit in Emacs in the browser by nodivbyzero on Monday December 01, 2014 @03:06PM (#8683400)
Why did you create it?