SlideShare uma empresa Scribd logo
1 de 35
scriptcs.net
@scriptcsnet
www.scriptcs.net
scriptcs.net
@filip_woj
github.com/filipw
www.strathweb.com
www.arcmedia.ch
scriptcs.net
Who is scriptcs?
 Community (!)
 Coordinators
 Glenn Block (@glennblock)
 Justin Rusbatch (@jrusbatch)
 Filip Wojcieszyn (@filip_woj)
 Core Commiters
 Damian Schenkelman (@dschenkelman)
 Kristian Hellang (@khellang)
scriptcs.net
Metrics
 525 watchers
 110 forks
 142 pull requests
 29 unique contributors
 14 community contributed script packs (extensions)
 Currently at v0.5
scriptcs.net
Khalid AbuhakmehIan Battersby Nick Berardi Glenn Block Scott Blomquist Danielle Boldt Tim Erickson
Jonas Follesø Victor Grigoriu Andreas Håkansson Kristian Hellang lbargaoanu Denis Mentey John
Nelson Alexander Nyquist David Pendray Aaron Powell Adam Ralph Justin Rusbatch Damian
Schenkleman Paul Shmakov Lodewijk Sioen Brandon Stirnaman Paul Stovell Patrik Svensson Kevin
Trethewey Michael Wade Filip Wojcieszyn Matt Wrock
Contributors
scriptcs.net
What is scriptcs?
 OSS project enabling rich C# scripting experience
 Script and execute -or- use REPL
 Robust extensibility model
 Low ceremony, lightweight
 Use your favorite text editor
 No compilation/projects/solutions
 Built on top of Nuget & Roslyn (no hard dependencies)
scriptcs.net
scriptcs.net
Scriptcs overview
scriptcs
Script Engine
Package
Management
Script Packs
scriptcs.net
Key scriptcs features
 Relaxed C# syntax & code semantics
 As defined in “Interactive C#/VB REPL and Script - Code
Semantics Spec“ white paper
 REPL
 Node.js-like extensibility model (script packs)
 Debug & step through in Visual Studio
 Sublime text plugin
 Scriptcs.Core available as a hostable service
 Nuget integration
scriptcs.net
Scriptcs model
Roslyn / Mono.Csharp*
Nuget
OSS libraries MEF
scriptcs.net
OSS libraries used by scriptcs
 Autofac (dependency injection)
 Common Logging, log4net (logging)
 LiteGuard (argument checks)
 Nuget Core (package installation as a service)
 PowerArgs (command line parsing)
 ServiceStack.Text (serialization)
 Moq, xunit, Should (testing)
scriptcs.net
Getting started with script
Get
packages*
• Scriptcs -install
Write
code
• Any editor
Execute • CLI or hosted
scriptcs.net
Demo: Getting started with script
scriptcs.net
Demo: #load & #r
scriptcs.net
Getting started with REPL
Get
packages*
• Scriptcs -install
Run
scriptcs
Write
code
Evaluate
scriptcs.net
Demo: Getting started - REPL
scriptcs.net
scriptcs.net
Script code semantics
 No top level class
 No arbitrary namespaces
 No Main method
 Global functions allowed
 Script packs accessible through Require<T>
 #load directive to load script from script
 #r directive to reference an assembly from script
scriptcs.net
scriptcs.net
Typical C# experience
 Start Visual Studio (...wait...)
 Choose VS project template
 Create new solution
 Add references, install Nuget packages, import
namespaces
 Compile
 Run (repeat: compile+run)
 Difficult to distribute source code (bloated)
scriptcs.net
scriptcs.net
Typical scriptcs experience
 Install Nuget packages with “scriptcs –install”
 Write code in any text editor
 Run (repeat: edit & run)
 Easy to distribute code (just CSX + packages.config)
scriptcs.net
Self hosted server – traditional C#
scriptcs.net
Self hosted server – scriptcs / node.js
scriptcs.net
Demo: Nancy
scriptcs.net
Role of script packs
Import references
Import namespaces
Expose functionality
scriptcs.net
Script pack example: NUnit
 References
 nunit.core.dll, nunit.core.interfaces.dll, nunit.framework.dll
 Namespaces
 Nunit.Framework, System.Reflection
 Functionality
 public TestResult RunAllUnitTests(Assembly testAssembly =
null)
 public TestResult RunAllUnitTests(Action<string> callback,
Assembly testAssembly = null)
scriptcs.net
scriptcs Nuget integration
 Developed to work around nuget.exe limitations
 scriptcs –install
 Gets all packages from packages.config with dependencies
 scriptcs –install <package name>
 Gets specific package with dependencies
 scriptcs –save
 Creates packages.config based on packages folder
 scriptcs –clean
 Gets rid of packages folder and unnecessary binaries
scriptcs.net
Demo: RavenDB
scriptcs.net
Demo: P/Invoke
scriptcs.net
Demo: WPF
scriptcs.net
Get scriptcs
 CLI distributed via Chocolatey
 cinst scriptcs
 Libs available on Nuget
 Nightly builds on MyGet
 Build from source
 github.com/scriptcs
scriptcs.net
What’s next?
 Pluggable CLI commands
 Pluggable REPL commands
 Export to Visual Studio solution
 Mono support
 Script packs as scripts
 ScriptCatalog – extend applications (MEF) with scriptcs
 Improved ScriptCs.Core API
scriptcs.net

Mais conteúdo relacionado

Destaque

Destaque (10)

ScriptCS For Business and Pleasure
ScriptCS For Business and PleasureScriptCS For Business and Pleasure
ScriptCS For Business and Pleasure
 
Trust in China and Europe 2016 (Chinese)
Trust in China and Europe 2016 (Chinese)Trust in China and Europe 2016 (Chinese)
Trust in China and Europe 2016 (Chinese)
 
Proyecto Grecia Clásica
Proyecto Grecia ClásicaProyecto Grecia Clásica
Proyecto Grecia Clásica
 
2017 Edelman Trust Barometer - Indonesia
2017 Edelman Trust Barometer - Indonesia2017 Edelman Trust Barometer - Indonesia
2017 Edelman Trust Barometer - Indonesia
 
Hyperthings- IoT Solutions
Hyperthings- IoT SolutionsHyperthings- IoT Solutions
Hyperthings- IoT Solutions
 
Habiter un espace de faible densité à vocation agricole
Habiter un espace de faible densité à vocation agricoleHabiter un espace de faible densité à vocation agricole
Habiter un espace de faible densité à vocation agricole
 
Introducing: the RJMetrics Analysis Library
Introducing: the RJMetrics Analysis LibraryIntroducing: the RJMetrics Analysis Library
Introducing: the RJMetrics Analysis Library
 
El individuo y la sociedad
El individuo y la sociedadEl individuo y la sociedad
El individuo y la sociedad
 
Beer decoded open_food_challenge
Beer decoded open_food_challengeBeer decoded open_food_challenge
Beer decoded open_food_challenge
 
What to Expect for Big Data and Apache Spark in 2017
What to Expect for Big Data and Apache Spark in 2017 What to Expect for Big Data and Apache Spark in 2017
What to Expect for Big Data and Apache Spark in 2017
 

Semelhante a Introduction to Scriptcs

scriptcs - scripted C#, REPL and script extensibility
scriptcs - scripted C#, REPL and script extensibilityscriptcs - scripted C#, REPL and script extensibility
scriptcs - scripted C#, REPL and script extensibility
Filip W
 
scriptcs - scripting, hosting and extending
scriptcs - scripting, hosting and extendingscriptcs - scripting, hosting and extending
scriptcs - scripting, hosting and extending
Filip W
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
AOmaAli
 

Semelhante a Introduction to Scriptcs (20)

Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
 
scriptcs - scripted C#, REPL and script extensibility
scriptcs - scripted C#, REPL and script extensibilityscriptcs - scripted C#, REPL and script extensibility
scriptcs - scripted C#, REPL and script extensibility
 
scriptcs - scripting, hosting and extending
scriptcs - scripting, hosting and extendingscriptcs - scripting, hosting and extending
scriptcs - scripting, hosting and extending
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
 
Understanding NuGet implementation for Enterprises
Understanding NuGet implementation for EnterprisesUnderstanding NuGet implementation for Enterprises
Understanding NuGet implementation for Enterprises
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
Developments in LLVM-based toolchains and tooling for RISC-V
Developments in LLVM-based toolchains and tooling for RISC-VDevelopments in LLVM-based toolchains and tooling for RISC-V
Developments in LLVM-based toolchains and tooling for RISC-V
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
 
01. introduction to-programming
01. introduction to-programming01. introduction to-programming
01. introduction to-programming
 
Extending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEsExtending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEs
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
 
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
 
Moving microsoft .net applications one container at a time
 Moving microsoft .net applications one container at a time  Moving microsoft .net applications one container at a time
Moving microsoft .net applications one container at a time
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
 
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
 
Cosug for jiang su lug dec 2011
Cosug  for jiang su lug dec 2011Cosug  for jiang su lug dec 2011
Cosug for jiang su lug dec 2011
 
ASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimagined
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Introduction to Scriptcs