HNHacker News
TopNewBestAskShowJobs

Chirono

488 karma · joined May 3, 2010

submissionscomments
Chirono··on My idea to "Kill Hollywood"
This is a great idea.

Imagine a film-making business with the same allure for arts graduates that Google etc have for comp sci graduates. Like you say, being payed $30K+ straight out of film school is quite attractive, especially if it's at a place famed not for the politics and ladder climbing of Hollywood, but for creativity and freedom. A place where you get to try out new things and be bold with your art. Maybe even have a 10% project...

Chirono··on Haskell web programming (a simple tutorial)
As long as it was also possible to do some non-dumb things, of course...
Chirono··on Page layout algorithm improvement

  | I wonder how much the in-house expertise of developing Chrome is contributing to the GoogleBot analysis stuff
If anything, I expect the contribution worked the other way, with the rendering engine being developed purely for search, and then fleshed out into a full browser. There was an interesting post about this a few months ago:

  http://news.ycombinator.com/item?id=3182579
Chirono··on This Photograph Is Not Free
Also, you probably mean "wrath of a thousand pedants" not "wraith".
Chirono··on Why wasn't the Windows 95 shell prototyped on Windows NT?
Anyone know of an easy way to simulate a slow bandwidth connection?

There was some talk a while ago about an app called slowy that does just this.

https://news.ycombinator.com/item?id=3294687

Chirono··on Spark
Try changing line 120 to

  echo -e $"$(print_tick $number)\c"
And it should work fine.
Chirono··on Plasma Speaker by StudentRND
That /was/ coming from the plasma speaker.
Chirono··on Caml Trading: Experiences in Functional Programming on Wall Street
Your website mentions low-latency-execution; how well have you found Haskell can cope with this? Have you run into problems with GC pauses etc? From my experience, major GC collection can be quite large and can't really be avoided...
Chirono··on Caml Trading: Experiences in Functional Programming on Wall Street
Take a look here: http://www.haskell.org/haskellwiki/Haskell_in_industry

There are a number of banks mentioned such as Bank of America, Barclays Capital and Cedit Suisse. A company called Allston Trading is apparently using Haskell to do some HFT too.

Chirono··on How To Become A Better Programmer By Not Programming

  The common trait I've seen in all exceptional programmers is an ability to 
  keep a tremendous number of details in memory at one time
Would you care to elaborate on this? I'm a programmer with 'precise and mathematical mind' and I'd say that my one big weakness is exactly that: I struggle to large numbers of disconnected facts in my head at one time.
Chirono··on Which programming languages correctly handle irrational/transcendental numbers?
There is an implementation of exact real arithmetic that has been verified in in Coq[1] and also an implementation in Haskell[2] which may or may not do what you want to do.

It really does depend on what you want to compute. For instance, I can provide a simple implementation in Haskell that includes addition, multiplication and square roots: data Real = Real

  add :: Real -> Real -> Real
  add _ _ = Real 

  multiply :: Real -> Real -> Real
  multiply _ _ = Real

  squareRoot :: Real -> Real -> Real
  squareRoot _ _ = Real
 
  zero :: Real
  zero = Real

  one :: Real 
  one = Real
but it isn't very interesting as you can't print things or test for equality...Any implementation of real numbers that includes those is going to be much harder[3].

[1]http://videolectures.net/aug09_spitters_oconnor_cvia/ [2]http://www.haskell.org/haskellwiki/Exact_real_arithmetic [3]http://en.wikipedia.org/wiki/Tarskis_undefinability_theorem

Chirono··on Is Faster-Than-Light Travel or Communication Possible?
Further, time doesn't exist. Not in the classical sense... If you are on a ship traveling close to c, the rate of entropy in the matter and energy on your ship is lower than the outside universe. That's why time seems slower.

Not trying to be facetious, this is a genuine question, but rate of change in entropy with respect to what?

Chirono··on JSHC: a haskell compiler/interpreter written entirely in javascript
If you want to give something like that a go, then a good place to start is by modifying or adding to an existing compiler. It will give you some exposure to other peoples code too and a good place to start - you'll always have something with tangible results.

Either that or read op on writing interpreters. They can be amazingly simple...

Interestingly, the report mentions that none of the authors knew Javascript before they started.

Chirono··on JSHC: a haskell compiler/interpreter written entirely in javascript
It looks like this is for a Bachelor's degree at the university of Gothenburg. From the abstract of the project report[1]:

Development of large web based applications using scripting languages such as PHP or JavaScript can be difficult given the lack of static type checking and abstraction through module systems in many such languages. We argue that static type checking and module systems can help programmers avoid common errors when developing large web appli- cations. The literature indicates that adding an extra layer of abstraction on top of the scripting languages that provides these features can be a solution to this problem. We suggest a solution where the statically typed functional language Haskell is com- piled to JavaScript code, enabling programmers to create web applications in a modular and type safe environment.

An implementation of a compiler, supporting compilation of a subset Haskell to JavaScript, JSHC, is presented as a proof of concept. The compiler has a graphical interface in the form of an Emacs-like text editor extended to contain an interpreter terminal, to allow execution of arbitrary expressions. To allow for client-side compilation, the compiler is written entirely in JavaScript. A comparison between JSHC and another JavaScript based Haskell implementation is presented, as well as some unexpected issues with the Haskell specification.

[1] https://github.com/evilcandybag/JSHC/blob/master/report/proj...

Chirono··on Mysterious number 6174
Strangely enough, this isn't actually true! Ok, so it is true that if you were to go through one by one and label some real numbers with natural number, you would never run out. But the interesting thing comes when you start with the assumption that you have labelled every real number with a natural number. Turns out there's always some left over...

There is a famous proof about this by Georg Cantor: http://en.wikipedia.org/wiki/Cantors_diagonal_argument

Chirono··on Types Are Anti-Modular
Haskell's module system isn't very advanced. In fact, it about as simple as it could get. This is pretty well known known and there are proposals floating around to add more advanced features. But there generally isn't much need and, as you mention, adding things like module type parameters prevents many cross-module optimizations (which GHC does quite aggressively).

In practice, it doesn't seem to cause much of an issue, but this may just be down to how Haskell tends to be used.

Chirono··on Compilers and Compiler Generators
Compilers are amongst the most complex programs that get written and exist at a sort of theoretical/practical junction. Compilers attract both academics, for the theory, and low-level hackers who want their language to be as fast as possible.

For instance, parsing is one area that has been researched in incredible depth and the parsers that you find in modern compilers (often) reflect this research.

There are also many interesting algorithms found in things such as register allocation, control flow analysis etc.

Personally, I find working on compilers fascinating. If you've never written any sort of interpreter or compiler, I would recommend giving it a go. Creating a language that you actually use to program is immensely satisfying.

There's also the point that if you are interested in optimisation then compilers are a fantastic place to get stuck in Optimise a part of a spreadsheet program and, well, your spreadsheet program will be quicker. But improve the code generator of your compiler and every program will be quicker!

Chirono··on Erlang inventor: Why do we need modules and files?
Dependent typing has some interesting things to say about modules, or lack thereof. Cayenne[1] is a functional language that doesn't have modules as its type system is expressive enough to cope with the necessary encapsulation -- you can create the module structure just by using types.

Unfortunately, dependent types make typechecking undecidable so there are drawbacks to this approach...

[1] http://en.wikipedia.org/wiki/Cayenne_(programming_language)

Chirono··on Why are so many people in their 20s taking so long to grow up?
Well, that's not strictly true. There have been plenty of societies that have collapsed in the past, if not ones of which we have been a part.

Noting that our society hasn't collapsed so far and using that to infer that opinions like this have no merit is one mother of a sampling bias.

Chirono··on Artisanal pencil sharpening
That is incredible.... And he does it without any sort of magnifying glass. Wow.
Chirono··on Update on Deolalikar’s Proof that P≠NP
It's strange how I read that as `hypothesizes` first time through, without noticing that it said something completely different...
Chirono··on Update on Deolalikar’s Proof that P≠NP
I didn't know that there was more than one group, thanks. I knew that the contributors changed over time but not that there where several groups.

Either way, their work has been very useful.

Chirono··on Update on Deolalikar’s Proof that P≠NP
I really like the idea of "proof by wiki" that the author mentions. It had some success with the polymath proof of the Hales-Jewett theorem a while back (https://www.hypios.com/thinking/2010/01/13/massively-collabo...). Along a similar vein, the french group of mathematitions who published together under the pseudonym N. Bourbaki laid down a huge amount of mathematics in the 1930s. Their work became the foundation for much of the rigorous mathematics of the last century.

Of course, no-one ends up with a famous theorem under their name as no one person can claim they proved the theorem. But from the point of view of the mathematics world, it seems like a great idea.

Chirono··on Extremist group tries to game Digg
The article is coming true! Look, this comment was telling me new things that I didn't know about google and what's happened? It's been censored from me by people (no doubt some sort of google maffia) "burying" it.
Chirono··on Ruby Benchmark
This is always rather ambiguous terminology. For some people, it makes no sense for thing a to be more than 100% faster than thing b. Other people see it clearly meaning that thing a take half the time of thing b.

What we really want to measure is time quantities rather than speed quantities. I find comparisons of time much easier to grasp than comparisons of speed.

Chirono··on Big Data in Context
Odd sort of graph at the top, comparing data to number of transistors in completely different units and without any scale...

Does anyone have more detail about what they mean by "data is growing faster than processing power"? Which data?

Chirono··on Top organizations in CS research
How do you do the formatting like that?
Chirono··on Top organizations in CS research
Exactly what I thought. Here are the first 30 complete with terrible formatting:

UPR8011 Centre d'Elaboration des Matériaux et d'Etudes Structurales 187.36

J. Craig Venter Institute 70.09

Sri Lanka Press Institute 56.33

European Molecular Biology Laboratory 43.45

Apple Computer, Inc. 41.84

Wellcome Trust Sanger Institute 36.47

Swiss Institute of Bioinformatics 32.86

Google Inc. 28.5

European Bioinformatics Institute EMBL 28.2

Digital Equipment Corp. (DEC) 28.12

Palo Alto Research Center 27.21

Howard Hughes Medical Institute 26.18

Sun Microsystems Laboratories 24.43

Harvard University Harvard Business School 24.35

AT&T Labs Research 23.04

Santa Fe Institute 21.65

National Institute of Genetics Mishima 21.24

Salk Institute for Biological Studies 20.67

Bell Labs (Lucent Technologies Inc.) 20.53

University of California Berkeley 20.53

Weizmann Institute of Science 20.52

Yahoo Research Labs 20.28

University of London 19.69

Stanford University 19.63

Princeton University 19.51

Massachusetts Institute of Technology 19.14

Cisco Systems, Inc 19.06

Argonne National Laboratory 18.81

Microsoft 18.69

National Institutes of Health 18.34

Chirono··on Brilliance of Haskell's Maybe type and the Value of Static Type Checking
Although you eliminate null pointer exceptions, lazy evaluation does introduce another subtle and very similar class of errors.

Consider a program that takes a leaf-labelled tree of Ints and replaces each int with the maximum found in the whole tree. You can do this in two passes over the tree - one to find the max value, one to re-write the tree.

But you can also do it in a single pass using lazy evaluation:

----------------

data Tree = Branch Tree Tree | Leaf Int

label :: Tree -> Tree

label tree = t2

  where (t2,k) = thread tree k
thread :: Tree -> Int -> (Tree,Int)

thread (Leaf v) k = (Leaf k, v)

thread (Branch l r) k = (Branch l' r', max lv rv)

  where 

   (l',lv) = thread l k 

   (r',rv) = thread r k
----------------

The idea here is that `thread` runs through the tree replacing the values with some input value `k` and also calculates the max value of the tree. The function `label` then uses the output of thread as its own input.

This all works fine as long as you never look at the value of `k` inside `thread`. If you do, you go into an infinite loop as `k` then depends on itself.

This is similar to `k` being a pointer to an Int that doesn't get initialised until the function `thread` returns. If you examine it before then, you get a null pointer exception.

Chirono··on Unanswerable multiple choice question
The thing is, that Godel's theorem is provable. So by your definition, it is true.

The usual definition of false is not "I can't prove it's true" as that is pretty hard to decide. Suppose I have a statement S that I can't prove. Is it false, or am I just not clever enough to prove that it is true?

The normal definition of S being false is that the negation of S is true.

Part of what the incompleteness theorem says is that in any system of logic that doesn't contradict itself, there will be statements that are neither provably true nor provably false. Thus you can take these statements to be true OR false as an axiom and it won't lead to contradictions.

← PreviousPage 3 of 4Next →