Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
January 2020
- 82 participants
- 392 messages
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by Sven Van Caekenberghe
Well, I am trying to help you ;-)
Did you read everything that I wrote ?
Did you try the 'Basic Inspect It' menu item ?
> On 7 Jan 2020, at 23:19, LawsonEnglish <LEnglish5(a)cox.net> wrote:
>
> Thanks for responding. I wonât say that Iâm not screwing up as Iâve had severe health problems (impacting both physical and cognitive abilities to the point that I am permanently on US government disability).
>
> Even so, I did the Squeak from the very start [https://www.youtube.com/playlist?list=PL6601A198DF14788D] videos some years ago, and as far as I can tell, I can still understand Smalltalk and its features to that level.
>
> The âdo it and goâ yields the same â#new was sent to nilâ error.
>
> Note that âdo itâ doesnât give an error. âinspect doesâ â the â#new was sent to nilâ
>
> As before,
>
> ingredientsXML = nil.
>
> returns âfalseâ
>
> This could be a plugin issue in Mac Catalina as Apple has added all sorts of arcane security features with the new OS.
>
>
> Or it just could be my literally crippled brain not seeing something obvious due to the fallout from my health issues.
>
> I have no way of knowing (obviously)
>
>
> Thanks for responding.
>
> I had hoped to do new videos discussing the neat features of Pharo similar to the âvery startâ videos, but since I canât get things started, obviously I canât make new "from the very startâ videos either.
>
> L
>
>
>> On Jan 7, 2020, at 3:04 PM, PBKResearch <peter(a)pbkresearch.co.uk> wrote:
>>
>> I agree it makes no sense. I repeated exactly what you describe in a new playground (in Pharo 6.1 on Windows 10) and all worked as expected â essentially the same result as Torsten reported in his first post. I wonder if it might be something Mac related in the operation of Playground.
>>
>> As a desperate try to explain it, please see what happens if you open a Playground with just your single line
>> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ
>> and then select âdo it and goâ. You should find an inspector pane opening to the right in the Playground, with the result of the parse. If this fails, the standard suggestion is to open a debugger on you error message and try to work back through the stack to see how execution got there.
>>
>> Just to discourage you further, when you do get to read the contents of the URL, you will find that the USDA have changed everything. All the data are now on a separate web site, probably in a new layout. This is one of the perpetual hassles of web scraping â the web site authors have to justify their existence by rewriting everything. I wrote this section of the scraping booklet, working up something I had done as a one-off a year or so earlier, and then I found that the USDA had changed the layout in the interim and much needed to be rewritten.
>>
>> HTH â in part at least.
>>
>> Peter Kenny
>>
>> To Torsten â I agree I was slipshod in my drafting â I was in a hurry. Instead of saying âcan screw things upâ I should have said âcan produce counter-intuitive resultsâ, as exemplified by the fact that, in your first example, âingredientsXMLâ can mean different things depending on whether you execute it all in one go or a line at a time.
>>
>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of LawsonEnglish
>> Sent: 07 January 2020 20:55
>> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
>> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>
>> I deleted the playground and entered the text thusly
>>
>> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ.
>>
>> âdo itâ has no complaints
>>
>> ingredientsXML = nil
>>
>> yields âfalse"
>>
>> ingredientsXML inspect
>>
>> has errors: #new sent to nil
>>
>>
>> .
>>
>> This makes no sense at all.
>>
>>
>> L
>>
>>
>>
>>> On Jan 7, 2020, at 1:55 AM, PBKResearch <peter(a)pbkresearch.co.uk> wrote:
>>>
>>> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>>>
>>> HTH
>>>
>>> Peter Kenny
>>>
>>> -----Original Message-----
>>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of Torsten Bergmann
>>> Sent: 07 January 2020 07:47
>>> To: pharo-users(a)lists.pharo.org
>>> Cc: pharo-users(a)lists.pharo.org
>>> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>
>>> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>>>
>>> Just check the debugger and compare to the squeak version where you run in trouble.
>>> Maybe the document could not be retrieved on your machine.
>>>
>>> Bye
>>> T.
>>>
>>>
>>>> Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
>>>> Von: "LawsonEnglish" <lenglish5(a)cox.net>
>>>> An: pharo-users(a)lists.pharo.org
>>>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>>
>>>> Torsten Bergmann wrote
>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>> You can load using
>>>>>
>>>>> Metacello new
>>>>> baseline: 'XMLParserHTML';
>>>>> repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
>>>>> load.
>>>>>
>>>>>
>>>>> Bye
>>>>> T.
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to use the sample code in the pharo screen scraping booklet
>>>> â
>>>> http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
>>>>
>>>> /| ingredientsXML |
>>>> ingredientsXML := XMLHTMLParser parseURL:
>>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>>>> ingredientsXML inspect/
>>>>
>>>> "#new was sent to nil"
>>>>
>>>> No matter what URL I use, I get the same message.
>>>>
>>>> I'm using Mac OS Catalina so I thought I might have some strange Mac
>>>> OS security issue (like it was quietly refusing to allow Pharo to
>>>> access the internet), but I tested with squeak and the old
>>>>
>>>> /html :=(HtmlParser parse:
>>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'
>>>> asUrl retrieveContents content)/
>>>>
>>>> and that returns actual html without any problems.
>>>>
>>>>
>>>> Suggestions?
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> L
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>>
>
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by LawsonEnglish
Thanks for responding. I wonât say that Iâm not screwing up as Iâve had severe health problems (impacting both physical and cognitive abilities to the point that I am permanently on US government disability).
Even so, I did the Squeak from the very start [https://www.youtube.com/playlist?list=PL6601A198DF14788D <https://www.youtube.com/playlist?list=PL6601A198DF14788D>] videos some years ago, and as far as I can tell, I can still understand Smalltalk and its features to that level.
The âdo it and goâ yields the same â#new was sent to nilâ error.
Note that âdo itâ doesnât give an error. âinspect doesâ â the â#new was sent to nilâ
As before,
ingredientsXML = nil.
returns âfalseâ
This could be a plugin issue in Mac Catalina as Apple has added all sorts of arcane security features with the new OS.
Or it just could be my literally crippled brain not seeing something obvious due to the fallout from my health issues.
I have no way of knowing (obviously)
Thanks for responding.
I had hoped to do new videos discussing the neat features of Pharo similar to the âvery startâ videos, but since I canât get things started, obviously I canât make new "from the very startâ videos either.
L
> On Jan 7, 2020, at 3:04 PM, PBKResearch <peter(a)pbkresearch.co.uk> wrote:
>
> I agree it makes no sense. I repeated exactly what you describe in a new playground (in Pharo 6.1 on Windows 10) and all worked as expected â essentially the same result as Torsten reported in his first post. I wonder if it might be something Mac related in the operation of Playground.
>
> As a desperate try to explain it, please see what happens if you open a Playground with just your single line
> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference%E2%…>
> and then select âdo it and goâ. You should find an inspector pane opening to the right in the Playground, with the result of the parse. If this fails, the standard suggestion is to open a debugger on you error message and try to work back through the stack to see how execution got there.
>
> Just to discourage you further, when you do get to read the contents of the URL, you will find that the USDA have changed everything. All the data are now on a separate web site, probably in a new layout. This is one of the perpetual hassles of web scraping â the web site authors have to justify their existence by rewriting everything. I wrote this section of the scraping booklet, working up something I had done as a one-off a year or so earlier, and then I found that the USDA had changed the layout in the interim and much needed to be rewritten.
>
> HTH â in part at least.
>
> Peter Kenny
>
> To Torsten â I agree I was slipshod in my drafting â I was in a hurry. Instead of saying âcan screw things upâ I should have said âcan produce counter-intuitive resultsâ, as exemplified by the fact that, in your first example, âingredientsXMLâ can mean different things depending on whether you execute it all in one go or a line at a time.
>
> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of LawsonEnglish
> Sent: 07 January 2020 20:55
> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>
> I deleted the playground and entered the text thusly
>
> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference%E2%…>.
>
> âdo itâ has no complaints
>
> ingredientsXML = nil
>
> yields âfalse"
>
> ingredientsXML inspect
>
> has errors: #new sent to nil
>
>
> .
>
> This makes no sense at all.
>
>
> L
>
>
>
>> On Jan 7, 2020, at 1:55 AM, PBKResearch <peter(a)pbkresearch.co.uk <mailto:peter@pbkresearch.co.uk>> wrote:
>>
>> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>>
>> HTH
>>
>> Peter Kenny
>>
>> -----Original Message-----
>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org <mailto:pharo-users-bounces@lists.pharo.org>> On Behalf Of Torsten Bergmann
>> Sent: 07 January 2020 07:47
>> To: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
>> Cc: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
>> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>
>> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>>
>> Just check the debugger and compare to the squeak version where you run in trouble.
>> Maybe the document could not be retrieved on your machine.
>>
>> Bye
>> T.
>>
>>
>>> Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
>>> Von: "LawsonEnglish" <lenglish5(a)cox.net <mailto:lenglish5@cox.net>>
>>> An: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
>>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>
>>> Torsten Bergmann wrote
>>>
>>>> Hi,
>>>>
>>>>
>>>> You can load using
>>>>
>>>> Metacello new
>>>> baseline: 'XMLParserHTML';
>>>> repository: 'github://pharo-contributions/XML-XMLParserHTML/src <github://pharo-contributions/XML-XMLParserHTML/src>';
>>>> load.
>>>>
>>>>
>>>> Bye
>>>> T.
>>>
>>> Hi,
>>>
>>> I'm trying to use the sample code in the pharo screen scraping booklet
>>> â
>>> http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf <http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf> â but while everything appears to load, I'm getting an odd behavior from:
>>>
>>> /| ingredientsXML |
>>> ingredientsXML := XMLHTMLParser parseURL:
>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference>'.
>>> ingredientsXML inspect/
>>>
>>> "#new was sent to nil"
>>>
>>> No matter what URL I use, I get the same message.
>>>
>>> I'm using Mac OS Catalina so I thought I might have some strange Mac
>>> OS security issue (like it was quietly refusing to allow Pharo to
>>> access the internet), but I tested with squeak and the old
>>>
>>> /html :=(HtmlParser parse:
>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference>'
>>> asUrl retrieveContents content)/
>>>
>>> and that returns actual html without any problems.
>>>
>>>
>>> Suggestions?
>>>
>>>
>>> Thanks.
>>>
>>> L
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by Sven Van Caekenberghe
Something is wrong in your image.
The XML package adds special GT inspector views, the error is probably there.
This has nothing to do with the platform.
BTW, a stack trace would be much appreciated, like:
ZeroDivide when doing: 1/0
SmallInteger>>/
UndefinedObject>>DoIt
OpalCompiler>>evaluate
RubSmalltalkEditor>>evaluate:andDo:
RubSmalltalkEditor>>highlightEvaluateAndDo:
[ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] in [ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...
RubEditingArea(RubAbstractTextArea)>>handleEdit:
[ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: in Block: [ textMorph textArea...
WorldState>>runStepMethodsIn:
WorldMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
WorldMorph>>doOneCycle
WorldMorph class>>doOneCycle
[ [ WorldMorph doOneCycle.
Processor yield.
false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess in Block: [ [ WorldMorph doOneCycle....
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self value....
You can copy that from the debugger extra menu (top right).
Try 'Basic Inspect It' instead of 'Inspect It', this will use an older less complex inspector, that will probably work.
> On 7 Jan 2020, at 23:06, LawsonEnglish <LEnglish5(a)cox.net> wrote:
>
> Well, as you can see in my response elsewhere, none of that actually works as you describe.
>
>> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>
> Doesnât raise any errors, with or without the local variable declaration.
>
>> ingredientsXML = nil returns false
>
>> ingredientsXML inspect
>
> Raises the message â#new on nil
>
> I âdo itâ on the entire text or on each line in the order entered. It doesnât matter.
>
> Iâm using a Mac with Mac OS X Catalina, using Pharo 7.
>
>
> L
>
>
>> On Jan 7, 2020, at 5:31 AM, Torsten Bergmann <astares(a)gmx.de> wrote:
>>
>> Agree with Peter - but "screw things up" means then the users screws up.
>>
>> Pharo and the Playground is working fine on them. But one has to know the difference when
>> working with the Playground:
>>
>> 1. If you evaluate with an explicit variable declaration than the variable is freshly defined and used like a temporary variable in a method:
>>
>> | ingredientsXML |
>> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>> ingredientsXML inspect
>>
>> You have to selected the full text and evaluate it (either with "do It" or "print it" to get the result.
>>
>> If you only select "ingredientsXML inspect" part first and evaluate then the variable "ingredientsXML" is not known, undefined
>> and uninitialized and therefore results in a nil.
>>
>> 2. If in the playground you do not give an explicit variable declaration at the beginning line like for example in
>>
>> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>> ingredientsXML inspect
>>
>> then a "workspace local variable" is implicitly created by the playground as soon as you evaluate which means
>>
>> - "ingredientsXML" is defined as a workspace variable as soon as you evaluate
>> - the contents of "ingredientsXML" is preserved over different evaluations within the workspace / playground
>> - you can use only "ingredientsXML" within this playground (not in another plaground)
>>
>> So you can evaluate the first line doing the assignment (this initializes the workspace variable "ingredientsXML" for the current playground)
>> and when you later want to use it again you can just inspect it or evaluate the second line in the same playground.
>>
>> If you like you can open a second playground which can have its own "ingredientsXML" workspace variable.
>>
>> Workspace variables (or "playground variables") are convenient for experimenting - as they are preserved - but
>> yes they might confuse you when you cant remember what was done with them last.
>>
>> Bye
>> T.
>>
>>> Gesendet: Dienstag, 07. Januar 2020 um 09:55 Uhr
>>> Von: "PBKResearch" <peter(a)pbkresearch.co.uk>
>>> An: "'Any question about pharo is welcome'" <pharo-users(a)lists.pharo.org>
>>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>
>>> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>>>
>>> HTH
>>>
>>> Peter Kenny
>>>
>>> -----Original Message-----
>>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of Torsten Bergmann
>>> Sent: 07 January 2020 07:47
>>> To: pharo-users(a)lists.pharo.org
>>> Cc: pharo-users(a)lists.pharo.org
>>> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>
>>> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>>>
>>> Just check the debugger and compare to the squeak version where you run in trouble.
>>> Maybe the document could not be retrieved on your machine.
>>>
>>> Bye
>>> T.
>>>
>>>> Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
>>>> Von: "LawsonEnglish" <lenglish5(a)cox.net>
>>>> An: pharo-users(a)lists.pharo.org
>>>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>>
>>>> Torsten Bergmann wrote
>>>>> Hi,
>>>>>
>>>>>
>>>>> You can load using
>>>>>
>>>>> Metacello new
>>>>> baseline: 'XMLParserHTML';
>>>>> repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
>>>>> load.
>>>>>
>>>>>
>>>>> Bye
>>>>> T.
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to use the sample code in the pharo screen scraping booklet
>>>> â
>>>> http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
>>>>
>>>> /| ingredientsXML |
>>>> ingredientsXML := XMLHTMLParser parseURL:
>>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>>>> ingredientsXML inspect/
>>>>
>>>> "#new was sent to nil"
>>>>
>>>> No matter what URL I use, I get the same message.
>>>>
>>>> I'm using Mac OS Catalina so I thought I might have some strange Mac
>>>> OS security issue (like it was quietly refusing to allow Pharo to
>>>> access the internet), but I tested with squeak and the old
>>>>
>>>> /html :=(HtmlParser parse:
>>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'
>>>> asUrl retrieveContents content)/
>>>>
>>>> and that returns actual html without any problems.
>>>>
>>>>
>>>> Suggestions?
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> L
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by LawsonEnglish
Well, as you can see in my response elsewhere, none of that actually works as you describe.
> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
Doesnât raise any errors, with or without the local variable declaration.
> ingredientsXML = nil returns false
> ingredientsXML inspect
Raises the message â#new on nil
I âdo itâ on the entire text or on each line in the order entered. It doesnât matter.
Iâm using a Mac with Mac OS X Catalina, using Pharo 7.
L
> On Jan 7, 2020, at 5:31 AM, Torsten Bergmann <astares(a)gmx.de> wrote:
>
> Agree with Peter - but "screw things up" means then the users screws up.
>
> Pharo and the Playground is working fine on them. But one has to know the difference when
> working with the Playground:
>
> 1. If you evaluate with an explicit variable declaration than the variable is freshly defined and used like a temporary variable in a method:
>
> | ingredientsXML |
> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
> ingredientsXML inspect
>
> You have to selected the full text and evaluate it (either with "do It" or "print it" to get the result.
>
> If you only select "ingredientsXML inspect" part first and evaluate then the variable "ingredientsXML" is not known, undefined
> and uninitialized and therefore results in a nil.
>
> 2. If in the playground you do not give an explicit variable declaration at the beginning line like for example in
>
> ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
> ingredientsXML inspect
>
> then a "workspace local variable" is implicitly created by the playground as soon as you evaluate which means
>
> - "ingredientsXML" is defined as a workspace variable as soon as you evaluate
> - the contents of "ingredientsXML" is preserved over different evaluations within the workspace / playground
> - you can use only "ingredientsXML" within this playground (not in another plaground)
>
> So you can evaluate the first line doing the assignment (this initializes the workspace variable "ingredientsXML" for the current playground)
> and when you later want to use it again you can just inspect it or evaluate the second line in the same playground.
>
> If you like you can open a second playground which can have its own "ingredientsXML" workspace variable.
>
> Workspace variables (or "playground variables") are convenient for experimenting - as they are preserved - but
> yes they might confuse you when you cant remember what was done with them last.
>
> Bye
> T.
>
>> Gesendet: Dienstag, 07. Januar 2020 um 09:55 Uhr
>> Von: "PBKResearch" <peter(a)pbkresearch.co.uk>
>> An: "'Any question about pharo is welcome'" <pharo-users(a)lists.pharo.org>
>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>
>> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>>
>> HTH
>>
>> Peter Kenny
>>
>> -----Original Message-----
>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of Torsten Bergmann
>> Sent: 07 January 2020 07:47
>> To: pharo-users(a)lists.pharo.org
>> Cc: pharo-users(a)lists.pharo.org
>> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>
>> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>>
>> Just check the debugger and compare to the squeak version where you run in trouble.
>> Maybe the document could not be retrieved on your machine.
>>
>> Bye
>> T.
>>
>>> Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
>>> Von: "LawsonEnglish" <lenglish5(a)cox.net>
>>> An: pharo-users(a)lists.pharo.org
>>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>>
>>> Torsten Bergmann wrote
>>>> Hi,
>>>>
>>>>
>>>> You can load using
>>>>
>>>> Metacello new
>>>> baseline: 'XMLParserHTML';
>>>> repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
>>>> load.
>>>>
>>>>
>>>> Bye
>>>> T.
>>>
>>> Hi,
>>>
>>> I'm trying to use the sample code in the pharo screen scraping booklet
>>> â
>>> http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
>>>
>>> /| ingredientsXML |
>>> ingredientsXML := XMLHTMLParser parseURL:
>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>>> ingredientsXML inspect/
>>>
>>> "#new was sent to nil"
>>>
>>> No matter what URL I use, I get the same message.
>>>
>>> I'm using Mac OS Catalina so I thought I might have some strange Mac
>>> OS security issue (like it was quietly refusing to allow Pharo to
>>> access the internet), but I tested with squeak and the old
>>>
>>> /html :=(HtmlParser parse:
>>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'
>>> asUrl retrieveContents content)/
>>>
>>> and that returns actual html without any problems.
>>>
>>>
>>> Suggestions?
>>>
>>>
>>> Thanks.
>>>
>>> L
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>>>
>>
>>
>>
>
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by PBKResearch
I agree it makes no sense. I repeated exactly what you describe in a new playground (in Pharo 6.1 on Windows 10) and all worked as expected â essentially the same result as Torsten reported in his first post. I wonder if it might be something Mac related in the operation of Playground.
As a desperate try to explain it, please see what happens if you open a Playground with just your single line
ingredientsXML := XMLHTMLParser parseURL: ' <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ> https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ
and then select âdo it and goâ. You should find an inspector pane opening to the right in the Playground, with the result of the parse. If this fails, the standard suggestion is to open a debugger on you error message and try to work back through the stack to see how execution got there.
Just to discourage you further, when you do get to read the contents of the URL, you will find that the USDA have changed everything. All the data are now on a separate web site, probably in a new layout. This is one of the perpetual hassles of web scraping â the web site authors have to justify their existence by rewriting everything. I wrote this section of the scraping booklet, working up something I had done as a one-off a year or so earlier, and then I found that the USDA had changed the layout in the interim and much needed to be rewritten.
HTH â in part at least.
Peter Kenny
To Torsten â I agree I was slipshod in my drafting â I was in a hurry. Instead of saying âcan screw things upâ I should have said âcan produce counter-intuitive resultsâ, as exemplified by the fact that, in your first example, âingredientsXMLâ can mean different things depending on whether you execute it all in one go or a line at a time.
From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of LawsonEnglish
Sent: 07 January 2020 20:55
To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
I deleted the playground and entered the text thusly
ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ> &ds=Standard+Referenceâ.
âdo itâ has no complaints
ingredientsXML = nil
yields âfalse"
ingredientsXML inspect
has errors: #new sent to nil
.
This makes no sense at all.
L
On Jan 7, 2020, at 1:55 AM, PBKResearch <peter(a)pbkresearch.co.uk <mailto:peter@pbkresearch.co.uk> > wrote:
It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
HTH
Peter Kenny
-----Original Message-----
From: Pharo-users <pharo-users-bounces(a)lists.pharo.org <mailto:pharo-users-bounces@lists.pharo.org> > On Behalf Of Torsten Bergmann
Sent: 07 January 2020 07:47
To: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
Cc: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
Just check the debugger and compare to the squeak version where you run in trouble.
Maybe the document could not be retrieved on your machine.
Bye
T.
Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
Von: "LawsonEnglish" <lenglish5(a)cox.net <mailto:lenglish5@cox.net> >
An: pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>
Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
Torsten Bergmann wrote
Hi,
You can load using
Metacello new
baseline: 'XMLParserHTML';
repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
load.
Bye
T.
Hi,
I'm trying to use the sample code in the pharo screen scraping booklet
â
http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
/| ingredientsXML |
ingredientsXML := XMLHTMLParser parseURL:
'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference> &ds=Standard+Reference'.
ingredientsXML inspect/
"#new was sent to nil"
No matter what URL I use, I get the same message.
I'm using Mac OS Catalina so I thought I might have some strange Mac
OS security issue (like it was quietly refusing to allow Pharo to
access the internet), but I tested with squeak and the old
/html :=(HtmlParser parse:
'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb <https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference> &ds=Standard+Reference'
asUrl retrieveContents content)/
and that returns actual html without any problems.
Suggestions?
Thanks.
L
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by LawsonEnglish
I deleted the playground and entered the text thusly
ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Referenceâ.
âdo itâ has no complaints
ingredientsXML = nil
yields âfalse"
ingredientsXML inspect
has errors: #new sent to nil
.
This makes no sense at all.
L
> On Jan 7, 2020, at 1:55 AM, PBKResearch <peter(a)pbkresearch.co.uk> wrote:
>
> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>
> HTH
>
> Peter Kenny
>
> -----Original Message-----
> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of Torsten Bergmann
> Sent: 07 January 2020 07:47
> To: pharo-users(a)lists.pharo.org
> Cc: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>
> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>
> Just check the debugger and compare to the squeak version where you run in trouble.
> Maybe the document could not be retrieved on your machine.
>
> Bye
> T.
>
>> Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
>> Von: "LawsonEnglish" <lenglish5(a)cox.net>
>> An: pharo-users(a)lists.pharo.org
>> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>>
>> Torsten Bergmann wrote
>>> Hi,
>>>
>>>
>>> You can load using
>>>
>>> Metacello new
>>> baseline: 'XMLParserHTML';
>>> repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
>>> load.
>>>
>>>
>>> Bye
>>> T.
>>
>> Hi,
>>
>> I'm trying to use the sample code in the pharo screen scraping booklet
>> â
>> http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
>>
>> /| ingredientsXML |
>> ingredientsXML := XMLHTMLParser parseURL:
>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
>> ingredientsXML inspect/
>>
>> "#new was sent to nil"
>>
>> No matter what URL I use, I get the same message.
>>
>> I'm using Mac OS Catalina so I thought I might have some strange Mac
>> OS security issue (like it was quietly refusing to allow Pharo to
>> access the internet), but I tested with squeak and the old
>>
>> /html :=(HtmlParser parse:
>> 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'
>> asUrl retrieveContents content)/
>>
>> and that returns actual html without any problems.
>>
>>
>> Suggestions?
>>
>>
>> Thanks.
>>
>> L
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
>
Jan. 7, 2020
Re: [Pharo-users] How can we celebrate the 50th anniversary of Smalltalk?
by Offray Vladimir Luna Cárdenas
On 6/01/20 3:18 a. m., Sven Van Caekenberghe wrote:
>
>> On 6 Jan 2020, at 06:11, Joachim Tuchel <jtuchel(a)objektfabrik.de> wrote:
>>
>> I personally celebrate Smalltalk every (working) day. I enjoy the fun and productivity each time I find a way to solve a problem at hand.
> Well said.
+1
Is my case too. Is a joyful celebratory experience that happens on a
common base.
I think that an "official" celebration date helps to get awareness, like
the Open Data Day [1] or the FLISoL[2], the biggest/oldest free/libre
software install fest in the world with 20+ countries in sync the same
day that we started ~15 years ago (but it lack of visibility, being done
mostly in the Global South :-/). Anyway, having a similar celebratory
event could help in this happy awareness for outsiders and insiders.
Something like the Smalltalk Fest, where no matter where you live, or
your variant of Smalltalk, we can celebrate together and raise the
awareness on the happy experience that we have day to day.
[1] https://opendataday.org/
[2] https://flisol.info/
Cheers,
Offray
Jan. 7, 2020
Re: [Pharo-users] [ANN] Phoedown - Markdown to HTML
by Offray Vladimir Luna Cárdenas
Hi,
Really interesting work.
I wonder if something similar could be done to bridge simdjson[1] with
Pharo/NeoJSON (and maybe a fast binary objects serializer) to read huge
JSON streams and files in seconds.
[1] https://github.com/lemire/simdjson
Thanks for this work :-),
Offray
On 1/01/20 4:40 a. m., Pierce Ng wrote:
> Hi all,
>
> I've published Phoedown, an FFI to hoedown, the standards compliant, fast, secure Markdown
> processing library written in C.
>
> - https://github.com/PierceNg/Phoedown
> - https://github.com/hoedown/hoedown
>
> A simple example:
>
> | md |
> md := (FileSystem memory / 'somefile.md')
> writeStreamDo: [ :ws |
> ws nextPutAll:
> '
> ```smalltalk
> Transcript show: ''Happy New Year!''; cr
> ```
> ' ];
> contents.
> HdHtmlRenderer new
> setMarkdownExtension: HdMarkdownExtensions FencedCode;
> setMarkdownExtension: HdMarkdownExtensions NoIntraEmphasis;
> render: md
>
> This is the output:
>
> <pre><code class="language-smalltalk">Transcript show: 'Happy New Year!'; cr
> </code></pre>
>
> Pierce
>
>
Jan. 7, 2020
Re: [Pharo-users] Code overview - or maybe not
by Kasper Ãsterbye
I fully planned to do something about this over Christmas, but alas, family
had other plans, and thanks for that.
Now however I got a working prototype of what I wanted to build:
https://github.com/kasperosterbye/PlantUMLDiagrams
The tools are intended as investigation tools. Similar or better tools
might be out there, but I mistook this to be a minor thing, and ended up
spending too much time on this.
And thanks to Christopher Fuhrman for the plantuml gizmo. I extracted a
minimal interface out of his code, which I have put up as a separate
project (https://github.com/kasperosterbye/PlantUMLBridge) simply because
it is such cool code, and I wanted to be able to do the minimal plantuml
integration possible without commitment to any pharo tooling.
Best,
Kasper
On 20 December 2019 at 21.30.00, Christopher Fuhrman (
christopher.fuhrman(a)etsmtl.ca) wrote:
Kasper,
There's a way to run PlantUML to process in a pipe (stdin/out) which gives
pretty good performance for rendering:
java -Djava.awt.headless=true -jar plantuml.jar -pipe -tsvg -charset UTF-8
It takes a PlantUML source as input and generates the format of the file
(e.g. SVG) on stdout. The VSCode extension called markdown-preview-enhanced
<https://github.com/shd101wyy/markdown-preview-enhanced> runs it this way.
Because of the pipe complexity (and the fact that your machine needs a JVM,
GraphViz and a properly configured path, etc.), I never tried to use it
this way in Pharo.
The markdown-preview-enhanced extension for VSCode does a lot of things
(too many?) but I think of pillar when I use it. It shows an HTML version
in real-time as you type, which includes PlantUML diagrams. You can use
pandoc to get to LaTeX/PDF as final output. I'm using it for my course
notes because of this, but also because it does reveal output (useful for
presenting), too. If I had a Mac, I would use pillar :) -- I struggled with
using it in Windows 10 with MikTeX (which I use very well with LyX).
If my memory serves me, Pavel K. and/or Julien D. had done a visitor in
Pharo that would generate PlantUML script from (moose?) (meta)models, but I
can't remember the precise details. I didn't aim for the sexy visitor
version when I did the Moose support because I wanted people to be able to
choose easily what classes to include in the diagram (because there's
usually some context for it to be useful). A list with classes inside a
hierarchy (the way we did it in Moose) seemed to be adequate. I'm pretty
sure you could make an intuitive browser (or reuse the current one) with
filters to select the classes for the diagram.
As for using UML to make diagrams, I also have toyed with the idea of
making an editor on top of PlantUMLs SVG, such that you could change the
source script intuitively. For example, if you don't want to see the 30+
messages a class supports, you can right click on the class in the SVG and
choose a "hide" option. Sadly, the SVG that is generated by PlantUML is
more for drawing (it was ported from the PNG code I think) and so things
like a bounding box of a class or the IDs for classes don't exist. Classes
are "drawn" as a rectangle for the title, a rectangle for the attributes,
etc. However, those are all things that could be coded back into PlantUML
(it's open source). SVG (in a modern browser at least) can be pretty
powerful.
These days, the only UML diagrams I "draw" are on whiteboards or an
electronic sketch pad (Surface pro). Pushing rectangles and lines around in
a graphics editor is something that only makes me anxious (I have used some
Visio templates a few years ago, but they're all now requiring too many
clicks when you're used to PlantUML). Plus, PlantUML also supports many
other formats (including DOT, just put @startdot/@enddot).
On Fri, 20 Dec 2019 at 14:31, Kasper Ãsterbye <kasper.osterbye(a)gmail.com>
wrote:
> On 20 December 2019 at 19.59.05, tbrunz (wild.ideas(a)gmail.com) wrote:
>
> What I would find useful (and what I think Kasper has started down the
> road
> to) is the ability to generate PlantUML script from a specified (set of)
> packages or classes in Pharo. That would make it easy not only to examine
> the design (in a more synoptic way -- something I've seen several other
> newcomers express an interest in), but also to embed diagrams in
> documentation such as PDFs & web pages.
>
> I expect that to be done over the hollidays. I expect to have a working
> copies of
>
> - Generate object diagram from a root (I will filter on category names and
> subclasses)
>
> - Generate a sequence diagram by analysing a MessageTally from a block.
> Filter on categories, subclasses and methods
>
> Short of that, and probably much easier to implement, is to just add
> PlantUML script to Pharo class comments as you write them -- but have a
> simple way to trigger the system to parse the comment and render the
> script
> into PlantUML diagrams. This could be in the form of opening a web browser
> in the host and having the diagram appear via the PlantUML server. But
> more
> useful perhaps would be to have it create PNG file(s) in the host
> filesystem
> (and open them).
>
> I have that working in my image. The
> https://github.com/kasperosterbye/PillarRichTextRender allow pillar to be
> used and rendered in class and package comments. Again, in my image I have
> an extension which allow the [[[ ⦠]]] syntax of pillar (and ```of github)
> to use a language called âplantumlâ, which renders the diagram in the
> documentation. I hope to package it all up over the holidays or early
> January. The same thing allow latex math to be rendered in those same
> comments.
>
> Best,
>
> Kasper
>
--
Christopher Fuhrman, P.Eng., PhD
*Professeur au Département de génie logiciel et des technologies de
l'information ÃTS (Ãcole de technologie supérieure)*
http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÃTS est une constituante de l'Université du Québec*
Jan. 7, 2020
Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
by Torsten Bergmann
Agree with Peter - but "screw things up" means then the users screws up.
Pharo and the Playground is working fine on them. But one has to know the difference when
working with the Playground:
1. If you evaluate with an explicit variable declaration than the variable is freshly defined and used like a temporary variable in a method:
| ingredientsXML |
ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
ingredientsXML inspect
You have to selected the full text and evaluate it (either with "do It" or "print it" to get the result.
If you only select "ingredientsXML inspect" part first and evaluate then the variable "ingredientsXML" is not known, undefined
and uninitialized and therefore results in a nil.
2. If in the playground you do not give an explicit variable declaration at the beginning line like for example in
ingredientsXML := XMLHTMLParser parseURL: 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
ingredientsXML inspect
then a "workspace local variable" is implicitly created by the playground as soon as you evaluate which means
- "ingredientsXML" is defined as a workspace variable as soon as you evaluate
- the contents of "ingredientsXML" is preserved over different evaluations within the workspace / playground
- you can use only "ingredientsXML" within this playground (not in another plaground)
So you can evaluate the first line doing the assignment (this initializes the workspace variable "ingredientsXML" for the current playground)
and when you later want to use it again you can just inspect it or evaluate the second line in the same playground.
If you like you can open a second playground which can have its own "ingredientsXML" workspace variable.
Workspace variables (or "playground variables") are convenient for experimenting - as they are preserved - but
yes they might confuse you when you cant remember what was done with them last.
Bye
T.
> Gesendet: Dienstag, 07. Januar 2020 um 09:55 Uhr
> Von: "PBKResearch" <peter(a)pbkresearch.co.uk>
> An: "'Any question about pharo is welcome'" <pharo-users(a)lists.pharo.org>
> Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>
> It may be a quirk of how Pharo Playground works. It doesn't need local variable declarations - which is convenient - but putting them in can screw things up. Try your snippet again without the first line. Compare Torsten's code.
>
> HTH
>
> Peter Kenny
>
> -----Original Message-----
> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of Torsten Bergmann
> Sent: 07 January 2020 07:47
> To: pharo-users(a)lists.pharo.org
> Cc: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
>
> Works without a problem (Pharo 8 on Windows), see attached. So it looks like a local problem.
>
> Just check the debugger and compare to the squeak version where you run in trouble.
> Maybe the document could not be retrieved on your machine.
>
> Bye
> T.
>
> > Gesendet: Dienstag, 07. Januar 2020 um 04:42 Uhr
> > Von: "LawsonEnglish" <lenglish5(a)cox.net>
> > An: pharo-users(a)lists.pharo.org
> > Betreff: Re: [Pharo-users] [ANN] XMLParserHTML moved to GitHub
> >
> > Torsten Bergmann wrote
> > > Hi,
> > >
> > >
> > > You can load using
> > >
> > > Metacello new
> > > baseline: 'XMLParserHTML';
> > > repository: 'github://pharo-contributions/XML-XMLParserHTML/src';
> > > load.
> > >
> > >
> > > Bye
> > > T.
> >
> > Hi,
> >
> > I'm trying to use the sample code in the pharo screen scraping booklet
> > â
> > http://books.pharo.org/booklet-Scraping/pdf/2018-09-02-scrapingbook.pdf â but while everything appears to load, I'm getting an odd behavior from:
> >
> > /| ingredientsXML |
> > ingredientsXML := XMLHTMLParser parseURL:
> > 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'.
> > ingredientsXML inspect/
> >
> > "#new was sent to nil"
> >
> > No matter what URL I use, I get the same message.
> >
> > I'm using Mac OS Catalina so I thought I might have some strange Mac
> > OS security issue (like it was quietly refusing to allow Pharo to
> > access the internet), but I tested with squeak and the old
> >
> > /html :=(HtmlParser parse:
> > 'https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference'
> > asUrl retrieveContents content)/
> >
> > and that returns actual html without any problems.
> >
> >
> > Suggestions?
> >
> >
> > Thanks.
> >
> > L
> >
> >
> >
> >
> > --
> > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> >
> >
>
>
>
Jan. 7, 2020