Re: [Pharo-users] Why single inheritance?

2015-01-29 Thread Ben Coman
http://www.visoracle.com/squeak/faq/traits-vs.html

On Wed, Jan 28, 2015 at 11:41 PM, Laura Risani 
wrote:

> Hi all,
>
> What is the explanation why Smalltalk designers preferred single
> inheritance+traits to multiple inheritance? Why is the former better than
> the latter?
> Do traits let you share state also or only behavior?
>
> Best,
> Laura
>


Re: [Pharo-users] New book for Pharo :)

2015-01-29 Thread Werner Kassens

Hi Hernán


This is like if I get 5 mathematicians, fork SciSmalltalk, push cool new
features, and then make all you loose them if you don't update. And I
could do it for fun 1000 times. You get the idea.


 got it!
btw Serge explained his plans for scismalltalk here:
http://forum.world.st/scismalltalk-policy-tp4799887p4801564.html
an excerpt:
"What I want to do is to have a uniform prefix for all SciSmalltalk
classes, maybe SCI or MATH."

werner



Re: [Pharo-users] gt poster

2015-01-29 Thread Ben Coman
great logo.

On Thu, Jan 29, 2015 at 6:29 AM, Tudor Girba  wrote:

> Hi,
>
> Here is a poster for GT.
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>


[Pharo-users] Pointer Detective - Inspecting an Object (instance) and Doing a "PointerDetective openOn: self." leads to a System Error in Pharo?

2015-01-29 Thread Mircea S.
The object is a WhateverRoot instance (subclass of WAComponent) that has 
"canBeRoot ^true."

Am I doing something wrong?

PS. My "eagle eye" caught a typo on line 9 of the error. "'Orginal error:' 
,title asString.". Maybe, just maybe...

More info and an printscreen here:

http://stackoverflow.com/questions/28210014/pointer-detective-inspecting-an-object-instance-and-doing-a-pointerdetectiv

Re: [Pharo-users] SPEC and Athens

2015-01-29 Thread Ben Coman
Really great to see all you do.  A nice introduction.  Now
practical focused criticism that can directly lead to some improvement is
generally welcome, and your longer post was a better example. It is the
generic platitudes of negativity that people get sensitive to. Now there
are many bugs listed in the issue tracker - many of them old.  After you
log a ticket, feel free to socialise it in the lists, which might help draw
more eyeballs.

cheers -ben

On Thu, Jan 29, 2015 at 5:15 AM, Sebastian Heidbrink 
wrote:

>  Seems we wrote at the same time...
>
> Well, Steph here is what I do.
>
> - I attend, organize Smalltalk meet ups.
> - I contribute to the open source community of Gemstone, Amber and VAST
> - I attend conferences like ESUG and STIC and burn funds to make the
> community look bigger
> - I host Smalltalk Inspect
> - I organized the VanIsle CampSmalltalk last October
> - I provide feedback and write open source boards
> - I started a Software Group here in town that meets weekly and Smalltalk
> is always part of it. We didn't promote it yet, but are about to.
>
> For all these actions I need to prepare for questions that I might
> encounter like:
> - "Where do I get started?"
> - "Is there an example for"
> - "Which Smalltalk distribution shall I start with?"
> - "Why does the Pharo 3.0 distribution not work with Moose 3.0 even though
> it is advertised?"
> - "How can I add more flavour to an application, which framework shall I
> use?"
>
> So what does Pharo community currently do for me?
> I report bugs and ask for help and fixes, introductions, examples.
> The answers I get is "load the most current 4.0 development. There it
> should work", "I don't know that doesn't work for me either..."
>
> Am I supposed to advertise Pharo the same way? To a beginner?
>
> I find it very strange that after 30 years one can not easily implement a
> modern looking GUI without too much hassle.
> Even the tool support for Pharo is inconsitant and unstable. I reported
> that several times.
> Unit tests are great, but UI tests are needed too.
>
> I can only tell you that a beginner in Smalltalk is not conditioned like
> us and he suffers much more problems as we do and even think of.
> e.g. it is difficult enough for them to understand what tools are
> available and how to navigate the code. But searching for a simple menu
> like "browse implementors" can even be challenging.
> I know 3 different implementations/spots in one release...
>
> There are so many developers out there that already heard of Smalltalk and
> would love to try it out.
> The only problem is there is no real support for them.
> Once you outgrow the Pharo tutorial it is extreemly difficult to go on
> with more serious stuff.
> Why do stable Configuration oftern not work and dev has to be loaded? That
> does not make sense in a One-Click-Image...
>
> I tried the experiement and started an application from scratch and it is
> really not easy to get started. First question was "Which UI framework do I
> actually have to use? There are "MANY" out there"
>
> But I have to tell all contributers here in the forum. The support and
> will to help is great! I realized that past months some of the questions I
> had had already been answered several times.
> I still got helpful answeres again and was able to go on.
>
> There should be a collection of useful tutorials that are maintained and
> tested before every release.
> I found several great tutorial that I can point Beginners at, but many of
> them do not work anymore.
>
> What you, board and the community currently built is a great eco sytem for
> tools and it is getting better every month.
> That is something that one can really tell.
> Please do not forget to take care of the upcoming Smalltalkers and their
> problems.
>
> There should be a timechart on Pharo.org that shows when (during which
> Pharo release) which framework was/is supported or considert feasable.
> Is BLoc old, or new? Is is deprecated or upcoming? Do the Pharo
> maintainers consider it usable with the current release and if not with
> which?
>
> "Welcome to the world of Smalltalk!"
> You don't like that reaction? Well this is the reaction I get, and
> well, what should I reply then? "If you don't like it, then contribute?"
> A beginner is shy and insecure,... they simply give up and download
> information on SWIFT...
>
> I propose that the community collects information on what Pharo is used
> for. What are it's strength and what kind of application is it the perfect
> abse for.
> This would help guys like me to advertise it with less surprise for the
> interested
>
> I am sorry, I won't currently be able to contribute code to the Pharo
> community since it is not part of my current stack.
> But I release chucnk of thought useful implementations that I encounter in
> my other dialects.
> The only thing that I can provide you with are critical questions that I
> encounter.
> That might change, but it is all I can do so f

Re: [Pharo-users] dirty packages

2015-01-29 Thread Usman Bhatti
Thanks Torsten.
Indeed, renaming the package solved the problem.

On Thu, Jan 29, 2015 at 12:11 AM, Torsten Bergmann  wrote:

> Because "MyPackage" and "MyPackage-Ext" fall into the same
> class categories. The name "MyPackage" is part of the string
> "MyPackage-Ext".
>
> Packages and class categories are mixed to provide Pharo packages
> and with this you are also still able to use old code or
> import code from other Smalltalks.
>
> use: "MyPackage-Core" and "MyPackage-Ext" or
>  "MyPackage-Core" and "MyPackage-Ext-Core"
>
> and you wont have this problem.
>
> If you follow a proper naming scheme (like Seaside and mainly
> also Pharo) you wont get this problem.
>
> Bye
> T.
>
>
>


Re: [Pharo-users] smalltalk workshops (building a webserver) after code-in

2015-01-29 Thread Sebastian Sastre
This is awesome

We needed this!

small feeback: the player didn’t work on Safari OS X and in Chrome the 
streaming was too poor. YouTube or Vimeo usually removes all those issues for 
you

Thanks for sharing and keep up that excellent work!



> On Jan 29, 2015, at 2:52 AM, Martin Bähr  
> wrote:
> 
> hi,
> 
> Google Code-In is over (i'll probably write more about that later)
> and there are a few students who have started their path to smalltalk.
> 
> because there was interest among the students to continue learning, we have
> started a series of workshops to learn the elements of building a webserver.
> 
> i have created a screencast for the first topic: FileSystem
> 
> you can read more about the workshop and find the screencast here:
> http://societyserver.org/mbaehr/training/Using-the-FileSystem-class-in-Pharo-Smalltalk
> 
> being new to smalltalk myself, there are probably some mistakes, and things
> that could be done better, however i believe the screencast is usable for
> learning. 
> 
> i recorded this mostly without interruption except for a few times where i was
> lost and had to stop and look up what i was going to do.
> 
> i am open to feedback and criticism of any kind, from pointing out redundant
> ()s or ways to improve the code to tips for debugging and testing.
> 
> the next workshop will be saturday the 
> 
> greetings, martin.
> 
> -- 
> eKita   -   the online platform for your entire academic life
> -- 
> chief engineer   eKita.co
> pike programmer  pike.lysator.liu.secaudium.net societyserver.org
> secretary  beijinglug.org
> mentor   fossasia.org
> foresight developer  foresightlinux.orgrealss.com
> unix sysadmin
> Martin Bähr  working in chinahttp://societyserver.org/mbaehr/
> 




[Pharo-users] Fwd: Additional easy persistence: try DebrisDB for Fuel-backed Glorp interface

2015-01-29 Thread Cameron Sanders via Pharo-users
--- Begin Message ---
Along the lines of *easy model persistence while writing application code
that will scale*, I strongly encourage people to *try the DebrisDB package*.
Scalability (beyond what Pharo can hold in memory -- note that one boost
your heap size first) can be achieved by several means: 1) deploy on
Gemstone, or 2) deploy with Glorp-SQL, or ... ?) use some of these other
Glorp-interface options. These solutions can co-exist.

See http://smalltalkhub.com/#!/~Debris/DebrisDB

MCHttpRepository
location: 'http://smalltalkhub.com/mc/Debris/DebrisDB/main'
user: ''
password: ''

*By default, out of the box, the persistence is backed by Fuel files on
Pharo. See the test case.* This has only been tested in Pharo3.

The demo with only about 10 lines of specialization code (as a
demonstration of how to control your storage, etc.) will provide you with a
Glorp interface to store data in Fuel format files. Set-up couldn't be
simpler, given that the Fuel package is pre-loaded in recent images.

We have not published our Gemstone compatibility source yet because I was
hoping we could clean it up a bit first. But if people are unwilling to try
this package until the Gemstone support is present, we can fast-track that
-- but please let me know if this is an immediate requirement, otherwise,
it won't happen for nearly two months.

*If you have questions or problems, please let me know.* There are many
improvements we can make to this package, and I would encourage others,
over time, to create more variants of the DataStore that are backed by
non-SQL DBs, such as Mongo, or to add the methods to persist the DataStore
in Mongo, for example.

Cheers,
Cam
--- End Message ---


Re: [Pharo-users] New book for Pharo :)

2015-01-29 Thread Ben Coman
MATH seems to constraining. SCI seems good.  And I like that suggestion for
SciTalk.

On Thu, Jan 29, 2015 at 4:58 PM, Werner Kassens 
wrote:

> Hi Hernán
>
>  This is like if I get 5 mathematicians, fork SciSmalltalk, push cool new
>> features, and then make all you loose them if you don't update. And I
>> could do it for fun 1000 times. You get the idea.
>>
>
>  got it!
> btw Serge explained his plans for scismalltalk here:
> http://forum.world.st/scismalltalk-policy-tp4799887p4801564.html
> an excerpt:
> "What I want to do is to have a uniform prefix for all SciSmalltalk
> classes, maybe SCI or MATH."
>
> werner
>
>


Re: [Pharo-users] SPEC and Athens

2015-01-29 Thread Mark Rizun
Thanks Sebastian!

It works :)

Not perfectly well though. But it is something

Mark

2015-01-29 10:20 GMT+01:00 Ben Coman :

> Really great to see all you do.  A nice introduction.  Now
> practical focused criticism that can directly lead to some improvement is
> generally welcome, and your longer post was a better example. It is the
> generic platitudes of negativity that people get sensitive to. Now there
> are many bugs listed in the issue tracker - many of them old.  After you
> log a ticket, feel free to socialise it in the lists, which might help draw
> more eyeballs.
>
> cheers -ben
>
> On Thu, Jan 29, 2015 at 5:15 AM, Sebastian Heidbrink 
> wrote:
>
>>  Seems we wrote at the same time...
>>
>> Well, Steph here is what I do.
>>
>> - I attend, organize Smalltalk meet ups.
>> - I contribute to the open source community of Gemstone, Amber and VAST
>> - I attend conferences like ESUG and STIC and burn funds to make the
>> community look bigger
>> - I host Smalltalk Inspect
>> - I organized the VanIsle CampSmalltalk last October
>> - I provide feedback and write open source boards
>> - I started a Software Group here in town that meets weekly and Smalltalk
>> is always part of it. We didn't promote it yet, but are about to.
>>
>> For all these actions I need to prepare for questions that I might
>> encounter like:
>> - "Where do I get started?"
>> - "Is there an example for"
>> - "Which Smalltalk distribution shall I start with?"
>> - "Why does the Pharo 3.0 distribution not work with Moose 3.0 even
>> though it is advertised?"
>> - "How can I add more flavour to an application, which framework shall I
>> use?"
>>
>> So what does Pharo community currently do for me?
>> I report bugs and ask for help and fixes, introductions, examples.
>> The answers I get is "load the most current 4.0 development. There it
>> should work", "I don't know that doesn't work for me either..."
>>
>> Am I supposed to advertise Pharo the same way? To a beginner?
>>
>> I find it very strange that after 30 years one can not easily implement a
>> modern looking GUI without too much hassle.
>> Even the tool support for Pharo is inconsitant and unstable. I reported
>> that several times.
>> Unit tests are great, but UI tests are needed too.
>>
>> I can only tell you that a beginner in Smalltalk is not conditioned like
>> us and he suffers much more problems as we do and even think of.
>> e.g. it is difficult enough for them to understand what tools are
>> available and how to navigate the code. But searching for a simple menu
>> like "browse implementors" can even be challenging.
>> I know 3 different implementations/spots in one release...
>>
>> There are so many developers out there that already heard of Smalltalk
>> and would love to try it out.
>> The only problem is there is no real support for them.
>> Once you outgrow the Pharo tutorial it is extreemly difficult to go on
>> with more serious stuff.
>> Why do stable Configuration oftern not work and dev has to be loaded?
>> That does not make sense in a One-Click-Image...
>>
>> I tried the experiement and started an application from scratch and it is
>> really not easy to get started. First question was "Which UI framework do I
>> actually have to use? There are "MANY" out there"
>>
>> But I have to tell all contributers here in the forum. The support and
>> will to help is great! I realized that past months some of the questions I
>> had had already been answered several times.
>> I still got helpful answeres again and was able to go on.
>>
>> There should be a collection of useful tutorials that are maintained and
>> tested before every release.
>> I found several great tutorial that I can point Beginners at, but many of
>> them do not work anymore.
>>
>> What you, board and the community currently built is a great eco sytem
>> for tools and it is getting better every month.
>> That is something that one can really tell.
>> Please do not forget to take care of the upcoming Smalltalkers and their
>> problems.
>>
>> There should be a timechart on Pharo.org that shows when (during which
>> Pharo release) which framework was/is supported or considert feasable.
>> Is BLoc old, or new? Is is deprecated or upcoming? Do the Pharo
>> maintainers consider it usable with the current release and if not with
>> which?
>>
>> "Welcome to the world of Smalltalk!"
>> You don't like that reaction? Well this is the reaction I get, and
>> well, what should I reply then? "If you don't like it, then contribute?"
>> A beginner is shy and insecure,... they simply give up and download
>> information on SWIFT...
>>
>> I propose that the community collects information on what Pharo is used
>> for. What are it's strength and what kind of application is it the perfect
>> abse for.
>> This would help guys like me to advertise it with less surprise for the
>> interested
>>
>> I am sorry, I won't currently be able to contribute code to the Pharo
>> community since it is not part of my current 

Re: [Pharo-users] smalltalk workshops (building a webserver) after code-in

2015-01-29 Thread Martin Bähr
Excerpts from Sebastian Sastre's message of 2015-01-29 15:04:46 +0100:
> small feeback: the player didn’t work on Safari OS X 

https://discussions.apple.com/thread/3961142

> and in Chrome the streaming was too poor. 

seems chrome doesn't do much buffering ahead but favors frequent interruptions.
it also gets the playback speed wrong and plays back about 5-10% faster. (not
that that's a real issue in itself)
firefox is buffering a lot more.

the video has high resolution and bitrate. (300MB for 75 minutes) so a fast
connection is needed to stream. otherwise there is always right-click and 
save...

> YouTube or Vimeo usually removes all those issues for you

but they cause other problems, most notoriously they are hard to download from
which annoys me a lot. they are also blocked in china. i would have to upload
to multiple sites to make the video accessible to everyone, so i prefer to just
host my own. 

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] Pointer Detective - Inspecting an Object (instance) and Doing a "PointerDetective openOn: self." leads to a System Error in Pharo?

2015-01-29 Thread Ben Coman
Nice to have a user trying it out.  I'll look into the problem, but can I
have more info on reproducing it.
* WAComponent is Seaside right?  How did you load it, and into what version
of Pharo?


Nice eagle eye. That must have been there a long time without anyone
noticing.  Now I find three occurrences of that spelling in the image.
Fixed for https://pharo.fogbugz.com/default.asp?14825


On Thu, Jan 29, 2015 at 5:16 PM, Mircea S.  wrote:

> The object is a WhateverRoot instance (subclass of WAComponent) that has
> "canBeRoot ^true."
>
> Am I doing something wrong?
>
> *PS.* My "eagle eye" caught a typo on line 9 of the error. "'*Orginal *error:'
> ,title asString.". Maybe, just maybe...
> More info and an printscreen here:
>
>
> http://stackoverflow.com/questions/28210014/pointer-detective-inspecting-an-object-instance-and-doing-a-pointerdetectiv
>


Re: [Pharo-users] New book for Pharo :)

2015-01-29 Thread blake
You never fail to impress, Steph. Excellent work.

On Wed, Jan 28, 2015 at 9:21 AM, stepharo  wrote:

> Didier Besset offered his great book "Object-Oriented Implementation of
> Numerical Methods
> An Introduction with Smalltalk and Java" to the community.
>
> We would like to thank Didier Besset for his great book and for his gift
> of the source and implementation to the community.
>
>
> You can find
> • Archive of the original book, with code in both Java and Smalltalk
> https://github.com/SquareBracketAssociates/ArchiveOONumericalMethods
>
>  https://github.com/SquareBracketAssociates/ArchiveOONumericalMethods/
> blob/master/NumericalMethods/2015-Jan-WholeBookST-Java.pdf
>
>
> • An abridged version of Didier’s book, without the Java
> implementation and reference; our goal is to make the book slimmer and
> easier to read. The implementation presented in this book is part of the
> SciSmalltalk library.
>
> https://github.com/SquareBracketAssociates/NumericalMethods
>
>  https://github.com/SquareBracketAssociates/NumericalMethods/blob/master/
> 2015-Jan-WholeBook.pdf
>
>
> • SciSmalltalk library https://github.com/SergeStinckwich/SciSmalltalk
> .
>
>  Both book versions are maintained by St ́ephane Ducasse and Serge
> Stinckwich.
>
>  27 Janvier 2015
>
>
>


Re: [Pharo-users] New book for Pharo :)

2015-01-29 Thread Werner Kassens

Hi Ben,
i also prefer SCI, although i have another reason , it has less 
letters than MATH and the letters are positioned nearer to each other on 
my keyboard (good for my one-handed typing approach). SciTalk is a 
really nice idea i agree.

werner

On 01/29/2015 04:19 PM, Ben Coman wrote:

MATH seems to constraining. SCI seems good.  And I like that suggestion
for SciTalk.




Re: [Pharo-users] [ANN] PUnQLite NoSQL database project updated

2015-01-29 Thread PBKResearch
Hi Torsten

This looks very interesting. I am looking at a project which needs simple 
persistence, and I was considering MongoDB plus Voyage, which looked like 
overkill. I shall definitely be trying PUnQLite.

I am not yet on Pharo 4; I am using Moose 5.0, which is essentially Pharo 3. To 
load PUnQLite, I used the Gofer script on GitHub, the only problem being that 
the config did not load the PunQLite-Tools package; I got that separately by 
using the Monticello browser.

My main purpose here is to tell you about a problem I found when running the 
'comments.db' example below. The database was generated as expected, but when I 
used the Database Browser to examine the results, I found that trying to 
display the comment for some classes caused a PqFetchError. It affects only a 
small proportion of classes; going through the alphabetical list in the 
browser, the first three classes affected are AbstractDistributionMap, 
AbstractEcryptorDecryptor (sic) and AbstractTimeZone. One curiosity is that, 
once the debugger window has popped up for one entry and been closed down, the 
same window appears whichever other entry is selected next.

I have deleted and recreated the 'comments.db' file to see if that would clear 
the problem, but it persisted. This disclosed another curiosity. The 'choose a 
.db' window that pops up when opening the Database Browser has a button to 
delete a file, but it did not delete my database file when I tried it; I had to 
close down Pharo to free the file and then use Windows Explorer.

It seems that the problem is one which affects the Database Browser only; I 
tried a snippet in a workspace which opened the comments.db database and 
retrieved the entry for AbstractDistributionMap, and it worked correctly.

I hope this is enough detail for you to investigate; if not, come back to me.

Best wishes

Peter Kenny


-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Torsten Bergmann
Sent: 29 January 2015 08:20
To: Any question about pharo is welcome; Pharo Development List
Cc: u...@blueplane.jp
Subject: [Pharo-users] [ANN] PUnQLite NoSQL database project updated

Hi,

are you in need for really simple out of image persistency?

If you like to use a small RDBMS solution with Pharo then there is the 
embeddable SQLite shared library and NBSQLite3 project [1] to access it. 
Combine it with Glorp [2] and you do not have to fight too much with SQL.

On the other end of persistency world there are the so called "NoSQL databases" 
and beside Mongo and all the others that require special setup etc. there is 
this wonderful small UnQLite embeddable database [3] that similar to SQlite 
world only requires a simple library.

Thanks to Masashi Umezawa there is a nice wrapper for Pharo already to access 
this tiny embeddable NoSQL database called "PUnQLite" [4] and [5], also 
including access to the Jx9 machinery of UnQLite. It is really cool that he 
made this available.

This week I updated "PUnQLite" a little bit:
   - refactored the Native boost wrapper for UnQLite (using shared pools, ...)
   - documented classes
   - added a help topic
   - fixed a bug in cursors when accessing the keys in an empty database
   - and finally added a small spec based tool to work with a database file 
(see attached screenshot) 
 One can use it to open an unqlite database, show the key value pairs and 
remove or add entries.

If you are in latest Pharo 4 already you can load all of that right from the 
config browser. Be aware that you need the external unqlite shared library 
which is downloaded and extracted into a folder "pharo-vm" when loading the 
config.

For instance on Windows it automagically downloads a file 
"pharo-vm/unqlite.dll" below your image directory and you just have to copy 
this shared library file to the folder where your VM (Pharo.exe) resides. 
Havent tried on other OS platforms.

>From the Pharo side using the UnQLite database basically works like having 
>some kind "external dictionary" in a database file. Just run that in a 
>workspace:

|db|
db := PqDatabase open: 'comments.db'.
db disableAutoCommit.
db transact: [
Object subclasses do: [:cls | | key | 
key := cls asString.
db at: key put: cls comment ]
].
db close.

Then open the "Database Browser" from the world menu and open the "comments.db" 
file.
You can browse the keys and values, remove entries or add new. A filter for the 
keys is also included. Nothing fancy but hope you like it or find it usable.

Couldnt make it to PharoConf 2015 but I hope all participants enjoy their time 
there. 
Keep the others updated by using the #pharodays2015 on Twitter. Have fun!

Bye
T.


[1] 
http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104720.html
[2] 
http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-January/015809.html
[3] http://unqlite.org/
[4] https://github.com/mumez/PunQLite
[5] http://smalltalkhub.com/#!/~MasashiUmezawa/PunQLit

[Pharo-users] Code completion differences at browser and workspace

2015-01-29 Thread Laura Risani
Hi all,

I've noticed that the code completition tool shows a different list if
brought up at a workspace or at a system browser. Particulary workspace's
completition list is broader than browser's one.

For instance if while writting a method i have already accepted other
method names but haven't yet defined them in any class, these selectors are
shown in worskpace's completition but don't in browser's. So while at the
system browser i have to waste keystrokes bringing up the manually the
other completition tool and search in that list the selector i want.

So, question : how do i make the completition tool show at system browser
the same list that it would show at a workspace?

Best,
Laura


[Pharo-users] Autoformatting extisting packages

2015-01-29 Thread Laura Risani
Hi all,

How do i apply autoformatting to existing packages? I've read somewhere
that this functionality used to be at the refactoring menu, but i can't
find it, don't know if it has been renamed or moved.

Best,
Laura


Re: [Pharo-users] [Pharo-dev] [ANN] PUnQLite NoSQL database project updated

2015-01-29 Thread Tudor Girba
Hi Torsten,

This sounds very interesting.

I tried to play with it on Mac, but I got a bit stuck. Here is what I did:

- I downloaded the UnQLite sources from:
http://unqlite.org/db/unqlite-db-20130825-116.zip

- In that folder I did:
gcc -m32 -c unqlite.c
gcc -m32 -dynamiclib -o unqlite.dylib unqlite.o

- I then copied the unqlite.dylib file in the plugins folder:
Pharo.app/Contents/MacOS/Plugins

- I started a Pharo 4 image with the corresponding VM

- I loaded the stable version of PUnQLite from the ConfigurationBrowser

- I executed without errors the code you mentioned:
|db|
db := PqDatabase open: 'comments.db'.
db disableAutoCommit.
db transact: [
Object subclasses do: [:cls | | key |
key := cls asString.
db at: key put: cls comment ]
].
db close.

==> However I do not get a comments.db file/folder, and the Database
Browser does not show anything.

Am I doing something wrong?

Cheers,
Doru


On Thu, Jan 29, 2015 at 9:20 AM, Torsten Bergmann  wrote:

> Hi,
>
> are you in need for really simple out of image persistency?
>
> If you like to use a small RDBMS solution with Pharo then there is the
> embeddable SQLite
> shared library and NBSQLite3 project [1] to access it. Combine it with
> Glorp [2] and you do
> not have to fight too much with SQL.
>
> On the other end of persistency world there are the so called "NoSQL
> databases" and beside
> Mongo and all the others that require special setup etc. there is this
> wonderful small UnQLite
> embeddable database [3] that similar to SQlite world only requires a
> simple library.
>
> Thanks to Masashi Umezawa there is a nice wrapper for Pharo already to
> access this
> tiny embeddable NoSQL database called "PUnQLite" [4] and [5], also
> including access to
> the Jx9 machinery of UnQLite. It is really cool that he made this
> available.
>
> This week I updated "PUnQLite" a little bit:
>- refactored the Native boost wrapper for UnQLite (using shared pools,
> ...)
>- documented classes
>- added a help topic
>- fixed a bug in cursors when accessing the keys in an empty database
>- and finally added a small spec based tool to work with a database
> file (see attached screenshot)
>  One can use it to open an unqlite database, show the key value pairs
> and remove or add entries.
>
> If you are in latest Pharo 4 already you can load all of that right from
> the config browser. Be aware
> that you need the external unqlite shared library which is downloaded and
> extracted into a folder
> "pharo-vm" when loading the config.
>
> For instance on Windows it automagically downloads a file
> "pharo-vm/unqlite.dll" below your
> image directory and you just have to copy this shared library file to the
> folder where your
> VM (Pharo.exe) resides. Havent tried on other OS platforms.
>
> From the Pharo side using the UnQLite database basically works like having
> some kind
> "external dictionary" in a database file. Just run that in a workspace:
>
> |db|
> db := PqDatabase open: 'comments.db'.
> db disableAutoCommit.
> db transact: [
> Object subclasses do: [:cls | | key |
> key := cls asString.
> db at: key put: cls comment ]
> ].
> db close.
>
> Then open the "Database Browser" from the world menu and open the
> "comments.db" file.
> You can browse the keys and values, remove entries or add new. A filter
> for the keys
> is also included. Nothing fancy but hope you like it or find it usable.
>
> Couldnt make it to PharoConf 2015 but I hope all participants enjoy their
> time there.
> Keep the others updated by using the #pharodays2015 on Twitter. Have fun!
>
> Bye
> T.
>
>
> [1]
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104720.html
> [2]
> http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-January/015809.html
> [3] http://unqlite.org/
> [4] https://github.com/mumez/PunQLite
> [5] http://smalltalkhub.com/#!/~MasashiUmezawa/PunQLite




-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-users] HTTP Token Based authentication server?

2015-01-29 Thread Sven Van Caekenberghe

> On 28 Jan 2015, at 14:29, Esteban A. Maringolo  wrote:
> 
> Is it there any implementation for token based authentication over HTTP?
> 
> I know there is a OAuth client, but do we have an OAuth server?

There are some students here in Lille that were looking for a cool project, and 
this is one of the two subjects that I suggested to them.

> I'm migrating the authentication of our mobile apps from standard HTTP digest 
> (user/pass base64 encoded) to token based auth, and could find very useful to 
> have something already done to use or to build on top of.
> 
> Regards!
> 
> Esteban A. Maringolo




[Pharo-users] Implementing text navigation shortcuts

2015-01-29 Thread Laura Risani
Hi all,

I like to implement a keyboard shortcut for, while editing any text, move
the text pointer to the next position after $: .

Seems that the base of all text editing is the class #TextMorphForEditView.
I see there there is an instance variable for the text. My problem is i can
not find a method that tells/sets the current position in the text of the
text pointer.

I've tried going through the list of methods of #TextMorphForEditView and
its superclasses. Also through the one of senders of #arrowRight trying to
find the instantiation of #KMKeyCombination needed to implement the
existing shortcut "ctrl + right arrow" which jumps to the next position
after an space, but i found nothing.

Best,
Laura


Re: [Pharo-users] HTTP Token Based authentication server?

2015-01-29 Thread Esteban A. Maringolo
2015-01-29 18:57 GMT-03:00 Sven Van Caekenberghe :

>
> > On 28 Jan 2015, at 14:29, Esteban A. Maringolo 
> wrote:
> >
> > Is it there any implementation for token based authentication over HTTP?
> >
> > I know there is a OAuth client, but do we have an OAuth server?
>
> There are some students here in Lille that were looking for a cool
> project, and this is one of the two subjects that I suggested to them.
>
> > I'm migrating the authentication of our mobile apps from standard HTTP
> digest (user/pass base64 encoded) to token based auth, and could find very
> useful to have something already done to use or to build on top of.
>

I could use/test this!

By know I'm simply generating a token using to lookup a valid session.

Regards!


Esteban A. Maringolo


Re: [Pharo-users] Implementing text navigation shortcuts

2015-01-29 Thread Nicolai Hess
2015-01-29 23:06 GMT+01:00 Laura Risani :

> Hi all,
>
> I like to implement a keyboard shortcut for, while editing any text, move
> the text pointer to the next position after $: .
>
> Seems that the base of all text editing is the class
> #TextMorphForEditView. I see there there is an instance variable for the
> text. My problem is i can not find a method that tells/sets the current
> position in the text of the text pointer.
>
> I've tried going through the list of methods of #TextMorphForEditView and
> its superclasses. Also through the one of senders of #arrowRight trying to
> find the instantiation of #KMKeyCombination needed to implement the
> existing shortcut "ctrl + right arrow" which jumps to the next position
> after an space, but i found nothing.
>
> Best,
> Laura
>

Hello Laura,

not all editing functions are actually in the TextMorph
(TextMorphForEditView ...) classes or the Text class, instead they
delegated this to an editor
class (Editor/SimpleEditor/SmalltalkEditor...).
And - yes that is bad -  not all keyboard shortcuts go through
KMKeyCombination and KMKeymap.
The SmalltalkEditor class defines its own shortcut handler.
For exampe: cmd+shift+a -> #argAdvance:
This method searches for the next $: followed by a space and place the
caret after the space.

nicolai


Re: [Pharo-users] Code completion differences at browser and workspace

2015-01-29 Thread Nicolai Hess
2015-01-29 22:06 GMT+01:00 Laura Risani :

> Hi all,
>
> I've noticed that the code completition tool shows a different list if
> brought up at a workspace or at a system browser. Particulary workspace's
> completition list is broader than browser's one.
>
> For instance if while writting a method i have already accepted other
> method names but haven't yet defined them in any class, these selectors are
> shown in worskpace's completition but don't in browser's. So while at the
> system browser i have to waste keystrokes bringing up the manually the
> other completition tool and search in that list the selector i want.
>
> So, question : how do i make the completition tool show at system browser
> the same list that it would show at a workspace?
>
> Best,
> Laura
>


There is one difference between the Workspace and the SystemBrowser.
In the SystemBrowers, the one method that you are editing belongs to one
(known) class and if you
start typing
"self"
the code completion can guess which methods of that class (or superclasses)
can be called.
In the Workspace you don't have this (class-) context.

But the code completion is smart enough to guess the actual type in some
situations, for example
in a Workspace:

|m|
m:= new Morph.
m handleKey

at this point, the code completion context knows, that "m" is a Morph and
therefore only shows the methods
from the class Morph, starting with "handleKey".
This completion menu should be the same, as if  you start with
self handleKey
in the SystemBrowser, while editing a method of the class Morph.

nicolai


Re: [Pharo-users] Autoformatting extisting packages

2015-01-29 Thread Paul DeBruicker
If you want to reformat all the methods in a class/package/image, I don't
know how to be helpful.


If you never want to see unformatted code in a browse follow the
instructions I sent you in response to your question about tools.  Using the
"pretty print" and "format on accept"  settings will ensure that the code
you see is always formatted to your specifications in the Settings browser
using the RBConfigurableFormatter.


Hope this helps

Paul




laura wrote
> Hi all,
> 
> How do i apply autoformatting to existing packages? I've read somewhere
> that this functionality used to be at the refactoring menu, but i can't
> find it, don't know if it has been renamed or moved.
> 
> Best,
> Laura





--
View this message in context: 
http://forum.world.st/Autoformatting-extisting-packages-tp4802539p4802561.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Implementing text navigation shortcuts

2015-01-29 Thread Laura Risani
Hi Nicolai,

Thank for your answer, it was excellent!
It is nice to know that the editing functions are MVC way separated.

:)

On Thu, Jan 29, 2015 at 8:48 PM, Nicolai Hess  wrote:

>
> 2015-01-29 23:06 GMT+01:00 Laura Risani :
>
>> Hi all,
>>
>> I like to implement a keyboard shortcut for, while editing any text, move
>> the text pointer to the next position after $: .
>>
>> Seems that the base of all text editing is the class
>> #TextMorphForEditView. I see there there is an instance variable for the
>> text. My problem is i can not find a method that tells/sets the current
>> position in the text of the text pointer.
>>
>> I've tried going through the list of methods of #TextMorphForEditView and
>> its superclasses. Also through the one of senders of #arrowRight trying to
>> find the instantiation of #KMKeyCombination needed to implement the
>> existing shortcut "ctrl + right arrow" which jumps to the next position
>> after an space, but i found nothing.
>>
>> Best,
>> Laura
>>
>
> Hello Laura,
>
> not all editing functions are actually in the TextMorph
> (TextMorphForEditView ...) classes or the Text class, instead they
> delegated this to an editor
> class (Editor/SimpleEditor/SmalltalkEditor...).
> And - yes that is bad -  not all keyboard shortcuts go through
> KMKeyCombination and KMKeymap.
> The SmalltalkEditor class defines its own shortcut handler.
> For exampe: cmd+shift+a -> #argAdvance:
> This method searches for the next $: followed by a space and place the
> caret after the space.
>
> nicolai
>
>


[Pharo-users] students looking for projects?

2015-01-29 Thread Martin Bähr
Excerpts from Sven Van Caekenberghe's message of 2015-01-29 22:57:57 +0100:
> There are some students here in Lille that were looking for a cool project,
> and this is one of the two subjects that I suggested to them.

you have students looking for projects?
there are a bunch of smalltalk related projects on labs.fossasia.org that i am 
mentoring.
not sure if they count as cool though...

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] Why single inheritance?

2015-01-29 Thread Laura Risani
Thank you all for your insights, they were very educational to me.

On Thu, Jan 29, 2015 at 5:49 AM, Ben Coman  wrote:

> http://www.visoracle.com/squeak/faq/traits-vs.html
>
> On Wed, Jan 28, 2015 at 11:41 PM, Laura Risani 
> wrote:
>
>> Hi all,
>>
>> What is the explanation why Smalltalk designers preferred single
>> inheritance+traits to multiple inheritance? Why is the former better than
>> the latter?
>> Do traits let you share state also or only behavior?
>>
>> Best,
>> Laura
>>
>
>


Re: [Pharo-users] students looking for projects?

2015-01-29 Thread Sebastian Heidbrink

Hi Martin,

this is an interesting site.

I saw your lab: "implement a REST API server in Smalltalk"

You may want to have a look at: swagger 
https://github.com/swagger-api/swagger-spec

and the additional parts around it.

Swagger specs are easy to integrate into many clients via swagger 
codegen and swagger.js.


I think it would be a great project to have  support in Zinc, or Moose 
for that.


Maybe this is something students would like to work on.
Sebastian

On 2015-01-29 5:50 PM, Martin Bähr wrote:

Excerpts from Sven Van Caekenberghe's message of 2015-01-29 22:57:57 +0100:

There are some students here in Lille that were looking for a cool project,
and this is one of the two subjects that I suggested to them.

you have students looking for projects?
there are a bunch of smalltalk related projects on labs.fossasia.org that i am 
mentoring.
not sure if they count as cool though...

greetings, martin.






Re: [Pharo-users] Autoformatting extisting packages

2015-01-29 Thread Ben Coman
For lack of a better answer, would an equivalent be to be able to
programmatically perform the  menu item that is on the editor menu?

Here is how I learnt a lot about Pharo...
1. Open the editor menu and bring up halos on the  menu item.  (key
modifier combination varies between OS platform)
2. Click the spanner "debug" icon and choose 
3. Look through all the instance vars for the message that seems to invoke
the formatting.  Browse all implementors of that message adding "self halt"
at the top.
4.  Execute the command and trace through how its done behind the scenes,
and adapt to your requirements.

HTH, cheers -ben

On Fri, Jan 30, 2015 at 5:08 AM, Laura Risani 
wrote:

> Hi all,
>
> How do i apply autoformatting to existing packages? I've read somewhere
> that this functionality used to be at the refactoring menu, but i can't
> find it, don't know if it has been renamed or moved.
>
> Best,
> Laura
>


[Pharo-users] how to install all of ZincHTTPComponents?

2015-01-29 Thread Martin Bähr
hi,

in pharo3 when trying to install ZincHTTPComponents only a few additional
classes seem to  get installed, not the whole set packages defined in the
configuration.

in pharo4 (40467) it's even worse. ZincHTTPComponents is already in the image,
and installing it does nothing, removing and reinstalling it likewise.

how do i force a reload/installation of all the packages listed in the
ZincHTTPComponents configuration?

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] students looking for projects?

2015-01-29 Thread François Stephany
This microframework is quite handy for REST API (and the README of the repo
is *really* useful)

http://smalltalkhub.com/#!/~zeroflag/Teapot

On Fri, Jan 30, 2015 at 3:35 AM, Sebastian Heidbrink 
wrote:

> Hi Martin,
>
> this is an interesting site.
>
> I saw your lab: "implement a REST API server in Smalltalk"
>
> You may want to have a look at: swagger https://github.com/swagger-
> api/swagger-spec
> and the additional parts around it.
>
> Swagger specs are easy to integrate into many clients via swagger codegen
> and swagger.js.
>
> I think it would be a great project to have  support in Zinc, or Moose for
> that.
>
> Maybe this is something students would like to work on.
> Sebastian
>
>
> On 2015-01-29 5:50 PM, Martin Bähr wrote:
>
>> Excerpts from Sven Van Caekenberghe's message of 2015-01-29 22:57:57
>> +0100:
>>
>>> There are some students here in Lille that were looking for a cool
>>> project,
>>> and this is one of the two subjects that I suggested to them.
>>>
>> you have students looking for projects?
>> there are a bunch of smalltalk related projects on labs.fossasia.org
>> that i am mentoring.
>> not sure if they count as cool though...
>>
>> greetings, martin.
>>
>>
>
>


Re: [Pharo-users] how to install all of ZincHTTPComponents?

2015-01-29 Thread Sven Van Caekenberghe
Hi Martin,

What exactly did you do ?

Zinc has been in Pharo since 1.3. Loading it from its configuration load a 
newer version. That has always worked for me and other.

Can you give some details ?

Sven

> On 30 Jan 2015, at 06:40, Martin Bähr  
> wrote:
> 
> hi,
> 
> in pharo3 when trying to install ZincHTTPComponents only a few additional
> classes seem to  get installed, not the whole set packages defined in the
> configuration.
> 
> in pharo4 (40467) it's even worse. ZincHTTPComponents is already in the image,
> and installing it does nothing, removing and reinstalling it likewise.
> 
> how do i force a reload/installation of all the packages listed in the
> ZincHTTPComponents configuration?
> 
> greetings, martin.
> 
> -- 
> eKita   -   the online platform for your entire academic life
> -- 
> chief engineer   eKita.co
> pike programmer  pike.lysator.liu.secaudium.net societyserver.org
> secretary  beijinglug.org
> mentor   fossasia.org
> foresight developer  foresightlinux.orgrealss.com
> unix sysadmin
> Martin Bähr  working in chinahttp://societyserver.org/mbaehr/
> 




Re: [Pharo-users] students looking for projects?

2015-01-29 Thread Sven Van Caekenberghe
So many options, there is Zinc-REST as well...

> On 30 Jan 2015, at 07:29, François Stephany  wrote:
> 
> This microframework is quite handy for REST API (and the README of the repo 
> is *really* useful)
> 
> http://smalltalkhub.com/#!/~zeroflag/Teapot
> 
> On Fri, Jan 30, 2015 at 3:35 AM, Sebastian Heidbrink  wrote:
> Hi Martin,
> 
> this is an interesting site.
> 
> I saw your lab: "implement a REST API server in Smalltalk"
> 
> You may want to have a look at: swagger 
> https://github.com/swagger-api/swagger-spec
> and the additional parts around it.
> 
> Swagger specs are easy to integrate into many clients via swagger codegen and 
> swagger.js.
> 
> I think it would be a great project to have  support in Zinc, or Moose for 
> that.
> 
> Maybe this is something students would like to work on.
> Sebastian
> 
> 
> On 2015-01-29 5:50 PM, Martin Bähr wrote:
> Excerpts from Sven Van Caekenberghe's message of 2015-01-29 22:57:57 +0100:
> There are some students here in Lille that were looking for a cool project,
> and this is one of the two subjects that I suggested to them.
> you have students looking for projects?
> there are a bunch of smalltalk related projects on labs.fossasia.org that i 
> am mentoring.
> not sure if they count as cool though...
> 
> greetings, martin.
> 
> 
> 
> 




Re: [Pharo-users] how to debug zinc server errors from tests

2015-01-29 Thread Sven Van Caekenberghe
Martin,

> On 29 Jan 2015, at 06:23, Martin Bähr  
> wrote:
> 
> hi,
> 
> when debugging a zinc server with tests structured as in
> http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/
> i am wondering how to best debug errors in the server while running tests.
> 
> one test makes a ZnClient connection to a testserver started from the same 
> test.
> the test fails with the server returning a 500 error.
> 
> next i get an opportunity to debug the test, but what i really want is to to
> debug the server itself.
> 
> one way is to run the client request manually from the browser, while the real
> server is in debug mode. that works most of the time, but sometimes it doesn't
> because there is a difference between the test-server and the real server.
> 
> i found that i can set the test server into debug mode too, but that is not
> very satisfying because it causes the test to hang and lock until a timeout is
> reached and only then the debugger pops up. i'd like the debugger pop up
> immediately, let me debug and fix the error, and then have the tests proceed.
> 
> is there a way to do that?

Writing a unit test using both an HTTP client and server is already a bit 
tricky sometimes, having it fail is always ugly. This is more a threading issue 
than anything else.

I usually will do as you describe: rerun manually with a server where debug is 
enabled.

It could be an idea to try to improve the situation, but it won't be easy. To 
enable a debug/continue style the client request should first not time out 
(which is not a good idea for unattended tests), then something should be done 
about the UI thread.

Sven

> greetings, eMBee.
> 
> -- 
> eKita   -   the online platform for your entire academic life
> -- 
> chief engineer   eKita.co
> pike programmer  pike.lysator.liu.secaudium.net societyserver.org
> secretary  beijinglug.org
> mentor   fossasia.org
> foresight developer  foresightlinux.orgrealss.com
> unix sysadmin
> Martin Bähr  working in chinahttp://societyserver.org/mbaehr/
> 




Re: [Pharo-users] students looking for projects?

2015-01-29 Thread p...@highoctane.be
Swagger: +100
Le 30 janv. 2015 03:35, "Sebastian Heidbrink"  a écrit :

> Hi Martin,
>
> this is an interesting site.
>
> I saw your lab: "implement a REST API server in Smalltalk"
>
> You may want to have a look at: swagger https://github.com/swagger-
> api/swagger-spec
> and the additional parts around it.
>
> Swagger specs are easy to integrate into many clients via swagger codegen
> and swagger.js.
>
> I think it would be a great project to have  support in Zinc, or Moose for
> that.
>
> Maybe this is something students would like to work on.
> Sebastian
>
> On 2015-01-29 5:50 PM, Martin Bähr wrote:
>
>> Excerpts from Sven Van Caekenberghe's message of 2015-01-29 22:57:57
>> +0100:
>>
>>> There are some students here in Lille that were looking for a cool
>>> project,
>>> and this is one of the two subjects that I suggested to them.
>>>
>> you have students looking for projects?
>> there are a bunch of smalltalk related projects on labs.fossasia.org
>> that i am mentoring.
>> not sure if they count as cool though...
>>
>> greetings, martin.
>>
>>
>
>
>