Arc Forumnew | comments | leaders | submit | jsgrahamus's commentslogin
3 points by jsgrahamus 3972 days ago | link | parent | on: Interested in being an Arc tutor?

https://news.ycombinator.com/item?id=8906375

-----

1 point by jsgrahamus 3981 days ago | link | parent | on: Modified/updated Semi-Arc for Android

My Android phone gave me a security alert on the apk.

-----

2 points by c-a-smallwood 3981 days ago | link

It's not signed. Feel free to compile it from source :)

-----

2 points by jsgrahamus 3998 days ago | link | parent | on: OT: Contract jobs

I've been contracting for the last few years. Hope to continue.

-----

2 points by jsgrahamus 3998 days ago | link | parent | on: OT: Contract jobs

Thanks.

-----

1 point by jsgrahamus 4004 days ago | link | parent | on: DrRacket(Libs) and Arc

Can anyone refer me to the method of accessing the underlying mzscheme or racket functions?

Thanks, Steve

-----

1 point by akkartik 4004 days ago | link

You mean in Nu? % on Nu is like $ on anarki. Does that answer your question?

-----

3 points by jsgrahamus 4003 days ago | link

I didn't specify. Could you give an example in each of them? Thanks, Steve

-----

2 points by akkartik 4003 days ago | link

To call racket functions in anarki:

  arc> ($.pair? '(1))
  #t
In Nu:

  > (%.pair? '(1))
  #t

-----

2 points by jsgrahamus 4003 days ago | link

Thanks, Akkartik. Is there a way to do such from arc itself?

-----

1 point by akkartik 4003 days ago | link

No, you'll have to add it. The simplest way to do this is probably aw's original hack: http://hacks.catdancer.ws/ac.html

You'll need to add one line to ac.scm, and then:

  arc> (ac-scheme.pair? '(1))
  #t
Feel free to rename ac-scheme to $ or % if you think you'll use it often enough.

If you start using this you'll start finding the need for some of the other functions in that link, which transform data back and forth to the way racket or arc likes it. Come back and ask us more questions when you run into errors like this:

  arc> (ac-scheme.length '(1 2 3))
  Error: "length: contract violation\n  expected: list?\n  given: '(1 2 3 . nil)"

-----

3 points by Pauan 4001 days ago | link

I would just like to point out that Arc/Nu is fully compatible with Arc 3.1, and it doesn't need conversions between Racket and Arc, so it's the easiest way to deal with Racket in Arc programs.

-----

2 points by jsgrahamus 4018 days ago | link | parent | on: Mtl-arc - A new Arc implementation

Problem in building

  cc -o mtl-arc -std=c11 mtl-arc.c
  mtl-arc.c: In function ‘new_sym’:
  mtl-arc.c:46:2: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
    symname(result) = strdup(sym);
    ^
  mtl-arc.c:46:18: warning: assignment makes pointer from integer without a cast [enabled by default]
    symname(result) = strdup(sym);
                    ^
  mtl-arc.c: In function ‘new_string’:
  mtl-arc.c:59:20: warning: assignment makes pointer from integer without a cast [enabled by default]
    stringval(result) = strdup(string);
                      ^
  mtl-arc.c: In function ‘new_builtin’:
  mtl-arc.c:118:15: warning: assignment makes pointer from integer without a cast [enabled by default]
    help(result) = strdup(doc);
                 ^
  mtl-arc.c: In function ‘char_to_token’:
  mtl-arc.c:170:2: warning: return makes pointer from integer without a cast [enabled by default]
    return strdup(cbuf);
    ^
  mtl-arc.c: In function ‘split_string’:
  mtl-arc.c:194:20: warning: assignment makes pointer from integer without a cast [enabled by default]
      *(result + i++) = strdup(token);
                      ^
  mtl-arc.c: In function ‘buf_to_string’:
  mtl-arc.c:212:2: warning: return makes pointer from integer without a cast [enabled by default]
    return strdup(buf);
    ^
  mtl-arc.c: In function ‘read_expr’:
  mtl-arc.c:327:4: warning: passing argument 1 of ‘split_string’ makes pointer from integer without a cast [enabled by default]
      char **nums = split_string(strdup(token), '/');
      ^
  mtl-arc.c:181:8: note: expected ‘char *’ but argument is of type ‘int’
   char **split_string(char *a_str, const char a_delim) {
          ^
  /tmp/ccMru0iN.o: In function `builtin_cos':
  mtl-arc.c:(.text+0x3b0e): undefined reference to `sin'
  /tmp/ccMru0iN.o: In function `builtin_expt':
  mtl-arc.c:(.text+0x3bd2): undefined reference to `pow'
  /tmp/ccMru0iN.o: In function `builtin_log':
  mtl-arc.c:(.text+0x3c53): undefined reference to `log'
  /tmp/ccMru0iN.o: In function `builtin_rand':
  mtl-arc.c:(.text+0x3db2): undefined reference to `floor'
  /tmp/ccMru0iN.o: In function `builtin_sin':
  mtl-arc.c:(.text+0x3e46): undefined reference to `sin'
  /tmp/ccMru0iN.o: In function `builtin_sqrt':
  mtl-arc.c:(.text+0x3ec7): undefined reference to `sqrt'
  /tmp/ccMru0iN.o: In function `builtin_tan':
  mtl-arc.c:(.text+0x3f48): undefined reference to `tan'
  /tmp/ccMru0iN.o: In function `builtin_trunc':
  mtl-arc.c:(.text+0x3fc9): undefined reference to `trunc'
  collect2: error: ld returned 1 exit status
  make: *** [all] Error 1

-----

2 points by c-a-smallwood 4014 days ago | link

I apologize, I must admit I am terrible at creating Makefiles... I'll make fixing it top priority.

Among other things, I recently added a prototype curly-infix reader, which has been kind of fun coding with, because it makes math bearable, and it makes certain things easier to read. Along with variable negation, it seems quite handy.

examples:

(def isa (a b) {type.a is b}) => (def isa (a b) (is (type a) b))

{caar = [car car._]} => (= caar (fn (_) (car (car _))))

{1 + 2 + 3 - 4 - 5} => (- (+ 1 2 3) 4 5)

-----

2 points by c-a-smallwood 4013 days ago | link

It should build now

-----


Brendan?

-----

3 points by malisper 4256 days ago | link

javascript

-----

1 point by jsgrahamus 4348 days ago | link | parent | on: Hacker News Down

Thanks, zck

-----


For a perpetual newbie in Lisp/Scheme/etc, they have been very helpful to me.

-----

1 point by hk_mars 4448 days ago | link

I would also design a hackable lang. in the very-soon future. Now I have to work and live. hayhay... I like Paul. :)

-----

2 points by jsgrahamus 4548 days ago | link | parent | on: What I learned from Icon

Unicon (http://unicon.sourceforge.net/) is the successor to Icon. Both languages had/have good support in terms of experienced people willing to answer questions.

-----

More