Approximity blog home
488 to 507 of 597 articles InfoSyndicate: full/short

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.

Smalltalk must be dead because ...   25 Sep 04
[print link all ]
Donald Raab posted this goodie to the st-mailinglist.

It’s probably because in order to post in the Java ng he has to be 10x as verbose as in the Smalltalk ng.

He probably has to declare himself, cast himself, wrap himself in a try catch block, bubble up any exceptions, use some external iterators, implement some interfaces, and wrap up his primitives in real objects. Maybe after auto-boxing and generics are supported, he’ll only have to post 7 or 8x as often.

Don’t worry James, we appreciate and understand your terseness over here. ;-)

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

ObjectGraph: a Ruby class inheritance hierarchy graph   25 Sep 04
[print link all ]
(Source: Mehr, Assaph, ruby-ML) A simple script that generates a graph of the ruby class hierarchy. The script relies on graphviz for generation of the PNG and HTML map files. Take a look at the basic Ruby class hierarchy on the project web site: link

Squeak is a toy - so ?   25 Sep 04
[print link all ]
(source: email from Martin Drautzburg to stx-users ML; Oct, 22, 2003)
 > PPS:
 > I remember working for a company, where it took the make utility3/4 of
 > an hour to figure out *what* to compile, and the compilers a day to
 > compile- it was a C++ project b.t.w. which was canceled and replaced by
 > a Smalltalk program after they spent 50man-years on a non-working
 > program - so much for non-toy languages !

Yeah and I just spent 3 days in an inhouse J2EE workshop held by one of our chief architects. We spent most of our time fighting with the tools. Changed setting over and over. The goal of the workshop was to demonstrate how to insert a row into an oracle table. At the end of the 2 days the table was still empty. Another non-toy language.

I have written two small apps (apx 5000 LOC) one in squak and one in stx. It was a dream. Got up in the morning and fixed two or three bugs before breakfast. You can only do this with a real cool environment.

A Little Ruby, A Lot of Objects   25 Sep 04
[print link all ]
This is a draft book titled A Little Ruby, A Lot of Objects. It’s in the style of Friedman and Felleisen’s wonderful The Little Lisper, but on a different topic.

Welcome to my little book. In it, my goal is to teach you a way to think about computation, to show you how far you can take a simple idea: that all computation consists of sending messages to objects. Object-oriented programming is no longer unusual, but taking it to the extreme - making everything an object - is still supported by only a few programming languages.

Can I justify this book in practical terms? Will reading it make you a better programmer, even if you never use "call with current continuation" or indulge in "metaclass hackery"? I think it might, but perhaps only if you’re the sort of person who would read this sort of book even if it had no practical value.

The real reason for reading this book is that the ideas in it are neat. There’s an intellectual heritage here, a history of people building idea upon idea. It’s an academic heritage, but not in the fussy sense. It’s more a joyous heritage of tinkerers, of people buttonholing their friends and saying, "You know, if I take that and think about it like this, look what I can do!"

link

Protecting commercial Ruby source   25 Sep 04
[print link all ]
Lothar Scholz posted this to the Ruby-ML.
 GM> Are there any accepted or already practiced ways for
 GM> companies to prevent Ruby source code from being read by potential
 GM> competitors? I can vaguely imagine redefining Ruby's
 GM> "require"-type methods so they can include zipped and passworded
 GM> ".rbz" files, say. Or using exerb (except for UNIX and without the
 GM> potential license issues).

 GM> I want to use Ruby at work but this is one of those "steps to
 GM> convincing your boss to use Ruby" I need to go through.

Just look at the "eval.c" file, i think the require is defined there and then write your hook. Or write a dll/so and add embedd your rb files as large c strings there (using maybe the "wrap" tool from the Fox Toolkit) and then do rb_eval_string("my c file"). After this protect the dll with something like "armadillo" (use google to find the URL). This works perfectly for me.

[Squeak-ev] Deutsches 3.7g zum testen   25 Sep 04
[print link all ]
Markus Denker posted this to the Squeak-ev list
 Ich habe mal ein erstes deutsches 3.7g zusammengestellt:

 http://www.iam.unibe.ch/~denker/Squeak3.7gDeutsch.zip

 Das ist einfach das letzte 3.7g Full Image + deutsche uebersetzungen.
 Die englischen Fenster habe ich geloescht, die engl. Demo-Projekte sind
 aber noch drin.

 Was wir brauchen ist

 -> Eine deutscher Willkommen-text
 -> ein paar deutsche Demo Projekte
 -> am besten ein deutsches tutorial...

 Bi den Einfuehrungs-texten sollten wir uns nicht an den englischen orientieren,
 die sind naemlich eher sinnlos, denke ich.

[ANN] linalg-0.3.2 -- Ruby Linear Algebra Library   25 Sep 04
[print link all ]
link[linalg.rubyforge.org/}

From the README:

Major features:

  • Cholesky decomposition
  • LU decomposition
  • QR decomposition
  • Schur decomposition
  • Singular value decomposition
  • Eigenvalues and eigenvectors of a general matrix
  • Minimization by least squares
  • Linear equation solving
  • Stand-alone LAPACK bindings: call any LAPACK routine from directly from ruby.

What's Shiny and New in Ruby 1.8.0?   25 Sep 04
[print link all ]
why has produced a must_read summary about new features in Ruby 1.8.0. whytheluckystiff.net/articles/2003/08/04/rubyOneEightOh

[ANN] Ruby/.NET bridge R3   25 Sep 04
[print link all ]
(Benjamin Schroeder posted this to ruby-talk) I’d like to announce Release 3 of our Ruby/.NET bridge, which lets you use Ruby and .NET objects together in your programs. (Releases 1 and 2 were available on the RAA and RubyForge, but this is the first one we’re announcing widely.) link. Make sure you check out the 5 minute tutorial. It’s impressive.

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

Getting Started With ExeRb   25 Sep 04
[print link all ]
(Source: Rubygarden) Exerb is one way how to generate .exe from Ruby scripts. www.rubygarden.org/ruby?GettingStartedWithExeRb

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.

Gametrak   25 Sep 04
[print link all ]
Gametrak. is a new videogames controller, giving you precise and intuitive control in 3D space. link

Unlike cameras, infra-red, RF systems or tilt technologies, Gametrak. allows movement forwards and backwards as well as up, down, left and right.

With Gametrak you can punch your opponents with your hands; sports games let you pick up and play using real golf clubs or tennis racquets . you can even bounce virtual basketballs!

Designed and manufactured by In2Games, Gametrak will launch across Europe o­n PS2 in September 2004 with the revolutionary fighting game, Dark Wind.

Future Gametrak titles include golf, baseball, adventure, dancing and basketball games.

FAQ

Comment: Microsoft's rush to next-gen could see the Xbox take a tumble   25 Sep 04
[print link all ]
(Source: Gamesindustry) from the article
 Microsoft may be making a colossal mistake by trying to force
 the industry into a next-generation cycle before it is ready
 to move. Sony, with its enormous dominance of the market, could
 probably just about get away with it - if it moved, the industry
 would have to move with it, however much it hated the idea. But
 Microsoft, still a relatively small player in the games industry,
 just doesn't look like a company that has the influence needed to
 force a shift like this. It may be backed up by the biggest
 software company in the world, but publishers will still look at
 the bottom line - in this case, installed base and cost of
 development - and base their decisions on that alone. Herein lies
 the arrogance; Microsoft isn't used to making decisions as an
 industry small-fry, and it's trying to act like an industry leader
 in an industry it simply doesn't lead.

PlayStation 2: Computational Cluster   25 Sep 04
[print link all ]
The NCSA has constructed a PlayStation 2 Linux cluster as a test bench for scientific computation on "toy" hardware. The cluster consists of 65 compute nodes, 4 user login and development nodes, and 1 prototype node for software installation tests. All the nodes run the Sony Linux distribution for PlayStation 2. The compute nodes fill a 24-inch rack; 5 shelves at 13 per shelf (see left); link Looking forward to see such solutions for the new upcoming Playstation 3.

WebDav in 10 minutes: HTTP gave you read, now DAV gives you write access   25 Sep 04
[print link all ]
The stated goal of the WebDAV (DAV) working group is (from the charter) to "define the HTTP extensions necessary to enable distributed web authoring tools to be broadly interoperable, while supporting user needs", and in this respect DAV is completing the original vision of the Web as a writeable, collaborative medium.

But, people working on DAV have had goals which extend beyond simple web page authoring. Some view DAV as a network filesystem suitable for the Internet, one that works on entire files at a time, with good performance in high-latency environments. Others view DAV as a protocol for manipulating the contents of a document management system via the Web. An important goal of DAV is to support virtual enterprises, being the primary protocol supporting a wide range of collaborative applications. Importantly, a major goal is the support of remote software development teams. A final goal of DAV is to leverage the success of HTTP in being a standard access layer for a wide range of storage repositories — HTTP gave them read access, while DAV gives them write access.

Well, the website clains WebDAV in 2 minutes .. I think 10-20 minutes is more realistic :-). A good starter.

Apache2 already comes with mod_dav.

Napkin Look and Feel   25 Sep 04
[print link all ]
Now I did it. I made a Java category in this blog. I think like Paul Graham about Java and C#, but oh well ..

I coped this from: Napkin Look & Feel is a pluggable Java look and feel that looks like it was scrawled on a napkin. You can use it to make provisional work actually look provisonal, or just for fun.

The idea is to try to develop a look and feel that can be used in Java applications that looks informal and provisional, yet be fully functional for development. Often when people see a GUI mock-up, or a complete GUI without full functionality, they assume that the code behind it is working. While this can be used to sleazy advantage, it can also convince people who ought to know better (like your managers) that you are already done when you have just barely begun, or when only parts are complete.

Root: An Object-Oriented Data Analysis Framework   25 Sep 04
[print link all ]

Sven C. Koehler, our hard-coding dataminer has sent me an email while his code was probably exploring the DNA of some beauty. I wonder whether it was the beauty the root-team uses in their logo? Hey, just because of the logo, one ought to give root a try.

 What I was impressed about:
 http://root.cern.ch/root/Mission.html
 ``We started the ROOT project in the context of the NA49 experiment at
 CERN. NA49 generates an impressive amount of data, about 10 Terabytes
 of raw data per run.'';

 ``Thanks to the builtin CINT C++ interpreter the command language,
  the scripting, or macro, language and the programming language are
  all C++. The interpreter allows for fast prototyping of the macros
  since it removes the time consuming compile/link cycle. It also
  provides a good environment to learn C++. If more performance is
  needed the interactively developed macros can be compiled using a
  C++ compiler.'';

 http://root.cern.ch/root/Architecture.html
 ``The backbone of the ROOT architecture is a layered class
 hierarchy with, currently, around 310 classes grouped in about 24
 frameworks divided in 14 categories. This hierarchy is organized in
 a mostly single-rooted class library, that is, most of the classes
 inherit from a common base class TObject. While this organization
 is not very popular in C++, it has proven to be well suited for our
 needs (and indeed for almost all successful class libraries: Java,
 Smalltalk, MFC, etc)''.

 

Powered by Rublog