Re: [Pharo-users] [Glass] Webminar about VA Smalltalk new OS Process Framework

2020-06-30 Thread Damien Pollet
Will this be recorded for watching later ? Maybe posted to youtube ?

On Tue, 30 Jun 2020 at 15:25, Mariano Martinez Peck via Glass <
gl...@lists.gemtalksystems.com> wrote:

> Greetings all,
>
> Some time ago, I had the pleasure and privilege of being sponsored by the
> Pharo Consortium to implement OSSubprocess. Because of that work, I quickly
> realized that a new OS process framework created by Instantiations was
> quite advanced and unlike anything I had seen before.  If you are able, I
> would highly recommend that you attend the technology preview of this
> framework coming to VAST 2021:
>
> Seth Berman will be presenting, registration here:
> https://attendee.gotowebinar.com/register/7491754880594201356
>
> We hope the community can attend and we look forward to your feedback and
> questions during the event's Q session.
>
> Best regards,
>
> --
> Mariano Martinez Peck
> Email: marianop...@gmail.com
> Twitter: @MartinezPeck
> LinkedIn: www.linkedin.com/in/mariano-martinez-peck
> <https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/>
> Blog: https://marianopeck.wordpress.com/
> ___
> Glass mailing list
> gl...@lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
>


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] [Pharo-dev] [ANN] New Headless VM (Still Alpha, but getting better)

2020-02-03 Thread Damien Pollet
just tried it (from get.pharo.org/64/vmHeadlessLatest90), but the VM I get
says this:
./pharo --version
Pharo 8.2.0 built on Dec 25 2019 …

On Tue, 28 Jan 2020 at 10:35, teso...@gmail.com  wrote:

> A new version of the headless VM is available.
>
> It can be downloaded from:
>
>
> https://files.pharo.org/vm/pharo-spur64-headless/win/PharoVM-8.3.0-b612fd5f-win64-bin.zip
>
> https://files.pharo.org/vm/pharo-spur64-headless/linux/PharoVM-8.3.0-b612fd5-linux64-bin.zip
>
> https://files.pharo.org/vm/pharo-spur64-headless/mac/PharoVM-8.3.0-b612fd5-mac64-bin.zip
>
> Or more easily using ZeroConf:
>
> With the image
> $ wget -O - get.pharo.org/64/90+vmHeadlessLatest | bash
>
> Without
> $ wget -O - get.pharo.org/64/vmHeadlessLatest90 | bash
>
> This new version has a series of bugfixes and the following features:
>
> - Update TFFI to v1.2.0: Allowing better marshaling and callbacks from
> outside threads.
> - Update README.md
> - Add instructions on how to create a vmmaker image.
> - Fixing UnixOSProcessPlugin
> - Redefinition of squeakFileOffset
> - Generating include files as an artifact
> - Adding a configurable strategy for reading / writing the image
> - Building using Musl Libc
> - A cleaner implementation of the print to stdout and file.
> - OSX File Dialog
> - OSX icon customization
> - OSX customization for apps.
> - Adding build on GitHub actions
>
> I will like to thank all the contributors specially Guille, Esteban,
> Ronnie. And also, Feenk and Schmidt that they are using it, reporting
> issues and contributing.
>
> Just a friendly reminder, if you want to contribute, you are always
> welcome!!
>
> https://github.com/pharo-project/opensmalltalk-vm
>
> Cheers,
> Pablo
>
> --
> Pablo Tesone.
> teso...@gmail.com
>
>

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] [Pharo-dev] About Iceberg

2019-02-19 Thread Damien Pollet


On Tue, 19 Feb 2019 at 10:06, Hilaire  wrote:

> I join your thank you note, although I only use one half, the tonel
> part, it is pleasant to be able to commit to file base repository and
> use related tools.
>
> Le 19/02/2019 à 09:50, Sven Van Caekenberghe a écrit :
> > This is a thank you note about Iceberg.
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>
>

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] Sending a message to pharo from commandline

2018-12-26 Thread Damien Pollet
Hi Steve,

Have a look at Clap:

https://github.com/cdlm/clap-st
https://speakerdeck.com/cdlm/clap-esug-2018

Coral was a nice idea but tried to be too many things at once (scripting
syntax ≠ commandline API); in contrast, Clap is only about defining
commandline APIs for Pharo code. Feel free to send questions & feedback my
way, too :-)

On Tue, 25 Dec 2018 at 19:46, Steve Quezadas  wrote:

> What happened to the pharo commandline "eval" function?
>
> Does anyone know what happened to the pharo "eval" function on the
> comnandline? It seems to have disappeared in the newer versions. The
> Coral thing also seems to be abandoned as the readme is no longer there:
> http://smalltalkhub.com/#!/~PharoExtras/Coral
>
> Is there any way to send messages to pharo from commandline? Sometimes I
> write an object in pharo and it can be useful to use if I am runing a
> linux shell. Sometimes I have a bash script or something that needs an
> answer from pharo.
>
> - Steve
>
>
>


Re: [Pharo-users] Deprecation rewrite introduces infinite recursion… how to prevent that?

2018-08-13 Thread Damien Pollet
Turns out it was pretty easy to implement:
https://github.com/pharo-project/pharo/pull/1683

On Sat, 11 Aug 2018 at 15:59, Damien Pollet  wrote:

> I have a double-dispatch chain:
> x generic: y → y firstDispatch: x → x secondDispatchFromY: y
>
> However this has been added after the fact, so there are direct uses of
> the secondDispatchFromY:  layer, which I'd like to deprecate/rewrite to use
> the generic: one. But if I do so, the intermediate firstDispatch: gets
> rewritten in the process, and this results in an infinite recursion.
>
> Is there a way to formulate the rewrite rule to avoid that?
>
> I could make a whole new set of secondDispatchFromYbis: methods, change
> the firstDispatch: ones to use those, and then the rewrite would be ok, but
> it seems like a lot of noise in the code for a small deprecation…
>
> Thinking of it, this is not really a deprecation, more like an advice on
> proper use…
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


[Pharo-users] Deprecation rewrite introduces infinite recursion… how to prevent that?

2018-08-11 Thread Damien Pollet
I have a double-dispatch chain:
x generic: y → y firstDispatch: x → x secondDispatchFromY: y

However this has been added after the fact, so there are direct uses of
the secondDispatchFromY:  layer, which I'd like to deprecate/rewrite to use
the generic: one. But if I do so, the intermediate firstDispatch: gets
rewritten in the process, and this results in an infinite recursion.

Is there a way to formulate the rewrite rule to avoid that?

I could make a whole new set of secondDispatchFromYbis: methods, change the
firstDispatch: ones to use those, and then the rewrite would be ok, but it
seems like a lot of noise in the code for a small deprecation…

Thinking of it, this is not really a deprecation, more like an advice on
proper use…

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] BS Web and Pharo

2018-08-03 Thread Damien Pollet
On Thu, 2 Aug 2018 at 18:15, Tim Mackinnon  wrote:

>  the constant pestering to sign up for the Pharo newsletter.
>

which pestering, where ? :confused:


Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-31 Thread Damien Pollet
Hi Sven… a couple questions:

- is there a preferred order of composition between the encoding and
buffering streams ? If yes, it the same for read and write stream, or
reversed ?
E.g. if Stdio binaryStdin was implemented, Stdio stdin should be decoded,
but buffering it as well would be a problem for interactive applications.

- what's your opinion on convenience composition messages, e.g.
aBinaryStream buffered decoded: 'utf-8' ?



On Tue, 24 Jul 2018 at 10:13, Sven Van Caekenberghe  wrote:

>
>
> > On 23 Jul 2018, at 12:07, Sven Van Caekenberghe  wrote:
> >
> > Stdio stdout and friends just return a binary stream, hence they need
> wrapping for encoding.
> >
> > Maybe
> >
> >  Stdio stdoutAsText
> >
> > might be an idea, but this is so uncommon that I am not sure this is a
> good idea.
>
> Given all remarks and comments (thanks BTW), I now think that
>
> - textual stdio streams are the more common case
> - binary stdio streams are the primitive ones that are seldom used
> - another encoding than UTF-8 seems uncommon
> - these are streams that exist and need no real opening/closing
>
> So,
>
>   Stdio stdout
>
> should return return a character write stream with UTF-8 encoding while
>
>   Stdio binaryStdout
>
> should be the lower level binary one.
> This would be more in line with the other streams.
> A non-UTF-8 encoding can be used as per Pavel's example.
>


Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread Damien Pollet
On Wed, 25 Jul 2018 at 13:48, Sven Van Caekenberghe  wrote:

> > On 25 Jul 2018, at 13:39, Damien Pollet 
> wrote:
> > Related issue: command line arguments come from VM system attributes as
> ByteStrings… and thus interpreted as iso-8859-1, which is incorrect in most
> cases nowadays, even though it seems to work as long as you only use ASCII.
> Decoding them is easy enough, but it requires two copies (asByteString
> utf8Decoded)
>
> Yes this is a really big issue. Anything coming in as command line arg or
> environment variable (or clipboard) is in a basically unknown OS determined
> encoding. I would assume/hope the UTF-8 is the sensible default today, but
> apparently not. And it is hard to find a cross platform solution.
>

My point here was that it would make more sense for those to be passed into
the image as ByteArrays, revealing the fact that their encoding is unknown.
Currently the bytes are correct, but since they've been shoved into
ByteStrings by the VM, the characters will be wrong unless your system
happens to be using Latin 1.

I suppose we can either have a setting for decoding (since it's pretty much
arbitrary), or heuristics like checking LC_CTYPE or whatever. Pablo
mentioned the Locale class, but it doesn't seem to detect anything correct
from the environment.


Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread Damien Pollet
On Tue, 24 Jul 2018 at 11:39, Alistair Grant  wrote:

> > On 23 Jul 2018, at 12:07, Sven Van Caekenberghe  wrote:
>> So,
>>
>>   Stdio stdout
>>
>> should return return a character write stream with UTF-8 encoding while
>>
>>   Stdio binaryStdout
>>
>> should be the lower level binary one.
>> This would be more in line with the other streams.
>> A non-UTF-8 encoding can be used as per Pavel's example.
>>
>
> +1
>
> I didn't suggest this earlier because it isn't backward compatible.  But I
> do think it is the better solution.
>

+2

I had a look at Stdio recently for Clap. The current implementation with
Stdio stdout returning the binary stream is a bit confusing, but at least
you can wrap it.
The above proposition with an explicit binaryStdout for the lower level
uncommon case would be much clearer indeed.

Related issue: command line arguments come from VM system attributes as
ByteStrings… and thus interpreted as iso-8859-1, which is incorrect in most
cases nowadays, even though it seems to work as long as you only use ASCII.
Decoding them is easy enough, but it requires two copies (asByteString
utf8Decoded)


Re: [Pharo-users] [Pharo-dev] Which command-line handlers do you use most?

2018-07-10 Thread Damien Pollet
On Mon, 9 Jul 2018 at 18:48, Sven Van Caekenberghe  wrote:

> Most used: eval, config, st (default to run script.st)
>

Do you ever use the metacello one instead of config?


> Please make sure to stay as compatible as possible, lots of CI and server
> deploy/run code depends on it.
>

I intend to provide similar features and a path for migrating with minimal
headaches, but there are several idiosyncrasies that I hope to get rid of
as well.
I guess the big users of deploy/run code will come see me at ESUG and we
can see what's best ;-)

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


[Pharo-users] Which command-line handlers do you use most?

2018-07-09 Thread Damien Pollet
Hi all,

I'm starting to port / reimplement existing command line handlers using
Clap. There's a dozen, but I wonder which ones are the most relied upon,
because it's a good opportunity for refactoring the command line API as a
whole and simplifying it or at least making it more orthogonal.

For instance I discovered there is a "perform" command, which is sort of
redundant with the "eval" one. Similarly there are both a "configuration"
and a "metacello" handlers which seem to have the same exact purpose…

Since Clap can exist besides the current command-line handlers, we can have
a deprecation  period to minimize breakage and leave time for people to
adapt before we kill old command line handlers for real.

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Damien Pollet
On Tue, 3 Jul 2018 at 11:36, Sven Van Caekenberghe  wrote:

> Most probably this idea of functional composition has been discussed
> before ...
>

Transducers (aka. Reducers) come to mind…


Re: [Pharo-users] SmalltalkCI now supports loading tonel-based projects

2018-04-18 Thread Damien Pollet
I can confirm coverage is back. I think the drop is at least partly due to
the changes I did while it was broken.

However the Pharo 7 builds seem to be broken now, with what looks like a
libgit issue… https://travis-ci.org/cdlm/clap-st

On 18 April 2018 at 13:24, Gabriel Cotelli  wrote:

> Hi,
> We managed to implement the coveralls support for Tonel based repos, and
> fixed the problem loading dependencies in Tonel format (by enabling the
> Iceberg-Metacello integration).
>
> So feel free to test it and report any problem detected (it's now merged
> in smalltalkCI/master).
>
> By now the only open issue we known is: https://github.com/pharo-vcs/
> iceberg/issues/643.
>
> Regards,
> Gabriel
>
>
> On Sat, Apr 7, 2018 at 6:28 AM, Peter Uhnák  wrote:
>
>> Hi,
>>
>> SmalltalkCI now supports loading tonel-based projects, so feel free to
>> start using it.
>>
>> The configuration is still the same.
>>
>> Please note that coveralls support for tonel is not yet in place, but
>> that's just a cherry on top. :-)
>>
>> Cheers,
>> Peter
>>
>
>


Re: [Pharo-users] Porting Transducers to Pharo

2018-03-21 Thread Damien Pollet
I think I used FileOut30 and encodings were part of the adhoc fixing before
loading into Pharo (using iconv certainly, but I don't recall)

On 21 March 2018 at 14:29, Esteban A. Maringolo 
wrote:

> Hi Steffen,
>
> 2017-06-06 7:44 GMT-03:00 Steffen Märcker :
> > I assumed so. I used file-outs only to get something working quickly. =)
> > Properly published code will follow as soon as I am more familiar with
> code
> > management in Pharo.
>
> I'm coming back to this. What was the choosen tool? I tried
> FileOuterNG but it doesn't work in VW PUL 8.2, and I don't understand
> the reasoning behind the "bindings" mappings (it fails when building
> the default mappings).
>
> The FileOut30 package doesn't seem to respect encodings at all.
>
> Thanks!
>
> Esteban A. Maringolo
>
>


Re: [Pharo-users] inquiring question about ifTrue: implementation

2018-03-19 Thread Damien Pollet
On 19 March 2018 at 13:40, Petr Fischer  wrote:

> > How would you define the semantics of
> >
> > 123 ifTrue: [ ... ]
>
> 123 is not "true", so, ignore the block.
>

What anout 123 ifFalse: [ … ], then, given that 123 is not false either?


Re: [Pharo-users] The Spec UI Framework. first translation to korean finish.

2017-08-29 Thread Damien Pollet
On 28 August 2017 at 06:34, peter yoo  wrote:

> 1. failed to compile the SPEC UI Framework. Xetex would have caught the
> error, but I do not know about luatex.
> 2. I am using texlive 2017 with gentoo linux.


Can you send me a copy of the error you are getting ?
The English version should build fine on TeXlive 2017; however it might be
that you're missing some packages or fonts, especially if you installed
texlive from gentoo packages (maybe gentoo is different there, but Ubuntu
requires optional packages to obtain a reasonably complete TeXlive.

If it fails when you start including korean text in the book, then that's
not entirely surprising. It could fail either at the pillar stage, or
during the LaTeX compilation. Can you send us a copy of the compilation
failure you are getting?


> 3. In Korea, when making a book, in most cases it is using an oblivior
> that has developed a memoir.
>

What do you mean by "oblivior"? What you meant has been lost in
translation… are you talking about the memoir class from LaTeX ?


> 4. In most cases, TeX is used to specify the font in consideration of the
> CJK environment.
>

The books and booklets are based on https://github.com/cdlm/sbabook, which
is a custom LaTeX class I wrote based on memoir.cls. Mostly it defines the
typographic design and a few convenience commands and environments.

It's certainly possible to make a few changes so that supports CJK. However
I never used the CJK stuff in TeXlive, and I'm clueless about Korean
typography etc, so it might lead to funny results… :) Anyway I will do some
tests when I get the time.

If you set some basics, I will join you in the future. However, I do not
> know smacc, pillar, etc.
>

Ideally, you would write the translated-book using Pillar, in the same way
we maintain the original in English, just in a branch or in a separate
github repo. Editing the book directly in LaTeX is possible but then it
means we can't compile it in web form…

Cheers


Re: [Pharo-users] Dark Mode

2017-08-26 Thread Damien Pollet
Sure it is… AFAIK the light theme is still available in the settings

On 27 August 2017 at 00:40, horrido  wrote:

> I found this  interesting article
>  for-people-like-molly-watt-ae9fdc38479f>
> . I wanted to express my opinion...
>
> Dark mode looks cool and all, but it does have a downside. I was very happy
> with the normal Pharo 5.0 look, but when Pharo 6.0 came out with its dark
> theme, I was rather put off by it. For me, at least, the dark theme makes
> it
> harder to read the text. Too bad Pharo isn't themable.
>
>
>
> --
> View this message in context: http://forum.world.st/Dark-
> Mode-tp4964409.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Compiling documents with Pillar

2017-07-24 Thread Damien Pollet
Docker provides a working and sufficiently complete TeX installation which
is used on Travis to build the most recent books (e..g the booklets with
the blue cover plus a couple other ones). But the build itself relies on
makefiles, templates etc. Pillar is only one step in that process.

Currently I'd advise checking the books from
https://github.com/SquareBracketAssociates that have recent changes and a
successful build on Travis, and checking their build process. The build
process has evolved this last spring, so it might differ from books that
were not updated recently.

Other than that Stef and I are probably the most able to mentor someone
about Pillar, unfortunately we're currently both on holidays for a couple
of weeks.

On 24 July 2017 at 09:25, p...@highoctane.be  wrote:

> You do it with Docker.
>
> Check:
>
> https://github.com/cdlm/docker-texlive
>
> and
>
> https://docs.docker.com/docker-for-windows/
>
> Phil
>
> On Sun, Jul 23, 2017 at 8:29 PM, Myroslava Romaniuk 
> wrote:
>
>> Hi,
>>
>> how do I compile a document using Pillar if I want to get a PDF? I tried
>> googling but didn't get anything helpful. Btw I'm using Windows.
>>
>> Thanks,
>> Myroslava
>>
>
>


Re: [Pharo-users] Porting Transducers to Pharo

2017-06-14 Thread Damien Pollet
On 14 June 2017 at 17:21, Steffen Märcker  wrote:

> I played a bit with Iceberg in Pharo, managed to check out the repository,
> and load Transducers-Core. As a bit of a surprise, multiple packages show
> up in the SystemBrowser; one for each method category, e.g.,
> Transducers-accessing and Transducers-class initialization. Is this
> expected? Maybe I am just missing something obvious here since I am not
> familiar with the tools.
>

Looks like a bug… not sure if I've seen this one being discussed recently
or if it's a new one, though.


> Did you rename the main package from Transducers to Transducers-Core for a
> special reason? And is it a convention in Pharo to use the dash '-' instead
> of space to separate parts of a package name?
>

Yes, that's the Pharo naming convention.


Re: [Pharo-users] Porting Transducers to Pharo

2017-06-07 Thread Damien Pollet
I wouldn't bother with SmalltalkHub at this point. Check Iceberg, it's the
future: https://github.com/pharo-vcs/iceberg/

On 7 June 2017 at 11:29, Steffen Märcker  wrote:

> Hi Phil,
>
> that's great. I do have a GitHub account (merkste) but none at
> SmalltalkHub. Is there a recommendable doc on how to use Git from Pharo?
>
> Best, Steffen
>
>
>
>
> Am .06.2017, 14:09 Uhr, schrieb p...@highoctane.be :
>
> Hi Steffen,
>>
>> I am willing to help you create the package in SmalltalkHub or Github
>> based
>> on your files/changeset.
>>
>> Do you have a github and/or SmalltalkHub account?
>>
>> Best,
>> Phil
>>
>>
>> On Tue, Jun 6, 2017 at 1:08 PM, Steffen Märcker  wrote:
>>
>> Hi!
>>>
>>> If the need arises, we could of course factor the compact notation out
>>> into
>>>
 a separate package.
>
> Good idea
 [...] I do not want to help promoting a syntax that alienates me (and
 others because other people reported the saem to me).


>>> I understand. Btw, I'd really, really appreciate if others post their
>>> thoughts and feedback here as well. Discussion helps moving things
>>> forward.
>>> =)
>>>
>>>
>>>   (collection transduce map: #squared) take: 1000.
>>>

>
 To me this is much more readable.


>>> Well, I'll provide that extension once it is finished.
>>>
>>> I cannot and do not want to use the other forms.
>>>


>>>
>>>   collection transduce
>>>
map: #squared;
>take: 1000.
>
> But as the message chain has to modify the underlying object
> (an eduction), very snaky side effects my occur. E.g., consider
>
>   eduction := collection transduce.
>   squared  := eduction map: #squared.
>   take := squared take: 1000.
>
> Now, all three variables hold onto the same object, which first squares
> all elements and than takes the first 1000.
>
>
 This is because the programmer did not understand what he did. No?


>>> Sure. ;-) Nevertheless, it would be very hard to debug. All of which are
>>> the reasons I wouldn't implement that variant. ;-)
>>>
>>>
>>> PS: I played with infinite stream and iteration back in 1993 in CLOS.
>>>
 Now I do not like to mix things because it breaks my flow of thinking.


>>>
>>> I am not sure whether I understand what your mean by mixing. Concerning
>>> transducers, the ability to handle infinite sources in only a (natural)
>>> side-effect of the ability to finish reductions before all elements are
>>> processed, e.g., like #detect: and such.
>>>
>>> Best, Steffen
>>>
>>>
>>>
>>>
>>>
>>>
>


Re: [Pharo-users] Porting Transducers to Pharo

2017-06-02 Thread Damien Pollet
If I recall correctly, there is an alternate protocol that looks more like
xtreams or the traditional select/collect iterations.

On 2 June 2017 at 21:12, Stephane Ducasse  wrote:

> I have a design question
>
> why the library is implemented in functional style vs messages?
> I do not see why this is needed. To my eyes the compact notation
> goes against readibility of code and it feels ad-hoc in Smalltalk.
>
>
> I really prefer
>
> square := Map function: #squared.
> take := Take number: 1000.
>
> Because I know that I can read it and understand it.
> From that perspective I prefer Xtreams.
>
> Stef
>
>
>
>
>
>
>
>
>
> On Wed, May 31, 2017 at 2:23 PM, Steffen Märcker  wrote:
>
>> Hi,
>>
>> I am the developer of the library 'Transducers' for VisualWorks. It was
>> formerly known as 'Reducers', but this name was a poor choice. I'd like to
>> port it to Pharo, if there is any interest on your side. I hope to learn
>> more about Pharo in this process, since I am mainly a VW guy. And most
>> likely, I will come up with a bunch of questions. :-)
>>
>> Meanwhile, I'll cross-post the introduction from VWnc below. I'd be very
>> happy to hear your optinions, questions and I hope we can start a fruitful
>> discussion - even if there is not Pharo port yet.
>>
>> Best, Steffen
>>
>>
>>
>> Transducers are building blocks that encapsulate how to process elements
>> of a data sequence independently of the underlying input and output
>> source.
>>
>>
>>
>> # Overview
>>
>> ## Encapsulate
>> Implementations of enumeration methods, such as #collect:, have the logic
>> how to process a single element in common.
>> However, that logic is reimplemented each and every time. Transducers make
>> it explicit and facilitate re-use and coherent behavior.
>> For example:
>> - #collect: requires mapping: (aBlock1 map)
>> - #select: requires filtering: (aBlock2 filter)
>>
>>
>> ## Compose
>> In practice, algorithms often require multiple processing steps, e.g.,
>> mapping only a filtered set of elements.
>> Transducers are inherently composable, and hereby, allow to make the
>> combination of steps explicit.
>> Since transducers do not build intermediate collections, their composition
>> is memory-efficient.
>> For example:
>> - (aBlock1 filter) * (aBlock2 map)   "(1.) filter and (2.) map elements"
>>
>>
>> ## Re-Use
>> Transducers are decoupled from the input and output sources, and hence,
>> they can be reused in different contexts.
>> For example:
>> - enumeration of collections
>> - processing of streams
>> - communicating via channels
>>
>>
>>
>> # Usage by Example
>>
>> We build a coin flipping experiment and count the occurrence of heads and
>> tails.
>>
>> First, we associate random numbers with the sides of a coin.
>>
>> scale := [:x | (x * 2 + 1) floor] map.
>> sides := #(heads tails) replace.
>>
>> Scale is a transducer that maps numbers x between 0 and 1 to 1 and 2.
>> Sides is a transducer that replaces the numbers with heads an tails by
>> lookup in an array.
>> Next, we choose a number of samples.
>>
>> count := 1000 take.
>>
>> Count is a transducer that takes 1000 elements from a source.
>> We keep track of the occurrences of heads an tails using a bag.
>>
>> collect := [:bag :c | bag add: c; yourself].
>>
>> Collect is binary block (reducing function) that collects events in a bag.
>> We assemble the experiment by transforming the block using the
>> transducers.
>>
>> experiment := (scale * sides * count) transform: collect.
>>
>>   From left to right we see the steps involved: scale, sides, count and
>> collect.
>> Transforming assembles these steps into a binary block (reducing function)
>> we can use to run the experiment.
>>
>> samples := Random new
>>   reduce: experiment
>>   init: Bag new.
>>
>> Here, we use #reduce:init:, which is mostly similar to #inject:into:.
>> To execute a transformation and a reduction together, we can use
>> #transduce:reduce:init:.
>>
>> samples := Random new
>>   transduce: scale * sides * count
>>   reduce: collect
>>   init: Bag new.
>>
>> We can also express the experiment as data-flow using #<~.
>> This enables us to build objects that can be re-used in other experiments.
>>
>> coin := sides <~ scale <~ Random new.
>> flip := Bag <~ count.
>>
>> Coin is an eduction, i.e., it binds transducers to a source and
>> understands #reduce:init: among others.
>> Flip is a transformed reduction, i.e., it binds transducers to a reducing
>> function and an initial value.
>> By sending #<~, we draw further samples from flipping the coin.
>>
>> samples := flip <~ coin.
>>
>> This yields a new Bag with another 1000 samples.
>>
>>
>>
>> # Basic Concepts
>>
>> ## Reducing Functions
>>
>> A reducing function represents a single step in processing a data
>> sequence.
>> It takes an accumulated result and a value, and returns a new 

Re: [Pharo-users] Porting Transducers to Pharo

2017-05-31 Thread Damien Pollet
I got stumped / life moved on…

>From the top of my head, my port was working for the most part (the tests
rely on a mocking library that should be ported as well; translating to
either BabyMock2 or Mocketry seems possible on the surface but there is
some impedance mismatch there between the features and DSLs of those libs)

I had to do a fileout and fiddle in VW to do it in the squeak format, then
had to grep/sed/hand-rewrite some non-portable stuff (replacing class
references with corresponding ones, removing namespaces…).

For FileTree, it was conforming to a different version of Cypress than
STIG; I started exploring how to fix that but lost interest.


On 31 May 2017 at 16:29, Steffen Märcker <merk...@web.de> wrote:

> Hello Damien,
>
> I remember very well. How far did you get? Did you kick of a discussion on
> one of the Pharo lists? And did FileTree become a convenient way to
> exchange code between VW and Pharo?
>
> Best,
> Steffen
>
>
>
> Am .05.2017, 16:16 Uhr, schrieb Damien Pollet <
> damien.pollet+ph...@gmail.com>:
>
> As you know I experimented with that a while ago. My code is at
>> http://smalltalkhub.com/#!/~cdlm/Experiments/source
>>
>> On 31 May 2017 at 15:00, Sven Van Caekenberghe <s...@stfx.eu> wrote:
>>
>>
>>> > On 31 May 2017, at 14:23, Steffen Märcker <merk...@web.de> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am the developer of the library 'Transducers' for VisualWorks. It was
>>> formerly known as 'Reducers', but this name was a poor choice. I'd like
>>> to
>>> port it to Pharo, if there is any interest on your side. I hope to learn
>>> more about Pharo in this process, since I am mainly a VW guy. And most
>>> likely, I will come up with a bunch of questions. :-)
>>> >
>>> > Meanwhile, I'll cross-post the introduction from VWnc below. I'd be
>>> very
>>> happy to hear your optinions, questions and I hope we can start a
>>> fruitful
>>> discussion - even if there is not Pharo port yet.
>>> >
>>> > Best, Steffen
>>>
>>> Hi Steffen,
>>>
>>> Looks like very interesting stuff. Would make an nice library/framework
>>> for Pharo.
>>>
>>> Sven
>>>
>>> > Transducers are building blocks that encapsulate how to process
>>> elements
>>> > of a data sequence independently of the underlying input and output
>>> source.
>>> >
>>> >
>>> >
>>> > # Overview
>>> >
>>> > ## Encapsulate
>>> > Implementations of enumeration methods, such as #collect:, have the
>>> logic
>>> > how to process a single element in common.
>>> > However, that logic is reimplemented each and every time. Transducers
>>> make
>>> > it explicit and facilitate re-use and coherent behavior.
>>> > For example:
>>> > - #collect: requires mapping: (aBlock1 map)
>>> > - #select: requires filtering: (aBlock2 filter)
>>> >
>>> >
>>> > ## Compose
>>> > In practice, algorithms often require multiple processing steps, e.g.,
>>> > mapping only a filtered set of elements.
>>> > Transducers are inherently composable, and hereby, allow to make the
>>> > combination of steps explicit.
>>> > Since transducers do not build intermediate collections, their
>>> composition
>>> > is memory-efficient.
>>> > For example:
>>> > - (aBlock1 filter) * (aBlock2 map)   "(1.) filter and (2.) map
>>> elements"
>>> >
>>> >
>>> > ## Re-Use
>>> > Transducers are decoupled from the input and output sources, and hence,
>>> > they can be reused in different contexts.
>>> > For example:
>>> > - enumeration of collections
>>> > - processing of streams
>>> > - communicating via channels
>>> >
>>> >
>>> >
>>> > # Usage by Example
>>> >
>>> > We build a coin flipping experiment and count the occurrence of heads
>>> and
>>> > tails.
>>> >
>>> > First, we associate random numbers with the sides of a coin.
>>> >
>>> >scale := [:x | (x * 2 + 1) floor] map.
>>> >sides := #(heads tails) replace.
>>> >
>>> > Scale is a transducer that maps numbers x between 0 and 1 to 1 and 2.
>>> > Sides is a transducer that replaces the numbers with heads an tails by
&g

Re: [Pharo-users] Porting Transducers to Pharo

2017-05-31 Thread Damien Pollet
As you know I experimented with that a while ago. My code is at
http://smalltalkhub.com/#!/~cdlm/Experiments/source

On 31 May 2017 at 15:00, Sven Van Caekenberghe  wrote:

>
> > On 31 May 2017, at 14:23, Steffen Märcker  wrote:
> >
> > Hi,
> >
> > I am the developer of the library 'Transducers' for VisualWorks. It was
> formerly known as 'Reducers', but this name was a poor choice. I'd like to
> port it to Pharo, if there is any interest on your side. I hope to learn
> more about Pharo in this process, since I am mainly a VW guy. And most
> likely, I will come up with a bunch of questions. :-)
> >
> > Meanwhile, I'll cross-post the introduction from VWnc below. I'd be very
> happy to hear your optinions, questions and I hope we can start a fruitful
> discussion - even if there is not Pharo port yet.
> >
> > Best, Steffen
>
> Hi Steffen,
>
> Looks like very interesting stuff. Would make an nice library/framework
> for Pharo.
>
> Sven
>
> > Transducers are building blocks that encapsulate how to process elements
> > of a data sequence independently of the underlying input and output
> source.
> >
> >
> >
> > # Overview
> >
> > ## Encapsulate
> > Implementations of enumeration methods, such as #collect:, have the logic
> > how to process a single element in common.
> > However, that logic is reimplemented each and every time. Transducers
> make
> > it explicit and facilitate re-use and coherent behavior.
> > For example:
> > - #collect: requires mapping: (aBlock1 map)
> > - #select: requires filtering: (aBlock2 filter)
> >
> >
> > ## Compose
> > In practice, algorithms often require multiple processing steps, e.g.,
> > mapping only a filtered set of elements.
> > Transducers are inherently composable, and hereby, allow to make the
> > combination of steps explicit.
> > Since transducers do not build intermediate collections, their
> composition
> > is memory-efficient.
> > For example:
> > - (aBlock1 filter) * (aBlock2 map)   "(1.) filter and (2.) map elements"
> >
> >
> > ## Re-Use
> > Transducers are decoupled from the input and output sources, and hence,
> > they can be reused in different contexts.
> > For example:
> > - enumeration of collections
> > - processing of streams
> > - communicating via channels
> >
> >
> >
> > # Usage by Example
> >
> > We build a coin flipping experiment and count the occurrence of heads and
> > tails.
> >
> > First, we associate random numbers with the sides of a coin.
> >
> >scale := [:x | (x * 2 + 1) floor] map.
> >sides := #(heads tails) replace.
> >
> > Scale is a transducer that maps numbers x between 0 and 1 to 1 and 2.
> > Sides is a transducer that replaces the numbers with heads an tails by
> > lookup in an array.
> > Next, we choose a number of samples.
> >
> >count := 1000 take.
> >
> > Count is a transducer that takes 1000 elements from a source.
> > We keep track of the occurrences of heads an tails using a bag.
> >
> >collect := [:bag :c | bag add: c; yourself].
> >
> > Collect is binary block (reducing function) that collects events in a
> bag.
> > We assemble the experiment by transforming the block using the
> transducers.
> >
> >experiment := (scale * sides * count) transform: collect.
> >
> >  From left to right we see the steps involved: scale, sides, count and
> > collect.
> > Transforming assembles these steps into a binary block (reducing
> function)
> > we can use to run the experiment.
> >
> >samples := Random new
> >  reduce: experiment
> >  init: Bag new.
> >
> > Here, we use #reduce:init:, which is mostly similar to #inject:into:.
> > To execute a transformation and a reduction together, we can use
> > #transduce:reduce:init:.
> >
> >samples := Random new
> >  transduce: scale * sides * count
> >  reduce: collect
> >  init: Bag new.
> >
> > We can also express the experiment as data-flow using #<~.
> > This enables us to build objects that can be re-used in other
> experiments.
> >
> >coin := sides <~ scale <~ Random new.
> >flip := Bag <~ count.
> >
> > Coin is an eduction, i.e., it binds transducers to a source and
> > understands #reduce:init: among others.
> > Flip is a transformed reduction, i.e., it binds transducers to a reducing
> > function and an initial value.
> > By sending #<~, we draw further samples from flipping the coin.
> >
> >samples := flip <~ coin.
> >
> > This yields a new Bag with another 1000 samples.
> >
> >
> >
> > # Basic Concepts
> >
> > ## Reducing Functions
> >
> > A reducing function represents a single step in processing a data
> sequence.
> > It takes an accumulated result and a value, and returns a new accumulated
> > result.
> > For example:
> >
> >collect := [:col :e | col add: e; yourself].
> >sum := #+.
> >
> > A reducing function can also be ternary, i.e., it takes an accumulated
> > result, a key and a value.
> > For example:
> >
> >collect := 

Re: [Pharo-users] [Seaside] Strange behaviours?

2017-05-30 Thread Damien Pollet
On 30 May 2017 at 12:46, Alidra Abdelghani via Pharo-users <
pharo-users@lists.pharo.org> wrote:

> I did not knew about that one :)
> Still, it is too bad that we have this constraint, because it is very
> difficult to find the problem if you dont know about this rule already
> (especially for newbies).
> Hopefully, this is going to be fixed in the future.
>

It sure looks like a good candidate for a framework-specific critic rule…


Re: [Pharo-users] SquareBracket Associate github org ownership

2017-05-23 Thread Damien Pollet
Should I revert everyone to read-only and add people on specific repos?

On 22 May 2017 at 20:23, Stephane Ducasse <stepharo.s...@gmail.com> wrote:

> Yes I changed because we should clean from time to time.
>
> On Mon, May 22, 2017 at 9:55 AM, Serge Stinckwich <
> serge.stinckw...@gmail.com> wrote:
>
>> Thank you Damien. Works now !
>>
>> On Mon, May 22, 2017 at 9:41 AM, Damien Pollet
>> <damien.pollet+ph...@gmail.com> wrote:
>> > Should be fixed; there are no per-repo permissions but the default for
>> all
>> > members changed somehow.
>> >
>> > On 22 May 2017 at 05:35, Serge Stinckwich <serge.stinckw...@gmail.com>
>> > wrote:
>> >>
>> >> Dear all,
>> >>
>> >> who is in charge of SquareBracket Associate github org ? I can't
>> >> commit anymore on :
>> >> https://github.com/SquareBracketAssociates/NumericalMethods
>> >>
>> >> Maybe I was owner before and no more now.
>> >> Can someone can change my ownership ?
>> >> Thank you.
>> >> Regards,
>> >>
>> >> --
>> >> Serge Stinckwich
>> >> UCN & UMI UMMISCO 209 (IRD/UPMC)
>> >> Every DSL ends up being Smalltalk
>> >> http://www.doesnotunderstand.org/
>> >>
>> >
>>
>>
>>
>> --
>> Serge Stinckwich
>> UCN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/
>>
>>
>


Re: [Pharo-users] SquareBracket Associate github org ownership

2017-05-22 Thread Damien Pollet
Should be fixed; there are no per-repo permissions but the default for all
members changed somehow.

On 22 May 2017 at 05:35, Serge Stinckwich 
wrote:

> Dear all,
>
> who is in charge of SquareBracket Associate github org ? I can't
> commit anymore on :
> https://github.com/SquareBracketAssociates/NumericalMethods
>
> Maybe I was owner before and no more now.
> Can someone can change my ownership ?
> Thank you.
> Regards,
>
> --
> Serge Stinckwich
> UCN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/
>
>


Re: [Pharo-users] [Pharo-dev] Need help with Pillar

2017-05-19 Thread Damien Pollet
I think it would have updated stuff. Hopefully.

As an alternative, to run in docker :
- delete pharo-vm (because if it's a mac VM it will not work in the linux
container)
- docker run --rm -tiv $PWD:/work dpollet/texlive:pillar make pdfbook

Docker is what the travis builds use, you can check the config file in
books that I have recently updated, e.g.
https://github.com/SquareBracketAssociates/Booklet-Glorp/blob/master/.travis.yml


On 19 May 2017 at 16:27, Alexandre Bergel <alexandre.ber...@me.com> wrote:

> I get the following:
>
> ~/Dropbox/Pillar> tlmgr update --self --all
> TeX Live 2016 is frozen forever and will no
> longer be updated.  This happens in preparation for a new release.
>
> If you're interested in helping to pretest the new release (when
> pretests are available), please read http://tug.org/texlive/pretest.html.
> Otherwise, just wait, and the new release will be ready in due time.
> tlmgr: package repository http://ftp.inf.utfsm.cl/pub/
> tex-archive/systems/texlive/tlnet (not verified: gnupg not available)
> You don't have permission to change the installation in any way,
> specifically, the directory /usr/local/texlive/2016/tlpkg/ is not writable.
> Please run this program as administrator, or contact your local admin.
> tlmgr: An error has occurred. See above messages. Exiting.
> ~/Dropbox/Pillar>
>
> I use the installation of TeXlive on my machine since I have no idea who
> to make the docker image use my local files.
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On May 19, 2017, at 10:06 AM, Damien Pollet <damien.pol...@gmail.com>
> wrote:
>
> I think you still have a TeXlive snapshot from earlier this year. Try this
> :
> tlmgr update --self --all
>
> On 19 May 2017 at 15:19, Alexandre Bergel <alexandre.ber...@me.com> wrote:
>
>> Hi Damien!
>>
>> Apparently the INRIA CI is getting better. I could get the archetype. I
>> have another error when compiling the book. I get:
>> Sidefoothsep and sidefootwidth: 2.46019mm and 44.98633mm
>> Sidefootvsep and sidefootheight: 4.21747mm and 192.73828mm
>> **
>>
>> (/usr/local/texlive/2016/texmf-dist/tex/latex/datetime2/datetime2.sty
>> (/usr/local/texlive/2016/texmf-dist/tex/latex/tracklang/tracklang.sty
>> (/usr/local/texlive/2016/texmf-dist/tex/generic/tracklang/
>> tracklang.tex)))
>> Runaway argument?
>> \pdffeedback creationdate\@dtm@endparsepdfdatetime \let \@dtm@currentyear
>> \ETC.
>>
>> ./root/support/latex/common.tex:5: File ended while scanning use of
>> \@dtm@parse
>> pdfdatetime.
>> 
>> \par
>> l.5
>>
>>  1217 words of node memory still in use:
>>2 hlist, 1 rule, 1 dir, 34 glue, 9 attribute, 167 glue_spec, 9
>> attribute_lis
>> t, 3 write, 1 pdf_colorstack nodes
>>avail lists: 2:24,3:1,5:2,6:4,7:1,8:1,9:2
>> ./root/support/latex/common.tex:5:  ==> Fatal error occurred, no output
>> PDF fil
>> e produced!
>> Transcript written on book.log.
>> Latexmk: Errors, so I did not complete making targets
>> Collected error summary (may duplicate other messages):
>>   pdflatex: Command for 'pdflatex' gave return code 256
>> Latexmk: Use the -f option to force complete processing,
>>  unless error was exceeding maximum runs of latex/pdflatex.
>> make[1]: *** [book.pdf] Error 12
>> make: *** [build/book.pdf] Error 2
>> ~/Dropbox/Pillar>
>>
>> Is it because of some missing Latex .cls? If yes, which one? How can I
>> install them?
>>
>> Thanks for your help!
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> On May 18, 2017, at 7:43 AM, Damien Pollet <damien.pol...@gmail.com>
>> wrote:
>>
>> On 18 May 2017 at 01:34, Alexandre Bergel <alexandre.ber...@me.com>
>> wrote:
>>
>>> curl https://raw.githubusercontent.com/pillar-markup/pillar/maste
>>> r/download.sh | bash
>>>
>>> I had to copy PharoV50.sources in the folder pharo-vm/ apparently.
>>>
>>
>> Hmm strange I got that this morning as well with Clément's book.
>> The script installs a PharoV60.sources so most probably it installs the
>> latest VM; might be a problem if Pillar really relies on Pharo 5…
>>
>>
>>> Getting the archetype book gives me an error:
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> /tmp/pillar> ./pillar archetype book
>>>
>>> Which website is it trying to get access to?
>>>
>>
>> That would be Inria CI, they're having problems with CloudStack currently
>>
>>
>> --
>> Damien Pollet
>> type less, do more [ | ] http://people.untyped.org/damien.pollet
>>
>>
>>
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>
>
>


Re: [Pharo-users] [Pharo-dev] Need help with Pillar

2017-05-19 Thread Damien Pollet
I think you still have a TeXlive snapshot from earlier this year. Try this :
tlmgr update --self --all

On 19 May 2017 at 15:19, Alexandre Bergel <alexandre.ber...@me.com> wrote:

> Hi Damien!
>
> Apparently the INRIA CI is getting better. I could get the archetype. I
> have another error when compiling the book. I get:
> Sidefoothsep and sidefootwidth: 2.46019mm and 44.98633mm
> Sidefootvsep and sidefootheight: 4.21747mm and 192.73828mm
> **
>
> (/usr/local/texlive/2016/texmf-dist/tex/latex/datetime2/datetime2.sty
> (/usr/local/texlive/2016/texmf-dist/tex/latex/tracklang/tracklang.sty
> (/usr/local/texlive/2016/texmf-dist/tex/generic/tracklang/tracklang.tex)))
> Runaway argument?
> \pdffeedback creationdate\@dtm@endparsepdfdatetime \let \@dtm@currentyear
> \ETC.
>
> ./root/support/latex/common.tex:5: File ended while scanning use of
> \@dtm@parse
> pdfdatetime.
> 
> \par
> l.5
>
>
>  1217 words of node memory still in use:
>2 hlist, 1 rule, 1 dir, 34 glue, 9 attribute, 167 glue_spec, 9
> attribute_lis
> t, 3 write, 1 pdf_colorstack nodes
>avail lists: 2:24,3:1,5:2,6:4,7:1,8:1,9:2
> ./root/support/latex/common.tex:5:  ==> Fatal error occurred, no output
> PDF fil
> e produced!
> Transcript written on book.log.
> Latexmk: Errors, so I did not complete making targets
> Collected error summary (may duplicate other messages):
>   pdflatex: Command for 'pdflatex' gave return code 256
> Latexmk: Use the -f option to force complete processing,
>  unless error was exceeding maximum runs of latex/pdflatex.
> make[1]: *** [book.pdf] Error 12
> make: *** [build/book.pdf] Error 2
> ~/Dropbox/Pillar>
>
> Is it because of some missing Latex .cls? If yes, which one? How can I
> install them?
>
> Thanks for your help!
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On May 18, 2017, at 7:43 AM, Damien Pollet <damien.pol...@gmail.com>
> wrote:
>
> On 18 May 2017 at 01:34, Alexandre Bergel <alexandre.ber...@me.com> wrote:
>
>> curl https://raw.githubusercontent.com/pillar-markup/pillar/maste
>> r/download.sh | bash
>>
>> I had to copy PharoV50.sources in the folder pharo-vm/ apparently.
>>
>
> Hmm strange I got that this morning as well with Clément's book.
> The script installs a PharoV60.sources so most probably it installs the
> latest VM; might be a problem if Pillar really relies on Pharo 5…
>
>
>> Getting the archetype book gives me an error:
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> /tmp/pillar> ./pillar archetype book
>>
>> Which website is it trying to get access to?
>>
>
> That would be Inria CI, they're having problems with CloudStack currently
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>
>
>


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] Anyone knows how to get the list of available archetype with Pillar?

2017-05-19 Thread Damien Pollet
There is one archtype for each directory under
https://github.com/pillar-markup/Pillar-Archetype

On 19 May 2017 at 15:50, Alexandre Bergel  wrote:

> Hello!
>
> Still on my quest to use Pillar :-)
>
> What are the different Archetypes available for Pillar?
> It would be great to have: ./pillar archetype
> to obtain the list of available archetype :-)
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>


Re: [Pharo-users] [Pharo-dev] Need help with Pillar

2017-05-18 Thread Damien Pollet
On 18 May 2017 at 01:34, Alexandre Bergel <alexandre.ber...@me.com> wrote:

> curl https://raw.githubusercontent.com/pillar-markup/pillar/
> master/download.sh | bash
>
> I had to copy PharoV50.sources in the folder pharo-vm/ apparently.
>

Hmm strange I got that this morning as well with Clément's book.
The script installs a PharoV60.sources so most probably it installs the
latest VM; might be a problem if Pillar really relies on Pharo 5…


> Getting the archetype book gives me an error:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> /tmp/pillar> ./pillar archetype book
>
> Which website is it trying to get access to?
>

That would be Inria CI, they're having problems with CloudStack currently


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] iceberg

2017-03-16 Thread Damien Pollet
+1 (for some big value of one)

On 16 March 2017 at 11:42, Norbert Hartl  wrote:

> Sometimes tools change and you feel the change like a quantum leap. For me
> it is the case when using iceberg.
>
> Well done, thank you very much for that.
>
> If Versionner would be able to edit baselines we would have a really rich
> workflow for developing.
>
> Norbert
>
>
>
>


Re: [Pharo-users] Convert Markdown to Pillar?

2017-03-07 Thread Damien Pollet
Should be possible, but that would involve writing a markdown to pillar
converter :)

The other way around already exists, but the conversion is lossy; from
markdown to pillar it should be possible to maintain most of the semantics.


On 7 March 2017 at 17:55, sergio ruiz  wrote:

>
> Just wondering if this is possible. Just about every stand alone editor
> allows users to edit or export to markdown. I tend to do everything in a
> standalone editor when getting written material ready for publishing to the
> web.
>
> I don’t have any beef with pillar, i just want to be able to write using a
> separate tool.
>
> thanks!
>
>
> 
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.Village-Buzz.com
> http://www.ThoseOptimizeGuys.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>


Re: [Pharo-users] A little expression interpreter for new forthcoming book

2017-01-09 Thread Damien Pollet
I just went through it and saw a few possible tweaks (you know me). I'll
commit them directly if I get the time

On 8 January 2017 at 20:50, Alexandre Bergel 
wrote:

> Okay!
>
> Alexandre
>
>
> > On Jan 8, 2017, at 4:34 PM, stepharong  wrote:
> >
> > fixed.
> > Alex
> > this chapter alone is really nice to present OOP and OOD and Pharo to
> people can start.
> > I'm adding some points to answer question raised by my son and it will
> be ready to rest.
> >
> > Stef
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>


Re: [Pharo-users] [Pharo-dev] Call of projects of open-dev lectures

2017-01-07 Thread Damien Pollet
On 7 January 2017 at 13:52, Hilaire <hila...@drgeo.eu> wrote:

> Do the students have background on Pharo, if yes what is it?
>

They have at least a semester of Java, but it's their first experience with
Pharo, I believe. Stef will have them spend the first 3-4 fridays learning
and going through the books and MOOC.


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] [Pharo-dev] Call of projects of open-dev lectures

2017-01-06 Thread Damien Pollet
On 6 January 2017 at 21:04, Hilaire <hila...@drgeo.eu> wrote:

> How should I understand 12 * 4 hours?
> 12 hours by student in a team of four?
>

Ten weeks with 4 dedicated hours every friday afternoon, in groups of 3 to 5


-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] Mustache and section

2016-12-06 Thread Damien Pollet
https://github.com/zalando/beard is in Scala :p

On 5 December 2016 at 21:54, Stephane Ducasse 
wrote:

> You mean that you would like to invent a much better mustache.
> We could keep mustache as it is and invent Beard or rouquaflette :)
>
> On Mon, Dec 5, 2016 at 12:35 PM, Norbert Hartl  wrote:
>
>> I agree. But there is also a point in sharing mustache templates between
>>  different runtimes. Altering mustache does not make it very mustache
>> anymore. And it will make it slower. I put that on my ever growing list of
>> things to do. Maybe a switch could bring the best of both worlds.
>>
>> Norbert
>>
>> Am 05.12.2016 um 16:24 schrieb Stephane Ducasse > >:
>>
>> having a nicer mustache can be cool :)
>>
>> On Mon, Dec 5, 2016 at 6:25 AM, Norbert Hartl  wrote:
>>
>>> Ok. I think about that again. It might be a useful thing to have
>>> although not supported IMHO by other mustache implementations.
>>>
>>> Norbert
>>>
>>> > Am 04.12.2016 um 18:19 schrieb Hilaire :
>>> >
>>> > Okay.
>>> > Indeed, my bypass was to copy the label in the list.
>>> >
>>> > Thank you for your answer.
>>> >
>>> > Hilaire
>>> >
>>> >> Le 04/12/2016 à 08:14, Norbert Hartl a écrit :
>>>  So far in my attempt the #label tag is not processed.
>>> 
>>>  Am I interpreting something wrongly?
>>> 
>>> >> No, what you want is not possible. To achieve it you should copy
>>> label into the elements of the list section.
>>> >>
>>> >> Norbert
>>> >
>>> > --
>>> > Dr. Geo
>>> > http://drgeo.eu
>>> >
>>> >
>>>
>>>
>>>
>>
>


Re: [Pharo-users] Execute a script from command line save image and exit

2016-11-28 Thread Damien Pollet
So… if I read that code correctly, when you pass both --save and --quit,
the image will first save itself and quit (with an unspecified return code,
or the one picked by the snapshot code). Then, next time you run this
image, it will resume execution and exit immediately (that time with an
explicit success return code).

*¬_¬ not sure if stupid code or stupid me*

On 28 November 2016 at 13:23, Sven Van Caekenberghe  wrote:

> Hi Dimitris,
>
> According to
>
> STCommandLineHandler>>#end
> | quit  |
>
> quit := self commandLine hasOption: 'quit'.
>
> (self commandLine hasOption: 'save')
> ifTrue: [ Smalltalk snapshot: true andQuit: quit ].
>
> quit
> ifTrue: [ self exitSuccess ].
>
> You should be able to combine --quit and --save to get the desired effect
> but I haven't tested it.
>
> BTW, command line usage of Pharo works very well (and has been working
> well for years).
>
> Sven
>
> > On 28 Nov 2016, at 12:13, Dimitris Chloupis 
> wrote:
> >
> > How to execute a script from command line , then save the image and exit
> ?
> >
> > I use the st command but it offers either --save which saves but keeps
> image opened or --exit the exits the image without saving
> >
> > ./pharo Ephestos.image st --save  test.st
>
>
>


Re: [Pharo-users] Little challenges for a friday evening

2016-11-11 Thread Damien Pollet
On 11 November 2016 at 12:02, stepharo  wrote:

> String>>#isIsogram
>>  | letters |
>>  letters := Dictionary new.
>>  self do: [ :x | letters at: x ifAbsent: [] ifPresent: [ ^false ].
>>
> Yes I did that one too and I was surprised because it was as slow as the
> bag implementation.
>

Anyone tried replacing the dictionary with an array of 26 booleans and
indexing based on ascii, or even a SmallInteger and bit shifting?


Re: [Pharo-users] [ALERT] Pharo by Example version 5 is about to be released

2016-11-07 Thread Damien Pollet
On 7 November 2016 at 10:22, Nicolai Hess  wrote:

> My opinion is not that themes are not important, but that it looks out of
> context in this chapter.
>

Also think of the print version. The print quality via Lulu is not great
for grayscale images, so screenshots in light text over dark background
will not be very nice to look at or could even be unreadable if the
contrast is too low.


Re: [Pharo-users] Cover for PBE5

2016-10-30 Thread Damien Pollet
On 30 October 2016 at 21:56, stepharo <steph...@free.fr> wrote:

> Philemon is so great and strange :)
>

I was thinking of him visiting the strange islands of class diagrams and
meeting the reflective bytecode resistance smuggling inline caches there :D



> Le 30/10/16 à 21:23, Damien Pollet a écrit :
>
> Somehow this makes me think of the cover of the Tintin album "L'Île Noire"
> http://www.images-booknode.com/book_cover/265/full/les-
> aventures-de-tintin---l-ile-noire-265103.jpg
>
> Perhaps a similar composition with close/far subjects and clean flat text
> would work better… as it is now, I find it too dark/dramatic for the
> subject matter, and I find the word art floating over water cheesy and
> making little sense, sorry…
>
> Another inspiration where the 3D text would work better would be the
> Philémon's letters in the Atlantic (it's a surrealist universe where the
> letters spelling OCÉAN ATLANTIQUE on a world globe are really letter-shaped
> islands) : http://iteror.org/big/img/i/Philemon_leA.jpg
>
> On 30 October 2016 at 17:59, Dimitris Chloupis <kilon.al...@gmail.com>
> wrote:
>
>> Yeap thats the idea, being unique is my goal , though still developing my
>> style.
>>
>> I am also not a fan of flat designs , with exceptions those that also
>> carry a unique style.
>>
>> Στις Κυρ, 30 Οκτ 2016 - 18:49 ο χρήστης p...@highoctane.be <
>> p...@highoctane.be> έγραψε:
>>
>>> This skeuomorphic render in an age of flat design... We definitely are
>>> not on the mainstream.
>>>
>>> Phil
>>>
>>> On Sun, Oct 30, 2016 at 4:23 PM, Dimitris Chloupis <
>>> kilon.al...@gmail.com> wrote:
>>>
>>> as you ordered , I throw in also a Seagull as a bonus :D
>>>
>>> https://gitlab.com/Kilon/pbe5-cover/raw/master/Pharo%20demo/
>>> renders/render-201610301719.jpg
>>>
>>> enjoy
>>>
>>> On Sun, Oct 30, 2016 at 10:34 AM stepharo <steph...@free.fr> wrote:
>>>
>>> hi
>>>
>>> would it be possible to have
>>>
>>> by example in 3d below Pharo?
>>>
>>> Stef
>>>
>>> Le 29/10/16 à 16:27, Dimitris Chloupis a écrit :
>>>
>>> I did not want to go with the original design because frankly that is
>>> not my style. I rather have something unique.
>>>
>>> Extruding the logo would look very boring and its definitely something I
>>> dont want to do.
>>>
>>> I love the original design because it is really suits many scenarios
>>> including icons and because its a good design.
>>>
>>> However here we dont talk about a simple logo to be used everywhere,
>>> this is a book cover and plus Stef asked me to use this that I have created
>>> in the past. The original design can continue to be around since it can
>>> serve many other roles.
>>>
>>> Python books for example rarely use the python logo, usually they have
>>> some painted snake or even mouse etc. By rarely I mean extremely rarely.
>>>
>>> https://goo.gl/b67ETW
>>>
>>> Another reason is that 3d graphics are quite hard to make , so its not
>>> that simple for me to start from scratch and have something ready in 1 day.
>>> The only thing I can do is tweak this to make it slightly better.
>>>
>>> On a question of form, its not a problem this is a 3d scene as such its
>>> extremely flexible on how I can render this, it can be resized in any way
>>> and change in proportion.
>>>
>>> In any case I have zero issues with going with the original cover or a
>>> design not made by gets picked. I made this render because I will use it as
>>> a background to my blog anyway so it wont go to waste.
>>>
>>> On Sat, Oct 29, 2016 at 5:05 PM Ben Coman <b...@openinworld.com> wrote:
>>>
>>> Nice, but I guess this was originally for something else since its not
>>> in the book form factor which will change your composition.  It would
>>> be good to see a sample in book form factor.
>>>
>>> Also Pharo has its brand with the lighthouse in the big-O that I guess
>>> it would be good to follow like the other books...
>>> http://files.pharo.org/books/
>>>
>>> How would it look to extrude logo.svg from here...?
>>> https://github.com/pharo-project/pharo-flyers/tree/master/figures
>>>
>>> cheers -ben
>>>
>>> On Sat, Oct 29, 2016 at 8:36 PM, Dimitris Chloupis
>>> <kilon.al...@gmail.com> wrote:
>>> > So Stef reminded me that we are going to need a cover for PBE5 , so I
>>> > decided to revive my now 2 year old pharo logo render and enhance it. I
>>> > decided also to release all assets under MIT license as a present to
>>> the
>>> > community. The repo can be found here
>>> >
>>> > https://gitlab.com/Kilon/pbe5-cover/tree/master
>>> >
>>> > latest render can be found here
>>> >
>>> > https://gitlab.com/Kilon/pbe5-cover/raw/master/Pharo%20demo/
>>> renders/render-201610291523.jpg
>>> >
>>> > this is not final render I have a few thing to improve but it is 90%
>>> there.
>>> >
>>> > Hope you like, I leave the final decision on Stef.
>>>
>>>
>>>
>>>
>
>


Re: [Pharo-users] Cover for PBE5

2016-10-30 Thread Damien Pollet
Somehow this makes me think of the cover of the Tintin album "L'Île Noire"
http://www.images-booknode.com/book_cover/265/full/les-aventures-de-tintin---l-ile-noire-265103.jpg

Perhaps a similar composition with close/far subjects and clean flat text
would work better… as it is now, I find it too dark/dramatic for the
subject matter, and I find the word art floating over water cheesy and
making little sense, sorry…

Another inspiration where the 3D text would work better would be the
Philémon's letters in the Atlantic (it's a surrealist universe where the
letters spelling OCÉAN ATLANTIQUE on a world globe are really letter-shaped
islands) : http://iteror.org/big/img/i/Philemon_leA.jpg

On 30 October 2016 at 17:59, Dimitris Chloupis 
wrote:

> Yeap thats the idea, being unique is my goal , though still developing my
> style.
>
> I am also not a fan of flat designs , with exceptions those that also
> carry a unique style.
>
> Στις Κυρ, 30 Οκτ 2016 - 18:49 ο χρήστης p...@highoctane.be <
> p...@highoctane.be> έγραψε:
>
>> This skeuomorphic render in an age of flat design... We definitely are
>> not on the mainstream.
>>
>> Phil
>>
>> On Sun, Oct 30, 2016 at 4:23 PM, Dimitris Chloupis > > wrote:
>>
>> as you ordered , I throw in also a Seagull as a bonus :D
>>
>> https://gitlab.com/Kilon/pbe5-cover/raw/master/Pharo%20demo/
>> renders/render-201610301719.jpg
>>
>> enjoy
>>
>> On Sun, Oct 30, 2016 at 10:34 AM stepharo  wrote:
>>
>> hi
>>
>> would it be possible to have
>>
>> by example in 3d below Pharo?
>>
>> Stef
>>
>> Le 29/10/16 à 16:27, Dimitris Chloupis a écrit :
>>
>> I did not want to go with the original design because frankly that is not
>> my style. I rather have something unique.
>>
>> Extruding the logo would look very boring and its definitely something I
>> dont want to do.
>>
>> I love the original design because it is really suits many scenarios
>> including icons and because its a good design.
>>
>> However here we dont talk about a simple logo to be used everywhere, this
>> is a book cover and plus Stef asked me to use this that I have created in
>> the past. The original design can continue to be around since it can serve
>> many other roles.
>>
>> Python books for example rarely use the python logo, usually they have
>> some painted snake or even mouse etc. By rarely I mean extremely rarely.
>>
>> https://goo.gl/b67ETW
>>
>> Another reason is that 3d graphics are quite hard to make , so its not
>> that simple for me to start from scratch and have something ready in 1 day.
>> The only thing I can do is tweak this to make it slightly better.
>>
>> On a question of form, its not a problem this is a 3d scene as such its
>> extremely flexible on how I can render this, it can be resized in any way
>> and change in proportion.
>>
>> In any case I have zero issues with going with the original cover or a
>> design not made by gets picked. I made this render because I will use it as
>> a background to my blog anyway so it wont go to waste.
>>
>> On Sat, Oct 29, 2016 at 5:05 PM Ben Coman  wrote:
>>
>> Nice, but I guess this was originally for something else since its not
>> in the book form factor which will change your composition.  It would
>> be good to see a sample in book form factor.
>>
>> Also Pharo has its brand with the lighthouse in the big-O that I guess
>> it would be good to follow like the other books...
>> http://files.pharo.org/books/
>>
>> How would it look to extrude logo.svg from here...?
>> https://github.com/pharo-project/pharo-flyers/tree/master/figures
>>
>> cheers -ben
>>
>> On Sat, Oct 29, 2016 at 8:36 PM, Dimitris Chloupis
>>  wrote:
>> > So Stef reminded me that we are going to need a cover for PBE5 , so I
>> > decided to revive my now 2 year old pharo logo render and enhance it. I
>> > decided also to release all assets under MIT license as a present to the
>> > community. The repo can be found here
>> >
>> > https://gitlab.com/Kilon/pbe5-cover/tree/master
>> >
>> > latest render can be found here
>> >
>> > https://gitlab.com/Kilon/pbe5-cover/raw/master/Pharo%20demo/
>> renders/render-201610291523.jpg
>> >
>> > this is not final render I have a few thing to improve but it is 90%
>> there.
>> >
>> > Hope you like, I leave the final decision on Stef.
>>
>>
>>
>>


Re: [Pharo-users] OSProcess missing from Pharo 6 image

2016-10-28 Thread Damien Pollet
On 28 October 2016 at 14:12, Guille Polito 
wrote:

> What is wrong in executing a simple Metacello command to load it?


What's wrong is, it's not convenient / easy / publicized enough. There
isn't a nice user story about dependency management and package loading,
even though technically everything is (nearly) there.

That's why the bootstrap, cargo, etc are important.


Re: [Pharo-users] Pillar book makefile or template is broken.

2016-10-09 Thread Damien Pollet
On 9 October 2016 at 21:52, stepharo  wrote:

> I did a clean install. So I imagine that it should break on other machines
> too.


Might be that pillar archetype doesn't do a git clone but some kind of
archive extraction… I know github and zip files have limitations with that


Re: [Pharo-users] Pillar book makefile or template is broken.

2016-10-09 Thread Damien Pollet
On 9 October 2016 at 20:03, stepharo  wrote:

> I tried to add a title to a book
>
> {
>   "title":"Learning Programming with Pharo",
>

I think I tried with { "metadata": { "title": "bleb" } } in the book.pillar
and that worked. No clue why the one from the conf is not inherited anymore.


Re: [Pharo-users] Pillar book makefile or template is broken.

2016-10-09 Thread Damien Pollet
On 9 October 2016 at 19:47, stepharo  wrote:

> - chmod +x support/latex/sbabook/gitinfo2.sh
>
> Now I have no idea where I should add this command.
>

That should be versioned as part of sbabook. On my machine when I check it
out it's executable, and apparently it's harder to make git ignore file
modes than to have it follow them, so I don't know what's wrong.


Re: [Pharo-users] turning a collection (interval for example) into a stream

2016-09-29 Thread Damien Pollet
It's in http://smalltalkhub.com/#!/~cdlm/Experiments

Not sure if it's Transducers or Reducers. Most probably the latter is the
ported code from VW, I recall having success running some examples, but the
tests probably will not (I recall trying to rewrite them using BabyMock2
but it's either failed or unfinished).

On 29 September 2016 at 16:50, stepharo <steph...@free.fr> wrote:

> I would love to see this package and a little documentation on it.
>
> Stef
>
> Le 29/9/16 à 15:02, Damien Pollet a écrit :
>
> Same with transducers/reducers, except they work by pushing values through
> the pipeline instead of pulling them. The library I started porting from VW
> last year had a dual API, one more like the original Clojure transducers,
> and one more like Xtreams.
>
> One nice point of going collection→stream & filters→result is that the
> final step is explicit, so you can pick what kind of result you build
> (could be a collection or a single aggregated value).
>
> On 29 September 2016 at 12:40, Denis Kudriashov <dionisi...@gmail.com>
> wrote:
>
>>
>> 2016-09-29 12:39 GMT+02:00 Denis Kudriashov <dionisi...@gmail.com>:
>>
>>> and collect: could be rewritten to use a generator.
>>>>
>>>> Now does anybody play with this already?
>>>>
>>>> Does xtream provide a way to do something in the same vein?
>>>>
>>>
>>> Yes. XStream supports it:
>>>
>>> (1 to: 1000) reading transforming: [:in :out | | each | each := in get.
>>> out  put: each -1; put: each; put: each + 1]
>>>
>>
>> But you probably wants different:
>>
>> (1 to: 1000) reading collecting: [:each | {each -1. each. each + 1} ]
>>
>
>
>


Re: [Pharo-users] turning a collection (interval for example) into a stream

2016-09-29 Thread Damien Pollet
Same with transducers/reducers, except they work by pushing values through
the pipeline instead of pulling them. The library I started porting from VW
last year had a dual API, one more like the original Clojure transducers,
and one more like Xtreams.

One nice point of going collection→stream & filters→result is that the
final step is explicit, so you can pick what kind of result you build
(could be a collection or a single aggregated value).

On 29 September 2016 at 12:40, Denis Kudriashov 
wrote:

>
> 2016-09-29 12:39 GMT+02:00 Denis Kudriashov :
>
>> and collect: could be rewritten to use a generator.
>>>
>>> Now does anybody play with this already?
>>>
>>> Does xtream provide a way to do something in the same vein?
>>>
>>
>> Yes. XStream supports it:
>>
>> (1 to: 1000) reading transforming: [:in :out | | each | each := in get.
>> out  put: each -1; put: each; put: each + 1]
>>
>
> But you probably wants different:
>
> (1 to: 1000) reading collecting: [:each | {each -1. each. each + 1} ]
>


Re: [Pharo-users] [ANN] Pillar 4.0.0

2016-09-17 Thread Damien Pollet
On 17 September 2016 at 13:26, Tudor Girba  wrote:

> I just tried the latest Makefile, but it does not work. Are you working on
> it?


Are you trying the book archetype ?
(I'm trying not to do work stuff during weekends)


> Interesting. However, given that we are anyway relying on Pharo, why are
> the scripts not in Pharo?


Reimplementing make is just diluting manpower closer to homeopathic levels,
and pillar is already a proven cause of burnout.


> > About the list of chapters in pillar.conf, for instance: if the document
> has parts, then chapters are not a flat list; it's one of those things
> where form is content is form…
>
> Yes, indeed. Looking deeper I realize that we could scavenge the
> information out of +include+ directives from pillar files. This should be
> enough to provide a tree index view of all files.
>

Check this issue; there are already a couple visitors that could be
exporting this info, but they don't list everything, and don't output deps
as makefile syntax
https://github.com/pillar-markup/pillar/issues/130


Re: [Pharo-users] [ANN] Pillar 4.0.0

2016-09-17 Thread Damien Pollet
Most important would be to check that what I do is compatible with how you
use Pillar. I'm leaving in the terminal all day, so the workflow that I'll
be pushing will be biased in that direction. (Hello, my name's Damien and
I'm a shell addict… Hello, Damien!)

It will be difficult to get a perfect makefile that can do minimal
incremental recompilations unless Pillar can export a proper list of
dependencies of a document (and even then…). I remember mentioning that to
Thibault and Yann but it doesn't seem to be there. In the meantime my goal
is to make it a bit more robust and to factor stuff as much as possible. I
also intend to make it self-documented, using this pretty nice trick:
http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html

About the list of chapters in pillar.conf, for instance: if the document
has parts, then chapters are not a flat list; it's one of those things
where form is content is form…

On 17 September 2016 at 12:45, Tudor Girba <tu...@tudorgirba.com> wrote:

> Hi Damien,
>
> As I said, just let me know if I can be of help for developing or testing
> something. I happen to be focusing on using Pillar these days.
>
> Cheers,
> Doru
>
>
> > On Sep 17, 2016, at 12:20 PM, Damien Pollet <
> damien.pollet+ph...@gmail.com> wrote:
> >
> > I bet you left the makefile unchanged. Try `make
> book-result/welcome.html`
> >
> > Here it tries to run ./pillar something something that looks correct
> (but fails because I didn't download the pillar image in that directory)
> >
> > DISCLAIMER: I'm not fixing the other archetypes until I'm happy with the
> book one. So don't expect them to work this weekend.
> >
> >
> > On 17 September 2016 at 12:11, stepharo <steph...@free.fr> wrote:
> > Hi
> >
> > I followed the pillarChap and I could get it running :(
> >
> >
> >
> > Installing and Exporting your First Document
> >
> > You first need to get Pillar. For that, we recommend downloading and
> exe- cuting the script available at https://raw.githubusercontent.
> com/pillar-markup/ pillar/master/download.sh in the base directory if you
> are on an Unix environ- ment.
> >
> >wget
> >
> > https://raw.githubusercontent.com/pillar-markup/pillar/
> master/download.sh
> >chmod +x download.sh
> >./download.sh
> >
> > Then, you can load an archetype (see Section 14.2) with command:
> >
> >./pillar archetype welcome
> >
> > You have the possibility to rename the directory in which your files
> will be exported. To do that you have to change the OUTPUTDIRECTORY
> variable in the Makefile:
> >
> >OUTPUTDIRECTORY = result
> >
> > Then, you can check everything is working fine by creating a
> first.pillar file with this content:
> >
> > !Hello World
> >
> > And finally compiling it from a terminal (see Section 14.6 for more
> informa- tion about the command-line interface):
> >
> >make result/first.html
> >
> >
> >
> >
> > make result/welcome.html
> > make: *** No rule to make target `result/welcome.html'.  Stop.
> >
> >
> > there is a welcome.pillar so I should be able to get welcome.html
> >
> > Now I do not get the expression make result/first.html
> >
> >
> > cp welcome.pillar first.pillar
> >   tryingFromDoc make result/first.html
> > make: *** No rule to make target `result/first.html'.  Stop.
> >
> > I think that this doc is simply bogus. Each time I tried it
> > I have to fix it radically.
> >
> >
> >
> > make welcome is working so may be this is what we should add to the doc.
> > I do not think that Pillar guys are reading this mailing-list so I will
> try to save what should be saved. :(
> >
> > Stef
> >
> > Stef
> >
> >
> >
> >
> >
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "From an abstract enough point of view, any two things are similar."
>
>
>
>
>
>


Re: [Pharo-users] [ANN] Pillar 4.0.0

2016-09-17 Thread Damien Pollet
I bet you left the makefile unchanged. Try `make book-result/welcome.html`

Here it tries to run ./pillar something something that looks correct (but
fails because I didn't download the pillar image in that directory)

DISCLAIMER: I'm not fixing the other archetypes until I'm happy with the
book one. So don't expect them to work this weekend.


On 17 September 2016 at 12:11, stepharo  wrote:

> Hi
>
> I followed the pillarChap and I could get it running :(
>
>
>
> Installing and Exporting your First Document
>
> You first need to get Pillar. For that, we recommend downloading and exe-
> cuting the script available at https://raw.githubusercontent.
> com/pillar-markup/ pillar/master/download.sh in the base directory if you
> are on an Unix environ- ment.
>
>wget
>
> https://raw.githubusercontent.com/pillar-markup/pillar/master/download.sh
>
>chmod +x download.sh
>./download.sh
>
> Then, you can load an archetype (see Section 14.2) with command:
>
>./pillar archetype welcome
>
> You have the possibility to rename the directory in which your files will
> be exported. To do that you have to change the OUTPUTDIRECTORY variable
> in the Makefile:
>
>OUTPUTDIRECTORY = result
>
> Then, you can check everything is working fine by creating a first.pillar file
> with this content:
>
> !Hello World
>
> And finally compiling it from a terminal (see Section 14.6 for more
> informa- tion about the command-line interface):
>
>make result/first.html
>
>
> make result/welcome.html
> make: *** No rule to make target `result/welcome.html'.  Stop.
> there is a welcome.pillar so I should be able to get welcome.html
>
> Now I do not get the expression make result/first.html
>
>
> cp welcome.pillar first.pillar
>   tryingFromDoc make result/first.html
> make: *** No rule to make target `result/first.html'.  Stop.
>
> I think that this doc is simply bogus. Each time I tried it
> I have to fix it radically.
>
>
>
> make welcome is working so may be this is what we should add to the doc.
> I do not think that Pillar guys are reading this mailing-list so I will try 
> to save what should be saved. :(
>
> Stef
>
> Stef
>
>
>
>
>


Re: [Pharo-users] pillar questions

2016-09-15 Thread Damien Pollet
I've been cleaning the book archetype's makefile this afternoon. I suspect
there is no list of chapters because the example is quite minimal.
Enterprise Pharo was the one Thibault and Yann worked with, so I need to
compare with it.

The recent work on pillar was about removing superfluous responsabilities
and moving it towards a simpler markup renderer. Chapter numbering is a
global information, which is OK in LaTeX because it can be computed by TeX
during its compilation pass; however HTML chapters are just generated one
for one following the pillar files.

On 15 September 2016 at 15:09, Serge Stinckwich 
wrote:

> Maybe you should have a look to Enterprise Pharo book pillar template ?
> https://github.com/SquareBracketAssociates/EnterprisePharo
>
> But apparently I'm not able to compile last version ...
> make book fails
>
>
>
> On Thu, Sep 15, 2016 at 2:06 PM, Tudor Girba  wrote:
> > Hi,
> >
> > I see that in the new book template, we have both a book.pillar that
> includes the chapter files, and a pillar.conf that is mostly empty. Is
> pillar.conf still used? If yes, what should it contain?
> >
> > If I embed the chapters in a book.pillar and I render the whole book,
> the numbering of the second chapter starts from 1 (instead of 2) when I
> render in html. Any idea how to do it differently?
> >
> > Cheers,
> > Doru
> >
> >
> > --
> > www.tudorgirba.com
> > www.feenk.com
> >
> > "Yesterday is a fact.
> >  Tomorrow is a possibility.
> >  Today is a challenge."
> >
> >
> >
> >
> >
>
>
>
> --
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/
>
>


Re: [Pharo-users] difficult to kill objects - pesky hanging pointersTo

2016-09-08 Thread Damien Pollet
On 7 September 2016 at 20:45, stepharo  wrote:

> And wht I learned is that we should do
>
>
> ClassOfObjectsThatMustDie allInstances first become: nil
> but really String new.
>

But why a two-way become and not a becomeForward?


Re: [Pharo-users] Coral?

2016-06-24 Thread Damien Pollet
I should still have the sources for the old website somewhere, I'll check
if I can re-deploy them

On 24 June 2016 at 14:53, Valentin Ryckewaert  wrote:

> Hi,
>
> if there is any documentation I didn't see it sorry :( The syntax may
> change in the future) :)
>
> 2016-06-24 14:50 GMT+02:00 Yuriy Tymchuk :
>
>> Hi, thanks.
>>
>> Is there any documentation left? Like what is the syntax and so on?
>>
>> Cheers.
>> Uko
>>
>> On 24 Jun 2016, at 13:24, Valentin Ryckewaert <
>> valentin.ryckewa...@gmail.com> wrote:
>>
>> Hello,
>>
>> I'm the trainee responsible of it, i'm currently working on it by
>> searching the points of interaction between Pharo and his files(changeslog
>> etc...) to block them.
>> You can find my work on
>> Metacello new
>> smalltalkhubUser: 'Uryon' project: 'FilePolicy';
>> configuration: 'Coral';
>> version: #development;
>> onConflictUseIncoming;
>> load.
>>
>> 2016-06-24 11:23 GMT+02:00 Yuriy Tymchuk :
>>
>>> Hi,
>>>
>>> what is the status of Coral? I’ve heard that someone is supposed to work
>>> on it, but even the main webpage I know is down:
>>> http://rmod.lille.inria.fr/coral/
>>>
>>> Uko
>>>
>>
>>
>>
>


Re: [Pharo-users] Don't understand Array creation syntax

2016-06-14 Thread Damien Pollet
I don't understand what you've understood…

Parentheses need to be paired for the outer literal array to be recognized.

Technically, opening parentheses could become elements, but not closing
parentheses, since then there would be nothing to close the literal array.
And it would be strange to read if you could have several ((( but only one
) at the end.

Instead, pairs of parentheses enclose an array, which is nice because it
makes it possible to have literal arrays as elements inside literal arrays.
If you want a single parenthesis as an element, you have to explicitly
write is using the symbol syntax.

On 14 June 2016 at 12:14, frankl1_miky  wrote:

> So if I understood it well, closing Parenthesis are telling that it's the
> same element in the Array
>
>
>
> --
> View this message in context:
> http://forum.world.st/Don-t-understand-Array-creation-syntax-tp4900533p4900813.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Don't understand Array creation syntax

2016-06-11 Thread Damien Pollet
That's just how the syntax is; it allows to have arrays as elements of
arrays.

Also, to be coherent with what you thought, closing parentheses would have
to become elements as well, and the array would never end.

On 12 June 2016 at 05:23, Franklin Mike  wrote:

> Why the first element of #( ( 1 + 2 ) . 3 ) is #(1 #+ 2) and not #'('.
> Thanks!!
>


Re: [Pharo-users] Retina support in Pharo

2016-05-17 Thread Damien Pollet
On 17 May 2016 at 22:14, Alexandre Bergel  wrote:

> My email was _not_ about judging the community effort, but more on whether
> pharo work on a Retina laptop.
> What happens if Pharo is launched on a retina computer?
>

You get the same thing as on a non-retina display, except instead of each
fuzzy pixel you get a visibly sharper square made of 2×2 retina pixels.
>From sufficiently far away there's no difference, but when you're right in
front of it you can see the pixelation, especially for text and compared to
HiDPI-enabled apps in nearby windows.


Re: [Pharo-users] [ANN] Arff generator for Pharo

2016-04-25 Thread Damien Pollet
So, ARFF is the file format… I propose that an OO modeling of it should be
named the Attribute-Relation Graph Hierarchy

:D

On 25 April 2016 at 13:37, Julien Delplanque  wrote:

> Hello everyone,
>
> For a university project in ''Datamining and Datawarehousing'', I have to
> convert data stored as text files in different formats to the Weka[1] ARFF
> format[2].
>
> I did it with Pharo of course! :)
>
> So, I wrote this little project [3] to share what I have done with you,
> just in case someone else needs to export data from Pharo objects to an
> ARFF string for further analysis with Weka.
>
> Cheers,
>
> Julien
>
> Links:
>
> [1] Weka's website: http://www.cs.waikato.ac.nz/ml/weka/
>
> [2] ARFF format spec: https://weka.wikispaces.com/ARFF
>
> [3] Arff generator for Pharo: https://github.com/juliendelplanque/Arff
>
>
>
>


Re: [Pharo-users] meaning of #workingDirectory in in-memory file system

2016-04-21 Thread Damien Pollet
In a unix system, there is only one filesystem. Meaning: if you have
several disks or partitions, either they are mounted in The Unique
Filesystem, or they are not mounted and are just a blob of some gigabytes.
The working directory is a per-process property, not per-filesystem.
(except that windows has a current directory per drive letter, IIRC…)

In the case of memory filesystems, since they are useful for temporary
stuff or for testing things on files without side effects on disk, you
could see them as a sandbox where any starting point is acceptable. Or
maybe we need a concept of a use session for a filesystem, and then the
working directory is a property initialized when the use session is
instantiated.

On 21 April 2016 at 20:13, Peter Uhnák  wrote:

> fs := FileSystem memory.
> fs workingDirectory  "memory:///".
>
> What is the conceptual meaning of #workingDirectory here?
> Shouldn't it just throw an error for memory FileStore as it makes no
> sense? I.e. I didn't launch any image from memory.
>
> Peter
>
>


Re: [Pharo-users] [Pharo-Users] Symbolic links

2016-04-20 Thread Damien Pollet
Specifically, there is DiskStore>>isSymlink: but the FilePlugin doesn't
seem to have a primitive for the readlink(2) function of the libc

On 20 April 2016 at 15:53, Valentin Ryckewaert <
valentin.ryckewa...@gmail.com> wrote:

> Hello everyone,
>
> does someone know a way to get the real path of a symlink?
>
> I explain:
> -I have a file '/home/aPath/test.txt'
> -I have a symlink '/home/aPath/link' pointing on test.txt
> I would like to see if the symlink really point on the file and may be,
> get  the real path of it, is there a way to do it?
>
> If someone have more information I would like to discuss about it ! :)
>
> Valentin
>


Re: [Pharo-users] Any hope for Smalltalk on Raspberry Pi?

2016-04-17 Thread Damien Pollet
http://stephane.ducasse.free.fr/FreeBooks.html
and in the middle is
Smalltalk-80: The Language and its Implementation


On 17 April 2016 at 19:37, Alistair Grant  wrote:

> On Sun, Apr 17, 2016 at 09:52:54AM +0200, stepharo wrote:
> > ...
> > check the new blue book on my web page to get an idea
>
> Would you mind providing a link?
>
> Thanks,
> Alistair
>
> P.S.  Does anyone know what happened to Glenn Krasner post ParcPlace?
> One of the nicer people I've met in my life and I'd be interested to
> know.  Thanks.
>
>


Re: [Pharo-users] Load a project from GitHub with command line

2016-04-17 Thread Damien Pollet
On 17 April 2016 at 16:47, Thierry Goubier 
wrote:

> In fact it is there, but indirect (you can give a $WHERE when you create a
> remote git repository with Monticello: it's the name parameter).
>

But I'd have to somehow create the monticello repo then pass it to
metacello?


> But, if we focus on the $WHERE more directly, what would you like?
>
> - A per-url/per-project SWHERE? It could make the url syntax a bit hard
> (there is already a $: to indicate branch and, implicitely, subdirectory
> inside the git repo) but there is nothing forbidding it. Something like:
> 'gitfiletree://
> github.com/dalehenrich/filetree:pharo5.0/repository/?where=/home/username/project/filetree'
> (is that a correct url syntax?)
>

Yes, per-project.

My use-case is I often clone repos with a different name than they have on
github (e.g. I took the convention that my github repos are named
pharo-something so that they stand out, but locally I don't care too much
about the pharo- prefix. I could also imagine a myproject/dependencies/
subdirectory, where all clones of accessory projects would go.

About the URL, I'm not sure the colon used for branch/subdir is really
correct; usually that's the role of the fragment, no?
https://url.spec.whatwg.org/#url-syntax

Does this have to be specified in the URL? Conceptually, the monticello
repo that should be created/used is gitfiletree://imageDirectory/$WHERE.
Metacello does have to know from which git remote URL to do the clone, but
that's not the same thing as the filetree repo per se.


>   - Note that I have a procedure for having the Pharo build environment
> integrated inside the git, if you'd like (i.e. git clone download also the
> build command for the right Pharo image: this is my professional setup).
>

In fact my current project is trying to do exactly that: a command-line
tool that knows which base image to get, which VM to run it with, which
baselines to get / load, etc. — and as a preemptive heads-up, I already
have a name for it: fari (italian for "lighthouses" and esperanto for "to
do"; fari.st would even look like faristo = maker


Re: [Pharo-users] Load a project from GitHub with command line

2016-04-17 Thread Damien Pollet
Is there a convenient way to control where the clone will be made in the
local filesystem?
Meaning: using something else than the implicit value for $WHERE:

git clone $GITHUB_CLONE_URL $WHERE


On 15 April 2016 at 19:08, Thierry Goubier <thierry.goub...@gmail.com>
wrote:

> Le 15/04/2016 18:49, Damien Pollet a écrit :
>
>> On 15 April 2016 at 17:39, Thierry Goubier <thierry.goub...@gmail.com
>> <mailto:thierry.goub...@gmail.com>> wrote:
>>
>> And then you can load your project with:
>>
>> Metacello new
>>  baseline: 'YourTribes';
>>  repository: 'gitfiletree://
>> github.com/HappyPharoHackers/YourTribes';
>>  load: #(tests)
>>
>>
>> So this does the clone directly from github? YAY :D
>>
>
> Yes :)
>
> Thierry
>
>
>


Re: [Pharo-users] Any hope for Smalltalk on Raspberry Pi?

2016-04-17 Thread Damien Pollet
libusb seems to be plain C, so it would make a nice use-case for uFFI

http://www.libusb.org

There was an attempt at making a binding last year:
https://www.mail-archive.com/pharo-users@lists.pharo.org/msg17312.html

On 17 April 2016 at 12:15, Peter Uhnák  wrote:

> This seems relevant:
>
> https://medium.com/concerning-pharo/pharo-pi-9eef257b6a21#.ay5v86peq
> https://www.youtube.com/watch?v=sfxFqQIuawg
>
> Peter
>
> On Sun, Apr 17, 2016 at 9:52 AM, stepharo  wrote:
>
>> First hello and welcome to Pharo.
>>
>> Second can you be clear about what you want to achieve?
>>
>>
>> I have Squeak on a RPi but I don't know how to access any USB peripherals
>>> or how to make primitives to do so. I want to use RPi for controlling a
>>> microcontroller and processing webcam video for my robot.
>>>
>> That would be really nice.
>>
>>> If I can't get that in Smalltalk can it be added
>>>
>> I do not know RPi
>> the system can be extended
>> - adding a vm pluging (check the new blue book on my web page to
>> get an idea)
>> - doing an FFI call (now I do not know the status of the FFI on
>> rasp)
>>
>> or what language should I move to?
>>>
>>> I was referred to
>>> http://car.mines-douai.fr/category/software/pharos/
>>> but I can't get it to work on RPi.
>>>
>> What are the exact problems you face?
>> Because this is a bit short.
>>
>>>
>>> A major focus of RPi is to teach electronics but without access to the
>>> peripherals, Smallltalk is not useful.  But some access is available in
>>> Scratch which is built on top of Squeak so why can't I get access to that
>>> code directly instead of going through the Scratch changes file?
>>>
>> I do not know. May be this is just one pluging missing.
>> Did you check Phratch?
>>
>>
>> Why can't I get Smalltalk goodies like I used to buy from Digitalk?
>>>
>> You see:
>> - the world got more complex we provide vm for OSX, iOS, Windows
>> (different flavors), rasp, android, linux (different flavors),
>> - second so far Pharo is free. Now you can help either by offering
>> some time or putting money for a bounty on the table
>> - third we are really busy making sure that Pharo 5.0 is on time and
>> robust.
>>
>>> With all the VM work, there must be a way to hook up C++ code like
>>> OpenCV to do real time video contours and other image recognition
>>> algorithms.
>>>
>> Forget about C++ the binary is not standard. You have to wrap the C++
>> library into a C program and you could used (now it changed because
>> we do not use nativeboost anymore).
>>
>> Dolphin has a somewhat easy way to add primitives.
>>>
>> Pharo too.
>>
>> You should read the uFFI draft documentation. Check the mail if was sent
>> recently.
>>
>>
>>> If Squeak all in one contains package bundles only for Mac, why not
>>> include essentials for RPi?
>>>
>>
>>
>>
>


Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread Damien Pollet
On 16 April 2016 at 11:33, kmo  wrote:

> /Pharo is yours, so you can add it. :)/
>
> Yes, but I don't want to add it. I expect it to be there out of the box.
>

If you expect a perfect system out of the box, you will never get it.


> think it's quite enough work for me to add my own code on window close. I
> don't want to have to write the framework for doing it as well.
>

Point is, it's not by design if the feature you're asking for is absent out
of the box; nobody in Pharo decided you should HAVE to implement it
yourself. I think everyone agrees that the platform should provide that
feature, however everyone is focused on different issues, and you seem to
be the first one for whom it's an itch worth scratching. It's open-source,
so the system is yours too and it's the responsibility of everyone to
improve it.

If you really need the feature but don't want to implement it yourself, you
could sponsor someone via the Pharo association or the consortium.


Re: [Pharo-users] Load a project from GitHub with command line

2016-04-15 Thread Damien Pollet
On 15 April 2016 at 17:39, Thierry Goubier 
wrote:

> And then you can load your project with:
>
> Metacello new
> baseline: 'YourTribes';
> repository: 'gitfiletree://github.com/HappyPharoHackers/YourTribes';
> load: #(tests)
>

So this does the clone directly from github? YAY :D


Re: [Pharo-users] First impressions, was About Box

2016-04-13 Thread Damien Pollet
Heh. The last days I've had a look at Coral… my current goal is to remove
the dependency to PetitParser from the argument parser, and to re-integrate
that with the commandline handler system of the image. But that's only one
part…

On 14 April 2016 at 01:43, Ben Coman  wrote:

> On Wed, Apr 13, 2016 at 1:51 AM, Alistair Grant 
> wrote:
>
> > * I'm glad that being able to run headless mode is easy, as I'd like to
> >   use Pharo for scripting.
>
> I'm not sure of its status, but Coral was some experiments along this
> line...
> https://www.youtube.com/watch?v=HLb_rMcNN6k
>
> > * I'm still getting used to the idea of the entire ST environment being
> >   in a single OS window, but at the moment I think I prefer VW's
> >   approach where each ST window is a OS window, as it makes it easier to
> >   work with other applications, e.g. if I want to look at an email or
> >   web page while working within ST.
>
> This will become more possible over time as some native window
> management is being moved out of VM into the Image.
>
> cheers -ben
>
>


Re: [Pharo-users] Conditional external dependencies in a Metacello BaselineOf?

2016-04-12 Thread Damien Pollet
Oh, nice!

Just to be sure, because 2:15am is not the best time to start playing with
code… if I understood correctly, I'd load the depended-upon baseline from
gitfiletree, lock it, and then that would take precedence over the
github:// repo specified in the baseline of the main project?

I'll try tomorrow, thanks :)

On 13 April 2016 at 00:38, Dale Henrichs <dale.henri...@gemtalksystems.com>
wrote:

> Damien,
>
> You want to use a a lock[1]. Look at the section on locking a
> `filetree://` repo [2]--- should be similar for locking your gitfiletree
> repo ...
>
> When you load you may want to use `onWarningLog`, because locks do
> generate Warnings telling you the the lock is being honored (i.e., the load
> is taking place from the local clone, not github as specified in the
> baseline) ...
>
> Dale
>
> [1]
> https://github.com/dalehenrich/metacello-work/blob/master/docs/LockCommandReference.md#lock-command-reference
> [2]
> https://github.com/dalehenrich/metacello-work/blob/master/docs/LockCommandReference.md#lock-the-projects
>
>
> On 04/12/2016 11:18 AM, Damien Pollet wrote:
>
>> I have a couple projects that I develop together; the first depending on
>> the second, and both managed on GitHub (in separate repositories).
>>
>> The BaselineOf therefore expresses the dependency using repository:
>> 'github://…'
>> However, I'd like to locally change that to gitfiletree:// so that I can
>> build new development images from scratch, with both projects ready to
>> commit to gitfiletree, with minimal repo juggling and code reloading ?
>>
>> Is there a way to achieve that? Metacello project attributes? a git
>> submodule?
>>
>> --
>> Damien Pollet
>> type less, do more [ | ] http://people.untyped.org/damien.pollet
>>
>
>
>


[Pharo-users] Conditional external dependencies in a Metacello BaselineOf?

2016-04-12 Thread Damien Pollet
I have a couple projects that I develop together; the first depending on
the second, and both managed on GitHub (in separate repositories).

The BaselineOf therefore expresses the dependency using repository:
'github://…'
However, I'd like to locally change that to gitfiletree:// so that I can
build new development images from scratch, with both projects ready to
commit to gitfiletree, with minimal repo juggling and code reloading ?

Is there a way to achieve that? Metacello project attributes? a git
submodule?

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] New project: AR.Drone communication API in Pharo

2016-04-10 Thread Damien Pollet
On 10 April 2016 at 06:32, Ronie Salgado  wrote:

> In SDL2 there are also two APIs for joysticks, the Joystick API and the
> GameController API


Is this the same as Apple's GameController.framework?
I happen to have a SteelSeries Stratus XL gamepad that works with it, if we
need tests or demos…


Re: [Pharo-users] How to determine if a file is hidden

2016-04-09 Thread Damien Pollet
On 10 April 2016 at 00:13, Robert J Rothwell  wrote:

> Should I be able to use OSWindows to use getfileinfo from within pharo?


No, to run external programs, the package you want is OSSubProcess.


Re: [Pharo-users] How to determine if a file is hidden

2016-04-09 Thread Damien Pollet
Hidden in what sense?

On Linux, files whose name start with a period are "hidden" (by convention,
many commands ignore them)

On OS X, files and directories that are hidden to the Finder have a special
attribute in the file system. I don't think there's an accessor for that in
Pharo yet, but as a workaround you can use the system command GetFileInfo
to check the state of the invisibility flag (v):

GetFileInfo -a v /Applications
# should echo 0 (invisibility flag not set)

GetFileInfo -a v /bin
# should echo 1


On 9 April 2016 at 21:12, Robert J Rothwell  wrote:

> Hello,
>
> Is there a way to determine if a file is hidden?  I couldn't find that in
> "Deep into Pharo".
>
> For example, I can get my desktop files with:
>
> desktopFiles := FileLocator desktop children.
>
> And now I would like to filter that collection to the non-hiddent files
> with something like:
>
> desktopFiles select: [:each | each isHidden not ]
>
> But there doesn't seem to be anything like "isHidden" for a FileLocator
> object.
>
> Thank you,
>
> Rob Rothwell
>
>


Re: [Pharo-users] FFI return by reference

2016-04-07 Thread Damien Pollet
I think in that case you need to pass an instance of FFIExternalValueHolder.

On 7 April 2016 at 17:42, Thibault Raffaillac 
wrote:

> Hi again,
>
> Does anyone know what is the state of return by reference in FFI?
> Example:
> glGetAttribute: attr into: value
>  errorCode>
> ^ self nbCall: #( int SDL_GL_GetAttribute(SDL_GLattr attr, int
> *value) )
>
> On my image (50666) it does nothing on value yet (if nil, remains nil, if
> SmallInteger 0, remains 0).
> (SDL2 glGetAttribute: 6 into: value) should return 16.
> I've seen NBOpenGL put "out" before value in method header, should it
> matter? (does not make it work though)
> Last but not least, should we attach '*' to the type or variable for FFI
> to understand it is a pointer?
>
> Cheers,
> Thibault Raffaillac
>
>


Re: [Pharo-users] GTSpotter fuzzy search

2016-03-29 Thread Damien Pollet
I just translated an algo that was guessed from Sublime Text:
https://blog.forrestthewoods.com/reverse-engineering-sublime-text-s-fuzzy-match-4cffeed33fdb

The code is not too pretty (one 54-line method) but it seems to give the
same scores as the online demo. We can have a look in Namur or during a
sprint :)

On 10 March 2016 at 03:13, Damien Pollet <damien.pollet+ph...@gmail.com>
wrote:

> +1
>
> I wanted to copy the algo from selecta but never got to it…
> https://github.com/garybernhardt/selecta/blob/master/selecta
>
> On 9 March 2016 at 20:51, Tudor Girba <tu...@tudorgirba.com> wrote:
>
>> Hi,
>>
>> Would you like to try to propose a implementation for this? This would
>> fit as a subclass of GTFilter?
>>
>> Cheers,
>> Doru
>>
>>
>> > On Mar 9, 2016, at 4:04 PM, Peter Uhnák <i.uh...@gmail.com> wrote:
>> >
>> > Would be possible to have fuzzy-search?
>> > Or rather Pascal-based search?
>> >
>> > RTAE -> RTAbstractExample
>> > BCF -> BlConfigurableFormatter
>> >
>> > etc.
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "Every successful trip needs a suitable vehicle."
>>
>>
>>
>>
>>
>>
>>
>


Re: [Pharo-users] [Metacello] Apparent loop in before / after ....

2016-03-26 Thread Damien Pollet
looks like you forgot something :D

On 26 March 2016 at 21:56, stepharo  wrote:

> hi dale
>
> I'm working a pretty large configuration and I got the following error
> messsage (and I do not understand I cannot debug).
> Do you have any suggestion because I did not even know that this error
> exist before.
> I disabled the validation of the config because it validates packages that
> I cannot modify such as XML or SMark.
>
> Stef
>
>
>
>


Re: [Pharo-users] OpenGL project

2016-03-26 Thread Damien Pollet
On 26 March 2016 at 18:44, Thibault Raffaillac  wrote:

> Homebrew should place the GLFW folder in /usr/local/include, and cc should
> list it among include directories with -v
>

No. It should put them in `brew --prefix`/include, which only happens to be
/usr/local/include if you followed homebrew's default installation
instructions. If you have pkg-config installed, you can use it to determine
the correct preprocessor and linker flags to the compiler, like so:

pkg-config --cflags --libs glfw3


Re: [Pharo-users] OpenGL project

2016-03-24 Thread Damien Pollet
Can you include a proper build script?

cc --std=c99 -Wall --pedantic -I/opt/homebrew/Cellar/glfw3/3.1.2/include
 -L/opt/homebrew/Cellar/glfw3/3.1.2/lib -lglfw3  minimal-glfw.c   -o
minimal-glfw
minimal-glfw.c:15:5: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
256,   0, // top point
^~~~
{   }
minimal-glfw.c:16:5: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
512, 256, // right point
^~~~
{   }
minimal-glfw.c:17:5: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
256, 512, // bottom point
^~~~
{   }
minimal-glfw.c:18:7: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
  0, 256}; // left point
  ^~
  { }
4 warnings generated.
Undefined symbols for architecture x86_64:
  "_glAttachShader", referenced from:
  _main in minimal-glfw-368070.o
  "_glBindBuffer", referenced from:
  _main in minimal-glfw-368070.o
  "_glBufferData", referenced from:
  _main in minimal-glfw-368070.o
  "_glClear", referenced from:
  _main in minimal-glfw-368070.o
  "_glClearColor", referenced from:
  _main in minimal-glfw-368070.o
  "_glCompileShader", referenced from:
  _main in minimal-glfw-368070.o
  "_glCreateProgram", referenced from:
  _main in minimal-glfw-368070.o
  "_glCreateShader", referenced from:
  _main in minimal-glfw-368070.o
  "_glDrawArrays", referenced from:
  _main in minimal-glfw-368070.o
  "_glEnableVertexAttribArray", referenced from:
  _main in minimal-glfw-368070.o
  "_glGenBuffers", referenced from:
  _main in minimal-glfw-368070.o
  "_glGetAttribLocation", referenced from:
  _main in minimal-glfw-368070.o
  "_glLinkProgram", referenced from:
  _main in minimal-glfw-368070.o
  "_glShaderSource", referenced from:
  _main in minimal-glfw-368070.o
  "_glUseProgram", referenced from:
  _main in minimal-glfw-368070.o
  "_glVertexAttribPointer", referenced from:
  _main in minimal-glfw-368070.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [minimal-glfw] Error 1

On 24 March 2016 at 17:59, Thibault Raffaillac  wrote:

> Hi,
>
> Some progress on the OpenGL project:
> _ I read much of the sources around NBOpenGL, the architecture looks nice
> to me, so will keep it, but am actually considering to strip it to OpenGL
> ES 2! This is a subset of OpenGL, but is supported on more platforms
> (Android, iOS, RPi), and will be easier to maintain in the long term.
> _ A working minimal demo in C (
> https://drive.google.com/file/d/0B6Y_O5MtrUaEbXFjTGhUcTZwY3M/view?usp=sharing
> )
> _ SDL2 gave me some headaches (2~3 seconds to start & open a window, could
> not properly display the title bar, displays big ugly pixels on retina
> screen, could not test it in Pharo since it did not find library file). So
> I tried GLFW and LOVE IT (starts fast, handles the pixel density problem
> nicely, amazing documentation). I will work to bind it with FFI.
> _ Anybody else working on porting NBOpenGL? I am rather slow, so if we can
> sync work would be perfect :)
>
> Cheers,
> Thibault
>
> > --
> >
> > Message: 2
> > Date: Sat, 12 Mar 2016 09:06:36 +0100
> > From: stepharo 
> > To: pharo-users@lists.pharo.org
> > Subject: Re: [Pharo-users] OpenGL project
> > Message-ID: <56e3ce0c.1010...@free.fr>
> > Content-Type: text/plain; charset=windows-1252; format=flowed
> >
> > Check bloc under Moose in the CI
> > there is a little class with the binding.
> >
> > Stef
> >
> > Le 11/3/16 13:22, Thibault Raffaillac a ?crit :
> > > Hi,
> > >
> > > I would like to do a bit of OpenGL in Pharo, but it does not seem to
> work
> > > at the moment.
> > >
> > > Tried NBOpenGL with a spur image (50560):
> > > _ fails at installation from configuration browser (need to click
> again on
> > > installing to get all classes)
> > > _ demo "GLTTRenderingDemo new openInWorld" fails at NBGLContextDriver
> with
> > > error "No suitable implementation found for initializing OpenGL context
> > > for your platform" (running on a Mac)
> > >
> > > Tried with a pre-spur image (50496):
> > > _ same weirdness at installation
> > > _ demo fails at NBGLCurveRenderer with "MessageNotUnderstood: receiver
> of
> > > on: is nil"
> > >
> > > Is there a working demo available out there? I have worked a lot with
> > > OpenGL ES 2.0 and could definitely provide work on the topic.
> > >
> > > Cheers,
> > > Thibault
> > >
>
>


Re: [Pharo-users] patterns for representing enumerations/constants

2016-03-23 Thread Damien Pollet
On 23 March 2016 at 18:40, Peter Uhnák  wrote:

> Why / how ?
>>
>
> As explained in the first example.
>
> Try adding #organization or #package methods to the class-side.
>

I'd rather have selector namespaces to remove homonymy conflicts…


Re: [Pharo-users] patterns for representing enumerations/constants

2016-03-23 Thread Damien Pollet
On 23 March 2016 at 17:49, Peter Uhnák  wrote:
>
> Color red.
>> Color blue.
>>
>> Unfortunately this doesn't scale, because putting unary methods on the
>> class-side is a good way to break your image.
>>
>
Why / how ?


Re: [Pharo-users] Pharo launcher in homebrew cask

2016-03-22 Thread Damien Pollet
FYI I was also thinking of creating a homebrew tap for pharo (VM etc).
Still at the draft stage, unfortunately.

On 22 March 2016 at 13:00, Damien Cassou  wrote:

> Filip Krikava  writes:
>
> > I find Pharo launcher incredibly useful and I was surprised not to find
> it
> > in homebrew cask [1]. Pharo itself is there. I have therefore created a
> PR:
> > https://github.com/caskroom/homebrew-cask/pull/19956
>
> I don't know homebrew-cask but I imagine that it is better to reference
> stable files on the web rather than continuously changing files. At
> least, that's true for the package manager I package(d) for. If that's
> also the case here, I would recommend to use a file from:
>
> http://files.pharo.org/platform/launcher/blessed/
>
> Files there don't change. If you are interested, I can move OS X releases
> there the same way I do it for Linux releases.
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm." --Winston Churchill
>
>


Re: [Pharo-users] extracting segments in an array

2016-03-20 Thread Damien Pollet
SequenceableCollection mostly, but possibly streams as well

On 19 March 2016 at 21:21, Hernán Morales Durand <hernan.mora...@gmail.com>
wrote:

> Hi Damien,
>
> I didn't understood, which kind of sequences?
>
>
> 2016-03-19 7:40 GMT-03:00 Damien Pollet <damien.pollet+ph...@gmail.com>:
>
>> Yeah if we redesign the String API it should account for Arrays and
>> probably other kinds of sequences too…
>>
>> On 19 March 2016 at 11:28, stepharo <steph...@free.fr> wrote:
>>
>>> copyFrom:to:
>>>
>>> Stef
>>>
>>> Le 19/3/16 11:22, stepharo a écrit :
>>>
>>> Hi
>>>>
>>>> I have an array and I would like to extract a segment of elements and I
>>>> did not find
>>>>
>>>> array from: start to: end
>>>>
>>>> Did I miss something obvious?
>>>>
>>>> Stef
>>>>
>>>>
>>>>
>>>
>>>
>>
>


Re: [Pharo-users] Use Shell Command from Pharo

2016-03-19 Thread Damien Pollet
On 19 March 2016 at 16:45, Peter Uhnák  wrote:

> I don't actually see the reason why it should assume root folder if you
> don't specify a path… that's stupid on many levels (I blame mac).
>

It's root because that's where the system launches applications from, when
you double-click them in the Finder (or via the open command, I think).
You'll see that GUI-launched images do not inherit your shell environment
either.

However, if you run pharo from command-line, you get the usual unix
behavior.


> On Linux you get home, although that's imho also wrong and it should use
> the folder of the image… but maybe that's a misconfiguration of OSProcess.
>

No, it's the same logic than on Mac (albeit $HOME is arguably a little more
sensible than the filesystem's root).

I'm not sure what's the correct behavior here, unless there is a way to
know if pharo was launched from GUI (where working directory is meaningless
and pharo should probably chdir() to the image directory) or from
command-line (where the working directory is meaningful and should be
honored. On OSX, maybe there's a way to pass GUI-specific arguments,
through the Info.plist file?


Re: [Pharo-users] [Pillar] Logo for Pillar

2016-03-19 Thread Damien Pollet
A simple test for logos is: make it tiny (~20 pixels high = the favicon of
a website) and it should still work (meaning it should be visible, legible,
and recognizable). Even better if just a monochrome silhouette still works.

Try that with the logos of major brands.

On 18 March 2016 at 19:30, Offray Vladimir Luna Cárdenas <
offray.l...@mutabit.com> wrote:

> I share the impressions of Cyril here. The relation between the "P" and
> the rest of the "illar" seems too much disproportionate. The second pillar
> doesn't help with readability and I know about Pharo things kind of "sea"
> related, but I would try to focus more on known pillars like [1] or [2] as
> a base for abstractions instead of the ones behind the piers.  Logos are
> difficult and you're making a great work with the code, so is nice to that
> you're taking the feedback also with the art of Pillar.
>
> [1] https://en.wikipedia.org/wiki/File:Colonne-p1040009.jpg
> [2] https://en.wikipedia.org/wiki/File:Schema_Saeulenordnungen.jpg
>
> Cheers,
>
> Offray
>
>
> On 18/03/16 11:43, Cyril Ferlicot wrote:
>
> Hi,
>
> Personally I do not like it. (Maybe I'm difficult :) ).
>
> I think that it would be better to have the "illar" at the bottom and not
> compressed in the middle.
>
> The second column look like an "y" and we read "Pillary".
>
> And why is there a wave under pillar?
> I think that things in a logo have to be symbolic and I do not find
> anything from the wave.
>
> Anyway, thank you to invest your time in pillar :)
>
> On Friday, 18 March 2016, Thibault ARLOING < 
> thibault.arlo...@hotmail.fr> wrote:
>
>> Hi,
>>
>>
>> With a mate, we've worked on a logo for Pillar.
>>
>> We just want feedbacks on it.
>>
>>
>> You can fin the logo join files.
>>
>>
>> thanks :)
>>
>>
>> Good afternoon,
>>
>> Thibault
>>
>
>
> --
> Cheers
> Cyril Ferlicot
>
>
>


Re: [Pharo-users] extracting segments in an array

2016-03-19 Thread Damien Pollet
Yeah if we redesign the String API it should account for Arrays and
probably other kinds of sequences too…

On 19 March 2016 at 11:28, stepharo  wrote:

> copyFrom:to:
>
> Stef
>
> Le 19/3/16 11:22, stepharo a écrit :
>
> Hi
>>
>> I have an array and I would like to extract a segment of elements and I
>> did not find
>>
>> array from: start to: end
>>
>> Did I miss something obvious?
>>
>> Stef
>>
>>
>>
>
>


Re: [Pharo-users] GTSpotter fuzzy search

2016-03-09 Thread Damien Pollet
+1

I wanted to copy the algo from selecta but never got to it…
https://github.com/garybernhardt/selecta/blob/master/selecta

On 9 March 2016 at 20:51, Tudor Girba  wrote:

> Hi,
>
> Would you like to try to propose a implementation for this? This would fit
> as a subclass of GTFilter?
>
> Cheers,
> Doru
>
>
> > On Mar 9, 2016, at 4:04 PM, Peter Uhnák  wrote:
> >
> > Would be possible to have fuzzy-search?
> > Or rather Pascal-based search?
> >
> > RTAE -> RTAbstractExample
> > BCF -> BlConfigurableFormatter
> >
> > etc.
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Every successful trip needs a suitable vehicle."
>
>
>
>
>
>
>


Re: [Pharo-users] NativeBoost replacement?

2016-03-06 Thread Damien Pollet
Wait for Esteban to notice this mail :)

On 6 March 2016 at 23:54, Hernán Morales Durand <hernan.mora...@gmail.com>
wrote:

> Hi Damien,
>
> I installed FFI-NB as follows:
>
> Gofer it
> smalltalkhubUser: 'Pharo' project: 'FFI-NB';
> configurationOf: 'FFINB';
> loadStable
>
> And found the following methods are missing from NBWin32Window:
>
>
> createWindowExA:lpClassName:lpWindowName:dwStyle:x:y:width:height:hWndParent:hMenu:hInstance:lParam:
>
> createWindowExW:lpClassName:lpWindowName:dwStyle:x:y:width:height:hWndParent:hMenu:hInstance:lParam:
> ffiCalloutOptions
> getActiveWindow
> getCapture
> getClipboardOwnerWindow
> getClipboardViewer
> getDesktopWindow
> getForegroundWindow
> getWindowFromPoint:
>
> Should I try something else?
>
> Hernán
>
>
>
> 2016-03-06 18:10 GMT-03:00 Damien Pollet <damien.pollet+ph...@gmail.com>:
>
>> The replacement is http://smalltalkhub.com/#!/~Pharo/FFI-NB
>>
>> The API should be mostly if not completely compatible. If not tell us, as
>> I need to adapt my ESUG 2013 tutorial :)
>>
>> On 6 March 2016 at 21:18, Hernán Morales Durand <hernan.mora...@gmail.com
>> > wrote:
>>
>>> Hi guys,
>>>
>>> I am porting packages which uses NativeBoost in Pharo <= 4 to Pharo 5
>>> (update: #50628). Since NB is not supported anymore I would like to know
>>> which is the replacement of such library.
>>>
>>> I found FFI is loadable in Pharo 5, but methods like
>>> #getForegroundWindow are missing.
>>> Even worst, when I try to browse a method like
>>>
>>> #shellExecute:lpOperation:lpFile:lpPrameters:lpDirectory:nShowCmd:
>>>
>>> with any tool (Nautilus, Finder, etc) I get a MessageNotUnderstood:
>>> RubShoutStylerDecorator>>disableDrawingWhile:
>>>
>>> What's your recommendation?
>>>
>>> Cheers,
>>>
>>> Hernán
>>>
>>>
>>
>


Re: [Pharo-users] I wish there were ePUB versions of Pharo books

2016-02-25 Thread Damien Pollet
ePub export should be pretty easy to add to Pillar, based on the existing
html export. Any volunteers ?

Le jeudi 25 février 2016, MartinW <w...@fastmail.fm> a écrit :

> I like Pharo's new book site: http://files.pharo.org/books/
>
> And since I use a tablet more often, I wish there were ePUB versions of the
> books.
>
> Why is it important?
> You could change the color scheme to light text on dark background and
> increase font sizes and thus have a much more comfortable reading
> experience
> than with PDFs.
>
> I remember there was some talk about this some time ago.
>
> Best regards,
> Martin.
>
>
>
> --
> View this message in context:
> http://forum.world.st/I-wish-there-were-ePUB-versions-of-Pharo-books-tp4880836.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


Re: [Pharo-users] What are immediate subclass and word variable subclass?

2016-02-17 Thread Damien Pollet
Immediate means it's stored in the OOP itself, like SmallInteger in 32 bits.
Variable word is like variable byte (ByteArray) I suppose, variable size,
with indices instead of named instance variables, but each index points to
a full word (I guess either 32 or 64bit depending on the VM)

On 17 February 2016 at 16:30, Alexandre Bergel 
wrote:

> Hi!
>
> I have stumbled on:
>
> Float immediateSubclass: #SmallFloat64
> instanceVariableNames: ''
> classVariableNames: ''
> package: 'Kernel-Numbers’
>
>
> Float variableWordSubclass: #BoxedFloat64
> instanceVariableNames: ''
> classVariableNames: ''
> package: 'Kernel-Numbers’
>
>
> What are immediate subclass and word variable?
>
> Cheers,
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>


Re: [Pharo-users] Use cases for methods with optional parameters

2016-01-29 Thread Damien Pollet
On 30 January 2016 at 00:29, David Allouche  wrote:

> What do you mean by "fluid api"?


I suppose https://en.wikipedia.org/wiki/Fluent_interface

An API that enables / encourages chaining messages in one expression.
Smalltalk's message cascades and the default of returning self both help
with that.


Re: [Pharo-users] Idea: Pharo application scaffold kickstarter

2015-05-27 Thread Damien Pollet
I have the same itch for simple images; get.pharo.org and PharoLauncher
nearly scratch it, except that I work mostly from the terminal.

For instance I'd like to be able to quickly rebuild an image from a
configuration, with some workspaces, setting up some MC repositories, etc.
For seaside apps I guess you'd want some standard directories and files to
be created as well. Could you document your best practices?

On 27 May 2015 at 13:37, Andreas Brodbeck da...@mindclue.ch wrote:

 Hi all

 I get used to Pharo more and more, and I am using it for all my new
 customer projects. So far, all of my (seaside) applications are all
 architectured around some of my best practices and architecturally look all
 pretty the same.

 I was wondering if there is something existing to help me getting
 kickstarted with a new customer application in Pharo, instead of
 repeatingly copy/pasting manually from another project? Something for
 kickstarting a new application scaffold, based on a best practices
 application template (to be chosen out of many from a repository locally
 or even remotely shared from other developers).

 Something like a Pharo application scaffold kickstarter.

 I did some research and did not find anything so far. What are your
 thoughts around this topic?

 Cheers,
 Andreas

 --
 Andreas Brodbeck
 www.mindclue.ch





Re: [Pharo-users] PharoCommonTools methods

2015-05-25 Thread Damien Pollet
On 25 May 2015 at 19:34, Matthieu Lacaton matthieu.laca...@gmail.com
wrote:

 What is the main purpose of doing this instead of actually implementing a
 method ?


Being lazy: #doesNotUnderstand is implemented only once, independent of the
number of different tools that will be added in the future.


Re: [Pharo-users] String operations

2015-04-09 Thread Damien Pollet
Indeed, there is much to say about the String API :)
Thanks for mentioning this, I'm gathering missing behavior like this !

On 8 April 2015 at 17:56, Norbert Hartl norb...@hartl.name wrote:


 Am 07.04.2015 um 21:31 schrieb Peter Uhnák i.uh...@gmail.com:


 'BormParticipant' allButFirst: 4

 ('BormParticipant' splitOn: 'Borm') last

 Thank you both, this will work. :)

 In the Moose configuration, there is a CollectionExtensions that allows
 you to do this:
 'BormParticipant' removePrefix: 'Borm' - 'Participant'.
 'BormParticipant' removeSuffix: 'Participant' - 'Borm'

 For Pharo 5, we should move these extensions to Pharo.

 Isn't it the case that a remove* methods mostly return what has been
 removed? Wouldn't be

 withoutPrefix:
 withoutSuffix:

 I guess withoutPrefix: would probably makes more sense.

 As well as

 allButPrefix:
 allButSuffix:

 but to me the sound of them is weird.

 Norbert




Re: [Pharo-users] what to use for simple parsing

2015-04-02 Thread Damien Pollet
On 31 March 2015 at 17:17, Peter Uhnák i.uh...@gmail.com wrote:

 So at least to me PetitParser feels like a more practical regex library
 than Regex itself.


In which use-cases is Regex less practical?
I'm thinking it could get a builder with a PetitParser-like API in addition
to the current string syntax.


Re: [Pharo-users] Get OS uptime

2015-03-19 Thread Damien Pollet
/proc are entries in the filesystem, as such I don't see why the file
plugin would fail to access them… unless you cannot use block devices and
such like any other file? In Unix, everything is a file, except those that
have to be special-cased apart?


On 19 March 2015 at 13:08, Norbert Hartl norb...@hartl.name wrote:


  Am 19.03.2015 um 11:51 schrieb Esteban Lorenzano esteba...@gmail.com:
 
 
  On 19 Mar 2015, at 11:35, Julien Delplanque jul...@tamere.eu wrote:
 
 
  On 19/03/15 11:10, Esteban Lorenzano wrote:
  '/proc/uptime' asFileReference readStreamDo: [ :stream | stream
 contents ].
 
  is better way.
 
  but you will still get an empty string because actually ‘/proc’ does
 not contains real files… so the file plugin does not applies there (and is
 another debate if it should…)
 
  you should use OSProcess instead (installable from Configurations
 Browser)
 
  (PipeableOSProcess command: 'uptime') upToEndOfFile.
 
  Esteban
  Oh, I didn't know '/proc' doesn't contains real files. I tought there
  were files in this directory since you do 'cat /proc/uptime' in a shell.
 
  that’s the O.S. cheating you :)
 
 Can you elaborate on that statement. What is a real file and why are the
 files in /proc not real?

 Norbert






Re: [Pharo-users] Tables in Pillar

2015-03-05 Thread Damien Pollet
AFAIK, LaTeX does not wrap text in table cells unless you explicitly fix
the column's width.

On 5 March 2015 at 17:21, p...@highoctane.be p...@highoctane.be wrote:

 how does one makes that in LaTeX?
 Le 5 mars 2015 15:20, Damien Cassou damien.cas...@gmail.com a écrit :


 On Feb 27, 2015 3:06 AM, p...@highoctane.be p...@highoctane.be wrote:
 
  How is one doing a cell with content wrapping on multiple lines?
 
  With the
 
  | X | Y
  | abcd | some very long text that should be wrapping but apparently
  doesn't. So it is very annoying when one attempts to describe a long
  thing, which is one purpose for a table.
 
  I get one single line for each entry.
 
  How to do that?

 That's not possible (but contributions are accepted)

 
  TIA
  Phil
 




Re: [Pharo-users] BaselineOf vs ConfigurationOf

2015-02-25 Thread Damien Pollet
Thierry or Dale will confirm, but basically that's the gist of it.

For git projects, you can specify dependencies to all things that refer to
commits in git. So you can depend on a particular commit, on a tag, the tip
of a branch… Therefore the release/version management part of metacello in
ConfigurationOf… becomes mostly irrelevant, since you can encode it in how
you organize and use your git repo.

On 25 February 2015 at 13:47, Peter Uhnák i.uh...@gmail.com wrote:

 Hi,

 can anybody tell me the difference between BaselineOfX and
 ConfigurationOfX? The only thing I've gathered is that BaselineOf is used
 for Git projects, while ConfigurationOf for Monticello projects; but
 usage-wise they seem identical.

 Thanks,
 Peter



Re: [Pharo-users] How to send messages to an object.

2015-02-07 Thread Damien Pollet
What if inspectors and workspaces were able to copy-paste object references?
When pasting, a new binding would be made with some automatic name.

I always wondered why this was not part of Morphic…

On 7 February 2015 at 23:52, Hernán Morales Durand hernan.mora...@gmail.com
 wrote:

 I see! something like?

 self addMorphCentered: (EllipseMorph allInstances detect: [ : i | i name =
 'an EllipseMorph(485752832)' ])


 2015-02-07 19:39 GMT-03:00 Sean P. DeNigris s...@clipperadams.com:

 hernanmd wrote
  Use the halos... select the Menu halo (red) - debug... - explore morph

 Yes, you can bring up an inspector/explorer on each morph, but the hiccup
 is
 how do you connect them i.e. send one as an argument to the other?



 -
 Cheers,
 Sean
 --
 View this message in context:
 http://forum.world.st/How-to-send-messages-to-an-object-tp4804394p4804413.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





Re: [Pharo-users] New book for Pharo :)

2015-01-30 Thread Damien Pollet
Let me demo the release process to the other maintainers, then we'll see ;)

On 30 January 2015 at 18:46, Werner Kassens wkass...@libello.com wrote:

 Hi Damien,
 useful info indeed, thanks. do you intend to do the same with the big
 version?
 werner


 On 01/30/2015 05:45 PM, Damien Pollet wrote:

 I did a proper release of the PDF book on Github:
 https://github.com/SquareBracketAssociates/NumericalMethods/releases





Re: [Pharo-users] Why single inheritance?

2015-01-28 Thread Damien Pollet
Mostly, multiple inheritance is difficult to implement well in a simple
enough form.

The only language I know of that has a reasonably usable version of it is
Eiffel (probably Nit too, but I don't know enough about it
http://nitlanguage.org). There is the diamond inheritance problem, the
problem that inheritance (even in Smalltalk) mixes subtyping (interface
extension) and reuse of implementation, problems of how to linearize method
lookup, etc.


On 28 January 2015 at 16:41, Laura Risani laura.ris...@gmail.com wrote:

 Hi all,

 What is the explanation why Smalltalk designers preferred single
 inheritance+traits to multiple inheritance? Why is the former better than
 the latter?
 Do traits let you share state also or only behavior?

 Best,
 Laura



[Pharo-users] Compatibility of Cypress, FileTree, STIG ?

2015-01-28 Thread Damien Pollet
Hi all,

I'm trying to exchange code between VW and Pharo, but STIG does not seem to
generate the same properties, and puts comment at the start of method files
instead of the method category name, which confuses FileTree on the Pharo
end.

Any suggestions?

-- 
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet


  1   2   >