Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment: Re:Unicode support? (Score 1) 263

by chromatic (#42332307) Attached to: Perl Turns 25

Not all of the world is UTF-8. Assuming that it is is, in fact, wrong.

I appreciate your confidence that things you've never heard of before must exist and work properly, but I'll take that with a grain of salt. Unicode isn't merely UTF-8 and BOMs and hand-waving. Unicode is a set of properties and rules about how to use those properties correctly. If you don't know what they are and when to use them, no language can use them automatically for you on this side of the strong-AI singularity.

(It's easy for me to imagine reading from a filesystem that doesn't return data encoded in UTF-8, or data from the network which doesn't supply a correct encoding or any encoding, because that happens all the time. You can expect that everything always does exactly what you expect, or you can write correct and robust code. You cannot do both.)

Comment: Re:Testing (Score 2) 263

by chromatic (#42330887) Attached to: Perl Turns 25

... what does the much-vaunted CPAN contain within it that has unit tests?

Any serious distribution on the CPAN has at least a decent test suite in its t/ directory. Everything uploaded to the CPAN gets run through the CPAN Testers service, often within minutes of the upload.

search.cpan.org has over 3200 results for module names which contain the word "Test".

Comment: Re:Full classes? (Score 4, Informative) 488

by chromatic (#41520105) Attached to: TypeScript: Microsoft's Replacement For JavaScript

Coming from you?

I know a little bit about compilers.

Every language has its ugly spots that make optimization difficult...

"Every number is a float" is one of them in JavaScript. "All objects are associative arrays" is another. "Object prototypes are mutable everywhere" is yet another.

... a large amount of the performance improvements that have come in recent years have nothing to do with the language syntax of javascript...

Some, yes, but many also come from tracing the flow of data as the program runs to figure out which pessimizations inherent to the semantics of JavaScript it's safe to undo. That's why modern JavaScript JITs work so hard to perform side exits with their guard clauses to produce code that runs in as straight a line as possible. Ask Jim Blandy about it sometime.

Perl would have to do similar optimizations. So would Python. So would Ruby. (It's instructive to talk to the people behind Rubinius and Unladen Swallow, if not people who've spent years optimizing Smalltalk implementations.)

Comment: Re:Assuming Infringement by Default (Score 1) 130

by chromatic (#41508555) Attached to: Google Blocks Author's Ads For Offering Torrent Of His Own Book

If Amazon wants to be the publisher of choice for independent writers, it seems to me that at least one person involved in creating policies should be familiar enough with copyright and Internet publishing to understand Creative Commons. That's the part of this whole process which baffles me.

Comment: Re:Assuming Infringement by Default (Score 1) 130

by chromatic (#41506931) Attached to: Google Blocks Author's Ads For Offering Torrent Of His Own Book

You're probably right.

I'm not sure that deploying arbitrary code developed as a knee-jerk policy is the best way to interact with your suppliers. Amazon should have thought this through. It's not as if Creative Commons is invisible from a cursory search of modern copyright.

Comment: Re:Assuming Infringement by Default (Score 1) 130

by chromatic (#41501537) Attached to: Google Blocks Author's Ads For Offering Torrent Of His Own Book

... in the absence of sufficiently strong indicators to the contrary.

In my case, this is a revision of the second edition of a book also available for sale as hard copy, uploaded from the publisher's account.

I can understand being stricter about the initial upload of a work, but letting the first upload through and only enforcing the copyright detector on a minor revision seems counterproductive.

If entropy is increasing, where is it coming from?

Working...