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

IRC log for #mojo, 2015-03-03

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

All times shown according to UTC.

Time Nick Message
00:05 sri anyone got a better name than wrap_content? that fits in with content and content_for
00:06 Grinnz_ template toolkit uses WRAPPER for that sort of thing
00:06 Grinnz_ so, seems fine to me
00:12 bpmedley https://github.com/brianmed/patches <— Anyone have time to look over the readme, perhaps?
00:28 good_news_everyon joined #mojo
00:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x28m
00:28 good_news_everyon mojo/master e3ac5b1 Sebastian Riedel: merge content and content_for helpers
00:28 good_news_everyon left #mojo
00:32 sri hmm, the description for wrap_content would actually be that it works like content, but replaces the named buffer
00:40 good_news_everyon joined #mojo
00:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x207
00:40 good_news_everyon mojo/master 5fcc098 Sebastian Riedel: better description for content_for helper
00:40 good_news_everyon left #mojo
00:41 sri btw. i was wrong earlier when i said this topic has not come up before, i just didn't understand what we were actually talking about
00:41 sri it has come up a few times, people were just asking for the ability to replace the content in a buffer
00:48 acks joined #mojo
00:48 acks Hi All, I'm having trouble finding docs on Models
00:50 bpmedley acks: Are you building a Mojolicious full app?
00:51 acks I've inherited maintenance of one. I need to add some new tables and relationships.
00:51 bpmedley Ok, so, you need to do some DB work and then add support for that to the Mojo app?
00:51 Grinnz uh. Mojo doesnt really do anything with your database and models
00:52 acks I wasn't able to find info in the online docs related to the ORM, Models
00:52 Grinnz there is no ORM included in Mojolicious
00:52 acks Ok. seems like maybe my app was built on an earlier version that supported some kind of Model scheme
00:52 bpmedley acks: It’s database agnostic.  Some people use DBIx::Connector (however, those are switching to Mojo::Pg in droves), and others use straight DBI or an ORM.
00:53 bpmedley Still others read the tables directory from kcore.
00:54 acks I c, ok, makes sense.
00:57 acks Yea, my stuff is just using Rose::DB as a base. Ok thanks for he help. I was spending time digging through the docs looking in the wrong direction.
01:00 jontaylor joined #mojo
01:06 sri patch for a wrap_content helper https://gist.github.com/anonymous/65af03740cf8d2f63d52
01:07 sri the name doesn't fit so well with the description
01:08 d4rkie joined #mojo
01:09 bpmedley change_content?
01:10 bpmedley alter_content?
01:10 bpmedley Oh, I see, it will alter content if there and add if not there?
01:11 sri yes
01:11 sri it needs to fit into the surrounding theme
01:11 sri content, content_for, ...
01:11 sri those names are not very descriptive
01:12 sri but, that's what we have and where the new name needs to fit in ;p
01:12 sri we have url_for and url_with... perhaps content_with :)
01:13 sri ¯\_(ツ)_/¯
01:16 bpmedley content_swap
01:16 sri content_with https://gist.github.com/anonymous/3a320d0b62309464b560
01:22 riche sri: kind of random question, but do you have 20 reasons why no one should use anything but mojolicious?
01:22 sri no one? :)
01:22 riche i only deal with absolutes ... j/k
01:22 bpmedley Have you tried to configure mod_perl lately?
01:23 sri 1) ther's a unicorn on the frontpage
01:23 riche sheesh
01:23 sri no, i have not made such a list ;p
01:24 riche okay it would be nice to have a brainstorming session, maybe this weekend
01:24 riche you know what it would be for
01:26 Grinnz bpmedley, dear god no
01:30 asarch joined #mojo
01:39 hshong joined #mojo
01:46 jabberwok it's kind of replace_content ...? hmm
01:51 jabberwok content_with is suitable.  all three variants could definitely benefit from better names ... later.  good patch, sri
01:53 marty content_replace
01:55 marty content_switch
01:56 sri i think it needs to be a somewhat generic name to fit in
01:56 sri otherwise it looks odd next to content_for
02:00 riche here's a bad one: content_other
02:00 marty content_shift
02:01 marty pretty hard to improve on content_with it seems.
02:02 riche sri's url_for/url_with comment i think makes a v good argument for consistent language
02:08 good_news_everyon joined #mojo
02:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x25K
02:08 good_news_everyon mojo/master 275f0e7 Sebastian Riedel: add content_with helper to Mojolicious::Plugin::DefaultHelpers
02:08 good_news_everyon left #mojo
02:08 sri it prolly wouldn't be my first choice if we were starting fresh, but right now it wins
02:09 sri also <%= content_with 'foo' %> does not look awkward
02:10 sri it's all just the content helper with slightly different semantics... similar to url_with
02:11 sri although, now that it's all consistent, i think i'm going to encourage just using content for retrieving
02:12 good_news_everyon joined #mojo
02:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x2dK
02:12 good_news_everyon mojo/master 60a4c33 Sebastian Riedel: just use the content helper in examples consistently
02:12 good_news_everyon left #mojo
02:13 sri with a recipe in the rendering guide i think we'll be careful for now
02:15 jabberwok perhaps something short and sweet, just a bit longer than the current example?
02:15 jabberwok % content_with message => begin
02:15 jabberwok <div class="xyzzy">
02:15 jabberwok <%= content 'message' %>
02:15 jabberwok </div>
02:15 jabberwok % end
02:19 good_news_everyon joined #mojo
02:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x2FX
02:19 good_news_everyon mojo/master ce7c8fc Sebastian Riedel: more consistent descriptions
02:19 good_news_everyon left #mojo
02:19 sri maybe
02:20 sri template inheritance has historically been one of the toughest things to teach
02:22 jabberwok thrilled this went from my blog posting to your revision just over a weekend.  altho now i'll have to rewrite my article!  this is the power of a good community
02:22 sri :D
02:22 sri jabberwok++
02:23 sri (and everyone else who joined the brainstorming)
02:23 sri ++
02:23 jabberwok !beer for all
02:23 jabberwok (what, no channel |tender?)
02:24 mst purl: botsnack
02:24 purl :)
02:24 mst purl: be mst
02:24 purl RTFMTALITY
02:24 mst purl: be sri
02:24 purl i am teh help-vampire slayer! (lesbian witch wanted...to umm...assist me...)
02:24 mst jabberwok: we have a bot but she has her own opinions :)
02:25 sri careful with your beer promises, i call those in at mojoconf now :p
02:25 jabberwok i might just be there. there's a train straight from here.  altho it's overnite.
02:26 sri purl is awkward
02:26 mst sri: I was going to consider turning up but bdf
02:26 sri mst: oh my!
02:26 mst maybe next year
02:27 * Grinnz is unsure which urbandictionary definition is applicable to this context
02:27 sri lol
02:27 sri i just looked that up too!
02:27 jabberwok binary distribution format, clearly
02:27 mst Grinnz: Brian D Fuckhat
02:28 jabberwok Check one: (_) 9-track 6250dpi  (_) DecTape TU-50 (_) Paper Tape ... sorry, dating myself
02:29 mst it's very simple - making Jesse Vincent quit as pumpking then trying to make rjbs quit because you don't like his decisions does not endear you to me
02:29 Grinnz ah
02:30 mst and I'm not capable of being nice to somebody who tries to hurt the nice people of the perl community
02:30 mst plus, trying to get me thrown out of YAPC::NA for explaining hallway++ doesn't help either
02:30 jabberwok egad
02:31 mst "I know what the hallway track is" "yes I know you do I'm trying to explain something else" "FUCK YOU YOU FUCKING FUCKER" <brian tells the organisers to throw me out then when they don't leaves the conference so people have to improvise the white camel awards>
02:33 klapperl joined #mojo
02:34 riche well maybe you guys can kiss and make up at mojoconf
02:34 mst sri hated me for a while once; his hatred made much more sense than brian's ever has (sri, that was a compliment)
02:34 Grinnz rofl
02:37 mst riche: he cost us a competent pumpking and nearly cost us a second one. I won't forgive him for that, so I don't expect him to forgive me for calling him out.
02:37 sri http://cf.chucklesnetwork.com/items/1/3/5/7/2/original/not-sure-if-friend-or-mortal-enemy.jpg
02:37 zivester joined #mojo
02:38 mst riche: my morality is not always virtuous, but it is consistent :)
02:38 * sri believes in yelling at people instead of holding grudges :)
02:39 jabberwok i never buy and hold a grudge, they depreciate too quickly.
02:39 riche i can forgive people but I never forget.
02:40 riche like I forgave sri for effectively flipping me off for something i asked for about two years ago.  but i didn't forget it.
02:40 sri i did?
02:40 riche yes.  some damn external file I asked to put in __DATA__ and you said it was activestate's problem
02:41 riche anyways old news
02:41 sri i remember!
02:41 sri and it was activestate's problem :)
02:41 riche yah that gave me hell ... just for that I had a development team revolt on my hands
02:42 riche anyways
02:45 jabberwok wait... programmers are revolting?  i represent that remark.
02:45 sri yea, i don't buy it
02:45 riche i don't know what made brian do that and I don't care, but both you guys really care about perl, and i hope you guys can come to terms on it
02:45 sri no memes on google images for programmer revolt either
02:45 mst he can hate me all he likes, I just try and avoid places he's going, and he does the same for me
02:45 Grinnz sri, probably because it involves them all sitting at computers
02:45 mst it's a very civilised, honourable mutual dislike on the whole, and he deserves respect for that
02:45 riche hm well that's no good, cuz he'll be at mojoconf, and of course we want you to be there as well.
02:53 mst and he won't be at YAPC::NA and I will, and I think I've not been hard done by
02:54 mst dude, seriously, he and I would get into a stupid argument, because we bring out the worst in each other in terms of interaction style over disagreements
02:55 mst even if he handled it perfectly I'm sure I'd still fuck it up
03:00 riche hm yes probably somewhat similar to how I took your indenting comments the other day
03:01 riche okay I won't talk about it anymore.  take care.
03:10 disputin joined #mojo
03:33 noganex joined #mojo
03:37 ningu joined #mojo
03:37 jnbek joined #mojo
03:38 ningu I seem to be missing something basic... say I do $bar = $foo->next_node and the next node is a text node. shouldn't I be able to verify this with $bar->type ?
03:38 bd joined #mojo
03:38 ningu $bar->content returns the text content, but $bar->type returns undef.
03:39 ningu I'm updating to the latest Mojo::DOM now
03:39 hshong joined #mojo
03:41 ningu was on 5.77. now 6.0.
03:42 ningu hmm. works now.
03:42 good_news_everyon joined #mojo
03:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xaqC
03:42 good_news_everyon mojo/master 79dd4fd Sebastian Riedel: just pass along all arguments
03:42 good_news_everyon left #mojo
03:43 ningu so I guess things were different in 5.77 and I should have read those docs instead ;)
03:43 preaction yes. the 6.0 release changed some of the names of Mojo::DOM methods
03:44 preaction to be more in-line with their corresponding DOM method names (without the verbosity)
03:44 ningu ah, ok
03:44 ningu makes sense
04:10 jberger so does this freak anyone else out? http://www.cpantesters.org/cpan/report/91af88ec-c11f-11e4-999e-e57269ee33dd
04:13 jberger hmmmm, I guess it is the ancient version of mojo at fault
04:13 jberger but what a strange message
04:19 Grinnz lol
04:19 Grinnz you mean you don't have j.pm???
04:19 jberger ha! Mojo::JSON::import is inherited from Mojo::Base as of that version!
04:19 jberger preaction++
04:19 preaction heh ;)
04:20 jberger damn, ok, gotta pick a version to require I guess
04:20 preaction 3.78 :p
04:20 preaction use binary search to find the version you can support?
04:20 preaction or git bisect?
04:20 purl git bisect is hot
04:20 preaction i agree, purl
04:20 purl preaction: i'm not following you...
04:21 jberger I'm not sure I care this much, might just make it 4 for a nice round number
04:21 Grinnz lol
04:22 Grinnz oh hey, Moo 2.0 has been released
04:22 preaction cd mojo; git checkout v3.77; git bisect start; git bisect bad; git checkout master; git bisect good; git bisect run perl ../Test-Mojo-WithRoles/t/whatever.t;
04:23 Grinnz no more use warnings NONFATAL => 'all' all over my classes!
04:23 preaction i can remove Moo::Lax and just require Moo=2!
04:24 Grinnz rip Moo::Lax, had a good run
04:24 preaction jberger: sorry, forgot the last step: git describe (which shows you the last tag for the current commit)
04:25 inokenty-w joined #mojo
04:25 jberger Grinnz: try this one on for size: http://www.masonbook.com/book/appendix-b.mhtml search ignore_warnings_expr
04:26 Grinnz jberger, what is this cancer you're linking at me
04:26 jberger mason has fatal warnings during the template compile phase
04:26 irq joined #mojo
04:26 jberger that can be ignored via regex
04:26 Grinnz hahaha
04:26 jberger but once the template is compiled, rendering it is not fatal
04:27 jberger so what this means is, when you upgrade to 5.18, any template that has ~~ suddenly times out on the first request that that worker serves
04:27 Grinnz arent fatal warnings great
04:27 jberger debug THAT when you barely know how mason works
04:27 jberger yeah
04:28 jberger great way to ....
04:28 preaction ouch
04:28 jberger I need some happy, purl
04:28 purl jberger: sorry...
04:28 jberger mojoconf!
04:28 purl somebody said mojoconf was https://www.youtube.com/watch?v=eWM2joNb9NE
04:28 jberger ahhhhhh
04:28 Grinnz just updated our perl at $work to 5.18... $other_team's code base which we have to use for some things of course throws about a million given/when/smartmatch warnings
04:29 Grinnz and, apparently most of those were added by a guy who no longer works here
04:29 damaya joined #mojo
04:29 jberger are they "deep smart matches" or "a fake 'in' keyword"
04:29 damaya tempire: Hey, are you using a CMS for http://tempi.re?
04:29 jberger mine are entirely the latter
04:30 tempire no
04:30 jberger (my inherited ones that is)
04:30 Grinnz i'm not sure, but the given/when are almost entirely just string comparisons
04:30 tempire just a regular site
04:30 damaya tempire: I seriously love it.
04:30 preaction oh wow. i just realized, i can't upgrade to 5.20 because of exactly that reason..
04:31 Grinnz i remember when CMS's were the thing...
04:31 franzkafka And I want it
04:31 tempire The front, or the blog listing?
04:31 franzkafka The blog listing. It's so minimalist and beautiful.
04:31 tempire I like it too.
04:31 tempire The best part is that there is no database
04:31 franzkafka wait, are CMSes outdated now?
04:31 preaction no
04:32 jberger franzkafka: all the cool kids are using static site generators
04:32 jberger preaction: go!
04:32 franzkafka tempire: does it just load content from files?
04:32 tempire The backend are github issues
04:32 preaction i could re-create that in statocles, maybe i should to see how it looks
04:32 tempire The backend *is* github issues
04:32 tempire So each entry is an issue, complete with a markdown editor
04:32 franzkafka haha, seriously?
04:32 franzkafka that's awesome. I never would have thought to do that.
04:32 tempire Yeah. I went through a phase where I refused to use databases.
04:33 tempire And I used issue labels to provide tags
04:33 franzkafka I love databases. I work with a team that hates them, so I'm stuck using this web API :/
04:33 franzkafka It's kind of a database I guess... all JSON.
04:33 tempire Yeah. At the time, non-blocking sql wasn't so readily available.
04:34 tempire And really, having github provide my editor was perfect.
04:34 tempire It's really easy to create and edit entries.
04:34 franzkafka is mojoconf sold out?
04:34 preaction why not use your regular editor? the one you use every day?
04:35 tempire Because then I have to worry about uploading, and syncing, and all that nonsense.
04:35 jberger franzkafka: is it?
04:35 purl it's it!
04:35 tempire And previewing in a browser.
04:35 jberger purl: eat it
04:35 purl jberger: excuse me?
04:35 tempire And I would also need my computer
04:36 tempire Instead of being able to edit from anywhere
04:36 preaction that last bit, fair enough. the first two bits, that's why i built statocles ;) i'm working on the last bit though ;)
04:36 franzkafka nothing, I guess 'Mojolicious non-blocking web services workshop' is sold out. In reference to an image here: http://tempi.re/mojoconf-a-new-world
04:36 franzkafka For a moment I thought mojoconf was sold out
04:37 jberger franzkafka: check the year
04:37 franzkafka I am still living in 2014, so it's relevant
04:37 jberger franzkafka++
04:37 preaction ... if only gist allowed tags... then a whole new world (a whole new world) could open up
04:38 franzkafka :)
04:38 tempire issues are effectively the same thing
04:38 tempire Except for that ace editor, I suppose
04:38 franzkafka Is there a good Mojo CMS? Something I could easily use to just set up a simple blog.
04:39 franzkafka Nothing crazy, just for my own personal notes, that sort of thing.
04:39 preaction franzkafka: Galileo perhaps?
04:39 tempire There is no good CMS
04:39 franzkafka I hate Wordpress.
04:39 jberger franzkafka: closest thing that I know of is Galileo, but it has its faults too
04:39 tempire Oh, maybe Galileo, but I say that only because jberger is here.
04:39 preaction my static site generator Statocles uses a bit of mojo
04:39 jberger tempire: thanks, :-)
04:39 franzkafka Ah, I will have to check out Galileo.
04:39 preaction i just stumbled across another one... let me find it
04:40 jberger its in dire need of a deep cleanse
04:40 franzkafka nice statocles looks pretty cool too
04:40 franzkafka I saw one the other day that got $10k+ funding on kickstarter
04:40 preaction https://metacpan.org/release/Contenticious
04:40 jberger I have learned ton since I wrote Galileo
04:40 franzkafka but it looks like crap, though I'm saying that without having actually trying it
04:40 jberger Contenticious scared me for some reason, I can't remember off the top of my head
04:40 franzkafka s/trying/tried
04:41 preaction franzkafka: WebGUI?
04:41 purl i think WebGUI is a GPL CMS written in perl.  Spectre is its backend scheduler, written with POE and IKC. or rather old, predating much of current webdev best practices. or in sore need of SQL refactoring
04:41 preaction purl: you're mostly correct :p
04:41 purl preaction: what?
04:41 franzkafka yeah, WebGUI, that's what it was.
04:41 preaction yeah, i was the lead dev on that for a number of years
04:42 franzkafka oh dang, sorry for saying it looked like crap then :D
04:42 franzkafka Maybe it's just the site for WebGUI that I didn't like, and the default themes it comes with.
04:42 preaction the weight of legacy hangs heavy on webgui's brow :p
04:42 franzkafka Actually, I'm really like Statocles.
04:43 franzkafka s/like/liking
04:43 preaction the 8.0 version, which was our first step out from under that legacy, was never released (hence, that kickstarter)
04:43 preaction and that was... 4 years ago
04:43 franzkafka wait, so the kickstarter funding went to... nothing then?
04:44 preaction no, it went to scrottie, who is intending on resurrecting the 8.0 release
04:44 franzkafka ohh, I gotcha
04:44 jberger the kickstarter was to revive the languishing branch that was to become 8.0
04:44 jberger preaction beat me to it
04:44 preaction it was close... it was very close... but a few of the big breaking changes were... not what clients wanted
04:44 jberger so instead, nobody got anything
04:45 jberger sad
04:45 preaction i learned a lot of lessons about long-running branches there
04:45 franzkafka anyone here russian?
04:45 franzkafka Is the domain slowdownyourrussian.com offensive do ya think?
04:45 preaction wouldn't it be slowdownyourerussian?
04:45 franzkafka It's a joke, I was thinking of putting my notes on that domain, but not sure if people would find it offensive.
04:45 franzkafka I have both :D
04:46 franzkafka for one you own the russian, for the other you are the russian
04:46 Grinnz in soviet russia, russian is you
04:46 franzkafka I was going to put an 'under construction' page on there, forever, but I think I may throw my notes on there. Thing is, they are related to a linux class I am teaching (free of charge), so not sure if that could be deemed offensive.
04:47 franzkafka If you're in Soviet Russia, chances are 'Russian is you'.
04:48 franzkafka Unless you're visiting, then you could be Mexican, like me.
04:49 jberger franzkafka: come up with some clever cover art, maybe some guy in long stride heading to St. Basil's, it'll be funny, no one will take offense
04:49 jberger then again, when you "disappear" we will know what happened
04:49 franzkafka haha
04:49 franzkafka I like the guy in a long stride heading to St. Basil's, that's a good idea
04:50 jberger a couple sweat drops flying off the side of his head
04:50 jberger arms slightly failing
04:51 melo joined #mojo
04:51 franzkafka haha
04:51 jberger bonus points if you can make the artwork just slightly different and have the be the only difference between the two domains
04:52 jberger *have that
04:52 franzkafka The potential in these domains is incredible
04:52 franzkafka haha
04:52 franzkafka I have a friend who does graphic design. I copied/pasted what you said to him. I will share the image with you when it's done. Thanks jberger ;)
04:52 jberger in one there is a big fan, pushing at him, in the other he has a bungee cord attached to his ankle
04:53 jberger yeah, have fun with it! I'd love to see what he comes up with
04:54 franzkafka If I were a graphic designer I'd be working on it right now
04:54 jberger eh, not sure it even needs the fan/bungee
04:54 jberger just have fun with it
04:59 jberger anyway, contentious basically does all the heavy lifting in its own way
05:00 jberger I used to be terrified by it, now I guess I understand what its going for
05:00 preaction is it similar to statocles? it describes itself basically as such
05:05 jberger kinda?
05:05 jberger its basically a static site, that needs a dynamic server
05:05 jberger then I guess you dump the thing to files
05:06 cpan_mojo Test-Mojo-WithRoles 0.02 by Joel Berger - http://metacpan.org/release/JBERGER/Test-Mojo-WithRoles-0.02
05:06 preaction ah. that's not as fun
05:06 jberger lets see if ^^ does any better
05:07 preaction spin the wheel!
05:07 purl tickticktick tick tick tick tick  tick  tick  tick  tick   tick    tiick     tiick      tiiick       tiiickkk      tiiiiickkkk   and the winner is...!
05:07 Snelius )
05:08 jberger is it bad if perhaps I'm more proud of cpan_mojo than I rationally should be
05:08 preaction no?
05:08 jberger the frakin thing just keeps on chugging
05:09 jberger <3 __SUB__
05:14 tempire Hmm.
05:14 tempire Apparently WebDav has a REPORT http method.
05:14 tempire Essentially GET with a body
05:15 tempire Oh nevermind
05:15 purl Well piss off then, tempire
05:15 tempire I misread
05:15 preaction i wish webdav had reached a wider adoption
05:19 jberger ok this has nothing to do with anything, looking for an unrelated meme, but I have to post this:
05:19 jberger and then I will head to bed
05:19 jberger http://www.quickmeme.com/img/22/22022611a9e6db961e9b8405aee4d42499189abbb1c4ca99b8dd767c69ed1b23.jpg
05:19 jberger you're welcome
05:19 jberger purl invoice is <reply> http://www.quickmeme.com/img/22/22022611a9e6db961e9b8405aee4d42499189abbb1c4ca99b8dd767c69ed1b23.jpg
05:19 purl ...but invoice is in the mail....
05:20 jberger purl no, invoice is <reply> http://www.quickmeme.com/img/22/22022611a9e6db961e9b8405aee4d42499189abbb1c4ca99b8dd767c69ed1b23.jpg
05:20 purl okay, jberger.
05:20 jberger nn all
05:26 ningu joined #mojo
06:16 bislinks joined #mojo
06:32 marmez joined #mojo
06:57 Grinnz rendering html means rendering the html source, it's up to the browser to "render" it. you probably sent the wrong content-type
06:57 Grinnz it should be text/html
07:05 reneeb joined #mojo
07:05 diginet_ so, one of the examples on the website doesn't work
07:06 diginet_ "get '/' => sub {  my $c = shift;  $c->render(text => 'Hello World!'); };" generates a syntax error
07:07 memowe joined #mojo
07:08 inbioz joined #mojo
07:10 Grinnz looks fine to me?
07:11 Grinnz did you "use Mojolicious::Lite"?
07:13 diginet_ Grinnz: yep
07:14 diginet_ I literally have no idea why it isn't working :/
07:14 preaction what is the error you get?
07:14 purl hmmm... the error you get is the one you posted earlier?  the hash ref one?
07:15 preaction no, purl, the error you get is <reply>
07:15 purl okay, preaction.
07:15 diginet_ "Global symbol "$c" requires explicit package name"
07:15 diginet_ I bet it's something stupid that I'm overlooking
07:16 preaction or that isn't the code you're using
07:17 preaction pastebin the exact, full code
07:17 diginet_ okay, justa sec
07:17 preaction i tried what you exactly pasted, adding "use Mojolicious::Lite" and "app->start", and it works fine
07:17 diginet_ http://pastebin.com/91y8vgRc
07:18 diginet_ preaction: that pastebin is literally the exact code
07:18 preaction that's not a sub
07:18 preaction you don't have the word "sub"
07:18 diginet_ OH GOD
07:18 preaction [01:06:17]  <diginet_>"get '/' => sub <- that word
07:19 diginet_ preaction: sorry! I must have missed where you said that
07:19 preaction i said? you said.
07:19 preaction look at what you said up there, it has "sub"
07:19 diginet_ ahh
07:19 diginet_ sorry
07:19 diginet_ I thought you meant, you had said that earlier. . .soryr nvm
07:19 diginet_ anyway
07:20 diginet_ I *knew* it was something stupid
07:37 neyasov joined #mojo
07:37 kaare joined #mojo
07:38 genehack joined #mojo
07:39 genehack has anybody seen https://twitter.com/MeagHags/status/572493063492407296
07:39 reneeb joined #mojo
07:42 fhelmber_ joined #mojo
07:45 kaare joined #mojo
07:48 dod joined #mojo
07:54 dod joined #mojo
07:57 abracadaniel joined #mojo
08:05 abracadaniel Hi everybody!
08:05 purl Hi, Dr. Nick!
08:06 marcus hi abracadaniel
08:07 abracadaniel i am experiencing something quite weird. When i do a ajax POST request to my API i cant get the parameters when i run the api with apache, but when i run it as a daemon it works fine, here is a code example: http://pastebin.com/L17RfZH3 look at line 27 and 28
08:09 abracadaniel when i run it as apache i just use the CGI as a workaround to test if the POST request was correct, so it seems like the POST parameters are missing in the $c object when the API is executed with apache
08:10 marcus "run it as apache"?
08:10 abracadaniel run with apache
08:10 marcus abracadaniel: the preferred way to run it with apache is mod_proxy behind hypnotoad
08:10 marcus http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Apache-mod_proxy
08:11 eseyman joined #mojo
08:17 trone joined #mojo
08:25 abracadaniel joined #mojo
08:29 daniel_ joined #mojo
08:36 daniel_ but isn't it obviously a bug that post parameters are missing when its run with apache?
08:37 punter joined #mojo
08:39 cpan_mojo Mojolicious-Plugin-Model 0.02 by Andrey Khozov - http://metacpan.org/release/AVKHOZOV/Mojolicious-Plugin-Model-0.02
08:41 marcus heh
08:43 marmez joined #mojo
08:54 kaare joined #mojo
08:56 berov joined #mojo
09:01 irq joined #mojo
09:04 cpan_mojo MojoX-Validator 0.0016 by Viacheslav Tykhanovskyi - http://metacpan.org/release/VTI/MojoX-Validator-0.0016
09:15 AndrewIsh joined #mojo
09:28 batman abracadaniel: "my $query = new CGI;" ...??
09:28 batman why are you using CGI.pm?
09:29 batman abracadaniel: do not use CGI.pm
09:29 reneeb jberger: https://twitter.com/perlfoundation/status/572660892183224321
09:30 batman tempire: ^
09:30 batman abracadaniel: also, read this: http://shadow.cat/blog/matt-s-trout/indirect-but-still-fatal/
09:30 ZadYree joined #mojo
09:37 jontaylor joined #mojo
09:44 AndrewIsh Hey guys. With some great help from jberger and Grinnz_ yesterday, I managed to get working plugin and associated helpers that connect to and access my database. I'm working more on this today but am wondering what would be the best way of debugging my plugin. Currently I add it to the startup method in my app, then call the helpers from my API route, but this is a pain to debug as it makes it tricky to test individual functions within my database class.
09:44 AndrewIsh My database class relies on db (has 'db'). Is there a way I can create a small app (or similar) that I can add my plugin to that will have db and I can call my DB class methods on to test?
09:44 Vandal joined #mojo
09:51 nicomen AndrewIsh: you want to test a mojo app?
09:51 nicomen make a TestApp, and use Test::Mojo?
09:53 AndrewIsh nicomen: thanks I'll look into that...
09:56 bramirez joined #mojo
10:04 batman AndrewIsh: http://mojolicio.us/perldoc/Test/Mojo#SYNOPSIS
10:08 nicomen batman: did you include a ticker for a schedule for the event, but also a timeline for when all things need to be done?
10:08 nicomen ticker=ticket
10:10 ver joined #mojo
10:15 Snelius http://ic.pics.livejournal.com/merleblanc2014/73593204/849485/849485_original.jpg
10:15 Snelius oh, sorry
10:15 stephan joined #mojo
10:15 stephan hi all.
10:15 Snelius hi
10:18 stephan I'm just curious how to extract the URL out of a route which i match with a wildcard. Any suggestions?
10:18 AndrewIsh nicomen: Thanks for the suggestion, I'm not sure Test::Mojo is what I'm looking for (though being pretty new to Mojo, I could be wrong).
10:18 nicomen stephan: the request object has an url attribute?
10:19 stephan nicomen, ah! thank you.
10:19 nicomen AndrewIsh: oh I thin it is, you want to test your plugin used from a test application don't you?
10:19 nicomen create a test instance of the test application, and call the plugin methods via it?
10:19 AndrewIsh nicomen: Yes, that's right
10:20 AndrewIsh nicomen: Well, actually, maybe not...
10:20 batman AndrewIsh: Test::Mojo is for proving that your plugin works. (yes, you can use that to test plugins)
10:20 batman AndrewIsh: but if you want DEBUG output to screen, i would do this: warn "some message" if DEBUG;
10:21 batman and then put this in the top of the module: use constant DEBUG => $ENV{MY_PLUGIN_DEBUG} || 0;
10:21 batman AndrewIsh: also, if you want a lot of DBI debug output, you can use DBI_TRACE=1 (or =2, ...)
10:21 batman (not sure which db you're using though)
10:22 bramirez Hi all
10:23 bramirez I'm working in an app that uploads large files to my server. I know that the standard way is just to upload the file to the temporal directory and then to move it to the definitive destination. The point is that I would like to upload those files directly to the definitive destination. So I'm looking for a way to change the default destination of the upload process. I figure out that I could change the MOJO_TMPDIR, but I don't want temp
10:23 nicomen for testing puporses I would use the logger, override it and check that it logs correctly the correct things, the mojo core code has some examples of that for instance in the ua tests
10:23 AndrewIsh nicomen: DBIx::Class on top of MySQL. At bottom of it all is a package, that's where I'll be creating methods for interacting with the DB, I want to be able to call these methods without going via my app. But the package is dependent on 'db' which comes from the helper when it instantiates the DB package
10:23 batman AndrewIsh: DBIC_TRACE=1 is your friend
10:23 nicomen AndrewIsh: you can mock a db object that you should be able to pass to the plugin at initiation?
10:24 stephan nicomen: so my question really is how to get the request object i guess
10:24 nicomen stephan: $c->req ?
10:24 purl $c->req is constant for an entire request
10:24 stephan nicomen, purl: i see, sorry i did not find it on my own.
10:24 batman stephan: do you have get("/foo/*whatever") ? if so you can use $c->stash("whatever");
10:24 pink_mist botsnack
10:24 purl :)
10:25 stephan batman: ah thanks, so the thing to search for in the documentation is stash i guess then
10:26 nicomen stephan: actually placeholders and routes
10:29 AndrewIsh nicomen: ok, that sounds promising (thanks for the DBI_TRACE tip batman!). So, in order to create something that will instantiate my plugin and pass db to it, what's the best way forward? Do I create a test? If I do that, is the name I pass to the Test::Mojo constructor the same as my main app? (sorry for the undoubtedly stupid questions!)
10:30 AndrewIsh I just want to be able to create a method in my DB package and check it's doing what it's supposed to do
10:34 punter joined #mojo
10:36 batman AndrewIsh: in your test: use Mojolicious::Lite; plugin "Your::Plugin" => { dsn => $ENV{TEST_DSN} }; get "/whatever" => sub { ... };
10:36 batman something like that...
10:36 purl hmmm... something like that is totally possible
10:37 batman and then my $t = Test::Mojo->new; $t->get("/whatever")->status_is(200)->content_like(qr{asdasdsad});
10:39 AndrewIsh batman: ok, thanks very much, i'll try that :)
10:39 batman Test::Mojo->new == this will use the Mojolicious::Lite app defined the same file.
10:40 AndrewIsh batman: aha, makes sense
10:40 batman you probably want to do some sort of db initialization as well, but that's not up to me to decide :)
10:40 stephan nicomen: okay thanks.
10:42 stephan thanks guys, i'm just migrating from Dancer to Mojolicious though
10:42 batman AndrewIsh: the trick about $ENV{TEST_DSN} is that you can then do this: plan skip_all => "TEST_DSN=??" unless $ENV{TEST_DSN};
10:42 AndrewIsh batman: Yes, I do :)
10:43 AndrewIsh batman: Aha, interesting
10:44 batman AndrewIsh: are you familar with Test::More?
10:45 AndrewIsh batman: No, I'm not familiar with unit testing in Perl at all. I'm going to read about it and look at Test::More before I go much further I think.
10:46 batman AndrewIsh: right. i guess most of what i'm saying isn't making too much sense :/ (hopefully it will)
10:46 AndrewIsh It does make some sense, I understand some of the principles of unit testing so I'm following what you're saying :)
10:46 batman AndrewIsh: maybe this can give you an idea: https://github.com/jhthorsen/mojo-mysql/blob/master/t/mysql_lite_app.t
10:47 batman nevermind the MOJO_REACTOR part
10:48 batman AndrewIsh: also, nevermind that it's using Mojo::mysql. the principles are the same.
10:48 AndrewIsh batman: OK, looks very useful, thanks very much :)
10:49 batman AndrewIsh: you're welcome. and welcome to the world of "repetitive testing", instead of "hoping stuff works", hehe
10:50 AndrewIsh batman: Thanks :)
10:54 batman and don't hesitate to ask. it's very rewarding to make a test ok :)
11:01 bramirez Hi everybody! I'm working in an app that uploads large files to my server. I know that the standard way is just to upload the file to the temporal directory and then  move it to the definitive destination. The point is that I would like to upload those files directly to the definitive destination. So I'm looking for a way to change the default destination of the upload process. I figure out that I could change the MOJO_TMPDIR, but I don
11:04 batman bramirez: and why is that? what happens if the upload fail?
11:05 batman bramirez: you could change the tmpdir to the same partition instead of /tmp (or whatever), but doing what you suggest sounds scary
11:06 bramirez yes, that's because I have /tmp and the destination folder in different filesystems, and the move is very slow
11:07 stephan a last question: can i easily use https with mojo?
11:17 bramirez batman: So it's dangerous, isn't it? I just wanted to be sure that the 'move' could perform well no matter the filesystems distribution
11:17 marcus stephan: As long as you have IO::Socket::SSL installed - mojo version for more info
11:19 stephan ah i see.
11:19 stephan thanks marcus
11:21 stephan marcus, i use mod_proxy of apache and deploy my pages by VirtualHost, so in principle i just have to add a VirtualHost with the common SSL port.
11:22 marcus stephan: yeah, you probably want RequestHeader set X-Forwarded-HTTPS "1"
11:23 stephan marcus: aye aye sir
11:54 stephan marcus: works.
11:55 stephan a very last question: i want to serve some files from a public dir by apache2 -> i could not find a working solution for me, the route get's evaluated, and then there exists no route handler.
11:56 marcus stephan: <Location ...> Set-Handler default-handler ... or so?
12:03 stephan basically i just want a directory listing of say /var/www/public/files/ directory if i  have the route get '/public' => { };
12:05 marcus stephan: you should probably handle static assets directly in the apache config, regardless of how the routes in your apps look.
12:05 stephan ah
12:06 stephan so basically i use DocumentRoot to my Application's public directory in my VirtualHost config
12:07 marcus stephan: yes
12:09 bramirez joined #mojo
12:12 stephan okay, i tried that, but it gives me then if i try to get /public/foo.txt -> url does not exist
12:13 bramirez Hi all again! I'm also building a progression bar for my upload process. I'm using two connections: The first one is a POST request that actually uploads the file. The second one is a websocket intended to monitorize the upload progression. In the middle, I use the after_build_tx hook, where the tx is asked to update the upload progression on message event. The server could receive different simultaneous upload requests, so, my question
12:14 marcus stephan: you have to disable the proxy handler for the locations you want to serve
12:15 marcus stephan: this is rather outside the scope of mojolicious tho
12:15 batman bramirez: yes. i would say it's dangerous. Set TMPDIR (or MOJO_TMPDIR) to /some/place/next/to/where/you/want/to/store/your/data
12:16 stephan marcus: ah I'm sorry ok
12:17 bramirez batman: Ok, thank you very much! Any suggestions about the progress bar?
12:17 marcus stephan: no worries
12:18 batman bramirez: i thought there was a progressbar example in the cookbook... maybe it was removed
12:18 stephan i see it's ProxyPass /static ! in apache's config
12:18 stephan i think this should work then
12:18 batman bramirez: i have to run in a meeting. look in one of the guides here https://metacpan.org/release/Mojolicious
12:19 bramirez batman: OK, thanks
12:19 stephan damn marcus, i forgot to create static folder in public dir of my application! :)
12:24 stephan now the apache icons in the directory listing are missing still
12:25 stephan ah, just add another ProxyPass, fine! you made my day.
12:31 marcus \o/
12:53 jberger wow, lots of activity overnight
12:55 amon joined #mojo
12:59 sri abracadaniel: why are you opening a github issue instead of answering the questions you were asked here?
13:02 marcus http://static2.wikia.nocookie.net/__cb20131106005558/adventuretimewithfinnandjake/images/f/f8/S5e40_Abracadaniel_casting_spell.png
13:04 abracadaniel i dont see any questions
13:04 sri http://irclog.perlgeek.de/mojo/2015-03-03#i_10212663
13:05 abracadaniel ah thanks
13:05 abracadaniel but i am only using CGI.pm because thats the only way i can get the post parameters, i was first trying without CGI.pm
13:06 abracadaniel but its the same
13:08 mst wat
13:08 mst using CGI.pm in code written in 2015 is a firing offence
13:08 jberger I don't have an apache environment to try it out, but that doesn't sound right
13:08 mst it's never the right answer to anything
13:08 nicomen wat
13:08 jberger ok ok
13:09 nicomen using Apache in code written in 2015 is a firing offence
13:09 mst in fact, if it actually does something useful, that's probably even more worrying
13:09 nicomen ;-)
13:09 mst because generally something else should've already processed the POST body
13:09 marcus nicomen: I'm now maintaining 100+ apache servers :p
13:09 nicomen marcus: 2.4?
13:09 purl i guess 2.4 is faster and more secure
13:09 marcus nicomen: some of them
13:09 purl some of them are pretty funny
13:09 nicomen marcus: lol, worst possible answer ;)
13:10 jberger mst was just arguing for apache the other day, so I'm guessing he's having a lark
13:10 mst nicomen: using apache in code written in 2015 is grounds for me to ask "how did you get a webserver into your program?"
13:10 nicomen mst: simple, use mod_perl :-D
13:10 marcus nicomen: we still have a lot of app servers on rh5, hoping to get everything upgraded before 2017 :p
13:10 mst nicomen: that was a firing offence a long time before 2015 :)
13:10 nicomen hehe o
13:10 marcus winners don't do mod_perl
13:10 mst jberger: not really. CGI-the-protocol might be good, but CGI.pm can DIAF
13:10 abracadaniel mst, even if i am not using CGI.pm i cannot get the POST parameters from mojolicious
13:10 jberger oh yes definitely
13:11 mst abracadaniel: then you need to debug that
13:11 nicomen k. apache can be tuned to work okeyish. and yes mod_php and some other stuff is convinient, and if it works don't fix it
13:11 mst abracadaniel: rather than taking a steaming shit in your codebase, which is what adding CGI.pm counts as
13:11 mst abracadaniel: how are you deploying your app code?
13:11 abracadaniel i am running it with apache
13:11 mst nicomen: the last time somebody tried to get me to write mod_perl I figured out how to do it with an external RewriteMap process
13:12 nicomen using CGI.pm WITH mojolicious, that sounds very very strange
13:12 mst abracadaniel: how, exactly, are you deploying your app code?
13:12 mst "with apache" is about as useful as "on a server"
13:12 mst please be specific if you actually want us to be able to help you
13:13 marcus nicomen: we're running a lot of java app servers, using crap like mod_caucho and mod_cluster with mod_proxy_ajp - Trying to get my new coworkers to understand that using http all the way is actually a good thing.
13:13 mst abracadaniel: I mean, what files did you put where, and what's in those files?
13:14 mst marcus: though I get sad if I can't have unix sockets
13:14 marcus mst: http over unix sockets :)
13:14 nicomen marcus: wow, I'm not sure if I should be sad or happy to not have a clue about those mods.. Except I might have run into the proxy_ajp one with tomcat at some point
13:14 abracadaniel i have Mojolicious installed with cpan, then i have the mojo code in a file called api.pl
13:15 nicomen abracadaniel: is it possible for you to paste the api.pl code somewhere?
13:15 mst marcus: starman BEST server
13:15 abracadaniel nicomen http://pastebin.com/L17RfZH3
13:16 marcus mst: I'm actually about to move RT from fastcgi to standalone with starman, and killing apache
13:16 jberger abracadaniel: will you actually need to deploy on apache or are you just using it because you have used it before?
13:16 mst jberger: could we wait to find out what he even has please?
13:16 jberger ok
13:16 abracadaniel jberger, deploy mojolicious on apache?
13:17 mst abracadaniel: please finish explaining what you're currently doing
13:18 mst abracadaniel: how are you telling apache to run app.pl ?
13:18 pink_mist *api.pl
13:18 abracadaniel http://pastebin.com/L17RfZH3 this is the code, it is in a file called api.pl, all the libraries it is using is accessible all get requests works correctly. But when i am trying to send a POST request using ajax to api.pl/comparisonFeedItem/save/ i am unable to get the POST parameters. I tried to use Data::Dumper to Dump $c and there is no POST parameters in the object
13:18 nicomen abracadaniel: and how do you tell apache to run api.pl as a cgi-bin script?
13:19 abracadaniel yes
13:19 nicomen don't do that ;)
13:19 mst ...
13:19 abracadaniel okay, how should it be run then?
13:19 Lee abracadaniel: run it under hypnotoad and proxy to it
13:19 nicomen or, it is not intended to work like that
13:19 mst ok, so, (1) we asked *how*, 'yes' doesn't answer that
13:19 mst (2) I've no idea what functions.pm is but I suspect it's a terrible idea
13:20 abracadaniel functions.pm is not really relevant to the problem
13:20 mst I bet it is.
13:20 mst please show functions.pm
13:20 jberger nicomen: we are currently trying to debug the direct cgi deployment, which actually does work
13:21 mst An important rule of debugging: If you completely understood it, you'd've fixed it already :)
13:21 abracadaniel the only place functions.pm is used is to get the POST parameters from CGI, which is done because i cannot get the POST parameters from Mojolicious.
13:21 mst gods damnit SHOW ME THE CODE
13:22 mst please
13:22 nicomen jberger: ok, sorry
13:22 mst abracadaniel: look, even *loading* CGI.pm in certain ways could have broken this
13:22 Lee hehe
13:22 mst I am trying to help you find your problem. don't tell me something's irrelevant.
13:23 abracadaniel mst: functions.pm: http://pastebin.com/tqyTfu4C
13:23 tencendur joined #mojo
13:23 mst ok, so, that's obviously not useful, do remove that and the 'use CGI;'
13:24 mst what'll be happening is that CGI.pm is eating the POSST data before Mojolicious gets to it
13:24 jberger abracadaniel: also list context behavior of param has been removed
13:24 pink_mist jberger: not in CGI.pm surely
13:24 jberger deprecated there too iirc
13:24 pink_mist I can't imagine how much that would break
13:25 btyler it warns I think
13:25 pink_mist right, warning is fine
13:25 Lee it warns
13:25 abracadaniel ok now functions and cgi has been removed
13:26 mst abracadaniel: for development, you're best running under morbo, btw
13:26 abracadaniel okay
13:26 mst and while you *can* deploy as a CGI script, there are generally better ways
13:26 mst if you can run your own processes on the server, having apache proxy to hypnotoad is a good answer
13:26 marcus mst: I already told him that this morning.
13:27 abracadaniel but it is running on 5 different servers, so everytime i push to them i have to restart the service
13:27 marcus abracadaniel: hypnotoad supports hot restarts
13:27 abracadaniel which is why it is a lot easier to run with apache
13:27 mst abracadaniel: hypnotoad is designed to handle tht without dropping any requests
13:27 abracadaniel okay
13:27 mst abracadaniel: which is why it's a lot easier to do it properly
13:28 jberger abracadaniel: maybe you won't need 5 servers either
13:28 Lee ^^
13:28 mst or maybe it needs a copy per server to do whatever it does
13:28 marcus web scale
13:28 purl somebody said web scale was mongodb or https://www.youtube.com/watch?v=b2F-DItXtZs
13:29 good_news_everyon joined #mojo
13:29 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/xwaG
13:29 good_news_everyon mojo/master fae2c8f Andrey Khozov: Removed warning when using undef values in tablify
13:29 good_news_everyon mojo/master 270cfb3 Sebastian Riedel: Merge pull request #753 from avkhozov/tablify...
13:29 good_news_everyon left #mojo
13:29 mst abracadaniel: anyway, your apache deployment isn't actually working currently, so 'easier' is relative :)
13:29 abracadaniel true :)
13:30 mst however, you still never answered my question - how are you telling apache to run api.pl ? :)
13:30 abracadaniel i am not really sure on that, it is just placed in the cgi-bin root and then executed when requested
13:31 mst ok, so you have a broken config that you don't actually understand
13:31 mst excellent
13:31 abracadaniel so it is a problem with apache2?
13:31 mst it's quite possibly a problem with how you have configured apache2
13:32 abracadaniel i just find it strange how CGI can get the parameters then
13:32 mst my bet is some fuckmuppet has auto-mod_perl'ed that directory so it isn't actually a cgi-bin anymore and everything went fucked up from there
13:32 abracadaniel and Mojo can get the GET parameters correctly
13:32 good_news_everyon joined #mojo
13:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xwVH
13:32 good_news_everyon mojo/master 77c6b1f Sebastian Riedel: no need for an extra line
13:32 good_news_everyon left #mojo
13:33 mst I don't so much find it strange as a likely indicator of a config problem
13:33 mst however, I don't see the point in fixing the wrong way if we can teach you to do it the right way
13:34 mst so at this point I'm voting for "use hypnotoad with hot restarts"
13:38 sri abracadaniel: these are our CGI tests btw., if something there is missing please feel free to add it https://github.com/kraih/mojo/blob/master/t/mojo/cgi.t
13:38 mst abracadaniel: with CGI.pm removed entirely, I would expect the POST params to work
13:39 mst however if you're getting Apache::Registry'd or something all bets are off
13:39 mst and finding if that's happening would involve dismantling your existing apache stuff
13:39 mst hence my suggesting that it'll likely take less time to get hypnotoad to work with mod_proxy
13:42 nicomen abracadaniel: you could try dumping %ENV and see why any variables are missing, but like mst says if mod_perl's registry is wrapping the script (which I think would happen by default in a mod_perl setup for cgi-bin stuff), then the POST content would hve been removed and put in some Apache related storages. It's a big chance that CGI also checks those apache-specific methods and fetches the content
13:43 mst the POST content isn't in env normally, it's in STDIN
13:43 nicomen then the POST content would hve been removed and put in some Apache related storages.
13:43 mst but then that can get more complicated with Registry and stuff
13:43 nicomen It's a big chance that CGI also checks those apache-specific methods and fetches the content
13:43 mst this is why GET params working but POST params not doesn't surprise me
13:43 nicomen gah I need splitlines
13:43 mst since GET params will still be in %ENV
13:43 nicomen right right
13:43 mst but there's all sorts of ways just the POST body could be mangled
13:43 mst which is why I'm voting for "fuck this shit, use hypnotoad" at this stage
13:44 nicomen so, it's a golden opprtunity to take the step to 2015 and use an application server
13:45 jberger mst: sounds like a good guess, something intercepting the request body before it gets to mojo
13:45 abracadaniel okay thanks, ill look into hypnotoad
13:45 mst right, and then if he's being run under registry, but mojo ends up using Plack::Handler::CGI, then ... *splat*
13:46 nicomen mojo could probably warn/die on such events to avoid confusion
13:46 nicomen I wouldn't not add Apache:: stuff for sure
13:50 zivester joined #mojo
13:56 lushkava joined #mojo
13:57 adnane joined #mojo
14:01 vaewyn joined #mojo
14:02 vaewyn Morning all... I have templates that generate pdf output directly... and pre-upgrade this worked to send them unencoded  $self->render(data => $self->render(materials => $materials, partial => 1  ) );    now it just sends the end user a file containing '1'  :(  Any ideas how to achieve that effect in my now more modern mojo?
14:04 jberger partial => 1 is long gone
14:04 asarch joined #mojo
14:05 jberger $self->render_to_string is probably what you are looking for
14:07 vaewyn jberger: thanks I'll look it up :)
14:10 genehack left #mojo
14:12 vaewyn Funny thing is... I think that change started because of when I asked about doing this in the first place  hehehehe
14:12 arthas joined #mojo
14:14 jberger very possible, but it must have been a while ago
14:14 jberger IIRC that was removed at 5.0
14:14 vaewyn Dec of 2013 is when I had asked :P
14:15 jberger https://github.com/kraih/mojo/blob/master/Changes#L582 # nailed it ;-)
14:15 jberger vaewyn: yeah, mojo moves fast
14:15 vaewyn :)
14:15 jberger everytime I think we are slowing down, we speed up instead :-)
14:16 Adura You code more Perl with it!
14:16 jberger https://github.com/kraih/mojo/blob/master/Changes#L582
14:16 jberger oooop
14:16 jberger friggn
14:17 vaewyn Fine by me :)  between mojo and dbix I am spending more time coding the client side than the server side finally :P
14:17 jberger http://cdn.meme.am/instances/29285432.jpg
14:17 vaewyn true story
14:17 jberger oh I blew it!, this was clearly the meme we needed: http://www.quickmeme.com/img/d1/d1d363a2a731cfa5ac15845b13df633393c3b486ada970c103d875d2d3f8b8fd.jpg
14:18 vaewyn just needs a rainbow
14:18 vaewyn :P
14:18 jabberwok yea, verily. chasing wordpress for ten years, after ten years of MSWin32, almost made me hate computers. I'M BACK
14:19 jberger purl has been taught \m/
14:19 purl jberger: sorry...
14:20 jberger jabberwok: how did you ever survive?!
14:20 * jberger hums "welcome back kotter"
14:21 jabberwok haha, i think i watched that program first-run just to catch a glimpse of the subway cars.
14:28 dp_ joined #mojo
14:33 vaewyn left #mojo
14:58 KindOne joined #mojo
14:58 jabberwok https://github.com/memowe/bootylite  .. submitted one pull request in january for outdated mojo functions but it probably needs a bit of revamp, now that core is so much more capable
14:59 jabberwok my goal right now is to move my personal sites from wordpress into some kind of basic CMS based on mojo. an undertaking but i think a rewarding one
15:01 Anon021 joined #mojo
15:04 sri btw. in case someone missed the content_with discussion yesterday https://github.com/kraih/mojo/commit/275f0e75bf350d40542a67e5a9eaef84eaa08236
15:04 sri that started as wrap_content
15:05 sri there are 3 methods that do almost the same... content, content_for and content_with
15:05 sri s/methods/helpers/
15:05 neyasov joined #mojo
15:05 sri http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#content
15:08 sri this was the discussion http://irclog.perlgeek.de/mojo/2015-03-03#i_10210829
15:09 jberger IMO I almost wish we could (and we can't) switch the names
15:10 jberger content_for and content_with
15:10 jberger that would be crazy
15:10 sri at first i though the same
15:10 sri but then i started thinking about it as "more content_for 'foo' ..."
15:11 sri the names are so generic, you can just make up explanations for any behavior :)
15:12 csson joined #mojo
15:12 jabberwok Ling Wistix
15:13 jabberwok some antics over semantics .... (sorry, too much coffee and the puns start)
15:14 sri *slurps hot cocoa*
15:14 jberger mmmmm hot cocoa sounds nice
15:15 * jberger is currently listening to $neighbor shovelling his drive/being glad he works from home now
15:16 jberger Why am I still in Chicago? Not only do we have this torture facility ( :o ) but this was the coldest feb on record! (last year's jan was the coldest of its kind I think too)
15:16 jabberwok because Marshall Fields... oh, wait =sigh=
15:17 jabberwok well you've still got the Sears Tow... umm... the Field Museum.
15:18 * nicomen is looking forwards to today's talk: Fifty shades of Perl, by Damian Conway
15:18 sri escape from chicago
15:18 * nicomen is also wearing his mojoconf t-shirt
15:18 Grinnz jberger, i think thats true for everywhere in the US this feb (the coldest thing)
15:19 jabberwok 73° and sunny here in Jacksonville right now
15:19 sri raining in germany
15:19 Grinnz florida doesnt count :)
15:19 jabberwok hey don't insult our Elections Commission
15:20 Grinnz hahaha
15:20 jberger jabberwok: we still call it the Sears Tower, a few people call it "The Big Willy" (it was renamed the "Willis Tower")
15:21 jabberwok *nod* Mom still says it's Crawford Avenue.
15:21 genio yep.  Gainesville is really nice right now :)
15:23 genio Florida is the bestest (assuming you don't read the news about all of our craziness)
15:24 jabberwok is gainesville.pm still a thing ?
15:25 jabberwok i have tried to find the ghost of jacksonville.pm to no avail.  time to reboot one, perhaps
15:25 genio jabberwok: I have no idea.  I've been here for a very long time, but never heard any rumblings of a gainesville.pm
15:26 genio I think I'm the only one left around here that still likes Perl
15:26 jabberwok http://gainesville.pm.org/   altho one of the most recent meetings was "at Borders" ... (!)
15:28 jabberwok archive.org says that http://jacksonville.pm.org vanished after august 2006.
15:28 genio "Topic: debugging with CGI::Carp and other modules"
15:28 genio yeaaaaah.... NO
15:29 genio so much bad with gainesville.pm
15:30 jabberwok the "Oct 12th at Rinker Hall" seems to be from 2004 (archive.org)
15:30 jabberwok wonder if there's a procedure to contact pm.org to at least tell folks this is a decade dormant
15:31 genio Apparently /g is a modifier specific to replacement expressions only.  http://gainesville.pm.org/tutorials/regexp.html
15:32 preaction jabberwok: #mongers on this network, or support@pm.org
15:32 jabberwok *thanks*  preaction  i'm on it
15:42 jabberwok http://blog.wlindley.com/2015/02/zero-to-mojolicious-part-2-content-wrapping-filter-templates/   updated to show: content_with for now, until next version.
15:45 reneeb joined #mojo
15:52 sh4 joined #mojo
16:10 good_news_everyon joined #mojo
16:10 good_news_everyon [mojo] kraih tagged v6.01 at ef07c7b: http://git.io/xKJl
16:10 good_news_everyon left #mojo
16:11 good_news_everyon joined #mojo
16:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xKUv
16:11 good_news_everyon mojo/master b829a00 Sebastian Riedel: bump version
16:11 good_news_everyon left #mojo
16:11 sri jabberwok: next version :)
16:12 cpan_mojo Mojolicious 6.01 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-6.01
16:15 reneeb joined #mojo
16:17 acks joined #mojo
16:24 jabberwok *bow*  sri
17:12 sri shouldn't we be tweeting something about mojoconf?
17:12 sri i've not made a single mojoconf tweet yet
17:13 sri at least the date and place perhaps?
17:13 eseyman joined #mojo
17:20 marcus sri: do eet
17:22 odin22 joined #mojo
17:23 sri marcus: what should i write?
17:25 riche get your mojo on. nyc 0406/0606 <linkhere>
17:27 riche sri: i am asking team to organize tweets beforehand.  this is why i asked about the 20 reasons thing yesterday
17:32 batman riche: sri is not part of Mojoconf organization. You need to pass a link if you want comments.
17:34 jabberwok sri:  6.01 works perfectly with my test case.  now i can bifurcate my previous blogpost into the template stuff and another on plugins. cheers
17:35 jberger jabberwok++
17:36 riche otp w a client brb
17:37 punter joined #mojo
17:38 Grinnz_ i would suggest a more readable date format given that it's in nyc :P
17:39 Grinnz_ "it's from april to june?!"
17:39 jberger sri: does Mojo::Date parse handle timezones on input strings?
17:39 jberger perl -MMojo::Date -E 'say Mojo::Date->new(shift)->epoch' 'Fri, 27 Feb 2015 13:45:00 EST'
17:40 jberger gives me the same no matter what timezone I enter, I assume that that is GMT
17:41 riche Grinnz_: fourth june to sixth june .. that's the way the rest of the world writes it --
17:42 Grinnz_ riche: just mentioning writing it like that will be confusing ;)
17:42 jberger it seems sane that no conference lasts for two months, but maybe textual representation is better
17:43 marmez joined #mojo
17:43 sri ok, unless someone objects within the next 10 minutes you'll get a generic announcement on the mojolicious blog for mojoconf
17:44 jberger sri: perhaps a warning here if the timezone isn't GMT https://github.com/kraih/mojo/blob/master/lib/Mojo/Date.pm#L31
17:45 jberger silently ignoring it seems bad
17:45 cpan_mojo Bootylicious 1.06 by Oleg G - http://metacpan.org/release/OLEG/Bootylicious-1.06 (depends on Mojolicious)
17:50 sri riche: do we know how many members of the core team will be there?
17:52 Grinnz_ rofl, he really made a module called bootylicious
17:52 tgt joined #mojo
17:55 jberger hunh, I didn't know that was still maintained
17:55 jberger oleg++
18:04 riche sri: not yet but by default i expect them all
18:04 riche especially you
18:06 sri http://blog.kraih.com/post/112617736601/mojoconf-2015
18:07 jberger I haven't heard much from crab, crab do you think you can make this one?
18:07 nicomen damian is an awesome speaker, perl6 is an aweful language, I'm so happy perl5 can take only the sane and good things from and drop the LSD-induced crazy shit
18:07 sri very generic, but i think it gets the key points across
18:08 sri if you want anything changed you've got like 10 minutes before the aggregators pick it up ;p
18:08 disputin joined #mojo
18:10 mst sri++ # Mojo::JSON's bool handling is fucking genius
18:11 jberger sri: I'm just waiting for the tweet so I can retweet
18:13 jberger sri don't forget a beer emoji :-)
18:17 sri of course not ;p
18:17 jberger FIRST~ retweet that is
18:17 sri mst: it's the scalar ref stuff isn't it? :)
18:17 mst sri: yes. yes it is.
18:17 jberger (man, there's an internet tradition, that I'm glad died out (re first))
18:18 mst FRIST PROST
18:22 sri PROST
18:24 disputin joined #mojo
18:33 cpan_mojo Mojolicious-Plugin-Model 0.01 by Alexander Ruzhnikov - http://metacpan.org/release/BCDE/Mojolicious-Plugin-Model-0.01
18:34 genio I'm not sure I see the need of M::P::Model
18:35 jberger well no one will get to use it if the pause perms aren't sorted out anyway
18:43 batman genio:)
18:47 cpan_mojo Mojolicious-Plugin-BModel 0.02 by Alexander Ruzhnikov - http://metacpan.org/release/BCDE/Mojolicious-Plugin-BModel-0.02
18:49 Adura My plugin still works with 6, good.
18:50 cpan_mojo Mojolicious-Plugin-BModel 0.011 by Alexander Ruzhnikov - http://metacpan.org/release/BCDE/Mojolicious-Plugin-BModel-0.011
18:51 cpan_mojo Mojolicious-Plugin-BModel 0.012 by Alexander Ruzhnikov - http://metacpan.org/release/BCDE/Mojolicious-Plugin-BModel-0.012
18:57 sri jberger: btw. how timezones are handled depends on the RFCs of course
18:57 sri in Mojo::Date
18:58 Adura Huh, my plugin is in a Task, interesting.
19:11 tinita hi, is jan henning thorsen here?
19:11 jberger tinita: that's batman
19:12 tinita jberger: thanks
19:12 jberger but he and the other oslo guys are busy (🍻) at the moment
19:12 Adura You'd think it's Bruce Wayne...
19:12 hernan604 now jberger leaked batmans name
19:12 tinita I have a problem with the swagger2 plugin, but it's not really related to mojo
19:12 tinita but maybe anyone else knows it and can help?
19:12 jberger I'm sure he'd be happy to discuss with you
19:13 jberger you can ask, I haven't used it yet
19:13 tinita in Swagger2::SchemaValidator::_validate_type_number there is this code:
19:14 tinita unless (B::svref_2object(\$value)->FLAGS & (B::SVp_IOK | B::SVp_NOK) and 0 + $value eq $value and $value * 0 == 0) { ... expected integer, got string }
19:14 tinita my $value has this flags: (PADMY,IOK,POK,pIOK,pPOK)
19:14 jberger tinita: I would assume that logic is copied from Mojo::JSON
19:15 tinita but it returns false, although it looks to me like it should return true
19:15 sri it does look like it
19:16 tinita if I create a value on my own with my $value = "12345"; $value+=0; this returns true
19:16 tinita but the value I get from the database doesn't work
19:17 tinita i'm not too familiar with the internal stuff, but IOK is in the flags
19:17 tinita maybe this is rather a p5p issue
19:18 sri it's ok to bring it up here
19:19 tinita i'm trying to reproduce it so I can test it with other perl versions
19:20 sri do you have a dualvar there?
19:20 tinita seems like
19:20 purl seems like is how it should be
19:20 tinita I don't know if DBD::Sybase creates it like this or DBIx::Class
19:20 nicomen wow, damian would've changed the name of perl6 tonight if he could choose he says
19:21 tinita this is the Devel::Peel output: http://perlpunks.de/paste/show/54f609b2.6fa.297
19:21 tinita Peek
19:22 ribasushi nicomen: link?
19:23 nicomen ribasushi: sorry, live talk in Oslo about Perl6
19:23 nicomen no stream
19:24 nicomen Lots of good advice on running long-term projects
19:24 sri tinita: the logic is actually pretty straight forward, it checks for IOK/NOK which are the integer/numeric values, and then ensures the integer/numeric value is equal to the stringified value (the rest is inf/nan magic that shouldn't matter here)
19:24 nicomen Some perl6 teasers comparing it against Java and some cheapshots against perl5 IMHO.
19:24 sri so if you for example pass $! you get the string value, not the numeric one
19:26 tinita sri: I can create a variable similar to the one from the database, but the flags are still different
19:26 tinita my $value = 0.0; $value= "12345"; $value+=0;
19:26 ribasushi tinita: which flags are ou trying to produce exactly?
19:26 ribasushi the ones in the paste?
19:26 tinita FLAGS: PADMY,IOK,pIOK versus PADMY,IOK,POK,pIOK,pPOK
19:26 tinita ribasushi: yes
19:26 ribasushi so the longer one?
19:26 tinita yes
19:27 ribasushi perl -MB -MDevel::Peek -e 'my $foo = 13721; my %bar; $bar{$foo} = 1; warn ((B::svref_2object(\$foo)->FLAGS & (B::SVp_IOK | B::SVp_NOK))? 1:0) ; Dump $foo;'
19:27 ribasushi tinita: what's the actual problem?
19:27 purl the actual problem is far too stupid to bother relating.
19:28 tinita ribasushi: that the value I pasted returns false
19:28 ribasushi tinita: yet my oneliner says true...
19:28 sri tinita: my guess would be that print "@{[0 + $value]}:$value" will give you different results
19:28 tinita ribasushi: so the validator says: git a string instead of expected integer
19:29 tinita ribasushi: yes, I can see that... :-/
19:29 tinita sri: output: 13722:13722
19:30 tinita perl 5.18.2
19:30 sri oh, that was unexpected
19:32 sri i would expect your pasted value to pass the test
19:33 tinita haha, funny thing: after putting in that code it works
19:33 sri does it add a new flag?
19:33 tinita looking
19:34 sri seems like the internal representation gets changed a little by using it in numeric and string context
19:35 marcus sri: funny, xoxo 2015 emoji announced just after your tweet.
19:36 marcus https://www.evernote.com/shard/s22/sh/951faa33-a02f-49f4-aa7a-c238e8c5b13b/1037c8945e3250cda71fd78d512eb821
19:36 sri :D
19:37 genio 🐝
19:37 genio HONEYBEE
19:37 genio oops.
19:37 tinita oh, it seems the Dump I showed before was influenced by my code
19:37 genio That was unexpected.  Sorry about that
19:37 tinita sri: http://perlpunks.de/paste/show/54f60d87.6f7.37a
19:37 sri bzzzzzzzzzzz
19:38 tinita this is the dump before the line and after it
19:38 sri tinita: ah, that makes perfect sense, the first value only has a string value
19:38 tinita so before the IOK was missing
19:38 tinita but still it has an IV
19:38 sri not the flag
19:38 tinita is IV related to IOK?
19:39 tinita now what I have to do is convert all "integers" i get from the database to "rel integers" :-/
19:40 sri i'm not sure what the IV value in Devel::Peek actually means, but for checks, it's all about the flags
19:40 tinita or just do $throwaway = $value + 0
19:41 sri just i think you have XS code there that assigns an IV value, but forgets to set the flag
19:41 bpmedley_ joined #mojo
19:41 sri something like that
19:41 purl hmmm... something like that is totally possible
19:41 * sri pats purl
19:41 * purl bites!
19:42 sri tinita: int $value;
19:42 tinita sri: yeah, but not all values are ints
19:43 tinita I could use the DBIC schema to automate this, but this seems... wrong
19:43 sri perhaps report it as a bug, clearly DBD::Sybase knows its dealing with an int
19:43 tgt joined #mojo
19:43 tinita hmhm
19:43 tinita thanks for helping
19:47 dod joined #mojo
19:49 lucs joined #mojo
19:50 lucs Given  $some_controller->session(h => {foo => 'bar'}) , what do I use in a template to retrieve the value of foo?
19:53 ribasushi tinita: there is a stopgap of https://metacpan.org/pod/DBIx::Class::Helper::Row::NumifyGet
19:53 irq joined #mojo
19:53 ribasushi (of course slowing things down)
19:54 tinita ribasushi: oh, this looks interesting
19:54 pink_mist lucs: probably something like: session('h')->{foo}
19:54 tinita at the moment speed isn't an issue
19:54 lucs pink_mist: Yes, looks right, thanks.
19:54 tinita so we try to contact the DBD::Sybase author and in the meantime try this DBIC helper
19:55 acks left #mojo
19:59 tinita ribasushi: works =)
20:00 ribasushi great
20:00 ribasushi tinita: for background - this all stems from the fact that if you start with "01234" you can't be sure if this is the string 01234 or the number 1234
20:00 ribasushi (think US zip codes)
20:01 lucs left #mojo
20:01 cpan_mojo Mojolicious-Plugin-BModel 0.021 by Alexander Ruzhnikov - http://metacpan.org/release/BCDE/Mojolicious-Plugin-BModel-0.021
20:02 tinita seems the is_numeric is even optional. just loading the component is enough
20:03 Grinnz_ yeah, all database values generally default to string on retrieval. even a database's idea of a number might be different from perls, so automatic conversion can lose precision for example
20:03 ribasushi Grinnz_: this is very much untrue
20:04 Grinnz_ with floats, how can you guarantee precision?
20:04 ribasushi most DBDs try to return whatever they can as IV/NV (whenever possible)
20:04 ribasushi if it can't be guaranteed - sure, it will come back a PV, but most DBDs try really hard
20:05 Grinnz_ well, depends on your definition of most :)
20:05 ribasushi tinita: is_numeric intuits from data_type, I am actually cleaning up the docs for that as we speak
20:05 ribasushi Grinnz_: DBD::ODBC, DBD::Oracle, DBD::MySQL, DBD::Pg, DBD::Firebird
20:05 Grinnz_ DBD::mysql certainly does not; that's the one i use daily
20:06 ribasushi (what I know for sure off the top of my head)
20:06 ribasushi sigh...
20:06 ribasushi sec
20:06 Grinnz_ perhaps you're talking about something different?
20:13 tinita .oO( damn, I cannot comment out things in json? )
20:14 Grinnz_ no idea.. try //?
20:14 tinita tried
20:14 tinita tried /* */ also
20:14 Grinnz_ well, it is data storage and not code :P
20:15 tinita i better try if swagger can read yaml... =)
20:18 jberger Grinnz_: so you know, ribasushi is the maintainer of DBIx::Class, he knows more than most of us about dbs
20:18 jberger doesn't mean you are wrong, just thought you might want to know
20:18 Grinnz_ i know, but i use DBD::mysql enough to be confident that it gives me strings for every column response :P
20:18 jberger k
20:19 ribasushi jberger: hold your horses, was testing making sure there isn't something else going on
20:19 ribasushi (testing one more thing to be sure)
20:20 jberger no, that's fine, I just wanted to be sure that he knew that you knew what you are talking about, I'm making no other statements of any kind :-)
20:20 ribasushi Grinnz_: you are absolutely correct, DBD::mysql is not on that list, I am still not entirely sure why I misremember, but testing doesn't lie ;)
20:21 Grinnz_ well the only other one of those i've used is DBD::Pg, and not enough to notice if it actually gives me numeric values, so you're probably right about the rest :P
20:22 riche sonofagun sri, you need to make Mojo::IOLoop harder to use to make it seem more important
20:23 tinita DBD::mysql values don't even have the IV it seems
20:24 Grinnz_ yeah you can bind them to int types or something, but i dont bother with that; easier just to 0+$num
20:24 ribasushi http://paste.scsys.co.uk/468606
20:24 ribasushi Grinnz_: ^^
20:25 ribasushi (what I have quick access to)
20:25 tinita no sybase there? aww
20:25 * Grinnz_ thinks there should be a new DBD::mysql, with proper async, and blackjack
20:25 ribasushi tinita: DBICTEST_MSSQL_$_ in fact uses DBD::Sybase built against freetds
20:25 tinita ah, freetds. well... ;-)
20:27 tinita ok, now i'll check sybase open client lib
20:27 ribasushi tinita: it's a simple test as you can see
20:28 ribasushi Grinnz_: all I can think of is that the distro version of the DBD had some patch on it, otherwise the codebase I am thinking of wouldn't work...
20:28 ribasushi anyway
20:28 ribasushi Grinnz_++ # questioning "authority" :D
20:29 Grinnz_ ribasushi: https://metacpan.org/pod/DBD::mysql#mysql_bind_type_guessing
20:29 ribasushi (for some misguided value of authority)
20:29 tinita ribasushi: ok, returns the same as your mssql. so maybe DBIx::class was already doing something
20:29 Grinnz_ perhaps using that, it used to be "experimental" but apparently is better now?
20:29 ribasushi tinita: is the datatype in the RDBMS (the actual CREATE TABLE) numeric?
20:30 ribasushi tinita: if it isn't - the DBD will never return you IVs
20:30 Grinnz_ ribasushi: actually nevermind; that's for binding parameters to a query
20:30 tinita ribasushi: foo_id numeric       6
20:31 ribasushi (continuing on #dbic)
20:31 tinita ah, select1 returns IV, but select top 1 id from table returns a PV
20:31 ribasushi a-ha! ;)
20:31 tinita weird
20:31 tinita but it's a numeric field
20:31 ribasushi and SELECT id FROM table?
20:32 ribasushi (no TOP 1 )
20:32 batman tinita: Have you tried Swagger2?
20:32 tinita ribasushi: same as select top 1
20:32 batman The module on CPAN.
20:32 tinita batman: yes, that's the one I am using
20:32 batman tinita: Let
20:32 ribasushi tinita: ok, then it's something to do with the DBD I suppose :(
20:32 tinita batman: although it's marked as experimental =0
20:32 batman Me know if you have feedback
20:32 batman I made it
20:33 batman tinita: That's why I want feedback :)
20:33 tinita batman: what I thought is, maybe one should separate the Swagger2 from the mojo plugin
20:33 batman Not planning on making any drastic changes
20:33 tinita batman: since I'm thinking of trying this out with dancer
20:33 batman Yeah. Not going to do that.
20:34 batman But I don't mind if someone else does :)
20:34 tinita so swagger2 has a dependency on mojo even if I don't wanna use it
20:34 melo joined #mojo
20:35 good_news_everyon joined #mojo
20:35 good_news_everyon [mojo] marcusramberg created post-example (+1 new commit): http://git.io/xizV
20:35 good_news_everyon mojo/post-example b8d0e3d Marcus Ramberg: Add form post example...
20:35 good_news_everyon left #mojo
20:39 batman tinita: Get someone to split it up. And I will accept it.
20:39 batman It's just not my concern. Sorry :(
20:39 batman It makes perfect sense though.
20:39 batman Make a tweet :)
20:40 jberger Mojo is very tiny :-)
20:40 batman The YAML module is optimal
20:40 jberger I wonder if Mojolicious is smaller (sloc) than any of the ::Tiny modules at this point
20:40 batman Optional
20:40 purl i heard Optional was implied otherwise, no?
20:41 mikegrb haha
20:41 * jberger slaps purl with a fish
20:41 * purl slaps jberger with comically large fish in return
20:43 marcus Optimal YAML
20:44 Grinnz_ YAML running at 97% efficiency
20:45 tinita ribasushi: if I think about it: DBD::Sybase returns POK,pPOK and a PV. run through DBIC, I get PADMY,POK,pPOK, and IV and a PV
20:45 tinita so DBIC is already doing something there
20:45 jberger she canna take any more captain, she's giving it all sheess got
20:46 ribasushi tinita: yes, I am aware it does
20:47 ribasushi tinita: the problem is that you are getting PV *as a start* from the DBD
20:47 ribasushi from there on all bets are off
20:47 ribasushi PV that got nummified != IV that got stringified
20:47 ribasushi (again - think 01234)
20:47 tinita i'm curious what michael peppler will answer =)
20:48 odin22 joined #mojo
20:48 tinita seeing 56 open issues in RT i'm not too optimistic though
20:49 ribasushi tinita: it depends - DBIC has just as many :)
20:49 tinita many of the dbd ones are quite old =)
21:01 tinita batman: do you know how to specify a field to be either an integer or null in a swagger schema?
21:02 tinita required: false does something different
21:07 tinita got it
21:07 tinita "type": ["integer", null]
21:08 good_news_everyon joined #mojo
21:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xiSS
21:08 good_news_everyon mojo/master b0bbfd6 Sebastian Riedel: more consistent request examples (closes #754)
21:08 good_news_everyon left #mojo
21:09 marcus funny, I had just finished doing that too :)
21:09 sri oops
21:09 sri you seemed unsure, so i just tried it :S
21:10 marcus https://gist.github.com/anonymous/b8d93ed7b9ea7614c29d :) I don't care tho, I'm just glad the change got in.
21:11 sri no need to use two lines though :)
21:11 marcus ya, I guess perltidy doesn't work on pod
21:12 marcus saved us a round of corrections then =]
21:12 sri marcus++
21:17 hernan604 good bye everyone ! much loweee
21:17 hernan604 see ya tomorrow
21:17 marcus hernan604: o/
21:17 sri o/
21:23 good_news_everyon joined #mojo
21:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xib2
21:23 good_news_everyon mojo/master c2466e3 Sebastian Riedel: use the content helper consistently
21:23 good_news_everyon left #mojo
21:33 melo joined #mojo
21:35 good_news_everyon joined #mojo
21:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xihd
21:35 good_news_everyon mojo/master d15cb5c Sebastian Riedel: a few more tests for content helpers
21:35 good_news_everyon left #mojo
21:46 kaare joined #mojo
21:47 sri oh
21:47 sri the mailing list link on http://mojoconf.org is a very bad idea
21:48 sri you need to be a subscriber to be able to post
21:48 sri the link should point to https://groups.google.com/forum/#!forum/mojolicious
21:48 sri no wonder there was confusion earlier
21:54 jberger ahhhhhhh
22:17 yunga joined #mojo
22:17 yunga hello eveybody
22:18 sri o/
22:19 yunga :)
22:21 yunga i'm new to mojolicious, and making a script to download images from google searches in a non-blocking way, when it's finished i'd like it to stop all other downloads, i guessed i shoudl use Mojo::IOLoop->stop; it works fine with cygwin, but i get this message with strawberry perl: (in cleanup) Can't use an undefined value as a symbol reference at C:/Prg/Perl/perl/site/lib/Mojo/Asset/File.pm line
22:21 yunga 43 during global destruction.
22:21 yunga the script is here https://gist.github.com/yunga/4b98e5c2e53dbcbd4c6c
22:22 yunga is there some kind of step by step introduction/tutorial for IOLoops?
22:24 Grinnz_ stopping the ioloop may not prevent other callbacks that are already ready to fire
22:25 Grinnz_ also, you should use a delay: https://metacpan.org/pod/Mojo::IOLoop#delay
22:25 Grinnz_ https://metacpan.org/pod/Mojo::IOLoop::Delay#begin
22:26 Grinnz_ there's not really any guide on that yet unfortunately
22:27 Grinnz_ also also, win32 perl is known to throw out that warning for no apparent reason
22:28 yunga Grinnz_: thank you, i'm going to read and try those examples
22:28 yunga ah ok, windows... :D
22:29 Grinnz_ yunga: good luck. the main thing to remember is that whenever you want to pass a callback to something, instead you pass $delay->begin's callback, and then when all those callbacks in a step have been called, it goes to the next one
22:29 mst suspect your filehandle is getting gc'ed before the File object
22:29 mst I'd've thought that sri's new global phase idiom would've fixed that one though
22:30 yunga mst: it's version 6.0, for cygwin and strawberry
22:31 Grinnz_ yunga: what version of perl?
22:31 yunga 5.14 for cygwin, 5.20 for strawberry
22:32 Grinnz_ that destructor isn't checking for global destruction, heh
22:32 Grinnz_ https://metacpan.org/source/SRI/Mojolicious-6.01/lib/Mojo/Asset/File.pm#L40
22:32 yunga i thought about the file remaining open, but i don't know if $res->content->asset->move_to("$fullname"); is "atomic" in fact
22:32 n2plato joined #mojo
22:33 Grinnz_ in general, it's best to manage files "remaining open" by scoping the variables correctly
22:33 Grinnz_ dunno if that applies to your setup
22:34 yunga well i let Mojolicious handle it with the move_to method
22:34 Grinnz_ yeah, you're not holding any reference yourself so i wouldnt worry about it
22:35 yunga ok
22:39 yunga thank you both for the informations, this channel is really friendly :)
22:39 Grinnz_ you havent stuck around long enough yet
22:39 Grinnz_ ;)
22:39 yunga :D
22:44 * jberger sets Grinnz_ on fire
22:45 * sri sets jberger on fire
22:46 * jabberwok looks up at the red HALON plunger
22:52 s1037989 http://mojoconf.org/register "The ticket gives you access to all awesome presentations on Friday, June 5th, 2015" ...  What about for access on the 4th and 6th?
22:52 jberger 6th is included with the 5th
22:52 jberger I'm not sure how to sign up for the training :/
22:53 Averna joined #mojo
22:53 s1037989 Great!  Ok, cool.  I'll wait for more info on training...  Thanks!
22:53 punter joined #mojo
22:55 riche jberger: training will be released this weekend, needed to confirm second trainer which happened yesterday.
22:55 jabberwok the training comes with a fifth?  i might not remember much after that
22:56 jberger NICE!
22:56 riche jabberwok: a fifth of kickass
22:57 jabberwok now if only we could prevail upon the powers-that-be to call "Perl 6" something else entirely.
22:58 jabberwok BASIC-PLUS/3 perhaps
22:59 nicomen is it just me or has the amount of people asking for help increased lately?
22:59 marcus nicomen: seems busier
23:00 riche not a complaint:  imo it's a lot of new / changed features since the videos
23:02 jabberwok the headhunters here who sponsor many of the meetups, have told me the number of requests for Perl knowledge are picking back up again.
23:03 nicomen jabberwok: where is here?
23:05 s1037989 FWIW, I just registered for the presentations mojoconf.org/register which redirected me to eventbrite and I filled out the form, submitted my CC details, got confirmation in my email, but the mojoconf.org/register page is stuck at a disabled "Order Now" button with a spinner on top.
23:09 jberger batman/tempire ^^
23:12 jberger s1037989: I opened a bug report for us, thanks
23:12 jberger everything "succeeded" though right, this is just UX
23:12 jberger ?
23:17 s1037989 Correct.  Thanks, jberger!
23:57 marty joined #mojo
23:58 bpmedley https://github.com/kraih/minion/issues/7 <— Would a flag in the business logic for their app be more appropriate?

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