Arc Forumnew | comments | leaders | submitlogin
8 points by sacado 6090 days ago | link | parent

You're right, but it can be dangerous too : we would end up having two (or more) competing implementations of the language and have libraries compatible with "PG Arc" and others compatible with "Anarki".

We finally would have to choose which implementation to work on (the official one ? Or the one with cool features missing from the official ?) and have to port every missing library to our chosen version. Something current in the Lisp world, but that's also one of the reasons why Lisp seems frightening to others and why Python or Perl have more users.



4 points by lojic 6090 days ago | link

Although I'm a Lisp newbie, the more I learn about Lisp, the more I like it. However, one of my frustrations (which seems to be all too common), is dealing with the myriad of implementation choices, libraries, etc. There are pros and cons to those choices, but more cons ;)

For me, the BDFL model has worked quite well for Ruby, Python, etc. I expect I'm very biased since I'm a Ruby programmer currently, but I think it's fair to say the model works well to avoid dividing and conquering itself.

There are many things to like about Arc, but I think the fact that it could potentially unify a large community around a single implementation is very powerful.

I've also heard that it's better to put systems in place before you need them instead of afterward.

-----

5 points by cchooper 6090 days ago | link

The only practical alternative to BDFL is design by committee. For Anarki, the committee is anyone with git installed. Much as I love the work being done on Anarki, the model won't scale and either pg, nex3 or someone else will end up having to make the decisions.

So I'm sort of saying... it'll work out in the end, maybe.

-----

4 points by kennytilton 6090 days ago | link

The conflict I see is between pg releasing Arc at this very early stage because he found it useable vs you all going batsh*t over the volatility. You are both right! It is great that the users are chomping at the bit for something stable, but pg warned everyone that this was an experimental release and he planned to trash all our code at will. :)

Looking at Arc as a Lisp veteran I can assure you all that you totally need to reset your expectations and sign up for a fun exploration of a possible (emphasis on possible, because the more I learn of Lisp-1 the more I consider it a grave error) ... of a possible sweet spot in the abstract Lisp language space.

-----

2 points by lojic 6089 days ago | link

If Lisp-1 does turn out to be a grave error, it doesn't seem like it would be that difficult to either add the Scheme features that make Lisp-1 work, or turn it into a Lisp-2, given the side of the Arc codebase.

Right now, I'm just looking for the best Lisp to develop web applications with. Ruby on Rails is my benchmark, and I think it can be improved on with Lisp, but that remains conjecture at this point.

-----

2 points by lojic 6089 days ago | link

Just to be clear. I'm not asking for stability at this point. I agree that maintaining backward compatibility would waste time & effort. Arc can still evolve like crazy and break existing code, but it would be nice to have a way for the community to feed patches & bug fixes to pg besides the Arc forum.

-----

2 points by wfarr 6090 days ago | link

Projects have a way of sorting themselves. Give it time.

-----

2 points by almkglor 6090 days ago | link

Unless it's Lisp, in which case each programmer has his or her own personal version with his or her own personal macros.

-----

9 points by kennytilton 6090 days ago | link

No, it does not work that way, although people who do not understand macros (such as Guido) live in fear of that hobgoblin.

Macros are not used to create unrecognizable languages. They are used when an API has grown to the point where writing the code to use it can be automated. That is probably hard to parse if you fear macros, because you can only fear macros if you do not know how they are used. But the idea is simple.

This little call tends to require this little call before it and this little call after it, or something like that. And this pattern appears often enough, or the Lisp developer recognizes it as the sort of thing that will appear again and again, and they just say, macro time!

They then give the macro a totally comprehensible name derived from the bits of the API being hit and, golly, no confusion.

The other time you see macros is in things like aif. There will only be so many of these, and they will confuse people not at all.

It seems to me some people want macros to be a problem. They never are.

-----

3 points by almkglor 6090 days ago | link

Yes, well. In the office no one wants to touch my code, because it's built from bunches of macros, and no one else here knows how macros work. Oh well. Could be just me, I suppose.

Edit: gets even worse when I use C macros in C code ^^, they even instated a rule that loops should use for(i=0;i<limit;++i) and not my otherwise shorter repeat(i,limit) macro

-----

4 points by kennytilton 6090 days ago | link

"no one else here knows how macros work"

We almost agree. :) I don't know, when they look at your functions do they know what they do? When they see a class name do they understand the class hierarchy? Or do they start browsing? As for repeat(i, limit) being banned, I presume because no one could guess what it does, well, I am looking at bartender's school. The more I learn about software the harder it is to work with some people. :) But I don't blame Dilbert on the C preprocessor.

-----

2 points by almkglor 6090 days ago | link

LOL. I think the problem, partly, is the fact that we're attached to a Japanese company and the Japanese might not have that good a grasp of what "repeat" means (they tend to have a sneering attitude to anything non-Japanese, which means they suffer in the english-language department). I did manage to talk some guys into using repeat, but they got ordered by the Japanese to change it to "for", presumably because the Japanese knew "for", didn't know what "repeat" meant, and couldn't figure out how #define worked.

Edit: Too bad I'm a teetotaler, I'd have gone to bartender school too.

-----

3 points by kennytilton 6090 days ago | link

"one of my frustrations ... is dealing with the myriad of implementation choices"

As Sartre said, you are not free to be not free. Have fun with Arc, use Common Lisp. Lisp-1 buys you nothing but aggravation, minimal just means you end up building your own full tool chest that is incompatible with anyone else's so you can never share code.

-----

2 points by almkglor 6090 days ago | link

http://arclanguage.com/item?id=1900

-----

1 point by eds 6090 days ago | link

There were a lot of issues addressed in that post; which one exactly were you thinking of with respect to lojic's post?

-----

1 point by almkglor 6090 days ago | link

The idea that Lisp's greatest strength - the inherent ability to transform to whatever you want it to be - is also its greatest weakness, since it prevents you from easily communicating with others what you intend - that is, one man's 'let (CL, Scheme) is another man's 'with (Arc).

-----

4 points by kennytilton 6090 days ago | link

Having ported my groovy Cells project to Arc, I can confirm that it was a pain where I sit that "only the names have been changed" in several cases. :) But pg gets the benefit of the doubt from me because I own both his books and he kinda rocks when it comes to Lisp.

The funny thing is that perhaps unbeknownst to you all the Lisp establishment is ragging on pg for Arc being too much like Lisp, you (and I a little) are hosed that he diverged from Lisp, so him being smart I would guess he is now ignoring everyone. :)

The only thing I can offer is that it totally sucks to have an installed base and not be able to change things cuz you will break all the code ofyour users. Only at times like this is an inventor free to change everything and anything, I guess pg did.

-----

4 points by nex3 6090 days ago | link

I don't really see Anarki as a fork of Arc, and certainly not as a competing implementation. I see it as a place to put bug-fixing patches, to experiment with crazy implementation ideas, to keep libraries and add-ons, and so forth. I keep it up-to-date with the latest arcn.tar, and we all try not to make the API incompatible. If PG ever says that there's some feature in it that he won't include in the official distribution, at least one that involves patching ac.scm, we'll get rid of it. The rest can be included as arcn-compatible libraries.

So I don't predict that there'll really be incompatibility issues in the future.

-----

2 points by sacado 6090 days ago | link

Well, as far as I know, there are some improvements (bug fixes & efficiency issues) made in ac.scm from arc2 that have been ignored on the anarki version (where other patches & fixes were previously applied). In other words, anarki's current version of ac.scm is much closer to anarki's "arc1+" version than to arc2's version. I tried to merged them a few days ago, but apparently it broke in some versions of mzscheme. I might try again later.

No big deal however, these are only minor issues, but it might get harder as pg improves his own version while we get addicted to (and improve) the cool features implemented in the version we're working on. One day or another, it will be almost impossible to merge them. (Animal species work that way btw)

-----

3 points by nex3 6090 days ago | link

There shouldn't be anything in arc2 that isn't in Anarki except maybe a couple srv.arc improvements that are more or less a subset of the improvements made earlier in Anarki.

I did a full merge of arc2 when it was released (see http://www.arclanguage.org/item?id=3427), and when there were conflicts, generally favored PG's solutions to the ones already present. If there is anything missing, I'd love to know what it is.

-----

2 points by sacado 6090 days ago | link

For example, arc-call was change a little, for performance reasons I guess :

  (define (ac-call fn args env)
   (let ((macfn (ac-macro? fn)))
    (cond (macfn
           (ac-mac-call macfn args env))
          ((and (pair? fn) (eqv? (car fn) 'fn))
           `(,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          ((= (length args) 0)
           `(ar-funcall0 ,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          ((= (length args) 1)
           `(ar-funcall1 ,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          ((= (length args) 2)
           `(ar-funcall2 ,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          ((= (length args) 3)
           `(ar-funcall3 ,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          ((= (length args) 4)
           `(ar-funcall4 ,(ac fn env) ,@(map (lambda (x) (ac x env)) args)))
          (#t
           `(ar-apply ,(ac fn env)
                      (list ,@(map (lambda (x) (ac x env)) args)))))))
Instead of the code currently in anarki, taken from arc1 :

  (define (ac-call fn args env)
  (let ((macfn (ac-macro? fn)))
    (if macfn
      (ac-mac-call macfn args env)
      (let ((afn (ac fn env))
            (aargs (map (lambda (x) (ac x env)) args))
            (nargs (length args)))
        (cond
          ((eqv? (xcar fn) 'fn)
           `(,afn ,@aargs))
          ((and (>= nargs 0) (<= nargs 4))
           `(,(string->symbol (string-append "ar-funcall" (number->string nargs)))
              ,afn ,@aargs))
          (#t
           `(ar-apply ,afn (list ,@aargs))))))))
That one is not crucial, as it only brings a minor performance gain in most of the cases. However, I'm more skeptical about that :

  (define (ac-fn args body env)
   (if (ac-complex-args? args)
      (ac-complex-fn args body env)
      `(lambda ,(let ((a (ac-denil args))) (if (eqv? a 'nil) '() a))
         'nil
         ,@(ac-body body (append (ac-arglist args) env)))))
Versus the code from Anarki, still the original arc1's version :

  (define (ac-fn args body env)
   (if (ac-complex-args? args)
      (ac-complex-fn args body env)
      `(lambda ,(let ((a (ac-denil args))) (if (eqv? a 'nil) '() a))
         ,@(ac-body* body (append (ac-arglist args) env)))))
Isn't it a bug fix ? The one someone told about, with '(), () and nil not being always equivalent ? If so, that's more problematic. I tried to merge these codes together, but it was obviously broken and was reverted later in the git.

-----

5 points by nex3 6090 days ago | link

Those do seem to be mistakes. It looks like this might have been caused by the Windows-newlining of ac.scm, which screwed with the Git history a little. I'll change these to the arc2 versions... if you see any other inconsistencies, let me know.

-----

2 points by nex3 6090 days ago | link

I've changed ac-call to the arc2 version, but I think you're wrong about ac-fn. The following:

  (define (ac-fn args body env)
   (if (ac-complex-args? args)
      (ac-complex-fn args body env)
      `(lambda ,(let ((a (ac-denil args))) (if (eqv? a 'nil) '() a))
         'nil
         ,@(ac-body body (append (ac-arglist args) env)))))
is how it's been in arc0, arc1, and arc2. The following:

  (define (ac-fn args body env)
   (if (ac-complex-args? args)
      (ac-complex-fn args body env)
      `(lambda ,(let ((a (ac-denil args))) (if (eqv? a 'nil) '() a))
         ,@(ac-body* body (append (ac-arglist args) env)))))
is unique to Anarki, and was added as part of a patch for MzScheme compatibility.

After getting rid of all the trailing-whitespace-removal that was clogging the diffs, I think ac-call was the only non-purposeful difference between ac.scm in Anarki and arc2. Let me know if you notice any more, though.

-----

1 point by kirubakaran 6090 days ago | link

Dangerous? Won't it be just like Debian Stable Vs Unstable?

-----

6 points by sacado 6090 days ago | link

Well, the future will tell us, but for the moment, Anarki is a non-official experiment around the "real" Arc, and as far as I know none of the propositions made in Anarki can be found in the official versions (it's very early for that, I know). On the contrary, debian stable & unstable are both official and the vocation of unstable is to become the next stable version.

-----

3 points by nex3 6090 days ago | link

"as far as I know none of the propositions made in Anarki can be found in the official versions"

There are a few bug fixes that appeared first in Anarki, were brought up on the forums, and ended up being added to arc1 or arc2. But you're right, I don't believe PG pulls changes from the repo directly.

-----

1 point by tokipin 6090 days ago | link

could it be related to the license he's using?

-----

4 points by nex3 6090 days ago | link

I'm no lawyer and I haven't read the artistic license very closely, but Anarki's under the same license as the original codebase, so I'm pretty sure there shouldn't be a problem...

-----

3 points by antiismist 6089 days ago | link

IAAL--Arc is under the Perl Artistic License, see http://www.opensource.org/licenses/artistic-license-2.0.php

PG can roll in changes per part 4.a

-----

4 points by nex3 6089 days ago | link

I don't think I've ever seen the term "IAAL" used before.

-----

0 points by kirubakaran 6090 days ago | link

I understand your point, but I am sure you'll agree that Paul definitely will accept a feature if it is really cool. Thereby Anarki is de facto Arc Unstable.

-----