HNHacker News
TopNewBestAskShowJobs

cldr

115 karma · joined June 19, 2013

submissionscomments
cldr··on Facebook puts bounties on bugs in the D programming language implementation
That's true, but you can write C code in D as well, so switching to D won't make people write idiomatic code either. If they won't learn how to use one correctly then they won't care enough to use another correctly.

And if your company won't let you upgrade compilers, then it certainly won't let you switch languages altogether.

cldr··on Facebook puts bounties on bugs in the D programming language implementation
Same here; I used to be a huge fan of D but then C++11 came along and solved most of my problems (and some that I didn't know D had).
cldr··on Real World OCaml
Then say "better than hand-written C++", not "better than C++". It's like saying "C++ performs better than assembly". No it doesn't. It may perform better than hand-written assembly, and that's completely different.

It's just annoying when people will do anything to get on the "faster than C++" wagon.

cldr··on Real World OCaml
> compiles down to C++. Execution speed is comparable to C++, mostly better.

Uh, what. Can you clarify?

cldr··on Qatar: Abolish Exit Visas for Migrant Workers
Well according to Wikipedia (yeah I know, but I don't feel like searching elsewhere) it may or may not be taken with the meaning "center of the world." And even if it is, it's more of an observation than a boast, since from their perspective they were in the middle of a bunch of other countries like you said. And hey, they call America "beautiful country" so they're not being stingy.
cldr··on Qatar: Abolish Exit Visas for Migrant Workers
May be worth noting that the Chinese didn't name their country China, they named it Zhong guo.
cldr··on Why Putting SSH On Another Port is a Good Idea
Ouch, camouflage on a tank is a good analogy. Nice response post.

In addition to, as the author encourages, being "weary of the 'by obscurity'" argument (as I'm sure we all already are), I would also advocate being wary of it :)

cldr··on I lost years’ worth of Google Docs files because of a poor user interface
I was replying to the part where "even if the files are local" i.e. not on the net.
cldr··on The Decline of Wikipedia: As More People Rely on It, Fewer People Create It
I was thinking about this the other day and I came to think that Wikipedia's rule about citations is this: Wikipedia does not want to be a source of information. It wants to be a collection/aggregation of other sources of information, and those other sources have to be accessible to others for all time (i.e. not a human being but a book written by a human being).

What I mean to say is that Wikipedia's system is one that does not/will not give article editors credit for original content; it treats them as just collectors and explainers of original content. When the explainers start writing stuff that has no source, they then disappear and leave Wikipedia holding the content which is now unverifiable. And that's just not how Jimmy wanted it to work I guess.

When I look at it that way, the policy doesn't seem that ridiculous. It may be inconvenient, but that's like saying a stack data structure is inconvenient because you can't remove things from the bottom. It's just the way it is; it has advantages and disadvantages.

cldr··on I lost years’ worth of Google Docs files because of a poor user interface
If they opened it in notepad they'd see a one-line URL, which is pretty obviously not the 5-page paper they typed. But I suppose many people wouldn't ever open it in anything other than the Drive interface, and I continue to agree it's not obvious enough for certain types of people.
cldr··on I lost years’ worth of Google Docs files because of a poor user interface
Only that's impossible as it is now (and will be for the forseeable future) because it wouldn't be very wise to give browser apps write access to the local filesystem.
cldr··on I lost years’ worth of Google Docs files because of a poor user interface
Yeah, like I mentioned, "There were cues which the author missed, but they were obviously not prominent enough which is a (the) design flaw." I focused more on the lessons to be learned but the situation is absolutely very sad for anyone who goes through something like this.

Glad you read the article though, now you're not going to fall for this flaw in the future.

cldr··on I lost years’ worth of Google Docs files because of a poor user interface
While I sympathize with the author (it must have hurt pretty bad if it made him go create an entire website dedicated to "google drive sucks") I thought it was quite obvious that files created on Google Drive with their document editor were not actually copied to your computer with the Google Drive program. It's easy to see when you try to open the file with Notepad or a similar local text editor. Additionally you get a warning when you move a file out of the Drive folder which you should always heed.

Not only that, but if it were the actual file on your local drive and not a link, there wouldn't be an option to "make this file available offline". There were cues which the author missed, but they were obviously not prominent enough which is a (the) design flaw.

Let this be a lesson that you should have multiple backups for anything important. I personally have 2 online backup systems and 3 local ones, the worth of which practice I learned the hard way like this author.

Also think twice before you empty the trash - you're manually making these files unrecoverable from the internet, and if your machine went up in smoke after you hit the button, you'd be screwed. That alone warrants serious consideration.

cldr··on Making HTTP realtime with HTTP 2.0
Will this let us do SRP over HTTP?
cldr··on C++ has become a scripting language
It's not really boilerplate in the classical sense, he's just talking about headers and lines that have only a brace on them. I think it's a fair statement.

Plus, he could have reduced lines even further to get down to about 6, like

   vector<string> data;
   string line;
   for (ifstream ifile(argv[1]); getline(ifile, line);)
       data.push_back(line);
   sort(begin(data), end(data));
   copy(begin(data), end(data), ostream_iterator<string>(ofstream(argv[2]), "\n"));
And his `return 0` was superfluous so I removed it.

Unfortunately we work with iterator pairs in C++; if we had ranges like D does, we could turn those last two into

   copy(sort(data), ...)
but alas we cannot.
cldr··on C++ For C Programmers
Not sure what AIUI means, but the very words "exception-safe" usually imply RAII.
cldr··on Facebook is using D in production starting today
I know, I think he misread the C++ code.
cldr··on Facebook is using D in production starting today
Actually wouldn't it be

    int[][int] whatever;
? Because I think we should be getting an array out whenever we do

    whatever[1]
and not just an int.
cldr··on Facebook is using D in production starting today
Idiomatic C++ would allocate everything possible on the stack, and if that wasn't possible, use `make_shared`/`make_unique`. So maybe I will change it to say "doesn't use `new` directly".
cldr··on Facebook is using D in production starting today
This isn't really a fair criticism because:

1. You picked probably the most verbose way to do it.

2. It's not valid C++ because you're assigning a pointer to a value.

3. Idiomatic C++ doesn't use `new` explicitly anyway

4. The `d = {}` of Python is not really equivalent.

My feeling is that python gains brevity in exchange for putting a heavier mental load on the programmer, which is manageable for small programs but becomes unwieldy for larger ones.

cldr··on Firefox fixes save gigabytes of memory on image-heavy pages
It also could be that they're making changes and just not optimizing them until they put them in regular Chrome.
cldr··on We Like You So Much and Want to Know You Better
"All that happens must be known."

Wow. So much insidiousness packed into six little words.

They conveniently forget to mention by whom it should be known.

cldr··on Urbit: A clean-slate functional OS
I'm not asking why reserved words are a bad idea, just opining that I think having 100 single- and double-character symbols might not be the best UI for a language. Why not have just names (neither reserved like keywords nor inscrutable like symbols?)

I don't know, I am similarly annoyed by mathematicians because they usually use single letters for variables. It's a little more excusable for them because math functions are usually very short and have few variables, but still I'd rather use words. But I digress.

cldr··on Urbit: A clean-slate functional OS
> Hoon is a keyword-free language - any alphanumeric text in the program is part of the program. Where other languages have reserved words, Hoon has squiggles.

But... why?

cldr··on Show HN: Solid, a scripting language with a tiny VM
How long did it take to write this once you had all the ideas? I looked at the github history but they only went back 5 months and it looks like there was already a significant amount written so I couldn't tell how far back from there it went.
cldr··on Show HN: Solid, a scripting language with a tiny VM
Awesome work. How big is the executable?

Also, what did you not like about the Lua object model?

cldr··on Reason #73 why C++ is a terrible intro language
They can do that. It's plain on any good documentation site (e.g. http://en.cppreference.com/w/cpp/string/basic_string) that `string::size_type` is unsigned. The teachers just have to be knowledgeable enough to let students know of good documentation (if, by documentation, you mean what I take you to mean, which is stuff other than the standard itself, which is nearly unintelligible for new people). The technique I gave was just for fun.
cldr··on Reason #73 why C++ is a terrible intro language
Or instead of digging through docs, we could do

    cout << is_unsigned<string::size_type>::value;
and check it ourselves.
cldr··on Is The Web Dying?
Once again Betteridge's law proves true.
cldr··on N.S.A. Foils Much Internet Encryption
I don't understand that part of the article, what algorithm standard was it? AES?
Page 1 of 3Next →