Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re: C is primordial (Score 1) 641

Yes but you would not be able to actually empress this in C. Not possible! The best you could do would be something like:


void set_class_to_blue(Element* ele)
{
        set_class(ele, "blue");
}

foreach(dom, "a", set_class_to_blue);

Any if you inline the code, you can see what it does line for line and translate it to ASM.

Take the JQuery in contrast. That does the $("a") actually do? It creates an object that contains a classifier that may later evaluate to DOM nodes. On this object you then can call function; theses functions then operate on all instances. So the statement $("a").addClass("blue") is semantically equivalent to $('a').forEach(function (ele) {ele.setClass("blue");}). But it is not implemented in the same way. Even if you inline all the JS code, it will be hard to break it down to actual processor instructions (just the VM), because half of the time a semantic construction does nothing useful.

Comment Leading by Bad Example? (Score 1) 285

I am not sure if on purpose or not but their website is a classic example why ads are bad and distracting. Their website is loaded with ads for their campaigns, social media buttons, links to the extensions and stuff. The entire design looks almost like a terrible online magazine, that derides their article just so you will see the ads. It may that it is a bold sarcastic statement or they are hypocrites.

Comment Re:C is very relevant in 2014, (Score 1) 641

Perhaps C's greatest weakness is that it places too much trust in the coder, where other languages don't.

THIS is the only reason for C's existence. If solves one problem, remove all barriers between the programmer and the machine and still be a reasonable language. Assembly is the only way to program with less barriers, but that is not a reasonable language. C is useful in those cases where you simple can't trade speed for the programmer switching off his brain.

Comment Re:C is primordial (Score 4, Insightful) 641

Ok I will bite. Now I don't claim that C is on the same level than ASM, but you need to compare it to current languages. Languages like Python or JavaScript, they abstract out almost everything about the machine you are running them on. With C you program against a reasonably close abstraction of the real machine. In many cases you can hand compile the C code to ASM.

Take for example the JS expression $("a").addClass("blue"). This expression written in C would take up something around 100 lines of code, simply because the machine you program against does not understand high level concepts. Even simple concepts like a string are not understood by C.

I love programming in C, but in whole ecosystem of languages it is on the low end.

Comment Re:Marketshare (Score 1) 205

There is a certain corundum you need to solve. If you sell your software from the beginning, there is a real chance that nobody will ever buy it. If you open source it it may become a huge hit, but you get not money out of it. Assuming that successful open source projects would also be stellar successes when closed source is nonsense.

Also equating that rich corporations are "ripping you off" since they would have payed you good sums, is also nonsense. If no open source alternative was available and they really needed the software they would have just build it themselves and certainly not payed you. Alternatively some projects just exists because the use of open source make the project viable.

Comment Re:Marketshare (Score 1) 205

The FED does not give money to corporations, they primarily interface with the government and banks. It also does not give money, it LENDS money to them. The trick employed here, is that in accounting terms money is added to the active and passive side equally and thus it balances out. Of course this is just smoke and mirrors, since under normal circumstances you actually need to have money to lend it to someone else, but that is not the case at the FED. In addition they get interest on the lending.

Generally I am not opposed to the notion of a central bank that can act as a lender of last resort. But in the case of the FED, "the Federal Reserve is as federal as Federal Express".

Comment Re:Yes (Score 4, Interesting) 409

The effects of radiation is interesting. The SciShow episode Inside the Chernobyl Exclusion Zone is quite interesting on the subject. Sure it's short 4min format, but it introduces the interesting fact that, although some species have suffered gravely, some plants and animals flourish. If you read further into the subject, it gets even more weirder. As for example species that tend to suffer under human civilization, such as the deers and the lynx, suddenly are quite successful; it appears that humans are worse drain than the radiation.

Comment Re:Pretty good idea if it is your computer (Score 1) 79

The trick is that to use your device in the corporate network you need to install the company's CA-certificate. You need to do that or you can not use . Now as it just happens the gateway router is also a transparent HTTPS proxy that issues certificate for the domains it MITM using that said CA-cert. You can't do much (in the US), since you agreed to the usage terms, that included "monitoring for anomalous behavior".

Comment Re:In a Self-Driving Future--- (Score 1) 454

[...] but still lack the population density for quality mass transit, [...]

I am not so sure about that. Most suburbs would probably work with a bus service in half hour intervals. The problem is that the people that want to live in the suburbs are also the people that want to own a car. Basically "the american dream", your own house, your own car and your own debt. These are the people that will not use a bus service even if it was available and efficient.

Comment Re: In a Self-Driving Future--- (Score 1) 454

How does that differ from the current situation? The Sate already basically regulates that you are only allowed to drive on regulated roads. Try to drive on the median of an interstate and see what the sheriff thinks about it. The only exemption here is private property, but here the insurance companies chime in and most will have claims that your cover is void when of road. Basically that has nothing to do with driver less cars.

Slashdot Top Deals

To do nothing is to be nothing.

Working...