Camelia, the Perl 6 bug

IRC log for #mojo, 2012-09-18

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:23 biz joined #mojo
00:36 Averna joined #mojo
00:58 laouji joined #mojo
00:59 garu dvinciguerra: hi! glad to see it was just an html typo. In any case, if you ever feel you're lost in translation and need to quickly check something in pt-br, feel free to /query me :)
00:59 garu inokenty++
01:10 mandreacchio joined #mojo
01:22 xaka joined #mojo
01:29 l3l1p joined #mojo
01:39 pingup3rl joined #mojo
01:53 d4rkie joined #mojo
02:30 l3l1p joined #mojo
02:44 noganex_ joined #mojo
02:55 kitt_vl joined #mojo
03:37 pingup3rl joined #mojo
04:05 asarch joined #mojo
04:12 l3l1p joined #mojo
04:18 xaka joined #mojo
04:19 nour how do I include a : in a route
04:25 mandreacchio_ joined #mojo
05:18 mandreacchio joined #mojo
05:20 vishwanathms joined #mojo
05:20 vishwanathms_ joined #mojo
05:30 pingup3rl joined #mojo
05:58 daxim joined #mojo
06:04 spleenjack joined #mojo
06:15 Vandal joined #mojo
06:59 osprey_ joined #mojo
07:03 batman joined #mojo
07:25 arthas joined #mojo
07:28 pingup3rl joined #mojo
07:29 vishwanathms joined #mojo
07:39 arpadszasz joined #mojo
07:39 vishwanathms_ joined #mojo
07:43 fhelmber_ joined #mojo
07:52 biz joined #mojo
07:58 * tempire percolates
08:01 pau4o joined #mojo
08:10 vishwanathms joined #mojo
08:10 vishwanathms_ joined #mojo
08:13 cosmincx joined #mojo
08:21 davido joined #mojo
08:22 dross tempire: bit early for coffee
08:25 nic Thank goodness Mojolicious doesn't dictate UI styles:
08:25 nic "Is there a way of manly changing to correct cost?"
08:25 nic [email from a manager]
08:27 daxim this goes into the quote file
08:35 Britzel joined #mojo
08:37 crab manly changing to correct cost? wtf?
08:39 davido I hope I'm not the only one who doesn't get it. ;)
08:41 nic I'm guessing the sender meant 'manually' and didn't read before sending (or thinks that's how it's spelled)
08:41 nic It just made me chuckle picturing switching your button set between 'manly' and 'girly'
08:41 marcus it's not manly to charge the correct cost!
08:42 marcus real men overcharge.
08:44 crab marcus; haha
08:44 nour i love u
08:51 * nour electricutes himself
08:51 Kwa Manly changing is using one arm to take your t-shirt off (getting your head stuck in the process) and dumping it on the floor next to discarded pizza boxes. Womanly changing is when they do that efficient crossed arm at the base of the t-shirt thing and pull upwards in a smooth motion.
08:51 Netfeed marcus: unless the correct cost is a much higher cost
08:52 Kwa Question, do any men here do the crossed arm thing to take off their tops?
08:52 davido How could people be so misinformed: http://www.perlmonks.org/?node_id=994001
08:57 dross well you know
08:57 dross people are stupid
08:57 purl A *person* can be smart. *People* are dumb, panicky, stupid animals and you know it.
08:57 dross :)
08:57 dross not everythign requires a damned framework :P
08:58 dross there used to be a time where people would write CGIs... from scratch
08:59 AmeliePoulain joined #mojo
08:59 Netfeed i like the idea of many small libs instead of fullblown frameworks where you can change the lib if you find a better one. so you don't get "djungles" like rails
09:01 davido This is true.  But look how far into the thread it took before someone mentioned HTML::Template.  And that came after someone else suggested rolling your own tool (presumably he means a templating system)
09:02 dross x)
09:03 dross davido: every time I see a thread like that, I end up thinking about work
09:03 davido lol.
09:03 dross i.e. 40 minutes discussing with the WHOLE development team about changing ints to big ints in the databases
09:03 crab kwa: i do, but i also sometimes grab the back of the shirt at the neck and pull it off
09:03 dross my stance: "stop fucking talking and program motherfucker" :3
09:04 davido :)
09:06 Netfeed i'm very happy that i don't work with UI, they really like to pixel push stuff at my work
09:07 Kwa crab: Glad it's not just me. I always feel a little wrong when I do as I associate it as a womanly process. (I blame hiding in cubicles, and Porky's.)
09:15 crab the manly thing to do would be to never change your shirt, just let it fall off eventually
09:18 Kwa :)
09:19 dross heh
09:21 * dross ponders making an installer for this mojo based CMS which uses mongodb for everything
09:21 dross gotta love how OpenShift is free
09:22 crab what's openshift/
09:22 dross really
09:23 dross MFW
09:23 dross crab: it's redhat's cloud service, which is all EC2 based
09:24 dross their "small gear" is a 512 MB mem, 1GB disk space
09:25 dross you can have 3 free gears
09:26 dross if you wanted to abuse the service, you could easily create more accounts :)
09:27 xaka joined #mojo
09:29 pingup3rl joined #mojo
09:29 dross crab: for stuff which I don't care too much about, I'll use IntoVPS, $10 a month, you can't really beat 30GB HD, 512MB ram(1GB burstable), and 500GB tranfer :P only con is the business is ran out of romania(even though the server are colo'd all over)
09:35 Netfeed that's cheap
09:39 davido What does OpenShift have over Heroku or dotCloud?
09:54 * sri yawns
09:55 crab it makes sri yawn
09:56 andrefs joined #mojo
10:16 Lucas1 joined #mojo
10:20 marcus sooo tired
10:20 marcus squash is hard!
10:24 * crab squishes marcus round the edges
10:24 Lucas1 joined #mojo
10:26 Lucas1 joined #mojo
10:30 ladnaV joined #mojo
10:31 Lucas11 joined #mojo
10:32 nour OpenPop
10:32 nour OpenPush
10:32 nour OpenUnshift
10:37 nour left #mojo
10:37 nour joined #mojo
10:42 Lucas1 joined #mojo
10:42 biz joined #mojo
10:43 Lucas1 joined #mojo
10:53 dvinciguerra garu: thanks then! ;)
10:54 Lucas1 joined #mojo
10:56 marcus crab: I crushed my opponent tho.
10:57 judofyr joined #mojo
11:16 pingup3rl joined #mojo
11:42 crab marcus: excellent
11:51 Vandal joined #mojo
11:51 batman anyone who knows if nginx can create log files with a different group id than root?
12:20 ryozi joined #mojo
13:04 bluescreen joined #mojo
13:12 pingup3rl joined #mojo
13:15 mire_ joined #mojo
13:28 vervain joined #mojo
13:30 asarch joined #mojo
13:34 jnap joined #mojo
13:37 vel joined #mojo
13:38 gryphon joined #mojo
13:40 good_news_everyone joined #mojo
13:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/A0qlwA
13:40 good_news_everyone [mojo/master] improved Hypnotoad to clean up old PID files containing a 0 - Sebastian Riedel
13:40 good_news_everyone left #mojo
13:40 sri apparently this allows hypnotoad to work with Daemon::Control, which seems quite useful
13:41 sri it allows you to generate init scripts easily
13:43 d4rkie joined #mojo
13:49 good_news_everyone joined #mojo
13:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_xZ8yg
13:49 good_news_everyone [mojo/master] updated Changes file - Sebastian Riedel
13:49 good_news_everyone left #mojo
13:49 sri https://metacpan.org/modul​e/Daemon::Control#SYNOPSIS
13:49 jnap joined #mojo
14:26 Britzel_ joined #mojo
14:29 l3l1p joined #mojo
14:34 Leandr joined #mojo
14:39 knshaum joined #mojo
14:41 sri *crickets*
14:47 nic \o/
14:48 nic being able to use Daemon::Control is v v useful over here
14:48 nic thanking you
14:48 sri \o/
14:48 nic It's on my list of things to start using, but hadn't gotten around to trying it with the big toad yet
14:49 nic s/big/fast and nimble/
14:49 nic (just realised he's probably listening)
14:49 sri ALL GLORY TO THE HYPNOTOAD!
14:51 nic thanks for that, Neil; with that excluded, the hotcopy is less than 1 minute
14:52 nic heh, wrong channel :P
15:19 labrown joined #mojo
15:24 vel joined #mojo
15:26 Lucas1 joined #mojo
15:33 judofyr joined #mojo
15:47 pingup3rl joined #mojo
15:47 jnap joined #mojo
16:08 ZadYree joined #mojo
16:11 pau4o left #mojo
16:14 abra joined #mojo
16:20 biz joined #mojo
16:23 jzawodn joined #mojo
16:27 vel joined #mojo
16:29 mire_ joined #mojo
16:50 xaka joined #mojo
16:52 xaka joined #mojo
17:06 rem_lex| joined #mojo
17:08 jnap joined #mojo
17:41 njlg joined #mojo
17:43 vel joined #mojo
17:59 pingup3rl joined #mojo
18:01 vel joined #mojo
18:16 jnap_ joined #mojo
18:58 andrefs joined #mojo
19:02 kmx sri: an idea about warning Mojo::Reactor::EV thread unsafety - what about to add to Mojo/Reactor/EV.pm this:
19:02 kmx sub CLONE { die "Mojo::Reactor::EV is NOT thread-safe consider setting\nyour env variable MOJO_REACTOR to Mojo::Reactor::Poll\n" }
19:04 sri kmx: i like that option the most so far, gonna think about it
19:05 sri i guess EV will never support ithreads ;p https://metacpan.org/module/EV#ITHREADS
19:07 kmx sri: yes, I know about his opinion about ithreads
19:08 kmx sri: I was thinking about having something like ithreaded production server (something like hypnotoad based on ithreads)
19:08 kmx I am not sure how to best glue it with mojo's io looping
19:11 kmx the thing what I need is to have Mojo::Server::SomethingLikeDaemon which will not listen but will have something like $daemon->take_already_accepted_socket
19:12 batman joined #mojo
19:15 batman joined #mojo
19:25 davido joined #mojo
19:40 andrefs joined #mojo
19:45 test123 joined #mojo
19:48 test123 joined #mojo
19:48 test123 joined #mojo
19:49 sri kmx: that kinda exists, but is not supported
19:49 sri and rather ugly ;p
19:50 bc547_ joined #mojo
19:50 sri with MOJO_REUSE
19:51 test123 joined #mojo
19:52 test123 joined #mojo
19:52 sri guess i shouldn't tell you about it... xD
19:53 kmx sri: I can set fileno of already accepted socket to MOJO_REUSE and start server?
19:54 kmx sri: my ithreaded scenario is like this:
19:54 sri kinda...but it's a bad idea, please forget it
19:55 kmx I have one dispatcher thread (listening on let!s sat localhost:3000) + N workers
19:55 sri i know basically nothing about ithreads, don't think i'll be of much help
19:56 * sri doesn't even compile his perl with ithreads
19:56 kmx dispatcher accepts incomming connection and passes fileno of corresponding socket (which is at this moment already accepted) to any available worker thread
19:56 kmx sri: ok, now comes mojo related part
19:57 sri stop right there
19:57 xaka wonder what the ithreads state now in perl, long long time ago docs were saying "do not use it!". anything has changed?
19:57 sri our daemon is all about non-blocking i/o
19:57 sri i don't think what you're planning will fit in there at all
19:57 sri nor will it result in good performance
19:58 sri xaka: nope
19:58 kmx sri: I have no problem starting non-blocking ioloops in more threads, it works
19:58 sri ithreads is basically total garbage, but it's useful for emulating fork on windows
19:59 sri kmx: then why don't you follow the hypnotoad model?
20:00 kmx sri: because in hypnotoad all fork processes are listening at the port at the same time
20:00 sri false
20:00 sri only one is at a time
20:00 sri and an accept mutex decides
20:01 kmx yes, but this does not work with threads (at least not portably or maybe I just do not know)
20:01 sri it's basically the nginx architecture
20:01 sri why doesn't that work with threads?
20:02 sri i always thought the big blocker for hypnotoad on windows would be the zero downtime restart
20:02 kmx only the first thread will start listening, in other listen() fails
20:03 sri wait wait wait, the manager process starts listening
20:04 sri workers inherit the socket
20:05 kmx sri: I am not using this approach (I do not remember what was the reason)
20:06 kmx afk for 10mins
20:09 xaka joined #mojo
20:22 kmx as for the the approach: "start listening before creating worker threads" I can test it again but it was not working for me well in the past
20:23 kmx the only way to make reliable ithreaded network daemon I have found out was to have one listening dispatcher + passing fileno's of accepted handles to workers
20:23 xaka joined #mojo
20:24 kmx there were even troubles with passing handle/socket objects between threads - as fileno is pure number it works fine
20:25 kmx This is a skeleton of ithreaded net daemon I am using in other project and which seems to work nice
20:25 kmx What I was thinking about was to create a Worker thread where at startup time I'll do something like this:
20:26 kmx my $mojosrv = Mojo::Server::SomethingLikeDaemon->new;
20:26 kmx $mojosrv->load_app('...');
20:27 kmx $mojosrv->ioloop->recurring(0.3 => sub { #get accepted socket from main thread and pass it somewhere# });
20:28 kmx adm of course then just: $mojosrv->run;
20:29 sri the 0.3 delay will suck for benchmarks
20:31 gryphon joined #mojo
20:32 kmx at that point I have a kind of queue object at which I can call non-blocking check for incoming data (e.g. in recurring handler) or to make a blocking check (which will obviously block the whole mojoloop for the given worker thread)
20:33 sri the daemon almost does what you want
20:33 sri https://github.com/kraih/mojo/blob/m​aster/lib/Mojo/Server/Daemon.pm#L165
20:33 sri that's the block of code you would have to replicate
20:34 sri my $id = $daemon->ioloop->stream(my $stream = Mojo::IOLoop::Stream->new(IO:​:Handle->new_from_fd($fd)));
20:36 sri if you want to try an extremely hackish proof of concept
20:38 kmx thanks, I am already trying to put this into my demo server
20:39 sri https://github.com/kraih/mojo/blob/mast​er/lib/Mojo/Server/Daemon.pm#L165-L185
20:39 * sri likes github highlighting :)
20:40 sri i don't see a way for us to support what you're doing with a pretty public api though, you may have to fork the whole module
20:41 kmx sri: I fully agree
20:51 sri http://hastebin.com/raw/mokotebebo # closest i've gotten to something that doesn't totally suck... but it's not exactly pretty
20:51 sri also fails a few tests... didn't bother to look further ;p
20:53 kmx cool it works
20:55 kmx sri: thanks, thanks for your time
20:55 sri yw, thanks for asking something interesting :D
20:57 sri let me know how it performs
20:57 kmx sri: I'll try to polish it a bit (now it is a script with approx. 20 lines) and put it just for "future generations" on my github
20:58 kmx ok, I'll try to compare it with hypnotoad
20:58 kmx thanks again
20:58 sri ALL GLORY TO THE HYPNOTOAD!
20:58 kmx :)
21:00 sri actually i always wanted to try a central acceptor for hypnotoad, if only sendfd was better supported
21:01 sri i bet replacing the accept mutex with a central load balancer would result in much better performance
21:03 lukep joined #mojo
21:04 sri and of course pipes between the manager and each worker to wake them up individually, would bring down cpu usage drastically
21:04 * sri is jealous of sendfd support in node.js
21:22 xaka joined #mojo
21:45 Adura Imptoved tests...!
22:08 dvinciguerra joined #mojo
22:30 dvinciguerra joined #mojo
22:55 * sri sets Adura on fire
23:19 mandreacchio joined #mojo
23:26 xaka joined #mojo
23:46 good_news_everyone joined #mojo
23:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/t60xVA
23:46 good_news_everyone [mojo/master] small optimizations - Sebastian Riedel
23:46 good_news_everyone left #mojo
23:58 dvinciguerra joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary