Join the Facebook Group to discuss the tutorials. You can view the archives here.
To watch now, click on the image below:
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.
Today's Smalltalk 4 You looks at reading binary formatted files in VA 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:
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 how you open files in binary mode in VA Smalltalk. To get started, look at the code below:
"specify that we are reading characters"
stream := CfsReadFileStream open: 'abt.ini'.
stream isCharacters: true.
text := stream contents.
stream close.
^text.
"specify binary"
stream := CfsReadFileStream open: 'snow1.jpg'.
stream isBytes: true.
bytes := stream contents.
stream close.
^bytes.
You would not typically use #isCharacters: - that's the default. Use #isBytes: to read the raw bytes into a byte array.
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.
Mist is a project to create a Smalltalk dialect (or possibly a very Smalltalk-like language) that is implemented without a virtual machine, is implemented without depending on any other language, is simple, and is reasonably fast.
Welcome to episode 96 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave quizzes James on some Smalltalk trivia - play along and see how much old time Smalltalk trivia you know.
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!
Welcome to episode 96 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave quizzes James on some Smalltalk trivia - play along and see how much old time Smalltalk trivia you know.
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!
Today's Smalltalk 4 You looks at a common problem in Smalltalk development - finding all instances of an object. You can send #allInstances in a workspace and inspect the results, but there's a simpler way in VisualWorks - a menu pick in the browser. 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:
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.
Today's Javascript 4 You looks at using map markers in the Google Maps Javascript api. 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:
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.
Today's Smalltalk 4 You goes through a simple example - reading and writing a file in binary mode in VA 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:
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 go through a small example - how to write, and read, a simple binary file. To start, let's write a couple of numbers to a file:
Even though we are using the abstract class FileStream, VA picks up the correct concrete subclass when we use the #write: method. Next, we'll want to read the file in binary mode (again, using #isBytes:)
stream := FileStream read: 'testBin.bin'.
stream isBytes: true.
first := stream next.
second := stream next.
stream close.
^Array with: first with: second.
Inspect the results to ensure that you got back what you expect - you should see something like this:
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.
I think today's xkcd is about the intersection in the title (or one very much like it, anyway). When I go through that one, I have no clue what they expect of me....
Join the Facebook Group to discuss the tutorials. You can view the archives here.
To watch now, click on the image below:
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.