I can not believe for once that this guy obtained hacking nirvana through Arc. Not once! Why? because the Arc documentation is so meager as to be non-existent. You will need serious feet-wetting with more established Lisp dialects before you can "get there" with Arc.
All the epiphanies he lists are easily experienced with most modern Lisp dialects; either he "got it" before and just needed to extend the credit to Arc, for some reason .. or he isn't there yet, at least not to its full potential.
It had to be said, as much as I hate to be rude and blunt like this :-|
It was noticing this difference that made me decide Arc was ready to release. If it (a) felt significantly better to me, who (b) am experienced with existing Lisp dialects, and (c) writing a type of application (HN) that's not wildly specialized, then it had the "quantum of utility" I usually use as the test for releasing a version 1.
Any chance of releasing a book or spec alongside Arc at some point? Or are you encouraging people to just play around with it for now? I'm just wondering whether the idea here is to encourage exploration through scarcity, or that there's insufficient resources to produce the documentation, or if it's just too early on at this stage.
However, it's IMO, unacceptable for a fairly new Lisp programmer to cast aside 50 years of Lisp research, development and deployment while brushing aside the industry's backbone languages, and herald Arc as the best thing ever when it isn't even finished.
I can accept personal choice and opinion, if kept to one's self and made in private. Even if someone sings Arc, or Clojure or Common Lisp or Scheme, praises, I am fine with it. But to say "Languages X, Y, Z suck because they don't allow me to write succinct programs", well, you're just trolling for X, Y and Z programmers to come out and straighten you out. The sort of macrology he is after (code-compacting type, not language extension) is pretty basic and could be done with the C pre-processor and M4. You can even write compact assembly programs with GASP, HLA, and NASM macros; it's not rocket science.
I reserve my judgment for Arc until it's done. There is no manual yet to hold the compiler accountable, and to save me from guess-work. However, what I can't ignore is blind fanboyism; if everybody here sang Arc praises, when it is just arc-tutorial.txt and arc.arc, and there were no "dissenting" honest voices, well, the place just wouldn't be the same.
I can summarize the whole thing as:
"I really like working with arc, and it makes me happy enough to blog about it."
So yeah, while I didn't find it particularly worth upvoting, I'm not sure why you are trying to convince this guy he is somehow _wrong_ about being happy, and telling him he shouldn't dare write about it. You can no more do that than convince someone who claims their favorite color is red that it is in fact blue.
> The guy expressed an opinion...
In technical circles even opinions have to be defensible. You can't just accept "X sucks and Y rocks" as an opinion and let it pass. The whole place will become abuzz with irrational thought, and overrun with "we are all right" group-think liberal-arts type BS.
Ok. I will accept that.
Here is my take on your personal essay, it's also a matter of personal opinion made after sufficient technical evaluation of the matter: I think you need to be a little more critical of your own reasoning, specially when writing for programmers. The spirit of your essay has been largely positive, IMO, but go easy on the snide remarks and the dismissive attitude of other technologies you have very little experience in (yeah, it shows.) Otherwise a much less sympathetic reader than I, and a far more competent one, will come aboard and tear your argument to pieces.
A better way to frame your enthusiastic writing would be "I can do X in Arc, I really wish ${LISP_DIALECT} would let me do the same". This is both curious and also accepting of one's own self-limitations. Someone will come aboard and show you what you have been missing, and you might as well get pointers to the literature that further your understanding of Arc or whatever other technology.
Regards.
What the hell is your problem with a) someone creating their own Lisp implementation, and b) someone else enjoying using it?
I should have been nice, we're all equally-right in some way. hugs.
"I’ve long liked Lisp, but hadn’t been programming in Lisp for a long time because I hadn’t found any features in Lisp compelling enough to overcome the advantage other languages had in having large libraries available and such like."
I mean, come ON. If Lisp wasn't compelling enough because of the perceived lack of libraries, then Arc is the last way to come back to Lisp as it has NIL.
It's completely acceptable to have a preferred Lisp, but it's unacceptable to do so for irrational reasons ;-) Every time you need a new library/feature in Arc you're most likely to call out to the MzScheme runtime and FFI. It's highly hypocritical of you to dismiss a language for lack of libraries, then jump on another language it hosts.
Actually it didn't, but that hasn't stopped you before;
http://arclanguage.org/item?id=9257
One of the things I want to add next is graphics libraries. Does anyone have any recommendations for what to plug into to munge images?
ImageMagick (http://www.imagemagick.org/) has worked well for us. There are bindings out there for many languages, including Common Lisp (http://common-lisp.net/project/cl-magick/); you might want to look there for inspiration.
http://arclanguage.org/item?id=4070
Are you planning to do another poll ?
http://rhodesmill.org/brandon/2009/graphicsmagick-saved-the-...
Yeah you're doing something wrong there. I know it's fashionable to bash Java and say how lame and verbose it is, but it does wear a bit thin. I actually enjoy writing Java. Perhaps due to me having grown up programming assembly - I don't mind verbosity. Java is an extremely solid fast language.
You mean "the JVM is an extremely solid fast runtime" - languages by themselves aren't fast or slow ;-)
Java as a language, the syntax, is for me sane. It gets a lot of things right, and some things wrong, but on balance, it's sane enough to use. Just like English as a language is sane enough to use, whilst having lots of stupid inconsistencies in spelling/pronunciation etc.
And it's likely to be the fastest/most optimized of any JVM target language.
My statements that I prefer Arc for the kind of programming I do was not intended to be a put-down of other languages.
If you should be so unfortunate to be stuck trying to write good code in Java, ...
One solution is to remove the connotations, eg:
If you are writing code in Java, ...
Note: this version is more concise :-)
But please keep the factual points, such that Java's verbosity can mean that removing duplication doesn't make it shorter. I thought that was an insightful and pithy expression of the idea. But I also note that that's not the only benefit of removing duplication.
Do linguists agonize over language efficiency as much as some programmers do? For example, writing English is maybe far more letters/strokes than Japanese (idk), but we don't all start learning Japanese and bash English.
(defmacro foo (args go here) `(code goes ,here))
On the other hand, Scheme has this monstrosity for defining macros that I can't describe because I never managed to keep straight in my head how it was supposed to work.Hygiene is a red-herring. It's easy enough to achieve with a defmacro-style macro system - just use gensyms.
Hygiene can also be baked-in to a nice lispy defmacro-style system; there's no reason that hygienic macros have to be scheme-style. Variable capture can be permitted with a (capture x) special form. (I like to use ^x as a shorthand for that).
At that point, macros start behaving scope-wise similarly to lexical functions, and captured variables behave kind of like dynamic variables in a function.
It suddenly occurs to me that this form of hygiene could be implemented in the expansion of let, lambda and defun forms, at which point (someone yell at me please if I'm wrong), plain-ol' defmacros would be hygienic, unless there's a type of variable capture that I'm forgetting about right now...
> It's easy enough to achieve with a defmacro-style macro system - just use gensyms.
Gensym cannot prevent global identifiers from being shadowed in macro use environment.
(define-macro (my-if a b c) `(if ,a ,b ,c))
(define (boo)
(let ((if list)) ; if is shadowed
(my-if 'x 'y 'z))) ; evaluates to (x y z), not y
In CL you don't need to worry much, since (a) it is Lisp-2 so variables won't shadow operators, and (b) using packages greatly reduces accidental shadowing. In Scheme the chance is much higher; you probably don't bind 'if' locally, but you can't check every user-defined global procedures the macro inserts into the output.Then there's a macro in Arc, for example,
(mac awhen (expr . body)
`(let it ,expr (if it (do ,@body))))
which, on the one hand, yes it is true it's not hygienic. But, on the other hand, I can bang out in seconds. So now I'm moving ahead writing my program instead of struggling to write a macro. And the lack of hygiene has never been an actual problem for me in practice.I imagine that a Scheme programmer who was experienced in writing hygienic macros and so could write them quickly, and who was more bothered by the lack of hygiene than I am, could well reach a different cost/benefit decision than I do and decide they'd rather go with hygienic macros.
I have a desire to not just stand here and take it on the chin as mahmud publicly proclaims that I'm pandering, a Lisp newbie, irrational, a blind fanboy, hypocritical, dismissive, and unfair. On the other hand I don't want to waste everyone's time with a tedious flamewar.
Thoughts?
It's easy to misinterpret what people say on the net.
FWIW I too had a very positive superficial read of Arc when it was first published and I'm neither a fanboy nor a Lisp newbie. Scheme is one of my true loves.
http://blog.bitquabit.com/2009/05/20/your-language-features-...
That was comparing Smalltalk to C#, but it is a similar idea. Smalltalk and Lisp belong to that elite fraternity of programming languages where the ability to easily extend the syntax is built into the language. The mechanisms are different, but the expressive power is similar.
The Rewrite Tool is not dynamic. Perhaps this is the key? But I could imagine a Smalltalk function that takes a method, applies a Rewrite Tool syntactic transformation to its source, compiles the method as a Block, then calls this Block with the arguments that would've been send to the original method.
Something like:
perform: methodName
with: arguments
rewriting: aMatchingPattern
as: aRewritePattern
Where aMatchingPattern would be something like: ``@rcv
ifTrue: `Block1
ifFalse: `Block2
Then aRewritePattern could be something like: "Order of Blocks reversed"
``@rcv
ifTrue: `Block2
ifFalse: `Block1
Just be careful to cache the result of the compilation by method name and Class, and this wouldn't be too much slower than a conventional #perform:This particular example would let you dynamically call any method, but with all of the if-then-else equivalents with the then and else clauses swapped.
Would this constitute Smalltalk Macros?
I think that too much of writing about programming is focused on the details of the programming act, and too little on the result of the programming.
Reading about finding and learning a programming language is like reading about an artist choosing a brush. Reading about the technical details of someone scaling a Django app on a single server to serve 1000 concurrent requests per second is like seeing the finished artwork.
Wands are a much better metaphor to make. Or perhaps, what if you had a magic brush that could at any time be extremely fine or large or anywhere in between depending on how you felt? That would be some brush, especially when you compare it to the many medium sized brushes which aren't so fine when you need them to be.
Okay, so maybe the metaphor is still stretching a bit, but these are no ordinary brushes; they are worth writing about.
Thanks Anarki and arcfn.com!*
They were both tremendously useful/helpful when I last used arc.
*All creators and contributors.
What I find a little disgusting is when my "meta-programming" in Ruby starts doing things like when an exception occurs, it points to a line number slightly different than where it really is, or when the backtrace becomes all the more "hacked" with harder to understand things thrown in there. It serves to remind us that there are tradeoffs involved. Also there is the issue creating shareable modules and when you start hacking it away it can make it all the more harder to share. But it's more than fun, it does work, it's just that one can have mixed feelings because for ever cool finding or development, there can exist a little nuisance as well or something that you cannot quite do anymore because you deviated from mainstream...
I gotta go have lunch!
Be well.
It's a wonderful thing to have a language that matches how you think, an extension of your mind analogous to how physical tools can be an extension of your body, with a heft, weight and balance that causes them to leap to hand, and guide you at times.
But my particular tasks at the moment involve so much more work at the drawing board (the figuring stage) that having better tools doesn't actually help me - much as I would love them to.
It's very true that the tools you need depend on your personal way of thinking, the task, the stage of the task, and how many times you've done it.
That said, have fun with Arc ;-)