Re: [Pharo-users] can I improve this

2018-12-02 Thread Roelof Wobben
Hello, Im not going for a quick answer. For me its about practising and solving it and I do not matter to me how long it takes, I have finisched the MOOC and see this as a opportunity to practice with Pharo ( the syntax and the way things can be

Re: [Pharo-users] can I improve this

2018-12-02 Thread p...@highoctane.be
Also, given the time that some people solve the puzzle, doing it too nice is actually not the best use of time in AoC. Now, I'll try to solve quick and this will for sure lead to interesting things in Pharo. >From Reddit, people solve it quick then make it nice. Phil On Mon, Dec 3, 2018, 03:45

Re: [Pharo-users] can I improve this

2018-12-02 Thread Roelof Wobben
Thanks, For the second I have to take a good look. I have to reread the file till the adding causes the same outcome  as we had already so for example if we have the sequence : +3, +3, +4, -2, -4 it has as

Re: [Pharo-users] can I improve this

2018-12-02 Thread Richard O'Keefe
The key question is "what do you mean by improve"? I'd start by asking "what are you doing that you will still have to do in part 2, and what won't you do?" So looking at part 2, you will want to convert the lines to integers, and input := Array streamContents: [:lines | 'input.txt'

Re: [Pharo-users] [Ann] Fog 1.0.0-beta

2018-12-02 Thread Santiago Bragagnolo
already a revision to do to the doc! Metacello new baseline: 'Fog'; repository: 'github://smartanvil/Fog/src'; load. El lun., 3 dic. 2018 a las 1:20, Santiago Bragagnolo (< santiagobragagn...@gmail.com>) escribió: > Hi All! > > I have being working on releasing

[Pharo-users] [Ann] Fog 1.0.0-beta

2018-12-02 Thread Santiago Bragagnolo
Hi All! I have being working on releasing versions (i should do it more often). I am happy to announce Fog v1.0.0-beta. I think I found a API that i like enough. So, i took the courage to pass to 1. Thew new version changes many things: Redefines the roll of the session, it minimize the roll

[Pharo-users] can I improve this

2018-12-02 Thread Roelof Wobben
Hello, I have this code to solve the AOC 2018 day1  part1 challenge | input input2| input := Array streamContents: [ :lines | 'input.txt' asFileReference readStreamDo: [ :in | [ in atEnd ] whileFalse: [ lines nextPut: in nextLine ]]]. input inject: 0 into: [

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
sorry, then I misunderstood your code. Roelof Op 2-12-2018 om 20:48 schreef Richard O'Keefe: Who said anything about deleting any numbers?  The code fragment I posted did not delete any

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Richard O'Keefe
Who said anything about deleting any numbers? The code fragment I posted did not delete any numbers; it merely made a new array with everything that was not #+. In the original post there were no strings. (By the way, you wrote "trailing" where you meant "leading".) On Mon, 3 Dec 2018 at

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
I know, that output is given by the AdventOfCode 2018 challenge. Roelof Op 2-12-2018 om 20:36 schreef Richard O'Keefe: Thinking about this functionally, you want    to sum    the

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
and I do not want to delete all numbers that begin with a + but remove the trailing +  from a string which look like this +15 Op 2-12-2018 om 20:36 schreef Richard O'Keefe: Thinking about this functionally, you want

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Richard O'Keefe
Thinking about this functionally, you want to sum the array elements that are not + . So, (array select: [:each | each ~~ #+]) sum The *best* approach is not to put the + symbols into the array in the first place. On Sun, 2 Dec 2018 at 23:46, Roelof Wobben wrote: > Op 2-12-2018 om

Re: [Pharo-users] VPS difficulties

2018-12-02 Thread Sven Van Caekenberghe
> On 2 Dec 2018, at 18:40, horrido wrote: > > Bizarre. I've created a new VirtualBox image of Debian and now this solution > no longer works! I'm still getting the thread priority warning. So this > solution appears to be unreliable. Why use Debian (not that it is bad, it is just a bit more

Re: [Pharo-users] Voyage

2018-12-02 Thread Cyril Ferlicot
On Sun 2 Dec 2018 at 18:49, Norbert Hartl via Pharo-users < pharo-users@lists.pharo.org> wrote: > I thought I did it already. Cannot check now, I don‘t have a computer > right now. > IIRC it is not directly in voyage but in MongoTalk > Am 02.12.2018 um 16:44 schrieb Esteban Lorenzano : > > So

Re: [Pharo-users] Pharo 7 Monticello browser and github repositories

2018-12-02 Thread Cyril Ferlicot
On Sun 2 Dec 2018 at 18:47, Sanjay Minni via Pharo-users < pharo-users@lists.pharo.org> wrote: > How to add new github repositories in Monticello (Browser) in Pharo 7 > (e.g to include the repository for Voyage) > > Monticello browser does show github repositories - how to edit / add new ones ?

[Pharo-users] Pharo 7 Monticello browser and github repositories

2018-12-02 Thread Sanjay Minni via Pharo-users
--- Begin Message --- How to add new github repositories in Monticello (Browser) in Pharo 7 (e.g to include the repository for Voyage) Monticello browser does show github repositories - how to edit / add new ones ? - cheers, Sanjay -- Sent from:

Re: [Pharo-users] VPS difficulties

2018-12-02 Thread horrido
Bizarre. I've created a new VirtualBox image of Debian and now this solution no longer works! I'm still getting the thread priority warning. So this solution appears to be unreliable. On Fri, 23 Nov 2018 at 04:02, horrido horrido.hobbies@ wrote: > Okay, I've resolved everything. First, the

Re: [Pharo-users] VPS difficulties

2018-12-02 Thread horrido
If you mean by removing the '-m32' flag, it didn't work for me. I can't remember the error messages. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Just realized that String>>#asNumber works differently in Pharo and in Squeak. '+3' asNumber "Works in Squeak, not in Pharo" BUT '+3' asInteger "Works in both Squeak and Pharo" - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
Again a memory message?Op 2 december 2018 om 17:06 schreef phil--- via Pharo-users :

Re: [Pharo-users] Voyage

2018-12-02 Thread Norbert Hartl via Pharo-users
--- Begin Message --- I thought I did it already. Cannot check now, I don‘t have a computer right now. > Am 02.12.2018 um 16:44 schrieb Esteban Lorenzano : > > So we just need to change the dependency. Cool :) > > >> On 2 Dec 2018, at 16:18, Norbert Hartl wrote: >> >> I added PBKDF2 to the

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread phil--- via Pharo-users
--- Begin Message --- I am not using a file, but copy/paste my puzzleInput into a puzzleInput method. Then I use lines from there. e.g. shifts ^ self puzzleInput lines collect: [ :each | ((each beginsWith: '+') ifTrue: [ each allButFirst ] ifFalse: [ each ]) asNumber ] Because the

Re: [Pharo-users] Voyage

2018-12-02 Thread Esteban Lorenzano
So we just need to change the dependency. Cool :) > On 2 Dec 2018, at 16:18, Norbert Hartl wrote: > > I added PBKDF2 to the cryptography repository on github a while ago. One > reason why I migrated cryptography in the first place > > Norbert > > Am 02.12.2018 um 15:59 schrieb Cyril

Re: [Pharo-users] UFFI and opaque(ish) types

2018-12-02 Thread p...@highoctane.be
No, but what about FFIExternalPackedStructureTest and FFITestStructure ? Never tried with a typedef in the fieldsDesc but may work. Phil On Sun, Dec 2, 2018 at 10:03 AM Alistair Grant wrote: > Hi Phil and Esteban, > > Thanks for your replies. > > I've realised that I badly worded my

Re: [Pharo-users] Voyage

2018-12-02 Thread Norbert Hartl
I added PBKDF2 to the cryptography repository on github a while ago. One reason why I migrated cryptography in the first place Norbert > Am 02.12.2018 um 15:59 schrieb Cyril Ferlicot : > > > >> On Sun 2 Dec 2018 at 15:38, Esteban Lorenzano wrote: >> There was a cryptography version on

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Ben Coman
On Sun, 2 Dec 2018 at 17:49, Roelof Wobben wrote: > Hello, > > I have a collection that looks like this : > > sampleData1 > "comment stating purpose of message" > > ^ #( -8 > +7) > > I want to add those numbers up but the code chokes at the + > To get some insight, do #(

Re: [Pharo-users] Voyage

2018-12-02 Thread Cyril Ferlicot
On Sun 2 Dec 2018 at 15:38, Esteban Lorenzano wrote: > There was a cryptography version on GitHub, isn’t? > > Yes, but we need someone with the rights to write on PBKDF2 on StHub, or migrate it in github aswell to fix the issue. > On 2 Dec 2018, at 15:31, Cyril Ferlicot wrote: > > > > On Sun

Re: [Pharo-users] UFFI and opaque(ish) types

2018-12-02 Thread Ben Coman
One option could be to create a small shared library that you compile for each platform that just exported the member offsets... https://www.embedded.com/design/prototyping-and-development/4024941/Learn-a-new-trick-with-the-offsetof--macro You first FFI to that read struct member offsets and

Re: [Pharo-users] Voyage

2018-12-02 Thread Esteban Lorenzano
There was a cryptography version on GitHub, isn’t? > On 2 Dec 2018, at 15:31, Cyril Ferlicot wrote: > > > > On Sun 2 Dec 2018 at 15:08, Esteban Lorenzano > wrote: > There is indeed a problem because cryptography package is still using an old > API: #ifNotNilDo:

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Wasn't sure, I'm on Squeak right now!!  loll - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Exactly! It's easier to manipulate that OrderedCollection that to open/reopen the file.  It'll be VERY handy for problem #2 where you will need to iterate multiple times on the data!  ;) - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux

Re: [Pharo-users] Iceberg + BaselinOf + Metacello - how to manage interdependencies ?

2018-12-02 Thread Esteban Lorenzano
> On 2 Dec 2018, at 12:00, Sven Van Caekenberghe wrote: > > > >> On 2 Dec 2018, at 11:31, Hilaire wrote: >> >> Hi Ichi, >> >> If you are learning Pharo I suggest you to not follow this way for now >> as it may result in cognitive overload and frustration. > > Although the workflow

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
Op 2-12-2018 om 12:19 schreef Benoit St-Jean via Pharo-users: oke, and if I understand your code files is then the variable that holds the file. Roelof

[Pharo-users] old folder names being picked up in settings

2018-12-02 Thread Sanjay Minni
I am using Windows 10 PharoLauncher->Pharo 7.0.0rc1 I find when installing a new image, the folder names of an earlier is picked up by default, as such when loadig packages / cofigurations they are all placed in the earlier directory I saw the names in the settings

Re: [Pharo-users] Voyage

2018-12-02 Thread Sanjay Minni
I am unable to load Voyage-Mongo and Voyage-Memory in Pharo 7.0.0rC1 tried using the scipt below and also thru the Catalog Browser entries for Voyage any pointers CyrilFerlicot wrote > Le 16/11/2018 à 02:02, horrido a écrit : >> I'm trying to load Voyage for MongoDB and I'm having great

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Sven Van Caekenberghe
> On 2 Dec 2018, at 12:07, Roelof Wobben wrote: > > Nope, only the part how I can read the file. For scripting (non-production) code, you can read the whole file (and split it into lines) using 'file.log' asFileReference contents lines.

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Oups! Usually, it's way nicer/better/suggested to declare all variables...  Forgot "lines" ! . Nicer version: | file lines  | lines := OrderedCollection new. file := StandardFileStream readOnlyFileNamed: 'day.1.input'. [file atEnd] whileFalse: [lines add: file nextLine].

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- You can do solve the problem without the "lines" variable but, believe me, you want to keep those lines in a collection.  It's gonna be a lot easier down the road! Hint (to solve the problem) : look at what "lines" contain (instances of which class).  That class has

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
Op 2-12-2018 om 11:55 schreef Benoit St-Jean via Pharo-users: Nope, only the part how I can read the file. Roelof

Re: [Pharo-users] Iceberg + BaselinOf + Metacello - how to manage interdependencies ?

2018-12-02 Thread Sven Van Caekenberghe
> On 2 Dec 2018, at 11:31, Hilaire wrote: > > Hi Ichi, > > If you are learning Pharo I suggest you to not follow this way for now > as it may result in cognitive overload and frustration. Although the workflow described below does indeed work, it (1) assumes you already know how to handle

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Do you want the solution for the first one to get you going? The part2 of problem 1 is somewhat a little more complex but once you get the idea, the rest shouldn't be that hard! - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- You're giving yourself *A LOT* of trouble by not simply reading a file!  Besides, you'll have the same problem for every problem, twice per problem! - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram:

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
Op 2-12-2018 om 11:43 schreef Benoit St-Jean via Pharo-users: if you can learn me that. Right now., the input is a method. I think I can do the rest from there

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Roeloff, Is this for the Advent of Code 2018? The easiest way is to read the input file...  Then, I can guide you from there!  ;) - Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC:

Re: [Pharo-users] Iceberg + BaselinOf + Metacello - how to manage interdependencies ?

2018-12-02 Thread Hilaire
Hi Ichi, If you are learning Pharo I suggest you to not follow this way for now as it may result in cognitive overload and frustration. If you just want to save your code on some repo, use Metacello to create a tonel repository, then do code revision the way you use to do it (command line, third

Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Hilaire
Hi Roelof, Two problems: 1. + is a symbol so compare it to #+ 2. A false case is needed to return the untouched sum, otherwise it truns to nil #(+1 -8) inject: 0 into: [:sum :each | each ~= #+ ifTrue: [sum +  each] ifFalse: [sum]] . Hilaire -- Dr. Geo http://drgeo.eu

[Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Roelof Wobben
Hello, I have a collection that looks like this : sampleData1     "comment stating purpose of message"     ^ #( -8     +7) I want to add those numbers up but the code chokes at the + so I did this : FrequencyFinderData  new class sampleData1   inject: 0 into: [:sum :each | (each ~= $+)

Re: [Pharo-users] UFFI and opaque(ish) types

2018-12-02 Thread Alistair Grant
Hi Phil and Esteban, Thanks for your replies. I've realised that I badly worded my question. By "opaque" I meant that it is difficult to determine the underlying type of the variables, but I still want to be access the values of typeA and typeB in my example structure. Phil, I had a look

Re: [Pharo-users] Unable to compile myself Pharo

2018-12-02 Thread Pierce Ng
On Sat, Dec 01, 2018 at 07:37:12PM +0100, Alexandre Garreau wrote: > > https://github.com/OpenSmalltalk/opensmalltalk-vm > > Wait if it’s the same than for squeak… knowing there’s a “squeak-vm” > package in debian that claim to be able to run several images… could it > be that it could be used

Re: [Pharo-users] Spec + Graphics?

2018-12-02 Thread Esteban Lorenzano
> On 2 Dec 2018, at 02:19, Sean P. DeNigris wrote: > > Dan Wilczak wrote >> I think I've found the adapter you referred to > > I think you send #asSpecAdapter to your Morph, which returns an instance of > MorphicGenericAdapter. HTH Yes, you can add any morph to a spec presentation by