Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-22 Thread drush66
Dale Henrichs wrote > If you guys are all fired up to write parsers:) writing a YAML parser for > Smalltalk would be very cool. There are yaml parsers for a bunch of > languages, but a Smalltalk parser is conspicuously absent ... > > YAML is very readable (all the extraneous gibberish has been rem

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-21 Thread Frank Shearar
On 20 October 2012 20:52, Igor Stasenko wrote: > On 20 October 2012 10:49, Frank Shearar wrote: > >> >> Ruby: {:foo => 1, :bar => 2} >> Clojure: {:foo 1 :bar 2} >> Python: {'foo': 1, 'bar': 2} >> > > That's it? I can add some more :) I'm sure. These are just the ones I knew off the top of my hea

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-20 Thread Igor Stasenko
On 20 October 2012 16:29, Dale Henrichs wrote: > > > - Original Message - > | From: "Igor Stasenko" > | To: Pharo-project@lists.gforge.inria.fr > | Sent: Friday, October 19, 2012 8:13:12 PM > | Subject: Re: [Pharo-project] Yet another Notation format

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-20 Thread Igor Stasenko
On 20 October 2012 10:49, Frank Shearar wrote: > > Ruby: {:foo => 1, :bar => 2} > Clojure: {:foo 1 :bar 2} > Python: {'foo': 1, 'bar': 2} > That's it? I can add some more :) This is interesting actually.. how hard you must try in attempt to make it look sane and readable. Dicts is quite complex

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-20 Thread Dale Henrichs
- Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 8:13:12 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 20 October 2012 03:48, Dale Henrichs wrote: | > | > |

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-20 Thread Dale Henrichs
+1 - Original Message - | From: "Frank Shearar" | To: Pharo-project@lists.gforge.inria.fr | Sent: Saturday, October 20, 2012 1:49:10 AM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 20 October 2012 04:13, Igor Stasenko wrote: | > On 20

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-20 Thread Frank Shearar
4:46:47 PM >> | Subject: Re: [Pharo-project] Yet another Notation format: Object literals >> | >> | On 20 October 2012 00:54, Dale Henrichs wrote: >> | > Igor, >> | > >> | > It's not clear that I need to be part of this discussion. >> | > &

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 20 October 2012 03:17, Dale Henrichs wrote: > > > - Original Message - > | From: "Igor Stasenko" > | To: Pharo-project@lists.gforge.inria.fr > | Sent: Friday, October 19, 2012 4:09:18 PM > | Subject: Re: [Pharo-project] Yet another Notation format

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 20 October 2012 03:48, Dale Henrichs wrote: > > > - Original Message - > | From: "Igor Stasenko" > | To: Pharo-project@lists.gforge.inria.fr > | Sent: Friday, October 19, 2012 4:46:47 PM > | Subject: Re: [Pharo-project] Yet another Notation format

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
- Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 4:46:47 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 20 October 2012 00:54, Dale Henrichs wrote: | > Igor, | &

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
- Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 4:09:18 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 20 October 2012 00:26, Dale Henrichs wrote: | > Ah, | >

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 20 October 2012 00:54, Dale Henrichs wrote: > Igor, > > It's not clear that I need to be part of this discussion. > > If you want to invent a new serialization format, then go for it. > > I did chime in with my opinion that your suggested format was not very > readable. You happen to disagree

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 20 October 2012 00:26, Dale Henrichs wrote: > Ah, > > So you are asking whether I think this: > > {1:[1,2,3],'foo':'bar',3:{1:2,3:[1,2,3]}} > > is more readable than this: > > #(#Dictionary 1 #(#Array 1 2 3) 'foo' 'bar' 3 #(#Dictionary 1 2 3 #(#Array > 1 2 3))) > > My answer is that I find

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
lear that I can contribute much more. Dale - Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 2:11:37 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 19 October 2012 22

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
greed, but you're not answering my question. Is Igor's any the less | readable? | | | | | Dale | - Original Message - | | | From: "Eliot Miranda" < eliot.mira...@gmail.com > | | To: Pharo-project@lists.gforge.inria.fr | | | | Sent: Friday, October 19, 2012 2:07

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Eliot Miranda
iranda" > | To: Pharo-project@lists.gforge.inria.fr > | Sent: Friday, October 19, 2012 2:07:28 PM > | Subject: Re: [Pharo-project] Yet another Notation format: Object literals > | > | HI Dale, Hi Igor, > | > | > | On Fri, Oct 19, 2012 at 9:33 AM, Dale Henrichs < dhenr...@v

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
th the JSON reader/writer Dale - Original Message - | From: "Eliot Miranda" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 2:07:28 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | HI Dale, Hi Igor, | | | On Fri, O

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 22:15, Dale Henrichs wrote: > Igor, > > I think we can agree that readability is subjective, beyond that I'm afraid > that we aren't going to see eye to eye. > > Put us in the same room with a whiteboard and we might be able to understand > each other's perspective if not come

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Eliot Miranda
rays is possible, the results are > not very readable ... unless you start taking liberties with Smalltalk > syntax... > > If you are no longer restricting yourself to Smalltalk syntax, then what's > wrong with the STON notation above? > > Dale > > - Original Messag

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Stéphane Ducasse
>> Could not it be >> >> #( (category 'Topez-Client-Core') (classinstvars ) (classvars ) >> (commentStamp '') (instvars 'project' 'package') (name 'TZTopezStatus') >> (pools ) (super 'Object') (type 'normal')) >> >> Like this, no parser at all is required. >> By the way, why keep pools? should

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
of miles...the best we can hope for is to agree to disagree. Dale - Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 12:43:33 PM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals |

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:47, Dale Henrichs wrote: > Igor, > > "But my aims is slightly different." and so are mine ... > > I think that we can agree on this point and move on... > :) i cannot agree on one point: JSON is harder to read to me, comparing to smalltalk literal syntax. This is a reason fo

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
"Alexandre Bergel" | To: "Pharo-project@lists.gforge.inria.fr Smalltalk" | Sent: Friday, October 19, 2012 10:20:04 AM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | Hi Dale, | | I have followed this issue from very very far, so I

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Sven Van Caekenberghe
On 19 Oct 2012, at 19:20, Alexandre Bergel wrote: > Could not it be > > #( (category 'Topez-Client-Core') (classinstvars ) (classvars ) (commentStamp > '') (instvars 'project' 'package') (name 'TZTopezStatus') (pools ) (super > 'Object') (type 'normal')) > > Like this, no parser at all is r

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Alexandre Bergel
t; > Smalltalk does not have a literal syntax for dictionaries. While fabricating > dictionaries from literal arrays is possible, the results are not very > readable ... unless you start taking liberties with Smalltalk syntax... > > If you are no longer restricting yourself to Smallt

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
: Re: [Pharo-project] Yet another Notation format: Object literals | | On 19 October 2012 18:33, Dale Henrichs wrote: | > Igor, | > | > "you can do anything you like" ... you mean like choosing to use | > STON and not invent my own notation format? | > | > STON i

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:36, Alexandre Bergel wrote: >> but i agree , this is arguable. As long as you using objects which >> provide own converters, >> (so a generic one never takes place), you don't have to worry about it. > > I think this would be interesting > >>> According to the object you are

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:33, Dale Henrichs wrote: > Igor, > > "you can do anything you like" ... you mean like choosing to use STON and not > invent my own notation format? > > STON is a perfectly good notation format for Smalltalk... > > Methinks that with your recent suggestions are no longer usin

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Alexandre Bergel
> but i agree , this is arguable. As long as you using objects which > provide own converters, > (so a generic one never takes place), you don't have to worry about it. I think this would be interesting >> According to the object you are converting into a string, #storeString may >> produce code

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
l Message - > | | From: "Sven Van Caekenberghe" > | | To: Pharo-project@lists.gforge.inria.fr > | | Sent: Friday, October 19, 2012 8:29:07 AM > | | Subject: Re: [Pharo-project] Yet another Notation format: Object > | | literals > | | > | | Dale, > | | > | | We

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
Smalltalk syntax... If you are no longer restricting yourself to Smalltalk syntax, then what's wrong with the STON notation above? Dale - Original Message - | From: "Igor Stasenko" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 9:10:26 AM | Subj

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
#x27; #'{' #c #'->' #d #'}' #';') this is completely arbitrary... because smalltalk literal syntax is highly permissive :) it only a little more work to extract keys and values from already parsed literal array. > or you prefer this one: > > #( &g

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
October 19, 2012 8:56:43 AM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | Sven, | | Everybody needs a help from a parser to get formated input right ... | I rely on sytax highlighting when I write Smalltalk code:), but I'd | say the lack of key/value syntax is m

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
ike: #( Dictionary a -> b c -> d ) is it better? or you prefer this one: #( Dictionary (a -> b) (c -> d) ) you can do anything you like, by implementing the conversion methods in a way you like :) > > Dale > > - Original Message ----- > | From: "Igor Stasen

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
there are much more readable alternatives available. Dale - Original Message - | From: "Sven Van Caekenberghe" | To: Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 8:29:07 AM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals |

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Stéphane Ducasse
tionary or literal map >> syntax ... without that I'm afraid that for human friendly, lightweight >> notations we have to step away from the Smalltalk syntax - STON does this >> very nicely BTW... >> >> Dale >> >> - Original Message - >

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
; syntax ... without that I'm afraid that for human friendly, lightweight >> notations we have to step away from the Smalltalk syntax - STON does this >> very nicely BTW... >> >> Dale >> >> - Original Message - >> | From: "Igor Stasenko" &

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Frank Shearar
; >> What we're missing from Smalltalk is a literal dictionary or literal map >> syntax ... without that I'm afraid that for human friendly, lightweight >> notations we have to step away from the Smalltalk syntax - STON does this >> very nicely BTW... >> >>

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 17:29, Sven Van Caekenberghe wrote: > Dale, > > We have a web app where users sometimes have to enter some short pieces of > JSON - because we were lazy and did not provide a proper interface ;-) You > wouldn't believe in how many ways they make syntax errors and don't > und

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 16:31, Sven Van Caekenberghe wrote: > Hi Igor, > > This is a very nice and elegant expression (of a variation) of the Array > literal idea. > Thanks a lot for taking the effort to implement and share it. > > I think that a formal specification and a standalone parser that does

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Sven Van Caekenberghe
- Original Message - > | From: "Igor Stasenko" > | To: "Pharo Development" > | Sent: Friday, October 19, 2012 4:09:22 AM > | Subject: [Pharo-project] Yet another Notation format: Object literals > | > | Hi, > | as i promised before, here the simple sma

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 14:11, Alexandre Bergel wrote: > Hi Igor, > > I like this very much. > > When you say: >> Object>>#asObjectLiteral to be a subclass responsibility. > > I am not convinced this has to be the case. In my opinion, #asObjectLiteral > should be a replacement of #storeString. And #st

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Dale Henrichs
malltalk syntax - STON does this very nicely BTW... Dale - Original Message - | From: "Igor Stasenko" | To: "Pharo Development" | Sent: Friday, October 19, 2012 4:09:22 AM | Subject: [Pharo-project] Yet another Notation format: Object literals | | Hi, | as i promised befo

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Sven Van Caekenberghe
Hi Igor, This is a very nice and elegant expression (of a variation) of the Array literal idea. Thanks a lot for taking the effort to implement and share it. I think that a formal specification and a standalone parser that does not depend on the builtin compiler is also needed. That would mea

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Alexandre Bergel
Hi Igor, I like this very much. When you say: > Object>>#asObjectLiteral to be a subclass responsibility. I am not convinced this has to be the case. In my opinion, #asObjectLiteral should be a replacement of #storeString. And #storeString is defined on Object and it is not abstract. Accord

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 13:56, Igor Stasenko wrote: > On 19 October 2012 13:40, Frank Shearar wrote: >> On 19 October 2012 12:09, Igor Stasenko wrote: >>> Hi, >>> as i promised before, here the simple smalltalk-based literal format. >>> It based on smalltalk syntax, and so, unlike JSON, it doesn't ne

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
On 19 October 2012 13:40, Frank Shearar wrote: > On 19 October 2012 12:09, Igor Stasenko wrote: >> Hi, >> as i promised before, here the simple smalltalk-based literal format. >> It based on smalltalk syntax, and so, unlike JSON, it doesn't needs to >> have separate parser (a normal smalltalk par

Re: [Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Frank Shearar
On 19 October 2012 12:09, Igor Stasenko wrote: > Hi, > as i promised before, here the simple smalltalk-based literal format. > It based on smalltalk syntax, and so, unlike JSON, it doesn't needs to > have separate parser (a normal smalltalk parser used for that). > > The idea is quite simple: > yo

[Pharo-project] Yet another Notation format: Object literals

2012-10-19 Thread Igor Stasenko
Hi, as i promised before, here the simple smalltalk-based literal format. It based on smalltalk syntax, and so, unlike JSON, it doesn't needs to have separate parser (a normal smalltalk parser used for that). The idea is quite simple: you can tell any object to represent itself as an 'object liter