HN user

jhdevos

227 karma
Posts0
Comments66
View on HN
No posts found.

It looks as though cryptkeeper makes assumptions about encfs' command-line interface that are no longer valid.

This looks like a developer mistaking a command line interface for an API.

Unless an (interactive) CL interface is explicitly marked as being an API, and documented in such a way, and regression tests exist to make sure the interface remains backwards-compatible - you should never program against it. Ask for a proper API to access.

(edit: formatting)

This is explained in the article in a bit more detail. The point is not that the type system does something with the actual value - the point is that it would be impossible to create any code that results in such a value (other than null), since then you would have to provide an actual type that is somewhere between Integer and String - and that would obviously not pass the type checking. Using null avoids that.

Section 4.5 in the language spec deals with parameterized types; 4.5.1 deals with wildcards. Of course, there is no example in the specs that clearly points out what happens in this example - otherwise this wouldn't have remained undiscovered for so many years :)

If you can show, using the rules in the spec, that the sample program shouldn't pass type checking, then you'll have proved the article wrong :-)

I don't see the headline as misleading at all. There are two type systems in Java: the JVM's run-time type system, and Java's compile time type system. It's the latter that has been shown to be unsound. As the paper notes, it's fortunate that generics have been implemented with type erasure, because that is what saves the JVM from being unsound, too.

As for the problem itself: it really has nothing to do with inner classes (they are static in the example!). The problem is with this line:

    Constrain<U,? super T> constrain = null;
which leads the type system to assume that there is a type that is a superclass of T, which also is a subclass of B (from the 'Constrain' class) - even though no such type could possibly exist! The evil trick is in the 'null' - even though a type with the stated constraints is impossible, and so no actual 'real' value of this generic type could exist, 'null' is part of all types, so the compiler can't see the problem.

It really is a problem in the type system as defined in the standard, not just a compiler bug.

After interviewing many more and less experienced programmers (and asking most of them if they can explain a hash table - just for statistics!), I concur that most cannot.

There were quite some people that thought trees were faster than hash tables though - mostly the ones that had some incling of what a hash table does, but didn't know the entire picture. At least in all those cases I had the pleasure of educating them a little bit :-)

First the law expressly forbids a patent on ideas.

Only in the sense that you can't forbid anyone else /having/ an idea, just that you can forbid them doing anything with it.

In software, it is definitely the idea that is protected, not the specific implementation - otherwise, copyright would be enough.

Of course, another question is: will the AI's consider us humans to have the equivalent of their consciousness? Or will they think "These humans don't not really possess consciousness, they just exhibit a crude biological simulation of it".

(BTW: This is not just meant as a joke, nor just as instigating fear of the singularity - turning a question on its head can sometimes lead to interesting insights).

True - which is why they did the cream as well. At the very least, this study tells us that the mindfulness meditation is a 'more effective' placebo than the cream.

It's very hard do really do in a 'double blind' way - I would not be able to think of something that is to all appearances equal to the real mindfulness mediation, but actually only a fake. There's no substance to it.

Do you have any suggestions to do it better?

Having played on (and heard people play on) a pBone, I'd have to say that even though it's quite impressive to see what they've been able to do with just plastic, it's still quite some way off from being a 'quality' instrument.

And they do not prove at all that the same can be done for any kind of instrument: trumpets and trombones are a lot cheaper to make than things like bassoons - you can find very cheap brass trumpets on ebay for very little money, some of which are surprisingly acceptable; and a rather good trumpet will set you back quite a lot less than a basson only fit for a beginner.

That seems like a false sense of safety: when doing arithmetic, your program is most likely not going to be handling overflows correctly anyway. Also, when using unsigned ints, any code involving subtractions can lead to subtle bugs that only occur when one value is larger than another. I'd recommend sticking with signed ints for all arithmetic code.

I think when smaller companies have patents, they tend to be closely related to their core business, and they have them precisely in order to use them 'offensively' - or, in other words, to protect their core business from companies that want to 'copy' them.

In principle, that is sort of what the patent system was intended for. (I still don't agree with it, but that's another story).

Wording is a bit sloppy: "Extending R (the inner while loop) takes at most a total of N steps, and positioning and testing each centers take a total of N steps too. Therefore, this algorithm guarantees to finish in at most 2*N steps, giving a linear time solution."

What he means is that the total time taken by ALL executions of the inner loop combined is at most N, not that each run of the inner loop takes at most N steps (otherwise it would become quadratic).

Where can i find more information regarding this.

The C++ standard, of course :) But if you prefer some lighter reading, either http://www.cplusplus.com/reference/mutex/mutex/unlock/ or http://en.cppreference.com/w/cpp/thread/mutex/unlock explain what happens, in slightly different ways. I usually prefer the cppreference version, because it uses terminology from the standard more consistently, but there is no harm in reading multiple explanations about difficult concepts like these :)

I'd repeat the explanation here, but I think you'd best be served by reading one of the two links above.

Ten years of Ubuntu 12 years ago

Will Windows run on it? Well... Yeah. Windows runs on everything powered by an x86 processor.

I've tried installing Windows 7 on an old Dell laptop a while ago. I got it working eventually, but had to hunt around for drivers for various things -- rather important things, like network, and video. In the end, I had to persuade some download site to give me the Windows XP drivers for the video card, and it worked with that (which, btw, is pretty awesome).

Of course, this is just anecdote, just like any story about Linux not working immediately on some modern laptop is -- but my experience is that these kinds of issues are much rarer than 10 years ago. Especially with Linux (with which I have most experience), but also with Windows.

Simple CPU 12 years ago

A button to execute a single instruction would also be nice.

In fact, the animation draws attention away from the text, which you are probably supposed to read (otherwise, why bother with an alert). I really don't understand this infatuation with distracting unnecessary animations that people have nowadays...

No, we don't want that. A while ago there was even a headline here that boils down to 'Illegality will not be punishable'.

This was about people residing in the country illegally. Everyone understands the headline immediately, but it's still pretty ridiculous.

The answer to your '(is it?)' is 'No!', english is just the language of the programming culture that we are part of.

And that is the whole point of this article; there already is a lot of programming culture that we simply don't know about because those people don't hang out on HN. They deserve a StackOverflow, too :)

To add some reasons why you'd want to learn CUDA first: It turns out that simple things are a lot simpler, and take a lot less code, in Cuda than OpenCL. With Cuda, your kernel and host code will be close together in the same file. You'll need a /lot/ less boilerplate than are needed in OpenCL to accomplish even the most simple things. OpenCL exposes you to a lot more concepts, and a lot more extrinsic complexity, than Cuda. All this means just playing around a lot easier to do in Cuda.

Just take a look at some simple examples in both, and you'll quickly see what I mean. Even though I'm a fan of OpenCL because it is available on more platforms, Cuda is a lot better suited as a learning platform.

Perhaps your intuition changes if you think about the line (in a plane) coinciding with the x-axis. Don't you think it is reasonable to define that line as the set of points (in the plane) having y=0? Also, should that line not be identical (isomorphic) to the set of real numbers - which is just a set of numbers? And should not all other lines in the plane be identical (isomorphic) to the first line?

Git Cheatsheet 13 years ago

Small fun bug: if you click twice on an item, the description at the bottom shows 'git null' :)

Does seem like an 'honest' bug. I did what the OP did (except I checked the middle option), and when you then look at the source of the page, it includes

  <div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/print-int-2013.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="1"  style="margin-top:138px;margin-left:10px;" /></div>
  <div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/digital-int-2013-v2.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="2" CHECKED style="margin-top:138px;margin-left:10px;" /></div>
  <div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/bundle-int-2013.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="3"  style="margin-top:138px;margin-left:10px;" checked="" /></div>
The 'div' that you had checked earliers has an empty 'CHECKED' attribute, while the third one has the 'checked=""' that firefox apparently picks up.

Uhh... the whole idea with the present generation of smartphone (software) comes from the iPhone.

Oh come on. It's an evolution of what was there before; Palm OS was already very clearly moving in that direction. There is very little that is conceptually new in the first iPhone.

The execution was superb, and everyone certainly got shaken awake by the fact that that level of quality was even possible... but the core ideas were already there.

CUDA grep 13 years ago

I don't see what hardware they tested on. What are the specs of this GHC 5000 computer they mention?

There are two different considerations:

* what the compiler will enforce: this has nothing to do with thread safety, and will allow what you mention.

* what guarantees the standard library will give:

[17.6.5.9/3] A C++ standard library function shall not directly or indirectly modify objects (1.10) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function’s non-const arguments, including this.

This means that the standard library assumes that your const objects will be thread safe in order to guarantee thread-safety itself. Updating a global without synchronization is not thread-safe.