Re: [Pharo-users] Can it do this way ?

2020-09-06 Thread Roelof Wobben via Pharo-users
Hello, I solved it but with what I find one big ugly code isValidIsbn: aString     | digits lastDigit acc |     digits := aString select: [ :each | each ~= $- ].     digits size = 10         ifFalse: [ ^ false ].     lastDigit :=

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Esteban Maringolo
If somebody gets to open the image and loads it with an Smalltalk Emulator to execute it I'll ask him/her to start working together, and even teach me how to do it. I don't want to shield the image from being accessed, just want to make it harder than simply removing the '--headless' parameter to

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Davide Grandi
I mean that with SmalltalkEmulator, the Smalltalk interpreter written in Smalltalk, one can execute an image looking at classes, methods and maybe executing code at will. And the only practical form of protection I see in Squeak/Pharo is to obfuscate code. Maybe I'm wrong.     Davide Grandi On

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Esteban Maringolo
On Sun, Sep 6, 2020 at 12:52 PM Davide Grandi wrote: > > Does "competition" has SmalltalkEmulator ? > A Smalltalk-written VM will defeat any simple obfuscation scheme. Sorry, but I don't understand what you mean. Best regards,

Re: [Pharo-users] Rounding in Floats

2020-09-06 Thread Esteban Maringolo
Hi Sven, On Sun, Sep 6, 2020 at 11:57 AM Sven Van Caekenberghe wrote: > > On 6 Sep 2020, at 16:06, Esteban Maringolo wrote: > > (9.1 + (-2.0)) roundTo: 0.1. > > "7.1005" > > Is this a bug? > > Maybe. > > But I would not approach the problem of rounding like that. > You probably wan

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Davide Grandi
>any simple obfuscation scheme any simple _protection_ scheme, except obfuscation. 0.01 E. ...     Davide Grandi On 06/09/2020 17:51, Davide Grandi wrote: Does "competition" has SmalltalkEmulator ? A Smalltalk-written VM will defeat any simple obfuscation scheme. 0.02 E.     Davide Grandi

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Stéphane Ducasse
So if you remove the code open the worldmenu and the debugger you should get done. After the people could use —eval to open a browser but this is more difficult. > On 6 Sep 2020, at 15:55, Esteban Maringolo wrote: > > Stef, > > On Sat, Sep 5, 2020 at 12:49 PM Stéphane Ducasse > wrote: >> ju

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Davide Grandi
Does "competition" has SmalltalkEmulator ? A Smalltalk-written VM will defeat any simple obfuscation scheme. 0.02 E.     Davide Grandi On 06/09/2020 15:55, Esteban Maringolo wrote: Stef, On Sat, Sep 5, 2020 at 12:49 PM Stéphane Ducasse wrote: just a question what if a bad guy you want to pr

Re: [Pharo-users] Rounding in Floats

2020-09-06 Thread Sven Van Caekenberghe
> On 6 Sep 2020, at 16:06, Esteban Maringolo wrote: > > Hi, > > Continuing with my issues with decimals, I'm having one issue that is > not clear to me why it happens. > > If I do: > (9.1 + (-2.0)) roundTo: 0.1. > "7.1005" > > I expect to get a single decimal Float (rounded with

[Pharo-users] Rounding in Floats

2020-09-06 Thread Esteban Maringolo
Hi, Continuing with my issues with decimals, I'm having one issue that is not clear to me why it happens. If I do: (9.1 + (-2.0)) roundTo: 0.1. "7.1005" I expect to get a single decimal Float (rounded with whatever precision, but a single decimal). Even if I do something like this:

Re: [Pharo-users] Getting rid of .sources file for deployment

2020-09-06 Thread Esteban Maringolo
Stef, On Sat, Sep 5, 2020 at 12:49 PM Stéphane Ducasse wrote: > just a question what if a bad guy you want to protect from is just smart > and use a default vm. You're talking about decompiling and I'm talking about not making it trivial to see the code, internals and other things. Security is a

Re: [Pharo-users] Can it do this way ?

2020-09-06 Thread Steffen Märcker
Maybe this is a naive question, but can you just split the task into the following two? 1. Check whether whether the string is syntactically an ISBN number. This can be done, e.g., using a regex. 2. Check the the check character. Calculate the check character from the (now to be known) syntactic