Re: [Pharo-users] Pharo 7- looking for seaside-REST and RFB

2018-11-23 Thread Johan Brichau
Sanjay,

Which version of Seaside are you using and from which repository?

Johan

> On 24 Nov 2018, at 07:22, Sanjay Minni  wrote:
> 
> 
> I am migrating my 6.1 application (under develoment) to 7.0 - 
> I have loaded the required packages first thru Catalog Browser (in 7.0) -
> Mandrill, Mustache, Seaside3, VoyageMongo
> 
> How to load the following in 7:
> - seaside-REST - My application looks for WARestfulComponentFilter
> - RFB 
> 
> 
> 
> Sven Van Caekenberghe-2 wrote
>> You need to tell us how are loading Seaside, exactly.
>> 
>> Using 
>> 
>> Metacello new
>> baseline:'Seaside3';
>> repository: 'github://SeasideSt/Seaside:master/repository';
>> load.
>> 
>> ?
>> 
>> The dev build on P7 passes it seems
>> https://travis-ci.org/SeasideSt/Seaside
>> 
>>> On 19 Nov 2018, at 17:34, Sanjay Minni 
> 
>> sm@
> 
>>  wrote:
>>> 
>>> How do I proceed from here ?
>>> 
>>> (Pharo 7 32 bit on Win 10) 
>>> 
>>> whle installing a developed package - Loading stops at
>>> Seaside-Pharo-JSON-Jo5
>>> 
>>> This package depends on the following classes:
>>> WAPharoEncoder
>>> You must resolve these dependencies before you will be able to load these
>>> definitions: 
>>> WAPharoJsonEncoder
>>> WAPharoJsonEncoder>>#delegateOn:
>>> WAPharoJsonEncoder>>#initialize
>>> WAPharoJsonEncoder>>#initializeJsonTable
>>> 
>>> 
>>> 
>>> 
>>> 
>>> -
>>> ---
>>> Regards, Sanjay
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>> 
> 
> 
> 
> 
> 
> -
> ---
> Regards, Sanjay
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 




[Pharo-users] Pharo 7- looking for seaside-REST and RFB

2018-11-23 Thread Sanjay Minni


I am migrating my 6.1 application (under develoment) to 7.0 - 
I have loaded the required packages first thru Catalog Browser (in 7.0) -
Mandrill, Mustache, Seaside3, VoyageMongo

How to load the following in 7:
- seaside-REST - My application looks for WARestfulComponentFilter
- RFB 



Sven Van Caekenberghe-2 wrote
> You need to tell us how are loading Seaside, exactly.
> 
> Using 
> 
> Metacello new
>  baseline:'Seaside3';
>  repository: 'github://SeasideSt/Seaside:master/repository';
>  load.
> 
> ?
> 
> The dev build on P7 passes it seems
> https://travis-ci.org/SeasideSt/Seaside
> 
>> On 19 Nov 2018, at 17:34, Sanjay Minni 

> sm@

>  wrote:
>> 
>> How do I proceed from here ?
>> 
>> (Pharo 7 32 bit on Win 10) 
>> 
>> whle installing a developed package - Loading stops at
>> Seaside-Pharo-JSON-Jo5
>> 
>> This package depends on the following classes:
>>  WAPharoEncoder
>> You must resolve these dependencies before you will be able to load these
>> definitions: 
>>  WAPharoJsonEncoder
>>  WAPharoJsonEncoder>>#delegateOn:
>>  WAPharoJsonEncoder>>#initialize
>>  WAPharoJsonEncoder>>#initializeJsonTable
>> 
>> 
>> 
>> 
>> 
>> -
>> ---
>> Regards, Sanjay
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>





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



Re: [Pharo-users] My Keynote at the Salta Conference

2018-11-23 Thread Offray Vladimir Luna Cárdenas
On 23/11/18 19:06, Offray Vladimir Luna Cárdenas wrote:
>
> Hi,
>
> Thanks for your positive and critical comments, as usual Ben.
>
> Richard I think that is important to listen to a community when
> reaching to it (I remember a talk we had where I suggested an approach
> closer to anthropology instead of marketing).
>
I meant from anthropology instead than from marketing... Sorry for all
other typos, hopefully they will be not so many.

Cheers,

Offray




Re: [Pharo-users] About the IoT Hackathon last Friday

2018-11-23 Thread Offray Vladimir Luna Cárdenas
Great video guys!

The only think I wonder when I saw hackathon and technical videos in
general is when/how we will get more diversity represented in the
participants (ethnicities, ages, gender), but of course this is a hard
open question that we all need to solve.

Cheers,

Offray

On 17/11/18 9:15, Norbert Hartl wrote:
> To get a better impression we made an image film of the event. Now the
> 4K version is available on youtube.
>
> https://www.youtube.com/watch?v=dIl9FAatKyw
>
> hope you like it,
>
> Norbert
>
>
>> Am 22.10.2018 um 16:23 schrieb Sven Van Caekenberghe > >:
>>
>> Last Friday we went to the IoT Hackathon in Köln and it was a great
>> experience.
>>
>> Thank you Norbert, Christian, Markus and the whole ZweiDenker team
>> for their generous hospitality: the accommodations where great
>> (beautiful office), the food and drinks super tasty, everybody
>> friendly and welcoming.
>>
>> Thank you Allex (Oliviera, Inria/RMOD) for running the workshop and
>> for being so patient, friendly and tireless in helping everyone with
>> all aspects of getting experiments up and running.
>>
>> I knew about PharoThings [1] and TelePharo [2] before, but actually
>> using it in practice to experience connecting software and hardware
>> felt a bit like magic. Thank you Denis (Kudriashov) and Inria/RMOD
>> for developing these packages.
>>
>> 
>>
>> 
>>
>> Sven
>>
>> [1] https://github.com/pharo-iot/PharoThings
>> [2] https://github.com/pharo-ide/TelePharo
>>
>>
>


Re: [Pharo-users] Lambda World 2018 - What FP can learn from Smalltalk by Aditya Siram

2018-11-23 Thread Offray Vladimir Luna Cárdenas
I saw it and really like it. Particularly the part where the speaker
says that is impressed about what a small community with not much
funding can do. Because this is also truth and doesn't hurt at all.

I don't know about the garbage collector. In my case, the more I use the
image and load things on it, the more it becomes slow, but not really
that much and now I can bootstrap kind of the same state in other image
in a really reproducible way, including loading external interactive
Grafoscopio documents.

Talking about numbers, I think that Nadia Eghbal [1] and Benjaming Mako
Hill[2] are making a great job approaching critically to Libre Open
Source communities and demystifying the Bazar and Big Communities behind
peer production and showing how most of the projects are done by small
communities and how the average FLOSS project has a median of one
developer. That doesn't mean that we are living in a dreamed world,
because relying on one person for 97% of the FLOSS over there is clearly
and risk the more that infrastructure becomes digital and relying on
FLOSS. What that means is that we need to care about increasing the
single developer mean for the projects we are working on and that is a
concrete approachable goal. If the Pharo community can make some much
with so little, imagine what we can do with a median of three developers
for project! This is where promoting efforts should be located, in my
opinion.

[1] https://nadiaeghbal.com/
[2] https://mako.cc/

I shared the talk, and several of the Nadia's and Mako's links, with the
local Grafoscopio community (40 members in the Telegram chat and less
that 50 in the mailing list, with some members overlap between them and
with four average active members, not all coders).

Cheers,

Offray


On 23/11/18 18:29, horrido wrote:
> I didn't like the fact that he said the Pharo community was really, really
> tiny, even compared to the likes of Clojure.
>
> Because the truth hurts. 
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>




Re: [Pharo-users] My Keynote at the Salta Conference

2018-11-23 Thread Offray Vladimir Luna Cárdenas
Hi,

Thanks for your positive and critical comments, as usual Ben.

Richard I think that is important to listen to a community when reaching
to it (I remember a talk we had where I suggested an approach closer to
anthropology instead of marketing). Many of us value your contributions,
despite of approaching them in a critical way. For example, I think that
promotion is important, but popularity is not, and the later is not a
proper measure of the effectivity of the former. As a Latin American
(that means people born and rise Latino America, not Latinos living in
United States) for me is really alien the North American people (that
means people living in the North region of the American continent that
goes from Alaska to Patagonia and beyond) is kind of obsessed with
popularity, competition, winning and losing, at least for what popular
media depicts (even seems that loser is kind of a big insult over
there). I don't think that winning a competition is the best way of
making a younger become part of collaborative open community. Also, in
an interconnected world, I feel more inclined to volunteer my time
helping a young person from the Global South to become part of the
Pharo/Smalltalk community that to volunteer my time for a pretty
localized competence in a particular place of the Global North.

That being said, I think that little money can help a lot (specially in
the Global South) and I like the idea of making young people interested
in the offerings that Smalltalk has. The average FLOSS project has a
media of one developer [1], so even winning one more after the
competition is a big win. But I would try to volunteer my time in
something that brings the gap between Pharo communities and young people
and between the Global North and the Global South, specifically in my
Pharo powered project, Grafoscopio.

[1] https://mako.cc/writing/hill-when_free_software_isnt_better.html

So I'm glad that you are open to suggestions. Here come mine about how
this could be done, but this may also become something totally different
of your actual proposal, but, hopefully, also more global, interesting,
long lasting and a middle point between your promotional efforts and the
activities of this community.

# The Smalltalk Global Campfire

Is an immersive inclusive global experience where new people (regardless
of age, ethnicity or gender) can participate in a Smalltalk powered
project and get mentorship from community members and start a long
lasting relationship with a powerful technology, Smalltalk, and the
friendly communities around it.

## How it will work

Seasoned global Smalltalkers will propose a "tent", which is a set of
related campfire projects (one or many) directed towards newbies,
related with programming and coding, but also connected them with other
activities which recognize that people comes from different backgrounds,
have different interests and that an inclusive tech community is more
than code[2]. The projects will allow newbies to learn coding, but also
to express and connect it with wider concerns (documentation, civic
tech, entrepreneurship, gaming, learning, etc).

[2] https://morethancode.cc/about/

Interested campers will find the different tents where they can join and
the tent leader will prepare a set of (increasingly complex?) activities
for the members of the tent. Campers will work in the activities on a
weekly basis and setup and open source code repository for working together.

Coordination language for the Global Campfire will be English for tent
leaders, but campers can use native language for communication between
them and for some activities (local documentation, translations) as we
don't want to impose a unique language to become part of a community and
we recognize active Smalltalkers from around the world that can help
local communities, made them stronger and better connected.

## Tent medals

Becoming part of a open collaborative community is mostly about being
able to help each other and how you and the community create value for
each other. So while this is not a competition, we recognize that small
money can be an important incentive to keep communities dynamic.

At the end of the Campfire the community will provide with Member Badges
and Tent Medals which recognize the work done by all the participants
and also will give a small money incentive for the tent that made the
best work, so the tent can decide how to spend it better. The evaluation
will be done for each Tent leader, and also two external judges.

The Tent Medals will be:

  * 1 Gold Medal: XXX Dollars.
  * 1 Silver Medal: XYZ Dollars.
  * 1 Bronze Medal: ABC Dollars.

## Closing

I really don't know about the details here: How do we assign the prices?
There is any better place that the one referred at [2] to showcase the
important of going beyond code in tech communities? What is the proper
duration for the Campfire? This is just a draft, but I think that this
is something I would like to volunteer for and 

Re: [Pharo-users] Lambda World 2018 - What FP can learn from Smalltalk by Aditya Siram

2018-11-23 Thread horrido
I didn't like the fact that he said the Pharo community was really, really
tiny, even compared to the likes of Clojure.

Because the truth hurts. 



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



Re: [Pharo-users] Lambda World 2018 - What FP can learn from Smalltalk by Aditya Siram

2018-11-23 Thread Esteban Maringolo
I watched it and shared it to friends and social networks.

I think it's an excellent example of good organic marketing from a
not-so-much outsider, but certainly not daily user of Pharo, to an
audience that might have heard about it for the very first time.

Regards,

Esteban A. Maringolo

El vie., 23 nov. 2018 a las 16:39, Jimmie Houchin
() escribió:
>
> Hello,
>
> Interesting video using Pharo for presenting its points.
>
> https://www.youtube.com/watch?v=baxtyeFVn3w
>
> Wondering if anybody else has seen this video. What can be learned from
> this outside perspective.
>
> He is mostly positive about Pharo and is using it as an example of
> things he would like to see in his world.
>
> He does say that Pharo's GC is not good.
>
> Thoughts.
>
> Jimmie
>
>
>
>
>



Re: [Pharo-users] Lambda World 2018 - What FP can learn from Smalltalk by Aditya Siram

2018-11-23 Thread Todd Blanchard via Pharo-users
--- Begin Message ---
I saw it.  I learned a lot about some things I didn't know about in Pharo.  I 
had no idea how PetitParser worked.  Now I'm intrigued.

It was an interesting perspective because, while he wasn't pushing Smalltalk, 
he was pushing for other languages to pursue better environments and tools 
built in their own languages.  Basically using Pharo as an inspirational "bar 
raiser" by saying "they did this - we should be able to do it too".

Although I think a lot of why Smalltalk makes that stuff doable is the 
integrated graphical environment - something most other languages simply don't 
have.  

Not sure what to make of the knocks on Pharo's GC. I had thought the goal was a 
very aggressive collector to support multimedia

> On Nov 23, 2018, at 11:37 AM, Jimmie Houchin  wrote:
> 
> Hello,
> 
> Interesting video using Pharo for presenting its points.
> 
> https://www.youtube.com/watch?v=baxtyeFVn3w
> 
> Wondering if anybody else has seen this video. What can be learned from this 
> outside perspective.
> 
> He is mostly positive about Pharo and is using it as an example of things he 
> would like to see in his world.
> 
> He does say that Pharo's GC is not good.
> 
> Thoughts.
> 
> Jimmie
> 
> 
> 
> 
> 


--- End Message ---


[Pharo-users] Lambda World 2018 - What FP can learn from Smalltalk by Aditya Siram

2018-11-23 Thread Jimmie Houchin

Hello,

Interesting video using Pharo for presenting its points.

https://www.youtube.com/watch?v=baxtyeFVn3w

Wondering if anybody else has seen this video. What can be learned from 
this outside perspective.


He is mostly positive about Pharo and is using it as an example of 
things he would like to see in his world.


He does say that Pharo's GC is not good.

Thoughts.

Jimmie







Re: [Pharo-users] VPS difficulties

2018-11-23 Thread Ben Coman via Pharo-users
--- Begin Message ---
On Fri, 23 Nov 2018 at 04:02, horrido  wrote:

> Okay, I've resolved everything. First, the reason why I'm getting the
> 'pthread_setschedparam failed' error when I run Pharo under Debian is
> because it must be run as 'root'! Don't ask me why, but that's the reason
> why Pharo can't set thread priorities. (This wasn't an issue under Ubuntu
> Server – go figure.)
>
> Second, I am now using Pharo's own SHA256 class. It's probably not as
> secure
> (because it doesn't use a salt value) and not as quick to execute (not
> being
> C code), but for my purpose, it doesn't really matter.
>
> So I can use DigitalOcean or OVH to run my web server in a VPS.
>

Good to hear.  But you shouldn't need to run Pharo as root,
just be root to create this config file
cat <--- End Message ---


Re: [Pharo-users] [ANN] JSON schema implementation

2018-11-23 Thread Tudor Girba
Nice work! Thanks!

Doru

> On Nov 22, 2018, at 5:56 PM, Norbert Hartl  wrote:
> 
> JSONSchema
> ===
> 
> This is an implementation of JSON Schema for the pharo language. It is used 
> to define the structure and values of a JSON string and to validate it. The 
> schema itself can be externalized for being consumed by a third party.
> 
> I like to announce the availability of a JSON schema implementation for 
> pharo. As part of my implementation of OpenAPI (which is to be released a bit 
> later) I factored out the JSON schema part into its own repository because I 
> think it is useful. I release it even it is not really finished. Code is 
> mostly undocumented and a lot of features are missing from the full spec. I 
> will improve it slowly and add features as I need them or they being requested
> 
> Hope you like it!
> 
> Norbert 
> 
> 
> 
> The documentation so far (from https://github.com/zweidenker/JSONSchema)
> 
> It can be loaded by downloading it in pharo via
> 
>   Metacello new
> repository: 'github://zweidenker/JSONSchema';
> baseline: #JSONSchema;
> load
> 
> Defining a schema
> -
> 
> These are the expression to create a schema model inside pharo.
> 
> schema := {
>   #name -> JSONSchema string.
>   #dateAndTime -> (JSONSchema stringWithFormat: 'date-time').
>   #numberOfPets -> JSONSchema number } asJSONSchema.
> 
> 
> defines as schema that can parse the following JSON:
> 
> jsonString := '{
>   "name" : "John Doe",
>   "dateAndTime" : "1970-01-01T14:00:00",
>   "numberOfPets" : 3
> }'.
> 
> Reading/Writing a value using a schema
> --
> 
> To parse the value from JSON we only need to invoke:
> 
> value := schema read: jsonString
> 
> The object in value will have name as a string, dateAndTime as a DateAndTime 
> object and numberOfPets as a SmallInteger object.
> 
> The schema can also be used to write out the value as JSON. This is 
> especially useful if we want to ensure that only valid JSON is written. For 
> this invoke
> 
> jsonString := schema write: value.
> 
> Serialize/Materialize a schema
> 
> 
> Addtionally to reading and writing objects a schema can be serialized to 
> string.
> 
> schemaString := NeoJSONWriter toStringPretty: schema.
> 
> gives
> 
> {
>   "type" : "object",
>   "properties" : {
>   "name" : {
>   "type" : "string"
>   },
>   "numberOfPets" : {
>   "type" : "number"
>   },
>   "dateAndTime" : {
>   "type" : "string",
>   "format" : "date-time"
>   }
>   }
> }
> 
> 
> If we would get a schema as string we can instantiate by invoking
> 
> schema := JSONSchema fromString: schemaString.
> 
> Nested schemas
> ---
> 
> Schemas can be nested in any depth. And it can be specified by using the 
> literal Array syntax.
> 
> schema := {
>   #name -> JSONSchema string.
>   #address -> {
> #street -> JSONSchema string.
> #number -> JSONSchema number
>   } } asJSONSchema
> 
> Constraints
> ---
> 
> JSON Schema has a defined set of constraints that can be specified. E.g. for 
> a number the inerval of the value can be specified by
> 
> numberSchema := JSONSchema number.
> numberSchema interval
>   minimum: 1;
>   exclusiveMaximum: 100
> 
> constraining the number value to be greater or equal to 1 and smaller than 
> 100.
> 

--
www.feenk.com

"What is more important: To be happy, or to make happy?"




Re: [Pharo-users] Tracking method in and out with MetaLinks

2018-11-23 Thread Marcus Denker



> On 23 Nov 2018, at 14:59, Marcus Denker  wrote:
> 
> 
> 
>> On 23 Nov 2018, at 13:40, Manuel Leuenberger  
>> wrote:
>> 
>> Hi,
>> 
>> I stumbled upon another MetaLink scenario that I am unsure how to implement. 
>> I want to track method invocations, with receiver, arguments, selector, and 
>> return value (maybe even signaled exception). I can track the method input 
>> with a MetaLink installed on an RBMethodNode like this:
>> 
>> MetaLink new
>>   metaObject: [ :c | Transcript show: c receiver; show: c method selector; 
>> show: c arguments; cr ];
>>   selector: #value:;
>>   arguments: #(context).
>> 
>> and for returns with a MetaLink on RBReturnNodes like this:
>> 
>> MetaLink new
>>   metaObject: [ :v | Transcript show: v; cr ];
>>   selector: #value:;
>>   arguments: #(value)
>> 
>> The problem is though, that not all methods have explicit returns, and some 
>> mix explicit returns and self returns. I tried installed an #after MetaLink 
>> on a RBMethodNode, but this fails in many cases. Is there any way that I can 
>> instrument a method and track receiver, selector, arguments, and returned 
>> value (even if self) at the same time?
>> 
> 
> I am working now on making the #after work so that one can get with #value 
> the return of the method… 
> 
> I now have a version where it works for Message Sends correctly *and* were 
> #after on Method works better (the compilation errors should be fixed).
> 
> But  #value for #after on Method needs some more work… soon!
> 
> I will commit this intermediate step now.
> 

Here is the first step:

https://github.com/pharo-project/pharo/pull/2011

• #operation for send after
• #operation and value for {} arrays
• #after hooks: preamble now executed before the operation
• #after hooks: added concept of postamble, executed just before hook

Next I need to look into #value for #after on methods. This got broken because 
we wrap the whole method in an exception handler (as #after should be called 
even if
an exception happens).

But this adds too much complexity… especially how it is done now. I think I 
will simplify that in a next step.

Marcus





Re: [Pharo-users] Tracking method in and out with MetaLinks

2018-11-23 Thread Manuel Leuenberger
Awesome! I am looking forward to it.

Cheers,
Manuel

> On 23 Nov 2018, at 14:59, Marcus Denker  wrote:
> 
> 
> 
>> On 23 Nov 2018, at 13:40, Manuel Leuenberger  
>> wrote:
>> 
>> Hi,
>> 
>> I stumbled upon another MetaLink scenario that I am unsure how to implement. 
>> I want to track method invocations, with receiver, arguments, selector, and 
>> return value (maybe even signaled exception). I can track the method input 
>> with a MetaLink installed on an RBMethodNode like this:
>> 
>> MetaLink new
>>   metaObject: [ :c | Transcript show: c receiver; show: c method selector; 
>> show: c arguments; cr ];
>>   selector: #value:;
>>   arguments: #(context).
>> 
>> and for returns with a MetaLink on RBReturnNodes like this:
>> 
>> MetaLink new
>>   metaObject: [ :v | Transcript show: v; cr ];
>>   selector: #value:;
>>   arguments: #(value)
>> 
>> The problem is though, that not all methods have explicit returns, and some 
>> mix explicit returns and self returns. I tried installed an #after MetaLink 
>> on a RBMethodNode, but this fails in many cases. Is there any way that I can 
>> instrument a method and track receiver, selector, arguments, and returned 
>> value (even if self) at the same time?
>> 
> 
> I am working now on making the #after work so that one can get with #value 
> the return of the method… 
> 
> I now have a version where it works for Message Sends correctly *and* were 
> #after on Method works better (the compilation errors should be fixed).
> 
> But  #value for #after on Method needs some more work… soon!
> 
> I will commit this intermediate step now.
> 
>   Marcus



Re: [Pharo-users] Tracking method in and out with MetaLinks

2018-11-23 Thread Marcus Denker



> On 23 Nov 2018, at 13:40, Manuel Leuenberger  wrote:
> 
> Hi,
> 
> I stumbled upon another MetaLink scenario that I am unsure how to implement. 
> I want to track method invocations, with receiver, arguments, selector, and 
> return value (maybe even signaled exception). I can track the method input 
> with a MetaLink installed on an RBMethodNode like this:
> 
> MetaLink new
>metaObject: [ :c | Transcript show: c receiver; show: c method selector; 
> show: c arguments; cr ];
>selector: #value:;
>arguments: #(context).
> 
> and for returns with a MetaLink on RBReturnNodes like this:
> 
> MetaLink new
>metaObject: [ :v | Transcript show: v; cr ];
>selector: #value:;
>arguments: #(value)
> 
> The problem is though, that not all methods have explicit returns, and some 
> mix explicit returns and self returns. I tried installed an #after MetaLink 
> on a RBMethodNode, but this fails in many cases. Is there any way that I can 
> instrument a method and track receiver, selector, arguments, and returned 
> value (even if self) at the same time?
> 

I am working now on making the #after work so that one can get with #value the 
return of the method… 

I now have a version where it works for Message Sends correctly *and* were 
#after on Method works better (the compilation errors should be fixed).

But  #value for #after on Method needs some more work… soon!

I will commit this intermediate step now.

Marcus




Re: [Pharo-users] can't debug TinyBlog in the Pharo MOOC

2018-11-23 Thread Cyril Ferlicot
On Fri, Nov 23, 2018 at 1:25 PM iu136 via Pharo-users
 wrote:
>
> You were right Esteban, finally I fixed it by manually executing the code
> below at Playground:
>
> | repository |
> repository := VOMongoRepository database: 'tinyblog'.
> repository enableSingleton .
>
> Even thought I was putting the above code at initialize method of TBMBlog,
> but I don't know why its never get executed!

Hi,

Class initialisation methods are executed at loading. If you write the
method the first time it will not execute it by default.

> Thank you very much for your help!
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>


-- 
Cyril Ferlicot
https://ferlicot.fr



[Pharo-users] Tracking method in and out with MetaLinks

2018-11-23 Thread Manuel Leuenberger
Hi,

I stumbled upon another MetaLink scenario that I am unsure how to implement. I 
want to track method invocations, with receiver, arguments, selector, and 
return value (maybe even signaled exception). I can track the method input with 
a MetaLink installed on an RBMethodNode like this:

MetaLink new
metaObject: [ :c | Transcript show: c receiver; show: c method selector; 
show: c arguments; cr ];
selector: #value:;
arguments: #(context).

and for returns with a MetaLink on RBReturnNodes like this:

MetaLink new
metaObject: [ :v | Transcript show: v; cr ];
selector: #value:;
arguments: #(value)

The problem is though, that not all methods have explicit returns, and some mix 
explicit returns and self returns. I tried installed an #after MetaLink on a 
RBMethodNode, but this fails in many cases. Is there any way that I can 
instrument a method and track receiver, selector, arguments, and returned value 
(even if self) at the same time?

Cheers,
Manuel


[Pharo-users] [ANN] Next Pharo Sprint: Nov 30

2018-11-23 Thread Marcus Denker
We will organize a Pharo sprint / Moose dojo Nov 30, starting at

10:00am. (Local Time Paris).

Goals of this sprint:

• Pharo 7 issues

Remote Sprint: Remotely, you can join us on Discord. During the sprint, we 
synchronize local and remote Pharo sprinters:

http://pharo.org/contribute-events

Known Local Sprint meetings

Lille/France:

It will be at the Inria Lille, Building B, third floor (RMoD offices). As the 
building is not open to the public, please contact us before if you plan to come

https://association.pharo.org/event-2973626


Re: [Pharo-users] can't debug TinyBlog in the Pharo MOOC

2018-11-23 Thread iu136 via Pharo-users
--- Begin Message ---

> Which again, should means you never executed initializeLocalhostMongoDB
> method.
> Can you try doing: 
> 
> TBBlock initializeLocalhostMongoDB. 
> 
> Esteban

You were right Esteban, finally I fixed it by manually executing the code
below at Playground:

| repository |
repository := VOMongoRepository database: 'tinyblog'.
repository enableSingleton .

Even thought I was putting the above code at initialize method of TBMBlog,
but I don't know why its never get executed!
Thank you very much for your help!




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

--- End Message ---


Re: [Pharo-users] can't debug TinyBlog in the Pharo MOOC

2018-11-23 Thread Esteban Lorenzano


> On 22 Nov 2018, at 21:48, iu136 via Pharo-users  
> wrote:
> 
> 
> From: iu136 
> Subject: Re: can't debug TinyBlog in the Pharo MOOC
> Date: 22 November 2018 at 21:48:52 CET
> To: pharo-users@lists.pharo.org
> 
> 
> EstebanLM wrote
>> Hi, 
>> 
>> You are missing to initialise the Voyage repository. 
>> I don’t know how is explained in the Mooc, but you will probably need to
>> do something like: 
>> 
>> VOMemoryRepository new enableSingleton.
>> 
>> Cheers,
>> Esteban
> 
> Hi Esteban. 
> 
> actually I'm using an External Mongo database and in the MOOC the
> initialization of Voyage Mongo repository, is done like: 
> 
> TBBlog class >> initializeLocalhostMongoDB
>| repository |
>repository := VOMongoRepository database: 'tinyblog'.
>repository enableSingleton.
> 
> TBBlog class >> reset
>self initializeLocalhostMongoDB
> 
> and in my code I'm doing exactly like above. but interestingly when I wanted
> to reset the cache of Voyage by:
> VORepository current reset
> 
> again I've got another Error saying: "MessageNotUnderstood: receiver of
> "reset" is nill”.

Which again, should means you never executed initializeLocalhostMongoDB method.
Can you try doing: 

TBBlock initializeLocalhostMongoDB. 

Esteban

> 
> thanks anyway!
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
>