Domain: schemers.org
Stories and comments across the archive that link to schemers.org.
Comments · 63
-
Parentheses
Most software developers will take one look at the excessive parentheses required for Kawa and Scheme and say "nuke it from orbit". Even Lisp advocates like Paul Graham admits that syntax like "(* (+ 1 2) (- 5 4))" is painful to deal with.
Thankfully, there *are* solutions for Scheme: SRFI-105 and SRFI-110 (which I co-authored). These are extensions to Scheme that let you keep meta programming (and syntax tree editing in an editor) with readable syntax. To my knowledge Kawa doesn't implement them, but they could be added.
-
Parentheses
Most software developers will take one look at the excessive parentheses required for Kawa and Scheme and say "nuke it from orbit". Even Lisp advocates like Paul Graham admits that syntax like "(* (+ 1 2) (- 5 4))" is painful to deal with.
Thankfully, there *are* solutions for Scheme: SRFI-105 and SRFI-110 (which I co-authored). These are extensions to Scheme that let you keep meta programming (and syntax tree editing in an editor) with readable syntax. To my knowledge Kawa doesn't implement them, but they could be added.
-
Guile supports curly-infix, too!
Another cool thing about GNU guile is that the most recent version supports SRFI-105, "curly-infix-expressions", as developed by the Readable Lisp S-expressions Project. Curly-infix expressions let you write stuff like {a + b} instead of (+ a b), which is a big improvement in readability.
-
D and Scheme
I'm a C/C++ developer (mainly C) and I enjoy it. I don't enjoy C++, but I'm paid to use it, so use it I do.
I've been dabbling with scheme for fun. It's very different to C, C++ or any of the other languages you mention, but a couple of hours reading about it and playing with it will really open your mind and be a bit of fun.
By ignoring the
.NET languages, you are obviously intelligent and discerning; you don't merely want to follow the heard into a boring, run-of-the-mill job. Good for you. 15 years ago I started to learn Linux when everyone was laughing at it (and me for using it) but I'm in a great position now.The other language I'm about to try is D which was deliberately designed to address many of the shortcomings of C++. It's a lot simpler and much more pragmatic that C++, by the looks of it. For a start, it doesn't pretend to be backwards-compatible with C, bit it is ABI-compatible. It has a clean syntax, fast compile times and some interesting concepts borrowed from ruby and python.
Ruby is the scripting language I'll be looking at next. I learned PERL a while back for work, and it is a nightmare, but a very useful one. Ruby is much less of a nightmare and much better than PERL at what PERL was intended (notice I didn't say designed) for.
Whatever language you choose next, pick an interesting one... How about creating your own for a challenge?
-
C for starters
It's been trendy in the last 20 years to do C++.
I don't want to get into a language flame war here, but I would like to make a few points.
C is still very important in OS kernels and embedded systems. It is the Lingua Franca of such things and will probably be so for another 30 years.
There are those who know C++ to an intermediate level who think that as a consequence they also know C. Nothing could be further from the truth. They are completely different languages, but they share a common heritage.
C++ is object orientation, applied to C, done wrong.
That's not to say that C++ isn't important. It is, because of its widespread adoption. It is baroque, however.
Java takes a lot from Objective-C, although it has more of a C++ style syntax.
Learn C well. It is a small language, portable, ubiquitous and in demand. If you know C well, it will be easier to learn C++, Objective-C and Java.
FORTRAN is a bit different. If you learned BASIC on an early 80's 8-bit micro, FORTRAN will make sense, otherwise be prepared for a nervous breakdown.
You really should look at some of the Pascal family of languages (MODULA-2 for instance) to see some good ideas from the past and then Scheme to program in colour.
While you are expanding your mind you might also like to listen to musing on the Bohlen-Pierce scale. See my sig for details.
-
All +5 moderated links
http://www.perlmonks.org/
http://en.wikipedia.org/wiki/Scheme_(programming_language)
http://www.schemers.org/Documents/Standards/R5RS/
http://srfi.schemers.org/
http://mitpress.mit.edu/sicp/full-text/book/book.html
http://www.quickref.org/
http://java.sun.com/javase/reference/api.jsp
http://www.rosettacode.org/wiki/Main_Page
http://cprogramming.com/
http://www.stackoverflow.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://yutaka.is-a-geek.net/
http://www.gotapi.com/
http://www.open-rsc.org/
http://www.users.bigpond.com/robin_v/resource.htm
http://www.geocities.com/orion_blastar/contact/
http://en.wikibooks.org/ -
All +5 moderated links
http://www.perlmonks.org/
http://en.wikipedia.org/wiki/Scheme_(programming_language)
http://www.schemers.org/Documents/Standards/R5RS/
http://srfi.schemers.org/
http://mitpress.mit.edu/sicp/full-text/book/book.html
http://www.quickref.org/
http://java.sun.com/javase/reference/api.jsp
http://www.rosettacode.org/wiki/Main_Page
http://cprogramming.com/
http://www.stackoverflow.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://yutaka.is-a-geek.net/
http://www.gotapi.com/
http://www.open-rsc.org/
http://www.users.bigpond.com/robin_v/resource.htm
http://www.geocities.com/orion_blastar/contact/
http://en.wikibooks.org/ -
Scheme
-
Scheme
-
Re:Specialization Versus BreadthCool languages I've read about, maybe used, but not played with nearly enough:
- Lambda calculus-ish
- Combinator/Forth-ish
- Joy
- Interesting but not practical: unlamdba iota and jot
- Logic
- Pi calculus-ish
I think I want to master logic programming next, though it may be better for me to do some haskell programming first so I have a better foundation. Monads/Arrows give me a headache, but with enough time, I'm sure I could get used to them. s-expressions a-la lisp/scheme are very similar to xml, except better, but logic programming seems more likely to make the hardest parts of internet programming easier.
Unfortuately, I have nowhere near enough time to get proficient in all these languages.
-
Re:Noob's question.
Dip into Ruby (it's not an extension to Java, but there is an implementation that runs on the JVM). The Ruby in Twenty Minutes guide is excellent. There is even a ruby interpreter that runs in your web browser.
Next, dip into scheme. It's a more practical kind of LISP than Common LISP. Get yourself a PLT Scheme with a friendly IDE and tutorials. Play for a while and then go and read about Lambda Calculus
:-) Then you can start on Haskell and Erlang etc.Postscript is a bit domain-specific. FORTH is its grandparent, and much simpler to learn. It's been about for years and there are hundreds of free FORTH systems about. I first learned it when I was 10 on my ZX81.
D looks interesting, but if you have already looked at C and C++, I would strongly recommend looking at Objective-C and contrast it with C++. It's smalltalk-inspired object orientation applied to C vs. Simlua-inspired C++. You will be astounded at the difference. You will also see some similarity with the design of Java...
Most of all, have fun and don't be afraid to start with a quick half hour looking at each one
:-) Don't try to become an expert over night. It's taken me 20+ years and I'm still learning, and having more and more fun :-) -
Eh?
[...] if you are stepping through a list and transforming each member in a common way, an iterative description seems more clear (particularly a for-each kind of approach.)
Ever heard of map?
-
Description of differences hereIf you RTFA and follow a few obvious links, you get to The R6RS Status Report which gives a relatively concise overview of the changes from R5 to R6.
Since Scheme wasn't the one of the versions of LISP that I learned back in the dark ages, I couldn't really follow the subtleties of which changes are really significant, but it looks like it would make sense if you were following Scheme. -
Re:decNumber libary from IBM
Scheme comes pretty close.
-
Re:SISC Scheme and Scala
-
Re:Some contributions of Algol60
Just a nit, but Prolog (in Abstract State Machines) and Scheme (in denotational semantics) also have formal specifications. However, I agree that it's disappointing that so few languages (3 is still a tiny number) use such an approach.
-
Hell no.Python is more like Scheme and its philosophy than Common Lisp.
Comparing Python to Scheme, no matter what Paul Graham may say, is a really bad comparison. Python supposedly aims to be a really clean imperative OOP language. Guido not only refuses to implement crucial features for functional programming like proper closures and anonymous functions; he's actually seeking to remove some such features, because he thinks they're "confusing." The general culture around Python strongly discourages use of techniques like higher-order functions; Python programmers write a loop in every other function. Python uses flexible arrays as its list datatype, and its list processing operations are built around that sort of datatype. It's never been intended to be self-hosting (i.e. Python has never been seriously implemented in Python, IIRC.)
Scheme, on the other hand, is an impure functional language that mandates anonymous lexical closures, tail call optimization, first-class continuations and a macro system. Its design is guided by absolute minimalism in terms of features, in favor of extremely general constructs. Most of the syntax called for in R5RS can actually be implemented in Scheme itself, using the macro system, as the language definition itself demonstrates. It uses singly linked lists as its list datatype (though it also provides fixed-size arrays). There is a heavy emphasis on higher-order functions of very general applicability; highly fluent Scheme programmers only need to write loops infrequently, because most of the time there's a higher-order function that does the job for you, like map, fold, or many others from the SRFI-1 list library.
The popular scripting language that's the most Lisp-like, really, is Ruby, whose pervasive use of code blocks echoes functional programming techniques.
-
Hell no.Python is more like Scheme and its philosophy than Common Lisp.
Comparing Python to Scheme, no matter what Paul Graham may say, is a really bad comparison. Python supposedly aims to be a really clean imperative OOP language. Guido not only refuses to implement crucial features for functional programming like proper closures and anonymous functions; he's actually seeking to remove some such features, because he thinks they're "confusing." The general culture around Python strongly discourages use of techniques like higher-order functions; Python programmers write a loop in every other function. Python uses flexible arrays as its list datatype, and its list processing operations are built around that sort of datatype. It's never been intended to be self-hosting (i.e. Python has never been seriously implemented in Python, IIRC.)
Scheme, on the other hand, is an impure functional language that mandates anonymous lexical closures, tail call optimization, first-class continuations and a macro system. Its design is guided by absolute minimalism in terms of features, in favor of extremely general constructs. Most of the syntax called for in R5RS can actually be implemented in Scheme itself, using the macro system, as the language definition itself demonstrates. It uses singly linked lists as its list datatype (though it also provides fixed-size arrays). There is a heavy emphasis on higher-order functions of very general applicability; highly fluent Scheme programmers only need to write loops infrequently, because most of the time there's a higher-order function that does the job for you, like map, fold, or many others from the SRFI-1 list library.
The popular scripting language that's the most Lisp-like, really, is Ruby, whose pervasive use of code blocks echoes functional programming techniques.
-
Hell no.Python is more like Scheme and its philosophy than Common Lisp.
Comparing Python to Scheme, no matter what Paul Graham may say, is a really bad comparison. Python supposedly aims to be a really clean imperative OOP language. Guido not only refuses to implement crucial features for functional programming like proper closures and anonymous functions; he's actually seeking to remove some such features, because he thinks they're "confusing." The general culture around Python strongly discourages use of techniques like higher-order functions; Python programmers write a loop in every other function. Python uses flexible arrays as its list datatype, and its list processing operations are built around that sort of datatype. It's never been intended to be self-hosting (i.e. Python has never been seriously implemented in Python, IIRC.)
Scheme, on the other hand, is an impure functional language that mandates anonymous lexical closures, tail call optimization, first-class continuations and a macro system. Its design is guided by absolute minimalism in terms of features, in favor of extremely general constructs. Most of the syntax called for in R5RS can actually be implemented in Scheme itself, using the macro system, as the language definition itself demonstrates. It uses singly linked lists as its list datatype (though it also provides fixed-size arrays). There is a heavy emphasis on higher-order functions of very general applicability; highly fluent Scheme programmers only need to write loops infrequently, because most of the time there's a higher-order function that does the job for you, like map, fold, or many others from the SRFI-1 list library.
The popular scripting language that's the most Lisp-like, really, is Ruby, whose pervasive use of code blocks echoes functional programming techniques.
-
Hell no.Python is more like Scheme and its philosophy than Common Lisp.
Comparing Python to Scheme, no matter what Paul Graham may say, is a really bad comparison. Python supposedly aims to be a really clean imperative OOP language. Guido not only refuses to implement crucial features for functional programming like proper closures and anonymous functions; he's actually seeking to remove some such features, because he thinks they're "confusing." The general culture around Python strongly discourages use of techniques like higher-order functions; Python programmers write a loop in every other function. Python uses flexible arrays as its list datatype, and its list processing operations are built around that sort of datatype. It's never been intended to be self-hosting (i.e. Python has never been seriously implemented in Python, IIRC.)
Scheme, on the other hand, is an impure functional language that mandates anonymous lexical closures, tail call optimization, first-class continuations and a macro system. Its design is guided by absolute minimalism in terms of features, in favor of extremely general constructs. Most of the syntax called for in R5RS can actually be implemented in Scheme itself, using the macro system, as the language definition itself demonstrates. It uses singly linked lists as its list datatype (though it also provides fixed-size arrays). There is a heavy emphasis on higher-order functions of very general applicability; highly fluent Scheme programmers only need to write loops infrequently, because most of the time there's a higher-order function that does the job for you, like map, fold, or many others from the SRFI-1 list library.
The popular scripting language that's the most Lisp-like, really, is Ruby, whose pervasive use of code blocks echoes functional programming techniques.
-
Hell no.Python is more like Scheme and its philosophy than Common Lisp.
Comparing Python to Scheme, no matter what Paul Graham may say, is a really bad comparison. Python supposedly aims to be a really clean imperative OOP language. Guido not only refuses to implement crucial features for functional programming like proper closures and anonymous functions; he's actually seeking to remove some such features, because he thinks they're "confusing." The general culture around Python strongly discourages use of techniques like higher-order functions; Python programmers write a loop in every other function. Python uses flexible arrays as its list datatype, and its list processing operations are built around that sort of datatype. It's never been intended to be self-hosting (i.e. Python has never been seriously implemented in Python, IIRC.)
Scheme, on the other hand, is an impure functional language that mandates anonymous lexical closures, tail call optimization, first-class continuations and a macro system. Its design is guided by absolute minimalism in terms of features, in favor of extremely general constructs. Most of the syntax called for in R5RS can actually be implemented in Scheme itself, using the macro system, as the language definition itself demonstrates. It uses singly linked lists as its list datatype (though it also provides fixed-size arrays). There is a heavy emphasis on higher-order functions of very general applicability; highly fluent Scheme programmers only need to write loops infrequently, because most of the time there's a higher-order function that does the job for you, like map, fold, or many others from the SRFI-1 list library.
The popular scripting language that's the most Lisp-like, really, is Ruby, whose pervasive use of code blocks echoes functional programming techniques.
-
Re:Argh!
Schemers don't like macros because it is possible to write buggy macros, and want their own elegant, bulletproof mechanisms to define language extensions. T
And it looks like they can get that now with SRFI-72, "Simple hygienic macros". I haven't dug into all the details and compared it to all the other macro systems for Scheme, but it looks pretty good on the surface.
-
How About Scheme?
While I completely agree with your post, the last sentence bites me:
``I wouldn't think of using anything else to extend a program.''
I'd just like to propose Scheme as an alternative to consider. Scheme has all the characteristics you applaud: great design, immense flexibility, and low footprint. Comparing Scheme to Lua:
- Scheme is a Lisp dialect, and, as such, uses s-expressions (basically lists, think lots of parentheses). Some people find this annoying, but it makes the syntax very regular and easy to parse.
- Scheme has a reader that reads s-expressions and a writer that writes them. This is convenient for reading and writing data, but (since Scheme programs are built of s-expressions) also allows easy processing of program code.
- Scheme offers macros which can be used to extend the syntax of the language. Few other languages offer these; it seems to go together with the parentheses (things like C macros are nowhere near as great)
- Scheme is standardized, and there are many implementations; anything from simple interpreters to complete IDEs and high-performance compilers
- Scheme is old, and therefore less prone to the incompatible changes that seem to plague more modern languages
- Scheme has first-class continuations, which I believe Lua doesn't have. In a nutshell, first-class continuations allow you to break the call-return control flow; you can return as many times as you like, or not at all. This is a very flexible feature, which can be used to implement certain things very concisely and elegantly.
- Standard Scheme does not contain structures or objects as found in other languages. Many Scheme implementations support these, or allow one to implement support using macros, but programs that use these features won't be completely compatible with all Scheme implementations.
- Scheme is used extensively in programming language and compiler research. It's also used to teach programming in a number of universities. Scheme is covered in various books, many of which can be read online.
I think that about sums it up. Note that I'm not saying anything is wrong with Lua, I'm just pointing out that Scheme is worth looking into, as well.
For more information, schemers.org is a good place to start. -
DrScheme
Give DrScheme a look. Nice graphical IDE, libraries, dead simple syntax. Free. Different language levels to cater to the learning process. And pleanty of introductory texts.
-
Re:The Little LISPer teaches LISP this way
Huh?
Last time I checked, LISP ran on lots of machines, not just Suns; even more for Scheme. -
Re:Functional Compilers, anyone?
I think you forgot Scheme or scheme-wiki . After all you could implement all of those languages on a decent scheme interpreter or compiler.
-
C is NOT functional
Admittedly, I'm an EE and not a Software person, but I've been working a lot with FPGA design and this involves the use of a few "functional" programming languages such as the Scheme-like confluence Hardware Description Language (HDL).
ANSI and ISO C are imperative, sequential, PROCEDURAL languages.
From my (possibly wrong) understanding, languages such as Haskell (Wikipedia) and Scheme (Wikipedia) are "functional".
These are so far from anything at all like C programming, Haskell in particular for some reason reminds me of that movie Event Horizon, but that's probably just my warped mind thinking irrelevant thoughts again...
I'm told that the Haskell course taught at my University is a source of great frustration to many programmer wannabes who can never get their head around the "functional" programming paradigm and are forever stuck in their Java ways.
So, if C is classed as "functional" in your books, what would Haskell be? -
Re:Lisp SchemeScheme is a block-structured language modeled on Algol. Common Lisp is a natural evolution of LISP 1.5. As part of the evolution, sure, some features from Scheme have been sneaked back into Common Lisp, but they are really very different languages.
You better tell that to the guys who wrote the scheme spec (R5RS). They certainly seem to think that Scheme is a dialect of Lisp. To quote from R5RS:
Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman.
Scheme and Common Lisp are both dialects of Lisp. They're not the same language, but if you grok one, you can pretty easily figure out the other.
noah
-
Re:Lisp, Smalltalk overrated?What is it with all these "out of ignorance" arguments and Slashdot? Does this site purposefully attract people that don't know something and then make them express that fact? Just because you don't know any free Lisp code (obviously you haven't bothered looking, because you're convinced that Lisp sucks because it doesn't have any free code) doesn't actually mean there's no free code. Pull your head out of the sand and have a look at these collections:
Cliki, a wiki directory of "Links to and resources for free software implemented in Common Lisp and available on Unix-like systems."
CLOCC - the Common Lisp Open Code Collection"
common-lisp.net, providing hosting and remote repositories to dozens of Free Software Common Lisp applications.This doesn't even touch SourceForge (which hosts another two dozen or so Lisp projects I'm aware of). When you consider how small the Lisp community is compared to the number of Perl hackers (easily in the range of 1000:1), and the number and quality of the code on just those repositories to CPAN, the productivity advantage of Lisp really does seem closer to 50x. According to your argument, all those Perl hackers should not have had any trouble in coming up with an efficient implementation by now. Yet, with less that a dozen regular hackers between them, the CMUCL and SBCL projects have produced compilers that outperform g++. At the very least, the Perl folks should not have had any trouble producing an efficient regular expression library, but here again, Lisp has them beat.
Of course, the above links point to software written in only one dialect of Lisp, Common Lisp. When you consider the software produced in other dialects, like Scheme, NewLisp, LUSH, XLISP, and Isis, the difference becomes even more apparent. To say nothing of commercial software, where none of the languages you mention can even boast a fraction of the number of large, successful systems delivered in Lisp.
-
Re:Lisp
``Where is a language with the power of Lisp and the ease of Python?''
You mean LISP without the parentheses? See SRFI 49. This is for Scheme, but it could be done in the same way for other LISP dialects.
Also check out the ML family of languages. -
Re:been done
That's exactly my point: it is standardized, but not to a sufficient extend to be able to write a spectrum of useful applications that are portable.
What good in 2004 is a programming language that can't work with sockets? Sure, sometimes I write purely algorithmic, simple file IO programs, but I don't think many programmers *never* write GUIs or need to call OS functions or do networking.
I might be wrong here, but last time I looked at the state of Scheme on Unix, there were common specifications (SRFIs) for some useful libraries. But the syntax to load them differs between implementations! So again, you cannot write a program portable across different implementations can call useful libraries.
If there were a single strong free implementation of either CL or Scheme then it might be OK; the standard would be defined by the implementation, as it is with Perl. But that doesn't seem to be the case at the moment. Ask N lisp programmers and you will hear about >=N implementations.
I count 4 freeish CLs in Debian, and a larger number of Schemes. How am I to know which one supports the libraries I want and will be well supported in the future? If there were 4 C compilers then I would still have a choice, but at least I ought to be able to call the same libraries from intel cc as from gcc.
Therefore, I repeat my point: the reason why even programmers who like Scheme often end up using Python (or whatever) has nothing to do with syntax or any aspect of the language itself. It's the libraries, stupid. Doing useful work in a high-level language is, for many applications, mostly about having useful libraries. Perhaps for big applications the relative importance of the library decreases. But if people can't easily write small programs, they are less likely to get around to writing big ones. -
Re:PS
Actually, SRFI-49 aims to add indentation-sensitive (i.e. no parentheses) syntax to Scheme.
As for recursion, both Scheme and Common LISP have iterative constructs. However, many people find recursion easier to use (i.e. read and program), and with proper tail calls, it's as efficient as iteration. -
Re:Winux isnt the future
-
business computing with Lisp
Who do you think keeps Franz and Digitool in business? Hobbyists? I don't think so; they'd be using one of the free implementations. Your "no one in business computing considers using Lisp" comment shows you don't know what you're talking about.
I myself use Scheme in my employment, and it's helped a lot.
-
Re:Can anyone
-
Re:Simplicity lost
Well, I believe it was designed for embedded consumer multimedia electronics devices. You're right, though: it was not designed for teaching. The main thing has disappointed me about Java is its lack of expressive power and flexibility, so if language extensions improve that, they can't be all bad.
And, as people have been mentioning, Scheme is a far better example of simplicity and power in a small package. It has far simpler syntax than any other language I know, but is more extensible than all of them. One would be hard pressed to find a language feature or programming style that can't be well expressed in this 28 year old language.
It seems there isn't a whole lot of interesting stuff happening with language design, at least that's very visible. Others have mentioned (I haven't learned it yet) the simplicity and power of Smalltalk, a language of similar vintage to Scheme. Is there anything new under the sun (no pun intended) in language design? If there is, it's probably in something like Eiffel (another one I should learn sometime) or one of the pure functional languages like OCaml (there's another one for the list). Meanwhile, most of the world continues to use languages descended from a portable assembler. -
computer club == playing gameswhich is fine and good. just make sure one of the games you play is "scheming to improve the world", possibly by hacking on free software. good luck!
p.s., take all the advice about keeping away from the authorities to heart; you really don't want to be cultivating stupid conformity any more than you already must do for class, do you?
-
Re:XML stone soup
Yeah, that doesn't surprise me at all, I'm sure you're right in your diagnosis that a somewhat higher-level language - Perl - can be more productive, and occasionally more efficient, than Java+XML.
I don't think there is a mainstream attempt to unify languages like Java, XML, XSLT etc. However, there is probably a consensus that the best starting point is Scheme, the LISP-like teaching language. This starts from the basic principle that programs-are-data, meaning that Scheme can happily substitute for both Java and XML. This has led people to provide mappings between XML, XSLT etc. and Scheme.
More interestingly, there are some usable Scheme implementations around now, so it's a good time to play with it if you have some time. Grab, say, DrScheme and/or SISC (Scheme on top of Java) and go through the famous Structure and Interpretation of Computer Programs book - I found it very enlightening and not too dry, despite some reviews to the contrary.
Pointers are on the Schemers site. -
Obvious answer?Ruby is a programming language that was born and raised in its native Japan, which means it may very well be, by definition, what you say you're looking for.
Incidentally, Ruby, though purely-OO, supports nifty things like true closures, and you can end up doing functional programming without realizing it at first [Ruby, of course, is designed with this sort of thing in mind]. It was the realization that I was doing this (or something very close to it), in conjunction with Paul Graham's essays that got me interested in Scheme (a sleek, lightweight dialect of Lisp).
So, perhaps the only real answer is to learn as many interesting programming languages as you can, and use the broadened perspective you gain to make an informed decision for yourself.
-
Re:Cripes, it's time to ban CIf you don't like software written on C then use CryptoGnome - a better version control system written in Scheme.
Another alternative is RCS written on shell: Arch.
Wait, both Scheme and Shell are written on C, so you can't use them either. You may try to find someting written directly on Asm.
-
suggestions
- use knoppix
- start with fvwm w/ 3x3 virtual desktops
- avoid using the words: work, desktop, [other drone-speak]
- ask them how they would describe the "spaces"
- put an activity in each space
- choose a wide range of activities
- surfing (if no net.cnxn use a local web page)
- web publishing (see above)
- a geometry tutorial (grep for "Dr. Genius") w/ lots of interactivity
- some kind of programming such as haiku generation (text), turtle graphics (graphics), lincity (simulation)
- write simple cron jobs
- random violent game
- openoffice (throw this in at the end)
- include elements of community building
- xmessage, athena, or other instant messaging
- mini-distributed.net
- cron jobs (above) conversing
- "suggestion box" design
- do show-and-tell: each student explores something then briefly describes their findings to the others
-
sure: plenty
For interactive symbolic manipulation, Maxima is an excellent open-source alternative. For numerical applications, Numerical Python and its associated packages beat both Matlab and Mathematica in my opinion. For 3D visualization, you can get VTK, which also has Python bindings.
Maxima is also used occasionally as a rapid prototyping language, but it's proprietary and it has a lot of rough edges. You are probably better off using one of a number of open languages with similar features, like Scheme, OCAML, SML, Prolog, or Haskell.
Don't forget about C++, however. In many ways, C++ nowadays allows you to write numerical code more naturally than any of these other languages (yes, better than Matlab and Mathematica), it has by far the best libraries available for it, and it gives you excellent performance. And you can even do symbolic mathematics in C++, with the right libraries (though it's not interactive, of course). -
XML is an uglier version of s-expressions!
I point out that XML is basically an uglier re-invention of Scheme/Lisp S-expressions. (see this link) XML isn't the cure-all end-all either as some might think.
-
Re:Decimal arithmetic
Java does not have a built-in arbitrary precision rational type
Nor does COBOL. Perhaps you're thinking of Scheme?
Anyway, COBOL users that have a clue (e.g. the UK Revenue Service) use 128 bit integers for monetary amounts - decimals are, er, pointless. -
Re:that's what I said ..
Scheme does not have any construct called "loop" defined in the standard, nor do any implementations I know of define one. R5RS (the scheme standard) does specify that scheme implementations should define in their standard libraries (!) two iteration constructs, one called "do" and the other a variant of "let" (in practice often called "let loop," which might be what you're thinking of). The standard explicitly says that these should be in the library, not primitive Scheme syntax. In practice, neither iteration construct is used all that often by experienced Schemers (I've been programming in Scheme for 5 years and I actually didn't know about the "do" macro until I looked it up just now).
So you might be wondering: How the heck do experienced Schemers loop over things if they don't use those loop constructs? And anyway, how are they implemented in the library if there are no more primitive loop constructs around?
The answer is recursion -- functions that call themselves. Scheme is all about recursion; the specification even forces implementations to make certain efficiency guarantees about it so that Schemers can recur to their hearts' content without incurring runtime penalties over looping. For instance, in C, you'd probably count the size of a list like so:
int list_size(List* l) {
int count = 0;
while (l != NULL) {
count++;
l = l->next;
}
return count;
}
In scheme, you could define it the same way:
(define (list-count lst)
(let ((count 0))
(let loop ((r lst))
(if (null? lst)
count
(begin
(set! count (add1 count))
(loop (cdr r)))))))
... but that would be awful scheme. More advanced schemers would write
(define (list-count lst)
(cond
((null? lst) 0)
(else (add1 (list-count (cdr lst))))))
or even:
(define (list-count lst) (foldr add1 0 lst))
So, you might be thinking: 'That's nice. So it's just a funny way of saying "for" that I don't understand very well and doesn't seem to have any advantages.' A lot of people have that impression and get turned off to Scheme because of it. But it's not true: for one thing, see how much prettier my second Scheme definition is than my first? It's more compact, and once you get used to it, easier to write, read, and debug. Furthermore, it's more directly applicable to many programming situations, particularly when they involve complex data. Read all about it in How to Design Programs , an excellent introductory textbook on Scheme and programming.
And nope, the Scheme standard defines no record or structure type. Look through the standard yourself, you won't find it there. This is in fact pretty frustrating to the Scheme community.
As for assembly, first of all, remember that every processor has its own assembly language and they're not all the same. That said, jump is not the same as a loop. Jump means "go straight to some other point in my program and keep going," which is more general than loop (but can be used to implement loop). -
Re:that's what I said ..
Scheme does not have any construct called "loop" defined in the standard, nor do any implementations I know of define one. R5RS (the scheme standard) does specify that scheme implementations should define in their standard libraries (!) two iteration constructs, one called "do" and the other a variant of "let" (in practice often called "let loop," which might be what you're thinking of). The standard explicitly says that these should be in the library, not primitive Scheme syntax. In practice, neither iteration construct is used all that often by experienced Schemers (I've been programming in Scheme for 5 years and I actually didn't know about the "do" macro until I looked it up just now).
So you might be wondering: How the heck do experienced Schemers loop over things if they don't use those loop constructs? And anyway, how are they implemented in the library if there are no more primitive loop constructs around?
The answer is recursion -- functions that call themselves. Scheme is all about recursion; the specification even forces implementations to make certain efficiency guarantees about it so that Schemers can recur to their hearts' content without incurring runtime penalties over looping. For instance, in C, you'd probably count the size of a list like so:
int list_size(List* l) {
int count = 0;
while (l != NULL) {
count++;
l = l->next;
}
return count;
}
In scheme, you could define it the same way:
(define (list-count lst)
(let ((count 0))
(let loop ((r lst))
(if (null? lst)
count
(begin
(set! count (add1 count))
(loop (cdr r)))))))
... but that would be awful scheme. More advanced schemers would write
(define (list-count lst)
(cond
((null? lst) 0)
(else (add1 (list-count (cdr lst))))))
or even:
(define (list-count lst) (foldr add1 0 lst))
So, you might be thinking: 'That's nice. So it's just a funny way of saying "for" that I don't understand very well and doesn't seem to have any advantages.' A lot of people have that impression and get turned off to Scheme because of it. But it's not true: for one thing, see how much prettier my second Scheme definition is than my first? It's more compact, and once you get used to it, easier to write, read, and debug. Furthermore, it's more directly applicable to many programming situations, particularly when they involve complex data. Read all about it in How to Design Programs , an excellent introductory textbook on Scheme and programming.
And nope, the Scheme standard defines no record or structure type. Look through the standard yourself, you won't find it there. This is in fact pretty frustrating to the Scheme community.
As for assembly, first of all, remember that every processor has its own assembly language and they're not all the same. That said, jump is not the same as a loop. Jump means "go straight to some other point in my program and keep going," which is more general than loop (but can be used to implement loop). -
Re:Classes and APIs more important than language
Scheme, being self-extensible, would make for a much more robust base upon which to construct a language-neutral runtime than the C# and VB-oriented CLR.
actually, some of the features of CLR are there specifically to make the implementation of scheme, lisp, and other functional languages much easier. the main example is tail recursion. (ie. the idea that you can speed things up immensely if you don't need to allocate new stack frames for function calls, just reuse the one already on top). scheme, which requires tail recursion support by R5RS, was a complete hog when compiled down to java, because the java VM would insist on doing tail-recursive functions the naive way. but the CLR has tail-call function support built in - so you can write your recursive loops and other such, and they'll run as fast as regular iteration (not to mention they'll be much cleaner). this makes writing a scheme-to-CLR compiler downright pleasant in comparison to scheme-to-Java compilation. :)
CLI actually goes to great lengths to remain language-agnostic, while providing lots of useful features, like GC, code security, or strong typing across languages. it seriously looks like it could be the One Runtime to bind all languages. which would be perfect, actually - we could write all of our code quickly and cleanly in our superior language, and only use other peoples' libraries for the boring parts such as sockets or XML parsing. :) -
Re:what should i use?
Why not learn Scheme? It is weel suited for implementing recursive algorithms in a straight-forward way. Also, may I suggest learning some logic-based language, like prolog, with a finite domain solver included (as the one in gprolog)? I don't know, since I'm no engineer, but I can imagine a finite domain solver being usefull for engineering tasks (it can be used for e.g. scheduling several tasks to reduce resource usage and the like).
-
Re:Learning Lisp/Scheme?
Scheme is more beautiful, but Lisp is probably more useful in the real world. Poke around at schemers.org for a tutorial or something. If you find that you like Scheme, you'll be able to transfer a lot of your understanding to Lisp.
-
Re:Learning Lisp/Scheme?Well I don't know about "quickly and easily", but the book for Scheme (or rather for programming, but based on Scheme) is: The Structure and interpretation of computer languages", by Abelson and Sussman, MIT Press. It's even online.
While I would certainly recommend some programming background, and perhaps The little Schemer. (Many more tips on www.schemers.org even a few worthwhile tutorials online such as "Teach yourself Scheme in fixnum days"). SICP as it's affectionately known is one of the best books on programming, period. It may not be in the "teach yourself xx in n days" category, and rather heavy going at times, but the rewards are worth it.
This is IMHO the book that makes Scheme worthwhile.