Arc Forumnew | comments | leaders | submit | sacado's commentslogin
6 points by sacado 6421 days ago | link | parent | on: edit install manpage

And on the install page : maybe http://ycombinator.com/arc/arc2.tar should be a link, not simply a text you have to copy/paste in your favorite URL bar... Come on, Paul... hyperlinks... Even in web 1.0, they already existed :)

-----

1 point by sacado 6422 days ago | link | parent | on: ffi sqlite3 - help

On the Arc level, it works perfectly well for me (no error, no segfault). But, when I try to (manually, with vi) open the db file (the "test" file), it's empty. Existing, but empty. I don't know why yet.

There's one thing that seems strange to me in the above declaration : char errmsg should not be declared as a cstring : it is a pointer to a string. I guess it should be declared as a cptr. I'll investigate more deeply later, when I'll find enough time...

-----

2 points by jmatt 6421 days ago | link

Yeah that is definitely a problem. I will work on this again tonight and see if I can get somewhere.

-----

1 point by sacado 6422 days ago | link | parent | on: Big bug in anarki

Yes, I didn't develop windows compatibility for the FFI. I don't have a windows machine to work with. Sorry if it breaks things under windows ... :(

I hope somebody will eventually come with a patch for this. Until then, almkglor's solution seems to work..;

-----

2 points by sacado 6424 days ago | link | parent | on: ffi sqlite3 - help

I'll try that & see if I can help you...

-----

1 point by jmatt 6424 days ago | link

Awesome, much appreciated.

-----

2 points by sacado 6424 days ago | link | parent | on: arc2c update

No hash table working yet but I've started to write a wiki documentation for arc2c on GitHub : http://github.com/sacado/arc2c/wikis/home. Feel free to add things or correct mistakes...

-----

2 points by sacado 6424 days ago | link | parent | on: Macro trouble

Everything returns a value in arc, at least nil, or any other value. When you evaluate something through the REPL, the result is displayed. When you call 'pr, all the args are displayed, then the first arg is returned (then, displayed by the REPL). If you type, say

  (for i 1 10 (pr 1 2 3 4 5))
You will not see the 1 repeated on each iteration. It will print nil, though : that's the value returned by 'for.

-----

1 point by sacado 6425 days ago | link | parent | on: git, anarki, windows and ark.help!

Download http://github.com/nex3/arc/tarball/20af2f3fe921faeca2048d1d9... and wou will have a tar archive containing anarki (the directory is called arc, but it is anarki).

"on the dollar prompt i wroote (help map and forgot the last parenthesis i now have > prompt insetad. but it cant interpret lisp. how do i get back to $?"

Just type

  )

-----

1 point by globalrev 6425 days ago | link

C:\Users\saftarn\Desktop\myanarki\nex3-arc-20af2f3fe921faeca2048d1d932abcdae2a916b4

so i have that untared there now.

trying to run as.arc i get: procedure application: expected procedure, given: #f; arguments were: #<struct:fun-syntax> #<syntax:C:\Users\saftarn\Desktop\myanarki\nex3-arc-20af2f3fe921faeca2048d1d932abcdae2a916b4\ffi.scm:18:14>

i ran arc-exe.scm and now i can run arc in drscheme.

so now im running anarki in dr scheme right?

what was this GIT stuff i downloaded?

i thought it was some sort of IDE?

what do you use to edit/compile? is there something better than DrSceheme?

-----

4 points by croach 6425 days ago | link

Not sure if you're still reading this thread or not, but I thought I would try to clear up some of the questions you have here for you.

> so now im running anarki in dr scheme right?

Well, not exactly. MzScheme is the name of the Scheme programming language implementation that you are running anarki in, DrScheme is basically a nice GUI front end to the MzScheme language.

> what was this GIT stuff i downloaded? i thought it was some sort of IDE?

No, Git is not an IDE. It is software that is used to manage source code. In other words, using Git, you get a history of changes made to your source code allowing you to rollback changes and create new branches where you can develop new features without fear of breaking the currently working build of your software. The reason you downloaded it is because it is the source control software that the Anarki developers are using to manage the Anarki source code, so you need it to get a copy (i.e., a clone) of the current working version of Anarki.

> what do you use to edit/compile? is there something better than DrSceheme?

Everyone uses MzScheme to compile and execute Arc code, because that is the language that Arc was written in. There are other implementations of Arc on the JVM (aka Java Virtual Machine) and another that compiles to C, and I believe one in Common Lisp, but none of these are official implementations of Arc (i.e., created by Paul Graham). As for editing Arc code, well you can use whatever you want to edit it. Personally I'm an Emacs fan, so I use it for all of my editing, but I'm sure Vim, TextMate, etc., etc. would do just as well. If you are looking for an editor in which you can also execute your code, then Emacs or DrScheme should work.

I hope that clears up a few of your questions for you, good luck in your studies.

-----

1 point by globalrev 6424 days ago | link

ty very much, very appreciated.

-----

1 point by globalrev 6425 days ago | link

thanks.

-----


  (= h (table))
  (= (h '(1 2 3)) 0)
  (= (h (list 1 2 3)) 1)
  h
  ==> #hash(((1 2 3) . 1) ((1 2 3 . nil) . 0))
These are 2 different keys. (h '(1 2 3)) returns 0 and (h (list 1 2 3)) returns 1. To me, it looks like a bug...

-----

4 points by stefano 6425 days ago | link

Const lists (created with quote) are improper scheme list, i.e. they end with nil instead of the emtpy list (in scheme nil != '()), whereas lists created with (list ...) are proper lists (ending with '()). This is certainly a bug.

-----

2 points by sacado 6425 days ago | link | parent | on: Suggestion for two core features

I don't like it. What does (tb x) mean ? Does it mean "look for the key 'x in table 'tb" (provided 'tb is a table) or "is variable 'x holding the same thing as variable 'tb" ?

However, I think this could be a good candidate for ssyntax :

  foo?x ==> (is foo x)

-----

2 points by cchooper 6425 days ago | link

Definitely like that idea. Using is is a real pain and I have to use it all the time.

-----

3 points by sacado 6425 days ago | link | parent | on: Suggestion for two core features

2) is an interesting idea, but would it really be useful ? The only real use I can think of is your example with multiple cdrs, but then wouldn't it be better to add the cdr functions up to 4 ds, then use the composition syntax in the rare cases you would need more ?

-----

More