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

 



Forgot your password?
typodupeerror
×

Comment what an oddly slanted article (Score 5, Insightful) 94

Congratulations gamers and users of WINE -- you forced Canonical to continue supporting some 32-bit packages for now. Yes, the Ubuntu-maker will now waste its resources on antiquated technology to please a very vocal minority.

I'm not sure how to break it to this guy, but supporting users and their software is what a distribution is for. People whose software is still going to work won't consider that work wasted, that's for sure.

Comment Re:JavaScript should replace C (Score 3, Interesting) 349

That's pretty much what Rust is: a low-level language that can be slotted into the same places C is used now, but without all the undefined behavior and memory leaks. And since it's a new language, it can have features people expect in a new language these days (like type inference, an intelligent build system, etc.).

Comment Re:welcome to python (Score 1) 148

Unicode support in Python 2 is basically the same as in Python 3. If you want to translate from binary strings to Unicode, you're going to need to specify a codec since the language doesn't just assume everything is UTF-8. The difference is that things like paths and command-line arguments are Unicode in Python 3 but plain binary strings in Python 2, so you wind up with this third "class" of strings that might be one or the other depending on which version of the language you're using.

But with a bit of care it's not hard to get a nontrivial amount of Python code to work unmodified in both versions by specifying import fallbacks and so on.

Comment Re:Haskell? (Score 2) 138

Haskell doesn't really have an "if" statement as such. It has an "if" expression (analogous to C's [expr] ? [expr] : [expr] conditional expression) but it's not widely used in my experience. Haskell folks would rather use guards and pattern matching to do the same job.

Comment mobile sites are a disease (Score 4, Insightful) 356

The whole point of HTML and CSS is that all this markup are suggestions to the client, who is free to rearrange elements, use different fonts or otherwise handle things differently for the benefit of the viewer. Making an entirely different, dumber, website for the benefit of some particular class of device defeats the purpose of a "world-wide web".

Make the devices better, not the websites worse.

Comment Re:Not all in the implementation (Score 1) 252

That's what I'm saying though, it's not all in the implementation, tail call recursion relies pretty heavily on the code being set up (and kept up) properly so that it is possible.

Writing code such that the last call in the function is always another call to itself isn't some deep mystery, though. The only question is whether the language is guaranteed to optimize that case.

Um, is that not sneaking in a normal iterative loop with a conditional check that's always true? What would be the difference from the code that generates and "while (1 == 1)"?

Since Haskell has no built-in "while" statement as such, you're going to need to either write an explicit recursive loop or just use one that's already been pre-built for running some action forever. It's just more obvious what's going on by using the latter.

Comment Re:I'm weary of recursion (Score 1) 252

Of course, in someplace like Haskell one can just use the "forever" function which loops some action forever rather than implementing an explicit tail-call loop and making sure to get it right. I'm just saying that recursion isn't guaranteed to blow up one's stack in all cases - it's all in the implementation.

Slashdot Top Deals

"Show business is just like high school, except you get paid." - Martin Mull

Working...