Arc Forumnew | comments | leaders | submit | pg's commentslogin
5 points by pg 5831 days ago | link | parent | on: New Version of Arc

Oops, fixed:

    (mac each (var expr . body)
      (w/uniq (gseq gf gv)
        `(let ,gseq ,expr
           (if (alist ,gseq)
                ((rfn ,gf (,gv)
                   (when (acons ,gv)
                     (let ,var (car ,gv) ,@body)
                     (,gf (cdr ,gv))))
                 ,gseq)
               (isa ,gseq 'table)
                (maptable (fn (,gv ,var) ,@body)
                          ,gseq)
                (for ,gv 0 (- (len ,gseq) 1)
                  (let ,var (,gseq ,gv) ,@body))))))

-----

5 points by jmatt 5829 days ago | link

Are you going to fix this and other small bugs in the tar or are we just going to patch them on the fly? If the plan is to patch maybe we need a thread with patches - so people can get up and running fast.

Personally I think using Anarki is fast, straightforward and community friendly... So that may be my choice in the end when arc3/mz372 has some time to stabilize.

Is there a reason you are avoiding source control?

EDIT: Added the last question.

-----

3 points by pg 5832 days ago | link | parent | on: New Version of Arc

I don't have such a list myself. Your best bet is to diff the source files.

-----

4 points by rntz 5831 days ago | link

Here's the diff: http://www.rntz.net/files/arc2to3.patch

Just giving it a preliminary look over, it seems like you changed 'set to 'assign. Any reason for this in particular, pg? It seems like it changes a lot of code, and as 'set is fairly common, it kind of goes against the philosophy of short names for common operators.

-----

2 points by CatDancer 5831 days ago | link

"set" actually wasn't common at all; in arc2 it is used only a handful of times in arc.arc, mostly to implement "=".

-----

2 points by rntz 5831 days ago | link

Eh, when I think about code use, I usually think about anarki — which is probably the problem itself, now that I think about it.

    $ find anarki/ -name '*.arc' -print0 | xargs -0 grep "[(']set[[:space:])]" | wc -l
    180
It's not so many uses that it's impossible to update. Many if not most of these uses could admittedly be replaced with '=, and arguably this was the correct thing to do in the first place. It just seems like an odd decision, and I'm wondering if there's any specific reason for it.

-----

3 points by CatDancer 5831 days ago | link

In my opinion "set" is a better name for what "assert" used to do, and I think "set" was available since it was being used for a low-level operation for which in user code "=" is a better and shorter name.

Also, don't forget http://www.paulgraham.com/arc0.html:

"I worry about releasing it, because I don't want there to be forces pushing the language to stop changing. Once you release something and people start to build stuff on top of it, you start to feel you shouldn't change things. So we're giving notice in advance that we're going to keep acting as if we were the only users. We'll change stuff without thinking about what it might break, and we won't even keep track of the changes."

-----

1 point by pg 5832 days ago | link | parent | on: New Version of Arc

Yeah, I didn't try to suppress error messages because I'm curious how often it actually finds something.

When you say blank, do you mean completely blank, or just no stories? Because caching means that stories take a minute to show up to nonlogged-in users.

-----

1 point by thaddeus 5832 days ago | link

Re-installed. Works fine. I will look at further, but all is good so far. Thanks, T.

-----

2 points by thaddeus 5832 days ago | link

Ok now it's not my environment. I have made no changes just the arc3 files and mzscheme372.

* I have only 3 posts and 3 comments, if I log in as admin and keep hitting the comments link - not crazily like, but right after the page load completes - about the 10th time or so the hyperlinks change format then the whole forum get locked and goes blank.

I am using mac osx.

After about an hour I'm getting the impression the forum is glitchy. There's just a bunch of quirky behavior like the above (pages are slower to load - page painting is noticeable.... etc etc)

Not like the old arc2 forum on the same machine.

T.

-----

3 points by pg 5831 days ago | link

You're probably setting off the code that protects against overly aggressive clients. See abusive-ip in srv.arc.

Try restarting Arc and evaluating this expression

    (def abusive-ip (x) nil)
before starting up News, and see if you still have a problem.

This will show you requests that have been ignored, by ip address:

http://localhost:8080/spurned

-----

2 points by thaddeus 5831 days ago | link

LoL. And here I was thinking I was helping by doing a little bit of stress testing :)

That fixed it. T.

-----

1 point by thaddeus 5832 days ago | link

stopped; rebooted. this time without even logging in - on the 4rth time clicking the comments link - it froze up.

-----

1 point by pg 5832 days ago | link | parent | on: New Version of Arc

I wanted to give people using Arc a little time to try this out. If there are no disastrous bugs I'll switch over in a day or so.

-----

8 points by pg 5832 days ago | link | parent | on: New Version of Arc

Oops, should have mentioned you have to use MzScheme v372.

Arc has mutable conses, so it would have been hard to make it work with versions of MzScheme after they switched to making lists immutable.

-----

3 points by w8lvn 5829 days ago | link

Install doc at top of arclanguage.org says to use 352, turns out to be issue with 64 bit systems.

-----

3 points by pg 5829 days ago | link

Use 352 with arc2.tar (the old, stable release), 372 with arc3.tar (the latest release, still being fixed).

-----

1 point by w8lvn 5829 days ago | link

Trying arc for the first time. Unable to get version 372 on my 64 bit systems.

Any way to get this to work with a later version of mzscheme?

-----

2 points by CatDancer 5829 days ago | link

How about http://download.plt-scheme.org/drscheme/plt-372-bin-x86_64-l... ?

Sadly Arc hasn't been ported to mzscheme version 4 yet.

-----

1 point by w8lvn 5829 days ago | link

Ach.

Thanks. For some reason was trying 352.

Thanks.

-----

1 point by anarcer 5832 days ago | link

ya, it works, all ok for now... nice...

-----

15 points by pg 5832 days ago | link | parent | on: New Version of Arc

Many thanks to CatDancer and dfranke for prerelease help, and to all the others who pointed out bugs and/or made design suggestions.

Please let me know if there are any conspicuous bugs in the new version.

-----

5 points by pg 5835 days ago | link | parent | on: Arc presentation

In the latest (soon to be released) version

    (aif ((foo 'bar) 'name)
         (print it))
would be

    (only.print foo!bar!name)
assuming print is some function you defined yourself, and you don't mean pr.

-----

1 point by conanite 5833 days ago | link

"warning: future releases of arc are likely to break all of your existing presentations"

I'll find another example so.

assuming print is some function you defined yourself, and you don't mean pr.

is this because only only takes 1-arg functions? Something like

  (def only (f)
    (fn (arg)
      (if arg (f arg))))

?

-----

1 point by andreyf 5834 days ago | link

Hm, you seem to use the . notation as Python uses decorators, but chaining multiple decorators has a very different effect. In python, I'd expect foo.bar.3 to be (foo (bar (3))). In Arc, it seems to do (foo bar 3).

-----

1 point by CatDancer 5834 days ago | link

This will be fixed in the next release of Arc (http://arclanguage.org/item?id=9163)

-----

1 point by pg 5836 days ago | link | parent | on: Lists as hash keys

This is a bug that's fixed in the next release.

-----

2 points by pg 5840 days ago | link | parent | on: Last call for Arc bugs

Thanks, we switched to this definition.

-----

3 points by CatDancer 5840 days ago | link

Wow, it's a pretty good deal for me to get my patches tested by thousands of HN users! ^___^

-----


We're ok now. Rtm figured out how to get the custodian stuff down into ac.scm, so in Arc code this stuff "just works."

-----

More