[Pharo-users] Re: Mardeep as a format to (re)publish and exchange Pharo powered data narratives, lesson and book(let)s

2022-12-15 Thread PAUL DEBRUICKER
Nice write up

> On Dec 13, 2022, at 3:15 PM, Offray Vladimir Luna Cárdenas 
>  wrote:
> 
> Hi,
> 
> As I told in a previous message, we, at the Grafoscopio[1][1a][1b] community, 
> are migrating some lessons learned since 2015 to the new capabilities 
> available since last year via Lepiter[2]. And one of such lessons is the use 
> of human friendly data formats for exchanging and publishing data narratives.
> 
> [1] https://mutabit.com/grafoscopio/en.html
> [1a] https://mutabit.com/repos.fossil/grafoscopio/doc/tip/intro.md
> [1b] https://mutabit.com/repos.fossil/grafoscopio/doc/tip/readme.md.html
> [2] 
> https://lepiter.io/feenk/introducing-lepiter--knowledge-management--e2p6apqsz5npq7m4xte0kkywn/
> 
> Originally, in Grafoscopio, we made this friendly format by embedding 
> Markdown inside STON, as shown in the Grafoscopio Manual (PDF[3], source code 
> [3a]) and now we are flipping the strategy: embedding STON metadata in 
> Mardeep[4]/Markdown, which allows us to exchange and publish Pharo powered 
> data narratives, lessons and book(let)s in a pretty light format as shown by 
> the republication of the "PetitParser: Building Modular Parsers" chapter 
> (18th )from the Deep into Pharo book[4]  as a Markdeep data narrative[4a]. 
> The chapter was rewritten in Lepiter and can be exported/imported to/from 
> Markdeep, so new updates or learning notes can be created pretty easily[4b]. 
> Because we combine this with Fossil SCM[5], it is also possible to have the 
> history of the documents (look at [4a1][4b1]) in a self contained environment 
> for collaborative publishing/writing that is easier to use, in comparison 
> with Git based alternatives (as shown in our practices introducing this tools 
> and workflows to non-programmers).
> 
> [3] 
> https://mutabit.com/repos.fossil/grafoscopio/uv/Docs/En/Books/Manual/manual.pdf
> [3a] 
> https://mutabit.com/repos.fossil/grafoscopio/file?name=Docs/En/Books/Manual/manual.ston=tip
> [4] 
> http://files.pharo.org/books-pdfs/deep-into-pharo/2013-DeepIntoPharo-EN.pdf
> [4a] 
> http://mutabit.com/repos.fossil/mutabit/doc/tip/wiki/en/petitparser-building-modular-parsers-2013--ac8zq.md.html
> [4b] 
> http://mutabit.com/repos.fossil/mutabit/doc/tip/wiki/en/petitparser-building-modular-parsers--ac8zq.md.html
> [4a1] http://mutabit.com/repos.fossil/mutabit/timeline?uf=1680c3899
> [4b1] 
> http://mutabit.com/repos.fossil/mutabit/finfo?name=wiki/en/petitparser-building-modular-parsers--ac8zq.md.html=98674f27039de682=67aabb62607b152d
> [5] https://fossil-scm.org/
> 
> I like the results with so far with this light (re)publishing workflow based 
> in Markdeep, despite some bugs, like subsection numbering done in Markdeep 
> when combined with HTML divs[6] (a bug already reported to the author). For 
> more detailed control of the output or the combination with HTML graphical 
> libraries, like Apache Echarts, we're testing a similar strategy using 
> Pandoc's Markdown with promising features. For example, we can have 
> interactive snippets in the HTML exported document [6a].
> 
> [6] https://nitter.net/offrayLC/status/1585701931728740352#m
> [6a] https://twitter.com/offrayLC/status/1555229528355651586
> 
> Such light, human readable and diff friendly publishing and exchange formats 
> are kind of a dehydrated data narrative for the web and/or the file-system 
> than can be re-hydrated back into a full Pharo/GToolkit image for total 
> interactivity/moldability and meanwhile you can tease the casual web 
> reader/explorer with data stories and visualizations without s/he having the 
> need to have Pharo/GToolkit in her/his machine.
> 
> Cheers and thanks for the community and technologies that make this possible. 
> I will be posting more advances as they come.
> 
> Offray


[Pharo-users] Re: Omnibase/Monibase repository removal

2022-08-23 Thread PAUL DEBRUICKER
From my reading, it seems like whoever posted OmniBase to github 9 years ago 
added the MIT license without permission and the OmniBase library remains 
closed source.  




> On Aug 23, 2022, at 6:46 AM, s...@clipperadams.com wrote:
> 
> I’m not fully understanding the issue.
> 
> 
> 
> Is it that:
> 
>   • The repos are violating the library license (other than the erroneous 
> MIT license, which could easily be updated)?
> 
>   • The fact that OmniBase is not open source violates a principle you 
> have in continuing to host it?
> 
> If the latter, may I suggest you offer to transfer the repo(s) to a willing 
> party?
> 


[Pharo-users] list archive search broken

2022-04-05 Thread PAUL DEBRUICKER
the Empathy search box here: 
https://lists.pharo.org/empathy/list/pharo-users.lists.pharo.org

Doesn't work.  Not sure if thats something everyone knows and is working on or 
not as I can't search the list to see because doing in the normal way with 
google also doesn't work or comes up empty e.g. googling


search box site:https://lists.pharo.org/empathy/list/pharo-users.lists.pharo.org

search box site:https://lists.pharo.org/



Thanks




[Pharo-users] Re: Is there a way to load a dependent repository of assets that doesn't have a baseline - in my Metacello baseline?

2021-01-28 Thread Paul DeBruicker
You could use a #postLoadDoIt: or #preLoadDoIt: and have Zinc download the
github repo contents to the directory of your choice or use LibC to do a git
checkout in the right spot.



Tim Mackinnon wrote
> Hi - I’m trying to create a baseline for my project so that it includes a
> dependent repository that has some assts but no code. Is there a way to do
> this in Metacello - I have a baseline dependencies like the following -
> and its the last line that fails as it not really a repo with a baseline
> in it - so Metacello signals an error - but I’m wondering if there is
> something I can do to just load that repo without considering it as a
> baseline - I’m after something like: 
> 
>  spec resources: 'CP-ClientEnvironment' with: [  spec 
>   repository: 'github://ErikOnBike/CP-ClientEnvironment' 
> ].
> 
> 
> This is what I have to give an idea - possibly I could catch the exception
> and resume - or is there some cunning way (maybe even a post load script
> or something)?
> 
> setUpDependencies: spec 
>   
>   spec
>   baseline: 'ZincHTTPComponents' with: [ spec 
>   repository: 'github://svenvc/zinc';
>   loads: #('Core' 'WebSocket') ].
>   
>   spec 
>   baseline: 'CodeParadise' with: [  spec 
>   repository: 
> 'github://ErikOnBike/CodeParadise/repository' ].
>   
>   spec 
>   baseline: 'CP-ClientEnvironment' with: [  spec 
>   repository: 'github://ErikOnBike/CP-ClientEnvironment' 
> ].
>   
> 
> 
> 
> Tim





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


[Pharo-users] Re: NeoCSVReader and wrong number of fieldAccessors

2021-01-04 Thread Paul DeBruicker
After instantiating the reader and before doing the reading you can
#readHeader and check that the reader field count and header field count
match.  Would that help?

If the CSV doesn't use headers then you can process the "header" as  the
first record and then process the rest of the file.  



jtuchel wrote
> Please find attached a small test case to demonstrate what I mean. There 
> is just some nonsense Business Object class and a simple test case in 
> this fileout.
> 
> 
> Am 04.01.21 um 14:36 schrieb 

> jtuchel@

> :
>> Happy new year to all of you! May 2021 be an increasingly less crazy 
>> year than 2020...
>>
>>
>> I have a question that sounds a bit strange, but we have two effects 
>> with NeoCSVReader related to wrong definitions of the reader.
>>
>> One effect is that reading a Stream #upToEnd leads to an endless loop, 
>> the other is that the Reader produces twice as many objects as there 
>> are lines in the file that is being read.
>>
>> In both scenarios, the reason is that the CSV Reader has a wrong 
>> number of column definitions.
>>
>> Of course that is my fault: why do I feed a "malformed" CSV file to 
>> poor NeoCSVReader?
>>
>> Let me explain: we have a few import interfaces which end users can 
>> define using a more or less nice assistant in our Application. The CSV 
>> files they upload to our App come from third parties like payment 
>> providers, banks and other sources. These change their file structures 
>> whenever they feel like it and never tell anybody. So a CSV import 
>> that may have been working for years may one day tear a whole web 
>> server image down because of a wrong number of fieldAccessors. This is 
>> bad on many levels.
>>
>> You can easily try the doubling effect at home: define a working CSV 
>> Reader and comment out one of the addField: commands before you use 
>> the NeoCSVReader to parse a CSV file. Say your CSV file has 3 lines 
>> with 4 columns each. If you remove one of the fieldAccessors, an 
>> #upToEnd will yoield an Array of 6 objects rather than 3.
>>
>> I haven't found the reason for the cases where this leads to an 
>> endless loop, but at least this one is clear...
>>
>> I *guess* this is due to the way #readEndOfLine is implemented. It 
>> seems to not peek forward to the end of the line. I have the gut 
>> feeling #peekChar should peek instead of reading the #next character 
>> form the input Stream, but #peekChar has too many senders to just go 
>> ahead and mess with it ;-)
>>
>> So I wonder if there are any tried approaches to this problem.
>>
>> One thing I might do is not use #upToEnd, but read each line using 
>> PositionableStream>>#nextLine and first check each line if the number 
>> of separators matches the number of fieldAccessors minus 1 (and go 
>> through the hoops of handling separators in quoted fields and 
>> such...). Only if that test succeeds, I would then hand a Stream with 
>> the whole line to the reader and do a #next.
>>
>> This will, however, mean a lot of extra cycles for large files. Of 
>> course I could do this only for some lines, maybe just the first one. 
>> Whatever.
>>
>>
>> But somehow I have the feeling I should get an exception telling me 
>> the line is not compatible to the Reader's definition or such. Or 
>> #readAtEndOrEndOfLine should just walk the line to the end and ignore 
>> the rest of the line, returnong an incomplete object
>>
>>
>> Maybe I am just missing the right setting or switch? What best 
>> practices did you guys come up with for such problems?
>>
>>
>> Thanks in advance,
>>
>>
>> Joachim
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
> 
> -- 
> ---
> Objektfabrik Joachim Tuchel  mailto:

> jtuchel@

> Fliederweg 1 http://www.objektfabrik.de
> D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
> Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
> 
> 
> 
> 
> NeoCSVEndlessLoopTest.st (2K)
> http://forum.world.st/attachment/5125853/0/NeoCSVEndlessLoopTest.st;





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


[Pharo-users] smalltalkhub down

2020-07-10 Thread PAUL DEBRUICKER
https://downforeveryoneorjustme.com/smalltalkhub.com



[Pharo-users] Smalltalkhub delete date

2020-07-10 Thread Paul DeBruicker
Hi 

Would someone please add the date you're going to delete smalltalkhub to every 
page on Smalltalkhub?  

Thanks

Paul




Re: [Pharo-users] Pharo 8. Epicea seems to be turned off. how do I get it working again?

2020-07-01 Thread Paul DeBruicker
Hi !

I just figured it out.  

I must've ran

EpMonitor current disable

And forgot all about doing that.  


Everything works how it should.  My fault. 

Thanks



Stéphane Ducasse wrote
> Hi Paul
> 
> I do not know. 
> This is the first time I hear that epicea blocks.
> If you close your image and goes to changes you will be able to reopen 
> epicea and check your code. 
> At start up epicea just check if there was a new session but besides that
> there is nothing 
> different than opening it. 
> 
> S. 
> 
>> On 30 May 2020, at 17:05, PAUL DEBRUICKER 

> pdebruic@

>  wrote:
>> 
>> Hi-
>> 
>> I had an image lock up so I "Force quit" it from the apple menu.  
>> 
>> When I check "Code Changes" its most recent changes are from 9 days ago. 
>> My most recent save was a few hours ago & I was able to restore the
>> missing code between the save & now by dropping the changes file in the
>> image.  
>> 
>> How do I double check and get epicea running again in this image?
>> 
>> Thanks
>> 
>> 
>> 
> 
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org 
> 03 59 35 87 52
> Assistant: Aurore Dalle 
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley, 
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France





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



[Pharo-users] PharoExtras group on smalltalkhub -> github ?

2020-06-10 Thread PAUL DEBRUICKER
Are there any projects in PharoExtras  (or other public  groups) that  have not 
been ported to github?  


If they've been ported where are they now?  


Is there any map between smalltalkhub projects and their new locations or is it 
all on a project by project basis right now? 


Seems like there's individual mailing list messages and some notes on project 
sites and thats about it.  IS that accurate? 


Thanks


Re: [Pharo-users] Find/Replace class scoped

2020-05-27 Thread Paul DeBruicker



Try #execute rather than #primitiveExecute





Vitor Medina Cruz wrote
> Will wait then.
> 
> I tried to use the RB classes but with no success. There are few docs and
> test code are hard to understand (still not sure if I should use transform
> ou primitiveExecute). I did this:
> 
> (RBRenameMethodRefactoring new
> renameMethod: #with:doThis:
> in: RefactoringReformatExample
> to: #withh:doThis:
> permutation: #(1 2)) primitiveExecute
> 
> and
> 
> (RBRenameMethodRefactoring new
> renameMethod: #with:doThis:
> in: RefactoringReformatExample
> to: #withh:doThis:
> permutation: #(1 2)) tranform
> 
> but nothing happens... It is really odd, I expected an error at least.
> 
> I am assuming permutation means the change of params order.
> 
> 
> On Fri, May 22, 2020 at 3:50 AM Stéphane Ducasse 

> stephane.ducasse@

> 
> wrote:
> 
>> we are working with sebastian jordan on a better rewriter.
>>
>> S.
>>
>> On 21 May 2020, at 17:17, Vitor Medina Cruz 

> vitormcruz@

>  wrote:
>>
>> Interesting, I will have a look at it.
>>
>> On Thu, May 21, 2020 at 11:52 AM Thierry Goubier <
>> 

> thierry.goubier@

>> wrote:
>>
>>> Hi Vitor,
>>>
>>> as a matter of fact, the infrastructure for doing what you're looking
>>> for is already there.
>>>
>>> The algorithm is the following:
>>>
>>> - create a scope (something based on RBBrowserEnvironment, such as
>>> RBClassEnvironment or based on regexes and AND / OR operations:
>>> RBAndEnvironment, RBNotEnvironment, which allows for virtually
>>> anything, such as all #printString methods in the package X that do
>>> not belong to class Y)
>>>
>>> - create a refactoring command: if it is not a pre-existing command
>>> such as rename class, etc..., then writing a pattern matcher is
>>> possible with RBTreeRewriter.
>>>
>>> - execute the refactoring command on the environment, changing only
>>> for the subset of code visible in the environment.
>>>
>>> Normally, the system browser or the search tools should automatically
>>> setup the environment for you, and scope accordingly most of the
>>> refactoring commands. As far as I know, there isn't yet a shell giving
>>> you the full pattern matching rewrite power, but some work was
>>> underway (GUI tools).
>>>
>>> Going with the source files as you did also work...
>>>
>>> Regards,
>>>
>>> Thierry
>>>
>>> Le jeu. 21 mai 2020 à 15:30, Vitor Medina Cruz 

> vitormcruz@

>  a
>>> écrit :
>>> >
>>> > Well, as it seems, there is no way of find/replacing other than inside
>>> a single method.
>>> >
>>> > As a workaround, I did the following:
>>> >
>>> > 1- Committed all my image work in progress;
>>> > 2- Opened the project structure in an external tool (notepad++ in this
>>> case) and did the find/replace there;
>>> > 3- Committed it using git command line;
>>> > 4- Back to the image, I did a repair repository from iceberg checking
>>> out and ignoring changes to the image (safe because I did commit
>>> everything
>>> before)
>>> >
>>> > If there are many places to change, it is worth.
>>> >
>>> > Regards,
>>> > Vitor
>>> >
>>> > On Tue, May 19, 2020 at 12:56 PM Vitor Medina Cruz <
>>> 

> vitormcruz@

>> wrote:
>>> >>
>>> >> Hello,
>>> >>
>>> >> Is there a way to make find replace in a class scoped way? I can do
>>> that with finder, but I figured only with package scoping. I wanna to
>>> change the name of a variable in multiple methods, and also I would like
>>> to
>>> regex replace an expression also in multiple methods.
>>> >>
>>> >> Regards,
>>> >> Vitor
>>>
>>>
>> 
>> Stéphane Ducasse
>> http://stephane.ducasse.free.fr / http://www.pharo.org
>> 03 59 35 87 52
>> Assistant: Aurore Dalle
>> FAX 03 59 57 78 50
>> TEL 03 59 35 86 16
>> S. Ducasse - Inria
>> 40, avenue Halley,
>> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
>> Villeneuve d'Ascq 59650
>> France
>>
>>





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



[Pharo-users] pharo 8 - method versions - how to see author/timestamp?

2020-05-15 Thread PAUL DEBRUICKER
Hi -

Sometimes I want to revert to older versions of methods e.g. from an hour ago.  

In the "Recent versions of MyClass>>#myMethod" dialog no timestamps or authors 
are present.  

How do I see those? 

Thanks

Paul 


[Pharo-users] Issues browsing/saving a class in a package - seems like its unknown

2020-05-07 Thread PAUL DEBRUICKER
Hi - 

In Pharo 7 I'm having an issue with a particular class where if I browse it in 
Calypso I can see & navigate among the methods  in the class.   

If I run some of the methods I get dnu errors for methods I can see in the 
class browser.  

If I re-save a method that has the dnu without changing anything then Calypso 
shows two methods in the same class with the same name.

If in a playground I try a
 
MyClass recompile

Then I get an "Unknown variable..." dialog that asks me to define the class.

If I highlight the MyClass in the playground and "browse" it then Calypso finds 
the class and opens the browser.  

If I fileout the class then the fileout has all the methods and two copies with 
the same name of the one I re-saved above.


Because of these issues I cannot save the package using Monticello or iceberg.


Any  ideas what I can do to fix this situation?

At a minimum I reckon I can fileout the bad class, delete it from the image, 
and file it back in, then save.

Thanks 

Paul


Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-05 Thread Paul DeBruicker
Ahh.  Apologies.   I don't think I understand your point. Are you saying
Smalltalkers habitually make obscure/cool things with no documentation and
leave their coolness to make their case for adoption rather then helping
people adopt them with documentation &  other help?  Or something else?


I wasn't trying to be insulting of what he's done just to point out that the
change of understanding between my conception of "the web" as it is today
and his example of an alternate approach/worldview was step. Its clearly
a lot and impressive.

In the 3:36 video he shows how caffeine.js is usable, enables the use in the
browser of

live-coding
loading js frameworks
manipulating js frameworks
aframe.io
WebXR
AR
VR
2D projections of a 3D space
normal Morphic on SqueakJS
MorphicJS with normal Squeak
HTML replication of the 4 pane code browser
remote interaction between instances of caffeine (e.g. on other machines)
GUI & backend
javascript <-> Smalltalk two way AST parsing
running in Node.js vs the browser
Web Workers
injecting code into node.js instances
6DOF headsets
Non AR, non 6DOF headsets
Speech control of caffeine
WebMIDI to play a middle C
Caffeine control of every tab in your browser (btw can I control your bank
account's tab from my caffeine.js app you're running?)

and implies that doing so is valuable.  Each of those are complex domains to
understand let alone the value of tying them all together.  

After watching it and reading about it (and things like Shaker) and trying
it I just have no idea how to apply it to problems I'm aware of and if there
was a "training wheels" demo then maybe I'd come to a better understanding. 
Or I'd learn about problems I'm not even thinking about because I have no
tools for them.  


To me it gives the impression of "you too can work on cars:
https://youtu.be/aHSUp7msCIE?t=21 see?" without the "these are wrenches,
this is a nut and a bolt, when you use them together you can do this, which
enables you to " part 

I know making and teaching are different skills both with their own
difficulties.  

My main point was he could use his tool to lead a person along a path that
shows how to adopt his tool rather than leave a person in the dev
environment with an open readme. And have that be the first impression and a
nice exposition of its flexibility and power.




ponyatov wrote
>> I've watched the youtube presentation and navigated through the impress 
>> presentation  on your site and it too quickly introduces tons of concepts
>> of
>> what you can do but nothing about why anyone should want to do those
>> things
>> or how to put them together into something a user would use once a
>> developer
>> has made something.  
> 
> Oh, you are already feeling the Smalltalk community spirit. 
> 
> That is a professor effect when everyone will be every day extoll and
> pitch
> how Smalltalk is cool, but nobody does not do any text or video blogging
> with etudes and reasoning how to use this magic for newbies, and why ever
> you need to use it at all in place of mainstream tools and languages
> already
> have and were documented anything you can imagine (except the Smalltalk
> interactivity and its memory persistence). The most fun you'll get with
> trying to make work of external libraries, that's the special feel of
> dropping dozens of errors due to incompatibility with your system.
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Pharo 8 - OSProcess or OSSubProcess or ?

2020-05-04 Thread Paul DeBruicker
Thanks Torsten

That definitely works great.  Sometimes I mistype the commands.  Is there a
way to get the error rather than an empty string?  

e.g. running

 LibC resultOfCommand: 'dur'

gives an empty string rather than 

  sh: dur: command not found

?

Paul





Torsten Bergmann wrote
> Hi Paul,
> 
> you can use:
> 
> LibC resultOfCommand: 'dir'
> 
> which is part of standard image.
> 
> Bye
> T.
> 
> 
>> Gesendet: Montag, 04. Mai 2020 um 20:05 Uhr
>> Von: "PAUL DEBRUICKER" 

> pdebruic@

> 
>> An: "Any question about pharo is welcome" 

> pharo-users@.pharo

> 
>> Betreff: [Pharo-users] Pharo 8  - OSProcess or OSSubProcess or ?
>>
>> Hi -
>>
>> What  is the recommended way to  run a shell command  from Pharo 8 and 
>> get  the output from stdout into the image?
>>
>>
>> Thanks
>>
>> Paul
>>





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



[Pharo-users] Pharo 8 - OSProcess or OSSubProcess or ?

2020-05-04 Thread PAUL DEBRUICKER
Hi - 

What  is the recommended way to  run a shell command  from Pharo 8 and  get  
the output from stdout into the image?  


Thanks

Paul


[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 instead get 

'123'
'asdf'
'"one two "three" four five"'
'"5678"'

Is there a standard way or setting for handing strings with quoted strings in 
them? 

I'd like to end up with the expected result rather than the result I'm getting. 
 


Thanks

Paul




[Pharo-users] Pharo on a chromebook?

2020-03-31 Thread PAUL DEBRUICKER
Forgive my ignorance but does anyone have a recipe to run Pharo on a 
Chromebook?  Without having to install another OS.  And also not with SqueakJS. 

Just on ChromeOS?  

Seems like its not possible. Just wanted to double check.  

thanks
Paul


Re: [Pharo-users] Quuve (financial app) movestto Public Domain under MIT License

2020-03-04 Thread Paul DeBruicker
Hi - Sorry your venture did not work out.  I think it is generous to share
your code with the world.  I'm interested in seeing how you put it all
together.  

Recognizing this is a Pharo list, I'm also interested in seeing your
GemStone site and maintenance scripts.  

Hope you're able to find people to keep it going

Paul


Pharo Smalltalk Users mailing list wrote
> Quuve Moves to the Public Domain under MIT License
> https://opensource.org/licenses/MIT;
> 
> Quuve provides a pro-grade integrated environment for portfolio management
> and research for securities investors. Professional grade in that it was
> meant to be licensed out to firms/groups offering research & portfolio
> management services. It is a virtualized, scaleable, web application
> developed with Pharo and deployed on GemStone/S. See the Quuve Overview
> video on YouTube
> https://www.youtube.com/watch?v=sraCv1VwJzQlist=PLfTMPTPc22sGNrm2rXt8kD-9iFTgqbAUG;
> for more information.
> 
> Quuve development stopped in the Fall of 2017 due to a lack of funding,
> however it still has some cutting-edge features for the industry. Because
> Quuve can function as an institutional level data server, tailored mobile
> apps could be built as standalone technology - and such an approach could
> even take advantage of Quuve’s analyst/site model subscription selections.
> 
> Software Positives:
> 
>-
> 
>Using a Glorp-like interface to access data: Quuve has successfully run
>on Pharo (stand alone for development, backed by Fuel), Gemstone
>(deployment), and with portions backed using a relational DB - not
> required
>nor used at present. Quuve provides DB admin tools including
> import/export
>of DB’s in part or full; deleted records access tables, and more. User
>permission-masks can be granted by DB, table, even patterns in records.
>-
> 
>Generic CRUD tables UI allows for rapid class development/usage - see
>ApplicationContext (stack with preferences style inheritance).
>-
> 
>3-tier model (application, site, user) for data and Rules, allows site
>(group) and user specific overrides, which is important in Finance,
> where
>few will agree on how to define “free cash flow” in one accounting
> system,
>or one industry, let alone globally.
>-
> 
>Processors allow for dynamic code-based answers to data requests; they
>blur the lines between data and Rules. Any object can be wrapped with a
>Processor and have data and rules added dynamically. Rules allow
>data-requests to perform any operation a modern computer can perform,
> and
>most often these are simple math operations on series. Rules are
> organized
>by “analyst” names (akin to rules’ Classes), the specifications for
>analysts is user specific, allowing for dynamic-inheritance required
> for a
>pro-grade multi-user Finance application pulling in international data
>(using different source accounting standards). Rules are compiled on
>demand; all caching is dynamic and user specific. Rules can be defined
>using wild-card method-names to open up entire remote volumes of data,
> or
>data transformations, with a new pattern. Data series are very robust
>around missing data and math errors. Quuve includes time profiling and
>debugging method-trace system to understand data missing or debug
> errors -
>enabled in user-specific permissions.
>-
> 
>Demonstrated integration of learning systems for analysis and portfolio
>management (“robo-trading”). Data-sampling uses “point in time view” to
>support accurate backtesting. Portfolios have the unique feature of
> being
>able to scroll backwards in time to any date to see the specific
> holdings
>there - as models are built from trade-event records.
>-
> 
>Access to millions of FREE data series from sites like FRED (St. Louis
>Federal Reserve Bank - USA), World Bank, etc. - menu selectable in
> report
>writer!
>-
> 
>NPI (Non-public information) masking tools - important for privacy in
>professional Finance office.
>-
> 
>Script Tool allows for ad hoc testing - most tools like the company
>report tool also incorporates an ad hoc scripting area.
>-
> 
>User-specific configurable DB tables access, window access, etc. User
>and DB bindings specified in CSV files for bootstrapping.
>-
> 
>Programmer documentation in wiki & in-system help-notes. Some ‘company
>reports’ are training tools.
> 
> 
> Software Issues (“opportunities”!):
> 
>-
> 
>Quuve development stopped in the Fall of 2017 due to a lack of funding;
>some dialogs already look a bit out-dated.
> 
> 
>-
> 
>Some external libraries (e.g. javascript charting) require external
>licenses - see Credits listed below.
>-
> 
>Professional grade data must be licensed for individual or larger group
>- please consult us. Note: we can provide small amounts of CSV data for

Re: [Pharo-users] Floating point arithmetic

2020-01-12 Thread Paul DeBruicker
Whats wrong with #roundedTo: ? 


If you actually need it calculated to 8 significant digits then you can use
scaled decimals e.g.

(0.09560268 asScaledDecimal - 0.005 asScaledDecimal) 

see  https://0.30004.com for more about why floating point math
does this sometimes





Donald Howard wrote
> Hello everyone,
> 
> This is an issue I've had awareness of going way back but it's the first
> time I've had to personally deal with it.  I've done some research and
> found it addressed in a number of ways but given current time pressures
> and
> a huge list of to-dos, I thought I'd turn to the community for rapid
> advice
> to get me over the hump.  The circumstances are summarized below in code
> and comments suitable for a playground.
> 
> "This is the actual arithmetic I want to do...
>  0.09560268 - 0.005 = 0.09060268"
> 
> "Evaluate this in a playground and you'll see this is what
>  floating point arithmetic produces --the first two are wrong, every one
> after is correct"
> 0.09560268 - 0.005 "=> 0.090602679".
> 0.0956026 - 0.005  "=> 0.090602599".
> 0.095602 - 0.005   "=> 0.090602".
> 0.09560 - 0.005"=> 0.0906".
> 0.0956 - 0.005 "=> 0.0906".
> 0.095 - 0.005  "=> 0.09".
> 
> "This workaround works"
> 0.09560268 - 0.005 roundTo: 0.0001 "=> 0.09060268".
> "but one has to compute number of digits of precision
> and according to study above, it's not necessary at
> precisions >= 0.01"
> 
> "What are other suggestions, workarounds or approaches community has?"
> "THANKS!"
> 
> 
> Don Howard
> 
> https://objectguild.com;
> *Founding Member*

> dhoward@

> +31653139744
> (US) 651-253-7024





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



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

2020-01-06 Thread Paul DeBruicker
Also this tutorial gives a good overview of Seaside programming and is
different enough from the book that you get two approaches to many of the
same problems:  

http://seaside.gemtalksystems.com/tutorial.html


Paul DeBruicker wrote
> Hi Roelof,
> 
> There is a seaside specific mailing list you could join here: 
> 
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> 
> I have Seaside loaded in an image and can't find the ListComponent class. 
> IS that the correct name for the class you're using?
> 
> 
> If you post your question along with the code you are trying to the
> Seaside
> list someone will probably be able to help you.  What you're describing
> sounds straightforward to implement. 
> 
> 
> 
> Good luck 
> 
> Paul
> 
> 
> Pharo Smalltalk Users mailing list wrote
>> Hello,
>> 
>> Im a little bit further on my first project but now I fail to see how I 
>> can use the ListComponent to display all the paintings that are in the 
>> paintings collection on the Paintings class.
>> 
>> Anyone who can give me hints on this ?
>> 
>> Roelof
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



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

2020-01-06 Thread Paul DeBruicker
Hi Roelof,

There is a seaside specific mailing list you could join here: 

http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


I have Seaside loaded in an image and can't find the ListComponent class. 
IS that the correct name for the class you're using?


If you post your question along with the code you are trying to the Seaside
list someone will probably be able to help you.  What you're describing
sounds straightforward to implement. 



Good luck 

Paul


Pharo Smalltalk Users mailing list wrote
> Hello,
> 
> Im a little bit further on my first project but now I fail to see how I 
> can use the ListComponent to display all the paintings that are in the 
> paintings collection on the Paintings class.
> 
> Anyone who can give me hints on this ?
> 
> Roelof





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



Re: [Pharo-users] NeoCSV with numerous fields

2019-12-22 Thread Paul DeBruicker
Is there a header row?  IF so you can do:

csv := (NeoCSVReader on: stream) separator: Character tab.
header:= csv readHeader.
header size timesRepeat:[csv addFloatField].
csv upToEnd inspect





HilaireFernandes wrote
> The data come from sensors in 60, 600 and 6000 fields.
> 
> I can do has below but I need to know first the number of fields. But
> it's ok.
> 
> csv := (NeoCSVReader on: stream) separator: Character tab.
> 60 timesRepeat: [ csv addFloatField].
> csv upToEnd inspect.
> 
> Le 22/12/2019 à 17:34, Sven Van Caekenberghe a écrit :
>> Or do you want something else ?
> 
> -- 
> Dr. Geo
> http://drgeo.eu





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



[Pharo-users] fileout ** ERROR! THIS SCRIPT IS MISSING **

2019-12-20 Thread PAUL DEBRUICKER
This is in Pharo 7

In a package I have a class that has methods that I can see in a browser.  When 
I save it to an mcz file the class isn't saved in the file for the package.  
When I file out the class and file it back in there is a load error.  


The fileout has many of these errors



  scriptMarkerFor:withLabel:on:
** ERROR!  THIS SCRIPT IS MISSING **

  renderNameAndAddressFor:on:
** ERROR!  THIS SCRIPT IS MISSING **


Those methods are defined in the image and in the class's super class.  

I cannot change the class's package because I get method dict lookup errors. 

Making a copy of the class fixes everything for the copied class.  

Is there a way to scan my package for other classes that are broken like this 
one was? 

Thanks

Paul


Re: [Pharo-users] twilllio quest

2019-12-11 Thread Paul DeBruicker
There is a twilio library for pharo here:

https://github.com/newapplesho/twilio-smalltalk

Maybe you could learn what you need to do from it?



Pharo Smalltalk Users mailing list wrote
> Hello,
> 
> I wonder if I can solve the TwillioQuest with Pharo.
> 
> I then have to write code to send SMS and return a respons a a SMS.
> is this possible in Pharo and can I use for example teapot for it ?
> 
> and if it possible does anyone have a example of how to send a SMS with 
> Twillio.
> 
> Regards,
> 
> Roelof





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



Re: [Pharo-users] open spec window to handle exception and pause execution

2019-11-23 Thread Paul DeBruicker
Thanks Richard. That helped me figure it out.  I ended up doing:

[ [self testCondition] whileTrue:[ self doSomeStuff] ]
  on: MyNotification
  do:[:ex | |presenter | 
   presenter:=MyPresenter forException: ex .
   presenter openWithSpec. 
   Smalltalk ui theme runModal: presenter window]


Which does what I want


Richard Sargent wrote
> Paul, I'm going by memory and not Pharo specific.
> 
> I believe the default handling of the end of the exception block is
> implicitly equivalent to ex return: nil.
> 
> So, to get further handling of the exception, you need to #pass it or
> otherwise resignal it. Then the development environment will catch and
> handle the unhandled exception.
> 
> 
> On Wed, Nov 20, 2019, 20:53 PAUL DEBRUICKER 

> pdebruic@

>  wrote:
> 
>> Hi -
>>
>> I have a subclass of ComposablePresenter (lets call it MyPresenter) that
>> seems to work how I want.  When doing some processing I'd like to open
>> MyPresenter  when an exception occurs and pass it the exception e.g.
>>
>>
>> [ [self testCondition] whileTrue:[ self doSomeStuff] ]
>> on: MyNotification
>> do:[:ex | self openMyPresenterWith: ex]
>>
>> But that just results in lots of MyPresenter windows opening while the
>> execution of the #whileTrue: loop runs its course.
>>
>>
>> How do I pause the loop so I can use the MyPresenter window to modify and
>> fix the condition that raised the MyNotification?
>>
>> The MyPresenter window just edits the contents of a couple Dictionaries
>> so
>> isn't too tricky but it isn't really as easy to do in a debugger as it is
>> clicking a radio button and a "do it" button.
>>
>>
>> Thanks
>>





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



[Pharo-users] open spec window to handle exception and pause execution

2019-11-20 Thread PAUL DEBRUICKER
Hi -

I have a subclass of ComposablePresenter (lets call it MyPresenter) that seems 
to work how I want.  When doing some processing I'd like to open MyPresenter  
when an exception occurs and pass it the exception e.g.


[ [self testCondition] whileTrue:[ self doSomeStuff] ]
on: MyNotification 
do:[:ex | self openMyPresenterWith: ex]

But that just results in lots of MyPresenter windows opening while the 
execution of the #whileTrue: loop runs its course.  


How do I pause the loop so I can use the MyPresenter window to modify and fix 
the condition that raised the MyNotification?  

The MyPresenter window just edits the contents of a couple Dictionaries so 
isn't too tricky but it isn't really as easy to do in a debugger as it is 
clicking a radio button and a "do it" button.  


Thanks


[Pharo-users] class scoped code re-writing in pharo 7?

2019-10-25 Thread PAUL DEBRUICKER
Hi -

In pharo 7 how do I use the re-write tool to rewrite sends in only one class? I 
don't see how to browse scoped to just one class and also where the re-write 
tool is in the UI.  

Specifcally I want to change 

anObj record: aThing at: aTime 

to

self record: aThing into: anObj at: aTime


across 70 ish sends of #record:at: in one or two classes.  


Thanks

Paul


Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-22 Thread Paul DeBruicker
The error you hit was because the package loader was smart enough to notice
that there was a version conflict between the version of a subproject
already in the image and what the new load instructions were telling it to
load.  The title of the debugger you pasted in alludes to that fact.  

So what you need to do is decide what to do when there is a conflict as its
tricky for a package manager to figure out what it should do in every case.  


Metacello includes an instruction #onConflict: which accepts a block.  You
can write code in the block to decide wether to use the incoming version or
the extant version in the image or whatever.  e.g.

Metacello new 
repository: 'github://PierceNg/glorp-sqlite3:pharo7';
baseline: 'GlorpSQLite';
onConflict:[:ex | ex allow]; 
load.

would likely get everything to load without issue.  Then you'd have to run
the tests to see if the version conflict caused problems.  
 



Pharo Smalltalk Users mailing list wrote
> Nice!  Thanks.
> 
> So here is maybe a stupid question (and I'm gonna read the wiki stuff on
> packages next) but it seems to me that the package loader should notice
> that glorp is already loaded and not load it if glorp is specified as a
> prerequisite but instead it fails.
> 
> Is the package loader not smart enough to understand what is already
> loaded and skip load attempts?
> 
> Puzzling.
> 
>> On Oct 19, 2019, at 11:23 PM, Pierce Ng 

> pierce@

>  wrote:
>> 
>> On Sat, Oct 19, 2019 at 01:26:10AM -0700, Todd Blanchard via Pharo-users
>> wrote:
>>> I loaded GLORP+P3 without issue.
>>> Trying to load SQLite3 - it also wants to load GLORP which complains of
>>> conflict.
>> 
>> Todd, to load SQLite3 only:
>> 
>>  Metacello new
>>repository: 'github://astares/Pharo-UDBC/src';
>>baseline: 'UDBC';
>>load: 'SQLite'
>> 
>> Pierce





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



Re: [Pharo-users] How to install stripe library on Pharo 7 64bit ?

2019-10-14 Thread Paul DeBruicker
Are you sure you're using a released version of Pharo 7?

Running the load script in a stable released version of Pharo 7 loads with
no errors for me.  I'm not in a position to be able to support un-released
or non-stable or outdated versions of Pharo (e.g. pharo 8).

To get a stable version of Pharo 7 run this from a command line on mac or
linux:

curl https://get.pharo.org/64/ | bash

The missing baseUrl is my fault.  I override it in my own code to make nginx
do the ssl termination for the https connections.  I've uploaded a corrected
version.  

IT should be

StripeSystem>>#baseUrl
^'https://api.stripe.com/v1'


Also the API reference docs are here: https://stripe.com/docs/api


For any Stripe object I haven't created a class for the code should create
an instance of  a  StripeObject class

Hope this helps


Paul



Pharo Smalltalk Users mailing list wrote
> OK, did some more testing and here are the results.
> 
> 
> Pharo 7 
> - Image hangs when loading Zinc HTTP Components.  I tried loading Zinc
> HTTP
> Components separately through Metacello with the same results so I don't
> think the problem is with your code.  
> 
> 
> Pharo 8 
> - Stripe Loads fine,
> - 22/29 Stripe tests fail (On debug it says that StripeSystem class does
> not
> understand #baseUrl message)
> - Seaside not launched & can't right click Seaside Control Panel to start
> server (Fixed by reloading Seaside3 from Metacello.)
> - Stripe example apps (stripe & stripe-form) crash (Seaside Walkback 
> Error:
> Instances of UndefinedObject are not indexable)
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Running a teapot instance remotely

2019-10-10 Thread Paul DeBruicker
I use daemontools. Some people use Monit.

Sven made these for Pharo4 on Ubuntu 14.04 when Pharo was only 32 bit:

https://github.com/svenvc/pharo-server-tools

I'm sure you could edit those scripts to work for 64bit Pharo 7/8 on 64 bit
linux



And there is this chapter about deploying apps to production

https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/DeploymentWeb/DeployForProduction.html



sergio_101 wrote
> This worked perfectly!
> 
> To keep this running, I am running it in tux, so it will keep running when
> I log out.
> 
> How are people keeping it running these days?
> 
> Thanks!
> 
> 
>> On Oct 10, 2019, at 3:46 PM, Tim Mackinnon 

> tim@

>  wrote:
>> 
>> Sergio - looking at the last time I did this, my run script did:
>> 
>> 
>> 
>> 
> 
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> @

> sergio_101@

> https://sergio101.com
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> 
> 
> 
> signature.asc (849 bytes)
> http://forum.world.st/attachment/5105321/0/signature.asc;





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



Re: [Pharo-users] How to install stripe library on Pharo 7 64bit ?

2019-10-10 Thread Paul DeBruicker
Hi JAmes,


OK I updated the baseline several more times and it now loads into Pharo

Metacello new 
 baseline:'Stripe'; 
 repository: 'http://smalltalkhub.com/mc/pdebruic/Stripe/main';
 load:#('Dev') 






Pharo Smalltalk Users mailing list wrote
> Hi Paul,
> 
> Thanks for the update.  I tried your new code and it went futher than last
> time.  However the debugger shows up during cleanup and the entire image
> hangs.  I've attached a screenshot.
> 
> I also retested this with a completely fresh image using pharolauncher
> with
> the same results.
> 
> -James
> http://forum.world.st/file/t372299/stripe_install_on_Pharo_7.png; 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] How to install stripe library on Pharo 7 64bit ?

2019-10-07 Thread Paul DeBruicker
Oh sorry.  I haven't updated the load instructions in a while.  I'll edit
them there today.

Try this instead.


Metacello new
 baseline:'Stripe';
 repository: 'http://smalltalkhub.com/mc/pdebruic/Stripe/main';
 load:#('Tests' 'Seaside-Example')






Pharo Smalltalk Users mailing list wrote
> Hi, 
> 
> I am just starting to work with Pharo and Seaside to create a website that
> accepts payments though stripe.  Smalltalk is supported as a third party
> library according to https://stripe.com/docs/libraries#third-party
> 
> However I cannot get it to install.  Is the stripe library still
> supported? 
> If anyone can help me with this I would really appreciate it.  
> 
> I am using Pharo 7.0 64bit on Ubuntu linux.
> 
> I followed the instructions to install the library as per
> http://smalltalkhub.com/#!/~pdebruic/Stripe/
> 
> 
> Gofer new
>   url:  'http://smalltalkhub.com/mc/pdebruic/Stripe/main';
>   package: 'ConfigurationOfStripe';
> load.
> 
> (Smalltalk at: #ConfigurationOfStripe) project stableVersion
> load:#('Tests'
> 'Seaside-Example').
> 
> 
> Transcript log:
> 
> ConfigurationOfStripe>>initializeEnvironment (ZnZodiacNetworkingUtils is
> Undeclared) 
> 
> Loading 20161203 of ConfigurationOfStripe...
> Fetched -> ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.120 ---
> http://mc.stfx.eu/ZincHTTPComponents ---
> http://mc.stfx.eu/ZincHTTPComponents
> Loaded -> ConfigurationOfZincHTTPComponents-SvenVanCaekenberghe.120 ---
> http://mc.stfx.eu/ZincHTTPComponents ---
> http://mc.stfx.eu/ZincHTTPComponents
> Fetched -> ConfigurationOfHTTPAPIClient-PaulDeBruicker.10 ---
> http://smalltalkhub.com/mc/pdebruic/HTTPAPIClient/main/ ---
> http://smalltalkhub.com/mc/pdebruic/HTTPAPIClient/main/
> Loaded -> ConfigurationOfHTTPAPIClient-PaulDeBruicker.10 ---
> http://smalltalkhub.com/mc/pdebruic/HTTPAPIClient/main/ ---
> http://smalltalkhub.com/mc/pdebruic/HTTPAPIClient/main/
> Fetched -> ConfigurationOfSeaside3-topa.337 ---
> http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ ---
> http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/
> Loaded -> ConfigurationOfSeaside3-topa.337 ---
> http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ ---
> http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/
> 
> 
> Debugger triggered:
> Error:Name not found: Seaside-Pharo-Development
> 
> 
> p.s. - I am a beginner at smalltalk, so thank you for your patience
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Looking for APIs to access Facebook, Instagram and Youtube

2019-10-04 Thread Paul DeBruicker
YouTube is covered in this:

https://github.com/seandenigris/St-Google-API



EstebanLM wrote
> Hi, 
> 
> I’m evaluating the viability of a side project. 
> Are there around APIs to connect to those platforms mentioned first?
> 
> Thanks for the info, if any :)
> 
> Esteban





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



Re: [Pharo-users] Loading Seaside and Voyage in Pharo 7.0 64bit

2019-09-30 Thread Paul DeBruicker
Add a 

onConflict:[:ex | ex allow];


to your load instructions.  e.g.

Metacello new
baseline:'Seaside3';
repository: 'github://SeasideSt/Seaside:v3.4.0/repository';
onConflict:[:ex | ex allow];
load.

Metacello new 
repository: 'github://pharo-nosql/voyage:1.6/mc';
baseline: 'Voyage';
onConflict:[:ex | ex allow];
load: 'mongo tests'.


If you're always going to load Voyage after Seaside into a fresh image then
you don't need the #onConflict: send in the Seaside load instructions.
Having it in both allows you to load them in either order.




Jan Čada-2 wrote
> Hi, 
> 
> I am trying to load Seaside and Voyage to Pharo 7.0 64bit image using
> following :
> 
> Metacello new
>   baseline:'Seaside3';
>   repository: 'github://SeasideSt/Seaside:v3.4.0/repository';
>   load.
> 
> Metacello new 
>   repository: 'github://pharo-nosql/voyage:1.6/mc';
>   baseline: 'Voyage';
>   load: 'mongo tests'.
> 
> 
> I am getting dependency error:
> 
>   Load Conflict between existing BaselineOfGrease [baseline] from
> github://SeasideSt/Grease:v1.4.x/repository and BaselineOfGrease
> [baseline] from github://SeasideSt/Grease:v1.4.3/repository
> github://SeasideSt/Grease:v1.4.3/repository
> 
> - to me it seems that both Grease versions are in the end same. I see
> following in transcript:
> Project: Grease Core Tests baseline
> Fetched -> Grease-Tests-Core-CompatibleUserName.1554365153 ---
> https://github.com/SeasideSt/Grease.git[v1.4.3, v1.4.x] ---
> https://github.com/SeasideSt/Grease.git[v1.4.x]
> Fetched -> Grease-Tests-Pharo-Core-CompatibleUserName.1554365153 ---
> https://github.com/SeasideSt/Grease.git[v1.4.3, v1.4.x] ---
> https://github.com/SeasideSt/Grease.git[v1.4.x]
> 
> - I do not insist on Seaside or voyage versions - I just took the latest. 
> 
> Can you please help me with resolving this issue ? 
> 
> 
> Thanks, 
> 
> Jan





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



Re: [Pharo-users] Where did all the Comments Go?

2019-09-21 Thread Paul DeBruicker
Hi Andrew-

If you use the scripts from 

https://get.pharo.org (for 32 bit) 

or 

https://get.pharo.org/64 (for 64 bit) 

to download a vm+image e.g.

curl https://get.pharo.org/64 | bash 

Do you also have the disappearing comments issue?  I can't imagine it would
make a difference and that you'll still see the problem but it would be a
ten minute test at most.  


FWIW I can write and read class comments in Pharo 7 just fine, but don't use
and never load SmaCC.  

Could it be a problem with SmaCC + Pharo7? 





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



Re: [Pharo-users] Best Practices for Adapting JSON based APIs

2019-09-08 Thread Paul DeBruicker
Hi -

1.  There is a Stripe package here:
http://smalltalkhub.com/#!/~pdebruic/Stripe

MCHttpRepository
location: 'http://smalltalkhub.com/mc/pdebruic/Stripe/main'
user: ''
password: ''

You can see how it adapts to Stripe's changing API spec.

2. NeoJSONObject, which is part of Svens' NeoJSON package & JsonObject of
the JSON package here:

http://smalltalkhub.com/#!/~PharoExtras/JSON


each overrides #doesNotUnderstand: to return nil when you send messages the
JSON object doesn't define. E.g. given JSON of

{a: 1, b: 2}


you can 

myJson:=Json readFrom: '{"a": 1, "b":2}' readStream

myJson a. "1"
myJson b: 25. "sets b to 25"
myJson b. "25"
myJson zebra. "nil"


I like and use both the JSON packages but don't like using the overriden
#dnu mechanism because you cannot track implementors.  So later when you
want to know what #zebra does you cannot see it and have to remember its a
JSON object and you're doing a dictionary lookup.  But its a flexible way to
deal with JSON objects sith varying fields.  

3. Yes.  Because I want to be able to see implementors.

4.  No, not from an arbitrary spec.  Google publishes some of their APIs as
JSON specs and there is a project to interpret those specs and automatically
build objects and interfaces here 

https://github.com/seandenigris/St-Google-API 

If there is a standard way to define APIs (swagger maybe? I'm not sure) then
you could make something that does what you want for that API spec spec.


Hope this helps






darth-cheney wrote
> Hello all,
> 
> Several times in the past couple of years I've found myself attempting to
> create objects that incorporate/adapt a given APIs specification -- in
> other words, building a mini, pharo based SDK for the given API. These are
> always JSON based APIs.
> 
> I am not sure what the best practices are for doing this and am looking
> for
> some wisdom from this list. I have a few questions:
> 
> 1. When passing around JSON-based objects for a given API, is it better to
> work with Dictionaries or to create (for example) specific objects for
> specific kinds of JSON objects in the API -- ie for Stripe, would you just
> work with objects that read and parse Dictionaries or implement
> Transaction, User, CreditCard objects, etc, etc?
> 
> 2. If you create objects for each kind of entity rather than using
> dictionaries, what do you do in the (rather common) case where the API
> specification allows for a lot of malleability in a given JSON object that
> gets passed in for a given kind of request? Often times there can be
> arbitrary, non-required key-value pairs set by the user for a given
> transaction/request/whatever on the JSON object. I'm not sure how this
> would translate to Pharo objects, especially if we are creating a
> method-per-key
> 3. Do you create a method per what would be a key in the spec's JSON
> object?
> 4. If a given API spec is itself written in JSON, do we have some way of
> "automatically" creating the equivalent objects in Pharo (since both are
> machine readable)?
> 
> I am currently considering developing a bare-bones proof of concept
> package
> for making a Matrix Client https://matrix.org/docs/spec; but I'm a
> bit
> flummoxed about how to proceed, since there seem to be many ways to do
> this
> -- some that might be worse than others for testing, abstraction, etc,
> etc.
> 
> Any advice is much appreciated. Thanks!
> 
> -- ,
> Eric





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



Re: [Pharo-users] Old projects in ss3

2019-08-09 Thread Paul DeBruicker
Also did you use the URL of the page your repo is on?  Seems like maybe you
did from the image. You shouldn't.


You should use the Monticello Repository specification shown on the repo
page when you hover over Monticello Repository in the Getting The Code
section of the project page on ss3.

e.g.

MCHttpRepository
location: 'http://ss3.gemtalksystems.com/ss/GTDImplementation'
user: ''
password: ''







Paul DeBruicker wrote
> what is the repo you're having trouble reading? 
> 
> 
> Sergio Fedi wrote
>> Hello,
>> 
>> I'm coming back after a few years (Pharo 5.0) and tried to take a look
>> and
>> download some projects I have on ss3.
>> 
>> I'm using a Pharo 7.0 image.
>> 
>> Going to the ss3 site I find that I can't access my projects, a "Reading
>> a
>> number failed: a digit between 0 and 9 expected" error shows in the page.
>> 
>> Trying to view them from Monticello, after adding the appropriate
>> repository it shows weird characters for the name and versions and it is
>> unable to load them.
>> 
>> [image: image.png]
>> 
>> What am I missing/doing wrong?
>> 
>> Thanks!
>> 
>> 
>> image.png (182K)
>> http://forum.world.st/attachment/5102137/0/image.png;
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Old projects in ss3

2019-08-09 Thread Paul DeBruicker
what is the repo you're having trouble reading? 


Sergio Fedi wrote
> Hello,
> 
> I'm coming back after a few years (Pharo 5.0) and tried to take a look and
> download some projects I have on ss3.
> 
> I'm using a Pharo 7.0 image.
> 
> Going to the ss3 site I find that I can't access my projects, a "Reading a
> number failed: a digit between 0 and 9 expected" error shows in the page.
> 
> Trying to view them from Monticello, after adding the appropriate
> repository it shows weird characters for the name and versions and it is
> unable to load them.
> 
> [image: image.png]
> 
> What am I missing/doing wrong?
> 
> Thanks!
> 
> 
> image.png (182K)
> http://forum.world.st/attachment/5102137/0/image.png;





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



Re: [Pharo-users] OrderedCollection as an instance variable

2019-07-24 Thread Paul DeBruicker
You should change your #tracks method to


tracks
  ^tracks ifNil:[tracks:=OrderedCollection new]

or 

tracks
   tracks ifNil:[self initializeTracks]
   ^tracks


initializeTracks
  tracks:=OrderedCollection new.

Then you don't have to worry about the implementation of #tracks: changing
in the future if you want to do something else with/in it. 






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



[Pharo-users] Transcript had a 1.25GB WriteStream - maybe a bug with clearing the Transcript?

2019-07-23 Thread PAUL DEBRUICKER
Hi - 

On Pharo 7.1 64bit mac mojave.  My images grew to 1.4GB, so I ran

ImageCleaner cleanUpForRelease.
Smalltalk cleanUp.
Smalltalk reportCPUAndRAM.


to begin to track down why & I found that I had 1.3 GB of ByteStrings. 

(ByteString allInstances select:[:ea | ea size >1000]) sorted:[:a :c | a  size 
> c size]

gave me a list of 1174 strings. 

running 

self collect:[:ea | ea size]

showed me that the first one in the list is 1245704483 characters long.  And 
the next biggest one is 520714 (that one is the highchartsJS library stored in 
a MCMethodDefinition)

John Brant's ReferenceFinder & the "Open pointers to" shows that the very long 
String is the collection of the Transcript's stream.

The only thing that got rid of the big string  was running 

Transcript initialize.
10 timesRepeat:[Smalltalk garbageCollect].

Then saving/closing/reopening the image.  

I had always assumed that when you delete the contents of the Transcript, by 
selecting everything in it and deleting it ,it was all deleted.  Or when running

Transcript clear

Or one of the "clean up" methods like those above.  

Anyway. It seems like the stream should clear more often than it does (looks 
like it may never empty itself?  I don't think there is code in the image that 
does that though. 

WriteStream>>#reset & WriteStream>>#close do not empty the #collection or 
#stepContents inst vars.  And it doesn't look like there is a method to 
empty/re-initailze those inst vars defined in the Stream hierarchy in 7.1 or 
8.0.

I made an issue https://github.com/pharo-project/pharo/issues/4074







[Pharo-users] Change code critics to decrease size of navigation pane?

2019-07-08 Thread PAUL DEBRUICKER
Hi -

Sometimes (all the times) I write method that violate a critics rule.  The 
quality improvement pane, when it expands, shrinks the code editing pane.  Can 
I change that so that it shrinks the height of the navigation panes instead 
e.g. the class list etc?  


Stopping writing "offensive" methods seems impossible. 


Thanks

Paul


Re: [Pharo-users] Loading Gettext on already installed Seaside

2019-06-14 Thread Paul DeBruicker
Hi 

Add 

 onConflict: [ :ex | ex allow ];


To your Metacello load instructions



BrunoBB wrote
> Hi,
> 
> I have a Pharo 7.0 image with Seaside installed on it.
> 
> Now i want to add Gettext but i'm not able to do it yet.
> 
> Metacello new
>  baseline:'Seaside3';
>  repository: 'github://SeasideSt/Seaside:master/repository';
>  load: #('Seaside-Gettext-Core' 'Seaside-Gettext-Examples')
> 
> Fail because 'Seaside-Gettext-Core' name not found.
> 
> More likely because BaselineOfSeaside3>>baselinegettext: does not include
> a
> tag for Pharo 7.
> 
> If i add (to include Pharo7):
> spec for: #(#'pharo1.x' #'pharo2.x' #'pharo3.x' #'pharo4.x' #'pharo7.x')
> 
> I got a conflict error:
> 'MetacelloConflictingProjectError: Load Conflict between existing
> BaselineOf...igurationOfGrease stable from
> http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'"
> 
> The same result with:
> Metacello new
>  baseline:'Seaside3';
>  repository: 'github://SeasideSt/Seaside:master/repository';
>  load: #('Gettext' 'Gettext-Examples')
> 
> If i have Seaside already in my image how i should load Gettext ?
> 
> regards,
> bruno
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Getting example images - https://picsum.photos

2019-04-29 Thread Paul DeBruicker
I forgot the "ext" query parameter which gives the image urls

so 




ZnClient new
  systemPolicy;
  forJsonREST;
  url: 'https://uinames.com/api';
  queryAt: #region put: #germany;
  queryAt: #gender put: #female;
  queryAt:#ext put: nil;
  get.






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



Re: [Pharo-users] Getting example images - https://picsum.photos

2019-04-29 Thread Paul DeBruicker
https://uinames.com/ 


The api is a GET e.g.

https://uinames.com/api?region=germany=female


& returns JSON with image url and plausible name among other things.




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



Re: [Pharo-users] Pharo 6.0 and 6.1 64 bit freeze on MacMini -also in 7.03

2019-04-17 Thread Paul DeBruicker
Don't know about 4k.  Have you tried a smaller monitor on your mini just to
see?


When pharo locks up from the command line you can get a stack dump in the
terminal window you started pharo in.

first find the pharo process you're interested in with

ps -a | grep pharo


then do a

kill -SIGUSR1 


where you replace the  bit with the actual process number of
your frozen pharo image




TedVanGaalen wrote
> Is pharo tested on 4K macs and/or mac mini with 4K screens?
> so on anything with this resolution?
> 
> Does Pharo or the VM emit a post-mortem log/dump file? cannot find any. 





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



Re: [Pharo-users] Pharo 6.0 and 6.1 64 bit freeze on MacMini -also in 7.03

2019-04-16 Thread Paul DeBruicker
HI Ted, 


How did you install Pharo? 

I ask because I tested the process you described and everything worked fine
on my mac, also Mojave 10.14.4


I opened a terminal, made a temp directory and pasted in

curl https://get.pharo.org/64/ | bash 

to install Pharo. 

I started the image with 

./pharo-ui Pharo.image

Then followed your instructions to set the font to large and maximize Pharo
to be full screen.  Seems to work fine.  


When you run the command to start Pharo from the command line in the
directory with your Pharo 7.0.3 image but instead of specifying an image you
ask the VM for its version e.g './pharo --version' what do you get?


I get:

5.0 5.0.201901051900 Mac OS X built on Jan  5 2019 19:11:02 UTC Compiler:
4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31) [Production Spur 64-bit
VM]
CoInterpreter VMMaker.oscog-eem.2504 uuid:
a00b0fad-c04c-47a6-8a11-5dbff110ac11 Jan  5 2019
StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid:
a00b0fad-c04c-47a6-8a11-5dbff110ac11 Jan  5 2019
VM: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Date: Sat Jan 5 20:00:11 2019 CommitHash: 7a3c6b6
Plugins: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git

Maybe you're inadvertently using an old VM?




TedVanGaalen wrote
> Hello
> 
> 
> The freeze problem still exist. (since 2017, starting with Pharo 6) 
> 16 April 2019:
> Today I have loaded Pharo7.0.3-0-64bit-0903ade.image
> with VM 
> http://forum.world.st/file/t230630/Screen_Shot_2019-04-16_at_18.png; 
> 
> On my Mac Mini late 2012, mac OS Mojave 10.14.4 (OS up to date, system
> 100%) 
> Monitor:
> Samsung U28D590:
>   Resolution: 3840 x 2160 (2160p 4K UHD - Ultra High Definition)
>   UI Looks like:  3840 x 2160 @ 30 Hz
>   Framebuffer Depth:  24-Bit Color (ARGB)
> 
>   Note that the same freeze as described previously in this thread 
> still occurs with the latest Squeak version that
>  I have downloaded and tried last  week. 
> So this could be a VM problem? I really don't know.
> All I want to do is write applications with stable Smalltalk/Seaside
> no desire (and knowledge) enough to dive into the deep
> and dark catacombs of the VM world.
> 
> what I did:
> -opened the pristine image as downloaded today
> - in Pharo - settings - appearance:
>  changed the general font size to Large.
> - opened the system browser.
> - clicked the green bullet in the top left corner (maximize)
> Pharo hangs/freeze, menus don't work either. 
> Can only exit using Force Quit.
> The last stable version I did use was Pharo 5.0.
> The problem is still the same as I have described in this thread in August
> 2017.
> I did use Pharo launcher a few weeks ago  (having the same problem) 
> but this is not exactly user friendly, saved images where I don't want to.
> and "Save as from within the image is not respected" 
> I prefer to use just a VM and images, thats good enough for me.
> 
> Keep it simple.
> 
> I'd like to spend more time with Smalltalk, preferably Pharo.
> In essence, I do like new developments like enhanced
> system browsers and debugging
> that might improve Pharo.
> But one might be overshooting the target here,
> I find rocksolid stability more important,
> than adding more features, so, this should be the main priority,
> that is, assuming that Pharo should be deployable in a production
> environment?
> It is marked as "stable" but it isn't, sorry.
> A good house needs a good foundation, same with Smalltalk.
> But it seems we are living in a culture of nervous deadlines and hasty and
> frequent updates,
> is it really necessary?  
> 
> All I want is a one click vm + image, as it was before.
> simply download and run it.
> Why git btw? Smalltalk has an excellent version system,
> by using git there is more dependency impact.
> 
> Now I am still using Pharo 5.0, the last (to me) stable version of Pharo.
> 
> Kind regards
> Ted
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 





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



Re: [Pharo-users] Difficulties setting up default image in XMonad

2019-04-04 Thread Paul DeBruicker
OK great.  

I'm not super familiar with how the launcher works but you may be able to
specify & use an older VM with Pharo 8, if you need Pharo 8.  






Vanessa McHale wrote
> I have libcairo, yes.
> 
> I am using Lubuntu and it is based off Ubuntu 18.10
> 
> Pharo 7 works! So I believe it must be a bug in the new VM
> 
> Thanks!
> Vanessa McHale
> 
> On 4/4/19 10:20 AM, Paul DeBruicker wrote:
>> Hi Vanessa,
>>
>> does your OS  have libcario installed?
>>
>> which Os are you using?
>>
>> Does pharo 7 work? Pharo 8 is alpha.  
>>
>> Does it Pharo 7 or 8 run properly under another window manager on your
>> system?
>>
>> Pharo used to run on xMonad and ratpoison so I'd guess you'll be able to
>> get
>> it working somehow now.  
>>
>> In the lower right portion of your screenshot there is an error message
>> that
>> the VM couldn't properly configure itself on your OS.  Did you try the
>> suggestion in the error message and still have the problem you're
>> experiencing?
>>
>>
>> Hope this helps
>>
>>
>> Paul
>>
>>
>>
>> Vanessa McHale wrote
>>> Hi all,
>>>
>>> When I try to launch the latest Pharo image in XMonad, I run into the
>>> following:
>>>
>>> Pharo launch failure screenshot
>>>
>>> I couldn't copy the error text unfortunately so I have attached a
>>> screenshot instead. Any hints on what might be causing it? Is it due to
>>> my using a tiling window manager?
>>>
>>> Cheers,
>>> Vanessa McHale
>>>
>>>
>>> 2019-04-03-205749_1920x1080_scrot.png (576K)
>>> http://forum.world.st/attachment/5097893/0/2019-04-03-205749_1920x1080_scrot.png;
>>> 2019-04-03-205749_1920x1080_scrot.png (576K)
>>> http://forum.world.st/attachment/5097893/1/2019-04-03-205749_1920x1080_scrot.png;
>>> signature.asc (499 bytes)
>>> http://forum.world.st/attachment/5097893/2/signature.asc;
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
> 
> 
> 
> signature.asc (499 bytes)
> http://forum.world.st/attachment/5097913/0/signature.asc;





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



Re: [Pharo-users] Difficulties setting up default image in XMonad

2019-04-04 Thread Paul DeBruicker
Hi Vanessa,

does your OS  have libcario installed?

which Os are you using?

Does pharo 7 work? Pharo 8 is alpha.  

Does it Pharo 7 or 8 run properly under another window manager on your
system?

Pharo used to run on xMonad and ratpoison so I'd guess you'll be able to get
it working somehow now.  

In the lower right portion of your screenshot there is an error message that
the VM couldn't properly configure itself on your OS.  Did you try the
suggestion in the error message and still have the problem you're
experiencing?


Hope this helps


Paul



Vanessa McHale wrote
> Hi all,
> 
> When I try to launch the latest Pharo image in XMonad, I run into the
> following:
> 
> Pharo launch failure screenshot
> 
> I couldn't copy the error text unfortunately so I have attached a
> screenshot instead. Any hints on what might be causing it? Is it due to
> my using a tiling window manager?
> 
> Cheers,
> Vanessa McHale
> 
> 
> 2019-04-03-205749_1920x1080_scrot.png (576K)
> http://forum.world.st/attachment/5097893/0/2019-04-03-205749_1920x1080_scrot.png;
> 2019-04-03-205749_1920x1080_scrot.png (576K)
> http://forum.world.st/attachment/5097893/1/2019-04-03-205749_1920x1080_scrot.png;
> signature.asc (499 bytes)
> http://forum.world.st/attachment/5097893/2/signature.asc;





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



[Pharo-users] Any desire to have/adapt ClyBrowserMorph>>#confirmDiscardChanges to be a little more informative?

2019-03-28 Thread PAUL DEBRUICKER
Right now with Calypso I often have so many windows open with multiple tabs 
that when it asks me if I want to discard changes I have a hard time seeing or 
remembering what its even talking about.  


Would it be hard to change it from a simple confirmation to a diff viewer of 
some kind with DiffMorph?  


I'd be particularly interested in seeing diffs between the pre-edited version 
and current.

If that were a thing that were developed would it be integrated or not?


Thanks


Re: [Pharo-users] How to write out simple Json?

2019-03-01 Thread Paul DeBruicker
Of you load the JSON package from Squeaksource
(http://www.squeaksource.com/JSON.html)

You can do a 

JSON render: {
  'track' -> 'pharo'.
  'language' -> 'smalltalk'.
  'exercises' -> {
 'slug' -> 'hello'.
 'id' -> 55.
 'topics' -> #('a' 'b' 'c') }
} 



and get a Json string or add e.g.

Object>>#asJsonString
 ^JSON render: self






Tim Mackinnon wrote
>> On 1 Mar 2019, at 10:35, Sven Van Caekenberghe 

> sven@

>  wrote:
>> 
>> Forget about the way you are trying to implement it, to what would 
>> 
>>  { #key->#value. 1. true }
>> 
>> be rendered in JSON ?
>> 
>>  { "key":"value", 1, true }
>> 
>> or
>> 
>>  [ "key":"value", 1, true ]
>> 
>> Both are illegal JSON.
> 
> 
> You didn’t read what I said - with those 2 tiny changes - both of those
> given an exception just like STONJSON - the only difference is that I
> don’t have to put asDictionary everywhere.
> 
> Anyway - I think I’ve learned a lot from this discussion - and as Pharo is
> malleable I can do my little nasty subclass until I get burned and then I
> will probably adopt a proper Config object like Henrik mentioned ;)
> 
> Just as a small additional question - when you do :
> 
> ex := {
>  #track->#pharo.
>  #language->#smalltalk.
>  #exercises->{
>#slug->'hello'.
>#id->55.
>#topics->#('a' 'b' 'c') } asDictionary } asDictionary.
> 
> Am I right in thinking that with asDictionary the order won’t be
> deterministic (which is valid for JSON dictionaries, but annoying for
> diffing config files). This is why I was doing asOrderedDictionary as I
> though I had seen it change on me a few times when I was generating
> output.
> 
> Tim





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



Re: [Pharo-users] Status of XML Support's move to GitHub

2019-02-14 Thread Paul DeBruicker
Hi Sven,

Can we use filetree/cypress for this for now?  IF the intention is for your
copy to become the canonical github one at least.   Squeak and GemStone
don't yet have tonel and the smalltalkhub/PharoExtras repo is where code is
currently loaded from for those platforms.  


Thanks for giving it some thought.

Paul



Sven Van Caekenberghe-2 wrote
> Hi again,
> 
>> On 10 Jan 2019, at 16:31, Sven Van Caekenberghe 

> sven@

>  wrote:
>> 
>> Hi,
>> 
>> What is the status of XML Support's move to GitHub ?
>> Many people were pro, has anything been done ?
>> It would be very nice.
>> 
>> Sven
> 
> I did https://github.com/svenvc/XML-Support-Pharo as a direct copy of the
> code from SmalltalkHub to GitHub, Tonel, Pharo and Travis CI.
> 
> This is just the bare minimum, a proof of concept, with new, much
> simplified baselines. It was the last project that I depend on and I
> wanted it in GitHub for my own purposes. The default load of XMLParser
> includes XMLWriter, the tests and the GT extensions.
> 
> All 5100+ tests are green. I am using Pharo 7.0.1 64-bit. Code seems to
> load reasonably fast.
> 
> I want to stress that this is not a fork, nor the end of this conversion.
> 
> I have a lot of respect for this high quality, solid code base and want
> this important piece of code to move forward.
> 
> I hope others will help.
> 
> Sven





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



Re: [Pharo-users] seaside jquerywidget pharo

2019-02-10 Thread PAUL DEBRUICKER
Hi Pierre,

The BaselineOfJQueryWidgetBox had an error.  I've fixed it and you should be 
able to load TableSorter and an example of how to use it with:


Metacello new
baseline:'JQueryWidgetBox';
repository:'http://smalltalkhub.com/mc/Seaside/JQueryWidgetBox/main';
load: 'JQWidgetBox-Tablesorter-Dev' 


Once it loads you can browse the JQTablesorterExample class &  go to

http://localhost:8080/jquery-widgets/tablesorter

to see the example in action.  


IF you're using TableSorter than maybe you'd rather use DataTables 
(https://www.datatables.net smalltalk interface is here: 
http://smalltalkhub.com/#!/~emaringolo/DataTables)

For Seaside tips & questions the mailing list is the best place.  You should 
sign up for it. This site has a searchable archive http://forum.world.st and 
the Seaside mailing list is here: 
http://forum.world.st/Seaside-General-f86180.html


There's also the seaside book at http://book.seaside.st which covers using JS 
with Seaside among otherthings.  

Hope this helps




> On Feb 10, 2019, at 4:41 AM, Pierre Héricourt  
> wrote:
> 
> Hello,
> 
> I'm Pierre from Creuse/France and I travelled in Oregon/USA last year to 
> watch solar eclipse (near Mitchell) ... I found a diversity of landscapse and 
> now I love Oregon ! In Creuse we have forest but don't have any desert or 
> seaside !
> 
> Seaside ! Now, I remember : I was primarily writing to you to get some 
> informations about JqueryWidget/Seaside/Pharo ;)
> 
> Sorry for this direct mail but I didn't find any forum like on git ... 
> 
> I'm new to smalltalk and seaside. I wrote last week a little application 
> which helps to follow products in my labs. Not very sexy job then I choose to 
> write this in Pharo ;)
> 
> Now, I'd like to play with JQueryWidget (TableSorter) but installation 
> doesn't run to the end (grumbles for version 3.1)... and I don't understand 
> how JavaScript runs on top of Seaside nor mcz ...
> 
> You seems to be fluent in seaside : could you, please, point me some recipes 
> or link ?
> 
> Many thanks
> 
> Regards
> 
> Pierre
> 
> on Pharo 6.1/Seaside 3.2
> 




Re: [Pharo-users] package extensions in Pharo 7.

2019-02-05 Thread Paul DeBruicker
Thanks Denis


Denis Kudriashov wrote
> Hi Paul.
> 
> вс, 3 февр. 2019 г., 19:57 PAUL DEBRUICKER 

> pdebruic@

> :
> 
>> Hi -
>>
>>
>> Is there a way to create the protocol, then convert it to an extension,
>> without adding a method to it between the time I create the protocol and
>> convert it to an extension?
> 
> 
> No.
> In Calypso there is no such thing as extension protocol. There is explicit
> packaging of methods. When you create method you can toggle extension
> checkbox in status bar and select a package where method should be
> created.
> Same procedure can be applied on existing method.
> 
> I tried to avoid star convention when I designed Calypso. I think it is a
> ugly hack because package is not a protocol. But seems it is badly
> accepted
> by people. So it could be reverted at some point. But I believe it is
> better to improve/fix things which does not work well with current
> approach.

I don't really care about the star-prefix or internal structure of how
protocols are represented, as long as its not laborious to port methods to
GemStone/Squeak.  

Could the 'create new protocol dialog' could be smarter and if a star is
typed first then the autocomplete switches to a list of packages, like you
already have/show in the 'convert to extension' dialog?

I understand Calypso has  a new workflow for creating extension protocols
and managing protocols in general.  Seems like there's gotta be a way to
avoid traversing from the method list to the bottom of the code pane when
editing a method or group of methods protocol. I'll practice more with it
today though.  




> Seems like it if the protocol is empty when I convert it to an extension
> it
>> gets deleted rather than converted.
> 
> 
> It needs to be improved to avoid such confusion

Or just maybe not immediately delete the thing I just created.  Give it a
few minutes.  


>> Would anyone be interested in having the thing that parses protocol names
>> automatically create extension protocols from names that start with *
>> instead of rejecting them immediately?
>>
>>
>> IS the new extension stuff cross platform compatible right now or do I
>> have to do anything else to port these methods & protocols to Squeak and
>> GemStone?
>>
> 
>  Calypso only touches UI. Nothing is changed on how extension sources are
> stored in files. It's stil based on star protocols. So it is compatible

Great.  Thanks.






>>
>> Thanks
>>
>>
>> Paul
>>





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



Re: [Pharo-users] why doesn't this baseline load any package when included in another baseline?

2019-02-04 Thread Paul DeBruicker
There's already an issue on GH. So thats good.  

https://github.com/Metacello/metacello/issues/400



Paul DeBruicker wrote
> Thanks Pierce
> 
> Turns out my problem seems to have been from using a #cacheRepository:
> send
> in the Metacello load instruction.  





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



Re: [Pharo-users] Pharo 7 - how to see method author/timestamp n Calypso?

2019-02-04 Thread Paul DeBruicker
Hi 




EstebanLM wrote
> 
>>  Without
>> having to do anything by hand when a package is loaded, I mean.   And
>> also a
>> way to see that info right next to the code pane without having to click
>> anything?  Also hopefully senders/implementors count?
> 
> Uhm? 
> I do not understand this… but I think is not related to iceberg but
> calypso, isn’t?
> If is calypso, and what you ask is to have the references available (for
> example in another tab) this is not there but is easy to implement. In
> fact, I remember an iteration of calypso that had them, and I think the
> reason while is gone is that It becomes kind of a pain in large images
> (but now we have real lazy tabs so we could review that decision).

Yeah you're right.  Calypso.  MY reading of Cyril's response made me think
it was a calypso/iceberg integration I'd have to do/set-up manually for
every package rather than something automatically handled when a package is
loaded into the image.


In Nautilus there was the AnnotationPanePlugin that showed
author/timestamp/sender count/implementer count without any intervention on
my part. See attached from Pharo 6.  Once you turned the
AnnotationPanePlugin on in any nautilus browser it was on in all the
browsers you create in the future. Omnibrowser did it automatically IIRC.


Just wondering if there is something like that already in Pharo 7 or if not
how to get it in Calypso.



Paul

Nautilus_with_annotation_pane.png
  



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



Re: [Pharo-users] why doesn't this baseline load any package when included in another baseline?

2019-02-04 Thread Paul DeBruicker
Thanks Pierce

Turns out my problem seems to have been from using a #cacheRepository: send
in the Metacello load instruction.  

e.g. when I do a 

Metacello new
baseline:'MyProject'; 
repository:'/my/path/';
cacheRepository: '/my/cache';
load

Then the packages aren't loaded but if I do a 

Metacello new
baseline:'MyProject'; 
repository:'/my/path/';
load


then everything is loaded.  The cache directory already has the packages in
it, from another load into another image in pharo 6.  So I'll try to learn
what that cacheRepository: send is doing that I don't expect.



thanks for looking into this.


Paul



Pierce Ng-3 wrote
> On Sun, Feb 03, 2019 at 01:41:30PM -0800, PAUL DEBRUICKER wrote:
>> MCHttpRepository
>> location: 'http://www.squeaksource.com/TimeZoneDatabase'
> 
> Hi Paul,
> 
> I see that there is a ConfigurationOfTimeZoneDatabase in the SS repo as
> well. 
> 
>>  spec baseline: 'TimeZoneDatabase'
>>  with: [ spec repository:
>> 'http://www.squeaksource.com/TimeZoneDatabase' ].
> 
> In your BaselineOfYourProject that is citing TimeZoneDatabase as a
> dependency, you could try loading ConfigOfTimeZoneDatabase instead:
> 
> spec project: 'TimeZoneDatabase' with: [ 
>spec 
>  className: 'ConfigurationOfTimeZoneDatabase';
>  version: #stable;
>  repository: 'http://www.squeaksource.com/TimeZoneDatabase' ].
> 
> This is known working in my BaselineOfGlorpSQLite which loads
> ConfigurationOfUDBC
> from STH.
> 
> Pierce





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



[Pharo-users] why doesn't this baseline load any package when included in another baseline?

2019-02-03 Thread PAUL DEBRUICKER
Hi -

In this repo

MCHttpRepository
location: 'http://www.squeaksource.com/TimeZoneDatabase'
user: ''
password: ''


There is the BaselineOfTimeZoneDatabase

If in a Pharo7 playground I run

Metacello new
baseline: 'TimeZoneDatabase';
repository: 'http://www.squeaksource.com/TimeZoneDatabase';
load

It loads into the image fine and seems to work.

If I include it in another project like this

...
spec baseline: 'TimeZoneDatabase'
with: [ spec repository: 
'http://www.squeaksource.com/TimeZoneDatabase' ].
spec package: 'MyPackage' 
with:[ spec requires: #('DependencyA' 'DependencyB' 
'DependencyC' 'DependencyD' 'TimeZoneDatabase')]
spec group:'default' with:'MyPackage'.


and load that project into a different, clean Pharo 7 image with


Metacello new
baseline: 'MyProject';
repository: '/my/pharo/packages/';
load: 'default'

Then none of the TimeZoneDatabase packages are loaded and only the postLoadDoIt 
from the BaselineOfTimeZoneDatabase is called.  


(The other dependencies aren't loaded either but I figured to just use this 
TimeZoneDatabase as an example for this email).  





In the BaselineOfTimeZoneDatabase the #baseline: method is 

baseline: spec

spec
for: #common
do: [ spec postLoadDoIt: #buildSystemDatabase.
spec package: 'Time'.
spec group: 'Core' with: #('default') ].
spec
for: #squeak
do: [ spec
package: 'TimeZoneDatabase-Squeak'
with: [ spec requires: #('Time') ].
spec group: 'default' with: 
#('TimeZoneDatabase-Squeak') ].
spec
for: #pharo
do: [ spec
package: 'TimeZoneDatabasePharoPreload';
package: 'Time'
with: [ spec requires: 
#('TimeZoneDatabasePharoPreload') ];
package: 'TimeZoneDatabase-Pharo'
with: [ spec requires: #('Time') ].
spec group: 'default' with: #('TimeZoneDatabase-Pharo') 
]





I'm clearly doing something wrong but don't know what.  Any ideas on what to 
change or try next?



Thanks

Paul


[Pharo-users] Pharo 7 - how to see method author/timestamp n Calypso?

2019-02-03 Thread PAUL DEBRUICKER
Hi - 


How can I see who wrote a method and when they wrote it in Calypso?  

In Nautilus it was the AnnotationPane plugin IIRC.  

Thanks

Paul



[Pharo-users] package extensions in Pharo 7.

2019-02-03 Thread PAUL DEBRUICKER
Hi - 


Is there a way to create the protocol, then convert it to an extension, without 
adding a method to it between the time I create the protocol and convert it to 
an extension?  Seems like it if the protocol is empty when I convert it to an 
extension it gets deleted rather than converted.  


Would anyone be interested in having the thing that parses protocol names 
automatically create extension protocols from names that start with * instead 
of rejecting them immediately?


IS the new extension stuff cross platform compatible right now or do I have to 
do anything else to port these methods & protocols to Squeak and GemStone?  


Thanks


Paul


Re: [Pharo-users] favorite way to migrate from mczs to git?

2019-02-02 Thread Paul DeBruicker
Thanks Sean.  I get a couple different errors, depending on which Pharo I'm
using.  


 I had more time today and for 7.0, I think I fixed it.   I don't think the
#ignoredFileNames: method was working because when I added corrupted MCZs as
in the example pasted below, it seems to continue to try to analyze those
files when running #allAuthors and hit encoding errors.  Skipping the
#allAuthors send and just running the
#fastImportCodeToDirectory:initialCommit:to: code gives the same encoding
errors.  Changing

GitMigration>>#versions to
versions
versionsCache
ifNil: [ | versions |
versions := OrderedCollection new.
self versionsWithPackageNames
do: [ :quad | 
| fileName |
fileName := quad last.
(ignoredFileNames includes: (fileName 
allButLast: 4))
ifFalse: [ versions add: (self 
versionFromFileNamed: quad last) ] ]
displayingProgress: [ :quad | 'Loading versions 
metadata... ' , quad
last ].
versionsCache := versions ].
^ versionsCache

fixes my problem, but I can't seem to create a PR that doesn't include every
line of every file as having changed.  



In 6.1 git-migration doesn't have a problem with the bad MCZs but instead
gives an "Empty message requested" error when doing the
#fastImportCodeToDirectory:initialCommit:to:


In 6.0 it gives a DNU for
GitMigrationMemoryTreeGitRepository>>#writeGitFileTreeProperties: (I made an
issue for that one here:
https://github.com/peteruhnak/git-migration/issues/19


The script I'm using is:


migration:=GitMigration on:'Seaside/SeasideDynamicSVG'.
migration ignoredFileNames: #('SeasideDynamicSVG-Core-hkl.86'
'SeasideDynamicSVG-Core-hkl.3' 'SeasideDynamicSVG-Tests-obi.7').
migration cacheAllVersions.
migration populateCaches.
migration allAuthors.

migration authors:{
'MaxBareis'-> #('Max Bareis' '').
'JohanBrichau' -> #('Johan Brichau' '').
'hkl' -> #('Holger Kleinsorgen' '').
'go' -> #('Gerhard Obermann' '').
'obi' -> #('Gerhard Obermann' '').
'ThomasCleenewerck' -> #('ThomasCleenewerck' '').
'TC' -> #('ThomasCleenewerck' '').
    'PaulDeBruicker' -> #('Paul DeBruicker' '')
}.




"I change the SHA and the target file for each Pharo version"

migration fastImportCodeToDirectory: 'gitmigration-repo'
initialCommit:'a8d9d4c981f4e8aff4728b3ab84d296ebe77b4d5'  to:
'/Users/paul/Downloads/seaside-svg-pharo-7.txt'  


In pharo 7 to load git-migration I'm using 

Metacello new
baseline: 'GitMigration';
repository: 'github://peteruhnak/git-migration/repository';
load.


and in 6.1 & 6 I'm using

Metacello new
baseline: 'GitMigration';
repository: 'github://peteruhnak/git-migration:pharo6/repository';
load.




Let me know if you have any ideas on what I should do to fix those errors in
Pharo 6 & 6.1. If you have a copy of  
GitMigrationMemoryTreeGitRepository>>#writeGitFileTreeProperties: in one of
your images I'd be happy to get a version of it and keep trying. 



 It seems to me that I'll be better off porting everything to Pharo 7 then
doing the migration to git. 







Sean P. DeNigris wrote
> Paul DeBruicker wrote
>> https://github.com/peteruhnak/git-migration seems to be broken on Pharo 6
> 
> Could you say more about your error(s)? I migrated many projects in Pharo
> 6.1 with this tool
> 
> 
> 
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



[Pharo-users] favorite way to migrate from mczs to git?

2019-02-01 Thread PAUL DEBRUICKER
Hi - 

Whats the best way to migrate a few dozen projects to git, some with 
ConfigurationOfXXX and some without? 

https://github.com/peteruhnak/git-migration seems to be broken on Pharo 6 & 7.


Thanks

Paul


[Pharo-users] Is it possible to follow an object through a computation?

2019-01-02 Thread PAUL DEBRUICKER via Pharo-users
--- Begin Message ---
Hi -

Is there a way to haltOnChange or some such for an object?  


I have an instance that gets into a state I don't understand and would like to 
watch it or several of its inst vars for when they change.  

I could set a lot of #haltIf: statements and step through but hope someone has 
a better strategy 


thanks & happy new year.


Paul
--- End Message ---


[Pharo-users] is there a refactoring to combine two classes in a heirarchy?

2018-12-19 Thread PAUL DEBRUICKER
I'd like to combine a class and its subclass, adopting all methods from the 
subclass.  


Is there a refactoring rule that will do that? 


Re: [Pharo-users] Problem loading seaside with Zinc

2018-12-12 Thread Paul DeBruicker
can also do the code rewriting described here as a stopgap measure:

http://forum.world.st/stfx-eu-down-tp5090610p5090624.html



Vitor Medina Cruz wrote
> Hello,
> 
> Here is my baseline
> 
> BaselineOfEmployees >> baseline: spec [
> 
> 
> 
> spec for: #'common' do: [
> spec blessing: #'baseline';
> baseline: 'Seaside3' with: [ spec repository:
> 'github://SeasideSt/Seaside:v3.2.2/repository' ];
> baseline: 'Magritte' with: [ spec repository:
> 'github://magritte-metamodel/magritte:v3.5.3/source';
>  loads: #(Seaside
> Core) ];
> 
> package: 'Employees' with: [ spec requires: #('Seaside3'
> 'Magritte'). ];
> 
> group: 'default' with: #('core');
> group: 'core' with: #('Employees')
> ].
> ]
> 
> Then running:
> 
> Metacello new baseline: 'Employees';
>   repository: 'tonel:///opt/pharo/employeesSource/pharo/';
>   ignoreImage;
>   onConflict: [ :ex | ex useIncoming ];
>   onWarning: [ :ex | Transcript crShow: ex ];
>   silently;
>   load: #(core).
> 
> In the end I got an error:
> 
> Fetched -> Seaside-Tests-Welcome-JohanBrichau.1497083460 ---
> https://github.com/SeasideSt/Seaside.git[73adecc] ---
> /opt/pharo/pharo-local/iceberg/SeasideSt/Seaside/repository
> (Libgit)Project: Zinc Project
> stable...RETRY->ConfigurationOfZincHTTPComponents...RETRY->ConfigurationOfZincHTTPComponents...FAILED->ConfigurationOfZincHTTPComponents[31mCould
> not resolve: ConfigurationOfZincHTTPComponents
> [ConfigurationOfZincHTTPComponents] in
> /opt/pharo/pharo-local/package-cache
> *http://mc.stfx.eu/ZincHTTPComponents
> http://mc.stfx.eu/ZincHTTPComponents*[0mMetacelloEnsureFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:[
> | references nearestReference cachedReference externalReference mcVersion
> loadedVersionInfos |cachedReference := nil.packageSpec
> searchCacheRepositoryForPackage: [ "check to see if mcz file is already in
> cacheRepository" cachedReference := self resolvePackageSpec: packageSpec
> cachedGofer: self loaderPolicy cacheGofer. (cachedReference ~~ nil and: [
> packageSpec getFile ~~ nil ]) ifTrue: [ cachedReference name = packageSpec
> file ifTrue: [ "exact match between packageSpec file and cache" ^ self
> scheduleFetchFor: packageSpec cachedReference: cachedReference ] ]
> ].references := self retryingResolvePackageSpecReferences: packageSpec
> gofer: gofer. "look up mcz file"nearestReference := references last
> 
> 
> Note it is trying to reach *http://mc.stfx.eu/ZincHTTPComponents
> http://mc.stfx.eu/ZincHTTPComponents*, which don't seems to be
> hosting
> Zinc anymore. Since these are transitive dependencies, I tried to define
> Zinc in the root of my baseline, as I did with seaside (magritte baseline
> had some problem with it), but the same error happened. Is there any
> workaround for this problem?
> 
> Regards,
> Vitor





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



Re: [Pharo-users] [ANN] Git Thermite integration with Iceberg

2018-12-12 Thread Paul DeBruicker
Please take this with a grain of salt and I'm not at all trying to do
anything but be helpful and expose my confusion.

It looks interesting but what are some use cases of Thermite?

I don't have a real good sense of what kind of understanding it helps with.  

>From reading the github page I can see that I can get some visuals of what
fraction of a package I've changed/touched in a commit or between two
arbitrary commits.  

The documentation is understandable but is a lot of "what" & "how" and not a
lot of "why" or "because"  and so I have to try to come up with that on my
own.  


I'm sure there's value there because its obviously a lot of work to get the
project to this point, but I'm not able to make the leap there today.  

What changes in my behavior or process should I have or begin to think about
as a result of seeing thses types of visualizations?



I'm happy to fill out the form but "I don't 'get it' after looking at it for
15 minutes" doesn't seem like helpful feedback just yet.  



Maybe its intended to be more useful in teams and not so much for a solo
developer.  


Also - I'm partially red/green colorblind.  Where can I edit the colors to
not use Red/Green?






Pharo Smalltalk Users mailing list wrote
> It would be really great to have feedback. 
> Please, providing feedback is key to enable innovation in this community!
> 
> Cheers,
> Alexandre
> -- 
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> 
> 
> 
>> On Dec 12, 2018, at 12:21 PM, Ronie Salgado 

> roniesalg@

>  wrote:
>> 
>> Hello,
>> 
>> Some time ago I presented Git Thermite in this mailing. Git Thermite is a
>> tool for visualizing Git commits that I am making for my master thesis.
>> Now I have managed to integrate Git Thermite with Iceberg.
>> 
>> GitHub page: https://github.com/ronsaldo/pharo-git-thermite
>> https://github.com/ronsaldo/pharo-git-thermite;
>> Demo video: https://www.youtube.com/watch?v=TdBHpdyFgZE
>> https://www.youtube.com/watch?v=TdBHpdyFgZE;
>> Visualization learning material:
>> https://github.com/ronsaldo/pharo-git-thermite/blob/master/doc/learning-material.pdf
>> https://github.com/ronsaldo/pharo-git-thermite/blob/master/doc/learning-material.pdf;
>> Feedback:
>> https://docs.google.com/forms/d/e/1FAIpQLSeir6VlE3bR78oRsNAp9eHLkUn2Q016wEliOJN7tFlTmYFi8w/viewform
>> https://docs.google.com/forms/d/e/1FAIpQLSeir6VlE3bR78oRsNAp9eHLkUn2Q016wEliOJN7tFlTmYFi8w/viewform;
>> 
>> Pharo 7 installation doIt:
>> 
>> Metacello new
>>baseline: 'Thermite';
>>repository: 'github://ronsaldo/pharo-git-thermite/src';
>>load
>> Please, I would love to get some usage feedback through the Google form
>> :-)
>> 
>> Best regards,
>> Ronie





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



Re: [Pharo-users] stfx.eu down

2018-12-10 Thread Paul DeBruicker
I wonder if there is a way to get all the relevant configs in an image to
point to the smalltalkhub repo instead of the mc.stfx.eu repo temporarily.


In Pharo 6.1 if a person wants to switch away from the mc.stfx.eu domain in
their ConfigurationOf* and BaselineOf* specs you can right click on a
package in Nautilus, choose "Rewrite code" then choose "Rewrite code" again
and paste each of the below into the box and save it to rewrite the
repository definition.

RBParseTreeRewriter new
replace: '''http://mc.stfx.eu/ZincHTTPComponents''' with:
'''http://smalltalkhub.com/mc/SvenVanCaekenberghe/ZincHTTPComponents/main''';
yourself 

RBParseTreeRewriter new
replace: '''http://mc.stfx.eu/Zodiac''' with:
'''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Zodiac/main''';
yourself 

RBParseTreeRewriter new
replace: '''http://mc.stfx.eu/Neo''' with:
'''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main''';
yourself 


to "fix" Zinc, Zodiac, and Neo respectively. 





Sven Van Caekenberghe-2 wrote
> Hi,
> 
> This evening I somehow broke my stfx.eu server while doing an ubuntu dist
> upgrade (an old AWS EC2 machine).
> 
> This means several websites / web services hosted by that machine are
> down, most notably mc.stfx.eu (hosting several of my packages) and
> ws.stfx.eu (used for shared smalltalk workspaces). A couple of Zinc tests
> will also fail.
> 
> For source code access, all my public repos exist both in an up to date
> form on GitHub (http://github.com/svenvc) as well in the original form in
> SmalltalkHub (http://smalltalkhub.com/#!/~SvenVanCaekenberghe) or SS3.
> 
> The main problem there is that the distributed ConfigurationsOf and
> Catalog entries will still point to the original. This is not a problem
> with git's BaselineOf definitions.
> 
> Although the machine will no longer boot, I managed to mount the original
> volume on another instance so I can still access the whole filesystem.
> This will make it possible to eventually recover most services. But this
> will take time as these things never happen when it is convenient. It will
> give me an opportunity to modernise the setup though, which is good.
> 
> Sorry for the inconvenience.
> 
> Sven





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



Re: [Pharo-users] Pharo 7 - RFB

2018-11-25 Thread Paul DeBruicker


http://www.samadhiweb.com/tags/VNC



Sanjay Minni wrote
> OK loaded RFB in pharo 7.0 Thru Monticello
> 
> is there any documentation somewhere
> 
> 
> Sanjay Minni wrote
>> what is RFB used for ? and can I load it in Pharo 7.
>> I could not find any documentation anywhere
>> 
>> When migrating an earlier application (pharo 6.1 to 7.0) 
>> RFB was loaded in the ConfigurationOfApplication,(in 6.1)
>> However in Pharo 7, I manually loaded the required packages and loading
>> seems complete without RFB so am trying to figure out what is RFB and
>> what
>> was it used for (application loaded fine). 
>> 
>> any inputs pls how to go about it 
>> (off course I can try running and just see if anything crashes while
>> running
>> but so many things may cause crashes and want to know before proceeding) 
>> 
>> 
>> 
>> -
>> cheers, 
>> Sanjay
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
> 
> 
> 
> -
> cheers, 
> Sanjay
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Metacello baseline loading from cmd

2018-11-16 Thread Paul DeBruicker
Can you post your baseline?







Vitor Medina Cruz wrote
> Ok, this error was due to a problem with my Metacello configuration. I am
> having a very hard time using metacello, spent almost all of yesterday
> trying to figure out a fix
> 
> On Mon, Nov 12, 2018 at 9:18 PM Vitor Medina Cruz 

> vitormcruz@

> 
> wrote:
> 
>> Using directly the remote repository with https I got ZnTooManyRedirects
>> :´(
>>
>> On Mon, Nov 12, 2018 at 8:56 PM Vitor Medina Cruz 

> vitormcruz@

> 
>> wrote:
>>
>>> Thanks Cédrick, this partly worked because I also had a git repository,
>>> but I noted that if the .git folder is not present the procedure don't
>>> work
>>> as well. It, however, cannot load remote dependent projects or
>>> baselines,
>>> and thus fail. :(
>>>
>>>
>>>
>>>
>>> http://www.avg.com/email-signature?utm_medium=emailutm_source=linkutm_campaign=sig-emailutm_content=webmail;
>>> Livre
>>> de vírus. www.avg.com
>>> http://www.avg.com/email-signature?utm_medium=emailutm_source=linkutm_campaign=sig-emailutm_content=webmail;.
>>>
>>> <#m_2818603894744208060_m_9098696167481251908_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>
>>> On Mon, Nov 12, 2018 at 5:03 PM Cédrick Béler 

> cdrick65@

>  wrote:
>>>
 Hi Vitor,

 Le 12 nov. 2018 à 19:53, Vitor Medina Cruz 

> vitormcruz@

>  a
 écrit :

 Hello,

 How do I load a baseline located at disk? I tried inside
 /home/vitormcruz/testpharo/:

 ./pharo Pharo.image eval "Metacello new baseline: 'Employees';
> repository: 'filetree://employees/pharo'; load: #(core)"
>

 But then I got:

 Could not resolve: BaselineOfEmployees [BaselineOfEmployees] in
> */home/vitormcruz/testpharo/pharo-local/package-cache*
> filetree:///home/vitormcruz/testpharo/employees/pharo
>

 I use towel format.

 I could load from local repo by using something like:

 Metacello new
 baseline: 'ICTWorkbench';
 repository: 'gitlocal://../../iceberg/cdrick65/ICTWorkbench' ;
 load.

 Not sure if it’s the correct way.

 My git repo are in a common iceberg dir. I use the launcher, so iceberg
 dir is in the root Pharo dir (I changed the default).

 HTH,

 Cédrick






 And ls -la of /home/vitormcruz/testpharo/employees/pharo gives:

 drwxrwxr-x 4 vitormcruz vitormcruz 4096 Nov 12 16:21 .
> drwxrwxr-x 4 vitormcruz vitormcruz 4096 Nov 12 15:57 ..
> -rw-rw-r-- 1 vitormcruz vitormcruz 69 Nov 12 16:21 .filetree
> -rw-rw-r-- 1 vitormcruz vitormcruz 21 Nov 12 15:57 .propertiesdrwxrwxr
> -x 2 vitormcruz vitormcruz 4096 Nov 12 15:57
> BaselineOfEmployeesdrwxrwxr
> -x 2 vitormcruz vitormcruz 4096 Nov 12 15:57 Employees


  It is strange that it tried to access the local cache, is that
 correct?
 Im am using an Ubuntu 16 lst distribution.

 Regards,
 Vitor








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



Re: [Pharo-users] ZnClient receiving Expires header with Max-Age instead of HTTP formatted DateAndTime

2018-09-11 Thread Paul DeBruicker
No.  I thought I was using Pharo 6.1 but in the "About..." menu item it
shows:

Pharo 6.0
Latest update: #60540



The ZincHTTPComponents version in that image is TheIntegrator.461


Anyway.  I'm glad its fixed in the more recent version.  Apologies for the
noise.



Sven Van Caekenberghe-2 wrote
>> On 11 Sep 2018, at 18:55, Paul DeBruicker 

> pdebruic@

>  wrote:
>> 
>> Seems like the invalid date could be anything and the spec gives '0' as
>> the
>> example invalid date.  
>> 
>> 
>> I'm not using #expiresTimeStamp or #parseHttpDate: explicitly its just
>> that
>> the GET request was failing on that date parsing error, when checking if
>> the
>> Cookie was expired.  
>> 
>> 
>> I think your proposed ZnCookie>>#isExpired is the right way to go e.g.
> 
> OK, but that is already in the code. I am looking at
> Zinc-HTTP-SvenVanCaekenberghe.475 ... is that not what you are seeing ?
> 
>> isExpired 
>>| expirationTimeStamp | 
>>(self hasAttribute: 'expire') ifFalse: [ ^ false ]. 
>>[ expirationTimeStamp := self expiresTimeStamp ] on: Error do: [ ^
>> false ]. 
>>"note that max-age (#maxage) is not used" 
>>    ^ expirationTimeStamp asUTC < DateAndTime now asUTC 
>> 
>> 
>> 
>> 
>> 
>> 
>> Sven Van Caekenberghe-2 wrote
>>> Hi Paul,
>>> 
>>>> On 11 Sep 2018, at 06:02, PAUL DEBRUICKER 
>> 
>>> pdebruic@
>> 
>>>  wrote:
>>>> 
>>>> Hi Sven - 
>>>> 
>>>> This is in Pharo 6.1.
>>>> 
>>>> There is an API I'm using which sometimes returns a string only
>>>> containing a single instance of the number 0 in the "Expires" field, so
>>>> the #expiresTimeStamp method sends that to #parseHttpDate: and since it
>>>> can't be parsed into a date an error is thrown.  Seems like Zinc should
>>>> be able to handle that based on the spec here:
>>>> https://tools.ietf.org/html/rfc7234#section-5.3
>>>> 
>>>> 
>>>> Would you rather I changed the implementation of parseHttpDate: to add
>>>> an
>>>> empty check on the parsed tokens e.g.
>>> 
>>> IIRC some months ago, there were some changes to this area, but I forgot
>>> the details and the before state.
>>> 
>>> Anyway, reading RFC7234's section that you reference, maybe we do need
>>> to
>>> make another change, but I am not sure.
>>> 
>>> Let's start by explaining what there is today and why it is like that:
>>> #parseHttpDate: and #expiresTimestamp do indeed throw exceptions (by
>>> design), while #isExpired is the more high level access method.
>>> 
>>> Consider:
>>> 
>>> (ZnCookie name: 'foo' value: '100') isExpired. 
>>> 
>>> => false
>>> 
>>> ZnUtils parseHttpDate: '0'.
>>> 
>>> => Boom
>>> 
>>> (ZnCookie name: 'foo' value: '100') expires: '0'; expiresTimeStamp.
>>> 
>>> => Boom
>>> 
>>> (ZnCookie name: 'foo' value: '100') expires: '0'; isExpired.
>>> 
>>> => false
>>> 
>>> Could you use #isExpired and does it do what you want/expect ?
>>> 
>>> Reading the spec again, I am not 100% sure about the error case
>>> (existing
>>> but zero or wrong Expires header), maybe that should be true instead of
>>> false.
>>> 
>>> isExpired
>>> | expirationTimeStamp |
>>> (self hasAttribute: 'expire') ifFalse: [ ^ false ].
>>> [ expirationTimeStamp := self expiresTimeStamp ] on: Error do: [ ^
>>> false
>>> ].
>>> "note that max-age (#maxage) is not used"
>>> ^ expirationTimeStamp asUTC < DateAndTime now asUTC
>>> 
>>> What do you think ?
>>> Anyone else with an opinion ?
>>> 
>>> Sven
>>> 
>>>> parseHttpDate: string
>>>>"self parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'."
>>>>"self parseHttpDate: 'Tue, 13-Sep-2011 08:04:51 GMT'."
>>>>"self parseHttpDate: 'Tue Jan 01 00:00:01 2036 GMT'."
>>>>
>>>>| tokens day month year hour minute second months map yearToken |
>>>>string size = 1 ifTrue:[ ^DateAndTime epoch ].
>>>>tokens := (string findTokens: #( $ $- $: $, )) allButFirst.
>>>>
>>>>...
>>>> 
>>>> 
>>>> Or add a string size guard check in #expiresTimeStamp ? e.g.
>>>> 
>>>> expiresTimeStamp
>>>>self expires
>>>>ifNil: [ ^ DateAndTime now + 1 day ]
>>>>ifNotNil: [ :exp | 
>>>>exp size = 1
>>>>ifTrue: [ ^ DateAndTime epoch ].
>>>>^ ZnUtils parseHttpDate: exp ]
>>>> 
>>>> 
>>>> Thanks
>>>> 
>>>> Paul
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] ZnClient receiving Expires header with Max-Age instead of HTTP formatted DateAndTime

2018-09-11 Thread Paul DeBruicker
Seems like the invalid date could be anything and the spec gives '0' as the
example invalid date.  


I'm not using #expiresTimeStamp or #parseHttpDate: explicitly its just that
the GET request was failing on that date parsing error, when checking if the
Cookie was expired.  


I think your proposed ZnCookie>>#isExpired is the right way to go e.g.

isExpired 
| expirationTimeStamp | 
(self hasAttribute: 'expire') ifFalse: [ ^ false ]. 
[ expirationTimeStamp := self expiresTimeStamp ] on: Error do: [ ^
false ]. 
"note that max-age (#maxage) is not used" 
^ expirationTimeStamp asUTC < DateAndTime now asUTC 






Sven Van Caekenberghe-2 wrote
> Hi Paul,
> 
>> On 11 Sep 2018, at 06:02, PAUL DEBRUICKER 

> pdebruic@

>  wrote:
>> 
>> Hi Sven - 
>> 
>> This is in Pharo 6.1.
>> 
>> There is an API I'm using which sometimes returns a string only
>> containing a single instance of the number 0 in the "Expires" field, so
>> the #expiresTimeStamp method sends that to #parseHttpDate: and since it
>> can't be parsed into a date an error is thrown.  Seems like Zinc should
>> be able to handle that based on the spec here:
>> https://tools.ietf.org/html/rfc7234#section-5.3
>> 
>> 
>> Would you rather I changed the implementation of parseHttpDate: to add an
>> empty check on the parsed tokens e.g.
> 
> IIRC some months ago, there were some changes to this area, but I forgot
> the details and the before state.
> 
> Anyway, reading RFC7234's section that you reference, maybe we do need to
> make another change, but I am not sure.
> 
> Let's start by explaining what there is today and why it is like that:
> #parseHttpDate: and #expiresTimestamp do indeed throw exceptions (by
> design), while #isExpired is the more high level access method.
> 
> Consider:
> 
> (ZnCookie name: 'foo' value: '100') isExpired. 
> 
>  => false
> 
> ZnUtils parseHttpDate: '0'.
> 
>  => Boom
> 
> (ZnCookie name: 'foo' value: '100') expires: '0'; expiresTimeStamp.
> 
>  => Boom
> 
> (ZnCookie name: 'foo' value: '100') expires: '0'; isExpired.
> 
>  => false
> 
> Could you use #isExpired and does it do what you want/expect ?
> 
> Reading the spec again, I am not 100% sure about the error case (existing
> but zero or wrong Expires header), maybe that should be true instead of
> false.
> 
> isExpired
>   | expirationTimeStamp |
>   (self hasAttribute: 'expire') ifFalse: [ ^ false ].
>   [ expirationTimeStamp := self expiresTimeStamp ] on: Error do: [ ^ false
> ].
>   "note that max-age (#maxage) is not used"
>   ^ expirationTimeStamp asUTC < DateAndTime now asUTC
> 
> What do you think ?
> Anyone else with an opinion ?
> 
> Sven
> 
>> parseHttpDate: string
>>  "self parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'."
>>  "self parseHttpDate: 'Tue, 13-Sep-2011 08:04:51 GMT'."
>>  "self parseHttpDate: 'Tue Jan 01 00:00:01 2036 GMT'."
>>  
>>  | tokens day month year hour minute second months map yearToken |
>>  string size = 1 ifTrue:[ ^DateAndTime epoch ].
>>  tokens := (string findTokens: #( $ $- $: $, )) allButFirst.
>>  
>>  ...
>> 
>> 
>> Or add a string size guard check in #expiresTimeStamp ? e.g.
>> 
>> expiresTimeStamp
>>  self expires
>>  ifNil: [ ^ DateAndTime now + 1 day ]
>>  ifNotNil: [ :exp | 
>>  exp size = 1
>>  ifTrue: [ ^ DateAndTime epoch ].
>>  ^ ZnUtils parseHttpDate: exp ]
>> 
>> 
>> Thanks
>> 
>> Paul





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



[Pharo-users] ZnClient receiving Expires header with Max-Age instead of HTTP formatted DateAndTime

2018-09-10 Thread PAUL DEBRUICKER
Hi Sven - 

This is in Pharo 6.1.

There is an API I'm using which sometimes returns a string only containing a 
single instance of the number 0 in the "Expires" field, so the 
#expiresTimeStamp method sends that to #parseHttpDate: and since it can't be 
parsed into a date an error is thrown.  Seems like Zinc should be able to 
handle that based on the spec here: 
https://tools.ietf.org/html/rfc7234#section-5.3


Would you rather I changed the implementation of parseHttpDate: to add an empty 
check on the parsed tokens e.g.


parseHttpDate: string
"self parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'."
"self parseHttpDate: 'Tue, 13-Sep-2011 08:04:51 GMT'."
"self parseHttpDate: 'Tue Jan 01 00:00:01 2036 GMT'."

| tokens day month year hour minute second months map yearToken |
string size = 1 ifTrue:[ ^DateAndTime epoch ].
tokens := (string findTokens: #( $ $- $: $, )) allButFirst.

...


Or add a string size guard check in #expiresTimeStamp ? e.g.

expiresTimeStamp
self expires
ifNil: [ ^ DateAndTime now + 1 day ]
ifNotNil: [ :exp | 
exp size = 1
ifTrue: [ ^ DateAndTime epoch ].
^ ZnUtils parseHttpDate: exp ]


Thanks

Paul


Re: [Pharo-users] Periodic long GC's when just coding in newer Pharo 7's?

2018-09-07 Thread Paul DeBruicker
How big is your image?  





Tim Mackinnon wrote
> I thought I would mention this as its something I’ve only just started to
> notice… when doing some brief coding sessions (as in, each day I unsuspend
> my laptop and code for 30-40 minutes - to write some missing tests) - I
> have started to notice I get a spinning beach ball in Pharo for 15+
> seconds and then it recovers. It’s usually once each day, and it does
> recover.
> 
> It feels like its deciding to do a GC - but I’m not sure how to tell. It
> could be nothing - but its not something I’ve noticed in Pharo 6.1 and
> seems unique to Pharo 7 (which I’ve started to try using more recently).
> 
> Its just happened now in build 1167 64bit on OSX (I believe I have the
> newer vm - as I had to re-download them for pharo-launcher).
> 
> Tim





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



[Pharo-users] code completion - order classes suggested by match then package reference count?

2018-08-13 Thread PAUL DEBRUICKER
Hi - 

When I want to use an OrderedCollection in Pharo 6.1 the code completion has me 
write "Ordere" before it is the one selected.  If I have ever used an 
OrderPreservingDictionary (which comes up first) I've forgotten, but daily use 
OrderedCollections.  

Is there a way now to change the sort order of classes so that they sort by # 
of uses/references in the image or package I'm developing in? 

I'm using the default E completion if it matters.  

Thanks

Paul


Re: [Pharo-users] [ANN] Cryptography package on github

2018-07-23 Thread Paul DeBruicker
Hi Norbert,


I'm glad you're doing this.  You might post this announcement to the
Cryptography list:
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
 & Squeak Dev.


And Dale Henrich did a port to GemStone here:
https://github.com/gsdevkit/cryptography

But I'm not sure if he did any structural changes to the packaging.  






NorbertHartl wrote
> After several attempts to solve the Cryptography package problems over the
> years I decided to move it on my own to github.
> 
> What I did:
> 
> - researched all authors and used the git migration tool to get the
> package from smalltalkhub to github 
> - released a version 0.1 that should be exactly the same as the code on
> smalltalkhub for people that want to change
> - fixed an occurrence of IfNotNilDo: in the Cryptography package to make
> it load in pharo7
> - added a metacello baseline
> - added a group „all" that loads everything like it is now with one
> package
> - added travis files and enable travis checks for pull requests
> - released a version 0.2 that contains the original code plus travis and
> metacello
> - Started to cut off the ASN1, PKCS12 and X509 classes in separate
> packages
> - Added to each new package a -Tests package containing tests
> - constructed all dependencies in the baseline
> - added a core group that loads the now slimmed down package solely
> 
> I must say this was really great with the help of promote-demote package
> tag functionality and the dependency browser. The only thing missing is
> kind of a tool to construct the metacello baseline. I miss Versionner
> here.
> 
> What I didn’t do:
> 
> - checking all the other packages in the repo. There are packages with old
> style ffi calls and things that seem to be squeak dependent.
> 
> I hope with the time and people’s complaints we can figure out what is
> obsolete and what needs to be adjusted.
> 
> The repository is now at
> 
> https://github.com/zweidenker/Cryptography
> https://github.com/zweidenker/Cryptography;
> 
> but I’m happy to move it to a better place if someone has an idea. 
> 
> Pull requests and tickets are welcome.
> 
> Hope you like it,
> 
> Norbert





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



Re: [Pharo-users] Naming parameters - conventions?

2018-07-11 Thread Paul DeBruicker
I generally go for intention revealing (e.g. fullName) because the class of
the parameter can change arbitrarily. e.g. your aString might become a Name
object that can answer something useful when you know just the first or
family name.  But I also mostly write code for my own consumption.  


If there is anything recommended/specified in 


https://www.amazon.com/Smalltalk-Best-Practice-Patterns-Kent/dp/013476904X

I'd use it in training materials.  


I'm away from the house but can look in my copy later if no one else chimes
in with a better answer.  


It also seems like a "how much milk do you like in your coffee?" choice
where the tradeoffs between one vs the other isn't high and the code in
action will let you know whether you've got it right.   






Tim Mackinnon wrote
> Hi everyone, something I’ve meant to ask over the years, as I’ve seen lots
> of variation and was taught something else in the day...
> 
> What is the suggested way of naming parameters?
> 
> I was taught {“a”/“an”}DataType, so it would be:
> 
> #name: aString
> 
> Which works ok (although falls apart if you refactor as the tools don’t
> interpret it - although I guess could be improved to do so)
> 
> However often I find myself wanting to communicate a bit better as in:
> 
> #name: fullNameString
> 
> Which isn’t strictly a datatype (and I tend to leave out the a/an when I
> do this). But it feels a bit off piste and it does make me consider
> whether my selector is named badly and should be:
> 
> #fullName: aString
> 
> Which takes me back to the convention I learned long ago.
> 
> This said however, we often need to match similar #on:do, #in: generic
> selector names and then it’s not always obvious the intent of parameter.
> 
> Any thoughts to share?
> 
> I ask because for exercism, we should try and set a good example.
> 
> Tim
> 
> Sent from my iPhone





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



Re: [Pharo-users] Changing a BaselineOf... to include one more package

2018-07-08 Thread Paul DeBruicker
Seems like its not looking in your iceberg directory/subdirectories for the
SmaCC-Reification package.  Just the package-cache and on github.  




Did you try adding a SmaCC-Reification specific repository declaration yet
to your baseline?

e.g. 

spec package: 'SmaCC-Reification' with:[
 spec repository:'/my/full/path/iceberg/apblack/SmaCC']


I'm definitely in the "fiddle around with stuff until it works" level of
competency on Baselines so there may be a better (correct :) ) way.  








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



Re: [Pharo-users] do-it or inspect-it in the spotter search bar?

2018-07-04 Thread Paul DeBruicker
I had time today to implement this.  The attached mczs, in pharo 6.1, allow
you to hit Cmd-i to inspect or cmd-d to do it.


You can test by loading the test package and typing in the spotter search
bar, 


GTCounter increaseValue


then hitting Cmd-d several times then Cmd-i to see what value you ended on.



To implement I edited the GTSpotterMorph>>bindingDictionnary to look for and
act cmd-i and cmd-d



GT-Spotter-PaulDeBruicker.mcz
<http://forum.world.st/file/t94460/GT-Spotter-PaulDeBruicker.mcz>  
GT-Tests-Spotter-PaulDeBruicker.mcz
<http://forum.world.st/file/t94460/GT-Tests-Spotter-PaulDeBruicker.mcz>  


Paul DeBruicker wrote
> I was feeling lazy was wondered if it would be possible to hit Cmd-D or
> Cmd-I in the spotter input field rather than opening a playground and
> typing something in then hitting it.  E.g.
> 
> 
> 1 + 1  Cmd-I 
> 
> would open an inspector on the number 2
> 
> 
> After looking at GTSpotter>>#spotterFor... methods I couldn't figure out
> how to make it happen in the half hour I had to spend on it.   
> 
> 
> I recognize opening the playground is Cmd-O Cmd-W but I just open the
> spotter ~50x as often as a new playground so the muscle memory isn't
> there.  If I could do quick one-liners in the spotter then the playground
> would get opened even less often.





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



[Pharo-users] do-it or inspect-it in the spotter search bar?

2018-06-30 Thread PAUL DEBRUICKER
I was feeling lazy was wondered if it would be possible to hit Cmd-D or Cmd-I 
in the spotter input field rather than opening a playground and typing 
something in then hitting it.  E.g.


1 + 1  Cmd-I 

would open an inspector on the number 2


After looking at GTSpotter>>#spotterFor... methods I couldn't figure out how to 
make it happen in the half hour I had to spend on it.   


I recognize opening the playground is Cmd-O Cmd-W but I just open the spotter 
~50x as often as a new playground so the muscle memory isn't there.  If I could 
do quick one-liners in the spotter then the playground would get opened even 
less often.  












[Pharo-users] Workflow aka Aare status?

2018-06-22 Thread PAUL DEBRUICKER
I read this thread: 


http://forum.world.st/Aare-questions-td5063745.html


And it seems a lot of work has been done since Max/NetStyle posted the code 
here:

https://github.com/Netstyle/Workflow


In Stef's repo here: 

https://github.com/Ducasse/Workflow


Is  anyone else working on it / publishing code for it?  


Thanks

Paul


Re: [Pharo-users] more on "can't get keyboard shortcuts to work on Mac"

2018-06-06 Thread Paul DeBruicker
oh and a typo.  Which should have been:

not Cmd-t then Cmd-c

but 

Cmd-t-c




Paul DeBruicker wrote
> Oh.  Its not an individual 
> 
> Cmd-t then Cmd-t
> 
> Its Cmd-t-c
> 
> So with a browser open on the instance side of a class press and hold the
> Cmd key, then hit t then hit c
> 
> At least it works on my machine™ 
> 
> 
> 
> 
> GreggInCA wrote
>> Tom, thanks for the detailed instructions. They help, but many of the
>> shortcuts listed in Help (Help window > Pharo Environment Help > Keyboard
>> Shortcuts > Browser Shortcuts) don't work. 
>> 
>> cmd-b, cmd-m works as you said, but anything that begins with Meta + f
>> (i.e., cmd-f) brings up a Find and Replace dialog, just as you would
>> expect
>> any Mac application to provide (i.e., cmd-f lets you find things). Some
>> shortcuts do work, while others do not.
>> 
>> Other examples of things not working: With a system browser active and a
>> class selected, Meta + t, Meta + c does *not* "show class side" (which is
>> what the Browser Shortcuts window says it should do).
>> 
>> I'm sure this is Mac-specific, with built-in Mac behavior having
>> precedence
>> over any application-defined behaviors. As I said in my earliest post,
>> I've
>> looked everywhere in the Mac environment for ways to turn this Mac
>> behavior
>> off, with no success.
>> 
>> Hey, I can live without keyboard shortcuts, but I thought I'd put some
>> energy into seeing if it's possible to get them to work.
>> 
>> If no one running Pharo 6.1 on a Mac can tell anything that might help,
>> I'll
>> just give it up and use menus. Everybody, thanks for your help!
>> 
>> === original post ===
>> 
>> 
>> Tim Mackinnon wrote
>>> Hi Greg - meta is the Cmd key on a Mac.
>>> 
>>> So you type cmd-shift-f for reformat code in a method, cmd-s to save.
>>> 
>>> There are some chorded keys - eg cmd-b cmd-m (keep holding the cmd then
>>> press b followed by m) to browse implementers of the selected method. 
>>> 
>>> On Linux the meta key is Ctrl (just an FYI)
>>> 
>>> While discussing keystrokes - a less obvious but very useful one is
>>> shift-enter to get the spotter (sort of like the Mac’s spotlight but for
>>> code)
>>> 
>>> All of this is in the help documentation - Help | Help Browser | Pharo
>>> Environment Help.
>>> 
>>> But happy to get you started, as it’s frustrating if the basics aren’t
>>> working for you.
>>> 
>>> Tim
>>> 
>>> Sent from my iPhone
>>> 
>>>> On 5 Jun 2018, at 04:50, Gregg Williams 
>> 
>>> gregg13@
>> 
>>>  wrote:
>>>> 
>>>> Tim and Ben,
>>>> 
>>>> Thanks for your help. Sorry for not being clear. When I said "I just
>>>> can't get keyboard shortcuts to work on Mac," what I should have said
>>>> is
>>>> "I just can't get Pharo-specific shortcuts to work on the Macintosh
>>>> implementation of Pharo" (6.1 is what I'm using BTW).
>>>> 
>>>> Maybe I should have said "keymap shortcuts"? I'm talking about things
>>>> like Meta+Shift+f for 'find class', and Meta+x, Meta+m for 'remove
>>>> method'.
>>>> 
>>>> I've looked for what the definition of Meta is for Mac OS. All I can
>>>> find
>>>> is meta-click is Shift+Option+click, but that doesn't seem to work.
>>>> Option + 
>>> 
>> 
> 
>>>  gives "special characters" like ∂, ß, and œ.
>>>> 
>>>> I hope that now you can simply say, "Oh, of course, what you need to do
>>>> is…". Thanks!
>>>> 
>>>> 
>>>>> I just can't get keyboard shortcuts to work on Mac. I?ve tried a lot
>>>>> of
>>>>> stuff, more than I can list here. Here are some things I?ve tried:
>>>>> 
>>>>> * searching the Pharo by Example book
>>>>> * turning off all Mac keyboard-macro programs
>>>>> * switching from extended to standard US keyboard
>>>>> * looking at options in System Preferences > Keyboard
>>>>> 
>>>>> 
>>>>> If you?re on the Mac, do you have this problem? If so, what?s your
>>>>> solution? Thanks!
>>>>> 
>>>> 
>>>>
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] more on "can't get keyboard shortcuts to work on Mac"

2018-06-06 Thread Paul DeBruicker
Oh.  Its not an individual 

Cmd-t then Cmd-t

Its Cmd-t-c

So with a browser open on the instance side of a class press and hold the
Cmd key, then hit t then hit c

At least it works on my machine™ 




GreggInCA wrote
> Tom, thanks for the detailed instructions. They help, but many of the
> shortcuts listed in Help (Help window > Pharo Environment Help > Keyboard
> Shortcuts > Browser Shortcuts) don't work. 
> 
> cmd-b, cmd-m works as you said, but anything that begins with Meta + f
> (i.e., cmd-f) brings up a Find and Replace dialog, just as you would
> expect
> any Mac application to provide (i.e., cmd-f lets you find things). Some
> shortcuts do work, while others do not.
> 
> Other examples of things not working: With a system browser active and a
> class selected, Meta + t, Meta + c does *not* "show class side" (which is
> what the Browser Shortcuts window says it should do).
> 
> I'm sure this is Mac-specific, with built-in Mac behavior having
> precedence
> over any application-defined behaviors. As I said in my earliest post,
> I've
> looked everywhere in the Mac environment for ways to turn this Mac
> behavior
> off, with no success.
> 
> Hey, I can live without keyboard shortcuts, but I thought I'd put some
> energy into seeing if it's possible to get them to work.
> 
> If no one running Pharo 6.1 on a Mac can tell anything that might help,
> I'll
> just give it up and use menus. Everybody, thanks for your help!
> 
> === original post ===
> 
> 
> Tim Mackinnon wrote
>> Hi Greg - meta is the Cmd key on a Mac.
>> 
>> So you type cmd-shift-f for reformat code in a method, cmd-s to save.
>> 
>> There are some chorded keys - eg cmd-b cmd-m (keep holding the cmd then
>> press b followed by m) to browse implementers of the selected method. 
>> 
>> On Linux the meta key is Ctrl (just an FYI)
>> 
>> While discussing keystrokes - a less obvious but very useful one is
>> shift-enter to get the spotter (sort of like the Mac’s spotlight but for
>> code)
>> 
>> All of this is in the help documentation - Help | Help Browser | Pharo
>> Environment Help.
>> 
>> But happy to get you started, as it’s frustrating if the basics aren’t
>> working for you.
>> 
>> Tim
>> 
>> Sent from my iPhone
>> 
>>> On 5 Jun 2018, at 04:50, Gregg Williams 
> 
>> gregg13@
> 
>>  wrote:
>>> 
>>> Tim and Ben,
>>> 
>>> Thanks for your help. Sorry for not being clear. When I said "I just
>>> can't get keyboard shortcuts to work on Mac," what I should have said is
>>> "I just can't get Pharo-specific shortcuts to work on the Macintosh
>>> implementation of Pharo" (6.1 is what I'm using BTW).
>>> 
>>> Maybe I should have said "keymap shortcuts"? I'm talking about things
>>> like Meta+Shift+f for 'find class', and Meta+x, Meta+m for 'remove
>>> method'.
>>> 
>>> I've looked for what the definition of Meta is for Mac OS. All I can
>>> find
>>> is meta-click is Shift+Option+click, but that doesn't seem to work.
>>> Option + 
>> 
> 
>>  gives "special characters" like ∂, ß, and œ.
>>> 
>>> I hope that now you can simply say, "Oh, of course, what you need to do
>>> is…". Thanks!
>>> 
>>> 
 I just can't get keyboard shortcuts to work on Mac. I?ve tried a lot of
 stuff, more than I can list here. Here are some things I?ve tried:
 
 * searching the Pharo by Example book
 * turning off all Mac keyboard-macro programs
 * switching from extended to standard US keyboard
 * looking at options in System Preferences > Keyboard
 
 
 If you?re on the Mac, do you have this problem? If so, what?s your
 solution? Thanks!
 
>>> 
>>>
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





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



Re: [Pharo-users] Is it bad to have an order NeoJsonObject?

2018-06-06 Thread Paul DeBruicker
Tim Mackinnon wrote
> Hi - I’ve hit some Json where the outputted values (they are field names)
> are written out in a specific order - and the author hasn’t chosen to use
> an array to represent those fields in a specific order.
> 
> { ‘field1’ : { ….}, ‘field2’: { … } }
> 
> I think this is technically incorrect and should be:
> 
> { [ {‘field1’ : { ….}, ‘field2’: { … } ]}
> 
> Anyway - given what I’ve got, would it be a terrible idea to create my own
> version NeoJsonObject and just make it a subclass of OrderedDictionary?
> 
> I can’t see any issues - but then I might be kidding myself…
> 
> Tim


Seems like those are two different JSON objects. The first is what you'd get
from a NeoJSONObject holding a Dictionary.  The second is what you'd get
from a NeoJSONObject holding an Array holding a Dictionary as its only
element.  Maybe just double check that the right object is getting created.  

For JSON (https://json.org/) I think the order of the keys does not matter,
but the hierarchy does, so making an OrderedDictionary subclass seems extra.   



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



Re: [Pharo-users] get.pharo.org broken?

2018-04-24 Thread Paul DeBruicker
Ahh. Thanks Sven.  

I was just copying/pasting from the  block on https://get.pharo.org/64
and it didn't work.  

Adding the trailing slash like you suggest fixes it.  







Sven Van Caekenberghe-2 wrote
> curl -L https://get.pharo.org/64
> 
> or https://get.pharo.org/64/
> 
>> On 24 Apr 2018, at 16:27, PAUL DEBRUICKER 

> pdebruic@

>  wrote:
>> 
>> Hi - 
>> 
>> 
>> curl https://get.pharo.org/64 | bash
>> 
>> 
>> gives an error on MacOS X:
>> 
>> 
>> 
>> paul@a:~/pharo/maf$ curl https://get.pharo.org/64 | bash
>>  % Total% Received % Xferd  Average Speed   TimeTime Time 
>> Current
>> Dload  Upload   Total   SpentLeft 
>> Speed
>> 100   237  100   2370 0315  0 --:--:-- --:--:-- --:--:--  
>> 315
>> bash: line 1: syntax error near unexpected token `newline'
>> bash: line 1: `!DOCTYPE HTML PUBLIC -//IETF//DTD HTML
>> 2.0//EN'
>> 
>> 
>> 
>> am I doing something wrong or is it broken for other people too?
>> 
>> Thanks
>> 
>> Paul





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



[Pharo-users] get.pharo.org broken?

2018-04-24 Thread PAUL DEBRUICKER
Hi - 


curl https://get.pharo.org/64 | bash


gives an error on MacOS X:



paul@a:~/pharo/maf$ curl https://get.pharo.org/64 | bash
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100   237  100   2370 0315  0 --:--:-- --:--:-- --:--:--   315
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `'



am I doing something wrong or is it broken for other people too?

Thanks

Paul


[Pharo-users] treemap of memory use for an object?

2018-04-23 Thread PAUL DEBRUICKER
Hi,

With Roassal is it possible to make a treemap 
(https://en.wikipedia.org/wiki/Treemapping) of the memory use of an object and 
its instVars?  


I have a leak and am not sure where and its not one or two objects AFAIK


Thanks


Paul


Re: [Pharo-users] [Pharo-Launcher] call for tests on Windows

2018-04-16 Thread Paul DeBruicker
Microsoft allows devs to download VMs for Windows 7, 8, & 10 that work with
VirtualBox, Vagrant, VmWare, Parallels, & HyperV here:


https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/



They last 90 days and you can install Pharo on them.  Their real purpose is
to test websites on IE.







demarey wrote
> Hi,
> 
> Regarding the various problems Pharo Launchers had on Windows, we worked
> on a new installer based on Advanced Installer [1] to avoid UAC (User
> Account Control) and write permissions problems. This new installer now
> installs Pharo Launcher in the user’s local app data folder (where for
> sure, he has write permissions). Pharo Launcher also now have its own icon
> and use its own name instead of Pharo. Also, the uninstaller now works as
> expected. Last but not least, the installer is now signed to avoid warning
> of Windows Defender.
> Thanks to Ben Coman who did the first version of the packaging using
> Advanced Installer (was NSIS).
> This version should also improve the launch of Pharo images on Windows.
> 
> So, please could you install and test this new version: and report any
> problem with it? http://files.pharo.org/pharo-launcher/win-alpha/
> We do not have windows users around so it’s hard to know if it works
> outside our tests boxes.
> 
> Thanks,
> Christophe
> 
> [1] https://www.advancedinstaller.com/





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



[Pharo-users] migration to 6.1 was super easy.

2018-04-11 Thread PAUL DEBRUICKER
Thanks for all the hard work.  


It took me about 30 minutes to migrate one of my projects from 32bit Pharo 5 to 
64bit 6.1 this afternoon.  It has about 40 external dependencies so I thought 
it would take much longer to get everything sorted.  


Re: [Pharo-users] GemStone/S on Docker?

2018-04-09 Thread Paul DeBruicker
Not that I know of but there is a gemstone list here where you should ask: 

http://forum.world.st/GLASS-f1460844.html


Someone there may have.  


I think there is an effort to port Magma to Pharo if you search on
forum.world.st you may be able to find it easily.  There is also GLORP
http://forum.world.st/GLORP-f3496819.html






sergio_101 wrote
> Has anyone set up GemStone/S on Docker?
> 
> I have another project that I need persistence on. In the past, I have use
> voyager, but I’d really like to use something that doesn’t require
> refactoring. I was looking at Magma, but it looks like that is Squeak
> only.
> 
> 
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> 
> signature.asc (849 bytes)
> http://forum.world.st/attachment/5073311/0/signature.asc;





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



[Pharo-users] ZnClient - receiving/parsing malformed cookie 'expires' value

2018-03-19 Thread PAUL DEBRUICKER
Hi -  This is more of an FYI than anything


I'm interacting with an API that is sending "expires=0" value as part of the 
only cookie of their response.  


Changing  #expiresTimeStamp to 


(self expires isNil or:[self expires size<28] ) ifTrue:[ ^ DateAndTime now + 1 
day ].
^ ZnUtils parseHttpDate: self expires


fixes my issue but maybe there's a better way to handle cookie parsing errors 


Paul


[Pharo-users] does pharo 5 work in mac high sierra?

2018-03-06 Thread PAUL DEBRUICKER
I assume it works fine but I'm thinking about upgrading and just want to be 
sure.


Thanks


Paul


[Pharo-users] ZnClient POST then GET of different URL path, GET has POST's entity

2018-01-15 Thread PAUL DEBRUICKER

Hi - 

Should #resetEntity be called automatically for long lived sessions ?  I see 
that it is called automatically for HEAD and DELETE methods.


If you do a 

|client | 
client:=ZnClient new.
client get: 'http://example.com/getPath'
client inspect
client post: 'http://example.com' contents:'My Contents'
client inspect.
client get: 'http://example.com/getPath'
client inspect.
client close.


and then look at the changed headers between the first and last GET you can see 
that the body from the POST was sent in the 2nd GET request.  I can't think of 
a time when you'd want that, generally.  

Maybe it would be better to make keeping the entity around as the exception in 
all cases and ask for it specifically when you want it.  I'm not sure of the 
answer I was just surprised by the behavior and can definitely send 
#resetEntity for my use case.


Paul


Re: [Pharo-users] Grafoscopio (Initial) Feedback

2018-01-06 Thread Paul DeBruicker
Hi Offray,

I think the docs you want are here:

https://github.com/Metacello/metacello/blob/master/docs/MetacelloUserGuide.md

and

https://github.com/Metacello/metacello/blob/master/docs/MetacelloScriptingAPI.md


Hope this helps,

Paul



Offray Vladimir Luna Cárdenas-2 wrote
> Hi Sean,
> 
> I would like to use the Metacello script you advised to me for loading
> Grafoscopio. The Gopher scripts were created following documentation in
> PBE2.
> 
> Does any has pointers to documentation on how to create Metacello
> installing scripts?
> 
> Thanks,
> 
> Offray
> 
> 
> On 31/12/17 11:08, Sean P. DeNigris wrote:
>> Offray Vladimir Luna Cárdenas-2 wrote
>>> Now they're in the SThub and also in the PDF Manual linked there.
>> Ah, okay I see they are updated for 6.1, but they still use Gofer. Also,
>> IIRC (I moved all my development to git a while ago now) the best
>> practice
>> is to always keep the most up-to-date ConfigurationOf in the canonical
>> repo
>> (i.e. yours) and then /copy/ it to the relevant platform
>> metaRepoForXyz's.
>> Otherwise, in my experience one invites chaos because people are
>> downloading
>> variously out-of-date configs from multiple sources (like me last night
>> spending time reporting already-fixed bugs; don't worry I'm not upset!).
>> See
>> my previous post for the preferred script that should be expected to work
>> on
>> /any/ supported platform.
>>
>>
>>
>> -
>> Cheers,
>> Sean
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>





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



Re: [Pharo-users] REST client hints

2017-12-05 Thread Paul DeBruicker
Hi Ben,


I've made a few REST Clients

http://smalltalkhub.com/#!/~pdebruic/Stripe
http://smalltalkhub.com/#!/~pdebruic/Tropo
http://smalltalkhub.com/#!/~pdebruic/SegmentIO

And the elasticsearch one but its been advanced mostly lately by Sho Yoshida
(https://github.com/newapplesho) here
https://github.com/newapplesho/elasticsearch-smalltalk

He has also made REST clients for Twilio, AWS, SendGrid, Salesforce, and
Mixpanel among others.

Norbert Hartl made one for Mandrill (Mailchimps transactional email service)
http://smalltalkhub.com/#!/~NorbertHartl/Mandrill

And Francois Stephany made one for Postmark (another transactional email
service) http://smalltalkhub.com/#!/~PharoExtras/Postmark


So those are some examples of different approaches.  


I also started/made a cross platform web client wrapper (just wraps calls to
ZnClient or WebClient on Squeak)
http://smalltalkhub.com/#!/~pdebruic/HTTPAPIClient

But IIRC I only used it in the Stripe API client.  


Hope this gives you some ideas about how to approach your own solution

Paul



Ben Coman wrote
> I'm just about to write my first client interface to a REST service.
> In some respects I understand this is as simple as doing GET responses
> using Zinc,
> but I'm inquiring about tutorials or libraries that might help.  Most
> of the stuff turned up by searches is about server-side of REST.
> 
> cheers -ben





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



[Pharo-users] NeoCSV #skipToNextLine or #skipRemainingColumns ?

2017-11-02 Thread PAUL DEBRUICKER
Hi - 

I want to import the first and seventh column from a set of 50 csv files each 
of which could have 28 - 34 columns.  Is there a way to have NeoCSV skip the 
remaining columns automatically (e.g. 8 and up) ?

Thanks

Paul




Re: [Pharo-users] Cryptography and hashing in Pharo

2017-10-26 Thread Paul DeBruicker
I made this port/copy of the squeaksource package:  

http://smalltalkhub.com/#!/~Cryptography/Cryptography


Is that the version you were thinking of and couldn't find?

What is ifs? 

I don't understand what you want to do with the hashing.  Are you talking
about hashing domain objects for external storage?   Do you have to interact
with another system or just have hashed data in the image or stored
somewhere internally to your project? What OS are you going to use?  


I think you can get to the point where your objects can be hashed by any of
the backends you mention and just change among them as your needs change. 
That being said NaCl seems the most generally useful.  Cryptographic hashing
in Pharo is slower than C, so depending on the volume of data to hash a
Pharo implementation may be too slow.



hope this helps


Paul


Cédrick Béler wrote
> Hi again,
> 
> 
> Concerning cryptography in Pharo, there are to my knowledge :
> => a package developed in squeak [1] that was I think ported/forked for
> Pharo. I cannot find the Pharo version
> => a binding to the sodium library (NaCl) [2]
> 
> With one would you recommend ?  Maybe another option ?
> 
> 
> Concerning hashing (I’d like to hash information content a bit like this
> is done in ifs with their multihash lib [3])
> => I found a keccak implication with I think would do the [4]. Any
> feedback ? Other implementations available ?
> => Do you think having something like ifs multihash would be interesting
> in Pharo ?
> 
> 
> Again, thanks in advance for your comments/advices.
> 
> Cédrick
> 
> 
> [1]  http://www.squeaksource.com/Cryptography.html
> http://www.squeaksource.com/Cryptography.html; 
> [2]
> http://catalog.pharo.org/catalog/project/Nacl?_s=54MCZlmxc6F08Ht4&_k=HxcBD1pRVtXkfVFM
> http://catalog.pharo.org/catalog/project/Nacl?_s=54MCZlmxc6F08Ht4_k=HxcBD1pRVtXkfVFM;
>  
> [3] https://github.com/multiformats/multihash
> https://github.com/multiformats/multihash; 
> [4] https://github.com/sbragagnolo/Keccak
> https://github.com/sbragagnolo/Keccak;





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



Re: [Pharo-users] Business process (declaration and orchestration), ontology/taxonomy,

2017-10-26 Thread Paul DeBruicker
Maybe the package described here has what you're looking for :

http://forum.world.st/Ann-Workflow-td4963635.html







Cédrick Béler wrote
> Hi again, this is my last question and the more general one of the day :-)
> 
> 
> I’m looking for way of representing and executing simple "business
> processes" in Pharo and a way of declaring domain ontologies/taxonomies.
> 
> I didn’t find any lib around this subjects except some projects in other
> smalltalk dialects.
> 
> I just wander if somebody has done some work in these field. I’m also
> interested in (KISS) design discussions around these topics, hence this
> email.
> 
> I don’t want to do a full fledged business process middleware. 
> 
> I would need :
> - a way to represent simple business processes (succession of activities
> with logic gates (and/or/xor) => I might be able to do that by myself).
> - a way to execute these processes (routines) in a semi-aotumatic manner
> => This looks more difficult to do to me.
> => my aim is to execute recurrent routines (my routines) with the help of
> a Pharo application
> 
> 
> For such a system, I also need a way to categorize information context.
> Again, I don’t think I need a full fledged ontology implementation like
> Description Logic (or whatever). I think I’ll be happy with information
> tagging according to a predefined taxonomy. Instead of flat tags, I’d like
> them to implement some sort of multiple inheritance. For instance, I may
> need a tag #soccer that  "inherit" #sport.
> 
> Any information regarding taxonomy tagging in Pharo ? (Or eventually
> ontology?).
> 
> 
> 
> TIA,
> 
> Cédrick





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



[Pharo-users] Annual online conference?

2017-10-25 Thread PAUL DEBRUICKER
Laravel.com is a PHP web framework.  


Their community organizes an online conference: https://laracon.net/2017


Seems like it could be worthy of mimicking in the Smalltalk community.



Re: [Pharo-users] Problem with input to XML Parser - 'Invalid UTF8 encoding'

2017-10-08 Thread Paul DeBruicker
in the HEAD tag of that page with the article they declare it is ISO-8859-1
and not UTF-8.  In the page they have a  

C’è 

The little back-tick next to the C is UTF8 8217
(http://www.codetable.net/decimal/8217)


So their encoding is messed up, and maybe the XMLHTMLParser should throw a
warning or something if there is a mismatch.  


Glad you found a work around. 








In another thread (on SVG Icons) Sven referred to ways of getting input from
a URL for XMLDOMParser. I have recently had some problems doing this. I have
found a workaround, so it is not urgent, but I thought I should put it on
record in case anyone else is bitten by it, and so maybe Monty can look at
it.

 

I am using the subclass XMLHTMLParser, and my usual way of invoking it was:

1.  XMLHTMLParser parseURL: .

This works in most cases, but with one particular site -
http://www.corriere.it/., which is an Italian newspaper - I had frequent
failures, with the error message 'Invalid UTF8 encoding'. The parser has the
option of parsing a string, which is obtained by other means, so I tried
reading it in with Zinc:

2.  XMLHTMLParser parse:  asZnUrl retrieveContents.

And this worked, so clearly the encoding on the site is OK. I realised that
the XML-Parser package has its own methods, which reproduce a lot of the
functionality of Zinc, so I tried the equivalent:

3.  XMLHTMLParser parse:  asXMLURI get.

To my surprise, this worked equally well. I had expected problems, because
presumably forms (1) and (3) use the same UTF8 decoding.

 

For now, I am using the form (3) for all my work, and have not had any
problems since. So the message to anyone who is using the form (1) and
getting problems is to try (2) or (3) instead.

 

I am using Moose 6.1 (Pharo 6.0 Latest update: #60486) on Windows 10. I
think most articles on the Corriere web site will generate the error, but
one which has always failed for me is:

http://www.corriere.it/esteri/17_ottobre_03/felipe-spagna-catalogna-discorso
-8f7ac0d6-a86d-11e7-a090-96160224e787.shtml

I tried to trace through the error using the debugger, but it got too
confusing. However, I did establish that the failure occurred early in
decoding the HTML , in the line beginning 




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



Re: [Pharo-users] Problem with ThreadPool on os windows - no execution

2017-08-07 Thread Paul DeBruicker
Hi Sabine,

There shouldn't be any differences between the platforms.  Maybe I broke
something in the update recently where I make the pool start/stop based on
whether it has any jobs.  You could try the older version that starts the
pool on startup and report back if it works or not.

Seems strange that having a halt in there makes it run.  


Another thing you could do with the current version is open the process
browser (e.g. World Menu > Tools > Process Browser) and set it to
auto-update then run something like:


1000 timesRepeat:[[100 milliSeconds wait. 1+1] queueWork].

And see if it the ThreadPool wakes up and runs them. If it is working a
number of processes that start with the name  "pool:"   will appear in the
list.  And then disappear.Up to 15 I think.


And I haven't tried the new code on anything but Pharo 5 and don't plan to
for a while but would be surprised if that was important.  


Sabine Manaa wrote
> Hi,
> 
> because of [1]  I use ThreadPool [2] and while developing on my mac it
> worked fine.
> But now, testing it on my production server which is a windows machine, it
> does not work which means, it is some kind of magic, the code within the
> block
> 
> [anObject doSomething]  queueWork is not run. When changing it to
> [anObject halt doSomething]  queueWork the code is run!
> 
> Changing my code from >>queueWork back to >>fork proves that everything is
> fine now and there is a problem with ThreadPool.
> 
> When I was playing around to find the problem, I noticed the following:
> 
> I created a button like this:
> 
>  html mdlButton onClick: (html jQuery ajax
> script: [ :script |   | theSession |
> theSession := self session.
> [ theSession inspect ] queueWork.  ]);
> with: 'test'
> 
> Mac: it works nearly immediately
> Windows: it does not work ... except when I add a halt in it
> but: When I then do this after clicking on the test button:
> 
> 20 timesRepeat: [[ Transcript crShow: Time now printString]  queueWork ],
> 
> the sessions inspector also comes up
> 
> It seems that the process is hanging until the next work is to be done.
> 
> Before going deeper in it my question is:
> does anyone use it on windows?
> is it made for windows, too?
> are there any experiences with windows and ThreadPool?
> did I miss something?
> how can I fix this?
> 
> Regards
> Sabine
> 
> [1]
> http://forum.world.st/ThreadPool-with-Seaside-how-td4956812.html#a4957192
> [2] http://smalltalkhub.com/#!/~pdebruic/ThreadPool/





--
View this message in context: 
http://forum.world.st/Problem-with-ThreadPool-on-os-windows-no-execution-tp4958454p4959151.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Lazy-initialization patterns

2017-08-05 Thread Paul DeBruicker
Seems like either way would have unmeasurable performance impact for your
application vs the other and you should go for whats most
legible/comprehensible.


On that metric I prefer the first but #yolo  







Esteban A. Maringolo wrote
> Hi there,
> 
> I have a question about lazy initialization accessor methods that always
> keep me thinking in terms of performance and style.
> 
> For years I did something like:
> 
> MyClass>>#property
>   property isNil ifTrue: [ self initializeProperty ]. "It could be ifNil:
> as well"
>   ^property
> 
> MyClass>>#initializeProperty
>   "Returns the receiver, not the property."
>property := self foo collect: [:e | ... ].
> 
> 
> But this made me think that maybe I'm performing extra operations, so I
> started doing something like:
> 
> MyClass>>#property
>   ^property ifNil: [ self initializeProperty ]
> 
> MyClass>>#initializeProperty
>   ^property := self foo collect: [:e | ... ]
> 
> The initialize method is often created by an "Extract Method" refactoring
> I
> do in the accesor, where I do the initial implementation.
> 
> 
> The messages makes me think that the second implementation is "faster",
> but
> an initializationMethod returning the value instead of the receiver is a
> code smell to me.
> 
> I early initialize everything I know will be be used right away, but for
> cases it doesn't make sense.
> 
> 
> What do you think/prefer? Why?
> 
> Maybe we could use the reified variables (slots) to implement the lazy
> initialization themselves :)
> 
> 
> Best regards!
> 
> Esteban A. Maringolo





--
View this message in context: 
http://forum.world.st/Lazy-initialization-patterns-tp4958897p4958901.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



  1   2   3   >