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

2016-11-02 Thread Dimitris Chloupis
Actually sorry Igor but you are wrong, you just defeated the purpose of Smalltalk. To expose you to the internals. Of course you can implement interfaces. You can even implement static types. You can do anything you want. The compiler is written in Smalltalk after all. On Wed, 2 Nov 2016 at 23:02

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Mariano Martinez Peck
On Wed, Nov 2, 2016 at 8:51 PM, Henrik Nergaard wrote: > You could always store the closure as a string and then evaluate it on > materialization, at least if it is clean (no thisContext and no return) > > For blocks without no self usage: > -- > | blk | > > blk := [ :a :b | a <=

Re: [Pharo-users] Pharo desktop UI

2016-11-02 Thread Johan Fabry
I’m happy that the documentation is of help to you! Sorry but I don’t have an answer to your question at hand right now. Have a look at all the users of MenuModel and friends to see where they are used in the image, you should be able to get the examples you need. HTH, -- Does this mail seem

Re: [Pharo-users] Pharo desktop UI

2016-11-02 Thread vikenti
Thanks! After looking through this manual i successfully created simple window with cascaded menu which. I will deeply research this book. One more question: how to add separator to the menu group? either MenuGroupModel nor MenuItemModel has special selector but autocompletion shows me "addSepa

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Henrik Nergaard
You could always store the closure as a string and then evaluate it on materialization, at least if it is clean (no thisContext and no return) For blocks without no self usage: -- | blk | blk := [ :a :b | a <= b ]. #_ assert: blk isClean. blk := Compiler evaluate: blk asString.

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Sven Van Caekenberghe
You can't serialise blocks with STON. The design goal of STON was to be able to serialise regular domain models. Classes are written as a global reference to their name, as a kind of shortcut (as opposed to writing out the whole class structure). For blocks there is no easy solution, AFAIK. >

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Sven Van Caekenberghe
> On 2 Nov 2016, at 19:56, Esteban A. Maringolo wrote: > > 2016-11-02 15:48 GMT-03:00 Offray Vladimir Luna Cárdenas > : >> Hi Sven, >> >> In our ongoing Data Week, we found that would be useful to use a unique >> identifier for objects that is not integer (some kind of SHA or similar). >> The u

Re: [Pharo-users] Pharo desktop UI

2016-11-02 Thread Johan Fabry
Hello Vikenti, for writing UIs in Pharo the UI builder you should use is Spec. We have documentation online in the form of a book (which is a work in progress).I think it will answer many of your UI questions, have a look at http://files.pharo.org/books/spec-tutorial/ HTH, -- Does this mail

[Pharo-users] Pharo desktop UI

2016-11-02 Thread vikenti
Hello, i'm newbie in Pharo, converted from Visual Works which is quite different from Pharo Smalltalk. I started to port my application (i've been working on for about three years) from VW (because of new personal user licensing limitations of Visual Works), but i have to solve some problems and ne

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Offray Vladimir Luna Cárdenas
On 02/11/16 13:56, Esteban A. Maringolo wrote: 2016-11-02 15:48 GMT-03:00 Offray Vladimir Luna Cárdenas : Hi Sven, In our ongoing Data Week, we found that would be useful to use a unique identifier for objects that is not integer (some kind of SHA or similar). The use case was this: We were

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

2016-11-02 Thread Igor Stasenko
If you want to ensure that your class(es) comply with certain protocol, just write a test that covers the protocol and checks that class instances will understand messages you want it to understand. But there's no way to restrict your class to comply to whole protocol once at a time, because tools

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

2016-11-02 Thread Igor Stasenko
On 2 November 2016 at 20:36, Henrik Sperre Johansen < henrik.s.johan...@veloxit.no> wrote: > CodeDmitry wrote > > Why don't Smalltalk or Smalltalklike languages have checked interfaces? > > The compilation occurs at runtime but it is still technically a > > compilation, why don't languages allow i

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

2016-11-02 Thread Dimitris Chloupis
I try to avoid ifs altogether. Most of the time I use polymorphism , which means instead of checking you preform no check and just call a method, depending on the object the method of the same name will have different code which replaces ifs and is far more readable. Of course this technique can re

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Dimitris Chloupis
I suspected so , ok thanks will keep in mind. On Wed, Nov 2, 2016 at 9:13 PM p...@highoctane.be wrote: > Of course, you need a specfic stonOn: aStream for objects that aren't > standard objects: > > Check out the Ston chapter. Or a couple of stonOn: implementers. > > Phil > > On Wed, Nov 2, 201

Re: [Pharo-users] UDP Socket primitive failure

2016-11-02 Thread Dimitris Chloupis
good catch , now we know why it does what it does. The reason why I did this is that there is an example method in OSCMessage that use this bad syntax in the comment. So it seems the Socket does send the message because Pharo does not perform a check on the argument, the Socket fails obviously but

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

2016-11-02 Thread Henrik Sperre Johansen
CodeDmitry wrote > Why don't Smalltalk or Smalltalklike languages have checked interfaces? > The compilation occurs at runtime but it is still technically a > compilation, why don't languages allow implementing interfaces at runtime? > The type information is there, and the source can load the list

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread p...@highoctane.be
Of course, you need a specfic stonOn: aStream for objects that aren't standard objects: Check out the Ston chapter. Or a couple of stonOn: implementers. Phil On Wed, Nov 2, 2016 at 8:03 PM, Dimitris Chloupis wrote: > I tried to use my ChronosManager object with it and STON does not seem to >

Re: [Pharo-users] UDP Socket primitive failure

2016-11-02 Thread Henrik Sperre Johansen
I'm amazed that ever works, as (in general, maybe mac is special,) you need to specify the ipv4 address as a ByteArray, not a string. (OSCMessage for:{'/mixer.volume'. 1 . 0.2})sendTo: #[127 0 0 1] port: 57120 Cheers, Henry -- View this message in context: http://forum.world.st/UDP-Socket-pri

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Dimitris Chloupis
I tried to use my ChronosManager object with it and STON does not seem to like this m := ChronosManager new. s:= STON toString: m s inspect. STONWriter>>error: BlockClosure(Object)>>stonOn: STONWriter>>nextPut: STONWriter>>encodeKey:value: STONMapWriter>>at:put: [ :each | (anObject instVarNamed:

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Esteban A. Maringolo
2016-11-02 15:48 GMT-03:00 Offray Vladimir Luna Cárdenas : > Hi Sven, > > In our ongoing Data Week, we found that would be useful to use a unique > identifier for objects that is not integer (some kind of SHA or similar). > The use case was this: > > We were editing the same Grafoscopio tree in a D

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Offray Vladimir Luna Cárdenas
Hi Sven, In our ongoing Data Week, we found that would be useful to use a unique identifier for objects that is not integer (some kind of SHA or similar). The use case was this: We were editing the same Grafoscopio tree in a DVCS (fossil, but could be git or something similar) and the nodes

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Esteban A. Maringolo
2016-11-02 15:22 GMT-03:00 Sven Van Caekenberghe : > > On 2 Nov 2016, at 19:19, Esteban A. Maringolo wrote: > > As far as I know it doesn't "normalize" references, as Fuel does. > > What does that mean ? > See my previous mail for an explanation for what STON does - it handles > shared and cyclic

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread p...@highoctane.be
Ston rocks. Pun intended. Phil On Wed, Nov 2, 2016 at 7:35 PM, Dimitris Chloupis wrote: > ok thanks will give it a try to get an idea > > On Wed, Nov 2, 2016 at 8:22 PM Sven Van Caekenberghe wrote: > >> Basically, STON walks the graph noting each object it sees. When it >> encounters the same

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Dimitris Chloupis
ok thanks will give it a try to get an idea On Wed, Nov 2, 2016 at 8:22 PM Sven Van Caekenberghe wrote: > Basically, STON walks the graph noting each object it sees. When it > encounters the same object again, it outputs a reference. Object equality > is of course #== > > References are integers

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Sven Van Caekenberghe
> On 2 Nov 2016, at 19:19, Esteban A. Maringolo wrote: > > As far as I know it doesn't "normalize" references, as Fuel does. What does that mean ? See my previous mail for an explanation for what STON does - it handles shared and cyclic references correctly. > The alternative is to have a Fu

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Sven Van Caekenberghe
Basically, STON walks the graph noting each object it sees. When it encounters the same object again, it outputs a reference. Object equality is of course #== References are integers, indexes into the list of objects seen, ordered by walking depth first. Sven > On 2 Nov 2016, at 19:14, Dimitri

Re: [Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Esteban A. Maringolo
As far as I know it doesn't "normalize" references, as Fuel does. The alternative is to have a Fuel serializer that serializes Fuel objects in STON format instead of binary :D Esteban A. Maringolo 2016-11-02 15:14 GMT-03:00 Dimitris Chloupis : > A question I was meaning to ask, how efficient is

[Pharo-users] About STONS efficiency at storing nested objects { was : (Re: Keeping data with an application)}

2016-11-02 Thread Dimitris Chloupis
A question I was meaning to ask, how efficient is STON at storing references , lets say I have an object that has instance variables that references another object and that object has a instance variable that references another object etc. Where exactly STON stops , or are there any limitations On

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread Offray Vladimir Luna Cárdenas
Hi, I'm using STON for my Grafoscopio[1][2] project with pretty good results. It's flexible, readable and well supported and document. Better that JSON! Pretty recommended. [1] http://mutabit.com/grafoscopio/index.en.html [2] http://smalltalkhub.com/#!/~Offray/Grafoscopio Cheers, Offray O

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread sergio ruiz
The funny thing about STON is that, as a professional developer, I am so used to the whole world being a “hey, look! we have this too!!” world, that I never looked into it at all.. I should have knows that that Pharo/Smalltalk community would, instead of “me too” would say.. “look, here’s a cle

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread Johan Fabry
There is a chapter in the Enterprise Pharo book on STON that may be of some help to you https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/STON/STON.html The book also talks about other storage mechanisms, see http://files.pharo.org/books/ente

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread sergio ruiz
Yes, I will do this.. i bet i can even serve it up via http, and pull it directly from my working image.. Thanks! On November 2, 2016 at 12:24:48 PM, p...@highoctane.be (p...@highoctane.be) wrote: Hum, use this instead: Usage: "Saving" self persistAsSton: someDataStructure toFile: 'persist.

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread sergio ruiz
Looks like I might stick with STON.. I am not really worried too much about execution time or anything.. Need to look at one more thing.. If a user has say.. many stations.. meaning that they have an OrderedCollection of Stations.. I need to check how that gets serialized, and what happens when

Re: [Pharo-users] Can pharo association web page point to association.pharo.org, like the consortium one?

2016-11-02 Thread Esteban Lorenzano
it is correct, just we still didn’t change the domain (to association.pharo.org ) and we send the mail too early. but you can trust that mail, is ours :) Esteban > On 2 Nov 2016, at 17:40, Offray Vladimir Luna Cárdenas > wrote: > > Hi, > > I just received a

[Pharo-users] Can pharo association web page point to association.pharo.org, like the consortium one?

2016-11-02 Thread Offray Vladimir Luna Cárdenas
Hi, I just received a mail telling me some password and login information and telling me to go to https://pharo.wildapricot.org/, but that domain seem suspicious to me, so I went to the consortium and association which are subdomains of Pharo. First one works well, but second is a redirection

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread p...@highoctane.be
Hum, use this instead: Usage: "Saving" self persistAsSton: someDataStructure toFile: 'persist.dat' "Loading" someDataStructure := self loadStonFromFile: 'persist:dat' Well, depends if you want to write to same file, different file etc, but this will get you on the right track On Wed, Nov 2, 20

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread p...@highoctane.be
Use these methods in your class. loadStonFromFile: aDataFilenameString | data | data := STON fromStream: ((self dataFileNamed: aFilenameString) readStream). ^data persistAsSton: anObject toFile: aDataFilenameString (self newDataFileNamed: aFilenameString) writeStreamDo: [ :out | out << (STON toSt

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread Sven Van Caekenberghe
> On 2 Nov 2016, at 15:29, sergio ruiz wrote: > > Hmm… i need to look at this .. > > i can just burp out all my objects with ston and suck them back in on the > local machine.. Just try it ;-) STON put: myObjects onStream[Pretty]: fileStream. STON fromStream: fileStream. https://ci.in

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread Dimitris Chloupis
Fuel is another option , though ston will be more readable because ston is text fluel is binary . SQLite is another one . You actually have a ton of options here. You can even make your own binary or text format if want , it's easy. On Wed, 2 Nov 2016 at 16:30, sergio ruiz wrote: > Hmm… i need to

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread sergio ruiz
Hmm… i need to look at this ..  i can just burp out all my objects with ston and suck them back in on the local machine.. On November 2, 2016 at 10:25:51 AM, p...@highoctane.be (p...@highoctane.be) wrote: Keeping data in image with a STON export would be good enough: peace, sergio photo

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread p...@highoctane.be
Keeping data in image with a STON export would be good enough: On Wed, Nov 2, 2016 at 3:21 PM, sergio ruiz wrote: > > For this project, I want to make progress based on feedback from users ... > there are lots of different directions that could be taken from this > starting point and I want to b

Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread sergio ruiz
For this project, I want to make progress based on feedback from users ... there are lots of different directions that could be taken from this starting point and I want to be driven by user feedback ... so if you are willing to provide feedback I am willing to work with you ... i think that

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Dimitris Chloupis
" ah, but this is fake (we have a bug shrinking the image). real image is around 32m. sources are also 32m. changes are going to be zero on release. " You mean a bug increasing the image size, because otherwise I dont understand you " how you get 43m in vm? my VMs (all of them, linux, win and ma

Re: [Pharo-users] Image freezes on Linux if it was previously saved on Windows

2016-11-02 Thread Maximiliano Tabacman via Pharo-users
--- Begin Message --- This is the bug entryhttps://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-Linux-if-it-was-previously-saved-on-Windows I reported it as Pharo 6 since it was not happening back when I used Pharo 5, but you could add your case to the bug entry. This is still happening in P

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread p...@highoctane.be
Dimitris, Add some node project size with npm dependencies for some nice sizes too. There it is also in terms of the number of files... Phil Le 2 nov. 2016 12:17, "Esteban Lorenzano" a écrit : > > > On 2 Nov 2016, at 12:15, Esteban Lorenzano wrote: > > > > > >> On 2 Nov 2016, at 11:32, Dimitr

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Esteban Lorenzano
> On 2 Nov 2016, at 12:15, Esteban Lorenzano wrote: > > >> On 2 Nov 2016, at 11:32, Dimitris Chloupis wrote: >> >> Oups sorry you meant just Pharo, I have a clean build of Pharo 6 (latest VM- >> latest image) every day so its easy to check the total size of the folder. >> >> Its 47 MBs for

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Esteban Lorenzano
> On 2 Nov 2016, at 11:32, Dimitris Chloupis wrote: > > Oups sorry you meant just Pharo, I have a clean build of Pharo 6 (latest VM- > latest image) every day so its easy to check the total size of the folder. > > Its 47 MBs for the image , 43 MBs for the vm (including plugins) and the rest >

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Dimitris Chloupis
obviously not, added them as a reference for the comparison ;) On Wed, Nov 2, 2016 at 12:19 PM Denis Kudriashov wrote: > > 2016-11-02 11:04 GMT+01:00 Dimitris Chloupis : > > So No, the Pharo installation is not large its actually small . You think > I am joking ? Ok lets take a look at some of t

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Dimitris Chloupis
Oups sorry you meant just Pharo, I have a clean build of Pharo 6 (latest VM- latest image) every day so its easy to check the total size of the folder. Its 47 MBs for the image , 43 MBs for the vm (including plugins) and the rest is just 10 mbs of various things.

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Dimitris Chloupis
The numbers are widely available online , since most software comes with minimum system requirements. .NET was the only real challenge because Microsoft tries to mislead you into thinking its small by saying the installer is few MBs , BUT, the installer obviously is a web installer and it depends o

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Denis Kudriashov
2016-11-02 11:04 GMT+01:00 Dimitris Chloupis : > So No, the Pharo installation is not large its actually small . You think > I am joking ? Ok lets take a look at some of the most popular programming > languages out there > > 1) Pharo = 100 MBs > 2) Cuis = 70 MBs > some of the most popular program

Re: [Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Esteban Lorenzano
> On 2 Nov 2016, at 11:04, Dimitris Chloupis wrote: > > So No, the Pharo installation is not large its actually small . You think I > am joking ? Ok lets take a look at some of the most popular programming > languages out there > > 1) Pharo = 100 MBs where do you get this number? (not to say

[Pharo-users] No, the installation of Pharo is not large its actually small

2016-11-02 Thread Dimitris Chloupis
So No, the Pharo installation is not large its actually small . You think I am joking ? Ok lets take a look at some of the most popular programming languages out there 1) Pharo = 100 MBs 2) Cuis = 70 MBs 3) Python = 100MBs 4) Java = 120 MBbs 5) .NET = 240Mbs 6) Ruby , source code folder alone 92mb