Arc Forumnew | comments | leaders | submitlogin
4 points by akkartik 3071 days ago | link | parent

Looking forward to seeing you take the lead on this!


3 points by highCs 3071 days ago | link

Okay :)

Just made a quick test on my pet project using :clamp (not clamp experimental) and since most CL is exported, it's pretty compatible and works without much effort. So far so good. I'm gonna test the experimental part this week end.

-----

4 points by malisper 3071 days ago | link

I did find a better way to export everything. By using defpackage-plus, you can define a package definition clause that imports and exports every symbol that doesn't have a naming conflict with the current package. Exporting all of the symbols in :cl becomes just using this clause on :cl.

-----

3 points by highCs 3070 days ago | link

Nice. You made ('(1 2 3) 0) working? Or its only working when using ssyntax (ie array.0)?

-----

4 points by malisper 3070 days ago | link

That's only ssyntax. a.b is rewritten as (get a b) where get is a generic function. You may be able to use set-funcallable-instance-function to get something closer to what arc supplies. Also there are a lot of edge cases with the ssyntax since you have to be within a w/ssyntax block. There is one included in def, so you can use ssyntax in function definitions, but you can't use it at the toplevel.

-----

2 points by highCs 3069 days ago | link

An idea would be to have an arc macro that compile arc code.

  (arc :l "myprogram.arc")
  (arc :e (f:g 3.14))

-----

2 points by akkartik 3070 days ago | link

Interesting. I think Wart supported ssyntax at the toplevel.

-----

2 points by akkartik 3069 days ago | link

Yup:

  $ git clone https://github.com/akkartik/wart
  $ cd wart
  $ git checkout sbcl
  $ ./wart
  wart> car.nil
  nil

-----

1 point by highCs 3068 days ago | link

Gonna have to take a closer look at wart.

-----

2 points by akkartik 3068 days ago | link

I wouldn't spend too much time on it. malisper truly has the right idiomatic approach with packages. I was mostly just flailing around with the little bit of Common Lisp I understand.

-----