Approximity blog home
764 to 773 of 903 articles

RubyX - a ruby based Linux distro   25 Sep 04
[print link all ]
(Source: ruby-talk, Andrew Walrond, Oct 24, 2003) Rubyx is a ruby based linux distro. It is also the name of the script which creates Rubyx the distro and handles the package management In light of the recent rubyx/lunar threads, I thought it sensible to make the rubyx source available for scrutiny by the ruby community. You can get it using Bitkeeper like this:
bk clone bk://ftp.rubyx.org/rubyx
cd rubyx
bk co
You'll see three files:
rubyx - The man script
init - The ruby based init script
strfile.rb - Some code shared by rubyx and init
Important! The build machine must be capable of running the generated code, How it all works will require further discussion, but if you want to get involved, it would be a good idea to ask rubyx to download the sources. To get everything, you'll need 4Gb and broadband ;) For just the basics, it's a fraction of that but I don't have the figure to hand. Do this as root...
 
mkdir /my/rubyx/dir  (or something like)
./rubyx --root /my/rubyx/dir --download base net disk (for the basics)
./rubyx --root /my/rubyx/dir --download all (for everything)
If you don't have broadband, you might want to use --dj 1 to reduce the number of parallel downloads. I wrote this in part to learn ruby, so any comments/suggestions on the code or style are welcomed. Although I am writing this in Kmail on my laptop running Rubyx, rubyx is still very much work in progress, so don't expect too much. Lots more to discuss, but this will do for starters :)

YAPV: yet another pickaxe version   25 Sep 04
[print link all ]
phrogz.net/ProgrammingRuby/ is ‘done’. Enjoy!

Squeak: ObjectiveCPlugin process   25 Sep 04
[print link all ]
(Source: Avi Bryant, squeak-ML) A while ago, Alain Fischer announced his new ObjectiveC plugin, allowing Squeak to use Apple’s Cocoa and other ObjectiveC libraries. Todd Blanchard and I have since done some further work on it, and it’s at the point now where it can begin be used to build Cocoa UIs from within Squeak. As a quick test, I built a native OS X UI for the system browser, which you can see in this screenshot: img src="

The code is on SqueakSource: kilana.unibe.ch:8888/ObjectiveCBridge/ObjectiveC-avi.70.mcz You can get a prebuilt plugin (for use with Ian’s 3.7 VM) here: beta4.com/~avi/ObjectiveCPlugin The browser demo can be run with "CCBrowser test". It requires this nib file: beta4.com/~avi/CCBrowser.tgz You need to untar that and place it inside Contents/Resources/English.lproj of your VM application bundle. I’m announcing this partly because I’ve run out of steam on it for now, and am hoping someone else will take it the next step of building UIs for the various Squeak tools (browsers, debuggers, workspaces, inspectors, etc) in Cocoa. A custom NSMorphicView would also be cool, although might be pretty tricky. Anyway, if someone does try to take this on, I’ll be more than happy to answer any questions they have about the underlying bridge code.

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

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/

[ANN] celsoft.com/Battery 0.1.1   25 Sep 04
[print link all ]
(Souce: Sean O’Dell) Battery is a unit testing framework for Ruby. It captures all standard error and output and reports the entire summary of all tests formatted as valid YAML, for easier reading and parsing. Another key feature is that all tests run in the order they are added to their batteries, rather than arbitrarily. See the celsoft.com/Battery homepage for more information and documentation.

Homepage: battery.rubyforge.org/

Download: rubyforge.org/frs/?group_id=268&release_id=531

Sony details PlayStation Portable's chips   25 Sep 04
[print link all ]
(Source: The Register)

The PSP chipset comprises a number of components: the CPU, a media processor, a 3D graphics engine, a security processor and a power manager. The PSP’s MIPS R4000-based CPU will run at up to 333MHz, Sony chip designer Masanobu Okabe revealed at the Hot Chips conference in Stanford University, California. Its frontside bus runs at up to 166MHz, with both frequencies controlled by processor load. It contains a vector processing engine. link

ANN: Lafcadio 0.4.0   25 Sep 04
[print link all ]
Lafcadio is an object-relational mapping layer for Ruby and MySQL. It lets you treat database rows like first-class Ruby objects, minimizing the amount of time you have to spend thinking about MySQL vagaries so you can spend more time thinking about your program’s logic.

Its features include:

  • A test-centric design that allows you extensively unit test any program that runs on top of Lafcadio. It comes with a MockObjectStore, which mimics the database and allows you to test database interactions without all the annoying setup code of a real database-driven test.
  • A block-driven querying language that will cover 99% of the ad-hoc queries you have to do. These queries look like: child_users = object_store.getUsers { |user| user.age.lt( 18 ) }

These queries can be run against the MockObjectStore, meaning they can be unit-tested.

  • In-Ruby triggers that can be written per domain class. These triggers can be tested, too!
  • Lafcadio makes very few assumptions of how your database was setup, and comes complete with a lot of hooks to allow you to fit your pre-existing database. Because programming’s a messy job, and we’re always cleaning up after somebody’s mistakes (even if they were our own).

Lafcadio is production-ready and runs a number of websites, including Rhizome.org, which more than 3 million hits a month.

link

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

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

 

powered by RubLog
764 to 773 of 903 articles Syndicate: full/short