Re: [Pharo-users] Pharo Launcher Source

2017-10-03 Thread Steven R. Baker


On 03/10/17 21:51, Sven Van Caekenberghe wrote:
>
>> On 3 Oct 2017, at 21:30, Steven R. Baker  wrote:
>>
>> Heya,
>>
>> I'm trying to build a Pharo Launcher of my own, but I can't find the
>> code. This says it's on SmalltalkHub:
>> https://github.com/pharo-project/pharo-launcher, but the link doesn't
>> show anything.
> As it says there: http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher
Sigh. Apologies. I had an overzealous blocker. :(

Thanks!

-Steven

>> I tried looking on CI for the build script, but I can't find the build
>> script, just build results. What I'm looking for is how to check out,
>> build, and run Pharo Launcher from scratch. Can someone help me with this?
>>
>> Thanks!
>>
>> -Steven
>>
>>
>>
>




[Pharo-users] Pharo Launcher Source

2017-10-03 Thread Steven R. Baker
Heya,

I'm trying to build a Pharo Launcher of my own, but I can't find the
code. This says it's on SmalltalkHub:
https://github.com/pharo-project/pharo-launcher, but the link doesn't
show anything.

I tried looking on CI for the build script, but I can't find the build
script, just build results. What I'm looking for is how to check out,
build, and run Pharo Launcher from scratch. Can someone help me with this?

Thanks!

-Steven





Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Guillermo Polito
Well, LGitFetchOptions has a proxy options property of type LGitProxyOptions,
and this one a property type of type LGitProxyTypeEnum. I did not try it
but maybe it should look something like:

fetchOptions prim_proxy_opts prim_type: LGitProxyTypeEnum git_proxy_auto.

?

if fetchOptions is null you'll have to instantiate one. The same if a fresh
fetchOptions does not have a prim_proxy_opts

On Tue, Oct 3, 2017 at 6:36 PM, Vitor Medina Cruz 
wrote:

> Couldn't figure out how to configure a LGitFetchOptionswith a
> LGitProxyOptions accepting one of the auto/none/specified from
> LGitProxyTypeEnum. Can you provide an example?
>
> On Tue, Oct 3, 2017 at 1:06 PM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> I know, but a LGitProxyOptions accepts one.
>>
>> On Tue, Oct 3, 2017 at 5:57 PM, Vitor Medina Cruz 
>> wrote:
>>
>>> Nope, auto/none/specified returned objects are not compatible to the
>>> expected one received by prim_proxy_opts:
>>>
>>> On Tue, Oct 3, 2017 at 11:16 AM, Guillermo Polito <
>>> guillermopol...@gmail.com> wrote:
>>>
 Check that LGitFetchOptions has a pair of accessors prim_proxy_opts.
 Maybe you can configure it with a LGitProxyTypeEnum which has values
 auto/none/specified?

 On Tue, Oct 3, 2017 at 3:52 PM, Vitor Medina Cruz  wrote:

> I got to this point:
>
> remote_fetch: remote refspecs: refspecs opts: opts reflog_message:
> reflog_message
>
>  ^ self
>  call:
>  #(LGitReturnCodeEnum git_remote_fetch #(self , void * refspecs ,
> LGitFetchOptions * opts , String reflog_message))
>  options: #(optCoerceNilToNull)
>
> This seams like a call to a native C code. The opts has an
> authentication callback, which should be called, but it is not. Any leads
> on what I can do from here to figure out what is happening?
>
> On Tue, Oct 3, 2017 at 9:09 AM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> Looks like it's an iceberg/libgit problem. We should set the proxy to
>> libgit :)
>>
>> https://libgit2.github.com/libgit2/#HEAD/search/proxy
>>
>> On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz <
>> vitormc...@gmail.com> wrote:
>>
>>> Yes, I already done that. I am behind a NTLM proxy, so I set up a
>>> cntlm proxy and configured Pharo settings accordingly. It is working
>>> because I can use Zinc directly, but Iceberg cannot pull/push. I tried 
>>> the
>>> same at home without a proxy and I could not pull/push either, so it
>>> probably has nothing to do with the proxy.
>>>
>>> I will investigate more….
>>>
>>> On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
>>> guillermopol...@gmail.com> wrote:
>>>
 You should probably set the proxy in the Pharo settings. Pharo does
 not recognize the system's proxy (so far).

 Could you try with that?

 Guille

 On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz <
 vitormc...@gmail.com> wrote:

> git push via command line works fine. When I try to pull, for
> example, from Iceberg it says "a connection with the server cannot be
> estabilished". I am using a cntlm bypass proxy with loggin on, and 
> Iceberg
> is using it, but it fails while normal Zinc usage is ok.
>
> I will try to understand better what is happening
>
> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano <
> esteba...@gmail.com> wrote:
>
>> hi,
>>
>> if you have the ssh port restricted, you need to use one that is
>> not…but then, is not clear how it will work on server side.
>> can you try if you can do command line git push in your project?
>>
>> Esteban
>>
>> On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
>> wrote:
>>
>> Hello!
>>
>> Iceberg don’t work behind a proxy? I have made proper proxy
>> configuration, if I use Zinc, for example, the proxy information is 
>> used,
>> but that don’t seems to be the case for Iceberg.
>>
>> Regards,
>>
>> Vito
>>
>>
>>
>


 --



 Guille Polito

 Research Engineer

 Centre de Recherche en Informatique, Signal et Automatique de Lille

 CRIStAL - UMR 9189

 French National Center for Scientific Research - *http://www.cnrs.fr
 *


 *Web:* *http://guillep.github.io* 

 *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>

>>>
>>>
>>
>>
>> --
>>
>>

Re: [Pharo-users] execute a code block at a given time in pharo ?

2017-10-03 Thread Daniel BLANC
Hi All,

Sorry for the late answer, I've been swallowed by a vortex of "too much
work at my day job".

Regarding the magical power of smalltalk, I definitely agree with that.
I've been playing with different programming languages for 30 years now,
and smalltalk programming is so refreshing, it's almost like manipulating
real physical objects, the process of building an app feels way more
creative this way.

Regarding my quick hack for managing the wifi at home, unfortunately there
is not so much smalltalk magic involved. Pharo is just used as a UI to
launch shell scripts on a linux server. This server is inbetween a wifi
access point and the ISP router. So, as you probably have guessed, all the
wifi traffic goes trough this server, then it's easy to use the linux
firewall (iptable) to allow/deny traffic.

I'll continue playing/hacking on this small app and I'll publish the end
result.

Thanks All,
Daniel

On Sun, Sep 17, 2017 at 7:18 PM Ben Coman  wrote:

> On Sun, Sep 17, 2017 at 3:59 PM, Daniel BLANC 
> wrote:
> > Thanks Stef, this app is just a quick hack
>
> Quick hacks are still often interesting reading and useful starting
> points for others.
> I've often thought of doing something like this for my kids but never
> got around to it.
>
> > but I already can stop the wifi from my phone
>
> I'm interested to know what you use for that also.
>
> cheers -ben
>

>


Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Vitor Medina Cruz
Couldn't figure out how to configure a LGitFetchOptionswith a
LGitProxyOptions accepting one of the auto/none/specified from
LGitProxyTypeEnum. Can you provide an example?

On Tue, Oct 3, 2017 at 1:06 PM, Guillermo Polito 
wrote:

> I know, but a LGitProxyOptions accepts one.
>
> On Tue, Oct 3, 2017 at 5:57 PM, Vitor Medina Cruz 
> wrote:
>
>> Nope, auto/none/specified returned objects are not compatible to the
>> expected one received by prim_proxy_opts:
>>
>> On Tue, Oct 3, 2017 at 11:16 AM, Guillermo Polito <
>> guillermopol...@gmail.com> wrote:
>>
>>> Check that LGitFetchOptions has a pair of accessors prim_proxy_opts.
>>> Maybe you can configure it with a LGitProxyTypeEnum which has values
>>> auto/none/specified?
>>>
>>> On Tue, Oct 3, 2017 at 3:52 PM, Vitor Medina Cruz 
>>> wrote:
>>>
 I got to this point:

 remote_fetch: remote refspecs: refspecs opts: opts reflog_message:
 reflog_message

  ^ self
  call:
  #(LGitReturnCodeEnum git_remote_fetch #(self , void * refspecs ,
 LGitFetchOptions * opts , String reflog_message))
  options: #(optCoerceNilToNull)

 This seams like a call to a native C code. The opts has an
 authentication callback, which should be called, but it is not. Any leads
 on what I can do from here to figure out what is happening?

 On Tue, Oct 3, 2017 at 9:09 AM, Guillermo Polito <
 guillermopol...@gmail.com> wrote:

> Looks like it's an iceberg/libgit problem. We should set the proxy to
> libgit :)
>
> https://libgit2.github.com/libgit2/#HEAD/search/proxy
>
> On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz <
> vitormc...@gmail.com> wrote:
>
>> Yes, I already done that. I am behind a NTLM proxy, so I set up a
>> cntlm proxy and configured Pharo settings accordingly. It is working
>> because I can use Zinc directly, but Iceberg cannot pull/push. I tried 
>> the
>> same at home without a proxy and I could not pull/push either, so it
>> probably has nothing to do with the proxy.
>>
>> I will investigate more….
>>
>> On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
>> guillermopol...@gmail.com> wrote:
>>
>>> You should probably set the proxy in the Pharo settings. Pharo does
>>> not recognize the system's proxy (so far).
>>>
>>> Could you try with that?
>>>
>>> Guille
>>>
>>> On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz <
>>> vitormc...@gmail.com> wrote:
>>>
 git push via command line works fine. When I try to pull, for
 example, from Iceberg it says "a connection with the server cannot be
 estabilished". I am using a cntlm bypass proxy with loggin on, and 
 Iceberg
 is using it, but it fails while normal Zinc usage is ok.

 I will try to understand better what is happening

 On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano <
 esteba...@gmail.com> wrote:

> hi,
>
> if you have the ssh port restricted, you need to use one that is
> not…but then, is not clear how it will work on server side.
> can you try if you can do command line git push in your project?
>
> Esteban
>
> On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
> wrote:
>
> Hello!
>
> Iceberg don’t work behind a proxy? I have made proper proxy
> configuration, if I use Zinc, for example, the proxy information is 
> used,
> but that don’t seems to be the case for Iceberg.
>
> Regards,
>
> Vito
>
>
>

>>>
>>>
>>> --
>>>
>>>
>>>
>>> Guille Polito
>>>
>>> Research Engineer
>>>
>>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>>
>>> CRIStAL - UMR 9189
>>>
>>> French National Center for Scientific Research - *http://www.cnrs.fr
>>> *
>>>
>>>
>>> *Web:* *http://guillep.github.io* 
>>>
>>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>>
>>
>>
>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> *
>
>
> *Web:* *http://guillep.github.io* 
>
> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>


>>>
>>>
>>> --
>>>
>>>
>>>
>>> Guille Polito
>>>
>>> Research Engineer
>>>
>>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>>
>>> CRIStAL - UMR 9189
>>>
>>> 

Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Guillermo Polito
I know, but a LGitProxyOptions accepts one.

On Tue, Oct 3, 2017 at 5:57 PM, Vitor Medina Cruz 
wrote:

> Nope, auto/none/specified returned objects are not compatible to the
> expected one received by prim_proxy_opts:
>
> On Tue, Oct 3, 2017 at 11:16 AM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> Check that LGitFetchOptions has a pair of accessors prim_proxy_opts.
>> Maybe you can configure it with a LGitProxyTypeEnum which has values
>> auto/none/specified?
>>
>> On Tue, Oct 3, 2017 at 3:52 PM, Vitor Medina Cruz 
>> wrote:
>>
>>> I got to this point:
>>>
>>> remote_fetch: remote refspecs: refspecs opts: opts reflog_message:
>>> reflog_message
>>>
>>>  ^ self
>>>  call:
>>>  #(LGitReturnCodeEnum git_remote_fetch #(self , void * refspecs ,
>>> LGitFetchOptions * opts , String reflog_message))
>>>  options: #(optCoerceNilToNull)
>>>
>>> This seams like a call to a native C code. The opts has an
>>> authentication callback, which should be called, but it is not. Any leads
>>> on what I can do from here to figure out what is happening?
>>>
>>> On Tue, Oct 3, 2017 at 9:09 AM, Guillermo Polito <
>>> guillermopol...@gmail.com> wrote:
>>>
 Looks like it's an iceberg/libgit problem. We should set the proxy to
 libgit :)

 https://libgit2.github.com/libgit2/#HEAD/search/proxy

 On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz  wrote:

> Yes, I already done that. I am behind a NTLM proxy, so I set up a
> cntlm proxy and configured Pharo settings accordingly. It is working
> because I can use Zinc directly, but Iceberg cannot pull/push. I tried the
> same at home without a proxy and I could not pull/push either, so it
> probably has nothing to do with the proxy.
>
> I will investigate more….
>
> On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> You should probably set the proxy in the Pharo settings. Pharo does
>> not recognize the system's proxy (so far).
>>
>> Could you try with that?
>>
>> Guille
>>
>> On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz <
>> vitormc...@gmail.com> wrote:
>>
>>> git push via command line works fine. When I try to pull, for
>>> example, from Iceberg it says "a connection with the server cannot be
>>> estabilished". I am using a cntlm bypass proxy with loggin on, and 
>>> Iceberg
>>> is using it, but it fails while normal Zinc usage is ok.
>>>
>>> I will try to understand better what is happening
>>>
>>> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano <
>>> esteba...@gmail.com> wrote:
>>>
 hi,

 if you have the ssh port restricted, you need to use one that is
 not…but then, is not clear how it will work on server side.
 can you try if you can do command line git push in your project?

 Esteban

 On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
 wrote:

 Hello!

 Iceberg don’t work behind a proxy? I have made proper proxy
 configuration, if I use Zinc, for example, the proxy information is 
 used,
 but that don’t seems to be the case for Iceberg.

 Regards,

 Vito



>>>
>>
>>
>> --
>>
>>
>>
>> Guille Polito
>>
>> Research Engineer
>>
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>
>> CRIStAL - UMR 9189
>>
>> French National Center for Scientific Research - *http://www.cnrs.fr
>> *
>>
>>
>> *Web:* *http://guillep.github.io* 
>>
>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>
>
>


 --



 Guille Polito

 Research Engineer

 Centre de Recherche en Informatique, Signal et Automatique de Lille

 CRIStAL - UMR 9189

 French National Center for Scientific Research - *http://www.cnrs.fr
 *


 *Web:* *http://guillep.github.io* 

 *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>

>>>
>>>
>>
>>
>> --
>>
>>
>>
>> Guille Polito
>>
>> Research Engineer
>>
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>
>> CRIStAL - UMR 9189
>>
>> French National Center for Scientific Research - *http://www.cnrs.fr
>> *
>>
>>
>> *Web:* *http://guillep.github.io* 
>>
>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - 

Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Vitor Medina Cruz
Nope, auto/none/specified returned objects are not compatible to the
expected one received by prim_proxy_opts:

On Tue, Oct 3, 2017 at 11:16 AM, Guillermo Polito  wrote:

> Check that LGitFetchOptions has a pair of accessors prim_proxy_opts. Maybe
> you can configure it with a LGitProxyTypeEnum which has values
> auto/none/specified?
>
> On Tue, Oct 3, 2017 at 3:52 PM, Vitor Medina Cruz 
> wrote:
>
>> I got to this point:
>>
>> remote_fetch: remote refspecs: refspecs opts: opts reflog_message:
>> reflog_message
>>
>>  ^ self
>>  call:
>>  #(LGitReturnCodeEnum git_remote_fetch #(self , void * refspecs ,
>> LGitFetchOptions * opts , String reflog_message))
>>  options: #(optCoerceNilToNull)
>>
>> This seams like a call to a native C code. The opts has an authentication
>> callback, which should be called, but it is not. Any leads on what I can do
>> from here to figure out what is happening?
>>
>> On Tue, Oct 3, 2017 at 9:09 AM, Guillermo Polito <
>> guillermopol...@gmail.com> wrote:
>>
>>> Looks like it's an iceberg/libgit problem. We should set the proxy to
>>> libgit :)
>>>
>>> https://libgit2.github.com/libgit2/#HEAD/search/proxy
>>>
>>> On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz 
>>> wrote:
>>>
 Yes, I already done that. I am behind a NTLM proxy, so I set up a cntlm
 proxy and configured Pharo settings accordingly. It is working because I
 can use Zinc directly, but Iceberg cannot pull/push. I tried the same at
 home without a proxy and I could not pull/push either, so it probably has
 nothing to do with the proxy.

 I will investigate more….

 On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
 guillermopol...@gmail.com> wrote:

> You should probably set the proxy in the Pharo settings. Pharo does
> not recognize the system's proxy (so far).
>
> Could you try with that?
>
> Guille
>
> On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz <
> vitormc...@gmail.com> wrote:
>
>> git push via command line works fine. When I try to pull, for
>> example, from Iceberg it says "a connection with the server cannot be
>> estabilished". I am using a cntlm bypass proxy with loggin on, and 
>> Iceberg
>> is using it, but it fails while normal Zinc usage is ok.
>>
>> I will try to understand better what is happening
>>
>> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano <
>> esteba...@gmail.com> wrote:
>>
>>> hi,
>>>
>>> if you have the ssh port restricted, you need to use one that is
>>> not…but then, is not clear how it will work on server side.
>>> can you try if you can do command line git push in your project?
>>>
>>> Esteban
>>>
>>> On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
>>> wrote:
>>>
>>> Hello!
>>>
>>> Iceberg don’t work behind a proxy? I have made proper proxy
>>> configuration, if I use Zinc, for example, the proxy information is 
>>> used,
>>> but that don’t seems to be the case for Iceberg.
>>>
>>> Regards,
>>>
>>> Vito
>>>
>>>
>>>
>>
>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> *
>
>
> *Web:* *http://guillep.github.io* 
>
> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>


>>>
>>>
>>> --
>>>
>>>
>>>
>>> Guille Polito
>>>
>>> Research Engineer
>>>
>>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>>
>>> CRIStAL - UMR 9189
>>>
>>> French National Center for Scientific Research - *http://www.cnrs.fr
>>> *
>>>
>>>
>>> *Web:* *http://guillep.github.io* 
>>>
>>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>>
>>
>>
>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> *
>
>
> *Web:* *http://guillep.github.io* 
>
> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>


Re: [Pharo-users] Reading a text file line by line

2017-10-03 Thread Sven Van Caekenberghe


> On 3 Oct 2017, at 10:53, Guillermo Polito  wrote:
> 
> Yes, in my todo, but changing FileReference like that will break a lot of 
> backwards compatibility :)

Yes it will.

I have said this before: the problem is that the current stream API is much too 
wide, we need to trim it to something closer to what a stream is (and not 
assume that a stream always lives on top of a collection).

We have compassable streams now, they work well. But they cannot implement the 
full API (since they are not streaming over collections). The biggest issue are 
the positioning message (like #skip: and #position:) which assume you known 
where you are and can move around at will, which is not possible for a real, 
indefinite stream.

> On Mon, Oct 2, 2017 at 10:22 AM, Stephane Ducasse  
> wrote:
> Yes this is why we should continue to clean and remove cruft. Now I
> remember that guille did that for File.
> 
> Stef
> 
> On Mon, Oct 2, 2017 at 3:20 PM, Sven Van Caekenberghe  wrote:
> > If you do
> >
> >   (File named: '/tmp/lines.txt') readStream[Do:]
> >
> > you seem to get a binary stream (this is the new implementation I guess), 
> > when you go via FileReference you get a character stream (but that are old 
> > ones).
> >
> > I know, very confusing. We're always in the midst of transitions.
> >
> >> On 2 Oct 2017, at 15:17, Stephane Ducasse  wrote:
> >>
> >> Sven I do not see the binary stream. Is it ZnCharacterReadStream?
> >>
> >> Stef
> >>
> >> On Mon, Oct 2, 2017 at 1:22 PM, Sven Van Caekenberghe  wrote:
> >>> Hi,
> >>>
>  On 2 Oct 2017, at 13:07, Dirk Olmes  wrote:
> 
>  Hi,
> 
>  I'm trying to get started with Pharo doing something really simple - at
>  least that's what I thought ... I'm trying to read a text file line by 
>  line.
> 
>  If I use  File named: '/tmp/linex.txt' readStream nextLine I'll get a
>  debugger telling me that BinaryFileStream does not understand nextLine.
> 
>  Now I've tried my best to find a stream that may be reading plain text
>  lines but to no avail ...
> 
>  Help!
> 
>  -dirk
> >>>
> >>> $ cat > /tmp/lines.txt
> >>> one
> >>> two
> >>> three
> >>>
> >>> (FileLocator temp / 'lines.txt') contents lines.
> >>>
> >>> '/tmp/lines.txt' asFileReference contents lines.
> >>>
> >>> '/tmp/lines.txt' asFileReference readStreamDo: [ :in |
> >>>  Array streamContents: [ :out |
> >>>[ in atEnd ] whileFalse: [ out nextPut: in nextLine ] ] ].
> >>>
> >>> (File named: '/tmp/lines.txt') readStreamDo: [ :in |
> >>>  | characterStream |
> >>>  characterStream := ZnCharacterReadStream on: in.
> >>>  Array streamContents: [ :out |
> >>>[ characterStream atEnd ] whileFalse: [ out nextPut: characterStream 
> >>> nextLine ] ] ].
> >>>
> >>> They all return #('one' 'two' 'three').
> >>>
> >>> In the last, more complex example, you first get a binary stream (and a 
> >>> 'line' is a character based concept), so wrapping the binary stream in a 
> >>> character read stream (which does know about lines) solves the problem.
> >>>
> >>> HTH,
> >>>
> >>> Sven
> >>
> >
> >
> 
> 
> 
> 
> -- 
>
> Guille Polito
> Research Engineer
> 
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - http://www.cnrs.fr
> 
> Web: http://guillep.github.io
> Phone: +33 06 52 70 66 13




Re: [Pharo-users] "Leaking" CommandLineHandler when running headless image

2017-10-03 Thread Guillermo Polito
Yes, that's the issue. I'm still convinced about that :)

On Tue, Sep 19, 2017 at 3:36 PM, Tim Mackinnon  wrote:

> There was a long post from Guille about how to sort this. It had to do
> with altering the priority of shutdown code - I'm not sure if we resolved
> it, but we should go back and see as it was well reasoned.
>
> Tim
>
> Sent from my iPhone
>
> On 19 Sep 2017, at 14:20, Denis Kudriashov  wrote:
>
> Hi.
>
> It is probably related to issue 20309
> 
>
> 2017-09-19 15:02 GMT+02:00 Holger Freyther :
>
>> Hi,
>>
>> I am currently trying to run one of my images as non-root and related to
>> that look into keeping changes in a different directory or not writing them
>> at all. While looking at a write failure I saw some paths being logged that
>> I used during CI to load code and should have been GCed.
>>
>>
>> Observation:
>>
>>
>> Pharo --headless My.image eval "Smalltalk garbageCollect.
>> CommandLineHandler allSubInstances size"
>> 84
>>
>> Pharo --headfull My.image eval "Smalltalk garbageCollect.
>> CommandLineHandler allSubInstances size"
>> 2
>>
>>
>> As part of the CommandLineHandler allSubInstances there are eight
>> LoadUpdatesCommandLineHandler still active. I would assume that a full GC
>> should have collected them by now (some of them being created in May). In a
>> headfull image they disappear quickly
>>
>> I varied the execution a bit:
>>
>> Pharo --headless RoamingHub.image eval --no-quit "[ Smalltalk
>> garbageCollect. FileStream stdout print: CommandLineHandler allSubInstances
>> size; lf. Smalltalk snapshot: false andQuit: true] fork"
>> 0
>>
>>
>> Hypothesis:
>>
>>
>> * Command line handlers call >>#snapshot:andQuit:.
>> * Image resumes in this process
>> * New session created
>> * Command line handlers execute
>> * Calls snapshot:andQuit:
>> * Image resumes..
>> * New session created
>> * Command line handlers execute
>> ...
>>
>>
>> Can this be true? I think the proposal to start the image differently
>> would help here? Any comments/ideas?
>>
>> holger
>>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Guillermo Polito
Check that LGitFetchOptions has a pair of accessors prim_proxy_opts. Maybe
you can configure it with a LGitProxyTypeEnum which has values
auto/none/specified?

On Tue, Oct 3, 2017 at 3:52 PM, Vitor Medina Cruz 
wrote:

> I got to this point:
>
> remote_fetch: remote refspecs: refspecs opts: opts reflog_message:
> reflog_message
>
>  ^ self
>  call:
>  #(LGitReturnCodeEnum git_remote_fetch #(self , void * refspecs ,
> LGitFetchOptions * opts , String reflog_message))
>  options: #(optCoerceNilToNull)
>
> This seams like a call to a native C code. The opts has an authentication
> callback, which should be called, but it is not. Any leads on what I can do
> from here to figure out what is happening?
>
> On Tue, Oct 3, 2017 at 9:09 AM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> Looks like it's an iceberg/libgit problem. We should set the proxy to
>> libgit :)
>>
>> https://libgit2.github.com/libgit2/#HEAD/search/proxy
>>
>> On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz 
>> wrote:
>>
>>> Yes, I already done that. I am behind a NTLM proxy, so I set up a cntlm
>>> proxy and configured Pharo settings accordingly. It is working because I
>>> can use Zinc directly, but Iceberg cannot pull/push. I tried the same at
>>> home without a proxy and I could not pull/push either, so it probably has
>>> nothing to do with the proxy.
>>>
>>> I will investigate more….
>>>
>>> On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
>>> guillermopol...@gmail.com> wrote:
>>>
 You should probably set the proxy in the Pharo settings. Pharo does not
 recognize the system's proxy (so far).

 Could you try with that?

 Guille

 On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz  wrote:

> git push via command line works fine. When I try to pull, for example,
> from Iceberg it says "a connection with the server cannot be 
> estabilished".
> I am using a cntlm bypass proxy with loggin on, and Iceberg is using it,
> but it fails while normal Zinc usage is ok.
>
> I will try to understand better what is happening
>
> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano  > wrote:
>
>> hi,
>>
>> if you have the ssh port restricted, you need to use one that is
>> not…but then, is not clear how it will work on server side.
>> can you try if you can do command line git push in your project?
>>
>> Esteban
>>
>> On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
>> wrote:
>>
>> Hello!
>>
>> Iceberg don’t work behind a proxy? I have made proper proxy
>> configuration, if I use Zinc, for example, the proxy information is used,
>> but that don’t seems to be the case for Iceberg.
>>
>> Regards,
>>
>> Vito
>>
>>
>>
>


 --



 Guille Polito

 Research Engineer

 Centre de Recherche en Informatique, Signal et Automatique de Lille

 CRIStAL - UMR 9189

 French National Center for Scientific Research - *http://www.cnrs.fr
 *


 *Web:* *http://guillep.github.io* 

 *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>

>>>
>>>
>>
>>
>> --
>>
>>
>>
>> Guille Polito
>>
>> Research Engineer
>>
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>
>> CRIStAL - UMR 9189
>>
>> French National Center for Scientific Research - *http://www.cnrs.fr
>> *
>>
>>
>> *Web:* *http://guillep.github.io* 
>>
>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Equals and HashCode Builder

2017-10-03 Thread Denis Kudriashov
2017-10-02 17:30 GMT+02:00 Denis Kudriashov :

>
> 2017-10-02 17:13 GMT+02:00 Vitor Medina Cruz :
>
>> I am sorry, not species, but #isKindOf istead of #= to compare classes.
>>
>
> It is bad idea. #= should be transitive.
>

Oh, I used wrong word, shame on me :). I tried to say commutative.


> How you will generate it with isKindOf: logic? You need to know common
> parent.
>
> Also I not remember cases where I was needed two instances of different
> classes to be equal.
> And I can imaging the problems which it will lead to.
>
>
>>
>> On Mon, Oct 2, 2017 at 11:57 AM, Denis Kudriashov 
>> wrote:
>>
>>>
>>> 2017-10-02 16:37 GMT+02:00 Sean P. DeNigris :
>>>

 Two questions/comments about the generated code:
 1. #=
 ...
 self class = anObject class "should compare #species instead?"
 ifFalse: [ ^ false ].
 ...
 Typically, I've seen #species instead of #class in the guard statement.
 Should we change it to that?

>>>
>>> I doubt that it is important for domain classes. Because I never saw the
>>> user of #species which is not a kind of Collection. And for collections
>>> this refactoring is not valid anyway.
>>>
>>>


 2. #hash
 ^ var1 hash bitXor: (var2 hash bitXor: var3 hash)
 Is this implementation always safe? It's what I usually hand roll based
 on
 what I've seen, but Andres Valloud wrote a whole (large) book on
 hashing, so
 I've always wondered if I was missing something…



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


>>>
>>
>


Re: [Pharo-users] why are Help topics in the meta-side

2017-10-03 Thread Esteban A. Maringolo
2017-10-03 10:14 GMT-03:00 H. Hirzel :
> In the end it is probably a matter of conventions.
>
> Instruction how to construct something (e.g. Spec)

Conventions and history, which maybe are the same thing :)

VisualSmalltalk/VisualWorks, Dolphin, VAST keep the definition of the
windows/panes in the class side, whether they're Smalltalk expressions
or binary/literal arrays (Dolphin).

In the case of Dolphin each "class method" defines a "resource" you
can have more than one layout for the same class, so you can have a
"read only" view (resource) and an "editable" view sharing the same
instance behavior.

Also, having it class side you can reference it/preview (rendered)
from other views without having to instantiate them, which might
require having a valid model, etc.

> / configuration information / descriptions
> / help information / examples are kept on the class side.

In fact I don't like that Magritte moved the descriptions from class
to instance side.

My two cents on this.

Regards!

Esteban A. Maringolo



Re: [Pharo-users] why are Help topics in the meta-side

2017-10-03 Thread H. Hirzel
The information for a help topic on the class side is used to create a
help instance.

Even if I technically create several instances of a particular help
topic with information taken from the class side conceptually I have
only _one_ help topic. The instances all share exactly the same
content.

Maybe the idea of 'Uniclass' (Etoys / Squeak') though not exactly the
same may help.
"UniClasses are classes for the instance specific behavior of just one
instance."
http://wiki.squeak.org/squeak/2402

In Smalltalk I always have to deal with classes. A class is an object
as well. Good to keep information for cases where I do not care to
have different instances with different state.

HTH

Hannes

On 10/3/17, Peter Uhnák  wrote:
> On Tue, Oct 3, 2017 at 2:17 PM, H. Hirzel  wrote:
>
>> This is as if you would ask
>>
>> why are specs on the class side?
>>
>
> I can certainly ask that, and there's in fact no reason why it would have
> to be there (because when the layout is being retrieved, the instance is
> already available).
>
>
>> You may actually see Help information as 'meta information'. It is
>> information about 
>>
>
> If you put it on the class-side of the class that it is about then I would
> agree. But that is not the case here. The object is the content, not about
> the content.
>
>
>>
>> The content is only needed once per topic. No different instances of the
>> same topic.
>>
>
> This is not actually true; the topic is instantiated anew for every help
> browser opened (and every time browser is opened).
>
> And in fact the CustomHelp subclass is recasted to HelpTopic at runtime,
> which makes the entire class quite pointless; which is what I don't
> understand.
>
> Peter
>



Re: [Pharo-users] why are Help topics in the meta-side

2017-10-03 Thread Peter Uhnák
On Tue, Oct 3, 2017 at 2:17 PM, H. Hirzel  wrote:

> This is as if you would ask
>
> why are specs on the class side?
>

I can certainly ask that, and there's in fact no reason why it would have
to be there (because when the layout is being retrieved, the instance is
already available).


> You may actually see Help information as 'meta information'. It is
> information about 
>

If you put it on the class-side of the class that it is about then I would
agree. But that is not the case here. The object is the content, not about
the content.


>
> The content is only needed once per topic. No different instances of the
> same topic.
>

This is not actually true; the topic is instantiated anew for every help
browser opened (and every time browser is opened).

And in fact the CustomHelp subclass is recasted to HelpTopic at runtime,
which makes the entire class quite pointless; which is what I don't
understand.

Peter


Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Guillermo Polito
Looks like it's an iceberg/libgit problem. We should set the proxy to
libgit :)

https://libgit2.github.com/libgit2/#HEAD/search/proxy

On Tue, Oct 3, 2017 at 2:03 PM, Vitor Medina Cruz 
wrote:

> Yes, I already done that. I am behind a NTLM proxy, so I set up a cntlm
> proxy and configured Pharo settings accordingly. It is working because I
> can use Zinc directly, but Iceberg cannot pull/push. I tried the same at
> home without a proxy and I could not pull/push either, so it probably has
> nothing to do with the proxy.
>
> I will investigate more….
>
> On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> You should probably set the proxy in the Pharo settings. Pharo does not
>> recognize the system's proxy (so far).
>>
>> Could you try with that?
>>
>> Guille
>>
>> On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz 
>> wrote:
>>
>>> git push via command line works fine. When I try to pull, for example,
>>> from Iceberg it says "a connection with the server cannot be estabilished".
>>> I am using a cntlm bypass proxy with loggin on, and Iceberg is using it,
>>> but it fails while normal Zinc usage is ok.
>>>
>>> I will try to understand better what is happening
>>>
>>> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano 
>>> wrote:
>>>
 hi,

 if you have the ssh port restricted, you need to use one that is
 not…but then, is not clear how it will work on server side.
 can you try if you can do command line git push in your project?

 Esteban

 On 2 Oct 2017, at 19:57, Vitor Medina Cruz 
 wrote:

 Hello!

 Iceberg don’t work behind a proxy? I have made proper proxy
 configuration, if I use Zinc, for example, the proxy information is used,
 but that don’t seems to be the case for Iceberg.

 Regards,

 Vito



>>>
>>
>>
>> --
>>
>>
>>
>> Guille Polito
>>
>> Research Engineer
>>
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>
>> CRIStAL - UMR 9189
>>
>> French National Center for Scientific Research - *http://www.cnrs.fr
>> *
>>
>>
>> *Web:* *http://guillep.github.io* 
>>
>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Vitor Medina Cruz
Yes, I already done that. I am behind a NTLM proxy, so I set up a cntlm
proxy and configured Pharo settings accordingly. It is working because I
can use Zinc directly, but Iceberg cannot pull/push. I tried the same at
home without a proxy and I could not pull/push either, so it probably has
nothing to do with the proxy.

I will investigate more….

On Tue, Oct 3, 2017 at 5:31 AM, Guillermo Polito 
wrote:

> You should probably set the proxy in the Pharo settings. Pharo does not
> recognize the system's proxy (so far).
>
> Could you try with that?
>
> Guille
>
> On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz 
> wrote:
>
>> git push via command line works fine. When I try to pull, for example,
>> from Iceberg it says "a connection with the server cannot be estabilished".
>> I am using a cntlm bypass proxy with loggin on, and Iceberg is using it,
>> but it fails while normal Zinc usage is ok.
>>
>> I will try to understand better what is happening
>>
>> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano 
>> wrote:
>>
>>> hi,
>>>
>>> if you have the ssh port restricted, you need to use one that is not…but
>>> then, is not clear how it will work on server side.
>>> can you try if you can do command line git push in your project?
>>>
>>> Esteban
>>>
>>> On 2 Oct 2017, at 19:57, Vitor Medina Cruz  wrote:
>>>
>>> Hello!
>>>
>>> Iceberg don’t work behind a proxy? I have made proper proxy
>>> configuration, if I use Zinc, for example, the proxy information is used,
>>> but that don’t seems to be the case for Iceberg.
>>>
>>> Regards,
>>>
>>> Vito
>>>
>>>
>>>
>>
>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> *
>
>
> *Web:* *http://guillep.github.io* 
>
> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>


[Pharo-users] why are Help topics in the meta-side

2017-10-03 Thread Peter Uhnák
All help topics (subclasses of CustomHelp) have all the content on the
class-side.

This seems very weird to me, because the class-side should about managing
the meta, not containing the content itself.

It feels weird.

Peter


Re: [Pharo-users] Hiding the cursor in pharo and/or bloc

2017-10-03 Thread Steven Costiou
Thanks Denis :) It works :) 

Its pretty nice for touch-sensitive apps :) 

Steven. 

Le 2017-10-03 10:13, Denis Kudriashov a écrit :

> Hi. 
> Look at Cursor class side. All cursor bitmaps are in class variables. If you 
> will replace all of them with blank cursor then cursor will be always blank.  
> Something like this: 
> 
>> Cursor classVariables associationsDo: [ :each | each value: Cursor blank ]
> 
> 2017-10-03 9:38 GMT+02:00 Steven Costiou :
> 
> Ah, thanks. So i will look at Morphic to see if i can do that. 
> 
> Steven.
> 
> Le 2017-10-02 22:30, Aliaksei Syrel a écrit : 
> Hi Steven, 
> 
> What you see is not Bloc's cursor (there is no cursor in bloc) 
> It is a Morphic cursor :) 
> 
> Cheers, 
> Alex 
> On 2 October 2017 at 22:19, Steven Costiou  wrote:
> 
> Hi, 
> 
> i've been playing with bloc, and i am trying to completely remove the cursor 
> (i.e. always display a blank cursor). I can't find how. Removing the Pharo 
> cursor would also be ok, but i can't either. I can only show a blank cursor 
> for a few moments but after moving the mouse too much it becomes normal 
> again. 
> 
> I have tried: 
> 
> Cursor currentCursor: Cursor blank (seems not to work ?) 
> 
> Cursor blank beCursor (works for a few moments only...) 
> 
> Any way to do that permanently ? 
> 
> Steven.

  

Re: [Pharo-users] Reading a text file line by line

2017-10-03 Thread Guillermo Polito
Yes, in my todo, but changing FileReference like that will break a lot of
backwards compatibility :)

On Mon, Oct 2, 2017 at 10:22 AM, Stephane Ducasse 
wrote:

> Yes this is why we should continue to clean and remove cruft. Now I
> remember that guille did that for File.
>
> Stef
>
> On Mon, Oct 2, 2017 at 3:20 PM, Sven Van Caekenberghe 
> wrote:
> > If you do
> >
> >   (File named: '/tmp/lines.txt') readStream[Do:]
> >
> > you seem to get a binary stream (this is the new implementation I
> guess), when you go via FileReference you get a character stream (but that
> are old ones).
> >
> > I know, very confusing. We're always in the midst of transitions.
> >
> >> On 2 Oct 2017, at 15:17, Stephane Ducasse 
> wrote:
> >>
> >> Sven I do not see the binary stream. Is it ZnCharacterReadStream?
> >>
> >> Stef
> >>
> >> On Mon, Oct 2, 2017 at 1:22 PM, Sven Van Caekenberghe 
> wrote:
> >>> Hi,
> >>>
>  On 2 Oct 2017, at 13:07, Dirk Olmes  wrote:
> 
>  Hi,
> 
>  I'm trying to get started with Pharo doing something really simple -
> at
>  least that's what I thought ... I'm trying to read a text file line
> by line.
> 
>  If I use  File named: '/tmp/linex.txt' readStream nextLine I'll get a
>  debugger telling me that BinaryFileStream does not understand
> nextLine.
> 
>  Now I've tried my best to find a stream that may be reading plain text
>  lines but to no avail ...
> 
>  Help!
> 
>  -dirk
> >>>
> >>> $ cat > /tmp/lines.txt
> >>> one
> >>> two
> >>> three
> >>>
> >>> (FileLocator temp / 'lines.txt') contents lines.
> >>>
> >>> '/tmp/lines.txt' asFileReference contents lines.
> >>>
> >>> '/tmp/lines.txt' asFileReference readStreamDo: [ :in |
> >>>  Array streamContents: [ :out |
> >>>[ in atEnd ] whileFalse: [ out nextPut: in nextLine ] ] ].
> >>>
> >>> (File named: '/tmp/lines.txt') readStreamDo: [ :in |
> >>>  | characterStream |
> >>>  characterStream := ZnCharacterReadStream on: in.
> >>>  Array streamContents: [ :out |
> >>>[ characterStream atEnd ] whileFalse: [ out nextPut:
> characterStream nextLine ] ] ].
> >>>
> >>> They all return #('one' 'two' 'three').
> >>>
> >>> In the last, more complex example, you first get a binary stream (and
> a 'line' is a character based concept), so wrapping the binary stream in a
> character read stream (which does know about lines) solves the problem.
> >>>
> >>> HTH,
> >>>
> >>> Sven
> >>
> >
> >
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Iceberg and proxy

2017-10-03 Thread Guillermo Polito
You should probably set the proxy in the Pharo settings. Pharo does not
recognize the system's proxy (so far).

Could you try with that?

Guille

On Mon, Oct 2, 2017 at 4:35 PM, Vitor Medina Cruz 
wrote:

> git push via command line works fine. When I try to pull, for example,
> from Iceberg it says "a connection with the server cannot be estabilished".
> I am using a cntlm bypass proxy with loggin on, and Iceberg is using it,
> but it fails while normal Zinc usage is ok.
>
> I will try to understand better what is happening
>
> On Mon, Oct 2, 2017 at 3:59 PM, Esteban Lorenzano 
> wrote:
>
>> hi,
>>
>> if you have the ssh port restricted, you need to use one that is not…but
>> then, is not clear how it will work on server side.
>> can you try if you can do command line git push in your project?
>>
>> Esteban
>>
>> On 2 Oct 2017, at 19:57, Vitor Medina Cruz  wrote:
>>
>> Hello!
>>
>> Iceberg don’t work behind a proxy? I have made proper proxy
>> configuration, if I use Zinc, for example, the proxy information is used,
>> but that don’t seems to be the case for Iceberg.
>>
>> Regards,
>>
>> Vito
>>
>>
>>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Hiding the cursor in pharo and/or bloc

2017-10-03 Thread Denis Kudriashov
Hi.

Look at Cursor class side. All cursor bitmaps are in class variables. If
you will replace all of them with blank cursor then cursor will be always
blank.
Something like this:

Cursor classVariables associationsDo: [ :each | each value: Cursor blank ]


2017-10-03 9:38 GMT+02:00 Steven Costiou :

> Ah, thanks. So i will look at Morphic to see if i can do that.
>
> Steven.
>
> Le 2017-10-02 22:30, Aliaksei Syrel a écrit :
>
> Hi Steven,
>
> What you see is not Bloc's cursor (there is no cursor in bloc)
> It is a Morphic cursor :)
>
> Cheers,
> Alex
>
> On 2 October 2017 at 22:19, Steven Costiou 
> wrote:
>
>> Hi,
>>
>> i've been playing with bloc, and i am trying to completely remove the
>> cursor (i.e. always display a blank cursor). I can't find how. Removing the
>> Pharo cursor would also be ok, but i can't either. I can only show a blank
>> cursor for a few moments but after moving the mouse too much it becomes
>> normal again.
>>
>> I have tried:
>>
>> Cursor currentCursor: Cursor blank (seems not to work ?)
>>
>> Cursor blank beCursor (works for a few moments only...)
>>
>> Any way to do that permanently ?
>>
>>
>> Steven.
>>
>
>


Re: [Pharo-users] Spec "bindings"

2017-10-03 Thread Stephane Ducasse
Hi rob

we are discussing in Peter and reading your solution.
Now about your example, I think that the

Presenter >> subject: aDomainObject
 subjectHolder := aDomainObject asValueHolder

We should not have countHolder in the domain object. In the domain object
we should only have the domain and no value holder. Now to access a
part of a domain
object to refresh/change it without changing the whole, we should
have something similar to AspectAdaptor in VW.

What do you think?

Stef


On Sat, Sep 30, 2017 at 9:21 PM, Stephane Ducasse
 wrote:
> Hi rob
>
> I wrote this missing chapter and I think that it exhibits the changes
> you wanted to introduce.
> So let me know.
>
> Stef
>
>
> On Sat, Sep 30, 2017 at 9:13 AM, Stephane Ducasse
>  wrote:
>> Hi rob
>>
>> where can I find your code because I'm really thinking that something
>> is missing in Spec.
>> I'm writing a little editor for a gameItem and I should go through and
>> I would like to use it
>> as an example of what I do not like.
>> In fact I would like to have all the models to work on aspect of the
>> domain model.
>> May be this is avaialbale in spec but I forgot and I forgot to
>> document it in the book.
>>
>> Stef
>>
>>
>> On Tue, Sep 5, 2017 at 8:49 PM, Rob Rothwell  wrote:
>>> Hello,
>>>
>>> I was wondering what more experienced users than myself thought of the idea
>>> of an explicit Spec "connection point" to a domain model object similar to
>>> Dolphin's "showOn:" method, like:
>>>
>>> CounterApp showOn: counter.
>>>
>>> This would perhaps trigger something like Dolphin's Presenter>>model:
>>> message (although I've always found the use of "model" confusing when there
>>> are so many "models" involved.) after the widgets had been created:
>>>
>>> ComposableModel>>initializeBindings: anObject
>>>
>>> In many cases, if your domain model uses ValueHolders as well (like Spec
>>> does), making a connection could just mean replacing the Spec ValueHolder
>>> with your domain ValueHolder so changes to the domain model would
>>> automatically propagate to the UI presentation without providing explicit
>>> code in ComposableModel>>initializePresenter.
>>>
>>> However, since I am still trying to understand and learn Spec, it's quite
>>> possible I am missing some key point and there are reasons not to explore
>>> this line of thinking!
>>>
>>> Thank you,
>>>
>>> Rob
>>>



Re: [Pharo-users] Hiding the cursor in pharo and/or bloc

2017-10-03 Thread Steven Costiou
Ah, thanks. So i will look at Morphic to see if i can do that. 

Steven. 

Le 2017-10-02 22:30, Aliaksei Syrel a écrit :

> Hi Steven, 
> 
> What you see is not Bloc's cursor (there is no cursor in bloc) 
> It is a Morphic cursor :) 
> 
> Cheers, 
> Alex 
> On 2 October 2017 at 22:19, Steven Costiou  wrote:
> 
>> Hi, 
>> 
>> i've been playing with bloc, and i am trying to completely remove the cursor 
>> (i.e. always display a blank cursor). I can't find how. Removing the Pharo 
>> cursor would also be ok, but i can't either. I can only show a blank cursor 
>> for a few moments but after moving the mouse too much it becomes normal 
>> again. 
>> 
>> I have tried: 
>> 
>> Cursor currentCursor: Cursor blank (seems not to work ?) 
>> 
>> Cursor blank beCursor (works for a few moments only...) 
>> 
>> Any way to do that permanently ? 
>> 
>> Steven.

  

Re: [Pharo-users] How to make pharo find sqlite?

2017-10-03 Thread p...@highoctane.be
Nice.

We should make a booklet of all this.

There is also the Ansible playbook we have and the Docker story as well.

Phil


On Tue, Oct 3, 2017 at 3:12 AM, Pierce Ng  wrote:

> On Sat, Sep 30, 2017 at 10:16:47PM +0200, Herby Vojčík wrote:
> > case the library name used is the plain 'sqlite3', I don't know - am
> > I supposed to make a symlink on the same directory as the image? Is
> > it the thing that is normally needed / done routinely?
>
> Below is how I've been doing it since early days of Pharo. Desktop OS =
> Linux
> Mint. Current server OS = Ubuntu 16.04.
>
> Firstly, I don't use the distro-provided libsqlite3.so. My self-built copy
> includes features like FTS, JSON, etc.
>
> I place libsqlite3.so in the VM directory, say /pkg/pharo5vm/. I have a
> script
> /pkg/pharo5vm/gopharo:
>
>   #!/bin/sh
>   PHAROVMPATH=$(dirname `readlink -f "$0"`)
>   LD_LIBRARY_PATH="$PHAROVMPATH" exec "$PHAROVMPATH/pharo" $@ &
>
> On desktop, I start Pharo using gopharo. On server, I use daemontools. Say
> my
> application directory on the server is /pkg/app1. Here's the daemontools
> run
> file /pkg/app1/run:
>
>   #!/bin/sh
>   /usr/bin/setuidgid app1 \
>   /pkg/pharo5vm/gopharo -vm-display-null -vm-sound-null
> smallcms1.image --no-quit
>
> The other files in /pkg/app1 are PharoV*.sources and the application
> image/changes files.
>
> /pkg/pharo5vm contains the pharo executable, vm-*, and the *so*
> files/symlinks
> that come with Pharo plus any others that I custom build myself such as
> libsqlite3.so and libshacrypt.so.
>
> HTH.
>
> Pierce
>
>
>
>