Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-26 Thread Tim Mackinnon
Hey Kasper - it looks like your GHMParser does exactly what I need, in that it 
parses the markdown spec I am looking at.

One question - GHMAbstractBlock has a children property - when would you expect 
that to be populated?

E.g. if the markdown was

# Header 1

Some text

## Header 2

More text

## Header 3

Other text


Would you expect Header2 and 3 to be children of Header1? And equally the text 
blocks to be children of the respective headers?

At the moment they are just represented as a flat list - which I can use, but I 
was curious of your thoughts on that children property with respect to 
headings. Digging a bit more, it seems that only Lists use children (maybe 
that’s right, but I always viewed markdown a bit like a structure document and 
hence the idea of sections having children too).


I’ll see how I get on, as this gives me a big leg up. If it does prove useful, 
might there be a possibility to either extract it into a separate project, or 
have a baseline group that just loads the parser?

Tim

> On 25 Mar 2020, at 19:46, Kasper Osterbye  wrote:
> 
> I do not think the PP2 is used in the github parser actually. The github 
> parser was just a addon to the rest of the stuff, and the pillar markdown 
> parser used PP2.
> 
> Anyways, if you have any questions, feel free to ask.
> 
> Best,
> 
> Kasper




Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-26 Thread Eric Gade
Hi Ramón,

I have a couple of questions. If you are using OSProcess in Pharo 8, how
are you installing it and from what repository? If I add the Squeaksource
version, I do not have the method that you are referencing.

Additionally, it would be good to see an example of this in OSSubprocess.
Using the latest Baseline installation instructions for it from Github, and
from reading the instructions, I don't see a clear way to do this. The
documentation claims that you can redirect the stdin to any file or
readstream, but the new ZnStreams in P7/P8 DNU on #isOssPipe and
StandardFileStream (for which OSSubprocess was designed, evidently) is
being deprecated.

If anyone reading has a good concise example of running a subprocess
command with input from a stream (or string), that would be very useful.
Thanks.

On Thu, Mar 26, 2020 at 5:24 PM Ramon Leon  wrote:

> On 2020-03-24 10:51 a.m., Tim Mackinnon wrote:
> > Hi guys - do we have a simple markdown parser that is reasonably up to
> date?
>
> What's wrong with the real markdown itself? I've used the original
> Markdown.pl implementation for years same as I would any other shell
> script, via OSProcess
>
> markdown: someContent
>^UnixProcess pipeString: someContent throughCommand: (FileDirectory
> default fullPathFor: 'Markdown.pl')
>
>
> --
> Ramón León
>
>
>

-- 
Eric


Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-26 Thread Ramon Leon

On 2020-03-24 10:51 a.m., Tim Mackinnon wrote:

Hi guys - do we have a simple markdown parser that is reasonably up to date?


What's wrong with the real markdown itself? I've used the original Markdown.pl 
implementation for years same as I would any other shell script, via OSProcess

markdown: someContent
  ^UnixProcess pipeString: someContent throughCommand: (FileDirectory default 
fullPathFor: 'Markdown.pl')


--
Ramón León




Re: [Pharo-users] [ANN] JRMPC Poll

2020-03-26 Thread horrido
I didn't ask them that, but I did provide the link to PBE. It was up to them
to learn any way they wish.

You can't mandate people to read PBE. You can lead a horse to water but you
can't make it drink.

PBE is not a good resource if you want to look up classes that you need for
your application. Just as you guys provide a quick reference for Pharo
syntax, you should provide a quick reference for the class library, too.
That would definitely ease the learning curve.

All programming languages rely on a "standard library" (in our case, a
standard class library). No self-respecting language would lack a standard
library reference, whether we're talking about C, C++, C#, Java, Python,
etc.  Even GNU Smalltalk understood this.
  



Richard O'Keefe wrote
> I am a little confused here.  I originally learned Smalltalk from the
> coloured books and
> then Inside Smalltalk.  When I got the chance to use Squeak, pretty
> much everything
> from those books carried over well enough for me to hit the ground
> running.  There are
> lots of free e-books about Smalltalk, not least Pharo By Example.  Had
> these people
> who were polled read PBE?
> 
> On Thu, 26 Mar 2020 at 04:49, horrido 

> horrido.hobbies@

>  wrote:
>>
>> This is what I provided the JRMPC participants: https://jrmpc.ca/ (see
>> "How
>> to learn Smalltalk programming"). I'm not sure how I could've done
>> better,
>> though.
>>
>> You make an excellent point about duplication and keeping documentation
>> up-to-date. However, there has to be some middle ground that makes it
>> easier
>> and more convenient for new developers to find the tools they need.
>> Perhaps
>> a synoptical reference showing the more common classes used, such as
>> collections, web-related classes, time-related classes, exception and
>> error
>> classes, file system-related classes, process-related classes, and so on.
>> These classes ought not to change much, if at all.
>>
>>
>>
>> Tim Mackinnon wrote
>> > Or we teach people to fish…? What’s the point of duplicating everything
>> > that’s already in the image anyway - we just need to be cleverer or
>> ensure
>> > that people know to look there and have the right onboarding experience
>> to
>> > do that? Otherwise its just another thing that gets out of date very
>> > rapidly and we already have enough problems with that.
>> >
>> > I’d be interested in what intro material Richard gave the students to
>> > start with (after all - he has quite a few tutorials of his own, some
>> of
>> > which I had followed - but I suspect they are out of date now
>> themselves).
>> > When you launch pharo there is the helpful welcome screen - did the
>> > student’s actually use it and follow what it says?
>> >
>> > And did we see any of them in this forum (or was that against the
>> rules?)
>> >
>> > Tim
>> >
>> >> On 24 Mar 2020, at 17:28, Ben Coman 
>>
>> > btc@
>>
>> >  wrote:
>> >>
>> >> Pharo has some good documentation, but its more lesson-based than a
>> >> library reference.
>> >> Those of us familiar with Pharo know the tricks to use the system
>> itself
>> >> as that reference, but I'd imagine this is an unfamiliar workflow for
>> >> newcomers.
>> >>
>> >> I have seen before a class library reference generated from the image,
>> >> but I couldn't put my hands on it right now.
>> >> @all, is it still being generated?. This might provide newcomers
>> >> something more familiar to work with.
>> >>
>> >> cheers -ben
>> >>
>> >> On Tue, 24 Mar 2020 at 03:00, Richard Kenneth Eng 
>>
>> > horrido.hobbies@
>>
>> >  mailto:
>>
>> > horrido.hobbies@
>>
>> > > wrote:
>> >> https://jrmpc.ca/2020/03/20/what-makes-learning-smalltalk-challenging/
>> >>
>> https://jrmpc.ca/2020/03/20/what-makes-learning-smalltalk-challenging/;
>> >>
>> >> FWIW, 95% of respondents pointed to the lack of reference
>> documentation
>> >> for the class library as the major obstacle to learning
>> Smalltalk/Pharo.
>> >>
>> >> Richard
>>
>>
>>
>>
>>
>> --
>> 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] [ANN] JRMPC Poll

2020-03-26 Thread Trygve Reenskaug
Could the class documentation you are looking for be generated 
automagically from the class comments? The first para could be a blurb 
describing the purpose of the class. The resulting document could be 
searchable.

--Trygve


On 26.03.2020 14:43, horrido wrote:

I didn't ask them that, but I did provide the link to PBE. It was up to them
to learn any way they wish.

You can't mandate people to read PBE. You can lead a horse to water but you
can't make it drink.

PBE is not a good resource if you want to look up classes that you need for
your application. Just as you guys provide a quick reference for Pharo
syntax, you should provide a quick reference for the class library, too.
That would definitely ease the learning curve.

All programming languages rely on a "standard library" (in our case, a
standard class library). No self-respecting language would lack a standard
library reference, whether we're talking about C, C++, C#, Java, Python,
etc.  Even GNU Smalltalk understood this.




Richard O'Keefe wrote

I am a little confused here.  I originally learned Smalltalk from the
coloured books and
then Inside Smalltalk.  When I got the chance to use Squeak, pretty
much everything
from those books carried over well enough for me to hit the ground
running.  There are
lots of free e-books about Smalltalk, not least Pharo By Example.  Had
these people
who were polled read PBE?

On Thu, 26 Mar 2020 at 04:49, horrido 
horrido.hobbies@
 wrote:

This is what I provided the JRMPC participants: https://jrmpc.ca/ (see
"How
to learn Smalltalk programming"). I'm not sure how I could've done
better,
though.

You make an excellent point about duplication and keeping documentation
up-to-date. However, there has to be some middle ground that makes it
easier
and more convenient for new developers to find the tools they need.
Perhaps
a synoptical reference showing the more common classes used, such as
collections, web-related classes, time-related classes, exception and
error
classes, file system-related classes, process-related classes, and so on.
These classes ought not to change much, if at all.



Tim Mackinnon wrote

Or we teach people to fish…? What’s the point of duplicating everything
that’s already in the image anyway - we just need to be cleverer or

ensure

that people know to look there and have the right onboarding experience

to

do that? Otherwise its just another thing that gets out of date very
rapidly and we already have enough problems with that.

I’d be interested in what intro material Richard gave the students to
start with (after all - he has quite a few tutorials of his own, some

of

which I had followed - but I suspect they are out of date now

themselves).

When you launch pharo there is the helpful welcome screen - did the
student’s actually use it and follow what it says?

And did we see any of them in this forum (or was that against the

rules?)

Tim


On 24 Mar 2020, at 17:28, Ben Coman 

btc@
 wrote:

Pharo has some good documentation, but its more lesson-based than a
library reference.
Those of us familiar with Pharo know the tricks to use the system

itself

as that reference, but I'd imagine this is an unfamiliar workflow for
newcomers.

I have seen before a class library reference generated from the image,
but I couldn't put my hands on it right now.
@all, is it still being generated?. This might provide newcomers
something more familiar to work with.

cheers -ben

On Tue, 24 Mar 2020 at 03:00, Richard Kenneth Eng 

horrido.hobbies@
  mailto:
horrido.hobbies@
> wrote:

https://jrmpc.ca/2020/03/20/what-makes-learning-smalltalk-challenging/


https://jrmpc.ca/2020/03/20/what-makes-learning-smalltalk-challenging/;

FWIW, 95% of respondents pointed to the lack of reference

documentation

for the class library as the major obstacle to learning

Smalltalk/Pharo.

Richard





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






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



--

/The essence of object orientation is that objects collaborateto achieve 
a goal. /

Trygve Reenskaug mailto: tryg...@ifi.uio.no 
Morgedalsvn. 5A http://folk.uio.no/trygver/
N-0378 Oslo http://fullOO.info
Norway Tel: (+47) 22 49 57 27