Hello list,
Today's quizz: guess the results of these evaluations and how it prints
Easy to begin with: Compiler evaluate: '#++'. Yes Scanner class>>#isLiteralSymbol: not really consistent with what the parser is ready to understand. It even has some unreachable code in it.
Now what if: Compiler evaluate: '##'. Enjoy the variations, not all correct: Compiler evaluate: '#'. Compiler evaluate: '# "please" # "print" # "me"'. Compiler evaluate: '##()'. Compiler evaluate: '##)'. Compiler evaluate: '##('. Compiler evaluate: '##(##)'. Never heard about explicit number literal? Compiler evaluate: '#1'. Maybe the negative ones would work? Compiler evaluate: '#-1'. So try and explain this one: Compiler evaluate: '#--1'.
Hmm, better correcting the parser than trying to write its EBNF rules!
Nicolas
If anyone cares, here's VisualWorks' treatment,
Compiler evaluate: '#++'. #++
Compiler evaluate: '##'. #word, binary, keyword, (, or [ expected ->#
Compiler evaluate: '#'. #word, binary, keyword, (, or [ expected ->
Compiler evaluate: '# "please" # "print" # "me"'. # "please" word, binary, keyword, (, or [ expected -># "print" # "me"
Compiler evaluate: '##()'. #word, binary, keyword, (, or [ expected ->#()
Compiler evaluate: '##)'. #word, binary, keyword, (, or [ expected ->#)
Compiler evaluate: '##('. #word, binary, keyword, (, or [ expected ->#(
Compiler evaluate: '##(##)'. #word, binary, keyword, (, or [ expected ->#(##)
Compiler evaluate: '#1'. #word, binary, keyword, (, or [ expected ->1
Compiler evaluate: '#-1'. #-Nothing more expected ->1
Compiler evaluate: '#--1'. Unhandled exception: Message not understood: #-
Cheers!
-Boris
That's what mature means I guess.
The last is syntactically correct, and correctly parsed by Squeak. However Squeak result is quite surprising, debug it to believe it.
Nicolas
PS: forgot this one: Compiler evaluate: '#$'. Not to confuse: Compiler evaluate: '# $'. And: Compiler evaluate: '#$ '.
Boris Popov a écrit :
If anyone cares, here's VisualWorks' treatment,
Compiler evaluate: '#++'. #++
Compiler evaluate: '##'. #word, binary, keyword, (, or [ expected ->#
Compiler evaluate: '#'. #word, binary, keyword, (, or [ expected ->
Compiler evaluate: '# "please" # "print" # "me"'. # "please" word, binary, keyword, (, or [ expected -># "print" # "me"
Compiler evaluate: '##()'. #word, binary, keyword, (, or [ expected ->#()
Compiler evaluate: '##)'. #word, binary, keyword, (, or [ expected ->#)
Compiler evaluate: '##('. #word, binary, keyword, (, or [ expected ->#(
Compiler evaluate: '##(##)'. #word, binary, keyword, (, or [ expected ->#(##)
Compiler evaluate: '#1'. #word, binary, keyword, (, or [ expected ->1
Compiler evaluate: '#-1'. #-Nothing more expected ->1
Compiler evaluate: '#--1'. Unhandled exception: Message not understood: #-
Cheers!
-Boris
Still some exercizes for the Old and NewCompiler team:
Tell which expression Squeak would compile and which not: Compiler evaluate: '#:'. Compiler evaluate: '#::'. Compiler evaluate: '#x:y'. Compiler evaluate: '#:x1'. Compiler evaluate: '#:1x'. Compiler evaluate: '#x:1'. Compiler evaluate: '#x::'.
Also try to print: #'x:1'.
Nicolas
did you try with the new compiler?
On 23 mai 07, at 01:47, nicolas cellier wrote:
Hello list,
Today's quizz: guess the results of these evaluations and how it prints
Easy to begin with: Compiler evaluate: '#++'. Yes Scanner class>>#isLiteralSymbol: not really consistent with what the parser is ready to understand. It even has some unreachable code in it.
Now what if: Compiler evaluate: '##'. Enjoy the variations, not all correct: Compiler evaluate: '#'. Compiler evaluate: '# "please" # "print" # "me"'. Compiler evaluate: '##()'. Compiler evaluate: '##)'. Compiler evaluate: '##('. Compiler evaluate: '##(##)'. Never heard about explicit number literal? Compiler evaluate: '#1'. Maybe the negative ones would work? Compiler evaluate: '#-1'. So try and explain this one: Compiler evaluate: '#--1'.
Hmm, better correcting the parser than trying to write its EBNF rules!
Nicolas
Just downloaded AST->88 NewCompiler->117 from SqueakMap
ClosureCompiler evaluate: '##' and co leads to Syntax errors.
#1 #$ #) etc are also rejected.
BUT ClosureCompiler evaluate: '#:'. answer an empty string HUH? MIGHT BE A BUG
ClosureCompiler evaluate: '#::'. #:SmaCCParserError: Token not expected ->:
'# a' is understood as #a (like VW). '#x:y:z' is understood as #x:y: z (send message z) like VW.
Of course it accepts more than 2 binary letters to form a binary symbol/message (already an old compiler feature, but not a st-80 nor VW one): ClosureCompiler evaluate: '#+++'. #'+++'
Interesting thing: ClosureCompiler does understand #|| and #-- This is not in the original st-80 but is a logical feature since also accept || and -- as regular binary messages.
So finally, only a bug now. And Symbol storeString still not in sync with Parser. This will cause decompiled code to be different from source code #'x:y:z' does print #x:y:z that is interpreted (#x:y:) z BUG. (see Scanner isLiteralSymbol: which was the real focus of my initial post before i ran into weird old compiler behaviour).
stephane ducasse a écrit :
did you try with the new compiler?
On 23 mai 07, at 01:47, nicolas cellier wrote:
Hello list,
Today's quizz: guess the results of these evaluations and how it prints
Easy to begin with: Compiler evaluate: '#++'. Yes Scanner class>>#isLiteralSymbol: not really consistent with what the parser is ready to understand. It even has some unreachable code in it.
Now what if: Compiler evaluate: '##'. Enjoy the variations, not all correct: Compiler evaluate: '#'. Compiler evaluate: '# "please" # "print" # "me"'. Compiler evaluate: '##()'. Compiler evaluate: '##)'. Compiler evaluate: '##('. Compiler evaluate: '##(##)'. Never heard about explicit number literal? Compiler evaluate: '#1'. Maybe the negative ones would work? Compiler evaluate: '#-1'. So try and explain this one: Compiler evaluate: '#--1'.
Hmm, better correcting the parser than trying to write its EBNF rules!
Nicolas
2007/5/23, nicolas cellier ncellier@ifrance.com:
Just downloaded AST->88 NewCompiler->117 from SqueakMap
I'm not sure, but I think the version on Universe is much more recent than the one on SqueakMap.
If this is true, can I say "What is going on?". This is not directed specifically at you Damien; but is this community further splintering?
I'll be the first to admit that I'm nearly oblivious about the Universes concept. But it would disturb me to find that active development is going on that is meant to be public but existing SqueakMap entries are not being updated to reflect it. If this is occurring, why?
Ken
On Thu, 2007-05-24 at 20:12 +0200, Damien Cassou wrote:
2007/5/23, nicolas cellier ncellier@ifrance.com:
Just downloaded AST->88 NewCompiler->117 from SqueakMap
I'm not sure, but I think the version on Universe is much more recent than the one on SqueakMap.
Sorry, I'm sending this again as I failed to change the subject appropriately.
---------
If this is true, can I say "What is going on?". This is not directed specifically at you Damien; but is this community further splintering?
I'll be the first to admit that I'm nearly oblivious about the Universes concept. But it would disturb me to find that active development is going on that is meant to be public but existing SqueakMap entries are not being updated to reflect it. If this is occurring, why?
Ken
On Thu, 2007-05-24 at 20:12 +0200, Damien Cassou wrote:
2007/5/23, nicolas cellier ncellier@ifrance.com:
Just downloaded AST->88 NewCompiler->117 from SqueakMap
I'm not sure, but I think the version on Universe is much more recent than the one on SqueakMap.
In my opinion Universes should be where you put software. If you want it on Squeakmap as well it doesn't hurt anything, but it doesn't really buy much imo.
The problem with Squeakmap is that it doesn't know dependancies unless you make some script, which causes all kinds of other problems. If there is a concern about having things on Squeakmap then we should make either (a) a single interface that creates a Universe entry and a Squeakmap or (b) a way for Squeakmap to get automatically updated somehow (maybe reading the universes list).
From: Ken Causey ken@kencausey.com Reply-To: The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org To: The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org Subject: Universes/SqueakMap Separation? (was Re: Fun with Symbol) Date: Thu, 24 May 2007 13:42:35 -0500
Sorry, I'm sending this again as I failed to change the subject appropriately.
If this is true, can I say "What is going on?". This is not directed specifically at you Damien; but is this community further splintering?
I'll be the first to admit that I'm nearly oblivious about the Universes concept. But it would disturb me to find that active development is going on that is meant to be public but existing SqueakMap entries are not being updated to reflect it. If this is occurring, why?
Ken
On Thu, 2007-05-24 at 20:12 +0200, Damien Cassou wrote:
2007/5/23, nicolas cellier ncellier@ifrance.com:
Just downloaded AST->88 NewCompiler->117 from SqueakMap
I'm not sure, but I think the version on Universe is much more recent than the one on SqueakMap.
<< signature.asc >>
_________________________________________________________________ PC Magazines 2007 editors choice for best Web mailaward-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migr...
2007/5/24, J J azreal1977@hotmail.com:
In my opinion Universes should be where you put software. If you want it on Squeakmap as well it doesn't hurt anything, but it doesn't really buy much imo.
The problem with Squeakmap is that it doesn't know dependancies unless you make some script, which causes all kinds of other problems. If there is a concern about having things on Squeakmap then we should make either (a) a single interface that creates a Universe entry and a Squeakmap or (b) a way for Squeakmap to get automatically updated somehow (maybe reading the universes list).
I think we really need something better than SqueakMap and better than Universes. They are both really good but they both lack some important functionalities.
To answer your question Ken, I'm working with what suit my needs best. I'm working with Universes because I can manage dependencies and I can do that with Smalltalk code or with a Squeak interface.
Ken Causey ken@kencausey.com writes:
If this is true, can I say "What is going on?". This is not directed specifically at you Damien; but is this community further splintering?
I'll be the first to admit that I'm nearly oblivious about the Universes concept. But it would disturb me to find that active development is going on that is meant to be public but existing SqueakMap entries are not being updated to reflect it. If this is occurring, why?
Sometimes nobody does the work of putting the entry into the catalog. Sometimes the package author doesn't do it, and when that happens, AFAIK nobody is following behind them to update SqueakMap entries.
It is has always been like this, for both SqueakMap and Package Universes. Catologing everything is a goal that can never be perfectly achieved. Having multiple catalogs simply means it more obvious, because sometimes one or the other catalog is more current for some project.
If you want to see SqueakMap be more current, then someone has to do the work. Here are some ideas about how that could be arranged:
1. Have a catalog editor who mimicks my and Damien's role with the package universes. This person would peruse the database and update entries that have fallen out of date. This work takes a lot of time, but on the nice side you get the gratification of perusing a list of cool Squeak software that is out there.
2. Have automatic copying from universes entries to SqueakMap entries. It is a little tedious right now to post to package universes and then post the same information to SqueakMap.
3. Stop listing individual versions on SqueakMap, so that it is not so hard to keep up to date.
It all comes down to what people volunteer to do.
Lex
On Sat, 2007-05-26 at 23:00 +0200, Lex Spoon wrote:
Ken Causey ken@kencausey.com writes:
If this is true, can I say "What is going on?". This is not directed specifically at you Damien; but is this community further splintering?
I'll be the first to admit that I'm nearly oblivious about the Universes concept. But it would disturb me to find that active development is going on that is meant to be public but existing SqueakMap entries are not being updated to reflect it. If this is occurring, why?
Thanks for the detailed answers.
Sometimes nobody does the work of putting the entry into the catalog. Sometimes the package author doesn't do it, and when that happens, AFAIK nobody is following behind them to update SqueakMap entries.
It is has always been like this, for both SqueakMap and Package Universes. Catologing everything is a goal that can never be perfectly achieved. Having multiple catalogs simply means it more obvious, because sometimes one or the other catalog is more current for some project.
If you want to see SqueakMap be more current, then someone has to do the work. Here are some ideas about how that could be arranged:
- Have a catalog editor who mimicks my and Damien's role with the package universes. This person would peruse the database and update entries that have fallen out of date. This work takes a lot of time, but on the nice side you get the gratification of perusing a list of cool Squeak software that is out there.
I don't really understand this. How is a catalog editor to determine when a package being developed by some other party has reached a publicly 'releasable' stage? How, in general, is the catalog editor expected to determine dependencies and details about installing the package? I'm not saying it's impossible to determine these things, but it seems like the package owner is already going to know them and be in a better position to make these judgements. It almost sounds like you are saying that package owners are reluctant to issue releases and you have to do it for them. Have I misunderstood?
Ken
On 5/28/07, Ken Causey ken@kencausey.com wrote:
It almost sounds like you are saying that package owners are reluctant to issue releases and you have to do it for them. Have I misunderstood?
Whether or not that's what Lex was saying, I think it's a reasonable position. Maintainers have very different ideas about what code is releasable and how to release it. One person's alpha is another person's release candidate, and others ignore releases altogether and just expect everyone to pull down the latest commit from SqueakSource. A given editor, on the other hand, can apply a consistent set of criteria across all of the packages in the catalog. A user who isn't intimately familiar with the culture of every package they use can instead just choose a catalog with an editor they trust.
Avi
<Avi>others ignore releases altogether and just expect everyone to pull down the latest commit from SqueakSource</Avi>
And there's the case of the Chronos project on SqueakSource, where you're the only one with administrator privileges, and so the only one who can make a release, or update the "front page" with installation instructions, whereas I, the author/developer, can only uload new package version commits.
Can we get this situation fixed?
--Alan
"Avi Bryant" avi@dabbledb.com writes:
On 5/28/07, Ken Causey ken@kencausey.com wrote:
It almost sounds like you are saying that package owners are reluctant to issue releases and you have to do it for them. Have I misunderstood?
Whether or not that's what Lex was saying, I think it's a reasonable position. Maintainers have very different ideas about what code is releasable and how to release it. One person's alpha is another person's release candidate, and others ignore releases altogether and just expect everyone to pull down the latest commit from SqueakSource. A given editor, on the other hand, can apply a consistent set of criteria across all of the packages in the catalog.
That's where I am coming from. It is a combined effort, much like editing a book that has twenty contributors. The contributors provide the raw material, while the editor keeps a view of the overall combination. An editor can provide some consistency.
For Squeak packages, the precise roles still need to be felt out. There's definitely a place for an editor, though, given all the bit rotting we observe in practice.
Not to overstate matters. It's still best of all when the primary contributors help out more. It is simply not a complete solution.
Lex
There are many differences between SM and PU. One is the SM is supposed to have everything in it, a "single stop shop", and PU is only supposed to have things that work for a particular version, and that presumably work together. Of course, SM doesn't have everything, and it is easy to put two packages in PU that do not work together. Reality is never quite up to our expectations. Nevertheless, SM is more "universal" than PU, and a PU is more coherent and the things in it are more likely to work together than SM.
One way to solve this is to make SM more automatic. It could be given rules about where a particular package could be found and could update itself automatically. So, it could get its latest version from a MC repository or from a PU.
Another way is to change PU so that when you update a PU, it automatically updaes SM.
Personally, I prefer the PU model to the SM model, though it is certainly useful to have a complete list of Squeak projects, even if the projects are often out of date and won't run in my current image. Most of the time I prefer to have software that I can assume works.
-Ralph
squeak-dev@lists.squeakfoundation.org