Better HN
topnewbestaskshowjobs
Log inSign up

Coding_Cat

837 karma · joined Oct 11, 2014 (12y ago) · 272 submissions

Submissions

comment 10y ago · link · parent

In my limited experience, unfortunately Rust isn't there yet for true "blazingly-fast" low-level code, not without using assembly[1] or linking to external code. For example, there is no (mature) support for SIMD yet. Neither C or C++ has it to be technicall, but at least the compilers do (in the form of intrinsics).

But I agree with the overal message, and I'm looking forward to Rust maturing. I think it is the better language although I am no expert at either.

[1]: but really, when you start using AVX instructions and the like beyond what the compiler will automate for you, you are just using wrappers around assembly instructions in languages like C today anyway (__mm256_shuffpd, __mm256_perm128f2d)

comment 10y ago · link · parent

For me their still the occasional problem. Perhaps it is related to Windows 7?

comment 10y ago · link · parent

That doesn't sound so much as Skype being good as VOIP being good too you. Skype itself in my experience, and all those I know, has been abhorrent. Chat messages appearing out of order and once literally months later, incorrect status indicators, automatic noise cancelling messes up the volume sometimes (it seems to happen when the signal/noise plummets for a bit) forcing you to recall to get usable audio levels again, multi-platform support is a joke, having to delete %appdata% every other update in order to be able to log in, intrusive ads, a lack of audio device at startup seems to freeze up any windows audio afterwards until Skype is killed (This could be Windows itself ofc, but it's both Microsoft)...

As an aside, this is regular old Skype, I've heard it being said that "Skype for Business" is a completely different program.

comment 10y ago · link · parent

That blog, to me, only shows the problems of selective enforcement I fail to see how it is relevant?

Regarding the WSJ: it's a technologically unsophisticated (but probably effective) way of having indexing work with a pay-wall (which requires more tracking in and of itself anyway). But selective access does not violate your privacy, only your freedom to view their content. And as much as I oppose the "companies are people too" movement I do think they have a right to selectively serve their content as much as you have a right to decide what you want to do with the bytes they (try) to send you (e.g. adblock them).

comment 10y ago · link · parent

I was thinking of linking to the extension/webstore pages, like [1] for Firefox and [2] for Chrome.

[1] : https://addons.mozilla.org/en-US/firefox/addon/ublock-origin...

[2] : https://chrome.google.com/webstore/detail/ublock-origin/cjpa...

comment 10y ago · link · parent

What about CSS extensions like .webkit? Same thing really. AFAIK the standard way to do browser-detection is to use the user-agent string, which your browser sends with every request it makes (but can be overridden) anyway, so them programming an if(browser == firefox) statement does nothing whatsoever for their knowledge of you. They already get told what browser you are running.

And I am no webdev, but a quick google seems to show that it is possible to do browser detection completely client-side anyway with Javascript, so even if user-agent strings did not exist they could detect your browser without any kind of fingering.

Granted, if you wanted to do so perhaps you could use this to circumnavigate people hiding their user-agent by having the generated link be a hosted redirect link, that way you know that if someone clicked redirect-firefox.theirdomain.org they were using firefox even if they hid their user-agent string. But it's not really fair to assume that in this case. (and i have to wonder what the value of an ip-adress/browser pair is).

comment 10y ago · link · parent

I visited it on Firefox mobile and it correctly detected that I didn't have adblock (as I tend to only read HN and technical blogs on my phone), but the link send me to uBlock Origin's Github page. While uBlock is a nice blocker, if the goal is to encourage adblocking I think it would be better to directly link to the extension for whichever browser is being used as I do not think there is much overlap between "Knows how to use Github" and "Doesn't know what an adblocker is".

comment 10y ago · link · parent

Thinking about it, I'd say the second one is better. I think it parse better in my mind as to what is meant.

However I also always comment nested logic chains with their intent in plain language. I have made bugs in going from intent->complex logic to often, and I found that writing comments at each fork greatly reduces these errors as well as the odds of missing an edge case.

e.g., I'd write "if(a) and not b" in plain English at the nested else statement, possibly followed by a "what & why" comment at the do_thing_b statement.

comment 10y ago · link · parent

But I have to admit if you ever actually do that, you have failed to fundamentally understand how your code is executed

I would say I have a pretty good understanding of how C & my code in general works, I'm currently trying to create a threadpool with support for co-routines/yielding to other threads in userspace. Nothing super fancy, but not something you can do without understanding how code is actually executed ;)

But I still lost an hours work last week because I hadn't put a brace after an if statement and when I came back to it, I didn't notice the lack of braces and put an extra statement behind it. This is why I usually stick to putting braces around everything.

comment 10y ago · link · parent

If you don't have braces like in Python, then you always have the same visual feedback don't you? If you were to add braces to Python and auto-indent you'd end up with the same look as you would with python with only whitespace, only now there are superfluous brackets.

comment 10y ago · link · parent

Lack for jumping to the end of the current indent block is a missing-feature/bug in vi then. There is nothing technologically harder about finding the end of a block based on indentation than based on braces.

comment 10y ago · link · parent

Rust does something similar. It doesn't allow for brace-less clauses and it also bitches and moans at you about 'miss-using' camelCase, snake_case, etc. Which is great because it means that by default all project will follow a similar mark-up.

comment 10y ago · link · parent

I am not, nor have I ever been, a big fan of Apple. (apart from all the usuall complaints, I am one of those freaks who just doesn't like Apple's interface & design). But this is a step in the right direction. Would it be better if it were more open? sure. Is it useless if it isn't? not really, it still protects the users and puts pressure on other manufacturers to do something similar.

Who knows, maybe internally they're even looking at making things more open but that could require a lot more work w.r.t. scanning for patents and such in their code and perhaps they want to have a strong solid release of whatever they would consider a "full system" before they put up their code for all to see.

Apple doen't, historically, have much of a history of opening up but they did open up Swift recently. Perhaps new winds are starting to blow like they did at Microsoft.

comment 10y ago · link · parent

If that would make China stop their "sketchy economic measures" I don't see an issue here.

comment 10y ago · link · parent

And social networking features, which have proven to be its gold egg imho. Like the article mentions, Github has for many become a defacto showcase for your body of work.

comment 10y ago · link · parent

Well, again, involuntary commitment for mental afflictions is a thing. So it has surely been a thing in the 20th and 21st century. Of course, you don't get commited on basis of a diagnosis alone (AFAIK), but I would expect a similar criteria of "a danger to themselves or others" to be set for drug abuse as has been set in that case.

comment 10y ago · link · parent

>You can't force them to use detox clinics, etc.

Maybe it is not possible yet legally, but why shouldn't we allow this? The courts can already force people to be commited for mental afflictions when they are a danger to themselves or others. Why not do the same for (heavy) drug addicts who start becoming a liability?

comment 10y ago · link · parent

SPIR-V will be a huge boon for everyone and everything I hope, especially given the LLVM support (Haskell or Rust compilers anyone?). But it only augments the compiler step (AFAIK). I've had plenty of bugs in the host-side code before.

And of course, a newer version does not neccesarilly mean that the out-of-date implementations will suddenly become "in-date": if anything they're even more out of date now ;)

comment 10y ago · link · parent

I'm really excited to play with it as a hobby developer. Simply because I like doing low-level programming/optimizing for the fun of it.

And I'm currently working on my Msc. in computational science (and possibly a PhD. afterwards) so I'm also going to see how easy it is to shoehorn generic-HPC into this API. OpenCL is nice (well... maybe not nice but workable) but historically the graphics APIs have had better performance for less work. But I guess you could count me as a low level API programmer come to think of it.

comment 10y ago · link · parent

Same problem here, on the latest firefox & Archlinux. It searches properly when you hit search but it does not respond to hitting enter on the keyboard.

It also does not find anything for "duck sized horses" or "horse sized duck".

comment 10y ago · link · parent

>becomes limited to people that value your data above the value of your phone.

Pretty sure me and some random mugger are the only people who even care about the value of my phone.

>there is a possibility that they have to open up these parts to the consumer as well.

There is a whole lot of precedent that says this isn't going to happen. Even if manufacturers wanted to do this, I'd expect we'd see laws in turn which gag them so that " the terrorists can't break our backdoors".

comment 10y ago · link · parent

I have (unfortunately) no experience with this. But have you tried getting 2 larger mattresses (or 3 regular sized ones) and placing them down at a 90-degree angle (crease perpendicular to your body)? Further, using a bed with tight-fitting raised edges will keep the mattresses together better than most beds. This would most likely have to be custom crafted given the size though.

comment 10y ago · link · parent

Why should I/they? If they're not willing to sell their (reasonably priced) product to me I end up with the choice: Don't watch it or pirate it.

If I don't watch it, they don't get my money and I don't get any enjoyment out of the product.

If I pirate it, they don't get my money but I do get the enjoyment. Also they get possible word-of-mouth advertising.

I fail to see any objective or moral reason as to why I shouldn't pirate in this case.

comment 10y ago · link · parent

>So it is legal to put this in any contracts in EU, since the judgement sets precedence across EU.

Nitpicky, but I believe it says that any European country can have laws which allow this but they are not required to allow it. E.g. the Belgium Gov't might still pass a law which says companies are not allowed to do this.

comment 10y ago · link · parent

Your source makes the supports the claims you make, but it itself does not source (some of it more grievous) claims.

I'm willing to accept that the claims of them suing various people. But I wouldn't call these cases frivolous per se: They could very well believe that they were denied participation in a parade on a discriminatory basis. I wouldn't necessarily say I think it is the right approach to take but the examples they give are not that absurd in today's world. (And could also be the work of but a small subsection of the group).

comment 10y ago · link · parent

True, but those would most likely scale (but not perfectly) with the consumer price. Higher tariffs and transportation costs for example.

comment 10y ago · link · parent

Note also that Norway is, in general, an insanely expensive country so $60 gets you less than it would in most countries.

comment 10y ago · link · parent

I'm waiting on a plane, so it's a bit messy, and I haven't tested the float version yet but: https://github.com/RDeckers/c_doodles/blob/master/Linalg/src... Compile with gcc -O3.

MxM_4x4 is my function, say we have AB=C then it loads B transposed into registers, then for each row it uses 4 multiplications to calculate to row(A)column(B) products, 2 HADD for summing half of the generated products, then 2 permutations to line up the vectors, and one final sum to compute a row of C.

MxM_4x4_2 is a direct port to doubles instead of floats of intel's example on the provided link. When compiled with -O3 my compiler produces the same code in terms of assembly instructions as Intel's example explictlly writes.

(Note the name of the repo, I know it's not pretty ;) )

comment 10y ago · link · parent

I'm in a hurry right now, but I'll link to it later. It's on a i7-4750HQ, it was about 10% faster as measured with rdtsc and looping it a couple of million times.

Granted, Intel's implementation was for 8x8 (floats), perhaps that makes a difference in the instruction pipelining. I'll see if it does later.

1
567
10