Arc Forumnew | comments | leaders | submit | pg's commentslogin
3 points by pg 6411 days ago | link | parent | on: Arc2.tar

oops, fixed

-----

2 points by pg 6412 days ago | link | parent | on: Is flat with stringstoo broken?

Looks like a bug; will fix.

-----

4 points by pg 6412 days ago | link | parent | on: Arc2.tar

I develop on OSX but the code runs on FreeBSD on the News.YC server.

-----

2 points by lojic 6412 days ago | link

I guess I'm confused then. Does the date function in arc.arc work for you on OSX?

-----

3 points by lojic 6411 days ago | link

My bad. In my haste, I simply ssh'd to my Mac and issued 'date -u -r' and didn't take the time to see that it was simply complaining about the fact that I didn't provide an argument for -r. So, I guess it's a problem for Linux, and not for OSX.

-----

3 points by cooldude127 6412 days ago | link

works for me on OS X. both the anarki and the vanilla arc2 date functions produce the same result.

-----

2 points by tjr 6412 days ago | link

Works for me on OS X as well.

-----

5 points by pg 6413 days ago | link | parent | on: premature optimizations in Arc

In this example it's not the end of the world, but it would cause problems in code that's generated by other code, e.g. by macros.

I experimented for a while with having if just be aif, and it was not good. There are times you want to back off from maximally using anaphoric variants, just as there are times you don't want to use [] or ./! notation even though you could. E.g. when it's nested. And if you don't have the non-anaphoric variants, you never can.

-----

4 points by pg 6413 days ago | link | parent | on: Kicking up more fuss about modules

You can just write let* so long as there is a space after the asterisk.

-----

1 point by cchooper 6413 days ago | link

Ah, the problem was I had a comma after it. Thanks.

-----

1 point by andreyf 6102 days ago | link

let*, huh?

-----

12 points by pg 6413 days ago | link | parent | on: Community wiki

Ok, will try to cook up something.

I'm busy at the moment getting the source of news.yc ready to release in the next version. But that should be done in a couple days max.

-----

5 points by pg 6415 days ago | link | parent | on: foo!bar syntax interferes with function naming

It doesn't seem a good idea to use characters that have special syntactic meaning in the names of things. You can't name a function foo(bar either, but that doesn't seem odd because Lisp hackers are used to ( being different from other characters.

-----

4 points by cadaver 6415 days ago | link

It seems too that special end-of-symbol handling in the core, just because some users might possibly want to use intrasymbol-notation characters at the end of function names, does not go well with Arc's design philosophy:

... avoid having a language designed according to arbitrary rules rather than the actual demands of the task ...

http://www.arclanguage.com/item?id=2555

Good philosophy I think.

-----

1 point by tel 6413 days ago | link

This is potentially an issue if you open up intrasymbol syntax though. It'd be pathologically dumb, but what happens if I set up - to be an intrasymbol macro?

Solution: perhaps user defined intrasymbol macros should be surrounded by colons (:-:) by convention? Do intrasymbol macros support multiple characters?

-----

5 points by pg 6416 days ago | link | parent | on: Top 10 differences between Scheme and Arc

Off the top of my head, another big one is that Arc has a more library functions. Individual Scheme implementations tend to, but the Scheme standard is pretty small.

There's also deftem.

-----

5 points by shiro 6416 days ago | link

Not anymore with R6RS---it has over 650 functions. Besides, I tend to think SRFIs as a part of 'modern' Scheme, as some of them are quite essential for day-to-day programming. (Although the popularity varies a lot---cf. http://practical-scheme.net/wiliki/schemexref.cgi?SRFI )

-----

4 points by pg 6416 days ago | link | parent | on: Confusing Macro Error

The problem may be the space after the @.

-----

5 points by cadaver 6416 days ago | link

The '(frst . rest)' signals an error before compilation reaches the ,@.

The problem is, I think, that ac-qq1 doesn't expect to encounter an improper list. So, with arc1 you can't use a dot in a quasiquote to denote an improper list.

However, as vsingh pointed out, an unescaped cons operation will get you an improper list in a quasiquote where a dot doesn't.

This seems like a bug indeed, and it is easy to fix, simply replace this in ac-qq1:

  ((pair? x)
   (map (lambda (x) (ac-qq1 level x env)) x)))
with this:

  ((pair? x)
   (cons (ac-qq1 level (car x) env) (ac-qq1 level (cdr x) env)))

-----

1 point by mec 6416 days ago | link

Very nice fix, with that I can finally do

  (define (read-square-brackets ch port src line col pos)
    `(fn (_ . __)
       ,(read/recursive port #\[ #f)))

-----

2 points by mec 6416 days ago | link

The space was a typo when writing the post, not in the code.

-----

6 points by pg 6417 days ago | link | parent | on: Possible bug in using + for lists

Yes, that looks like a bug.

-----

6 points by pg 6415 days ago | link

Just fixed it. Will go out in next release (soon).

-----

More