Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 1 participants
- 144619 messages
Re: [Pharo-dev] NAtiveBoost error
by Kjell Godo
something happened
gmail just blew a main spring
so continuing from below above
like we stick the dangerous bits into a seperate Package ( info )
so we know where they are
the pure functions defined outside of the monads
are not really pure ( my take )
they are definitely manipulating state
but the state is hidden inside the pipes
inside the pure functions
and no global variables or other places where state hangs out
can be accessed from in there
the bind >>= and return functions are confusing
but >>= takes in a Monad m with a data value a in it
m a
and also a function [ :a | m ( a message ) ] <---[ mixing metaphors
languages ]
and returns a Monad
m a'
to the next >>= in line.
So the a is taken out of the Monad m and manipulated by a pure function I'm
guessing
namely the function #message which is pure or can be pure
and then the data a is put back into the Monad m
and m is passed to the next >>= bind in line
return is like takes in a data a and returns m a
so the function [ :a | m ( a message ) ]
is actually [ :a | ( a message ) return ]
or [ :a :monad | ( a message ) return: monad ]
so this is all optimized by the compiler down into native code.
So to get away from this >>= bind nonsense the compiler has a
do { s1 ; s2 ; s3 ; s4 ... }
which gets translated by a preprocessor into
( ( ( s1 >>= s2 ) >>= s3 ) >>= s4 ) ...
where s1 returns an
m a
and the si have the form [ :a | ( a messagei) return: m ]
another gmail blow out
I can't see what I am typing
I'm typing blind
oh well
snow blind
>
> On Fri, Nov 7, 2014 at 5:51 PM, Kjell Godo <squeaklist(a)gmail.com> wrote:
>
>> This is off topic.
>
>
>
On Tuesday, November 11, 2014, Kjell Godo <squeaklist(a)gmail.com> wrote:
>
>
> On Friday, November 7, 2014, kilon alios <kilon.alios(a)gmail.com> wrote:
>
>> Its definetly an interesting concept. I am curious to give it a try
>> because it would take me outside my comfort zone and there is nothing more
>> that I love than getting outside my comfort zone. But I blame Pharo and the
>> Pharo people who dont let me to try another language, damn them !!!! DAMN
>> THEM I SAY!!!!
>>
>> Side effects certainly can be a source of trouble but alas they are not
>> the holy grail of trouble. Coding is a complex subject so introducing
>> restrictions of purity will produce some side effects. OH YES PUN WAS
>> INTENDED !!!!
>>
>> Its easy to dismiss such an approach however without trying it in
>> practice with real projects. But then I do also recognise that mixing types
>> can be a problem too at some point that does not convince me into going to
>> static type language.
>>
>> I think for Pharo state is much less of a problem because Pharo has very
>> powerful inspector , debuger and IDE to track down state. So its easy for a
>> pharo developer to be aware of state compared to some developer using
>> another language and not using an IDE at all. If state becomes too complex
>> then its a sign to refactor code and make it simpler. I do think however
>> with powerful IDEs you can get around this problem easily.
>>
>> So I cant say I am a big believer of Haskell.
>>
>> Also I real hate the terminology "side effect" ... sounds too.....
>> elitist to me.
>>
>
> bravo
>
> that's the spirit
>
>
>
>
>
> i like it
>
>
>
>
> so i looked up some more about
>
> monads
>
> http://book.realworldhaskell.org/read/monads.html
>
> and the teacher said
>
> no it was another teacher but i can't find him now
>
> something that is really sticking in my head
>
> he said
>
> something like
>
> he said
>
> the state changes are in the monads
>
> they are localised in the monads
>
> like we stick the dangerous bits into a seperate Package ( info )
>
> so we know where they are
>
>
> the pure functions defined outside of the monads
>
> are not really pure ( my take )
>
> they are definitely manipulating state
>
>
>
>
>
>>
>> On Fri, Nov 7, 2014 at 5:51 PM, Kjell Godo <squeaklist(a)gmail.com> wrote:
>>
>>> This is off topic.
>>>
>>> I tried to post it as a top level thread but I have become unknown.
>>>
>>> I don't know if you want this crap in here but I have decided not to
>>> wait for the
>>>
>>> postmaster to get back to me on the subject of becoming known. Feel
>>> free.
>>>
>>>
>>>
>>>
>>>
>>> ( Original-SUBJECT: "( picoVerse-:( what about state , is state
>>> really evil? ) )" )
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am a Smalltalker.
>>>
>>> But in the past few months i have been running with the Haskellers.
>>>
>>> The Haskellers hate state.
>>>
>>> This seemed strange at first because as a Smalltalker i love(d) state.
>>> State iswas my friend.
>>>
>>> 90% of my life as a Smalltalker is state wrangling. I am a state
>>> herder.
>>>
>>> The debugger is my staff I use to whack the state. And TestCase is my
>>> sheep dog.
>>>
>>> But to the Haskellers
>>>
>>> state is
>>>
>>> the evil trinity
>>>
>>> of
>>>
>>> satan the anti christ and the false prophet
>>>
>>> all rolled into one.
>>>
>>> State is the true dev incarnation of the total catastrophe of
>>> development Armageddon.
>>>
>>> Blood up to the bridles for hundreds of miles. Dogs and cats living
>>> together. Mass hysteria.
>>>
>>> They say.
>>>
>>> I'm not sure i quite get it yet but they keep preaching on this one
>>> point most of all.
>>>
>>> State is evil.
>>>
>>> You must keep all state in a Monad. As many methods/functions m as
>>> possible
>>>
>>> must be 100% dependent on the input parameters ONLY.
>>>
>>> No hidden instance variables affecting the return value of m are allowed.
>>>
>>> The only effect m can have is to return a value.
>>>
>>> If all this is true then m is pure.
>>>
>>> And pure is good. Pure is very good. And the wind says
>>>
>>> very.
>>>
>>> So i wonder if any of you fellow
>>>
>>> Smalltalkers
>>>
>>> have thought about this at all.
>>>
>>> Thanks
>>>
>>> Kjell E Godø
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> (((((((((( Maybe Smalltalk should be called Statewalk
>>>
>>> as in yak it up fuzz ball. ))))))))))
>>>
>>>
>>> On Tuesday, November 4, 2014, Alain Rastoul <alf.mmm.cat(a)gmail.com>
>>> wrote:
>>>
>>>> Stef,
>>>> As I said to Igor, the main problem about NativeBoost was between
>>>> the chair and the keyboard... :)
>>>> It is my first use of NativeBoost, I simply overlooked the very good
>>>> existing chapter of EnterprisePharo on NativeBoost
>>>> (NativeBoost recipes, the X11 journey) and misused the
>>>> NativeBoost marshalling of data types.
>>>> NAtiveBoost is great.
>>>>
>>>> If I achieve my experiments with zeromq and ends up with
>>>> something clean (not the case actually, and not my first goal),
>>>> I will be glad to add a chapter about that.
>>>>
>>>> My current problem is about a different socket behaviour between
>>>> windows and linux.
>>>> I think this is not a problem with ZeroMQ, the C program works as
>>>> expected,
>>>> I have to look for an explanation.
>>>> No stress about that
>>>>
>>>>
>>>> Alain
>>>>
>>>>
>>>> Le 04/11/2014 10:39, stepharo a écrit :
>>>>
>>>>> Alain
>>>>>
>>>>> which nativeboost chapter :)?
>>>>> Could you propose a paragraph so that we cover the problem you faced?
>>>>>
>>>>> Stef
>>>>>
>>>>> On 4/11/14 00:44, Alain Rastoul wrote:
>>>>>
>>>>>> Hi Igor,
>>>>>>
>>>>>> Thank you for your answer, it worked perfectly
>>>>>> Looks like I overlooked the nativeboost chapter
>>>>>> .. 10 timesRepeatAfterMe: [self rtfm ] .
>>>>>> And my suggestion about testing nil was stupid, much better to fail
>>>>>> soon.
>>>>>> ... I am an ass on this one...
>>>>>>
>>>>>> However, I am struggling on another point you already answered in the
>>>>>> past
>>>>>> in the mailing list to a guy who wanted to use socket.io :
>>>>>> (http://forum.world.st/socket-io-td3891592.html#a3893031)
>>>>>> "Sockets in Pharo are not blocking the whole VM.
>>>>>> What they block is the process which working with concrete socket. But
>>>>>> other processes can still run, while
>>>>>> one waiting data / even from single socket. "
>>>>>> on windows, zmq socket receive is blocking, on linux, not blocking
>>>>>> (hence not working).
>>>>>> As zmq is doing is IO on another thread, I guess there is some side
>>>>>> effect of
>>>>>> socket receive timeout settings somewhere (in the plugin ?) - just a
>>>>>> guess...
>>>>>> Getting socket options shows no difference, but I don't know how it is
>>>>>> done on the vm
>>>>>> side with regards to threads and if the socket is the same (zmq socket
>>>>>> is not the tcp socket)...
>>>>>> And on linux, the equivalent C program of to the smalltalk version
>>>>>> blocks as expected.
>>>>>>
>>>>>> I a mperplexified ...
>>>>>> may be I should look at vm and plugin code (VMMaker package IIRC) ?
>>>>>> Do you have another advice ?
>>>>>>
>>>>>> Thanks you
>>>>>>
>>>>>> Alain
>>>>>> Le 03/11/2014 02:12, Igor Stasenko a écrit :
>>>>>>
>>>>>>> NBExternalArray instances cannot be passed directly to functions
>>>>>>> expecting pointers.
>>>>>>>
>>>>>>> use 'myarray address' for arguments.
>>>>>>>
>>>>>>> On 3 November 2014 00:20, Alain Rastoul
>>>>>>> <alf.mmm.cat(a)gmail.com
>>>>>>> <mailto:alf.mmm.cat@gmail.com>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have a problem with a nativeboost call, but I don't see what
>>>>>>> I do
>>>>>>> wrong.
>>>>>>>
>>>>>>> library function prototype is:
>>>>>>> int zmq_getsockopt (void *socket, int option_name, void
>>>>>>> *option_value, size_t *option_len);
>>>>>>>
>>>>>>> my calling method in pharo is:
>>>>>>> zmq_getsockopt: socket option_name: option_name option_value:
>>>>>>> option_value option_len: option_len
>>>>>>> <primitive: #primitiveNativeCall module:
>>>>>>> #NativeBoostPlugin
>>>>>>> error: errorCode>
>>>>>>> ^self nbCall: #(int zmq_getsockopt (void *socket, int
>>>>>>> option_name, void * option_value, size_t* option_len) )
>>>>>>>
>>>>>>> when I call it with
>>>>>>> ...
>>>>>>> optionValue := (NBExternalArray ofType: 'int') externalNew: 1.
>>>>>>> optionLen := (NBExternalArray ofType: 'size_t' ) externalNew: 1.
>>>>>>> [ optionValue at: 1 put: 0 .
>>>>>>> optionLen at: 1 put: (NBExternalType sizeOf: 'int') .
>>>>>>> rc := self zmq_getsockopt: socket option_name:
>>>>>>> option_name
>>>>>>> option_value: optionValue
>>>>>>> option_len: optionLen .
>>>>>>> value := optionValue at: 1 .
>>>>>>> ] ensure: [ optionValue free.
>>>>>>> optionLen free ].
>>>>>>> ...
>>>>>>> I allways get an exception: "error during FFI call : nil"
>>>>>>>
>>>>>>>
>>>>>>> After stepping in NBFFICallout generation, I found something
>>>>>>> strange, the code
>>>>>>> generation seems not to be called because lastError stays at nil
>>>>>>> ?
>>>>>>>
>>>>>>> handleFailureIn: aContext nativeCode: aBlock
>>>>>>> lastError := self getErrorFrom: aContext lastError:
>>>>>>> NativeBoost lastError.
>>>>>>>
>>>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>>>> ... checks pragmas etc
>>>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>>>> ... lastError := aContext tempAt: method
>>>>>>> numTemps.
>>>>>>> => lastError = nil ??? shouldn't be
>>>>>>> ErrNoNativeCodeInMethod ?
>>>>>>> "install native code and retry the send"
>>>>>>> lastError = ErrNoNativeCodeInMethod
>>>>>>> ifTrue: [ ^ self generateCode: aBlock andRetry:
>>>>>>> aContext ].
>>>>>>> never gets called ...
>>>>>>>
>>>>>>> "ok, we're out of options, signal an error here"
>>>>>>> ^ self signalError: lastError
>>>>>>>
>>>>>>> Could it be because I use this image on windows and unix ?
>>>>>>> Or because I had an exception at prototype parsing the first time
>>>>>>> because I forgot a ; at the end of the prototype ?
>>>>>>>
>>>>>>> Is my prototype correct or is it the origin of the error ?
>>>>>>> Is there a way to reset the lastError (aContext tempAt: method
>>>>>>> numTemps) ?
>>>>>>> I will try to reset it in debugger but may be there is a cleaner
>>>>>>> way ?
>>>>>>> would it be ok to change the test in handleFailure to
>>>>>>> (lastError = ErrNoNativeCodeInMethod) or:[ lastError isNil ] ?
>>>>>>> (I can open a bug in this case )
>>>>>>>
>>>>>>> Any idea or comment is welcome
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> Alain
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Igor Stasenko.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
Nov. 11, 2014
Re: [Pharo-dev] Webdoc: status?
by Yuriy Tymchuk
Can we change the configuration in meta repo? Or if not, let me know if there will be other one. Iâm using it in my tutorial http://sleepycoders.blogspot.ch/2014/05/auto-documenting-your-pharo-project… <http://sleepycoders.blogspot.ch/2014/05/auto-documenting-your-pharo-project…>
Uko
> On 11 Nov 2014, at 17:31, Stephan Eggermont <stephan(a)stack.nl> wrote:
>
> Philippe wrote:
>> I got it working and it is full of useful code.
>
> Tell me where you put it on smalltalkhub and I'll point the build to it.
>
> Stephan
>
Nov. 11, 2014
NAtiveBoost error
by Kjell Godo
On Friday, November 7, 2014, kilon alios <kilon.alios(a)gmail.com
<javascript:_e(%7B%7D,'cvml','kilon.alios(a)gmail.com');>> wrote:
> Its definetly an interesting concept. I am curious to give it a try
> because it would take me outside my comfort zone and there is nothing more
> that I love than getting outside my comfort zone. But I blame Pharo and the
> Pharo people who dont let me to try another language, damn them !!!! DAMN
> THEM I SAY!!!!
>
> Side effects certainly can be a source of trouble but alas they are not
> the holy grail of trouble. Coding is a complex subject so introducing
> restrictions of purity will produce some side effects. OH YES PUN WAS
> INTENDED !!!!
>
> Its easy to dismiss such an approach however without trying it in practice
> with real projects. But then I do also recognise that mixing types can be a
> problem too at some point that does not convince me into going to static
> type language.
>
> I think for Pharo state is much less of a problem because Pharo has very
> powerful inspector , debuger and IDE to track down state. So its easy for a
> pharo developer to be aware of state compared to some developer using
> another language and not using an IDE at all. If state becomes too complex
> then its a sign to refactor code and make it simpler. I do think however
> with powerful IDEs you can get around this problem easily.
>
> So I cant say I am a big believer of Haskell.
>
> Also I real hate the terminology "side effect" ... sounds too..... elitist
> to me.
>
bravo
that's the spirit
i like it
so i looked up some more about
monads
http://book.realworldhaskell.org/read/monads.html
and the teacher said
no it was another teacher but i can't find him now
something that is really sticking in my head
he said
something like
he said
the state changes are in the monads
they are localised in the monads
like we stick the dangerous bits into a seperate Package ( info )
so we know where they are
the pure functions defined outside of the monads
are not really pure ( my take )
they are definitely manipulating state
>
> On Fri, Nov 7, 2014 at 5:51 PM, Kjell Godo <squeaklist(a)gmail.com> wrote:
>
>> This is off topic.
>>
>> I tried to post it as a top level thread but I have become unknown.
>>
>> I don't know if you want this crap in here but I have decided not to wait
>> for the
>>
>> postmaster to get back to me on the subject of becoming known. Feel free.
>>
>>
>>
>>
>>
>> ( Original-SUBJECT: "( picoVerse-:( what about state , is state
>> really evil? ) )" )
>>
>>
>>
>>
>>
>>
>> I am a Smalltalker.
>>
>> But in the past few months i have been running with the Haskellers.
>>
>> The Haskellers hate state.
>>
>> This seemed strange at first because as a Smalltalker i love(d) state.
>> State iswas my friend.
>>
>> 90% of my life as a Smalltalker is state wrangling. I am a state herder.
>>
>>
>> The debugger is my staff I use to whack the state. And TestCase is my
>> sheep dog.
>>
>> But to the Haskellers
>>
>> state is
>>
>> the evil trinity
>>
>> of
>>
>> satan the anti christ and the false prophet
>>
>> all rolled into one.
>>
>> State is the true dev incarnation of the total catastrophe of development
>> Armageddon.
>>
>> Blood up to the bridles for hundreds of miles. Dogs and cats living
>> together. Mass hysteria.
>>
>> They say.
>>
>> I'm not sure i quite get it yet but they keep preaching on this one point
>> most of all.
>>
>> State is evil.
>>
>> You must keep all state in a Monad. As many methods/functions m as
>> possible
>>
>> must be 100% dependent on the input parameters ONLY.
>>
>> No hidden instance variables affecting the return value of m are allowed.
>>
>> The only effect m can have is to return a value.
>>
>> If all this is true then m is pure.
>>
>> And pure is good. Pure is very good. And the wind says
>>
>> very.
>>
>> So i wonder if any of you fellow
>>
>> Smalltalkers
>>
>> have thought about this at all.
>>
>> Thanks
>>
>> Kjell E Godø
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> (((((((((( Maybe Smalltalk should be called Statewalk
>>
>> as in yak it up fuzz ball. ))))))))))
>>
>>
>> On Tuesday, November 4, 2014, Alain Rastoul <alf.mmm.cat(a)gmail.com>
>> wrote:
>>
>>> Stef,
>>> As I said to Igor, the main problem about NativeBoost was between
>>> the chair and the keyboard... :)
>>> It is my first use of NativeBoost, I simply overlooked the very good
>>> existing chapter of EnterprisePharo on NativeBoost
>>> (NativeBoost recipes, the X11 journey) and misused the
>>> NativeBoost marshalling of data types.
>>> NAtiveBoost is great.
>>>
>>> If I achieve my experiments with zeromq and ends up with
>>> something clean (not the case actually, and not my first goal),
>>> I will be glad to add a chapter about that.
>>>
>>> My current problem is about a different socket behaviour between
>>> windows and linux.
>>> I think this is not a problem with ZeroMQ, the C program works as
>>> expected,
>>> I have to look for an explanation.
>>> No stress about that
>>>
>>>
>>> Alain
>>>
>>>
>>> Le 04/11/2014 10:39, stepharo a écrit :
>>>
>>>> Alain
>>>>
>>>> which nativeboost chapter :)?
>>>> Could you propose a paragraph so that we cover the problem you faced?
>>>>
>>>> Stef
>>>>
>>>> On 4/11/14 00:44, Alain Rastoul wrote:
>>>>
>>>>> Hi Igor,
>>>>>
>>>>> Thank you for your answer, it worked perfectly
>>>>> Looks like I overlooked the nativeboost chapter
>>>>> .. 10 timesRepeatAfterMe: [self rtfm ] .
>>>>> And my suggestion about testing nil was stupid, much better to fail
>>>>> soon.
>>>>> ... I am an ass on this one...
>>>>>
>>>>> However, I am struggling on another point you already answered in the
>>>>> past
>>>>> in the mailing list to a guy who wanted to use socket.io :
>>>>> (http://forum.world.st/socket-io-td3891592.html#a3893031)
>>>>> "Sockets in Pharo are not blocking the whole VM.
>>>>> What they block is the process which working with concrete socket. But
>>>>> other processes can still run, while
>>>>> one waiting data / even from single socket. "
>>>>> on windows, zmq socket receive is blocking, on linux, not blocking
>>>>> (hence not working).
>>>>> As zmq is doing is IO on another thread, I guess there is some side
>>>>> effect of
>>>>> socket receive timeout settings somewhere (in the plugin ?) - just a
>>>>> guess...
>>>>> Getting socket options shows no difference, but I don't know how it is
>>>>> done on the vm
>>>>> side with regards to threads and if the socket is the same (zmq socket
>>>>> is not the tcp socket)...
>>>>> And on linux, the equivalent C program of to the smalltalk version
>>>>> blocks as expected.
>>>>>
>>>>> I a mperplexified ...
>>>>> may be I should look at vm and plugin code (VMMaker package IIRC) ?
>>>>> Do you have another advice ?
>>>>>
>>>>> Thanks you
>>>>>
>>>>> Alain
>>>>> Le 03/11/2014 02:12, Igor Stasenko a écrit :
>>>>>
>>>>>> NBExternalArray instances cannot be passed directly to functions
>>>>>> expecting pointers.
>>>>>>
>>>>>> use 'myarray address' for arguments.
>>>>>>
>>>>>> On 3 November 2014 00:20, Alain Rastoul
>>>>>> <alf.mmm.cat(a)gmail.com
>>>>>> <mailto:alf.mmm.cat@gmail.com>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have a problem with a nativeboost call, but I don't see what I
>>>>>> do
>>>>>> wrong.
>>>>>>
>>>>>> library function prototype is:
>>>>>> int zmq_getsockopt (void *socket, int option_name, void
>>>>>> *option_value, size_t *option_len);
>>>>>>
>>>>>> my calling method in pharo is:
>>>>>> zmq_getsockopt: socket option_name: option_name option_value:
>>>>>> option_value option_len: option_len
>>>>>> <primitive: #primitiveNativeCall module:
>>>>>> #NativeBoostPlugin
>>>>>> error: errorCode>
>>>>>> ^self nbCall: #(int zmq_getsockopt (void *socket, int
>>>>>> option_name, void * option_value, size_t* option_len) )
>>>>>>
>>>>>> when I call it with
>>>>>> ...
>>>>>> optionValue := (NBExternalArray ofType: 'int') externalNew: 1.
>>>>>> optionLen := (NBExternalArray ofType: 'size_t' ) externalNew: 1.
>>>>>> [ optionValue at: 1 put: 0 .
>>>>>> optionLen at: 1 put: (NBExternalType sizeOf: 'int') .
>>>>>> rc := self zmq_getsockopt: socket option_name:
>>>>>> option_name
>>>>>> option_value: optionValue
>>>>>> option_len: optionLen .
>>>>>> value := optionValue at: 1 .
>>>>>> ] ensure: [ optionValue free.
>>>>>> optionLen free ].
>>>>>> ...
>>>>>> I allways get an exception: "error during FFI call : nil"
>>>>>>
>>>>>>
>>>>>> After stepping in NBFFICallout generation, I found something
>>>>>> strange, the code
>>>>>> generation seems not to be called because lastError stays at nil ?
>>>>>>
>>>>>> handleFailureIn: aContext nativeCode: aBlock
>>>>>> lastError := self getErrorFrom: aContext lastError:
>>>>>> NativeBoost lastError.
>>>>>>
>>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>>> ... checks pragmas etc
>>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>>> ... lastError := aContext tempAt: method
>>>>>> numTemps.
>>>>>> => lastError = nil ??? shouldn't be
>>>>>> ErrNoNativeCodeInMethod ?
>>>>>> "install native code and retry the send"
>>>>>> lastError = ErrNoNativeCodeInMethod
>>>>>> ifTrue: [ ^ self generateCode: aBlock andRetry:
>>>>>> aContext ].
>>>>>> never gets called ...
>>>>>>
>>>>>> "ok, we're out of options, signal an error here"
>>>>>> ^ self signalError: lastError
>>>>>>
>>>>>> Could it be because I use this image on windows and unix ?
>>>>>> Or because I had an exception at prototype parsing the first time
>>>>>> because I forgot a ; at the end of the prototype ?
>>>>>>
>>>>>> Is my prototype correct or is it the origin of the error ?
>>>>>> Is there a way to reset the lastError (aContext tempAt: method
>>>>>> numTemps) ?
>>>>>> I will try to reset it in debugger but may be there is a cleaner
>>>>>> way ?
>>>>>> would it be ok to change the test in handleFailure to
>>>>>> (lastError = ErrNoNativeCodeInMethod) or:[ lastError isNil ] ?
>>>>>> (I can open a bug in this case )
>>>>>>
>>>>>> Any idea or comment is welcome
>>>>>> Thanks in advance
>>>>>>
>>>>>> Alain
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Igor Stasenko.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>
Nov. 11, 2014
Re: [Pharo-dev] Fwd: Webdoc: status?
by Stephan Eggermont
Philippe wrote:
> I got it working and it is full of useful code.
Tell me where you put it on smalltalkhub and I'll point the build to it.
Stephan
Nov. 11, 2014
Re: [Pharo-dev] NAtiveBoost error
by Kjell Godo
On Friday, November 7, 2014, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>
> Hmm⦠to me this mail looks like it is written by a Bot ?
>
> e.g. in a mailing list everyone can start a top level thread. unknown users
> can not post at all.
>
> And I am the âpostmasterâ of this list and I have not gotten any requests
> at all...
>
well
I don't know
but i tried to post to the top level
simon dimon himon
and i got this error message that i am
unknown
and that if this condition persisted i should send a message to the
postmaster
so after failing over a couple times to figure out how to do that
can't we just consider this to be
it
>
> On 07 Nov 2014, at 16:51, Kjell Godo <squeaklist(a)gmail.com
> <javascript:_e(%7B%7D,'cvml','squeaklist(a)gmail.com');>> wrote:
>
> This is off topic.
>
> I tried to post it as a top level thread but I have become unknown.
>
> I don't know if you want this crap in here but I have decided not to wait
> for the
>
> postmaster to get back to me on the subject of becoming known. Feel free.
>
>
>
>
>
> ( Original-SUBJECT: "( picoVerse-:( what about state , is state really
> evil? ) )" )
>
>
>
>
>
>
> I am a Smalltalker.
>
> But in the past few months i have been running with the Haskellers.
>
> The Haskellers hate state.
>
> This seemed strange at first because as a Smalltalker i love(d) state.
> State iswas my friend.
>
> 90% of my life as a Smalltalker is state wrangling. I am a state herder.
>
> The debugger is my staff I use to whack the state. And TestCase is my
> sheep dog.
>
> But to the Haskellers
>
> state is
>
> the evil trinity
>
> of
>
> satan the anti christ and the false prophet
>
> all rolled into one.
>
> State is the true dev incarnation of the total catastrophe of development
> Armageddon.
>
> Blood up to the bridles for hundreds of miles. Dogs and cats living
> together. Mass hysteria.
>
> They say.
>
> I'm not sure i quite get it yet but they keep preaching on this one point
> most of all.
>
> State is evil.
>
> You must keep all state in a Monad. As many methods/functions m as
> possible
>
> must be 100% dependent on the input parameters ONLY.
>
> No hidden instance variables affecting the return value of m are allowed.
>
> The only effect m can have is to return a value.
>
> If all this is true then m is pure.
>
> And pure is good. Pure is very good. And the wind says
>
> very.
>
> So i wonder if any of you fellow
>
> Smalltalkers
>
> have thought about this at all.
>
> Thanks
>
> Kjell E Godø
>
>
>
>
>
>
>
>
>
> (((((((((( Maybe Smalltalk should be called Statewalk
>
> as in yak it up fuzz ball. ))))))))))
>
>
> On Tuesday, November 4, 2014, Alain Rastoul <alf.mmm.cat(a)gmail.com
> <javascript:_e(%7B%7D,'cvml','alf.mmm.cat(a)gmail.com');>> wrote:
>
>> Stef,
>> As I said to Igor, the main problem about NativeBoost was between
>> the chair and the keyboard... :)
>> It is my first use of NativeBoost, I simply overlooked the very good
>> existing chapter of EnterprisePharo on NativeBoost
>> (NativeBoost recipes, the X11 journey) and misused the
>> NativeBoost marshalling of data types.
>> NAtiveBoost is great.
>>
>> If I achieve my experiments with zeromq and ends up with
>> something clean (not the case actually, and not my first goal),
>> I will be glad to add a chapter about that.
>>
>> My current problem is about a different socket behaviour between
>> windows and linux.
>> I think this is not a problem with ZeroMQ, the C program works as
>> expected,
>> I have to look for an explanation.
>> No stress about that
>>
>>
>> Alain
>>
>>
>> Le 04/11/2014 10:39, stepharo a écrit :
>>
>>> Alain
>>>
>>> which nativeboost chapter :)?
>>> Could you propose a paragraph so that we cover the problem you faced?
>>>
>>> Stef
>>>
>>> On 4/11/14 00:44, Alain Rastoul wrote:
>>>
>>>> Hi Igor,
>>>>
>>>> Thank you for your answer, it worked perfectly
>>>> Looks like I overlooked the nativeboost chapter
>>>> .. 10 timesRepeatAfterMe: [self rtfm ] .
>>>> And my suggestion about testing nil was stupid, much better to fail
>>>> soon.
>>>> ... I am an ass on this one...
>>>>
>>>> However, I am struggling on another point you already answered in the
>>>> past
>>>> in the mailing list to a guy who wanted to use socket.io :
>>>> (http://forum.world.st/socket-io-td3891592.html#a3893031)
>>>> "Sockets in Pharo are not blocking the whole VM.
>>>> What they block is the process which working with concrete socket. But
>>>> other processes can still run, while
>>>> one waiting data / even from single socket. "
>>>> on windows, zmq socket receive is blocking, on linux, not blocking
>>>> (hence not working).
>>>> As zmq is doing is IO on another thread, I guess there is some side
>>>> effect of
>>>> socket receive timeout settings somewhere (in the plugin ?) - just a
>>>> guess...
>>>> Getting socket options shows no difference, but I don't know how it is
>>>> done on the vm
>>>> side with regards to threads and if the socket is the same (zmq socket
>>>> is not the tcp socket)...
>>>> And on linux, the equivalent C program of to the smalltalk version
>>>> blocks as expected.
>>>>
>>>> I a mperplexified ...
>>>> may be I should look at vm and plugin code (VMMaker package IIRC) ?
>>>> Do you have another advice ?
>>>>
>>>> Thanks you
>>>>
>>>> Alain
>>>> Le 03/11/2014 02:12, Igor Stasenko a écrit :
>>>>
>>>>> NBExternalArray instances cannot be passed directly to functions
>>>>> expecting pointers.
>>>>>
>>>>> use 'myarray address' for arguments.
>>>>>
>>>>> On 3 November 2014 00:20, Alain Rastoul
>>>>> <alf.mmm.cat(a)gmail.com
>>>>> <mailto:alf.mmm.cat@gmail.com>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I have a problem with a nativeboost call, but I don't see what I
>>>>> do
>>>>> wrong.
>>>>>
>>>>> library function prototype is:
>>>>> int zmq_getsockopt (void *socket, int option_name, void
>>>>> *option_value, size_t *option_len);
>>>>>
>>>>> my calling method in pharo is:
>>>>> zmq_getsockopt: socket option_name: option_name option_value:
>>>>> option_value option_len: option_len
>>>>> <primitive: #primitiveNativeCall module:
>>>>> #NativeBoostPlugin
>>>>> error: errorCode>
>>>>> ^self nbCall: #(int zmq_getsockopt (void *socket, int
>>>>> option_name, void * option_value, size_t* option_len) )
>>>>>
>>>>> when I call it with
>>>>> ...
>>>>> optionValue := (NBExternalArray ofType: 'int') externalNew: 1.
>>>>> optionLen := (NBExternalArray ofType: 'size_t' ) externalNew: 1.
>>>>> [ optionValue at: 1 put: 0 .
>>>>> optionLen at: 1 put: (NBExternalType sizeOf: 'int') .
>>>>> rc := self zmq_getsockopt: socket option_name: option_name
>>>>> option_value: optionValue
>>>>> option_len: optionLen .
>>>>> value := optionValue at: 1 .
>>>>> ] ensure: [ optionValue free.
>>>>> optionLen free ].
>>>>> ...
>>>>> I allways get an exception: "error during FFI call : nil"
>>>>>
>>>>>
>>>>> After stepping in NBFFICallout generation, I found something
>>>>> strange, the code
>>>>> generation seems not to be called because lastError stays at nil ?
>>>>>
>>>>> handleFailureIn: aContext nativeCode: aBlock
>>>>> lastError := self getErrorFrom: aContext lastError:
>>>>> NativeBoost lastError.
>>>>>
>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>> ... checks pragmas etc
>>>>> >>getErrorFrom: aContext lastError: errorCode
>>>>> ... lastError := aContext tempAt: method
>>>>> numTemps.
>>>>> => lastError = nil ??? shouldn't be
>>>>> ErrNoNativeCodeInMethod ?
>>>>> "install native code and retry the send"
>>>>> lastError = ErrNoNativeCodeInMethod
>>>>> ifTrue: [ ^ self generateCode: aBlock andRetry:
>>>>> aContext ].
>>>>> never gets called ...
>>>>>
>>>>> "ok, we're out of options, signal an error here"
>>>>> ^ self signalError: lastError
>>>>>
>>>>> Could it be because I use this image on windows and unix ?
>>>>> Or because I had an exception at prototype parsing the first time
>>>>> because I forgot a ; at the end of the prototype ?
>>>>>
>>>>> Is my prototype correct or is it the origin of the error ?
>>>>> Is there a way to reset the lastError (aContext tempAt: method
>>>>> numTemps) ?
>>>>> I will try to reset it in debugger but may be there is a cleaner
>>>>> way ?
>>>>> would it be ok to change the test in handleFailure to
>>>>> (lastError = ErrNoNativeCodeInMethod) or:[ lastError isNil ] ?
>>>>> (I can open a bug in this case )
>>>>>
>>>>> Any idea or comment is welcome
>>>>> Thanks in advance
>>>>>
>>>>> Alain
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko.
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
Nov. 11, 2014
Re: [Pharo-dev] Fwd: Webdoc: status?
by phil@highoctane.be
Dead?
I got it working and it is full of useful code.
The server thing inside is also very cool.
Phil
Le 11 nov. 2014 16:45, "stepharo" <stepharo(a)free.fr> a écrit :
>
> Camillo deleted his smalltalkhub repos.
>>
> WebDoc is then dead.
> I will not publicly comment it more.
>
>>
>> Stephan
>>
>>
>>
>>
>
>
Nov. 11, 2014
Re: [Pharo-dev] How to merge code in Pharo3.0
by stepharo
Hi Hans Peter,
usually I click on the package version and press merge.
When there is a conflict I select the item and decide which one I keep
either the incoming or the other.
This is not working for you?
May be we got a glitch.
Stef
On 11/11/14 09:34, Holger Hans Peter Freyther wrote:
> Hi,
>
> I am sorry if that is the wrong mailinglist. I know how to merge code
> with vimdiff, manual merge markers, kdiff3, meld but I just can't
> figure out how to do it with monticello.
>
> In the codebase I am using calls to >>#createDialogue were replaced
> with >>#newDialogue but I have a local modification that replaces a
> wrong call to >>#failure with >>#signalFailure.
>
> For a given method/selector. I do select what I want from the other
> code (the newDialogue change) and I select what I want from my code.
> The text/code in the bottom pane looks good but the number of conflicts
> don't go down. If I unselect the "Apply this change" then my original
> code without >>#newDialogue is there. In case I modify the text at
> the bottom and try to save it.. nothing happens.
>
> Can someone point me to an example/documentation?
>
> holger
>
>
>
Nov. 11, 2014
Re: [Pharo-dev] Fwd: Webdoc: status?
by stepharo
> Camillo deleted his smalltalkhub repos.
WebDoc is then dead.
I will not publicly comment it more.
>
> Stephan
>
>
>
Nov. 11, 2014
Re: [Pharo-dev] Webdoc: status?
by Max Leske
@phil
FFITestLibrary isnât in the standard configuration. Whatâs the repository url?
> On 11.11.2014, at 16:35, Max Leske <maxleske(a)gmail.com> wrote:
>
> The build fails because Camilloâs repo is gone from smalltalkhub. The same is true for all the Pharo related stuff on his github account.
>
> Iâve got it working locally with a bit of symlinking. If Esteban is ok with it, Iâll do a quick fix to get the build working again.
>
> Cheers,
> Max
>
>
>> On 11.11.2014, at 15:19, phil(a)highoctane.be <mailto:phil@highoctane.be> wrote:
>>
>>
>> bump.
>>
>> ---------- Forwarded message ----------
>> From: phil(a)highoctane.be <mailto:phil@highoctane.be> <phil(a)highoctane.be <mailto:phil@highoctane.be>>
>> Date: Mon, Nov 10, 2014 at 4:34 PM
>> Subject: Webdoc: status?
>> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>>
>>
>>
>> I'd like to use WebDoc for generating my project code doc;
>>
>> I see that
>>
>> https://ci.inria.fr/pharo-contribution/job/WebDoc/ <https://ci.inria.fr/pharo-contribution/job/WebDoc/>
>>
>> is pretty much red for a long time.
>>
>> Started by timer
>> Building remotely on pharo-contribution-win7.ci.inria.fr <https://ci.inria.fr/pharo-contribution/computer/pharo-contribution-win7.ci.…> (win7 32 win) in workspace C:\builds\workspace\WebDoc
>>
>> Deleting project workspace... done
>>
>> Triggering 30,development,vm <https://ci.inria.fr/pharo-contribution/job/WebDoc/PHARO=30,VERSION=developm…>
>> 30,development,vm <https://ci.inria.fr/pharo-contribution/job/WebDoc/PHARO=30,VERSION=developm…> completed with result FAILURE
>>
>> Deleting matrix project workspace...
>> Skipped based on build state FAILURE
>>
>> Finished: FAILURE
>>
>> But the green one isn't more indicative of success...
>>
>> What's the status? Is it used by someone? I tried the config and it crashed;
>>
>> github-camillobruniPPMarkdown184.... does not exit.
>>
>> :-(
>>
>> The catalog says:
>>
>> https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/HTML_Report/ <https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/HTML_Report/>
>>
>>
>> So,
>>
>> - I cloned Esteban's github repo (git(a)github.com <mailto:git@github.com>=estebanlm/pharo-webdoc.git
>> - git submodule init update --init
>>
>> Loaded by hand the packages in the submodule (petitmarkdown)
>> Loaded the WebDoc package (the SimpleWebDoc doesn't load, even if I have Seaside in my image).
>>
>> In a workspace:
>>
>> (WebDocExporter packages: RPackageOrganizer default packages) exportTo: './doc' asFileReference.
>>
>> Which started to generate html files in doc/ nicely but choked while exporting FFITestLibrary
>>
>>
>> Ideas why it fails?
>> Known issue?
>>
>> TIA
>> Phil
>>
>>
>>
>>
>>
>> <PharoScreenshot.1.png>
>
Nov. 11, 2014
Re: [Pharo-dev] Webdoc: status?
by Max Leske
The build fails because Camilloâs repo is gone from smalltalkhub. The same is true for all the Pharo related stuff on his github account.
Iâve got it working locally with a bit of symlinking. If Esteban is ok with it, Iâll do a quick fix to get the build working again.
Cheers,
Max
> On 11.11.2014, at 15:19, phil(a)highoctane.be wrote:
>
>
> bump.
>
> ---------- Forwarded message ----------
> From: phil(a)highoctane.be <mailto:phil@highoctane.be> <phil(a)highoctane.be <mailto:phil@highoctane.be>>
> Date: Mon, Nov 10, 2014 at 4:34 PM
> Subject: Webdoc: status?
> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>>
>
>
> I'd like to use WebDoc for generating my project code doc;
>
> I see that
>
> https://ci.inria.fr/pharo-contribution/job/WebDoc/ <https://ci.inria.fr/pharo-contribution/job/WebDoc/>
>
> is pretty much red for a long time.
>
> Started by timer
> Building remotely on pharo-contribution-win7.ci.inria.fr <https://ci.inria.fr/pharo-contribution/computer/pharo-contribution-win7.ci.…> (win7 32 win) in workspace C:\builds\workspace\WebDoc
>
> Deleting project workspace... done
>
> Triggering 30,development,vm <https://ci.inria.fr/pharo-contribution/job/WebDoc/PHARO=30,VERSION=developm…>
> 30,development,vm <https://ci.inria.fr/pharo-contribution/job/WebDoc/PHARO=30,VERSION=developm…> completed with result FAILURE
>
> Deleting matrix project workspace...
> Skipped based on build state FAILURE
>
> Finished: FAILURE
>
> But the green one isn't more indicative of success...
>
> What's the status? Is it used by someone? I tried the config and it crashed;
>
> github-camillobruniPPMarkdown184.... does not exit.
>
> :-(
>
> The catalog says:
>
> https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/HTML_Report/ <https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/HTML_Report/>
>
>
> So,
>
> - I cloned Esteban's github repo (git(a)github.com <mailto:git@github.com>=estebanlm/pharo-webdoc.git
> - git submodule init update --init
>
> Loaded by hand the packages in the submodule (petitmarkdown)
> Loaded the WebDoc package (the SimpleWebDoc doesn't load, even if I have Seaside in my image).
>
> In a workspace:
>
> (WebDocExporter packages: RPackageOrganizer default packages) exportTo: './doc' asFileReference.
>
> Which started to generate html files in doc/ nicely but choked while exporting FFITestLibrary
>
>
> Ideas why it fails?
> Known issue?
>
> TIA
> Phil
>
>
>
>
>
> <PharoScreenshot.1.png>
Nov. 11, 2014