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

IRC log for #mojo, 2014-12-28

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

All times shown according to UTC.

Time Nick Message
00:05 sugar__ joined #mojo
00:58 jzawodn joined #mojo
01:13 punter joined #mojo
01:39 damaya joined #mojo
01:42 damaya Hey, any of you guys ever used Twitter sign-in?
01:42 damaya What do you store on first auth, and after the first log in, what changes? What do you check, etc?
02:54 klapperl_ joined #mojo
03:01 denny joined #mojo
03:10 jberger https://twitter.com/joelaberger/status/549039518922571776
03:10 jberger oops, damaya that might look like a response to you (in context) but it isn't
03:12 sri jberger: oh, forgot to mention, i don't like the byte_stream method :o
03:12 jberger well NOW you tell me!
03:12 jberger what's the concern?
03:12 purl i think the concern is running low.
03:13 sri i think those methods should just be available for all strings ;p
03:13 jberger thanks purl
03:13 jberger you would rather wrap all byte_stream methods into string class?
03:13 sri ye
03:13 jberger mst suggested a similar idea, I thought that it wasn't too onerous to do ->b->..
03:14 sri Mojo::ByteStream is nothing else really https://github.com/kraih/mojo/blob/master/lib/Mojo/ByteStream.pm#L11
03:15 jberger yeah, I know
03:15 sri you just have the chance to do it right with autobox
03:15 jberger hehe, ok, it is something that can be done with future releases
03:15 jberger actually
03:15 jberger hmmmmm
03:16 jberger I guess I see the appeal
03:17 jberger but I would still keep the byte_stream method if only as a mechanism to prevent HTML encoding
03:17 * jberger ponders
03:18 jberger argh! I hate the timezone handling on bpo
03:18 * jberger moves the publish time
03:19 good_news_everyon joined #mojo
03:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FpfqfQ
03:19 good_news_everyon mojo/master afac21d Sebastian Riedel: added a reactor start example
03:19 good_news_everyon left #mojo
03:28 jberger sri: other than that, Mrs. Lincoln, how did you like the play?
03:38 sri jberger: i always liked autobox, and wish it was good enough for core
03:44 jamesw joined #mojo
03:47 noganex joined #mojo
03:50 sri ->foo->@* could have been ->foo->list
03:51 jberger hmmm, I suppose that's true
03:51 jberger and it must be using a similar hack to implement ->@* anyway now that I think of it
03:52 sri i wonder if the 5.21.x optimizations make autobox faster
04:00 tempire I've tried several deployment/fixture options
04:00 tempire Seems like the simplest is the best
04:00 * tempire fully embraces Mojo::Pg::Migrations
04:01 jberger resistance is futile
04:01 * sri is still looking for a fixtures solution
04:01 tempire I've decided to keep fixtures in separate migrations files
04:01 jberger I usually make a helper which adds fixtures
04:02 tempire Whenever I do that the class ends up bigger and bigger and more customized
04:02 tempire And in the end, I just want to easily put stuff in.
04:02 tempire Always comes back to sql
04:03 tempire I *really* wanted DBIx::Class::Fixtures to be the perfect fix, and comparatively DBIx::Class::Migration
04:04 tempire But I'm coming to realize more and more how abstraction of a particular database just doesn't work.
04:05 tempire Maybe in the FUTURE with more evolved humans and technology
04:05 tempire But not today
04:06 * sri has been pondering the idea of a simple fixtures implementation... my $guard = $pg->fixtures(foo_table => [{bar => 'A', baz => 'B'}, ...], bar_table => [...]);
04:07 tempire That's what I've done in the past.
04:07 sri i mostly worry about the cleanup
04:07 tempire That's always the problem.
04:07 tempire Or one of them
04:07 purl one of them is, like, actually dead and inhabiting a robot (robo-necro-)
04:08 Grinnz wat.
04:08 tempire You could have cleanup be drops in migrations
04:08 jberger Grinnz: you need a ?
04:08 sri right, just don't handle fixtures cleanup and expect a ->migrate(0) or so
04:09 sri but then you've got concurrency problems
04:09 sri or actually parallelism problems
04:09 sri two tests use the same migrations, one will destroy everything too early
04:11 tempire postgres can do namespaces within a database, right?
04:11 tempire Have a generated namespace
04:11 tempire Though I'm not sure how permissions work with that
04:15 sri or use a guard on the fixtures to lock the migrations table ;p
04:16 sri (that's pretty terrible, you'd have to do "undef $guard;" to be able to ->migrate(0))
04:18 jberger or drop scope
04:18 jberger but yeah, not so nice
04:19 sri oh, there's also the case where you have multiple tests with different fixtures
04:19 sri so some kind of locking mechanism might be the best choice
04:20 sri migrations already use a global lock, need something similar for test scope
04:20 sri the lock btw. https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg/Migrations.pm#L53
04:21 sri there's a transaction guard around it, so it's pretty safe
04:23 sri if it wasn't for the parallelism problem i would have added a fixtures method already
04:32 sri actually
04:33 sri is there a Test::Harness solution for tests that don't work with j9?
04:35 sri hmmm
04:35 sri https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/5
04:35 sri you can use rules when running prove
04:56 Eke- joined #mojo
05:05 Adurah joined #mojo
05:39 Adurah mojo version doesn't detect Net::DNS::Native now, it seems.
05:41 Grinnz is it up to date?
05:41 Adurah Yup...
05:45 dotandimet joined #mojo
05:57 good_news_everyon joined #mojo
05:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gclwag
05:57 good_news_everyon mojo/master f942f8e Sebastian Riedel: mention that optional modules do not just need to be installed
05:57 good_news_everyon left #mojo
06:49 dotandimet joined #mojo
07:52 dotandimet joined #mojo
08:16 Vandal joined #mojo
08:19 amon joined #mojo
08:57 sh4 joined #mojo
08:59 juikuen joined #mojo
09:00 denis_boyun joined #mojo
09:03 denis_boyun_ joined #mojo
09:23 damaya alsamixer
09:28 irq joined #mojo
09:44 basiliscos joined #mojo
09:47 basiliscos joined #mojo
10:16 franck34 joined #mojo
10:32 Eddy joined #mojo
10:45 denis_boyun joined #mojo
10:55 franck34 hi
10:56 franck34 got problem with sub and "under" for "/" here: https://gist.github.com/eviltik/c55dcaf376867b51bb3d
10:56 franck34 the sample come from the http://mojolicio.us/perldoc/Mojolicious/Guides/Routing so don't understand what i'm missing
10:56 franck34 any help welcome ;)
10:59 preaction my guess is that you don't have an endpoint, so under() doesn't get invoked
10:59 franck34 ok
11:20 franck34 got it
11:20 franck34 thanks
11:33 franck34 preaction: do you know if it's possible to completely disable the cache (if modified since ..) for statics files ?
11:34 preaction is it wrong?
11:34 franck34 well, i modify index.html, i need to shift reload rather than reload in my browser
11:35 franck34 it's cool for prod, but for dev, if i forgot to shift reload, i don't have the latest version of my static file
11:35 preaction you can always send must-revalidate, but you could also disable caching in your browser for dev purposes
11:35 franck34 ok thanks
11:37 franck34 mm i think i smoked too much yesterday, cache is working has expected
11:37 franck34 OKEY ! now time to play with mongo
12:03 franck34 mm
12:04 franck34 sound that's minion is recommanded rather than mango since sept ?
12:05 preaction mango is a mongodb driver. minion is not a db driver
12:12 franck34 ok
12:26 franck34 so let's use Mojolicious::Plugin::Mongodb
14:15 mst tempire: I've done pretty well with DBIx::Class::DeploymentHandler
14:15 mst tempire: but instead of fixtures I usually seem to end up just doing a manual ->populate test or something
14:16 mst s/test/call/
14:44 dod joined #mojo
15:01 jberger franck34: clearly you don't understand the under method yet. that callback always returns undef which I doubt is what you want
15:04 jberger personally, I might still use mango given the correct version of mongodb and mojo, but that is your choice
15:07 mst I'd just avoid mongodb entirely and pick a better datastore
15:08 jberger mst: probably a wise suggestion
15:43 dod joined #mojo
16:04 good_news_everyon joined #mojo
16:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pLO88g
16:04 good_news_everyon mojo/master 97a8761 Sebastian Riedel: updated Net::DNS::Native requirement to 0.15 for some important bug fixes
16:04 good_news_everyon left #mojo
16:52 basiliscos joined #mojo
17:33 sri hmm
17:34 * sri wonders if he should add $db->dollar_only->query(...) to Mojo::Pg
17:38 mst oh, that would be neat
17:38 jamesw joined #mojo
17:38 mst provides all the advantages without making a mess
17:38 mst and is basically self-documenting
17:49 sri biggest problem is that i can't think of a test that works with postgres 9.3 too atm.
17:50 sri (travis is not on 9.4 yet :S)
17:54 sri hstore has been using ? operators, but i'm not sure tests should require loading an extension
17:57 mst how about a negative test that traps the error from using ? in a case where there's no such valid operator?
17:59 sri seems like the only option
18:01 mst postgres' error messages are usually sufficiently specific to be nicely testable
18:38 denis_boyun joined #mojo
18:59 sri hmm
18:59 sri $db->server_prepare->query(...) would be a candidate too
19:02 sri if you do 10000 inserts in a loop that's a tiny performance gain ;p
19:02 sri $db->server_prepare->query("insert into foo values (?,?,?)", "One", "Two", "Three") for 1 .. 10000
19:03 sri to be precise, on my little macbook that goes from 2.71s to 2.59s
19:06 sri https://gist.github.com/anonymous/d2e10692069a9f115d66
19:06 sri that would be the patch to get it working blocking
19:13 sri non-blocking is actually not that hard
19:13 sri https://gist.github.com/anonymous/2bbef3d8e227accc970e
19:17 sri not sure when you'd ever want to use it though
19:18 sri the difference is sooo small for anything you don't run 10000 times in a loop
19:19 sri not even sure we should be caching the sth
19:28 punter joined #mojo
19:29 sri or am i overlooking something? do select statements benefit from sth reuse?
19:40 Eke- joined #mojo
20:30 basiliscos joined #mojo
20:37 sugar joined #mojo
20:37 sivoais joined #mojo
21:00 asarch joined #mojo
21:04 dotandimet joined #mojo
21:07 sri tempire: i think you might like this http://mojolicio.us/perldoc/Mojo/Pg/Database#dollar_only
21:20 sri i've removed the statement handle cache for now, its value seems questionable
21:21 sri think there was even a prepare bug
21:21 sri timing was a bit hard to follow
21:23 sri well shit... apparently the nsa has found flaws in AES :S
21:24 preaction and they're reporting it? they must've known years ago
21:24 sri nope, there was just a talk with new snowden facts at 31c3 (CCC conf)
21:25 sri also flaws in SSH and TLS
21:27 sri and OTR/GPG/Tor are so good that they complain a lot about them apparently
21:33 sri ah, video is already up http://streaming.media.ccc.de/relive/6258/
21:47 tempire hmm
21:48 tempire wonder if you can change the dollar with sql::abstract
22:07 bobkare joined #mojo
22:31 bobkare joined #mojo
22:37 meredith i'm also not surprised they've had skype broken for a few years, nothing like crypto that is both roll-your-own and proprietary
22:41 sri i think skype actually started out pretty strong, with its decentralized architecture
22:41 sri then microsoft bought it
22:41 preaction skype's crypto was based on a video game :p
22:41 preaction also kazaa
22:48 jberger possibly related? http://www.spiegel.de/international/germany/inside-the-nsa-s-war-on-internet-security-a-1010361.html
22:49 jberger seems to have all the same info
22:54 meredith that ccc talk about perl with the groany description is tomorrow
22:55 jberger OMG list context bug OMG
22:56 jberger where was the big talk after rails was hacked so hard that github was hacked via it allowing the guy to commit to rails master?
22:57 meredith if there are really that many sites/projects with issues there, seems like the shaming should focus on them rather than perl
22:57 jberger I mean, we finally used that is impetus to remove the related "features" from mojo all together
22:57 jberger thus every_param
22:58 jberger the thing is, even one of the mojo core members had a vulnerable plugin on cpan! its a hard bug to notice if you are not watching for it
22:59 preaction but because Perl allows this bug, it's a bad language. that's a fact!
22:59 jberger OMG WHY?
22:59 purl http://makeameme.org/media/created/WHY-OMG-WHY.jpg
23:00 jberger (man I'm going to get good use out of that one)
23:00 denny joined #mojo
23:01 sri :)
23:04 sri that trashy syfy zombie show is hilarious
23:04 sri zombie tornado!
23:05 * jberger finally installs tor browser
23:16 jberger sri: can you really accomplish anything online with the script-blocker running?
23:25 jberger with another Dupin post (http://blogs.perl.org/users/tom_wyant/2014/12/the-case-of-the-preferred-parent.html), I'm considering another Holmes about the exec $^X vs env perl problem
23:26 jberger writing my other Holmes post was fun, but it has been hard to find a worthy "case" for the great detective since then
23:41 sri jberger: wat?
23:41 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
23:48 jberger wat wat?
23:51 sri wat script-blocker?
23:52 Grinnz but honestly, i see no reason => shouldn't have made its right argument scalar context from the start, impossible to change now though

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