Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Richard O'Keefe
I did not mean "course of instruction on the topic of continuations", I meant "that class whose name is Continuation in the Smalltalk image." In a Playground, type Continuation and then Control-B. On Fri, 17 May 2019 at 14:03, Brainstorms wrote: > Richard O'Keefe wrote > > Blocks in current

Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Brainstorms
Richard O'Keefe wrote > Blocks in current Smalltalk system are just like lambdas in Scheme. > Pharo even has continuations (see the Continuation class). I was going to ask about coroutines and continuations, but I thought maybe bringing these subjects up in another thread would be more

Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Richard O'Keefe
Blocks in current Smalltalk system are just like lambdas in Scheme. Pharo even has continuations (see the Continuation class). On Fri, 17 May 2019 at 05:21, Brainstorms wrote: > I beg your pardon.. and thank you for being the first to draw my attention > to > the fact that the phrase (a common

[Pharo-users] Small query about ZnClient post - with "; " form values

2019-05-16 Thread Tim Mackinnon
I was trying to automate posting some values to a website (I would use Stfx.eu but it doesn’t do syntax highlighting and only seems to work for quite small amounts). Anyway the following code always seems to trim values that have a ; in them - and I’m wondering if I’m missing something - or if

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Richard O'Keefe
stream := WriteStream on: (String new: gifts size * "estimated size per gift" 10). "The number after #new: is the *initial* allocation; the stream will reallocate it as needed." gifts allButLastDo: [:each | stream nextPutAll: each; nextPutAll: ', ']. stream nextPutAll: 'and '; nextPutAll:

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
I made the error somehow. Sorry for the confusion. Roelof Op 16-5-2019 om 22:29 schreef Esteban Maringolo: Oh... the expected output was 'e1, e2, e3 and e4', I read "all" instead of "and".

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Esteban Maringolo
Oh... the expected output was 'e1, e2, e3 and e4', I read "all" instead of "and". Now it makes sense. Esteban A. Maringolo On Thu, May 16, 2019 at 5:09 PM Roelof Wobben wrote: > and this is working > > String > streamContents: [ :stream | > gifts

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
and this is working String                 streamContents: [ :stream |                     gifts allButLast                         do: [ :each | stream nextPutAll: each ]                         separatedBy: [ stream                          

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
nope, it takes also the last one and that schould not be used. Op 16-5-2019 om 21:51 schreef Roelof Wobben: I think this is better  ^  String streamContents: [:stream | gifts do: [:each | stream

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Esteban Maringolo
Sorry, I misses the "all" part at the end (I don't see how that could add something, but if it's in the requirements...) Then it should be like this: String streamContents: [:stream | gifts allButLast do: [:each | stream nextPutAll: each ] separatedBy: [ stream nextPut: $,; space ].

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
I think this is better  ^  String streamContents: [:stream | gifts do: [:each | stream nextPutAll: each ] separatedBy: [ stream nextPut: $,; space ] stream nextputAll: 'all'; nextPut: ','; nextPut: gifts last] Op 16-5-2019

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
oke, and then do something like : stream := String streamContents: [:stream | gifts do: [:each | stream nextPutAll: each ] separatedBy: [ stream nextPut: $,; space ] ] stream nextputAll: 'all' stream nextPut: ',' stream nextPut: gifts last Roelof

Re: [Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Esteban Maringolo
Maybe this is a better way to build what you want. String streamContents: [:stream | gifts do: [:each | stream nextPutAll: each ] separatedBy: [ stream nextPut: $,; space ] ] Esteban A. Maringolo On Thu, May 16, 2019 at 4:21 PM Roelof Wobben wrote: > Hello, > > Im testing all my

[Pharo-users] can I do this with a stream or a format

2019-05-16 Thread Roelof Wobben
Hello, Im testing all my solutions with critiz and can solve almost all problems, Only this one I cannot figure out. I have this code (gifts allButLast inject: '' into: [ :str :each | str , each , ', ' ]) , 'and ' ,

Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Brainstorms
You got it. Thanks, Ben! After success with Lua, now I'm thinking about how to get Pharo inserted into the culture here... Ben Coman wrote > You mean like this... > > In System Browser... > Object subclass: #A > instanceVariableNames: '' > classVariableNames: '' > package: 'AA' > >

Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Ben Coman
On Fri, 17 May 2019 at 01:21, Brainstorms wrote: > I beg your pardon.. and thank you for being the first to draw my attention > to > the fact that the phrase (a common enough American colloquialism) is > actually a logical fallacy. Until now, it's been strictly idiomatic to me. > > And thank

Re: [Pharo-users] Bloc of code in tiers programming language

2019-05-16 Thread Brainstorms
I beg your pardon.. and thank you for being the first to draw my attention to the fact that the phrase (a common enough American colloquialism) is actually a logical fallacy. Until now, it's been strictly idiomatic to me. And thank you for your prompt reply. Am I safe to assume that blocks in

Re: [Pharo-users] TelePharo / Seamless Bitmaps are all 0s

2019-05-16 Thread Denis Kudriashov
Hi Alistair ср, 15 мая 2019 г. в 10:11, Alistair Grant : > Hi Denis, > > On Wed, 15 May 2019 at 10:16, Denis Kudriashov > wrote: > > > > Hi Alistair > > > > I will look when have a time. > > But you can try to write a test for bitmap serialization/materialization > in TostSerializationTests (if