Re: [Pharo-users] Literals

2018-04-27 Thread Richard O'Keefe
The ## syntax that some Smalltalks have (Smalltalk/X, for example, which calls it a Dolphin extension) is related to Common Lisp's #.e the result of evaluating e at *read* time, taken as a literal #,e the result of evaluating e at *load* time, taken as a lite

Re: [Pharo-users] Literals

2018-04-27 Thread lb
Hi, I think the question is How automaticly create literal's objects , not initialize. e.g 'aString' #aSymbol { anArray} #[] Cheers Liang

Re: [Pharo-users] Literals

2018-04-27 Thread Ben Coman
On 28 April 2018 at 03:34, Clément Bera wrote: > The guy who asked the question said: "...when you want to shorten some > object initialization" > > Using ClassVariable is an alternative way to shorten object > initialization, reading a ClassVariable is almost the same performance as > reading a

Re: [Pharo-users] Literals

2018-04-27 Thread Richard Sargent
On Fri, Apr 27, 2018 at 3:58 PM, Esteban A. Maringolo wrote: > oh, you were talking about how te VM views the object, > I was thinking in terms of how the compiler sees the text. > > So I'm talking about literals "syntax". > > Thanks anyway for the "trick" :) > Another common technique is a "onc

Re: [Pharo-users] Literals

2018-04-27 Thread Esteban A. Maringolo
oh, you were talking about how te VM views the object, I was thinking in terms of how the compiler sees the text. So I'm talking about literals "syntax". Thanks anyway for the "trick" :) On 27/04/2018 16:34, Clément Bera wrote: > The guy who asked the question said: "...when you want to shorten

Re: [Pharo-users] [Voyage] Possible to save an OrderedCollection?

2018-04-27 Thread sergio ruiz
Ah.. ok. this did it.. So, this works, meaning that the production code i have in place is the problem.. I must have a loop somewhere.. I can’t find it for the life of me.. On April 27, 2018 at 4:10:53 PM, Esteban Lorenzano (esteba...@gmail.com) wrote: did you add the property after doing s

Re: [Pharo-users] [Voyage] Possible to save an OrderedCollection?

2018-04-27 Thread Esteban Lorenzano
> On 27 Apr 2018, at 15:30, sergio ruiz wrote: > > Hi, esteban.. > > In this case, the persisted object is TestBox.. > > it does show up just fine in Mongo, but the OrderedCollection of points does > not. did you add the property after doing some tests? in that case, you need to reset Voya

Re: [Pharo-users] #ast vs. #parseTree

2018-04-27 Thread Sean P. DeNigris
Marcus Denker-4 wrote > I will add comments… I got confused by this again and created an issue: https://pharo.manuscript.com/f/cases/21806/Document-Difference-between-ast-and-parseTree And then Peter Uhnak reminded me on Discord about this thread. I'm happy to add the comments, but not sure I und

Re: [Pharo-users] Literals

2018-04-27 Thread Clément Bera
The guy who asked the question said: "...when you want to shorten some object initialization" Using ClassVariable is an alternative way to shorten object initialization, reading a ClassVariable is almost the same performance as reading a literal, so that looked like a good alternative to me. Both

Re: [Pharo-users] Literals

2018-04-27 Thread Esteban A. Maringolo
On 27/04/2018 15:35, Richard Sargent wrote: > On Fri, Apr 27, 2018 at 2:08 PM, Esteban A. Maringolo > mailto:emaring...@gmail.com>> wrote: > As far as I knew the only way to have new literals was to modify the > compiler. > > > Yes. > > VA Smalltalk has an interesting syntax extension w

Re: [Pharo-users] Literals

2018-04-27 Thread Richard Sargent
On Fri, Apr 27, 2018 at 2:08 PM, Esteban A. Maringolo wrote: > Hi Clément, > > On 27/04/2018 10:32, Clément Bera wrote: > > Obviously sets are not as easy to deal with. You cannot mutate empty > > arrays/bytearrays, if you concatenate something it creates a new object. > > You can add things in s

Re: [Pharo-users] Literals

2018-04-27 Thread Esteban A. Maringolo
Hi Clément, On 27/04/2018 10:32, Clément Bera wrote: > Obviously sets are not as easy to deal with. You cannot mutate empty > arrays/bytearrays, if you concatenate something it creates a new object. > You can add things in sets. So you need to be careful... You can make > the object read-only to a

Re: [Pharo-users] SortedCollection>>reverse answers an inconsistent object in Pharo 6

2018-04-27 Thread Richard O'Keefe
You wrote "In general reversed/converse has no meaning for block." That's entirely an artefact of representing blocks of different arities by the same class. In my own Smalltalk, NiladicBlock, MonadicBlock, DyadicBlock, ... are different classes. To put it another way, your statement has exactly

Re: [Pharo-users] UFFI - Could not coerce arguments

2018-04-27 Thread Serge Stinckwich
On Fri, Apr 27, 2018 at 10:45 AM, Esteban Lorenzano wrote: > hi, > > it all depends on how you are declaring your types. > > here, for example you are passing > > aTF_OutputArray getHandle > > that’s a “void*” value (an ExternalAddress or ExternalData object), and in > declaration you have (if I

Re: [Pharo-users] [Pharo-dev] libfreetype6 missing in the dependencies of ubuntu Pharo distribution

2018-04-27 Thread Peter Uhnák
Thanks :) I was testing it on behalf of someone else, so no problems for me. :) Cheers, Peter On Fri, Apr 27, 2018 at 3:30 PM, Holger Freyther wrote: > > > > On 27. Apr 2018, at 19:22, Peter Uhnák wrote: > > > > I've installed both ( apt install pharo6-32-ui pharo6-64-ui ), but the > font pro

Re: [Pharo-users] FileStream deprecation in Pharo7

2018-04-27 Thread Sven Van Caekenberghe
> On 27 Apr 2018, at 15:28, Sean P. DeNigris wrote: > > Sven Van Caekenberghe-2 wrote >> The answer is simple: use FileSystem, it has been in the image for years. > > IIUC the thrust of the question was how to get exactly that info most > effectively to a naive user who runs into the deprecat

Re: [Pharo-users] Literals

2018-04-27 Thread Clément Bera
Not really. You can use ClassVariables though. Here's an example for Sets: Object subclass: #MyClass instanceVariableNames: '' classVariableNames: 'MyClassVar' package: 'MyPackage' MyClass class>>initialize super initialize. MyClassVar := Set new. MyClass>>foo self bar: MyClassVar

Re: [Pharo-users] [Pharo-dev] libfreetype6 missing in the dependencies of ubuntu Pharo distribution

2018-04-27 Thread Holger Freyther
> On 27. Apr 2018, at 19:22, Peter Uhnák wrote: > I've installed both ( apt install pharo6-32-ui pharo6-64-ui ), but the font > problem was present only for 32bit. > > Note that I was launching the VM packaged with ZeroConf installation, I've > only used apt mainly to get all dependencies.

Re: [Pharo-users] [Voyage] Possible to save an OrderedCollection?

2018-04-27 Thread sergio ruiz
Hi, esteban.. In this case, the persisted object is TestBox.. it does show up just fine in Mongo, but the OrderedCollection of points does not. On April 27, 2018 at 8:57:26 AM, Esteban Lorenzano (esteba...@gmail.com) wrote: what you need to save is the persistent object, the one marked as “i

Re: [Pharo-users] FileStream deprecation in Pharo7

2018-04-27 Thread Sean P. DeNigris
Sven Van Caekenberghe-2 wrote > The answer is simple: use FileSystem, it has been in the image for years. IIUC the thrust of the question was how to get exactly that info most effectively to a naive user who runs into the deprecation… - Cheers, Sean -- Sent from: http://forum.world.st/Phar

Re: [Pharo-users] FileStream deprecation in Pharo7

2018-04-27 Thread Holger Freyther
> On 27. Apr 2018, at 21:13, Sven Van Caekenberghe wrote: > > Holger, Sven! > The answer is simple: use FileSystem, it has been in the image for years. > > The 'Deep into Pharo' book has a chapter about it. > > Sven > > (Apart from that, you are right: we can always write more documentat

[Pharo-users] Literals

2018-04-27 Thread Debiller 777
You know, literals are quite useful in case when you want to shorten some object initialization. For example #() and {} for arrays and $[]for byte arrays. However, if there is a way to add custom literals, for example for sets (something like #{} I guess)? how to do it? and can some special kind of

Re: [Pharo-users] FileStream deprecation in Pharo7

2018-04-27 Thread Sven Van Caekenberghe
Holger, > On 27 Apr 2018, at 15:01, Holger Freyther wrote: > > tl;dr could we extend PackageManifest>>#isDeprecated to provide reasoning and > pointers to potential replacements? > > I was loading some of my code into a Pharo7 image and while debugging noticed > that FileStream is deprecated

[Pharo-users] FileStream deprecation in Pharo7

2018-04-27 Thread Holger Freyther
tl;dr could we extend PackageManifest>>#isDeprecated to provide reasoning and pointers to potential replacements? I was loading some of my code into a Pharo7 image and while debugging noticed that FileStream is deprecated (text stroke through in the Playground). But neither the FileStream class

Re: [Pharo-users] [Voyage] Possible to save an OrderedCollection?

2018-04-27 Thread Esteban Lorenzano
hi, what you need to save is the persistent object, the one marked as “isVoyageRoot” in class side. cheers, Esteban > On 27 Apr 2018, at 14:44, sergio ruiz wrote: > > > For some reason, I am not able to do this: > > Object subclass: #TestBox > instanceVariableNames: 'origin corner poi

[Pharo-users] [Voyage] Possible to save an OrderedCollection?

2018-04-27 Thread sergio ruiz
For some reason, I am not able to do this: Object subclass: #TestBox instanceVariableNames: 'origin corner pointList' classVariableNames: '' poolDictionaries: '' category: 'PrintBot-Models’! initialize pointList := OrderedCollection new. If i do somethin

Re: [Pharo-users] UFFI - Could not coerce arguments

2018-04-27 Thread Esteban Lorenzano
hi, > On 27 Apr 2018, at 13:06, Ben Coman wrote: > > > > On 27 April 2018 at 17:23, Serge Stinckwich > wrote: > I would like to pass a pointer to an array of pointers to a FFI call and I > have problems ... > > ​I have this method: > > runOutputs: aTF_Out

Re: [Pharo-users] [Pharo-dev] libfreetype6 missing in the dependencies of ubuntu Pharo distribution

2018-04-27 Thread Peter Uhnák
I've installed both ( apt install pharo6-32-ui pharo6-64-ui ), but the font problem was present only for 32bit. Note that I was launching the VM packaged with ZeroConf installation, I've only used apt mainly to get all dependencies. Now I tried to also run "pharo6-32-ui Pharo.image" (and "pharo6

Re: [Pharo-users] UFFI - Could not coerce arguments

2018-04-27 Thread Ben Coman
On 27 April 2018 at 17:23, Serge Stinckwich wrote: > I would like to pass a pointer to an array of pointers to a FFI call and I > have problems ... > > ​I have this method: > > runOutputs: aTF_OutputArray size: anInteger > | status outvalues | > status := TF_Status create. > outvalues

Re: [Pharo-users] UFFI - Could not coerce arguments

2018-04-27 Thread Esteban Lorenzano
hi, it all depends on how you are declaring your types. here, for example you are passing aTF_OutputArray getHandle that’s a “void*” value (an ExternalAddress or ExternalData object), and in declaration you have (if I read correctly): TF_Output * so, first question is: if TF_Output != void

[Pharo-users] UFFI - Could not coerce arguments

2018-04-27 Thread Serge Stinckwich
I would like to pass a pointer to an array of pointers to a FFI call and I have problems ... ​I have this method: runOutputs: aTF_OutputArray size: anInteger | status outvalues | status := TF_Status create. outvalues := FFIExternalArray externalNewType: 'TF_Tensor*' size: anInteger.

Re: [Pharo-users] Showcasing Pharo, Roassal and Grafoscopio at re:publica 2018

2018-04-27 Thread p...@highoctane.be
On Thu, Apr 26, 2018 at 3:57 PM, Offray Vladimir Luna Cárdenas < offray.l...@mutabit.com> wrote: > Hi, > > I will be showcasing Pharo, Roassal and Grafoscopio at re:publica 2018, > next week. As you may know, re:publica[2] is one of the most important > and visible media & digital culture conventi

Re: [Pharo-users] Showcasing Pharo, Roassal and Grafoscopio at re:publica 2018

2018-04-27 Thread Ben Coman
On 26 April 2018 at 21:57, Offray Vladimir Luna Cárdenas < offray.l...@mutabit.com> wrote: > Hi, > > I will be showcasing Pharo, Roassal and Grafoscopio at re:publica 2018, > next week. As you may know, re:publica[2] is one of the most important > and visible media & digital culture conventions in

Re: [Pharo-users] Showcasing Pharo, Roassal and Grafoscopio at re:publica 2018

2018-04-27 Thread Tudor Girba
Excellent! Doru > On Apr 26, 2018, at 3:57 PM, Offray Vladimir Luna Cárdenas > wrote: > > Hi, > > I will be showcasing Pharo, Roassal and Grafoscopio at re:publica 2018, > next week. As you may know, re:publica[2] is one of the most important > and visible media & digital culture conventions