Re: [Pharo-users] Loading Seaside via Bootstrap in Pharo 6

2017-02-20 Thread Sven Van Caekenberghe
Hi Johan,

I depend on Bootstrap from my Config's baseline:

  project: 'Bootstrap' with: [
spec 
  className: 'ConfigurationOfBootstrap';
  repository: 'http://smalltalkhub.com/mc/TorstenBergmann/Bootstrap/main/';
  versionString: #stable ];

Which depends on Seaside in its baseline:

  spec project: 'Seaside3' with: [  
   
spec
  className: 'ConfigurationOfSeaside3';
  versionString: #'stable';
  repository: 
'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main' ].

This used to work (but in Pharo 4).

> On 20 Feb 2017, at 20:37, Johan Brichau  wrote:
> 
> Hi Sven,
> 
> I have (not yet) tried Pharo6, but I saw some people did update the 
> configuration for that.
> How are you loading the project? Are you using the Metacello load API ?
> 
> Johan
> 
>> On 20 Feb 2017, at 19:52, Sven Van Caekenberghe  wrote:
>> 
>> Hi,
>> 
>> In my main project I depend on Torsten's Bootstrap project which then loads 
>> Seaside. I tried this today on Pharo 6 and it did not work (some internal 
>> Seaside dependency could not be resolved). I also noticed that the last 
>> commits on Bootstrap were from April 2016. 
>> 
>> My question now is: is this supposed to work on Pharo 6 ?
>> 
>> Thx,
>> 
>> Sven
> 
> 




Re: [Pharo-users] Loading Seaside via Bootstrap in Pharo 6

2017-02-20 Thread Johan Brichau
Hi Sven,

I have (not yet) tried Pharo6, but I saw some people did update the 
configuration for that.
How are you loading the project? Are you using the Metacello load API ?

Johan

> On 20 Feb 2017, at 19:52, Sven Van Caekenberghe  wrote:
> 
> Hi,
> 
> In my main project I depend on Torsten's Bootstrap project which then loads 
> Seaside. I tried this today on Pharo 6 and it did not work (some internal 
> Seaside dependency could not be resolved). I also noticed that the last 
> commits on Bootstrap were from April 2016. 
> 
> My question now is: is this supposed to work on Pharo 6 ?
> 
> Thx,
> 
> Sven




Re: [Pharo-users] Seeking support: Vote for Jigyasa Grover for Red Hat International Women in Open Source Academic Awards 2017

2017-02-20 Thread Jigyasa Grover
Many thanks for your valuable vote Hayatou :) 

- Jigyasa



--
View this message in context: 
http://forum.world.st/Seeking-support-Vote-for-Jigyasa-Grover-for-Red-Hat-International-Women-in-Open-Source-Academic-Awar7-tp4934824p4935144.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Loading Seaside via Bootstrap in Pharo 6

2017-02-20 Thread Sven Van Caekenberghe
Hi,

In my main project I depend on Torsten's Bootstrap project which then loads 
Seaside. I tried this today on Pharo 6 and it did not work (some internal 
Seaside dependency could not be resolved). I also noticed that the last commits 
on Bootstrap were from April 2016. 

My question now is: is this supposed to work on Pharo 6 ?

Thx,

Sven


Re: [Pharo-users] Latest Voyage for Pharo4

2017-02-20 Thread Hilaire
Dale,

I try out the lock feature on an archived image, the seaside uprade was
still operating :(

I updated this image with latest Metacello, then I locked it as:

  Metacello image
configuration: 'Seaside3';
version: '3.1.4.2'; "most recent 3.1.x version"
lock.

It was the version returned by this command:
ConfigurationOfSeaside3 new project currentVersion

By the way it will make sense, and will be easily discoverable to have a
short cut as "ConfigurationOfSeaside3 currentVersion"

I don't remember how I installeed Seaside in the first place, I think it
was from the configuration browser.

Hilaire


Le 19/02/2017 à 18:50, Dale Henrichs a écrit :
> I mentioned last night that I thought that there was a better solution
> to your problem and I think that if you load the latest Metacello and
> then lock Seaside3:
> 
>   Metacello image
> configuration: 'Seaside3';
> version: '3.1.5'; "most recent 3.1.x version"
> lock.
> 
> Then load Voyage, you shouldn't have the problem with Seaside being
> updated to 3.2. Seaside does not support upgrade across minor version
> numbers like 3.1 to 3.2 ... if the upgrade to 3.2 was allowed, you
> wouldn't have this particular problem.

-- 
Dr. Geo
http://drgeo.eu




Re: [Pharo-users] Coding XPath as Smalltalk

2017-02-20 Thread monty
An improved ?? construct is part of the public API now. It can be used to 
attach predicates to node tests:
xmlNode / 'foo' / ('bar' ?? 10).

or to filter result node sets like this:
(xmlNode / 'foo' / 'bar') ?? 10.
xmlNode / 'foo' / 'bar' ?? 10. "same because of precedence"

The first is equivalent to this:
'foo/bar[10]' asXPath in: xmlNode.

The others are equivalent to this:
'(foo/bar)[10]' asXPath in: xmlNode.

Block predicates take the context node, position, and size as optional (cull:) 
arguments. Multiple predicates are done by giving ?? an Array argument or 
chaining ?? sends like this:
xmlNode / 'foo' / ('bar' ?? [:each | each includesAttribute: 'name'] ?? 
1).

Number predicates are faster than blocks and an initial number predicate 
attached to a node test (like in the first example) optimizes the node test by 
limiting the number of matching nodes it enumerates. 

> Sent: Saturday, September 03, 2016 at 11:08 AM
> From: PBKResearch 
> To: "'Any question about pharo is welcome'" 
> Subject: Re: [Pharo-users] Coding XPath as Smalltalk
>
> Hi Monty
> 
> Just to say that I have obtained the Moose 6.0 image (Pharo5.0 Latest update: 
> #50761) and installed the XMLHTMLParser, and I seem able to reproduce the 
> nucleus of the results I had from my old image. Some of my old XPath strings 
> do not work (e.g. it did not recognise [1]), but I have worked my way round 
> that, and I should soon have worked out the new syntax. Thanks for your 
> suggestions for the variable case; I can now see the way ahead for that. 
> Thanks for all the help.
> 
> @stef
> 
> I have loaded the same version of TextLint as I had in the previous image. It 
> was accepted with no problems. I have tested it for the limited uses I make 
> of it (just the parsers, not the rules) and everything seems OK. So now I am 
> upgraded to Pharo 5, so far with no problems!
> 
> Peter Kenny
> 
> -Original Message-
> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
> monty
> Sent: 03 September 2016 13:00
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] Coding XPath as Smalltalk
> 
> 
> 
> > Sent: Saturday, September 03, 2016 at 5:30 AM
> > From: PBKResearch 
> > To: "'Any question about pharo is welcome'" 
> > Subject: Re: [Pharo-users] Coding XPath as Smalltalk
> >
> > Hi Monty
> > 
> > Many thanks. I have picked up a project that I had not worked on for a 
> > while, which explains why I am using an old image. I shall try the latest 
> > Moose image, as you suggest. My only anxiety is that I need to be able to 
> > use a rather ancient package called TextLint, and I do not know whether it 
> > will load OK in a new Pharo. If not, I shall try to update my existing 
> > image.
> 
> If you'd looked at CI job, you'd see that XPath builds on Pharo 5 through 3 
> (but should work back to 1.4). You can always start fresh with a clean, old 
> image from http://files.pharo.org/image/ or the Moose website if TextLint 
> doesn't work anymore.
> 
> > With the latest XPath, will it be clear how to use the binary syntax to 
> > carry out node tests like the example of '//div[@id=''catlinks'']//' that I 
> > cited below? The case I am interested in is where the actual identifier 
> > ('catlinks' in this case) is a variable rather than a constant. It would be 
> > possible to do it in standard XPath by assembling the XPath string with a 
> > variable component, but it might be more convenient in the binary syntax.
> > 
> 
> You could do this:
>  ((doc // 'div') select: [:each | (each attributeAt: 'id') = catlinks]) // 
> 'li' // 'text()'
> 
> where "catlinks" is a var. Or you could use xPath:context: with an XPath var 
> that you dynamically bind using custom contexts:
>  doc
>  xPath: '//div[@id=$catlinks]//li//text()'
>  context: (XPathContext variables: {'catlinks' -> catlinks})
> 
> The advantage over this:
>  doc xPath: '//div[@id=''', catlinks, ''']//li//text()'
> 
> is that the xPath: expression string is the same each time, so it's only 
> compiled once, the first time, and cached for later uses (inspect 'XPath 
> compiledXPathCache') instead of being compiled each time the xPath: 
> expression string arg changes.
> 
> > Many thanks for your help.
> > 
> > Peter Kenny
> > 
> > -Original Message-
> > From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
> > monty
> > Sent: 03 September 2016 06:54
> > To: pharo-users@lists.pharo.org
> > Subject: Re: [Pharo-users] Coding XPath as Smalltalk
> > 
> > Peter, you're using an ancient version with bugs that were fixed last fall. 
> > The newest version has more tests and correct behavior (checked against a 
> > reference implementation). Just download a new Moose image and you'll get 
> > it, along with an up to date XMLParser. (But if you insist on upgrading in 

Re: [Pharo-users] Equality and hash

2017-02-20 Thread Trussardi Dario Romano
Thanks Denis. 

> There is refactoring which sadly not available from menu. But you can 
> evaluate it manually:
> 
> (RBGenerateEqualHashRefactoring className: #YourClass variables: #(var1 
> var2)) execute

My problem is display in this image.

In the left the inspector display all the items in the bag ( it's right )

In the right the inspector display the relative  Occurences,but some are 
set to 0.
 




Because ?

Thanks for considerations,

Dario

> 2017-02-20 13:46 GMT+01:00 Trussardi Dario Romano 
> :
> Ciao,
> 
> i works with Pharo 4.0 environment.
> 
> I have a class Product  with some instance variable and the  =
>   method set to:
> 
> = anItem
> 
> anItem ifNil:[^false].
> 
> anItem class = self class ifFalse:[ ^false].
> 
> ^  rfrConsegna  = anItem rfrConsegna
> and:[ rfrSubTable  = anItem rfrSubTable
> and:[ rfrDcm = anItem rfrDcm
> and:[ indexRiga = anItem 
> indexRiga
> and:[ referenceTime = 
> anItem referenceTime
> and:[ 
> consumer = anItem consumer
> and:[ 
> item = anItem item
>   
>   and:[ opzioniVoce  = anItem opzioniVoce
> ]]]
> 
> Some of these variables are instances  of classes with specific 
> implementation and some variables themselves.
> 
> 
> I set the relative hash method to:
> 
> hash
> 
> ^ rfrConsegna hash
> bitXor:( rfrSubTable  hash
> bitXor: ( rfrDcm hash
> bitXor: ( indexRiga hash
> bitXor: ( referenceTime hash
> bitXor: ( consumer   hash
> bitXor: ( item   hash
> bitXor: ( 
> opzioniVoce  hash
> 
> )))
> 
> Now when add some setup instances of class Product  to a bag,
> 
>  the relative inspector report
> 
> some aProduct entry but with some Occurences of this set to 0.
> 
> aProduct1   3
> aProduct2   0
> aProduct3   0
> 
> 
> Some consideration about it ?
> 
> Some references about hash implementations ?
> 
> Thanks,
> 
> Dario
> 
> 
> 



Re: [Pharo-users] Data Encryption

2017-02-20 Thread p...@highoctane.be
Works marvels indeed.

I have made some more Seaside integrations for this one.

But Pharo3. Need to upgrade to latest Seaside and Pharo.

Phil



On Mon, Feb 20, 2017 at 3:06 PM, Hernán Morales Durand <
hernan.mora...@gmail.com> wrote:

> Hi Sergio,
>
> Have a look at the ApplicationSecurity package:
>
> http://80738163270632.blogspot.com/2014/03/application-security-
> presentation.html
> http://80738163270632.blogspot.com/2014/10/application-security-2-
> checkpoint.html
> http://80738163270632.blogspot.com/2015/02/application-security-3-
> setting-your.html
>
> Cheers,
>
> Hernán
>
>
>
> 2017-02-20 10:34 GMT-03:00 sergio ruiz :
>
>>
>> I have been tasked with throwing together a small web app that will hold
>> the passwords to different projects for my company.
>>
>> I would like to use seaside to do this, but the biggest requirement is
>> that we need to be able to either:
>>
>> - encrypt the entire database, so that if the machine was compromised
>> physically, the data would be useless.
>>
>> or..
>>
>> - encrypt the username and password fields to facilitate the above, also.
>>
>> i am thinking that the first option might be easiest to implement.
>>
>> any ideas on how i would pull this off with pharo?
>>
>> Thanks!
>>
>>
>> 
>> peace,
>> sergio
>> photographer, journalist, visionary
>>
>> Public Key: http://bit.ly/29z9fG0
>> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
>> http://www.Village-Buzz.com
>> http://www.ThoseOptimizeGuys.com
>> http://www.coffee-black.com
>> http://www.painlessfrugality.com
>> http://www.twitter.com/sergio_101
>> http://www.facebook.com/sergio101
>>
>
>


[Pharo-users] Data Encryption

2017-02-20 Thread sergio ruiz
I have been tasked with throwing together a small web app that will hold
the passwords to different projects for my company.

I would like to use seaside to do this, but the biggest requirement is that
we need to be able to either:

- encrypt the entire database, so that if the machine was compromised
physically, the data would be useless.

or..

- encrypt the username and password fields to facilitate the above, also.

i am thinking that the first option might be easiest to implement.

any ideas on how i would pull this off with pharo?

Thanks!



peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] Equality and hash

2017-02-20 Thread Denis Kudriashov
There is refactoring which sadly not available from menu. But you can
evaluate it manually:

(RBGenerateEqualHashRefactoring className: #YourClass variables: #(var1
var2)) execute


2017-02-20 13:46 GMT+01:00 Trussardi Dario Romano <
dario.trussa...@tiscali.it>:

> Ciao,
>
> i works with Pharo 4.0 environment.
>
> I have a class Product  with some instance variable and the
> =  method set to:
>
> = anItem
>
> anItem ifNil:[^false].
>
> anItem class = self class ifFalse:[ ^false].
>
> ^  rfrConsegna  = anItem rfrConsegna
> and:[ rfrSubTable  = anItem rfrSubTable
> and:[ rfrDcm = anItem rfrDcm
> and:[ indexRiga = anItem
> indexRiga
> and:[
> referenceTime = anItem referenceTime
> and:[
> consumer = anItem consumer
>
> and:[ item = anItem item
>
>   and:[ opzioniVoce  = anItem opzioniVoce
> ]]]
>
> Some of these variables are instances  of classes with specific
> implementation and some variables themselves.
>
>
> I set the relative hash method to:
>
> hash
>
> ^ rfrConsegna hash
> bitXor:( rfrSubTable  hash
> bitXor: ( rfrDcm hash
> bitXor: ( indexRiga hash
> bitXor: ( referenceTime hash
> bitXor: ( consumer   hash
> bitXor: ( item
>  hash
> bitXor: (
> opzioniVoce  hash
>
> )))
>
> Now when add some setup instances of class Product  to a bag,
>
>  the relative inspector report
>
> some aProduct entry but with some Occurences of this set
> to 0.
>
> aProduct1   3
> aProduct2   0
> aProduct3   0
>
>
> Some consideration about it ?
>
> Some references about hash implementations ?
>
> Thanks,
>
> Dario
>
>
>


Re: [Pharo-users] Team programming with Smalltalk

2017-02-20 Thread Denis Kudriashov
2017-02-18 8:53 GMT+01:00 itli...@schrievkrom.de :

>  Sadly this is gone or simply only badly implemented. E.g. in Pharo you
> can select a package - fine, but to know, what has been extended in this
> package ?. The name of the method categories also define in which
> package this method is located in. Make a type error and the method goes
> into a different package and you will not recognize it. Solutions born
> by the idea: how can we make it simple to have a solution this evening -
> and these solutions survive over the years.
>

It will be changed in Pharo 7 with Calypso. It already shows packages
instead of categories with start convension.


Re: [Pharo-users] Latest Voyage for Pharo4

2017-02-20 Thread Hilaire
I will try to get a look at your lock feature, and report.

Thanks

Hilaire

Le 19/02/2017 à 18:50, Dale Henrichs a écrit :
> I mentioned last night that I thought that there was a better solution
> to your problem and I think that if you load the latest Metacello and
> then lock Seaside3:

-- 
Dr. Geo
http://drgeo.eu




Re: [Pharo-users] Latest Voyage for Pharo4

2017-02-20 Thread Hilaire
Le 20/02/2017 à 08:19, Stephan Eggermont a écrit :
>> May be it is more a policy problem on the quality of the configuration
>> than a tool problem, a lot can be learn from Debian packaging.
> 
> I don't have that impression. They seem to have the same problem with
> old and less-used stuff.

As long as you don't mix old and new it is fine, and it is how is
designed Debian. In the contrarty, I had the felling that Pharo4
configurations were mixing old and new, and of course it brings problem.

Hilaire

-- 
Dr. Geo
http://drgeo.eu