4 ms·
"The new internals will eventually allow for user-space tasklets or green threads that suspend to a scheduler when they would cause blocking I/O, allowing users
by ianleeclark 10y ago
"The new internals will eventually allow for user-space
tasklets or green threads that suspend to a scheduler when they would
cause blocking I/O, allowing users to write straightforward network
services that parse their input and send their output as if it were
blocking, while under the hood Guile can multiplex many active
connections at once."
Green threads in the future sounds really interesting. I've never touched scheme (only dabbled in Clojure), but I've always wanted to get a Lisp under my belt. Maybe Guile will be the one, but the biggest issue for me in choosing a Lisp is the sheer amount. It's hard to know the true tradeoffs between different implementations, so maybe I should just go with Common Lisp
- PeCaN 10y agoIf you actually want to develop applications you should probably stick to Common Lisp. SBCL and ClozureCL are extremely high-quality implementations and Common Lisp generally has the most libraries. It's probably the worst Lisp from a design standpoint, but the best from a practical one. Racket seems interesting in that regard however. If you want to embed a Lisp in a larger application, Guile is definitely good with an easy API and high-quality implementation.
- ianleeclark 10y agoEmbedding Guile does sound interesting, but the problem is I don't have any use-cases. I have looked into SBCL before, so I may check it out. Chicken Lisp seems nice with its packaging system, but at the same time, that's the only experience I've had with it. I'll probably end up going with SBCL; I have seen it recommended many, many times for beginners wanting to use lisp.
- davexunit 10y agoGuile programmer here. I highly recommend extending Guile rather than embedding it within another program. For example, the GNU Guix package manager provides a suite of tools, but it's also a collection of Guile modules so that other programs can use it as a library. I know quite a few SBCL users now from the Lisp games community, so if you are enticed by CLOS and such then that also seems like a fine road to travel down. Good luck on your Lisp journey!
- ThatGeoGuy 10y ago> Chicken Lisp seems nice with its packaging system, > but at the same time, that's the only experience I've > had with it. I'll probably end up going with SBCL; I > have seen it recommended many, many times for > beginners wanting to use lisp. CHICKEN Scheme (not exactly a lisp as per "Common Lisp") is quite good, even beyond the packaging system. I'd say the language itself has some drawbacks compared to Guile as a Scheme (no delimited continuations, only green threads), but there's a lot to love too (FFI / bind module, renaming macros, wealth of modules, and the community / IRC channel). That said, SBCL isn't bad, but I'm personally doubtful there's much of a difference at the end of the day. Most of the time anything you write in Common Lisp can be more or less translated into Scheme with _very_ little effort, so which LISP you pick hardly matters. All that said, I still use both Guile and CHICKEN myself, and swap between them depending on whatever my use case is. I tend to use more CHICKEN nowadays because the Guile on Windows story is a sad one, but overall there's a lot of fun to be had with either language.
- outworlder 10y agoThe FFI is wonderful. Chicken also enables neat hacks. If you grab the generated C code and paste a couple of lines in your app's entry point, you can compile the resulting blob and deploy on iOS, for instance.
- davexunit 10y agoPart of the async i/o solution for Guile involves "prompts" (more formally delimited continuations) that allow defining new types of control flow operators. Here's a simple cooperative multitasking implementation and a contrived example program that uses it: ;; Core implemenation (define (call-with-coroutine thunk) "Apply THUNK with a coroutine prompt." (define (handler cont callback . args) (define (resume . args) ;; Call continuation that resumes the procedure. (call-with-prompt 'coroutine-prompt (lambda () (apply cont args)) handler)) (when (procedure? callback) (apply callback resume args))) ;; Call procedure. (call-with-prompt 'coroutine-prompt thunk handler)) (define (yield callback) "Yield continuation to a CALLBACK procedure." (abort-to-prompt 'coroutine-prompt callback)) ;; Simplistic example (define *cont* #f) (define (pause) (yield (lambda (cont) (set! *cont* cont)))) (define (resume) (*cont*)) ;; Prints "foo" (call-with-coroutine (lambda () (display "foo\n") (pause) (display "bar\n") (pause) (display "baz\n"))) (resume) ; prints "bar" (resume) ; prints "baz"
- nalaginrut 10y agoI've no any doubt people will understand how good it is for various kind of coroutines usage when they come to Guile. What we need is more libs and projects for reducing workload in practices.
- DigitalJack 10y agoI personally found clojure to be the most enticing lisp, and the only one I've gotten off the ground with. Enticing because it does web apps so well, which makes it practical (in my mind) and gives that sense of accomplishment. That said, there are some crazy advanced things you can do in lisps, and I'm sure I've only scratched the surface. But that scratch was deep enough to build things that are useful. Another interesting thing is that some people's clojure code is very readable and understandable to me, like James Reeves' (weavejester) code. Other people's code is very difficult for me, David Nolen's for example (swannodette). Not saying one is better than the others, more of having a familiar way tackling a problem in code I suspect. I can't say I ever had an A HA! moment with lisp like some famous people have described, but I can say that I am a better programmer for having gone down that road. I didn't realize it had had any positive impact on my understanding until recently when I decided to give Haskell another try. Lo and behold, I am actually understanding it now (via learn you a haskell), and I'm struggling to understand what was so hard about it before. I can't say exactly what changed, but something did. I can't say it was because I specifically learned a lisp, it might have been just as true if I had learned OCaml or some other language. But I am suspicious that it was because it was a lisp. I can say this, I have had an A HA! moment with Haskell. It was more of a Holy Sh*t moment for me actually. And that was when I got to the quicksort example in Learn You a Haskell. I was stunned.
- omni 10y agoI may be mischaracterizing here, but weavejester is known for ubiquitous developer-facing stuff such as compojure and hiccup while swannodette is by far the #1 contributor to the ClojureScript compiler. They're both great contributors to the community, but I wouldn't fault David Nolen for compiler code being less intuitive than framework code.
- DigitalJack 10y agoOh I didn't mean to imply fault, other than my own. David is awesome, and on a completely different plane than me, so I struggle with things that are obvious to him.
- jarcane 10y agoI really recommend anyone getting started with a Lisp to just start with Racket. It's easily the most complete out of the box as well as the most user-friendly to get started with. I've come to love Clojure as well, but it is ... idiosyncratic as a Lisp and not very user-friendly when it comes to mistakes, and I think it's good to get a grasp on the basics in a Scheme-based dialect. I can't honestly recommend Common Lisp at all. Where Clojure is idiosyncratic, at least there's a driving logic behind it. CL is a product of design by committee in the worst way, and even many of the basics are needlessly confusing to a beginner.