Re: [Pharo-users] Smalltalk Argument

2017-10-25 Thread henry
It’s well said, I don’t give a f*** about other languages. NSA-proof, 
anonymized 2048-bit key rendezvoused connection framework in 33 classes. 
Includes user definable cipher and encoder. SmalltalkHub talkin ParrotTalk.

http://www.squeaksource.com/Cryptography/ParrotTalk-HenryHouse.3.mcz

- HH

On Wed, Oct 25, 2017 at 18:46, Andrew Glynn 
<[aglyn...@gmail.com]("mailto:aglyn...@gmail.com;)> wrote:

> There’s other questions that are relevant to me:
>
> Do I give a f*** about cool looking web apps?  No, I don’t use web apps if in 
> any way I can avoid it.
>
> Do I give a f*** about mobile apps?  No, the screen’s too small to read 
> anything longer than a twit, or anyone with anything worthwhile to say.
>
> Do I give a f*** about the number of libraries in other languages?  No, 
> because most of them are crap in every language I’ve had to work in, and the 
> base languages are crap so they have to keep changing radically, and 
> libraries and frameworks therefore also have to and never get any better. The 
> few that are worthwhile I can almost always use from Smalltalk without a 
> problem (read, Blender, ACT-R and Synapse, since every other 
> library/framework I’ve used outside Smalltalk has been a waste of time).
>
> Do I give a f*** about implementing a complex piece of machine learning 
> software in 22 hours, compared to 3 months for the Java version?  Well, 
> actually yes, I do, because that was 3 months of my life down the toilet for 
> something that is too slow to be useful in Java.
>
> Any argument depends on your priorities. I’ve written tons of web apps, 
> because I needed to get paid.  I’ve written better shitty mobile apps than 
> the average shitty mobile apps.  However, I’m not going to do any of that any 
> longer in crap that never improves, because after 26 years the irritability 
> it produces is more than it’s worth.
>
> A few weeks ago, a recruiter that specializes in Smalltalk called me about a 
> job, although they were well aware I live 1500 miles away from the city I 
> lived in when I had worked through them, to see if I’d be willing to move 
> back there for a job.  That sounds like another ‘there aren’t enough 
> Smalltalk developers", but it wasn’t, because the job wasn’t writing 
> Smalltalk.  It was writing Java.
>
> The person hiring, though, wouldn’t look at anyone who didn’t write 
> Smalltalk, because "people who grew up with Java don’t know how to write 
> code".  I don’t agree with that, I’ve known a (very few) good Java 
> developers.  I would say, though, that I’ve known far more incompetent ones 
> than good ones, and I can’t think of any incompetent Smalltalk developers off 
> the top of my head.
>
> Nor have I ever heard a developer in Smalltalk, or Haskell, or LISP, or even 
> C, complain about how hard maintaining state is or coming up with various 
> hacks to avoid it, which seems to be the main point of every JavaScript based 
> ‘technology’.  An application is by definition a state-machine, which implies 
> plenty about JS developers on the whole.
>
> If you’re a good developer you can write good code in (nearly) anything.  My 
> question then is why would you want to write in crap?  The better question is 
> why aren’t there more good developers in any language?
>
> Every project I have been able to do in Smalltalk, though, has had one thing 
> in common, the "shit has to work".  Companies do use it, in fact I could name 
> 4 large enterprises I’ve worked for who’ve written their own dialects, and 
> they all use it only when "shit has to work".  They know it’s more 
> productive, they also know using it for more things would increase the 
> availability of Smalltalk developers.
>
> Why do they not do it?  One reason, though it takes a while to recognize it, 
> because management doesn’t admit even to themselves why they do it, or not 
> very often.  Being inefficient, as long as it doesn’t ‘really’ matter, is an 
> advantage to large enterprises because they have resources smaller 
> competitors don’t.
>
> Why don’t their competitors do it?  Because they can’t see past an hourly 
> rate, what’s fashionable, or just new, or because their customers can’t.  Put 
> more generally, average stupidity that isn’t corrected by the market.  
> Fashion affects smaller companies more than larger ones, because they can’t 
> afford a few customers walking away because they wanted an app in Electron, 
> even if they can’t give any relevant reason for wanting it, and even the 
> samples on the Electron site don’t work.
>
> Enterprises can, and do use Smalltalk when it matters.  When it doesn’t, it’s 
> to their advantage to promote things that are inefficient, buggy and 
> unreliable.
>
> Cost is relevant, but not in the simple way people look at things.  A crucial 
> but rarely mentioned perspective on its relevance is that while Java based 
> software runs TV set top boxes, Smalltalk based software runs things like 
> medical equipment, automated defense systems, 

Re: [Pharo-users] Smalltalk Argument

2017-10-25 Thread Andrew Glynn
There’s other questions that are relevant to me:

 

Do I give a f*** about cool looking web apps?  No, I don’t use web apps if in 
any way I can avoid it.

 

Do I give a f*** about mobile apps?  No, the screen’s too small to read 
anything longer than a twit, or anyone with anything worthwhile to say.

 

Do I give a f*** about the number of libraries in other languages?  No, because 
most of them are crap in every language I’ve had to work in, and the base 
languages are crap so they have to keep changing radically, and libraries and 
frameworks therefore also have to and never get any better. The few that are 
worthwhile I can almost always use from Smalltalk without a problem (read, 
Blender, ACT-R and Synapse, since every other library/framework I’ve used 
outside Smalltalk has been a waste of time).  

 

Do I give a f*** about implementing a complex piece of machine learning 
software in 22 hours, compared to 3 months for the Java version?  Well, 
actually yes, I do, because that was 3 months of my life down the toilet for 
something that is too slow to be useful in Java.

 

Any argument depends on your priorities. I’ve written tons of web apps, because 
I needed to get paid.  I’ve written better shitty mobile apps than the average 
shitty mobile apps.  However, I’m not going to do any of that any longer in 
crap that never improves, because after 26 years the irritability it produces 
is more than it’s worth.  

 

A few weeks ago, a recruiter that specializes in Smalltalk called me about a 
job, although they were well aware I live 1500 miles away from the city I lived 
in when I had worked through them, to see if I’d be willing to move back there 
for a job.  That sounds like another ‘there aren’t enough Smalltalk 
developers”, but it wasn’t, because the job wasn’t writing Smalltalk.  It was 
writing Java.

 

The person hiring, though, wouldn’t look at anyone who didn’t write Smalltalk, 
because “people who grew up with Java don’t know how to write code”.  I don’t 
agree with that, I’ve known a (very few) good Java developers.  I would say, 
though, that I’ve known far more incompetent ones than good ones, and I can’t 
think of any incompetent Smalltalk developers off the top of my head.  

 

Nor have I ever heard a developer in Smalltalk, or Haskell, or LISP, or even C, 
complain about how hard maintaining state is or coming up with various hacks to 
avoid it, which seems to be the main point of every JavaScript based 
‘technology’.  An application is by definition a state-machine, which implies 
plenty about JS developers on the whole.

 

If you’re a good developer you can write good code in (nearly) anything.  My 
question then is why would you want to write in crap?  The better question is 
why aren’t there more good developers in any language?

 

Every project I have been able to do in Smalltalk, though, has had one thing in 
common, the “shit has to work”.  Companies do use it, in fact I could name 4 
large enterprises I’ve worked for who’ve written their own dialects, and they 
all use it only when “shit has to work”.  They know it’s more productive, they 
also know using it for more things would increase the availability of Smalltalk 
developers.  

 

Why do they not do it?  One reason, though it takes a while to recognize it, 
because management doesn’t admit even to themselves why they do it, or not very 
often.  Being inefficient, as long as it doesn’t ‘really’ matter, is an 
advantage to large enterprises because they have resources smaller competitors 
don’t.  

 

Why don’t their competitors do it?  Because they can’t see past an hourly rate, 
what’s fashionable, or just new, or because their customers can’t.  Put more 
generally, average stupidity that isn’t corrected by the market.  Fashion 
affects smaller companies more than larger ones, because they can’t afford a 
few customers walking away because they wanted an app in Electron, even if they 
can’t give any relevant reason for wanting it, and even the samples on the 
Electron site don’t work.  

 

Enterprises can, and do use Smalltalk when it matters.  When it doesn’t, it’s 
to their advantage to promote things that are inefficient, buggy and unreliable.

 

Cost is relevant, but not in the simple way people look at things.  A crucial 
but rarely mentioned perspective on its relevance is that while Java based 
software runs TV set top boxes, Smalltalk based software runs things like 
medical equipment, automated defense systems, tanks, etc.  Cost becomes largely 
irrelevant when ‘shit has to work’.  

 

Productivity is primarily relevant to less talented developers, in an inversely 
sense, since unproductive environments and attitudes have a leveling tendency 
in general, and more specifically make accomplishing what the less talented are 
capable of in any environment sufficiently laborious for them to have a role.  
Capability in Smalltalk, as implied by the person hiring for the Java role I 
mentioned, is a 

[Pharo-users] Annual online conference?

2017-10-25 Thread PAUL DEBRUICKER
Laravel.com is a PHP web framework.  


Their community organizes an online conference: https://laracon.net/2017


Seems like it could be worthy of mimicking in the Smalltalk community.



Re: [Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-10-25 Thread Tim Mackinnon
Phil presented an Xmpp integration at Pharo days - I understood that was a 
common comms mechanism too.

Tim

Sent from my iPhone

> On 25 Oct 2017, at 20:39, Stephane Ducasse  wrote:
> 
> Hi andrew
> 
> I think that Avi did a package about BDD (but I thought it was special
> binary trees) so this is probably the same.
> Did you check on Squeaksource?
> http://www.squeaksource.com/BTree.html
> If this is what you are looking for I can help porting it to Pharo.
> 
> Stef
> 
> 
>> On Wed, Oct 25, 2017 at 9:02 PM, Prof. Andrew P. Black  
>> wrote:
>> Does anyone know of a BDD — that’s Binary Decision Diagram — package written 
>> in Smalltalk?
>> 
>>Andrew
>> 
>> 
> 




Re: [Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-10-25 Thread Stephane Ducasse
Hi andrew

I think that Avi did a package about BDD (but I thought it was special
binary trees) so this is probably the same.
Did you check on Squeaksource?
http://www.squeaksource.com/BTree.html
If this is what you are looking for I can help porting it to Pharo.

Stef


On Wed, Oct 25, 2017 at 9:02 PM, Prof. Andrew P. Black  wrote:
> Does anyone know of a BDD — that’s Binary Decision Diagram — package written 
> in Smalltalk?
>
> Andrew
>
>



[Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-10-25 Thread Prof. Andrew P. Black
Does anyone know of a BDD — that’s Binary Decision Diagram — package written in 
Smalltalk?

Andrew




Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Marten Feldtmann
Am 25.10.2017 um 15:52 schrieb Cédrick Béler:
> Ok.
> 
> I wonder also if Basys is not enough to experiment.
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/182/artifact/book-result/BasysNetwork/
> 
> I’ll also try Sebastian suggestion.
> 

ZeroMQ is a wonderful library.

We used it together with Gemstone/s to build an "Event data bus" based
on ZeroMQ ... and with each successful commit our Gemstone/S send events
on this "bus".

On the "bus" several different programs written in different languages
are listening and do some reaction based on the events they were
interested in.

Marten Feldtmann



Re: [Pharo-users] Glorp: #includesKey:

2017-10-25 Thread Herby Vojčík

Niall Ross wrote:

Dear Herby,
adding #includesKey: is certainly doable. If you look at callers above
and subcallers below #anySatisfyDefault: you will see the issues
involved. Your includesKey: needs the same degree of platform-awareness
that Glorp's #anySatisfy: and #allSatisfy: implementations use. But
since #anySatisfy: is there, you have a ready template to follow.


I don't feel competent enough, from what I looked, Glorp innards are a 
bit complex.



Alternatively, I may well add #includesKey: - though not as my most
urgent task. :-) I did a fair amount of work to extend the usability of
DictionaryMappings in Glorp three years ago (part of demonstrating the
ObjectStudio business-mapping/Glorp-generating tools - see my ESUG 2014
presentation for details) but I did not then think of providing
#includesKey:. Thanks for suggesting the idea.


My pleasure. :-)

As I wrote elsewhere, also #keys is something (probably the most 
general) one that could be added as a matter of allowing to work with 
the key field - as far as I was able to find out, there is no way to 
actually get to the key, for which I found workaround since I mapped 
object, but would be out of luck if I mapped single primitive value.


For the moment, it is not pressing, but yes, it would be nice to be able 
to have #keys mapping to key field and #includesKey: as an idiomatic way 
to do keys includes:.


Thanks again, Herby


If you were to work on this, be aware:

- always reinitialise FunctionExpression class after adding/changing any
Glorp function (or just close and reopen your image, of course)

- If (and only if) you construct Query whereClauses in stages (e.g. you
have code like

myQuery AND: [:customer | customer orders includesKey: #onlineOrders]

or similar) then, using its callers in GlorpTest as a guide, know when
you might need to send #setUpBaseFromSession: to your query while doing
so. (N.B. that method is a Glorp version 8.2.1 addition; you will not
have it in older Glorp.) The point is that stage-constructed where
clauses must convert from block to expression before execution, to
combine the stages. Any that use #anySatisfy:/#allSatisfy: need
platform-specific information to do this; I would expect any
#includesKey: implementation to be the same.

HTH
Niall Ross


Tom Robinson wrote:

Hi Herby,

In my opinion, the way you found to make it work is the way it should
be. The reason is that the first way doesn't translate into SQL and the
second one does. It might be possible to add includesKey: functionality
but resolving that to SQL would be more complex. I would not call this a
bug. I would call it a limitation of the implementation. I don't know of
anyone planning to add this feature to Glorp right now.

Regards,

Tom

On 10/24/2017 12:27 PM, Herby Vojčík wrote:


Hello!

I am using a DictionaryMapping in my code, and I wanted to use
#includesKey: in #where: clause (something akin

each tools includesKey: aToolId

) to select only rows for which DictionaryMapping uses certain key. It
failed with the error in the lines of "#tools does not resolve to
field". I had to come up with

each tools anySatisfy: [ :tool | tool id = aToolId ]

Is it the bug / feature / problem in my approach? If bug, is it
planned to add #includesKey: translation to DictionaryMapping?

Thanks, Herby







Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Cédrick Béler
Ok.

I wonder also if Basys is not enough to experiment.
https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/182/artifact/book-result/BasysNetwork/
 


I’ll also try Sebastian suggestion.


Cheers,

Cédrick

> Le 25 oct. 2017 à 15:47, Denis Kudriashov  a écrit :
> 
> Yes, it is not part of Seamless. 
> 
> 2017-10-25 15:40 GMT+02:00 Cédrick Béler  >:
> I had a look and this is not (natively) possible.
> 
> The idea of the off-line mode would be to delay messages that are sent to the 
> peer until a connection is established. 
> 
> I think I have to try to do it by myself (like having a list of information 
> exchange that wait until a connexion is established).
> 
> What I try to do is not as complex as two general image exchanging messages 
> on objects (like on TelePharo). 
> 
> I just want a repository of information (mainly a collection of static 
> information/data versions) on both peers to be synchronized when a connection 
> is established.
> 
> 
> 
> 
> 
>> Le 25 oct. 2017 à 15:31, Denis Kudriashov > > a écrit :
>> 
>> What is offline mode?
>> 
>> 2017-10-25 15:10 GMT+02:00 Cédrick Béler > >:
>> Thanks Denis. I will !  I knew I have seen a telephoto component that could 
>> help but forgot about it !
>> 
>> Do you know if it’s possible to handle offline mode ?
>> 
>> 
>> 
>>> Le 25 oct. 2017 à 15:05, Denis Kudriashov >> > a écrit :
>>> 
>>> Look at Seamless https://github.com/dionisiydk/Seamless 
>>> . 
>>> 
>>> 2017-10-25 14:21 GMT+02:00 Cédrick Béler >> >:
>>> Hi all, 
>>> 
>>> I want to connect two applications (1 by image, each one on a different 
>>> computer) so as as to exchange information (data) between them.
>>> 
>>> So my question is about the best (smalltalk) practices to connect two 
>>> app/image and exchange data.
>>> 
>>> I imagine either with a direct connection through a network (TCP Socket, 
>>> Web socket, pure HTTP with Zinc) and/or with a serial connection.
>>> At first, without any « security ». But later, information exchanges will 
>>> be encrypted. 
>>> 
>>> I’ve seen some information on how to use SerialPort, or even FileStream.
>>> I could do it (or at least simulate it with HTTP). What are the other 
>>> options ? Socket ? 
>>> Do we have P2P libs (I couldn’t find) with eventually discovery features ?
>>> 
>>> Any comment / suggestion / pointers are greatly welcome.
>>> 
>>> TIA.
>>> 
>>> Cédrick
>>> 
>> 
>> 
> 
> 



Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Denis Kudriashov
Yes, it is not part of Seamless.

2017-10-25 15:40 GMT+02:00 Cédrick Béler :

> I had a look and this is not (natively) possible.
>
> The idea of the off-line mode would be to delay messages that are sent to
> the peer until a connection is established.
>
> I think I have to try to do it by myself (like having a list of
> information exchange that wait until a connexion is established).
>
> What I try to do is not as complex as two general image exchanging
> messages on objects (like on TelePharo).
>
> I just want a repository of information (mainly a collection of static
> information/data versions) on both peers to be synchronized when a
> connection is established.
>
>
>
>
>
> Le 25 oct. 2017 à 15:31, Denis Kudriashov  a écrit :
>
> What is offline mode?
>
> 2017-10-25 15:10 GMT+02:00 Cédrick Béler :
>
>> Thanks Denis. I will !  I knew I have seen a telephoto component that
>> could help but forgot about it !
>>
>> Do you know if it’s possible to handle offline mode ?
>>
>>
>>
>> Le 25 oct. 2017 à 15:05, Denis Kudriashov  a écrit
>> :
>>
>> Look at Seamless https://github.com/dionisiydk/Seamless.
>>
>> 2017-10-25 14:21 GMT+02:00 Cédrick Béler :
>>
>>> Hi all,
>>>
>>> I want to connect two applications (1 by image, each one on a different
>>> computer) so as as to exchange information (data) between them.
>>>
>>> So my question is about the best (smalltalk) practices to connect two
>>> app/image and exchange data.
>>>
>>> I imagine either with a direct connection through a network (TCP Socket,
>>> Web socket, pure HTTP with Zinc) and/or with a serial connection.
>>> At first, without any « security ». But later, information exchanges
>>> will be encrypted.
>>>
>>> I’ve seen some information on how to use SerialPort, or even FileStream.
>>> I could do it (or at least simulate it with HTTP). What are the other
>>> options ? Socket ?
>>> Do we have P2P libs (I couldn’t find) with eventually discovery features
>>> ?
>>>
>>> Any comment / suggestion / pointers are greatly welcome.
>>>
>>> TIA.
>>>
>>> Cédrick
>>>
>>
>>
>>
>
>


Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Sebastian Heidbrink via Pharo-users
--- Begin Message ---

Hi Cederik,

you should have a look at http://smalltalkhub.com/#!/~panuw/zeromq
ZeroMQ is a networking library. Nice thing about it is that all the 
networking related workload is dealt with in a second process. That can 
save you some resources within Smalltalk.


There is a lot of documentation around and it should be easy for you to 
dive into this. http://zguide.zeromq.org/page:all


Cheers!
Sebastian



On 2017-10-25 05:21 AM, Cédrick Béler wrote:

Hi all,

I want to connect two applications (1 by image, each one on a 
different computer) so as as to exchange information (data) between them.


So my question is about the best (smalltalk) practices to connect two 
app/image and exchange data.


I imagine either with a direct connection through a network (TCP 
Socket, Web socket, pure HTTP with Zinc) and/or with a serial connection.
At first, without any « security ». But later, information exchanges 
will be encrypted.


I’ve seen some information on how to use SerialPort, or even FileStream.
I could do it (or at least simulate it with HTTP). What are the other 
options ? Socket ?

Do we have P2P libs (I couldn’t find) with eventually discovery features ?

Any comment / suggestion / pointers are greatly welcome.

TIA.

Cédrick



--- End Message ---


Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Cédrick Béler
I had a look and this is not (natively) possible.

The idea of the off-line mode would be to delay messages that are sent to the 
peer until a connection is established. 

I think I have to try to do it by myself (like having a list of information 
exchange that wait until a connexion is established).

What I try to do is not as complex as two general image exchanging messages on 
objects (like on TelePharo). 

I just want a repository of information (mainly a collection of static 
information/data versions) on both peers to be synchronized when a connection 
is established.




> Le 25 oct. 2017 à 15:31, Denis Kudriashov  a écrit :
> 
> What is offline mode?
> 
> 2017-10-25 15:10 GMT+02:00 Cédrick Béler  >:
> Thanks Denis. I will !  I knew I have seen a telephoto component that could 
> help but forgot about it !
> 
> Do you know if it’s possible to handle offline mode ?
> 
> 
> 
>> Le 25 oct. 2017 à 15:05, Denis Kudriashov > > a écrit :
>> 
>> Look at Seamless https://github.com/dionisiydk/Seamless 
>> . 
>> 
>> 2017-10-25 14:21 GMT+02:00 Cédrick Béler > >:
>> Hi all, 
>> 
>> I want to connect two applications (1 by image, each one on a different 
>> computer) so as as to exchange information (data) between them.
>> 
>> So my question is about the best (smalltalk) practices to connect two 
>> app/image and exchange data.
>> 
>> I imagine either with a direct connection through a network (TCP Socket, Web 
>> socket, pure HTTP with Zinc) and/or with a serial connection.
>> At first, without any « security ». But later, information exchanges will be 
>> encrypted. 
>> 
>> I’ve seen some information on how to use SerialPort, or even FileStream.
>> I could do it (or at least simulate it with HTTP). What are the other 
>> options ? Socket ? 
>> Do we have P2P libs (I couldn’t find) with eventually discovery features ?
>> 
>> Any comment / suggestion / pointers are greatly welcome.
>> 
>> TIA.
>> 
>> Cédrick
>> 
> 
> 



Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Cédrick Béler
Thanks Denis. I will !  I knew I have seen a telephoto component that could 
help but forgot about it !

Do you know if it’s possible to handle offline mode ?



> Le 25 oct. 2017 à 15:05, Denis Kudriashov  a écrit :
> 
> Look at Seamless https://github.com/dionisiydk/Seamless 
> . 
> 
> 2017-10-25 14:21 GMT+02:00 Cédrick Béler  >:
> Hi all, 
> 
> I want to connect two applications (1 by image, each one on a different 
> computer) so as as to exchange information (data) between them.
> 
> So my question is about the best (smalltalk) practices to connect two 
> app/image and exchange data.
> 
> I imagine either with a direct connection through a network (TCP Socket, Web 
> socket, pure HTTP with Zinc) and/or with a serial connection.
> At first, without any « security ». But later, information exchanges will be 
> encrypted. 
> 
> I’ve seen some information on how to use SerialPort, or even FileStream.
> I could do it (or at least simulate it with HTTP). What are the other options 
> ? Socket ? 
> Do we have P2P libs (I couldn’t find) with eventually discovery features ?
> 
> Any comment / suggestion / pointers are greatly welcome.
> 
> TIA.
> 
> Cédrick
> 



Re: [Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Denis Kudriashov
Look at Seamless https://github.com/dionisiydk/Seamless.

2017-10-25 14:21 GMT+02:00 Cédrick Béler :

> Hi all,
>
> I want to connect two applications (1 by image, each one on a different
> computer) so as as to exchange information (data) between them.
>
> So my question is about the best (smalltalk) practices to connect two
> app/image and exchange data.
>
> I imagine either with a direct connection through a network (TCP Socket,
> Web socket, pure HTTP with Zinc) and/or with a serial connection.
> At first, without any « security ». But later, information exchanges will
> be encrypted.
>
> I’ve seen some information on how to use SerialPort, or even FileStream.
> I could do it (or at least simulate it with HTTP). What are the other
> options ? Socket ?
> Do we have P2P libs (I couldn’t find) with eventually discovery features ?
>
> Any comment / suggestion / pointers are greatly welcome.
>
> TIA.
>
> Cédrick
>


[Pharo-users] Cryptography and hashing in Pharo

2017-10-25 Thread Cédrick Béler
Hi again,


Concerning cryptography in Pharo, there are to my knowledge :
=> a package developed in squeak [1] that was I think ported/forked for Pharo. 
I cannot find the Pharo version
=> a binding to the sodium library (NaCl) [2]

With one would you recommend ?  Maybe another option ?


Concerning hashing (I’d like to hash information content a bit like this is 
done in ifs with their multihash lib [3])
=> I found a keccak implication with I think would do the [4]. Any feedback ? 
Other implementations available ?
=> Do you think having something like ifs multihash would be interesting in 
Pharo ?


Again, thanks in advance for your comments/advices.

Cédrick


[1]  http://www.squeaksource.com/Cryptography.html 
 
[2] 
http://catalog.pharo.org/catalog/project/Nacl?_s=54MCZlmxc6F08Ht4&_k=HxcBD1pRVtXkfVFM
 

 
[3] https://github.com/multiformats/multihash 
 
[4] https://github.com/sbragagnolo/Keccak 
 



[Pharo-users] Exchanging information between 2 pharo applications (2 images running on two different computers)

2017-10-25 Thread Cédrick Béler
Hi all, 

I want to connect two applications (1 by image, each one on a different 
computer) so as as to exchange information (data) between them.

So my question is about the best (smalltalk) practices to connect two app/image 
and exchange data.

I imagine either with a direct connection through a network (TCP Socket, Web 
socket, pure HTTP with Zinc) and/or with a serial connection.
At first, without any « security ». But later, information exchanges will be 
encrypted. 

I’ve seen some information on how to use SerialPort, or even FileStream.
I could do it (or at least simulate it with HTTP). What are the other options ? 
Socket ? 
Do we have P2P libs (I couldn’t find) with eventually discovery features ?

Any comment / suggestion / pointers are greatly welcome.

TIA.

Cédrick

Re: [Pharo-users] Glorp: #includesKey:

2017-10-25 Thread Herby Vojčík

jtuc...@objektfabrik.de wrote:

Herby,

I must admit I've never used Dictionary Mappings with Glorp, so I don't
have an answer.
But I am a bit confused by your code examples. See below


Am 24.10.17 um 20:27 schrieb Herby Vojčík:

Hello!

I am using a DictionaryMapping in my code, and I wanted to use
#includesKey: in #where: clause (something akin

  each tools includesKey: aToolId


What SQL expression would you expect here?


SELECT * FROM AGENT a WHERE a.tool_id = :aToolId

AFAICT, DISTINCT is not needed as  are fks to other table's 
compound primary key , so they are known to be unique.



I would guess that you want to build a subquery like exists, because the
way I understand the query, you want to find all instances of (whatever
each is) that hold an Association in their tools dictionary where the
key is aToolId.


Yes.

Maybe it needs EXISTS, I don't know. Semantics is clear, though.



) to select only rows for which DictionaryMapping uses certain key. It
failed with the error in the lines of "#tools does not resolve to
field". I had to come up with




each tools anySatisfy: [ :tool | tool id = aToolId ]

Hmm. This makes me wonder. Is #tools really a Dictionary? Inside the
Block, I'd expect the :tool parameter to be an Association, and that
doesn't understand #id,does it? I guess @each is the parameter within an
Block like in

self session read: MyClass where: [:each| each tools ...]

If so, I have a hard time believing that anySatisfy: would work (never
tried)...


Yes, it works. Dictionary enumerates values, as I have written in reply 
to Tom's post.



Is it the bug / feature / problem in my approach? If bug, is it
planned to add #includesKey: translation to DictionaryMapping?


I don't know, but would guess it is not currently on the Todo-list.

My first tip would be to try and find some slides (most likely made by
Niall and presented at an ESUG) including the words "subquery", "glorp"
and "exists". You won't find much, but that may be a starting point.


I actually managed to get there, but
  a) using ugly workaround IMO, #includesKey: is part of dictionary's 
protocol, should be known;
  b) as I wrote in Tom's reply, the workaround only worked because 
mapping was to object. If the mapping was to primitive value (number, 
string), I would not have any 'tool id' ready to use and I would be left 
 without option. There is no way to construct such query atm in 
Glorp, afaict, if I cannot use #keys not #includesKey: in where clause. 
Is that not a bug?



Not sure this helps, ;-)


Joachim


Thanks, Herby



Re: [Pharo-users] Glorp: #includesKey:

2017-10-25 Thread Herby Vojčík

Tom Robinson wrote:

Hi Herby,

In my opinion, the way you found to make it work is the way it should
be. The reason is that the first way doesn't translate into SQL and the
second one does. It might be possible to add includesKey: functionality
but resolving that to SQL would be more complex. I would not call this a


I think I disagree with this, but correct me if I am wrong.

With DictionaryMapping, you map a set of (key, value) pairs into 
appropriate fields in a table. In essence, it does not differ at all to 
mapping any other collection containing objects with fields (actually, 
from what I understood, it does internal tricks to do just that - create 
internal "class mapping" for an association of that particular 
dictionary mapping).


In case of primitive value dictionaries, it even _is_ the same: key is 
mapped to one field, value is mapped to different field. If I want to 
create subquery using value, I can freely use things like #anySatisfy: 
to filter on that value (which I did in my case, but I come to that 
later). Since Dictionary enumerates values in do:, select:, collect: 
(and anySatisfy:), writing


  each tools anySatisfy: [...]

is the same as writing

  each tools values anySatisfy: [...]

but what if I wanted to write

  each tools keys anySatisfy: [...]

? I cannot, Glorp fails on 'keys' (I tried to use `keys includes:` 
instead of `includesKey:`, to no avail).


So what I want to point here is, that in DictionaryMapping I map keys 
and values to different fields in table (values can be complex, in which 
keys they are mapped to more fields, but that is not important 
distinction here), but Glorp only allows me to use values (and only 
implicitly) in where clauses; I have no way to use keys at all there.


So I assert here that "resolving that to SQL would be more complex" is 
not true. Key is mapped the same way value is; if I can use where clause 
that uses value in certain way, I should be able to use key as well - 
SQL generating from one or the other have same level of difficulty (in 
fact, I think key is easier, as you do not actually need to join the 
foreign table); the generated SQL could be something like


  SELECT * FROM AGENT a
WHERE a.tool_id = 

The fact that I found a

  each tools anySatisfy: [ :tool | tool id = aToolId ]

is in fact only because non-primitive mappings are processed differently 
in DictionaryMapping, a non-primitive values are _required_ to have a 
field defined (not in table, that is understandable, I need to be able 
to make a join, but in descriptor) a mapping that contains the key. So 
in essence, that could be represented as


  SELECT * FROM AGENT a
WHERE a.tool_id IN
 (SELECT * FROM TOOL t
   WHERE t.agent_id = a.id
 AND t.id = a.tool_id
 AND t.id = )

which is basically same as above, as actually, "a.tool_id = asDbValue>" is executed here as well (plus checking that such dictionary 
actually exists at all; maybe that should be present in previous case as 
well, but Glorp can generate the join, that's not the question here).


It is actually interesting question what SQL Glorp actually generated 
for "TgAgent readOneOf: [:a|a tools anySatisfy: [:t|t id = toolId]]".


Point here is:

  1. Why do I need to work it around via [:tool | tool id = aToolId] 
when I am only interested on "which tools the agent uses" (in fact, give 
me all agents using this tool).
  2. Should this be key -> primitive value mapping, I have simple _no 
way_ to ask the equivalent of #includesKey: at all (as the value is, for 
example, a String or an Integer, so no `tool id` is available).



bug. I would call it a limitation of the implementation. I don't know of
anyone planning to add this feature to Glorp right now.


That's why I would say #keys (and, ideally, #includesKey:) are actually 
needed addition to Glorp's set of known-and-translated selectors in case 
of DictionaryMapping.



Regards,

Tom


Thanks, Herby




Re: [Pharo-users] Territorial loading problems & alternative ways of loading data for making a choropleth map

2017-10-25 Thread Tudor Girba
You can directly use the Roassal presentation


gtInspectorExtension: composite

composite roassal2
title: ‘...'
initializeView: [ YourViewOrBuilder ];
painting: [ :yourViewOrBuilder | …  ]

Doru

> On Oct 25, 2017, at 5:57 AM, Hernán Morales Durand  
> wrote:
> 
> 2017-10-24 15:24 GMT-03:00 Offray Vladimir Luna Cárdenas
> :
>> Gracias Hernán!
>> 
> 
> No problema :)
> 
>> This is working fine. I would like to put the displayed map inside the
>> GT playground right panel, to get something similar to what you get when
>> you execute "RTMapLocationExample new exampleSeismOnEarth" from a
>> playground. Do you have any planned support for that?
>> 
> 
> I know this should be as easy as adding a
>  pragma
> 
> gtInspectorViewIn: composite
>
> 
>composite morph
>title: 'Territorial Map';
>display: [ view build ]
> 
> but still I have to investigate how to connect a RTView or TRMorph
> with GT inspector
> 
>> I could try to use some similar approach to the one I take on the Panama
>> Papers choropleth map [1][2] to export some Territorial data for
>> visualizations in a light format (120kb file example at: [3]), if you're
>> interested.
>> 
>> [1] http://mutabit.com/offray/blog/en/entry/panama-papers-1
>> [2] http://mutabit.com/repos.fossil/panama-papers/doc/tip/index.html
>> [3] http://mutabit.com/repos.fossil/panama-papers/doc/tip/territories.ston
>> 
> 
> Super! It would be nice to see usage in other scenarios!
> Let me know how it goes.
> 
> Cheers,
> 
> Hernán
> 
>> Cheers,
>> 
>> Offray
>> 
>> 
>> On 23/10/17 23:21, Hernán Morales Durand wrote:
>>> Hola Offray,
>>> 
>>> I tried loading in Windows 8.1 and it loads fine using:
>>> 
>>> Metacello new
>>>smalltalkhubUser: 'hernan' project: 'Territorial';
>>>configuration: 'Territorial';
>>>version: #bleedingEdge;
>>>load.
>>> 
>>> Then load TerritorialData-AMCharts-HernanMoralesDurand.2 from the 
>>> repository.
>>> 
>>> I published some "fixes" related to Spec and Roassal. (I have to
>>> review them because I'm porting other packages to Pharo 6.1, but it
>>> should work for displaying maps).
>>> 
>>> The following expression displays a window with Colombia departments:
>>> 
>>> TerritorialAMChartsMapsProvider viewHighResCountry: 'Colombia'
>>> 
>>> For a choropleth with a heatmap or centroids have a look at how I did
>>> it in PhyloclassTalk in SmalltalkHub, again I should update it to work
>>> in Pharo 6.1.
>>> 
>>> Cheers,
>>> 
>>> Hernán
>>> 
>>> 
>>> 
>>> 2017-10-23 22:59 GMT-03:00 Offray Vladimir Luna Cárdenas
>>> :
 Hi,
 
 I would like a choropleth map of Colombian departments [1]. The first
 approach would be to use Territorial, but loading it is not working on
 Pharo 6.1 (used on Manjaro Linux): It doesn't appears in the Catalog,
 Gopher load gives me: "XMLFileException: File does does not exist:
 /home/offray/Programas/Pharo/6.1a/Dev24/territorial_files/fao/fao_country_names.xml"
 and loading Monticello bleeding edge gives me "FileDoesNotExist: File @
 /home/offray/Programas/Pharo/6.1a/Dev24/territorial_files/opengeocode/wc-ASCII.csv".
 There is another way to make such choropleth map?
 
 [1] https://en.wikipedia.org/wiki/Departments_of_Colombia
 
 Thanks,
 
 Offray
 
 
 
>> 
>> 
>> 
> 

--
www.tudorgirba.com
www.feenk.com

"Problem solving efficiency grows with the abstractness level of problem 
understanding."







Re: [Pharo-users] CodeCity like visualization in Linux

2017-10-25 Thread Stephane Ducasse
you can show them cvs file
'my.cvs' asFileReference
and inspect you get a table :)
but it is still a file reference
Same with zip file
Check the videos of the mooc on GTInspector

Stef


On Wed, Oct 25, 2017 at 11:35 AM, Rafael Luque
 wrote:
> Great! Thank you Doru.
>
>
>
> ‌
>
> 2017-10-25 10:36 GMT+02:00 Tudor Girba :
>>
>> Hi,
>>
>> Indeed, the image was for Mac, but unfortunately I do not know if it works
>> on Linux.
>>
>> But, for your talk, there are other cool things that you can show in the
>> latest Moose. If you are interested, please contact me directly.
>>
>> Cheers,
>> Doru
>>
>>
>> > On Oct 25, 2017, at 9:39 AM, Rafael Luque 
>> > wrote:
>> >
>> > Thank you for your help Tudor.
>> >
>> > I'm trying with the CodeCity image I've downloaded from your post
>> > (http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0)
>> > and I get the error "MessageNotUnderstood: receiver of "platformId" is nil"
>> > in the NBMacGLContextDriver class>>supportsCurrentPlatform method.
>> >
>> > By this reason I thought it only works on Mac or maybe I must previously
>> > configure something to get the NativeBoost working on Linux.
>> >
>> > Thank you.
>> >
>> >
>> >
>> > ‌
>> >
>> > 2017-10-25 9:02 GMT+02:00 Tudor Girba :
>> > CodeCity only works in Pharo 3 (or maybe also 4).
>> >
>> > Doru
>> >
>> >
>> > > On Oct 25, 2017, at 1:38 AM, Rafael Luque
>> > >  wrote:
>> > >
>> > > Hi all,
>> > >
>> > > I'm working on an introductory talk about Pharo for a software
>> > > craftsmanship local meetup.
>> > >
>> > > The presentation will be mainly driven by demos and I'd like to show a
>> > > CodeCity-like visualization. I've been able to load it in Pharo 5, but it
>> > > get an error when select the "City" tag in GTInspector. It seems that
>> > > NBOpenGL does not work in Linux.
>> > >
>> > > Do you know any way to make it work in Linux?
>> > >
>> > > Thank you.
>> > > ‌
>> >
>> > --
>> > www.tudorgirba.com
>> > www.feenk.com
>> >
>> > "Presenting is storytelling."
>> >
>> >
>> >
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "Being happy is a matter of choice."
>>
>>
>>
>>
>>
>



Re: [Pharo-users] CodeCity like visualization in Linux

2017-10-25 Thread Rafael Luque
Great! Thank you Doru.



‌

2017-10-25 10:36 GMT+02:00 Tudor Girba :

> Hi,
>
> Indeed, the image was for Mac, but unfortunately I do not know if it works
> on Linux.
>
> But, for your talk, there are other cool things that you can show in the
> latest Moose. If you are interested, please contact me directly.
>
> Cheers,
> Doru
>
>
> > On Oct 25, 2017, at 9:39 AM, Rafael Luque 
> wrote:
> >
> > Thank you for your help Tudor.
> >
> > I'm trying with the CodeCity image I've downloaded from your post (
> http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0)
> and I get the error "MessageNotUnderstood: receiver of "platformId" is nil"
> in the NBMacGLContextDriver class>>supportsCurrentPlatform method.
> >
> > By this reason I thought it only works on Mac or maybe I must previously
> configure something to get the NativeBoost working on Linux.
> >
> > Thank you.
> >
> >
> >
> > ‌
> >
> > 2017-10-25 9:02 GMT+02:00 Tudor Girba :
> > CodeCity only works in Pharo 3 (or maybe also 4).
> >
> > Doru
> >
> >
> > > On Oct 25, 2017, at 1:38 AM, Rafael Luque <
> rafael.luque.le...@gmail.com> wrote:
> > >
> > > Hi all,
> > >
> > > I'm working on an introductory talk about Pharo for a software
> craftsmanship local meetup.
> > >
> > > The presentation will be mainly driven by demos and I'd like to show a
> CodeCity-like visualization. I've been able to load it in Pharo 5, but it
> get an error when select the "City" tag in GTInspector. It seems that
> NBOpenGL does not work in Linux.
> > >
> > > Do you know any way to make it work in Linux?
> > >
> > > Thank you.
> > > ‌
> >
> > --
> > www.tudorgirba.com
> > www.feenk.com
> >
> > "Presenting is storytelling."
> >
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Being happy is a matter of choice."
>
>
>
>
>
>


[Pharo-users] [ANN] LAM Research upgraded to Platinum Membership

2017-10-25 Thread Marcus Denker
The Pharo Consortium is very happy to announce that LAM Research 
has upgraded to Platinum Member status.

About
- LAM Research: http://www.lamresearch.com
- Pharo Consortium: http://consortium.pharo.org

The goal of the Pharo Consortium is to allow companies and institutions to
support the ongoing development and future of Pharo.

Individuals can support Pharo via the Pharo Association:

  http://association.pharo.org



Re: [Pharo-users] CodeCity like visualization in Linux

2017-10-25 Thread Tudor Girba
Hi,

Indeed, the image was for Mac, but unfortunately I do not know if it works on 
Linux.

But, for your talk, there are other cool things that you can show in the latest 
Moose. If you are interested, please contact me directly.

Cheers,
Doru


> On Oct 25, 2017, at 9:39 AM, Rafael Luque  
> wrote:
> 
> Thank you for your help Tudor.
> 
> I'm trying with the CodeCity image I've downloaded from your post 
> (http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0) 
> and I get the error "MessageNotUnderstood: receiver of "platformId" is nil" 
> in the NBMacGLContextDriver class>>supportsCurrentPlatform method.
> 
> By this reason I thought it only works on Mac or maybe I must previously 
> configure something to get the NativeBoost working on Linux.
> 
> Thank you.
> 
> 
> 
> ‌
> 
> 2017-10-25 9:02 GMT+02:00 Tudor Girba :
> CodeCity only works in Pharo 3 (or maybe also 4).
> 
> Doru
> 
> 
> > On Oct 25, 2017, at 1:38 AM, Rafael Luque  
> > wrote:
> >
> > Hi all,
> >
> > I'm working on an introductory talk about Pharo for a software 
> > craftsmanship local meetup.
> >
> > The presentation will be mainly driven by demos and I'd like to show a 
> > CodeCity-like visualization. I've been able to load it in Pharo 5, but it 
> > get an error when select the "City" tag in GTInspector. It seems that 
> > NBOpenGL does not work in Linux.
> >
> > Do you know any way to make it work in Linux?
> >
> > Thank you.
> > ‌
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "Presenting is storytelling."
> 
> 
> 

--
www.tudorgirba.com
www.feenk.com

"Being happy is a matter of choice."







Re: [Pharo-users] CodeCity like visualization in Linux

2017-10-25 Thread Rafael Luque
Thank you for your help Tudor.

I'm trying with the CodeCity image I've downloaded from your post (
http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0)
and I get the error "MessageNotUnderstood: receiver of "platformId" is nil"
in the NBMacGLContextDriver class>>supportsCurrentPlatform method.

By this reason I thought it only works on Mac or maybe I must previously
configure something to get the NativeBoost working on Linux.

Thank you.



‌

2017-10-25 9:02 GMT+02:00 Tudor Girba :

> CodeCity only works in Pharo 3 (or maybe also 4).
>
> Doru
>
>
> > On Oct 25, 2017, at 1:38 AM, Rafael Luque 
> wrote:
> >
> > Hi all,
> >
> > I'm working on an introductory talk about Pharo for a software
> craftsmanship local meetup.
> >
> > The presentation will be mainly driven by demos and I'd like to show a
> CodeCity-like visualization. I've been able to load it in Pharo 5, but it
> get an error when select the "City" tag in GTInspector. It seems that
> NBOpenGL does not work in Linux.
> >
> > Do you know any way to make it work in Linux?
> >
> > Thank you.
> > ‌
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Presenting is storytelling."
>
>
>


Re: [Pharo-users] CodeCity like visualization in Linux

2017-10-25 Thread Tudor Girba
CodeCity only works in Pharo 3 (or maybe also 4).

Doru


> On Oct 25, 2017, at 1:38 AM, Rafael Luque  
> wrote:
> 
> Hi all,
> 
> I'm working on an introductory talk about Pharo for a software craftsmanship 
> local meetup.
> 
> The presentation will be mainly driven by demos and I'd like to show a 
> CodeCity-like visualization. I've been able to load it in Pharo 5, but it get 
> an error when select the "City" tag in GTInspector. It seems that NBOpenGL 
> does not work in Linux. 
> 
> Do you know any way to make it work in Linux?
> 
> Thank you.
> ‌

--
www.tudorgirba.com
www.feenk.com

"Presenting is storytelling."