Camelia, the Perl 6 bug

IRC log for #mojo, 2012-09-14

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

All times shown according to UTC.

Time Nick Message
00:10 gryphon joined #mojo
00:16 spleenjack joined #mojo
00:27 mandreacchio joined #mojo
00:42 asarch joined #mojo
00:54 laouji joined #mojo
00:56 mandreacchio joined #mojo
01:36 mandreacchio_ joined #mojo
01:54 d4rkie joined #mojo
02:17 mandreacchio joined #mojo
02:26 yakudza joined #mojo
02:37 xaka joined #mojo
02:41 Foxcool joined #mojo
02:50 noganex_ joined #mojo
02:55 mandreacchio joined #mojo
03:07 mandreacchio joined #mojo
03:17 dross joined #mojo
03:30 mattastrophe joined #mojo
05:02 mandreacchio joined #mojo
05:02 mandreacchio joined #mojo
05:09 mandreacchio_ joined #mojo
05:15 mandreacchio joined #mojo
05:19 laouji joined #mojo
05:20 mandreacchio joined #mojo
05:31 sri o/
05:40 mattastrophe joined #mojo
05:43 cosimo joined #mojo
05:46 janliese1dahl_de joined #mojo
05:47 inokenty joined #mojo
05:48 zivester joined #mojo
05:49 human39 joined #mojo
05:52 estrai joined #mojo
05:54 ki0 joined #mojo
05:55 Foxcool joined #mojo
06:01 mandreacchio joined #mojo
06:07 Vandal joined #mojo
06:10 ladnaV joined #mojo
06:14 mattastrophe joined #mojo
06:17 mandreacchio joined #mojo
06:22 Foxcool joined #mojo
06:22 crab o-
06:25 estrai joined #mojo
06:26 tempire joined #mojo
06:31 estrai_ joined #mojo
06:42 kvorg joined #mojo
06:51 abra joined #mojo
07:00 batman joined #mojo
07:04 s0va joined #mojo
07:16 fhelmber_ joined #mojo
07:18 batman joined #mojo
07:25 AmeliePoulain joined #mojo
07:33 abra joined #mojo
07:43 marcus frickin' literals!
07:49 mandreacchio joined #mojo
07:54 mandreacchio joined #mojo
08:01 cosmincx joined #mojo
08:02 judofyr joined #mojo
08:03 pau4o joined #mojo
08:29 nic yay, s0va is back!
08:29 nic He did an impressive job of ignoring my messages, but they must have succeeded in tricking him into rejoining us
08:41 crab nic: what?
08:42 crab (a) s0va doesn't seem to be here, (b) what messages, and why did he ignore them? (c) who is they, and how did they trick him?
08:47 nic ok ok i'll answer your questions, just please stop shining that light in my face and throwing water over my head
08:48 nic (a) he was here yesterday evening till this morning, after an absence of nearly a year
08:49 nic (b) I've been messaging his cpan account and twitter account
08:49 nic (c) that would be revealing sources and techniques that could aid my competition
08:50 nic s0va == @graco == github.com/bfg == originator of MojoX::Run
08:51 nic not that I've been stalking him or anything
08:52 * crab puts away the water
10:00 phillipadsmith joined #mojo
10:03 daxim joined #mojo
10:10 chansen joined #mojo
10:12 andrefs joined #mojo
10:15 yakudza joined #mojo
10:39 Lucas1 joined #mojo
10:55 marcus http://www.youtube.com/watch?v=1GaKaGwch0U
10:56 pau4o joined #mojo
11:14 marty marcus: lol.  That made no sense to me until I figured out it was a parody of a real (real bad) song.  :)
11:15 sri wait, that's a parody? :o
11:15 asarch joined #mojo
11:33 Lucas1 joined #mojo
11:46 Netfeed is it possible to push on to a M::Collection, or do i have to build an array first and then create the object?
11:48 judofyr Netfeed: M::Collection is just a blessed arrayref. you can do anything you can do on an arrayref :)
11:48 Netfeed sweet
11:48 judofyr push @$coll, 123
11:49 judofyr or in newer Perls: push $coll, 123
11:49 judofyr (5.14 is it?)
11:49 sri and it's documented, so it's not just a side effect http://mojolicio.us/perldo​c/Mojo/Collection#SYNOPSIS
11:49 judofyr sri: maybe it should be mentioned outside of the code example too?
11:49 pingup3rl joined #mojo
11:50 sri maybe
12:05 ryozi joined #mojo
12:25 good_news_everyone joined #mojo
12:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/8EyAjg
12:25 good_news_everyone [mojo/master] documentation tweaks - Sebastian Riedel
12:25 good_news_everyone left #mojo
12:33 rem_lex joined #mojo
12:41 Netfeed i'm starting to get an idea for how to build an orm with mojo as base, a very simple one with only read capabilities to start
12:42 Foxcool joined #mojo
12:43 Netfeed i'm not happy about my grammar skills
12:50 sri you shouldn't build your own orm
12:50 marcus you shouldn't steal a car.
12:51 sri you shouldn't cook meth
12:52 Netfeed i'm using the term "orm" very loosely, it will more or less be objects that is populated by more or less simple sql and nothing fancy at all, just a place to store functions/methods for a rowset
12:54 Leandr joined #mojo
12:55 asarch joined #mojo
12:59 Netfeed http://hastebin.com/romogovinu.pl <-- something like that, just containers more or less
13:02 Ulti left #mojo
13:03 memowe O HAI \o
13:10 mire_ joined #mojo
13:20 marcus building ORMs is a crime!
13:20 bluescreen joined #mojo
13:20 memowe Because DBIC exists?
13:21 Netfeed i've not found any that i actually like for perl, way to chatty
13:31 mars joined #mojo
13:33 sri because building a decent ORM is *a lot* of hard work, months of trial and error
13:34 sri and you're pretty much required to build a community around it, since supporting multiple database adapters is not a single person task
13:35 Jason__ joined #mojo
13:35 mars hello) I'm trying install mojolicious, curl get.mojolicio.us | sh , and I have problem http://pastie.org/4719878
13:37 jnap joined #mojo
13:37 Netfeed sri: i agree, and that's why i use the term "orm" very loosely in this case :)
13:38 sri perhaps orm is the wrong term
13:38 Netfeed i think so, container feels better
13:38 sri maybe you mean just a model layer
13:38 Netfeed yeah, maybe
13:38 purl somebody said yeah, maybe was what i need for optional positionals
13:39 sri hmmmm, fulltext indexing is now the number 1 task on the mongodb todo list, neat
13:40 sri with mongodb getting better and better one has to wonder when oracle will buy it :S
13:41 Netfeed buy it and make it closed source
13:46 Lucas1 joined #mojo
13:48 judofyr_ joined #mojo
13:53 gryphon joined #mojo
13:57 asarch joined #mojo
14:16 jnap joined #mojo
14:22 vel joined #mojo
14:28 nic zpmorgan: This problem isn't as broad as I thought
14:29 nic Now I'm getting my head around it
14:29 nic The 'cmd' test passes if I don't use EV
14:29 nic (I think it might be best to exclude EV till we understand the bug better)
14:30 nic So I just need to understand why exit_cb gets invoked within the parent process and one of the children never logs its own
14:30 nic Of the 3 children, 1 logs correctly, 1 logs twice, 1 logs not at all, and the parent sneaks in and logs 3 times
14:31 * nic assumes everyone is picture little piggies
14:40 knshaum joined #mojo
15:08 mattastrophe eddies in the space-time continuum?
15:13 memowe mattastrophe += 42
15:25 zpmorgan nic, I see. but isn't exit_cb supposed to be called in the parent only?
15:25 nic I haven't read that far yet :)
15:25 nic got distracted debugging why stdin throws errors on close
15:34 nic oh, it's simply cos in each instance stdin is undef
15:37 zpmorgan it is?
15:37 purl Oh no it isn't!
15:45 zpmorgan nic, do you suppose it's possible to use a pipe||socket instead of sigchld?
15:47 njlg joined #mojo
15:52 nic tbh I've no idea; I'm still very early in my learning of these things :)
15:55 nic I don't want to annoy the rest of the channel, and you're probably busy with other things, so I'll collect my ramblings into a file
15:57 nic my hope is that if we understand the scope of what's broken and clean up the code a bit and send sri an ascii keg of beer, he might give us a steer as to which way to take it
15:58 sri what are you doing?
15:58 purl hanging around with these dorks here, as usual :(
15:59 sri botsnack!
15:59 purl :)
16:00 xaka joined #mojo
16:02 sri zpmorgan: pipe/socket instead of sigchld for what?
16:03 zpmorgan detecting when children are finished in mojox::run
16:04 sri it isn't really finished since the pipe/socket is still open
16:04 sri oh wait, you want to use the close to detect the child going down
16:05 zpmorgan yep, good idea?
16:05 sri i do that in hypnotoad so children can detect if the parent died
16:05 sri it works
16:05 sri you can't use pipes though, they don't work on windows
16:06 zpmorgan cool beans. I'll check that out.
16:06 sri on windows it should actually be a lot more reliable than signals :)
16:07 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojo/Server/Hypnotoad.pm#L312
16:08 sri that's the whole code i use, if the write fails the child commits suicide
16:09 labrown joined #mojo
16:09 sri it's a pipe though, and i depend on atomicity
16:17 zpmorgan Unfortunately, I can't depend on children to go out of their way to read from anything.
16:18 zpmorgan wouldn't it start blocking or fail once its buffer is full?
16:18 sri what do you mean?
16:19 jzawodn joined #mojo
16:20 zpmorgan unless the child reads from the pipe/socket, that data is just going to sit there, right?
16:21 sri what data?
16:21 purl i heard data was in the database, but whereas $c->model('DB::Play')->search( { player => $pid, league => $leagueId, topic => $topic, story => $story }) works in other cases.
16:21 zpmorgan um, the heartbeat
16:21 purl i think the heartbeat is about 1-2Hz
16:21 sri ah, yes
16:22 sri the parent has a poll watcher on the pipe though, and reads everything it can get all the time
16:23 sri and heartbeats happen only every 5 seconds or so
16:25 sri i would assume in your case you wouldn't even have to write anything
16:27 zpmorgan okay, that's exactly what I was wondering
16:28 zpmorgan thanks sri
16:28 sri you just watch for readable, try to read and get a ECONNRESET or so
16:28 sri i don't know about the timing though
16:29 sri odds are there will be a delay between process actually exiting and connection close
16:30 sri you should make a tiny proof of concept module :)
16:31 sri something that just forks a process, runs a block of code, serializes the return value, sends it over the socket and exits
16:31 sri no other i/o handles, just basics
16:31 * sri would be interested in that
16:32 zpmorgan I'd like to try that this weekend :)
16:32 nic \o/
16:32 sri \o/
16:32 zpmorgan o
16:32 nic I know this is a dumb question, but what is "the socket" in that picture?
16:33 sri a portable pipe alternative
16:33 sri a fake pipe kinda
16:33 d4rkie joined #mojo
16:33 nic between the run object and a client that made the job request?
16:33 sri you set up a fake listen socket, connect, and reuse the resulting connection
16:34 nic or is the spawned child that is sending over a socket to the parent (run) process?
16:34 sri all setup happens in the mojolicious process
16:34 sri before fork
16:34 sri one side just stays in mojolicious the other goes to the forked process
16:35 nic I see
16:36 sri dngor recently released a module for creating fake pipes https://metacpan.org/module/IO::Pipely
16:40 sri perl totally needs goroutines -.-
16:43 inokenty Netfeed: Why don't you use DBIx::Simple?
17:02 rwstauner boo hoo: https://github.com/kraih/mojo/commit/f5​5dd1116b337a72ba3696dcdb793c9ee19be3d6
17:02 sri rwstauner: some are back though
17:02 rwstauner :-)
17:03 sri zpmorgan, nic: you could also try to solve the signal problem properly ;)
17:04 sri as in add signal watchers to Mojo::Reactor/Mojo::IOLoop and rewrite the Morbo/Hypnotoad mainloops to use Mojo::IOLoop
17:05 nic oh heck, for a second there I thought you were going to say something I was capable of doing before Christmas :)
17:05 sri :(
17:06 zpmorgan sri, maybe. I'll have to find a few people that actually know what they're doing.
17:07 nic I'm extremely happy to help with testing/documentation/whatever, but my knowledge at the mo isn't up to contributing code for those things
17:09 zpmorgan nic, ditto.
17:17 rwstauner garu: marcus: PAUSE seems confused about MojoX::Renderer::Haml and Mojolicious::Plugin::HamlRenderer... and for me they're both broken
17:18 sri hmm... actually converting Morbo/Hypnotoad to run inside a Mojo::IOLoop is easy
17:18 sri the big problem is making Mojo::IOLoop forkable
17:19 sri Hypnotoad preloads the app in the manager process, that means if your app sets a timer it would be in the manager Mojo::IOLoop instance
17:20 sri that seems like an unsolvable problem
17:22 Netfeed inokenty: i started too, but i don't know, seems to add a bit too much dependencies for my taste
17:24 patspam joined #mojo
17:24 sri here's a patch that converts Morbo to Mojo::IOLoop http://hastebin.com/raw/faregayuro
17:24 sri you'll see the problem once you try starting it :)
17:25 sri (dies with "Timer 02dce77da6c892364a586b6480153baa failed: Mojo::IOLoop already running at /Users/sri/repo/mojo/script/​../lib/Mojo/Server/Morbo.pm line 100.")
17:25 sri sooo, Mojo::IOLoop would have to be made fork safe
17:26 sri (i'm not even sure what that means)
17:29 Netfeed maybe i just have NIH problems
17:32 marcus faregayuro
17:32 marcus nice pasteid
17:34 sri i think converting morbo/hypnotoad is impossible, too much breakage
17:34 sri we need another solution
17:36 Netfeed a new implementation called spacebee!
17:37 pingup3rl joined #mojo
17:37 sri i've looked into AnyEvent, and it doesn't really play nice with others
17:37 marcus I don't quite understand the problem you want to solve?
17:37 marcus Forking the ioloop?
17:38 sri was thinking that we maybe could wrap existing signal handlers or so... but that doesn't work
17:38 sri marcus: SIGCHLD
17:38 sri both morbo and hypnotoad depend on it, which makes it hard to use in mojolicious apps
17:39 marcus sri: but that's used to tell a process that a child dies right?
17:39 marcus sri: forking inside the ioloop seems wrong in itself.
17:39 sri right
17:40 Netfeed a new development server called linda and a production server called spacebee
17:40 marcus apart from it not working.
17:40 sri that's how MojoX::Run works
17:40 sri it forks to run some blocking code in another process
17:40 marcus sri: I understand, but I still think that is crack-fueled.
17:40 sri maybe, but it keeps coming up all the time :S
17:40 marcus I just wish we had sane threading.
17:41 sri personally i would always use a job queue
17:41 marcus yea
17:41 gryphon joined #mojo
17:42 sri maybe diegok should release Mojolicious::Plugin::Resque *hint hint*
17:42 marcus do you even need it?
17:43 marcus can't you just use https://github.com/diegok/resque-perl ?
17:43 sri you can, but you know it's not obvious to many folks ;p
17:43 marcus I guess a plugin would be trivial
17:44 marcus it's like any other model
17:44 rwstauner garu: marcus: https://rt.cpan.org/Ticket/Display.html?id=79651 https://rt.cpan.org/Ticket/Display.html?id=79652
17:44 marcus rwstauner: I don't use it, so it's up to garu I am afriad.
17:44 marcus afraid
17:45 rwstauner ok, the main issue is that the releases are out of sync
17:45 rwstauner granted, both releases break against the latest mojolicious, but that's a separate issue
17:45 marcus not sure why garu gave his release a lower version number than mine.
17:45 marcus his was released after
17:46 rwstauner seems like he forked from an earlier version or something
17:46 rwstauner the reason they show up in the mod list they way they do is that 1 release declares a version for 1 module and the other for the other, but neither versions both
17:48 rwstauner marcus: if garu's is the "canonical" version i can send him a github pull req to straighten them out
17:48 rwstauner although i'm tempted to just give up on using this dist
17:48 rwstauner :-/
17:49 rwstauner but i hate to leave cpan in a state of "broken"
17:50 marcus http://storify.com/marcusramberg/conversat​ion-with-marcusramberg-vtivti-and-garu-rj
17:51 rwstauner ok
17:51 rwstauner thanks
17:51 marcus rwstauner: I can give you privs too if you want to upload a working version
17:51 marcus or I could upload it for you
17:52 marcus I just don't have tuits for fixing it.
17:52 rwstauner yeah i'd be willing to merge them all and upload a new one
17:53 rwstauner i keep my mojo  (and everything) up to date so i might notice failures faster
17:53 sri why doesn't it work with the latest mojolicious?
17:54 rwstauner one release spews endless (literally) warnings about undef things in loader->data, which may have to do with changes to get_data_template
17:54 marcus rwstauner: what is your cpan id?
17:54 rwstauner then there's a deep recursion error b/c of the render_not_found or whatever
17:54 sri ah that's a bug
17:54 rwstauner RWSTAUNER
17:54 purl you are getting a warning...
17:54 sri https://github.com/garu/mojox-renderer-ha​ml/blob/master/lib/MojoX/Renderer/Haml.pm
17:54 marcus rwstauner: clever ;)
17:54 rwstauner i try to keep things simple
17:55 sri $r->get_data_template($c, $t) needs to be $r->get_data_template($options)
17:55 rwstauner sri, then i noticed there was another release which had different changes
17:55 sri it only worked by accident before :)
17:55 rwstauner sri, thanks for the clarification, that's what i thought it should be
17:55 marcus rwstauner: you are now comaintainer.
17:55 rwstauner marcus: sweet, thanks
17:55 sri MAINTAIN ALL THE THINGS!
17:55 * marcus passes
17:56 marcus DON'T BOGART THAT DISTRO MY FRIEND!
17:56 rwstauner i'll merge ALL THE THINGS as best i can
17:56 rwstauner i know not how to bogart a distro, but i'll try no to
17:57 * rwstauner wonders if more typos would have made that sentence more or less confusing
17:57 sri it's interesting though, this is the second time i see $c passed to get_data_template
17:57 marcus http://www.youtube.com/watch?v=EvGJvzwKqg0
17:57 sri wonder if there's a bad example somewhere
17:58 rwstauner sri: is that how get_inline_template used to work?
17:58 sri nope
17:58 rwstauner then i don't know
17:58 marcus sri: it's probably cargo culted from the tt renderer.
17:58 sri it used to require ($options, $template_name)
17:58 sri then got more liberal and required only ($options)
17:58 rwstauner i did notice that recent change in the mojo history
17:59 rwstauner as i was trying to diagnose the issue
17:59 rwstauner and i wondered why it was $c instead of $options
17:59 sri $c should never have been passed to it, bit puzzling
17:59 rwstauner but didn't look further
18:00 sri marcus: that may be
18:14 Netfeed is there any package in mojo that subclasses Mojo::Base and has its own new-method?
18:15 sri quite a few
18:15 purl quite a few are funny
18:15 Netfeed got a name for one?
18:16 Netfeed found one
18:26 Lucas11 joined #mojo
18:32 zpmorgan https://github.com/videlalvaro/gifsockets
19:11 Britzel joined #mojo
19:39 pingup3rl joined #mojo
19:59 xaka joined #mojo
20:07 dpetrov_ joined #mojo
21:50 xxtjaxx_ sri: why is the Mojo::UserAgent built so that a get request to a non existant domain is returning an undef? Is there no better way of expressing this?
21:56 mandreacchio joined #mojo
21:57 mandreacchio joined #mojo
22:11 tolid_air joined #mojo
22:33 mire_ joined #mojo
22:35 andrefs joined #mojo
22:49 mandreacchio joined #mojo
23:27 pingup3rl joined #mojo
23:31 mire_ joined #mojo

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