Approximity blog home
712 to 721 of 867 articles

Easy (better: familiar) things are most successful   25 Sep 04
[print link all ]
(Source: James A. Robertson) www.cincomsmalltalk.com/blog/blogView

GNU Smalltalk 2.1e (Development)   25 Sep 04
[print link all ]
GNU Smalltalk is a free implementation of the Smalltalk-80 language.

Changes: Several bugfixes were made for the JIT compiler. A working Java-to-Smalltalk bytecode translator (which does not support networking and reflection yet) was added.

homepage download

EuRuKo 2004   25 Sep 04
[print link all ]

European Ruby Conference 2004. New date: October 8 and 9 in Munich

Register

Come for some Ruby-fun. Last year’s conference: www.approximity.com/cgi-bin/europeRuby/tiki.cgi/

Test First, by Intention   25 Sep 04
[print link all ]
(Source: rubycentral) A code and culture translation from the original Smalltalk to Ruby.

Original by Ronald Jeffries, translation by Aleksi Niemela and Dave Thomas. www.rubycentral.com/articles/pink/index.html

The dark side of computing: floating point arithmetic   25 Sep 04
[print link all ]
I saw this post on ruby-talk: raise "false" if ((625.91 + 900.00 + 22.00) != 1547.91) And yes, of course it raises the exception in ruby or in C. Guy Decoux (as always) answered quickly:
 svg% ruby -e 'p  "%.24f" % (625.91 + 900.00 + 22.00)'
 "1547.909999999999854480847716"
 svg%

 svg% ruby -e 'p  "%.24f" % 1547.91'
 "1547.910000000000081854523160"
 svg%

Dave Thomas explained: It’s about 40 years old, and unlikely to be fixed. Floating point numbers are not represented exactly inside computers, and so floating point comparisons are routinely deprecated in books on programming. Certain values cannot ever be expressed in floating point representation. If you want exact, fractional, math, you should probably use the ‘rational’ library and investigate ‘mathn’. This is the classic article to read link What Every Computer Scientist Should Know About Floating-Point Arithmetic.

Michael Neumann added: In Ruby you can use BigDecimal:

 require 'bigdecimal'
 BigDecimal.new("625.91") + 900 + 22 == BigDecimal.new("1547.91") # => true

On reading a text file in Smalltalk   25 Sep 04
[print link all ]
(Source: comp.lang.smalltalk, Lex Spoon) If you accept losing one notch of performance, then you can make much clearer code in Smalltalk. The "file lines" idiom in this thread is very useful, because you can then use collect:, select:, etc., on the resulting collection of lines.

And it is important to consider that once you commit to, say, iterating over an entire file, that the file must be reasonably small anyway to get decent performance. The same issue exists with collections. Who cares if collect: creates an extra collection or if WriteStream wastes space at the end of a long underlying collection; if these concerns are really so important then probably this huge collection should not exist and/or you should not be iterating over the entire thing anyway.

To put it very simply: you just can not expect a program to work on large data structures just because you micro optimized everywhere. If you want to handle large data structures then it takes planning and specialized algorithms and test cases. If you are not going to put in that effort, then don’t sweat the small stuff. It is very liberating to code with an eye towards correctness and towards algorithmic performance, and not to worry about getting down the constant factor. It seems to lead to lower stress, faster code production, and fewer bugs generated.

Alan Kay's talk at O'Reilly Emerging Technology Conference 2003   25 Sep 04
[print link all ]
(Source: Cory Doctorow) Notes from "Daddy, Are We There Yet?"

The last 20 years of the PC have been boring. PC vendors aim at businesses, who aren’t creative in their tool-use. They’re adults: they learn a system and stick to it. We should think about children. The printing revoltuion didn’t happen in Gutenberg’s day, it happened 150 years later, long after Gutenberg was dead, when all the pople alive had grown up with the press.

A small minority of Gutenberg’s contemporaries got the printing press, but it wasn’t until they were dead that the children who grew up with the press were able to put the ideas into practice.

James Licklieder: in a couple of years, human brains and computers will be coupled. It hasn’t happened yet. Except in science, where scientists and computers are indeed thinking as no human brain has ever thought before. .. craphound.com/kayetcon2003

DE: Squeak Artikel C't   25 Sep 04
[print link all ]
In der C’t 7/2004 erschien ein Artikel ueber Squeak. Programmieren lernen mit Squeak: Von kleinen und grossen Erfindern. pdf

Smalltalk isKindOfLike: Yogurt   25 Sep 04
[print link all ]
(Source: Stefan, comp.lang.smalltalk) Smalltalk is like an Apache hellicopter. Java is like a B52 bomber with pretty heavy duty jet engines.

Smalltalk is very well thought out, extremely well engineered, very flexible, and generally gives quite good performance in a multitude of situations. It’s very adaptable to many different situations, and has lots of tricks up it’s sleeve. Driving it is a bit of a paradigm shift from driving your average plane, it has some new fancy controls, but once you get the hang of it, it can be totally amazing and really fun. Even if you don’t totally know what you’re doing you can still get yourself out of a jam. Given that you’ve got a good pilot you can launch off to a quick start and really do some very heavy and impressive damage in a very short time. It also tends to perform quite impressively if you’ve got a few of them around, and easier to coordinate an army of them.

Java is pretty difficult to drive, and once you get it going in a certain direction it’s pretty hard to get it going somewhere else. It has a few turbo buttons on it so that if you really know when and where to use it, it can fly pretty well. You can surely get it going really fast if you fly it high enough and then point it straight into the ground. It’s generally not very flexible and often a real pain to deal with, but overall once you’ve got a flightplan fixed in stone you can fly it reasonably well and run it reasonably efficiently. If you are meticulous in your planning and implementation, it can really deliver the goods. If you make some mistakes, things can go very wrong that may become almost impossible to correct. Don’t count on any big changes, quick maneuvers, or any sort of fancy tricks that just might save the day, and leave yourself a good bit of time for planning and implementation before you expect to be able to deliver the goods. If you come accross any surprise attacks or come up against an Apache hellicopter, you could be doomed.

Using the right hammer ..   25 Sep 04
[print link all ]
(Source: Robert Martin (UncleBob) in the pragprog-list) As a contractor you must do the best job you can for your client. This includes picking the best language for the situation. I agree that there are situations in which Ruby might be the best technical solution, but the worst political solution. In that case, you cannot use Ruby — you must use a technically inferior, but politically preferable language. There are other situations — more and more of them — in which Ruby is politically acceptable, and technically superior.

 

powered by RubLog
712 to 721 of 867 articles Syndicate: full/short
A unique and safe way to buy gold and silver