Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-02-28 Thread Richard O'Keefe
Of the couple of hundred programming languages I have used, there is precisely one that does what you expect (the S programming language, as implemented in R). And it is a major pain in the posterior with no upside that I can discern. Suppose I want a sequence of n consecutive integers beginning

Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-02-28 Thread Tim Mackinnon
Hi Richard - but why would you expect 1 to: 0 to give you an empty sequence? If I inspect “0 to: 1” I see: 1 -> 0 2 -> 1 So I would expect “1 to: 0” to see: 1 -> 1 2 -> 0. I asked for a sequence going from 1 down to 0 (in my mind). Knowing about all the by: -1 stuff seems very C’ish. Of

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Tim Mackinnon
Hi Sven - is there no convenience shortcut we can use in our code to make this less wordy when we are specifying it? E.g. the following is very convenient to write - but doesn’t work (as you have $‘ and not $“ ) ex := { 'track'-> 'pharo'. 'language' -> 'smalltalk'.

Re: [Pharo-users] Repeateble URLs - REST?

2019-02-28 Thread sergio ruiz
I like that http://www.bagelconcertfinder.com uses Seaside and also my Twitter Bootstrap Library. Thanks so much for your library! I have built several applications in seaside, and always dig using it.. it’s my go to framework when I do a project on my own.. Seaside by default works with

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Sven Van Caekenberghe
I really don't understand. JSON needs Dictionaries and Arrays (or other Sequenceable Collections). That has nothing to do with Pharo or how NeoJSON or STONJSON are implemented - it is what defines JSON. Of course, compatible objects work as well (NeoJSONObject is an example). You could make

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Tim Mackinnon
As I merrily chat to myself - I noticed that STONWriter almost does what I need - it just complains in #writeAssociation: so I make a subclass STONJSONWriter and override: writeAssociation: association “don’t smack me…. jsonMode ifTrue: [ self error: 'wrong

Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-02-28 Thread Richard O'Keefe
I would expect 1:0 to give me an empty sequence because (a) for all other natural numbers n, 1:n gives me a sequence of n numbers, and (b) how else am I supposed to get an empty sequence? Under your interpretation, (x to: y) would never be empty. This has absolutely nothing to do with C. As I

Re: [Pharo-users] Mac OS X test [ smaller image ]

2019-02-28 Thread Hilaire
Thanks for the feedback Cedrick. We have all different experiences, I guess depending on the OS X version. Did you try to drag the DrGeo.app in the Application location and start it from there? Hilaire Le 28/02/2019 à 13:08, Cédrick Béler a écrit : > Can someone with privilege to the

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Sven Van Caekenberghe
This is wrong !! Think about it, what would then happen with a mixed list ? { #key->#value. 1. true } That would generate invalid JSON. > On 28 Feb 2019, at 14:56, Tim Mackinnon wrote: > > As I merrily chat to myself - I noticed that STONWriter almost does what I > need - it just complains

Re: [Pharo-users] Repeateble URLs - REST?

2019-02-28 Thread Sven Van Caekenberghe
I fully agree with everything Torsten said, but I would like to add a couple of points. It is very easy to add a couple of readable/shareable URL to a classic Seaside app. Here is a simple example: https://audio359.eu/ss/audio359-store?showSKU=sku0101 This jumps right into a web store written

Re: [Pharo-users] Why is #findString: in accessing?

2019-02-28 Thread Richard O'Keefe
On Thu, 28 Feb 2019 at 18:59, Richard Sargent < richard.sarg...@gemtalksystems.com> wrote: > > It's not you would be doing anything new. VA Smalltalk has been doing that > for more and a quarter of a century. > I have Squeak, Pharo, ST/X, GST, VW, VAST, Dolphin, and even Strongtalk. I found the

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Sven Van Caekenberghe
STONJSON toString: { #id->1. #name->'tim' } asDictionary. JSON cannot deal with Associations by themselves. > On 28 Feb 2019, at 14:05, Tim Mackinnon wrote: > > I am stumped about how to write out some simple json (for a config file). I > didn't think I need Neo, and STONJSON would be fine

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Tim Mackinnon
Just to add more flavour to this - it seems quite wordy that we have to do this (or equivalent) to write some config. ex := OrderedDictionary new at: 'track' put: 'pharo'; at: 'language' put: 'smalltalk'; at: 'exercises' put: ( OrderedDictionary new

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Richard O'Keefe
1. A JSON "object" corresponds to some kind of dictionary in Smalltalk. 2. {#a -> 1. #b -> 2} is NOT A DICTIONARY. It is an Array of Associations. 3. {#a -> 1. #b -> 2} asDictionary *is* a dictionary. 4. My Smalltalk allows #{#a -> 1. #b -> 2} -- how could I let it be less

Re: [Pharo-users] Why is #findString: in accessing?

2019-02-28 Thread Richard Sargent
On Thu, Feb 28, 2019, 03:49 Richard O'Keefe wrote: > > > On Thu, 28 Feb 2019 at 18:59, Richard Sargent < > richard.sarg...@gemtalksystems.com> wrote: > >> >> It's not you would be doing anything new. VA Smalltalk has been doing >> that for more and a quarter of a century. >> > > I have Squeak,

[Pharo-users] Richard Kenneth Eng is NOT Mr. Smalltalk

2019-02-28 Thread Michael Zeder
Dear community, I am a silent follower of this list. Now, I feel urged to speak up not on a technical, but a community matter. Every village deserves it's fool. And a wise man does not feed the troll (i did, and doing it right now, sorry). But if this fool is about to take over a considerable

Re: [Pharo-users] Mac OS X test [ smaller image ]

2019-02-28 Thread Christophe Demarey
I also did a quick test: > Le 28 févr. 2019 à 13:08, Cédrick Béler a écrit : > > I will try to help you there Hilaire too. > >> Le 27 févr. 2019 à 17:57, Hilaire > > a écrit : >> >> Hi, >> >> I have a build script too to build the drgeo bundle from scratch [1], I >>

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Henrik Sperre Johansen
Tim Mackinnon wrote > Just to add more flavour to this - it seems quite wordy that we have to do > this (or equivalent) to write some config. > > ex := OrderedDictionary new > at: 'track' put: 'pharo'; > at: 'language' put: 'smalltalk'; > at: 'exercises' put: ( >

[Pharo-users] How to write out simple Json?

2019-02-28 Thread Tim Mackinnon
I am stumped about how to write out some simple json (for a config file). I didn't think I need Neo, and STONJSON would be fine but it seems like creating items like: { 'id'-> self id. 'name' -> self name } gives an error about the association. I think you have to do: { ('id'-> self id)

Re: [Pharo-users] Mac OS X test [ smaller image ]

2019-02-28 Thread Hilaire
Hi, Out of curiosity, among your test, did you try to copy the app in the Application location? Thanks Hilaire Le 28/02/2019 à 15:52, Christophe Demarey a écrit : >  I also did a quick test: > -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Running Pharo under Ubuntu (Windows Subsystem for Linux)

2019-02-28 Thread Tomaž Turk
Excellent, thank you for putting together the how-to. Tomaz -- Original Message -- From: "Christopher Fuhrman" To: pharo-users@lists.pharo.org Sent: 28.2.2019 9:54:46 Subject: [Pharo-users] Running Pharo under Ubuntu (Windows Subsystem for Linux) Thanks to Cyril who told me it was

Re: [Pharo-users] Mac OS X test [ smaller image ]

2019-02-28 Thread Cédrick Béler
Yes I did so and same result. What is the process to do the bundle ? Cheers, Cedrick > Le 28 févr. 2019 à 20:46, Hilaire a écrit : > > Hi, > > Out of curiosity, among your test, did you try to copy the app in the > Application location? > > Thanks > > Hilaire > >> Le 28/02/2019 à 15:52,

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Tim Mackinnon
Sven- thinking a bit more > On 28 Feb 2019, at 13:59, Sven Van Caekenberghe > wrote: > > This is wrong !! > > Think about it, what would then happen with a mixed list ? > > { #key->#value. 1. true } > > That would generate invalid JSON. I actually went and tried my

Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-02-28 Thread K K Subbu
On 28/02/19 6:33 PM, Tim Mackinnon wrote: So I would expect “1 to: 0” to see: 1 -> 1 2 -> 0. It is difficult for code to guess the intent of the coder. Did the coder intend an decreasing sequence or a stopping condition (i == end or i > end?). Perhaps, we could use an explicit selector:

Re: [Pharo-users] How to write out simple Json?

2019-02-28 Thread Jimmie Houchin
I don't know if you really need OrderedDictionary or not. But I am a big fan of and use all the time simple Arrays or OrderedCollection of pairs. It is neat, clean and readable. ex := Dictionary newFromPairs: {     'track'. 'pharo.     'language'. 'smalltalk'.     'exercises'. Dictionary

[Pharo-users] Running Pharo under Ubuntu (Windows Subsystem for Linux)

2019-02-28 Thread Christopher Fuhrman
Thanks to Cyril who told me it was possible, I got Pharo 7 Unix running under the Ubuntu 18 that's part of Windows Subsystem for Linux (WSL) in Windows 10. It's not a VM VirtualBox. I documented the install steps on my new blog that uses Jekyll and github pages, which actually took longer to set

Re: [Pharo-users] Repeateble URLs - REST?

2019-02-28 Thread Torsten Bergmann
Hi sergio,   I like that http://www.bagelconcertfinder.com uses Seaside and also my Twitter Bootstrap Library.   Seaside by default works with stateful (web) components - making it easy to develop - but possibly hard to scale to be the next Twitter, Amazon, ... ;) Seaside usually renders the