. .

st4u

ST 4U 180: Write Streams in Smalltalk

January 11, 2012 8:32:04.087

Today's Smalltalk 4 You continues looking at the basic Smalltalk class libraries in VA Smalltalk - with the focus on write streams If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Streams.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll look at the Stream class hierarchy, focusing on write streams. To get started, we want to browse the Stream hierarchy, in order to get a full picture of the local and inherited APIs:/p>

Streams

We are going to focus on the API methods (as per the ANSI specification, and experiment with a few simple examples in a workspace. The workspace code we'll use follows:

Streams


"writing"
wStream := WriteStream on: String new.
wStream nextPut: $3.

wStream nextPutAll: ' foo bar baz'.
wStream cr.

wStream contents.



Here we are writing text (Strings and Characters) to a stream, but you can put anything on an internal stream (for external ones, make them binary to do the same thing). Here's what running the above will give you if you inspect the results:

Contents

The most important writing methods to understand are:

  • #nextPut: - write one element to the stream
  • #nextPutAll: - sent with a collection as an argument, write it to the stream
  • contents - get all elements on the stream

It's worth trying a few experiments of your own - and notice that streams are not just about text. You can stream over any collection in Smalltalk - try creating a write stream and putting numbers on it, and see what you get back with #contents

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , ,

Enclosures:
[st4u180-iPhone.m4v ( Size: 4315408 )]

posted by James Robertson

 Share Tweet This

development

Tiobe Rankings?

January 11, 2012 8:44:16.000

posted by James Robertson

 Share Tweet This

smalltalk

Smalltalk in NYC

January 11, 2012 10:55:46.000

The next STUG meeting in NYC is coming up on March 7th, and will feature Alejandro Reimondo, talking about S8:

The presentation will introduce the debut of S8. S8 is Smalltalk running over javascript execution engines on all major browser flavors. Its a generic framework but with initial implementations and objectives for the development of social networking and mobile applications. The presentation will discuss examples of this including the targetting of Android devices.

It all starts at 7 PM - you can find all the details and the address here.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

copyright

SOPA Opposition Gets Bigger

January 11, 2012 14:51:59.000

I've written a bit about SOPA - the new copyright law that's being debated makes the DMCA look reasonable (yes, it really is that bad). One of my senators is a co-sponsor (of the senate version, under the name Protect IP), which makes me even happier about the whole thing.

Reddit plans to go dark for a day in protest:

The freedom, innovation, and economic opportunity that the Internet enables is in jeopardy. Congress is considering legislation that will dramatically change your Internet experience and put an end to reddit and many other sites you use everyday. Internet experts, organizations, companies, entrepreneurs, legal experts, journalists, and individuals have repeatedly expressed how dangerous this bill is.

This proposal really is that bad, and the first place it would get used would be to silence political opposition (of all stripes, but especially of the opposition candidate versus incumbent sort) under the cover of "copyright infringement".

The DMCA lets copyright holders lodge a takedown notice against alleged infringement - this bill makes that kind of thing a felony. And never mind the restriction to "foreign websites" - you try and imagine Google filtering based on the plethora of stupid that the copyright industry will toss out if this passes. You try to imagine any site running any kind of open comments section, when a stray link could result in DNS banishment. We're headed to a "great firewall of America" with this bill.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

js4u

JS 4U 122: The Greater Than Function in JQuery

January 12, 2012 8:34:38.288

Javascript 4 U

Today's Javascript 4 You looks at the gt() function in JQuery. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

gt()

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u121-iPhone.m4v ( Size: 1254523 )]

posted by James Robertson

 Share Tweet This

general

Shut Up, He Explained

January 12, 2012 14:00:00.000

Some people just can't handle the idea that non-"professionals" are working successfully in their space. Take Bob Bly - the idea that writing basic copy is becoming a commodity terrifies him (most likely because it damages his billing rate):

Now a relatively new term — content — further degrades writers and the status of writing.

"Writing" sounds like a craft or skill. "Content" sounds like something you buy by the can or by the pound.

Or, maybe - just maybe - his "mad writing skills" aren't so special after all, and lots of people out there can do the same thing - at a fraction of the cost.

posted by James Robertson

 Share Tweet This

copyright

Stupid, Harmful, and Toothless

January 12, 2012 14:31:41.000

This is what happens when laws are created by people who don't understand what they are legislating:

Apparently it all comes down to the fact that The Pirate Bay has a .org domain — and according to Masnick, the current version of the SOPA bill working its way through congress excludes American domestic domains from being the target of takedown notices from copyright holders. In this case, a “domestic domain” is any domain that comes from a TLD run by an American registry — and sure enough, .org’s registry is Public Interest Registry, a US non-profit based in Virginia. In other words, thepiratebay.org isn’t eligible for a SOPA-based takedown, even if its servers are based in Sweden or another country outside the US. Believe it or not, by the same logic, .com and .net domains — both of which are managed by American company VeriSign — would also be immune from the SOPA bill as it currently stands.

In a nutshell, this is why I'm skeptical of "expert" opinion. I notice that on subjects I have fairly deep knowledge of, "expert opinion" is nearly always wrong - and not just a little wrong. This leads to a simple question: if they get the stuff I know well wrong, what about everything else?

Technorati Tags:

posted by James Robertson

 Share Tweet This

smalltalk

Smalltalk for Korea

January 13, 2012 11:21:02.005

posted by James Robertson

 Share Tweet This

st4u

ST 4U 181: Class Extensions in VisualWorks

January 13, 2012 12:15:09.750

Today's Smalltalk 4 You looks at class extensions (as opposed to overrides) in VisualWorks Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Workflow

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[st4u181-iPhone.m4v ( Size: 4313614 )]

posted by James Robertson

 Share Tweet This

smalltalk

Why Airflowing is Using Smalltalk

January 13, 2012 19:51:50.000

Sebastian Sastre lays out the case for Smalltalk (the language he uses for Airflowing) in depth. Check it out.

posted by James Robertson

 Share Tweet This

copyright

Partial Victory

January 14, 2012 8:35:10.678

Looks like the outcry over SOPA has had a limited win:

Some late breaking news here: following Lamar Smith's announcement that the new manager's amendment for SOPA will remove DNS blocking (to be added back at a later date after it's been "studied"), Rep. Issa has announced that he will now postpone the "nerd" hearing that he was holding in the House Oversight Committee, which was originally scheduled for Wednesday. The key reason? Majority Leader Eric Cantor has promised him that he will not bring the bill to the floor unless there's real consensus on the bill.

At least the bums rush aspect of the bill is over; with luck, slowing it down will take us to the election cycle, and the bill can just languish.

Technorati Tags:

posted by James Robertson

 Share Tweet This

podcast

IM 61: Processes and Confusion

January 15, 2012 21:53:17.152

Welcome to episode 61 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week Dave Buck and I talk about the Smalltalk process model, and some of the things Smalltalk developers run into with it. Also, Dave mentioned the Space Wars game he was writing with his son - he posted a few details and the source on his blog.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags:

Enclosures:
[im61.mp3 ( Size: 12906403 )]

posted by James Robertson

 Share Tweet This

podcastAAC

IM 61: Processes and Confusion (AAC)

January 15, 2012 21:53:21.362

Welcome to episode 61 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week Dave Buck and I talk about the Smalltalk process model, and some of the things Smalltalk developers run into with it. Also, Dave mentioned the Space Wars game he was writing with his son - he posted a few details and the source on his blog.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Technorati Tags:

Enclosures:
[im61.m4a ( Size: 17825483 )]

posted by James Robertson

 Share Tweet This

st4u

ST 4U 182: Durations and Delays

January 16, 2012 11:03:27.485

Today's Smalltalk 4 You continues looking at the basic Smalltalk class libraries in VA Smalltalk - today it's the Delay and Duration classes. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Timers.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll look at class Delay and Duration. You'll need these classes anytime you want to set up a timer of some kind in VA Smalltalk (such as in a process that wakes up periodically to do some task). To get started, we want to look at the two classes:

Delay and Duration

You can use Delay without using Duration; Duration makes it easy to specify a time interval (by second, millisecond, day, or even longer time periods). That makes it easy to specify an interval, and then set up a Delay to wait for that interval. You do that via the #wait message:


"use a duration"
duration := Duration seconds: 10.
ms := duration asMilliseconds.
Transcript show: 'Now: ', DateAndTime now asMilliseconds printString; cr.
(Delay forMilliseconds: ms) wait.
Transcript show: 'End: ', DateAndTime now asMilliseconds printString; cr.




What we did above is specify a duration, and then use that duration as the interval for the Delay. If you look in your Transcript afterwards, you'll see the following:

Delays and Duration

You can simply specify a number of seconds or milliseconds in Delay, without using a Duration; Duration just makes it easy to set up a time interval:


"use seconds"
Transcript show: 'Now: ', DateAndTime now  printString; cr.
(Delay forSeconds: 5) wait.
Transcript show: 'End: ', DateAndTime now printString; cr.

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , ,

Enclosures:
[st4u182-iPhone.m4v ( Size: 4936586 )]

posted by James Robertson

 Share Tweet This

smalltalk

Amber Smalltalk 0.9.1 Released

January 16, 2012 15:11:37.000

Smalltalk on Javascript continues to move forward.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

smalltalk

Smalltalk, Pharo, iPad

January 16, 2012 17:13:22.000

DR Geo, using Pharo - on an iPad

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

skyrim

Thu'umcast 17: Follow the Stone Crumbs

January 16, 2012 22:35:31.333

Thu'umcast

Welcome to episode 17 of "Thu'umcast" - a podcast where Michael Lucas-Smith, Scott Dirk, Austin Haley, Makahlua and I document our trials and tribulations in Elder Scrolls V: Skyrim

James, Scott and Austin talk about two of the larger side quest lines: No Stone Unturned (the Berenziah stones quest), and the Daedric quests (which lead the Oblivion Walker achievement)

If you liked our work on That Podcast, you'll probably like this. We intend to stay with the same idea - a gameplay podcast. If you don't want spoilers, don't listen - we are going to be talking about how we play the game, and what we ran across as we played.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. We'll add the iTunes specific links as soon as they are available. In the meantime, join the Facebook Group and follow us on Twitter. If you play on Steam, join the Steam Group. Like the music? Pay Sbeast a visit, we thank him for letting us use it!

Links to all episodes and other information can be found on the Thu'umcast page.

If you want to download the podcast directly, we've provided it in three formats:

Got feedback? Tweet us!. Enjoy the podcast, and we'll see you in Skyrim!

Technorati Tags: , ,

Enclosures:
[thuum17.mp3 ( Size: 10065252 )]

posted by James Robertson

 Share Tweet This

skyrimAAC

Thu'umcast 17: Follow the Stone Crumbs (AAC)

January 16, 2012 22:36:55.803

Thu'umcast

Welcome to episode 17 of "Thu'umcast" - a podcast where Michael Lucas-Smith, Scott Dirk, Austin Haley, Makahlua and I document our trials and tribulations in Elder Scrolls V: Skyrim

James, Scott and Austin talk about two of the larger side quest lines: No Stone Unturned (the Berenziah stones quest), and the Daedric quests (which lead the Oblivion Walker achievement)

If you liked our work on That Podcast, you'll probably like this. We intend to stay with the same idea - a gameplay podcast. If you don't want spoilers, don't listen - we are going to be talking about how we play the game, and what we ran across as we played.

You can subscribe in iTunes (or any podcatcher) using this feed, or this one for the AAC edition. We'll add the iTunes specific links as soon as they are available. In the meantime, join the Facebook Group and follow us on Twitter. If you play on Steam, join the Steam Group. Like the music? Pay Sbeast a visit, we thank him for letting us use it!

Links to all episodes and other information can be found on the Thu'umcast page.

If you want to download the podcast directly, we've provided it in three formats:

Got feedback? Tweet us!. Enjoy the podcast, and we'll see you in Skyrim!

Technorati Tags: , ,

Enclosures:
[thuum17.m4a ( Size: 13791181 )]

posted by James Robertson

 Share Tweet This

js4u

JS 4U 123: The disabled selector

January 17, 2012 9:44:51.780

Javascript 4 U

Today's Javascript 4 You looks at the disabled() function in JQuery. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

disabled()

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , ,

Enclosures:
[js4u123-iPhone.m4v ( Size: 1996570 )]

posted by James Robertson

 Share Tweet This

copyright

Why SOPA Must Die

January 18, 2012 8:37:45.007

Stop SOPA

image credit: Google

SOPA (and the Senate version, Protect IP) aren't just a little bad; they make the DMCA look like reasonable legislation. What they set up is a system of prior restraint that would make publishing on the net nearly impossible for anyone but the wealthy and well connected. In what way, you ask?

In an attempt to stop "pirate" sites, the proposed law targets any site that has links to "illegal" content. Over the last few years, I've linked to many, many sites. Commenters have linked to many others. Over time, some of those domains change hands. Sometimes, a domain that was owned by an individual talking about Smalltalk gets bought up by a content farm. Bam - every post and comment that linked there would be a reason to not only shut down my site, but charge me with a felony. Under that kind of regime, who in their right mind would risk linking to anything? In one fell swoop, SOPA attempts to rewind the clock to the push only model of content coming from approved sources.

It gets worse though - using "circumvention" software would also be illegal. The way the law is written, editing your hosts file to route around the damage would be an illegal act.

If you like the open internet, check out Google's action page on this.

As part of all this, I'm not going to be posting a screencast (or anything else) today - this post will stay at the top of my site. Back to business tomorrow, but for now - don't just sit there. Help stop this pile of stupid.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This