[Pharo-users] help with understanding the visitor pattern

2019-10-16 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Im busy with this project: https://github.com/RoelofWobben/Die Now I also want to try to add a DieHandler and a Die together. And I heared you can use the visitor pattern to solve this. As far as  I understand the pattern I have to make a new class which contains o

[Pharo-users] help bij one of the last challenges of the chapterof network simulation of the oop book.

2019-10-29 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have to  made this challenge as last on of the OOP book Servers answering requests When a server node consumes a packet, it converts the payload to uppercase, then sends that back to the sender of the request.

Re: [Pharo-users] help bij one of the last challenges of the chapterof network simulation of the oop book.

2019-10-29 Thread Roelof Wobben via Pharo-users
ANSI standard, so maybe I'll leave it.) So I think where you have #BALL you should have 'BALL'. There may be other issues. On Wed, 30 Oct 2019 at 11:00, Roelof Wobben via Pharo-users wrote: Hello, I have to made this challenge as last on of the OOP book Servers answering reques

Re: [Pharo-users] help bij one of the last challenges of the chapterof network simulation of the oop book.

2019-10-30 Thread Roelof Wobben via Pharo-users
ou have #BALL you should have 'BALL'. There may be other issues. On Wed, 30 Oct 2019 at 11:00, Roelof Wobben via Pharo-users wrote: Hello, I have to  made this challenge as last on of the OOP book Servers answering requests When a server node consumes a packet, it converts the paylo

Re: [Pharo-users] help bij one of the last challenges of the chapterof network simulation of the oop book.

2019-10-30 Thread Roelof Wobben via Pharo-users
'BALL'. There may be other issues. On Wed, 30 Oct 2019 at 11:00, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello,

Re: [Pharo-users] help bij one of the last challenges of the chapterof network simulation of the oop book.

2019-10-30 Thread Roelof Wobben via Pharo-users
So I think where you have #BALL you should have 'BALL'. There may be other issues. On Wed, 30 Oct 2019 at 11:00, Roelof Wobben via Pharo-users <pharo-u

[Pharo-users] can I somehow test the contents of a package

2019-11-13 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, IM doing now this book to understand better the OOP side of Pharo : https://books.pharo.org/learning-oop/ im now at the last challenge of the network-simulator and im stuck. I want to test if the send package is really send back uppercase but I cannot find a way

[Pharo-users] some sort of mentor help ?

2019-12-03 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, do not know if this is the right channel but is there someone or some book which can help me learn how to approach complex problems like the AdventOfCode challenges , I try that but im stuck because most of the time I have the feeling I

[Pharo-users] twilllio quest

2019-12-10 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I wonder if I can solve the TwillioQuest with Pharo. I then have to write code to send SMS and return a respons a a SMS. is this possible in Pharo and can I use for example teapot for it ? and if it possible does anyone have a example of how to send a SMS with Twil

[Pharo-users] sot of mentor help (second time asking)

2019-12-12 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, do not know if this is the right channel but is there someone or some book which can help me learn how to approach complex problems like the AdventOfCode challenges , I try that but im stuck because most of the time I have the feeling I

Re: [Pharo-users] sot of mentor help (second time asking)

2019-12-16 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Pity that no one answers. Is it a possibility to ask for feedback for the ones that I can solve and ask for some pointers for the one I have no clue how to solve them. So anyone who can  and is willing to help me can respond.

Re: [Pharo-users] sot of mentor help (second time asking)

2019-12-16 Thread Roelof Wobben via Pharo-users
or in discord channel. Cheers, Esteban On 16 Dec 2019, at 13:56, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: From: Roelof

[Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, My solution to day2 part1 is right this : processData: instructions     | opcode index firstNumber secondNumber placeToPut firstNumberIndex secondNumberIndex |     index := 1.     opcode := instructions at: index.     [ opcode ~= 99 ]         whileTrue: [ firstNumb

Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Roelof Wobben via Pharo-users
--- Begin Message --- of course but you have to use a githut account to reach it. All the puzzles can be found here :  https://adventofcode.com/ I try to solve day2 and then part1. Roelof Op 17-12-2019 om 18:33 schreef Kas

[Pharo-users] can I write this without the three if then;s

2019-12-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Im trying to solve a challenge from exercism where  I have to calculate the points somehow gets on a very simple darts board. I solved it like this : scoreX: anInteger y: anInteger2     | distance |     di

Re: [Pharo-users] can I write this without the three if then;s

2019-12-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Thanks, But it looks to me I still need the ifTrue because the between gives also a true or false. Roelof Op 27-12-2019 om 20:38 schreef tbrunz: You might try Magnitude >> between: min and: max -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.htm

Re: [Pharo-users] can I write this without the three if then;s

2019-12-27 Thread Roelof Wobben via Pharo-users
but I really think your code is easier to read, which is what I appreciate the most. Best, Kasper On 27 December 2019 at 20.18.38, Roelof Wobben via Pharo-users (pharo-users@lists.pharo.

[Pharo-users] uses or instead of a searching literal

2019-12-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, How can I get rid of the above error message with this code : abbreviatePhrase: aString | splitted | splitted := aString splitOn: [ :char | char = Character space or: [ char = $- or: [ char = $_ ] ] ]. ^ Strin

Re: [Pharo-users] can I write this without the three if then;s

2019-12-27 Thread Roelof Wobben via Pharo-users
-> Vn But "You Ain't Gonna Need It", so don't. On Sat, 28 Dec 2019 at 08:18, Roelof Wobben via Pharo-users wrote: Hello, Im trying to solve a challenge from exercism where I have to calculate the points somehow gets on a very simple darts board. I solved it like

Re: [Pharo-users] uses or instead of a searching literal

2019-12-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 27-12-2019 om 23:33 schreef Richard O'Keefe: aString splitOn: ' -_' asSet Hello Richard, Thanks again , I find this  "aString splitOn: '_- `  asSet "   much cleaner but on some way I does not  split for example  'Portable Network Graphics' into  " #(Portable, Netwo

Re: [Pharo-users] uses or instead of a searching literal

2019-12-28 Thread Roelof Wobben via Pharo-users
‘examples' mode is useful. try: ‘aaa_bbb-ccc’. ‘_-‘. #(‘aaa’ ‘bbb’ ‘ccc’)  Best, Kasper On 28 December 2019 at 08.12.03, Roelof Wobben via Pharo-users (pharo-users@lists.phar

Re: [Pharo-users] uses or instead of a searching literal

2019-12-28 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello  Sven, Thanks. this is what im looking for. Roelof Op 28-12-2019 om 10:46 schreef Sven Van Caekenberghe: I would go for 'Portable Network Graphics' findTokens: ' -_'. On 28 Dec 2019, at 09:35, Roelof Wobben via Pharo-users wrote:

[Pharo-users] how to change data on real data but not on test data

2019-12-28 Thread Roelof Wobben via Pharo-users
--- Begin Message --- I have this code so solve a challenge of Advent Of Code : process: anArray | op | ram := (anArray splitOn: ',') collect: [ :ea | ea asInteger ]. in := ReadStream on: ram. [ (op := in next) = 99 ] whileFalse: [ self processOpcod

Re: [Pharo-users] how to change data on real data but not on test data

2019-12-28 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Oke Maybe it is better to give the whole challenge On the way to your gravity assist around the Moon, your ship computer beeps angrily about a "1202 program alarm". On the radio, an Elf is already explaining

[Pharo-users] why is masses not found?

2019-12-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Im still trying to make part1 of day2 working at a way I can also test things. the tests are working but when I call on the class side the method which should reed the masses which are on the instanc side , the masses cannnot be found. So question 1 is why is mas

Re: [Pharo-users] why is masses not found?

2019-12-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Thanks. I think I misunderstood you. There is a instance method called masses where all the numbers are mentioned. The class variable masses that I used there was just because masses were not understood but that one can be deleted. Roelof Op 31-12-2019 om 12:18 schre

Re: [Pharo-users] why is masses not found?

2019-12-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- nope, Then masses is still not understood , I tried that already and tried it a few moments ago. Roelof Op 31-12-2019 om 12:30 schreef jtuc...@objektfabrik.de: Roelof, I didn't import your code, just read the .st file in an editor, and I'm not an expert in Pharo sou

Re: [Pharo-users] why is masses not found?

2019-12-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- I solved it but I think with ugly code on the class side. solution     | computer |     computer := self new.     computer readRam: computer masses.     computer patchRam: 1 value: 12.     computer patchRam: 2 value: 2.     computer processData: computer ram.     computer at

Re: [Pharo-users] why is masses not found?

2020-01-01 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have it now working but as you said there is a lot of code smells and my exact question is how to get rid of them. solution | computer | computer := self new. computer readRam: computer masses. computer patchRam: 1 value: 12. computer pat

Re: [Pharo-users] why is masses not found?

2020-01-02 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-1-2020 om 17:27 schreef Roelof Wobben via Pharo-users: Hello, I made some changes. Is this better or are there still some code smells. Code : https://github.com/rwobben/intComputer/blob/master/AOC%202019

Re: [Pharo-users] why is masses not found?

2020-01-02 Thread Roelof Wobben via Pharo-users
thub.com/rwobben/intComputer/blob/master/AOC%202019/IntComputer.class.st#L82) Well done. cheers -ben On Thu, 2 Jan

[Pharo-users] why is my css not found in a seaside project

2020-01-04 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have this in my library class on the instance side : updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot stylesheet url: self class / #mainCss. anHtmlRoot _javascript_ url: self class / #mainJs

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-04 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Yes. it is callled Roelof Op 4-1-2020 om 11:48 schreef Sven Van Caekenberghe: Try putting a breakpoint inside the #updateRoot: of your library class. Is it even called ? On 4 Jan 2020, at 11:17, Roelof Wobben via Pharo-users wrote: From: Roelof Wobben Subject

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-04 Thread Roelof Wobben via Pharo-users
020, at 11:58, Roelof Wobben via Pharo-users wrote: From: Roelof Wobben Subject: Re: [Pharo-users] why is my css not found in a seaside project Date: 4 January 2020 at 11:58:46 GMT+1 To: Any question about pharo is welcome Yes. it is callled Roelof Op 4-1-2020 om 11:48 schreef Sven Van Ca

[Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-04 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, For a exercism challenge I need to calculate the total grains on a chessboard. So I did : atSquare: anInteger     self validateInput: anInteger.     ^ anInteger = 1         ifTrue: [ 1 ]         ifFalse: [ 2 * (self atSquare: anInteger - 1) ] but when I run the t

Re: [Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-04 Thread Roelof Wobben via Pharo-users
, 2020 at 9:47 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello, For a exercism challenge I need to calculate the total grains on a chessboard. So

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-04 Thread Roelof Wobben via Pharo-users
urLibrary; On 4 Jan 2020, at 11:58, Roelof Wobben via Pharo-users wrote: From: Roelof Wobben Subject: Re: [Pharo-users] why is my css not found in a seaside project Date: 4 January 2020 at 11:58:46 GMT+1 To: Any question about pharo is welcome Yes. it is callled Roelof Op 4-1-2020 om 11

Re: [Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-04 Thread Roelof Wobben via Pharo-users
Roelof Op 4-1-2020 om 20:33 schreef Richard Sargent: On Sat, Jan 4,

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-04 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 4-1-2020 om 22:48 schreef Sven Van Caekenberghe: | app | app := WAAdmin register: YourWAComponent asApplicationAt: 'my-app'. app addLibrary: YourLibrary; Oke, so like I did in my last commit here : https://github.com/RoelofWobben/paintings but still I do n

Re: [Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Thanks. I know that im at that stage and like I said I have the feeling that Im at the stage for more then a half year. I think I know a lot of pieces but need some help to see how the pieces could help me to solve the more complex problems. But maybe  I want to fast a

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Oke if I understand that article  I have to put this : initialize (WAAdmin register: self asApplicationAt: 'reddit') preferenceAt: #sessionClass put: RedditSession; addLibrary: RedditFileLibrary in the class side of the library

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 5-1-2020 om 11:36 schreef Roelof Wobben via Pharo-users: hmm, It looks like I had to do it like this : https://github.com/RoelofWobben/paintings for registering the project but I see then that the rootcomponent is not changed and that still the css is not found or

Re: [Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-05 Thread Roelof Wobben via Pharo-users
note that you are calling validateInput repeatedly. Why? On Sun, 5 Jan 2020 at 07:41, Roelof Wobben via Pharo-users wrote: Oke, So I can better not use recursion for this problem if I understand you well, Richard. Roelof Op 4-1-2020 om 19:02 schreef Richard Sargent: On Sat, Jan 4, 2020

Re: [Pharo-users] can I make this so the vm would not be not responsibe when running the tests

2020-01-05 Thread Roelof Wobben via Pharo-users
r such a method works by recursion, iteration, or gangs of otherwise seasonally unemployed Christmas elves. In my own Smalltalk library, (GeometricSeries new: 64 from: 1 byFactor: 2) sum only takes 15 microseconds. I do note that you are calling validateInput repeatedly. Why? On Sun, 5 Jan 20

Re: [Pharo-users] why is my css not found in a seaside project

2020-01-05 Thread Roelof Wobben via Pharo-users
still the wrong way ? Roelof Op 5-1-2020 om 12:48 schreef Roelof Wobben: Op 5-1-2020 om 11:36 schreef Roelof Wobben via Pharo-users: hmm, It looks like I had to do it like this : https://github.com/RoelofWobben/paintings for registering the project but I see then that the rootcomponent is n

[Pharo-users] is this better regarding naming thigs

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello In a earlier question I get a remark to think better about naming things. Now I did  a challene where I have to find anagrams of a given word in a collection, So I did this : findAnagramsCandidates: aCollection subject: aWord     | charBag |     charBag := aWord as

[Pharo-users] [seaside] how can I now make the best work to display all the paiintings which are in the paintings collection

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Im a little bit further on my first project but now I fail to see how I can use the ListComponent to display all the paintings that are in the paintings collection on the Paintings class. Anyone who can give me hints on this ? Roelof --- End Message ---

Re: [Pharo-users] is this better regarding naming thigs

2020-01-05 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Nice to see that someone who ask another question on my question but do i get a answer on my question too. So if the naming is better now. Roelof Op 6-1-2020 om 02:18 schreef xap: "but all objects respond to value..."; thx, Santiago -- that makes more sense, th

Re: [Pharo-users] is this better regarding naming thigs

2020-01-06 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 6-1-2020 om 09:34 schreef xap: hi Roelof, i didn't mean to hijack your thread, sorry -- my question was directed at you, then kinda took on a life of its own. That said, Sven had/has responded to your op (original post), no? One additional change I would make: rename "f

Re: [Pharo-users] is this better regarding naming thigs

2020-01-06 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Thanks. I have missed that one. Thanks for pointing it to me. Roelof Op 6-1-2020 om 13:13 schreef xap: Here's the permalink to Sven's response (in case it still isn't visible to you): http://forum.world.st/is-this-better-regarding-naming-thigs-tp5109389p5109392.html -

[Pharo-users] mentor wanted

2020-04-23 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I like Pharo a lot but I hit a wall very often. With complex problems I do not see how to solve things in small steps. Is there somewhere who is willing to mentor me in how I can overcome that problem. Roelof --- End Message ---

Re: [Pharo-users] mentor wanted

2020-04-23 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 23-4-2020 om 20:52 schreef Richard Sargent: On Thu, Apr 23, 2020 at 3:32 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] mentor wanted

2020-04-23 Thread Roelof Wobben via Pharo-users
chreef Richard Sargent: On Thu, Apr 23, 2020 at 3:32 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] mentor wanted

2020-04-23 Thread Roelof Wobben via Pharo-users
oelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello, I like Pharo a lot but

Re: [Pharo-users] mentor wanted

2020-04-23 Thread Roelof Wobben via Pharo-users
at 3:32 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello,

Re: [Pharo-users] mentor wanted

2020-04-24 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 24-4-2020 om 09:49 schreef Hilaire: Find it. It is a chapter of the book Squeak, Open Personal Computing and Multimedia http://sdmeta.gforge.inria.fr/FreeBooks/GuzdialBookDrafts/DesignObjects-ch4.pdf L

Re: [Pharo-users] mentor wanted

2020-04-25 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 25-4-2020 om 08:30 schreef Richard Sargent: On Fri, Apr 24, 2020, 22:25 Richard O'Keefe wrote: Roelof, I don't thin

[Pharo-users] mentor question 1

2020-04-25 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, Im doing the OOP book written by Ducassse and im now stuck at the network-simulator. Code so far can be found here : https://github.com/RoelofWobben/Network-simulator Im stuck at 2 places 1) What for datatype is loopba

Re: [Pharo-users] mentor question 1

2020-04-25 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 25-4-2020 om 20:04 schreef tbrunz: 1. 'loopback' is a node, just like 'source' and 'destination'. A network is a mesh of 'nodes' joined by 'links'. Your Pharo program represents one of those nodes: It is the 'loopback' node. oke, so I can do : loopback := KNetworkNode

Re: [Pharo-users] mentor question 1

2020-04-25 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 25-4-2020 om 20:17 schreef Roelof Wobben: Op 25-4-2020 om 20:04 schreef tbrunz: 1. 'loopback' is a node, just like 'source' and 'destination'.  A network is a mesh of 'nodes' joined by 'links'.  Your Pharo program represents one of those nodes: It is the 'loopback' nod

Re: [Pharo-users] mentor wanted

2020-04-26 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 26-4-2020 om 06:30 schreef Richard O'Keefe: Roelof, *I* was offering to write something. On Sat, 25 Apr 2020 at 19:47, Roelof Wobben via Pharo-users wrote: Op 25-4-2020 om 08:30 schreef Richard Sargent: On Fri, Apr 24, 2020, 22:25 Richard O'Keefe wrote:

[Pharo-users] mentor question 2.

2020-04-26 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have to make some code that convert a binary to a decimal and im not allowed to use the convert methods that Pharo has. So I have written this : decimalFromBinary: aString     | result isValid |     isValid = self isValidBinary: aString.     isValid         ifT

Re: [Pharo-users] mentor question 2.

2020-04-26 Thread Roelof Wobben via Pharo-users
01' includes: c ] On Sun, Apr 26, 2020 at 2:52 PM Roelof Wobben via Pharo-users wrote: Hello, I have to make some code that convert a binary to a decimal and im not allowed to use the convert methods that Pharo has. So I have written this : decimalFromBinary: aString | result isV

[Pharo-users] how can I test this

2020-04-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have to test the server which should return the string but then in uppercase. So far I have this : https://github.com/RoelofWobben/Network-simulator/blob/master/src/NetworkSimulator-Tests/KANetworkTest.class.st#L79 but I fail to see how I can test that the pac

Re: [Pharo-users] mentor question 2.

2020-04-27 Thread Roelof Wobben via Pharo-users
.   Peter Kenny   From: Pharo-users On Behalf Of Roelof Wobben via Pharo-users Sent: 26 April 2020 19:52 To: pharo-users@lists.pharo.org Cc: Roelof Wobben Subject: Re: [Pharo-users

Re: [Pharo-users] mentor question 2.

2020-04-27 Thread Roelof Wobben via Pharo-users
  From: Pharo-users On Behalf Of Roelof Wobben via Pharo-users Sent: 27 April 2020 12:23 To: pharo-users@lists.pharo.org Cc: Roelof Wobben Subject: Re: [Pharo-users] mentor question 2

[Pharo-users] can I divide a string into part of exactly n length

2020-04-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I wonder if it is possible in Pharo to divide a string in lets say part of 3. so this :  'abcdefgh' would be  'abc def gh` Regards, Roelof --- End Message ---

Re: [Pharo-users] how can I test this

2020-04-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 27-4-2020 om 18:28 schreef Richard Sargent: On Mon, Apr 27, 2020 at 1:56 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] can I divide a string into part of exactly n length

2020-04-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 27-4-2020 om 19:05 schreef Richard Sargent: On Mon, Apr 27, 2020 at 9:27 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] how can I test this

2020-04-27 Thread Roelof Wobben via Pharo-users
chreef Richard Sargent: On Mon, Apr 27, 2020 at 1:56 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] how can I test this

2020-04-27 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 27-4-2020 om 19:50 schreef Roelof Wobben via Pharo-users: This seems to be working testKaNetWorkServer     | srcNode destNode link packet link2 packet2 recievedPackage |     srcNode := KANetworkNode withAddress: #src.     destNode := KANetworkServer withAddress: #dest

[Pharo-users] mentor question 3 is there a formula for this

2020-04-28 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I try now to solve this one : ntroduction The diamond kata takes as its input a letter, and outputs it in a diamond shape. Given a letter, it prints a diamond starting with 'A', with the supplied

Re: [Pharo-users] mentor question 3 is there a formula for this

2020-04-28 Thread Roelof Wobben via Pharo-users
iterate ($A to: $C), ($(C-1) to: $A by: -1) and do the arithmetic. On Tue, Apr 28, 2020 at 1:23 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello, I try now to solve this o

Re: [Pharo-users] mentor question 3 is there a formula for this

2020-04-29 Thread Roelof Wobben via Pharo-users
On Tue, Apr 28, 2020 at 1:23 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Hello, I try now to solve this one :

[Pharo-users] mentor question 4

2020-04-29 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I hope I can discuss my approch to this problem : Given a number determine whether or not it is valid per the Luhn formula. The Luhn algorithm is a simple checksum formula used to validate a variety of identification

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 10:31 schreef Ben Coman: collection := '8569 2478 0383 3437'. (collection reverse selectWithIndex: [:item :index | (index % 2 == 0) ifTrue: [item *2]] )  inspect I see a error and the non-even numbers are nill now. but after some figgeling this seems to

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 10:57 schreef Ben Coman: On Thu, 30 Apr 2020 at 16:46, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 15:10 schreef Stéphane Ducasse: It looks like a cool problem from where did you take it? I hope I can discuss my approch to this problem :

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 15:10 schreef Stéphane Ducasse: It looks like a cool problem from where did you take it? I hope I can discuss my approch to this problem :

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 16:06 schreef Richard O'Keefe: This sounds very much like the Luhn test task at RosettaCode. https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers except that there it is described as working on the digits of an integer. (1) There are two approaches

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 16:16 schreef Roelof Wobben: nextIsOdd := true. aString reverseDo: [:digit | digit = Character space ifFalse: [ nextIsOdd ifTrue:  [oddSum := ...] ifFalse: [evenSum := ...]. nextIsOdd := nextIsOdd not]

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- and also not with this one : cardNumber := '4539 1488 0343 6467'. oddSum := 0. evenSum := 0. nextIsOdd := false. cardNumber reverseDo: [:digit | digit = Character space ifFalse: [ nextIsOdd ifFalse:  [oddSum := oddSum + (digit asString asI

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 30-4-2020 om 20:19 schreef Richard Sargent: See below. On Thu, Apr 30, 2020 at 10:58 AM Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org>

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-5-2020 om 02:51 schreef Richard O'Keefe: (oddSum + evenSum) dividedBy: 10 You previously had _ isDivisibleBy: 10 which certainly works. Squeak, Pharo, and ST/X have #isDivisibleBy: VisualWorks. Dolphin, and GNU Smalltalk do not. Here's the code from Number.st in ST/X

Re: [Pharo-users] mentor question 4

2020-05-02 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-5-2020 om 08:35 schreef Roelof Wobben: Op 1-5-2020 om 02:51 schreef Richard O'Keefe: (oddSum + evenSum) dividedBy: 10 You previously had _ isDivisibleBy: 10 which certainly works. Squeak, Pharo, and ST/X have #isDivisibleBy: VisualWorks. Dolphin, and GNU Smalltalk do

Re: [Pharo-users] mentor question 4

2020-05-02 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 2-5-2020 om 19:33 schreef Ben Coman: On Sat, 2 May 2020 at 15:52, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Op 1-5-2

Re: [Pharo-users] mentor question 4

2020-05-02 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 2-5-2020 om 21:09 schreef Roelof Wobben via Pharo-users: but this seems to work : cardNumber := '4539 1488 0343 6467'. cleanDigits := cardNumber copyWithout: Character space. preWrapDigits := (cleanDigits asArray reverse collectWithIndex: [ :char :idx |

Re: [Pharo-users] mentor question 4

2020-05-03 Thread Roelof Wobben via Pharo-users
wrote: Op 2-5-2020 om 19:33 schreef Ben Coman: On Sat, 2 May 2020 at 15:52, Roelof Wobben via Pharo

Re: [Pharo-users] mentor question 4

2020-05-03 Thread Roelof Wobben via Pharo-users
May 2020 at 15:52, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote: Op 1-5-2020 om 08

[Pharo-users] mentor help continued

2020-07-14 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Sorry that you did not hear from me a long time but I was in a dark place for a long time. but im back and have a question I have to make a clock so the seconds and minutes schould not be above 60, How can I take care of that ? and can I put the code here on the class si

[Pharo-users] How can I do this. Put files on the right place on a repo

2020-08-24 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have a repo and in that repo I have a directory named /src/concepts where all the concept challenges must be placed later on there will also a directory named /src/practice where all the practice challenges are

[Pharo-users] how to structure this project

2020-08-29 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I want to make my first app with seaside and a database, as database I use Postgres with the P3 driver of Glorp. So I have a class Customer with the instance variables. And  I have a Descriptorclass which takes care of the database. And  I want to make a class which

[Pharo-users] mentoring continued I hope

2020-08-30 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have this challenge from exercism : https://github.com/exercism/pharo-smalltalk/tree/master/exercises/clock and this function is given : hour: anInteger minute: anInteger2     self shouldBeImplemented Schould I make it on this class method work that the minute

[Pharo-users] mentoring contined I hope

2020-08-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- I would argue against that approach. Make it a requirement that a given API must be used with correct values. e.g. #hours:minutes: requires hours between 00 and 23 and minutes between 00 and 59

Re: [Pharo-users] mentoring contined I hope

2020-08-31 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-9-2020 om 00:22 schreef Richard Sargent: On Mon, Aug 31, 2020 at 3:10 PM Roelof Wobben wrote: Op 31-8-2020 om 23:45 schreef Richard

Re: [Pharo-users] mentoring contined I hope

2020-09-01 Thread Roelof Wobben via Pharo-users
--- Begin Message --- oke, then I would work with hour and minutes as the challenge wanted, So still on the class side make code that convert any given hour and minute to a valid one ?

Re: [Pharo-users] mentoring contined I hope

2020-09-01 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-9-2020 om 21:11 schreef Richard Sargent: You will discover an error when you write your tests, but that's fine. It's why you write tests. :-) #validateTime:minute: is a poor name choice for a few reasons. - there is no validation going on. Validation would report an e

Re: [Pharo-users] mentoring contined I hope

2020-09-01 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Op 1-9-2020 om 21:40 schreef Roelof Wobben: Op 1-9-2020 om 21:11 schreef Richard Sargent: You will discover an error when you write your tests, but that's fine. It's why you write tests. :-) #valida

[Pharo-users] Can it do this way ?

2020-09-01 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Hello, I have now a challenge where I have to validate a ISBN number. Can I do something like this on the class side : (string isEmpty)    ifTrrue: [ ^ false]   ifFalse:  [ digits:= something.    controlDigit := something.    self validateIS

Re: [Pharo-users] Can it do this way ?

2020-09-02 Thread Roelof Wobben via Pharo-users
--- Begin Message --- Yep, I know that isValidIsbn is the method that must output if a isbn is valid or not. What I want to do is take the first 9 characters out so I can convert them to a array of numbers where I can do the calculation on. And take out the last char so I can seperate test if t

  1   2   >