256 karma · joined June 28, 2010
Lojban, Swedish, and Japanese.
(define (error . args) #f)
(define (class x y z)
(lambda (d)
(case d ('x x) ('y y) ('z z) (else (error "Invalid slot ~a" d)))))
(define obj (class 'this 'is-a 'test))
(display (obj (read)))
(newline)
The Stalin scheme compiler, if I read the output correctly, makes a
separate type for 'x, 'y, and 'z. Then it does the dispatch using a
switch statement (in the c code) over the three symbol types. This seems
quite resonable to me; The C compiler will probably produce a jump table.Note that I was unable to get the compiler to produce dispatch code at all without dispatching on the result of READ.
What? The graphics system is quite nice, there's no reason to replace that. I'm pretty sure there is nothing tying the graphics protocol to their GUI paradigm. I think it would be entirely possible to implement, say, GTK over it.
Vim
There's no reason it couldn't be ported. I would use it if you made it. It would be nice to have a libdraw based vi, even just in plan9port.
I think it's a terrible idea, but there you go.
I don't see how this article is helping your point; that's a pretty massive hit. Even worse, this is a GC-style program modified to use explicit malloc/free. Programming with manual memory management encourages a very different style of programming where you try to use malloc/free as little as possible, and you try keep memory for various things in contiguous chunks of memory.
EDIT:
This comment is interesting: http://lambda-the-ultimate.org/node/2552#comment-38915
From your post, I'm going to assume that you haven't used the languages I'm talking about; sorry if I misread that. SML/Ocaml/F# are not purely functional languages, so side effects work just like you'd expect coming from C/Python/etc. The language encourages functional programming (for example, variables are immutable by default), but imperative code is far from difficult to write. I highly recommend you try one of these languages. They may just be what your looking for.
- Rapid development
- Clean syntax
- Static type system
- Good performance
- Practical, not about pushing boundaries
SML especially, is a very stable, simple, and well thought out language.
Unfortunately, I've already done my senior project. Though, I'd be happy to hack on Glendix stuff in my free time.
/net
I've not done any network or kernel programming, and I'm only slightly familiar with /net. If I wanted to hack on this, where would you recommend I start?
It seems like a Glendix /net could be implemented in user space. Yes?
Perhaps unwittingly, this statement fits C++ perfectly. It's popular to criticize C++'s design, and this is why. It's the best solution to the wrong problem.
Yes it does? Just encrypt/compress all the files before tarring.
> Not indexed
The reason tar doesn't have an index is so that tarballs can be concatenated. Also IIRC, you only have to jump through the headers for all files. Still O(n) where n is the number of files, but you don't have to scan through all of the data.
This is from Paul Graham's book, On Lisp.
Introduction
zsh is UNIX shell.
So what’s zsh and why would I want it over my current shell? It's more bloated than just about every other shell! Bash isn't nearly
bloated enough! Feature, features, features!
Ok, You Convinced Me. How Do I Start Using zsh? Of course I did! One catch though: You need a big config file to get
access to all that bloat. ; tar c *.cpp *.h >something.tar
; tar c dir | gzip >something-else.tgz
Problem solved! Also: ; tar c dir | gzip | nc -q0 -lp 4000 &
; [another computer]
; nc $otherhost 4000 | gnuzip | tar xMy language-choice algorithm is:
sh + unix DSLs -> Tcl/Tcl+C -> SML/Haskell/Scheme -> C -> *
Where '*' is whatever language has a library I need, or a language that I'm required to use.
[read stdin] returns a string (not a list of strings), which is parsed as a list when you try to loop over it. The parsing breaks the string into a list of words, so the second loop is redundant. The parsing could fail if the input file isn't valid list syntax (unmatching {}'s). [split _] makes it safe.
foreach word [split [read stdin]] {
if [string match *ing $word] { puts $word }}
I love Tcl too! Tcl is a scripting language for C, Python is less-powerful version of Lisp.