Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 3 participants
- 144622 messages
Re: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
by Dale Henrichs
replies embedded ...
----- Original Message -----
| From: "Francois Stephany" <tulipe.moutarde(a)gmail.com>
| To: pharo-project(a)lists.gforge.inria.fr
| Sent: Tuesday, April 24, 2012 4:35:19 PM
| Subject: Re: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
|
| Hi Dale,
|
| > If your project depends upon particular features or APIs in a
| > project like Zinc or Seaside or FS, then you will be interested in
| > referencing that particular version in your specification.
|
| Yep but what if I don't need to declare Zinc in the #stable version
| of
| my package for pharo 1.4 but I do need it for Pharo 1.3.
So you are implying that you only have dependency on Zinc for the Pharo1.3 version of your project. Then you do something like the following in your baseline:
spec for: #'pharo' do: [
spec package: 'that depends upon zinc' with: [
"the common required packages for your package"
].
].
spec for: #'pharo1.3.x' do: [
spec project: 'Zinc' with: [
spec
className: 'ConfigurationOfZinc';
versionString: #'stable';
repository: 'http://www.squeaksource.com/MetacelloRepository' ].
spec package: 'that depends upon zinc' with: [
spec requires: #('Zinc') ].
].
If you use the #stable version in your baseline there is no need to anything special in your version spec.
|
| > On the other hand, if your project uses the standard API and has no
| > special dependencies upon details of the project, then you should
| > reference the #stable version from your configuration ... using
| > #stable means that you don't have to fiddle with your
| > configuration every time a new version is released and using
| > #stable means that your configuration will work with multiple
| > platform versions.
|
| Mmm. I still reluctant to specify a dependency against #stable.
| A package that makes a bump in its version number because of changing
| API will load the wrong version.
If they update the #stable version at the same time then that is what you want ... To be fair, I will be changing the "automatic upgrade" behavior when I come out with the next release of Metacello ... it will include a Metacello scripting API and you will have more control over how Metacello will treat already loaded projects ... basically you will have to explicitly upgrade a project ...
|
| > Once you have verified that your project is working on pharo1.4,
| > then you should publish a #stable version for #pharo1.4, so that
| > users of your project will know that they can safely move to pharo
| > 1.4 ...
|
| Right. That works fine if I use the #stable symbolic version to
| declare
| the dependency.
|
| Francois
|
| >
| > ----- Original Message -----
| > | From: "Francois Stephany"<tulipe.moutarde(a)gmail.com>
| > | To: pharo-project(a)lists.gforge.inria.fr
| > | Sent: Tuesday, April 24, 2012 3:06:03 PM
| > | Subject: [Pharo-project] How to declare Zinc/FS dependency in
| > | Metacello Configuration for 1.4
| > |
| > | I'm updating some Metacello configurations and I'm wondering how
| > | to
| > | declare the dependencies on stuff that have been integrated into
| > | Pharo
| > | 1.4 (e.g., Zinc, FS).
| > |
| > | Should I declare those dependencies into my configuration? If
| > | yes,
| > | against with version?
| > |
| > | My gut feeling is that I should create a new baseline that does
| > | not
| > | require any Zinc of FS.
| > | That becomes a pain in the ass when developing in parallel for
| > | 1.3
| > | and
| > | 1.4. Is the only place where I can differentiate 1.3 and 1.4 is
| > | in
| > | the
| > | stable symbolic version, right?
| > |
| > | What are people generally doing?
| > |
| > |
| > | Cheers,
| > | Francois
| > |
| > |
| >
|
| --
| http://tulipemoutarde.be
| CA: +1 778 558 3225
| BE: +32 65 709 131
|
|
April 24, 2012
Re: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
by Francois Stephany
Hi Dale,
> If your project depends upon particular features or APIs in a project like Zinc or Seaside or FS, then you will be interested in referencing that particular version in your specification.
Yep but what if I don't need to declare Zinc in the #stable version of
my package for pharo 1.4 but I do need it for Pharo 1.3.
> On the other hand, if your project uses the standard API and has no special dependencies upon details of the project, then you should reference the #stable version from your configuration ... using #stable means that you don't have to fiddle with your configuration every time a new version is released and using #stable means that your configuration will work with multiple platform versions.
Mmm. I still reluctant to specify a dependency against #stable.
A package that makes a bump in its version number because of changing
API will load the wrong version.
> Once you have verified that your project is working on pharo1.4, then you should publish a #stable version for #pharo1.4, so that users of your project will know that they can safely move to pharo 1.4 ...
Right. That works fine if I use the #stable symbolic version to declare
the dependency.
Francois
>
> ----- Original Message -----
> | From: "Francois Stephany"<tulipe.moutarde(a)gmail.com>
> | To: pharo-project(a)lists.gforge.inria.fr
> | Sent: Tuesday, April 24, 2012 3:06:03 PM
> | Subject: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
> |
> | I'm updating some Metacello configurations and I'm wondering how to
> | declare the dependencies on stuff that have been integrated into
> | Pharo
> | 1.4 (e.g., Zinc, FS).
> |
> | Should I declare those dependencies into my configuration? If yes,
> | against with version?
> |
> | My gut feeling is that I should create a new baseline that does not
> | require any Zinc of FS.
> | That becomes a pain in the ass when developing in parallel for 1.3
> | and
> | 1.4. Is the only place where I can differentiate 1.3 and 1.4 is in
> | the
> | stable symbolic version, right?
> |
> | What are people generally doing?
> |
> |
> | Cheers,
> | Francois
> |
> |
>
--
http://tulipemoutarde.be
CA: +1 778 558 3225
BE: +32 65 709 131
April 24, 2012
Re: [Pharo-project] STON (was Re: SimpleLiteralArray Spec)
by H. Hirzel
Göran
Thank you for this illustration.
http://goran.krampe.se/blog/Squeak/Tirade.rdoc
I understand that
1) the Tirade parser parses a subset of regular Smalltalk messages.
2) the receiver is not given as it is assumed to be always the Tirade
parser object.
3) the Tirade parser acts like a builder for objects?
4) It solves problems JSON and STON do not.
I think this idea is very worth to pursue.
--Hannes
On 4/25/12, Göran Krampe <goran(a)krampe.se> wrote:
> On 04/24/2012 07:28 PM, Dale Henrichs wrote:
>> Sven,
>>
>> For tODE I am very interested having something with this kind of potential
>> ... shipping "real" ST objects back and forth between Amber and Pharo or
>> GemStone has some real appeal...
>>
>> So Goran, the STON format looks somewhat similar to Tirade ... what would
>> Tirade look like for the same data set?
>
> Hmmm, let's see.
>
>> | TestDomainObject {
>> | #created : DateAndTime [ '2012-02-14T16:40:15+01:00' ],
>> | #modified : DateAndTime [ '2012-02-14T16:40:18+01:00' ],
>> | #integer : 39581,
>> | #float : 73.84789359463944,
>> | #description : 'This is a test',
>> | #color : #green,
>> | #tags : [
>> | #two,
>> | #beta,
>> | #medium
>> | ],
>> | #bytes : ByteArray [ 'afabfdf61d030f43eb67960c0ae9f39f' ],
>> | #boolean : false
>> | }
>
> It is an interesting question since Tirade is not meant to be parsed by
> a generic parser like JSON or STON. Tirade is a series of Smalltalk
> messages (unary or keyword) with arguments limited to literals (although
> with some subtle additions to regular Smalltalk literals, like for
> example Associations).
>
> These messages give Tirade semantics and thus we do not normally add
> "types" to the Tirade input.
>
> So the above could be encoded as a single Tirade message like this:
>
> created: '2012-02-14T16:40:15+01:00'
> modified: '2012-02-14T16:40:18+01:00'
> integer: 39581
> float: 73.84789359463944
> description: 'This is a test'
> color: #green
> tags: #(two beta medium)
> bytes: 'afabfdf61d030f43eb67960c0ae9f39f'
> boolean: false.
>
> Note that the above syntactically is a regular Smalltalk keyword message
> with no receiver to the left and ended with a "." (mandatory in Tirade).
> Also, the tags could also be represented as {#two . #beta . #medium} but
> although the syntax is like dynamic arrays in Pharo that does not mean
> expressions are allowed in Tirade - only literals.
>
> Normally there would be a subclass of TiradeReader that implements the
> above message and then does the appropriate instantiations for #created,
> #modified and #bytes given the string input for those arguments. This
> method could look something like this (just pseudo code):
>
> created: created
> modified: modified
> integer: int
> float: float
> description: description
> color: color
> tags: tags
> bytes: bytes
> boolean: boolean
>
> result := TestDomainObject new
> created: (TimeStamp fromString: created);
> modified: (TimeStamp fromString: modified).
> result integer: int; float: float; description: description;
> color: color; tags: tags;
> bytes: bytes asByteArray; boolean: boolean
>
>
> If one instead uses a plain TiradeParser to parse the above it will of
> course not have an implementation of the above method and will instead
> by default produce an OrderedCollection of "messages" where each message
> is an Association with the keyword selector as key and an array of
> arguments as the value. So running TiradeParser>>parse: on the above
> input gives:
>
> an
> OrderedCollection(#created:modified:integer:float:description:color:tags:bytes:boolean:->#('2012-02-14T16:40:15+01:00'
> '2012-02-14T16:40:18+01:00' 39581 73.84789359463944 'This is a test'
> #green #(true #beta #medium) 'afabfdf61d030f43eb67960c0ae9f39f' false))
>
> Finally a totally different approach is to encode the above object as a
> nested array with Associations, thus mimicking JSON/STON and it could
> look like this:
>
> testdomainobject: {
> #created -> '2012-02-14T16:40:15+01:00'.
> #modified -> '2012-02-14T16:40:18+01:00'.
> #integer -> 39581.
> #float -> 73.84789359463944.
> #description -> 'This is a test'.
> #color -> #green.
> #tags -> #(two beta medium).
> #bytes -> 'afabfdf61d030f43eb67960c0ae9f39f'.
> #boolean -> false
> }.
>
> NOTE: The -> syntax is added to Tirade as a "literal syntax" although it
> is in fact a binary message in Pharo. This will create an Array with
> Associations in it.
>
> Again, if the reader implements the selector #testdomainobject: it will
> know what to do with the argument. Again, using only TiradeParser it
> would parse into:
>
> an OrderedCollection(#testdomainobject:->{((Array new: 9) at: 1 put:
> (#created->'2012-02-14T16:40:15+01:00'); at: 2 put:
> (#modified->'2012-02-14T16:40:18+01:00'); at: 3 put: (#integer->39581);
> at: 4 put: (#float->73.84789359463944); at: 5 put: (#description->'This
> is a test'); at: 6 put: (#color->#green); at: 7 put: (#tags->#(true
> #beta #medium )); at: 8 put:
> (#bytes->'afabfdf61d030f43eb67960c0ae9f39f'); at: 9 put:
> (#boolean->false); yourself)})
>
> Oh, funky. Obviously that is how print-it behaves on an Array of
> Assocations :)
>
> Hopefully this gives a better idea of how Tirade works. Again, the three
> articles on Tirade from my blog explains more details:
>
> http://goran.krampe.se/blog/Squeak/Tirade.rdoc
> http://goran.krampe.se/blog/Squeak/Tirade2.rdoc
> http://goran.krampe.se/blog/Squeak/Tirade3.rdoc
>
> NOTE: The part on "receiver juggling" was way crazy, forget that :)
>
> regards, Göran
>
>
April 24, 2012
Re: [Pharo-project] STON (was Re: SimpleLiteralArray Spec)
by Dale Henrichs
Okay, so Tirade isn't a generic parser for a well-defined syntax like STON and it looks like it really shines when it comes to doing dynamic interpretation of streams of messages .... now I better understand how Tirade can be applied to deltas or creating executable logs that can be replayed ...
At this point in time for disk-based structures that humans and computers are expected to understand it seems that a well-defined syntax is useful.
Dale
----- Original Message -----
| From: "Göran Krampe" <goran(a)krampe.se>
| To: pharo-project(a)lists.gforge.inria.fr
| Sent: Tuesday, April 24, 2012 3:56:36 PM
| Subject: Re: [Pharo-project] STON (was Re: SimpleLiteralArray Spec)
|
| On 04/24/2012 07:28 PM, Dale Henrichs wrote:
| > Sven,
| >
| > For tODE I am very interested having something with this kind of
| > potential ... shipping "real" ST objects back and forth between
| > Amber and Pharo or GemStone has some real appeal...
| >
| > So Goran, the STON format looks somewhat similar to Tirade ... what
| > would Tirade look like for the same data set?
|
| Hmmm, let's see.
|
| > | TestDomainObject {
| > | #created : DateAndTime [ '2012-02-14T16:40:15+01:00' ],
| > | #modified : DateAndTime [ '2012-02-14T16:40:18+01:00' ],
| > | #integer : 39581,
| > | #float : 73.84789359463944,
| > | #description : 'This is a test',
| > | #color : #green,
| > | #tags : [
| > | #two,
| > | #beta,
| > | #medium
| > | ],
| > | #bytes : ByteArray [ 'afabfdf61d030f43eb67960c0ae9f39f' ],
| > | #boolean : false
| > | }
|
| It is an interesting question since Tirade is not meant to be parsed
| by
| a generic parser like JSON or STON. Tirade is a series of Smalltalk
| messages (unary or keyword) with arguments limited to literals
| (although
| with some subtle additions to regular Smalltalk literals, like for
| example Associations).
|
| These messages give Tirade semantics and thus we do not normally add
| "types" to the Tirade input.
|
| So the above could be encoded as a single Tirade message like this:
|
| created: '2012-02-14T16:40:15+01:00'
| modified: '2012-02-14T16:40:18+01:00'
| integer: 39581
| float: 73.84789359463944
| description: 'This is a test'
| color: #green
| tags: #(two beta medium)
| bytes: 'afabfdf61d030f43eb67960c0ae9f39f'
| boolean: false.
|
| Note that the above syntactically is a regular Smalltalk keyword
| message
| with no receiver to the left and ended with a "." (mandatory in
| Tirade).
| Also, the tags could also be represented as {#two . #beta . #medium}
| but
| although the syntax is like dynamic arrays in Pharo that does not
| mean
| expressions are allowed in Tirade - only literals.
|
| Normally there would be a subclass of TiradeReader that implements
| the
| above message and then does the appropriate instantiations for
| #created,
| #modified and #bytes given the string input for those arguments. This
| method could look something like this (just pseudo code):
|
| created: created
| modified: modified
| integer: int
| float: float
| description: description
| color: color
| tags: tags
| bytes: bytes
| boolean: boolean
|
| result := TestDomainObject new
| created: (TimeStamp fromString: created);
| modified: (TimeStamp fromString: modified).
| result integer: int; float: float; description: description;
| color: color; tags: tags;
| bytes: bytes asByteArray; boolean: boolean
|
|
| If one instead uses a plain TiradeParser to parse the above it will
| of
| course not have an implementation of the above method and will
| instead
| by default produce an OrderedCollection of "messages" where each
| message
| is an Association with the keyword selector as key and an array of
| arguments as the value. So running TiradeParser>>parse: on the above
| input gives:
|
| an
| OrderedCollection(#created:modified:integer:float:description:color:tags:bytes:boolean:->#('2012-02-14T16:40:15+01:00'
| '2012-02-14T16:40:18+01:00' 39581 73.84789359463944 'This is a test'
| #green #(true #beta #medium) 'afabfdf61d030f43eb67960c0ae9f39f'
| false))
|
| Finally a totally different approach is to encode the above object as
| a
| nested array with Associations, thus mimicking JSON/STON and it could
| look like this:
|
| testdomainobject: {
| #created -> '2012-02-14T16:40:15+01:00'.
| #modified -> '2012-02-14T16:40:18+01:00'.
| #integer -> 39581.
| #float -> 73.84789359463944.
| #description -> 'This is a test'.
| #color -> #green.
| #tags -> #(two beta medium).
| #bytes -> 'afabfdf61d030f43eb67960c0ae9f39f'.
| #boolean -> false
| }.
|
| NOTE: The -> syntax is added to Tirade as a "literal syntax" although
| it
| is in fact a binary message in Pharo. This will create an Array with
| Associations in it.
|
| Again, if the reader implements the selector #testdomainobject: it
| will
| know what to do with the argument. Again, using only TiradeParser it
| would parse into:
|
| an OrderedCollection(#testdomainobject:->{((Array new: 9) at: 1 put:
| (#created->'2012-02-14T16:40:15+01:00'); at: 2 put:
| (#modified->'2012-02-14T16:40:18+01:00'); at: 3 put:
| (#integer->39581);
| at: 4 put: (#float->73.84789359463944); at: 5 put:
| (#description->'This
| is a test'); at: 6 put: (#color->#green); at: 7 put: (#tags->#(true
| #beta #medium )); at: 8 put:
| (#bytes->'afabfdf61d030f43eb67960c0ae9f39f'); at: 9 put:
| (#boolean->false); yourself)})
|
| Oh, funky. Obviously that is how print-it behaves on an Array of
| Assocations :)
|
| Hopefully this gives a better idea of how Tirade works. Again, the
| three
| articles on Tirade from my blog explains more details:
|
| http://goran.krampe.se/blog/Squeak/Tirade.rdoc
| http://goran.krampe.se/blog/Squeak/Tirade2.rdoc
| http://goran.krampe.se/blog/Squeak/Tirade3.rdoc
|
| NOTE: The part on "receiver juggling" was way crazy, forget that :)
|
| regards, Göran
|
|
April 24, 2012
Re: [Pharo-project] SimpleLiteralArray Spec
by Dale Henrichs
Stef,
I mentioned several weeks ago that the Cypress implementation takes advantage of the fact that the JSON parser produces dictionaries ... this is a bit of functionality that I called out as critical ... STON is the first Smalltalk-centric text format that I've seen that has a nice syntax for producing Dictionaries.
Of course, I think it is a bonus that you can use it to represent specific class instances as that can prove to be very useful.
Of course I am a Smalltalk programmer, so if you give me STON, instead of meticulously constructing a JSON structure that matches the fields of the classes (for each dialect) I think that we would be inclined to ask the class to create a STON representation and dump that to disk ...
So the immediate value of STON would be that we'd be sending messages to objects instead of translating formats .... the messages that we send will end up creating a nice human-readable format ... win-win.
Of course for multiple dialects we agreed that we would use the same set of field names for the class attributes so that a dialect could create the class using the fields that it recognized ... so that would imply some level of standardization of the STON field names to be used, but that shouldn't be too hard since there aren't that many fields to monkey with for classes ...
Dale
----- Original Message -----
| From: "Stéphane Ducasse" <stephane.ducasse(a)inria.fr>
| To: Pharo-project(a)lists.gforge.inria.fr
| Sent: Tuesday, April 24, 2012 3:36:47 PM
| Subject: Re: [Pharo-project] SimpleLiteralArray Spec
|
|
| On Apr 25, 2012, at 12:17 AM, Dale Henrichs wrote:
|
| > Stef,
| >
| > Which is more important:
| >
| > implementation or functionality?
|
| functionality: how to store meta data of class or method. So far I do
| not see why I need ston.
|
| Now if you tell me that you need a textual serializer then this is
| another story and scenario.
| But this is not the one we need to store meta data of class and
| method.
|
| I'm not that approximate to mix the two.
|
| Stef
| >
| > You appear to be fixated on a particular solution and seem to be
| > ignoring the actual problems.
| >
| > Dale
| >
| > ----- Original Message -----
| > | From: "Stéphane Ducasse" <stephane.ducasse(a)inria.fr>
| > | To: Pharo-project(a)lists.gforge.inria.fr
| > | Sent: Tuesday, April 24, 2012 3:13:20 PM
| > | Subject: Re: [Pharo-project] SimpleLiteralArray Spec
| > |
| > |
| > | On Apr 24, 2012, at 1:26 PM, Sven Van Caekenberghe wrote:
| > |
| > | > OK, just to get started, let try to write a spec for
| > | > SimpleLiteralArray, this is based on JSON (and my own STON, not
| > | > ready for public consumption). It will soon become clear that
| > | > this
| > | > is slightly harder than expected, IMO a writer is needed as
| > | > well.
| > | >
| > | > S y n t a x
| > | >
| > | > value
| > | > primitive-value
| > | > list
| > | > nil
| > | > primitive-value
| > | > number
| > | > true
| > | > false
| > | > symbol
| > | > string
| > | > classname
| > |
| > | In a literal array a class name is just a symbol
| > |
| > | #(Foo) first
| > | #Foo
| > |
| > | > list
| > | > #()
| > | > #( elements )
| > | > elements
| > | > value
| > | > value , elements
| > | > string
| > | > ''
| > | > ' chars '
| > | > chars
| > | > char
| > | > char chars
| > | > char
| > | > any-printable-ASCII-character-
| > | > except-"-or-\
| > | > \"
| > | > \\
| > | > \/
| > | > \b
| > | > \f
| > | > \n
| > | > \r
| > | > \t
| > | > \u four-hex-digits
| > |
| > | why do we need that?
| > |
| > | > symbol
| > | > # chars-limited
| > | > # ' chars '
| > | > chars-limited
| > | > char-limited
| > | > char-limited chars-limited
| > | > char-limited
| > | > a-z A-Z 0-9 - _ . /
| > | > classname
| > | > uppercase-alpha-char alphanumeric-char
| > |
| > | there is not need for classname as element
| > | classname is just a pair that the interpretation should handle if
| > | necessary
| > |
| > |
| > | > number
| > | > int
| > | > int frac
| > | > int exp
| > | > int frac exp
| > | > int
| > | > digit
| > | > digit1-9 digits
| > | > - digit
| > | > - digit1-9 digits
| > | > frac
| > | > . digits
| > | > exp
| > | > e digits
| > | > digits
| > | > digit
| > | > digit digits
| > | > e
| > | > e
| > | > e+
| > | > e-
| > | > E
| > | > E+
| > | > E-
| > | >
| > | >
| > | > Questions remain:
| > | >
| > | > - is the escaping OK ?
| > |
| > | I do not know but in literal array there is no escaping. Now if
| > | you
| > | want to put a cr into a string you probably need that
| > |
| > | > - what about symbols without a leading # ?
| > |
| > | #(foo) -> #(#foo)
| > | #(true nil false 1 'n') -> #(true nil false 1 'n')
| > |
| > | > - what should be allowed in unquoted symbols ?
| > | I did not get the question
| > |
| > | > - what should be allowed for classnames ?
| > | Nothing
| > |
| > | > - what about namespaces ?
| > | Nothing no need I do not think that they are in literal arrays.
| > | (may
| > | be in VW but I did not check)
| > |
| > | > - do we allow infinite precision integers ?
| > | Yes
| > |
| > | > - maybe the toplevel should always be an array ?
| > |
| > | I would say so else this is not a literalArray but a literal.
| > |
| > |
| > | >
| > | >
| > | > Now: shoot!
| > | >
| > | >
| > | > Sven
| > | >
| > | >
| > | > --
| > | > Sven Van Caekenberghe
| > | > http://stfx.eu
| > | > Smalltalk is the Red Pill
| > | >
| > | >
| > | >
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|
April 24, 2012
Re: [Pharo-project] STON (was Re: SimpleLiteralArray Spec)
by Göran Krampe
On 04/24/2012 07:28 PM, Dale Henrichs wrote:
> Sven,
>
> For tODE I am very interested having something with this kind of potential ... shipping "real" ST objects back and forth between Amber and Pharo or GemStone has some real appeal...
>
> So Goran, the STON format looks somewhat similar to Tirade ... what would Tirade look like for the same data set?
Hmmm, let's see.
> | TestDomainObject {
> | #created : DateAndTime [ '2012-02-14T16:40:15+01:00' ],
> | #modified : DateAndTime [ '2012-02-14T16:40:18+01:00' ],
> | #integer : 39581,
> | #float : 73.84789359463944,
> | #description : 'This is a test',
> | #color : #green,
> | #tags : [
> | #two,
> | #beta,
> | #medium
> | ],
> | #bytes : ByteArray [ 'afabfdf61d030f43eb67960c0ae9f39f' ],
> | #boolean : false
> | }
It is an interesting question since Tirade is not meant to be parsed by
a generic parser like JSON or STON. Tirade is a series of Smalltalk
messages (unary or keyword) with arguments limited to literals (although
with some subtle additions to regular Smalltalk literals, like for
example Associations).
These messages give Tirade semantics and thus we do not normally add
"types" to the Tirade input.
So the above could be encoded as a single Tirade message like this:
created: '2012-02-14T16:40:15+01:00'
modified: '2012-02-14T16:40:18+01:00'
integer: 39581
float: 73.84789359463944
description: 'This is a test'
color: #green
tags: #(two beta medium)
bytes: 'afabfdf61d030f43eb67960c0ae9f39f'
boolean: false.
Note that the above syntactically is a regular Smalltalk keyword message
with no receiver to the left and ended with a "." (mandatory in Tirade).
Also, the tags could also be represented as {#two . #beta . #medium} but
although the syntax is like dynamic arrays in Pharo that does not mean
expressions are allowed in Tirade - only literals.
Normally there would be a subclass of TiradeReader that implements the
above message and then does the appropriate instantiations for #created,
#modified and #bytes given the string input for those arguments. This
method could look something like this (just pseudo code):
created: created
modified: modified
integer: int
float: float
description: description
color: color
tags: tags
bytes: bytes
boolean: boolean
result := TestDomainObject new
created: (TimeStamp fromString: created);
modified: (TimeStamp fromString: modified).
result integer: int; float: float; description: description;
color: color; tags: tags;
bytes: bytes asByteArray; boolean: boolean
If one instead uses a plain TiradeParser to parse the above it will of
course not have an implementation of the above method and will instead
by default produce an OrderedCollection of "messages" where each message
is an Association with the keyword selector as key and an array of
arguments as the value. So running TiradeParser>>parse: on the above
input gives:
an
OrderedCollection(#created:modified:integer:float:description:color:tags:bytes:boolean:->#('2012-02-14T16:40:15+01:00'
'2012-02-14T16:40:18+01:00' 39581 73.84789359463944 'This is a test'
#green #(true #beta #medium) 'afabfdf61d030f43eb67960c0ae9f39f' false))
Finally a totally different approach is to encode the above object as a
nested array with Associations, thus mimicking JSON/STON and it could
look like this:
testdomainobject: {
#created -> '2012-02-14T16:40:15+01:00'.
#modified -> '2012-02-14T16:40:18+01:00'.
#integer -> 39581.
#float -> 73.84789359463944.
#description -> 'This is a test'.
#color -> #green.
#tags -> #(two beta medium).
#bytes -> 'afabfdf61d030f43eb67960c0ae9f39f'.
#boolean -> false
}.
NOTE: The -> syntax is added to Tirade as a "literal syntax" although it
is in fact a binary message in Pharo. This will create an Array with
Associations in it.
Again, if the reader implements the selector #testdomainobject: it will
know what to do with the argument. Again, using only TiradeParser it
would parse into:
an OrderedCollection(#testdomainobject:->{((Array new: 9) at: 1 put:
(#created->'2012-02-14T16:40:15+01:00'); at: 2 put:
(#modified->'2012-02-14T16:40:18+01:00'); at: 3 put: (#integer->39581);
at: 4 put: (#float->73.84789359463944); at: 5 put: (#description->'This
is a test'); at: 6 put: (#color->#green); at: 7 put: (#tags->#(true
#beta #medium )); at: 8 put:
(#bytes->'afabfdf61d030f43eb67960c0ae9f39f'); at: 9 put:
(#boolean->false); yourself)})
Oh, funky. Obviously that is how print-it behaves on an Array of
Assocations :)
Hopefully this gives a better idea of how Tirade works. Again, the three
articles on Tirade from my blog explains more details:
http://goran.krampe.se/blog/Squeak/Tirade.rdoc
http://goran.krampe.se/blog/Squeak/Tirade2.rdoc
http://goran.krampe.se/blog/Squeak/Tirade3.rdoc
NOTE: The part on "receiver juggling" was way crazy, forget that :)
regards, Göran
April 24, 2012
Re: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
by Dale Henrichs
Francois,
The #stable symbolic version is the key when dealing with a new platform version like pharo 1.4 ...
if a configuration does not have a #stable version for #pharo1.4 then it is not likely that the configuration has been tested on pharo1.4 ...
If it does have a #stable version then it is likely to have been tested.
At this point you have a decision to make ...
If your project depends upon particular features or APIs in a project like Zinc or Seaside or FS, then you will be interested in referencing that particular version in your specification. Nonetheless if there is no #stable version specified for the project, then you can't be sure that the project has been ported.
On the other hand, if your project uses the standard API and has no special dependencies upon details of the project, then you should reference the #stable version from your configuration ... using #stable means that you don't have to fiddle with your configuration every time a new version is released and using #stable means that your configuration will work with multiple platform versions.
Once you have verified that your project is working on pharo1.4, then you should publish a #stable version for #pharo1.4, so that users of your project will know that they can safely move to pharo 1.4 ...
Dale
----- Original Message -----
| From: "Francois Stephany" <tulipe.moutarde(a)gmail.com>
| To: pharo-project(a)lists.gforge.inria.fr
| Sent: Tuesday, April 24, 2012 3:06:03 PM
| Subject: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
|
| I'm updating some Metacello configurations and I'm wondering how to
| declare the dependencies on stuff that have been integrated into
| Pharo
| 1.4 (e.g., Zinc, FS).
|
| Should I declare those dependencies into my configuration? If yes,
| against with version?
|
| My gut feeling is that I should create a new baseline that does not
| require any Zinc of FS.
| That becomes a pain in the ass when developing in parallel for 1.3
| and
| 1.4. Is the only place where I can differentiate 1.3 and 1.4 is in
| the
| stable symbolic version, right?
|
| What are people generally doing?
|
|
| Cheers,
| Francois
|
|
April 24, 2012
Re: [Pharo-project] JSON, Smalltalk parser and no-point wars
by Camillo Bruni
bikeshed....
let's wait and see how the first implementation will run and behave in a working system
honestly there are more pressing issues than the format of some meta-data...
On 2012-04-25, at 00:22, Dale Henrichs wrote:
> Stef,
>
> The smalltalk tools have no more business poking around in the "internals" of the disk-based package format than they do unzipping and rummaging around inside a .mcz file. Once the package is in the image you are working with Cypress or FileTree definitions that look an awful lot like Monticello definitions ... you'll be hard-pressed to find any json in those classes ... you will find some Dictionaries ... and those are the classes that the smalltalk tools should be using ...
>
> As I have said (something like a 100 times so far) the Cypress format will be changing over time so it will be a major mistake for any image-based tools to be monkeying with the internals of the disk-based package format ...
>
> Dale
>
> ----- Original Message -----
> | From: "Stéphane Ducasse" <stephane.ducasse(a)inria.fr>
> | To: Pharo-project(a)lists.gforge.inria.fr
> | Sent: Tuesday, April 24, 2012 3:03:05 PM
> | Subject: Re: [Pharo-project] JSON, Smalltalk parser and no-point wars
> |
> |
> | On Apr 24, 2012, at 5:34 PM, Miguel Cobá wrote:
> |
> | > Friends,
> | >
> | > what energy! But I don't know why are we discussing this point of
> | > JSON
> | > choice so long.
> | > It is an implementation detail.
> | > If he choose to use XML, so be. It is Dale's time and Dale's code.
> | > Remember his projects is not to build a inter-dialect metadata
> | > format.
> | > His project is all about building an inter-dialect package format
> | > to
> | > store smalltalk. And in that goal he is succeeding! Lets no make a
> | > flame
> | > war about his choices.
> | > What is matters now is to show to as many smalltalk dialects as
> | > possible, that code interchange is possible. That is the fucking
> | > point.
> |
> | No!
> | Because really fast we will have a lot of Smalltalk code on github
> | and we will have
> | to have JSON parser to build tools. While we can simply use our
> | parser. So I'm writing a parser
> | not for us but for gemstone basically right now.
> |
> | > If after that, because the implementation is slow, or some other
> | > real
> | > after-use problem is detected, then is the time to discuss how to
> | > better
> | > address that specific problem. Until then, this is a bikeshedding
> | > like
> | > inane problem.
> | >
> | > Remember make it work, make it right, make it fast!
> |
> | Yes but in that case using the gemstone parser should have worked
> | too.
> | I thought that making it secure was after make it work.
> |
> |
> | > Dale is in make it work.
> | > Every other not putting code on the project is trying to make it
> | > right
> | > (intelectually and upfront).
> | >
> | > Lets not stop the work of others by discussing the best way to do
> | > it
> | > instead of doing it. Some famous people around here made an analogy
> | > about a mountain and the people trying to climb it. Don't forget
> | > that!
> |
> | Do you think that we forget when we are daily improving our system?
> |
> |
> | >
> | > Cheer to all.
> | > --
> | > Miguel Cobá
> | > http://twitter.com/MiguelCobaMtz
> | > http://miguel.leugim.com.mx
> | >
> | >
> | >
> | >
> |
> |
> |
>
April 24, 2012
Re: [Pharo-project] SimpleLiteralArray Spec
by Stéphane Ducasse
On Apr 25, 2012, at 12:17 AM, Dale Henrichs wrote:
> Stef,
>
> Which is more important:
>
> implementation or functionality?
functionality: how to store meta data of class or method. So far I do not see why I need ston.
Now if you tell me that you need a textual serializer then this is another story and scenario.
But this is not the one we need to store meta data of class and method.
I'm not that approximate to mix the two.
Stef
>
> You appear to be fixated on a particular solution and seem to be ignoring the actual problems.
>
> Dale
>
> ----- Original Message -----
> | From: "Stéphane Ducasse" <stephane.ducasse(a)inria.fr>
> | To: Pharo-project(a)lists.gforge.inria.fr
> | Sent: Tuesday, April 24, 2012 3:13:20 PM
> | Subject: Re: [Pharo-project] SimpleLiteralArray Spec
> |
> |
> | On Apr 24, 2012, at 1:26 PM, Sven Van Caekenberghe wrote:
> |
> | > OK, just to get started, let try to write a spec for
> | > SimpleLiteralArray, this is based on JSON (and my own STON, not
> | > ready for public consumption). It will soon become clear that this
> | > is slightly harder than expected, IMO a writer is needed as well.
> | >
> | > S y n t a x
> | >
> | > value
> | > primitive-value
> | > list
> | > nil
> | > primitive-value
> | > number
> | > true
> | > false
> | > symbol
> | > string
> | > classname
> |
> | In a literal array a class name is just a symbol
> |
> | #(Foo) first
> | #Foo
> |
> | > list
> | > #()
> | > #( elements )
> | > elements
> | > value
> | > value , elements
> | > string
> | > ''
> | > ' chars '
> | > chars
> | > char
> | > char chars
> | > char
> | > any-printable-ASCII-character-
> | > except-"-or-\
> | > \"
> | > \\
> | > \/
> | > \b
> | > \f
> | > \n
> | > \r
> | > \t
> | > \u four-hex-digits
> |
> | why do we need that?
> |
> | > symbol
> | > # chars-limited
> | > # ' chars '
> | > chars-limited
> | > char-limited
> | > char-limited chars-limited
> | > char-limited
> | > a-z A-Z 0-9 - _ . /
> | > classname
> | > uppercase-alpha-char alphanumeric-char
> |
> | there is not need for classname as element
> | classname is just a pair that the interpretation should handle if
> | necessary
> |
> |
> | > number
> | > int
> | > int frac
> | > int exp
> | > int frac exp
> | > int
> | > digit
> | > digit1-9 digits
> | > - digit
> | > - digit1-9 digits
> | > frac
> | > . digits
> | > exp
> | > e digits
> | > digits
> | > digit
> | > digit digits
> | > e
> | > e
> | > e+
> | > e-
> | > E
> | > E+
> | > E-
> | >
> | >
> | > Questions remain:
> | >
> | > - is the escaping OK ?
> |
> | I do not know but in literal array there is no escaping. Now if you
> | want to put a cr into a string you probably need that
> |
> | > - what about symbols without a leading # ?
> |
> | #(foo) -> #(#foo)
> | #(true nil false 1 'n') -> #(true nil false 1 'n')
> |
> | > - what should be allowed in unquoted symbols ?
> | I did not get the question
> |
> | > - what should be allowed for classnames ?
> | Nothing
> |
> | > - what about namespaces ?
> | Nothing no need I do not think that they are in literal arrays. (may
> | be in VW but I did not check)
> |
> | > - do we allow infinite precision integers ?
> | Yes
> |
> | > - maybe the toplevel should always be an array ?
> |
> | I would say so else this is not a literalArray but a literal.
> |
> |
> | >
> | >
> | > Now: shoot!
> | >
> | >
> | > Sven
> | >
> | >
> | > --
> | > Sven Van Caekenberghe
> | > http://stfx.eu
> | > Smalltalk is the Red Pill
> | >
> | >
> | >
> | >
> | >
> |
> |
> |
>
April 24, 2012
Re: [Pharo-project] How to declare Zinc/FS dependency in Metacello Configuration for 1.4
by Stéphane Ducasse
On Apr 25, 2012, at 12:06 AM, Francois Stephany wrote:
> I'm updating some Metacello configurations and I'm wondering how to declare the dependencies on stuff that have been integrated into Pharo 1.4 (e.g., Zinc, FS).
excellent question.
So far you cannot but what we discussed with esteban is that we want to have the configurationOf the project loaded so that when we move to a smaller kernel we do not have to reinvent them and more important we can code against and use them as milestone.
> Should I declare those dependencies into my configuration? If yes, against with version?
>
> My gut feeling is that I should create a new baseline that does not require any Zinc of FS.
yes
> That becomes a pain in the ass when developing in parallel for 1.3 and 1.4.
yes same feeling here.
> Is the only place where I can differentiate 1.3 and 1.4 is in the stable symbolic version, right?
>
> What are people generally doing?
grumbling :(
May be dale know but I don't
>
>
> Cheers,
> Francois
>
April 24, 2012