Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment It's not a new idea (Score 1) 195

We used that approach for PBL some years ago. It is wasteful to having to rewrite parsers and lexers for languages to build IDEs, and other tooling.

For example, code indentation can be done by walking the AST (you need to be careful to preserve hidden tokens, such as comments).

You can also allow code completion by changing the compiler to accept a "COMPLETION" token in some places in the grammar. Then, from the editor, when someone presses "Ctrl+SPACE" (or whatever) you mark the location in the lexer and send the code to the compiler. When you build the ast, you insert a completion node in the AST, and you have now contextual information about what can go in there and produce a list of potential things that can go in there.

Also, syntax highlighting can use the lexer for basic coloring and some type information to then add more information (such as what are field, or functions, etc.)

What's new is exposing these phases in a standardized manner in the language. That's a bold move, since backward compatibility will be tricky to maintain. Maybe they're thinking in finally stabilizing C#.

Comment Re:Sure (Score 2) 508

And yet the PLC manufacturers themselves specifically disclaim using them in elevators or medical equipment, or other places where lives could be lost.

They also sell the "safe" version but if you want it, it costs way more than the other version (and usually is just the same product or older and well-known product, plus insurance). As the recolidesnake said, this is can be very very expensive.

Comment Not that surprising (Score 1) 585

This is going to be a rant.

Firefox is the most pedantic browser out there. It is way better than IE, but it's always working against the user. The timeouts in the accept buttons, the stubborn refusal to accept invalid certificates (there is no way to bypass its, which means I cannot use it to configure my router), the awful memory management and the obnoxious update mechanism made me finally switch to Chrome.

They sacrificed all usability for reasons that escape me. What moron thought that forcing the user to wait in order to click a button was a good idea? How much has security improved because of that? I would guess that not much.

The only advantage it used to have was the huge selection of plugins to configure it to your taste (in the end I only use AdBlock), and that is lost already since pretty much anything you need is also available for Chrome.

I keep it around just in case some site doesn't work with Chrome (which are not many), but that's it.

Comment Use a combination of methods (Score 1) 499

You should use a combination of methods and be prepared to move your backups to a new place every few years.

For off-site backups I use Backblaze which is just $3.96 a month unlimited storage if you buy two years (these are the guys that build a half a petabyte custom servers). I also backup to a removable drive every once in a while that I keep in the office.

Maybe once a year, I pick the very best pictures and print them and build an album. Even cheap photo paper lasts at least 50 years. Archival quality lasts over 100 years if stored properly.

Comment So? (Score 2) 214

There are many projects like this. Many times crowdsourced translations are better than professional translations, and for many situations they are the only option.

Languages like spanish have a huge number of variations (it's pretty much different in every country, heck, even inside the same country), and we end up enduring a washed-up version of an international spanish that's usually awful. Crowdsourced translations at least let you correct the translation and add variations that feel better for a speakers of a certain variation of the language.

One good example of this type of crowdsourced effort is subtitles. See "subtitulos.es" for example. You can get a complete movie or series chapter translated in a few hours. From the basic result obtained there, several teams around the world further localize the language (for example to Argentinian spanish).

Comment Re:What exactly is wrong with javascript? (Score 1) 247

You can extend it to your hearts content, but you might as well build something different and leave Javascript as is, completely undisturbed. It's a choice they can make.

It is probably faster to take a chance and build an entire new language unilaterally, than gaining consensus with all the players to get the right set of modifications to a well known language (standard committees are a pain in the proverbial arse).

Since they are planning to make their language to be able to cross-compile to Javascript, they reduce the risk of not getting widespread enough adoption (all browsers that support Javascript support it), but since probably WebKit is going to support it natively, they will get a huge installed base without much effort.

It is not such an unreasonable choice they are making.

Comment Re:What exactly is wrong with javascript? (Score 1, Informative) 247

There are a few things wrong with it. Which do not matter much for small-ish code bases, but tend to be a pain for larger products. For me most revolve around the interpreted nature and the lack of types.

Off the top of my head:

  • Performance: Current javascript engines are as fast as they get for an untyped language. There isn't much more you can do to speed it up. Even optional type annotations would open a large number of potential optimizations.
  • Tooling: For large projects, not having much type information is painful. Refactoring code becomes a guessing game (some tools do it better than others).
  • Load time: You have to compile javascript each time a page loads. This adds some latency that could be minimized with a proper
  • Lack of integral/decimal numbers: This might not seem like much of a problem, but handling money with only floating point numbers is painful. Also, things such as WebGL would benefit from having better ways to deal with raw data.

Don't get me wrong, Javascript is a great little language, but it is by no means perfect.

Comment There is no such thing as "Spare CPU cycles" (Score 1) 136

CPU cycles are not "spare", when a computer has noting to do it just halts. This saves power.

Using your "spare CPU cycles" makes the CPU use more power, it is by no means free.

This is true for other things, like ads using flash animations for example. I always find it ironic to see it in sites like TreeHugger, which is full of flashy animations. I would expect a green site to use mostly static HTML and text based ads to reduce the carbon footprint of all it's viewers.

Comment How I envy you... (Score 1) 151

If you have a 10 or 20Mbps connection, and yet a download is crawling along at just a few hundred kilobytes

I would love to have a connection that "crawls along at just a few hundred kilobytes (a second)", most of the times, when it crawls, it does so at a few tens of kilobytes a second (sometimes even less than that).

Comment Re:Does anyone (Score 2) 127

ActiveX is fundamentally different than NaCl. ActiveX security was based on the component being signed and that's about it. NaCl uses a very strict code verification (similar to what the JVM does, but with a subset of x86), runs in a process that has no permissions to do anyhting, and can only use a few APIs. It's not worse than Javascript.

Comment Re:Cost? (Score 2) 48

That's true. One thing that worries me and I don't see in lightbulbs performance assessments is the number of on/off cycles. I have a couple of CFLs in the bathroom at home and they fail very often (I've used Philips and GE). Even more often than regular light bulbs. I'm guessing that's because they get turned on and off very often and that makes the starter circuits fail. The fluorescents are fine, but the power stage just dies.

Comment Re:It strikes me as racist (Score 1) 608

When you want to do a super hero that's from a violent poor neighborhood in 2011, choosing a non-white character isn't about being PC, it's about being logical.

I can see that as a valid creative resource, but the summary makes it look like it was a forced choice to be more agreeable with some moral standard, rather than trying to make it good.

Comment It strikes me as racist (Score 1) 608

Excessive politically correct behavior always strikes me as racist/xenophobic. Particularly the (North)American version.

It puts emphasis on superficial differences by trying to apply an arbitrary ontology on everyone.

For example, most media "latinos" are portraid as dark haired, brownish skinned people (which is not true in general, it depends on the particular population). They fail to include all the other latin populations: italians, spanish, french, romanian, portuguese, brazilian, etc. (I'm argentinian BTW, so I count as "latino").

It escapes me how stereotyping entire populations on superficialities became "the right thing to do" from PC point of view.

Slashdot Top Deals

Anyone can make an omelet with eggs. The trick is to make one with none.

Working...