Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Erik Stel
Francis, The hashpw function returns a hash with the salt prepended. So it contains both elements. (See for example explanation at: https://stackoverflow.com/questions/27413248/why-can-bcrypt-hashpw-be-used-both-for-hashing-and-verifying-passwords). You can do the same thing here. Assuming you

Re: [Pharo-users] Validate password with PBKDF2

2017-06-30 Thread Erik Stel
Francis, You're using an empty salt when creating the hash. Just prepending a random number does not add much security. Anyone knowing your solution will just prepend a random number. And creating only a few accounts in your system will probably reveal that information as well. A wrong-doer will j

Re: [Pharo-users] Validate password with PBKDF2

2017-07-01 Thread Erik Stel
Hi Francis, You write: Pharo Smalltalk Users mailing list wrote > FIY > > UUID new asByteArray > > does not give a ByteArray because UUID is a subclass of ByteArray and > asByteArray returns self (Entering teacher mode) This actually means that "UUID new asByteArray" does answer a ByteArray. I

Re: [Pharo-users] Validate password with PBKDF2

2017-07-01 Thread Erik Stel
Agreed. -- View this message in context: http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953207.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] TestCases and forked processes in TestResource don't play well

2019-06-12 Thread Erik Stel
Hi, I'm developing a web application using (amongst others) WebSockets. To prevent test methods from becoming too big and slow I created a TestCase with a TestResource containing my web application instance. After the first test method is run, the WebSocket is closed unexpectedly and automagically

Re: [Pharo-users] TestCases and forked processes in TestResource don't play well

2019-06-13 Thread Erik Stel
Hi Denis, Thanks for the fast response. When you say proper fix, do you mean a general fix for all TestResources or do you mean the fix for my situation? I can't oversee (yet) what the effect will be of halt/debug code inside the web application (TestResource) which is the subject of the TestCas

Re: [Pharo-users] Resources Page

2020-01-29 Thread Erik Stel
I think SqueakJS would be a good addition for the Open Source resources: https://squeak.js.org (Javascript based VM for running both headful and headless images both in the browser or (headless) in nodejs). And maybe Caffeine should get a mention in that same area (it uses SqueakJS): https://caffe

Re: [Pharo-users] NeoJSONParseError: invalid input: ' while parsing a Wikipedia exported article.

2020-02-08 Thread Erik Stel
Offray, JSON only allows double quotes for strings, not single quotes. Cheers, Erik -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] DNS over HTTPS (DoH) in Pharo

2020-02-26 Thread Erik Stel
Sven, Thank you very much. The new package is really well done (again ;-). For others/future readers: although not explicitly explained so by Sven, the first examples will not work for all addresses. The first address returned by the Cloudflare API can be another named address instead of IP addre

Re: [Pharo-users] Clean up method like #exiting from VAST

2020-03-13 Thread Erik Stel
Vince, You could check SmalltalkImage>>#addToShutDownList: Greetz, Erik -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Stale SQLite connection

2020-03-13 Thread Erik Stel
Jeff, You could have a look at SmalltalkImage>>#addToShutDownList: and SmalltalkImage>>#addToStartUpList: to stop/(re)start the connection when image is closed or a snapshot is taken. Add a method #startUp: to handle reconnecting. See for example Clipboard>>#startUp: Cheers, Erik -- Sent from

Re: [Pharo-users] Minimality

2020-04-13 Thread Erik Stel
Hi Cedreek, (Part of this I mentioned on Discord as well, but not all readers will be on Discord) I'm working with a tiny Smalltalk image (currently around 150Kb) which contains basic classes (very similar to PharoCandle, but with the regular Smalltalk names without PC-prefix, see https://github.

Re: [Pharo-users] Minimality

2020-04-16 Thread Erik Stel
Richard, Richard O'Keefe wrote > This sounds a lot like Craig Latta's "Spoon". > Probably worth talking to him about it. In the past I had some interest in Spoon, but it seems inactive now in favour of Caffeine and Naiad (the module system for Spoon). Spoon is not open source btw. Spoon & Naiad

[Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-03 Thread Erik Stel
I have published my first demo of a new type of webapplication based on a tiny Smalltalk image running in the browser, acting as the JS-engine. Create a dynamic application using Smalltalk only, with the direct manipulation you're familiar with from Smalltalk. And ...(in the near future)... with th

Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-04 Thread Erik Stel
Hi Konrad, Correct, the minimal image is running on SqueakJS VM. You can find info here: https://squeak.js.org Interesting question regarding deployment. In my current setup you do need the server, but it is not unrealistic to have a setup in which at some point the client is asked to create a sn

[Pharo-users] Zinc WebSocket usage

2020-05-29 Thread Erik Stel
Sven or anyone else with experience with ZnWebSockets, a question regarding ZnWebSocket usage. I have the following code which sort of resembles my current usage of ZnWebSockets. ZnWebSockets are used for both sending and receiving messages in a random fashion (ie, no request-response like pattern

Re: [Pharo-users] Zinc WebSocket usage

2020-05-29 Thread Erik Stel
Hmmmweird. My code was visible in preview. I did not look at the final result after posting. Maybe I should not have used the tag. | server client | server := ZnWebSocket startServerOn: 1701 do: [ :webSocket | [ webSocket runWith: [ :message | self crLog: 'Received message: ', messag

Re: [Pharo-users] Zinc WebSocket usage

2020-06-02 Thread Erik Stel
Hi Sven, Maybe you missed the additional post with the source code (I attached it again below with small change in way it is logging). Is there any advice on how to do this (other than the workaround I'm using at the moment)? The issue being that the client recognises its own closing only after a

Re: [Pharo-users] Zinc WebSocket usage

2020-06-05 Thread Erik Stel
Hi Sven, (I hope this message does arrive. Sorry for the late reply. I have not been able to use the browser-interface for the ML for a number of days now. An admin could not figure this out either. So resorting to actually using a mail ;-) My architecture is one in which client and server are

Re: [Pharo-users] Zinc WebSocket usage

2020-06-05 Thread Erik Stel
Sven, Okay. Thx for spending your time to investigate this. I'll stick with the current workaround then. Cheers, Erik -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-06-26 Thread Erik Stel
Hi, It took a bit longer than planned, but my code can be found online. https://github.com/ErikOnBike/CodeParadise Interested to hear your experience. Please add issues on Github if you encounter problems. Cheers, Erik -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

[Pharo-users] Re: We haven't had a design debate in a while - thoughts on CD.buy article...

2021-04-29 Thread Erik Stel
Hi people, A bit late to the party, but I want to provide some info as well. I think an Article can perfectly respond to a #sell (or #sellQuantity:) message. Depending on the type of application it could know or interact with other objects responsible for Stock for example to provide an estimated

Re: [Pharo-users] SortedCollection>>reverse answers an inconsistent object in Pharo 6

2018-04-23 Thread Erik Stel
Richard, The 'problem' is that the result of the (original) #reverse is a SortedCollection without a sortBlock. Meaning it defaults to comparing values using #<=. When a new element is added to the reversed collection it simply assumes all elements are already sorted and uses the (default) sortBlo

Re: [Pharo-users] SortedCollection>>reverse answers an inconsistent object in Pharo 6

2018-04-23 Thread Erik Stel
I already deleted my post (within 1 minute after posting 8-) seeing that I jumped the wagon too early. Sorry for that. Your message and proposed solution is fine. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] SortedCollection>>reverse answers an inconsistent object in Pharo 6

2018-04-23 Thread Erik Stel
Richard, Can you explain me what you mean by "sortBlock is supposed to act like #<="? Isn't it up to the developer to decide what the logic should be? I simply used #<= because #> might not have been implemented for all relevant classes, but would otherwise have chosen #> as a means to get the 're

Re: [Pharo-users] SortedCollection>>reverse answers an inconsistent object in Pharo 6

2018-04-25 Thread Erik Stel
Why does the sortBlock has to answer true for the same (identical) object? I have not been able to find where it is specified. And in different locations I see #> being used as a comparator for the sortBlock. So why is it bad (as you wrote)? (It seems you describe that SortedCollection should creat

Re: [Pharo-users] Naming parameters - conventions?

2018-07-12 Thread Erik Stel
In the day, I learned from Smalltalk with Style: http://sdmeta.gforge.inria.fr/FreeBooks/WithStyle/SmalltalkWithStyle.pdf On PDF-page 13 naming starts. On PDF-page 29 parameter names are explained (but refers back to typed names for example). Naming ends at PDF-page 35. So quite elaborate explanat

Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Erik Stel
You can find the source at the GitHub-link below. Craig seems active on this project seeing the number of recent commits. Focus is on creating a live VR-environment. Cool stuff I think . It will run Pharo, but if that means 'production ready'... Small image sizes for production systems/applications

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-11 Thread Erik Stel
Check out the following info: https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier The REST API might be answering an IRI instead of an URI in which case it might not be faulty after all (I did not check th

Re: [Pharo-users] ZnClient receiving Expires header with Max-Age instead of HTTP formatted DateAndTime

2018-09-11 Thread Erik Stel
Sven, According to the spec "0" or invalid date formats should mean 'isExpired' (as you already suggested): A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). So I would vote for having 'isExpired

Re: [Pharo-users] nested json problem

2018-11-05 Thread Erik Stel
Roelof, What does not work in your code? How do you call PaintingCollection>>fromJSON: ? >From what I see this code could work if used like (replace URL with actual URL): -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

[Pharo-users] CodeParadise runs on P10

2022-12-28 Thread erik . stel
Hi all. A small holiday present for anyone interested: [https://github.com/ErikOnBike/CodeParadise](https://github.com/ErikOnBike/CodeParadise "https://github.com/ErikOnBike/CodeParadise";) now runs on P10 (and P11 with some care)! If you are using it on P8, please unload the CP-ClientEnvironmen

[Pharo-users] Creating tiny Pharo images

2022-12-31 Thread erik . stel
Hi all.\ \ I have created a bootstrap helper package to create tiny Pharo images. I use this for CodeParadise, but it can also be used to create tiny images which run outside the browser. It can create both 32 and 64 bit images. A tiny image is around 200 to 300Kb.\ \ Two example usages are pres

[Pharo-users] Re: Creating tiny Pharo images

2023-01-15 Thread erik . stel
Hi all.\ \ I added a 'dynamic' image to the TinyBootstrap repo. It is a tiny image containing a pre-installed code loader. This code loader allows you to load additional classes and methods and (optionally) save this in the image. Code (in the form of a class method) can be executed from the com