Arc Forumnew | comments | leaders | submit | nex3's commentslogin
1 point by nex3 6467 days ago | link | parent | on: arc-mode.el for emacs

Turns out it's just a simple option: comint-prompt-read-only. I've set it in Anarki.

-----

1 point by cooldude127 6467 days ago | link

that was far too easy. i wonder if it is possible to make it pretty print.

-----

1 point by nex3 6467 days ago | link

I think it just outputs whatever Arc sends its way. So this would really involve getting Arc to pretty-print its output.

-----

2 points by cooldude127 6467 days ago | link

that might not even be that difficult, but my main problem is arc's pretty printing (in "pprint.arc") is rather flawed.

-----

4 points by nex3 6467 days ago | link | parent | on: arc-mode.el for emacs

I didn't, and I don't think Eric did either.

-----

5 points by nex3 6467 days ago | link | parent | on: arc-mode.el for emacs

I've added this to Anarki. I'm working on making a few improvements.

-----

1 point by cooldude127 6467 days ago | link

i look forward to seeing what you come up with

-----

2 points by nex3 6470 days ago | link | parent | on: Really using git

Although GitHub is really awesome, it's only free now because it's in beta... once they finish the site, it'll have a fee. On the other hand, they have talked about waiving that for open source stuff. Also, the beta is invite-only.

-----

4 points by nex3 6470 days ago | link | parent | on: Really using git

When I first set up a git repo, it was my own read-only one: http://git.nex-3.com/arc.git. Shortly before I announced it, though, ambition had set up the original Subversion version of the wiki. Since that seemed like a cool idea, I set up a parallel Git wiki.

Eventually, I just stopped pulling into my repo. The wiki pretty much had everything I wanted, and more or less nothing I didn't.

However, I could definitely see other folks creating their own repos if they want to do some major experimentation (although using a branch of the wiki might work just as well). In particular, I totally agree that it would be awesome if PG would expose his changes as Git commits, if just to make the arcn.tar merging process easier.

-----

2 points by CatDancer 6470 days ago | link

it would be awesome if PG would expose his changes as Git commits

If someone is looking for a small project to take on, that sounds like an easy and useful task to volunteer for.

-----

6 points by byronsalty 6470 days ago | link

Well the real nice part would be PG himself using git and doing diffs against other repos to see what's festering in the community.

Right now the forum seems to be the only what of contributing patches to arc and this seems ripe for having things lost. (And who wants to bring up the same patch twice if it went unnoticed the first time).

-----

5 points by nex3 6470 days ago | link

Well, taking arcn.tar and merging it isn't that hard - I did it for arc1 and will probably continue to do so. It would just be nice if we could have more granular official patches.

-----

3 points by nex3 6472 days ago | link | parent | on: NewLISP anyone?

From the copyright file in arc1.tar: "This software is copyright (c) Paul Graham and Robert Morris. Permission to use it is granted under the Perl Foundations's [sic] Artistic License 2.0."

-----

2 points by nex3 6472 days ago | link | parent | on: Anarki Conventions

I'm not so sure about this. I think changes of the filling-up-namespace sort are reasonable, for the same reason being a Lisp-1 is reasonable: conflicts happen rarely in practice.

A better solution would be to try to ensure that only generally useful macros are added to arc.arc, and that they have names that are unlikely to be used as local variables. Or even better would be to make local variables shadow macros.

Consider this, though: "help" is defined as a macro. Some of the REPL-var code needs macros. The drop-into-scheme operator is a macro. I don't think we want to make people load a library file to use these.

I see the compatibility rule as more of a guideline - try not to break the functionality of stuff that already exists. But I don't think it should limit experimentation and exploration, including exploration of what's useful to have in arc.arc.

-----

2 points by raymyers 6472 days ago | link

OK, I'll backpedal a bit here. The last thing I want is to have to require "lib/help.arc" :). It should be easy to find out what macros have been added though -- as much for curiosity as for compatibility. I'll try and whip up a script tonight, unless someone beats me to it.

-----

4 points by raymyers 6472 days ago | link

Script complete. It crawls `arc.arc' and every file loaded by `libs.arc'. So now, if you type the following,

    (require "lib/new-macros.arc")
    (new-macros)
... you will discover that the non-Arc1 macros in Anarki are currently:

    ($ % % %% %%% breakable defsop help make-br-fn or= redef)

-----

1 point by nex3 6472 days ago | link

Most excellent. It's great to see how easy it is to analyze Arc code using Arc.

Anyway, of those, the only one I see potentially conflicting with a variable name is "breakable", and that seems quite unlikely.

-----

2 points by akkartik 6472 days ago | link

Great thread to see how y'all converged on a design decision after some back and forth.

-----

4 points by nex3 6472 days ago | link | parent | on: Docstrings: a contrarian view

I understand your points, but I think there's one concern that sort of overrides them: it's very important for users to be able to have access to the documentation without any extra effort. They shouldn't need to load, or God forbid _find_, a documentation file before they can get help.

Now, you could say that we should have a default docfile and move the inline docstrings to that, but I think that in general when you are writing and maintaining documentation, it's much easier to have it right there.

I think adding support for alternative docfiles might be a good idea... geel free to do it in Anarki. But I don't think all documentation should be moved out to them.

-----

2 points by ryantmulligan 6471 days ago | link

I feel like if we have a canonical web repos for docstrings people will be able to find and use it. It works with Java's and Ruby's documentation. Most people probably don't care if the documentation is in the src or not. I don't know how to do it better than put it in the src though.

-----

2 points by almkglor 6471 days ago | link

If you've got arc-wiki and the arc server running, try http://localhost:8080/help

-----

5 points by nex3 6472 days ago | link | parent | on: Templating language or MVC-style arc?

As the primary developer of Haml, I'm playing with the idea of porting it to Arc at some point (likely not via sexprs, though, because a large portion of Haml's coolness comes from other aspects of its terser syntax).

Then again,

  (div #id .class = content)
isn't so bad...

-----

1 point by almkglor 6472 days ago | link

I think you'll find that s-exprs can be surprisingly terse - remember the lesson of pg's 'if function ^^.

-----


Except that according to sacado's benchmarks, packaging things up in a mzscheme executable apparently does speed things up.

-----

2 points by eds 6473 days ago | link

Um....

Sacado said: "Well, actually, to do so, I had to make effective the optimisation someone there already wrote about, in arc< and arc>."

-----

5 points by sacado 6473 days ago | link

In fact, both were needed to optimize things. Mzscheme's doc says explicitly (though I can't remeber where exactly) that standalones are a little faster than interpreted code (there are a few more optimisations they can perform during compilation I guess). Running arc1.scm through mzscheme -f is a little slower.

-----

4 points by elibarzilay 6472 days ago | link

There is an initial overhead for byte-compiling the code and jitting it -- but that's not something that you'd be able to measure for such a small piece of code. Once that's done, it's the same code -- mzscheme (since a good while ago) on intel and ppc does not interpret code. Ever. Even on solaris, where the jit is disabled, it's "interpreting" byte-compiled code, so it is not an interpreter in any case.

-----

2 points by elibarzilay 6473 days ago | link

Right, these two are major bottlenecks. (There are still a good number of them that can be optimized.)

-----

More