This document provides an introduction and overview of Io, an open-source object-oriented programming language with a classless design based on prototypes. Some key points covered include:
- Io is object-oriented, classless, and uses prototype-based inheritance. Objects receive and respond to messages.
- Operators are implemented as methods, and concurrency is supported through lightweight coroutines.
- Conditionals, loops, and other control structures are implemented using messages rather than special syntax.
- Metaprogramming allows messages and the abstract syntax tree to be modified at runtime, enabling powerful dynamic programming capabilities.
Scala Up North: "Analysing Scala Puzzlers: Essential and Accidental Complexit...Andrew Phillips
Slides from the presentation "Analysing Scala Puzzlers: Essential and Accidental Complexity in Scala" at Scala Up North 2015, by Andrew Phillips & Nermin Serifovic. See http://scalaupnorth.com/speakers.html#andrew
Inspired by Josh Bloch's Java Puzzlers, we put together our own Python Puzzlers. This slide deck brings you a set of 10 python puzzlers, that are fun and educational. Each puzzler will show you a piece of python code. Your task if to figure out what happens when the code is run. Whether you're a python beginner or a passionate python veteran, we hope that there's something to learn for everybody.
This slide deck was first presented at shopkick. Nandan Sawant and Ryan Rueth are engineers at shopkick. Keeping the audience in mind, most of the puzzlers are based on python 2.x.
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
Beyond xUnit example-based testing: property-based testing with ScalaCheckFranklin Chen
Test-Driven Development has become deservedly popular in the past decade, with easy-to-use xUnit unit testing frameworks leading the way toward encouraging developers to write tests. But xUnit has limitations: how does one know one has written enough test cases for a desired behavior? And what if the behavior is conditional on other behavior? Property-based testing, first popularized for Haskell with the QuickCheck library, but available now for other languages as well, offers a powerful addition to one's testing toolkit.
I will discuss the concepts of property-based testing and illustrate them concretely using ScalaCheck for Scala, and point toward similar test frameworks in other languages.
Scala Up North: "Analysing Scala Puzzlers: Essential and Accidental Complexit...Andrew Phillips
Slides from the presentation "Analysing Scala Puzzlers: Essential and Accidental Complexity in Scala" at Scala Up North 2015, by Andrew Phillips & Nermin Serifovic. See http://scalaupnorth.com/speakers.html#andrew
Inspired by Josh Bloch's Java Puzzlers, we put together our own Python Puzzlers. This slide deck brings you a set of 10 python puzzlers, that are fun and educational. Each puzzler will show you a piece of python code. Your task if to figure out what happens when the code is run. Whether you're a python beginner or a passionate python veteran, we hope that there's something to learn for everybody.
This slide deck was first presented at shopkick. Nandan Sawant and Ryan Rueth are engineers at shopkick. Keeping the audience in mind, most of the puzzlers are based on python 2.x.
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
Beyond xUnit example-based testing: property-based testing with ScalaCheckFranklin Chen
Test-Driven Development has become deservedly popular in the past decade, with easy-to-use xUnit unit testing frameworks leading the way toward encouraging developers to write tests. But xUnit has limitations: how does one know one has written enough test cases for a desired behavior? And what if the behavior is conditional on other behavior? Property-based testing, first popularized for Haskell with the QuickCheck library, but available now for other languages as well, offers a powerful addition to one's testing toolkit.
I will discuss the concepts of property-based testing and illustrate them concretely using ScalaCheck for Scala, and point toward similar test frameworks in other languages.
Intro to Python for High School Students.
Unit #2: classes, as well as docstrings, lambda, map, filter, logging, testing, debugging
Does not include GUI content
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
An introduction to Kotlin for advanced Android beginners, covering command-line compilation of Kotlin files, conditional logic, val/var, basic functions, higher order functions, recursion.
The talk is about Kotlin features, which are decompiled to Java code. You’ll understand how all of this ‘magic’ works in depths, which benefits it’ll give to you and what you may loose. Some benchmarks are included as a bonus.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
We <3> true
But - still .rb < perfect # => true
Though Ruby was allegedly "engineered to maximize programmer happiness", in part by adhering to the "principle of least surprise", Ruby still has some surprising and annoying gotchas. This presention contains an Array, er, a bunch of them, from programming-newbie gotchas to ones that still "get" grizzled veteran Rubyists. The talk these are from, approximately 45 minutes, may save you many hours of frustrated head-scratching (and bashing against the desk) later!
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
Intro to Python for High School Students.
Unit #2: classes, as well as docstrings, lambda, map, filter, logging, testing, debugging
Does not include GUI content
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
An introduction to Kotlin for advanced Android beginners, covering command-line compilation of Kotlin files, conditional logic, val/var, basic functions, higher order functions, recursion.
The talk is about Kotlin features, which are decompiled to Java code. You’ll understand how all of this ‘magic’ works in depths, which benefits it’ll give to you and what you may loose. Some benchmarks are included as a bonus.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
We <3> true
But - still .rb < perfect # => true
Though Ruby was allegedly "engineered to maximize programmer happiness", in part by adhering to the "principle of least surprise", Ruby still has some surprising and annoying gotchas. This presention contains an Array, er, a bunch of them, from programming-newbie gotchas to ones that still "get" grizzled veteran Rubyists. The talk these are from, approximately 45 minutes, may save you many hours of frustrated head-scratching (and bashing against the desk) later!
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)Tech in Asia ID
This slide was shared on Tech in Asia Jakarta 2016 @ 17 November 2016.
Get updates about our dev events delivered straight to your inbox by signing up here: http://bit.ly/tia-dev ! Be the first to know when new information is available!
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...Andrew Phillips
Slides from the presentation "Analysing Scala Puzzlers: Essential and Accidental Complexity in Scala" at the Boston Area Scala Enthusiasts meetup, by Andrew Phillips & Nermin Serifovic. See http://www.meetup.com/boston-scala/events/228136405/
This presentation about Python Interview Questions will help you crack your next Python interview with ease. The video includes interview questions on Numbers, lists, tuples, arrays, functions, regular expressions, strings, and files. We also look into concepts such as multithreading, deep copy, and shallow copy, pickling and unpickling. This video also covers Python libraries such as matplotlib, pandas, numpy,scikit and the programming paradigms followed by Python. It also covers Python library interview questions, libraries such as matplotlib, pandas, numpy and scikit. This video is ideal for both beginners as well as experienced professionals who are appearing for Python programming job interviews. Learn what are the most important Python interview questions and answers and know what will set you apart in the interview process.
Simplilearn’s Python Training Course is an all-inclusive program that will introduce you to the Python development language and expose you to the essentials of object-oriented programming, web development with Django and game development. Python has surpassed Java as the top language used to introduce U.S. students to programming and computer science. This course will give you hands-on development experience and prepare you for a career as a professional Python programmer.
What is this course about?
The All-in-One Python course enables you to become a professional Python programmer. Any aspiring programmer can learn Python from the basics and go on to master web development & game development in Python. Gain hands on experience creating a flappy bird game clone & website functionalities in Python.
What are the course objectives?
By the end of this online Python training course, you will be able to:
1. Internalize the concepts & constructs of Python
2. Learn to create your own Python programs
3. Master Python Django & advanced web development in Python
4. Master PyGame & game development in Python
5. Create a flappy bird game clone
The Python training course is recommended for:
1. Any aspiring programmer can take up this bundle to master Python
2. Any aspiring web developer or game developer can take up this bundle to meet their training needs
Learn more at https://www.simplilearn.com/mobile-and-software-development/python-development-training
There are many things that make Ruby a great language, but above all else, the beautiful and friendly syntax. A perfect exemplar of this is the case statement: case enables a flexible method of dispatching on an object that is both natural and intuitive. But case can't do it alone. No, it requires the help of it's little-known and under-appreciated sidekick the === (threequals) operator.
In this talk we'll dive into this fascinating corner of the Ruby language and see what trouble we can cause with the humble threequals. We'll go over the basics of how it interacts with case, and then go into some tips and tricks for making the most of this useful bit of syntax, and ultimately create a little pattern matching mini-language as a demonstration.
A slightly-modified version of my IPRUG talk, this time for the BT DevCon5 developer conference at Adastral Park on 25 May 2012.
The main changes are the addition of the Ruby section and the increased number of HHGTTG references in honour of towel day.
We <3 .rb
but - still .rb < perfect
This presentation shows some of the ways that this language, engineered for maximum programmer happiness and least surprise, can still have some nasty gotchas.
Code Like Pythonista
Beautifully made PPT.
Ref. http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
Image ref : https://pixabay.com/ko/ and https://morguefile.com/
licensed under a Creative Commons Attribution/Share-Alike (BY-SA) license.
Video and more content at fsharpforfunandprofit.com/pbt
"The lazy programmer's guide to writing 1000's of tests: An introduction to property based testing"
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
Machine Learning can often be a daunting subject to tackle much less utilize in a meaningful manner. In this session, attendees will learn how to take their existing data, shape it, and create models that automatically can make principled business decisions directly in their applications. The discussion will include explanations of the data acquisition and shaping process. Additionally, attendees will learn the basics of machine learning - primarily the supervised learning problem.
Shai Halevi discusses new ways to protect cloud data and security. Presented at "New Techniques for Protecting Cloud Data and Security" organized by the New York Technology Council.
2. Intro to Io
* Not really an Intro
Wednesday, 28 November, 12
3. Me
• Jeremy Tregunna
• iOS & Mac developer
• Aspiring hardware designer (FPGAs, etc)
• Twitter: @jtregunna
• App.net: @jtregunna
• GitHub: @jeremytregunna
Wednesday, 28 November, 12
4. Slideshare
• Small fonts, check this out to follow along better:
http://www.slideshare.net/jtregunna/intro-to-io
Github
• Code!
https://github.com/jeremytregunna/intro-to-io
Wednesday, 28 November, 12
5. What is it?
• Object-oriented
• Classless design (based on Prototypes)
Wednesday, 28 November, 12
8. Fundamentals
• Objects receive messages
• Messages are first class entities
1 msg := message(+ 2 * 5)
2 1 doMessage(msg) == 11 # same as: 1 + 2 * 5
• Objects are unavoidable
Every message send is received by some object, 100% of the time.
• Operators are implemented as methods
1 1 + 2 * 5 # is really: 1 +(2) *(5)
2 foo := 42 # is really: setSlot(“foo”, 42)
• Concurrency first class
Cooperative threading
Wednesday, 28 November, 12
9. Operators
• Operators are messages, they have a precedence.
• Precedence is defined in the OperatorTable
• Two types of operators, binary and assignment.
1 /* Binary */ 1 + 2
2 /* Assign */ foo := 42
• You can define your own
1 # operators.io
2 OperatorTable addOperator("blah", 14)
3 blah := method(x, "#{x}#{x}" interpolate println)
4 doFile("opertest.io")
1 # opertest.io
2 message(blah "bar") println
3 blah "bar"
• All operators must be defined before the parser
parses code that uses them!!!
Wednesday, 28 November, 12
10. Conditionals
• If statement isn’t a statement
1 if := method(c,
2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
3 )
Wednesday, 28 November, 12
11. Conditionals
• If statement isn’t a statement
1 if := method(c,
2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
3 )
• Only needs one primitive to implement.
1 # Using “evalArgAt()” we can selectively evaluate an arbitrary argument
2 true ifTrue := method(call evalArgAt(0); self)
3 true ifFalse := true
4 false ifTrue := false
5 false ifFalse := method(call evalArgAt(0); self)
Wednesday, 28 November, 12
12. Conditionals
• If statement isn’t a statement
1 if := method(c,
2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
3 )
• Only needs one primitive to implement.
1 # Using “evalArgAt()” we can selectively evaluate an arbitrary argument
2 true ifTrue := method(call evalArgAt(0); self)
3 true ifFalse := true
4 false ifTrue := false
5 false ifFalse := method(call evalArgAt(0); self)
• Full if() support?
1 if := method(c,
2 call argAt(1) isNil ifTrue(return (c != nil and c != false)) # if() then() ... form
3 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
4 )
5 Object then := nil
6 Object else := nil
7 true then := method(call evalArgAt(0); self)
8 true else := true
9 false then := false
10 false else := method(call evalArgAt(0); self)
• Looks familiar...
Wednesday, 28 November, 12
13. Metaprogramming
• Here be dragons!
Wednesday, 28 November, 12
14. Metaprogramming
• Here be dragons!
• Higher order messaging
• Messages are our AST
• Messages are mutable at runtime
1 Number add := method(n, self + n)
2 5 add(2) == 7
3 Number sub := Number getSlot(“add”) do(message next setName(“-”))
4 5 sub(2) == 3
5 5 add(2) == 3 # ???
Wednesday, 28 November, 12
15. Metaprogramming
• Here be dragons!
• Higher order messaging
• Messages are our AST
• Messages are mutable at runtime
1 Number add := method(n, self + n)
2 5 add(2) == 7
3 Number sub := Number getSlot(“add”) do(message next setName(“-”))
4 5 sub(2) == 3
5 5 add(2) == 3 # ???
• Don’t forget to clone
Wednesday, 28 November, 12
16. Metaprogramming
• Here be dragons!
• Higher order messaging
• Messages are our AST
• Messages are mutable at runtime
1 Number add := method(n, self + n)
2 5 add(2) == 7
3 Number sub := Number getSlot(“add”) do(message next setName(“-”))
4 5 sub(2) == 3
5 5 add(2) == 3 # ???
• Don’t forget to clone
1 Number sub := Number getSlot(“add”) clone do(message next setName(“-”))
2 5 sub(2) == 3
3 5 add(2) == 7
Wednesday, 28 November, 12
17. Concurrency
• Lightweight threading (coroutines)
• Independent of the C Stack*
• Cooperative scheduling of coroutines
* - For pure Io code only.
Wednesday, 28 November, 12