What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Louis LaBrunda
Hi,

What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Lou
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Tobias Pape

On 11.01.2017, at 18:18, Louis LaBrunda <[hidden email]> wrote:

> Hi,
>
> What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

What do they do?

>
> Lou
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OT: email problems Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Tobias Pape
In reply to this post by Louis LaBrunda
(PS: hi Lou, this is what my server tells me when it rejects to send mail to you:

The server “mail.gmx.net” rejected the address “[hidden email]”.

The server response was: Requested action not taken: mailbox unavailable invalid DNS MX or A/AAAA resource record
)


On 11.01.2017, at 18:18, Louis LaBrunda <[hidden email]> wrote:

> Hi,
>
> What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
>
> Lou
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Louis LaBrunda
In reply to this post by Tobias Pape
Hi Tobias,

>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
>What do they do?

ObjectDumper serializes objects and ObjectLoader deserializes the resultant string.  They work
with in memory stream or disk files.  I think things like Fuel, Ma Serializer and SIXX would be
based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.

I only need a very lite version so I don't think I need those full packages (again I'm not
sure).

Lou
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OT: email problems Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Louis LaBrunda
In reply to this post by Tobias Pape
Hi Tobias

>(PS: hi Lou, this is what my server tells me when it rejects to send mail to you:
>
>The server “mail.gmx.net” rejected the address “[hidden email]”.
>
>The server response was: Requested action not taken: mailbox unavailable invalid DNS MX or A/AAAA resource record
>)

That's odd!  I just tried a test and sent myself an email and it worked just fine.  So, I don't
get what the problem is.

Anyway, posting through the news group seems to work okay.

Lou
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Herbert König
In reply to this post by Louis LaBrunda
Hi,

formerly I used ReferenceStream, SmartReferenceStream. Format is binary
and not necessary compatible over image versions.

readTrainingsSamples
     "read the class var TrainingsSamples from a file using
ReferenceStreams "
     | rr |
     rr := ReferenceStream fileNamed: 'trainingssamples.obj'.
     TrainingsSamplesFehlerkategorien  trainingsSamples:  rr next.
     rr close.
     rr := nil

writeTrainingsSamples
     "write the class var TrainingsSamples to a file using ReferenceStreams"

     | rr |
     rr := ReferenceStream fileNamed: 'trainingssamples.obj'.
     rr nextPut: TrainingsSamplesFehlerkategorien  trainingsSamples .
     rr close.
     rr := nil


Nowadays I use JSON for this.


Cheers,


Herbert


Am 11.01.2017 um 20:14 schrieb Louis LaBrunda:

> Hi Tobias,
>
>>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
>> What do they do?
> ObjectDumper serializes objects and ObjectLoader deserializes the resultant string.  They work
> with in memory stream or disk files.  I think things like Fuel, Ma Serializer and SIXX would be
> based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.
>
> I only need a very lite version so I don't think I need those full packages (again I'm not
> sure).
>
> Lou


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Tobias Pape
In reply to this post by Louis LaBrunda
Hi Lou
On 11.01.2017, at 20:14, Louis LaBrunda <[hidden email]> wrote:

> Hi Tobias,
>
>>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
>> What do they do?
>
> ObjectDumper serializes objects and ObjectLoader deserializes the resultant string.  They work
> with in memory stream or disk files.  I think things like Fuel, Ma Serializer and SIXX would be
> based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.
>
> I only need a very lite version so I don't think I need those full packages (again I'm not
> sure).
>

While DataStream/SmartRefStream are the traditional Squeak way of serializing objects, I'd go with Fuel.

There is no "abstract" object serializer in Squeak.

Best regards
        -Tobias


> Lou
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Edgar De Cleene
In reply to this post by Louis LaBrunda
Lou
I attach here some methods I using from a long time and let exchange serialized objects between Squeak, Cuts and Pharo (until 2.0 as they remove RefereneStream)

You could do wonderful tricks
X saveOnFileNamed: fileName export X  as fileName.obj
Drag and drop this in any .image which have this .cs and and Inspector rise letting you play with it.
Example.
I have a Squeak derived thing running www.squeakros.org on a Power Mac G4of 1989
uer: visita
pass: (let this in blank)

inside i convert all swiki page to .obj 
DivagacionesIndex is the class which lets me find , delete, rename the “pages”
Today DivagacionesIndex have 5786 pages as I use the system also

export
"DivagacionesIndex export"
self compact.
self default saveOnFileNamed: 'DivagacionesIndex' , DateAndTime now asUnixTime asString

import: aDictionary 
"DivagacionesIndex import: self"
Default := aDictionary
I have a running in the alpha based in a fork of Cuis 3.2 reduced and is easy export from Squeak to Cuis if i need.
Also for the users of system
DivagacionesUsers getDataBase explore gives 202 OrderedCollections with user name, email, password

As you see is a real use case.
Maybe Herbert have a complex use of JSON , which I also have nice examples to share with all

Feel free to send direct mail if you wish or I could chat on Skype,IRC,Facebook,Slack 
Cheers 
Edgar
@morplenauta

On Jan 11, 2017, at 16:14, Louis LaBrunda <[hidden email]> wrote:

Hi Tobias,

What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
What do they do?

ObjectDumper serializes objects and ObjectLoader deserializes the resultant string.  They work
with in memory stream or disk files.  I think things like Fuel, Ma Serializer and SIXX would be
based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.

I only need a very lite version so I don't think I need those full packages (again I'm not
sure).

Lou
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe <a href="callto://PhotonDemon" class="">callto://PhotonDemon






ObjectEnh.1.cs (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Hannes Hirzel
binary object serializer

An object serializer takes an object graph as input and
answers a binary array.

    http://wiki.squeak.org/squeak/6451

What is good with the Ma Serializer

     http://wiki.squeak.org/squeak/6452

that it works with different Squeak versions. Fuel is tied to
particular Squeak versions. That means the Fuel object you get from
Squeak 4.6. is not guaranteed to load in 5.1. For Ma Serializer this
is the case.





On 1/12/17, Edgar De Cleene <[hidden email]> wrote:

> Lou
> I attach here some methods I using from a long time and let exchange
> serialized objects between Squeak, Cuts and Pharo (until 2.0 as they remove
> RefereneStream)
>
> You could do wonderful tricks
> X saveOnFileNamed: fileName export X  as fileName.obj
> Drag and drop this in any .image which have this .cs and and Inspector rise
> letting you play with it.
> Example.
> I have a Squeak derived thing running www.squeakros.org
> <http://www.squeakros.org/> on a Power Mac G4of 1989
> uer: visita
> pass: (let this in blank)
>
> inside i convert all swiki page to .obj
> DivagacionesIndex is the class which lets me find , delete, rename the
> “pages”
> Today DivagacionesIndex have 5786 pages as I use the system also
>
> export
> "DivagacionesIndex export"
> self compact.
> self default saveOnFileNamed: 'DivagacionesIndex' , DateAndTime now
> asUnixTime asString
>
> import: aDictionary
> "DivagacionesIndex import: self"
> Default := aDictionary
> I have a running in the alpha based in a fork of Cuis 3.2 reduced and is
> easy export from Squeak to Cuis if i need.
> Also for the users of system
> DivagacionesUsers getDataBase explore gives 202 OrderedCollections with user
> name, email, password
>
> As you see is a real use case.
> Maybe Herbert have a complex use of JSON , which I also have nice examples
> to share with all
>
> Feel free to send direct mail if you wish or I could chat on
> Skype,IRC,Facebook,Slack
> Cheers
> Edgar
> @morplenauta
>
>> On Jan 11, 2017, at 16:14, Louis LaBrunda <[hidden email]>
>> wrote:
>>
>> Hi Tobias,
>>
>>>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and
>>>> ObjectDumper?
>>> What do they do?
>>
>> ObjectDumper serializes objects and ObjectLoader deserializes the
>> resultant string.  They work
>> with in memory stream or disk files.  I think things like Fuel, Ma
>> Serializer and SIXX would be
>> based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.
>>
>> I only need a very lite version so I don't think I need those full
>> packages (again I'm not
>> sure).
>>
>> Lou
>> --
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
>>
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Louis LaBrunda
Hi Guys,

Thanks for the help.  I went with Ma Serializer.  It looks like way more than I need but it was
easy to load and it works.

Lou

On Thu, 12 Jan 2017 16:01:29 +0100, "H. Hirzel" <[hidden email]> wrote:

>binary object serializer
>
>An object serializer takes an object graph as input and
>answers a binary array.
>
>    http://wiki.squeak.org/squeak/6451
>
>What is good with the Ma Serializer
>
>     http://wiki.squeak.org/squeak/6452
>
>that it works with different Squeak versions. Fuel is tied to
>particular Squeak versions. That means the Fuel object you get from
>Squeak 4.6. is not guaranteed to load in 5.1. For Ma Serializer this
>is the case.
>
>
>
>
>
>On 1/12/17, Edgar De Cleene <[hidden email]> wrote:
>> Lou
>> I attach here some methods I using from a long time and let exchange
>> serialized objects between Squeak, Cuts and Pharo (until 2.0 as they remove
>> RefereneStream)
>>
>> You could do wonderful tricks
>> X saveOnFileNamed: fileName export X  as fileName.obj
>> Drag and drop this in any .image which have this .cs and and Inspector rise
>> letting you play with it.
>> Example.
>> I have a Squeak derived thing running www.squeakros.org
>> <http://www.squeakros.org/> on a Power Mac G4of 1989
>> uer: visita
>> pass: (let this in blank)
>>
>> inside i convert all swiki page to .obj
>> DivagacionesIndex is the class which lets me find , delete, rename the
>> “pages”
>> Today DivagacionesIndex have 5786 pages as I use the system also
>>
>> export
>> "DivagacionesIndex export"
>> self compact.
>> self default saveOnFileNamed: 'DivagacionesIndex' , DateAndTime now
>> asUnixTime asString
>>
>> import: aDictionary
>> "DivagacionesIndex import: self"
>> Default := aDictionary
>> I have a running in the alpha based in a fork of Cuis 3.2 reduced and is
>> easy export from Squeak to Cuis if i need.
>> Also for the users of system
>> DivagacionesUsers getDataBase explore gives 202 OrderedCollections with user
>> name, email, password
>>
>> As you see is a real use case.
>> Maybe Herbert have a complex use of JSON , which I also have nice examples
>> to share with all
>>
>> Feel free to send direct mail if you wish or I could chat on
>> Skype,IRC,Facebook,Slack
>> Cheers
>> Edgar
>> @morplenauta
>>
>>> On Jan 11, 2017, at 16:14, Louis LaBrunda <[hidden email]>
>>> wrote:
>>>
>>> Hi Tobias,
>>>
>>>>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and
>>>>> ObjectDumper?
>>>> What do they do?
>>>
>>> ObjectDumper serializes objects and ObjectLoader deserializes the
>>> resultant string.  They work
>>> with in memory stream or disk files.  I think things like Fuel, Ma
>>> Serializer and SIXX would be
>>> based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.
>>>
>>> I only need a very lite version so I don't think I need those full
>>> packages (again I'm not
>>> sure).
>>>
>>> Lou
>>> --
>>> Louis LaBrunda
>>> Keystone Software Corp.
>>> SkypeMe callto://PhotonDemon
>>>
>>>
>>
>
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?

Hannes Hirzel
Yes, Ma Serializer is easy to load through the SqueakMap catalog.

File out example:

MaObjectSerializer new
         fileOut: MyBigDataDictionaryObject
         toFileNamed: ('../../2017-01-18_DDic10.ma')
         in: FileDirectory default

File in example:

MyBigDataDictionaryObject := MaObjectSerializer fileIn:
('../../2017-01-18_DDic10.ma').


Chris Muller wrote that he used Ma Serializer get the  SSRepository
object (the root object of http://source.squeak.org) out of the 3.11
image it was running in 2016  into a 5.1 image.

--Hannes

On 1/13/17, Louis LaBrunda <[hidden email]> wrote:

> Hi Guys,
>
> Thanks for the help.  I went with Ma Serializer.  It looks like way more
> than I need but it was
> easy to load and it works.
>
> Lou
>
> On Thu, 12 Jan 2017 16:01:29 +0100, "H. Hirzel" <[hidden email]>
> wrote:
>
>>binary object serializer
>>
>>An object serializer takes an object graph as input and
>>answers a binary array.
>>
>>    http://wiki.squeak.org/squeak/6451
>>
>>What is good with the Ma Serializer
>>
>>     http://wiki.squeak.org/squeak/6452
>>
>>that it works with different Squeak versions. Fuel is tied to
>>particular Squeak versions. That means the Fuel object you get from
>>Squeak 4.6. is not guaranteed to load in 5.1. For Ma Serializer this
>>is the case.
>>
>>
>>
>>
>>
>>On 1/12/17, Edgar De Cleene <[hidden email]> wrote:
>>> Lou
>>> I attach here some methods I using from a long time and let exchange
>>> serialized objects between Squeak, Cuts and Pharo (until 2.0 as they
>>> remove
>>> RefereneStream)
>>>
>>> You could do wonderful tricks
>>> X saveOnFileNamed: fileName export X  as fileName.obj
>>> Drag and drop this in any .image which have this .cs and and Inspector
>>> rise
>>> letting you play with it.
>>> Example.
>>> I have a Squeak derived thing running www.squeakros.org
>>> <http://www.squeakros.org/> on a Power Mac G4of 1989
>>> uer: visita
>>> pass: (let this in blank)
>>>
>>> inside i convert all swiki page to .obj
>>> DivagacionesIndex is the class which lets me find , delete, rename the
>>> “pages”
>>> Today DivagacionesIndex have 5786 pages as I use the system also
>>>
>>> export
>>> "DivagacionesIndex export"
>>> self compact.
>>> self default saveOnFileNamed: 'DivagacionesIndex' , DateAndTime now
>>> asUnixTime asString
>>>
>>> import: aDictionary
>>> "DivagacionesIndex import: self"
>>> Default := aDictionary
>>> I have a running in the alpha based in a fork of Cuis 3.2 reduced and is
>>> easy export from Squeak to Cuis if i need.
>>> Also for the users of system
>>> DivagacionesUsers getDataBase explore gives 202 OrderedCollections with
>>> user
>>> name, email, password
>>>
>>> As you see is a real use case.
>>> Maybe Herbert have a complex use of JSON , which I also have nice
>>> examples
>>> to share with all
>>>
>>> Feel free to send direct mail if you wish or I could chat on
>>> Skype,IRC,Facebook,Slack
>>> Cheers
>>> Edgar
>>> @morplenauta
>>>
>>>> On Jan 11, 2017, at 16:14, Louis LaBrunda <[hidden email]>
>>>> wrote:
>>>>
>>>> Hi Tobias,
>>>>
>>>>>> What is the squeak equivalent of VA Smalltalk's ObjectLoader and
>>>>>> ObjectDumper?
>>>>> What do they do?
>>>>
>>>> ObjectDumper serializes objects and ObjectLoader deserializes the
>>>> resultant string.  They work
>>>> with in memory stream or disk files.  I think things like Fuel, Ma
>>>> Serializer and SIXX would be
>>>> based on classes like ObjectLoader and ObjectDumper.  But I'm not sure.
>>>>
>>>> I only need a very lite version so I don't think I need those full
>>>> packages (again I'm not
>>>> sure).
>>>>
>>>> Lou
>>>> --
>>>> Louis LaBrunda
>>>> Keystone Software Corp.
>>>> SkypeMe callto://PhotonDemon
>>>>
>>>>
>>>
>>
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>
>

Loading...