Arc Forumnew | comments | leaders | submit | jsgrahamus's commentslogin

akkartik was kind enough to provide a spot for the paper on this project:

https://drive.google.com/file/d/0Bwqm_FatZFB3MGFDQVRlNXBNekU

Thanks, akkartik!

-----


I published a paper on my results of using Klong. Would like to share it with this group, but am not sure where to put it so that you all could access it.

-----

3 points by akkartik 3182 days ago | link

Google Drive? You can share a document so anyone with the link can access it.

Another option is Gitlab or Bitbucket. Put the file in a repository (ideally with any of your code for the paper!) and push it.

I can do it for you if you like. Just email the paper to me. (My address is in my profile.)

-----


I work with MUMPS as my work programming language. Assuming you had an array of 10 numbers, to get the sum you would do something like this:

  F I=1:1:10 S ARR(I)=I   ; Stores 1-10 in array ARR
  S SUM=0
  F I=1:1:10 S SUM=SUM+ARR(I)
  W !,SUM                 ; Writes sum
In Klong you would do as follows: arr::1+!10 :" Initializes list arr with values of 1-10" .p(+/arr) :" .p() prints and +/arr sums all elements of the list"

I always thought that MUMPS was terse, but for certain things at least, it doesn't hold a candle to Klong. Of course, I thought Minnesota was green until I saw Wisconsin. And now I live in Washington state.

-----

3 points by jsgrahamus 3184 days ago | link

Fixing the formatting.

I work with MUMPS as my work programming language. Assuming you had an array of 10 numbers, to get the sum you would do something like this:

  F I=1:1:10 S ARR(I)=I   ; Stores 1-10 in array ARR
  S SUM=0
  F I=1:1:10 S SUM=SUM+ARR(I)
  W !,SUM                 ; Writes sum
In Klong you would do as follows:

  arr::1+!10 :" Initializes list arr with values of 1-10"   
  .p(+/arr) :" .p() prints and +/arr sums all elements of the list"
I always thought that MUMPS was terse, but for certain things at least, it doesn't hold a candle to Klong. Of course, I thought Minnesota was green until I saw Wisconsin. And now I live in Washington state.

-----


Not sure how this applies to arc. They are both niche programming languages? They both strive for brevity?

-----

2 points by akkartik 3188 days ago | link

Seems reasonable to me :)

-----

1 point by jsgrahamus 3188 days ago | link | parent | on: Best Online Food Ordering Script

How does this apply to arc?

-----


I started using ansi-term in emacs to launch a shell file which wrapped rlwrap around the file I wished to execute. Turns out that M-x no longer works in that buffer.

-----

6 points by jsgrahamus 3341 days ago | link | parent | on: Hosting Arc app on Heroku?

Heroku allows for custom buildpacks.

Also found this article, which may be helpful:

https://lexi-lambda.github.io/blog/2015/08/22/deploying-rack...

-----

4 points by jsgrahamus 3341 days ago | link | parent | on: Accessing Racket from anarki

Thanks, guys. This is great!`

-----


This works for me in anarki, which is the community edition of arc:

  steve@steve-Satellite-L555D:~/anarki$ cat test.arc
  (prn "hello, world!")
  (quit)

  steve@steve-Satellite-L555D:~/anarki$ ./arc.sh test.arc > test.out

  steve@steve-Satellite-L555D:~/anarki$ cat test.out
  hello, world!

  steve@steve-Satellite-L555D:~/anarki$ 
Not sure how to do pass an file name to arc itself.

-----

4 points by akkartik 3344 days ago | link

You're almost there. To pass in to Arc a filename argument to write to, you'd say this:

  $ cat test.arc
  (tofile (argv 1)
    (prn "hello, world!"))
(The quit is unnecessary since Arc will automatically quit after running all commands in batch mode.)

  $ ./arc.sh test.arc test.out
  $ cat test.out
  hello, world!
argv is a list containing commandline arguments, and tofile redirects prn to some given filename.

-----


Nice article.

Recursion has been one of those things which made my mind bend or expand. I can't imagine what it would normally take for a 12-year old to learn this abstract concept.

What again was your motivation for Mu?

Steve

-----

4 points by akkartik 3348 days ago | link

Finding better ways to write code that let newcomers make sense of them faster. More details: http://akkartik.name/about

The teaching fits into this in two ways:

a) It seems like a more ambitious test. If I can make codebases easier for non-programmers or inexperienced programmers to understand, then experienced ones should hopefully be easy.

b) It's a way to get feedback. It's hard to find experienced programmers willing to try out a strange new way of writing code that isn't going to be useful in real products for a very long time. Without this feedback I'd be likely to burn out long before I can fully validate or invalidate my hypothesis. But at least for me, teaching is extremely rewarding/addictive.

Oh, there's a third way: since I get paid for my teaching, there's the distant possibility that I might be able to scale up the teaching to fund my research so that I can work on it full-time.

-----

3 points by jsgrahamus 3347 days ago | link

Love teaching myself.

BTW, this HN link has some traffic: https://news.ycombinator.com/item?id=12501763

-----

2 points by akkartik 3347 days ago | link

Thanks! I remember seeing it yesterday at 1 point and assuming it was done. Didn't notice when people started upvoting it. Oh well, probably too late now.

-----

More