SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Smalltalk in a .NET World How to write a Smalltalk compiler without writing a VM John Brant [email_address]
#Smalltalk ,[object Object],[object Object],[object Object],[object Object]
Building Smalltalk ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What’s .NET Anyway? ,[object Object],[object Object],[object Object]
Why .NET? (business reasons) ,[object Object],[object Object],[object Object]
Why .NET? (personal reasons) ,[object Object],[object Object],[object Object],[object Object]
Smalltalk vs. .NET ? become:, change classes Non-resumable exceptions Resumable Exceptions Delegates Blocks Primitive integer types Tagged integers Strong, static typing Strong, dynamic typing .NET Smalltalk
Smalltalk vs. .NET II Structs & Enums ? Add classes/methods (can’t remove or recompile) Add/remove classes & methods Static, virtual, & non-virtual methods All methods are virtual .NET Smalltalk
Dynamic Typing ,[object Object],[object Object],[object Object],printString ^self doesNotUnderstand: (Message  selector: #printString arguments: #()) printString | stream | stream := WriteStream with: String new. self printOn: stream. ^stream contents Root Object Proxy
null vs. nil ,[object Object],[object Object],[object Object],method: aBoolean | temp one | aBoolean ifTrue: [temp := 5]. one := 1. ^temp + one temp := nil.
SmallIntegers ,[object Object],[object Object],[object Object],VW Tagged #Smalltalk 2r00001011 2r00000010
Blocks ,[object Object],[object Object],method ^#(1) collect: [:each | each + 1] method ^#(1) collect: (Method-Block new) MonadicBlock subclass: Method-Block instanceVariableNames: ‘’ … value: each ^each + 1
Block Variables ,[object Object],[object Object],[object Object],method: arg | block temp | block := [temp + arg]. temp := 5. ^block value arg 5 method arg block temp block arg temp temp value
Block Returns ,[object Object],[object Object],[object Object],method1 self method2: [^1] method2: aBlock #(2) do:  [:each |  aBlock value. ^each] method2 method1 do: method2[ ] method1[ ]
Primitives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Primitive Example identityHash ^Compiler  primitive:  [:codeGenerator |  codeGenerator call: (System.Object getMethod: 'GetHashCode'); constructNewObject: codeGenerator smalltalk  smallIntegerClass initializedConstructor] evaluate: self
Optimized Messages ,[object Object],[object Object],[object Object]
Macros ,[object Object],[object Object],[object Object],[object Object]
Connecting with .NET ,[object Object],[object Object],| algorithm stream | algorithm := HashAlgorithm create: ‘MD5’. stream := FileStream read: ‘rb.im’. [algorithm computeHash: stream]  ensure: [stream close]
Connecting Smalltalk to .NET ,[object Object],[object Object],[object Object],[object Object],[object Object]
Method arguments ,[object Object],[object Object],[object Object],[object Object],[object Object]
Console Example System.Console write: anObject (anObject isKindOf: SmallInteger) ifTrue: [System.Console write: anObject integer] ifFalse:  [(anObject isKindOf: Character)  ifTrue: [System.Console write: anObject character] ifFalse:  [(anObject isKindOf: String) ifTrue: [System.Console write: anObject string] ifFalse: [System.Console write: anObject]]]
Connecting .NET to Smalltalk ,[object Object],[object Object],[object Object],[object Object],[object Object]
#Smalltalk Development  (Version 1) ,[object Object],[object Object],[object Object],[object Object]
#Smalltalk Development  (Version 2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
#Smalltalk Development  (Version 3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Benchmarks 28.65 70.59 856.50 49.36 36.65 sorting strings 21.14 216.11 48.63 13.25 20.19 forming sets 18.27 179.71 128.79 27.09 98.44 generating strings * 181.13 140.38 43.15 42.22 generating primes 7.20 115.22 87.21 33.55 15.77 generating fractonaccis 2.17 42.67 61.88 30.91 6.80 evaluate blocks 8.07 161.35 37.65 16.12 28.96 perform selectors 14.11 74.77 74.77 37.35 29.91 copy objects 7.16 90.91 30.30 90.82 20.20 create objects 36.28 108.84 54.42 54.37 19.10 access strings 11.45 39.08 2266.67 75.48 64.76 add floats 14.07 576.97 576.97 2.62 36.06 add integers Squeak VW VA #Smalltalk Dolphin
Future work ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Contact Information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

Whats new in .net framework 4
Whats new in .net framework 4Whats new in .net framework 4
Whats new in .net framework 4
Pramod Chavan
 
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
Emery Berger
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS Multithreading
Richa Jain
 

Was ist angesagt? (20)

Java fork join
Java fork joinJava fork join
Java fork join
 
Fork and join framework
Fork and join frameworkFork and join framework
Fork and join framework
 
Coroutines in Kotlin
Coroutines in KotlinCoroutines in Kotlin
Coroutines in Kotlin
 
Whats new in .net framework 4
Whats new in .net framework 4Whats new in .net framework 4
Whats new in .net framework 4
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
 
Threads And Synchronization in C#
Threads And Synchronization in C#Threads And Synchronization in C#
Threads And Synchronization in C#
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scanner
 
Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!
 
Multi-Threading
Multi-ThreadingMulti-Threading
Multi-Threading
 
Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
 
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
Exploiting Multicore CPUs Now: Scalability and Reliability for Off-the-shelf ...
 
Java 8 - Stamped Lock
Java 8 - Stamped LockJava 8 - Stamped Lock
Java 8 - Stamped Lock
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Grand Central Dispatch Design Patterns
Grand Central Dispatch Design PatternsGrand Central Dispatch Design Patterns
Grand Central Dispatch Design Patterns
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS Multithreading
 
22 multi threading iv
22 multi threading iv22 multi threading iv
22 multi threading iv
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
 
Tutorial 4 adding some details
Tutorial 4   adding some details Tutorial 4   adding some details
Tutorial 4 adding some details
 

Andere mochten auch

Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio LauncherDevelopment and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
ESUG
 

Andere mochten auch (7)

Opal compiler
Opal compilerOpal compiler
Opal compiler
 
Squeak
SqueakSqueak
Squeak
 
Squeak by Example - Fosdem08
Squeak by Example - Fosdem08Squeak by Example - Fosdem08
Squeak by Example - Fosdem08
 
Twisting the Triad
Twisting the TriadTwisting the Triad
Twisting the Triad
 
Smalltalk on rubinius
Smalltalk on rubiniusSmalltalk on rubinius
Smalltalk on rubinius
 
Swt 2009
Swt 2009Swt 2009
Swt 2009
 
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio LauncherDevelopment and Features of the new Cincom Smalltalk ObjectStudio Launcher
Development and Features of the new Cincom Smalltalk ObjectStudio Launcher
 

Ähnlich wie Smalltalk in a .NET World

Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
bwullems
 

Ähnlich wie Smalltalk in a .NET World (20)

Whats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ DevelopersWhats New in Visual Studio 2012 for C++ Developers
Whats New in Visual Studio 2012 for C++ Developers
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Dot Net Framework
Dot Net FrameworkDot Net Framework
Dot Net Framework
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
The Ring programming language version 1.5.2 book - Part 176 of 181
The Ring programming language version 1.5.2 book - Part 176 of 181The Ring programming language version 1.5.2 book - Part 176 of 181
The Ring programming language version 1.5.2 book - Part 176 of 181
 
The Ring programming language version 1.5.4 book - Part 180 of 185
The Ring programming language version 1.5.4 book - Part 180 of 185The Ring programming language version 1.5.4 book - Part 180 of 185
The Ring programming language version 1.5.4 book - Part 180 of 185
 
C#/.NET Little Wonders
C#/.NET Little WondersC#/.NET Little Wonders
C#/.NET Little Wonders
 
Legacy Code Kata v3.0
Legacy Code Kata v3.0Legacy Code Kata v3.0
Legacy Code Kata v3.0
 
2310 b 03
2310 b 032310 b 03
2310 b 03
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
L Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformaticsL Fu - Dao: a novel programming language for bioinformatics
L Fu - Dao: a novel programming language for bioinformatics
 
EKON 23 Code_review_checklist
EKON 23 Code_review_checklistEKON 23 Code_review_checklist
EKON 23 Code_review_checklist
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET components
 
C# features
C# featuresC# features
C# features
 
01. introduction to-programming
01. introduction to-programming01. introduction to-programming
01. introduction to-programming
 

Mehr von ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
ESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

Mehr von ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Smalltalk in a .NET World

  • 1. Smalltalk in a .NET World How to write a Smalltalk compiler without writing a VM John Brant [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Smalltalk vs. .NET ? become:, change classes Non-resumable exceptions Resumable Exceptions Delegates Blocks Primitive integer types Tagged integers Strong, static typing Strong, dynamic typing .NET Smalltalk
  • 8. Smalltalk vs. .NET II Structs & Enums ? Add classes/methods (can’t remove or recompile) Add/remove classes & methods Static, virtual, & non-virtual methods All methods are virtual .NET Smalltalk
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Primitive Example identityHash ^Compiler primitive: [:codeGenerator | codeGenerator call: (System.Object getMethod: 'GetHashCode'); constructNewObject: codeGenerator smalltalk smallIntegerClass initializedConstructor] evaluate: self
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Console Example System.Console write: anObject (anObject isKindOf: SmallInteger) ifTrue: [System.Console write: anObject integer] ifFalse: [(anObject isKindOf: Character) ifTrue: [System.Console write: anObject character] ifFalse: [(anObject isKindOf: String) ifTrue: [System.Console write: anObject string] ifFalse: [System.Console write: anObject]]]
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Benchmarks 28.65 70.59 856.50 49.36 36.65 sorting strings 21.14 216.11 48.63 13.25 20.19 forming sets 18.27 179.71 128.79 27.09 98.44 generating strings * 181.13 140.38 43.15 42.22 generating primes 7.20 115.22 87.21 33.55 15.77 generating fractonaccis 2.17 42.67 61.88 30.91 6.80 evaluate blocks 8.07 161.35 37.65 16.12 28.96 perform selectors 14.11 74.77 74.77 37.35 29.91 copy objects 7.16 90.91 30.30 90.82 20.20 create objects 36.28 108.84 54.42 54.37 19.10 access strings 11.45 39.08 2266.67 75.48 64.76 add floats 14.07 576.97 576.97 2.62 36.06 add integers Squeak VW VA #Smalltalk Dolphin
  • 28.
  • 29.