Re: [Pharo-users] [ANN] Teapot was moved to GitHub

2018-11-28 Thread Attila Magyar
Esteban A. Maringolo wrote > Excellent material. > I also liked that you not only provided instructions for installation, > but also to set Teapot as a dependency. > > Please add the `pharo` tag to the repository, so it gets listed in the > topics section [1] and also helps bumping Pharo topic to

Re: [Pharo-users] [ANN] Teapot was moved to GitHub

2018-11-28 Thread Attila Magyar
Esteban A. Maringolo wrote > Excellent material. > I also liked that you not only provided instructions for installation, > but also to set Teapot as a dependency. > > Please add the `pharo` tag to the repository, so it gets listed in the > topics section [1] and also helps bumping Pharo topic to

[Pharo-users] [ANN] Teapot was moved to GitHub

2018-11-27 Thread Attila Magyar
Hi, I just want to let you know that the source code of Teapot was moved from Smalltalkhub to GitHub. The new repository is located at: https://github.com/zeroflag/teapot Attila -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
Teapot already supports conditional routes, maybe using them instead of adding the WS: message would be better. I'm thinking domething like: Teapot on GET: '/chat' -> whatever; when: [:req | req isWebSocket]; start. or just Teapot on GET: '/chat' -> whatever; when: #isWebSocket

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
Teapot already supports conditional routes, maybe using them instead of adding the WS: message would be better. I'm thinking domething like: Teapot on GET: '/chat' -> whatever; when: [:req | req isWebSocket]; start. or just Teapot on GET: '/chat' -> whatever; when: #isWebSocket

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
Hi Georges, This is not supported at this moment. If I understand your example correctly then WS: '/ws-chatroom' would match on an incoming WebSocket handshake request and it would create and return new websocket. The same websocket would be passed to the handler block for doing additional

Re: [Pharo-users] Teapot and Mustache in Pharo 6?

2017-08-21 Thread Attila Magyar
Hi Hannes, You can find some examples in the Enterprise Pharo book (http://files.pharo.org/books/enterprise-pharo/). Teapot on GET: '/greet' -> {'phrase' -> 'Hello'. 'name' -> 'World'}; output: (TeaOutput mustacheHtml: '*{{phrase}}* /{{name}}/!'); start. The {'phrase' -> 'Hello'.

Re: [Pharo-users] Looking for small boards and tiny computers which can run Pharo

2017-07-25 Thread Attila Magyar
The esp32 is not capable of running Pharo unfortunatelly. It's not Linux based, it has a realtime operating system called FreeRTOS and the amount of memory it has is also quite limited. It's more like a microcontroller than a single board computer. -- View this message in context:

Re: [Pharo-users] Why do we separate class/instance methods in the browser?

2017-07-23 Thread Attila Magyar
Maybe if the protocol list was a tree instead of a list then it would make sense to include the class methods there. This would also make easier to move methods from class side to instance side or vica versa with simple drag and drop (without relying on the refactor/move to class side option).

Re: [Pharo-users] Teapot and POST:

2017-06-25 Thread Attila Magyar
Hi Stef, Yeah, I've just sent a pull request. Attila -- View this message in context: http://forum.world.st/Teapot-and-POST-tp4951616p4952553.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] How to use HTTPS (SSL) with Zinc

2017-06-24 Thread Attila Magyar
Gofer it smalltalkhubUser: 'zeroflag' project: 'Teapot'; configuration; loadDevelopment. -- View this message in context: http://forum.world.st/How-to-use-HTTPS-SSL-with-Zinc-tp4952461p4952507.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] How to use HTTPS (SSL) with Zinc

2017-06-24 Thread Attila Magyar
Sven Van Caekenberghe-2 wrote > (In regular mail, I don't see you code snippet, I copy it here). Hmm, maybe because of the raw text tags. Is this visible? Transcript show: 'Hello world'; cr. -- View this message in context:

Re: [Pharo-users] How to use HTTPS (SSL) with Zinc

2017-06-24 Thread Attila Magyar
Teapot uses ZnServer defaultServerClass by default, but you can configure Teapot to use other kind of ZnServers like this. This is available only in the latest development version. -- View this message in context: http://forum.world.st/How-to-use-HTTPS-SSL-with-Zinc-tp4952461p4952501.html

Re: [Pharo-users] Teapot and POST:

2017-06-16 Thread Attila Magyar
I added it to the doc. -- View this message in context: http://forum.world.st/Teapot-and-POST-tp4951616p4951702.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Teapot and POST:

2017-06-16 Thread Attila Magyar
It's basically the same as GET and the others. The request object contains the url encoded form data or whatever was posted. The request object is the same as ZnRequest with a few additional methods. There is a generic at: method that can be used to access both path and queryOrFormParams. --

Re: [Pharo-users] Teapot: Managing authentication by a third party (Fossil)

2017-06-09 Thread Attila Magyar
IMO it depends on how the API works. Most REST APIs are stateless and the authentication token or api key is sent in each request, there is no login/logout operation. In this case you can setup a before filter and check the authentication token in the filter. If you use normal form based login

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-08 Thread Attila Magyar
Peter Uhnak wrote > Scale can make all the difference. I don't think it should. If you have a small cluster of objects where you can manage the dependencies yourself, you can compose larger objects from them and manage the dependencies the same way. By doing so, you'll get an object that is

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-08 Thread Attila Magyar
Vitor Medina Cruz wrote > This is exactly my concern! Sure, for small stuff that is not a problem, > but what if you have a big app? I don't think it makes any difference. You have to decide in each case whether an object is an internal (implementation detail) and therefore it must be created

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-08 Thread Attila Magyar
> It seems to be broken. Here is an archived version. http://archive.li/GCbEY#selection-755.0-755.38 -- View this message in context: http://forum.world.st/Wiring-objects-IoC-and-Service-Locator-tp4949280p4950480.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-06 Thread Attila Magyar
I don't think using a DI container worth the effort. They add lots of complexities and solve very little. For some reason DI containers became very popular in the Java world, but if you take a look at other programming communities you'll realize that many people are perfectly happy without using

Re: [Pharo-users] Pharo for Raspberry Pi

2017-05-09 Thread Attila Magyar
As I remember, last time I used the standard squeak vm that is shipped with the rpi3, and it worked fine with Pharo. I don't remember whether it was a spur image or not, but it worth trying out. -- View this message in context:

Re: [Pharo-users] [ANN] Enterprise Pharo book is released!

2016-06-10 Thread Attila Magyar
Good news, I've just ordered one. -- View this message in context: http://forum.world.st/ANN-Enterprise-Pharo-book-is-released-tp4900390p4900399.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] [ANN] PBMAuthenticator

2016-06-10 Thread Attila Magyar
Hi, I made a library for an online 2 factor authentication service called PassBy[ME] . This a service that provides PKI based 2nd factor authentication (using smartphones) among other things like message sending and electronic signatures. The library lets you start new

Re: [Pharo-users] How much abuse can Teapot take?

2016-06-07 Thread Attila Magyar
Since Teapot is just a pretty thin layer on top of the ZnServer, I'd guess it can roughly take the same amount. The route finding algorithm is a simple linear one (like most of the other micro webframeworks use), but it shouldn't be a problem unless you have an enormous amount of urls. But I

Re: [Pharo-users] Teapot Cache Bug

2015-12-24 Thread Attila Magyar
Haven't you forgot to stop the old server? If you use the latest Teapot then there will be a Teapot menu item in the world menu where you can check how many instances are currently running. You can stop them from the context menu. Or try to evaluate Teapot stopAll to stop all of them. -- View

Re: [Pharo-users] [ANN] Working with Pharo on the Raspberry Pi

2015-10-26 Thread Attila Magyar
Hi Torsten, Have you tried the cogvm on the Pi? It is much faster than the stack vm. If I remember correctly, I used this one last time: http://www.mirandabanda.org/files/Cog/VM/VM.r3427/cogspurlinuxhtARM-15.33.3427.tgz Attila -- View this message in context:

Re: [Pharo-users] Customised auto-completion to give priority to specific packages

2015-08-19 Thread Attila Magyar
Attila Magyar wrote It would be really nice to have real message completion in the debugger/inspector/workspace where the types of the variables are known. For example, when I'm debugging a method and an instance variable is already initialized to a String, then the auto completion could show

Re: [Pharo-users] Customised auto-completion to give priority to specific packages

2015-08-19 Thread Attila Magyar
It would be really nice to have real message completion in the debugger/inspector/workspace where the types of the variables are known. For example, when I'm debugging a method and an instance variable is already initialized to a String, then the auto completion could show me only the messages

Re: [Pharo-users] Teapot and Regex

2015-08-04 Thread Attila Magyar
Hi Marcus, It seems you're trying to define a matcher on the query parameters. It's not going to work. An url consist of path a the query part. These are separeted by a question mark. http://localhost:1701/foo/bar?q1=xxq2=yy In this example /foo/bar is the path, and q1 and q2 are the query

[Pharo-users] Multiple sockets listening on same port

2015-07-20 Thread Attila Magyar
Hi, A number of times I ran into the situation where I started a http server but forgot that an other one was already running. This resulted strange behavior and led to confusion. The Socket class doesn't detect that the given port is already bound to an other socket. socket1 := Socket

Re: [Pharo-users] Situation - Raspberry PI and Pharo + Squeak

2015-07-05 Thread Attila Magyar
Hi Marten, Currently I'm using this this vm from here http://www.mirandabanda.org/files/Cog/VM/VM.r3395/cogspurlinuxhtARM-15.26.3395.tgz with the latest Pharo 5 spur image from here http://files.pharo.org/image/50/latest-spur32.zip As far as I know, spur is a new memory manager but I'm not

[Pharo-users] [ANN] Teapot 0.91

2015-05-09 Thread Attila Magyar
Hello, Teapot 0.91 released today. Teapot is micro web framework that focuses on simplicity and ease of use. Here's a summary of changes: - Routes and before/after filters may include conditions (see the example below) - Routes can be defined with /any:/ that serves as a wildcard matching any

Re: [Pharo-users] {ANN] TMM (Teapot, Mustache, Mongo) web application stack

2015-04-28 Thread Attila Magyar
Nice demo. If you don't mind, I added a link to your github repository on the teapot website (http://www.smalltalkhub.com/#!/~zeroflag/Teapot). -- View this message in context: http://forum.world.st/ANN-TMM-Teapot-Mustache-Mongo-web-application-stack-tp4822056p4822419.html Sent from the Pharo

Re: [Pharo-users] How not to serve an AngularJs application from Pharo

2014-10-29 Thread Attila Magyar
Also, there is a serveStatic: '/statics' from: '/var/www/htdocs' if someone wants to store something outside the image. -- View this message in context: http://forum.world.st/How-not-to-serve-an-AngularJs-application-from-Pharo-tp4786980p4787433.html Sent from the Pharo Smalltalk Users

Re: [Pharo-users] BabyMock2: Stubbing individual methods from existing instance?

2014-10-28 Thread Attila Magyar
This is not supported. BabyMock is designed to test the message flow between objects, and not the internal implementation of an object. If the part what you want to stub out is not a private implementation detail then maybe extracting it to an object could help, otherwise couldn't you test the

Re: [Pharo-users] Client cerificate authentication with ZnClient?

2014-10-17 Thread Attila Magyar
wow, thanks. I will test it on Monday. -- View this message in context: http://forum.world.st/Client-cerificate-authentication-with-ZnClient-tp4784981p4785195.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] Client cerificate authentication with ZnClient?

2014-10-16 Thread Attila Magyar
Hi, Is certificate based authentication supported by ZnClient? Attila -- View this message in context: http://forum.world.st/Client-cerificate-authentication-with-ZnClient-tp4784981.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] [ANN] Teapot 0.8 micro web framework

2014-08-24 Thread Attila Magyar
Hello, I'd like to announce a new micro web framework called Teapot. It follows a similar philosophy than other lightweight frameworks like Sinatra/Bottle/Flask/Spark. Teapot is built on top of the Zn HTTP components, and less than 500 lines long. More info:

Re: [Pharo-users] [ANN] Teapot 0.8 micro web framework

2014-08-24 Thread Attila Magyar
Esteban A. Maringolo wrote But why use uppercase selectors for HTTP methods? I was struggling with the syntax for a while than I end up having this. I thought it can make easier to see where the route definitions start and end if there are many. And it looks like a HTTP method, as you said too.

Re: [Pharo-users] [ANN] Teapot 0.8 micro web framework

2014-08-24 Thread Attila Magyar
Sven Van Caekenberghe-2 wrote Are there any tests ? Examples ? There is a test package, but it is not part of the metacello config. You can see it, if you add the repositiory and load the project from there. There are no large examples so far, only the REST like book app on the smalltalkhub

[Pharo-users] Some TDD Coding Kata videos

2014-06-02 Thread Attila Magyar
I'd like to share some videos about TDDing codeing katas. http://smalltalkhub.com/#!/~zeroflag/TDD-Kata Most of them are solved in a TDD as if you meant it style, so the code is written in the test at first, and factored out later. During this I tried to use as much refactoring as possible,

Re: [Pharo-users] [ANN] BabyMock 2

2014-04-24 Thread Attila Magyar
I made up an example because it makes easier to talk about this. Let's say, I want to test the #addAll: method of the OrderedCollection. If #addAll: is implemented as a loop that uses the #add: method (itemsToBeAdded do: [:each | self add: each]) then would you test the #addAll: isolated from the

Re: [Pharo-users] [ANN] BabyMock 2

2014-04-24 Thread Attila Magyar
This looks like a slightly different problem to me, where something has a hardcoded, hidden dependency (a global class object), which is not substitutable by design, but we want to replace it from the test to something that answers the canned value. I understand the practical arguments that

Re: [Pharo-users] [ANN] BabyMock 2

2014-04-23 Thread Attila Magyar
Hi Christophe, I'm not sure I fully understand, are you referring to partial mocking? Where you have a real object but with some mocked methods? If this is the case, then no, this is not supported. Some people consider this as a test smell, and I agree with them. Maybe the object under test is

Re: [Pharo-users] [ANN] BabyMock 2

2014-04-23 Thread Attila Magyar
Christophe Demarey wrote ... but sometimes, even in a well-designed class, you may need to test a very small part of this class, and in this case, you need a real object with some mocked methods. I assume that there is a method need to be tested, but it calls towards an other either public or

Re: [Pharo-users] [ANN] BabyMock 2

2014-03-12 Thread Attila Magyar
Thanks for the nice words to everyone. -- View this message in context: http://forum.world.st/ANN-BabyMock-2-tp4748530p4748878.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] [ANN] BabyMock 2

2014-03-11 Thread Attila Magyar
I'm pleased to announce the 2.0 version of BabyMock. BabyMock is a visual mock object library that supports test-driven development. This version has a new syntax which is incompatible with the old version. Therefore it has a new repository http://smalltalkhub.com/#!/~zeroflag/BabyMock2 (BabyMock