Arc Forumnew | comments | leaders | submitlogin
2 points by akkartik 4382 days ago | link | parent | on: Awesome Python

We hear about the odd person using it when they come here to ask questions or report bugs (e.g. http://arclanguage.org/item?id=18580). Often we can't tell what they're up to, but the most common impetus seems to be to build a HN-like community for their own interests, such as http://arclanguage.org/item?id=18620, or http://arclanguage.org/item?id=17325.

Googling around, I found it quite easy to find a HN clone called http://firespotting.com at https://github.com/mmccaff/PlacesToPostYourStartup. Another location: http://www.quora.com/Hacker-News/Whats-the-best-way-to-creat.... There's other stacks now to create clones, but many clones still use arc.

The biggest install I know of is http://hubski.com. Perhaps we should keep a list somewhere. But really what we seem to care about here is thinking about alternative stacks. That and helping beginners to programming in general or arc in particular :)

2 points by S4M 4382 days ago | link | parent | on: Awesome Python

Actually, is Arc used anywhere except for this forum and HN?

There is more about it on the wikipedia page: http://en.wikipedia.org/wiki/CGOL

Writing a self-hosted compiler feels a bit like climbing a skyscraper without a safety belt. I usually test each change by immediately having the compiler recompile itself a few times. Back when it was unstable, each time felt like a plunge from a mountaintop, with a jolt of adrenaline. I guess it still does. :D

I meant implementing a language in itself.

(Also, I didn't implement anarki. That's more like a maintenance job..)


If you mean the experience of implementing a language, what about wart and anarki? Or did you mean something else.

Oh that's too bad. I'm intensely curious about the experience and it's very poorly covered in most places. Guess I'll just have to try it for myself :)

I haven't looked in depth yet, but in general I'm a big fan of superficially/locally ugly solutions :)

I’m not much of a Lisper, so it would be interesting to hear what experienced people would say about the language. Am I stupid? Did I get something horribly wrong? The idea was to bring Lisp (Arc) paradigms but use native JavaScript data structures, where you don’t have symbols, nil, and so on. The resulting side effects is things like quoting stringifying atoms for macros, hash tables not being lists (there are no keyword elements in JS), and so on. I would actually love to hear I got something wrong; the language is still early enough to make breaking changes.

I wrote the original compiler in CoffeeScript, then gradually reimplemented its parts in jisp, concurrently fixing bugs and adding features to the remaining coffee parts. The hardest part to replace was the jisp.coffee to jisp.jisp; at that point I had to stop and rearchitect some parts of the old compiler and implement macros in it to write the new one in a relatively sane way. Using a higher-level JavaScript dialect helped in several ways: it allowed to write less code, challenged me to immediately implement those higher-level features, and helped with understanding and debugging JavaScript (which would have been harder if I wrote in a non-JS language).

Didn’t want to publish an unfinished compiler, so there’s no coffee in the repo history. I don’t actually even have a git history before 0.0.1.

Took three weeks from concept to publish. May have been faster or better if I borrowed technical concepts from other implementations, but I wanted the compiler to be completely original. For instance, it converts jisp code into native JavaScript data structures rather than token trees. Not sure how other similar dialects handle this.


How did you bootstrap this repo? I'd love to hear more details, or pointers to specific commits in the history.

What a shame on me for not testing properly. I think I've fixed the layout now. Check it out again. :)

I get the same problem in Chrome 35, but the site's just fine in Firefox 30.0. I'm using Android 4.0.4.

I'm on ubuntu linux and saw the problem in both firefox and chrome.

Thanks for noting. It works fine in my browsers; what's yours?

Indeed, this looks great!

One problem I'm having is in reading that page: http://i.imgur.com/6i5399E.png


Just thought this community might appreciate.
1 point by akkartik 4385 days ago | link | parent | on: Awesome Python

You should build it! It'll be a lot shorter :)
2 points by svetlyak40wt 4386 days ago | link | parent | on: Awesome Python

Hey guys (and probably girls, if there are some :))!

I think, we need something like this but for Arc. Awesome Arc page with categorized libraries.

2 points by akkartik 4388 days ago | link | parent | on: Bug in cut

Yeah. BTW, the command for viewing a commit is 'git show'. In this case:

  $ git show b683a84a68
2 points by rocketnia 4388 days ago | link | parent | on: Bug in cut

They have a raw view for files, but I haven't seen one for diffs.
1 point by akkartik 4388 days ago | link | parent | on: Bug in cut

"Don't bother trying to copy and paste a diff from GitHub though. I think you'd have better luck at a command line, even if it means learning several commands. (I'm not sure I know all the right commands myself though. >.> )"

True. I coulda sworn github had a raw view. Was that just for snapshots?

2 points by rocketnia 4388 days ago | link | parent | on: Bug in cut

If you're going to resort to patches to manage code as text, that's what source control systems like Git are good for. They also manage the emergent complexities with this approach:

- They help highlight one version of the code as the canonical one that most people are expected to be using. That way development effort isn't wasted on out-of-date code combinations that nobody cares about.

- They provide ways to merge textual changes, revert them, and otherwise apply them out of order.

What you have in mind might be a coherent alternative to the existing version control systems, so I'm not just saying to give up. :)

---

"Is there a way to get a diff?"

Git makes it easy to create diffs (using the "git diff" command with various arguments), and GitHub makes it particularly easy to view certain kinds diffs on the Web. In GitHub, if you're on the stable branch and you click the "commits" button you get to this page:

https://github.com/arclanguage/anarki/commits/stable

Clicking each commit message will take you to a page that shows the diff for that commit. For instance, here's the mutable pair bug fix:

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

Don't bother trying to copy and paste a diff from GitHub though. I think you'd have better luck at a command line, even if it means learning several commands. (I'm not sure I know all the right commands myself though. >.> )

---

"If it's Arc 3.1 why is it named Anarki?"

There are a lot of ways to answer that question. If someone wants to make a contribution to Arc so that every other Arc user can benefit, that's what Anarki is for. However, not everyone uses Anarki, so the fantasy is that it's Arc, but the reality is that it's a specific project that we refer to by a specific name.

I'm not actually sure why that branch of Anarki exists, but it looks like it was created to support plain Arc 3.1 coding without all the extensions people made to the master branch. Its differences mostly have to do with adding text editor extensions and shell commands to support Arc 3.1 programs.

3 points by akkartik 4388 days ago | link | parent | on: Bug in cut

You know, you don't have to switch to the entire 'stable' branch. Just apply the patch linked to in my last comment. It doesn't rely on anything outside arc3.1.

Anarki has multiple branches: http://i.imgur.com/WefAVGX.png. Notice the branches 'official' and 'stable'. 'Official' is just the various releases of arc, and 'stable' is releases + small bugfixes. To see what's changed in 'stable' since arc3.1, look at the list of commits: https://github.com/arclanguage/anarki/commits/stable. There's only 15 commits or so on that page after the arc3.1 release, and you can click on them to see what was changed. Scanning the list, really there's no other important bugfixes.

I keep a directory called arc3.1 by doing:

  $ git clone http://github.com/arclanguage/anarki arc3.1
  $ cd arc3.1
  $ git branch -a  # list all branches
  $ git checkout stable
I can then see the same list of commits by typing 'git log'. Or generate diffs by typing:

  $ git diff remotes/origin/official
This is enough information for you to create and manage a repo just how you described. I have a slightly different itch, so I have a different approach: http://github.com/akkartik/arc. Back before me, a user called aw created a new approach as well: http://awwx.ws/hackinator, which I doubt is actively maintained. You should create one too and show us. If it's substantially better we'll switch to it. Over time.

I'm sure everything could be much better. (I'm trying to create a new way to organize programs, after all: http://akkartik.name/about.) But no matter how you organize programs, people would still need to know about some baseline tools, like diff and patch and scripts in your description above. For anarki you need to learn some git at the moment.

2 points by lark 4388 days ago | link | parent | on: Bug in cut

Thank you for tracking down and pointing out the mutable pairs issue.

I wish there was a version of Arc that made it clear what was changed in it, and made it easy to not apply some changes. A version that consisted only of:

- the original, untouched, Arc 3.1 -- however broken it might be.

- a single Arc file called fixes.arc that contains all fixes needed as redefinitions (say, the bugfix for cut). This is different than modifying the originals; you always know what was modified.

- a collection of .patch files, to patch what can't be provided in fixes.arc (like ac.scm)

- a script called arc.sh that (a) deletes all patched files, (b) creates new copies of the original files (untouched), (c) patches them, (d) starts Arc.

About the github commit link, I don't understand what's going on with it:

- I don't know what kind of branch this is -- is this Arc 3.1 or Anarki? I want to keep using Arc 3.1.

- If it's Arc 3.1 why is it named Anarki?

- Is there a way to get a diff? If not, how do I extract this branch and then get a diff (do I need a different link, and if so which one?) Is there a way to not use git?

(Couldn't this be easier? Why is there so much work involved? I think I want a new way to organize programs.)

2 points by zck 4390 days ago | link | parent | on: New format

It's caused by the CSS for the forum 404ing. It should be located at: http://ycombinator.com/news.css ^1. I assume it's because of the new YC site: http://blog.ycombinator.com/new-y-combinator-website . HN now uses the CSS file https://news.ycombinator.com/news.css. It looks like images were also moved (e.g., http://www.ycombinator.com/images/grayarrow.gif, http://ycombinator.com/arc/arc.png)

[1] The CSS file for the Arc Forum is oddly named, at ycombinator.com/news.css -- but that looks like that's not new with the YC site redesign: http://web.archive.org/web/20140114040405/http://arclanguage... uses the same CSS file. I guessed there was a separate CSS file for AF vs HN, but that appears to not be the case -- the differences in style (e.g. the color of the top bar being #ffbb33 here vs #ff6600 at HN) are in the HTML source itself.

EDIT: It's now fixed, less than an hour after I posted this. Yay!

2 points by akkartik 4390 days ago | link | parent | on: Bug in cut

Ah, you're using arc 3.1 without the mutable-pair bugfix: http://arclanguage.org/item?id=18070. Anything can happen after a race condition. Hold on, let me patch that bug to the stable branch so you can pick it up.

Edit 1 hour later: Done, https://github.com/arclanguage/anarki/commit/b683a84a68. lark, can you start using this stable branch? Should be a lot less disruptive than migrating to anarki, and will also help us better help you.

2 points by lark 4392 days ago | link | parent | on: Bug in cut

I'm using Arc 3.1.

I should have investigated this bug further when it happened.


I've cleaned up the messiness and duplication. The hoary as.scm is now boot.scm, and it's going to mess up all our 'racket -f as.scm' muscle memory. The top level script is now arc rather than arc.sh. Let me know if you were relying on its ability to run several arc files at the commandline. Or just revert my change :)

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


Great. We still needed some way to pass args to arc, so my changes aren't totally useless.
More