3 ms·
Chicken Scheme Websockets
- AlexanderDhoore 12y agoChicken Scheme uses a technique called "Cheney on the M.T.A." to implement it's garbage collection (and entire language, really). It's one of the most mind-bending things I've ever heard of. Here's the article: http://home.pipeline.com/~hbaker1/CheneyMTA.html http://home.pipeline.com/~hbaker1/CheneyMTA.html
- thecombjelly 12y agoHere is an article discussing the utilization of this technique specifically for CHICKEN scheme. http://www.more-magic.net/posts/internals-gc.html http://www.more-magic.net/posts/internals-gc.html
- Direct 12y agoThis and the paper above were extremely entertaining reads. To the point that I am downloading CHICKEN right now to start exploring. Thank you for those links.
- deleted 12y ago[deleted]
- jbert 12y agoSeconded. That is a great read to help improve your understanding of the C runtime environment (stack frames, longjmp etc).
- baby 12y agoWhy are people still using languages like scheme? I learned that in university and always hated all those parentheses and thought I would never have to use it again.
- kryptiskt 12y agoScheme is used a lot in programming language research because it is a very clean and minimal Lisp. It's a great base for experimenting with new language constructs and compilation techniques. The parentheses is just a thing to get used to, once you have done that you see the structure, not the characters. It 's also a win for research in that no effort need to be wasted on syntax, which usually isn't the object of study anyway.
- glibgil 12y agoLanguages like scheme and lisp do not have real syntax, but are more like abstract syntax tree markup languages. That is both the appeal and the dissuasion. Attempts have been made to create syntax for these languages, but it never catches on. https://www.google.com/webhp?#q=alternative+syntax+lisp+%7C+scheme https://www.google.com/webhp?#q=alternative+syntax+lisp+%7C+...
- ffreire 12y agoThis is anecdotal, but I've come to really appreciate the subtle syntax changes that Clojure has adopted. With an editor that provides support for "rainbow" parenthesis I've found Clojure to be the most readable of all the Lisps I've had the pleasure of working with (Guile and Racket among them).
- foobarbaz1234 12y agoI am a fan of Scheme but never got that statement. Why do people say Scheme/Lisp has no syntax? I mean clearly it has a _simple_ syntax, i.e. an expression is either an atom (an identifier, a number, a lambda expression, etc.) or a list of expressions, denoated by "(expr0 expr1 ... exprN). I would say it has a simple, well-thought and powerful syntax.
- thecombjelly 12y agoIt is true that it is a little more nuanced than "has no syntax". The core of the language has very little syntax relative to many of the more popular languages but it still does have some syntax. The confusion also arises because often the syntax it does have looks just the same as function invocation. "or" is syntax whereas "+" is not but they both look the same in invocation. (or fu bar) and (+ 1 2) but "or" is short circuiting and "+" is not. "or" is syntax but it doesn't look like the syntax a lot of people are used to. In fact, if you use scheme extensively you will probably use more syntax than most languages. Scheme and other lisps are very good at allowing you to create new syntax which is very helpful in creating DSLs which you will run across a lot in scheme libraries and the SRFIs.
- davexunit 12y agoThe example echo server is very elegant. (with-websocket (lambda () (send-message (string-append "you said: " (receive-message))))) I'll add "porting Chicken web sockets to GNU Guile" to my ever growing todo list.
- agumonkey 12y agoMakes local and remote io ... quite the same.
- thecombjelly 12y agoThank you. (I'm the author of the library.) It came about after quite a few tries at a good API and with a lot of feedback from other CHICKEN hackers. It probably isn't very portable right now, unfortunately. It uses a lot of CHICKEN specific things to increase speed and memory efficiency but I'm totally open to making it more portable.
- davexunit 12y ago>It came about after quite a few tries at a good API I'm very familiar with that cycle. I'm writing a game engine in Guile and I am constantly implementing something, throwing it away, and trying again. Every time you get a bit closer to the API you really want. >It probably isn't very portable right now, unfortunately. That's alright. Portable Scheme is cool, but I prefer using what the implementation gives me instead of restricting myself to RnRS. Especially so for something like networking code. I might never get around to it, but if I find myself wanting to tackle a new project, I'll give porting this a try.
- deleted 12y ago[deleted]