Everything is python is not an object. Python uses procedural control structures like if/else/while/for implemented as special keywords. Smalltalk implements those control structures with objects, the Boolean subclasses True and False which have methods ifTrue:ifFalse: and the class BlockContext which implements methods such as whileTrue: and whileFalse:.
Having objects is entirely different from using objects as the basic building block of every abstraction in the language. Objects in Smalltalk are what S-expressions are to Lisp. Python and Ruby just have objects, but those languages aren't built from objects.
If you want to display a string without the quotes, use "disp" instead of "write".
If you want to convert a string into an S-expr, use "read", and then if you want to evaluate that expression, use "eval".
(eval (read "(cons (cons 1 2) 3)"))
But I'm pretty sure you don't want to do either of those in this case. If what you want is nested lists, generate the nested lists - Lisp is good at that. Don't try to piece together your code out of parentheses. The following code will more-or-less generate the nested lists you asked about:
(def xw (n)
(let l '()
(for x 1 n
(= l (join 'w/link (list l))))
l))
However, the other problem with your approach is that even if you get xv working, it will pass a quoted expression to defop instead of an expression, and defop won't work right. To generate code, you need a macro, not a function. Here's a macro that will solve your original problem:
you'll have to wait for sacado to respond regarding this bit - I believe he's the one who added FFI to Anarki. It's highly possible that the FFI is just not compatible with Windows, and/or the FFI layer in mzscheme is subtly different between Linux and Windows.
arc-exe.scm is supposed to be compiled, not run directly. Are you sure you ran the Anarki version by double clicking as.scm, and as.scm, only?
Try doing this: Start Menu | Run Program
Then type "cmd" and press enter. This brings up a terminal.
Then find your path. First go to the drive you installed it. For example if it's in drive C, type "C:" and then enter. Then find your path. Go to your windows explorer and explore from there to where you kept Anarki (have to use Windows Explorer specifically, because it's just better than the default view), then select the address bar and press ctrl+c to copy it. Then go back to the terminal, type "cd " (include the space, but don't press enter yet), then rightclick the terminal's title bar and select Edit | Paste, which should paste the path to your terminal, and press enter.
(my knowledge of Windows is starting to embarass me)
Then try the following command:
mzscheme -m -f as.scm
If commandline doesn't work for you, I'll try to replicate the problem on my XP box, which I, like, don't use except for playing Starcraft and DotA, because I can't get Wine to run in fullscreen properly without scrolling into Gnome.
weirdest thing is it actually worked the first time i ran anarki.
i dont remember exactly what i did, is it possible that the first execution could have changed something?
or i happened to change some code?
what is the GIT really doing? is it just for downloading new versions? not something i actually will use when programming?
Good, we're getting somewhere. Try editing as.scm in notepad (open notepad and drag it into it). Then find the following line and add a ";" before it:
(load "ffi.scm")
Then try running it again.
Don't know why FFI isn't working on you, since the line being referenced doesn't actually get used in normal Anarki.
> what is the GIT really doing? is it just for downloading new versions?
Yes, although that's in your case currently.
> not something i actually will use when programming?
Depends. It's what's called a "revision control software". It's like CVS or Subversion (you might have used those). It lets you keep track of changes in your software, and lets you manage the development. For example, you can automatically create versions of software, which you can revert (for example, if a bug is reported by a user in the latest version, you can get a copies of succeedingly older versions until you see the bug disappear. Then you can get the difference between the version-without-bug and the first version-with-bug and see what exactly you changed that could be causing the problem). Up to you to use while programming. Any revision control software is good; git is considered one of the better ones.