Arc Forumnew | comments | leaders | submitlogin
4 points by akkartik 3128 days ago | link | parent | on: 2D syntax in Racket

Oh, this is cute.

Welcome back, conanite! I was coincidentally just thinking about you yesterday when I ran across your bug report at http://arclanguage.org/item?id=10485. Too bad that bug is still open in both Arc 3.1 and Anarki. I think I will try to fix it now that I've spotted it.
2 points by akkartik 3129 days ago | link | parent | on: At-sign in string

And it worked! Nicely done.
3 points by prestonbriggs 3129 days ago | link | parent | on: At-sign in string

Got it, thanks.

I guess the quote idea came from me thinking that the strings were being evaluated. My untrained mind thought "strings evaluate to themselves", but apparently not. So I used the single quote to prevent evaluation.

5 points by akkartik 3129 days ago | link | parent | on: At-sign in string

Congratulations, you've run into at-strings, one of Arc's more awkward features.

Prior discussions: http://arclanguage.org/item?id=10245; http://arclanguage.org/item?id=10485; http://arclanguage.org/item?id=18715

Interesting idea to quote a string. I'd somehow never thought of that!


Well, that's a use case Arc supports and Parendown doesn't. :)

Depending on the example, Parendown can get close:

  (map odd #/map car '#/(1 2) (4 5) (7 9))

I quite like ':' for function composition, especially in situations like this

  (map odd:car '((1 2) (4 5) (7 9)))
where you're composing a new function to pass along as an argument.
4 points by akkartik 3140 days ago | link | parent | on: Anarki is now a Racket #lang

That is great! Welcome back :)
5 points by rocketnia 3140 days ago | link | parent | on: Anarki is now a Racket #lang

I've added Travis CI integration to Anarki, so now there's a badge in the readme which links to the latest unit test results.

I've fixed up news.arc enough for it to work on Windows, although I've only tested basic account creation, posting, and commenting.

Feeling pret-ty productive. It's been like seven years since I've done this much with Arc, but I suppose there's no time like the present. :)

3 points by rocketnia 3141 days ago | link | parent | on: Anarki is now a Racket #lang

Since I was delving into the Arc codebase and my Lathe codebase anyway, I made a bunch of fixes to Anarki, Anarki's stable branch, arc/nu's arc/3.1 language, and Rainbow.js today. It's enough to run a simple check of Lathe's module system on Windows, which meant I fixed a bunch of Windows bugs in particular! My Lathe sanity checks also worked fine on Rainbow, Jarc, ar, and the official Arc 3.1.

I understand, I think. I think it adds regularity, which is a benefit and drawback, like it is with Lisp's parentheses. But I got used to Arc's (a:b c) at a time when I didn't need a strong reason; the fact that someone put it in a language was enough to convince me it was worth a try, and by "try" I mean using it everywhere I could. :)

This Parendown syntax tackles the a lot of the same needs as quotation sugars, right-associative infix operators, multi-branch conditionals, and imperative blocks. Those individualized pleasantries no longer need to exist as much, but some of what was pleasant about them might slip through the cracks and be neglected entirely by the more regulated approach. Lisp's parentheses didn't solve the things this does, and this doesn't solve some things that other syntaxes do (such as left-associative infix operators, perhaps).

Programming this way in Cene for a while, one thing I keep wanting to reintroduce is quotation sugar. But that's probably unrelated; Cene has a more elaborate syntax for quotation to help with programs that involve several nested quotes, and since I only actually use it in shallow cases, it's a bit hard to explain why I've made it so elaborate. :-p A sugar would brush some of that complexity under the rug until it's useful.

4 points by zck 3143 days ago | link | parent | on: Parendown, a syntax like Arc's a:b for Racket

Interesting! My first reaction is that I would very much dislike reading code with this (I've never gotten used to Arc's`(a:b c)` syntax).

But it's cool to cross-pollinate languages!


I developed Parendown over the last couple of days as my first foray into Racket #lang extension.

This is a syntactic feature I've had in the Era languages for a long time, and it has such a drastic effect on the language's appearance that I always feel like I need to go out of my way to explain it. It's just a simple s-expression sugar inspired by Arc's a:b ssyntax, but it's so handy.

3 points by rocketnia 3143 days ago | link | parent | on: Anarki is now a Racket #lang

I almost forgot to add the square bracket reader syntax. :)

https://github.com/arclanguage/anarki/commit/f9548c50ea6e7a9...

3 points by rocketnia 3143 days ago | link | parent | on: Anarki is now a Racket #lang

Here's a link to the commit. As you can see, I've heavily commented the implementation of the Racket macro that implements the module body syntax for #lang anarki modules:

https://github.com/arclanguage/anarki/commit/600ed95adf4e3ec...


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

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

Thanks, akkartik!


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 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.

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.

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.


Seems reasonable to me :)

Not sure how this applies to arc. They are both niche programming languages? They both strive for brevity?
1 point by jsgrahamus 3208 days ago | link | parent | on: Best Online Food Ordering Script

How does this apply to arc?
3 points by akkartik 3235 days ago | link | parent | on: Admin Functions?

Ah, I just remembered seeing various special pages just for admins in news.arc. For example /badsites seems to show sites that have been nuked in the past.

I'm not very familiar with these tools, but scanning https://github.com/arclanguage/anarki/blob/15481f843d/lib/ne... for adop and defopa might provide tantalizing hints.

2 points by akkartik 3236 days ago | link | parent | on: Admin Functions?

There isn't much by way of admin tools. Basically what the admin can do is block content in various ways: http://i.imgur.com/bmQXByS.png. Beyond that you're expected to rely on the Arc commandline, or to manipulate the files created under anarki/www/news.

Regarding putting HN on a server, you may be interested in this recent thread about a Docker image: http://arclanguage.org/item?id=20027.

3 points by gfawkes 3237 days ago | link | parent | on: Admin Functions?

Thanks for your reply akkartik. Yes..I did see what you referred to.... I have created an account using the user name I entered while setting up the software. Opening my admin user account is not the problem. The question I have is where is the admin panel...or how do I administer admin controls? For instance, while being logged in as admin how do I delete a comment? Or a thread? Look at a list of users, etc? One more thing now that I have have your attention, if I may. Do you know of any instructions on how to put anarki HN on my server so anyone can access it? I want to put a forum online for all to use. Thanks again. Guy
3 points by akkartik 3237 days ago | link | parent | on: Admin Functions?

Did you see the instructions on running a HN clone at the bottom of https://github.com/arclanguage/anarki/blob/master/README.mar...? Basically you add a username you want to designate as the admin, then you use HN as that user. Let me know if you have more questions.

A little bit tricky, there were some issues with permissions and shared volumes. If you find any issue just let me know!
4 points by zck 3300 days ago | link | parent | on: Is there a Docker image for running news.arc?

Whoa, that's fantastic. How difficult was it to set up?

Thanks for doing it!


Hi,

I just published the Docker image: https://github.com/fauria/docker-hn

Feel free to send any issues or PRs.

p.s. I'm using this image for KeyDao in a CoreOS droplet: https://keydao.com/

More