Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Slashdot Deals: Cyber Monday Sale Extended! Courses ranging from coding to project management - all eLearning deals 20% off with coupon code "CYBERMONDAY20". ×

Comment Re: GM producers are shooting themselves in the f (Score 1) 514

[Citation] [lmgtfy.com]

Was that meant to be helpful, or misleading or a very subtle but clever statement about the GM debate?

The top two hits are in order:
FDA's new regulations won't allow non-GMO, GMO-free label
Huge Victory: USDA Introduces Official Non-GMO Label ...

The top hit is a 2001 article about something that never happened. The second hit is of course correct - there is even a seal.

It's truely amazing the non-GMO nutters have managed to keep that first hit at the top for 14 years. They must want it to be true so much they are linking to it, clicking on it, citing it like crazy.

As I said, it sums up the debate nicely. If that is what you were intending - well done.

Comment Re:Why are resistors needed in a cable? (Score 1) 206

Seems to me that it would be a faulty design that requires a 'cable' to need any electronics at all.

In that case USB 3.1 must be a terrible design. A full spec cable doesn't just require a resistor or two, it needs a PCB: http://cache-www.belkin.com/resources/img/overview/f2cu029/USB-C_CableExploded_v01-r01.png. That cable is only rated for 3A. A full spec cable can carry 5A. I'm surprised they only cost $20.

Mind you, I'm not complaining. $20 sounds like a cheap price to pay if I get to throw out the rats nest of cables I carry around now.

Comment Re:Hmmm .... (Score 1) 80

So if governments around the world are giving themselves license to hack into our stuff, do anything they please, and share this with other governments ... then it almost seems like a moral duty that every government server is now fair game.

The people in power always have always read, listened to, or saw pretty much whatever they wanted, although possibly they had to pause to spin the reason into a "so the terrorists don't win" or "think of the children" meme. And with "people in power" I don't just mean the politicians, or the spooks. Judges assume they can extract information by just issuing an writ to hand over documents, and its almost considered "due diligence" now for employers to launch MITM attacks on in https connections their employees make (although not the CEO's, obviously). Collectively one of or other of them can (and on occasion do) open every letter, listen to every phone call, and read every SMS sent by a person. As soon at the technology became available they used radio mics to listen to every word uttered at a place or by a person in real time, later they blanketed cities with cameras. So there is nothing new in this - they just want the abilities they had in 20th century back.

What is utterly beyond explanation is they apparently think they can do it. It is true that every man has his price. As we found out, even a large corporation like AT&T had its price, a price the NSA was prepared to pay. But this time they are dealing with physics and maths, and they apparently think they can force physics and maths to change if they throw the law at it, or man power at it, or money at it.

To them I say: it's time to move on old men. You're tilting at windmills, and don't even know it.

Comment Re:Maybe? (Score 1) 437

Can you go:

Of course you can, syntax notwithstanding. But asking questions here is an awful way to learn the capabilities of Rust given they have published a free online book to teach you just that. It would only take you a day to work through the entire thing. It being open source and all, once you have done that next step would be to look up the code for the standard libraries for that that does something like you want. There is nothing like studying the work of an expert in the field to get you up to speed fast. They even give an example that looks like yours in the standard library doco.

Comment Re:Use C (Score 1) 437

Lines of code is not the measure of productivity

I didn't say lines of code is good way to measure productivity. Using it as such a measure is counter productive because programmers find ways to bloat the code. Not only doesn't it increase real productivity, it creates a maintenance nightmare.

What I said was programmers produce the similar lines of code per day, regardless of language. If you are doubt this, you need to go study some more. It's been demonstrated over and over again. There are many things that do effect lines of code delivered of course - the biggest one being project size. Most programmers can deliver a 200 line debugged, working program in a day. Put the same programmer in a large project, and that can drop to 10 lines of code per day, which is far larger effect than language.

You are right in that lines produced per day by a programmer is effected by language - but It's nothing like 20 to 1. This page shows 4 to 1 at the extreme; Smalltalk vs Assembler, with the assembler programmer producing 4 times as many lines of code as the smalltalk programmer. I guess that's to be expected give how much a meaning a smalltalk programmer can put into one line vs an assembler programmer. If you look at languages that are more similar - eg curly brace languages, you see a difference of only 2 to 1.

If you look closely, you notice another odd thing. The less lines the programmers write, the more productive they are in delivering function points in general. Now if I had of said because the C programmer writes code faster than Rust productive, he will be less productive I'm sure you would have jumped on me from an even greater height and you would have managed to be more wrong than you are now. I don't know whether it's true for C and Rust, but "the more code a language lets you write in a day, the less productive you will be in it" is definitely a good rule of thumb. In the smalltalk vs assembler case, the smalltalk programmer delivers 3 times as many function points as the assembler program per unit time, while writing 1/4 of the amount of code! If it is true for C and Rust, it annihilates your suggestion that over the life of a project C would be more productive that a Rust.

Lines of code is not the measure of productivity when two thirds of them require debugging or rewriting because the idiot didn't know what they were doing and used a hammer to drive a screw.

True. Which is why it isn't measured that way. The usual measure is the total non comment lines delivered over the total time it took to deliver the project, divided by the number of people employed to do it - and that doesn't just include programmers. Here "delivered" means debugged and in production. Which is how a large project ends with with abysmal figures like 10 lines per day. If a language encourages buggy code, which is thrown away that counts against it, not for it.

Comment Re:Rust Lacks OOM Handling (Score 1) 437

Rust should add rudimentary support for exceptions

It does have exactly that, rudimentary being the operative word. It has panic(), which doesn't kill the program but does kill a much larger unit of it (a thread actually) then try/except/finally normally controls. Still, it's enough to recover from things like out of memory, because it guarantees the memory will be freed.

The reason it has only rudimentary exceptions is because it can do the by combining it's type inference engine with it's spectacularly powerful macroing system. The type system allows you return arbitrary stuff with the caller really having to know or care (because it has an implicit type generation), and they have provided a "try!" macro in the standard library. So it's all there, just not done in the conventional way.

And in case you are wondering why force you to learn this newfangled way when the old way worked perfectly well - it's because the old way imposed run time over heads on everything. The new way handles it in the type system so overheads disappear at compile time.

It's just a repeat of Rust's memory handling solution, really. In C you handle memory allocation and exceptions manually, with all sorts of nasty consequences like dangling pointers and people dereferencing NULL. Java/C#/YouNameIt eliminates the nasty consequences using run time solutions like gc and exceptions - but they impose a runtime overhead. Rust brings something totally new to the table - the programmer handles it, but the language eliminates all the nasty consequences. So it's fast like C, and safe like Java/C#/YouNameIt. But there is nothing free in this world. Rust's extracts it's pound of programmer flesh with it's borrow checker.

Comment Re:Use C (Score 1) 437

You'll get better debugging tools

Rust targets LLVM, and LLVM outputs the same debugging info as the GNU compilers. So gdb, for example, works as well with Rust as it does with C.

more productivity (since you know C better)

For a short while. (OK, maybe not so sort in Rust's case as borrow checker is a bitch.) But in the end no, a Rust programmer will beat C with the same inevitability a newbie C programmer will eventually beat an experienced assembly programmer. The reason is the same too. You need far less lines of Rust to do the same thing. Programmers tend to produce the same number of lines of code per day, regardless of language.

Comment Re:Portability (Score 1) 437

there are C compilers available for almost every piece of hardware out there.

There are. But most of those CPU arches targeted by LLVM, which is what the current Rust compiler uses as it's back end. And then there are some targeted by LLVM, but not but C - like asm.js.

You were right, once. If you were targeting some random arch the only thing you could rely on was a C compiler being available for some definition of "C". If you were lucking they might even provide something that looked vaguely like the POSIX library. But LLVM has broken that rule of thumb. The odds are very good that LLVM will also target your machine, and if it does all compilers and languages that use LLVM can produce code for it. And this isn't for some random implementation of the language like you got with C, it is typically the reference implementation of the language, and you get all this bits of it standard library that are written in itself as well.

After 40 so years, they world has finally moved on.

Comment There are develoipers talking it to the next level (Score 1) 122

There are delevelopers taking it to the next level. They are the same ones that have got it to where it is now - like autonomous plans that find people people lost the wilderness and drop a rescue package beside them.

But maybe he is talking about a different species of developer entirely - the one that publish most of the crap found in app stores. When I think "developer", I think of a person who enjoys creating new things from code. That is the sort of developer who is driving openpilot, which is were most of the innovation is happening right now. The developer he is apparently talking about prioritises money - they are people who constantly looking to make the most money in the shortest amount of time from the least amount of code. A different animal entirely. We will need them later to find all the useful things that can be done with drones. But right now it's a struggle to make the thing work at all, and for that you need real developers.

Real developers? Sorry. That was a bad choice of words. What is a socially acceptable word for people who prefer technology to money, or indeed people. Nerds maybe? Call us what we like, were are far too busy having fun with computers to notice.

Comment Re:Cultural? (Score 1) 479

In a gasoline engine, how much fuel do you feed to the air? When do you trigger the spark plugs, at what advance? In a diesel, when do you inject the fuel, and how much? Etc...

Yeah, but it's the mechanical engineers job to optimise those parameters. He then tells the software engineer he needs the oxygen level adjusted within 5ms of sensing a change in the throttle. If software engineer stares at him and says "how the fuck I am supposed to meet that deadline on the lame arse 100Mhz 16 bit CPU the electrical engineers gave me when the brake guys are telling me I need to react to wheel slip within 100us otherwise I could kill somebody?". The mechanical engineer will then shrug his shoulders and say "I don't know, that's not my area, but if you don't do it we won't meet emissions standards".

The only way to fix this PR mess was to own up, take it on this chin, and move on. That way they might have a hope of selling the "I was a bad boy but I've learnt my lesson so you can be sure I'll never do it again" line. Blaming the most remote limb, hacking it off, and saying to the world "there I've fixed the problem" sounds awfully like psychopaths are running the show. If that is true we know as soon as a backs are turned, they will do it again.

Comment Re:Lots of interesting comments at -1 (Score 4, Informative) 78

The problem, as I see it, is that by doing it in Javascript, we're introducing a new dependency: the code will only work on a browser produced in 2015.

Well you can rest easy then, because no one is writing this stuff in JavaScript.

What triggered this change is Emscripten, which is a back end for LLVM that targets ... JavaScript. Actually it targets asm.js, which runs at about 1/2 native speed in Firefox (not so fast in Chrome, because Google thinks the solution to the same problem is NaCl).

What that means is any compiler that uses LLVM can now compile to asm.js. Which means any program written in Python, Rust, Go (there are a whole pile of languages) can now be compiled to run in the browser. In particular Clang is a C compiler for LLVM. Dosbox is a x86 + MSDOS emulator, written in C. Ergo Dosbox can now be compiled to JavaScript and this run in the browser. Js-dos is a site apparently dedicated hosting games that does just that. The game console emulators are also written in C. So they to can and now have been compiled to asm.js. Because modern web browsers support WebGL, OpenGL games that have been open sourced (like Quake3) have also been compiled to JavaScript, and run spookelly well. Which is how we get to the plethora of games mentioned in the article. Pity it didn't mention the technology behind it.

But why stop a games? Sqlite3 has been recompiled for Javascript. It can do in browser SQL queries in about 2ms, and is a damned site nicer to use than wandering through a spiderweb of Javascript objects. But why stick to something sane? You can now do ffmpeg encoding in your browser.

Comment Re:Bigotry Shmigotry (Score 1) 536

Imagine how the dating scene would change if men could get off (legally, cleanly and guilt free) whenever the had the urge, instead of having to date countless women and pretend to like them to get laid until the right one came along.....

Errr, have you looked at what internet offers now? Admittedly you only get to touch the screen, but there is a real woman behind it who gets paid to do what you ask and pretend to love it without caring one wit about whether you like her or not.

Maybe you haven't paid much attention to it, but the women on the planet sure have. There reaction was exactly the same as this time round - they embark on crusades to get rid of porn on the internet. Hopefully their successes to date will be an excellent predictor of Dr Kathleen Richardson's success in this time around.

Despite these developments civilisation still stands. My guess is that's because men actually enjoy the company of their partner, particularly one that also reciprocates by appreciating his company as much as he appreciates hers.

The only surprising thing about any of this is as an ethicist lecturing at a University, I expect Dr Kathleen Richardson to be smart enough to recognise we have been inventing machines designed to replace women in sex for literally millennia - starting with his hands. Yet they always end up wanting the real thing. Maybe, just maybe, isn't just sex isn't the only thing men want from a relationship?

Comment Re:Biological controls (Score 1) 106

It may be a 20kg snail, but I still find eating a starfish that grows up to almost 1 yard and has 1 inch poisonous spines impressive. A triton will chase a starfish, and the starfish runs when it senses the attacker - but it invariably looses the race against the snail.

Given a mollusc can eat them and so do some fish, it is a bit surprising we haven't found a use for the starfish the the robot finds. Ground up for fish meal and fed to fish farms sounds like an idea.

It's bloody typical of us Australian's. We are smart enough to build a fully autonomous killer robot that visually identifies it's victims. We are rich enough to build and deploy the bloody things at the tax payers expense. But we aren't smart enough to harvest them, and apparently rich enough not to care.

Anything cut to length will be too short.