Arc Forumnew | comments | leaders | submit | ncommentslogin
121.
2 points by jackcouch 4159 days ago | link | parent | on: Interested in being an Arc tutor?

Actually I live in the SF area (eastbay) so if it is helpful to be in person I can do that too. I'm flexible.
122.
2 points by jackcouch 4159 days ago | link | parent | on: Interested in being an Arc tutor?

Video (Google hangouts?) when needed, but most of the time (once I'm up and running especially) email will probably be fine.
123.
2 points by Benben 4161 days ago | link | parent | on: Executing files in windows

i got the syntax wrong, now it works. thanks
124.
2 points by jb 4217 days ago | link | parent | on: New logo

Hmm, some interesting reads.

These docs (https://arclanguage.github.io/ref/) are the ones I was talking about. I haven't read much, but there's no mention of parentheses anywhere. Also, there are symbols in circles to the left of concepts, e.g. F ! ? M, but no explanation of what they mean.

Generally, the docs seem rather terse to me; there's a lot of stuff that only makes sense now, after reading (http://aphyr.com/posts/301). "Clojure from the ground up" does start slowly, but by the end of Chapter 4, I really understood the idea of recursion and representing code as a tree, something that I don't think I could have got from the Arc docs.

125.
2 points by jb 4218 days ago | link | parent | on: New logo

Re #2 and #3: I think Clojure also puts a heavy emphasis on closures, first-class functions, and recursion (although it seems you have to jump through a hoop to get TCO working (Java and JavaScript don't support TCO (yet))).

Arc may be more minimal and have simpler macros, but I think it'll take me a lot less time to actually start making things with Clojure because there are more resources available for learning it, and it has good support for making web apps (good libraries, good compiler to JavaScript). The Arc docs seem to be good, but targeted more at people who are already familiar with Lisp.

I tend to learn best by creating things, and seeing as I already know HTML and CSS, a language that would allow me to dive right in by creating web apps would be great.

There's also the fact that if someone asked me why I chose Arc over any other Lisp, I wouldn't really know what to say. I like the sound of your philosophy, but at the moment I don't really have the knowledge to understand how Arc is different from other Lisps (other than by being very minimal).

Maybe once I've got some practical experience and a good grasp of the basic concepts behind Lisp and macros, I might start learning Arc, and be able to appreciate it for what it is.

126.
2 points by jb 4219 days ago | link | parent | on: New logo

Thanks! I don't really have any concrete questions, but any advice on learning Lisp would be welcome. Maybe I should learn Scheme and read SICP before learning Clojure? Maybe I should forget Lisp altogether until I have more experience with programming in general? I get the feeling Arc is not the best place to start learning Lisp.
127.

I did have a short look at the tutorial, but I had a bit of a hard time diffing it mentally, as I am still fairly new to Lisp. But I will definitely point him in that direction if he is interested in having more than a cursory glance.

Also, are most "Arcers" using Anarki?

128.

What would I pass as the arg for parent and whence?
129.

I saw this yesterday and got pretty excited. A while back, I stumbled across the same source of inspiration: http://www.lwh.jp/lisp/index.html

Being mainly a CL hacker who came from Python, Arc has looked interesting to me for a while, but I couldn't justify running a small language on a HUGE backend like Racket... So I started implementing the environment described at the link above, which you did as well. Incorporating my initial work with quite a bit of yours, I spent 24 hours hacking together something similar. I haven't done nearly enough to it yet, but I added some new types and support routines. The code layout is slightly reminisce of Quake code. Take a look if you're interested: https://github.com/camden-smallwood/arc

130.

Thank you.
131.
2 points by kraks 4369 days ago | link | parent | on: A tiny lisp interpreter in JS

Thanks to your advices. The runtime is based on Node.js, so there is no tail recursion elimination, I'm finding a method to transform recursion code to iteration code automatically, do you have some advice?
132.
2 points by jaujau 4388 days ago | link | parent | on: Idea about lisp syntax.

In tcl the syntax is build from strings and in tclisp the syntax is build from symbols and cons cells. tclisp could have a better syntax checking and real macros.
133.

and what type of the database does arc use? and How can I prevent SQL-injection in arc?
134.

what does main.arc do and news.arc do?
135.

btw,where an i change the logo and copyright?
136.

done.thx ..u really rock!bro!can i know ur name or google+?
137.

thx.but how to arc>? i stop the app ,cd arc, echo “admin” > arc/admins,,,arc> (load-userinfo) ,,,,and arc> (load "lib/news.arc"),,,rhc app-start news...what wrong?still cant find admins privilege in my page.
138.

i set it up http://xmeetu.tk welcome to visit!

but i try to echo “admin” > arc/admins ,and admin looks doesn't like admin...i cant delete other's post...

139.

thank you very much.so i dicide to build a new site follow ur instructions. here's what i got...

  arc> (thread:load "../../repo/main.arc")
  #<thread>
  arc> rm: cannot remove"arc/news/story/*.tmp": No such file or directory load items;
  load items: 
  ranking stories.
  ready to serve port (127.10.233.1 8080)
  tcp-write: error writing
    system error: Broken pipe; errno=32
    context...:
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/arc/ac.scm:945:0: printwith
      map1
      map1
      pr
      handle-request-thread
      handle-request-thread
  tcp-write: error writing
    system error: Broken pipe; errno=32
    context...:
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/racket-6.0.1/collects/racket/private/map.rkt:26:19: loop
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/arc/ac.scm:1479:0: ar-close
      handle-request-thread
  tcp-write: error writing
    system error: Broken pipe; errno=32
    context...:
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/racket-6.0.1/collects/racket/private/map.rkt:26:19: loop
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/arc/ac.scm:1479:0: ar-close
      th1
  tcp-write: error writing
    system error: Broken pipe; errno=32
    context...:
     /var/lib/openshift/5375a15d5973ca41a30002b1/app-root/data/arc/ac.scm:945:0: printwith
      map1
      map1
      pr
      handle-request-thread
      handle-request-thread
  tcp-write: error writing
    system error: Broken pipe; errno=32
    context...:
*----------------

that's what i got while i sign and submit.and when i closed the terminal the site shutdown too...503...

------that's what i do after followed by ur 8 step instructions in http://new-tvvocold.rhcloud.com/...and when i try my way in http://news-tvvocold.rhcloud.com,by use

  ##git remote add upstream -m master git://github.com/shader/arc-openshift.git
  ##git pull -s recursive -X theirs upstream master
i got it done....and i check ur and my site find that both of us cant submit a simple url like(www.google.com but http://google.com works) with a title ,but only can submit a textwith a title...that's a new problem...if u could tell me what is the right step after the 8step as ur instructions as well.that will be great!---best wishes!
140.

thx,bro,u really rock...so i rebuild a new site http://news-tvvocold.rhcloud.com and i can sign up and login in...but i can't submit still...why that? follew ur instructions i cant push (stuck at 5th step)so i use this

  ##git remote add upstream -m master git://github.com/shader/arc-openshift.git
  ##git pull -s recursive -X theirs upstream master
Am i doing it wrong or miss something?

when i try

  arc> (nsv)
  rm: cannot remove"arc/news/story/*.tmp": No such file or directory
  load items: 
  ranking stories.
  tcp-listen: listen failed
    port number: 8080
    system error: Permission denied; errno=13
    context...:
     zz
     /var/lib/openshift/53755de6500446c100000b1a/app-root/data/arc/ac.scm:1227:4
and i repeat again :arc> (nsv) rm: cannot remove"arc/news/story/.tmp": No such file or directory load items: ranking stories. user break context...: /var/lib/openshift/53755de6500446c100000b1a/app-root/data/arc/ac.scm:1084:20 recur recur user break context...: /var/lib/openshift/53755de6500446c100000b1a/app-root/data/arc/ac.scm:1084:20 recur recur tcp-listen: listen failed port number: 8080 system error: Permission denied; errno=13 context...: zz /var/lib/openshift/53755de6500446c100000b1a/app-root/data/arc/ac.scm:1227:4

if u update the full instructions that will be great and grateful,,,thx very much! (add this will be helpful

  ##export PATH=$PATH:/var/lib/openshift//app-root/data/racket-6.0.1/bin:$PATH
)
141.

just fix it by set the env....so i run the bash,,,and now i still cant sign up or login...why?miss something like sql?
142.

thx,bro

as ur step.i successed.my site is :http://diy-tvvocold.rhcloud.com/news

but i cant sign up..why?

i try bash :

  ./arc.sh
  ./arc.sh: line 17: type: rlwrap: not found
  ./arc.sh: line 21: racket: command not found
what is wrong,and how to fix?

best wishes!

143.

Thank you for the reply and a warm welcome) I thought it was a chair because of the images on wikipedia page and here http://www.paulgraham.com/arc.html

I got interested in Arc after reading "Hackers & Painters", can't tell anything about my impressions because I don't know much about the language yet, I've discovered it only recently. I'll definitely learn more about it and then I will have something to say)

144.
2 points by chp 4445 days ago | link | parent | on: Anarki clone problem

Thank you. Had the same issue. This works.
145.
2 points by ema 4450 days ago | link | parent | on: Jasper: compile to js lisp inspired by arc

I think escodegen is interesting when one wants to have source maps.
146.
4 points by ema 4452 days ago | link | parent | on: Jasper: compile to js lisp inspired by arc

"Once you or I have a self-hosted compiler, if it can compile to a platform, it can also run on that platform."

In theory yes, but it wouldn't be a good idea for jasper because it is a relatively thin layer on top of javaScript. So a backend for a different platform would have to emulate a lot of JS quirks, which would be complicated and produce slow code.

So if you want to make a cross platform language, it should be a thicker layer on the first platform from the beginning.

"Nevertheless, I think I'm still headed in that direction."

Always make backups of your compiler binaries or don't overwrite old compiler binaries so in case of a bug you don't end up with only one, broken, compiler binary.

147.
4 points by ema 4452 days ago | link | parent | on: Jasper: compile to js lisp inspired by arc

I've made a web repl, http://ema-fox.github.io/jasper/ now you can try out jasper without leaving your browser.
148.
2 points by Shogo_Miyagi 4452 days ago | link | parent | on: PG is going to work on arc

wow
149.
2 points by ema 4452 days ago | link | parent | on: Jasper: compile to js lisp inspired by arc

I actually worried that it wasn't painless enough, and that I should have waited for the web repl to be done before submitting.

These long strings contain the compiled macros. They are only there for debugging. They belong in comments instead of strings, but I didn't think of it at that time.

150.
5 points by ema 4452 days ago | link | parent | on: Jasper: compile to js lisp inspired by arc

I'll try.

Motivation: I want to have a lisp which, runs in the browser, interops easily with existing javaScript libraries, and is reasonably fast. clojureScript sort of is this, but its macros are kind of a kludge (clojureScript macros are written in clojure and have to be in a seperate file from the rest of the code, also hygienic only), interop isn't seamless, and I don't want to start a jvm every time I want to compile some code. A straight arc to javaScript compiler would have to be really smart to produce fast code, and interop wouldn't be seamless either. So I decided to try writing my own language.

Implementation: Since macros can call functions which were defined in the same file, the functions needed to be evaluated right after being compiled. So I couldn't just do a simple "jasper code in, javaScript code out" compiler in haskell. So there is a self hosted[1] compiler/repl.

Current status: It is already sort of usable, but I wouldn't recommend anyone else to use it for anything beyond throw away tinkering, because I still might decide to make big changes to the semantics.

Not sure if that are the things you wanted explained.

[1] Self hosted compilers are a pain in the behind, one has to mentally switch between the language version the compiler is written in and the language version the compiler is compiling and when you break you compiler you can't use it to compile the fixed version.

More