HNHacker News
TopNewBestAskShowJobs

ralph

1,089 karma · joined March 1, 2007

Ralph Corderoy, https://plus.google.com/#115649437518703495227/about

C, Unix system and shell, Python, X Windows, ARM, ...

submissionscomments
ralph··on Gold: Google Releases New and Improved GCC Linker
It's being done. It's called LLVM. Apple have been sponsoring it.
ralph··on Is it a good idea to incorporate your startup in a tax haven country?
South African Mark Shuttleworth's Canonical Ltd., you know, that does a lot of work on Ubuntu, is registered in the Isle of Man, a UK tax haven. http://en.wikipedia.org/wiki/Isle_of_man
ralph··on Git is the next Unix
bzr is a far nicer RCS. http://bazaar-vcs.org/ And the next Unix, Plan 9 from Outer Space, but really from Bell Labs, had already implemented the ideas in its Venti filesystem. http://en.wikipedia.org/wiki/Venti
ralph··on Scheme in Commercial Web Application Development [PDF]
Is it continuations you don't understand or their use in web apps? If the latter then you can see them in use on this site when you click "reply". You get a URL ending /x?fnid=bU389jXsk2. That's a FuNction ID that allows the continuation to be eXecuted and run a bit further.

The site used to use them far more but because only the last N continuations were kept, at times of high load users would find the links on the page they were viewing broke on trying to use them; the fnid they referred to had disappeared because N more had been created since. One solution is to increase N. However, any trivial means of generating another M fnids means it's easy for a single attacker to cause N more to be generated.

As troels says, RESTful is the way to go. Continuation in my view are flawed for web apps. AIUI pg got away with it for Yahoo Store because they were only used in the shop design side of things where each shop owner could be given his own N storage of fnids, isolated from others.

It's been discussed before on here, in particular a post by me around end of April/start of May 2007 that caused pg to email me privately about thinking up new "ddos attacks". A while after that, most of the usage of fnids were replaced by conventional-style URLs so also some remain, M is smaller than it used to be.

ralph··on Scheme in Commercial Web Application Development [PDF]
Interesting to see they had the same problems in using continuations that bit pg with news.yc; you garbage collect them too early and the links in someone's browser stops working, too late and your server exhausts memory. Plus, it's trivial to do a DoS; just act like a newly arrived visitor to the site so a new continuation get created for you. See sections 4 and 5 in the PDF.

I can't see a good way around this as long as the server keeps the continuations instead of offloading it to the client.

ralph··on UNIX tips: Learn 10 good UNIX usage habits
The example was using awk to pick "Dec" out in the month column whilst pointing out a grep for "Dec" would also match the filename "December" which didn't have "Dec" in the month column. awk's clearly better than grep in this case.

It's not hard to count the column and you can always do a

    ... | awk '{print $6}' | sort | uniq -c
to see if you've got it right. In fact, a common way to develope the pipeline for a one-off task is to keep appending a pipe and another command to the previous pipeline command. That way, you can see a sample of what's being produced instead of imagining it.

You couldn't have analysed the results of grep, discarding the non-month matches of "Dec" in the time taken to count up to field 6 if the number of lines was at all significant. Don't be silly.

If I did miscount and no lines matched I may be suspicious and look more closely. If some lines matched but on a different column than intended I may notice. I can re-run the command after correction or try the {print $6} idea. How would you notice if your manual* analysis failed to spot the extra result from grep here and there. Would you do your manual analysis twice? Ask someone else to do it too? Or just think "good enough" and use the data for the next stage?

ralph··on UNIX tips: Learn 10 good UNIX usage habits
> How often will I need to make a directory structure that is several levels deep, but only one directory at each level?

When you want to put a file into a directory structure where theres several levels of directories to avoid one directory containing many files, e.g. com/ycombinator/news/foo.

> For someone who was trying to save a few keystrokes, instead of trying waste time getting the right field for awk, just use grep. Its easy, you can't mess it up, and unless the formatting really matters its the best option.

The FA shows grep fails because 'Dec' matches part of the filename instead of just on the date. awk's a worthy solution in that case and formatting of the output wasn't relevant to the point made.

ralph··on UNIX tips: Learn 10 good UNIX usage habits
"It is generally a good idea to enclose variable calls in double quotation marks". No, it's generally a good idea to learn what quotes do and use the appropriate kind when required. Else you're just adding noise to your code.

The backslashes aren't needed in listing 9 since the shell expects more input after `&&' or `||' and automatically switches to PS2.

Using xargs is more subtle than they suggest. If may kick off the given command multiple times. This would make a difference, e.g. `xargs wc' would give multiple totals.

ralph··on RSS feed still broken. Thought pg said it was fixed?
Now fixed.

    $ date
    2008-01-24 12:35:00 +0000 Thu
    $ wget -qO- http://news.ycombinator.com/rss |
    > tr \> \\012 |
    > grep -c comitem
    0
    $
ralph··on RSS feed still broken. Thought pg said it was fixed?
Still broken.

    $ date
    2008-01-23 12:21:20 +0000 Wed
    $ wget -qO- http://news.ycombinator.com/rss |
    > tr \> \\012 |
    > grep -c comitem
    27
    $
ralph··on Ask PG: Database, flat files or other for YC News?
Not CSP, no, but libraries that bolt onto existing languages, e.g. C, Python. I'd love to see it become more of a mainstream technique in Python than `import threading', etc.

For those that wonder what we're wittering on about, visit http://www.cs.kent.ac.uk/teaching/07/modules/CO/6/31/slides/ and read these PDF slides in this order.

    motivation.pdf -- just pages 1-39
    basics.pdf
    applying.pdf
    choice.pdf
    replicators.pdf
    protocol.pdf
    shared-etc.pdf
Ignore the crufty Occam (Transputer anyone?) syntax, just concentrate on the concepts. Although some of the PDFs seem to have many pages, often a page is the same as the previous with a minor change; they're slides!
ralph··on Ask PG: Database, flat files or other for YC News?
Yep, the CSP style of channel communication is great. Those thinking Erlang is better than sliced bread need to make sure they're up on what came before and after; http://swtch.com/~rsc/thread/ Personally, I find Erlang to be too clunky as a language. Good for special purpose telephone switching software maybe, but for general programming the CSP style can be done in nicer ways than having to switch to a whole new language.
ralph··on Hacker New UI issue with comment voting
This site has never made clear what the voting is for. I used to use it for strongly agree/disagree. Then it was changed because someone complained they'd been downvoted on all their previous posts so only up arrows exist on old posts. Since I read interesting looking articles that appear in RSS I only read old posts so this effectively barred me from participating. Dropping down arrows was a poor solution to the problem.

I then realised that the remaining up arrow could be used as a `I've read this post' indicator and started clicking all of them as I read old posts. Very useful to help pick up reading where I left off. Funnily enough, I'm not aware of anyone complaining that they'd got lots of up votes over the period I was doing it. :-)

ralph··on New Feature: get kicked off News.YC on demand
In the past, * was a star, obtained by entering `*'.
ralph··on Ask YC: Spouses
> Did you feel like you could have been more productive if you had be more solitary?

Yes.

ralph··on The future of programming languages in a massively concurrent world
Occam is yet another thing with its roots in Hoare's CSP. See my posts elsewhere on this story.
ralph··on The future of programming languages in a massively concurrent world
I wasn't pushing Stackless, just saying that others have mentioned it and its ancestory has something in common with what I'm trying to sell; channels as a synchronisation method. See the references I gave for more details.
ralph··on The future of programming languages in a massively concurrent world
I'm surprised the decent solution to this isn't more widely known. People have mentioned Occam and Stackless Python; both interesting. But their ancester is Hoare's CSP and other descendant have included Squeak (not the Smalltalk relation), Newsqueak, Plan 9's Alef, Inferno's Limbo, and now libthread.

Channels with co-operating threads are easy to reason about. See Russ Cox's overview page http://swtch.com/~rsc/thread/ for more.

ralph··on The Peel P50: 132 lbs and street-legal in England
Anyone who saw _Top Gear_ last week will know these things are hilarious, especially if you're Jeremy Clarkson's size.
ralph··on What Languages Fix
Perl wasn't the motivation behind creating Python.
ralph··on Funny but Real Linux Commands
Isn't anyone old enough to recognise the csh prompt?
ralph··on "Un-sexy is good business" and other rules from Scott Rafer
A Yorkshireman says "Where there's much, there's brass, lad".

http://www.phrases.org.uk/meanings/408900.html

ralph··on An Interview With Paul Graham...
Do you suffer from brown tongue disease over there? We're currently suffering the first cases of it in the UK. Could be quite a problem. http://news.bbc.co.uk/1/low/uk/7018205.stm
ralph··on New productivity tool launches Friday. Thoughts and feature requests?
Consider allowing imports of existing chains for other popular sites.
ralph··on Did Facebook get hacked today?
Password Standify?
ralph··on Connections: an alternative view of change [documentary]
No, I don't think they do. I think they use %HH encoding.

http://en.wikipedia.org/wiki/Connections_%28TV_series%29

ralph··on The Dangers of a Startup
Pathetic drivel.
ralph··on Geni: 5 million Profiles In 5 Months
Do you mean the bit about a user providing others' email addresses when putting them into a tree? Only, family tree making sites, including ones that spot possible "same people" between trees and tell both parties, have been around for years.
ralph··on Why not beat Google?
Linus re-implemented an existing thing; Unix. He didn't go off and invent his own OS with its own concepts, e.g. Plan 9. I think he's a bad example for your point.
ralph··on Showcase of websites powered by Django
It does point out which sites have made source available, which is useful if you're looking for how things have been implemented. I didn't think it was just about the visual design of the site.
← PreviousPage 18 of 26Next →