Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3147 posts
|
Nice the hear indeed. I miss your posts! Pharo is indeed very stable. Doing everything on 3.0 here. Got a full week of clients demos done, never ever had to touch the server running the app. Even the guy doing the demos told me it never crashed on him (which wasn't that usual apparently). With the command line based tools that are now very doable, this makes for a serious contender. Now, for a bit of thread hijacking... We need to put more care in the datadabase sector, I've been bit by SQLite crashes with WeakRegistry sessions. Good thing is that I was to fix that on my own, which would be close to impossible with other toolchains. That's a key thing about Pharo: being able to debug quite deep and still grasp what's going on. Postgres works too. But APIs are really far apart and some alignment is required... That's a limiting factor for adoption, as DBs are really used in a lot of places. For getting traction, we also need some more quick tools. I like Teapot for example. It looks like close to Flask http://flask.pocoo.org/ Look at how easy it is to bang an app together: We should have something like that. In the last hackathon, we go the top apps using this kind of tech. http://www.rtbf.be/info/medias/detail_trois-applications-primees-au-premier-hackathon-open-data-de-bruxelles?id=8381376 (french ahead)... I was in a team where we enhanced an existing thing (http://noselus.be for the interested). and was bit by SQLite trouble. No issue as I wanted to use Pharo in a new case, namely I believe we could have a Pharo microframework thing where people would not use the browser to code but a single script. Ha! Heretic! A file! Burn him! hum, yeah, but that's what people use and I also have a startup script for my apps. We could use that to "bootstrap people" into Pharo. Instead of a crappy debugger, they can then just pharo-ui Pharo.image and bam, a full IDE with all bells and whistles. How hard would it be to parse such a file with this kind of content? This would generate a WAComponent subclass with methods in it, register the thing and go for it. We can pack JSON support in there as the JsonObject support allows to really load and access Json easily. TIA for your feedback. Phil Phil On Thu, Oct 23, 2014 at 7:40 AM, Sven Van Caekenberghe <[hidden email]> wrote: Mariano, ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
Le 23/10/2014 08:09, [hidden email] a écrit :
> How hard would it be to parse such a file with this kind of content? > > https://github.com/mitsuhiko/flask/blob/master/examples/minitwit/minitwit.py Not hard. A bit of work on PythonParser2. > This would generate a WAComponent subclass with methods in it, register > the thing and go for it. The level of Python in it look not too difficult to convert. But it relies on a framework for which I can't answer. What is jinja ? Thierry |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3147 posts
|
On Thu, Oct 23, 2014 at 8:17 AM, Thierry Goubier <[hidden email]> wrote: Le 23/10/2014 08:09, [hidden email] a écrit : Well, I meant "a file like this in Smalltalk" :-) Still, a cool idea of yours!
Jinja is the template engine: http://jinja.pocoo.org/ Phil Thierry |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
Le 23/10/2014 08:23, [hidden email] a écrit :
> On Thu, Oct 23, 2014 at 8:17 AM, Thierry Goubier > <[hidden email] <mailto:[hidden email]>> wrote: > > Le 23/10/2014 08:09, [hidden email] <mailto:[hidden email]> > a écrit : > > How hard would it be to parse such a file with this kind of content? > > https://github.com/mitsuhiko/__flask/blob/master/examples/__minitwit/minitwit.py > <https://github.com/mitsuhiko/flask/blob/master/examples/minitwit/minitwit.py> > > > Not hard. A bit of work on PythonParser2. > > > Well, I meant "a file like this in Smalltalk" :-) Still, a cool idea of > yours! ... [show rest of quote] That in Smalltalk may be better, especially to induce people to extend it with Pharo afterwards :) But Pharo has issues with long methods (such as a single, long file). I wrote some code to split methods for SmaCC at the AST level (parse, split, create sub-methods, replace code with call to method, compile), but it works in SmaCC generated code; I didn't really try to make it general. > > This would generate a WAComponent subclass with methods in it, > register > the thing and go for it. > > > The level of Python in it look not too difficult to convert. But it > relies on a framework for which I can't answer. What is jinja ? > > Jinja is the template engine: http://jinja.pocoo.org/ Ok, Thierry |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3147 posts
|
On Thu, Oct 23, 2014 at 8:42 AM, Thierry Goubier <[hidden email]> wrote: Le 23/10/2014 08:23, [hidden email] a écrit : ... [show rest of quote] That's the idea indeed.
How long is long? Now, the point is to see all that as a stream, cut methods at appropriate places and compile code under a WAComponent subclass. I don't know about SmaCC but I think I can do something with PetitParser and Smalltalk compile: Phil
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
Le 23/10/2014 09:18, [hidden email] a écrit :
> > On Thu, Oct 23, 2014 at 8:42 AM, Thierry Goubier > <[hidden email] <mailto:[hidden email]>> wrote: > > > How long is long? 900 nodes in the AST seems to be the limit for the type of method SmaCC generates (cascading ifTrue:ifFalse:). Other limits exist (number of literals, for example). Unless you generate automatically some code, it's hard to hit them. Once you generate automatically, it's easy to hit them :P > Now, the point is to see all that as a stream, cut methods at > appropriate places and compile code under a WAComponent subclass. Yes. But then you need some kind of syntax to mark the start of a method. Change sets and dolphin packages use !! markers. > I don't know about SmaCC but I think I can do something with PetitParser > and Smalltalk compile: It's all done with RBParser. Since you're parsing Smalltalk, it's easier to do it that way (and probably a bit faster). And you're also playing with the AST, so you want to fall back to a well defined API for that AST (and visitors, and the like). Extending RBParser with a scheme to parse multi-methods files could be convenient. Unless you fall back on a variant of a changeset. Thierry |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3147 posts
|
On Thu, Oct 23, 2014 at 9:36 AM, Thierry Goubier <[hidden email]> wrote: Le 23/10/2014 09:18, [hidden email] a écrit : ... [show rest of quote] Thanks for the pointers, I'll look into that. In the meantime, I put together a starting point (using your merge driver as an inspiration ;-) ). clone it, make ./bubble --app blah.bubble (if one is on centos6.5, make centos) Check the makefile, I made everything load from filetree and rename the image with another name than a bland "Pharo.image" Phil
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
9490 posts
|
In reply to this post by Thierry Goubier
Hi Thierry,
On Oct 23, 2014, at 12:36 AM, Thierry Goubier <[hidden email]> wrote: > Le 23/10/2014 09:18, [hidden email] a écrit : >> >> On Thu, Oct 23, 2014 at 8:42 AM, Thierry Goubier >> <[hidden email] <mailto:[hidden email]>> wrote: >> >> >> How long is long? > > 900 nodes in the AST seems to be the limit for the type of method SmaCC generates (cascading ifTrue:ifFalse:). > > Other limits exist (number of literals, for example). Unless you generate automatically some code, it's hard to hit them. Once you generate automatically, it's easy to hit them :P Spur and Sista together lift these limits. Spur provides 64k literals per method and Sista uses a bytecode set with effectively unlimited jumps. We could possibly deploy the Sista bytecode set before the Sista optimizer. Would you be interested in being a guinea pig? Eliot (phone) > >> Now, the point is to see all that as a stream, cut methods at >> appropriate places and compile code under a WAComponent subclass. > > Yes. But then you need some kind of syntax to mark the start of a method. Change sets and dolphin packages use !! markers. > >> I don't know about SmaCC but I think I can do something with PetitParser >> and Smalltalk compile: > > It's all done with RBParser. Since you're parsing Smalltalk, it's easier to do it that way (and probably a bit faster). And you're also playing with the AST, so you want to fall back to a well defined API for that AST (and visitors, and the like). > > Extending RBParser with a scheme to parse multi-methods files could be convenient. > > Unless you fall back on a variant of a changeset. > > Thierry > ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1053 posts
|
2014-10-23 16:38 GMT+02:00 Eliot Miranda <[hidden email]>: Hi Thierry, ... [show rest of quote] I want that too. If we deploy it we will deploy it for the Pharo 4 anyway. I thought we'll move to spur then to the new bytecode set because some sista bytecode (traps, inlined primitives, ...) will only work with Spur. We won't spend time implementing and stabilizing them for V3.
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
In reply to this post by Eliot Miranda-2
2014-10-23 16:38 GMT+02:00 Eliot Miranda <[hidden email]>: Hi Thierry, ... [show rest of quote] Well, why not. I'm a bit behind stuff I have to do (should have done :() and I certainly have some code to test: probably all the SmaCC generated scanners have a scanToken method which is jump limited. If you want to have a look, SmaCC (development version) in Pharo has a SmaCCSmalltalkCodeGenerator>>maxMethodLength which control the process. A good test would be to use the PythonParser, recompile it (LALR) and run the python tests. Thierry
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
5777 posts
|
In reply to this post by Thierry Goubier
Besides the hard limits IIRC I also ran into weird unexpected issues like really long methods slowing Nautilus down to a crawl. Is there a library that can effectively take source code and break it up into a reasonable set of methods to avoid these issues? I think this could also be useful in a lot of places e.g. STON. I've been using a trick to distribute "data" which changes often in development but is read-only when deployed; I work with the live model and serialize to method source (like we do with icons I guess). I've had to use different strategies e.g. I favor STON but when porting to Amber, there is no STON, so I serialize to source code.
Cheers,
Sean |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
16 posts
|
On Thursday, Oct 23, 2014 at 5:27 pm, Sean P. DeNigris <[hidden email]>, wrote: Thierry Goubier wrote This is a problem of the TextEditor… The Rubric editor code that is now in the system
that GTInspector uses does not have this problem, it can edit multi-MB files with no problem.
Marcus
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
In reply to this post by Sean P. DeNigris
2014-10-23 17:24 GMT+02:00 Sean P. DeNigris <[hidden email]>: Thierry Goubier wrote It's the styler. I hit that regularly on my home machine. You have that delay when you type something and you wait for the few seconds necessary for the styler to update the coloring :( Is there a library Well, I've written something but: - I only tried and tested with the code that SmaCC generates - It still makes long methods (900 nodes is a long method) It could become a library, but it requires a significant amount of work. In the general case, writing something which knows, without errors, than a subset of a method can be moved in another method and replaced by a message send is not that easy. The reverse is easier (i.e., inlining :)). Thierry
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1618 posts
|
In reply to this post by Marcus Denker-5
2014-10-23 17:36 GMT+02:00 Marcus Denker <[hidden email]>:
... [show rest of quote] Cool. I'll have a look to integrate that. Thierry
|
Free forum by Nabble | Edit this page |