Re: [Pharo-project] Moment of fun

2013-05-02 Thread stephane ducasse
Neat!!! > Hello. > > (UpdatingStringMorph on: otherMorph selector: #position) openInWorld. > > and then move otherMorph on screen > > or > > (UpdatingStringMorph on: otherMorph selector: #extent) openInWorld. > > and then resize otherMorph > > 2013/4/30 Stéphane Ducasse > Hi guys > > I wou

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Denis Kudriashov
Hello. (UpdatingStringMorph on: otherMorph selector: #position) openInWorld. and then move otherMorph on screen or (UpdatingStringMorph on: otherMorph selector: #extent) openInWorld. and then resize otherMorph 2013/4/30 Stéphane Ducasse > Hi guys > > I would like to build a small lectures b

Re: [Pharo-project] Moment of fun

2013-05-01 Thread stephane ducasse
On May 1, 2013, at 7:01 PM, Nicolas Cellier wrote: > Yes, great superpowers! > A bit more lightweight and efficient than abort(); gdb myApp core > > A small reminder for myself: > > [ > (Delay forSeconds: 2 hours asSeconds) wait. > WorldState addDeferredUIMessage: [ UIManager default inform:

Re: [Pharo-project] Moment of fun

2013-05-01 Thread stephane ducasse
Yes! That's a great one :) I added to my presentation. Stef On May 1, 2013, at 6:38 PM, Camillo Bruni wrote: > I really love the use of fuel to serialize errors on the build server: > - > > [ > "some code causing an err

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Nicolas Cellier
Oh, sure much more expressive! I learned some of those low level snippets 25 years ago and seems to have an inability to forget them ;) 2013/5/1 Camillo Bruni > > On 2013-05-01, at 19:01, Nicolas Cellier < > nicolas.cellier.aka.n...@gmail.com> wrote: > > > Yes, great superpowers! > > A bit more

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Camillo Bruni
On 2013-05-01, at 19:01, Nicolas Cellier wrote: > Yes, great superpowers! > A bit more lightweight and efficient than abort(); gdb myApp core > > A small reminder for myself: > > [ > (Delay forSeconds: 2 hours asSeconds) wait. > WorldState addDeferredUIMessage: [ UIManager default inform: 'Yo

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Nicolas Cellier
Yes, great superpowers! A bit more lightweight and efficient than abort(); gdb myApp core A small reminder for myself: [ (Delay forSeconds: 2 hours asSeconds) wait. WorldState addDeferredUIMessage: [ UIManager default inform: 'You''re Smalltalking too much There are other nice things worth in lif

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Camillo Bruni
I really love the use of fuel to serialize errors on the build server: - [ "some code causing an error" Error signal ] on: Error do: [ :error | FLSerializer serialize: error toFileNamed: 'error.fuel' ] ---

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Sven Van Caekenberghe
Hmmm, smells like Lisp (not necessarily bad)… On 01 May 2013, at 16:27, Camille Teruel wrote: > On 1 mai 2013, at 14:03, stephane ducasse wrote: > >> I was more thinking in something useful :) > > Not really useful but fun: simulate classes, subclasses and objects with > blocks: > > makeCoun

Re: [Pharo-project] Moment of fun

2013-05-01 Thread Camille Teruel
On 1 mai 2013, at 14:03, stephane ducasse wrote: > I was more thinking in something useful :) Not really useful but fun: simulate classes, subclasses and objects with blocks: makeCounter := [ | this value | value := 0. this := Dictionary new at: #set put:

Re: [Pharo-project] Moment of fun

2013-05-01 Thread stephane ducasse
I was more thinking in something useful :) On Apr 30, 2013, at 11:07 PM, Marcus Denker wrote: > > On Apr 30, 2013, at 10:56 PM, Stéphane Ducasse > wrote: > >> >> >> anObject become: String new. >> > > > for become: related teaching, this is fun: > > magic > #thisIsMagiC is

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Igor Stasenko
On 1 May 2013 04:17, Michael van der Gulik wrote: > On Wed, May 1, 2013 at 11:46 AM, Igor Stasenko wrote: >> >> | recursion | >> ( recursion := [ recursion value ] ) value > > > At least make it useful. > Useful? :) Let me count, how many times i used Fibonacci sequence in my projects... 0 +

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Michael van der Gulik
On Wed, May 1, 2013 at 11:46 AM, Igor Stasenko wrote: > | recursion | > ( recursion := [ recursion value ] ) value > At least make it useful. fibonacci := [ :i :j | Transcript show: ((i+j) printString); cr. fibonacci value: j value:(i+j). ]. fibonacci value: 1 value: 1. Doesn't work on my anci

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Alexandre Bergel
Another useful ones: Smalltalk garbageCollect Object browse Object halt Object haltOnce Object inspect On Apr 30, 2013, at 3:52 PM, Stéphane Ducasse wrote: > Hi guys > > I would like to build a small lectures based on all the small little crazy > expr

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Igor Stasenko
| recursion | ( recursion := [ recursion value ] ) value On 30 April 2013 23:56, Eliot Miranda wrote: > > > > On Tue, Apr 30, 2013 at 12:52 PM, Stéphane Ducasse > wrote: >> >> Hi guys >> >> I would like to build a small lectures based on all the small little >> crazy expressions that we use >> l

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Alexandre Bergel
Eliot, you're insane :-) A useful one: Debugger closeAllDebuggers Alexandre > | pair | > pair := { #perform:withArguments:. nil }. > pair at: 2 put: pair. > pair perform: pair first withArguments: pair. -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Eliot Miranda
On Tue, Apr 30, 2013 at 12:52 PM, Stéphane Ducasse < stephane.duca...@inria.fr> wrote: > Hi guys > > I would like to build a small lectures based on all the small little crazy > expressions that we use > like > > StandardWindow allInstances do: #close. > > or > > myObject pointersT

Re: [Pharo-project] Moment of fun

2013-04-30 Thread Marcus Denker
On Apr 30, 2013, at 10:56 PM, Stéphane Ducasse wrote: > > > anObject become: String new. > for become: related teaching, this is fun: magic #thisIsMagiC isSymbol ifTrue: [#thisIsMagiC become: #(0)]. #thisIsMagiC at: 1 put: (#thisIsMagiC at: 1) +1. ^#thisIsM

[Pharo-project] Moment of fun

2013-04-30 Thread Stéphane Ducasse
Hi guys I would like to build a small lectures based on all the small little crazy expressions that we use like StandardWindow allInstances do: #close. or myObject pointersTo or anObject become: String new. Do you have some cool expressions to share with me. St