The Artima Developer Community
Sponsored Link

Agile Buzz Forum
The Return of the Arrow

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
The Return of the Arrow Posted: Feb 23, 2005 4:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: The Return of the Arrow
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

Tonite, I played some more with Ambrai Smalltalk. More coolness. Some more observations as I growsed around the system, and then again, something fun.

  • Fonts - To render a string with in color, or bold, or italic or a specific font, 3 classes get involved from the programmer's perspective: Text, TextStyle, and Font. That's it. Pretty tactile and straightforward. Ever since rewriting ExtraEmphases, I've been looking for good examples of simple and approachable string rendering APIs. This one is a good one.
  • Contexts - That I know of, there are two Smalltalk's that can model contexts in a reflective enough fashion to do what SeaSide does. So I'm interested to see if Ambrai will have what it takes. I don't know yet. It does have an ExecutionContext which you can chain through, ask for the selector or method or reciever, look at it's arguments. It's accessed not via 'thisContext' but via ObjectMachine current currentExecutionContext. I don't just how reifable they are, whether you can copy them, restart them, etc. This is an area many "simple" Smalltalk's definitely skimp on, the amount apparently there is impressive.
  • Platforms - This is an OSX tuned platform, right? So what are those methods in ObjectMachine 'testing-processor' and 'testing-operating system' for? isPalmOS? And the method comment for applicationHandle? Maybe it's just a long heritage's accumulation over the years. Maybe there's more there.
  • Encoders - It's just the various UTF schemes How refreshing. And, external streams are basically binary with an encoder around them. As it should be.

Warning: Past this point there be "weird characters", browsers may not render correctly

My first Smalltalk book was the Blue Book. I was totally mystified by the syntax. It was mysterious and alluring:

foo
	↑foo

What was that about? The same word separated by a symbol I couldn't even type and it was supposed to mean something basic. It seemed so transcendental. I truly did feel as I stood on the island watching an etheral balloon floating away's up there. Ever since I figured it out though, I've always wanted to return to that transcendental plane. I want to code with the left and up arrows. I want to look at my code and think "that's so other worldly".

How hard was it to make Ambrai do this? Not hard at all. Ambrai being a small/new project, it hasn't accumulated years of Scanner hacks and attempts and renditions. There's just one, and it's pretty clean. I modified two methods (scanReturn and scanToken) and added a third (scanLeftArrowAssignment). isAssign was added to Character. And Character's isReturn was modified as well. I had to fire up the OSX Character Palette to actually input the characters (does anyone know some way to "map" these characters so I don't have to use the palette). But that's it. So I rewrote one of my favorite methods:

Symbol>>value: anObject
	↑anObject perform: self

Not much different, but that's an up arrow. To test assignment, I wrote another one of my favorite base extensions:

ReadStream>>nextUntil: aTestBlock
nextUntil: aTestBlock 
	| output |
	output ← self contentsSpecies new writeStream.
	[self atEnd or: [aTestBlock value: self peek]] whileFalse: [output nextPut: self next].
	↑output contents

The only thing left after that, was to fix my formatter from last night. I modified the SmalltalkPrettyPrinter to emit the left and up arrow and all was well again. I can now input code in either format. When I "format" it, will be transcended.

BTW: This blog means that my Upgraders Beware blog issues have been resolved. I reinstalled clean.

Read: The Return of the Arrow

Topic: Missing Mom Previous Topic   Next Topic Topic: Why Stories and Not Tasks

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use