Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
May 2017
- 86 participants
- 536 messages
Re: [Pharo-users] Ston feature idea?
by Sven Van Caekenberghe
> On 17 May 2017, at 12:44, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> Hi Cyril,
>
> This can be done quite easily in STON, I will make you a small example and add it to the unit tests.
===
Name: STON-Tests-SvenVanCaekenberghe.79
Author: SvenVanCaekenberghe
Time: 17 May 2017, 1:43:03.944446 pm
UUID: fb472e87-180c-0d00-b559-fec60aee7555
Ancestors: STON-Tests-SvenVanCaekenberghe.78
Add STONWriteReadTests>>#testKnownObjects as an example of how to serialize only an ID and resolve that ID upon materialization
Add STONTestKnownObject with custom #stonOn: and class side #fromSton:
===
You basically (over)write 2 methods, instance side
"protocol: ston-core"
stonOn: stonWriter
"We only write out our id"
stonWriter writeObject: self listSingleton: self id asString
and class side
"protocol: ston-core"
fromSton: stonReader
^ self fromId: stonReader parseListSingleton
The #fromId: methods retrieves an existing instance.
HTH,
Sven
> Sven
>
>> On 17 May 2017, at 12:19, Cyril Ferlicot D. <cyril.ferlicot(a)gmail.com> wrote:
>>
>> Hi!
>>
>> At Synectique sometimes we use Ston to export models that contains some
>> MooseEntities.
>>
>> Moose entities been complex, we usually export only the moose name of
>> the entity then we retrieve the entity during the import. But we did not
>> find any "easy" way to do this in Ston.
>>
>> I used voyage and it has a system like this. Example:
>>
>> Amount class>>mongoCurrency
>> <mongoDescription>
>>
>> ^ VOMongoToOneDescription new
>> attributeName: 'currency';
>> accessor: (MAPluggableAccessor
>> read: [ :amount | amount currency abbreviation ]
>> write: [ :amount :value | amount currency: (Currency
>> fromAbbreviation: value) ]);
>> yourself
>>
>> With this Voyage know how to read/write the instance variable "currency".
>>
>> I think it would be cool to be able to easily customize import/export
>> variables with Ston. Maybe it is already possible but I missed the way
>> to do it?
>>
>> I would like your thoughts about that. :)
>>
>> --
>> Cyril Ferlicot
>> https://ferlicot.fr
>>
>> http://www.synectique.eu
>> 2 rue Jacques Prévert 01,
>> 59650 Villeneuve d'ascq France
>>
>
May 17, 2017
Re: [Pharo-users] Ston feature idea?
by Peter Uhnak
Just curious... why don't you use MSE?
Peter
On Wed, May 17, 2017 at 12:44:58PM +0200, Sven Van Caekenberghe wrote:
> Hi Cyril,
>
> This can be done quite easily in STON, I will make you a small example and add it to the unit tests.
>
> Sven
>
> > On 17 May 2017, at 12:19, Cyril Ferlicot D. <cyril.ferlicot(a)gmail.com> wrote:
> >
> > Hi!
> >
> > At Synectique sometimes we use Ston to export models that contains some
> > MooseEntities.
> >
> > Moose entities been complex, we usually export only the moose name of
> > the entity then we retrieve the entity during the import. But we did not
> > find any "easy" way to do this in Ston.
> >
> > I used voyage and it has a system like this. Example:
> >
> > Amount class>>mongoCurrency
> > <mongoDescription>
> >
> > ^ VOMongoToOneDescription new
> > attributeName: 'currency';
> > accessor: (MAPluggableAccessor
> > read: [ :amount | amount currency abbreviation ]
> > write: [ :amount :value | amount currency: (Currency
> > fromAbbreviation: value) ]);
> > yourself
> >
> > With this Voyage know how to read/write the instance variable "currency".
> >
> > I think it would be cool to be able to easily customize import/export
> > variables with Ston. Maybe it is already possible but I missed the way
> > to do it?
> >
> > I would like your thoughts about that. :)
> >
> > --
> > Cyril Ferlicot
> > https://ferlicot.fr
> >
> > http://www.synectique.eu
> > 2 rue Jacques Prévert 01,
> > 59650 Villeneuve d'ascq France
> >
>
>
May 17, 2017
Re: [Pharo-users] Ston feature idea?
by Sven Van Caekenberghe
Hi Cyril,
This can be done quite easily in STON, I will make you a small example and add it to the unit tests.
Sven
> On 17 May 2017, at 12:19, Cyril Ferlicot D. <cyril.ferlicot(a)gmail.com> wrote:
>
> Hi!
>
> At Synectique sometimes we use Ston to export models that contains some
> MooseEntities.
>
> Moose entities been complex, we usually export only the moose name of
> the entity then we retrieve the entity during the import. But we did not
> find any "easy" way to do this in Ston.
>
> I used voyage and it has a system like this. Example:
>
> Amount class>>mongoCurrency
> <mongoDescription>
>
> ^ VOMongoToOneDescription new
> attributeName: 'currency';
> accessor: (MAPluggableAccessor
> read: [ :amount | amount currency abbreviation ]
> write: [ :amount :value | amount currency: (Currency
> fromAbbreviation: value) ]);
> yourself
>
> With this Voyage know how to read/write the instance variable "currency".
>
> I think it would be cool to be able to easily customize import/export
> variables with Ston. Maybe it is already possible but I missed the way
> to do it?
>
> I would like your thoughts about that. :)
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
> http://www.synectique.eu
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>
May 17, 2017
Ston feature idea?
by Cyril Ferlicot D.
Hi!
At Synectique sometimes we use Ston to export models that contains some
MooseEntities.
Moose entities been complex, we usually export only the moose name of
the entity then we retrieve the entity during the import. But we did not
find any "easy" way to do this in Ston.
I used voyage and it has a system like this. Example:
Amount class>>mongoCurrency
<mongoDescription>
^ VOMongoToOneDescription new
attributeName: 'currency';
accessor: (MAPluggableAccessor
read: [ :amount | amount currency abbreviation ]
write: [ :amount :value | amount currency: (Currency
fromAbbreviation: value) ]);
yourself
With this Voyage know how to read/write the instance variable "currency".
I think it would be cool to be able to easily customize import/export
variables with Ston. Maybe it is already possible but I missed the way
to do it?
I would like your thoughts about that. :)
--
Cyril Ferlicot
https://ferlicot.fr
http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France
May 17, 2017
Re: [Pharo-users] HiDPI
by Stephan Eggermont
Hi Tim, Steven
No, it has nothing to do with Bloc. The necessary change was made by Tobias in the squeak vm some time ago, but that was destabilizing the spur vm at that time. I assume it is time to revisit it now the gc bugs seem to be gone.
Stephan
May 17, 2017
Re: [Pharo-users] Problems loading XML System ( was [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding)
by PBKResearch
Monty
Many thanks for your help. I have followed your advice to start again in a clean Moose 6.1 image, and so far everything is working fine. Apologies for getting you to sort out the results of my stupidity. In Pharo I am really an experienced beginner.
Thanks again
Peter Kenny
-----Original Message-----
From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of monty
Sent: 16 May 2017 03:37
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Problems loading XML System ( was [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding)
Something went wrong during your upgrade with class initialization.
Installing the latest versions of these projects into a clean image would work, and so would installing the latest XMLParserHTML and XMLParserStAX into the newest Moose-6.1 image (which has the latest XMLParser and XPath).
But if you insist on upgrading your old image, try the latest ConfigurationOfXMLParser (.303.mcz) and ConfigurationOfXPath (.149.mcz) from their PharoExtras repos and install their latest project versions, and do the same with XMLParserHTML and XMLParserStAX (the older versions aren't compatible with newer XMLParser versions). Then open the test runner and run all "XML|XPath" tests. If you get any failures, evaluate this:
#('XML-Parser' 'XPath-Core') do: [:package |
(SystemNavigation default allClassesInPackageNamed: package) do: [:class |
class initialize]]
and try running the tests again.
> Sent: Monday, May 15, 2017 at 6:50 PM
> From: PBKResearch <peter(a)pbkresearch.co.uk>
> To: "'Any question about pharo is welcome'" <pharo-users(a)lists.pharo.org>
> Subject: [Pharo-users] Problems loading XML System ( was Re: [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding)
>
> Monty
>
> As an update, I have rebuilt from the Moose 6.0 download. The version of XML-Parser in that was dated 18 July 2016 (configuration monty.233), so I installed versions of XML-Parser-HTML and XML-Parser-StAX contemporary with that. (The respective configurations are monty.48 and monty.39). With these versions all my previous XMLHTMLParser operations work as before, and I have been able to use the StAX parser in a simple way. So I can start exploring as I intended.
>
> I have made repeated attempts to update this rebuilt image to more recent versions of the HTML and StAX parsers, and every time I run into the same error reported below. I started from the latest version and worked backwards, but gave up quickly; it takes about 6 minutes on my machine to load and compile a version, and it soon gets tedious. If I feel more enthusiastic tomorrow, I might start working forwards from my current versions.
>
> Anyway, I now have a working system with the StaX and HTML parsers, so I can continue to explore.
>
> Best wishes
>
> Peter Kenny
>
> -----Original Message-----
> From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of PBKResearch
> Sent: 15 May 2017 20:44
> To: 'Any question about pharo is welcome' <pharo-users(a)lists.pharo.org>
> Subject: Re: [Pharo-users] [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding
>
> Monty
>
> I have just started trying to use the StAX parsers, and I have found that the update has introduced a problem, which means that XMLHTMLParser no longer works on examples I have used before. I updated to ConfigurationOfXMLParser(monty.302), which is the latest version on the smalltalkhub repository, and then used the load version in the class comment, which loads the stable default. Similarly, I loaded ConfigurationOfXMLParserHTML(monty.62) and ConfigurationOfXMLParserStAX(monty.51), again using stable and default. When I try to run the XMLHTMLParser example I quoted below, I get an error message 'MessageNotunderstood: receiver of "critical:" is nil'. The same message comes up with anything else I try with XMLHTMLParser or with StAXHTMLParser.
>
> I am not really up to using the debugger on someone else's code, but the one thing I can see is that the problem lies in XMLKeyValueCache>>critical:, which has the code:
> ^ self mutex critical: aBlock
> The problem being that mutex is nil.
>
> In my enthusiasm, I saved the updated image with the same name as the old image, which is now therefore overwritten. If I cannot solve this problem, my only way out is to rebuild my image from the Moose 6.0 download. Any suggestions gratefully received.
>
> Thanks in advance
>
> Peter Kenny
>
> -----Original Message-----
> From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of PBKResearch
> Sent: 15 May 2017 19:16
> To: 'Any question about pharo is welcome' <pharo-users(a)lists.pharo.org>
> Subject: Re: [Pharo-users] [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding
>
> Monty
>
> Many thanks for this. My original purpose was just to answer Paul deBruicker's query, namely to parse an html file and stop reading at the end of the <head> section. I solved this by trial and error using the code shown below ( which actually stops at the opening tag of the body). This was not my problem at all, but Paul's; I just tackled it for fun.
>
> However, you note has prompted me to update my version of the whole XML system - I was using the version I downloaded with Moose 6.0, which was dated August 2016. I am looking at the StAX parsers as a possible way of simplifying what I currently do, which involves downloading an entire web page as a DOM and then manipulating it with XPath to extract the bits I am interested in. I may be able to use StAX to do some of the selection and manipulation as I am reading.
>
> It's all a new topic to me, so I foresee a lot of experimentation. It all helps to keep the grey matter active.
>
> Thanks again
>
> Peter Kenny
>
> -----Original Message-----
> From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of monty
> Sent: 15 May 2017 12:15
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] [Zinc] ZnInvalidUTF8: Illegal leading byte for utf-8 encoding
>
> For that kind of incremental parsing, you could also use XMLParserStAX, a pull-parser that parses a document as a stream of event objects you control with #next, #peek, and #atEnd. It also supports pull-DOM parsing with messages like #nextNode, #nextElement, and #nextElementNamed:, which return the next event object(s) as DOM subtrees (searchable with XPath). See the StAXParser class comment for an example. (The StAXHTMLParser class requires XMLParserHTML be installed to work.)
>
>
>
>
>
May 16, 2017
Re: [Pharo-users] Loading Glorp+PostgreSQL
by Esteban A. Maringolo
The "recommended" way would be to use ConfigurationOfGarageGlorp and
use Garage's PostgreSQL driver (which is a fork from the PostgresV2
one).
However I couldn't tell whether there is a difference (both in
performance and/or features) between them because the codebase moves a
glaciar speed; I'm aware of some users that prefer to stick with the
old driver (pgV2) instead of the Garage alternative (which isn't much
maintained either), since both preserve the API and different Glorp
drivers (adapters) corrects any difference.
In the booklets Stef published days ago there is a link to the one of
Glorp I wrote, there is a snippet of the "recommended" way to load
Glorp using the Garage configurations. Which one you choose is up to
you.
Regards!
Esteban A. Maringolo
2017-05-16 6:58 GMT-03:00 Sven Van Caekenberghe <sven(a)stfx.eu>:
> I am bringing my Reddit example back up to date (https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b53…) for an upcoming Pharo Booklet.
>
> I used to depend on and load Glorp+PostgreSQL in my Configuration as follows:
>
> spec project: 'Glorp' with: [
> spec
> className: 'ConfigurationOfGlorp';
> versionString: #stable;
> repository: 'http://www.smalltalkhub.com/mc/DBXTalk/Configurations/main' ].
>
> spec project: 'PostgresV2' with: [
> spec
> className: 'ConfigurationOfPostgresV2';
> versionString: #bleedingEdge;
> repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main' ].
>
> spec
> package: 'GlorpDriverPostgreSQL'
> with: [
> spec
> repository: 'http://www.smalltalkhub.com/mc/PharoExtras/PostgresV2/main';
> postLoadDoIt: #postLoadGlorpPostgresNativeDriverDBXTalkPharo;
> requires: #( 'Glorp' 'PostgresV2' ) ].
>
> This works fine in Pharo 6 now.
>
> My first question is, is this the 'correct' way of loading Glorp+PostgreSQL ? Do I get the latest, maintained code this way ?
>
> My second question is, why is #stable not available for Pharo 6 for PostgresV2, what should be done to fix this and could someone add it ?
>
> Thx,
>
> Sven
>
>
May 16, 2017
Re: [Pharo-users] Fwd: Re: 11/05/17 - Tabular Data Structures for Data Analysis - Oleksandr Zaytsev
by phil@highoctane.be
We may also use Discord and do something "somewhat live"
Phil
On Tue, May 16, 2017 at 7:23 PM, <serge.stinckwich(a)gmail.com> wrote:
> I was asking Philippe but hope to see you also at ESUG !
>
> Envoyé de mon iPhone
>
> Le 16 mai 2017 Ã 19:02, Oleksandr Zaytsev <olk.zaytsev(a)gmail.com> a
> écrit :
>
> I would love to, but to go to Lille from my country I would need a visa.
> Which is not that easy to acquire.
> So maybe I will come to PharoDays 2018.
> And I will definitely try to come to ESUG Conference in September.
>
> Oleks
>
> On Tue, May 16, 2017 at 7:26 PM, <serge.stinckwich(a)gmail.com> wrote:
>
>>
>>
>> Envoyé de mon iPhone
>>
>> Le 11 mai 2017 Ã 11:43, "phil(a)highoctane.be" <phil(a)highoctane.be> a
>> écrit :
>>
>> ---------- Message transféré ----------
>> De : "phil(a)highoctane.be" <phil(a)highoctane.be>
>> Date : 11 mai 2017 10:54
>> Objet : Re: 11/05/17 - Tabular Data Structures for Data Analysis -
>> Oleksandr Zaytsev
>> Ã : "Nick Papoylias" <npapoylias(a)gmail.com>
>> Cc :
>>
>>
>>
>> On Thu, May 11, 2017 at 10:20 AM, Nick Papoylias <npapoylias(a)gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Thu, May 11, 2017 at 5:24 AM, Oleksandr Zaytsev <
>>> olk.zaytsev(a)gmail.com> wrote:
>>>
>>>>
>>>> *A. Work done*
>>>>
>>>> - Downloaded the threaded VM as suggested by Esteban Lorenzano to
>>>> make Iceberg work. And it does! I have successfully pushed my NeuralNetwork
>>>> code to GitHub: https://github.com/olekscode/MLNeuralNetwork
>>>> - Joined the PolyMath organization on GitHub
>>>> - Created a repository for the TabularDataset project
>>>> https://github.com/PolyMathOrg/TabularDataset
>>>> <https://github.com/PolyMathOrg/TabularDataset> as a part of
>>>> PolyMath organization on GitHub
>>>> - Fixed a PolyMath issue #25 and made a PR
>>>> - Read an article from Wolfram Mathematica documentation regarding
>>>> Dataset. It was one of the reading suggestions sent to me by Nick Papoylias
>>>>
>>>>
>>>> *B. Next steps*
>>>>
>>>> - Fix more issues of PolyMath, using Iceberg. I have to get used to
>>>> it by the time the coding phase starts
>>>> - Read the rest of Nick Papoylias's suggestions
>>>>
>>>>
>>>> *C. Help needed*
>>>>
>>>> - The Dataset in Wolfram, as well as Pandas in Python, has a very
>>>> advanced indexing system. Smalltalk has its own special conventions for
>>>> indexing, so I think that it would be great if I got familiar with them.
>>>> Could you suggest me some reading on this topic (what are the indexing
>>>> conventions in Smalltalk?).
>>>> For example, in Wolfram, I can write *dataset[[-1]]* to extract the
>>>> last row. But in Pharo indexes can not be negative. In Pharo I would say *dataset
>>>> last*. But how about *dataset[[-5]]*?
>>>>
>>>> This would be a good exercise for you ;) In Pharo you can easily add
>>> negative indexing yourself.
>>>
>>> *Hint:* You know the index of the last element, since this is the size
>>> of the collection, so... ;)
>>>
>>> No need for changes, this exists already.
>>
>> Use atWrap: index put: value and atWrap: with negative indexes.
>> 'hello' atWrap: -2
>>
>> There is a specific version for Array using a primitive.
>> #[ 10 20 30 40 ] atWrap: -1
>>
>> atWrap:0 gives you the last item.
>> atWrap: -1 gives 30
>>
>> This is different from 0 based index languages.
>>
>> The interesing thing about atWrap: is that it uses modulo interally so
>> you do not need to care about that.
>>
>> ($/ split: 'abc/def/ghi/jkl') atWrap: -1
>> --> 'ghi'
>>
>> The Matrix class has a bunch of things API wise but the class is highly
>> inefficient, doing copies all the time etc. It would be nice to have some
>> kind of futures/copy on write style things in there.
>>
>> I miss cbind and rbind. These are useful. I have some half baked super
>> inefficient implementations of these things for Matrix.
>>
>> https://stat.ethz.ch/R-manual/R-devel/library/base/html/cbind.html
>>
>> The ability to name columns is also nice to have.
>>
>> In R one does:
>>
>> df <- dataframe()
>> cbind(df, c(1,2,3))
>> cbind(df, c(4,5,6))
>> names(df)<-("C1", "C2", "C3")
>> names can be found back with:
>>
>> names(df)
>>
>> A Smalltalkish style would be welcome.
>>
>>
>>
>>
>> Interesting ! Are you coming to PharoDays ? We can talk about that if we
>> found time.
>>
>> Maybe looking at the Voyage queries can be helpful.
>>
>> Phil
>>
>>
>>
>>> Try adding an extention method to Ordrered or SequenceableCollection.
>>>
>>> If the Pharo by example chapter is not enough or the MOOC, read the
>>> source
>>> itself in the core, to see how basic methods are implemented (it is less
>>> scary,
>>> than it sounds).
>>>
>>> You can also try Chapters 9, 10, 11 of the blue book (some API changes
>>> may apply):
>>>
>>> <http://goog_1902892863>
>>> http://sdmeta.gforge.inria.fr/FreeBooks/BlueBook/Bluebook.pdf
>>>
>>>
>>>> - Or what is the best way of implementing this index:
>>>> *dataset[["name"]]* (extracts a named row), *dataset[[1]*]
>>>> (extracts the first row)? Should I create two separate messages: *dataset
>>>> rowNamed: 'name'* and *dataset rowAt: 1*?
>>>>
>>>> rowNamed:
>> rowAt:
>>
>> yes, look like it.
>>
>> But if we want to model things like R dataframes for example, this has to
>> be seen as a vectorized operation, so you can to use row slices, column
>> slices, and logical indexes.
>>
>> Check this out:
>>
>> http://www.r-tutor.com/r-introduction/data-frame/data-frame-row-slice
>> https://www.r-bloggers.com/working-with-data-frames/
>>
>>
>>
>>> The internal representation of your data-structure can be anything at
>>> the moment, *as long as you encapsulate it.*
>>>
>>> (ie it can be nested OrderedCollections with meta-data for column-names
>>> to indexes, or dictionary of collections etc).
>>>
>>> *If you don't expose it to the user* (ie return it from the public api,
>>> or expect knowledge of it in argument passing),
>>> we can easily change it later. So *first make it work, and we optimize
>>> later ;)*
>>>
>>> For your case it will be a little bit trickier because *you also have
>>> the notions of a) rows and b) columns*, which
>>> are exposed to the user. So *you would need to create abstractions* for
>>> these too.
>>>
>>> Cheers,
>>>
>>> Nick
>>>
>>>>
>>>> -
>>>>
>>>>
>>>> If someone else is having problems with Iceberg on Linux, try
>>>> downloading the threaded VM:
>>>>
>>>> wget -O- get.pharo.org/vmT60 | bash
>>>>
>>>> And use SSH (not HTTPS) remote URL.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Pharo Google Summer of Code" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>>>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/pharo-gsoc/CAEp0Uzu-8fw3dA6ezVoj-QptvLcB8cWPHvZ1tfLg1Ce8
>>>> qkTqfQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/pharo-gsoc/CAEp0Uzu-8fw3dA6ezVoj-QptvLcB8…>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Pharo Google Summer of Code" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/pharo-gsoc/CACEStOgLC6HbYJ8HBLHWfs5%2BwqN3ib_kdVGuVizx7G
>>> h1c0sM%3DA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/pharo-gsoc/CACEStOgLC6HbYJ8HBLHWfs5%2BwqN…>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
May 16, 2017
Re: [Pharo-users] Fwd: Re: 11/05/17 - Tabular Data Structures for Data Analysis - Oleksandr Zaytsev
by phil@highoctane.be
On Tue, May 16, 2017 at 6:26 PM, <serge.stinckwich(a)gmail.com> wrote:
>
>
> Envoyé de mon iPhone
>
> Le 11 mai 2017 Ã 11:43, "phil(a)highoctane.be" <phil(a)highoctane.be> a
> écrit :
>
> ---------- Message transféré ----------
> De : "phil(a)highoctane.be" <phil(a)highoctane.be>
> Date : 11 mai 2017 10:54
> Objet : Re: 11/05/17 - Tabular Data Structures for Data Analysis -
> Oleksandr Zaytsev
> Ã : "Nick Papoylias" <npapoylias(a)gmail.com>
> Cc :
>
>
>
> On Thu, May 11, 2017 at 10:20 AM, Nick Papoylias <npapoylias(a)gmail.com>
> wrote:
>
>>
>>
>> On Thu, May 11, 2017 at 5:24 AM, Oleksandr Zaytsev <olk.zaytsev(a)gmail.com
>> > wrote:
>>
>>>
>>> *A. Work done*
>>>
>>> - Downloaded the threaded VM as suggested by Esteban Lorenzano to
>>> make Iceberg work. And it does! I have successfully pushed my NeuralNetwork
>>> code to GitHub: https://github.com/olekscode/MLNeuralNetwork
>>> - Joined the PolyMath organization on GitHub
>>> - Created a repository for the TabularDataset project
>>> https://github.com/PolyMathOrg/TabularDataset
>>> <https://github.com/PolyMathOrg/TabularDataset> as a part of
>>> PolyMath organization on GitHub
>>> - Fixed a PolyMath issue #25 and made a PR
>>> - Read an article from Wolfram Mathematica documentation regarding
>>> Dataset. It was one of the reading suggestions sent to me by Nick Papoylias
>>>
>>>
>>> *B. Next steps*
>>>
>>> - Fix more issues of PolyMath, using Iceberg. I have to get used to
>>> it by the time the coding phase starts
>>> - Read the rest of Nick Papoylias's suggestions
>>>
>>>
>>> *C. Help needed*
>>>
>>> - The Dataset in Wolfram, as well as Pandas in Python, has a very
>>> advanced indexing system. Smalltalk has its own special conventions for
>>> indexing, so I think that it would be great if I got familiar with them.
>>> Could you suggest me some reading on this topic (what are the indexing
>>> conventions in Smalltalk?).
>>> For example, in Wolfram, I can write *dataset[[-1]]* to extract the
>>> last row. But in Pharo indexes can not be negative. In Pharo I would say *dataset
>>> last*. But how about *dataset[[-5]]*?
>>>
>>> This would be a good exercise for you ;) In Pharo you can easily add
>> negative indexing yourself.
>>
>> *Hint:* You know the index of the last element, since this is the size
>> of the collection, so... ;)
>>
>> No need for changes, this exists already.
>
> Use atWrap: index put: value and atWrap: with negative indexes.
> 'hello' atWrap: -2
>
> There is a specific version for Array using a primitive.
> #[ 10 20 30 40 ] atWrap: -1
>
> atWrap:0 gives you the last item.
> atWrap: -1 gives 30
>
> This is different from 0 based index languages.
>
> The interesing thing about atWrap: is that it uses modulo interally so you
> do not need to care about that.
>
> ($/ split: 'abc/def/ghi/jkl') atWrap: -1
> --> 'ghi'
>
> The Matrix class has a bunch of things API wise but the class is highly
> inefficient, doing copies all the time etc. It would be nice to have some
> kind of futures/copy on write style things in there.
>
> I miss cbind and rbind. These are useful. I have some half baked super
> inefficient implementations of these things for Matrix.
>
> https://stat.ethz.ch/R-manual/R-devel/library/base/html/cbind.html
>
> The ability to name columns is also nice to have.
>
> In R one does:
>
> df <- dataframe()
> cbind(df, c(1,2,3))
> cbind(df, c(4,5,6))
> names(df)<-("C1", "C2", "C3")
> names can be found back with:
>
> names(df)
>
> A Smalltalkish style would be welcome.
>
>
>
>
> Interesting ! Are you coming to PharoDays ? We can talk about that if we
> found time.
>
I am. There is a 'coding time' slot :-)
Phil
>
> Maybe looking at the Voyage queries can be helpful.
>
> Phil
>
>
>
>> Try adding an extention method to Ordrered or SequenceableCollection.
>>
>> If the Pharo by example chapter is not enough or the MOOC, read the source
>> itself in the core, to see how basic methods are implemented (it is less
>> scary,
>> than it sounds).
>>
>> You can also try Chapters 9, 10, 11 of the blue book (some API changes
>> may apply):
>>
>> <http://goog_1902892863>
>> http://sdmeta.gforge.inria.fr/FreeBooks/BlueBook/Bluebook.pdf
>>
>>
>>> - Or what is the best way of implementing this index:
>>> *dataset[["name"]]* (extracts a named row), *dataset[[1]*] (extracts
>>> the first row)? Should I create two separate messages: *dataset
>>> rowNamed: 'name'* and *dataset rowAt: 1*?
>>>
>>> rowNamed:
> rowAt:
>
> yes, look like it.
>
> But if we want to model things like R dataframes for example, this has to
> be seen as a vectorized operation, so you can to use row slices, column
> slices, and logical indexes.
>
> Check this out:
>
> http://www.r-tutor.com/r-introduction/data-frame/data-frame-row-slice
> https://www.r-bloggers.com/working-with-data-frames/
>
>
>
>> The internal representation of your data-structure can be anything at the
>> moment, *as long as you encapsulate it.*
>>
>> (ie it can be nested OrderedCollections with meta-data for column-names
>> to indexes, or dictionary of collections etc).
>>
>> *If you don't expose it to the user* (ie return it from the public api,
>> or expect knowledge of it in argument passing),
>> we can easily change it later. So *first make it work, and we optimize
>> later ;)*
>>
>> For your case it will be a little bit trickier because *you also have
>> the notions of a) rows and b) columns*, which
>> are exposed to the user. So *you would need to create abstractions* for
>> these too.
>>
>> Cheers,
>>
>> Nick
>>
>>>
>>> -
>>>
>>>
>>> If someone else is having problems with Iceberg on Linux, try
>>> downloading the threaded VM:
>>>
>>> wget -O- get.pharo.org/vmT60 | bash
>>>
>>> And use SSH (not HTTPS) remote URL.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Pharo Google Summer of Code" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/pharo-gsoc/CAEp0Uzu-8fw3dA6ezVoj-QptvLcB8cWPHvZ1tfLg1Ce8
>>> qkTqfQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/pharo-gsoc/CAEp0Uzu-8fw3dA6ezVoj-QptvLcB8…>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Pharo Google Summer of Code" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/pharo-gsoc/CACEStOgLC6HbYJ8HBLHWfs5%2BwqN3ib_kdVGuVizx7G
>> h1c0sM%3DA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pharo-gsoc/CACEStOgLC6HbYJ8HBLHWfs5%2BwqN…>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
May 16, 2017
Re: [Pharo-users] Fwd: Re: 11/05/17 - Tabular Data Structures for Data Analysis - Oleksandr Zaytsev
by serge.stinckwich@gmail.com
I was asking Philippe but hope to see you also at ESUG !
Envoyé de mon iPhone
> Le 16 mai 2017 à 19:02, Oleksandr Zaytsev <olk.zaytsev(a)gmail.com> a écrit :
>
> I would love to, but to go to Lille from my country I would need a visa. Which is not that easy to acquire.
> So maybe I will come to PharoDays 2018.
> And I will definitely try to come to ESUG Conference in September.
>
> Oleks
>
>> On Tue, May 16, 2017 at 7:26 PM, <serge.stinckwich(a)gmail.com> wrote:
>>
>>
>> Envoyé de mon iPhone
>>
>>> Le 11 mai 2017 à 11:43, "phil(a)highoctane.be" <phil(a)highoctane.be> a écrit :
>>>
>>> ---------- Message transféré ----------
>>> De : "phil(a)highoctane.be" <phil(a)highoctane.be>
>>> Date : 11 mai 2017 10:54
>>> Objet : Re: 11/05/17 - Tabular Data Structures for Data Analysis - Oleksandr Zaytsev
>>> Ã : "Nick Papoylias" <npapoylias(a)gmail.com>
>>> Cc :
>>>
>>>
>>>
>>>> On Thu, May 11, 2017 at 10:20 AM, Nick Papoylias <npapoylias(a)gmail.com> wrote:
>>>>
>>>>
>>>>> On Thu, May 11, 2017 at 5:24 AM, Oleksandr Zaytsev <olk.zaytsev(a)gmail.com> wrote:
>>>>> A. Work done
>>>>> Downloaded the threaded VM as suggested by Esteban Lorenzano to make Iceberg work. And it does! I have successfully pushed my NeuralNetwork code to GitHub: https://github.com/olekscode/MLNeuralNetwork
>>>>> Joined the PolyMath organization on GitHub
>>>>> Created a repository for the TabularDataset project https://github.com/PolyMathOrg/TabularDataset as a part of PolyMath organization on GitHub
>>>>> Fixed a PolyMath issue #25 and made a PR
>>>>> Read an article from Wolfram Mathematica documentation regarding Dataset. It was one of the reading suggestions sent to me by Nick Papoylias
>>>>> B. Next steps
>>>>> Fix more issues of PolyMath, using Iceberg. I have to get used to it by the time the coding phase starts
>>>>> Read the rest of Nick Papoylias's suggestions
>>>>> C. Help needed
>>>>> The Dataset in Wolfram, as well as Pandas in Python, has a very advanced indexing system. Smalltalk has its own special conventions for indexing, so I think that it would be great if I got familiar with them. Could you suggest me some reading on this topic (what are the indexing conventions in Smalltalk?).
>>>>> For example, in Wolfram, I can write dataset[[-1]] to extract the last row. But in Pharo indexes can not be negative. In Pharo I would say dataset last. But how about dataset[[-5]]?
>>>> This would be a good exercise for you ;) In Pharo you can easily add negative indexing yourself.
>>>>
>>>> Hint: You know the index of the last element, since this is the size of the collection, so... ;)
>>>>
>>> No need for changes, this exists already.
>>>
>>> Use atWrap: index put: value and atWrap: with negative indexes.
>>> 'hello' atWrap: -2
>>>
>>> There is a specific version for Array using a primitive.
>>> #[ 10 20 30 40 ] atWrap: -1
>>>
>>> atWrap:0 gives you the last item.
>>> atWrap: -1 gives 30
>>>
>>> This is different from 0 based index languages.
>>>
>>> The interesing thing about atWrap: is that it uses modulo interally so you do not need to care about that.
>>>
>>> ($/ split: 'abc/def/ghi/jkl') atWrap: -1
>>> --> 'ghi'
>>>
>>> The Matrix class has a bunch of things API wise but the class is highly inefficient, doing copies all the time etc. It would be nice to have some kind of futures/copy on write style things in there.
>>>
>>> I miss cbind and rbind. These are useful. I have some half baked super inefficient implementations of these things for Matrix.
>>>
>>> https://stat.ethz.ch/R-manual/R-devel/library/base/html/cbind.html
>>>
>>> The ability to name columns is also nice to have.
>>>
>>> In R one does:
>>>
>>> df <- dataframe()
>>> cbind(df, c(1,2,3))
>>> cbind(df, c(4,5,6))
>>> names(df)<-("C1", "C2", "C3")
>>> names can be found back with:
>>>
>>> names(df)
>>>
>>> A Smalltalkish style would be welcome.
>>>
>>
>>
>>
>> Interesting ! Are you coming to PharoDays ? We can talk about that if we found time.
>>
>>> Maybe looking at the Voyage queries can be helpful.
>>>
>>> Phil
>>>
>>>
>>>> Try adding an extention method to Ordrered or SequenceableCollection.
>>>>
>>>> If the Pharo by example chapter is not enough or the MOOC, read the source
>>>> itself in the core, to see how basic methods are implemented (it is less scary,
>>>> than it sounds).
>>>>
>>>> You can also try Chapters 9, 10, 11 of the blue book (some API changes may apply):
>>>>
>>>> http://sdmeta.gforge.inria.fr/FreeBooks/BlueBook/Bluebook.pdf
>>>>
>>>>> Or what is the best way of implementing this index: dataset[["name"]] (extracts a named row), dataset[[1]] (extracts the first row)? Should I create two separate messages: dataset rowNamed: 'name' and dataset rowAt: 1?
>>> rowNamed:
>>> rowAt:
>>>
>>> yes, look like it.
>>>
>>> But if we want to model things like R dataframes for example, this has to be seen as a vectorized operation, so you can to use row slices, column slices, and logical indexes.
>>>
>>> Check this out:
>>>
>>> http://www.r-tutor.com/r-introduction/data-frame/data-frame-row-slice
>>> https://www.r-bloggers.com/working-with-data-frames/
>>>
>>>
>>>> The internal representation of your data-structure can be anything at the moment, as long as you encapsulate it.
>>>>
>>>> (ie it can be nested OrderedCollections with meta-data for column-names to indexes, or dictionary of collections etc).
>>>>
>>>> If you don't expose it to the user (ie return it from the public api, or expect knowledge of it in argument passing),
>>>> we can easily change it later. So first make it work, and we optimize later ;)
>>>>
>>>> For your case it will be a little bit trickier because you also have the notions of a) rows and b) columns, which
>>>> are exposed to the user. So you would need to create abstractions for these too.
>>>>
>>>> Cheers,
>>>>
>>>> Nick
>>>>>
>>>>>
>>>>> If someone else is having problems with Iceberg on Linux, try downloading the threaded VM:
>>>>> wget -O- get.pharo.org/vmT60 | bash
>>>>> And use SSH (not HTTPS) remote URL.
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups "Pharo Google Summer of Code" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>>>>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>>>>> To view this discussion on the web visit https://groups.google.com/d/msgid/pharo-gsoc/CAEp0Uzu-8fw3dA6ezVoj-QptvLcB8….
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "Pharo Google Summer of Code" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to pharo-gsoc+unsubscribe(a)googlegroups.com.
>>>> To post to this group, send email to pharo-gsoc(a)googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/msgid/pharo-gsoc/CACEStOgLC6HbYJ8HBLHWfs5%2BwqN….
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>
May 16, 2017