Yeah, I thought the "like," "love!" etc. were a bit weird-looking myself at first, even if they were nicely minimalistic.
Since this is functionally the same as a system that rates things from 0 to 3 stars (or 1 to 4 stars, although I don't like 1-to-4 'cause it fools me into thinking there's a 50%), I think actual stars would be a less surprising interface. That would also be nicer to red-green colorblind users.
On another note, I may have found a few bugs. (In case you're keeping a log, my seed for this session was "emshort.wordpress.com". I'm not using the feedback feature, 'cause I don't know if that's buggy too!) I went through several pages I don't remember, pressed the older and newer buttons, and ended up finding a link to "Notion Ink Adam tablet hands on (Pixel Qi Display)" in my recent activity even though I hadn't seen that yet. All I can guess is that either it was someone else's recent activity or else it was what I was going to get had I clicked past the article I was at. Since I couldn't press "newer" (naturally, since I don't have any history newer than the present), I pressed "older" dozens and dozens of times and annoyed myself, and then I rated the tablet article, and suddenly I realized I could press "newer" and started to do that. I expected to annoy myself again, but instead I guess I pressed the button too fast or a packet got lost or something, 'cause the loading graphic came on and stayed there. The loading graphic wasn't centered either; personally, I think that's a bug. :-p Finally, I forwarded a copied and pasted this writeup into the feedback form and sent it off along with a link to this post (so you know you can reply to me here).
Ah, I figured out the problem - the history requests were shared across all users, so if somebody else makes a request while you're browsing, you see the history for their station when you hit older or newer
:}
(This is, of course, in addition to the failed request at the end, and the layout issues)
Curved quotes (“...”) bug me a little because of the way tools like Microsoft Word and Wordpress automagically curve people's quotation marks either as they type or as they publish. Usually, this would just result in a flagrant syntax error, but with your syntax it would have a slightly more subtle effect.
I almost didn't care to mention it. After all, if people are going to compose/publish code in places where prose is expected, they'll get bitten one way or another. For instance, really strange characters might be displayed as question marks, or a random ":o" might turn into an emoticon. But I was amused to find a curved quote code mishap within a day, just by accident: http://www.flashcoder.net/blog/?p=100
The quotes you use in the MediaControlEvent package result in a
syntax error in Flash if I copy from browser to Flash.
Rather than:
“headControl”
should be:
“headControl”
Automagic curved quotes on a coding blog. Priceless. (I'm one to speak. I think my blog has the same problem.)
It's a reference, as you can see, since the keys in the table change when you change them from outside the table. It's just that the keys are being compared by structure rather than by reference.
(tab key) => nil
This is pretty much a casualty of using hash tables. The point of a hash table is that it redundantly stores a hash of each of the keys, then compares further keys' hashes to those hashes before doing more in-depth comparisons. If you modify a key, then the hash table's precalculated hash for that key may be incorrect, so the shortcut doesn't work properly anymore.
The PLT Scheme docs specifically don't promise anything about this:
Caveat concerning mutable keys: If a key in an equal?-based hash table is mutated (e.g., a key string is modified with string-set!), then the hash table's behavior for insertion and lookup operations becomes unpredictable. (http://docs.plt-scheme.org/reference/hashtables.html)
I imagine a language could make sure to update its hash table hashes whenever the keys were modified, but as far as I can tell, that involves either recalculating the hash values at table access time (which defeats the purpose somewhat), recalculating them at modification time (which I'm guessing would make all modification take time proportional to the number of things that (in)directly reference the modified thing), or trying to do the recalculation sometime in between when there's time to spare, like the same time the garbage collector runs. There are probably some cleverer solutions, but any way you slice it, I doubt it's a straightforward fix. ^_^;
You came to pretty much the same conclusions I did. I'll probably try out Haskell too. It fits nicely with the kind of side-effect-free-even-to-the-point-of-monads-and-arrows programming I try to do in other languages anyway, and the main thing keeping me away from it has been a perception that it had a really slow implementation.
What I had ended up voting for in the poll though was Clojure. I figure it's lenient about types, it's very reliably cross-platform ('cause of all the business interest in maintaining Java), it has better documentation than Erlang, it can still communicate with C and Erlang (as pretty much any language can, apparently), and beyond that, it has a language-level focus on communicating with other JVM code, which should give you good access to lots of other well-worked-on codebases. As far as I can tell, once you've got access to C and JVM libraries, Python libraries are the next gold mine, but I don't know how to access those libraries except through Python somehow (like through system calls or something), so it didn't affect my decision. (Incidentally, for many of the same reasons I recommend Clojure, I'm hooked on Groovy, but I did consciously try not to let my own criteria make a difference.)
In any case, yeah, now that I see it as fast, Haskell looks great. :-p
I wonder if it's possible to build the beautiful arc syntax as a layer upon haskell. Probably not doable ~ macro's/expansion and all, but still - would be awesome.
Liskell sounds very close to what you're thinking about. Also, the "Write Yourself a Scheme in 48 Hours" Haskell tutorial might interest you. I think this is a pretty popular train of thought. ^_^
That's actually where I'm starting with Haskell. It turns out Haskell is a much more natural home for Blade (my pet lisplike) than any of the other languages I've tried: JavaScript, Groovy, Arc, and Blade itself (with an intent to port/bootstrap it). It's almost scary!
Well, there are a lot of good languages on your list. Just about the only one I don't feel like voting for is C#. :-p So do you have any more criteria/goals/uses to speak of that could narrow it down?
* great documentation & write ups.
* feature rich well supported libraries (i.e. database connections, vector graphics libraries etc..)
* macOSX and Linux support.
* active community of users at all levels.
* low overhead (I like that arc is a dynamic language, has type inference, and lexical scope)
As for goals/uses... really I just want options. Ideally in the future I can interface between arc and this/these languages. This way if arc is not a good fit for doing some thing then I can use another language to do that part.
Then I look for libraries or API's that will do that thing for me.
If there are several options, I look for one which seems to be the most practical and straightforward implementation.
These days when I go through this process I most often end up with a library or API written for Perl, Python, Ruby, or Java.
What I would suggest is learning enough of each of these languages so that you can make library calls. Which is pretty easy to do; you don't need to learn a lot to do that.
Then how much you need to program in that language vs. Arc usually comes down to efficiency. Each call from Arc to the other language involves a round-trip of some sort; so if you're doing something in a loop then you'll often want to push the code to do that loop into the other language. So you may end learning more of the other language as you translate some parts of your Arc code into the other language.
One thing that bugs me sometimes with negative indexing is that 0 doesn't always wrap around the way I expect it to. This comes up when I'm trying to write code like (cut seq start (- (some-calculation))). Here's a hack that gives the behavior I expect:
(let old-cut cut
(def cut (seq start (o end len.seq))
(let length len.seq
(if (< start 0) (++ start length))
(if (< end start) (++ end length))
(unless (<= 0 start end length)
(err:+ "cut: The sign-adjusted indices were out of range or "
"backwards."))
(old-cut seq start end))))
;? (include "arctap.arc")
;?
;? (test-iso "cut should work for negative start and 0 end"
;? '(2 3 4)
;? (cut '(1 2 3 4) -3 -0))
;?
;? (test-iso "cut should work for positive start and 0 end"
;? '(2 3 4)
;? (cut '(1 2 3 4) 1 -0))
;?
;? (test-iso "cut should assume 0 start and 0 end are same position"
;? '()
;? (cut '(1 2 3 4) 0 -0))
(I haven't actually used arctap.arc yet, so I'm just parroting you in that section and hoping it helps.)
Unfortunately, if I have code that does something like (cut '(1 2 3 4) ref!start-trim (- ref!end-trim)), then this approach fails too (because of that double-zero assumption). In that case, I suppose I'd just resort to writing another function as a workaround.
(def cut-sides (seq front back)
(cut seq front (- len.seq back)))
I've searched through lots of the code I've written, and as it turns out, I haven't found one case where being having 0 as a "negative" index would have helped. :-p So while I still like it better my way, I don't have a real use case to show.
From another standpoint, maybe it's just that I don't want to rely on the behavior of something like (cut '(1 2 3 4) 3 1), where the indices are reversed. If I can exempt (cut '(1 2 3 4) -3 0) from that error/undefined zone (in a way that's smoothly consistent with cut's other behavior), then cut may be slightly more useful to me at some point. But yeah, I don't know exactly when it would pay off or whether some other behavior would be better.