Smalltalk and Cloud Foundry
James Foster takes Smalltalk off to the cloud.
. .
The author of this blog, James Robertson, passed away in April 2014. This blog is being maintained by David Buck (david@simberon.com).
James Foster takes Smalltalk off to the cloud.
Today's Smalltalk 4 You looks at client level HTTP again in VA Smalltalk - specifically, how to make such usage simpler. We also take a brief look at using proxy servers. 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 back to HTTP queries in VA Smalltalk. As it happens, there's a simpler way to do queries than getting the client, starting it up, and shutting it down. Instead of this:
"Set up a client for http, execute a request" client := (SstHttpClient forTransportScheme: 'http') startUp. response := [client get: 'http://www.jarober.com'] ensure: [client shutDown]. ^response.
We can do this:
"shortcuts" url := 'http://www.jarober.com/'. response := url sstAsUrl fetch. ^response.
If you trace through the execution, you'll see that it does the same thing as the more complex looking code - but it's a whole lot simpler to use. Once you do that, you should see something like this:
We can't really demonstrate proxy server usage, as the network used here doesn't have that. However, it's pretty straightforward. Simply use the following:
"proxy setup" (SstTransport configurationRegistry at: 'httpl') proxyUrl: ('http://proxy.myco.com:8080') sstAsUrl.
and then execute requests normally - you'll then be using your proxy server.
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: smalltalk, va smalltalk, http
Enclosures:
[st4u194-iPhone.m4v ( Size: 4607491 )]
![]() |
Today's Javascript 4 You continues looking at smoother animations. 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.
You can also watch it on YouTube:
Technorati Tags: javascript, jquery, tutorial
Enclosures:
[js4u132-iPhone.m4v ( Size: 3794212 )]
![]() |
Welcome to episode 22 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 In this episode we go into a bit of (limited) depth about - the Skyrim Creation Kit. While we understand that this is kind of a nothing-burger for console players, it is big news for the game as a whole. We'll be back to the game itself shortly, but in the meantime: if you're a listener who's used the Creation Kit heavily, and would like to come on as a guest, please let us know! 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: skyrim, elder scrolls, thuumcast, creation kit
Enclosures:
[thuum22.mp3 ( Size: 9765039 )]
![]() |
Welcome to episode 22 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 In this episode we go into a bit of (limited) depth about - the Skyrim Creation Kit. While we understand that this is kind of a nothing-burger for console players, it is big news for the game as a whole. We'll be back to the game itself shortly, but in the meantime: if you're a listener who's used the Creation Kit heavily, and would like to come on as a guest, please let us know! 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: skyrim, elder scrolls, thuumcast, creation kit
Enclosures:
[thuum22.m4a ( Size: 13381786 )]
Today's Smalltalk 4 You looks at url encoding and decoding 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 take a look at url encoding and decoding in VA Smalltalk. When making HTTP requests and posts, it's quite common to have to deal with encoded content. Fortunately, it's easy to do in VA. To Encode, we'll use an url:
"encode an url" url := 'http://www.jarober.com/blog/blogView?entry=3506669370'. encoded := url sstUrlEncode. ^encoded. 'http://www.jarober.com/blog/blogView?entry=3506669370'
You can see the encoded text right there. Now the reverse - decoding an encoded string:
"decode" decoded := encoded sstUrlDecodeQueryComponent. ^decoded 'http://www.jarober.com/blog/blogView?entry=3506669370'
And there's the result, back in its original form. That's all there is to it.
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: smalltalk, va smalltalk, http
Enclosures:
[st4u195-iPhone.m4v ( Size: 2646996 )]
There's a Pharo Conference in France this May:
The Pharo core team organises a Pharo Conference hosted at INRIA Lille Nord Europe located at Villeneuve D'ascq (close to Lille).
Technorati Tags: pharo
Recently, I played through the original Mass Effect again - and it reminded me how much better a game than ME2 it was. Sure, the controls were clunkier, and the combat wasn't quite as smooth - but the RPG elements were solid, and the choices felt like they mattered.
After playing the ME3 demo, I'm disappointed. One of the gameplay options is to remove conversation completely, and have it all in cutscenes. That also means that leaving it in will be irrelevant, as the main story arc will be driven the same way, regardless of how you pick your responses. Instead, we have "Gears Effect".
And that's a problem. Why? Well, it's not that Gears of War is a bad game, it's that it's a different game. It's a 3rd person shooter, with excellent combat mechanics. It has a story, but it's linear - you're along for the ride, and you're there to shoot things. Mass Effect isn't supposed to be that way - it's supposed to be an RPG. Last time I looked, the video gaming space was big enough to have both shooters and RPGs in it - why did the "brilliant" EA marketing team decide that the world needed another Gears of War (with less fluid combat, I might add)?
The old BioWare is completely dead, and that's a sad thing. Some of us like story driven RPG games, and EA's marketing team has just gone out and destroyed that. Maybe some of the original BioWare staff can start up a new studio that's interested in the idea.
Technorati Tags: bioware, mass effect
Welcome to episode 66 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave and I set out to talk about "Not Invented Here" - but it ended up being much more of a conversation about "TANSTAAFL" - Heinlein's famous observation that "There ain't no such thing as a free lunch".
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!
Enclosures:
[im66.mp3 ( Size: 13641442 )]
Welcome to episode 66 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.
This week Dave and I set out to talk about "Not Invented Here" - but it ended up being much more of a conversation about "TANSTAAFL" - Heinlein's famous observation that "There ain't no such thing as a free lunch".
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!
Enclosures:
[im66.m4a ( Size: 18824647 )]
SOPA may have been sidelined, but you would never know it - DHS isn't happy enough frisking people without cause at airports, they've moved along to shuttering domains without any stated rationale:
The website JotForm.com, which allows individuals to create their own forms easily, has had its main domain, jotform.com "suspended" by the US government, due to "an ongoing investigation." Because of this JotForm is forcing all of its users to change their forms to use their .net domain rather than their .com.
The way this will play out is obvious - internet startups (and existing firms, for that matter) are going to transfer their domains out of the US. It's the only rational business move, given that otherwise, your site could inexplicably go dark. If we stay on this track, the US based internet will end up being a push only, MPAA and RIAA approved dead zone.
Technorati Tags: stupidity
Today's Smalltalk 4 You looks at using exceptions (raising them) 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:
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: smalltalk, visualworks, exceptions
Enclosures:
[st4u196-iPhone.m4v ( Size: 3916412 )]
![]() |
Today's Javascript 4 You looks at data linking 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:
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: javascript, jquery, tutorial
Enclosures:
[js4u133-iPhone.m4v ( Size: 3083073 )]
Today's Smalltalk 4 You looks at implementing a very simple HTTP server in VA Smalltalk. If you do this yourself, you would actually want to create some objects, not just use the code snippet below. 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 take a look at setting up a simple HTTP server in VA Smalltalk. Bear in mind that for any "real" task you would want to create some classes of your own; this example will be enough to get you started. The code you'll want to use is below:
| server handler result | handler := DirectedMessage receiver: [:request :response| |htmlStream htmlResponse| htmlStream := WriteStream on: (Locale current preferredStringClass new: 128). htmlStream nextPutAll: ''. request header sstHttpStringOn: htmlStream. htmlStream nextPutAll: ''. htmlResponse := htmlStream contents. response header: (SstHttpResponseHeader new status: SstHttpConstants::HttpOk; version: request header version; contentLength: htmlResponse size; yourself); contents: htmlResponse; yourself] selector: #value:value:. (result := (server := SstBasicServer new) addHandlerUrl: 'http://localhost:9988') isSstError ifTrue: [result raise]. server requestHandler: handler. (result := server startUp) isSstError ifTrue: [result raise]. server inspect "-- When finished, send #shutDown"
This code does a couple of things. First, it uses DirectedMessage to set up a response handler - something to deal with each inbound request. In our case, it's a simple block that spits out some basic header type information as the body of the response. This is the part where you would want to customize; it's pretty easy to see how you could generalize this example for some ad hoc application status reporting
After that, we set up the actual server as an instance of SstBasicServer. Again, for an actual application, you'll want to create your own class for the server. In our case, we specify the port, some basic error handling (note the use of #isSstError), and start the server. As with HTTP client usage, we use #startUp - and eventually, when we want to shut it down, #shutDown.
Execute the code above - you should see something like this:
Now, open up a browser on your server (assuming you are running it now), and you should see something like this:
Finally, using the workspace attached to the inspector, send #shutDown to the server - 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.
Technorati Tags: smalltalk, va smalltalk, http
Enclosures:
[st4u197-iPhone.m4v ( Size: 5909667 )]