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

IRC log for #mojo, 2014-10-09

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

All times shown according to UTC.

Time Nick Message
00:04 davido_ joined #mojo
00:06 asarch joined #mojo
00:06 jnbek joined #mojo
00:23 ceej__ joined #mojo
00:47 disco joined #mojo
00:50 Averna joined #mojo
01:00 asarch joined #mojo
01:16 tinkerj joined #mojo
01:26 cpan_mojo Mojolicious-Plugin-Web-Auth 0.11 by HAYAJO - http://metacpan.org/release/HAYAJO/Mojolicious-Plugin-Web-Auth-0.11
01:58 doublelel joined #mojo
01:58 fhelmber_ joined #mojo
02:14 doublelel joined #mojo
02:34 doublelel joined #mojo
02:54 Eke- joined #mojo
02:55 noganex joined #mojo
03:14 basic6 joined #mojo
03:14 woz joined #mojo
03:17 doublelel joined #mojo
03:45 woz joined #mojo
03:48 cpan_mojo Net-Google-Drive-Simple 0.11 by Michael Schilli - http://metacpan.org/release/MSCHILLI/Net-Google-Drive-Simple-0.11 (depends on Mojolicious)
03:50 KCL_ joined #mojo
03:52 r0b3rt berov: the second test also has the first cookie from the first test so they are accumulating.  Using a separate Test::Mojo for each test works.  Or use every_cookie() to see they are both there.
04:04 sujithm joined #mojo
04:05 sujithm_ joined #mojo
04:10 rem_lex joined #mojo
04:17 woz joined #mojo
04:25 woz joined #mojo
04:38 sri hmm, i just had an idea for a super simple migration system
04:39 cpan_mojo Juju 0.7 by ADAMJS - http://metacpan.org/release/ADAMJS/Juju-0.7 (depends on Mojolicious)
04:42 sri single sql file, with a bunch of sections starting with a magical comment "-- 1 Up... -- 1 Down... -- 2 Up... -- 2 Down..."
04:42 sri and you only have to keep the currently active version unchanged, old versions can just be merged
04:44 sri in a lite app that migration file could just be a template in the DATA section... @@ migrations.sql.ep
04:55 jamesaxl joined #mojo
04:55 sri gonna have to think about this some more, but a single migrations file would make getting started with a lite app rather simple
04:56 woz joined #mojo
04:57 sri on the other hand, you can of course use the style from the readme example of Mojo::Pg
04:57 zivester joined #mojo
05:15 punter joined #mojo
05:21 D4RK-PH0ENiX joined #mojo
05:27 woz joined #mojo
05:29 batman I hope you will support variants if you call it something as generic as migrations.sql.ep sri
05:30 batman That way it could be used for MySQL or SQLite later on.
05:31 batman I think it's a bit strange that you spend time on migrations though, when there are very good tools around
05:31 batman It's probably just because I consider it a very complex task.
05:32 batman I'm very exited about Mojo::Pg though. Looking forward to playing with it :)
05:33 batman I wonder it there's some tweaks to make Pg use less memory when started up... Last time I tried it, it used a lot of memory on an empty database...
05:33 batman Need to try again some day :)
05:34 batman sri: would you hack on convos, if it had a Pg backend?
05:35 batman sri++ # makes hard tasks easy
05:58 fhelmber_ joined #mojo
05:59 basiliscos joined #mojo
06:00 Eke- joined #mojo
06:04 woz joined #mojo
06:05 dotandimet joined #mojo
06:21 dod joined #mojo
06:47 woz joined #mojo
06:48 preaction joined #mojo
06:50 basiliscos joined #mojo
06:59 rawler joined #mojo
07:09 basiliscos joined #mojo
07:13 Vandal joined #mojo
07:26 vytas joined #mojo
07:35 da5id joined #mojo
07:36 trone joined #mojo
07:47 woz joined #mojo
07:51 dp_ joined #mojo
08:06 woz joined #mojo
08:27 arthas joined #mojo
08:29 aleksey joined #mojo
08:35 dotandimet joined #mojo
08:55 D4RK-PH0ENiX joined #mojo
09:03 _eugen joined #mojo
09:05 Adurah_ joined #mojo
09:06 abhishekisnot joined #mojo
09:07 fhelmber_ joined #mojo
09:31 mudler batman: sounds good to me :) i will update the modules later on my boxes =)
09:35 Dandre joined #mojo
09:51 batman mudler: sorry, it doesn't work after all :(
09:51 batman fixing it now
09:52 batman and most important: writing regtest :)
10:20 basiliscos joined #mojo
11:12 cpan_mojo Mojolicious-Plugin-TagHelpers-MailToChiffre 0.05 by Nils Diewald - http://metacpan.org/release/AKRON/Mojolicious-Plugin-TagHelpers-MailToChiffre-0.05
11:21 cpan_mojo Mojolicious-Plugin-AssetPack 0.31 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.31
11:21 sujithm joined #mojo
11:21 batman mudler: i'm able to install fa4, bs3 and assetpack now. hopefully you are too :)
11:21 batman using AssetPack 0.31
11:21 batman i need to bump the requirements in both fa4 and bs3, but i'll wait until you have confirmed
11:21 batman (hopefully you will confirm...)
11:23 aleksey joined #mojo
11:23 aleksey left #mojo
11:24 Akron joined #mojo
11:27 Akron batman: I removed the asset support for now as it seems there is no interest in support of dynamic assets ( https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/28 ). Will reintroduce it, in case it changes, of course. :)
11:33 batman Akron: ok
11:38 neyasov joined #mojo
11:43 Akron batman: But thanks for your attention and the recent fixes in AssetPack.
11:43 batman sure. i'm creating a new branch for your feature now...
11:44 batman i don't like it, but i'm adding it anyway :P
11:44 batman for your sake
11:45 Kripton joined #mojo
11:46 Akron \o/
11:46 ver joined #mojo
11:46 Akron I guess there are better use cases then mine, however.
11:46 batman i hope so
11:47 Akron It was just a surprising limitation I didn't expect.
11:47 batman i think it's a very odd thing to add routes before adding plugins
11:48 Akron The problem starts with assets, not with the registration of the plugin, as far as I remember.
11:48 batman what do you mean?
11:49 Akron The routes have to be defined when establishing the asset (->asset(...)), not before registering the plugin.
11:50 Akron In startup I always define plugins before routes.
11:54 sujithm joined #mojo
12:00 neilhwatson joined #mojo
12:01 sujithm joined #mojo
12:12 batman yeah, that's true
12:28 mudler batman: bad news http://scsys.co.uk:8002/428941
12:28 batman mudler: it's not the latest assetpack
12:28 batman you need 0.31, not 0.30
12:28 batman try this: cpanm --mirror http://cpan.cpantesters.org/ Mojolicious::Plugin::AssetPack
12:29 batman or even cpanm https://github.com/jhthorsen/mojolicious-plugin-assetpack/archive/master.tar.gz
12:29 mudler ok 1 second
12:29 purl it has been said that 1 second is far too long for what I need...
12:30 mudler batman: Fa it's on testers too?
12:32 D4RK-PH0ENiX joined #mojo
12:32 moritz mudler: forget 1 second
12:32 purl moritz: I forgot 1 second
12:32 moritz erm sorry, meant purl, not mudler :-)
12:32 Mad_Dud joined #mojo
12:32 mudler moritz: :P
12:32 Mad_Dud Hi guys,
12:32 purl hmmm... Hi guys, is there a function in Perl like setuid in C?
12:33 Mad_Dud thanks a lot for the patch 5.48
12:33 batman mudler: nah, the rest is old. you were right: the bug was in assetpack, not in the fa/bs
12:33 mudler batman: then i have the same error on FA4 :P
12:34 batman which version of assetpack do you have?
12:34 mudler it installs assetpack, but fa4 compilation still exits -1
12:34 mudler Mojolicious::Plugin::AssetPack is up to date. (0.31)
12:34 batman what about bs3?
12:34 mudler batman: uhm, one second
12:34 purl i guess one second is second is the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom.
12:35 mudler batman: bootstrap3 just fine
12:36 batman cool.
12:36 batman can you show me the fa build log?
12:37 D4RK-PH0ENiX joined #mojo
12:38 mudler batman: http://scsys.co.uk:8002/paste
12:38 mudler ops
12:38 mudler batman: http://scsys.co.uk:8002/428944
12:39 batman huh? "Successfully reinstalled Mojolicious-Plugin-FontAwesome4-4.2001"
12:39 batman what do you mean?
12:39 mudler i reinstalled it, since i had installed it before
12:39 batman maybe you need delete the /packed/* files?
12:39 batman *need to
12:40 mudler batman: let me test, or i would hang myself
12:40 batman please don't hang yourself
12:40 mudler fiuu i don't have to hang myself :P
12:41 mudler i removed the packed on the public, but still same problem
12:41 Mad_Dud guys, i installed the 5.48 and everything seems to be working without changing the code. However this post worries me a bit https://groups.google.com/forum/#!topic/mojolicious/aJTYjRCPjOE
12:42 Mad_Dud is there any more information about this change from $c->param('foo'); to $c->every_param('foo')->@*;
12:42 Mad_Dud ?
12:43 batman mudler: what does you app log say? run with MOJO_LOG_LEVEL=debug and see if it reports something about existing assets...
12:43 batman "Using existing asset for" or "Built asset for"
12:44 mudler what the hell
12:44 mudler Using existing asset for font-awesome.css:  /lib/perl5/Mojolicious/Plugin/FontAwesome4/packed/font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css
12:44 mudler wait
12:44 mudler i try to uninstall it
12:46 batman no, that is correct
12:46 batman or... what is the content of /lib/perl5/Mojolicious/Plugin/FontAwesome4/packed/font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css ?
12:46 batman maybe you should remove /lib/perl5/Mojolicious/Plugin/FontAwesome4* and re-install...
12:47 mudler i removed everything infact
12:47 mudler the css is good
12:47 mudler but still the same error :|
12:48 batman what is the content of /lib/perl5/Mojolicious/Plugin/FontAwesome4/packed/font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css ?
12:48 batman and could you provide me with a screenshot?
12:48 batman ...of the webpage
12:49 mudler batman: one second
12:49 purl one second is second is the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom.
12:49 mudler batman: css http://scsys.co.uk:8002/428950
12:49 batman Akron: there is an issue with what you want: the downloaded files are cached on disk, meaning they won't be downloaded again the next time.
12:50 batman this is by design, even though i can agree it's not the best idea
12:50 batman mudler: and the screenshot where you see -1 ?
12:50 batman mudler: i don't get how it says "Using existing asset" and you still see -1... something is very funky here
12:51 mudler batman: just doing it
12:51 purl just doing it is dangerous though - you get to be a co-maint.
12:51 batman purl is very annoying today.
12:51 batman purl: shut up
12:51 purl ;-(
12:51 mudler batman: yeah it's odd actually
12:52 mudler batman: http://imgur.com/K2Frz4h
12:53 batman Akron: also, i hope you're not actually having "/" in asset names: https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/28/files#diff-2d7fbc73df5d69af5a582e03bfb5a96bR39
12:53 batman mudler: i doubt that is the latest assetpack
12:54 mudler uhm
12:54 mudler 0.31?
12:54 batman let me show you... *one moment*
12:55 batman https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.31/lib/Mojolicious/Plugin/AssetPack/Preprocessor.pm#L103
12:55 batman there's nothing in the code that can render the error message you show me
12:55 batman (unless the asset already exists)
12:56 batman please see if you can track down where the generated asset is.
12:56 mudler :O
12:56 batman can you check the source of the webpage and find the md5-sum?
12:56 batman if you find it, try to search for a file with that name on the filesystem
12:57 batman and check if one of the found files has "exit_code" in it
12:57 batman i'm very sorry for screwing up in the first place :(
12:57 mudler ok a moment
12:57 purl it has been said that a moment is lost
12:57 mudler batman: don't worry at all
12:58 mudler you give me so much relief with that kinda of plugins, totally worth my time :D
12:58 mudler oh well, i was thinking why don't enable also gzip compression with a -gzip on attributes? would be handy (manually adding the hook everytime it's time consuming)
12:59 batman hehe, i'm very happy that i make something useful in the end :)
12:59 batman no need. mojo already does gzip for you if the client supports it
13:00 mudler mh
13:00 mudler it was added lately?
13:00 mudler i remember in 4.~ i had to add it
13:00 mudler (google checks told me that i was running not gzip, so i manually added it)
13:02 mudler batman: just one question, i shouldn't see that kinda of error, since you added $! $?, right? it's not then the scss location the problem
13:03 batman no, i think it's a problem that you already have a file that contains those errors in it.
13:03 mudler ohhhh nice
13:03 mudler i see it imports the css with the error message
13:03 batman check the html source code and look at each of the assets to see which that contains the error message
13:03 batman yeah
13:05 batman mudler: "The event "read" in Mojo::Content will be emitted for every chunk of data that is received, even chunked encoding and gzip compression will be handled transparently if necessary"
13:05 mudler batman: found it
13:05 batman \o/
13:05 mudler infact now i see that :  [info] Built asset for font-awesome.css:
13:06 batman but it's not supposed to build anything :(
13:06 mudler but i still have the same error
13:06 mudler damn
13:06 mudler let me search more
13:06 batman one thing first: the gzip support is in the client side, not the server (sorry)
13:06 batman mudler: it could be fa.
13:06 mudler batman: still builds everytime
13:06 batman mudler: thanks. i will let you know later when i've tracked it down
13:06 mudler now on the public/packed
13:07 batman what is the md5 sum of the built file?
13:07 mudler batman: thanks to you, yeah i would be glad to help :)
13:07 mudler da71e598f993ba27ac81e225a9ab9cba  font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css
13:08 mudler batman: but contains my path, so would differ, no?
13:08 batman it's a bug. i will fix :)
13:08 batman uhm... is it da71e598f993ba27ac81e225a9ab9cba or eb403a164f3ed30d27bc6b090f6ff0ff?
13:08 mudler da71e598f993ba27ac81e225a9ab9cba is the md5 of font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css file
13:09 mudler batman: curious thing is
13:09 mudler that the packed css file contains fa
13:09 batman ??
13:09 * batman doesn't get it...
13:09 mudler batman: the css in the public/packed/ font-awesome-eb403a164f3ed30d27bc6b090f6ff0ff.css contains fa compiled well
13:10 mudler but when i see the source of the html page
13:10 mudler i see the css with the error
13:10 mudler :O
13:10 batman then it must be fetched from somewhere else...
13:10 * mudler head begin to roll
13:10 * mudler starts to dig
13:11 batman i will also rebuild the fa plugin, like i did with bs
13:12 mudler wait!
13:12 mudler i managed !
13:12 batman ?
13:12 mudler there was still the scss cache files on the inc (system wide)
13:12 mudler batman: it works now, sorry for bothering you
13:13 mudler wait
13:13 mudler i was too quick to
13:14 mudler batman: let me dig further and i let you know :)
13:14 batman awesome!
13:14 mudler batman: fawesome! you wanted to say :P
13:14 batman ;)
13:15 cpan_mojo Mojolicious-Plugin-Bootstrap3 3.2004 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Bootstrap3-3.2004
13:16 ver Hi! I have some troubles with my Mojo application. I'm use 4.90 version and when I update to version 5.0+ I've got an error "You should init model first at ..." (http://hash.su/7907). I have authentication module as bridge for checking login/password and rights.
13:17 ver When I update Mojo to 5.0 and take Mojolicious::Controller module from v4.99 it works fine.
13:26 moritz ver: to me, it looks like the exception is coming out of code you wrote, not Mojolicious code
13:26 moritz my $admin = FW::Core::Model->db->query($sql, $user_id, 'perm_admin')->hash; # this doesn't look like a Mojolicious class
13:31 ver It's from model. FW is application name. Core is plugin name.
13:31 ver Model is just database connection.
13:32 moritz ver: well, we don't know the code that throws the exception, so we can't know how to fix it
13:32 tbushell joined #mojo
13:33 ver I understand but I have much code and it's difficult to show only a small part :(
13:33 ver I want to know what changed in Mojolicious::Controller from 4.99 to 5.0
13:34 ver I have part of diff but don't understand what I need to chenge in my code.
13:36 moritz ver: https://github.com/kraih/mojo/blob/v5.0/Changes
13:37 tbushell joined #mojo
13:37 ver I know about it and I have diff file of Mojolicious::Controller (http://hash.su/7908)
13:38 moritz then I don't know what you want
13:38 moritz you wanted to know what changed? The link says it
13:38 moritz you want somebody else to debug your code? pay them :-)
13:38 Akron batman: I don't think the cache-thing is a problem. Dynamic assets could be versionized by themselves.
13:39 batman Akron: ok. what about the "/asset.css" comment?
13:39 batman Akron: could you try/comment on this? https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/30
13:40 Akron Mad_Dud: Why is the post worrying you? If everything works it means there were no problematic uses of param() in list context in your code. If you however need list context, you have to adjust it now. I guess it's not very often used by design.
13:42 Akron The / in the asset name is not mandatory. Don't know why I did it.
13:42 Mad_Dud Akron: this helps a bit
13:43 Mad_Dud so now, if i just have $self->param('name_from_post_form') and everything works, my code is not affected by this perl bug.. right?
13:43 Mad_Dud if i find that something crashes, i have to change from param to every_param()->@...
13:44 Akron Mad_Dud: There was never a perl bug.
13:44 Mad_Dud Akron: i thought it's related to http://blog.gerv.net/2014/10/new-class-of-vulnerability-in-perl-web-applications/
13:44 tbushell joined #mojo
13:45 Akron Mad_Dud: That's not a perl bug. It's a vulnerability in the code using CGI.pm (or the Bugzilla version of CGI.pm).
13:45 Mad_Dud ok
13:46 Mad_Dud the part, which overwrites the variables and scalar as a fix.
13:47 Akron The problem was that ->param('x') returned a scalar value in scalar context and a list in list context. Attributes in hashes are list contexts so in case there are multiple parameters with the same name, the second parameter was able to override a keyname in the hash.
13:48 Mad_Dud Akron: sounds familiar to the gerv.net article
13:48 Akron So - it was always suggested and documented in the Mojo code that whenever you want scalar context, i.e. don't expect more parameters than one, you have to do scalar $c->param('x').
13:48 Mad_Dud can you search "case of the problematic code above" in the article.. it describes what you just wrote
13:48 Akron Yes. That's simply the point. It never was a perl bug. It was just very easy to write vulnerable code.
13:49 Akron So - you now only have to worry if your web application somewhere expects parameter lists and not single parameters, because in that case your code fails silently since 5.48.
13:50 Akron Otherwise you are fine.
13:53 ver moritz, sry, I have not so good english and I can't describe what I whant from channel =|
13:54 Akron Mad_Dud: For example if your app provided something like /search?q=foo&q=bar and both "q" parameters were valuable - this will now fail and only "bar" will be returned with param("q") - for these scenarios you need every_param("q"). It's pretty easy and the change is a good one. Makes writing vulnerable code less easy.
13:55 Akron batman: I guess the cache does not respect caching rules?
13:55 batman no
13:56 batman it simply skip downloading the asset if the file that looks like the url exists
13:56 batman caching rules = HTTP headers, right?
13:56 sri batman: what quality migration tools are you talking about?
13:57 Akron Yeah.
13:58 batman sri: the first that comes to mind are the different tools based on sql-translator, but there are others that i can't remember at the moment :(
13:58 hesperaux joined #mojo
13:58 Akron batman: And how about respecting cache-control: no-cache?
13:59 Akron Full cache-control would obviously be madness.
13:59 Akron ;)
13:59 sri batman: so you're telling me not to write a migration tool because... there are some quality ones out there... but you can't tell me which ones?
13:59 sri classy advice
14:00 batman sri: no, i'm not trying to tell you to do anything.
14:00 batman i'm just surprised :)
14:01 batman Akron: i guess i could store if it should be cached or not from the first response. could you add that as a comment on github if that would be desirable?
14:01 batman sri: also, i'm pretty sure you know most of the perl tools already..?
14:02 sri you are aware i started the first one for perl? https://metacpan.org/pod/DBIx::Migration
14:02 sh4 joined #mojo
14:02 batman no.
14:02 batman sri: don't take it the wrong way. i'm NOT trying to tell you NOT to do a migration tool.
14:03 sri i'm trying to figure out what you're telling me
14:04 batman i'm saying if _i_ was making Mojo::Pg, i would make it awesome before i even considered doing migrations.
14:04 batman i'm not even trying to give you an advice
14:04 batman sorry for even bringing it up
14:04 sri so you're saying it is not awesome? ;p
14:04 batman i'm saying you're telling me it's experimental :)
14:05 batman hehe
14:05 batman it's still awesome and people are using it no matter how experimental you tell them it is :D
14:06 batman Akron: thanks for the comments on github. i tend to forget what goes on on IRC.
14:06 hesperaux_ joined #mojo
14:06 Akron batman: Me too.
14:06 batman :)
14:06 batman sri: i hope i manage to make a Mojo::Pg backend for Mandel
14:08 Akron sri: I guess batman wants to say a tweet saying "Making migration in Perl fun again" wouldn't be good PR. ;)
14:08 batman fuck no
14:09 Akron :-P
14:09 batman Akron: i don't think that was remotely funny.
14:10 Akron Okay .. then maybe it's my bad english suggesting me it's funny. Sorry.
14:10 genio DB migration in any language is no fun
14:10 Akron I simply don't like the tern "migration" in that context at all.
14:11 sri play framework calls it evolutions
14:12 D4RK-PH0ENiX joined #mojo
14:12 genio DB versioning?
14:14 genio what does RT use?
14:18 Akron I think schema migration is quite a common term ...
14:25 sri still waiting for links to quality perl migration tools
14:25 batman sri: no idea if it's good or not, but...
14:25 batman https://metacpan.org/pod/distribution/App-Sqitch/lib/sqitch.pod
14:26 batman https://metacpan.org/pod/DBIx::Class::Migration
14:26 batman https://metacpan.org/pod/SQL::Translator::Diff
14:27 * batman have to go home
14:27 hernan whats mandel for ?
14:27 hernan creates relationships ?
14:28 Mad_Dud Akron: thanks a lot for explanation!
14:29 batman hernan: https://metacpan.org/pod/Mandel#DESCRIPTION
14:29 Akron Mad_Dud: You're welcome.
14:30 sri batman: when someone asks you for recommendations, don't start with "no idea if it's good..."
14:30 dotandimet joined #mojo
14:30 batman sri: then i will simply shut up
14:33 sri seriously, this is what you want me to use? https://metacpan.org/pod/distribution/App-Sqitch/lib/sqitchtutorial-vertica.pod
14:34 sri is that really how you think migrations should work?
14:38 moritz I could imagine that if you want to automate them at scale, that might make sense
14:39 moritz I've looked at squitch before, and decided that for our use case, it's overkill
14:42 ribasushi in my (albeit limited) experience - if you want automated migrations - you are already working at scale
14:42 ribasushi it's unfortunate DBIx::Class::DeploymentHandler got written (and called) as is - it has no logical dependency on DBIC itself, and the actual dependency can be removed in half a day
14:43 ribasushi but nobody came forward to do it
14:43 ribasushi and yes, it is not lightweight by a long shot, but it is a proper foundation to write a sweet api on top
14:44 sri i disagree about that, migrations are important for staging deployment no matter the size of the app
14:44 sri batman: in case you're wondering why i'm so inquisitive... because of this http://irclog.perlgeek.de/mojo/2014-10-09#i_9479072
14:47 batman sri: yeah, i understood that. i've only used the sql-translator one myself which i think was quite handy
14:47 batman i guess i should have left out the "very good" part in that sentence.
14:47 cpan_mojo Mojolicious-Plugin-FontAwesome4 4.2002 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-FontAwesome4-4.2002
14:48 batman sri: could we just leave it? :/
14:48 batman mudler: i hope this fa4 version works for you as well.
14:50 mib_4cswgk joined #mojo
14:53 Akron joined #mojo
14:56 hesperaux joined #mojo
14:57 doby joined #mojo
14:59 hesperaux_ joined #mojo
15:01 disputin joined #mojo
15:05 hesperaux joined #mojo
15:05 tempire I might try out sqitch
15:12 sri btw. i think there is a simple way to have hidden files in the DATA section
15:13 sri in the docs we say templates have two file extensions (.html.ep) and static files only have one (.html), so that leaves filenames without extensions
15:13 sri @@ migrations
15:17 hesperaux_ joined #mojo
15:32 good_news_everyon joined #mojo
15:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pGhjXw
15:32 good_news_everyon mojo/master cf65e4b Sebastian Riedel: fixed Mojolicious::Static to hide files without extensions in DATA sections
15:32 good_news_everyon left #mojo
15:42 sri kinda funny how pretty much nobody here actually uses migrations
15:43 sujithm joined #mojo
15:45 sri honestly, i don't think that's because you're lazy slobs, the tools are just not nice enough
15:46 batman I just never change anything, because it's painful :D
15:50 sri https://gist.github.com/anonymous/541fd4d47c13b584284b
15:50 KCL joined #mojo
15:51 sri you put a migrations file into the DATA section and just tell it to figure shit out on its own on startup
15:54 sri of course it can be an external file too, and you only have to keep the current version as is, older ones can be merged, you can switch to older versions, tear down everything and start over... and so on
15:54 marcus sri: I've been using DBH-MigrationHandler. And I'm using the migrations system on ruby.
15:55 marcus re nobody's using migrations.
15:55 thowe joined #mojo
15:55 marcus sri: btw, it's weird that you linked to the squitch vertica tutorial. This is the one for postgres - https://metacpan.org/pod/distribution/App-Sqitch/lib/sqitchtutorial.pod
15:56 Akron What does ensure_latest does? I mean - how can the app based on the schema be sure the version of the schema in the db matches up the latest version in the file?
15:56 thowe I want a failraptor T-Shirt, but they don't seem available yet?
15:56 marcus I'm not a big fan of that tutorial tho, it makes it look harder than it is.
15:56 marcus thowe: anymore, you mean.
15:56 Akron And will the migrations be done using M::Commands?
15:56 thowe I'm going to a local developer event soon and want to fly the flag...
15:56 thowe Oh.
15:56 Akron I like the file concept pretty much btw.
15:56 thowe :(
16:00 r0b3rt What if you want to make general SQL comments with -- in the migrations file?
16:10 sri marcus: that's where the link to the generic tutorial led
16:10 sri think there's some pod file naming conflicts
16:11 sri Akron: it knows because the version is stored in the database
16:11 fhelmber_ joined #mojo
16:11 Akron sri: In a special table or db-wide like in SQLite?
16:12 sri special table
16:12 Akron Ah - okay. Nice.
16:12 sri this is how it's commonly done https://metacpan.org/source/DANIEL/DBIx-Migration-0.07/lib/DBIx/Migration.pm#L172
16:14 sri thowe: there are currently no mojolicious shirts for sale i'm afraid
16:14 Akron That's a very good approach, as it means plugins would be allowed to have independent schema versions.
16:17 sri right, i want Minion for example to use migrations
16:17 Akron sri: I like the approach. And in fact - with a good tool I would definitely care less changing schemata. ;)
16:21 nicomen joined #mojo
16:22 Akron Although - using template-like variations for MySQL, PG, SQLite and so on would be pretty cool.
16:23 sri btw. i'm only targeting postgresql with this, so things are incredibly simple because postgresql is awesome
16:23 sri every migration can be performed in a transaction and rolled back if something fails
16:24 sri no shitty half finished migrations like in mysql
16:26 Akron sri: What are the problems with transactions in MySQL nowadays? I thought they are working as expected in recent versions.
16:28 sri does it do transactional ddl now?
16:36 disco joined #mojo
16:36 Akron Ah - you are right, there seem to be limitations, especially for MyISAM. Thanks for pointing this out. Didn't know about that.
16:39 davido___ Tuesday the 14th, Salt Lake Perl Mongers will be featuring a presentation: Asynchronous Programming Patterns with Mojo::IOLoop::Delay.
16:39 sri i guess migrations from a file would work something like app->pg->migrations->from_file(app->home->rel_file('migrations.sql'))->ensure_latest;
16:39 sri with the same file format
16:40 davido___ We usually have video. I'll provide a link once we get it up.
16:40 sri davido___: neat
16:40 davido___ tempire may be interested in dropping by.  I think it's one of his coworkers giving the presentation.
16:42 jzawodn_ davido___: will it be caught on video?
16:42 sri hmm... i guess if you order them -- 1 up -- 2 up -- 2 down -- 1 down it would always be a working sql file
16:42 davido___ jzawodn_ Assuming our speaker doesn't object, it will be on video.  I'll mention on the Mojolicious mailing list once we get the video posted.
16:42 jzawodn_ davido___: excellent, thanks!
16:44 davido___ (I'm assuming that's not an inappropriate use of the list)
16:45 dod joined #mojo
16:48 jzawodn_ It's totally on topic and relevant.  It's Mojo advocacy
16:53 jamesaxl joined #mojo
17:07 basic6_ joined #mojo
17:12 woz joined #mojo
17:20 sri what jzawodn_ said
17:21 * jzawodn_ needs to ditch the '_'
17:24 tempire davido___: I'm planning on being there
17:25 tempire davido___: You might want to add some more underscores.
17:25 tempire GO BIG OR GO HOME
17:25 davido___ +++++
17:26 davido___ My client just picks the fewest number of underscores available when it reconnects after I get dropped.  Sometimes if my laptop and desktop are going both at the same time it starts getting kind of crazy.
17:29 tempire sri: That reminds me. We should put some effort into designing a mojoconf shirt for next year.
17:30 tempire I wonder if there are t-shirt providers that can do more than just a centered logo on the front and back
17:30 * tempire wants more power
17:31 sri there are, you can print on sleeves and stuff
17:31 sri just like there are huge quality differences
17:34 sri the perl raptor shirts i made a few years back used super high quality cloth printing
17:34 sri mine still look like new
17:35 davido___ a mojolicious bike jersey... that would be cool :)
17:35 sri usually, the higher the print quality the less colors you can use as well
17:36 sri that cloth print stuff was limited to two colors, and i had to provide vector images
17:39 sri for more details ;p http://www.youtube.com/watch?v=Lu-3NiZGl8w
17:40 sri really shitty video quality
17:42 disputin joined #mojo
17:44 sri perhaps overkill for a conference shirt :)
17:45 sri batman: btw. my test postgres database that has been running for a like a week on my laptop uses very little memory
17:45 batman ok. cool. i'm installing pg now to see how it works
17:45 sri there's one process with 11mb and 5 others between 300kb and 4mb
17:47 batman sweet! that's not much
17:47 klapperl joined #mojo
17:50 sri i guess including simple migrations in Mojo::Pg could be controversial, but it's so damn convenient
17:51 sri think i'll just make it easy to ignore for those that rather like to use enterprise class migration stuff
17:54 batman me and marcus had migrations in convos, but we didn't dare to just run them, so we allowed the user to decide if he/she should make a db backup first or not...
17:54 batman i'm not sure what's right: do the right thing and hope it works, or give the tools to the user and let she decide
17:55 sri the app owns the schema imo
17:56 sri only problem when you release stuff into the open is that you can't merge old migrations... since people may upgrade from any version of your module
17:57 sri (not really a problem)
17:57 sri actually, proper migrations are solution
17:59 sri *+the
18:10 neyasov joined #mojo
18:27 tempire I want to be able to  make a shirt that has multiple colors outside of the cloth
18:27 tempire like https://www.evernote.com/shard/s15/sh/f8c5ebf4-5dc6-4c82-9cdb-77ee6802c509/800ede9ff54f91717a472d181e8d3750
18:29 bobkare joined #mojo
18:29 tempire Hmm.
18:29 tempire Might be nice to have some conf-themed phone cases
18:31 Eke- joined #mojo
18:37 * sri likes the libuv shirts http://teespring.com/libuv
18:38 jzawodn_ nice
18:42 marcus i agree, very cool.
19:05 sivoais joined #mojo
19:07 Eke- joined #mojo
19:26 disputin joined #mojo
19:31 woz Hi all, I'm struggling with escaping stuff in content_for blocks in templates. Any ideas on syntax?
19:35 woz As far as I can tell it just doesn't work.
19:37 woz Ah, it does :-)
19:38 woz You set %== in the content_for line in the template rather than escaping in the template, which just returns really odd results
19:41 woz Imean in the layout rather than in the template
19:56 jamesaxl joined #mojo
19:59 bobkare joined #mojo
20:11 fhelmber_ joined #mojo
20:23 tbushell joined #mojo
20:27 tbushell joined #mojo
20:29 tbushell joined #mojo
21:15 jberger_ I use dbicdh in Galileo
21:15 jberger_ it is ... interesting
21:16 jberger_ then again it is attempting to be db agnostic migrations
21:16 jberger_ which makes it worse
21:30 tbushell joined #mojo
21:41 sri yea, i've given up on db agnostic...
21:46 jnbek joined #mojo
21:54 jberger don't blame you
22:02 thowe I like Postgres features too much.
22:11 jzawodn_ they all suck in different ways :-|
22:11 jzawodn_ you just gotta pick the ways you're comfortable with
22:35 Ptolemarch joined #mojo
22:42 axlrose joined #mojo
22:46 jamesaxl joined #mojo
23:12 * sri already has migrations working
23:13 firnsy \o/
23:15 sri working on it really reminds me why i want migrations... when a table upgrade fails and you have to track down what went wrong... that's not fun!
23:16 * firnsy got Mojo::Pg packaged three days ago and can't wipe the smile of his face
23:27 sri i like how your avatar in convos looks like a frog :)
23:28 sri http://i.imgur.com/KkoCg8I.png
23:28 Averna joined #mojo
23:37 Ptolemarch joined #mojo
23:37 firnsy *ribbit*
23:40 preaction joined #mojo

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