code
Golo - Little 5
Ok! That’s time to sync everyone on the state of GoloHttpServer. First of all, I created a GitHub for this and you’re more than welcome to contribute, ask questions or even just talk about it. This will allow you to take a look at the implementation of the run function which handle the Http request and response. function run = |connectedClient, serverState| { let inFromClient = BufferedReader( InputStreamReader (connectedClient:getInputStream())) let outToClient = DataOutputStream(connectedClient:getOutputStream()) let...
26 avr. 2013 — 3 minute(s) readGolo - Little 4
So, last time I told you I started to write some kind of GoloHttpServer. In that process (which is still WIP) I had several questions. One of the first was: a server will receive several requests, I need to launch threads. I knew how to do that with Java, how to do that with Golo. The solution I found is based on the below code: module little.experiment4_1 import java.lang function run = |number| { println...
30 mars 2013 — 2 minute(s) readGolo - Little 2
The D-day is coming for Golo and be sure to attend Julien’s talk at Devoxx ! In the meantime, here is a new piece of Golo. module little.experiment2_1 import java.lang function functionWithCase = |inputParameter| { case { when inputParameter == "This value" { println("this value spotted") } otherwise { println("otherwise was the answer") } } } function main = |args| { functionWithCase("This value") functionWithCase("not something to handle") } This illustrate the...
25 mars 2013 — 2 minute(s) readGolo - Little 1
I think it’s time to start some Golo experiment. Of course, everyone wanted the mandatory HelloWorld. But hey, that’s a blog called “Little Experiment” ;) (at least it was at the writing time in) Ok, ok, the HelloWorld is available at Golo website, and as a present to my fellow readers, here is a copy here ;) module hello.World function main = |args| { println("Hello world!") } Save this to a helloworld.golo file...
23 mars 2013 — 1 minute(s) readGolo
Back to the main purpose of this blog: a new dynamic langage is coming ! Its name: Golo ! The first release is in a close future and all you get on the official website is basic information. Hopefully, Julien Ponge, father of Golo, has started to speak during public talks. The first one took place February 7th at the Lava Jug. You may have a look to the slides and video (in French this time). The...
19 mars 2013 — 1 minute(s) read