Arc Forumnew | comments | leaders | submit | projectileboy's commentslogin

Don't be disheartened, brother. It seems to me Mr. Graham gave us all a first cut to get exactly this kind of feedback, but the core language isn't yet fully baked, and so we should acknowledge that we're at the very beginning of a long journey. I'd be surprised if Linus Torvalds was merging in kernel patches from anyone besides himself in 1992.

-----


If we're throwing out random nitpicks, then I would vote for "number?" as the test function name, with "number" or "num" being the coercing function. I think the SICP style of appending a question mark at the end of boolean functions makes for very readable code, and keeps with the Arc design goal of brevity. I do not like "anum" or "anumber", because I think "a____" should in general be reserved for anaphoric macros, for consistency's sake.

-----

2 points by map 6426 days ago | link

"number?" looks good to me. It's easier to guess what it does than to guess what anumber does. (And that's the type of name that Ruby would use.)

-----

3 points by almkglor 6426 days ago | link

Rather unfortunately, pg is playing around with syntax, and has thus reserved `?' for future syntax.

-----


I'm coming to Lisp from over ten years of Blub programming - C++, Java and C#. For what it's worth, I think templating languages are an evolutionary dead-end. Templating languages are seductive, because you see all this static HTML, so you think the right way to go is to serve up a template where you drop in the dynamic bits. But then you have to add another dynamic element, and another dynamic element, and pretty soon you have this awful mess that you can't easily modify or debug.

-----

5 points by projectileboy 6443 days ago | link | parent | on: Two part noob question

Enormously helpful. Thank you. Coming from Blub world, it's been hard for me to think functionally - making a distinction between returning values and side effects.

I don't understand your first point however, as this is a perfectly valid macro:

(mac double (x) `(+ ,x ,x))

-----

8 points by ryantmulligan 6443 days ago | link

Let me explain the "two within one" problem that you may be saying that you do not see.

  (mac check args                                 ;;no qq's
       `(do                                       ;; ` one qq
          ,(each arg (list ,@args)                ;; ,(,@) two escapes
             `(report-result ,arg ',arg))))       ;; `(, ',) two qq one escape
So on the line

  ,(each arg (list ,@args) 
you are doubly escaping something that is only quoted once.

-----

0 points by projectileboy 6443 days ago | link

Gotcha. Gracias.

-----

3 points by almkglor 6443 days ago | link

Nitpick. This is not a good definition (valid, but not good). The problem is something like this:

  (double (prn 3))
Try the above in your repl after entering the mac definition; then consider what must be done in order to protect the x. For example, you might notice that the macros in arc.arc have a lot of (w/uniq (...) `(let ...)) forms, even the arguably simpler ones.

-----

1 point by projectileboy 6449 days ago | link | parent | on: Suggestion for [... _ ...]

Actually, forget everything I said - I agree with your first sentence. I had originally thought there might be an elegant way to ditch formal parameter lists when there aren't optional or rest parameters. But the cost seems too high for the value added.

-----

1 point by projectileboy 6451 days ago | link | parent | on: Unimpressed.

I'm sorry you're having troubles. Can you elaborate on your environment? I'm a Lisp and Linux know-nothing, and I was able to get the sample blog app (blog.arc) up and running on Slicehost without much difficulty (install mzscheme 360, install open-ssl, fire up mzscheme as root so that I could bind to port 80, ready for rolling around in happy Arc-y land).

-----


Perhaps then the community can still forge ahead with a Git repository to share ideas and bug fixes and suggestions for improvements, which you can feel free to incorporate or ignore, and then the community should just baseline their Git repositories off of the arc<(max n)>.tar?

-----

4 points by CatDancer 6452 days ago | link

Yes, exactly. The Git repository is terrific resource as a place to conveniently store everyone's patches, but of course some patches may be "bad" (by one criteria or another), and that is OK (good even) for its purpose.

I'm running Linux, and so date was broken and thus so was the web server, I looked in the repository and was happy to see someone had a fix, and I didn't even have to read the date man page (lazy me!)

So, just like you say, Paul's canonical releases of arcn.tar and a community repository (for good patches, bad patches, experimental patches, weird patches...) are both useful.

-----

1 point by bootload 6451 days ago | link

"... I'm running Linux, and so date was broken and thus so was the web server, I looked in the repository and was happy to see someone had a fix, and I didn't even have to read the date man page ..."

by git repos do you mean ~ http://git.nex-3.com/?p=arc.git;a=summary ? [0]

[0] http://arclanguage.org/item?id=809

-----

2 points by CatDancer 6450 days ago | link

Yes. When projectileboy said "the Git repo that's been created", I assumed he meant the one you just linked to (I don't know of any other), which is where I found the date fix.

-----

2 points by projectileboy 6450 days ago | link

Yep

-----

2 points by projectileboy 6452 days ago | link | parent | on: Editing Arc in TextMate...?

No, no... This is helpful; thanks. I don't have any particular love for TextMate - it just seemed the quickest way to point B. (Actually, as a long time Blub programmer, my favorite text editor is IntelliJ. Go ahead and laugh... it's nicer than you think.)

-----

4 points by projectileboy 6453 days ago | link | parent | on: Arc logo draft proposal

I hate to say this, because I appreciate the effort, but I don't like 'em. They lack the elegance of the language.

-----

2 points by uvl 6437 days ago | link

No problem. This was a first attempt with almost no effort (just 5 px). Take it as an interim solution until pg comes out with his handpainted masterpiece ;-)

uvl 8-)

-----