Hi All,
You have one more day to vote for the Squeak Oversight Board! The election
ends Tuesday 6th of February 2018 6 PM (23.00 UTC).
http://wiki.squeak.org/squeak/6590
Let me know if you are on the voter list and didn't get your ballot, I can
resend it to you.
Also now is a good time to get on the voter list. Send me an email and
I'll add you for next year!
Thank you, everyone, for your participation in this years election!
All the best,
Ron Teitelbaum
Call for Papers: ICOOOLPS'18
============================
13th Workshop on Implementation, Compilation, Optimization of Object- Oriented
Languages, Programs and Systems
Co-located with ECOOP 2018
held Mon 16 - Sun 22 July in Amsterdam, Netherlands
Twitter: @ICOOOLPS
URL: https://conf.researchr.org/track/ecoop-issta-2018/ICOOOLPS-2018-papers
The ICOOOLPS workshop series brings together researchers and practitioners
working in the field of language implementation and optimization. The goal of
the workshop is to discuss emerging problems and research directions as well as
new solutions to classic performance challenges.
The topics of interest for the workshop include techniques for the
implementation and optimization of a wide range of languages including but not
limited to object-oriented ones. Furthermore, meta-compilation techniques or
language-agnostic approaches are welcome, too.
### Topics of Interest
A non-exclusive list of topics of interest for this workshop is:
- Implementation and optimization of fundamental languages features (from
automatic memory management to zero-overhead metaprogramming)
- Runtime systems technology (libraries, virtual machines)
- Static, adaptive, and speculative optimizations and compiler techniques
- Meta-compilation techniques and language-agnostic approaches for the efficient
implementation of languages
- Compilers (intermediate representations, offline and online optimizations,…)
- Empirical studies on language usage, benchmark design, and benchmarking
methodology
- Resource-sensitive systems (real-time, low power, mobile, cloud)
- Studies on design choices and tradeoffs (dynamic vs. static compilation,
heuristics vs. programmer input,…)
- Tooling support, debuggability and observability of languages as well as their
implementations
### Workshop Format and Submissions
This workshop welcomes the presentation and discussion of new ideas and emerging
problems that give a chance for interaction and exchange. More mature work is
welcome as part of a mini-conference format, too. We aim to interleave
interactive brainstorming and demonstration sessions between the formal
presentations to foster an active exchange of ideas. The workshop papers will be
published in ACM DL or an open archive (to be confirmed). Papers are to be
submitted using the sigplanconf LaTeX template
(http://www.sigplan.org/Resources/LaTeXClassFile/).
Please submit contributions via EasyChair:
https://easychair.org/conferences/submission_show_all.cgi?a=17114062
### Important Dates
Submissions: 18 May 2018
Author Notification: 8 June 2018
### Program Committee
The program committee consists of the organizers and the following reviewers:
Nada Amin, University of Cambridge
Clément Béra, RMOD - INRIA Lille Nord Europe
Shigeru Chiba, University of Tokyo
Benoit Daloze, JKU Linz
Görel Hedin, Lund University
Eric Jul, University of Oslo
Stefan Marr, University of Kent
Eliot Miranda, Cadence Design Systems
Sarah Mount, King's College London
Tobias Pape, Hasso Plattner Institute
Jennifer Sartor, Vrije Universiteit Brussel + University Ghent
### Workshop Organizers
Tim Felgentreff, Oracle Labs Potsdam
Olivier Zendra, INRIA / LORIA
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tonyg.1150.mcz
==================== Summary ====================
Name: Kernel-tonyg.1150
Author: tonyg
Time: 1 February 2018, 9:59:50.393266 am
UUID: 6afb5455-c040-4572-a62a-b292e20856e6
Ancestors: Kernel-tonyg.1149
(Re)introduce isPromise, and use it instead of isKindOf:.
=============== Diff against Kernel-tonyg.1149 ===============
Item was added:
+ ----- Method: Object>>isPromise (in category 'testing') -----
+ isPromise
+ ^false!
Item was changed:
----- Method: Promise>>isPromise (in category 'testing') -----
isPromise
+ ^ true!
- ^ true.!
Item was changed:
----- Method: Promise>>resolveWith: (in category 'resolving') -----
resolveWith: arg
"Resolve this promise. If arg is itself a Promise, make this promise depend upon it,
as detailed in the Promises/A+ spec:
https://promisesaplus.com/#the-promise-resolution-procedure"
+ arg isPromise
- (arg isKindOf: Promise)
ifTrue: [
arg whenResolved: [:v | self resolveWith: v].
arg whenRejected: [:e | self rejectWith: e]]
ifFalse: [
mutex critical: [
(state == #pending) ifTrue: [
value := arg.
state := #fulfilled.
resolvers do: [:r | self evaluateResolver: r]]]]!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tonyg.1149.mcz
==================== Summary ====================
Name: Kernel-tonyg.1149
Author: tonyg
Time: 31 January 2018, 11:45:27.771328 pm
UUID: ab03b520-f8a0-4aa9-87c4-9b7e9dfb0369
Ancestors: Kernel-tonyg.1148
Add an alias for Promise>>#then:, called #>>=, echoing the monadic bind operator.
Use of a binary selector allows for convenient chaining of Promises without lots of nested parentheses.
For example:
(self produceSomePromise)
>>= [:v | self produceAnotherPromiseInvolving: v]
>>= [:v | self makeYetAnotherUsing: v]
instead of the more cumbersome
((self produceSomePromise)
then: [:v | self produceAnotherPromiseInvolving: v])
then: [:v | self makeYetAnotherUsing: v]
Also adds #>>, again named after the analogous monadic operator, which is like #>>= but does not pass the value from the left-hand-side promise to the continuation block.
=============== Diff against Kernel-tonyg.1148 ===============
Item was added:
+ ----- Method: Promise>>>> (in category 'monad') -----
+ >> resolvedBlock
+ "Like >>=, but discards the result of the promise."
+ ^ self then: [:v | resolvedBlock value]!
Item was added:
+ ----- Method: Promise>>>>= (in category 'monad') -----
+ >>= resolvedBlock
+ "Alias for `then:` allowing convenient chaining."
+ ^ self then: resolvedBlock!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tonyg.1148.mcz
==================== Summary ====================
Name: Kernel-tonyg.1148
Author: tonyg
Time: 31 January 2018, 11:37:21.27021 pm
UUID: 2a675301-406b-4222-9599-84358a7cc506
Ancestors: Kernel-eem.1147
Brings the Promise implementation closer to Javascript/A+ promises in two ways:
* Resolving a Promise with another Promise causes them to be chained together
* Resolving or Rejecting a Promise that is not pending is a no-op, like the Firefox/Chrome/etc in-browser promise implementations.
The tests have been changed in KernelTests-tonyg.331 accordingly.
=============== Diff against Kernel-eem.1147 ===============
Item was changed:
Object subclass: #Promise
+ instanceVariableNames: 'value resolvers mutex state error rejecters'
- instanceVariableNames: 'onError value resolvers mutex state error rejectors rejecters'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Processes'!
+ !Promise commentStamp: 'tonyg 1/31/2018 23:34' prior: 0!
- !Promise commentStamp: 'fbs 5/17/2013 18:23' prior: 0!
I represent the result of an asynchronous message. Once the message is processed, I will be resolved to a value. I am typically instantiated by invocations of #futureSend:at:args: (and not by #futureDo:atArgs:).
See class-comment of FutureNode.
I also implement the Promises/A+ Javascript specification. This allows you to chain my instances to perform arbitrarily complex asynchronous tasks with error handling baked in.
+ A Promise may be in one of three possible states: #pending, #fulfilled or #rejected. A Promise may move from #pending -> #fulfilled (by way of the resolveWith: message), or from #pending -> #rejected (by way of rejectWith:). No other state changes may occur.
+
+ Once #fulfilled or #rejected, a Promise's value must not change. In keeping with the major Javascript Promise implementations' interpretations of this, calls to resolveWith: or rejectWith: when a Promise is in #fulfilled or #rejected state are simply ignored - an error is not signalled. (See test cases PromiseTest testFirstResolutionWins, testCannotRejectFulfilledPromise and testCannotResolveaRejectedPromise.)!
- A Promise may be in one of three possible states: #pending, #fulfilled or #rejected. A Promise may move from #pending -> #fulfilled, or from #pending -> #rejected. No other state changes may occur. Once #fulfilled or #rejected, a Promise's value must change.!
Item was changed:
----- Method: Promise>>rejectWith: (in category 'resolving') -----
rejectWith: anObject
"Reject this promise."
mutex critical: [
+ (state == #pending) ifTrue: [
+ error := anObject.
+ state := #rejected.
+ rejecters do: [:r | self evaluateRejecter: r]]]!
- (state == #fulfilled) ifTrue: [self error: 'Promise was already resolved'].
- (state == #rejected) ifTrue: [self error: 'Promise was already rejected'].
- error := anObject.
- state := #rejected.
- rejecters do: [:r | self evaluateRejecter: r]].!
Item was changed:
----- Method: Promise>>resolveWith: (in category 'resolving') -----
resolveWith: arg
+ "Resolve this promise. If arg is itself a Promise, make this promise depend upon it,
+ as detailed in the Promises/A+ spec:
+ https://promisesaplus.com/#the-promise-resolution-procedure"
+
+ (arg isKindOf: Promise)
+ ifTrue: [
+ arg whenResolved: [:v | self resolveWith: v].
+ arg whenRejected: [:e | self rejectWith: e]]
+ ifFalse: [
+ mutex critical: [
+ (state == #pending) ifTrue: [
+ value := arg.
+ state := #fulfilled.
+ resolvers do: [:r | self evaluateResolver: r]]]]!
- "Resolve this promise"
- mutex critical: [
- (state == #fulfilled) ifTrue: [self error: 'Promise was already resolved'].
- (state == #rejected) ifTrue: [self error: 'Promise was already resolved'].
- value := arg.
- state := #fulfilled.
- resolvers do: [:r |
- self evaluateResolver: r]].!
Item was changed:
----- Method: Promise>>then: (in category 'monad') -----
then: resolvedBlock
+ ^ self then: resolvedBlock ifRejected: [:e | "Pass rejection reason along" e].!
- ^ self then: resolvedBlock ifRejected: [:ignored | "Do nothing"].!
David T. Lewis uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-tonyg.331.mcz
==================== Summary ====================
Name: KernelTests-tonyg.331
Author: tonyg
Time: 31 January 2018, 11:38:54.000311 pm
UUID: 76ecc634-5cf0-43e2-8e17-3dcf9ba18408
Ancestors: KernelTests-nice.330
Updated and new tests for Promise, to match Kernel-tonyg.1148
=============== Diff against KernelTests-nice.330 ===============
Item was changed:
----- Method: PromiseTest>>testCannotRejectFulfilledPromise (in category 'testing - monad') -----
testCannotRejectFulfilledPromise
| p |
p := Promise unit: 1.
+ p rejectWith: Error new.
+ self assert: p isResolved.
+ self assert: 1 equals: p value.
+ !
- self should: [p rejectWith: Error new] raise: Error.!
Item was changed:
----- Method: PromiseTest>>testCannotResolveaRejectedPromise (in category 'testing - monad') -----
testCannotResolveaRejectedPromise
+ | p e |
- | p |
p := Promise new.
+ e := Error new.
+ p rejectWith: e.
+ p resolveWith: 1.
+ self assert: p isRejected.
+ self assert: p error == e.
+ !
- p rejectWith: Error new.
- self should: [p resolveWith: 1] raise: Error.!
Item was added:
+ ----- Method: PromiseTest>>testCollapsesChainsOfPromises (in category 'testing - monad') -----
+ testCollapsesChainsOfPromises
+ "The monadic bind operator has signature (m a -> (a -> m b) -> m b): that is, in our setting,
+ the block given to `then:` is expected to return a *Promise* of a value, not a value directly.
+ It is convenient to accept non-promise values and automatically lift them into the monad,
+ but we must also ensure we treat the case where a `then:`-block yields a Promise correctly."
+ | p q r |
+ p := Promise new.
+ q := p then: [:v | Promise unit: v * 2].
+ r := q then: [:v | Promise unit: v + 1].
+ p resolveWith: 4.
+ self assert: 4 * 2 equals: q value.
+ self assert: (4 * 2 + 1) equals: r value.!
Item was added:
+ ----- Method: PromiseTest>>testFirstResolutionWins (in category 'testing - monad') -----
+ testFirstResolutionWins
+ | p |
+ p := Promise new.
+ p resolveWith: 1.
+ p resolveWith: 2.
+ self assert: p isResolved.
+ self assert: p value == 1.
+ !