Arc Forumnew | comments | leaders | submit | akkartik's commentslogin
4 points by akkartik 16 days ago | link | parent | on: Poll: What's the best payment system?

We don't have access to the actual code running live on the site, but looking at policies from back in 2009 or so, it looks like you may have run afoul of the sockpuppet detector: https://github.com/arclanguage/anarki/blob/8e330f1242/lib/ne.... That's too bad; sockpuppet detection is overkill for a site this niche.

Try it now on some other vote (votes on polls seem to be using the same code as votes on stories or comments). If your vote sticks now, that would confirm my hypothesis. (https://github.com/arclanguage/anarki/blob/8e330f1242/lib/ne...)

reply

4 points by i4cu 16 days ago | link

BTW I'm thaddeus. I check in once in a blue moon, but decided to vote on this and forgot my password so I created another account;).

And it looks as though, because I created the account seconds before voting, I failed at least one test in 'legit-user':

  new-karma-threshold* 2
It's possible I failed new-age-threshold* too, but I wasn't all that interested in investigating further.

I dunno; I understand the reasoning, but it still seems like a bad design choice. I'd much rather, circumstantially, be put through a better legit-user test on account creation than to see a forum introduction like that. Oh well, the odds are low for a new user to vote on a poll as a first action anyway. I just seem to always beat the odds :) haha.

reply

5 points by akkartik 53 days ago | link | parent | on: Ask ARC: Can I start with Arc?

Thanks for the reminder! Your comment reminded me that the Arc tutorial (http://arclanguage.org/tut.txt) doesn't quite match the state of Anarki, so I created copies of the tutorial for both stable and master branches at http://arclanguage.github.io.

The stable branch uses the Arc tutorial unchanged. All I did was to make it a little easier to read: https://arclanguage.github.io/tut-stable.html

The master branch of Anarki has one major incompatibility with Arc 3.1, and I created a version of the tutorial with it highlighted in bold: https://arclanguage.github.io/tut-anarki.html

micoangelo, if you decide to try out Arc, be sure to start at http://arclanguage.github.io rather than the instructions here at http://arclanguage.org. Even if you use the stable branch which is compatible with Arc 3.1, it has a couple of crucial bugfixes that are otherwise liable to bite you at an inopportune moment.

reply

5 points by akkartik 55 days ago | link | parent | on: Ask ARC: Can I start with Arc?

I think "learning Lisp" is Arc's best niche. So yes, try using it and come ask us questions. Feel free to also ping me over email, that is sometimes faster. My address is in my profile.

One caveat: it can be easier to learn from a book if you follow the language it was written for. Land of Lisp is a fine book by all accounts, so if you use it you may be better off just using Common Lisp or whatever. But feel free to come ask questions anyway. Maybe we can show you both Common Lisp and Arc versions of programs.

reply


Whoa, I could have sworn I responded to this one :/

rocketnia is right that I tend to just run Arc from within its directory, keeping it alongside any Arc program I may be working on at the moment. As a result, I'd kinda always assumed you could run it from anywhere and find yourself in the Arc directory once you loaded up. Now I find this isn't the case:

  $ pwd
  /home/akkartik
  $ ./anarki/arc.sh
  arc> ($:current-directory)
  #<path:/home/akkartik>
This was initially surprising, but of course we're only parameterizing the current directory while loading libraries: https://github.com/arclanguage/anarki/blob/c3849efaf9/boot.s...

I'm not sure what to do about this. In addition to rocketnia's `current-load-file*` suggestion, should we just expose `arc-path` from boot.scm? I couldn't immediately see how to get to it from Arc.

reply


Found on the recent HN discussion about Gerbil Scheme: https://news.ycombinator.com/item?id=15394603

One interesting point here is how he prioritizes choice of language based on relationships. This connects up with my comment on avoiding dependencies at http://arclanguage.org/item?id=20221. The conventional wisdom that the community of a language matters more than its technical attributes is a diluted version of this idea.

-----

3 points by jsgrahamus 67 days ago | link

Thanks, akkartik. Also read the discussion on Gerbil.

-----


Mine would be COPYMORE. Or NODEPS.

I think I share your vision: http://arclanguage.org/item?id=17277

-----

2 points by shader 70 days ago | link

Do you have any references for those terms? Or a short explanation for them?

-----

1 point by akkartik 70 days ago | link

COPYMORE

I'm what I like to call a 'copyista': I think DRY is overrated, and abstraction is overrated, and people are too quick to create abstractions to compress code rather than for conceptual clarity. Some links: http://www.sandimetz.com/blog/2016/1/20/the-wrong-abstractio...; http://programmingisterrible.com/post/139222674273/write-cod...; http://bravenewgeek.com/abstraction-considered-harmful; http://akkartik.name/post/modularity; http://dimitri-on-software-development.blogspot.de/2009/12/d...; http://thereignn.ghost.io/on-dry-and-the-cost-of-wrongful-ab...; http://akkartik.name/post/habitability. You don't have to read them all, but hopefully this gives you as much flavor as you want :)

NODEPS

This is short for "no dependencies". I think a lot of software's ills stem from people's short-sighted tendency to promiscuously add dependencies. In fact, our fundamental metaphor of libraries is wrong. Adding a library to your program isn't like plugging a new block into your Lego set. It's like hiring a new plumber. You're not just adding a few lines of code to a file somewhere, you're creating a relationship. Everytime I see someone talk about "code smells", I wait to see if they'll bring up having too many dependencies. Usually they don't, and I tune them out. And the solution is easy. When you find a library that does something useful, consider copying it into your project. That insulates you from breaking changes upstream, and frees up upstream to try incompatible changes. As a further salubrious effect, it encourages you to hack on the library and tune it to your purposes. (Without giving up the options of merging further changes from them, or submitting patches upstream.)

As it happens, this worldview of mine was actually catalyzed by conversations here in the Arc Forum, most proximally http://www.arclanguage.org/item?id=13263. That thread led to me writing http://akkartik.name/post/libraries and (a little clearer) http://akkartik.name/post/libraries2.

I consider an example of exemplary library use to be how I copied the termbox library into Mu (https://github.com/akkartik/mu/commit/5f1285238b), periodically merged commits from upstream (https://github.com/akkartik/mu/commit/9ba313ab7f), gradually cleaned it up to fit better with my project (https://github.com/akkartik/mu/commit/9a31c34f0f), and gradually stripped out code from it that Mu does not require (https://github.com/akkartik/mu/commit/c04baba4f2; https://github.com/akkartik/mu/commit/8e7827dfcf; https://github.com/akkartik/mu/commit/547ec78bf2). In the process I made some wrong turns, deleting features that I later decided I wanted (https://github.com/akkartik/mu/commit/10a3b8cca2) and created bugs for myself (https://github.com/akkartik/mu/commit/3315a7d3bb; https://github.com/akkartik/mu/commit/0c0d1ea5cd). But when it did things I didn't want, I was now empowered to change them (https://github.com/akkartik/mu/commit/ee1a18f050). One of my patches was useful upstream, so I submitted it: https://github.com/nsf/termbox/commit/0730826a07. I would be in no position to submit that patch if I hadn't taken the trouble to understand termbox's internals. That's another benefit of copying and privately forking libraries: it makes you a better citizen of the open source world, because open source depends on eyeballs, and using a library blindly helps nobody except your (extremely short-term) self.

More broadly, Mu is suffused with this ethos. My goal is that if you have a supported platform you should be able to run it with three commands:

  $ git clone https://github.com/akkartik/mu
  $ cd mu
  $ ./mu
(That highlights another benefit: your software becomes easier for others to try out. Without giving out binaries, because what's the point of being open-source if you do that?)

Mu's also geared to spread this idea. I want to build an entire software stack in which any part is comprehensible to any programmer with an afternoon to spare (http://akkartik.name/about). Which requires having as little code as possible, because every new dependency is a source of complexity if you're building for readers rather than users. In chasing this goal I'm very inspired by OpenBSD for this purpose. It's the only OS I know that allows me to recompile the entire kernel and userland in 2 commands (https://github.com/akkartik/mu/wiki/Building-OpenBSD-on-Open...). People should be doing this more often! I think I'm going to give up Mu and build my next project atop OpenBSD. But that's been slow going.

---

Ah, here's an old HN thread where I managed to combine both these ideas: https://news.ycombinator.com/item?id=11158357#11189308

I'd have preferred to more directly call out my hatred for compatibility constraints, but I couldn't figure out how to fit it on a license plate :)

-----

2 points by breck 57 days ago | link

The Pike maxim "A little copying is better than a little dependency" comes to mind. I think the overhead of dependencies is underrated ("it's just a 1 line import statement!"), and often a little repetition is a good thing.

reply


I was just thinking about it yesterday, after reading https://www.theatlantic.com/technology/archive/2017/09/savin.... Very inspiring talk.

-----

2 points by shader 70 days ago | link

That's precisely where I found out about it :D

-----


This was my first thought as well. But why does `readc` (Racket's `read-char`) silently accept invalid utf-8?

-----

5 points by rocketnia 56 days ago | link

It's reading the invalid sequence as � U+FFFD REPLACEMENT CHARACTER, which translates back to UTF-8 as EF BF BD (as we can see in the actual results above). The replacement character is what Unicode offers for use as a placeholder for corrupt sequences in encoded Unicode text, just like the way it's being used here.

reply


The files seem to diverge after a 0 byte. Can you check if it's the first 0 byte in the file?

Edit: never mind, I was hallucinating.

-----

2 points by zck 86 days ago | link

I just checked; it's not the first 0 byte.

Just to provide a little extra information, the image I'm testing with is my favicon: http://zck.me/favicon.ico

-----

2 points by akkartik 122 days ago | link | parent | on: 3-Dimensional Source Code

"There's a mirage when you first look at it, like with a lake. What you see is just the surface of the lake, and that's a two dimensional view. But when you put your hand in, you find that there's depth to it. It's not just one dimension or two, but a three dimensional design." -- Carl Sassenrath on Rebol, 1996 (https://web.archive.org/web/20000830133509fw_/http://www.lin...)

-----

2 points by breck 70 days ago | link

Thanks for this link. I hadn't studied Rebol too closely before.

I do like Rebol's embrace of dialecting and I think there's opportunity in making composing languages better.

-----

More