Re: [Pharo-users] how to write this without a if then

2018-11-27 Thread Richard O'Keefe
In Advent-of-Code 2015, the first problem is really quite simple. There are at least two ways to think about it. "CS101": set a counter to 0 for each character of the string if it is '(' increment the counter if it is ')' decrement the counter report the counter "Higher

[Pharo-users] [ANN] Teapot was moved to GitHub

2018-11-27 Thread Attila Magyar
Hi, I just want to let you know that the source code of Teapot was moved from Smalltalkhub to GitHub. The new repository is located at: https://github.com/zeroflag/teapot Attila -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] how to write this without a if then

2018-11-27 Thread Tim Mackinnon
> The idea of a flat ban on #ifTrue:ifFalse: is ridiculous. > Number>>abs >^self negative ifTrue: [self negated] ifFalse: [self] > > Is there any better way to do this? Not really, you can > only move the #ifTrue:ifFalse: somewhere else. But still it’s always a good thought experiment to

Re: [Pharo-users] how to write this without a if then

2018-11-27 Thread Sven Van Caekenberghe
> On 28 Nov 2018, at 06:15, Richard O'Keefe wrote: > > The idea of a flat ban on #ifTrue:ifFalse: is ridiculous. > Number>>abs >^self negative ifTrue: [self negated] ifFalse: [self] > > Is there any better way to do this? Not really, you can > only move the #ifTrue:ifFalse: somewhere

Re: [Pharo-users] how to write this without a if then

2018-11-27 Thread Richard O'Keefe
The idea of a flat ban on #ifTrue:ifFalse: is ridiculous. Number>>abs ^self negative ifTrue: [self negated] ifFalse: [self] Is there any better way to do this? Not really, you can only move the #ifTrue:ifFalse: somewhere else. The main argument against #ifTrue:ifFalse: is NOT TO USE IT FOR

Re: [Pharo-users] Loading Metacello with Seaside

2018-11-27 Thread Cyril Ferlicot D.
Le 28/11/2018 à 00:08, Vitor Medina Cruz a écrit : > Hello! > > WIndows 10 here with Pharo 7 32 bits. Here is my baseline: > > > baseline: spec >     >     >     >     spec for: #'common' do: [ >         spec blessing: #'baseline'; >         repository:

[Pharo-users] Loading Metacello with Seaside

2018-11-27 Thread Vitor Medina Cruz
Hello! WIndows 10 here with Pharo 7 32 bits. Here is my baseline: baseline: spec > > > > spec for: #'common' do: [ > spec blessing: #'baseline'; > repository: 'gitlab://vitormcruz/employees:master/pharo/'; > > project: 'Magritte3' with: [ spec

Re: [Pharo-users] Playing with Pharo 7

2018-11-27 Thread Vitor Medina Cruz
The documentation on the book has much more information than needed to use Metacello with Iceberg, it can confuse you more than help I am afraid, at least this happened to me. The guide provided by Cyril is what you want.

Re: [Pharo-users] Problems with Firmata & Arduino UNO Clone

2018-11-27 Thread Ben Coman
On Tue, 27 Nov 2018 at 05:59, William L. Cleveland wrote: > I have been unsuccessful in using an Arduino board with Pharo 6.1(32bit) > and the Firmata package. > > > > The board is an Arduino Uno clone (ELEGOO UNO R3). The board appears to > work fine with the Arduino IDE, which was tested with

Re: [Pharo-users] Problems with Firmata & Arduino UNO Clone

2018-11-27 Thread Denis Kudriashov
Hi William. I think Serial port does not work in MacOS VM. пн, 26 нояб. 2018 г. в 21:59, William L. Cleveland : > I have been unsuccessful in using an Arduino board with Pharo 6.1(32bit) > and the Firmata package. > > > > The board is an Arduino Uno clone (ELEGOO UNO R3). The board appears to >

Re: [Pharo-users] how to write this without a if then

2018-11-27 Thread Dale Henrichs
Roelof, One technique to eliminating the use of #ifTrue:ifFalse: is to use double dispatching. There are some good examples of using double dispatching in Ralph Johnson's paper "ARITHMETIC AND DOUBLE DISPATCHING IN SMALLTALK-80"[1].  you should be able to get the basic idea by skimming the

Re: [Pharo-users] Pharo 7 - RFB

2018-11-27 Thread Sanjay Minni
thanks all - cheers, Sanjay -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

[Pharo-users] how to write this without a if then

2018-11-27 Thread Roelof Wobben
Hello, Yesterday I had a talk with luc frabresse about using if then. He said if I understand it right, Its the best to not using a if then or a ifTrue/ifFalse. Can anyone help me figure out how to rewrite this project so I will not use the ifTrue in the basement function. my code so far

Re: [Pharo-users] subpackages in P7

2018-11-27 Thread Peter Uhnak
The main benefit of using separate packages instead of tags is that you can choose what to load. That's why MyPackage-Test is best kept separate, because when other project is loading your project, they don't need to load such package (which can speed up dependency loading and makes for smaller

Re: [Pharo-users] Problems with NeoCSV Package

2018-11-27 Thread Peter Uhnak
Hi, > Instance of ByteString doesn’t understand #atEnd. This is a very typical error when you have accidentally passed a String instead of a Stream. ... which you did here: > stream := workingDir/myFileName readStreamDo: [ :stream | stream contents]. You can either operate directly on the file

Re: [Pharo-users] subpackages in P7

2018-11-27 Thread Esteban Lorenzano
> On 27 Nov 2018, at 15:03, Roelof Wobben wrote: > > Thanks, > > So better is leave it this way. So three seperate packages as I understand > you well. I just said I would keep “tests” separated. The rest I do not have any opinion :) Esteban > > Roelof > > > > > Op 27-11-2018 om

Re: [Pharo-users] Do you have Pharo + SQLite experience?

2018-11-27 Thread Offray Vladimir Luna Cárdenas
Hi Juraj I used UDBC, that is documented in the blog referred by Sven. You can find a Pharo project that uses it at [1] [1] https://mutabit.com/offray/blog/en/entry/panama-papers-1 Cheers, Offray On 27/11/18 8:09, Juraj Kubelka via Pharo-users wrote:

Re: [Pharo-users] subpackages in P7

2018-11-27 Thread Roelof Wobben
Thanks, So better is leave it this way. So three seperate packages as I understand you well. Roelof Op 27-11-2018 om 10:47 schreef Esteban Lorenzano: Yes, you can :) (But I would recommend it doing it with tests) Usually, what you do is to create your package “Project” and then inside

Re: [Pharo-users] Do you have Pharo + SQLite experience?

2018-11-27 Thread Juraj Kubelka via Pharo-users
--- Begin Message --- That’s great. Thank you :-) Juraj > On Nov 27, 2018, at 09:40, Sven Van Caekenberghe wrote: > > http://www.samadhiweb.com/tags/SQLite > >> On 27 Nov 2018, at 13:16, Juraj Kubelka via Pharo-users >> wrote: >> >> >> From: Juraj Kubelka >> Subject: Do you have Pharo +

Re: [Pharo-users] Do you have Pharo + SQLite experience?

2018-11-27 Thread Sven Van Caekenberghe
http://www.samadhiweb.com/tags/SQLite > On 27 Nov 2018, at 13:16, Juraj Kubelka via Pharo-users > wrote: > > > From: Juraj Kubelka > Subject: Do you have Pharo + SQLite experience? > Date: 27 November 2018 at 13:16:00 GMT+1 > To: Any question about pharo is welcome > > > Hi all, > > I

[Pharo-users] Do you have Pharo + SQLite experience?

2018-11-27 Thread Juraj Kubelka via Pharo-users
--- Begin Message --- Hi all, I would like to play with SQLite using Pharo. Does anyone use SQLite in Pharo (version 7)? What library is recommended to use? And what is your experience (pros and cons) of the existing solutions? Do you have a project using SQLite in Pharo that I can download

Re: [Pharo-users] Playing with Pharo 7

2018-11-27 Thread Steffen Märcker
Great! Am .11.2018, 21:47 Uhr, schrieb Cyril Ferlicot D. : Le 26/11/2018 à 16:57, Konrad Hinsen a écrit : Thanks for the pointer! Unfortunately all the documentation there assumes way more familiarity with Smalltalk than I have. And even a lot of familiarity with Metacello itself, as the

Re: [Pharo-users] subpackages in P7

2018-11-27 Thread Esteban Lorenzano
Yes, you can :) (But I would recommend it doing it with tests) Usually, what you do is to create your package “Project” and then inside that package you can add the tags “test” and “Actions”, But now you already have three packages, and you want to move, for example “Project-Actions” into

Re: [Pharo-users] Tracking method in and out with MetaLinks

2018-11-27 Thread Marcus Denker
>>> >>> I am working now on making the #after work so that one can get with #value >>> the return of the method… >>> >>> I now have a version where it works for Message Sends correctly *and* were >>> #after on Method works better (the compilation errors should be fixed). >>> >>> But #value

[Pharo-users] subpackages in P7

2018-11-27 Thread Roelof Wobben
Hello, Right now I have three seperate packages. Project Project-test Project-Actions Is it possible in P7 to have something like this Project ---   Tests   Actions and if so, how to I make it work,