Arc Forumnew | comments | leaders | submit | nex3's commentslogin
7 points by nex3 6659 days ago | link | parent | on: We Have Docstrings

Actually, yes, this would be quite easy. I've just pushed it.

-----


RSS/Atom feeds for the Git Anarki are also available: http://git.nex-3.com/arc-wiki.git.

-----

3 points by nex3 6659 days ago | link | parent | on: Missing filesystem functions

I've added slightly modified versions of these to the Anarkies.

-----

2 points by nex3 6659 days ago | link | parent | on: Markdown improvements

I've added this to the Git and Subversion Anarkies. Very cool.

Also, there is regular expression support, if you're using the Anarki code.

-----

2 points by nex3 6659 days ago | link | parent | on: This is probably a really bad idea.

Revisions 18 through 27 are merging in the Git repo changes.

-----

2 points by ambition 6659 days ago | link

Awesome!

-----

6 points by nex3 6660 days ago | link | parent | on: Arc Repo

In the spirit of http://www.arclanguage.org/item?id=803, I've also created an anonymously-writable "wiki" repo at git://nex-3.com/arc-wiki.git.

  $ git clone git://nex-3.com/arc-wiki.git
  $ cd arc-wiki
  ... edit stuff ...
  $ git push

-----

1 point by greatness 6657 days ago | link

Excellent, could we get some sort of separate forum to talk about this project though to discuss bugs, recent patches, etc.. I noticed you have a module system up now, but I can't get it to work:

  arc> (impas blah spec)
  #3(tagged mac #<procedure>)
  arc> (blah:do2 nil nil nil)
  Error: "reference to undefined identifier: _blah"
And I'm not sure why it doesn't work, but I also have an Idea for a more general impas function:

  (mac impas mods 
    (do (map [apply importmodule _] (pair mods)) 
          nil))
(keep in mind this is entirely theoretical, I couldn't physically test it because the other impas didn't work.)

-----

1 point by randallsquared 6657 days ago | link

The import.arc stuff is a sketch. One of it's many shortcomings is that if you define a function blah and then use it from inside the same module/file, it won't be able to find blah, because it's been silently renamed |modulename blah| .

The problem you're having seems to be different, though.

After looking, I realize that my testing process was masking a bug where I didn't change some symbol dereference. It's fixed now on my machine, but I'm new to git, and not sure what I need to do to make it show up in the repository. I did git push, but that doesn't seem to have made it appear in the commit list.

EDIT: okay, nex3 helpfully explained things to me, so this fix is in the arc-wiki repo now. It still doesn't change use points, though, as mentioned above.

-----

1 point by randallsquared 6657 days ago | link

Replying to myself because it seems as good a place as any...

We could walk the tree of a module and patch up any symbols we find that were referenced in a def or mac, but that's not a clean solution, since it can't find all actual calls (something could be building up names, for example, which we'd never find by walking the tree).

What this means is that any module system built right now, as far as I can tell, will have to require support from those writing the modules, but since renaming modules is implicit in how import.arc works at the moment, there's no way to know what the call should look like, for the module programmer. I can't see any way around this except to change Arc itself to make function and macro definitions respect lexical boundaries, rather than all being bound at the top level. Until that change is made, all we can do is fake a module system.

-----

1 point by randallsquared 6657 days ago | link

My own thought was that we'd have an

    (impfrom modulename name1 name2 ...) 
such that only those names would be imported, like Python's

    from modulename import name1
and that then impas would be extended to take given names as well, like

    (impas newname modulename name1 name2 ...)
However, I don't feel strongly about it either way.

-----

1 point by nex3 6657 days ago | link

I think this forum is as good as any for now.

-----

2 points by bootload 6660 days ago | link

"... The idea isn't to have a single standard repository, of course. It's to take advantage of the purpose of distributed revision-control systems - to provide a standard way of publishing and exchanging patches. ..."

Hey nex3 that is such a neat solution, using git is smart.

-----

2 points by akkartik 6660 days ago | link

The svn and git are actually separate wiki repos, right? Do patches flow between them?

-----

2 points by nex3 6659 days ago | link

They are separate repos, but I have a git-svn mirror on my local machine from which I've been periodically pulling in any changes to the Subversion wiki and push them to the git wiki. Anyone else is, of course, welcome to do the same.

-----

2 points by akkartik 6659 days ago | link

Cool, so patches flow one way and could in principle flow both ways.

Hold on though, will this scale, or will the cost of merging patches from svn become prohibitive? People would in principle be pushing on both the git and svn sides.

-----

2 points by nex3 6659 days ago | link

Patches are currently flowing both ways as people commit to both repositories.

Git has excellent merging tools, including a way to step through the history of both the Subversion and Git sides, applying patches automatically when possible and asking the user for manual assistance when there's an ambiguity. Even if the repositories get horribly out-of-sync, which I'll try to make sure they won't, it'll only take a moderate amount of effort to get them back to a stable state.

-----

3 points by ambition 6657 days ago | link

I put a note in the subversion repository to this effect --- unless there are any complaints, I'm going to take the code out of the SVN repository and leave only a note. There's no point in spending any time merging back and forth.

For now, anyone who is interested in Arc is smart enough to figure out git.

-----

1 point by pau 6660 days ago | link

Also excellent! I'm following it through RSS...

-----

1 point by akkartik 6660 days ago | link

Whoa, how'd ya do that?

-----

3 points by nex3 6659 days ago | link

http://git.nex-3.com/?p=arc-wiki.git;a=summary has both Atom and RSS feeds.

-----

1 point by akkartik 6659 days ago | link

Oh, so in general there's a mapping from git://hostname to git.hostname? I didn't know that.

-----

2 points by nex3 6659 days ago | link

I'm not sure how general it is... just how I chose to set up my server.

Edit: Speaking of nice URLs, you can now get at the browser through http://git.nex-3.com/arc-wiki.git.

-----

4 points by nex3 6660 days ago | link | parent | on: This is probably a really bad idea.

I had a similar idea (http://arclanguage.org/item?id=809), although without the particular innovation of granting anyone commit rights.

I like the idea of using a distributed revision-control system more than a client-server one like Subversion, so people can make their own personal commits and push around patches to each other at will. I think to some extent it mitigates the need to give everyone commit rights since everyone's on an equal footing.

That said, I think it's still a cool experiment. I'd just like to see the repository in a format that can get patches from the git network (that is, granted, only composed of me at the moment).

-----

4 points by ambition 6660 days ago | link

I like git. I thought doing exactly what you did. I went with subversion because it was simpler (I know svn better than I know git) and because it makes the Wikipedia analogy work.

Let's see what happens, shall we?

-----

4 points by nex3 6660 days ago | link

Okay, sounds good. I'll set up a wiki branch of my git repo mirroring it.

I was going to ask you to reorganize the directories so that they'd work better for mirroring, but then I realized it was a wiki, and did it myself. I hope you don't mind.

Update: There now exists git://nex-3.com/arc-wiki.git, with anonymous push access.

  $ git clone git://nex-3.com/arc-wiki.git
  $ cd arc-wiki
  ... edit stuff ...
  $ git push
You don't even need a fake username-password :). It has all the patches in the Subversion wiki as of this writing, and it's based on my existing git repo, so patches can easily be sent back and forth.

-----


What I would really like to see is user-programmable in-symbol operators. Then you could trivially implement the pipe:

  (def-inop | (f1 f2) f2:f1)
You could probably even implement a simple module system without any core code using that.

-----

1 point by etal 6660 days ago | link

Sounds good to me. But we'd have to keep a complete list of which characters can be used that way, or else the parser wouldn't know where to slice the tokens, right? Or can you think of a general way to do it?

This topic really makes me wish I knew a function-level programming language like K. It's all about composing a certain set of basic functions, and it's amazingly concise, so I feel like someone with that background would be able to suggest a Right Way of handling functions at this level.

-----

1 point by cpfr 6660 days ago | link

You could just set aside a handful of symbols. Every possible combination of them is a possible infix operator.

-----

1 point by ryantmulligan 6660 days ago | link

Is the way to implement def-inop a reader macro?

-----

2 points by nex3 6661 days ago | link | parent | on: I hereby propose...

I like it. The only problem is that the phonetic "arc" isn't there, but that's not necessarily a requirement.

-----

2 points by kennytilton 6661 days ago | link

Archetyper? Archetypist? Arconaut? Great, now I'll be up all night. :)

-----

3 points by Xichekolas 6661 days ago | link

I like Architect... let PG be the Archangel.

-----


Ruby does it the other way:

  > "hello"[-3..-1]
  "llo"
However, given that we can do something like

  > (subseq "hello" -4)
  "ello"
if we want to take the last n characters, doing zero-based reverse indexing might make more sense.

-----

More