Arc Forumnew | comments | leaders | submit | i4cu's commentslogin
3 points by i4cu 6 days ago | link | parent | on: With and withs

The reason why there's an 's' on 'withs' is that it's short for "with sequentially". Comparatively 'with' doesn't evaluate the bindings sequentially. So, for example, your 'val 0' is probably not being bound before the others are.

reply

3 points by prestonbriggs 6 days ago | link

I wouldn't think it would make a difference. The other names are all bound to functions, so we should be able to bind them in any order.

reply

3 points by akkartik 5 days ago | link

Try running without your code.

    arc> (help get)
    [fn]  (get i)
    Returns a function to pass 'i' to its input.
    Useful in higher-order functions, or to index into lists, strings, tables, etc.
    Examples:
      arc> (get.2 '(1 2 3 4))
      3
      arc> (get!b (obj a 10 b 20))
      20
      arc> (get.9 sqrt)
      3
      arc> (map get.2
                '((a b c)
                  (1 2 3)
                  (p q r)))
      (c 3 r)
    nil

    arc> (help set)
    [mac] (set . args)
    Sets each place in 'args' to t.
    nil
These are the functions you end up calling because your dispatch can't see the earlier get and set bindings.

reply

3 points by kostas 5 days ago | link

Look at the definition of with and withs at https://github.com/arclanguage/anarki/blob/master/arc.arc

The macro definition of with creates a function with all the names as inputs and the body of the with as the body of the function. The newly created function is called with the definitions of each name, which are effectively in independent namespaces.

The withs definition, however; recursively calls itself so that each succeeding name sees the definitions of previous names.

I believe the difference is historically due to higher speed of with. In modern programming it probably makes sense to use withs everywhere and only change to with in places where optimization is necessary.

reply

4 points by akkartik 5 days ago | link

I actually tend to the opposite: use with everywhere unless I need withs. The reason isn't performance. It tends to make code more elegant to not rely on the order in which things are defined. And when I'm reading code, with gives me the warm fuzzies that the code is going to be cleaner. When I see withs I slow down to look at the dependencies between the bindings.

reply

3 points by zck 5 days ago | link

Similarly to this, when I'm writing Java, I use `final`^1 everywhere I can. It's nice to be able to know that anywhere later where the variable declared final is in scope, it will have the same value as at the point it's set. I don't need to look through any code to see if it's rebound; I know it hasn't been.

[1] "final" is kind of like "const", if I understand `const` right. `final int x = 3;` means that it is an error to later have the line of code `x = 4;`.

reply

3 points by prestonbriggs 5 days ago | link

OK, I get it, thanks. In scheme, I would use letrec for this situation; my intuition for Arc isn't very well developed.

reply

3 points by i4cu 9 days ago | link | parent | on: Advanced search for news.arc

Under knarks "Why the fork?" section hjek links to the 'ethical repository'[1]. Since notabug.com is only for open source projects then the repo's will likely be considered 'free software' which I believe makes it grade A in 'ethical repository' terms.

Personally I find the term 'ethical repository' offensive. It insinuates that non-free software is unethical when the majority of non-free software has no nefarious intent or code. Not exactly the greatest sales pitch in my book.

1. https://www.gnu.org/software/repo-criteria-evaluation.html

reply

3 points by shader 7 days ago | link

Yes, that's what I assumed as well; I just thought it would be an interesting discussion, and was wondering if there might not be other reasons for choosing that particular repository.

I suppose for me, the distinction between an 'open source' repository (Gitlab) and an 'ethical(?)' repository wasn't a very important one, so I was curious for the motivation behind it.

reply

1 point by hjek 4 days ago | link

I think free (or "open source") and ethical mean the same in most cases.

Exceptions might include something like Facebook, which is technically somehow usable w/o non-free JS when using their basic mobile web page, but where the company is still engaging in other unethical activities, like selling user data to sway elections.

Or something like Amazon, where you might possibly be able to buy something w/o non-free JS (haven't checked), but where the treatment of their employees is unacceptable.

But, I think, when we're talking git hosting sites, there's no difference?

But FSF considers Gitlab ethical enough for hosting GNU packages[0].

[0]: https://www.fsf.org/news/gnu-releases-ethical-evaluations-of...

reply

3 points by i4cu 4 days ago | link

As I understand it - the 'Open Source' movement concerns itself with improving the software by making the code openly accessible, where as the 'Free Software' movement concerns itself with a fighting for users rights (i.e. having the freedom to access, modify and distribute the code in a manner that empowers the user).

And so, an 'Open Source' repository holds code that is openly accessible for the purpose of improving the software. Where as an 'Ethical Repository' holds code that is graded by its' ability to guarantee users rights according to a specific set of morals (established by free software foundation). It so happens that open source repos tend to align well the ethics associated with free-software, but they should not be mistaken for each other. As an example to illustrate: If a repo SaaS were built for open source code, but restricted users from a certain country it wouldn't rank high in ethical repository grading. This is because while having the code openly accessible leans towards a Grade A rating (excellent), the restricting some users part puts it at a Grade F rating (unacceptable).

-- additional info --

https://en.wikipedia.org/wiki/Open-source_software

"Despite initially accepting it,[31] Richard Stallman of the FSF now flatly opposes the term "Open Source" being applied to what they refer to as "free software". Although he agrees that the two terms describe "almost the same category of software", Stallman considers equating the terms incorrect and misleading.[32] Stallman also opposes the professed pragmatism of the Open Source Initiative, as he fears that the free software ideals of freedom and community are threatened by compromising on the FSF's idealistic standards for software freedom.[33] The FSF considers free software to be a subset of open-source software, and Richard Stallman explained that DRM software, for example, can be developed as open source, despite that it does not give its users freedom (it restricts them), and thus doesn't qualify as free software.[34]"

reply

3 points by hjek 8 days ago | link

> It insinuates that non-free software is unethical when the majority of non-free software has no nefarious intent or code.

The term can also be used by people who consider it unethical to even give programmers the possibility to hide nefarious code from users, regardless whether they actually do or not.

reply

3 points by i4cu 8 days ago | link

> The term can also be used by people who consider it unethical to even give programmers the possibility to hide nefarious code from users, regardless whether they actually do or not.

But that's not what's happening here. They are categorically demonizing innocent people.

reply

3 points by hjek 8 days ago | link

> They are categorically demonizing innocent people.

I'm sorry; that was not my intention.

Perhaps I can make a comparison to clarify? As an example, some people think that guns are unethical because they may be seen as an unjust instrument of violence. Even if a particular gun hasn't killed anyone (yet), or even if most guns happened not to be used to kill, then surely it can still be legitimate for people to object to the passive presence of guns, because it gives gun owners the power to kill, and that power may be considered unjust by principle.

Similarly, some people think that non-free software is unethical because it gives programmers the power to do bad stuff, regardless of whether some particular non-free program is actually malware (yet).

(Sorry in advance if I've derailed this discussion into a more controversial subject.)

reply

3 points by shader 7 days ago | link

(continuing the discussion for clarity... no emotional connotation is intended)

I realize this is a comparison for clarification, but isn't it still just 'categorically demonizing innocent people'?

You picked a more controversial topic where more people are likely to agree with the demonization I suppose, but your assertion that the power to kill "may be considered unjust by principle" is not well supported by vague assertions that "some think" guns "may be seen as" unjust instruments of violence. I fully support everyone's right to object to something they see as dangerous; opinion does not constitute principle, however.

To me, something is just or unjust based on whether or not it aligns with or infringes anyone's rights. So, I suppose I might actually agree that a power could be "unjust in principle" if it could be shown that the power could not be used justly - that is, without infringing on anyone else's rights. For some powers, mostly political ones, this is the case. In this case I think guns may be a poor comparison, because they actually can be used in ways which are just (defense, etc.), even if you believe that those cases are unlikely and so desire strict gun control, etc.

In contrast, it may be that producing nonfree software is always 'wrong' (in that it infringes on the supposed rights of the users to understand and modify the program they are running) and therefore having or providing the power to do so would be 'unjust in principle'. If the concern is merely that some may produce malware, and there are actually legitimate reasons for producing nonfree software, then it is not unjust in principle to do so, or to provide someone with said power.

I hope I've understood all that correctly, and restated it well. I'm not sure that I agree with the idea that nonfree software is always bad, but I am open to it. Perhaps what I'm missing is a clear understanding of the specific rights that nonfree software violates.

reply

3 points by i4cu 8 days ago | link

No worries, I know you (as well as the authors) are simply trying to apply implicit safety measures to counter bad actors. And I'm certainly not offended by you adopting the program. It's my feeling, however, that their approach is horribly wrong and bordering on corruption. I simply don't believe they will have any success when trampling over the good actors in their process of trying to better the world. IMO; If they really wanted to make a dent, they should push for a regulation requiring that browsers provide functionality that enforces a free-software configuration OPTION. Then allow society to decide for themselves (this is a free world after all). I'd even be ok if the default setting was on. But as it sits right now they will get nowhere really fast.

edit: oh and as for the gun analogy... I'm from Canada and fully support gun control (we have it), but I'm not going around and implying that every gun owner is unethical in the process of asking for gun control. That would be shooting myself in the foot!

reply

2 points by hjek 5 days ago | link

> IMO; If they really wanted to make a dent, they should push for a regulation requiring that browsers provide functionality that enforces a free-software configuration OPTION.

Sounds interesting. Apart from the regulation part, it sounds a bit like LibreJS[0].

[0]: https://www.gnu.org/software/librejs/

reply

2 points by i4cu 5 days ago | link

Actually, I got the notion from Stallman's original post 'The Javascript Trap' [1].

"Finally, we need to change free browsers to detect and block nontrivial nonfree JavaScript in web pages. The program LibreJS detects nonfree, nontrivial JavaScript in pages you visit, and blocks it. LibreJS is included in IceCat, and available as an add-on for Firefox."

However I am opposed to that call for action given it's an all-or-none implementation. I feel it's the role of each country to regulate, which is why I expressly suggested it as a configuration option (ideally it could be enforced at the browser level country by country and if not then user by user).

1. https://www.gnu.org/philosophy/javascript-trap.html

reply

1 point by krapp 5 days ago | link

It seems like the thesis here is that whether or not "non-trivial" Javascript (which is just about all Javascript in the wild) should be trusted depends on the presence of an explicit GPL license. If so, that doesn't seem like a reliable heuristic for a script blocker to me.

reply

2 points by i4cu 5 days ago | link

I'm pretty sure it would be similar to ad-blockers. The initial implementations are trivial and easily circumvented, but as they evolve they become more useful overall.

Plus note that I was just suggesting that it would be more effective than a social movement with 'ethical repositories'. Just imagine if the ad-blocker devs tried the same strategy...

reply

3 points by i4cu 9 days ago | link

eh, hem, hem!

I've made an assumption as to why hjek selected notabug. I should know better than to make assumptions... apologies.

reply

3 points by hjek 8 days ago | link

Well, correct assumption!

reply

3 points by i4cu 11 days ago | link | parent | on: Hook

rem only works on seqs, you need to set the value to nil:

  (= (mytable 'key) nil)
and tables don't hold nil valued entries so it works.

reply

2 points by krapp 11 days ago | link

thanks!

reply

3 points by i4cu 11 days ago | link | parent | on: Vouch

My understanding is just that - it's the opposite of flag, however I thought there was some karma threshold or something that permitted vouch to occur, where as flag was fairly immediate. Maybe is just needs to be dead first.

You can also see from here:

https://blog.ycombinator.com/two-hn-announcements/

  Today’s new feature lets users rescue [dead] posts on a 
  case by case basis. Beside the ‘flag’ link, you’ll see a 
  ‘vouch’ link to click when a post should not be [dead]. 
  When enough users vouch for a post, the software will 
  unkill it. Think of vouches as the inverse of flags: a 
  flag says that a post shouldn’t be on HN; a vouch says it 
  should.""

reply

3 points by zck 10 days ago | link

> Maybe is just needs to be dead first.

Yeah, if you have enough karma, you can see "vouch" links on dead submissions. The easiest way to see this is to go to https://news.ycombinator.com/newest; many of those links will be dead.

reply

3 points by hjek 8 days ago | link

So you need to have `showdead` enabled for vouch to ever be visible, I guess?

reply

5 points by i4cu 11 days ago | link | parent | on: Self-hosting the Anarki community

Given the open nature of the anarki repo, it's likely that news will break. And when it does we wouldn't be able to discuss it.

So unless these tests could prove that the forum would work (which is highly unlikely) then my vote would be not to do this. It's akin to putting the services issue logging/tracking system under the same service [1]. It's a bad idea IMO.

1. http://arclanguage.org/item?id=20573

reply

3 points by shader 11 days ago | link

Or maybe the immediate and painful result of breaking the forum would motivate us to be more careful and fix the issues more quickly. It probably won't happen that often anyway.

I was about to say that an outage might risk killing the community, which would be bad, but 1) we still have this forum and GitHub (as krapp points out), and 2) if the community is really so weak that it can't revert a commit in order to get the forum running again, it's probably not worth hosting a separate site anyway.

The idea is growing on me, just because of how audacious it is. (^^)

I do agree with some of your point though; it would be good to have some separate logging and bootstrap systems in place so that we can detect and repair faults more easily, without the intervention of a specific admin. For one thing, the software that pulls the changes will probably not be arc-based, so it should still be running even if the forum goes down. Secondly, we could try to set it up so that it always pulls hotfix patches immediately when the logging / monitor system indicates failure.

Also, marking a particular branch (probably not master) as a more 'stable' version might be good.

reply

2 points by i4cu 11 days ago | link

Another option is to ensure the service has a robust failover procedure towards a secondary free service as a temporary measure. And maybe someway to safely automate an intentional failover.

edit: my original comment was in consideration of the arc forum potentially going away. Honestly I'm not sure I would move over if that wasn't the case. I'd have to see :)

reply

3 points by shader 9 days ago | link

Yeah, that's part of why I've never seriously considered it before.

The only reasons for thinking about it now are that 1) we want to add some features to the forum, and there's no way to test them here, and 2) it isn't actually a bad idea to have a community site for Anarki. The risk of weakening the community has deterred me from the idea of forking the arc forum, but if we still treat this as the 'official' arc community, and make a separate site more focused around anarki, I don't think that would be too bad.

It might actually help some, since separating more could allow us to really focus on and develop our unique points of experimental language hacking.

reply

2 points by i4cu 9 days ago | link

Don't let my comments stop you. Your thinking is quite valid. I'm just trying to contribute my opinion in hopes of helping you shape whatever you decide.

> It might actually help some, since separating more could allow us to really focus on and develop our unique points of experimental language hacking.

As far as I can tell, pretty much everyone has moved over to anarki, so I don't understand your comment. How does creating a separate forum for anarki help to "focus on and develop our unique points of experimental language hacking"?

reply

3 points by shader 7 days ago | link

Thank you for your opinions; it really does help me clarify my own thoughts. That and I rather dislike talking to myself for more than a few minutes at a time...

Currently, this is an Arc forum. People are drawn here from pg's posts about Arc, and their attraction to the simplicity and beauty of the language. Also probably dreams of silver bullets... That won't stop just because we make a separate community, and I really don't think there's anything wrong with it.

However, I think we're also torn a bit between maintaining basically a bugfix version of arc, or going on to develop it further.

The question then is what "further" means - which direction would it go? One answer is that it can't really be predicted; creating such a community would be a way to find out.

On the other hand I can speculate, based on what I've seen of this community so far.

People come, entranced by pg's vision of arc, and then find out that the code base itself is really small and approachable. In general, lisp variants are used by people who like to make the language fit their needs, but where most dialects would add to the language via macros, with arc (or anarki) people find it just as easy to hack on the core of the language itself. Eventually this leads them to forking it, or building their own implementation in javascript or something.

I suspect this is partly because arc is so small, and does not have many standard libraries or a package system. You can read it all in a fairly short amount of time. So the fact that most of the code is aimed at developing arc means that the easiest thing to develop with it is... arc.

This trend of exploration and extension will undoubtedly continue, and I think it will be much more free to develop into something significant if we simply look at anarki with the slightly different perspective that having a separate community site we could actually upgrade might offer. Instead of being weighed down by arc as the 'community bugfix edition', it could become a 'language based on arc' with a solid foundation, but room to grow.

The core paradigms and strengths of arc appear to be "exploratory programming", and "language hacking". I think it would be cool if we could develop the former beyond the latter, but who knows how it will turn out?

Of course, I may be entirely off-base here myself...

reply

3 points by i4cu 7 days ago | link

Ahh, I see. That make sense now.

Hmm, you know, a new anarki forum could have the benefit of adding a tags feature for posts. A few good tags could be 'lang-design', 'arc', 'anarki', 'help', etc., etc. Not only would this allow our subtypes of members to zero in on their content of interest, but would make searching for meaningful info much easier. Now that would probably make me jump over.

reply

3 points by shader 7 days ago | link

Yep, improving the forum would help a lot, in a lot of ways.

I've often thought that the structure of the news.arc forum is rather unhelpful for the arc community, especially now that we're so small and lethargic. Conversations can go extended periods of time without comment, so they get locked. Or they fall off the front page, and hard to find again. Neither is conducive to long-term development and improvement; we probably lose a lot of valuable work and ideas that way.

One thing I'm considering as part of developing a new community site is collecting and archiving all of the arclanguage.org content, so we can actually access it. And preserve it, if the site goes down.

But I end up wasting all my time on discussion, instead of actually making progress on that...

reply

2 points by akkartik 7 days ago | link

I did ping the HN admins about the lock period a year or two ago, and they were kind enough to extend it for us. It's now 90 days, if I recall correctly.

reply

2 points by shader 6 days ago | link

Somehow i managed to trip the DoS prevention, and now my home IP is blocked. I almost thought the site actually did go down...

reply

2 points by akkartik 8 days ago | link

We still get newcomers with questions about Arc 3.1.

reply

2 points by i4cu 8 days ago | link

Sure, but from what I can see they soon quickly discover they need to use anarki and move over.

And impacting newbies does not appear to be considered in "focus on and develop our unique points of experimental language hacking". So...

edit: maybe I'm wrong, but it seems to me what he really wants is a language design group. And I'm fine with that, but I think it's wrong to conflate anarki users with language designers. They are not one in the same.

reply

3 points by shader 7 days ago | link

I was expecting arclanguage.org to stay mostly as it is. Support for newcomers to arc would be included in that.

You may not be entirely wrong, but I probably shouldn't have tried to compress a description of a language used and developed by a loosely federated group of unique individuals into a single phrase.

I can try to unpack it a bit...

"Experimental (language) hacking" -> Exploratory programming is supposedly a primary paradigm of arc

"Experimental language hacking" -> Arc isn't exactly production ready; it's a very experimental language, and that makes it fun (and sometimes frustrating) to use, and easier to explore new directions and possibilities. You're less likely to reverently assume that the way it is is the way it must be.

"Experimental language hacking" -> And yes, we hack on arc itself. So I am thinking a bit of a language design community, I guess. In an anarchic language community though, the lines between 'users' and 'designers' become rather vague...

reply

2 points by shader 7 days ago | link

Yep. We should definitely keep answering them too.

reply

3 points by krapp 11 days ago | link

If that's an argument against us using Anarki then it also seems like an argument against anyone using Anarki, or at least against anyone blindly committing it to production. Breakage can happen with any open source project, but given the generally slow nature of the community, even if news is likely to break, it isn't likely to break often.

Also, we already have Github to check and discuss it, and I think there is a more appropriate venue than here for those issues.

reply

3 points by i4cu 13 days ago | link | parent | on: Installation on windows?

I'm going to piggyback on this thread for anarki + osx. Can some explain why the arc.sh script requires that coreutils be installed - what's that dependancy for? emacs?

reply

3 points by akkartik 13 days ago | link

Just greadlink in case the location where you cloned anarki lies somewhere within a symlink: https://github.com/arclanguage/anarki/blob/master/arc.sh

:/

reply

3 points by i4cu 13 days ago | link

ok thanks. I wasn't familiar with greadlink so I didn't know it was a 'thing'.

reply

3 points by akkartik 12 days ago | link

I kinda misspoke. The explanation is at the top of the file:

    Put a symlink to this script somewhere in your path.
The goal seems to be to deduce where the sources are, independent of where the driver script is called from.

reply

3 points by hjek 12 days ago | link

Why aren't we just using

    cd $(dirname "$0")
to change to the arc dir?

greadlink shouldn't be necessary.

reply

3 points by akkartik 12 days ago | link

That was my initial thinking as well, hence the ':/'.

But later I realized there's a good reason: http://arclanguage.org/item?id=20641

reply

2 points by hjek 12 days ago | link

Oh, symlinks! I see.

reply

2 points by zck 10 days ago | link

I wish arc had better integration with Emacs. I'd love a SLIME/Cider-style integration. With infinite time, I'd like to write one.

reply

3 points by i4cu 13 days ago | link | parent | on: Installation on windows?

If someone does email, please request that the main page[1] be updated with a link to anarki as opposed to just a change in install instructions.

1. http://www.arclanguage.org/

edit: I'm ok if they take it down. I'll know where to go via the anarki wiki (if someone updates it). And it may actually be better if they do take it down IMHO as it will force everyone to find a place with more control over the setup.

reply

3 points by krapp 13 days ago | link

I mean... would it be so bad for the Anarki community to be hosted on a forum running Anarki?

reply

2 points by hjek 12 days ago | link

Then we would be even able to actually search stuff on the site!

reply

3 points by shader 12 days ago | link

I think if we fork the community site to run on anarki. which I think is more likely than being given control over the Arc Forum, we should consider ways to archive and bring forward all of the stuff on the existing arc forum. It shouldn't be too hard to crawl the forum, though I think there might be some DoS prevention that would slow it down.

reply


I liked the article, but I'm at a loss as to why that would lead you make CL more notable than other lisp or scheme dialects.

For me, the article makes good points about Lisp in general and makes a good case for lisp vs. non-lisp languages, but other than that it just read like a very good lisp intro.

reply

3 points by akkartik 14 days ago | link

A lot of the reason CL never stuck for me was that the docs are ancient and not very approachable. And I didn't have a guru in my network.

But this write-up clarifies several things that I've never understood. The package system, for example: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/#pac...

If I'd seen it ten years ago perhaps I'd have stuck with Common Lisp. Even if it's large and baroque, it has a lot in it.

reply

2 points by i4cu 20 days ago | link | parent | on: Separation of concerns

Your comment detailed what the libs.arc file contained.

the code within tem.arc was originally part-in-parcel within those files, but was extracted out into its' own file. So he was just commenting that there is other code that exists in anarki that was originally included and that there may be more examples of such.

reply

3 points by akkartik 20 days ago | link

Right. It's not the case that everything in libs/ that isn't an original filename is new code.

It was just a minor nit :)

reply

3 points by rocketnia 20 days ago | link

Ah, I didn't even know I was implying that. Thanks for clarifying. :)

reply

4 points by i4cu 20 days ago | link

Anytime you need us to let you know what you're thinking just let us know. We got you covered.

reply

3 points by akkartik 20 days ago | link

😂

I was responding to this:

"Of the 14 files in the release of arc0.tar, the libs.arc file contained this:

  (map load '("strings.arc"
              "pprint.arc"
              "code.arc"
              "html.arc"
              "srv.arc"
              "app.arc"
              "prompt.arc"))
So essentially half of the files in the first Arc release were essentially lib/ files that just hadn't necessitated their own folder yet."

But rereading it now I think I was responding to the contrapositive of what rocketnia said :)

reply

3 points by krapp 19 days ago | link

Is that an emoji?!

reply

3 points by i4cu 21 days ago | link | parent | on: Knark

The service looks interesting. I was glad to see the change logs of your repo were respected. The service itself seems intermittent I can't seem to get a pulse on how stable it is.

reply

3 points by hjek 21 days ago | link

How stable the hosting service is? Check https://notabug.org/outages

reply

3 points by i4cu 21 days ago | link

Yeah, about half of my 10 or so page reqs timed out, so that's probably not covered under outages. I'll just have to follow it a little more; it just wasn't the greatest intro experience, but that happens.

reply

2 points by hjek 21 days ago | link

That's pretty bad. Perhaps consider reporting[0] the issue to them, along with a traceroute output? It's working fine here.

[0]: https://notabug.org/hp/gogs/issues

reply

3 points by i4cu 21 days ago | link

Ahh...Chuckle: That page was under one the pages I tried to hit, but couldn't (at the time).

Right now I'm going to just monitor it for a bit. I don't like logging issues unless I know it's not something that's just temporary.

reply

More