Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  
Thanks
  
  Roelof
  
  
  Op 15-12-2018 om 21:52 schreef Nicole de Graaf:


  
  Hi Roelof,
  
  
  on my side all the test methods went green:
  
  
  changes I need to apply:
  
  
  1.  
  
  
  
checkForbiddenParts: word
	"deletes
  all the words that contain forbidden parts"


	
  ^( forbiddenWords anySatisfy: [ :forbidden | word
  includesSubstring: forbidden ]) not
  
  

  

  

  2.
  
  
  
testisNice
	"comment
  stating purpose of message"


	|
  testData |
	testData
  := #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp'
  'haegwjzuvuyypxyu').
	self
  assert: (FindNiceStrings new isNice: testData) equals:
   #('ugknbfddgicrmopn' 'aaa’)
  
  
  
  
  
  Regards,
  Nic
  
  
  

  
On 15 Dec 2018, at 19:36, Roelof Wobben  wrote:


  
   Hello, 

I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
as  my solution to a AoC challenge.


But the last test `testIsNice`  is still  outputting the
wrong output.
The right output is :   `ugknbfddgicrmopn
  ` and `aaa` 
  
  Someone who can think with me where I make a thinking
  error so that the right output is seen.
  
  Regards, 
  
  Roelof
  
 

  


  


  




Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Nicole de Graaf
Hi Roelof,

on my side all the test methods went green:

changes I need to apply:

1.  

checkForbiddenParts: word
"deletes all the words that contain forbidden parts"

 ^( forbiddenWords anySatisfy: [ :forbidden | word includesSubstring: 
forbidden ]) not



2.

testisNice
"comment stating purpose of message"

| testData |
testData := #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp' 
'haegwjzuvuyypxyu').
self assert: (FindNiceStrings new isNice: testData) equals:  
#('ugknbfddgicrmopn' 'aaa’)


Regards,
Nic



> On 15 Dec 2018, at 19:36, Roelof Wobben  wrote:
> 
> Hello, 
> 
> I have this code : 
> https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b 
> 
> as  my solution to a AoC challenge.
> 
> 
> But the last test `testIsNice`  is still  outputting the wrong output.
> The right output is :   `ugknbfddgicrmopn ` and `aaa` 
> 
> Someone who can think with me where I make a thinking error so that the right 
> output is seen.
> 
> Regards, 
> 
> Roelof
> 



Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  
isNice must look like this : 
  
  isNice: aCollection
      "comment stating purpose of message"
  
      | niceStringsObject answer |
      niceStringsObject := self class new.
      answer := aCollection
          select: [ :word | 
              (niceStringsObject checkForbiddenParts: word) not
                  and: [ (niceStringsObject checkLessThen3Vowels:
  word)
                          and: [ niceStringsObject checkOverLapping:
  word ] ] ].
      ^ answer size
  
  Roelof
  
  
  
  Op 15-12-2018 om 21:46 schreef Roelof Wobben:


  
  moment 

Does the isNice  not ends on  result nice. 

What do you then use as smalltalk version.

Roelof


Op 15-12-2018 om 21:36 schreef Nicole de Graaf:
  
  

Hi Roelof,


the result of:
FindNiceStrings new isNice: testData   >>
   #('haegwjzuvuyypxyu’).


First idee is your algo is fine, but you test
  assert correct implemented (I can be wrong side I use not
  Pharo 7 or 6) 


My implementation:


testisNice

  	"comment
stating purpose of message"
  
  
  	|
testData |
  	testData
:= #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp'
'haegwjzuvuyypxyu').
  	self
assert: (FindNiceStrings new isNice: testData) equals:
#('haegwjzuvuyypxyu’)



is working fine.


Please can you check it on your side!


Regards,
Nic

  

  On 15 Dec 2018, at 21:20, Roelof Wobben  wrote:
  
  


  You can find that one
also with the finder. 


overlappingPairsCollect: aBlock 
    "Answer the result of evaluating aBlock with all
of the overlapping pairs of my elements."
    | retval |
    retval := self species ofSize: self size - 1.
    1 to: self size - 1
        do: [:i | retval at: i put: (aBlock value:
(self at: i) value: (self at: i + 1)) ].
    ^retval

can be found at sequenceCollection.

Roelof


Op 15-12-2018 om 21:03 schreef Nicole de Graaf:
  
  

p.s. and also Array>>#overlappingPairsCollect:
 


Regards,
Nic
  

  On 15 Dec 2018, at 20:52, Nicole
de Graaf 
wrote:
  
  

Hi Roelof,
  
  
  I started to read you code ,
can you please give me the
implementation of:
ByteString>>#includesSubstring:
  
  
  Regards,
  Nic
  

  
On 15 Dec 2018, at
  19:36, Roelof Wobben 
  wrote:


  
  
Hello, 

I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
as  my solution to a AoC
challenge.


But the last test `testIsNice` 
is still  outputting the wrong
output.
The right output is :   `ugknbfddgicrmopn `
 

Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  
moment 
  
  Does the isNice  not ends on  result nice. 
  
  What do you then use as smalltalk version.
  
  Roelof
  
  
  Op 15-12-2018 om 21:36 schreef Nicole de Graaf:


  
  Hi Roelof,
  
  
  the result of:
  FindNiceStrings new isNice: testData   >>
 #('haegwjzuvuyypxyu’).
  
  
  First idee is your algo is fine, but you test assert
correct implemented (I can be wrong side I use not Pharo 7 or
6) 
  
  
  My implementation:
  
  
  testisNice
  
	"comment
  stating purpose of message"


	|
  testData |
	testData
  := #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp'
  'haegwjzuvuyypxyu').
	self
  assert: (FindNiceStrings new isNice: testData) equals:
  #('haegwjzuvuyypxyu’)
  
  
  
  is working fine.
  
  
  Please can you check it on your side!
  
  
  Regards,
  Nic
  

  
On 15 Dec 2018, at 21:20, Roelof Wobben  wrote:


  
  
You can find that one also
  with the finder. 
  
  
  overlappingPairsCollect: aBlock 
      "Answer the result of evaluating aBlock with all
  of the overlapping pairs of my elements."
      | retval |
      retval := self species ofSize: self size - 1.
      1 to: self size - 1
          do: [:i | retval at: i put: (aBlock value:
  (self at: i) value: (self at: i + 1)) ].
      ^retval
  
  can be found at sequenceCollection.
  
  Roelof
  
  
  Op 15-12-2018 om 21:03 schreef Nicole de Graaf:


  
  p.s. and also Array>>#overlappingPairsCollect:  
  
  
  Regards,
  Nic

  
On 15 Dec 2018, at 20:52, Nicole
  de Graaf 
  wrote:


  
  Hi Roelof,


I started to read you code ,
  can you please give me the implementation
  of: ByteString>>#includesSubstring:


Regards,
Nic

  

  On 15 Dec 2018, at
19:36, Roelof Wobben 
wrote:
  
  

 Hello,
  
  
  I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
  as  my solution to a AoC
  challenge.
  
  
  But the last test `testIsNice`  is
  still  outputting the wrong
  output.
  The right output is :   `ugknbfddgicrmopn ` and
`aaa` 

Someone who can think with me
where I make a thinking error so
that the right output is seen.

Regards, 

Roelof

   
  

  

  

  


  


  

  


  


  




Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Nicole de Graaf
Hi Roelof,

the result of:
FindNiceStrings new isNice: testData   >>  #('haegwjzuvuyypxyu’).

First idee is your algo is fine, but you test assert correct implemented (I can 
be wrong side I use not Pharo 7 or 6) 

My implementation:

testisNice
"comment stating purpose of message"

| testData |
testData := #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp' 
'haegwjzuvuyypxyu').
self assert: (FindNiceStrings new isNice: testData) equals: 
#('haegwjzuvuyypxyu’)

is working fine.

Please can you check it on your side!

Regards,
Nic

> On 15 Dec 2018, at 21:20, Roelof Wobben  wrote:
> 
> You can find that one also with the finder. 
> 
> 
> overlappingPairsCollect: aBlock 
> "Answer the result of evaluating aBlock with all of the overlapping pairs 
> of my elements."
> | retval |
> retval := self species ofSize: self size - 1.
> 1 to: self size - 1
> do: [:i | retval at: i put: (aBlock value: (self at: i) value: (self 
> at: i + 1)) ].
> ^retval
> 
> can be found at sequenceCollection.
> 
> Roelof
> 
> 
> Op 15-12-2018 om 21:03 schreef Nicole de Graaf:
>> p.s. and also Array>>#overlappingPairsCollect:  
>> 
>> Regards,
>> Nic
>> 
>>> On 15 Dec 2018, at 20:52, Nicole de Graaf >> > wrote:
>>> 
>>> Hi Roelof,
>>> 
>>> I started to read you code , can you please give me the implementation of: 
>>> ByteString>>#includesSubstring:
>>> 
>>> Regards,
>>> Nic
>>> 
 On 15 Dec 2018, at 19:36, Roelof Wobben >>> > wrote:
 
 Hello, 
 
 I have this code : 
 https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b 
 
 as  my solution to a AoC challenge.
 
 
 But the last test `testIsNice`  is still  outputting the wrong output.
 The right output is :   `ugknbfddgicrmopn ` and `aaa` 
 
 Someone who can think with me where I make a thinking error so that the 
 right output is seen.
 
 Regards, 
 
 Roelof
 
>> 
> 



Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  
You can find that one also with the
  finder. 
  
  
  overlappingPairsCollect: aBlock 
      "Answer the result of evaluating aBlock with all of the
  overlapping pairs of my elements."
      | retval |
      retval := self species ofSize: self size - 1.
      1 to: self size - 1
          do: [:i | retval at: i put: (aBlock value: (self at: i)
  value: (self at: i + 1)) ].
      ^retval
  
  can be found at sequenceCollection.
  
  Roelof
  
  
  Op 15-12-2018 om 21:03 schreef Nicole de Graaf:


  
  p.s. and also Array>>#overlappingPairsCollect:  
  
  
  Regards,
  Nic

  
On 15 Dec 2018, at 20:52, Nicole de Graaf  wrote:


  
  Hi
Roelof,


I started to read you code , can you
  please give me the implementation of:
  ByteString>>#includesSubstring:


Regards,
Nic

  

  On 15 Dec 2018, at 19:36, Roelof
Wobben 
wrote:
  
  


  Hello, 
  
  I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
  as  my solution to a AoC challenge.
  
  
  But the last test `testIsNice`  is still 
  outputting the wrong output.
  The right output is :   `ugknbfddgicrmopn
` and `aaa` 

Someone who can think with me where I make a
thinking error so that the right output is
seen.

Regards, 

Roelof

   
  

  

  

  


  


  




Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Nicole de Graaf
Hi Roelof,

Question:
With your “fileout” can I run all test. (Green) 
or only the last one #testisNice.

I started  with: #test1CheckForForbiddenParts  that is failing .. the substring 
is not in the input!


Regards,
Nic



 
> 
> 
> 
> Op 15-12-2018 om 20:52 schreef Nicole de Graaf:
>> Hi Roelof,
>> 
>> I started to read you code , can you please give me the implementation of: 
>> ByteString>>#includesSubstring:
>> 
>> Regards,
>> Nic
>> 
>>> On 15 Dec 2018, at 19:36, Roelof Wobben >> > wrote:
>>> 
>>> Hello, 
>>> 
>>> I have this code : 
>>> https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b 
>>> 
>>> as  my solution to a AoC challenge.
>>> 
>>> 
>>> But the last test `testIsNice`  is still  outputting the wrong output.
>>> The right output is :   `ugknbfddgicrmopn ` and `aaa` 
>>> 
>>> Someone who can think with me where I make a thinking error so that the 
>>> right output is seen.
>>> 
>>> Regards, 
>>> 
>>> Roelof
>>> 
>> 
> 



Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  

  of course
  
  includesSubstring: substring
      "Returns whether the receiver contains the argument."
      "('abcdefgh' includesSubstring: 'de') >>> true"
      
      ^ substring isEmpty or: [ (self findString: substring
  startingAt: 1) > 0 ]
  
  It can be found in the class String with finder 
  
  Roelof
  
  
  Op 15-12-2018 om 20:52 schreef Nicole de Graaf:


  
  Hi Roelof,
  
  
  I started to read you code , can you please give me
the implementation of: ByteString>>#includesSubstring:
  
  
  Regards,
  Nic
  

  
On 15 Dec 2018, at 19:36, Roelof Wobben  wrote:


  
   Hello, 

I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
as  my solution to a AoC challenge.


But the last test `testIsNice`  is still  outputting the
wrong output.
The right output is :   `ugknbfddgicrmopn
  ` and `aaa` 
  
  Someone who can think with me where I make a thinking
  error so that the right output is seen.
  
  Regards, 
  
  Roelof
  
 

  


  


  




Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Nicole de Graaf
p.s. and also Array>>#overlappingPairsCollect:  

Regards,
Nic

> On 15 Dec 2018, at 20:52, Nicole de Graaf  wrote:
> 
> Hi Roelof,
> 
> I started to read you code , can you please give me the implementation of: 
> ByteString>>#includesSubstring:
> 
> Regards,
> Nic
> 
>> On 15 Dec 2018, at 19:36, Roelof Wobben > > wrote:
>> 
>> Hello, 
>> 
>> I have this code : 
>> https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b 
>> 
>> as  my solution to a AoC challenge.
>> 
>> 
>> But the last test `testIsNice`  is still  outputting the wrong output.
>> The right output is :   `ugknbfddgicrmopn ` and `aaa` 
>> 
>> Someone who can think with me where I make a thinking error so that the 
>> right output is seen.
>> 
>> Regards, 
>> 
>> Roelof
>> 



Re: [Pharo-users] some help to find the bug

2018-12-15 Thread Nicole de Graaf
Hi Roelof,

I started to read you code , can you please give me the implementation of: 
ByteString>>#includesSubstring:

Regards,
Nic

> On 15 Dec 2018, at 19:36, Roelof Wobben  wrote:
> 
> Hello, 
> 
> I have this code : 
> https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b 
> 
> as  my solution to a AoC challenge.
> 
> 
> But the last test `testIsNice`  is still  outputting the wrong output.
> The right output is :   `ugknbfddgicrmopn ` and `aaa` 
> 
> Someone who can think with me where I make a thinking error so that the right 
> output is seen.
> 
> Regards, 
> 
> Roelof
> 



[Pharo-users] some help to find the bug

2018-12-15 Thread Roelof Wobben

  
  
Hello, 

I have this code :
https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
as  my solution to a AoC challenge.


But the last test `testIsNice`  is still  outputting the wrong
output.
The right output is :   `ugknbfddgicrmopn ` and `aaa` 
  
  Someone who can think with me where I make a thinking error so
  that the right output is seen.
  
  Regards, 
  
  Roelof
  

  




Re: [Pharo-users] Discussion on life logger applications (from Geolocalization apps to MicroPub) => Are people interested in porting apps from https://indieweb.org/p3k ?

2018-12-15 Thread Roelof Wobben

  
  
Fine with me. 
  
  I almost the whole day on discord expecially the learning channels
  under the name ` Roelof Wobben` 
  
  Roelof
  
  
  Op 15-12-2018 om 14:54 schreef Cédrick Béler:


  
  Perfect. 
  
  
  Maybe we can try on MicroPub next week ? I’ll be a
bit available. I’ll ask on Discord too at the time.
  
  
  Cheers,
  Cédrick
  

  
Le 15 déc. 2018 à 13:18, Roelof Wobben  a écrit
  :


  
  
Hello, 
  
  I maybe could help you but Im a super beginner in
  Pharo but eager to learn. 
  
  Roelof 
  
  Op 15-12-2018 om 12:51 schreef Cédrick Béler:


  
  
  Hi
all,


I was looking for iOS geolocalization
  app on GitHub and found Overland from Aaron
  Parecki.
https://github.com/aaronpk?tab=repositories


Cool app that can send straight to a
  Pharo image gps points. So perfect as a basis to
  build a cool tool for my students and research
  projects...



What was even more interesting is that
  exploring Aaron web site, I realized the guy store
  his digital life I an private manner like I would
  love for years...
https://aaronparecki.com/gps/ 
https://aaronparecki.com/ate 
https://aaronparecki.com/drank


<_iMac5K-
2018-12-15 à 12.47.32.png>


I then found several tools I find cool
  and that I would like to port eventually (it’s in
  PHP right now) to build a life logger.


I learned in the process about
  micropub which seems to be a good tool to post
  with a little semantic to a server (micro format
  based).
https://micropub.net/draft/ 
https://indieweb.org/Micropub 


*** Do people know if we have
  implementations out there of the
  micropub/microformat tools ?


*** Do you find them interesting ? Who
  would be interested eventually to help me port
  such kind of librairies (from there mostly https://indieweb.org/p3k) ?
http://atlas.p3k.io 
https://github.com/aaronpk/Quill 
https://quill.p3k.io/docs/note 
https://indieweb.org/XRay 


Cheers,


Cédrick


  


  

  


  


  




Re: [Pharo-users] NeoCSV

2018-12-15 Thread Sven Van Caekenberghe
You can use https://github.com/svenvc/NeoCSV

> On 15 Dec 2018, at 17:03, horrido  wrote:
> 
> I'm trying to load NeoCSV and I'm running into all kinds of problems. First,
> Catalog Browser will not install it – it fails silently.
> 
> Second, the following fails with "Could not resolve: Neo-CSV-Core in
> '/home/richard/pharo blah blah blah":
> 
> Gofer it
>   smalltalkhubUser: 'SvenVanCaekenberghe' project: 'Neo';
>   configurationOf: 'NeoCSV';
>   loadStable.
> 
> What am I missing?

One of my repos went down and won't be back immediately.

> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html




[Pharo-users] NeoCSV

2018-12-15 Thread horrido
I'm trying to load NeoCSV and I'm running into all kinds of problems. First,
Catalog Browser will not install it – it fails silently.

Second, the following fails with "Could not resolve: Neo-CSV-Core in
'/home/richard/pharo blah blah blah":

Gofer it
   smalltalkhubUser: 'SvenVanCaekenberghe' project: 'Neo';
   configurationOf: 'NeoCSV';
   loadStable.

What am I missing?



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] Discussion on life logger applications (from Geolocalization apps to MicroPub) => Are people interested in porting apps from https://indieweb.org/p3k ?

2018-12-15 Thread Cédrick Béler
Perfect. 

Maybe we can try on MicroPub next week ? I’ll be a bit available. I’ll ask on 
Discord too at the time.

Cheers,
Cédrick

> Le 15 déc. 2018 à 13:18, Roelof Wobben  a écrit :
> 
> Hello, 
> 
> I maybe could help you but Im a super beginner in Pharo but eager to learn. 
> 
> Roelof 
> 
> Op 15-12-2018 om 12:51 schreef Cédrick Béler:
>> Hi all,
>> 
>> I was looking for iOS geolocalization app on GitHub and found Overland from 
>> Aaron Parecki.
>> https://github.com/aaronpk?tab=repositories 
>> 
>> 
>> Cool app that can send straight to a Pharo image gps points. So perfect as a 
>> basis to build a cool tool for my students and research projects...
>> 
>> 
>> What was even more interesting is that exploring Aaron web site, I realized 
>> the guy store his digital life I an private manner like I would love for 
>> years...
>> https://aaronparecki.com/gps/  
>> https://aaronparecki.com/ate  
>> https://aaronparecki.com/drank 
>> 
>> <_iMac5K- 2018-12-15 à 12.47.32.png>
>> 
>> I then found several tools I find cool and that I would like to port 
>> eventually (it’s in PHP right now) to build a life logger.
>> 
>> I learned in the process about micropub which seems to be a good tool to 
>> post with a little semantic to a server (micro format based).
>> https://micropub.net/draft/  
>> https://indieweb.org/Micropub  
>> 
>> *** Do people know if we have implementations out there of the 
>> micropub/microformat tools ?
>> 
>> *** Do you find them interesting ? Who would be interested eventually to 
>> help me port such kind of librairies (from there mostly 
>> https://indieweb.org/p3k ) ?
>> http://atlas.p3k.io  
>> https://github.com/aaronpk/Quill  
>> https://quill.p3k.io/docs/note  
>> https://indieweb.org/XRay  
>> 
>> Cheers,
>> 
>> Cédrick
>> 
> 



Re: [Pharo-users] Discussion on life logger applications (from Geolocalization apps to MicroPub) => Are people interested in porting apps from https://indieweb.org/p3k ?

2018-12-15 Thread Cédrick Béler

>> 
>> *** Do people know if we have implementations out there of the 
>> micropub/microformat tools ?
> 
> Not that I know of, but I quickly skimmed the spec above and as far as I can 
> see, all the building blocks are there in Pharo (Zinc,NeoJSON). Should make 
> for a nice and useful project.
> 

Yes, that was my impression. 

Something we can do maybe if other find it nice. I may give it a try this 
holidays.


> I do find this interesting, though I won't be taking on more public projects. 
> But you can always ask me questions here.

Nice, thanks Sven


> 
>> Cheers,
>> 
>> Cédrick



Re: [Pharo-users] StCAD is open source

2018-12-15 Thread Noury Bouraqadi
Hi

> On 15 Dec 2018, at 06:32, askoh  wrote:
> 
> Hi:
> 
> I am preparing to port StCAD from VisualWorks to Pharo. Please advise how
> this can be done most efficiently. I am not familiar with Pharo GUI
> development.
> 
You should have a look to:
Spec 
http://books.pharo.org/spec-tutorial/

Roassal
http://agilevisualization.com/ 

Noury

> StCAD uses Jun which uses OpenGL and GLUT. I am open to using newer graphics
> frameworks and CUDA or OpenCL.
> 
> Thanks,
> Aik-Siong Koh
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 



Re: [Pharo-users] Pharo 7 and Zero conf problem

2018-12-15 Thread Vitor Medina Cruz
Ok, thanks!!

On Sat, Dec 15, 2018 at 8:28 AM Esteban Lorenzano 
wrote:

> You can ignore it (but is something we need to fix, indeed)
>
> On 15 Dec 2018, at 00:53, Vitor Medina Cruz  wrote:
>
> Hello,
>
> Under debian, loading
>
> curl https://get.pharo.org/64/70+vm | bash
>
> And then executing:
>
> ./pharo Pharo.image eval "Class allInstances"
>
> I got:
>
> self recordInitializationSuccess ] in LGitLibrary>>initializeLibGit2 in 
> Block: [ self libgit2_init
> BlockClosure>>on:do:
> LGitLibrary>>initializeLibGit2
> LGitLibrary class>>startUp:
> ClassSessionHandler>>startup:
> [ :each | each startup: isImageStarting ] in WorkingSession>>runStartup: in 
> Block: [ :each | each startup: isImageStarting ]
> [ aBlock value: each ] in [ :each |
> [ aBlock value: each ]
> on: Exception
> do: [ :error | self errorHandler handleError: error ] ] in 
> WorkingSession>>runList:do: in Block: [ aBlock value: each ]
> BlockClosure>>on:do:
> [ :each |
> [ aBlock value: each ]
> on: Exception
> do: [ :error | self errorHandler handleError: error ] ] in 
> WorkingSession>>runList:do: in Block: [ :each | ...
> Array(SequenceableCollection)>>do:
> WorkingSession>>runList:do:
> WorkingSession>>runStartup:
> WorkingSession>>start:
> SessionManager>>launchSnapshot:andQuit:
> [ isImageStarting := self launchSnapshot: save andQuit: quit.
> wait signal ] in SessionManager>>snapshot:andQuit: in Block: [ 
> isImageStarting := self launchSnapshot: save and...etc...
> [ self value.
> Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self 
> value*#()*
>
>
> If I use pharo 6 this error don't happened and I got *#()*
>
> Can I ignore this error? Should I use Pharo 6? Something missed?
>
> Regards,
> Vitor
>
>
> 
>  Livre
> de vírus. www.avg.com
> .
>
>
>
>


Re: [Pharo-users] Discussion on life logger applications (from Geolocalization apps to MicroPub) => Are people interested in porting apps from https://indieweb.org/p3k ?

2018-12-15 Thread Sven Van Caekenberghe



> On 15 Dec 2018, at 12:51, Cédrick Béler  wrote:
> 
> Hi all,
> 
> I was looking for iOS geolocalization app on GitHub and found Overland from 
> Aaron Parecki.
> https://github.com/aaronpk?tab=repositories
> 
> Cool app that can send straight to a Pharo image gps points. So perfect as a 
> basis to build a cool tool for my students and research projects...
> 
> 
> What was even more interesting is that exploring Aaron web site, I realized 
> the guy store his digital life I an private manner like I would love for 
> years...
> https://aaronparecki.com/gps/ 
> https://aaronparecki.com/ate 
> https://aaronparecki.com/drank
> 
> <_iMac5K- 2018-12-15 à 12.47.32.png>
> 
> I then found several tools I find cool and that I would like to port 
> eventually (it’s in PHP right now) to build a life logger.
> 
> I learned in the process about micropub which seems to be a good tool to post 
> with a little semantic to a server (micro format based).
> https://micropub.net/draft/ 
> https://indieweb.org/Micropub 
> 
> *** Do people know if we have implementations out there of the 
> micropub/microformat tools ?

Not that I know of, but I quickly skimmed the spec above and as far as I can 
see, all the building blocks are there in Pharo (Zinc,NeoJSON). Should make for 
a nice and useful project.

> *** Do you find them interesting ? Who would be interested eventually to help 
> me port such kind of librairies (from there mostly https://indieweb.org/p3k) ?
> http://atlas.p3k.io 
> https://github.com/aaronpk/Quill 
> https://quill.p3k.io/docs/note 
> https://indieweb.org/XRay 

I do find this interesting, though I won't be taking on more public projects. 
But you can always ask me questions here.

> Cheers,
> 
> Cédrick
> 




[Pharo-users] Iceberg repository import

2018-12-15 Thread Trussardi Dario Romano
Ciao,

i work with Pharo 7.0.0 build 34.


in the past, into another pharo environment,  i have clone the git  
Seaside project  ( master 9566cb4 )

Now in the new image for import the Seaside project,

 i do the Iceberg command:  Import from existing clone

the Repository window report the entry:

Seaside Master  No Project 
Found

The relative Package window is empty.

Because ?   what i need to do?



In parallel i work with Magritte project,

i import it from existing clone without problem.


Some considerations ?

Thanks,

Dario


Re: [Pharo-users] Pharo 7 and Zero conf problem

2018-12-15 Thread Esteban Lorenzano
You can ignore it (but is something we need to fix, indeed)

> On 15 Dec 2018, at 00:53, Vitor Medina Cruz  wrote:
> 
> Hello,
> 
> Under debian, loading
> 
> curl https://get.pharo.org/64/70+vm  | bash
> 
> And then executing:
> 
> ./pharo Pharo.image eval "Class allInstances"
> 
> I got:
> 
> self recordInitializationSuccess ] in LGitLibrary>>initializeLibGit2 in 
> Block: [ self libgit2_init
> BlockClosure>>on:do:
> LGitLibrary>>initializeLibGit2
> LGitLibrary class>>startUp:
> ClassSessionHandler>>startup:
> [ :each | each startup: isImageStarting ] in WorkingSession>>runStartup: in 
> Block: [ :each | each startup: isImageStarting ]
> [ aBlock value: each ] in [ :each | 
> [ aBlock value: each ]
> on: Exception
> do: [ :error | self errorHandler handleError: error ] ] in 
> WorkingSession>>runList:do: in Block: [ aBlock value: each ]
> BlockClosure>>on:do:
> [ :each | 
> [ aBlock value: each ]
> on: Exception
> do: [ :error | self errorHandler handleError: error ] ] in 
> WorkingSession>>runList:do: in Block: [ :each | ...
> Array(SequenceableCollection)>>do:
> WorkingSession>>runList:do:
> WorkingSession>>runStartup:
> WorkingSession>>start:
> SessionManager>>launchSnapshot:andQuit:
> [ isImageStarting := self launchSnapshot: save andQuit: quit.
> wait signal ] in SessionManager>>snapshot:andQuit: in Block: [ 
> isImageStarting := self launchSnapshot: save and...etc...
> [ self value.
> Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self 
> value
> #()
> 
> If I use pharo 6 this error don't happened and I got #()
> 
> Can I ignore this error? Should I use Pharo 6? Something missed?
> 
> Regards,
> Vitor
> 
>  
> 
>  Livre de vírus. www.avg.com 
> .
>  


Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread Roelof Wobben

  
  
And found the culprit after some good
  night sleep.
  
  But any feedback is appreiciated. 
  
  Roelof
  
  
  Op 15-12-2018 om 10:34 schreef Roelof Wobben:


  
  Thanks for the reviews. 

I have change my code a little bit.
I now check for 1 string and at the end I check for every word
the three filters

So I looks now like this: 

checkForbiddenParts: word
    "checks if a word contains some forbidden parts"

    ^ forbiddenWords anySatisfy: [ :forbidden | word
includesSubstring: forbidden ]


checkLessThen3Vowels: aString
    "checks if a words contains less then 3 vowels"

    ^ (aString count: #isVowel) < 3


checkOverLapping: aString
    "checks if a string has two overlapping characters"

    | result |
    result := aString asArray overlappingPairsCollect: [ :a :b |
a ~= b ].
    ^ result includes: true

isNice: aCollection
    "checks if a word is nice according to the 3 filters"

    | answer |
    answer := aCollection
        reject: [ :word | 
            (FindNiceStrings new checkForbiddenParts: word)
                | (FindNiceStrings new checkLessThen3Vowels:
word)
                | (FindNiceStrings new checkOverLapping: word)
not ].
    ^ answer size


But somewhere must be a bug because the answer the code given in
too high.

So I think I for a few hours/days busy to find out where the bug
is. 

here are the 3 filters described : 

A nice string is one with all of the following
  properties:

  It contains at least three vowels (aeiou
only), like aei, xazegov, or aeiouaeiouaeiou.
  It contains at least one letter that appears twice in a
row, like xx, abcdde (dd),
or aabbccdd (aa, bb,
cc, or dd).
  It does not contain the strings ab,
cd, pq, or xy, even
if they are part of one of the other requirements.


Roelof


Op 15-12-2018 om 09:37 schreef p...@highoctane.be:
  
  

Thx for those reviews.
  
  
  And interesting paper.
  
  
  Phil



  On Sat, Dec 15, 2018, 04:20 Richard O'Keefe


Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread Roelof Wobben

  
  
Thanks for the reviews. 
  
  I have change my code a little bit.
  I now check for 1 string and at the end I check for every word the
  three filters
  
  So I looks now like this: 
  
  checkForbiddenParts: word
      "checks if a word contains some forbidden parts"
  
      ^ forbiddenWords anySatisfy: [ :forbidden | word
  includesSubstring: forbidden ]
  
  
  checkLessThen3Vowels: aString
      "checks if a words contains less then 3 vowels"
  
      ^ (aString count: #isVowel) < 3
  
  
  checkOverLapping: aString
      "checks if a string has two overlapping characters"
  
      | result |
      result := aString asArray overlappingPairsCollect: [ :a :b | a
  ~= b ].
      ^ result includes: true
  
  isNice: aCollection
      "checks if a word is nice according to the 3 filters"
  
      | answer |
      answer := aCollection
          reject: [ :word | 
              (FindNiceStrings new checkForbiddenParts: word)
                  | (FindNiceStrings new checkLessThen3Vowels: word)
                  | (FindNiceStrings new checkOverLapping: word) not
  ].
      ^ answer size
  
  
  But somewhere must be a bug because the answer the code given in
  too high.
  
  So I think I for a few hours/days busy to find out where the bug
  is. 
  
  here are the 3 filters described : 
  
  A nice string is one with all of the following
properties:
  
It contains at least three vowels (aeiou only),
  like aei, xazegov, or aeiouaeiouaeiou.
It contains at least one letter that appears twice in a row,
  like xx, abcdde (dd),
  or aabbccdd (aa, bb,
  cc, or dd).
It does not contain the strings ab,
  cd, pq, or xy, even
  if they are part of one of the other requirements.
  
  
  Roelof
  
  
  Op 15-12-2018 om 09:37 schreef p...@highoctane.be:


  
  Thx for those reviews.


And interesting paper.


Phil
  
  
  
On Sat, Dec 15, 2018, 04:20 Richard O'Keefe 

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread p...@highoctane.be
Thx for those reviews.

And interesting paper.

Phil

On Sat, Dec 15, 2018, 04:20 Richard O'Keefe  Starting from the top:\
> (0) It's not *wrong* to start a selector with a capital letter, but
> it is certainly unusual.
> (1) Intention-revealing names are good.  That's why this name is bad.
> It does not *delete* anything.
> (2) The comment again says "delete" but nothing is deleted.  Comments
> that mislead are worse than no comments.
> (3) An issue I have seen over and over in student code (in other
> programming languages) is writing regular expressions as string
> literals where they are used, so that every time you try a match
> the regular expression gets recompiled, over and over again.
> You're not exactly doing that, but you *are* rebuilding patterns
> over and over again.  It would make more sense to hold a
> forbiddenPatterns collection.
> (4) You are saying "(coll reject: [..test..]) notEmpty", building an
> entire collection just to ask whether it has any members.  What
> you want to know is "are there any elements of coll that do not
> satisfy the test", which can be expressed as
> (coll allSatisfy: [..test..]) not.  (Sadly there is no
> #notAllSatisfy:, although #notAnySatisfy: *does* exist under the
> name #noneSatisfy:.
> (5) #match: is a highly risky way to look for a substring.  What if
> you want to look for a literal # or * ?  What if you need to
> look for 'Boring' but not 'boring'?  ("Boring" is a perfectly
> good surname.)
> (6) You really don't need the "result" variable.
>
> allowedWords
>   "Answer those words which do not contain any forbiddenWord
>as a substring."
>   ^words select: [:each |
>  forbiddenWords noneSatisfy: [:forbidden |
> <>]]
>
> (7) You can find out how to do the <> by looking at the methods
> for String.  You will find several candidate methods.
> (8) Of course, if there are W words and F forbidden words, in the
> worst case you'll do W*F substring inclusion tests.  This is not
> good.  "Multiple pattern matching" is a much-studied problem,
> see for example Wu and Manber's paper
>
> http://web.archive.org/web/20130203031412/http://www.inf.fu-berlin.de/inst/ag-bio-expired/FILES/ROOT/Teaching/Lectures/WS0506/WeiterfThemenBioinf/papers/FastAlgorithmMultiPatternSearching-WuManbers-TR94.pdf
> There is more recent work also.
>
> Does anyone know whether there's a multiple pattern algorithm for
> Pharo?  One could always fall back on ternary search trees...
>
>
>
> On Fri, 14 Dec 2018 at 05:13, Roelof Wobben  wrote:
>
>> Hello,
>>
>> I have this code :
>>
>>  FindAndDeleteWordsWithForbiddenParts
>> "deletes all the words that contain forbidden parts"
>>
>> | result |
>> result := words
>> select: [ :word |
>> [ (forbiddenWords reject: [ :forbidden | '*' , forbidden , '*' 
>> match: word ]) isNotEmpty ]
>> on: NotFound
>> do: [ false ] ].
>> ^ result
>>
>>
>> but I see warnings that I have to use a stream instead of string 
>> concentation.
>>
>> Anyone hints how to do so ?
>>
>> Roelof
>>
>>
>>