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 removed

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

2012-10-21 Thread Frank Shearar
On 20 October 2012 20:52, Igor Stasenko siguc...@gmail.com wrote: On 20 October 2012 10:49, Frank Shearar frank.shea...@gmail.com 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

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

2012-10-20 Thread Frank Shearar
| Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 20 October 2012 00:54, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-20 Thread Dale Henrichs
+1 - Original Message - | From: Frank Shearar frank.shea...@gmail.com | 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 siguc

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

2012-10-20 Thread Dale Henrichs
- Original Message - | From: Igor Stasenko siguc...@gmail.com | 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 dhenr...@vmware.com

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

2012-10-20 Thread Igor Stasenko
On 20 October 2012 10:49, Frank Shearar frank.shea...@gmail.com 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

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

2012-10-20 Thread Igor Stasenko
On 20 October 2012 16:29, Dale Henrichs dhenr...@vmware.com wrote: - Original Message - | From: Igor Stasenko siguc...@gmail.com | 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

[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

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

2012-10-19 Thread Frank Shearar
On 19 October 2012 12:09, Igor Stasenko siguc...@gmail.com 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

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 13:40, Frank Shearar frank.shea...@gmail.com wrote: On 19 October 2012 12:09, Igor Stasenko siguc...@gmail.com 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

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 13:56, Igor Stasenko siguc...@gmail.com wrote: On 19 October 2012 13:40, Frank Shearar frank.shea...@gmail.com wrote: On 19 October 2012 12:09, Igor Stasenko siguc...@gmail.com wrote: Hi, as i promised before, here the simple smalltalk-based literal format. It based on

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.

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

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

2012-10-19 Thread Dale Henrichs
- STON does this very nicely BTW... Dale - Original Message - | From: Igor Stasenko siguc...@gmail.com | To: Pharo Development Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 4:09:22 AM | Subject: [Pharo-project] Yet another Notation format: Object literals | | Hi, | as i

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 14:11, Alexandre Bergel alexandre.ber...@me.com 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

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

2012-10-19 Thread Sven Van Caekenberghe
@lists.gforge.inria.fr | 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 smalltalk-based literal format. | It based on smalltalk syntax, and so, unlike JSON, it doesn't needs | to | have separate

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 16:31, Sven Van Caekenberghe s...@stfx.eu 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

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 17:29, Sven Van Caekenberghe s...@stfx.eu 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

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

2012-10-19 Thread Frank Shearar
this very nicely BTW... Dale - Original Message - | From: Igor Stasenko siguc...@gmail.com | To: Pharo Development Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 4:09:22 AM | Subject: [Pharo-project] Yet another Notation format: Object literals | | Hi, | as i

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

2012-10-19 Thread Igor Stasenko
Development Pharo-project@lists.gforge.inria.fr | 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 smalltalk-based literal format. | It based on smalltalk syntax, and so, unlike JSON

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

2012-10-19 Thread Stéphane Ducasse
: Igor Stasenko siguc...@gmail.com | To: Pharo Development Pharo-project@lists.gforge.inria.fr | 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 smalltalk-based literal format

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

2012-10-19 Thread Dale Henrichs
readable alternatives available. Dale - Original Message - | From: Sven Van Caekenberghe s...@stfx.eu | 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 have a web

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

2012-10-19 Thread Igor Stasenko
like, by implementing the conversion methods in a way you like :) Dale - Original Message - | From: Igor Stasenko siguc...@gmail.com | To: Pharo Development Pharo-project@lists.gforge.inria.fr | Sent: Friday, October 19, 2012 4:09:22 AM | Subject: [Pharo-project] Yet another Notation

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

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

2012-10-19 Thread Igor Stasenko
- Original Message - | From: Igor Stasenko siguc...@gmail.com | To: Pharo Development Pharo-project@lists.gforge.inria.fr | 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 smalltalk

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

2012-10-19 Thread Dale Henrichs
| Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 19 October 2012 16:55, Dale Henrichs dhenr...@vmware.com wrote: | Igor, | | I'm afraid that your notation is not very friendly to humans ... a | computer can keep track of the key value pairs in the literal

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

2012-10-19 Thread Igor Stasenko
: 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 more than a bit worse

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 that

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:33, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:36, Alexandre Bergel alexandre.ber...@me.com 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

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

2012-10-19 Thread Dale Henrichs
: [Pharo-project] Yet another Notation format: Object literals | | On 19 October 2012 18:33, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Alexandre Bergel
| Sent: Friday, October 19, 2012 9:10:26 AM | Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | On 19 October 2012 16:55, Dale Henrichs dhenr...@vmware.com wrote: | Igor, | | I'm afraid that your notation is not very friendly to humans ... a | computer can keep

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 alexandre.ber...@me.com 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

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

2012-10-19 Thread Dale Henrichs
Bergel alexandre.ber...@me.com | To: Pharo-project@lists.gforge.inria.fr Smalltalk Pharo-project@lists.gforge.inria.fr | 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

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 18:47, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Dale Henrichs
...the best we can hope for is to agree to disagree. Dale - Original Message - | From: Igor Stasenko siguc...@gmail.com | 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 | | On 19

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 type be

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

2012-10-19 Thread Eliot Miranda
: Igor Stasenko siguc...@gmail.com | | To: Pharo Development Pharo-project@lists.gforge.inria.fr | | 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 smalltalk-based

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

2012-10-19 Thread Igor Stasenko
On 19 October 2012 22:15, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Dale Henrichs
Message - | From: Eliot Miranda eliot.mira...@gmail.com | 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

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

2012-10-19 Thread Eliot Miranda
, 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...@vmware.com | wrote: | | | Igor, | | you can do anything you like ... you mean like choosing to use STON

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

2012-10-19 Thread Dale Henrichs
| Subject: Re: [Pharo-project] Yet another Notation format: Object literals | | | | | On Fri, Oct 19, 2012 at 2:42 PM, Dale Henrichs dhenr...@vmware.com | wrote: | | | Eliot, | | STON (and JSON IIRC) allows either $ or $' as string literal | delimiters, so I am not holding onto the $ as a key

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

2012-10-19 Thread Dale Henrichs
Message - | From: Igor Stasenko siguc...@gmail.com | 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:15, Dale Henrichs dhenr...@vmware.com wrote: | Igor

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

2012-10-19 Thread Igor Stasenko
On 20 October 2012 00:26, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Igor Stasenko
On 20 October 2012 00:54, Dale Henrichs dhenr...@vmware.com 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

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

2012-10-19 Thread Dale Henrichs
- Original Message - | From: Igor Stasenko siguc...@gmail.com | 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 dhenr...@vmware.com

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

2012-10-19 Thread Dale Henrichs
- Original Message - | From: Igor Stasenko siguc...@gmail.com | 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 dhenr...@vmware.com

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

2012-10-19 Thread Igor Stasenko
On 20 October 2012 03:48, Dale Henrichs dhenr...@vmware.com wrote: - Original Message - | From: Igor Stasenko siguc...@gmail.com | 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

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

2012-10-19 Thread Igor Stasenko
On 20 October 2012 03:17, Dale Henrichs dhenr...@vmware.com wrote: - Original Message - | From: Igor Stasenko siguc...@gmail.com | 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