Re: [Pharo-users] Pecha Kucha alike presentation powered by Pharo

2016-10-31 Thread Norbert Hartl
It is maybe the easiest way to use a meta refresh tag. http://www.w3schools.com/tags/att_meta_http_equiv.asp Norbert > Am 31.10.2016 um 18:58 schrieb Offray Vladimir Luna Cárdenas > : > > Hi, > > I will be doing next Wednesday a Pecha Kucha[1] alike presentation (yep, > they told me just re

Re: [Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Sven Van Caekenberghe
UDP works pretty well in Pharo. UDP is also quite simple (being connectionless). It is quite likely that the high level Pharo code does something wrong. > On 31 Oct 2016, at 18:15, Dimitris Chloupis wrote: > > *Conclusion: Problem solved, Pharo bug remains > > I was also informed in Slack tha

[Pharo-users] Pecha Kucha alike presentation powered by Pharo

2016-10-31 Thread Offray Vladimir Luna Cárdenas
Hi, I will be doing next Wednesday a Pecha Kucha[1] alike presentation (yep, they told me just recently) and I would like a different kind of presentation: Keeping the constrains of "20 slides, each 20 seconds", but using kind of a comic grid (powered by Material Design Light[2]), instead of

Re: [Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Dimitris Chloupis
*Conclusion: Problem solved, Pharo bug remains I was also informed in Slack that this may be a Mac only problem. On Mon, Oct 31, 2016 at 7:13 PM Dimitris Chloupis wrote: > The number does not matter, you are both right and wrong. > > You are correct indeed the string inside the array creates an

Re: [Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Dimitris Chloupis
The number does not matter, you are both right and wrong. You are correct indeed the string inside the array creates an error by itself and also contributes to the primitive error of the UDP socket. You are wrong for thinking this is the only issue here. What we have here is a problematic primiti

Re: [Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Nicolai Hess
Am 31.10.2016 5:14 nachm. schrieb "Nicolai Hess" : > > Hi, > > 2016-10-31 12:46 GMT+01:00 Dimitris Chloupis : >> >> Hey guys I try to use Pharo to use Supercollider via OSC. OSC library is maintained by Stef in STHub. >> >> So SC informs that it receives the messages sent, but in Pharo I am getting

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread jtuc...@objektfabrik.de
Am 31.10.16 um 16:13 schrieb CodeDmitry: I meant "dynamic" as a contrast to Java's abstract classes/interfaces which are going to slap you if you forget to implement one of the abstract methods, Smalltalk will also slap you if you send an unimplemented message. The only difference is that Java

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread jtuc...@objektfabrik.de
Am 31.10.16 um 15:59 schrieb p...@highoctane.be: but you should use myCollection ifEmpty: [ ... ] interesting. Why do you think so? what if you wanted your code to be portable across Smalltalk dialects? -- --- Objek

Re: [Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Nicolai Hess
Hi, 2016-10-31 12:46 GMT+01:00 Dimitris Chloupis : > Hey guys I try to use Pharo to use Supercollider via OSC. OSC library is > maintained by Stef in STHub. > > So SC informs that it receives the messages sent, but in Pharo I am > getting annoying Primitive errors that I paste bellow. Anyone know

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
That's a very interesting point; Even if Boolean messages is inlined into True and False, it provides a very convenient place to hook additional messages that are common to True and False to without needing to touch True nor False. -- View this message in context: http://forum.world.st/How-does

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Ben Coman
Hi Dmitry, You've just bumped into one of Smalltalk's paradigms that may change the way you *think* about programming ;). For me it was certainly an eye-opener. It intrigued me there could even exist another way to *think* about booleans. On Mon, Oct 31, 2016 at 10:06 PM, jtuc...@objektfabrik.d

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Thierry Goubier
Le 31/10/2016 à 16:18, Denis Kudriashov a écrit : 2016-10-31 16:11 GMT+01:00 Norbert Hartl mailto:norb...@hartl.name>>: Am 31.10.2016 um 15:59 schrieb p...@highoctane.be : but you should use myCollection ifEmpty: [ ... ] Why? because it shorter :

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
I meant "dynamic" as a contrast to Java's abstract classes/interfaces which are going to slap you if you forget to implement one of the abstract methods, so the only reason to define the methods that are going to be overwritten seems to be to disambiguate the error message that will be raised from

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Denis Kudriashov
2016-10-31 16:11 GMT+01:00 Norbert Hartl : > Am 31.10.2016 um 15:59 schrieb p...@highoctane.be: > > but you should use myCollection ifEmpty: [ ... ] > > Why? because it shorter :)

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Esteban A. Maringolo
2016-10-31 12:11 GMT-03:00 Norbert Hartl : > > Am 31.10.2016 um 15:59 schrieb p...@highoctane.be: > > but you should use myCollection ifEmpty: [ ... ] > > Why? It enables you to implement polymorphism with an object that might not be aCollection, but behaves like one. Of course you could also impl

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Esteban A. Maringolo
2016-10-31 11:58 GMT-03:00 CodeDmitry : > Ah so it's more of a "dynamic abstract class" than a "dynamic interface", so > they do get visited during the traversal of the inheritence chain(rather > than skipped immediately to Object). I don't know what you mean by "dynamic". The whole object system

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Norbert Hartl
> Am 31.10.2016 um 15:59 schrieb p...@highoctane.be: > > but you should use myCollection ifEmpty: [ ... ] > Why? Norbert > Phil > > On Mon, Oct 31, 2016 at 3:25 PM, Sven Van Caekenberghe > wrote: > myCollection isEmpty ifTrue: [ self inform: 'The collection is empty' ].

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Esteban A. Maringolo
2016-10-31 11:32 GMT-03:00 CodeDmitry : > I realized it a bit before you posted but thanks for confirming. > > Boolean seems to indeed just be a "Dynamic Interface"; since Smalltalk does > not have "Java Interfaces"(nor want them for the same reason JavaScript > doesn't), the developers wanted to s

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
Ah so it's more of a "dynamic abstract class" than a "dynamic interface", so they do get visited during the traversal of the inheritence chain(rather than skipped immediately to Object). -- View this message in context: http://forum.world.st/How-does-Boolean-ifTrue-work-tp4920873p4920896.html S

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Thierry Goubier
Le 31/10/2016 à 15:32, CodeDmitry a écrit : I realized it a bit before you posted but thanks for confirming. Boolean seems to indeed just be a "Dynamic Interface"; since Smalltalk does not have "Java Interfaces"(nor want them for the same reason JavaScript doesn't), the developers wanted to stil

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread p...@highoctane.be
For the full story, these objects and ifTrue: etc are special cases in the VM code. For speed. Phil On Mon, Oct 31, 2016 at 3:32 PM, CodeDmitry wrote: > I realized it a bit before you posted but thanks for confirming. > > Boolean seems to indeed just be a "Dynamic Interface"; since Smalltalk d

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread p...@highoctane.be
but you should use myCollection ifEmpty: [ ... ] Phil On Mon, Oct 31, 2016 at 3:25 PM, Sven Van Caekenberghe wrote: > myCollection isEmpty ifTrue: [ self inform: 'The collection is empty' ]. > > First #isEmpty is sent to myCollection which results in either true or > false as value. > > Then #i

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
I realized it a bit before you posted but thanks for confirming. Boolean seems to indeed just be a "Dynamic Interface"; since Smalltalk does not have "Java Interfaces"(nor want them for the same reason JavaScript doesn't), the developers wanted to still have True and False be subclasses of Boolean

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Sven Van Caekenberghe
myCollection isEmpty ifTrue: [ self inform: 'The collection is empty' ]. First #isEmpty is sent to myCollection which results in either true or false as value. Then #ifTrue: is sent to this value. Now, if the value was true (the sole instance of class True), the code in True>>#ifTrue: is execu

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Thierry Goubier
Le 31/10/2016 à 14:58, CodeDmitry a écrit : But still, how is the actual argument "alternativeBlock" passed to the True/False from a Boolean? The message does not cache the message inside itself before passing the message, and it does not pass the alternative block along with the message. If I

Re: [Pharo-users] Spec: Setting rows height of a pictures list

2016-10-31 Thread Nicolai Hess
2016-10-31 15:07 GMT+01:00 Matteo via Pharo-users < pharo-users@lists.pharo.org>: > > > -- Weitergeleitete Nachricht -- > From: Matteo > To: Any question about pharo is welcome > Cc: > Date: Mon, 31 Oct 2016 15:06:27 +0100 > Subject: Re: [Pharo-users] Spec: Setting rows height of

Re: [Pharo-users] Spec: Setting rows height of a pictures list

2016-10-31 Thread Matteo via Pharo-users
--- Begin Message --- Thanks Nicolai, unfortunately, even using images of the same height I obtain a list with thin rows. Maybe I'm typing something wrong. I'll try to figure out how to handle this. Please let me know, if you have any further suggestion. Thanks, Matteo

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
But still, how is the actual argument "alternativeBlock" passed to the True/False from a Boolean? The message does not cache the message inside itself before passing the message, and it does not pass the alternative block along with the message. -- View this message in context: http://forum.w

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread jtuc...@objektfabrik.de
When I teach Smalltalk, this is one of the most beautiful exercises for students. Those who get it will love Smalltalk, those who don't often leave the project soon ;-) BTW: This is not a visitor or any other pattern, it really is just Polymorphism at work and the reason why back in the 90ies,

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Thierry Goubier
Hi Dmitry, you found it yourself, sort of! Le 31/10/2016 à 14:25, CodeDmitry a écrit : Wait, so unlike JavaScript; True and False are actual singletons and ifTrue/ifFalse/ifTrue:ifFalse: uses visitor pattern to have the actual True or False handle the block rather than doing it themselves? Ye

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
Wait, so unlike JavaScript; True and False are actual singletons and ifTrue/ifFalse/ifTrue:ifFalse: uses visitor pattern to have the actual True or False handle the block rather than doing it themselves? -- View this message in context: http://forum.world.st/How-does-Boolean-ifTrue-work-tp49208

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Nicolas Passerini
Well, in fact Boolean class has no instances, the boolean value true is an instance of True class, you should look at the ifTrue: methods in the subclasses of Boolean True and False. But also, ifTrue: expressions are inlined, as the comment says in the code you posted. So I think that all this ifT

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Cyril Ferlicot D.
On 31/10/2016 14:17, CodeDmitry wrote: > I am looking at > > ifTrue: alternativeBlock > "If the receiver is false (i.e., the condition is false), then the > value is > the > false alternative, which is nil. Otherwise answer the result of > evaluating > the argument, alternat

Re: [Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread Sven Van Caekenberghe
> On 31 Oct 2016, at 14:17, CodeDmitry wrote: > > I am looking at > > ifTrue: alternativeBlock > "If the receiver is false (i.e., the condition is false), then the > value is > the > false alternative, which is nil. Otherwise answer the result of > evaluating > the argume

[Pharo-users] How does Boolean ifTrue work?

2016-10-31 Thread CodeDmitry
I am looking at ifTrue: alternativeBlock "If the receiver is false (i.e., the condition is false), then the value is the false alternative, which is nil. Otherwise answer the result of evaluating the argument, alternativeBlock. Create an error notification if the

[Pharo-users] UDP Socket primitive failure

2016-10-31 Thread Dimitris Chloupis
Hey guys I try to use Pharo to use Supercollider via OSC. OSC library is maintained by Stef in STHub. So SC informs that it receives the messages sent, but in Pharo I am getting annoying Primitive errors that I paste bellow. Anyone knows if this a bug or something missing here ? Also SC sometimes

Re: [Pharo-users] Spec: Setting rows height of a pictures list

2016-10-31 Thread Nicolai Hess
2016-10-31 10:19 GMT+01:00 Matteo via Pharo-users < pharo-users@lists.pharo.org>: > > > -- Weitergeleitete Nachricht -- > From: Matteo > To: "Pharo is welcome (ML)" > Cc: > Date: Mon, 31 Oct 2016 10:18:03 +0100 > Subject: Spec: Setting rows height of a pictures list > Hi, >

[Pharo-users] Spec: Setting rows height of a pictures list

2016-10-31 Thread Matteo via Pharo-users
--- Begin Message --- Hi, I've created a list of pictures, i.e. a widget based on ListModel where each item is a ImageModel. When the widget is displayed I get list window with very thin rows. Is there a way to control the ListModel rows height? Thanks, Matteo --- End M