Arc Forumnew | comments | leaders | submitlogin

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 28 days ago | link | parent | on: Best Online Food Ordering Script

How does this apply to arc?
3 points by akkartik 55 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 57 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 57 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 58 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!

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/

3 points by akkartik 126 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Ah, you're right. Looks great now!
4 points by zck 126 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Yes, it's a desired feature that a suite can't contain two things with the same name -- either suites, tests, or one suite and one test. This is because I want names to be unique. Saying (test cut.finds-element-in-suite) shuld run only one test.

What you ran into is actually a bug I fixed at a meetup on Tuesday. The current error message is:

  Error: "In suite cut, there are two things named finds-element-in-string."
The commit is here: https://bitbucket.org/zck/unit-test.arc/commits/bb41b4183938.... Can you re-pull (hg pull; hg update) and see if it works then? The most recent commit is 96652e5.
4 points by akkartik 126 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

I've updated my script to auto-upgrade Anarki tests[1], and things look pretty good. Just a couple of minor comments:

a) I see a message about redefining assert. Perhaps we should change the name in Anarki or unit-test.arc?

b) The new version complains about duplicate nested suite names inside a test suite. That seems like a reasonable idea, and I just want to confirm that it's intended.

c) If you have a duplicate test name in a suite the error is confusing. Here's the example I ran into from Anarki:

  $ cat x.arc
  (load "unit-test.arc/unit-test.arc")

  (suite cut
    (test finds-element-in-string
      (assert-same '(3 4 5) (cut '(1 2 3 4 5) 2)))
    (test finds-element-in-string        ; duplicate name
      (assert-same "cde" (cut "abcde" 2)))
  )

  (test)

  $ ./arc.sh x.arc
  Can't coerce  #<procedure: cut> string
    context...:
     anarki/ac.scm:1015:0: ar-coerce
      map1
      map1
      string
     anarki/ac.scm:1279:0: aload1
Once you switch to unique names everything works fine. But perhaps we can improve the error message?

[1] I'll post the final script here once we "launch".


I just want to point out a conversation I had with fauria on GitHub, in case others here have ideas. Currently the HN code doesn't support keeping the HN data (.../anarki/www) on a separate partition from the code (.../anarki) as Docker would like to do to maintain stateless containers. This is because any file creation which performs a create-then-rename first creates the temporary file in .../anarki/tmp. Renames then fail if .../anarki/www is in a different volume.

I'm not sure what the cleanest fix is here.

https://github.com/arclanguage/anarki/issues/59#issuecomment...

3 points by zck 129 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Yeah, that was right. Thanks for catching the readme changes -- I guess I had made some but not all.
3 points by akkartik 130 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Hmm, strangely I just sent you a pull request to update the Readme. I'm not too familiar with Mercurial or Bitbucket; maybe I'm doing something wrong?

https://bitbucket.org/zck/unit-test.arc/pull-requests/2/upda...

I'll play with it today or tomorrow and make sure all of Anarki's tests update correctly.

3 points by zck 130 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Heh, no worries. It's taken me, oh, 202 days to update the dang library (I feel like my macro skills have something to be desired, or it would be easier). So no worries about taking four to see this. I was planning on pinging you in a few days if you hadn't seen this.

A coordinated launch would be cool. I'm pretty much ready here; the readme is updated (although it does not explicitly have a version number, which I should add).

But before we get into that, would you mind playing with it a little bit to see if there's anything broken or not working? Thanks.

3 points by akkartik 130 days ago | link | parent | on: Unit-test.arc 1.0 incoming (part II)

Ooh, cool! Let me brush the bitrot off my automatic migration script to update the Anarki tests. Maybe we can do a coordinated launch :o)

(Sorry I just saw this. My muscle memory has been getting into this bad habit lately where I visit only the /newcomments page and not the /new page.)

3 points by keat 131 days ago | link | parent | on: [Beginner question] New concepts in Arc

You might want to check out Hoon for Urbit. http://urbit.org/docs/hoon/mission/

I'm currently working on it. It's not being that easy though: https://github.com/arclanguage/anarki/issues/59

Hi,

I've reread the article and You are right, the author's intention seems to be getting rid of unnecessary constructs. I guess then that I'm looking for something that Arc is not (powerful abstractions included in the language from the get-go).

Thanks for the answer! Radek

5 points by malisper 137 days ago | link | parent | on: [Beginner question] New concepts in Arc

I don't think there is any one particular feature that is groundbreaking in Arc, although as a whole, Arc does have some interesting qualities. For example, code in Arc is much more succinct than code in other languages. When designing Arc, Graham would write a piece of code. He would then look at that piece of code and figure out what features would allow him to make that piece of code shorter. From there, he would implement that feature and rewrite the code. Due to this process, Arc has a large number of very simple utilities (e.g. check). With all of these utilities, code in Arc is much more concise than the equivalent code in other languages.
5 points by malisper 137 days ago | link | parent | on: [Beginner question] New concepts in Arc

"Hundred Year Language" is a bit of misnomer. Graham's original essay is a thought experiment on what the language we will be using in a hundred years will look like. Graham believed it would be useful to try and implement the language we will be using in a hundred years and in doing so, came up with Arc.
5 points by akkartik 137 days ago | link | parent | on: [Beginner question] New concepts in Arc

Others may disagree here, but I don't think Arc was really intended to contain new concepts. The phrasing of "Hundred Year Language" was I think a nod to timelessness rather than novelty. It was an attempt to take questionable novelties out of Lisp (like hygienic macros) and to clean up ill-thought-out interfaces (the keyword choices you alluded to).

There's a nice description of this project at https://combinatorylogic.wordpress.com/2015/01/14/bootstrapp...
More