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
February 2015
- 83 participants
- 737 messages
Re: [Pharo-users] GSOC 2015 application
by Sebastian Sastre
> On Feb 11, 2015, at 5:08 PM, Esteban A. Maringolo <emaringolo(a)gmail.com> wrote:
>
> Syntax extensions (pluggable?):
> I know we have many alternatives, which I used and are more than
> acceptable , but I'd like to write JSON as close as possible to its
> original syntax.
+1 except I would not say that "I want to write JSON as close as possibleâ.
Itâs either zero friction or itâs already good enough.
In Amber, for example, you already can write a JSON object âas close as possibleâ to the original syntax and is o-kay but is not really great because youâre still being taxed when compared to JavaScript and that taxing might never payoff, thatâs why I say that we are either currently okay or we move towards zero-JSON-friction.
Amber:
#{ âkey1â-> value1. âkey2 -> value2 } <â kind of okay, survivable
JavaScript:
{key1: value1, key2: value2} <â awesome, no friction to party with the rest of the world, it rocks!
Feb. 11, 2015
Re: [Pharo-users] GSOC 2015 application
by Esteban A. Maringolo
2015-02-11 15:37 GMT-03:00 Sebastian Sastre <sebastian(a)flowingconcept.com>:
> Okay here comes some notes Iâve compiled:
> SQL Alchemy for Pharo
> Implications: Big-data is a growing market that is easy to mine with a tool
> like Pythonâs SQL Alchemy. A Pharo version of such powerful tool would open
> this market opportunity for people wanting to offer Pharo-based solutions in
> this segment. Smalltalkâs syntax and tooling superiority could provide a
> significant push forward in this technology competitiveness because they
> might empower Pharo users to deliver solutions faster.
> http://www.sqlalchemy.org/
+1 GLORP is the closest we have to this.
Also, something like jOOQ.org would be valuable in the (big)data
front, where ORM falls short or is impractical due to the volume of
data processed.
> Remote Environments for Pharo
> Implications: being able to inspect, browse and debug reliably a server
> Pharo image from a client Pharo image would spark countless possibilities.
> Some of them: server maintenance; hot debug on GUI-less servers in
> production; live develop or debug remotely mobile devices that doesnât have
> a server. Hot changes in Pharo powered drones and robots.
I would say "instrumentation", not only being able to plug remotely
(and securely) to a remote image, but also being able to poll it for
statistics, as you can do with JVM.
Syntax extensions (pluggable?):
I know we have many alternatives, which I used and are more than
acceptable , but I'd like to write JSON as close as possible to its
original syntax.
Feb. 11, 2015
Re: [Pharo-users] GSOC 2015 application
by Sebastian Sastre
Okay here comes some notes Iâve compiled:
VOSS for Pharo
http://voss.logicarts.com/ <http://voss.logicarts.com/>
Implications: a completely object oriented database industry proven would have a legacy and a open sourced release empowering Pharo users and startups to stay object oriented even when persisting data.
VOSS has dual license commercial and GPLv3, John, VOSS author already offered himself to mentor porters.
https://www.linkedin.com/in/johnclapperton <https://www.linkedin.com/in/johnclapperton>
SQLServer client for Pharo
Implications: some applications that have this dependency needs to extend and modernize features are challenged by this dependency that Pharo cannot use in a production ready state.
SQL Alchemy for Pharo
Implications: Big-data is a growing market that is easy to mine with a tool like Pythonâs SQL Alchemy. A Pharo version of such powerful tool would open this market opportunity for people wanting to offer Pharo-based solutions in this segment. Smalltalkâs syntax and tooling superiority could provide a significant push forward in this technology competitiveness because they might empower Pharo users to deliver solutions faster.
http://www.sqlalchemy.org/ <http://www.sqlalchemy.org/>
Remote Environments for Pharo
Implications: being able to inspect, browse and debug reliably a server Pharo image from a client Pharo image would spark countless possibilities. Some of them: server maintenance; hot debug on GUI-less servers in production; live develop or debug remotely mobile devices that doesnât have a server. Hot changes in Pharo powered drones and robots.
Pharo on mobile
Implications: Is not that mobile is a growing market, is more like mobile is going supernova: http://a16z.com/2014/10/28/mobile-is-eating-the-world/ <http://a16z.com/2014/10/28/mobile-is-eating-the-world/>
The power of Pharo and its libraries on mobile devices is currently perhaps one of its biggest opportunities.
Deep learning for Pharo
Implications: Robotics, drones and the internet of things will gather data from sensors that will need interpretation and modelling. All sorts of AI will use deep learning techniques and Pharo would be a great orchestrator of that modelling.
http://www.quora.com/What-is-the-best-deep-learning-library-at-the-current-… <http://www.quora.com/What-is-the-best-deep-learning-library-at-the-current-…>
Pharo Hadoop client
Implications: Apache Hadoop can scale from single server to thousands of servers. The explosion of sensors, drones and mobile devices and printed devices with sensors are going to generate incredible amounts of data to process and model. Hadoop is a good fit for that and Pharo can empower faster modelling and orchestration of what to do with all that information stored in this widely adopted Hadoop technology.
http://wiki.apache.org/hadoop/PoweredBy <http://wiki.apache.org/hadoop/PoweredBy>
Cross platform Native Widgets for Pharo
Implications: The web is fantastic but at the same time there is a big pressure to create great native applications due to the improved User Experience that the native widgets can provide. Making Pharo to create them via things like wxWidgets (https://www.wxwidgets.org/about/screenshots/ <https://www.wxwidgets.org/about/screenshots/>) would instantly create opportunities to develop fast applications with a great UX.
Protips site for Pharo
Implications: I might spark the beginning of a mentoring ecosystem. StackOverflow is great but at the same time for a niche like Smalltalk it might not be enough to show the problem-solving potential of the platform. A site dedicated to share pro tips centered on Pharo would slowly a steady show the platformâs value. The site has to be social friendly. Each tip should have an author that can set there StackOverflow, LinkedIn, facebook, twitter or any social profile she wants. Requires nice branding and UX/UI design. Optional variation of the same idea: make it for any Smalltalk dialect instead of only Pharo.
REPL IDE for Pharo
Implications: Smalltalkers are used to very powerful IDEs. What if we have to put Pharo in a really underpowered or monitorless device? Having a powerful REPL IDE that can evaluate expressions, inspect and debug, would empower users to still do things in mini-devices during the incoming tide wave of internet-of-things.
A GUI builder for Pharo
Implications: If whatever you are doing you cannot make it visual easily, people cannot perceive it easily. Due to evolutionary reasons, our brain has unfair bias towards visual processing. Lets make something that allows Pharo to create visual things easier. Something like PARTS or Dolphin Smalltalk GUI builder would be huge.
best!
o/
> On Feb 11, 2015, at 12:14 PM, Martin Bähr <mbaehr(a)email.archlab.tuwien.ac.at> wrote:
>
> Excerpts from Stephan Eggermont's message of 2015-02-11 15:05:14 +0100:
>> Sebastian wrote:
>>> Can I brainstorm a wishlist? I could get wild on it :D
>>
>> Sure, as long as it is projects that you would be willing to mentor,
>> and sized like they could fit.
>
> well, someone else could be willing to mentor then, so i don't think it hurts
> to get wild on ideas, as long as accepted ideas come with a mentor.
>
> greetings, martin.
>
> --
> eKita - the online platform for your entire academic life
> --
> chief engineer eKita.co
> pike programmer pike.lysator.liu.se caudium.net societyserver.org
> secretary beijinglug.org
> mentor fossasia.org
> foresight developer foresightlinux.org realss.com
> unix sysadmin
> Martin Bähr working in china http://societyserver.org/mbaehr/
>
Feb. 11, 2015
Re: [Pharo-users] recover lost changes
by Sean P. DeNigris
Sean P. DeNigris wrote
> I can not reproduce this...
Okay, I see. It only happens when Nautilus (the browser) is on the
class-side. Looking deeper, there is in general a flaw in Nautilus - at
least in announcement handling - because it doesn't take class vs. metaclass
into account. I started fixing it, but don't have time now.
The basics for anyone that's interested: selected class could be a class,
metaclass, or nil, so there needs to be a nil guard first, then something
like selectedClass theNonMetaClass = aClass. Browsing (scoped to Nautilus)
senders of #selectedClass is a good start. HTH
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/recover-lost-changes-tp4804929p4805177.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Feb. 11, 2015
Re: [Pharo-users] SmaCC: First steps
by kilon alios
"Yes, if you find that appropriate or if they share some implementation
bits (I'm not sure of the latter, but it may help to organise stuff). What
you do is, in the grammar, you add a %hierarchy directive, like that:
%hierarchy Atom (List Dictionary);
And, at AST generation, SmaCC will inherit as much as possible from Atom
definition in List and Dictionary (at least, I suppose it does: some of the
SmaCC code generation tools are rather impressive, and, if you look
carefully, it is prepared for more than just generation of Smalltalk code)"
Nice and I was meaning to ask that how to do this with the grammar. Great
answer.
"For me, the way to deal with that is to have a model of that data and
visitors on it, to tackle the "future" complexity.
If you go that way (recursive structure), two good (and not that easy)
things to have are: equality and copy."
this I dont understand. I want python types to convert to popular pharo
data classes . I don't want to create my own custom classes because the way
I see it python and pharo are very close together as dynamic languages. So
my thinking is that if equality works for an ordered collection and a array
, then there is no need for me to add anything new since I will convert to
those classes. Unless you mean something else that I am missing here.
My goal is to allow people to use python code and libraries without having
to worry for how the python side maps to the pharo side. At least not when
it comes to types. So they will use those python libraries as if they are
pharo libraries. A challenge will be converting types that reference python
objects. The good news is that SmaCC already handles this situation but I
will have to find a way to sync references between pharo and python. I
think I know a way for that one.
"Good point. It would be nice to have a diff on the grammars of Python2 and
Python3; at the moment, there is space in the naming for a Python 3 parser
(named PythonParser3, of course), however we would have a collision on the
AST nodes (two PyAtomNodes, two ...). Have to consider that and maybe have
Py2AtomNode, etc... to leave space for the Python 3 AST if it differs too
much."
>From what I have seen , because I have to confess I am more of python 3
than python 2 coder, there are no big diffirences in python types at least
not on the basic ones, but syntax wise there is as it is explained very
well in this reference
http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutor…
So yes there is a clear diffirence between python 3 and python 2 but its
not massive.
And yes those 2 grammars should be kept separately. For the time being I
have no reason to encourage you to make a python 3 grammar port, because
frankly I dont need it. I am happy with SmaCC as it is. There is no need
for my project to fully parse python syntax and I dont see in the next
years at least any need to go beyond python types. If the need arises and
no py3 parser exists I will of course make it myself and send you a pull
request.
I am so grateful that already SmaCC has saved me from so much work , thanks
to all people contributing to SmaCC , one very happy customer :D
On Wed, Feb 11, 2015 at 7:36 PM, kilon alios <kilon.alios(a)gmail.com> wrote:
> Well I tried in the past to use openqwaq , but what I learned from the
> experience is that sometimes understanding others code can be even more
> time consuming than remaking it yourself. I spent like an afternoon trying
> to understand openqwaq before starting Ephestos from complete scratch.
> Suffice to say that in another afternoon I had the prototype of Ephestos
> working with the ability to send simple python strings to the cptyhon
> interpreter to be execute by the time I was not even able to understand the
> basic architecture of openqwaq.
>
> The module you recommended alone contains like 11.000 lines of code. Thats
> a lot of work to just read that code and I cant find any class named
> CModel. In any case I like it that I started from scratch, I want to keep
> my project small, light, well documented and super easy to hack. Even if
> that means less features :)
>
> Also the code is written for squeak not pharo. In any case I will need
> someone like Thierry to guide me through the code and help me understand.
> So its definitely not as simple as "hey I am going to use that code".
>
> Executing python code with Ephestos is already possible and easy , my
> problems now are a) converting from python to pharo types which is why I am
> using SmaCC b) use of callbacks , which should be easy to do , so that
> python code can call pharo code. In the future if socket are proven too
> slow I may move my architecture into a shared DLL instead to make things
> faster. But as far as using python code from pharo I am very close to
> achieving my goal by the end of this year.
>
> On Wed, Feb 11, 2015 at 4:40 PM, Sebastian Heidbrink <sheidev(a)yahoo.de>
> wrote:
>
>> Hi!
>>
>> Maybe you also want to have a look at
>> http://www.squeaksource.com/openqwaq/
>>
>> There is a part PyBridge included. MAybe you can take some of the
>> Smalltalk Python Cmodel classes from there.
>>
>> Sebastian
>>
>>
>> Am 10.02.2015 um 23:24 schrieb kilon alios:
>>
>> Ok so after rereading the tutorial and testing again and again , I think
>> I have finally managed to understand how SmaCC really works and I was
>> succesful into converting simple python litsts to pharo arrays and ordered
>> collections.
>>
>> The tricky part now is to apply this knowledge to complex python types
>> like multi dimensional lists, tuples and dictionaries. I understand that
>> the visitor allows me to visit a specific object instances each time they
>> are found in the AST . But because I want to walk the AST in order to build
>> multi dimensional ordered collections I need something more, or maybe my
>> understanding of the visitor pattern is flawed.
>>
>> The problem I am having here is that each time I parse a python type
>> that python type is not necessarily represented by different kind of node.
>> For example whether its a list or a tuple or a dictionary the same class is
>> used PyAtomNode. In order to differentiate between those diffirent python
>> types PyAtomNode has instance variables for right and left bracket,
>> parantheses, and curly. So my initial thinking is to check those instance
>> variables to see if they are nil and from that I can conclude which python
>> type I am parsing.
>>
>> So I can preform simple ifs that check that the instance variable is
>> Nil or not but the question is if my strategy is a good one or a bad one.
>>
>> I could define my own syntax to simplify the AST tree including
>> different nodes for different python types , because from the looks of it ,
>> it seems it is a bit too verbose for my needs but On the other hand I am
>> not so sure because in the future my needs may become more verbose too.
>>
>> So I am very close and ready to create my full python types converter
>> for pharo but I wanted some good advice before wasting time on something
>> that is not efficient.
>>
>>
>> By the way Thierry I have to agree with you Smacc is a very capable
>> parser, also I like the use of regex syntax, makes it uglier compared
>> Pettit Parser but I prefer the compact regex syntax to having to define and
>> browse tons of classes and send tons of messages. Also the Python support
>> is very good and I am impressed how easily SmaCC can parse whole python
>> applications since some of the test are very complex. Well done great work!
>>
>>
>>
>> On Sat, Jan 31, 2015 at 12:04 AM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> thank for your congratulations, because at times I fear I ask too
>>> obvious questions. I have to say I find this parsing very complex but very
>>> fascinating too :) Time to experiment with the visitor.
>>>
>>> On Fri, Jan 30, 2015 at 11:49 PM, Thierry Goubier <
>>> thierry.goubier(a)gmail.com> wrote:
>>>
>>>>
>>>>
>>>> 2015-01-30 14:04 GMT+01:00 kilon alios <kilon.alios(a)gmail.com>:
>>>>
>>>>> Ok thanks for the info, I am still however curious about these "tests"
>>>>> are just tests (which may or may not happen) that determine the AST, for
>>>>> example which node to use ?
>>>>>
>>>>
>>>> 'tests' is just there because, in the grammar, there is this at a
>>>> certain point:
>>>>
>>>> testlist:
>>>> test 'test' "," testlist
>>>> | test 'test' comma_opt
>>>> ;
>>>>
>>>> I have named this use of test 'test', so SmaCC has deduced that
>>>> testlist will be a list of test(s) nodes (or maybe other stuff such as
>>>> atoms, depending on the productions for test).. so, SmaCC, in each rule
>>>> where testlist is found, it will add a 'tests' instance variable.
>>>>
>>>> So, basically, the grammar rules explain how each node can be
>>>> decomposed in sub-nodes, and the additional annotations (the 'test' naming
>>>> and the {{}} or {{}}) drive how the classes for the nodes you want to keep
>>>> are generated. In that testlist case, no node will be generated, but
>>>> everywhere testlist appear on the right of the rule, then it will add a
>>>> 'tests' instance variable.
>>>>
>>>>
>>>>>
>>>>> Or are they tests related to unit testing class PythonParserTests ?
>>>>>
>>>>
>>>> Not at all :)
>>>>
>>>>
>>>>>
>>>>> Also you said I need to use the visitor created by PythonParser I
>>>>> assume you mean PyRootNodeVisitor ? Just as it is explained in the AST
>>>>> chapter of the documentation.
>>>>>
>>>>> In my case this simple python list will need me to subclass it and
>>>>> override method visitListmaker , the aListmaker passed as argument to the
>>>>> method should I assume it is PyListmakerNode ?
>>>>>
>>>>
>>>> In my experience, what you need to do is you have a look at the ast
>>>> generated and see if you can recognize the elements. From what I see in
>>>> your simple example, the key to your list is that PyAtomNode instance with
>>>> something in list. Once you have that, you know that you need to visit
>>>> PyAtomNode (and check that it has the [ ] tokens).
>>>>
>>>> Looking into what is listmaker in atom in the grammar
>>>> (congratulations by the way, you have seen it :) ), you'll see that it
>>>> creates a listmaker node only in the first case: test followed by a
>>>> list_for, otherwise it falls back to testlist...
>>>>
>>>> Thierry
>>>>
>>>>
>>>>
>>>>>
>>>>> On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier <
>>>>> thierry.goubier(a)gmail.com> wrote:
>>>>>
>>>>>> Hi kilon,
>>>>>>
>>>>>> The tests instance variable is linked to the python grammar: top
>>>>>> level items in an expression are probably tests, and, through the grammar,
>>>>>> tests can be just atoms.
>>>>>>
>>>>>> So the tests instance variable doesn't means it is testing anything :)
>>>>>>
>>>>>> Thierry
>>>>>> Le 30 janv. 2015 09:23, "kilon alios" <kilon.alios(a)gmail.com> a
>>>>>> écrit :
>>>>>>
>>>>>> Ok so I tried to parse a very simple list like
>>>>>>>
>>>>>>> [ 67,12342,5 ]
>>>>>>>
>>>>>>> using Parse and explore , I can find these number by following
>>>>>>> this AST (for example 67)
>>>>>>>
>>>>>>> PyFileInputNode>>statements: -> 1: PySimpleStmNode>>stmts: -> 1:
>>>>>>> PyExprStmtNode>>tests: ->1: PyPowerNode>>atom: -> PyAtomNode>>list: -> 1:
>>>>>>> PyPowerNode>>atom: -> PyPowerNode>>numberToken -> numberToken>>value -> 67
>>>>>>>
>>>>>>> quite a structure, but the one thing I dont get is "tests" , why
>>>>>>> "tests" ?
>>>>>>>
>>>>>>> Does it tests something and if yes what ?
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>
Feb. 11, 2015
Re: [Pharo-users] SmaCC: First steps
by kilon alios
Well I tried in the past to use openqwaq , but what I learned from the
experience is that sometimes understanding others code can be even more
time consuming than remaking it yourself. I spent like an afternoon trying
to understand openqwaq before starting Ephestos from complete scratch.
Suffice to say that in another afternoon I had the prototype of Ephestos
working with the ability to send simple python strings to the cptyhon
interpreter to be execute by the time I was not even able to understand the
basic architecture of openqwaq.
The module you recommended alone contains like 11.000 lines of code. Thats
a lot of work to just read that code and I cant find any class named
CModel. In any case I like it that I started from scratch, I want to keep
my project small, light, well documented and super easy to hack. Even if
that means less features :)
Also the code is written for squeak not pharo. In any case I will need
someone like Thierry to guide me through the code and help me understand.
So its definitely not as simple as "hey I am going to use that code".
Executing python code with Ephestos is already possible and easy , my
problems now are a) converting from python to pharo types which is why I am
using SmaCC b) use of callbacks , which should be easy to do , so that
python code can call pharo code. In the future if socket are proven too
slow I may move my architecture into a shared DLL instead to make things
faster. But as far as using python code from pharo I am very close to
achieving my goal by the end of this year.
On Wed, Feb 11, 2015 at 4:40 PM, Sebastian Heidbrink <sheidev(a)yahoo.de>
wrote:
> Hi!
>
> Maybe you also want to have a look at
> http://www.squeaksource.com/openqwaq/
>
> There is a part PyBridge included. MAybe you can take some of the
> Smalltalk Python Cmodel classes from there.
>
> Sebastian
>
>
> Am 10.02.2015 um 23:24 schrieb kilon alios:
>
> Ok so after rereading the tutorial and testing again and again , I think I
> have finally managed to understand how SmaCC really works and I was
> succesful into converting simple python litsts to pharo arrays and ordered
> collections.
>
> The tricky part now is to apply this knowledge to complex python types
> like multi dimensional lists, tuples and dictionaries. I understand that
> the visitor allows me to visit a specific object instances each time they
> are found in the AST . But because I want to walk the AST in order to build
> multi dimensional ordered collections I need something more, or maybe my
> understanding of the visitor pattern is flawed.
>
> The problem I am having here is that each time I parse a python type
> that python type is not necessarily represented by different kind of node.
> For example whether its a list or a tuple or a dictionary the same class is
> used PyAtomNode. In order to differentiate between those diffirent python
> types PyAtomNode has instance variables for right and left bracket,
> parantheses, and curly. So my initial thinking is to check those instance
> variables to see if they are nil and from that I can conclude which python
> type I am parsing.
>
> So I can preform simple ifs that check that the instance variable is Nil
> or not but the question is if my strategy is a good one or a bad one.
>
> I could define my own syntax to simplify the AST tree including
> different nodes for different python types , because from the looks of it ,
> it seems it is a bit too verbose for my needs but On the other hand I am
> not so sure because in the future my needs may become more verbose too.
>
> So I am very close and ready to create my full python types converter
> for pharo but I wanted some good advice before wasting time on something
> that is not efficient.
>
>
> By the way Thierry I have to agree with you Smacc is a very capable
> parser, also I like the use of regex syntax, makes it uglier compared
> Pettit Parser but I prefer the compact regex syntax to having to define and
> browse tons of classes and send tons of messages. Also the Python support
> is very good and I am impressed how easily SmaCC can parse whole python
> applications since some of the test are very complex. Well done great work!
>
>
>
> On Sat, Jan 31, 2015 at 12:04 AM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> thank for your congratulations, because at times I fear I ask too obvious
>> questions. I have to say I find this parsing very complex but very
>> fascinating too :) Time to experiment with the visitor.
>>
>> On Fri, Jan 30, 2015 at 11:49 PM, Thierry Goubier <
>> thierry.goubier(a)gmail.com> wrote:
>>
>>>
>>>
>>> 2015-01-30 14:04 GMT+01:00 kilon alios <kilon.alios(a)gmail.com>:
>>>
>>>> Ok thanks for the info, I am still however curious about these "tests"
>>>> are just tests (which may or may not happen) that determine the AST, for
>>>> example which node to use ?
>>>>
>>>
>>> 'tests' is just there because, in the grammar, there is this at a
>>> certain point:
>>>
>>> testlist:
>>> test 'test' "," testlist
>>> | test 'test' comma_opt
>>> ;
>>>
>>> I have named this use of test 'test', so SmaCC has deduced that
>>> testlist will be a list of test(s) nodes (or maybe other stuff such as
>>> atoms, depending on the productions for test).. so, SmaCC, in each rule
>>> where testlist is found, it will add a 'tests' instance variable.
>>>
>>> So, basically, the grammar rules explain how each node can be
>>> decomposed in sub-nodes, and the additional annotations (the 'test' naming
>>> and the {{}} or {{}}) drive how the classes for the nodes you want to keep
>>> are generated. In that testlist case, no node will be generated, but
>>> everywhere testlist appear on the right of the rule, then it will add a
>>> 'tests' instance variable.
>>>
>>>
>>>>
>>>> Or are they tests related to unit testing class PythonParserTests ?
>>>>
>>>
>>> Not at all :)
>>>
>>>
>>>>
>>>> Also you said I need to use the visitor created by PythonParser I
>>>> assume you mean PyRootNodeVisitor ? Just as it is explained in the AST
>>>> chapter of the documentation.
>>>>
>>>> In my case this simple python list will need me to subclass it and
>>>> override method visitListmaker , the aListmaker passed as argument to the
>>>> method should I assume it is PyListmakerNode ?
>>>>
>>>
>>> In my experience, what you need to do is you have a look at the ast
>>> generated and see if you can recognize the elements. From what I see in
>>> your simple example, the key to your list is that PyAtomNode instance with
>>> something in list. Once you have that, you know that you need to visit
>>> PyAtomNode (and check that it has the [ ] tokens).
>>>
>>> Looking into what is listmaker in atom in the grammar (congratulations
>>> by the way, you have seen it :) ), you'll see that it creates a listmaker
>>> node only in the first case: test followed by a list_for, otherwise it
>>> falls back to testlist...
>>>
>>> Thierry
>>>
>>>
>>>
>>>>
>>>> On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier <
>>>> thierry.goubier(a)gmail.com> wrote:
>>>>
>>>>> Hi kilon,
>>>>>
>>>>> The tests instance variable is linked to the python grammar: top level
>>>>> items in an expression are probably tests, and, through the grammar, tests
>>>>> can be just atoms.
>>>>>
>>>>> So the tests instance variable doesn't means it is testing anything :)
>>>>>
>>>>> Thierry
>>>>> Le 30 janv. 2015 09:23, "kilon alios" <kilon.alios(a)gmail.com> a écrit
>>>>> :
>>>>>
>>>>> Ok so I tried to parse a very simple list like
>>>>>>
>>>>>> [ 67,12342,5 ]
>>>>>>
>>>>>> using Parse and explore , I can find these number by following this
>>>>>> AST (for example 67)
>>>>>>
>>>>>> PyFileInputNode>>statements: -> 1: PySimpleStmNode>>stmts: -> 1:
>>>>>> PyExprStmtNode>>tests: ->1: PyPowerNode>>atom: -> PyAtomNode>>list: -> 1:
>>>>>> PyPowerNode>>atom: -> PyPowerNode>>numberToken -> numberToken>>value -> 67
>>>>>>
>>>>>> quite a structure, but the one thing I dont get is "tests" , why
>>>>>> "tests" ?
>>>>>>
>>>>>> Does it tests something and if yes what ?
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
Feb. 11, 2015
Re: [Pharo-users] recover lost changes
by Nicolai Hess
Am 11.02.2015 18:18 schrieb "Nicolai Hess" <nicolaihess(a)web.de>:
>
> I remember at such case, missing comments after file in. I think we fixed
it in 4.0 and back ported it too.
>
14377 <https://pharo.fogbugz.com/default.asp?14377>
FileOut creates invalid comment entries for classes with class side methods
And 14405 for 3.0
> Am 11.02.2015 17:47 schrieb "Sean P. DeNigris" <sean(a)clipperadams.com>:
>
>> Hartmut wrote
>> > I also lost class comments on file-out / file-in .
>>
>> I can not reproduce this in the lastest update (#30862). What image
update
>> version do you have? You can find out via WorldMenu->System->About
>>
>> Also, when you say "
>>
>>
>>
>> -----
>> Cheers,
>> Sean
>> --
>> View this message in context:
http://forum.world.st/recover-lost-changes-tp4804929p4805162.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
Feb. 11, 2015
Re: [Pharo-users] recover lost changes
by Nicolai Hess
I remember at such case, missing comments after file in. I think we fixed
it in 4.0 and back ported it too.
Am 11.02.2015 17:47 schrieb "Sean P. DeNigris" <sean(a)clipperadams.com>:
> Hartmut wrote
> > I also lost class comments on file-out / file-in .
>
> I can not reproduce this in the lastest update (#30862). What image update
> version do you have? You can find out via WorldMenu->System->About
>
> Also, when you say "
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context:
> http://forum.world.st/recover-lost-changes-tp4804929p4805162.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
Feb. 11, 2015
Re: [Pharo-users] get them while they are young
by kilon alios
"I've found most of the changes we've made to be low level enough that PBE
is
still a great reference."
Are we using the same Pharo ? Because my Pharo has massively improved since
version 1.4 and has major changes they are definitely not low level . Also
PBE lacks fundamental material that I added like how to use smalltalkhub ,
how to use Nautilus, and I added also a lot more to the 5 chapters I
updated , mainly in the first 2. What PBE seriously lack is a good
introductory chapter to OOP . I said I will do it but unfortunately I am
having to much fun with my project "Ephestos" and learning SmaCC has been
quite a challange for my limited free time. Maybe in the future.
I also dont agree with the philosophy of dividing to many books. I would
prefer it there was one unified book with 2 parts. 1 part will be the
tutorial part and part 2 the reference. Like a super bible.
PBE is an ok book and probably the most important pharo book out there, but
its heavily outdated. So outdated at times it becomes unusable. But that is
changing rapidly with UPBE and the effort me and others have put into it.
Still with the rate Pharo is improving will be a challenge to keep things
updated.
"well, they are not beginner coders, at least i hope not.
they should have taken some programming classes already."
I would 100% recommend pharo to anyone with previous coding experience and
I have done so to fellow python coders. At least give it a try and see if
they like it. I think its awesome that you promote pharo we need more
people like you that can help begineer pharo coders get introduced into
pharo .
One advice I would give you is to avoid recommending pharo areas that are
not well documented and you cant help them with, learning through asking
questions in the mailing list even though people are super nice here can be
a frustrating experience for people that are outsiders of the community
trying to get their barings. There many people , including me, that lack
the confidence to do so in a comfortable way. Of course suffice to say I
feel way more comfortable now that I was feeling when I was first
introduced into Pharo. So people definitely should be encouraged to ask
questions here , especially stupid questions. I have learned in my life the
more stupid the question the more important it is :)
On Wed, Feb 11, 2015 at 5:35 PM, Sean P. DeNigris <sean(a)clipperadams.com>
wrote:
> kilon.alios wrote
> > I would not recommend Pharo to beginner coders, but with Updated Pharo By
> > Example near completion I may change my mind ;)
>
> I've found most of the changes we've made to be low level enough that PBE
> is
> still a great reference. And when Deep Into Pharo covered FileSystem,
> Metacello, and Settings, I thought we were doing pretty well. Where
> specifically have you found pain from our existing documentation? I know
> it's a bit scattered... Spec? There are two papers on that which we should
> maybe make more obviously accessible. Nautilus? Don't know about that one!
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context:
> http://forum.world.st/get-them-while-they-are-young-tp4805068p4805142.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
Feb. 11, 2015
Re: [Pharo-users] recover lost changes
by Sean P. DeNigris
Hartmut wrote
> I also lost class comments on file-out / file-in .
I can not reproduce this in the lastest update (#30862). What image update
version do you have? You can find out via WorldMenu->System->About
Also, when you say "
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/recover-lost-changes-tp4804929p4805162.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Feb. 11, 2015