Better HN
topnewbestaskshowjobs
Log inSign up

Flow

1,321 karma · joined Jul 11, 2009 (17y ago) · 690 submissions

Submissions

comment 15y ago · link · parent

IIRC, kqueue can be told to read the whole http-request before letting client know there's data to read.

comment 15y ago · link · parent

Yeah sure, :) , but I meant for those other cases when there are no Clear() method. :)

comment 15y ago · link · parent

  while(container.Size > 0)
    container.Remove(0);
No need for variables.

comment 15y ago · link · parent

"THERE IS ANOTHER SYSTEM..."? :-D

(Great movie, watch it: http://www.imdb.com/title/tt0064177/ )

comment 15y ago · link · parent

Can't edit my post anylonger so I'll reply to myself.

The issue is probably common to all browser plugins.

comment 15y ago · link · parent

Even in september 2011 Flash doesn't work well with keyboard and mouse.

If you have clicked inside a Flash-box then you can forget using the keyboard shortcuts your web browser offer.

Edit: I really think one shouldn't be able to down-vote without first writing a comment explaining why...

comment 15y ago · link · parent

Maybe because Metro IE10 runs on WinRT rather than Win32? Just a guess.

comment 15y ago · link · parent

I usually get coffee instead of staring at the laptop.

But I wonder how big a difference a smarter disk-elevator algorithm would make.

Or something that logged file-accesses, made a list of disk-block-no of that, sorted the list, and early at next boot read of blocks from that list. This is to avoid boot-time being spent waiting for random disk-accesses.

comment 15y ago · link · parent

> The problem is that errors can and will happen, and exceptions make the control flow of error handle unpredictably convoluted.

I take it you never have seen the "leaning Eiffel tower of nested if's in C/Pro-C? As I wrote, in a language with exception handling you code as if errors never would happen. And then you put using/try+finally/block-exit clauses around your statements to assure cleanup will happen no matter what.

How is that convoluted? Good such code looks almost naïve to me.

>Callers that do not have any of the real context in which the error happened, and that often can't do anything particularly smart about it other than throw their hands in the air.

Well, exactly how smart a caller can be is decided by the protocol between caller and callee. It's no different than what return-values would have given you IMHO.

comment 15y ago · link · parent

I had Common Lisp Conditions in mind when I wrote my message above. Have an upvote for knowing stuff. :)

comment 15y ago · link · parent

The idea of exceptions is not primarily reading out details from the throw exception object, but to let programmers code the "happy flow" as if errors can not happen. It also makes it easier to let callers further up in the call-chain to set the policy of of what to do in case of an error.

comment 15y ago · link · parent

I have Windows XP at work. Booting takes about a minute, then logging in takes 5-10 more minutes before the computer is usable.

I think of this every time: http://www.flickr.com/photos/ebwolf/498371086/

comment 15y ago · link · parent

I've been afraid of this too.

I wrote a system in C# that used immutable data and actually used that to do rollbacks when evaluating a scenario failed. My fears was that since there are no "val" and really bad immutable collections in C#+.Net the maintenance coder would probably remove list.AsReadOnly() and putting in public on setters as part of fixes to bugs.

That didn't happen though, the maintenance guy was really smart and got the ideas without me explaining much more than mentioning immutability.

But this is why languages like Scala are important. Immutability and similar design(patterns) are a result of discipline and sometimes convention in languages like Java and C#. It's bound to fail due to humans being humans.

comment 15y ago · link · parent

I see what you are saying, but feel that C++ is in a different league than Scala when it comes to why you avoid certain language features. If you don't know exactly what a feature does in C++ you might end up with memory leaks, excessive memory copy, having the wrong methods being executed or stupidly long compile-times. Your app will simply not work with these problems.

In Scala(guessing a bit here since I've not done any large projects in Scala) you might have hidden performance costs, method signatures for your own library code that are insufficiently reusable because of lack of covariant et al specifications.

But the rest of the problems for Scala seems to me to be style guide problems. For example, using or not using . and ()'s, how many classes per file.

comment 15y ago · link · parent

Sounds horrible. Did you try another store in case they'd make a different decision?

comment 15y ago · link · parent

That the Amiga didn't get any decent custom chip upgrade was probably due to inter-custom chip timings more than software being carelessly put together. Perhaps the resources was not there to upgrade all of the chips at the same time. The AGA upgrade didn't affect several of the custom chips, like the blitter and the sound chip.

At least that's my impression.

comment 15y ago · link · parent

The programs that had those problems also probably jumped directly into the KickStart ROM and expected it to be of version 1.2. When KickStart 1.3 came out quite a few games broke.

I know of only one case where some german demo coders used CPU/chip timing to multiplex sprites to get more than 8 sprites per row.

Most of the timing bugs were of the kind that the CPU got faster(maybe due to code running from RAM not affected by custom chip cycles, or perhaps a 68020 or better was used) and neglected to wait for the blitter to be ready.

"Fast-RAM" was common enough after a few years to this not being a huge problem.

AmigaOS and the whole of Amiga was a thing of beauty IMHO.

comment 15y ago · link · parent

I'm no Kotlin expert, but it looks like C# and that's what I do at work. I've been playing with Scala at home and the fun-factor in Scala is several times that of C#.

Jetbrains should post a Kotlin vs C# to clear up what's really the difference between the two languages. If the difference is really small, are they trying to take advantage of Resharper to introduce a new language on the JVM?

comment 15y ago · link · parent

I also reacted that the author mixed in Python in his Java-project when Scala is a really fine alternative.

Using Scala and Java he can write very short and readable code and use Java only when there's a performance concern or a similar reason.

People say Scala is complex and academic, but if you don't try to write your first Scala programs using every feature of the language you'll see it's a useful and likable language.

Use it a bit like you'd use C++, pick a feature-set you understand and like and be consequent with your use of parens/lack of parens.

comment 15y ago · link · parent

From what I've read, the Judge actually hold the devices in his/her hands. So this sensationalism feels so yesterday...

comment 15y ago · link · parent

http://www.iphonefaq.org/archives/971141

Not very obvious. I just can't remember this one.

comment 15y ago · link · parent

Some things that could be improved upon is better sandbox. Too many extensions seems to need my data on all sites. Maybe some extensions could work just as well with a copy of the DOM instead of the DOM itself?

And a policy that extensions must not be minified and some buttons on the extension view to read the source code with syntax highlighting and all.

comment 15y ago · link · parent

Install something like WorkRave for Windows and Linux: http://www.workrave.org/ or TimeOut for Mac OS X: http://www.dejal.com/timeout/ to avoid sitting still for too long.

comment 15y ago · link · parent

Sounds to me like the view-source running something from the page could possibly be used a domain-escaping bug. Just a gut feeling though.

comment 15y ago · link · parent

Weird, takes sub-second first time here on my iMac with no SSD.

comment 15y ago · link · parent

Just look what can be done on a C64 with 512KB RAM expansion cartridge. http://www.youtube.com/watch?v=IQqR35k4SMQ&feature=relat...

Beats most PC demos IMHO. (I'm an old C64 and Amiga hacker) That said, the 6510 and 68k don't stand a chance when it comes to compact code compared to the x86.

1
1920212223