Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-27

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

All times shown according to UTC.

Time Nick Message
00:11 ilbot2 joined #mojo
00:11 Topic for #mojo is now Mangolicious! | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
00:12 jberger woah, looks like we lost something
00:12 ruz joined #mojo
00:12 gabiruh joined #mojo
00:12 tomi-ru joined #mojo
00:12 mtths joined #mojo
00:12 tokuhirom joined #mojo
00:12 charsbar__ joined #mojo
00:12 janus joined #mojo
00:12 tardisx joined #mojo
00:12 xxtjaxx joined #mojo
00:12 janliesendahl_de joined #mojo
00:12 avenj joined #mojo
00:12 keedi joined #mojo
00:12 zdk joined #mojo
00:12 dbr joined #mojo
00:12 bizam joined #mojo
00:12 geira joined #mojo
00:12 Lurchentsafter joined #mojo
00:12 priodev joined #mojo
00:12 sivoais joined #mojo
00:12 hesco joined #mojo
00:12 rafl joined #mojo
00:12 al joined #mojo
00:12 HtbaaPi joined #mojo
00:12 lucs joined #mojo
00:12 r0b3rt joined #mojo
00:12 hesperaux joined #mojo
00:12 alnewkirk joined #mojo
00:12 nic joined #mojo
00:12 zivester joined #mojo
00:12 mike_ joined #mojo
00:12 rhaen joined #mojo
00:12 heytrav joined #mojo
00:12 Mad_Dud joined #mojo
00:12 geck joined #mojo
00:12 migo joined #mojo
00:12 bjoernfan joined #mojo
00:12 marcus joined #mojo
00:12 bzero joined #mojo
00:12 jwang joined #mojo
00:12 nicomen joined #mojo
00:12 cosimo joined #mojo
00:12 JiYu joined #mojo
00:12 vervain joined #mojo
00:12 jnbek joined #mojo
00:12 KindOne joined #mojo
00:12 jzawodn joined #mojo
00:12 jontaylor joined #mojo
00:12 Britzel_ joined #mojo
00:12 yakudza joined #mojo
00:12 perlite joined #mojo
00:12 lukep joined #mojo
00:12 njlg joined #mojo
00:12 mawuli_ypa joined #mojo
00:12 jpn joined #mojo
00:12 Adurah_ joined #mojo
00:12 bpmedley joined #mojo
00:12 rem_lex| joined #mojo
00:12 duncanthrax2 joined #mojo
00:12 gryphon_ joined #mojo
00:12 marty_ joined #mojo
00:12 GabrielVieira joined #mojo
00:12 komodo1 joined #mojo
00:12 _xaka_ joined #mojo
00:12 plu joined #mojo
00:12 allison joined #mojo
00:12 sri joined #mojo
00:12 d4rkie joined #mojo
00:12 baton8 joined #mojo
00:12 ask joined #mojo
00:12 phips joined #mojo
00:12 TitanOfOld joined #mojo
00:12 mfontani joined #mojo
00:12 drift joined #mojo
00:12 andrefs joined #mojo
00:12 DaTa joined #mojo
00:13 omega joined #mojo
00:13 diegok joined #mojo
00:13 mattp_ joined #mojo
00:13 graf joined #mojo
00:13 dotan joined #mojo
00:13 toebu joined #mojo
00:13 kongelaks joined #mojo
00:13 Kovensky joined #mojo
00:13 freman joined #mojo
00:13 mire__ joined #mojo
00:13 nelio joined #mojo
00:13 wu-lee joined #mojo
00:13 Annihitek joined #mojo
00:13 kmx joined #mojo
00:13 bayashi_ joined #mojo
00:13 rwstauner joined #mojo
00:13 Gedge joined #mojo
00:13 kthakore joined #mojo
00:13 salparadise joined #mojo
00:13 Polarn joined #mojo
00:13 espent joined #mojo
00:13 t[R]oll joined #mojo
00:13 amirite joined #mojo
00:13 Mikey joined #mojo
00:13 trone joined #mojo
00:13 Mithaldu joined #mojo
00:13 alzeih joined #mojo
00:13 mst joined #mojo
00:13 Caelum joined #mojo
00:13 espen joined #mojo
00:13 garu joined #mojo
00:13 BinGOs joined #mojo
00:13 tagg joined #mojo
00:13 Grrrr joined #mojo
00:13 bc547 joined #mojo
00:14 Mike-PerlRecruiter_ joined #mojo
00:14 jeen joined #mojo
00:15 jberger it didn't boot me
00:15 jberger :-)
00:17 shmuel joined #mojo
00:19 batman joined #mojo
00:22 moltar joined #mojo
00:34 freman eaugh, fixed hypnotoad... now the websockets...
00:34 freman sigh
00:38 mattastrophe joined #mojo
00:39 btyler joined #mojo
00:44 jeen joined #mojo
01:05 sri hmm, there is actually one possibility to add monotonic clock support i have not considered yet
01:09 hlin joined #mojo
01:11 ka2u joined #mojo
01:19 good_news_everyone joined #mojo
01:19 good_news_everyone [mojo] kraih created monotonic_clock from master (+0 new commits): http://git.io/vIHbIw
01:19 good_news_everyone left #mojo
01:21 good_news_everyone joined #mojo
01:21 good_news_everyone [mojo] kraih pushed 1 new commit to monotonic_clock: http://git.io/5BnXiQ
01:21 good_news_everyone mojo/monotonic_clock ae00982 Sebastian Riedel: added monotonic clock support through EV
01:21 good_news_everyone left #mojo
01:22 sri freman: you should take a look
01:22 mattastrophe joined #mojo
01:23 travis-ci joined #mojo
01:23 travis-ci [travis-ci] kraih/mojo#304 (monotonic_clock - ae00982 : Sebastian Riedel): The build passed.
01:23 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/d377730d5a4f...ae0098296cae
01:23 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5090030
01:23 travis-ci left #mojo
01:24 sri jberger, marcus, tempire, crab: thoughts?
01:26 freman yeh except I can't just go grab the latest version
01:27 sri odds are it will never go into the latest version
01:27 sri so far it is only an experiment
01:27 egopro joined #mojo
01:27 sri there's a visible performance cost
01:28 freman not surprising
01:28 freman nothing in that patch works on hypnotoad either
01:33 * jberger looks
01:33 * jberger me has very little idea what is going on though
01:34 good_news_everyone joined #mojo
01:34 good_news_everyone [mojo] kraih pushed 1 new commit to monotonic_clock: http://git.io/oHU6Ng
01:34 good_news_everyone mojo/monotonic_clock 922f744 Sebastian Riedel: use monotonic clock for Hypnotoad
01:34 good_news_everyone left #mojo
01:34 jberger yeah, I'm not qualified to have an opinion on this
01:34 sri well, now it does work for hypnotoad
01:34 freman that's better :D
01:35 jberger sri: is the main function that needs tinkering the CORE::time function?
01:35 sri jberger: monotonic time is immune to time jumps (system clock changing)
01:36 sri time jumps mess up event loops pretty bad normally
01:36 jberger if so then freman could just subclass Server::Hypnotoad and Server::Prefork which overrides CORE::time?
01:36 sri timer that never fire, all timers fire at once... timeouts happen too soon
01:36 sri jberger: freman's problem is mostly irrelevant here ;p
01:37 jberger I'm only commenting based on the patch he showed before
01:37 jberger oh ok
01:37 jberger again, I'm REALLY not qualified to comment
01:37 freman I have many problems... time is just one of them
01:37 sri at some point in the future i want to use a monotonic clock by default
01:37 jberger ... but a _____ ain't one
01:37 jberger :-P
01:40 btyler joined #mojo
01:40 jberger is the performance hit because suddenly you have several derefs to get the time?
01:40 jberger sub _time { shift->ioloop->reactor->time }
01:41 sri yea, the method calls cost
01:41 jberger could you store a reference to the method? or better yet, alias to it
01:42 sri sure, but that's not very perl-ish
01:42 jberger aliasing functions is, its just not MODERN perlish
01:42 jberger :-)
01:43 sri we better forget about it again... there is no clean solution ;p
01:43 sri i'll keep the branch around in case it comes up again
01:44 jberger I think if you have *_time = *CORE::time in the base class, then you leave yourself open to let *_time equal something else in a subclass
01:44 jberger and no performance hit in the meantime
01:45 jberger and the subclass doesn't need to override *CORE::time
01:46 jberger I guess it would be *_time = \&CORE::time
01:46 * jberger works on a quick content negotiation exampel
01:49 freman that's pretty much what we're doing now for hypnotoad, that branch will be useful for when I get around to solving websockets and everything else (points me to all the change places)
01:51 sri it's Time::HiRes::time, not Core::time
01:52 freman *Mojo::Time = Time::HiRes::Time :D
02:00 d4rkie joined #mojo
02:05 chansen joined #mojo
02:05 phillipadsmith joined #mojo
02:09 sri oh, i might have an alternative
02:14 freman that's why I like perl - there's always another way
02:16 sri http://pastie.org/6345189 # this one is actually quite realistic, but i can't get it to work
02:17 sri Mojo::Util::time backed by EV::time or Time::HiRes::time
02:18 rem_lex|pivo joined #mojo
02:21 D4RK-PH0ENiX joined #mojo
02:28 sri oh, looks like i got it working :o
02:28 phillipadsmith sri: two questions, 1) okay to use Mango in a fun throw-away prototype at this point? 2) in the examples, you're inserting a perl data structure, but it also seems possible to insert a json object directly (if I'm reading my experiments correctly) -- any up/down side to either?
02:29 sri phillipadsmith: busy with monotonic clock hacking
02:29 phillipadsmith sri: yes, I can see that. :)
02:29 phillipadsmith No rush.
02:29 phillipadsmith Curious more than anything; whenever you have a mo.
02:30 jberger sub time { MONOTONIC ? EV::time : Time::HiRes::time }
02:30 jberger does the compiler optimize that?
02:39 freman http://pastebin.com/1cyPX1tT
02:39 freman worked here :D
02:40 freman need to s/Time/time/
02:42 freman http://pastebin.com/dUUZJm3B - when combined with a tiny test script, the output is EV - 1361932945.46235
02:43 sri i was wrong though, it doesn't work yet
02:44 freman what part?
02:44 sri the part where it has to pass our unit tests
02:45 freman oh yeh :)
02:48 freman perhaps instead of calling it util::time call it util::thetimeweusefortimeoutsnotrealtime
02:53 sri ok, figured it out, all tests pass
02:54 freman so is sub time {} better than assigning aliasing time in the begin block?
02:57 mawuli_ypa joined #mojo
02:57 good_news_everyone joined #mojo
02:57 good_news_everyone [mojo] kraih created fast_monotonic_clock (+1 new commit): http://git.io/DczxhQ
02:57 good_news_everyone mojo/fast_monotonic_clock 457572f Sebastian Riedel: added monotonic clock support to Mojo::IOLoop through EV
02:57 good_news_everyone left #mojo
02:58 sri that branch would work
02:58 mawuli_ypa Hi, how do i render a different view template when inside a view?
02:58 freman steady_time... that's awsome :D
02:59 freman I'll test that on our code here... probably tomorrow I'm going to try and get an early mark today :D
02:59 travis-ci joined #mojo
02:59 travis-ci [travis-ci] kraih/mojo#306 (fast_monotonic_clock - 457572f : Sebastian Riedel): The build passed.
02:59 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/commit/457572f4dacc
02:59 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5091574
02:59 travis-ci left #mojo
03:00 good_news_everyone joined #mojo
03:00 good_news_everyone [mojo] kraih pushed 1 new commit to fast_monotonic_clock: http://git.io/HOZOsw
03:00 good_news_everyone mojo/fast_monotonic_clock e0e95d5 Sebastian Riedel: small optimization
03:00 good_news_everyone left #mojo
03:00 mawuli_ypa i want to render a different template instead of the default template associated with the current module's method name.
03:00 sri jberger, marcus, tempire, crab: ok, that branch is an actual candidate for merging, but i need opinions
03:01 freman I like it :D
03:01 sri EV is always a risk
03:01 sri there's a big chance we get test failures because of it
03:02 freman another option is to detect support in time hires/by platform
03:02 sri that only becomes an option once os x is supported
03:03 sri which might not be anytime soon
03:03 freman I'm just trying to work out how to pull a branch out of git hub
03:05 sri on the plus side, it's a clear performance gain for both, poll and ev reactors
03:09 freman that doesn't seem to be so monotonic...
03:11 freman http://pastebin.com/zBBwFCky
03:17 good_news_everyone joined #mojo
03:17 good_news_everyone [mojo] kraih pushed 1 new commit to fast_monotonic_clock: http://git.io/_wH21A
03:17 good_news_everyone mojo/fast_monotonic_clock 9faa6b8 Sebastian Riedel: a few more optimizations
03:17 good_news_everyone left #mojo
03:17 sri meh, so i wasted my time?
03:23 sri yea, EV::time is not actually monotonic...
03:24 sri the timers can use a monotinic clock which is hidden inside libev
03:25 good_news_everyone joined #mojo
03:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/PcMcyA
03:25 good_news_everyone mojo/master c4d4a4e Sebastian Riedel: formatting fix
03:25 good_news_everyone left #mojo
03:27 sri what a waste of time... damn
03:43 jberger sri: you don't know until you try
03:43 jberger good work
03:55 sri not really, i should have just checked if EV::time is really monotonic :(
03:56 sri there is another monotonic time source
03:56 sri perl -MPOSIX -E 'sleep(1) and say ((POSIX::times)[0] / &POSIX::CLK_TCK) while 1'
03:57 sri it most likely doesn't work on windows and friends though
04:00 freman hey, your code isn't a waste, I'm going to butcher it to my own purposes
04:01 freman only bit that's a waste is that monkey hack business :D
04:01 d4rkie joined #mojo
04:08 egopro joined #mojo
04:16 D4RK-PH0ENiX joined #mojo
04:35 jeen joined #mojo
04:35 mauke_ joined #mojo
04:37 preflex_ joined #mojo
04:48 d4rkie joined #mojo
04:50 TitanOfOld joined #mojo
04:52 egopro joined #mojo
04:53 egopro joined #mojo
04:54 komodo joined #mojo
04:59 ka2u joined #mojo
05:07 Adurah joined #mojo
05:20 lammel2 joined #mojo
05:20 jeen joined #mojo
05:35 Adura joined #mojo
05:48 basiliscos joined #mojo
05:48 egopro joined #mojo
05:57 sri phillipadsmith: oh, forgot about you
05:58 sri yes, mango is pretty usable, things are just changing
05:59 sri no idea what you meant with json object though
05:59 sri if you mean something decoded with Mojo::JSON, then yes, Mango::BSON and Mojo::JSON share true/false constants and the like
06:00 sri if you mean json binary blobs, then sure, you can do it, but it makes not much sense
06:08 n0n joined #mojo
06:12 jeen joined #mojo
06:23 spleenjack joined #mojo
06:39 Molaf joined #mojo
06:57 yakudza joined #mojo
07:01 crab heh, i keep reading that as "phillip and smith"
07:06 Mike-PerlRecruiter_ joined #mojo
07:14 jzawodn joined #mojo
07:38 Vandal joined #mojo
07:40 dpetrov_ joined #mojo
07:42 DaTa sri: it doesn't work on my debian either :)
07:42 DaTa Your vendor has not defined POSIX macro CLK_TCK, used at -e line 1
07:49 hesperaux i've been googling around and I can't decide what is the best way to handle database connections. I was using Mojolicious::Plugin::Databases but I'd like to use a standard perl module instead. I was looking at DBIx::Connector, but I can't see how to use variables in the query (in mysql, passing in values for ?'s).
07:54 salparadise hesperaux: I used the following example to help me http://blogs.perl.org/users/joel_berger/20​12/10/a-simple-mojoliciousdbi-example.html
07:54 hesperaux ah, i used that page for work, but I was still getting the morning bug
07:55 hesperaux and i don't want to reconnect for every query either
07:55 ver joined #mojo
07:56 jeen joined #mojo
08:07 egopro joined #mojo
08:14 dod joined #mojo
08:22 Adura A programmer that confuses loose and lose must spend much time debugging.
08:29 andrefs joined #mojo
08:31 dod joined #mojo
08:33 dod joined #mojo
08:35 ObseLeTe joined #mojo
08:37 saxieyu joined #mojo
08:39 daxim joined #mojo
08:45 alnewkirk joined #mojo
08:48 dhg joined #mojo
08:49 dhg left #mojo
09:07 Britzel_ joined #mojo
09:26 mawuli_ypa joined #mojo
09:27 andrefs joined #mojo
09:28 fhelmber_ joined #mojo
09:36 egopro joined #mojo
09:43 ladnaV joined #mojo
09:45 dotan joined #mojo
09:50 jpn joined #mojo
10:00 kitt_vl joined #mojo
10:11 dotan joined #mojo
10:25 ghandi joined #mojo
10:31 mawuli_ypa joined #mojo
10:37 Vandal joined #mojo
10:38 rhaen joined #mojo
10:50 ladnaV joined #mojo
10:59 suy joined #mojo
11:17 ObseLeTe joined #mojo
11:24 bd is it possible to use printf() things like %d in app->log ?
11:32 jberger hesperaux, the problem with that example is that it doesn't work in a preforking environment (perhaps I should say that in there somewhere)
11:32 jberger https://github.com/jberger/Galile​o/blob/master/lib/Galileo.pm#L12
11:32 jberger in Galileo I keep the db connection in a app attribute
11:33 jberger then for convenience I add a helper which points to it: https://github.com/jberger/Galile​o/blob/master/lib/Galileo.pm#L94
11:34 jberger bd use sprintf
11:34 jberger like printf but is (s)tored in a variable
11:36 nicomen bd: yes, with sprintf
11:37 nicomen $ perl -wle 'warn sprintf("%s\n", "stderr"); printf("%s\n", "stdout");'
11:37 nicomen stderr
11:37 nicomen stdout
11:39 SmokeMachine joined #mojo
11:40 bd jberger, nicomen: so log->debug(sprintf()), but that does format the message even if it would not get logged
11:44 nicomen yeah I guess
11:44 jontaylor joined #mojo
11:49 nicomen bd: you can use your own logger that inherits from Mojo::Log and overrides the format method perhaps
11:49 bd nicomen: yeah I was just looking at thet
11:49 bd that even
11:54 nicomen $ perl -wle 'package My::Log; use base Mojo::Log; sub format { my ($self, $level, $template, @msgs) = @_; return $self->SUPER::format($level, sprintf($template, @msgs)); }; package main; my $l = My::Log->new(); $l->debug("%x", 1234);'
11:54 nicomen [Wed Feb 27 12:54:38 2013] [debug] 4d2
11:54 nicomen bd: ^^
11:59 maxhq joined #mojo
12:20 moltar joined #mojo
12:22 GabrielVieira joined #mojo
12:33 jontaylor joined #mojo
12:44 bc547 How can I use AnyEvent in a Mojolicious::Lite application? http://pastebin.com/ZqLKnHtE does not seem to work
12:46 bc547 The goal is to watch a netlink socket eventually
12:48 bd bc547: i use it with inotifyy, so maybe this helps: http://bc-bd.org/blog/mojoliciou​s/mojolicious-and-linuxinotify2/
12:52 bd bc547: also http://mojolicio.us/perldoc/​Mojolicious/Guides/Cookbook has an example
12:54 bc547 bd: but the example in the cookbook is inside a handler... i want it to connect open a netlink socket and start monitoring when the application starts
12:56 bc547 bd: i'm not looking for watch for a file, but I'll try it anyway :-)
12:57 jontaylor joined #mojo
12:58 bc547 found it... EV was not installed. the pastbin code was correct
13:00 bc547 and your inotify link gives the syntax to watch for a fd... perfect! :-)
13:12 jontaylor joined #mojo
13:21 jontaylor joined #mojo
13:42 phillipadsmith sri: thanks, helpful. :)
13:47 Vandal joined #mojo
13:50 Britzel joined #mojo
14:26 btyler joined #mojo
14:27 ObseLeTe joined #mojo
14:29 bluescreen joined #mojo
14:39 rhaen joined #mojo
14:44 ka2u joined #mojo
14:51 dhg joined #mojo
14:55 sri http://blog.python.org/2013/02/annou​ncing-defusedxml-fixes-for-xml.html # interesting xml attacks
15:03 gryphon joined #mojo
15:13 dotan joined #mojo
15:32 sh4 joined #mojo
15:39 d4rkie joined #mojo
15:49 Kovensky joined #mojo
16:16 yakudza joined #mojo
16:19 dhg joined #mojo
16:23 phillipadsmith Any thoughts on passing MOJO_NO_TLS via a dotcloud.yml environment file?
16:25 crab don't do it!
16:25 mugenken joined #mojo
16:28 btyler joined #mojo
16:28 sri do it!
16:29 phillipadsmith sri: but HOW!
16:29 phillipadsmith Problem is that I'm hitting an error "Can't locate Net/SSLeay.pm" and I'm guessing it's related, yes?
16:29 sri i know nothing about dotcloud
16:30 sri unlikely, our dependencies are optional, if they are not there they are not used
16:30 phillipadsmith that's what I thought
16:30 phillipadsmith Hrm… why the heck is it being required.
16:32 phillipadsmith shoot, no, it's Net::Twitter::Stream using IO::Socket::SSL;
16:32 phillipadsmith which uses Net::SSLeay 1.21
16:32 sri DaTa: d'oh!
16:33 phillipadsmith Hrm… but dotcloud is saying it's installed Net::SSLeay is up to date. (1.52)
16:35 * phillipadsmith goes to bug folks in #dotcloud
16:37 crab for fun and profit, think of fun ways to pronounce ssleay
16:39 sri haha, mango has now been favorited on metacpan just as often as the official perl driver
16:40 sri https://metacpan.org/release/Mango # \o/
16:40 sri reminds me to finally get back to adding connection pool support
16:41 jeen joined #mojo
16:42 r0b3rt http://www.rackspace.com/blog/why-mongodb/
16:42 phillipadsmith sri: Mango is working very nicely in this little fun prototype app … Twitter stream -> Mango -> Mongo … all very fast
16:44 sri it's surprisingly fast for a pure perl module, doubt you'll notice much of a difference to the official driver as soon as there is the slightest hint of latency involved
16:46 inokenty joined #mojo
16:46 mike_ joined #mojo
16:47 sri when i last micro benchmarked them against each other on localhost (with ssd) it was about 3k safe (w=1) inserts/s for Mango and 6k for MongoDB
16:47 sri w=2 or j=1 and they are equal
16:48 sri and with parallel connections Mango beats MongoDB of course, since w=2 and j=1 scale with connections
16:49 sri and i've not even started optimizing anything yet ;p
16:50 sri tons of w=1 inserts is pretty much the worst case for Mango atm, since they go straight to RAM and have almost no latency
16:51 sri (blocking w=1 inserts)
16:52 coff joined #mojo
16:52 coff Hi folks.
16:53 xaka joined #mojo
16:53 coff I've run into a strange issue with a hypnotoad-instance. It seems to cycle workers continuously (makes for high server-load :p )
16:53 coff Anyone got ideas as to how that might happen?
16:54 coff I've checked that the two hypnotoad-instances run with their own pidfile.
16:55 coff Also; this occurs without any requests hitting it.
17:02 coff Ok. So I'm a retard today. Figured it out. :)
17:07 btyler What was going on, if you don't mind sharing? Never want to pass up on learning from others' mistakes :)
17:08 coff Starting hypnotoad as a user / group that did not exist made it go absolutely mental.
17:09 coff It kept spamming (as fast as it could) 'Group "<MYGROUP>" does not exist at /usr/share/perl5/Mojo/Server/Hypnotoad.pm line 389'
17:09 coff Where <MYGROUP> is the group that did not exist
17:10 sri poor hypnotoad
17:11 coff sri: Yeah, not it's fault that it gets incorrect information about it's operation. :p
17:11 sri you monster!
17:11 * coff gasps
17:12 * coff throws noose around neck
17:14 njlg joined #mojo
17:15 * sri nods
17:19 njlg joined #mojo
17:27 Akron joined #mojo
17:28 anewkirk I want to write plugin to support HAL rendering but I can't figure out how to implement it in a way that's not complicated
17:33 ladnaV joined #mojo
17:34 Akron anewkirk: What does HAL mean? (Or: What does it mean in conjunction with a web dev framework?) (and since when are you missing a "l" in your nick. ;))
17:36 anewkirk Akron, that my other machine, sorry about that. HAL is HyperMedia Application Language
17:37 anewkirk the spec is here -- http://stateless.co/hal_specification.html
17:37 anewkirk (ofcource there is no Perl implementation)
17:37 anewkirk check out this cool HAL browser, available on github -- https://api-sandbox.foxycart.com​/hal-browser/hal_browser.html#/
17:38 Akron anewkirk: Ah - thank you. Never heard about it.
17:39 anewkirk Yeah, there's another competing specification called "Siren" which is prettier to look at but more verbose IMHO
17:39 anewkirk it just a standard way to define resource relationships
17:40 Akron Similar to XRD it seems.
17:41 Akron Oh - well ... more oriented towards a restful API.
17:42 anewkirk yes
17:42 Akron Nice.
17:43 anewkirk I could potential play very nicely with the existing Mojo route definition system
17:43 anewkirk potentially*
17:44 Akron Miyagawa is involved in a ruby implementation - so there might be a perl version coming soon. ;)
17:44 anewkirk really?
17:45 * anewkirk goes looking
17:45 Akron https://github.com/apotonick/roar/commits/master/​lib/roar/representer/json/hal.rb?author=miyagawa
17:46 Akron Should be well suited for shortcuts in the Mojo model.
17:48 anewkirk oh, ... maybe I should just let someone else write it
17:54 mugenken joined #mojo
18:08 phillipadsmith #dotcloud++
18:31 GabrielVieira joined #mojo
18:38 anewkirk phillipadsmith, what are you doing with dotcloud?
18:50 phillipadsmith anewkirk: just deployed a prototype there: a long-running service/daemon using Net::Twitter::Stream and Mango (MongoDB)
18:51 phillipadsmith So that worker is collecting tweets from the streaming API and sticking them into MongoDB for later analysis, etc.
18:51 phillipadsmith I'll run a Mojolicious app on top to provide some views of the data
18:53 anewkirk phillipadsmith, is working as expected/advertised?
18:56 phillipadsmith anewkirk: so far, so good
18:56 phillipadsmith Worker is running, collecting tweets into Mongo, and so on
18:56 phillipadsmith Dependency management is a dream: just declare in the dotcloud.yml file and away you go
18:57 phillipadsmith I like the looks of Heroku and was keen to check out the mojo deploy heroku stuff, but I wasn't quickly able to figure out where to sign-up for a developer/sandbox account or whatever
18:58 phillipadsmith With dotcloud there are unlimited sandbox apps with unlimited services for $0. You only pay when you want to run the app on your own custom domain or scale it or what-have-you.
19:07 berov joined #mojo
19:07 Mike-PerlRecruiter_ joined #mojo
19:16 anewkirk phillipadsmith, great success story
19:16 anewkirk I'm in talks with them nonw about moving some apps over (which is why I asked)
19:16 phillipadsmith anewkirk: yah, once I get something visible (hard to see a deamon), I'll write it up
19:16 anewkirk please do
19:16 phillipadsmith anewkirk: I think they're great; great service, great support (in irc) and so on
19:17 anewkirk ... so they auto-reload on failure also?
19:17 phillipadsmith anewkirk: yep, there's a monitor: http://docs.dotcloud.com/guides​/daemons/#guides-define-daemons
19:18 phillipadsmith and you can send signals to your script, if you write it accept them
19:18 phillipadsmith And miyagawa wrote a lot of the perl-related stuff, so it's all nice and cpanm shiny
19:18 phillipadsmith Can even configure which version of perl to use (via perlbrew)
19:19 phillipadsmith all in the dotcloud.yml, e.g.: config: perl_version: v5.16.x
19:22 anewkirk oh, that's nice :}
19:22 alester joined #mojo
19:24 nelio left #mojo
19:29 kongelaks is the method to_string on Mojo::Message an accurate description of what actually happens if build_[body|headers|start_line] are all returning bytes?
19:34 aalecs joined #mojo
19:34 aalecs hello
19:34 sri how could "string" be an accurate description for anything?
19:35 sri it's an ambiguous term
19:35 sri o/
19:35 aalecs i seem to be trying gettin authorization with header with mojo, but I fail. I can though get my $host = $headers->host; let's say..
19:35 aalecs does authorization header have any deps ?
19:38 kongelaks it is ambiguous
19:39 kongelaks the description "Render whole message." is also a little bit ambiguous
19:40 kongelaks is doing Mojo::Asset::File->add_chun​k(Mojo::Message->to_string) safe? stupid?
19:44 kongelaks i'm interested in using this for logging sequences of requests/responses
19:45 sri that seems like a very very bad idea
19:45 kongelaks i was using $tx->on(connection => ...), but don't want the actual raw data
19:45 sri requests and responses are not guaranteed to give the same result when used multiple times
19:48 kongelaks so if i did M:A:File->add_chunk(Mojo::Message->to_string) and then i loaded it with M:Message->parse(M:A:File->slurp)... the message wouldn't contain the same content and headers?
19:49 kongelaks s/wouldn't/could potentially not/
19:56 aalecs sri: can you help me with the headers->authorization issue >
19:57 nelio joined #mojo
19:57 nelio left #mojo
19:58 kongelaks aalecs: what is your question exactly...?
20:02 aalecs kongelaks: https://gist.github.com/alecs/5051186 i got problems getting the authorization http header, check the ### dispatchers
20:02 aalecs section
20:02 aalecs from line 246 down
20:05 kongelaks aalecs: do you see the authorization header when you do 'warn Dumper $self->req;' ?
20:07 aalecs nope, only user-agent, host, connection
20:08 kongelaks so... are you certain that the client is setting the header properly?
20:09 aalecs 99% percent yes
20:15 aalecs well it appears something sucks in dreamland. my twitter client is dumb.
20:17 kongelaks so, you found the problem?
20:18 aalecs possibly, the client is dumb and sends the http auth ONLY if the previous resp code is 401
20:18 aalecs and i was using 403
20:20 kongelaks i think that is what is supposed to happen
20:21 aalecs yeah, the client is guilty, i have to change my code so that after rejecting the proxy will wait for the auth
20:27 _xaka_ joined #mojo
20:27 allison_ joined #mojo
20:27 mauke joined #mojo
20:27 Adurah joined #mojo
20:27 tagg_ joined #mojo
20:27 D4RK-PH0ENiX joined #mojo
20:27 gryphon_ joined #mojo
20:27 GabrielVieira2 joined #mojo
20:27 btyler joined #mojo
20:27 anaio joined #mojo
20:27 Gedge joined #mojo
20:27 KindTwo joined #mojo
20:27 Caelum does mojolicious support multiple upload params in a multipart form?
20:27 mattp_ joined #mojo
20:27 Caelum someone wants to send me a request with two .zip files
20:28 t[R]oll joined #mojo
20:28 moltar joined #mojo
20:29 Caelum lag?
20:30 memowe joined #mojo
20:30 kongelaks Caelum: haven't done it server side, but i'm pretty sure there's no (unreasonable) limit on number of content parts
20:31 Caelum I vaguely remember sri saying something about it
20:32 Caelum I don't actually know how file uploads work
20:32 Grrrr joined #mojo
20:32 kongelaks i make requests that return responses with 30+ images, each in a separate part
20:33 Caelum what kind of response? multipart form data?
20:34 kongelaks a multipart http response
20:35 Caelum anyway, I need to tell these guys "yes you can send me two files" or "no, please send only one file"
20:36 batman joined #mojo
20:36 kongelaks so it depends on whether or not your code actually supports those multiple parts
20:37 kongelaks if you are asking about some default file upload behavior in mojolicious, i don't know the answer
20:42 kongelaks Caelum: look at this http://mojolicio.us/perldoc/M​ojolicious/Lite#File_uploads
20:51 Caelum that says nothing about multi-uploads
20:51 Caelum I found this from the logs, but I'm not using async: http://mojolicio.us/perldoc/Mojolicious/Gu​ides/Cookbook#Streaming_multipart_uploads
20:53 Caelum oh, the problem was with multi uploads with the same name, which he fixed
20:53 Caelum I'm getting different names anyway so it should be fine
20:53 Caelum also, what about max body size?
20:54 rem_lex| joined #mojo
20:56 kongelaks max body size?
20:56 Caelum I think it's this but not sure: http://search.cpan.org/~ams/Mojolicious-3​.32/lib/Mojo/Message.pm#max_message_size
20:57 kongelaks look at the paragraph at the end of the file uploads example i sent you
21:01 Caelum ok, yeah, it's that thing
21:11 aalecs goin' home bye guys
21:16 xaka joined #mojo
21:24 Caelum hrm, ::Request has no ->body_param method
21:27 Caelum oh it's in ::Message
21:33 ObseLeTe joined #mojo
22:15 ObseLeTe joined #mojo
22:21 Britzel joined #mojo
23:11 hrupp joined #mojo
23:15 freman joined #mojo
23:16 freman So, I've backported and monkeypatched that stable_time to my version of mojo (it's a little old)
23:17 freman sorry, steady_time, which is (of course, for me) defined as sub steady_time {clock_gettime(CLOCK_MONOTONIC)};
23:17 freman about to cross fingers and feed it to jenkins
23:17 jnbek joined #mojo
23:21 freman shift->super::new doesn't work so well in a monkey patch apparently
23:25 berov left #mojo
23:33 jpn joined #mojo
23:39 Averna joined #mojo
23:49 gryphon joined #mojo
23:55 freman nope, my stable time causes "inactivity_timeout" :(

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