HNHacker News
TopNewBestAskShowJobs

11ren

213 karma · joined December 31, 2008

submissionscomments
11ren··on Ask HN: How do you deal with alienation?
Data: fat; small; tall

    fat:   "tall is Life"
    small: "tall is Death"
    tall:  "tall is Dungeon"
Reasoning: tall is Life, Death or Dungeon. He can't be Life, because if he was, he would have said he was. So he's Death or Dungeon.

Now, one of the other two must be Life (because tall isn't), and so one of them must be telling the truth about tall. He's called Death and Life, so he must be one of them. We know he can't be Life, so tall is definitely Death.

Whoever called him Death was telling the truth, and must be Life. Only small called him Death, so small is Life. (edit I should have said: Life must be telling the truth about him, so if only one of them does that, that one is Life).

And the remaining guy - fat - must be the remaining knight - Dungeon. Dungeon can lie or truth, so it doesn't matter what he said (in fact, he was lying: he said tall was Life, when tall was Death). It only mattered what he said so we could distinguish between him and small.

    fat   is Dungeon
    small is Life
    tall  is Death
Took about a minute. I had to draw a diagram to track the details - my evolution includes pen and paper. :-P
11ren··on Lazy Linux: essential tricks for admins
There's a tribal aspect, too; not to mention jargon as a barrier to entry. And what professional wants to forgo hard-won knowledge?

That said, I kind of like the weird names, esp grep. (Wasn't that in Stranger in a Strange Land or something?)

But I do object to inconsistent options. One example is: mkdir -p a/b/c This will make all three nested directories, if needed; but there is no equivalent: mv -p x a/b/c/y There also isn't: cp -p a/b/c [1]. You have to create the nested destination directories (a/b/c) first.

[1] cp has a -p option, but with a different meaning...

BTW: It would be nice if HackerNews had the `` markdown of Reddit for inline code. There's been a bit of code sharing recently, and I like that in a "hacker" site.

11ren··on Lazy Linux: essential tricks for admins
pgrep, pkill, rename
11ren··on Ask HN: To Patent, or Not To Patent
Excellent points. My experience is no further than a DIY provisional patent, using "Patent It Yourself" (which seems a little bit unreliable to me).

A danger I've found with patenting is that it encourages a competitor-focus (attack and defend), instead of a customer-focus (making a difference, creating something needed).

Patenting has similarities to a research thesis - articulating the idea helps you understand it; researching prior art contributes to your store of ideas.

11ren··on Ask HN: To Patent, or Not To Patent
Most startups that succeed do it by getting bought, and most acquirers care about patents. Startup acquisitions are usually a build-vs-buy decision for the acquirer. Should we buy this little startup or build our own? And two things, especially, make them decide not to build their own: if you already have a large and rapidly growing user base, and if you have a fairly solid patent application on critical parts of your software.

http://www.paulgraham.com/softwarepatents.html

11ren··on Heyzap Vies To Become A YouTube For Flash Games (YC W09)
A pygmy marmoset with a joystick would make an awesome mascot. http://uartsjournals.com/2006_sara/wp-content/uploads/2007/0...
11ren··on Why Haskell is beyond ready for Prime Time
I think Haskell is intellectually challenging in a way that isn't needed to get the job done. The one exception is for proving things (which so far is not practical - but it's cool, and might become practically useful, one day).

Don't get me wrong: I like the intellectual challenge, and I especially like the Haskell community - they are nice people, excited about what they're doing, very helpful, and just not interested in putting down other languages - and I think there is real beauty in Haskell. It's like a branch of mathematics.

Disclosure: I'm terrible at Haskell's intellectual challenge. It makes me feel stupid. I hate that.

11ren··on Why Haskell is beyond ready for Prime Time
Q. If you append to a linked list, you can't avoid creating an entirely new copy of the list, can you? (prepending is OK, because you reuse the old list).

Or can Haskell's laziness help with this? Can it somehow avoid actually creating the new copy, but instead just return the correct value when you reach the end of the list? So that the new copy is never actually made, but it just behaves as if it was?

11ren··on Why Haskell is beyond ready for Prime Time
I think part of Lisp's success was that academics liked it, so when they did clever stuff, it was related to Lisp. Today, it seems that academics like Haskell (is it true?), and so when they think of clever stuff, it will be related to Haskell.

The "Java of FP" could be C# or F# (although Microsoft isn't willing to go multi-platform, so that might stop it becoming "successful", by many definitions).

But honestly, I don't think there is a powerful enough vector available to carry FP. C had Unix. Java had the net. A novel way to think about the next "Java of FP" is to think of what vector could matter, and then what FP language is well-placed to be carried by it.

Mobile phones are all I can think of at the moment, but no FP has come of it; the netbooks (which are becoming phones) are plain ol' PCs; and the iPhone runs Objective-C (doesn't it?). What's the next IT revolution?

Actually, time_management is right: the next IT revolution is clearly multi-core.

EDIT: I keep hearing about Intel's CUDA for multicore on GPU's, but it's pretty much the anti-FP, being "recursion free" http://en.wikipedia.org/wiki/CUDA#Limitations

11ren··on Why Haskell is beyond ready for Prime Time
I know this is the conventional wisdom, but can you provide support for your claim that multi-core will help FP?

The usual claim is that the immutability of FP will avoid the problems of different processes writing to shared memory, because they only read it.

But Erlang is famous for its concurrency, and this is not due to it being a FP; it is due to its shared-nothing pure-message passing (from Smalltalk). It's another solution.

If you have multi-cores, the problem is not what you do within one core (we can already manage that); it's that you have many cores. If [1] they have their own local memory, then pure-message passing is the inevitable solution.

Anyway, that's my reasoning - I'm interested to hear your reasoning.

[1] At the moment, the on-chip memory is (very small) cache, and so shared memory is an option... but I think it's also inevitable that we'll get sufficient local memory for each core to execute code independently.

11ren··on Things I Learned the Hard Way: Ignore the Content
It's common for geeks to phrase technical points with disrespect. A high-profile example is Linus's rant against C++ http://lwn.net/Articles/249460/ Common enough to warrant pg's How to Disagree.

I wonder, is the emotional part really about something else, as this article suggests? It often seems out of place to me.

11ren··on What Should I Do with My Life, Now?
If you don't know how to make the best of a bad situation, you will never get there. If you are not willing to put up with some shit work, you will never recognize that a good opportunity is staring you in the face. If you are not willing to be humble and repeatedly be a beginner in new areas and learn the details faster than the next guy, you are not capable of transformation.
11ren··on Why Haskell is beyond ready for Prime Time
I thought that was the reason - but if I give the wrong types, it won't work. Often, I can infer the types myself, but why not just tell me? I think there are conventions, like "it's a string or a number unless stated otherwise", and these defaults work great. You just need a little faith in the library writer.

For example, xmlrpclib.ServerProxy takes an URI - is that a string or a special URI object? I guess it's most convenient if it's just a string, but if you had just constructed the URI by concatenating the separate parts, it's inefficient to immediately parse them apart - and so Java has URI objects. Maybe it's just that Python admits it's a scripting language, and uses machine cycles to serve you - instead of the other way round. That's a nice idea.

11ren··on Why Haskell is beyond ready for Prime Time
Haskell has algebraic data types, which are much more expressive than conventional types. You can see that from his example. Of course, the types don't define the functionality, but they narrow it down much more quickly than the ints of C and Java (similar to google ranking of search results).

Python documentation, in contrast, seems to downplay (read: hide) the return type! It's not helpful to me (maybe I'm doing it wrong, or just not used to it). For example: http://docs.python.org/library/httplib.html#httplib.HTTPConn...

11ren··on Apple: Jobs to Take Medical Leave of Absence
I like Steve. I hope he's OK.
11ren··on XML is not S-Expressions
That's very cool. JSON seems a natural conceptual match for querying data like that. I think a different concrete syntax might be more readable for me - but could just be my unfamiliarity. And JSON is an instant, no-work solution, so there's no downside. It would be good to see your project.
11ren··on XML is not S-Expressions
Yeah, I was thinking that. You're also omitting an explicit return, I would guess by assuming the value of the last statement (as an expression) is to be returned (this won't work in general, because Javascript allows multiple returns, like C or Java). It's closer to a lisp syntax, by using nested lists instead of structs/maps. I submit that it's against the spirit of JSON to be able to name the values, and then not use that ability. I think you're Greenspunning it ;-). Sure is shorter though. :-)
11ren··on XML is not S-Expressions
Interesting, thanks. Would you say this "malleability" issue would be addressed if the XML could be bound (databinding) to arbitrarily different object structures?

BTW: I meant that specific problem you mentioned (which was a non-conforming xml document) - how would JSON/sexps make that specific one easier to solve?

11ren··on XML is not S-Expressions
Two different programs that use the same XML Schema - that write to the same interface specification. It's just an API. No, not magic pixie dust, but it helps. I think we'll get standard XML Schemas (like the per industry efforts), for specific purposes. It's not really the XML that helps, but the standardization of the interface. But even that's hard. However, there's a lot of money to be saved and agility to be gained, so this (or something like it) is inevitable. It's a worthwhile endeavour.

I was mainly addressing your comment elsewhere about people who like to lock things down, and specify them upfront. For interfaces, you really do need to agree on some things, and be strict (within those tolerances). Someone changing an interface on you can be pretty frustrating.

11ren··on XML is not S-Expressions
Error messages are difficult to do right, and it's one area where (for example) DSL's tend to fall down. You might have a beautiful DSL, and think that it's finished, because you - as the designer - don't make mistakes with it (perhaps because you're really smart; really know the tool; or really haven't used it). Even some fully fledged languages have poor error reporting.

For a grammar specification language (like XML Schema) to do a really good job, it really should also formalize how to specify error messages for that particular grammar. I'm not sure how hard it would be to do this, and I haven't seen any research on it.

An odd thing about XML Schema is that it's not very resilient - when this was supposed to be one of the cool thing about "extensible" XML. The next version is a little better at this. But it sounds like in your case, you wanted to get an error (because there was a real problem), it's just that you couldn't trace where it came from, or what its meaning was in terms of the system. It sounds like a hard problem. BTW: would using JSON or sexps have made this problem any easier? I think it's much deeper than that.

11ren··on XML is not S-Expressions
It's a cynical story, that of course has some truth to it. I like to focus on the visionaries, who are seeking a better way (to be more profitable). Once a new way is seen and proven, others (who are less comfortable with risk) become interested. If the time is right, and enough people are convinced, there's a revolution, and a new technology is adopted.

There's a range of people in any industry - I doubt that many fit the black-and-white stereotype that you paint. There are also real advantages of standardization (such as being able to swap different items in and out), which comes at a cost of inefficiency. The interfaces to those standards must be rigid (within tolerances), or you can't reliably swap the modules. It's a trade-off.

11ren··on Joel on Software: "By installing Java, you will be able to experience the power of Java"
I hadn't thought of that aspect. Being public makes it worse. Personally, I've always appreciated feedback on a website - but in a discussion, I agree it's a diversion that undermines the message (and is annoying). Commenting on blogs are sort of in between those two (really, a discussion if the blogger also comments, as they often do).

Some kind of threaded comments might help. e.g. on reddit, you can compress the joke-thread and the pun-thread, to get to the on-topic commentary. A "typo thread"? Or an explicit "typo" tag (which you could hide from the public, and so disable captcha, if you wanted).

But I haven't seen threaded comments on blogs - maybe they aren't needed? It seems an obvious idea to try.

11ren··on XML is not S-Expressions
Thanks. It's a bit odd, because I don't think anyone thought SOA would do that much. It's been always vendor-driven. At least it's better than CORBA, the previous monstrosity in that role. But yes, with the recession, there may be an opportunity for something better and cheaper...
11ren··on XML is not S-Expressions
The article suggests Lispers could have used sexp as a front-end to LaTeX, in the same way that XML was used as a front-end to LaTeX. Very easy to do.

> If S-expressions were easier to edit, it would be most logical to edit the document in S-expressions and then write a small Scheme program to convert S-expressions into a formatting language like LaTeX. This is, what XML and SGML people have done for decades [...]

11ren··on XML is not S-Expressions
If Javascript used JSON in the way I described, it would look something like this (view page source for original):

  {
    "function": {
       "signature": {
         "name": "byId",
         "args": ["id"]
       }
       "body": {
         "return": {
           "call": {
             "target": "document",
             "method": "getElementById",
             "args": ["id"]
        }}}
  }}
11ren··on XML is not S-Expressions
Hmmm... I don't think hackers ever went towards XML. The old C hackers hated it (too inefficient.)

The nice thing I see in XML is that it abstracts out grammars (using XML Schema / DTD). For JSON, a grammar isn't used - it's a nested tuple transmission format - sort of a dynamic type systems, but without, er, types - just tuples that can contain anything. It's agile, and all you need in many cases. And JSON is a natural for web-client stuff.

BTW: who said SOA is dead? SOA doesn't solve any pressing problem, but all the vendors switched to it.

11ren··on XML is not S-Expressions
Do you have references for that exodus?

By Google, XML is winning 50 to 1 - but declining, and JSON is growing: http://www.google.com/trends?q=xml%2C+json&ctab=0

However, a factor is that people already know about XML and don't need to search for it. e.g. HTML is declining even faster: http://www.google.com/trends?q=xml%2C+json%2C+HTML&ctab=...

11ren··on XML is not S-Expressions
> you can't use the Jabber protocol by hand over telnet like you can use POP3, SMTP, IRC.

There's an intriguing view that text can't be used by hand either - you have to use a "text shell". Wouldn't a fair comparison use an "XML shell"? If it knew the schema, it could even autocomplete/intellisense for you, showing you the available choices at that point... it's pretty cool how XML has factored out the grammar of a language, in a reusable way.

I don't know the Jabber protocol, but the difficulty I've experienced with web-based XML protocols (web services) is that the http header needs the length of the message, which is hard to do by hand - it's not due to XML (and a "http shell" would fix that...)

11ren··on XML is not S-Expressions
JSON is another contestant in the generic data serialization space, which is doing better than sexp - possibly due to the ubiquity of javascript (free-riding the web). Though, for this technology generation, the fight is over.

I think there'll be another chance when SOA/web services are superseded; but there's still huge scope for improvement within their present architecture/ecosystem (e.g. REST vs. SOAP vs. ?).

For programming languages, sexps are competing against all the other language syntaxes out there, not just XML. I agree that it seems odd that ant uses XML though... perhaps the extensibility of ant is easier with some kind of generic format (like XML/sexp/JSON)? yet other languages manage to be extensible via functions/classes/modules etc.

Thank goodness no one uses JSON to encode a language (in the way that ant uses XML).

11ren··on Joel on Software: "By installing Java, you will be able to experience the power of Java"
Yes, I meant a direct message too - like a flag - because it would discourage spammers. I didn't unpack it, so it was ambiguous.

I'm not sure if the "10,000" reports would happen; have to try it and see. It's probably more like bug-reports, or 37signal's "feature requests" (that they read and throw out). And, if you fix the typo, the reports stop. :-) It's hard to judge, but I think you'd have to be massively popular to get even one or two typo reports. But I don't know: need to do the experiment.

Maybe a lower-cost solution would be just to add "prompting" text next to the comment box, something like: "typo corrections are welcome", to encourage people.

Typo reports (bug reports?) aren't that common: for example, I made a comment on a typo to Tim O'Reilly's recent blog - but no one else had.

← PreviousPage 2 of 3Next →