Squeak on a BeagleBone

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Squeak on a BeagleBone

David Graham
It took me almost 20 years, but I finally thought of something
interesting to put on the Internet. ;)

I've been experimenting with a BeagleBone (embedded ARM V7 platform) and
was able to get Squeak 4.2 running without a problem.  I put together a
simple demo with a blog post and video, and thought the Squeak list may
be interested (also, please let me know if I have any technical errors
in my smalltalk code explanation).

http://blog.unthinkable.org/

-David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak on a BeagleBone

David T. Lewis
On Sat, Apr 21, 2012 at 12:14:27AM -0500, David Graham wrote:

> It took me almost 20 years, but I finally thought of something
> interesting to put on the Internet. ;)
>
> I've been experimenting with a BeagleBone (embedded ARM V7 platform) and
> was able to get Squeak 4.2 running without a problem.  I put together a
> simple demo with a blog post and video, and thought the Squeak list may
> be interested (also, please let me know if I have any technical errors
> in my smalltalk code explanation).
>
> http://blog.unthinkable.org/

Very nice! Thanks for posting this.

CCed to the squeak-dev list, as I suspect that many non-beginners may be
interested in this also :)

Dave

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak on a BeagleBone

garduino
In reply to this post by David Graham
Very very interesting!

I published a tiny blog post pointing yours!

2012/4/21 David Graham <[hidden email]>
It took me almost 20 years, but I finally thought of something interesting to put on the Internet. ;)

I've been experimenting with a BeagleBone (embedded ARM V7 platform) and was able to get Squeak 4.2 running without a problem.  I put together a simple demo with a blog post and video, and thought the Squeak list may be interested (also, please let me know if I have any technical errors in my smalltalk code explanation).

http://blog.unthinkable.org/

-David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners





_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak on a BeagleBone

Bert Freudenberg
In reply to this post by David Graham

On 20.04.2012, at 22:14, David Graham wrote:

> It took me almost 20 years, but I finally thought of something interesting to put on the Internet. ;)
>
> I've been experimenting with a BeagleBone (embedded ARM V7 platform) and was able to get Squeak 4.2 running without a problem.  I put together a simple demo with a blog post and video, and thought the Squeak list may be interested (also, please let me know if I have any technical errors in my smalltalk code explanation).
>
> http://blog.unthinkable.org/
>
> -David

Very nice!

There is one flaw in your code. You should never run Morphic code outside the UI process. But your "appendValue:" message does that. The correct way would be to write

        WorldState addDeferredUIMessage: [graph1 appendValue: lightValue]

That will cause the block to be evaluated at the next display cycle.

Of course, the proper way to make an updating Morph is to write a new Morph class. Then you could use Morphic's stepping mechanism to read the data and display it.

But for a 10 line hack your code is not bad :)

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak on a BeagleBone

David Graham
On 4/21/12 2:16 PM, Bert Freudenberg wrote:

> On 20.04.2012, at 22:14, David Graham wrote:
>
>> It took me almost 20 years, but I finally thought of something interesting to put on the Internet. ;)
>>
>> I've been experimenting with a BeagleBone (embedded ARM V7 platform) and was able to get Squeak 4.2 running without a problem.  I put together a simple demo with a blog post and video, and thought the Squeak list may be interested (also, please let me know if I have any technical errors in my smalltalk code explanation).
>>
>> http://blog.unthinkable.org/
>>
>> -David
> Very nice!
>
> There is one flaw in your code. You should never run Morphic code outside the UI process. But your "appendValue:" message does that. The correct way would be to write
>
> WorldState addDeferredUIMessage: [graph1 appendValue: lightValue]
>
> That will cause the block to be evaluated at the next display cycle.
>
> Of course, the proper way to make an updating Morph is to write a new Morph class. Then you could use Morphic's stepping mechanism to read the data and display it.

Thanks Bert!  I just started playing with Morphic and didn't know this.
( also, I just started learning smalltalk last year and mostly working
with Zinc on Pharo).  I was targeting my post at non-smalltalk arduino /
BeagleBone devs and wanted to keep the syntax as simple as possible, but
should I update the post?
>
> But for a 10 line hack your code is not bad :)
I hear this a lot. ;)

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak on a BeagleBone

Bert Freudenberg

On 21.04.2012, at 13:25, David Graham wrote:

> On 4/21/12 2:16 PM, Bert Freudenberg wrote:
>> On 20.04.2012, at 22:14, David Graham wrote:
>>
>>> It took me almost 20 years, but I finally thought of something interesting to put on the Internet. ;)
>>>
>>> I've been experimenting with a BeagleBone (embedded ARM V7 platform) and was able to get Squeak 4.2 running without a problem.  I put together a simple demo with a blog post and video, and thought the Squeak list may be interested (also, please let me know if I have any technical errors in my smalltalk code explanation).
>>>
>>> http://blog.unthinkable.org/
>>>
>>> -David
>> Very nice!
>>
>> There is one flaw in your code. You should never run Morphic code outside the UI process. But your "appendValue:" message does that. The correct way would be to write
>>
>> WorldState addDeferredUIMessage: [graph1 appendValue: lightValue]
>>
>> That will cause the block to be evaluated at the next display cycle.
>>
>> Of course, the proper way to make an updating Morph is to write a new Morph class. Then you could use Morphic's stepping mechanism to read the data and display it.
>
> Thanks Bert!  I just started playing with Morphic and didn't know this. ( also, I just started learning smalltalk last year and mostly working with Zinc on Pharo).  I was targeting my post at non-smalltalk arduino / BeagleBone devs and wanted to keep the syntax as simple as possible, but should I update the post?

Well, people learn from examples, and it's better if the examples do not teach bad style.

Here is a way to use Morphic's stepping properly from a workspace. This uses the Etoys mechanism of adding methods to an object directly (without having to make a new class in the browser):

graph1 := GraphMorph new.
graph1 assureUniClass.
graph1 class compile: 'step
        self appendValue: 50 atRandom.
        super step'.
graph1 class compile: 'stepTime
        ^50'.
graph1 openInWorld.
graph1 extent: 700@500.
graph1 clear.

This avoids having to create a background process, but I'm not sure if that makes it more clear to your audience.

- Bert -

>> But for a 10 line hack your code is not bad :)
> I hear this a lot. ;)
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners