GNU Guile beta 2.1.3 released
lists.gnu.org
lists.gnu.org
(The From to >From quoting design itself can be argued to be a poor decision, but that is orthogonal to the issue of why >From appears in random places. If the unquoting was done properly by all systems involved, there would be no >From in the wild).
There's quoting everywhere. EVERYWHERE. Doing it wrong is the source of some extremely damaging exploits (SQL injection, shell command injection, XSS, ...).
Fixing From and >From is but a drop in the bucket.
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
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.
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.
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!
> 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.
;; 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"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.
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.
Which situations would that be?
Lua "won" in games, Tcl won in electrical engineering software, Lisp won in various niche places, JavaScript won basically everywhere else.
Python does not seem a very popular glue language outside of Sublime Text.
Python is the clear winner in the scientific computing space.
Traditional "glue" has been called any language that connects between different programs and systems (e.g. take data out of system X as CSV, preprocess them, input them it program Y, do something with the results etc.
Which Python is used for a lot, in the scientific (physics and biology at least) communities. And yes, wrapping C, fortran etc libs too.
From Python.org itself, written by Guido Van Rossum:
Glue It All Together With Python - Python is an advanced scripting language that is being used successfully to glue together large software components. It spans multiple platforms, middleware products, and application domains.
And from Wikipedia, for the traditional definition as I've known for decades:
Glue languages: Scripting is often contrasted with system programming, as in Ousterhout's dichotomy or "programming in the large and programming in the small". In this view, scripting is particularly glue code, connecting software components, and a language specialized for this purpose is a glue language.
Pipelines and shell scripting are archetypal examples of glue languages, and Perl was initially developed to fill this same role. Web development can be considered a use of glue languages, interfacing between a database and web server. But if a substantial amount of logic is written in script, it is better characterized as simply another software component, not "glue".
Glue languages are especially useful for writing and maintaining:
- custom commands for a command shell;
- smaller programs than those that are better implemented in a compiled language;
- "wrapper" programs for executables, like a batch file that moves or manipulates files and does other things with the operating system before or after running an application like a word processor, spreadsheet, data base, assembler, compiler, etc.;
- scripts that may change;
- rapid prototypes of a solution eventually implemented in another, usually compiled, language.Most low end everyday stuff in scientific and numeric computing is written in Python (including in Python wrapping fortran libs, e.g. through NumPy).
nearly all the system config GUIs relased by Redhat
inkscape
quodlibet
csound
ntop
samba
ranger
libreoffice (but this supports a few other languages)
Try to run any modern Linux distro and tell me how far you get without installing Python.