News for hackers. Stuff that matters.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by far33d on Thursday February 07, 2008 @01:19PM (#111145)
So. A note to all the "unicode makes this unusable" people -

Apparently, while you were complaining, someone else was solving.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by menloparkbum on Thursday February 07, 2008 @02:05PM (#111227)
Thanks, grandma.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by henning on Thursday February 07, 2008 @03:55PM (#111382)
OK. Now how about database access (with support for prepared statements), regular expressions, and networking?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by benmathes on Thursday February 07, 2008 @04:11PM (#111397)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by henning on Thursday February 07, 2008 @04:17PM (#111401)
Super-duper. I'm not going to use Arc for anything serious until essential libraries are in place.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @05:35PM (#111491)
Different people have different ideas of serious. To me, exploratory programming is fairly serious, because that's the kind of programming that generates ideas.

Arc is already capable of supporting some subset of applications that are serious in your sense. News.YC is at least moderately serious in that sense.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by henning on Thursday February 07, 2008 @05:50PM (#111512)
You said News.YC uses some kind of persistent hash structure for storing everything. This seems to me like Greenspun's Tenth Law except with Berkeley DB instead of Common Lisp; I wouldn't want to write the logic to do what BDB already does much better and faster (I don't want to implement ACID transactions myself if I decide I need them).
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by niels_olson on Sunday October 12, 2008 @09:28PM (#330643)
news.arc stores all information in flat files as lists.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Xichekolas on Thursday February 07, 2008 @04:44PM (#111418)
Darn.

At least you were kind enough to let us know.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by sammyo on Thursday February 07, 2008 @07:14PM (#111618)
Well you'll be late to the table for Web 3.0 then... ;-)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by benmathes on Thursday February 07, 2008 @06:35PM (#111582)
clarification: Arc should probably have some kind of database hook at some point, not much point in reinventing that wheel when it works so well for many problems. But that's not the point, as the author has repeatedly pointed out.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Kaizyn on Thursday February 07, 2008 @06:29PM (#111572)
Which of those are you planning to contribute?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by eru on Friday February 08, 2008 @03:55PM (#112334)
I'd love to see regular expressions as s-expressions in arc - not pasted on as interpreted strings.

Actually I think I have seen a library for MzScheme that does it this way.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pchristensen on Friday February 08, 2008 @05:30PM (#112392)
Also curious how this would look
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by eru on Monday February 18, 2008 @12:31AM (#117950)
It could look like this: (* (+ "a" (* "b"))) for: "(a+b)" [Perhaps you prefer not to re-use + and * for this.]

Sure, it's somewhat more verbose for this toy examples - but every intermediate expression (and the whole thing) is a Lisp-Object in its own right.

You would not even need macros.

Edit: There is a place for macros here to make things less verbose. Just write a macro that 'compiles': (* (+ a (* b))) into the form above.

For convenience you can offer a function that builds RegExps out of strings in the usual way.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by sjs on Friday February 08, 2008 @11:58AM (#112167)
There is a public git repo anyone can push to (the so-called git "wiki", or anarki). It contains regular expressions. You could wrap some DB bindings for mzscheme with relative ease.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by microdan on Thursday February 07, 2008 @02:07PM (#111234)
I think the complaints were more about how pg was originally saying that he intended to never support Unicode. That said, people should realize that UTF-8 encoding/decoding is the zeroth step to internationalization with Unicode.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @02:12PM (#111249)
pg didn't say that. people just made it up.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @02:27PM (#111285)
He did however say:

"It's not for everyone. In fact, Arc embodies just about every form of political incorrectness possible in a programming language. It doesn't have strong typing, or even type declarations; it uses overlays on hash tables instead of conventional objects; its macros are unhygienic; it doesn't distinguish between falsity and the empty list, or between form and content in web pages; it doesn't have modules or any predefined form of encapsulation except closures; it doesn't support any character sets except ascii. Such things may have their uses, but there's also a place for a language that skips them, just as there is a place in architecture for markers as well as laser printers." (http://arclanguage.com/)

I certainly interpreted this as ASCII-only (along with presentational markup) was an explicit design decision, and I don't think this is a far-fetched interpretation. Luckily PG has clarified (http://news.ycombinator.com/item?id=111189) that this is not really what he meant, and now everyone is happy and has regained trust in Arc!

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @04:42PM (#111415)
What kind of site does it make YC if this is how to get karma?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rms on Thursday February 07, 2008 @05:38PM (#111492)
there is a very different pattern of karma for comments in "big" threads.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @05:45PM (#111504)
On reflection: your reply is ♫♪♫ to my ears. I ♥ good points...

Edit: heh, "thanks grandma" has even more than that.

Edit: btw it's funny that i'm still being upmodded

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @06:25PM (#111563)
so someone downmodded all of:

- a simple, popular comment

- a comment suggesting maybe the first one shouldn't have been upmodded so much

- a comment backing off

Why would you downmod all of them? If you like dislike the first comment, you should like the second, and vice versa. And if you're unhappy with me in general for the first two, you should like the third one.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by euccastro on Thursday February 07, 2008 @07:55PM (#111644)
1) How do you know the same person downmodded the three?

2) Simplest explanation for that case would be that he's downmodding the latter two as noise. You can agree to a comment and still believe it doesn't add anything to the topic in which it appears.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by immad on Thursday February 07, 2008 @08:04PM (#111651)
I downmodded because the discussion was getting too meta :P
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @10:14PM (#111743)
all 3 downmods appeared between quick refreshes.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by gojomo on Thursday February 07, 2008 @01:15PM (#111141)
♫♪♫ to my ears. I ♥ unicode! To ∞ and beyond, ☺
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tocomment on Thursday February 07, 2008 @10:37PM (#111766)
How do I make the infinity? Actually where do I get all those symbols?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by erydo on Thursday February 07, 2008 @11:43PM (#111819)
You have to buy a unicode keyboard. They have over 95000 keys and take up about nine square meters. Hope you have a big desk.

(Sorry, I couldn't resist)

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Saturday February 09, 2008 @01:27PM (#112750)
You know, that would actually be an amusing hardware-hacking project.

If you made a keyboard that had every character in every language spoken in the EU, you could even file to make it a standard with whatever earnest standards body is in charge of such things. No linguistic minority should have to use control keys! It would be like giving peanut butter to a dog.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ivankirigin on Saturday February 09, 2008 @09:56PM (#112867)
A smart bureaucrat might mandate dynamically rewritable keys and get the Optimus http://www.artlebedev.com/everything/optimus/

But smart people don't endeavor to regulate minutia.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Xichekolas on Monday February 11, 2008 @12:07PM (#113448)
But smart people don't endeavor to regulate minutia.

I think you just implied that all politicians are dumb. I agree.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by gojomo on Friday February 08, 2008 @02:19AM (#111891)
I used WindowsXP 'Character Map' accessory for the ♫♪ and ♥. I think I copied and pasted the ∞ and ☺ from http://www.bigbaer.com/sidebars/entities/ .
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by eusman on Thursday February 07, 2008 @11:38PM (#111816)
http://www.unicode.org/charts/ (characters)

http://www.unicode.org/charts/symbols.html (geometrical shapes etc)

As I understand only UTF-8 is supported, so forget characters for UTF-16 and UTF-32 (but you rarely need these anyway)

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by docmach on Friday February 08, 2008 @12:44AM (#111852)
UTF-8 can represent any Unicode character.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by eusman on Friday February 08, 2008 @02:40AM (#111901)
yeah i confused that with ISO 10646 (has the 3 levels which specify unicode, not all levels support the same characters) and UCS2, which UCS2 is essentially UTF-16, so i meant if he used any characters bytecoded in UTF-16 essentially he'd have a problem, although utf-8 doesnt support certain octets. UTF-8/16 were not yet part of the standard before UCS version 2.0. Been a while I guess since i got updated
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tocomment on Friday February 08, 2008 @11:56AM (#112165)
Ok, so I see infinity is U+221E(http://www.fileformat.info/info/unicode/char/221e/index.htm), now how do I go from that to posting it on a forum like this?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tocomment on Sunday February 10, 2008 @11:46PM (#113227)
Well, I went ahead and made this tool (http://utilitymill.com/utility/Display_Unicode_Char_From_Hex)

to answer my own question.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mdemare on Friday February 08, 2008 @12:09AM (#111833)
If you have a mac, Cmd-Opt-T
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by prescod on Thursday February 07, 2008 @02:42PM (#111306)
Do I understand correctly that Arc strings are sequences of octets?

If so: I really don't want to be a negativity guy but it seems like every language that has made an 8-bit string the default string type has regretted it later because it is so painful to change it without breaking code. Okay, Paul says that he won't mind breaking code. Maybe he means it, but it doesn't make any sense to me to knowingly and consciously repeat a design mistake that dozens of other people have made and regretted.

It really just takes one day to get this right. You need to distinguish between the raw bytes read from a device and the true string type (which needs to be 21 bit or greater). You need a trivial converter from one to the other (which you can presumably steal from MZScheme) and back.

That's it. You get this right at the beginning and you never have to backtrack or break code.

My apologies in advance if this post is based on incorrect premises. I'm trying to help.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @02:55PM (#111318)
Arc snarfs the string implementation from MzScheme which support Unicode in The Right Way, as code points rather than octets.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by prescod on Thursday February 07, 2008 @03:51PM (#111380)
So should I infer that the only reason UTF-8 is mentioned is that the reader APIs do not let you select the codec? Or is even that provided in which case it is accurate to say that Arc supports Unicode-in-general?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @04:05PM (#111389)
Arc uses MzSchemes reader (it modifies the readtable slightly to support []-syntax). AFAIK you cannot access the reader API from inside Arc. The reason Utf-8 is mentioned is that it is the default encoding when MzScheme reads or writes files or streams.

I don't think anyone at this point would claim that Arc supports unicode-in-general.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dzorz on Thursday February 07, 2008 @05:11PM (#111455)
Could you offer a better solution? What would your solution offer that octets do not? Random character access? No, because not a single unicode encoding offers easy random character access (because they are made of possibly several codepoints, which, in some encodings, are made of more than one basic "chars"). Gylph, word and sentence segmentation? I guess not.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @06:10PM (#111538)
Abstraction. Having Unicode strings (i.e. strings that are a sequence of Unicode code points rather than octets) allows you to work with strings without worrying about encoding (except when doing IO, which is where encoding matters).

If you treat strings as octets OTOH even simple operations like concatenating two strings might lead to headache if the strings are in two different encodings. And how do you keep track of the encodings of individual strings? Madness lies down that road.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nickb on Thursday February 07, 2008 @04:53PM (#111430)
.(; sɹǝpuoʍ sǝop ǝɹnssǝɹd ɔı1qnd ɟo ʇıq ǝ1ʇʇı1 ɐ 'ǝǝs ¡ʍou ǝɯosǝʍɐ sı ɔɹɐ uı ʇɹoddns ǝpoɔıun ¡ɥɐɥ
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dcurtis on Friday February 08, 2008 @01:46AM (#111880)
Yes, because writing upside down is so incredibly useful! How did we ever live without it?

/sarcasm

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mdemare on Thursday February 07, 2008 @02:07PM (#111239)
Nâh, dâh zèn we maui klâh mei...

    (define Y
      (λ (m)
        ((λ (f) (m (λ (a) ((f f) a))))
         (λ (f) (m (λ (a) ((f f) a)))))))
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Zak on Thursday February 07, 2008 @03:55PM (#111383)
Great... but that's Scheme, not Arc.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Tuna-Fish on Thursday February 07, 2008 @07:07PM (#111610)
oh yes.

Make λ an alias of fn, and have it replace automatically in whatever editor you use?

fn is fast to write, but λ is much more readable, 'cos it stands out.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olifante on Thursday February 07, 2008 @02:08PM (#111240)
Wikipedia to the rescue: "The butter is melted and the flour stirred into it (slowly but surely), until it is has blended with the butter." (http://en.wikipedia.org/wiki/User_talk:S.Örvarr.S)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by timr on Thursday February 07, 2008 @09:23PM (#111701)
It's an icelandic recipe for roux?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pchristensen on Thursday February 07, 2008 @01:07PM (#111131)
What language is that? I'm guessing Icelandic; it's a little too unicodey to be Danish or Norwegian, but the words look similar.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @01:19PM (#111146)
Good guess.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by vidar on Thursday February 07, 2008 @01:43PM (#111185)
As an Icelander, I must surely ask what pushed you to use Icelandic as an example. :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @01:48PM (#111190)
That it would look foreign to the maximum number of people.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by brent on Thursday February 07, 2008 @05:11PM (#111454)
Success!!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by r7000 on Thursday February 07, 2008 @02:10PM (#111245)
People love thorn. Anglos used to have it and now that it's gone, they miss it.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by willchang on Thursday February 07, 2008 @11:34PM (#111815)
I don't þink ðere's any reason we can't have ðem back -- þorn and eð, I mean.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by queensnake on Thursday February 07, 2008 @05:35PM (#111489)
Does Icelandic have the 'th' sound? I've heard that English is the only European language with it, but if Icelandic has the written thorn, maybe you have that sound too?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mathrick on Thursday February 07, 2008 @06:43PM (#111592)
It does, that's precisely what þ and ð represent (the unvoiced and voiced variants respectively, which got folded into the same "th" in English). Also, þorn is the best letter name ever :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by yrashk on Friday February 08, 2008 @11:39AM (#112156)
Spanish seems to have 'th' as well
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jamiequint on Thursday February 07, 2008 @02:26PM (#111281)
农历新年 Happy (Chinese) New Year!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dmoney on Friday February 08, 2008 @08:39AM (#112032)
I'll never understand why asians type all in question marks. It must be some kind of unary system.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tel on Friday February 08, 2008 @10:09PM (#112520)
新年快乐!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by TMCMan on Friday February 08, 2008 @05:03AM (#111959)
If you are wondering: On Linux/X11, there's Ctrl+Shift+[unicde number in hexadecimal], gnome-character-map, umap or KCharMap (ت)

And now for the less serious part:

ሞሡሢ Am I the only one whom these Ethiopic characters remind of Tengwar? BTW, are there Unicode chars for Tengwar? I think there should be! (But not for Klingon, because it sucks.) I have fun wirting this on my ⌨, but ℐ∫ ᚾℍℹ⑀ not pointless? Who cares? Anyway, now we can use distinct characters for Roman numerals: Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅹ,Ⅻ,Ⅽ,Ⅿ! Ye darn kids! Everythin we had was 7-bit ASCII, without parity, and we were damn greatful for it? You think you had it bad? I had to use Morse code for browsing porn, back in my days! And I had to etch my public key into the wall of a rotten ol' cave! We did not have this fancy-shmancy routed network, i had to remember the way from here to there all by myself!

--- this post was presented to you by Too Much Coffee.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by r7000 on Thursday February 07, 2008 @01:04PM (#111124)
Freude, schöner Götterfunken! Tochter aus Elysium!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mixmax on Thursday February 07, 2008 @02:27PM (#111283)
if you search for "Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið." on Google this thread is the fourth result.

Damn fast...

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rams on Thursday February 07, 2008 @01:23PM (#111154)
இது தமிழ
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jey on Thursday February 07, 2008 @02:07PM (#111238)
Tamil++; // (இது C)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rams on Thursday February 07, 2008 @01:24PM (#111155)
हिन्दी
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by polar on Friday February 08, 2008 @12:38PM (#112188)
മലയാളം
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nreece on Thursday February 07, 2008 @09:34PM (#111712)
किसी वस्तु, व्यक्ति, स्थान, या भावना का नाम बताने वाले शब्द को संज्ञा कहते हैं। जैसे - गोविन्द, हिमालय, वाराणसी, त्याग आदि संज्ञा में तीन शब्द-रूप हो सकते हैं -- प्रत्यक्ष रूप, अप्रत्यक्ष रूप और संबोधन रूप ।
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by kmt on Thursday February 07, 2008 @01:11PM (#111136)
Браво!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ph0rque on Thursday February 07, 2008 @02:00PM (#111210)
В самом деле браво!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mojuba on Friday February 08, 2008 @06:07AM (#111986)
Чему вы рады? :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ph0rque on Friday February 08, 2008 @09:11AM (#112066)
Да просто...
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by treeform on Saturday February 09, 2008 @06:13PM (#112822)
Делать нечево...
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ph0rque on Sunday February 10, 2008 @04:27PM (#113089)
Мы все-таки на этом веб-сайте находимся, а не работаем... :~)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by kajecounterhack on Thursday February 07, 2008 @09:02PM (#111689)
Happy chinese new year. 白人看不懂
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tel on Friday February 08, 2008 @10:13PM (#112523)
这个白人看得懂。
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dzorz on Thursday February 07, 2008 @01:06PM (#111129)
И цан’т белиеве ит!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by piranha on Thursday February 07, 2008 @03:24PM (#111349)
И тоо!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by albertcardona on Thursday February 07, 2008 @03:34PM (#111361)
[that 'ts' should be a 'k']
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @01:23PM (#111152)
Røv og nøgler! PG succumbs to the demands of political correctness! Will we soon see mandatory static type declarations and CSS in Arc?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @01:47PM (#111189)
Well, not quite. I gave Patrick an early version of the code, a couple weeks before Arc was released, and he immediately sent me this fix. I just didn't get around to incorporating it till now.

There's a difference between things I don't care about, and things I'm actively against. I don't care about character sets and css, so those things will no doubt gradually get better.

Classic static typing, however, I think is actually a bad idea in a general-purpose language. It makes languages weaker. So it's never likely to happen in Arc itself. However, one of the explicit goals of Arc is to be a good language for writing other languages on top of, and I can imagine plenty of languages for specific types of problems (e.g. circuit design) in which static typing would be a good idea.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dfranke on Thursday February 07, 2008 @02:03PM (#111220)
It's not true that static typing always makes languages weaker. It makes map more powerful, for example: the desired type of output sequence can be inferred rather than having to supply a first argument of the same type like in Arc.

I used to agree with you, by the way -- static typing in most languages feels like a straight-jacket. ML wasn't enough to change my mind. It took Haskell.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @05:54PM (#111515)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dfranke on Thursday February 07, 2008 @06:57PM (#111603)
Interestingly, heterogenous lists are the only example I ever hear cited for how ML-family type systems can cramp your style. It leads me to wonder if the situation is not unlike Fibbonacci sequences and naive recursion.

Anyway, I find that usually when I want a heterogenous list in Lisp, all I really need is a tuple. I want an ad-hoc way to group some values together (i.e., I don't want to bother creating a named structure), but I generally know the type I want in each position.

In the rare situations where I really do want a heterogenous list, Haskell does make it possible. The standard library has a Dynamic type that stores an arbitrary object along with a first-class manifest type identifier. These type identifiers have to be generated at compile time, but GHC has built-in syntax for this, and if it didn't it could still be implemented as a Template Haskell macro, or failing even that, just done by hand once for each user-defined type. That's all the support that's necessary from the core language -- the rest of the dynamic typing system is just an ordinary library.

Now, granted, if you wanted to use manifest typing for everything in Haskell, it would be ridiculously cumbersome and you'd be much better off just using a dynamic language[1]. But if you use it only where it's needed, then the dynamic casts will bloat your program by a couple symbols per thousand lines, and in return you get programs that damn near always work the first time they compile, along with a few other nicities like the one I mentioned above with map.

[1] There are plenty of cases where the converse is true. To name an obvious one, you could write a set of Lisp macros to implement lazy evaluation. But if you wanted to use them everywhere, you'd be much better off in Haskell.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @09:36PM (#111715)
I rarely need to calculate Fibonacci numbers, but I use lists of varied types of objects constantly.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dfranke on Thursday February 07, 2008 @10:53PM (#111785)
So do I -- when I'm working in Lisp. Lisp gives you a Swiss army knife and lets you build specialized tools when you want them. Haskell gives you specialized tools and lets you build a Swiss army knife if you want it.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rkts on Thursday February 07, 2008 @11:19PM (#111803)
To be clear, this is what ML's variant types are all about. You can easily create a list that contains e.g. both ints and chars:

  let mylist = [`Int 5; `Char '5']
Technically the elements have the same compile-time type, but the question is, what practical difference does that make? In what cases are variants an inadequate solution?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jgrahamc on Thursday February 07, 2008 @02:07PM (#111236)
I don't understand why CSS or HTML are being mentioned during the design of Arc. These seem like library issues and your announcement of Arc was spoiled IMHO by the "rant" about HTML and tables. This is only made worse by the Arc Challenge which seems to be more about the design of libraries for HTML/HTTP etc. than the language.

What am I missing?

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mechanical_fish on Thursday February 07, 2008 @03:40PM (#111372)
If your language doesn't support anything but toy apps it quickly evolves to be optimized for building toys.

If the first Arc apps had not been full-featured Web apps, but had instead looked like examples from SICP, everyone would be complaining that the language was only good for computing Fibonacci sequences and writing interpreters for itself.

OTOH, you can't expect a new language to immediately offer the library resources of, say, Perl.

So the plan for Arc's early days seems to be similar to what the Pragmatic Programmer guys called the "tracer bullet" approach:

Tracer code is not disposable: you write it for keeps. It contains all the error checking, structuring, documentation, and self-checking that any piece of production code has. It simply is not fully functional. However, once you have achieved an end-to-end connection among the components of your system, you can check how close to the target you are, adjusting if necessary. Once you're on target, adding functionality is easy.

On day zero, Arc let you construct and deploy every aspect of a useful software system (a web app)... but it took a very narrow and direct path to that goal: emphasis on tables, no Unicode support, borrowing some functionality from an existing Scheme environment, etc., etc. That is what PG was trying to convey in his announcement: the strategic plan for Arc's early days is to work on designing a complete skeleton, but not add a lot of flesh.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @05:49PM (#111511)
I could tell from all the people already dissing Arc before it was released that whatever I released was going to be attacked on any possible pretense. So, like someone bracing himself to be hit, that was what I was thinking about as I was about to release it: what are people going to seize upon as a way of attacking it? Which meant that was what much of the initial announcement ended up being about.

It was a pretty odd situation to be in. If I'd been releasing Arc into a neutral environment, I probably would have said what I wrote in http://paulgraham.com/core.html. But maybe it's just as well I gave all the flames something to expend themselves on before talking about subtler questions.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by LaurieCheers on Friday February 08, 2008 @04:07AM (#111936)
I thought you handled it pretty well. Basically, you wrote a big sign saying "here is the bike shed", to make sure bike-shed commenters had something to occupy them. :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by connellybarnes on Friday February 08, 2008 @02:05AM (#111884)
Actually, it's probably beneficial to encourage flames. Your users are hackers, and flamewars are the only form of public dialogue among hackers. Ergo...
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jgrahamc on Friday February 08, 2008 @03:02AM (#111908)
Fair enough, and after all: "Real programmers ship"
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by bct on Thursday February 07, 2008 @02:10PM (#111246)
I doubt anyone would have commented on the tables thing if pg hadn't made a big deal out of it.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by curi on Thursday February 07, 2008 @02:13PM (#111253)
people did view source on hacker news, saw tables, and brought it up. pg didn't make a big deal out of it first.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by bct on Thursday February 07, 2008 @02:18PM (#111259)
Bringing it up about the website is a separate issue from bringing it up about the language.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nostrademons on Thursday February 07, 2008 @02:26PM (#111278)
By "Classic static typing", do you mean C++/Java-style static typing, or does it include Haskell/ML-style type inference as well?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by pg on Thursday February 07, 2008 @05:52PM (#111514)
I mean the kind that will not let you create a list whose elements could be of any type.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by henning on Thursday February 07, 2008 @06:28PM (#111569)
Java will happily let you fill a list or hash with objects that could be of any type yet it is generally the quintessential blub language.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rkts on Thursday February 07, 2008 @09:29PM (#111705)
No, it doesn't. Elements of a Java collection must all be of the same type. The elements may be implicitly coerced to a common supertype, but if you want to get the original types back you have to downcast--which is basically explicit dynamic typing.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nostrademons on Friday February 08, 2008 @11:47AM (#112161)
You can always downcast in the presence of an instanceof case statement:

   ArrayList myList = new ArrayList(new Object[] { "foo", 42, new Bar() });
   for(Object elem : myList) {
      if(elem instanceof String) doStringThing((String) elem);
      else if(elem instanceof Number) doNumberThing((Number) elem);
      else if(elem instanceof Bar) doBarThing((Bar) elem);
      else doObjectThing(elem);
   }
Or you could keep elements as Objects until you needed to perform a specific operation on them, then cast at the site and perform the operation, letting the ClassCastException propagate if you're wrong. This is basically what Arc does.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by reggieband on Friday February 08, 2008 @10:30AM (#112112)
Have you looked into optional static typing (e.g. EC4 style)? The default Array type for EC4 takes types of all kinds as well. It is a satisfying middle ground.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by dfranke on Thursday February 07, 2008 @07:07PM (#111611)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @06:44PM (#111593)
Thanks for the serious reply. I'm not sure I deserved it :) I appreciate your clarification of the distinction which is not clear from the "manifesto" (http://arclanguage.com/).

I suspected you deliberately mentioned ASCII-only and presentational markup because you knew it would tick off (and hopefully scare away) a certain type of perfectionist which you consider non-productive for explorative hacking.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mixmax on Thursday February 07, 2008 @01:39PM (#111180)
Ååååh another Dane on the ropes :-)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by Create on Thursday February 07, 2008 @02:44PM (#111308)
Öt szép szűzlány őrült írót nyúz. Egy hűtlen vejét fülöncsípő, dühös mexikói úr Wesselényinél mázol Quitóban.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by patrickg-zill on Thursday February 07, 2008 @03:54PM (#111381)
Bork bork bork!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by bootload on Thursday February 07, 2008 @07:47PM (#111636)
Η ευχαρίστηση στην εργασία βάζει την τελειότητα στην εργασία ~ kudos to 'Patrick Collison'
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by eusman on Thursday February 07, 2008 @07:56PM (#111645)
Έλληνας;!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by bootload on Thursday February 07, 2008 @10:29PM (#111758)
Indeed. Aristotle in fact ... translates roughly as "... Pleasure in the job puts perfection in the work ..."
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jey on Thursday February 07, 2008 @02:11PM (#111247)
What needed to be changed? I am no character encoding guru but I thought that treating strings as opaque octet sequences was good enough to "support" UTF-8. i.e. Unless you actively break it, it should work by default.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olavk on Thursday February 07, 2008 @02:31PM (#111295)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by olifante on Thursday February 07, 2008 @02:12PM (#111251)
普通话
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by btw0 on Thursday February 07, 2008 @10:04PM (#111736)
湖北话
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by goncha on Friday February 08, 2008 @12:39AM (#111847)
上海话
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by trevelyan on Friday February 08, 2008 @05:11AM (#111963)
我还是喜欢英文。
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rokhayakebe on Thursday February 07, 2008 @02:22PM (#111266)
geeks. you guys forget about us sometimes. what is this?
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by paulgb on Thursday February 07, 2008 @04:25PM (#111410)
Hacker News now supports "utf-8", a way of storing text that supports characters from languages other than English.

The excitement comes from the fact that Hacker News is programmed in Arc, and the change to Hacker News implies that Arc will soon support utf-8 too.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rokhayakebe on Friday February 08, 2008 @02:58AM (#111904)
thank you sir
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nirs on Thursday February 07, 2008 @06:05PM (#111533)
נחמד.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by leoc on Thursday February 07, 2008 @04:30PM (#111412)
£!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ph0rque on Thursday February 07, 2008 @08:41PM (#111681)
€!!!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by benmathes on Friday February 08, 2008 @01:47PM (#112243)
۩۞۩۞
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by joe24pack on Thursday February 07, 2008 @01:25PM (#111156)
To je výborný !
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by stener on Thursday February 07, 2008 @02:28PM (#111290)
Zdravím do Čech :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by joe24pack on Wednesday February 13, 2008 @07:31PM (#115375)
Byl jsem narozeny cech, spravne prazak, ale ted jsem american. Prominte, muj pocitac nema hacky a carky, a moje cesina je detska.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by rob on Thursday February 07, 2008 @08:24PM (#111668)
åwesøme!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by staunch on Thursday February 07, 2008 @02:21PM (#111264)
日本
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by shiro on Thursday February 07, 2008 @07:13PM (#111617)
testing some pitfalls... U+005c \ U+FF3C \ U+FFE5 ¥

U+007E ~ U+301C 〜 U+FF5E ~

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by tsuru on Friday February 08, 2008 @02:13AM (#111888)
pgの自分で書いた本は日本語に翻訳されているし、これからアークも日本で広げるかなぁ。日本ではリスプを使ってる人はまだいるかなぁ。
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by axod on Thursday February 07, 2008 @03:07PM (#111331)
heh fantastic. I take back all that I said. Nice one ☺
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by morbidkk on Friday February 08, 2008 @04:45AM (#111953)
someone from India --> संगणक प्रणाली - आर्क
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by ipeev on Friday February 08, 2008 @12:34AM (#111843)
Хубаво. Фонта само е някакъв преебан.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by euccastro on Saturday February 09, 2008 @03:32AM (#112637)
það er gaman að lesa. Takk fyrir!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by arundelo on Thursday February 07, 2008 @03:22PM (#111345)
Bona novaĵo!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by hhm on Thursday February 07, 2008 @01:05PM (#111127)
Buenísimo!
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by jalammar on Saturday February 09, 2008 @01:40AM (#112604)
يعيش اليونيكود, شكراً بول.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by btbytes on Tuesday February 12, 2008 @05:51AM (#113924)
ನಮಸ್ಕಾರ. ಸವಿನುಡಿ ಕನ್ನಡ :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by btbytes on Tuesday February 12, 2008 @05:52AM (#113925)
namaskAra, savinudi kannaDa :)
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by nablaone on Friday February 08, 2008 @03:21AM (#111913)
łąś żółć - testing
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by duke on Thursday February 07, 2008 @07:06PM (#111609)
unicode and arc are ♫♪♫ to my ears too.. a fun way to play with arc and unicode might be at http://twext.cc/go/arc
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by mojuba on Friday February 08, 2008 @06:11AM (#111987)
Լիսպը փայլուն է։
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by DanielBMarkham on Thursday February 07, 2008 @10:44PM (#111776)
but ixnay on the igpay atinlay upportsay
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by astrodust on Friday February 08, 2008 @06:29PM (#112414)
☃
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by _bq on Thursday February 07, 2008 @09:06PM (#111692)
pg, you are my hero.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by DXL on Friday February 08, 2008 @08:51AM (#112042)
My name is Daniël. Not sure though if writing that wasn't possible before...
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by n3m6 on Saturday February 09, 2008 @11:02PM (#112889)
މީމަގޭ މާދަރީ ބަސް. ދިވެހި ބަހަކީ ރީތިބަހެކެވެ.

This is my language - Dhivehi. Written right to left.

Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by sabat on Thursday February 07, 2008 @01:37PM (#111177)
Paul Graham rocks.
Re:Smjörið er brætt og hveitið smátt og smátt hrært út í það... by aquarin on Thursday February 07, 2008 @03:26PM (#111350)
ПГ рулз.