Arc Forumnew | comments | leaders | submit | randallsquared's commentslogin
4 points by randallsquared 4408 days ago | link | parent | on: Arc has no return statement?

Scheme's dynamic-wind serves the same purpose as unwind-protect (except with entry conditions as well, since a continuation could suddenly return into your protected code), and plays nicely with continuations. I'm not sure about the details, though.

-----

1 point by jbert 4408 days ago | link

Thanks for that, pretty interesting. I guess that makes writing entry and exit conditions a little more interesting, since they could end up being invoked multiple times.

-----

1 point by randallsquared 4432 days ago | link | parent | on: What was desired for on-err?

Yeah, I think the only scenario that makes sense is that on-err was supposed to do a CL-like restart without any actual condition system.

-----

1 point by randallsquared 4438 days ago | link | parent | on: Musings on Language Design

The only thing that seems to affect, going by comments, is the conversion from characters to integers and vice versa. If that's the only actual problem, there are only about ten places in the Arc code that need some replacement fix.

-----

1 point by randallsquared 4439 days ago | link | parent | on: Arc Repo

So, what's going on with all these "Revert", "Revert 'Revert'", etc?

-----

1 point by randallsquared 4439 days ago | link | parent | on: Is Arc good for big projects?

In case you hadn't noticed, there's a sketch of a module system in the arc-wiki repo that does exactly this, now.

It doesn't solve the problems mentioned in this thread, of course.

-----

1 point by randallsquared 4439 days ago | link | parent | on: Arc Repo

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.

-----


If they choose not to, do they lose the right to claim damages later, as with trademarks?

-----

2 points by randallsquared 4439 days ago | link | parent | on: Arc Repo

Okay, can someone point me at a good tutorial that talks about how we're supposed to commit with git push?

No matter what I do, I can't seem to clear the warnings given by git status:

I've tried the helpfully suggested lines it mentions:

    git reset HEAD import.arc
    git reset HEAD lib/import.arc
    git rm import.arc
    git add lib/import.arc
and git push at various times, and I can't seem to get it to stop warning me about things I need to do, and no matter how many times I git push, nothing seems to change on the web summary. Is there some equivalent of the basic 'svn commit -m "comment" ' that does the trick?

-----

8 points by nex3 4439 days ago | link

Git makes a distinction between your local repository and remote repositories. You have to commit your change to your local repo before you can push it to the remote one. So first you "git commit," then you "git push."

The total workflow goes something like this:

  git clone git://nex-3.com/arc-wiki.git
  emacs lib/import.arc   # Make your edits
  git add lib/import.arc # Schedule lib/import.arc for committing
  git commit             # Commit lib/import.arc to your local repo
  git push               # Push your local changes to the remote repo
The "git add" step is due to a little idiosyncrasy of Git where "commit" doesn't commit any changes you don't explicitly tell it to via "git add." You can also do "git commit -a" to automatically add all changes before you commit.

Also, "git commit" takes the same -m parameter that "svn commit" does.

Finally, the GNU Smalltalk folks have a good intro to Git: http://smalltalk.gnu.org/blog/bonzinip/using-git-without-fee....

-----

1 point by randallsquared 4439 days ago | link

Thank you; that was exactly what I needed. :)

-----

1 point by treeform 4418 days ago | link

i hope pg commits to it too

-----

1 point by randallsquared 4439 days ago | link | parent | on: Arc Repo

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 4439 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 4440 days ago | link | parent | on: how exactly does a:b work?

The colon operator does work on macros, but not, currently, on anonymous functions. I'm not sure if there's a reason for that or if it's just a bug.

Note that you can chain together composed functions, so

    (a:b:c 'works)

-----

1 point by randallsquared 4440 days ago | link

Hrm. Also, (|a:b| ...) works, but shouldn't.

-----

2 points by nostrademons 4438 days ago | link

It's because the ~: syntax is expanded at evaluation time, not at read-time. The Arc compiler looks at each symbol, and if it has one of those characters, it splits on the :, wraps in (compose ...), and adds a (complement ...) form every time the section begins with ~.

-----

More