Last active
December 7, 2018 17:24
-
-
Save bzz/d5cff64deb63e0b73f891a6e3bcca149 to your computer and use it in GitHub Desktop.
Revisions
-
bzz revised this gist
Nov 17, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -137,6 +137,7 @@ Steps: Further reading: - http://themoosebook.org/book/index.html - https://moosequery.ferlicot.fr/userdocumentation.html - http://agilevisualization.com/AgileVisualization/QuickStart/0101-QuickStart.html -
bzz revised this gist
Nov 17, 2018 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,6 +134,10 @@ Steps:  Further reading: - http://themoosebook.org/book/index.html - https://moosequery.ferlicot.fr/userdocumentation.html ### III. Simple parser using SmaCC -
bzz revised this gist
Nov 17, 2018 . 1 changed file with 0 additions and 78 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -213,81 +213,3 @@ http://exercism.io/ is awesome, but lacks any Smalltalks for now. - external Pharo-launcher to manage VMs/Images that the OS app loads - no propper default keybidings support for editors :/ ``` -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 0 additions and 130 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -131,136 +131,6 @@ Steps: view ```  -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -344,8 +344,6 @@ http://exercism.io/ is awesome, but lacks any Smalltalks for now. - no propper default keybidings support for editors :/ ``` ### III. Simple parser using SmaCC -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 215 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -98,6 +98,8 @@ Built-in tools and commands: ### II. Code visualization using Moose Steps: - Extract the data, build model ``` @@ -129,6 +131,219 @@ Built-in tools and commands: view ``` Result:# OSD #8 > TL;DR: Learning Smalltalk * [Objective](#objective) * [Learning Smalltalk](#learning-smalltalk) + [0. Installing & Launching Pharo VM](#0-installing---launching-pharo-vm) + [I. Simple Smalltalk program](#i-simple-smalltalk-program) + [II. Code visualization using Moose](#ii-code-visualization-using-moose) + [III. Simple parser using SmaCC](#iii-simple-parser-using-smacc) + [IV. add Smalltalk to Excercism.io](#iv-add-smalltalk-to-excercismio) * [Apps](#apps) * [Articles](#articles) * [Learnings](#learnings) ## Objective 1. Run Pharo http://pharo.org/ 2. Use Moose http://www.moosetechnology.org/ 3. Try SmaCC https://github.com/ThierryGoubier/SmaCC Main sources: - http://pharo.org/ - http://www.moosetechnology.org/ - http://www.refactoryworkers.com/SmaCC/Tutorial.html ## Learning Smalltalk  Good resources: - http://blog.fossasia.org/pharo-launcher-what-how-pharoinprogress/ - http://ceronio.net/2017/07/first-steps-with-pharo-smalltalk/ - PharoByExample * https://github.com/SquareBracketAssociates/UpdatedPharoByExample * https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.html - http://files.pharo.org/media/pharoCheatSheet.pdf - http://files.pharo.org/books-pdfs/booklet-Smacc/2017-05-05-Smacc-Spiral.pdf - https://pharoweekly.wordpress.com ### 0. Installing & Launching Pharo VM ``` brew cask install pharo-launcher # Chose Moose 6.0 # follow http://themoosebook.org/book/index.html#h1mooseinanutshell Pharo6.0.app/Contents/MacOS/Pharo Pharo6.0.app/Contents/Resources/Pharo6.1.image ``` ### I. Simple Smalltalk program World (click) -> Playground ```smalltalk ProfStef go. (cmd+d to evaulate, using "Do It") a := OrderedCollection new add: 1; add: 2; add: 3; yourself. a. (cmd+p to print) Number extend [ my_factorial [ (self < 2) ifTrue: [ ^1 ] ifFalse: [ |c| c := OrderedCollection new. 2 to: self do: [ :i | c add: i ]. ^ (c fold: [ :a :b | a * b ] ) ]]]. 7 factorial. 7 my_factorial. a := OrderedCollection new add: 1; add: 2; add: 3. Transcript show: a. ``` Built-in tools and commands: - **Playground/workspace**: "Do it", "Print it", "Insepct it" - **Transcript** as `console.log` or `System.out` - **System Browser** message or cmd+b - **Spotter** - just Shift+Enter - `#class` - `#implementor` ### II. Code visualization using Moose - Extract the data, build model ``` wget .../jdt2famix-bin-1.0.3.zip unzip jdt2famix-bin-1.0.3.zip git clone --depth 1 git@github.com:rastaman/argouml-maven.git cd argouml-maven mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false ../jdt2famix-1.0.3/jdt2famix.sh ``` - Open Moose: World (click anywhere) -> Moose - Load the model: MSE (right corner) -> coose "argouml-maven.mse" - Select just loaded "argouml-maven" model - Select "All methods" - Visualize all/@Deprecated methods ```smalltalk view := RTMondrian new. view shape circle if: [ :each | each isAnnotatedWith: 'Deprecated' ] color: Color red. dep := (self, ( self flatCollect: #clientTypes ) ) asSet. view nodes: dep. view layout grid. view ```  ### III. Simple parser using SmaCC - World (click anywhere) -> Tools -> SmartCC Parser Generator - Simple grammar ``` <number> : [0-9]+; <whitespace> : \s+; Expression : Expression "+" Number | Number ; Number : <number> ; ``` - add Scanner/parser names * Options -> Scanner Class * Options -> Parser Class - File -> Save - Test tab ``` 3 + 4 ``` * Validate: (Select text) -> Evaluate * Inspect AST: (Select text) -> Inspect ### IV. Add Smalltalk to exercism.io http://exercism.io/ is awesome, but lacks any Smalltalks for now. - was a request, but un-maintained * https://github.com/exercism/discussions/issues/143 * https://github.com/exercism/trackler/commit/a3649436fa532e9c5f80b893a95206273a3110e4 - https://github.com/exercism/request-new-language-track - new project \w Github https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md - Test + CI * https://docs.travis-ci.com/user/languages/smalltalk/ * https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/SUnit/SUnit.html * https://github.com/hpi-swa/smalltalkCI#how-to-travis ## Apps - Code visualization https://wettel.github.io/codecity.html - Code parsers https://github.com/ThierryGoubier/SmaCC (\w PetitParser, both are part of Moose) ## Articles - [x] https://medium.com/smalltalk-talk/how-learning-smalltalk-can-improve-your-skills-as-a-programmer-fc5b2f56685 - [ ] https://medium.com/@richardeng/an-open-letter-to-all-universities-ad98af4a96b3 - [ ] https://medium.com/smalltalk-talk/in-praise-of-the-very-best-programming-language-eae36ae434af ## Learnings ``` + image-based approach to programming (Docker/VirtualBox) + everything is an _object_ (blocks, control structures, etc) that sends _messages_ + Less is more: No type declarations, no primitive objects, no generic types, no modifiers, no operators, no inner classes, no constructors, and no static methods + Awesome tooling: System Browser, Spotter + at least single VM tree: https://github.com/OpenSmalltalk/opensmalltalk-vm + Existing grammars in SmaCC: JS, Java, C/C#, etc - fragmentation of the world: VisualWorks, Dolphine, Squeak, Pharo, GemTalk, ... - external Pharo-launcher to manage VMs/Images that the OS app loads - no propper default keybidings support for editors :/ ```  -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -97,7 +97,6 @@ Built-in tools and commands: ### II. Code visualization using Moose - Extract the data, build model @@ -130,6 +129,7 @@ Built-in tools and commands: view ```  -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Main sources: ## Learning Smalltalk  Good resources: @@ -97,7 +97,7 @@ Built-in tools and commands: ### II. Code visualization using Moose  - Extract the data, build model -
bzz revised this gist
Aug 30, 2017 . 4 changed files with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed.Binary file not shown.LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed.Binary file not shown. -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -97,6 +97,7 @@ Built-in tools and commands: ### II. Code visualization using Moose  - Extract the data, build model -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,8 @@ Main sources: ## Learning Smalltalk  Good resources: - http://blog.fossasia.org/pharo-launcher-what-how-pharoinprogress/ -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,8 @@ Number extend [ 2 to: self do: [ :i | c add: i ]. ^ (c fold: [ :a :b | a * b ] ) ]]]. 7 factorial. 7 my_factorial. a := OrderedCollection new -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -160,21 +160,21 @@ Built-in tools and commands: ### IV. Add Smalltalk to Excercism.io - was a request, but un-maintained * https://github.com/exercism/discussions/issues/143 * https://github.com/exercism/trackler/commit/a3649436fa532e9c5f80b893a95206273a3110e4 - https://github.com/exercism/request-new-language-track - new project \w Github https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md - Test + CI * https://docs.travis-ci.com/user/languages/smalltalk/ * https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/SUnit/SUnit.html * https://github.com/hpi-swa/smalltalkCI#how-to-travis ## Apps -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 19 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Main sources: ## Learning Smalltalk Good resources: - http://blog.fossasia.org/pharo-launcher-what-how-pharoinprogress/ - http://ceronio.net/2017/07/first-steps-with-pharo-smalltalk/ - PharoByExample * https://github.com/SquareBracketAssociates/UpdatedPharoByExample @@ -33,6 +37,8 @@ Main sources: - http://files.pharo.org/books-pdfs/booklet-Smacc/2017-05-05-Smacc-Spiral.pdf - https://pharoweekly.wordpress.com ### 0. Installing & Launching Pharo VM ``` brew cask install pharo-launcher @@ -46,7 +52,7 @@ Pharo6.0.app/Contents/MacOS/Pharo Pharo6.0.app/Contents/Resources/Pharo6.1.image World (click) -> Playground ```smalltalk ProfStef go. (cmd+d to evaulate, using "Do It") a := OrderedCollection new @@ -76,12 +82,13 @@ a := OrderedCollection new Transcript show: a. ``` Built-in tools and commands: - **Playground/workspace**: "Do it", "Print it", "Insepct it" - **Transcript** as `console.log` or `System.out` - **System Browser** message or cmd+b - **Spotter** - just Shift+Enter - `#class` - `#implementor` @@ -139,17 +146,16 @@ Transcript show: a. ; ``` - add Scanner/parser names * Options -> Scanner Class * Options -> Parser Class - File -> Save - Test tab ``` 3 + 4 ``` * Validate: (Select text) -> Evaluate * Inspect AST: (Select text) -> Inspect -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,14 @@ > TL;DR: Learning Smalltalk * [Objective](#objective) * [Learning Smalltalk](#learning-smalltalk) + [0. Installing & Launching Pharo VM](#0-installing---launching-pharo-vm) + [I. Simple Smalltalk program](#i-simple-smalltalk-program) + [II. Code visualization using Moose](#ii-code-visualization-using-moose) + [III. Simple parser using SmaCC](#iii-simple-parser-using-smacc) + [IV. add Smalltalk to Excercism.io](#iv-add-smalltalk-to-excercismio) * [Apps](#apps) * [Articles](#articles) * [Learnings](#learnings) ## Objective -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -176,9 +176,9 @@ Transcript show: a. - Code parsers https://github.com/ThierryGoubier/SmaCC (\w PetitParser, both are part of Moose) ## Articles - [x] https://medium.com/smalltalk-talk/how-learning-smalltalk-can-improve-your-skills-as-a-programmer-fc5b2f56685 - [ ] https://medium.com/@richardeng/an-open-letter-to-all-universities-ad98af4a96b3 - [ ] https://medium.com/smalltalk-talk/in-praise-of-the-very-best-programming-language-eae36ae434af -
bzz revised this gist
Aug 30, 2017 . 1 changed file with 23 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # OSD #8 > TL;DR: Learning Smalltalk * [Objective](#objective) @@ -18,32 +18,22 @@ 2. Use Moose http://www.moosetechnology.org/ 3. Try SmaCC https://github.com/ThierryGoubier/SmaCC Main sources: - http://pharo.org/ - http://www.moosetechnology.org/ - http://www.refactoryworkers.com/SmaCC/Tutorial.html ## Learning Smalltalk - http://ceronio.net/2017/07/first-steps-with-pharo-smalltalk/ - PharoByExample * https://github.com/SquareBracketAssociates/UpdatedPharoByExample * https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.html - http://files.pharo.org/media/pharoCheatSheet.pdf - http://files.pharo.org/books-pdfs/booklet-Smacc/2017-05-05-Smacc-Spiral.pdf - https://pharoweekly.wordpress.com ### 0. Installing & Launching Pharo VM ``` brew cask install pharo-launcher # Chose Moose 6.0 @@ -52,7 +42,7 @@ Pharo6.0.app/Contents/MacOS/Pharo Pharo6.0.app/Contents/Resources/Pharo6.1.image ``` ### I. Simple Smalltalk program World (click) -> Playground @@ -86,7 +76,7 @@ a := OrderedCollection new Transcript show: a. ``` **Playground/workspace**: "Do it", "Print it", "Insepct it" **Transcript** as `console.log` or `System.out` **System Browser** message or cmd+b **Spotter** - just Shift+Enter @@ -181,9 +171,20 @@ Transcript show: a. https://github.com/hpi-swa/smalltalkCI#how-to-travis ## Apps - Code visualization https://wettel.github.io/codecity.html - Code parsers https://github.com/ThierryGoubier/SmaCC (\w PetitParser, both are part of Moose) ## Articles -[x] https://medium.com/smalltalk-talk/how-learning-smalltalk-can-improve-your-skills-as-a-programmer-fc5b2f56685 -[ ] https://medium.com/@richardeng/an-open-letter-to-all-universities-ad98af4a96b3 -[ ] https://medium.com/smalltalk-talk/in-praise-of-the-very-best-programming-language-eae36ae434af ## Learnings ``` + image-based approach to programming (Docker/VirtualBox) + everything is an _object_ (blocks, control structures, etc) that sends _messages_ + Less is more: No type declarations, no primitive objects, @@ -195,5 +196,5 @@ Transcript show: a. - fragmentation of the world: VisualWorks, Dolphine, Squeak, Pharo, GemTalk, ... - external Pharo-launcher to manage VMs/Images that the OS app loads - no propper default keybidings support for editors :/ ``` -
bzz created this gist
Aug 30, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,199 @@ # OSD #8, 2017.08.28 > TL;DR: Learning Smalltalk * [Objective](#objective) * [Learn](#learn) * [Apps](#apps) * [Articles](#articles) + [0. Installing & Launching](#0-installing---launching) + [I. Simple program](#i-simple-program) + [II. Code visualization using Moose](#ii-code-visualization-using-moose) + [III. Simple parser using SmaCC](#iii-simple-parser-using-smacc) + [IV. add Smalltalk to Excercism.io](#iv-add-smalltalk-to-excercismio) * [Learnings](#learnings) ## Objective 1. Run Pharo http://pharo.org/ 2. Use Moose http://www.moosetechnology.org/ 3. Try SmaCC https://github.com/ThierryGoubier/SmaCC Main links: - http://pharo.org/ - http://www.moosetechnology.org/ - http://blog.fossasia.org/pharo-launcher-what-how-pharoinprogress/ ## Learn - http://ceronio.net/2017/07/first-steps-with-pharo-smalltalk/ - PharoByExample * https://github.com/SquareBracketAssociates/UpdatedPharoByExample * https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.html - http://files.pharo.org/media/pharoCheatSheet.pdf - http://files.pharo.org/books-pdfs/booklet-Smacc/2017-05-05-Smacc-Spiral.pdf - https://pharoweekly.wordpress.com ## Apps - Code visualization https://wettel.github.io/codecity.html - Code parsers https://github.com/ThierryGoubier/SmaCC (\w PetitParser, both are part of Moose) ## Articles -[x] https://medium.com/smalltalk-talk/how-learning-smalltalk-can-improve-your-skills-as-a-programmer-fc5b2f56685 -[ ] https://medium.com/@richardeng/an-open-letter-to-all-universities-ad98af4a96b3 -[ ] https://medium.com/smalltalk-talk/in-praise-of-the-very-best-programming-language-eae36ae434af ### 0. Installing & Launching ``` brew cask install pharo-launcher # Chose Moose 6.0 # follow http://themoosebook.org/book/index.html#h1mooseinanutshell Pharo6.0.app/Contents/MacOS/Pharo Pharo6.0.app/Contents/Resources/Pharo6.1.image ``` ### I. Simple program World (click) -> Playground ``` ProfStef go. (cmd+d to evaulate, using "Do It") a := OrderedCollection new add: 1; add: 2; add: 3; yourself. a. (cmd+p to print) Number extend [ my_factorial [ (self < 2) ifTrue: [ ^1 ] ifFalse: [ |c| c := OrderedCollection new. 2 to: self do: [ :i | c add: i ]. ^ (c fold: [ :a :b | a * b ] ) ]]]. 7 factorial printNl. a := OrderedCollection new add: 1; add: 2; add: 3. Transcript show: a. ``` **Playground/workspace**: "Do it", "Print it", "Insepct it", "Do it and go" (for visualizations) **Transcript** as `console.log` or `System.out` **System Browser** message or cmd+b **Spotter** - just Shift+Enter - `#class` - `#implementor` ### II. Code visualization using Moose - Extract the data, build model ``` wget .../jdt2famix-bin-1.0.3.zip unzip jdt2famix-bin-1.0.3.zip git clone --depth 1 git@github.com:rastaman/argouml-maven.git cd argouml-maven mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false ../jdt2famix-1.0.3/jdt2famix.sh ``` - Open Moose: World (click anywhere) -> Moose - Load the model: MSE (right corner) -> coose "argouml-maven.mse" - Select just loaded "argouml-maven" model - Select "All methods" - Visualize all/@Deprecated methods ```smalltalk view := RTMondrian new. view shape circle if: [ :each | each isAnnotatedWith: 'Deprecated' ] color: Color red. dep := (self, ( self flatCollect: #clientTypes ) ) asSet. view nodes: dep. view layout grid. view ``` ### III. Simple parser using SmaCC - World (click anywhere) -> Tools -> SmartCC Parser Generator - Simple grammar ``` <number> : [0-9]+; <whitespace> : \s+; Expression : Expression "+" Number | Number ; Number : <number> ; ``` - add Scanner/parser names ``` Options -> Scanner Class Options -> Parser Class ``` - File -> Save - Test tab ``` 3 + 4 ``` Validate: (Select text) -> Evaluate Inspect AST: (Select text) -> Inspect ### IV. add Smalltalk to Excercism.io - was a request, but un-maintained https://github.com/exercism/discussions/issues/143 https://github.com/exercism/trackler/commit/a3649436fa532e9c5f80b893a95206273a3110e4 - https://github.com/exercism/request-new-language-track - new project \w Github https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md - Test + CI https://docs.travis-ci.com/user/languages/smalltalk/ https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/SUnit/SUnit.html https://github.com/hpi-swa/smalltalkCI#how-to-travis ## Learnings + image-based approach to programming (Docker/VirtualBox) + everything is an _object_ (blocks, control structures, etc) that sends _messages_ + Less is more: No type declarations, no primitive objects, no generic types, no modifiers, no operators, no inner classes, no constructors, and no static methods + Awesome tooling: System Browser, Spotter + at least single VM tree: https://github.com/OpenSmalltalk/opensmalltalk-vm + Existing grammars in SmaCC: JS, Java, C/C#, etc - fragmentation of the world: VisualWorks, Dolphine, Squeak, Pharo, GemTalk, ... - external Pharo-launcher to manage VMs/Images that the OS app loads - no propper default keybidings support for editors :/ -