Hacker News new | past | comments | ask | show | jobs | submit | afrozenator's comments login

+1 to this. There was a study IIRC that insider buys in open market were the only reliable signal from insider buys and sells -- especially if the insiders had been officers (directors/executives) for a while.


No, this just seems to be selling two options.

Sec Form 4 - "C — Conversion of derivative security"


I beg to differ a little, Professors should be paid to do reviews, and not pay to have reviews done.

The companies that publish the journals don't take a cut, they take the lion's share basically, paying a professor to review would work better in having them take a share of the pie.


But if you pay professors, you either pay them enough to make it worth their time, or you pay them less than that.

In the former case, you are incentivizing people to do reviews who are not actually qualified to do them. Or, incentivizing people to do more reviews than they have time to do a good job on.

In the latter case, there's not really any point.


Upto 10 digits, pi is sqrt(sqrt(2143 / 22)) .. and that is 9 characters as per his definition or 8 if you allow ()^(1/4) as an elementary operation.

3.141592652 vs pi ~= 3.141592653


He likely bets the person who was taught 22/7 as an approximation will not be able to do the sqrt of a sqrt of a fraction in their head or on paper. If they have a calculator they might as well use the dedicated pi key.


Quite unfortunate indeed, truth be told Pussy Riot acted recklessly too.


Thanks buro9!

I'm curious what other resources would be good for Distributed Computing. I'll try to go over these.

Thanks again!


Wow, thanks!

I went on the homepage yesterday, because they have an upcoming conference, I never stumbled across this part of their website.

Thanks again :)


I remember writing in the description to the same effect that it was old, and may have been posted before. Although it served the purpose to bring it to other people's notice, you have have found it repetitive, for that I apologize.


The author really needs to be complemented on rewriting swathes of code from Python to Haskell.

In Google, in my project, we've had runtime errors in Python code, due to wrongly spelled variables(although that is a different problem), and type error, something a compiler would have caught.

Strong type checking is something that I truly like about Haskell and OCaml, I'm reasonably convinced that once my program has passed the typechecker, it is logically correct. Though debugging in Haskell is truly a different ballgame altogether (I'm a Haskell noob).

I'll stop here lest this turns into a flame war.


pylint can help with misspelled variables and type errors. I started using it recently and love it. I still love my C++ compiler though and would not trade it for anything else.


pyflakes also detects typos easily, and it's quite useful. In languages that don't catch anything you can usually still use tools for static verification.

As another example, Java may let you get NullPointerException, but FindBugs detects a lot of those.


Wow thanks, I didn't know pyflakes. I knew pylint, but will make it more of a point to run it. I only occasionally need to code in Python, but when I have to, it is legacy code that I modify.


glad to be helpful.

Depending on your editor of choice, you can get integrated pyflakes/pyling/flake8, e.g. I use vim and the syntastic plugin which is great.

This way, you get a bit of on the fly static checking without needing to remember command line tools/using vcs hooks, which is much more productive.


Will keep this in mind the next time around!

Thanks again.


  > we've had runtime errors in Python code, due to [...]
  > type error, something a compiler would have caught
Are wrongly spelled variable names and type errors the only runtime errors that you get? If not what percentage are they?

Personally, I think that people tend to obsess about the specific type of errors because the 'solution' (static-typing) is something that already exists, whereas there is not easy solution to other types of flaws.


In Python, there are a lot of errors like "NoneType has no attribute '...'", and those disappear too.

Missing imports and redundant imports also go away.

Lots of lots of invariants in the program can be encoded as types, too, so any bugs relating to them go away too.

When you want parallelism, you get useful guarantees about not changing the deterministic result you had before you added parallelism.

I used to use Python, but after Haskell, there's no way I'd go back...


  > "NoneType has no attribute '...'"
C is statically typed, but I can still attempt to dereference a null pointer. Static typing doesn't save me here, nor does the compiler, as it's possible for these issues to happen at runtime.

This may be something that Haskell doesn't allow, but it's not something inherent to static-typing.


In static-typing's defense, C isn't as strictly typed as Haskell, a pointer (and therefore null) is just basically an integer.

But I totally agree, static typing is no cure for a wrong program. With power/expressiveness also comes a great ability to goof up.


Intercal is dynamically typed, but it doesn't save me any development time or make my code any shorter! (Well, maybe compared to Java :)).

On top of this, the C type system is not really about correctness at all. My understanding is that it primarily helps with performance, memory management (e.g. you know the size of stuff) and not accidentally using a non-pointer as a pointer. I'm not a C person, but C does not give off a vibe of caring about correctness.

In fact, C is particularly unsafe: you can get all sorts of fun things like bus errors and segfaults that are basically impossible in other languages. C definitely has a place, but only if correctness is much less important than performance.

You can ultimately come up with a sufficiently bad language for anything.

Also, the way Haskell avoids null errors like this is with the static type system. So while it's certainly not inherent to all static type systems (then again, nothing has to be inherent to static type systems except being verified at compile time), it is a property of the type system.


I'm just 'arguing' that pitting static typing against dynamic typing using specific languages as examples isn't necessarily the whole picture. Saying that static typing will save you from attempting to call methods on None in Python is a fallacy. Saying that Haskell's static type system will save you, is possibly correct.

My original point was that it's possible that we (programmers) focus more on issues that could be with static typing (of some implementation) just because it seems like a group of problems that could be 'easily' solved. I.e. 'the grass is always greener'


Static typing can alleviate that, and that's how Haskell does.

The problem with C is that nullability is not statically typed.


Yes, probably that is my confirmation-bias at talk. But more than anything it is the frustration that the whole make into a par file and deploy it on a production system, only to find just moments later that the binary isn't up because of a typo is frustrating in any language.


    I'm reasonably convinced that once my program has passed the typechecker, it is logically correct
Yup, this is one of my favorite things about Haskell, that's how I know that http://bpaste.net/show/32033/ is a totally correct program.


If you're hoping to catch a specification error, don't use a type like `Integer -> Integer`, which doesn't capture the specification except in a most general sense.

Just as you should write good tests, that actually test for useful properties, so you should write good types -- and get useful proofs back from the compiler as a result.


I wasn't trying to catch the error of "program author is a moron who doesn't know the difference between Fibonacci and factorial". Were I trying to catch that error I would have been aware of it, and then much less likely to write the bug in the first place. This is a truism that is well accepted by testing proponents: which tests you write are incredibly important, and you need to write your tests first in order to avoid a curve fitting problem (so to speak). Any non-trivial test would have shown my function to be very broken, what type would you have used to represent that so it wouldn't compile?


Numerical algorithms suffer from a paucity of types. So either you enrich your numerical type hierarchy, or you prove an implementation matches a model, e.g. for fibonacci http://stackoverflow.com/a/8434107/83805


I don't have a response to that, other than to say, now you know why I decided to write compilers instead of pursue a graduate degree in computer science.


If you write compilers, it would be really beneficial if you had a curiosity about the state of the art in programming languages.


… And lo, PHP-2 was born into the world.


The point about a static type system not catching all errors is well taken[1], but if a programmer has mixed up factorial and Fibonacci I would expect that their tests would reflect this as well as their code. This is more the sort of thing you should rely on code reviews to spot.

[1] Isn't the old joke in Haskell "If your program compiles it probably does something someone would find useful, but not necessarily the useful thing you want"


Very elegant way to show a point...


He qualified with "reasonably convinced", and you countered with an unreasonable example. That is the definition of attacking a strawman.


It's not unreasonable, it only seems unreasonable because of the context. I've seen several really good programmers (and overall bright people) mix the implementation of the two up.


If you have the two algorithms mixed up, unit tests aren't going to save you either. Nothing will ever save you from intending to do the wrong thing.


If you actually use the result of the function somewhere, some tests of that component should give wrong answers.


I forget whose quote this is - The computer is a wonderful machine, it does what I tell it to do, not what I want it to do.

Your point taken, but that is a problem in programming language X, which has Y type system, for all permissible values of X and Y.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: