Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- 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
September 2013
- 60 participants
- 358 messages
Re: [Pharo-users] Semantic web packages
by Jesus Nuñez
where is it??
2013/9/25 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
> did you look at SOUL?
>
> Stef
>
> On Sep 25, 2013, at 9:15 PM, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
>
> In my very first attempt, I tried to port a package which sounds to me
> like the one you describe. In the examples there was a snoopy world as a
> search example, maybe you recall it from that. However I realized that I
> didn't want to emulate Prolog in Pharo; nothing like fast compiled and
> optimized code for WAM.
>
> The idea was to emulate the language boxes of Helvetia to mix Prolog and
> Smalltalk code and use NativeBoost to call the swi-prolog shared library,
> so I could use a highly deployed version of Prolog. Some time ago I made
> an inquiry and for handling some text highlighting issues that would help
> in my aims, just for a direct reference, the code is below:
>
> | text textRenderer textShower |
>> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
>> q(Q):-d(R).
>> q(Q).'.
>> textRenderer := [
>> PPTextHighlighter new
>> parser: PPPrologParser new;
>> color: 'small_atom' with: Color blue muchDarker;
>> bold: 'small_atom';
>> color: 'unify_st' with: Color green muchDarker;
>> bold: 'unify_st';
>> color: 'string' with: Color gray muchDarker;
>> color: 'number' with: Color gray muchDarker;
>> color: 'boolean' with: Color gray muchDarker;
>> highlight: text asText.
>> ].
>> " __
>> |
>> <Renders IN>
>> |
>> W
>> GLMTextPresentation
>> |
>> <Renders IN>
>> |
>> W
>> GLMMorphicRenderer
>>
>> "
>> textShower := GLMMorphicRenderer new.
>> (textShower open: (
>> GLMTextPresentation new display: textRenderer; renderGlamorouslyOn:
>> textShower; yourself )) window title: 'Prolog Editor'.
>> "Here I created a highlighter through the transform method of the grammar"
>> grammar := PPPrologParser new.
>> highlighter := grammar transform: [ :parser |
>> Transcript show: parser.
>> parser class = TokenParser
>> ifTrue: [ parser ==> [ :token |
>> textShower model highlight: token style range: token interval ] ]
>> ifFalse: [ parser ] ].
>> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
>> q(Q):-d(R).
>> q(Q).'.
>> pp := highlighter parse: text asText.
>
>
>
> However, as I said, it was too much work to create everything from
> scratch, so I decided only to impose queries and the result looks pretty
> much as the code I provided in my previous post.
>
>
> I omitted one detail however; I am using a python bridge through the pyswi
> library which does pretty much was I was trying to achieve with
> NativeBoost. It is a RPC-JSON server which handles the interaction between
> Pharo and Prolog and retrieves the query results in a JSON dictionary.
>
> At about that time I also was looking at Logtalk (logtalk.org) for SWI
>> and maybe waiting for XSB ... as our manager would not go for iLOG and we
>> were VisualWorks only ... then IBM bought iLOG and something odd happened
>> to Prologia with Air Liquide in France.
>
>
> Logtalk is pretty much what I wanted to achieve, but the OOP language
> would be Pharo instead. I still think it would be good to make some effort
> towards creating such a framework, if I can call it like that.
>
> You may know about the prolog for Smalltalk/DOS of about 1990 vintage ...
>> I must have it on a floppy in a box somewhere on a shelf.
>
>
> I would be interesting to have a look. Please send me a copy to this email
> if you find it.
>
> Cheers,
> Jesus
>
>
>
> 2013/9/25 Robert Shiplett <grshiplett(a)gmail.com>
>
>> You may know about the prolog for Smalltalk/DOS of about 1990 vintage
>> ... I must have it on a floppy in a box somewhere on a shelf.
>>
>> R
>>
>>
>> On 25 September 2013 10:29, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
>>
>>> I'll try to elaborate but what I can say is only from my limited
>>> perspective. You can take it as an incomplete argument that needs much
>>> refinement, but could however serve as a seed for an upcoming idea.
>>>
>>> Search: After all we can see the entire web as a large graph which we
>>> seek to traverse, looking for information. First-order logic is the most
>>> neutral and natural way of representing the web. With facts and rules that
>>> convolve to derive new conclusions, logic is perhaps the most compact way
>>> of representing pretty much any kind of relationships.
>>>
>>> Think of a model for a situation that would accept a query as below with
>>> some facts and rules governing the dynamics of the underlying world:
>>>
>>> *"Give me all restaurants in the city where someone whose name is Laura
>>> has been a client at least once per month during the last 3 months and
>>> whose has always paid with credit card"*
>>>
>>> My opinions are based on the power of tools in Pharo, such as the moose
>>> family for data visualization and related stuff and of course Seaside,
>>> together with Prolog first order logic syntax, unification, backtracking
>>> capabilities, and search based on a sound resolution method. In the case of
>>> the use of Prolog for the semantic web, see for instance
>>> http://attempto.ifi.uzh.ch/site <http://attempto.ifi.uzh.ch/site/docs/>
>>> .
>>>
>>> Prolog counts also with mature semantic web packages
>>> http://www.swi-prolog.org/web/ that handles the semantic web RDF model
>>> naturally. For instance have a look at http://www.semanticweb.gr/topos/.
>>> In this very application you may also discover how Pharo can naturally fit
>>> in a similar application.
>>>
>>> In a personal attempt (indeed it is part of my master thesis); since I
>>> am in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create
>>> rules in Pharo and interact with Prolog as in the example below for a SQL
>>> language box,
>>>
>>> rows := *SELECT * FROM users WHERE username = @(aString ~=
>>> /\s*(\w+)\s*/)*
>>>
>>> I created a parser in PetitParser for Prolog, however It was too much
>>> work to create something as the above from scratch (also somewhat involved
>>> is to handle operator declaration in Prolog) and finally I end up with a
>>> tool for imposing only queries to Prolog and retrive the results in a JSON
>>> dictionary using SocketStream for RPC handling and NeoJSONReader to read
>>> the JSON contents from the stream.
>>>
>>> Just for reference, it looks as follows,
>>>
>>> Transcript open.
>>> stream := SocketStream openConnectionToHostNamed: 'localhost' port:
>>> 31415.
>>> [
>>> text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'.
>>> stream nextPutAll:text; flush.
>>> Transcript cr; show:(stream upToEnd).
>>> ] ensure: [
>>> stream close
>>> ]
>>>
>>> map := (NeoJSONReader on: (result contents) readStream )
>>> next.
>>>
>>> Again, it is only my limited view, and I am only starting to understand
>>> the fundamentals of semantic web but I think it is not a bad idea to create
>>> a productive conjunction of this two wonderful worlds. So please don't
>>> blame on me if I am wrong in all of my thoughs,
>>>
>>> Cheers,
>>> Jesus
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>>
>>>>
>>>> Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <poissonbreaker(a)gmail.com>:
>>>>
>>>> What did happen to Helvetia? Sorry if I am an ignorant here but I think
>>>> language boxes in Pharo; to interac, remarkably with Prolog, would be
>>>> definitely a plus for semantic web development in Smalltalk.
>>>>
>>>> Cheers
>>>>
>>>> Sounds interesting. Can you elaborate on that? How could all of those
>>>> mentioned support the semantic web? [1]
>>>>
>>>> Norbert
>>>>
>>>> [1] http://en.wikipedia.org/wiki/Semantic_Web
>>>>
>>>>
>>>>
>>>>
>>>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>>>
>>>>> Looking for semantic web tools I found
>>>>>
>>>>> http://www.squeaksource.com/TripleStore/
>>>>>
>>>>> Are there other resources for the semantic web in pharo? smalltalk?
>>>>>
>>>>> Norbert
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
Sept. 25, 2013
Re: [Pharo-users] Semantic web packages
by Stéphane Ducasse
did you look at SOUL?
Stef
On Sep 25, 2013, at 9:15 PM, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
> In my very first attempt, I tried to port a package which sounds to me like the one you describe. In the examples there was a snoopy world as a search example, maybe you recall it from that. However I realized that I didn't want to emulate Prolog in Pharo; nothing like fast compiled and optimized code for WAM.
>
> The idea was to emulate the language boxes of Helvetia to mix Prolog and Smalltalk code and use NativeBoost to call the swi-prolog shared library, so I could use a highly deployed version of Prolog. Some time ago I made an inquiry and for handling some text highlighting issues that would help in my aims, just for a direct reference, the code is below:
>
> | text textRenderer textShower |
> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
> q(Q):-d(R).
> q(Q).'.
> textRenderer := [
> PPTextHighlighter new
> parser: PPPrologParser new;
> color: 'small_atom' with: Color blue muchDarker;
> bold: 'small_atom';
> color: 'unify_st' with: Color green muchDarker;
> bold: 'unify_st';
> color: 'string' with: Color gray muchDarker;
> color: 'number' with: Color gray muchDarker;
> color: 'boolean' with: Color gray muchDarker;
> highlight: text asText.
> ].
> " __
> |
>
> <Renders IN>
> |
> W
> GLMTextPresentation
> |
> <Renders IN>
> |
> W
> GLMMorphicRenderer
>
> "
> textShower := GLMMorphicRenderer new.
> (textShower open: (
> GLMTextPresentation new display: textRenderer; renderGlamorouslyOn: textShower; yourself )) window title: 'Prolog Editor'.
> "Here I created a highlighter through the transform method of the grammar"
> grammar := PPPrologParser new.
> highlighter := grammar transform: [ :parser |
> Transcript show: parser.
> parser class = TokenParser
> ifTrue: [ parser ==> [ :token |
> textShower model highlight: token style range: token interval ] ]
> ifFalse: [ parser ] ].
> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
> q(Q):-d(R).
> q(Q).'.
> pp := highlighter parse: text asText.
>
>
> However, as I said, it was too much work to create everything from scratch, so I decided only to impose queries and the result looks pretty much as the code I provided in my previous post.
>
>
> I omitted one detail however; I am using a python bridge through the pyswi library which does pretty much was I was trying to achieve with NativeBoost. It is a RPC-JSON server which handles the interaction between Pharo and Prolog and retrieves the query results in a JSON dictionary.
>
> At about that time I also was looking at Logtalk (logtalk.org) for SWI and maybe waiting for XSB ... as our manager would not go for iLOG and we were VisualWorks only ... then IBM bought iLOG and something odd happened to Prologia with Air Liquide in France.
>
> Logtalk is pretty much what I wanted to achieve, but the OOP language would be Pharo instead. I still think it would be good to make some effort towards creating such a framework, if I can call it like that.
>
> You may know about the prolog for Smalltalk/DOS of about 1990 vintage ... I must have it on a floppy in a box somewhere on a shelf.
>
> I would be interesting to have a look. Please send me a copy to this email if you find it.
>
> Cheers,
> Jesus
>
>
>
> 2013/9/25 Robert Shiplett <grshiplett(a)gmail.com>
> You may know about the prolog for Smalltalk/DOS of about 1990 vintage ... I must have it on a floppy in a box somewhere on a shelf.
>
> R
>
>
> On 25 September 2013 10:29, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
> I'll try to elaborate but what I can say is only from my limited perspective. You can take it as an incomplete argument that needs much refinement, but could however serve as a seed for an upcoming idea.
>
> Search: After all we can see the entire web as a large graph which we seek to traverse, looking for information. First-order logic is the most neutral and natural way of representing the web. With facts and rules that convolve to derive new conclusions, logic is perhaps the most compact way of representing pretty much any kind of relationships.
>
> Think of a model for a situation that would accept a query as below with some facts and rules governing the dynamics of the underlying world:
>
> "Give me all restaurants in the city where someone whose name is Laura has been a client at least once per month during the last 3 months and whose has always paid with credit card"
>
> My opinions are based on the power of tools in Pharo, such as the moose family for data visualization and related stuff and of course Seaside, together with Prolog first order logic syntax, unification, backtracking capabilities, and search based on a sound resolution method. In the case of the use of Prolog for the semantic web, see for instance http://attempto.ifi.uzh.ch/site.
>
> Prolog counts also with mature semantic web packages http://www.swi-prolog.org/web/ that handles the semantic web RDF model naturally. For instance have a look at http://www.semanticweb.gr/topos/. In this very application you may also discover how Pharo can naturally fit in a similar application.
>
> In a personal attempt (indeed it is part of my master thesis); since I am in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create rules in Pharo and interact with Prolog as in the example below for a SQL language box,
>
> rows := SELECT * FROM users WHERE username = @(aString ~= /\s*(\w+)\s*/)
>
> I created a parser in PetitParser for Prolog, however It was too much work to create something as the above from scratch (also somewhat involved is to handle operator declaration in Prolog) and finally I end up with a tool for imposing only queries to Prolog and retrive the results in a JSON dictionary using SocketStream for RPC handling and NeoJSONReader to read the JSON contents from the stream.
>
> Just for reference, it looks as follows,
>
> Transcript open.
> stream := SocketStream openConnectionToHostNamed: 'localhost' port: 31415.
> [
> text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'.
> stream nextPutAll:text; flush.
> Transcript cr; show:(stream upToEnd).
> ] ensure: [
> stream close
> ]
>
> map := (NeoJSONReader on: (result contents) readStream )
> next.
>
> Again, it is only my limited view, and I am only starting to understand the fundamentals of semantic web but I think it is not a bad idea to create a productive conjunction of this two wonderful worlds. So please don't blame on me if I am wrong in all of my thoughs,
>
> Cheers,
> Jesus
>
>
>
>
>
>
> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>
> Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <poissonbreaker(a)gmail.com>:
>
>> What did happen to Helvetia? Sorry if I am an ignorant here but I think language boxes in Pharo; to interac, remarkably with Prolog, would be definitely a plus for semantic web development in Smalltalk.
>>
>> Cheers
>>
> Sounds interesting. Can you elaborate on that? How could all of those mentioned support the semantic web? [1]
>
> Norbert
>
> [1] http://en.wikipedia.org/wiki/Semantic_Web
>
>>
>>
>>
>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>> Looking for semantic web tools I found
>>
>> http://www.squeaksource.com/TripleStore/
>>
>> Are there other resources for the semantic web in pharo? smalltalk?
>>
>> Norbert
>>
>
>
>
>
Sept. 25, 2013
Re: [Pharo-users] Snapshotcello & Pharo 20: issues...
by Stéphane Ducasse
this is strange since I could snapshot moose and synectique using it.
I'm about to write a boring report so I'm not allowed to open Pharo right now.
> I am giving a shot at Snapshotcello since it looks like a superb solution for creating images properly from a complex configuration.
>
> From http://www.tudorgirba.com/blog/snapshotcello-take-a-snapshot-when-you-re-re…, I tried to craft a call for my configuration.
>
> I've loaded ConfigurationOfSnapshotcello #development in Pharo20.
>
> Then tried the calls and there were some API changes (from the tests, I found out the incantation).
>
> Snapshotcello new
> configurationClass: ConfigurationOfHOWebStack;
> sourceVersion: #development;
> targetVersion: '0.3-snapshot';
> snapshot.
>
> But then I faced a problem with a DNU on 'asEnglishPlural' for a categorization. No big deal, I commented that out as I could live with that.
>
> But then I faced something more difficult (the compileSnapshotWithCurrentPackages: aNumber worked in the self generateSnapshotWithCurrentPackages: aNumber...
>
>
> It took a lot of time to get the whole config loaded... (so, the progressbars worked and worked)
>
> Then, it failed on giving: "PostMortem: MNU: nil>>ancestry"
>
>
>
> self workingCopiesFromConfiguration do: [ :each |
> codeStream tab; tab;
> nextPutAll: '#(';
> nextPut: $';
> nextPutAll: each ancestry ancestorString;
> nextPutAll: '.mcz';
> nextPut: $';
> nextPutAll: ' ';
> nextPut: $';
> nextPutAll: (self repositoryNameForWorkingCopy: each);
> nextPut: $';
> nextPutAll: ' ';
> nextPut: $';
> nextPutAll: each package name;
> nextPut: $';
> nextPutAll: ' ) ' ]
> separatedBy: [ codeStream cr ].
> codeStream
> cr;
> tab;
> nextPutAll: ')'.
> ^ codeStream contents
>
> Oops. each is nil...
>
>
>
> Anyone having faced that?
>
> Debugging...
>
> Phil
Sept. 25, 2013
Re: [Pharo-users] Semantic web packages
by Jesus Nuñez
In my very first attempt, I tried to port a package which sounds to me like
the one you describe. In the examples there was a snoopy world as a search
example, maybe you recall it from that. However I realized that I didn't
want to emulate Prolog in Pharo; nothing like fast compiled and optimized
code for WAM.
The idea was to emulate the language boxes of Helvetia to mix Prolog and
Smalltalk code and use NativeBoost to call the swi-prolog shared library,
so I could use a highly deployed version of Prolog. Some time ago I made
an inquiry and for handling some text highlighting issues that would help
in my aims, just for a direct reference, the code is below:
| text textRenderer textShower |
> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
> q(Q):-d(R).
> q(Q).'.
> textRenderer := [
> PPTextHighlighter new
> parser: PPPrologParser new;
> color: 'small_atom' with: Color blue muchDarker;
> bold: 'small_atom';
> color: 'unify_st' with: Color green muchDarker;
> bold: 'unify_st';
> color: 'string' with: Color gray muchDarker;
> color: 'number' with: Color gray muchDarker;
> color: 'boolean' with: Color gray muchDarker;
> highlight: text asText.
> ].
> " __
> |
> <Renders IN>
> |
> W
> GLMTextPresentation
> |
> <Renders IN>
> |
> W
> GLMMorphicRenderer
>
> "
> textShower := GLMMorphicRenderer new.
> (textShower open: (
> GLMTextPresentation new display: textRenderer; renderGlamorouslyOn:
> textShower; yourself )) window title: 'Prolog Editor'.
> "Here I created a highlighter through the transform method of the grammar"
> grammar := PPPrologParser new.
> highlighter := grammar transform: [ :parser |
> Transcript show: parser.
> parser class = TokenParser
> ifTrue: [ parser ==> [ :token |
> textShower model highlight: token style range: token interval ] ]
> ifFalse: [ parser ] ].
> text := 'p(Q,R):-q(R), unify_st(X, smalltalk_code), r(T).
> q(Q):-d(R).
> q(Q).'.
> pp := highlighter parse: text asText.
However, as I said, it was too much work to create everything from scratch,
so I decided only to impose queries and the result looks pretty much as the
code I provided in my previous post.
I omitted one detail however; I am using a python bridge through the pyswi
library which does pretty much was I was trying to achieve with
NativeBoost. It is a RPC-JSON server which handles the interaction between
Pharo and Prolog and retrieves the query results in a JSON dictionary.
At about that time I also was looking at Logtalk (logtalk.org) for SWI and
> maybe waiting for XSB ... as our manager would not go for iLOG and we were
> VisualWorks only ... then IBM bought iLOG and something odd happened to
> Prologia with Air Liquide in France.
Logtalk is pretty much what I wanted to achieve, but the OOP language would
be Pharo instead. I still think it would be good to make some effort
towards creating such a framework, if I can call it like that.
You may know about the prolog for Smalltalk/DOS of about 1990 vintage ...
> I must have it on a floppy in a box somewhere on a shelf.
I would be interesting to have a look. Please send me a copy to this email
if you find it.
Cheers,
Jesus
2013/9/25 Robert Shiplett <grshiplett(a)gmail.com>
> You may know about the prolog for Smalltalk/DOS of about 1990 vintage ...
> I must have it on a floppy in a box somewhere on a shelf.
>
> R
>
>
> On 25 September 2013 10:29, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
>
>> I'll try to elaborate but what I can say is only from my limited
>> perspective. You can take it as an incomplete argument that needs much
>> refinement, but could however serve as a seed for an upcoming idea.
>>
>> Search: After all we can see the entire web as a large graph which we
>> seek to traverse, looking for information. First-order logic is the most
>> neutral and natural way of representing the web. With facts and rules that
>> convolve to derive new conclusions, logic is perhaps the most compact way
>> of representing pretty much any kind of relationships.
>>
>> Think of a model for a situation that would accept a query as below with
>> some facts and rules governing the dynamics of the underlying world:
>>
>> *"Give me all restaurants in the city where someone whose name is Laura
>> has been a client at least once per month during the last 3 months and
>> whose has always paid with credit card"*
>>
>> My opinions are based on the power of tools in Pharo, such as the moose
>> family for data visualization and related stuff and of course Seaside,
>> together with Prolog first order logic syntax, unification, backtracking
>> capabilities, and search based on a sound resolution method. In the case of
>> the use of Prolog for the semantic web, see for instance
>> http://attempto.ifi.uzh.ch/site <http://attempto.ifi.uzh.ch/site/docs/>.
>>
>> Prolog counts also with mature semantic web packages
>> http://www.swi-prolog.org/web/ that handles the semantic web RDF model
>> naturally. For instance have a look at http://www.semanticweb.gr/topos/.
>> In this very application you may also discover how Pharo can naturally fit
>> in a similar application.
>>
>> In a personal attempt (indeed it is part of my master thesis); since I am
>> in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create
>> rules in Pharo and interact with Prolog as in the example below for a SQL
>> language box,
>>
>> rows := *SELECT * FROM users WHERE username = @(aString ~= /\s*(\w+)\s*/)
>> *
>>
>> I created a parser in PetitParser for Prolog, however It was too much
>> work to create something as the above from scratch (also somewhat involved
>> is to handle operator declaration in Prolog) and finally I end up with a
>> tool for imposing only queries to Prolog and retrive the results in a JSON
>> dictionary using SocketStream for RPC handling and NeoJSONReader to read
>> the JSON contents from the stream.
>>
>> Just for reference, it looks as follows,
>>
>> Transcript open.
>> stream := SocketStream openConnectionToHostNamed: 'localhost' port: 31415.
>> [
>> text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'.
>> stream nextPutAll:text; flush.
>> Transcript cr; show:(stream upToEnd).
>> ] ensure: [
>> stream close
>> ]
>>
>> map := (NeoJSONReader on: (result contents) readStream )
>> next.
>>
>> Again, it is only my limited view, and I am only starting to understand
>> the fundamentals of semantic web but I think it is not a bad idea to create
>> a productive conjunction of this two wonderful worlds. So please don't
>> blame on me if I am wrong in all of my thoughs,
>>
>> Cheers,
>> Jesus
>>
>>
>>
>>
>>
>>
>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>
>>>
>>> Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <poissonbreaker(a)gmail.com>:
>>>
>>> What did happen to Helvetia? Sorry if I am an ignorant here but I think
>>> language boxes in Pharo; to interac, remarkably with Prolog, would be
>>> definitely a plus for semantic web development in Smalltalk.
>>>
>>> Cheers
>>>
>>> Sounds interesting. Can you elaborate on that? How could all of those
>>> mentioned support the semantic web? [1]
>>>
>>> Norbert
>>>
>>> [1] http://en.wikipedia.org/wiki/Semantic_Web
>>>
>>>
>>>
>>>
>>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>>
>>>> Looking for semantic web tools I found
>>>>
>>>> http://www.squeaksource.com/TripleStore/
>>>>
>>>> Are there other resources for the semantic web in pharo? smalltalk?
>>>>
>>>> Norbert
>>>>
>>>
>>>
>>>
>>
>
Sept. 25, 2013
Snapshotcello continued...
by phil@highoctane.be
It looks like that the workingCopiesFromConfiguration gives a collection
containing a nil val
I copied the collection in to a temp var so that I could debug
(workingCopies)
When I do:
workingCopies select: [ :each | each isNil ]
--> an OrderedCollection(nil nil nil)
Uh Oh...
I've made some changes and got something that looked like "proper".
I saved it here.
http://www.smalltalkhub.com/#!/~philippeback/HOWebStack/packages/Snapshotce…
My use case was:
Snapshotcello new
configurationClass: ConfigurationOfHOWebStack;
sourceVersion: #development;
targetVersion: '0.3-snapshot';
snapshot.
With the configuration
http://www.smalltalkhub.com/#!/~philippeback/HOWebStack/packages/Configurat…
version .14
Awesome tool for sure.
Phil
Sept. 25, 2013
Re: [Pharo-users] Image taking up 100% CPU
by Paul DeBruicker
You might try it with Eliot Miranda's VM from here:
http://www.mirandabanda.org/files/Cog/VM/
On 09/25/2013 08:59 AM, Bernat Romagosa wrote:
> It's a Pharo 1.4 image on this VM:
>
> 'CoInterpreter VMMaker-oscog-EstebanLorenzano.161 uuid:
> 8e0c22c3-b48d-4d8d-a7f9-8a75dc246f28 Jul 18 2012,
> StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.161 uuid:
> 8e0c22c3-b48d-4d8d-a7f9-8a75dc246f28 Jul 18 2012,
> https://git.gitorious.org/cogvm/blessed.git Commit:
> 5151310c41b08f55b70e9c6250711cb1f3672ce7 Date: 2012-07-18 14:06:15 +0200
> By: Camillo Bruni <camillobruni(a)gmail.com <mailto:camillobruni@gmail.com>>'
>
> (On a Debian VPS)
>
>
> 2013/9/25 Paul DeBruicker <pdebruic(a)gmail.com <mailto:pdebruic@gmail.com>>
>
> Which image and vm ?
>
>
>
> On Sep 25, 2013, at 3:24 AM, Bernat Romagosa
> <tibabenfortlapalanca(a)gmail.com
> <mailto:tibabenfortlapalanca@gmail.com>> wrote:
>
>> Hmmm something weird just happened. I restarted Komanche, then
>> when I saved the image and the CPU rushed to 100%!
>>
>>
>> 2013/9/25 Janko Mivšek <janko.mivsek(a)eranova.si
>> <mailto:janko.mivsek@eranova.si>>
>>
>> Hi Bernat,
>>
>> I remember once having similar problems on Swazoo. But on
>> image restart.
>> If Swazoo was not stopped before image shutdown, image went
>> into 100%
>> CPU after restart. Something like that. It seems therefore
>> that this is
>> sockets related problem
>>
>> What if you stop your web server and start again?
>>
>> Best regards
>> Janko
>>
>> Dne 25. 09. 2013 10:03, piše Bernat Romagosa:
>> > Forgot to answer that I'm not using RFB. I had sooo many
>> problems with
>> > it that since last year I've been using xpra
>> <http://xpra.org/> instead,
>> > which lets you capture running X windows remotely over SSH.
>> It's kind of
>> > like screen (not even remotely so powerful) but for GUIs.
>> >
>> > Cheers,
>> > Bernat.
>> >
>> >
>> > 2013/9/25 Bernat Romagosa <tibabenfortlapalanca(a)gmail.com
>> <mailto:tibabenfortlapalanca@gmail.com>
>> > <mailto:tibabenfortlapalanca@gmail.com
>> <mailto:tibabenfortlapalanca@gmail.com>>>
>> >
>> > Not really, the image is not being saved regularly...
>> all data is
>> > stored in a neo4j database, so there's no need to save
>> the image.
>> >
>> > It seems like it may have something to do with users
>> uploading files
>> > in some particular moments, but I'm using Göran's file
>> upload
>> > mechanism, in which files are streamed straight to disk,
>> so there
>> > shouldn't be any image clogging problems even for huge
>> files...
>> >
>> > 2013/9/24 Mariano Martinez Peck <marianopeck(a)gmail.com
>> <mailto:marianopeck@gmail.com>
>> > <mailto:marianopeck@gmail.com
>> <mailto:marianopeck@gmail.com>>>
>> >
>> > Bernat, could this be triggered when you SAVE the
>> image? If
>> > true, do you happen to have RFB running?
>> >
>> >
>> > On Tue, Sep 24, 2013 at 4:45 AM, Bernat Romagosa
>> > <tibabenfortlapalanca(a)gmail.com
>> <mailto:tibabenfortlapalanca@gmail.com>
>> > <mailto:tibabenfortlapalanca@gmail.com
>> <mailto:tibabenfortlapalanca@gmail.com>>> wrote:
>> >
>> > Hi list,
>> >
>> > A couple months ago I deployed an Iliad
>> application in a
>> > Debian VPS, which has been working great except
>> for the fact
>> > that about every two weeks the image takes up
>> 100% of the
>> > CPU and, of course, the app becomes unusable.
>> >
>> > Does anyone have a method for finding out what's
>> going on?
>> > I've been trying to debug the problem, but as I
>> don't know
>> > what triggers it, it's pretty impossible to
>> detect...
>> >
>> > I've checked the running threads and nothing
>> seems unusual.
>> > I've also profiled the app for a whole day of
>> real usage
>> > with end users and not a single method took more
>> time than
>> > what I expected, so I'm completely lost here.
>> >
>> > Any help will be appreciated! :)
>>
>>
>> --
>> Janko Mivšek
>> Aida/Web
>> Smalltalk Web Application Server
>> http://www.aidaweb.si
>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>
>
>
>
> --
> Bernat Romagosa.
Sept. 25, 2013
Snapshotcello & Pharo 20: issues...
by phil@highoctane.be
I am giving a shot at Snapshotcello since it looks like a superb solution
for creating images properly from a complex configuration.
From
http://www.tudorgirba.com/blog/snapshotcello-take-a-snapshot-when-you-re-re…,
I tried to craft a call for my configuration.
I've loaded ConfigurationOfSnapshotcello #development in Pharo20.
Then tried the calls and there were some API changes (from the tests, I
found out the incantation).
Snapshotcello new
configurationClass: ConfigurationOfHOWebStack;
sourceVersion: #development;
targetVersion: '0.3-snapshot';
snapshot.
But then I faced a problem with a DNU on 'asEnglishPlural' for a
categorization. No big deal, I commented that out as I could live with that.
But then I faced something more difficult (the
compileSnapshotWithCurrentPackages: aNumber worked in the self
generateSnapshotWithCurrentPackages: aNumber...
It took a lot of time to get the whole config loaded... (so, the
progressbars worked and worked)
Then, it failed on giving: "PostMortem: MNU: nil>>ancestry"
self workingCopiesFromConfiguration do: [ :each | codeStream tab; tab;
nextPutAll: '#('; nextPut: $'; nextPutAll: *each ancestry ancestorString*;
nextPutAll: '.mcz'; nextPut: $'; nextPutAll: ' '; nextPut: $'; nextPutAll:
(self repositoryNameForWorkingCopy: each); nextPut: $'; nextPutAll: ' ';
nextPut: $'; nextPutAll: each package name; nextPut: $'; nextPutAll: ' ) '
] separatedBy: [ codeStream cr ]. codeStream cr; tab; nextPutAll: ')'. ^
codeStream contents
Oops. each is nil...
Anyone having faced that?
Debugging...
Phil
Sept. 25, 2013
Re: [Pharo-users] Semantic web packages
by Robert Shiplett
You may know about the prolog for Smalltalk/DOS of about 1990 vintage ...
I must have it on a floppy in a box somewhere on a shelf.
R
On 25 September 2013 10:29, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
> I'll try to elaborate but what I can say is only from my limited
> perspective. You can take it as an incomplete argument that needs much
> refinement, but could however serve as a seed for an upcoming idea.
>
> Search: After all we can see the entire web as a large graph which we seek
> to traverse, looking for information. First-order logic is the most neutral
> and natural way of representing the web. With facts and rules that convolve
> to derive new conclusions, logic is perhaps the most compact way of
> representing pretty much any kind of relationships.
>
> Think of a model for a situation that would accept a query as below with
> some facts and rules governing the dynamics of the underlying world:
>
> *"Give me all restaurants in the city where someone whose name is Laura
> has been a client at least once per month during the last 3 months and
> whose has always paid with credit card"*
>
> My opinions are based on the power of tools in Pharo, such as the moose
> family for data visualization and related stuff and of course Seaside,
> together with Prolog first order logic syntax, unification, backtracking
> capabilities, and search based on a sound resolution method. In the case of
> the use of Prolog for the semantic web, see for instance
> http://attempto.ifi.uzh.ch/site <http://attempto.ifi.uzh.ch/site/docs/>.
>
> Prolog counts also with mature semantic web packages
> http://www.swi-prolog.org/web/ that handles the semantic web RDF model
> naturally. For instance have a look at http://www.semanticweb.gr/topos/.
> In this very application you may also discover how Pharo can naturally fit
> in a similar application.
>
> In a personal attempt (indeed it is part of my master thesis); since I am
> in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create
> rules in Pharo and interact with Prolog as in the example below for a SQL
> language box,
>
> rows := *SELECT * FROM users WHERE username = @(aString ~= /\s*(\w+)\s*/)*
>
> I created a parser in PetitParser for Prolog, however It was too much work
> to create something as the above from scratch (also somewhat involved is to
> handle operator declaration in Prolog) and finally I end up with a tool for
> imposing only queries to Prolog and retrive the results in a JSON
> dictionary using SocketStream for RPC handling and NeoJSONReader to read
> the JSON contents from the stream.
>
> Just for reference, it looks as follows,
>
> Transcript open.
> stream := SocketStream openConnectionToHostNamed: 'localhost' port: 31415.
> [
> text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'.
> stream nextPutAll:text; flush.
> Transcript cr; show:(stream upToEnd).
> ] ensure: [
> stream close
> ]
>
> map := (NeoJSONReader on: (result contents) readStream )
> next.
>
> Again, it is only my limited view, and I am only starting to understand
> the fundamentals of semantic web but I think it is not a bad idea to create
> a productive conjunction of this two wonderful worlds. So please don't
> blame on me if I am wrong in all of my thoughs,
>
> Cheers,
> Jesus
>
>
>
>
>
>
> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>
>>
>> Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <poissonbreaker(a)gmail.com>:
>>
>> What did happen to Helvetia? Sorry if I am an ignorant here but I think
>> language boxes in Pharo; to interac, remarkably with Prolog, would be
>> definitely a plus for semantic web development in Smalltalk.
>>
>> Cheers
>>
>> Sounds interesting. Can you elaborate on that? How could all of those
>> mentioned support the semantic web? [1]
>>
>> Norbert
>>
>> [1] http://en.wikipedia.org/wiki/Semantic_Web
>>
>>
>>
>>
>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>
>>> Looking for semantic web tools I found
>>>
>>> http://www.squeaksource.com/TripleStore/
>>>
>>> Are there other resources for the semantic web in pharo? smalltalk?
>>>
>>> Norbert
>>>
>>
>>
>>
>
Sept. 25, 2013
Re: [Pharo-users] Semantic web packages
by Robert Shiplett
this sounds very much like a Squeak effort of mine in 1996 ;-)
Have you looked at SOUL and Qsoul-era code of Roel Wuyts ? Some of that
code was VW and Squeak as I recall.
I hope you fare better than I did in comm telco setting where identifying
resources should have been, err, of interest to management ( this was back
before the telco scandals. ;-)
At about that time I also was looking at Logtalk (logtalk.org) for SWI and
maybe waiting for XSB ... as our manager would not go for iLOG and we were
VisualWorks only ... then IBM bought iLOG and something odd happened to
Prologia with Air Liquide in France.
And then some manager thought RDF was XML or XML was RDF.whatever and oi
vey ...
Was anything ever added into Smalltalk-X for triples ? Gnu St ?
But in all seriousness, my very best wishes for your thesis project.
PS
Visual Prolog continues in DK and I continue to follow the Mercury project
; no recent change in Mozart/Oz when I last looked ...
On 25 September 2013 10:29, Jesus Nuñez <poissonbreaker(a)gmail.com> wrote:
> I'll try to elaborate but what I can say is only from my limited
> perspective. You can take it as an incomplete argument that needs much
> refinement, but could however serve as a seed for an upcoming idea.
>
> Search: After all we can see the entire web as a large graph which we seek
> to traverse, looking for information. First-order logic is the most neutral
> and natural way of representing the web. With facts and rules that convolve
> to derive new conclusions, logic is perhaps the most compact way of
> representing pretty much any kind of relationships.
>
> Think of a model for a situation that would accept a query as below with
> some facts and rules governing the dynamics of the underlying world:
>
> *"Give me all restaurants in the city where someone whose name is Laura
> has been a client at least once per month during the last 3 months and
> whose has always paid with credit card"*
>
> My opinions are based on the power of tools in Pharo, such as the moose
> family for data visualization and related stuff and of course Seaside,
> together with Prolog first order logic syntax, unification, backtracking
> capabilities, and search based on a sound resolution method. In the case of
> the use of Prolog for the semantic web, see for instance
> http://attempto.ifi.uzh.ch/site <http://attempto.ifi.uzh.ch/site/docs/>.
>
> Prolog counts also with mature semantic web packages
> http://www.swi-prolog.org/web/ that handles the semantic web RDF model
> naturally. For instance have a look at http://www.semanticweb.gr/topos/.
> In this very application you may also discover how Pharo can naturally fit
> in a similar application.
>
> In a personal attempt (indeed it is part of my master thesis); since I am
> in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create
> rules in Pharo and interact with Prolog as in the example below for a SQL
> language box,
>
> rows := *SELECT * FROM users WHERE username = @(aString ~= /\s*(\w+)\s*/)*
>
> I created a parser in PetitParser for Prolog, however It was too much work
> to create something as the above from scratch (also somewhat involved is to
> handle operator declaration in Prolog) and finally I end up with a tool for
> imposing only queries to Prolog and retrive the results in a JSON
> dictionary using SocketStream for RPC handling and NeoJSONReader to read
> the JSON contents from the stream.
>
> Just for reference, it looks as follows,
>
> Transcript open.
> stream := SocketStream openConnectionToHostNamed: 'localhost' port: 31415.
> [
> text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'.
> stream nextPutAll:text; flush.
> Transcript cr; show:(stream upToEnd).
> ] ensure: [
> stream close
> ]
>
> map := (NeoJSONReader on: (result contents) readStream )
> next.
>
> Again, it is only my limited view, and I am only starting to understand
> the fundamentals of semantic web but I think it is not a bad idea to create
> a productive conjunction of this two wonderful worlds. So please don't
> blame on me if I am wrong in all of my thoughs,
>
> Cheers,
> Jesus
>
>
>
>
>
>
> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>
>>
>> Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <poissonbreaker(a)gmail.com>:
>>
>> What did happen to Helvetia? Sorry if I am an ignorant here but I think
>> language boxes in Pharo; to interac, remarkably with Prolog, would be
>> definitely a plus for semantic web development in Smalltalk.
>>
>> Cheers
>>
>> Sounds interesting. Can you elaborate on that? How could all of those
>> mentioned support the semantic web? [1]
>>
>> Norbert
>>
>> [1] http://en.wikipedia.org/wiki/Semantic_Web
>>
>>
>>
>>
>> 2013/9/25 Norbert Hartl <norbert(a)hartl.name>
>>
>>> Looking for semantic web tools I found
>>>
>>> http://www.squeaksource.com/TripleStore/
>>>
>>> Are there other resources for the semantic web in pharo? smalltalk?
>>>
>>> Norbert
>>>
>>
>>
>>
>
Sept. 25, 2013
Re: [Pharo-users] How to load seaside currently?
by phil@highoctane.be
FWIW, that ConfigurationOfSeaside3 leads to all kinds of problems when
coupled with MagritteMagic and TwitterBoostrap...
The fact that those are loading Seaside30 on their own isn't helping...
That name change may not have been the best thing (keeping 30 would have
been better IMV).
Callbacks aren't invoked properly (like once every X clicks).
Debugging...
Phil
Sept. 25, 2013