The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-11-24

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

All times shown according to UTC.

Time Nick Message
00:01 ribasushi joined #mojo
00:18 cpan_mojo Flower-0.08 by SANTEX https://metacpan.org/release/SANTEX/Flower-0.08
00:35 Grinnz oh good! he removed the bit of docs that actually said what it is
00:39 PryMar56 joined #mojo
00:40 disputin joined #mojo
00:44 PopeF joined #mojo
00:46 genio you should see his super descriptive commit messages in git
00:47 genio Since there are no changes, I checked.  It was enlightening
00:47 Zoffix joined #mojo
00:50 Grinnz and he shipped README.pod with the dist, wonderful
00:58 Zoffix Hey, man. It's a "pasive" agent. For all the "pasive" things!
01:04 Zoffix \o/ https://github.com/santex/Flower/pull/2/files
01:04 Zoffix Look ma! I'm helping!
01:05 Grinnz lol
01:12 ajr_ joined #mojo
01:21 genio haha
01:26 cpan_mojo Flower-0.09 by SANTEX https://metacpan.org/release/SANTEX/Flower-0.09
01:29 genio He's battling for the Net::FullAuto award
01:33 cpan_mojo Flower-0.10 by SANTEX https://metacpan.org/release/SANTEX/Flower-0.10
01:41 sri jberger: cpan_mojo was yours right?
01:42 sri maybe there should be spam protection, like no more than 3 uploads of a dist per day
01:43 sri that dist got at least 5 uploads in the last 2 hours
01:58 jberger sri: the original was mine, this one is batman 's
01:59 sri oh
01:59 * sri pokes batman
02:01 jberger After friend feed shut down, mine was useless
02:09 sri ouch, the tt renderer was actually manually clearing $$output :S https://github.com/plicease/Mojolicious-Plugin-TtRenderer/commit/b7a0be69ae82ef456c6e995dd601ebf454c1eef3#diff-6f3bfe474070f6a39a153665fdf99727L90
02:11 sri batman: so we get 10000 announcements for that Flower thing, but your bot just skips the Mojolicious::Plugin::TtRenderer
02:11 sri which would have been an actually intersting announcement :S
02:12 sri oh wait, i just missed it in between all the flowers
02:19 voldemortensen joined #mojo
03:19 noganex joined #mojo
03:26 kaare joined #mojo
03:48 Eric joined #mojo
04:05 cpan_mojo Mojo-UserAgent-Mockable-1.10 by POPEFELIX https://metacpan.org/release/POPEFELIX/Mojo-UserAgent-Mockable-1.10
04:26 woz joined #mojo
04:28 voldemortensen joined #mojo
05:13 melo joined #mojo
06:20 anon joined #mojo
06:21 stephen joined #mojo
06:21 Vandal joined #mojo
06:22 HtbaaPi joined #mojo
06:23 allison joined #mojo
06:52 Averna joined #mojo
06:53 HtbaaPi joined #mojo
07:00 voldemortensen joined #mojo
07:03 Vandal joined #mojo
07:09 dod joined #mojo
07:15 dod joined #mojo
07:32 n16gel joined #mojo
07:44 ribasushi joined #mojo
07:59 osfabibisi joined #mojo
08:03 woz joined #mojo
08:04 eseyman joined #mojo
08:07 sugar joined #mojo
08:22 meshl joined #mojo
08:24 trone joined #mojo
09:10 n16gel joined #mojo
09:23 CHYC Is there an equivalent to tpage/ttree for Mojo::Template?
09:27 crab what is tpage/ttree?
09:28 CHYC crab: Sorry, should have made explicit http://www.template-toolkit.org/docs/tools/tpage.html , http://www.template-toolkit.org/docs/tools/ttree.html
09:30 CHYC For my use case it wouldn't be too difficult to implement something myself, but I thought I'd check noone's done it already :)
09:30 crab not that i've ever seen. but at least tpage should be reproduceable as a one-liner.
09:30 kes joined #mojo
09:32 CHYC crab: Thanks for confirming.
09:40 CandyAngel I think I could have saved myself a lot of time if I have known about ttree :P
09:40 CandyAngel if I had known*
09:41 CandyAngel I wrote a script which pretty much did exactly what ttree does >.<
09:50 woz joined #mojo
09:59 nic That's a quite special pr: fix "pasive" but leave "arround", which is on the same line
10:01 sue joined #mojo
11:06 woz joined #mojo
11:08 punter joined #mojo
11:18 HtbaaPi I need to be able to pull templates out of a database, so I need to write a plugin for that. But templates are cached right? Can that be avoided?
11:22 nic check whether inline templates are cached
11:23 nic oh, the size of the cache is configurable, perhaps you can set it to zero
11:23 HtbaaPi but then it will be for all handlers I think? That's not what I want :P
11:23 HtbaaPi most templates are static, but some templates need to be dynamic (e.g. e-mail stuff the user can edit)
11:24 nic I'm reading your response as rude, so I'll return to what I was doing
11:24 HtbaaPi but I might just as well stick to a static template and add the e-mail's content to the stash
11:25 HtbaaPi I'm rude? Sorry about that, I don't see it. But maybe that's because English isn't my native language
11:25 nic The :P symbol isn't English
11:25 HtbaaPi it's not meant to be rude
11:26 woz joined #mojo
11:26 HtbaaPi but thanks for the pointer, I see that I can make it optional for my handler
11:26 HtbaaPi just have to follow this https://metacpan.org/source/SRI/Mojolicious-6.33/lib/Mojolicious/Plugin/EPRenderer.pm#L28
11:27 HtbaaPi and I'm sorry if it offended you, didn't mean to
11:29 nic I'm not offended, just growing tired of trying to help people who stick their tongue out at me
11:29 marcusr -_-
11:30 HtbaaPi well I'm sorry for incorrectly using emoticons. Will do my best to not let that happen again!
11:30 nic :)
11:31 d4rkie joined #mojo
11:42 crab i'm tired of helping people whose faces are sideways
11:42 crab marcus is ok, even if his features are all linear
11:43 marcusr crab:  ¯\_(ツ)_/¯
11:43 * marcusr got a mbpr 13" today. My year of university suffering is over.
11:44 nic now that you mention it, I really don't like those faces looking at me when I'm trying to have a conversation, all stary and motionless
11:45 nic don't want to rain on your parade, marcusr, but 13" is really small for a motorbike
11:46 nic oh, google says it's not even a mode of transport
11:51 melo joined #mojo
11:51 neilhwatson joined #mojo
11:51 marcusr nic: It's suitable for a laptop though
11:52 marcusr at least with this retina screen jazz :)
11:52 Quai they are a lot better than some of the commits I see at work...
11:53 Quai uhm (remember to scroll down before saying something in a irc channel)
11:53 Quai I was talking about yesterdays Flower releases.. :)
11:58 nic :D   done that too
12:00 woz joined #mojo
12:08 woz joined #mojo
12:21 coolo is there no way I can set MOJO_REACTOR=Mojo::Reactor::Poll within my application?
12:22 coolo nah, stupid me. Put it in a BEGIN block and be done
12:26 bpmedley joined #mojo
12:27 asarch joined #mojo
12:30 mtths joined #mojo
12:32 woz_ joined #mojo
12:35 ajr_ joined #mojo
12:49 woz joined #mojo
13:06 AndrewIsh joined #mojo
13:13 woz joined #mojo
13:19 woz joined #mojo
13:20 woz joined #mojo
13:22 woz joined #mojo
13:26 kaare joined #mojo
13:28 woz joined #mojo
13:53 marty joined #mojo
13:54 marty joined #mojo
14:07 woz joined #mojo
14:17 woz joined #mojo
14:21 cpan_mojo Mojolicious-Plugin-BootstrapHelpers-0.0200 by CSSON https://metacpan.org/release/CSSON/Mojolicious-Plugin-BootstrapHelpers-0.0200
14:29 woz joined #mojo
15:00 woz joined #mojo
15:01 jb360 joined #mojo
15:21 woz joined #mojo
15:23 PryMar56 joined #mojo
15:24 gryphon joined #mojo
15:29 lluad joined #mojo
15:30 mitya joined #mojo
15:32 mitya plsease, help! use Mojo::Pg, in delay step i am doing $db->query( "INSERT ... RETURNING id" $delay->begin ); and in next step a have error DBD::Pg::st fetchrow_hashref failed: no statement executing
15:33 mitya all steps processing in transaction
15:33 mitya what could be wrong?
15:33 woz joined #mojo
15:35 sugar joined #mojo
15:38 bpmedley mitya : do you have a smallish working code example?  Perhaps a Mojolicious::Lite app?
15:42 sh4 joined #mojo
15:44 Grinnz_ mitya: is that in the $err returned in the next step?
15:50 disputin joined #mojo
15:51 PopeFelix joined #mojo
15:51 meshl joined #mojo
15:53 mitya here example controller method: http://pastebin.com/aE0AC81F
15:53 Repaster Repasted text from mitya: http://fpaste.org/293981/38040514/
15:54 mitya error happend on $result->hash
15:54 mitya in the next step
15:54 Grinnz_ probably not related to the problem, but you should use the delay helper
15:55 Grinnz_ https://metacpan.org/pod/Mojolicious::Plugin::DefaultHelpers#delay
15:59 voldemortensen joined #mojo
15:59 mitya Grinnz_, thanks! delay helpers is a nice thing and i use it in more high level things
16:00 disputin joined #mojo
16:03 mitya What I am doing wrong with Mojo::Pg? Please, help!
16:03 hernan605 joined #mojo
16:05 woz joined #mojo
16:08 bpmedley mitya : I would need a complete Mojolicious::Lite example for debugging.
16:11 woz joined #mojo
16:17 sugar joined #mojo
16:23 punter joined #mojo
16:26 stephen joined #mojo
16:38 mitya here Mojolicious::Lite example http://fpaste.org/294022/
16:38 vanHoesel1 joined #mojo
16:44 voldemortensen joined #mojo
16:46 mitya oh, there an error, this http://fpaste.org/294028/ right
16:48 * sri now imagines marcusr driving a tiny motorcycle around oslo
16:50 sri mitya: try replacig $db->query(...) with $c->pg->db->query(...) in the steps
16:52 mitya Hello, Sebastian :)
16:53 mitya Does this mean that the requests will be held in different sessions?
16:54 mitya this is step by step queries, not parallel queries
16:56 sri it would still be sequential
16:57 sri but DBD::Pg might need a little time to reset everything before you can reuse one connection
16:59 sri that said, there's a test case https://github.com/kraih/mojo-pg/blob/master/t/database.t#L60
17:01 mitya does not work: DBD::Pg::db begin_work failed: Already in a transaction
17:03 sri oh, you're doing weird stuff with the transaction, i'm out
17:06 mitya what is the right way to work with transactions in delay steps?
17:07 woz joined #mojo
17:09 jberger transactions are bound to the connection (I'm assuming, unless something odd is happening) in which case you can't do concurrent requests within the transaction (why would you want to anyway?)
17:09 jberger (
17:10 * jberger lets the ocd go
17:11 sri Zoffix: we have stolen Mojo:Util::spurt directly from perl6
17:13 disputin joined #mojo
17:24 disputin joined #mojo
17:26 lluad jberger: Sequential queries in a single transaction while using the event loop and not blocking is the useful case.
17:27 jberger yeah, so, ::Delay is your friend
17:27 eseyman left #mojo
17:35 marcusr sri: I'd rather have an electric longboard
17:37 mitya I am sorry seems to be misunderstood. I'm trying to make the sequential steps in a single Pg transaction. what am I doing wrong?
17:38 mitya in this example http://fpaste.org/294028/
17:39 ZoffixW joined #mojo
17:40 ZoffixW sri, that only tells me I can create a closed loop where some people will think P6 is doing the same thing as Mojolicious and another group of people think Mojolicious is doing the same thing as P6 :P
17:41 ZoffixW I'm still chuckling at the proposal that "spit" is a better alternative ^_^
17:44 woz joined #mojo
17:46 genio did p6 ever fix their broken homebrew release?
17:48 ZoffixW Dunno
18:01 voldemortensen joined #mojo
18:04 bpmedley mitya : I get no error with your example code.
18:05 mitya what your mojolicious version?
18:08 bpmedley mitya : 6.23
18:09 mitya and version of mojo::pg?
18:10 bpmedley 2.12
18:11 hernan605 joined #mojo
18:16 sri bpmedley: 2.15 was an important release
18:22 bpmedley Understood.  I'll upgrade soon.  Thank you for letting me know.
18:23 sri it makes migrations much safer
18:25 sri big problem previously was that if you were running something like minion workers on multiple machines, and tried to upgrade one after another, it could break your database
18:27 sri this actually happened to jberger
18:27 sri Mojo::Pg 2.15 adds a safety that prevents accidental downgrading
18:34 punter joined #mojo
18:35 woz joined #mojo
18:40 woz joined #mojo
18:45 woz joined #mojo
18:45 mitya i have installed mojo 6.23 and mojo::pg 2.12 but have 500 error with this script
18:46 mitya can you give log output wgen HTTP GET /
18:48 trone joined #mojo
18:49 woz joined #mojo
18:53 woz joined #mojo
18:56 dod joined #mojo
18:59 woz joined #mojo
19:06 n16gel joined #mojo
19:18 woz_ joined #mojo
19:20 jberger yeah that was an interesting one
19:20 jberger I had to bring down the workers and then upgrade them in the right order
19:21 jberger I upgraded one in-place and then manually watched the db table to know if I should migrate it up again
19:21 jberger but once I got it rolling everything worked
19:21 kaare joined #mojo
19:22 bpmedley mitya : This will have to wait for a few hours.  I'll get back with you.
19:25 woz joined #mojo
19:29 kaare joined #mojo
19:46 * jberger starts using Mojo::SNMP
19:47 jberger batman++
19:47 woz joined #mojo
20:09 tyldum batman is resting.
20:10 tyldum Picked his brain for 9 hours straight today.
20:20 kyshtynbai joined #mojo
20:22 jberger the hero we deserve
20:26 tyldum Will continue picking tomorrow. Poor guy.
20:26 tyldum But will release him back into the wild after that.
20:43 jberger buy him a beer at least
20:56 DesertFoxATX joined #mojo
21:13 GabrielVieira joined #mojo
21:14 sri free batman!
21:15 ZoffixMobile joined #mojo
21:16 woz joined #mojo
21:16 woz joined #mojo
21:25 woz joined #mojo
21:33 meshl joined #mojo
21:35 woz joined #mojo
21:58 saki :(
22:01 n16gel joined #mojo
22:10 mitya I am ready to pay 0.05 BTC right now someone who will explain why this script does not work http://fpaste.org/294171/
22:11 woz joined #mojo
22:11 mitya check line #44
22:11 Zoffix joined #mojo
22:12 Zoffix TIL: Mojolicious::Plugin::PODRenderer can render POD of your own app :P
22:12 Zoffix This is now my favourite feature of Mojolicious :P
22:14 jberger mitya: line 47 are you trying to break out?
22:14 jberger if so, don't do pass
22:15 jberger also, do you know that you are overwriting the "row" data field?
22:16 jberger (actually, back to breaking out of the steps, you don't even need to set remaining to [], just not "begin"-ing is enough to break out of the steps)
22:16 sri mitya: i bet it works too if you replace line 42 with my $row = $result->hashes->first;
22:17 Adura joined #mojo
22:18 sri it might just be that DBD::Pg expects you to consume all data before you can reuse the connection
22:19 jberger ^^ oh interesting
22:20 Grinnz_ DBD::SQLite has that problem a lot
22:20 sri if that's correct you can send btc to 1Cid78CmK4hvf78Ry8K2XeDx8pQHNh4hbz ;p
22:21 sri wonder if $results->hash and $results->array just shouldn't exist
22:21 mitya jberger, thanks, i will consider
22:24 mitya Sebastian, thank you, your solution works.  It would be great if you add this in the documentation.
22:24 meshl joined #mojo
22:25 sri the big question is if ->array and ->hash should exist at all
22:25 Grinnz_ sri: they could be reimplemented as internal iterators on ->arrays/->hashes possibly
22:25 sri Grinnz_: seems ugly
22:27 jberger mitya: note that pass in an implicit begin, which is why I mention not doing pass
22:27 Grinnz_ it's unfortunate for DBD::SQLite because it actually doesn't retrieve the rows until they're fetched; on the other hand, it's most likely the cause of some issues
22:28 sri i guess a $results->finish method would make sense if ->array and ->hah stay
22:28 sri +s
22:28 Grinnz_ that could be doable
22:29 sri then the docs could be clear about it
22:29 sri after all, there is still hope that DBD::Pg will support it too some day
22:30 Grinnz_ support partial retrieval?
22:30 sri yes
22:30 Grinnz_ interesting
22:30 woz joined #mojo
22:30 sri it's been on the todo list for years i think
22:30 sri and there's multiple solutions
22:31 sri even without cursors, there's support on the c-api/protocol level
22:31 sri so two ways to do it
22:31 sri just DBD::Pg lacking support
22:40 sri Grinnz_: it seems to only affect non-blocking queries with DBD::Pg
22:55 woz joined #mojo
23:03 woz joined #mojo
23:16 D4RK-PH0ENiX joined #mojo
23:17 sri hmm, not sure what to do
23:18 sri https://github.com/kraih/mojo-pg/commit/c40f61f3ff247c968f2afa681fbb012a27e270b6
23:18 sri this would be the backwards compatible version
23:19 woz joined #mojo
23:29 woz_ joined #mojo
23:31 Zoffix joined #mojo
23:34 d4rkie joined #mojo
23:39 sri perhaps simplicity is better for Mojo::Pg, and i should just get rid of ->array/->has for now
23:39 sri +h
23:40 d4rkie joined #mojo
23:43 woz joined #mojo
23:50 d4rkie joined #mojo
23:58 woz joined #mojo

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