2010 developer’s problem solving sequence:
It's funny because it's true.
Via HN -> JCook -> Philippe Leybaert
(defun run-has ()
(make-comint "has" "/path/to/hascheme/script/lis.pl" nil "/path/to/hascheme/script/builtins.scm"))
I keep having lots of fun with hascheme. In the last couple of
days, I implemented quite a few things. Mostly they are syntax
sugar for things you could already do in HAS, or useful procedures
needed for my basic interpreter testing.
Reading chapter 4 of our MIT beloved book, I saw the next step, making a lazy
interpreter from this Half Assed one.
Ah, the repo
I'm a vim editing model fan, but emacs is slowly crawling into my
life. emacs had viper (vi emulator) for ages, but it falls short if
you're a vim power user. Vi is not Vim.
For some time there's been vimpulse package that tried to narrow the
difference, adding Visual mode, and some other goodies. Recently,
vimpulse got reactivated, and now, we get text objects, and many
other features from our beloved text editor.
You can even use map, imap, vmap and the like;
the first thing I tried was mapping jk to esc, but the tip in the
vimpulse wiki didn't work. I managed to make it work with this line
in my .emacs file.
(vimpulse-imap "jk" 'viper-exit-insert-state)
Now, there's no need to reach the far escape key.
Little updates to Hascheme, I finally implemented cons, car, cdr,
and list as primitives, After implementing the prove that you can
have datastructures in a language without no more ground than
lambdas, I went for a bit more of efficiency (not that hascheme is
going to be in production ever, but you know…)
Another motivation to implement lists as primitives is that this
way, I can get a kind of homoiconicity. If conses are implemented
in the implemented language (scheme), a list will never be similar
to code, because Perl never sees the datastructure as something it
can deal with.
And what's the ultimate motivation for having all this stuff
I used a very common lisp quine to test that code and data are
implemented internally the same way. That gave a good testbed for
quote too. Unfortunately, using Perl Data::Dump* modules, I can't
tune how lists are printed, and the final nil gets printed too.
Well, here's the proof that Half Assed Scheme can do Half Assed