Arc Forumnew | comments | leaders | submitlogin
[dead]


4 points by rcoder 5987 days ago | link

Having fun hacking with it so far, but I thought I'd bring up one compatibility glitch that hit me early on:

The definition of 'date' in arc.arc assumes a BSD-compatible 'date' binary on the host system. Unfortunately, the allowed arguments for GNU date are quite different. AFAICT, it is in fact impossible to convert the epoch-seconds timestamp format into a formatted date using the GNU version of the utility. Since the bundled web server uses the 'date' function to generate logfile names, any attempt to run a webapp on Linux immediately blows up.

I've hacked up a new implementation at the MzScheme layer using native date structs, but it would probably be worth porting a more complete date/time logic library to Arc, and relying on something like a native 'current-milliseconds' call only.

-----

1 point by jgrahamc 5988 days ago | link

Notes on the tutorial:

1. I have a hard time parsing the following:

"In Arc, data structures can be used wherever functions are, and they behave as functions from indices to whatever's stored there. So to get the first element of a string you say:"

I think there's something wrong with the word 'from'.

2. When you say:

"There's also a more general loop operator that's similar to the C for operator and tends to be rarely used in practice, and a simple repeat operator for doing something n times:"

I assume that the operator is actually called 'loop'. Since there's no example and no font distinction it's note clear.

3. I like this a lot:

"[... _ ...] is an abbreviation for (fn (_) (... _ ...))."

4. This feels backwards to me: "(foo:bar x y) is equivalent to (foo (bar x y))". I was expecting (bar (foo x y)), but perhaps that's just my brain. foo:bar reads to me like do foo then do bar.

5. Why have rem when you have keep and ~?

6. What's the rationalie for the name 'obj' when creating hashes?

-----

1 point by oditogre 5987 days ago | link

Other notes as I'm reading along:

1. It would be nice if you could change it to html instead of txt so footnotes (and possibly references to other sections, if you're really ambitious) can be links so it's easier to skip around (using 'open in new tab') without losing your place. It would also be useful for fixing jgrahamc's 2nd issue.

2. I'm having a bit of trouble getting the do / when section (my only prior experience with lisp is scanning some PCL way back when reddit was young - I use lisp-in-a-box as a calculator a lot when playing Eve Online, but that's not really useful experience here). If I'm understanding it correctly, it seems accurate to say that (if a b) is valid and will return b when a is true and do nothing otherwise. Is that right?

I think what I'm getting hung up on is that you talk about 'if' with 3 arguments, then with more than 3 arguments, then you explain 'do', and then when you combine them back together it looks like you're using 'if' with 2 arguments, with the 'do' part being, in it's entirety, the second argument...but otherwise you never address a plain old 'if' with 2 arguments.

-----

3 points by pg 5987 days ago | link

Yes, (if (is 1 2) 'a) returns nil.

-----

1 point by oditogre 5987 days ago | link

Thanks. Just finished reading the tutorial and everything else seemed to mostly make sense (for the things not covered by that 'mostly', I suspect it's to do with the lack of descriptive names / real-world-application examples, which is fine; I'm sure it'll fall into place once I install it and actually start playing around a bit. :)

-----

1 point by etal 5987 days ago | link

I know a couple: 4. That's the "compose" operator. In math notation, the symbol looks like a small mid-line circle. 6. From the intro: "it uses overlays on hash tables instead of conventional objects". Python kind of does the same, where you can get an object's attributes as obj.__dict__.

-----

1 point by __ 5987 days ago | link

Regarding 1, I think a function "from X to Y" is a function that takes X as an argument and returns Y.

-----

1 point by jgrahamc 5987 days ago | link

Ah Yes. Thank you for that explanation.

-----

1 point by jgrahamc 5989 days ago | link

Firstly, thanks for giving me the privilege of being amongst the first outsiders to see Arc. That was very kind of you.

MzScheme v372 does not work...

Mac OS X 10.5.1 MzScheme v372

bin/mzscheme -m -f as.scm compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (quote nil)

=== context === ac.scm:922:0: aload1

But as you say v352 does:

bin/mzscheme -m -f as.scm Use (quit) to quit, (tl) to return here after an interrupt. arc>

Now to play with it!

-----

1 point by byteCoder 5987 days ago | link

MzScheme v371 also does not work... same error as v372.

-----

8 points by jgrahamc 5988 days ago | link

Couple of questions:

1. Is anyone working on an Emacs major mode for Arc? (Using SLIME?)

2. How do I access environment variables?

-----

1 point by wfarr 5987 days ago | link

1 is the foremost question on my mind as well. ;)

-----

1 point by papersmith 5987 days ago | link

Works with Quack for me so far. Just load as.scm from the Quack REPL.

-----

1 point by tjr 5987 days ago | link

Outstanding. The tutorial is very well written. I look forward to many happy hours hacking in Arc.

Thank you.

-----

1 point by unknownmat 5987 days ago | link

Thanks for the release, this is very exciting. After a preliminary examination and a quick read through the tutorial, three of my personal CL annoyances are non-issues with Arc. 1.) I love the short function names. 2.) "let" appears to do destructuring automatically - thank you! 3.) It's a Lisp-1!

I look forward to exploring Arc further.

-----

1 point by treeform 5987 days ago | link

wow pg thanks for arc! i been waiting for it to come out for like year and a half!

( on a side note can you make the text in the box default by remove textarea { color:#000000; in news.css(line 10) or make the textarea have white background - its hard to read black text in default black textbox)

-----

1 point by tyler 5987 days ago | link

Like everyone else, I'm pretty psyched. I recently re-read ANSI Common Lisp and On Lisp... Looking at the differences between "normal" CL and Arc... I tend to think it really does match the "hacker" mindset quite a bit more.

Thanks.

-----

1 point by tlrobinson 5987 days ago | link

So, when are we going to see the book...

http://www.oreillymaker.com/link/7686/arc-for-dummies/

-----

1 point by mikelikespie 5987 days ago | link

Hi. One little thing. Could you add a link on the forums back to the main page?

Great work. Excited to try Arc out. :) Thanks.

-----

1 point by kobs 5987 days ago | link

Click the empty box next to the title.

-----

1 point by mikelikespie 5987 days ago | link

Ah I am dumb. Thanks.

-----

2 points by matthiasf 5989 days ago | link

do you mean v352 or v372 (the current release)?

(i can see why it wouldn't work with 3.99.)

-----

4 points by pg 5988 days ago | link

352. That's what we've been using.

-----

3 points by mk 5987 days ago | link

For what it's worth I'm trying it out on v360 because thats what I happened to have installed, and so far no problems. Although I haven't really done much. If I run into anything I will post.

-----

1 point by lojic 5987 days ago | link

I went through some of the examples in the tutorial with v360, but when I tried the hello web app, it failed. Not sure if it's due to v360, or not. I guess I can uninstall it and install v352 :(

-----

4 points by chaos 5987 days ago | link

blog.arc seems to work with v360. :)

-----

2 points by bootload 5987 days ago | link

"... blog.arc seems to work with v360. :) ..."

Same here on a ubuntu 7.10 gutsy 64amd. There's no (easy) way to do an install for v352 w/o doing a source compile (works) and manually installing the files (can't be stuffed).

-----

1 point by mrtron 5987 days ago | link

Firstly, thanks.

Opening question:

How well will Arc work with multiple cpus?

-----

1 point by icey 5987 days ago | link

I'm not pg, but I'd assume it will work the same as mzscheme works on multiple cpus, since it's just a bunch of declarations on top of mzscheme.

-----

4 points by soegaard 5987 days ago | link

An instance of MzScheme will only use one cpu even on multi-cpu machines. In order to use more than one cpu, start several instances and let them communicate either via tcp or via files.

-----

2 points by arcologist 5987 days ago | link

Thanks for finally releasing Arc!

Finally, I can stop programming in Blub.

-----

1 point by awm 5986 days ago | link

Amen.

-----

1 point by jkush 5987 days ago | link

Wow. I'm very inexperienced hacking in Lisp, but I'm very excited.

-----

1 point by petdog 5987 days ago | link

Awwrhhg, ubuntu mzscheme is too new a mzscheme for arc.

-----

4 points by PJCrosier 5987 days ago | link

http://download.plt-scheme.org/mzscheme/v352.html for different system versions of 352, the script for Ubuntu i386 is very friendly and works a charm.

-----

1 point by bootload 5987 days ago | link

"... for different system versions of 352, the script for Ubuntu i386 is very friendly and works a charm. ..."

for 32 bit systems :(

-----

2 points by bayareaguy 5987 days ago | link

ubuntu mzscheme is not an "acceptable" scheme.

-----

3 points by brent 5987 days ago | link

The main release with gutsy is 360 which seems to work fine for me. No problems yet, not that I've played with it too much.

-----

6 points by corentin 5987 days ago | link

This feels like Christmas :)

-----