Re: [Pharo-users] NeoCSV - how to parse a string with unescaped quoted string inside it?

2020-04-30 Thread Sven Van Caekenberghe
Hi Paul, Quotes inside quoted fields must be doubled. See #readQuotedField and #readEndOfQuotedField specifically. See also #testEmbeddedQuotes This is according to https://en.wikipedia.org/wiki/Comma-separated_values and https://tools.ietf.org/html/rfc4180 HTH, Sven BTW: the latest

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 wrote:

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

[Pharo-users] NeoCSV - how to parse a string with unescaped quoted string inside it?

2020-04-30 Thread PAUL DEBRUICKER
Hi - This is on Pharo 7 with Neo-CSV-Core-SvenVanCaekenberghe.28 In a CSV file I have several instances of records like "123","asdf", "one two "three" four five", "5678" When that line is parsed instead of an Array with 4 records '123' 'asdf' 'one two "three" four five' '5678' I

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

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Richard Sargent
See below. On Thu, Apr 30, 2020 at 10:58 AM Roelof Wobben via Pharo-users < pharo-users@lists.pharo.org> wrote: > and also not with this one : > > cardNumber := '4539 1488 0343 6467'. > oddSum := 0. > evenSum := 0. > nextIsOdd := false. > cardNumber reverseDo: [:digit | > digit =

[Pharo-users] Package Browser (AKA 6-paned Browser) and Pharo package organization

2020-04-30 Thread step...@heaveneverywhere.com
Hello friends, I’m getting started with Pharo after decades using VisualWorks and Squeak; it’s pretty wonderful what you all have assembled! My question is related to what we used to teach as the first law of software reuse: “You can’t reuse it if you can’t find it,” and the related software

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Pablo Navarro
I proposed as alternative to Luhn check. In special to validation problems like credit card number validation. El jue., 30 abr. 2020 11:11, Richard O'Keefe escribió: > I'm sure you could fit regular expressions into the Luhn check, > but I am rather mystified as to what one could possibly gain

[Pharo-users] [ANN] Willow v13.0.0 [v13.0.0] released!

2020-04-30 Thread Buenos Aires Smalltalk
Willow, the web interaction library that eases the burden of creating ajax-based web applications reached it's v13.0.0 version. Breaking Changes Updated Seaside to v3.4.x Updated Boardwalk to v5 Updated RenoirSt to v7 Non breaking changes Updated jQuery to v3.5.0 (fixes some security

Re: [Pharo-users] mentor question 4

2020-04-30 Thread 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. isDivisibleBy:aNumber "return true, if the receiver can be

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Pablo Navarro
Hello!. For this problem is possible to use Regular Expressions too. https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/Regex/Regex.html Saludos, Pablo. El 30 de abr. de 2020 10:11 -0300, Stéphane Ducasse , escribió: > It looks like a cool

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 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 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 : > > Given a number determine whether or not it is valid per the Luhn formula. > > The Luhn algorithm is a simple > checksum formula used

Re: [Pharo-users] Automating release announcements

2020-04-30 Thread Gabriel Cotelli
I finally figure out how to make it work. For this mailing list you have to send the e-mail in CC and not BCC, because if not it gets retained awaiting for moderator approval. In case anyone is interested here is the GitHub action making the magic:

[Pharo-users] [ANN] RenoirSt v7.0.1 [v7.0.1] released!

2020-04-30 Thread Buenos Aires Smalltalk
RenoirSt, a dsl enabling programmatic cascading style sheet generation for pharo smalltalk reached it's v7.0.1 version. Changelog Updated Seaside version to v3.4.x Renamed RenoirSt package to RenoirSt-Core to ease portability Improved documentation Use GitHub actions instead of TravisCI Use

Re: [Pharo-users] mentor question 4

2020-04-30 Thread 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 to traversing a sequence in reverse. (A) Reverse the sequence,

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 Richard O'Keefe
I'm sure you could fit regular expressions into the Luhn check, but I am rather mystified as to what one could possibly gain by doing so. How do you do the equivalent of #(0 2 4 6 8 1 3 5 7 9) at: char digitValue + 1 in a regular expression and why would you want to? On Fri, 1 May 2020 at

[Pharo-users] mentor question 4

2020-04-30 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:57 schreef Ben Coman: On Thu, 30 Apr 2020 at 16:46, Roelof Wobben via Pharo-users wrote: Op

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 Ben Coman
On Thu, 30 Apr 2020 at 16:46, Roelof Wobben via Pharo-users < pharo-users@lists.pharo.org> wrote: > 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

Re: [Pharo-users] mentor question 4

2020-04-30 Thread Ben Coman
On Thu, 30 Apr 2020 at 14:33, Roelof Wobben via Pharo-users < pharo-users@lists.pharo.org> wrote: > 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

[Pharo-users] Automating release announcements

2020-04-30 Thread Gabriel Cotelli
Hi!, Anyone here is moderator in the Pharo Users list? I want to automate the release announcement of projects in github/ba-st org. I'm using sendgrid to send the e-mails and I'm getting a returning mail saying: "Your message to Pharo-users awaits moderator approval". I subscribed previously to

Re: [Pharo-users] Automating release announcements

2020-04-30 Thread Stéphane Ducasse
marcus probably knows. let us what he is saying. > On 30 Apr 2020, at 13:44, Gabriel Cotelli wrote: > > Hi!, Anyone here is moderator in the Pharo Users list? > > I want to automate the release announcement of projects in github/ba-st org. > I'm using sendgrid to send the e-mails and I'm