HNHacker News
TopNewBestAskShowJobs

alexk7

249 karma · joined April 24, 2009

submissionscomments
alexk7··on Vector vengeance: Researchers claim they can kill the pixel within five years
Yeah, I'm disappointed. I was expecting the article to be about some new vector display.
alexk7··on Life of an instruction in LLVM
It is true of C and C++. In fact, LLVM is mostly used as a C/C++/Objective-C back-end (in Clang). The main advantage of LLVM is that it is a really good representation to perform optimizations on.
alexk7··on Free Book: An Introduction to Programming in Go
I'm worried about Gordon the Gopher. He can't reach the pedals. :)
alexk7··on Hack a Standing Desk from IKEA
If you build a custom desk for yourself, you don't need it to be adjustable.
alexk7··on Semicolon: A language of semicolons
The reversed semicolon appears as a square here (Windows/Chrome).
alexk7··on Sqrt(x*x+y*y)+3*cos(sqrt(x*x+y*y))+5 from -20 to 20
Hmm. No perspective.
alexk7··on On the evolution of programming style: How far C++ has moved from its C roots
"The rules for conditional operator are quite sophisticated and one of them says that if one of the sub-expressions is a throw expression, the type of the entire conditional operator is that of the other sub-expression." [1]

[1] http://akrzemi1.wordpress.com/2011/05/06/compile-time-comput...

alexk7··on On the evolution of programming style: How far C++ has moved from its C roots
With constexpr, if the parameters are constants, the whole computation can happen at compile-time. The line is somewhat harder to read for people not used to functional programming, but unfortunately, constexpr functions are required to have a single expression.
alexk7··on On the evolution of programming style: How far C++ has moved from its C roots
This is even more C++11-ish: (Not tested, my compiler at work is not C++11 compliant.)

    constexpr tuple<double, double> Roots(double a, double b, double c)
    {
        return (a == 0.0) ? throw invalid_argument("a has value 0.0!") :
            tuple<double, double>{
                (-b + (sqrt((b * b) - 4 * a * c))) / 2*a,
                (-b - (sqrt((b * b) - 4 * a * c))) / 2*a
            };
    }
alexk7··on Legit. Git for humans
There are discussions about changing the push default behavior.

http://lwn.net/Articles/487131/

alexk7··on How to put your logo in a QR code
At that time, I kept a physical log of all URLs I saw (by hands, even very long ones!), just in case I needed to visit the web site. I still have it but the addresses are no longer valid. :)
alexk7··on Lost skills: What today's coders don't know and why it matters
I disagree. If you are able to achieve your goals without going low-level, please do it. If you need to understand low-level stuff to get the job done, please start learning. But please don't fall for the "every programmer should know this" meme.
alexk7··on Poll: Have you read SICP?
I suggest you watch the original video lectures by Hal Abelson and Gerald Jay Sussman [1].

[1] http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussma...

alexk7··on Forgotten C: The comma operator
I find this easier to read:

  string s;
  for (;;)
  {
    read_string(s);
    if (s.len() <= 5)
      break;
    //do something
  }
alexk7··on How to send and reply to email
I put a copy of the subject line inside the body. I think it's good style to ignore the presence of a title or subject in the body of any text.
alexk7··on Systems Programming with Racket
"anything requiring fairly intimate knowledge of the hardware and operating system" is a fine definition.
alexk7··on Systems Programming with Racket
I noticed that the expression "Systems Programming" now seems to mean a much higher level that it used to. In my mind, writing a web server is still an "application" and is not equivalent to, for example, writing an operating system. The Go language is also claiming to be a "Systems Programming Language" but I won't use it for what I call "Systems Programming"...
alexk7··on Response to John Cook's "Myth of the Lisp Genius"
"A team of competent programmers willing to put up bullshit will out-compete a lone wolf striving for elegance no matter how brilliant he is."

I'm doomed.

alexk7··on IE10 platform preview available - with native HTML 5
I posted this on their comments: "Please, Microsoft, don't try to confuse people by hijacking the word "native". An HTML 5 application does not run on a magical HTML 5 CPU, even in IE9 and IE10. Being single platform may allow you to develop IE faster but it is not an advantage for the user."
alexk7··on Rules From a User to Software Developers
> Spell the name like a normal person. Twitter works because it makes logical sense, spelled as it sounds. Tumblr is hard to explain to a non-tech user — tell your Mom to go to Tumblr.com and see what she types in.

Funny to read this example since Twitter used to be named "Twttr"! I guess they understood the problem soon enough!

alexk7··on Poll: Do you know C?
I said I would consider it a burden to write in pure C, not that I would not be able to do it. I would not need any documentation, but I would scratch my head figuring out how to organize a large program. I would need to write a lot of comments to replace things that do not exist in the language: const-correctness, memory management conventions, type-safe containers, etc.
alexk7··on Poll: Do you know C?
I'm from the "Modern C++" school. I learned C++ without first learning C. I don't consider myself a C programmer. Of course, I can read and write C code, but I would consider it a burden to code without smart pointers, templates and exceptions. How should I answer this poll?
alexk7··on How Carrots Became the new Junk Food
4g of sugar out of a 85g serving is not 57%. Where did you get those numbers?
alexk7··on Static Typing Where Possible, Dynamic Typing When Needed
I find this habit healthy. I regularly read papers from the 60s, 70s, and 80s and I judge them by their content. There is no point dismissing a good article because it's old.
alexk7··on Parsing: the solved problem that isn't
Visual Studio is very often confused at edit-time. The parser should not be more forgiving, it should just remember the parts that once were correct but are now invalidated by further edits. That way, updates that keep local correctness would continue to work even if some parts prevented the correct parsing of the whole file.
alexk7··on Parsing: the solved problem that isn't
I'm designing a programming language and I totally embraced the PEG paradigm. I don't care about left recursion. My grammar is simple and clear without it.

A great benefit of PEGs is that I can easily reason about how the parsing will be done as I write the grammar, which will be the same if it's done by the compiler or by the programmer in his head!

Those who say that the ambiguities still exist when using PEGs say so because they still reason in terms of CFGs. There is no ambiguity in PEGs, period. If the language is defined in terms of PEGs, there's no worry about that, as long as the reader of the language spec understands about prioritized choices.

alexk7··on Sun.com Will Disappear After June 1
A few newspapers named "Sun" might be interested...
alexk7··on Bootstrapping CC (for OSX, using Homebrew)
That makes sense. Following that logic, the version that will be "free" will require Lion.
alexk7··on I would like my $0.37 refund, please.
Because they were on sale, obviously.
alexk7··on C++ in Coders at Work
I'm designing such a language. It's called C³. I would like some feedback on my design "rules of thumb"[1]. I'm literally still at the whiteboard! [2]

[1]: http://blog.c3lang.org/aims-and-rules-of-thumb-for-the-desig...

[2]: http://c3wife.com/?p=523

← PreviousPage 2 of 3Next →