Discussion:
[squeak-dev] [ANN] Live type information for Smalltalk
Hernan Wilkinson
2018-11-24 15:51:51 UTC
Permalink
Hi all!,
I wanted to let you know that I have implemented a "feature" to have type
information "live". Currently it is implemented on Cuis but the idea is to
port it to Pharo and Squeak as well.
This feature is based on a few changes on the VM that collects the class of
the object assigned to a variable, a parameter or when returning from a
method. That information is available from the image and allows to improve
the tools radically, like the autocompletion on the browser, looking for
senders/implementors and even "scoping" the refactorings based on the type
info.

I presented it at the last Smalltalks (the argentinean smalltalk
conference) and I'm happy to announce its alpha version (1/1000) asFloat :-)

Here is a link to the repo that has the VM and a Cuis image to play with
it: https://github.com/hernanwilkinson/Cuis-Smalltalk-DynamicTypeInformation
It also has the source of the VM's changes if you want to see how it is
implemented. Currently it is implemented only in the stack VM and the VMs I
compiled and uploaded to the repo are 64 bits for MacOs and Linux. (I don't
have a Windows machine to compile it :-) )

Here is a link to a video that shows how it is implemented and how to use
it: https://t.co/n8FQuo7pKZ

If you want to see the slides of the presentation, here is the link:
https://www.slideshare.net/hernanwilkinson/dynamic-type-information

I would love for you to try it and get feedback, ideas, etc.
I really believe it is a "killer feature", something that could take
Smalltalk one step further and show the way to other dynamically typed
languages.

Cheers!
Hernan
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54 - 011 - *6091 - 3125


*Mobile: +54 - 911 - 4470 - 7207email:
***@10Pines.comsite: http://www.10Pines.com
<http://www.10pines.com/>*
Address: Alem 693, Floor 5 B, Buenos Aires, Argentina
Jecel Assumpcao Jr.
2018-11-25 01:27:02 UTC
Permalink
Hernan,

this is a great project and the slides are very nice as well.

One small typo on slide 65: "Feeling: When you start using it, you don't
want to loose it"

Actually you do, since "loose it" is kind of like "release it" or
"unleash it". What you most certainly don't want to do
Hernan Wilkinson
2018-11-26 12:44:17 UTC
Permalink
Hi Jecel!
thank you very much! I'm really exited/hooked with this idea. At 10Pines
we are going to invest some of my time to polish it and port it to
squeak/pharo, in fact the VM works for Squeak and I have a Squeak image
with this but without the changes to the tools... if I have a couple of
minutes I'll try to port all. I really believe it can improve our tools a
lot.

Thank you for letting me know about the typo!

Cheers!
Hernan
Post by Jecel Assumpcao Jr.
Hernan,
this is a great project and the slides are very nice as well.
One small typo on slide 65: "Feeling: When you start using it, you don't
want to loose it"
Actually you do, since "loose it" is kind of like "release it" or
"unleash it". What you most certainly don't want to do is "lose" it.
Anyway, congratulations!
-- Jecel
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54 - 011 - *6091 - 3125


*Mobile: +54 - 911 - 4470 - 7207email:
***@10Pines.comsite: http://www.10Pines.com
<http://www.10pines.com/>*
Address: Alem 693, Floor 5 B, Buenos Aires, Argentina
karl ramberg
2018-11-26 20:24:51 UTC
Permalink
Looks really cool. This will be really useful in development.

Cheers,
Karl
Post by Hernan Wilkinson
Hi all!,
I wanted to let you know that I have implemented a "feature" to have type
information "live". Currently it is implemented on Cuis but the idea is to
port it to Pharo and Squeak as well.
This feature is based on a few changes on the VM that collects the class
of the object assigned to a variable, a parameter or when returning from a
method. That information is available from the image and allows to improve
the tools radically, like the autocompletion on the browser, looking for
senders/implementors and even "scoping" the refactorings based on the type
info.
I presented it at the last Smalltalks (the argentinean smalltalk
conference) and I'm happy to announce its alpha version (1/1000) asFloat :-)
Here is a link to the repo that has the VM and a Cuis image to play with
https://github.com/hernanwilkinson/Cuis-Smalltalk-DynamicTypeInformation
It also has the source of the VM's changes if you want to see how it is
implemented. Currently it is implemented only in the stack VM and the VMs I
compiled and uploaded to the repo are 64 bits for MacOs and Linux. (I don't
have a Windows machine to compile it :-) )
Here is a link to a video that shows how it is implemented and how to use
it: https://t.co/n8FQuo7pKZ
https://www.slideshare.net/hernanwilkinson/dynamic-type-information
I would love for you to try it and get feedback, ideas, etc.
I really believe it is a "killer feature", something that could take
Smalltalk one step further and show the way to other dynamically typed
languages.
Cheers!
Hernan
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54 - 011 - *6091 - 3125
<http://www.10pines.com/>*
Address: Alem 693, Floor 5 B, Buenos Aires, Argentina
Levente Uzonyi
2018-11-28 17:56:42 UTC
Permalink
Hi Hernán,

This looks really cool. While I was watching the video, I was wondering
why you started to implement this in the VM. To me it seems more
straightforward to change the encoder to generate extra bytecodes to store
the type information. The advantage of this approach would be that it
could leverage the JIT.
Another thing I was thinking about are primitives. For most primitives you
know what the return type will be and what the expected arguments are, so
you could just create a lookup table for the code completion tool with
that information.

Levente
Hi all!,I wanted to let you know that I have implemented a "feature" to have type information "live". Currently it is implemented on Cuis but the idea is to port it to Pharo and Squeak as well.
This feature is based on a few changes on the VM that collects the class of the object assigned to a variable, a parameter or when returning from a method. That information is available from the image and allows to improve the tools radically, like the autocompletion on the
browser, looking for senders/implementors and even "scoping" the refactorings based on the type info.
I presented it at the last Smalltalks (the argentinean smalltalk conference) and I'm happy to announce its alpha version (1/1000) asFloat :-)
Here is a link to the repo that has the VM and a Cuis image to play with it: https://github.com/hernanwilkinson/Cuis-Smalltalk-DynamicTypeInformation
It also has the source of the VM's changes if you want to see how it is implemented. Currently it is implemented only in the stack VM and the VMs I compiled and uploaded to the repo are 64 bits for MacOs and Linux. (I don't have a Windows machine to compile it :-) )
Here is a link to a video that shows how it is implemented and how to use it: https://t.co/n8FQuo7pKZ
If you want to see the slides of the presentation, here is the link: https://www.slideshare.net/hernanwilkinson/dynamic-type-information
I would love for you to try it and get feedback, ideas, etc.
I really believe it is a "killer feature", something that could take Smalltalk one step further and show the way to other dynamically typed languages.
Cheers!
Hernan
--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Phone: +54 - 011 - 6091 - 3125
Mobile: +54 - 911 - 4470 - 7207
site: http://www.10Pines.com
Address: Alem 693, Floor 5 B, Buenos Aires, Argentina
Loading...