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

IRC log for #mojo, 2015-05-06

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

All times shown according to UTC.

Time Nick Message
00:00 pink_mist so run your app with morbo instead of whatever way you're running it currently
00:00 Zoffix ajr_, but is the template? :)
00:00 ajr_ Pink mist: that's precisely what I'm doing. I'm trying to look for causes.
00:01 ajr_ Zoffix; I think so, but I will check; it may not be named properly.
00:01 pink_mist ajr_: well then the 404 error page ought to show you looooooooooots of information about why it failed
00:02 Zoffix ajr_, another issue I ran into is with placeholders. They match .+ not .* (or alternatives) so you need to specify defaults for empty matches
00:04 ajr_ 404 Not Found isn't terribly helpful -
00:05 Zoffix ajr_, well, it shows you formats and defined routes and what not.
00:05 Zoffix Are you sure you're looking at the correct page?
00:07 caveman joined #mojo
00:08 ajr_ It refers to the request and the method I think I'm requesting; what other evidence do I need?
00:10 ajr_ Based on "says" embedded in the code, I don't think it's trying to execute the method named, but that was why I asked about the order of events.
00:10 Zoffix ajr_, ??? The development mode 404 page shows you like 3 screens of debugging information. What q{"says" embedded in the code} are you talking about?
00:11 Zoffix Got code you can sharE?
00:12 ajr_ I put "say 'at point x'" at various points in the code, to see if it has been executed
00:13 Zoffix :/
00:13 ajr_ If by "3 screens of debugging information", you mean mojolicious' output that starts "Page not found ..yet", that's what I am looking at.
00:14 ajr_ The code's rather long-winded, I'm afraid.
00:15 Zoffix Not sure what you're seeing then.
00:15 Zoffix This is what I get in production mode: http://ignorantdesigner.com/fadsfds
00:16 Zoffix This is what I get in development mode, and the "3 screens of..." page I referred to: http://xtatik.org/fdfds
00:17 Zoffix (it's not 3 screens there, but it's an app with a single page)
00:17 ajr_ That is essentially what I'm getting
00:17 pink_mist please not the "tap for more" box you can click on too
00:17 Zoffix OK. Can you screenshots of that 404 page you're seeing?
00:17 Zoffix pink_mist, what about "click for more" box you can tap on too?
00:18 pink_mist I don't see that one
00:18 ajr_ I don't see a "click for more" box - any clues you can give me about where to look?
00:18 Zoffix Oh, I just noticed the tap for more
00:18 Zoffix My browser has minimum font size disabled so that one is fucking tiny
00:19 ajr_ I've just located it
00:20 ajr_ Have to go, place is closing in 5 minutes.
00:20 Zoffix k. bye
00:23 al joined #mojo
00:25 diegok joined #mojo
00:32 mattastrophe joined #mojo
00:35 Vertig0 joined #mojo
00:59 caveman joined #mojo
01:12 klapperl joined #mojo
01:13 caveman hello my good sir
01:14 caveman are there any full featured blog engine/cms that is built with mojolicious (and available for public)?
01:15 caveman by full featured, i mean can handle comments too without relying on disqus
01:17 Zoffix caveman, I think Mojo::Pg has an 300-line example like that :)
01:19 Zoffix And if it lacks comments, it hardly sounds like something complicated to add.
01:19 Zoffix .oO( But why reinvent the wheel? DISQUS is great! )
01:19 jberger ajr_: if it appears that your route should exist, it may not be rendering anything as a response
01:20 Zoffix He quit, mate.
01:20 jberger also check that your controller classes exist and are properly defined
01:20 jberger oh drat
01:26 caveman_ joined #mojo
01:26 caveman_ Zoffix: i'm searching for ready-to-use, not just example
01:27 caveman_ i can find various example that uses mojolicious
01:27 caveman_ but i have yet to find actual ready-to-use application/cms/blog engine and such things on mojolicious
01:27 Zoffix *shrug* None that I know of.
01:28 caveman_ hmm
01:28 Zoffix In my experience, Perl folks like to make tools for people to roll their own apps instead of making pre-packaged things like Wordpress and stuff
01:28 Grinnz [21:19:31] <Zoffix> .oO( But why reinvent the wheel? DISQUS is great! )
01:28 Grinnz ew
01:28 Zoffix There's a bee something....
01:28 Zoffix CMS in Perl
01:28 caveman_ ah, i've seen perlbee
01:28 Zoffix I always forget its name but I know mst knows what I'm talking about
01:28 caveman_ built with dancer2 iirc
01:29 avenj https://metacpan.org/pod/Galileo
01:29 Zoffix Probably it then.
01:29 Zoffix Grinnz, wat?
01:29 Grinnz disqus is gross :P but better than integrating facebook comments or something i guess
01:29 Zoffix Grinnz, two lines of code you copy-paste and you got a great commenting system.
01:29 Zoffix Why is it gross?
01:30 Grinnz how it works
01:30 Zoffix I can follow stories on sites that use DISQUS... I can even follow commenters and see what they say?
01:30 Grinnz from the user's perspective
01:30 Grinnz yeah, i dont want to do any of that in comments
01:30 Zoffix I liked it from the user's perspective prior to my switching to using it as a developer at $work
01:33 Grinnz galileo looks interesting, jberger++
01:34 caveman_ is movabletype still developed now?
01:34 Zoffix All I've heard about Movabletype is blogs.perl.org can't wait to get rid of it :P
01:35 caveman_ hah
01:41 caveman joined #mojo
01:45 caveman movabletype is the only rival of wordpress that built with perl i know
01:45 caveman too bad its not opensource anymore
01:45 preaction if you want static content management using mojo underpinnings, i wrote Statocles
01:52 absolut__ joined #mojo
01:58 caveman joined #mojo
01:58 caveman preaction: looks good
01:59 caveman but not quite what i'm searching for
01:59 Zoffix Write your own and release as open source :)
01:59 Zoffix ???
01:59 Zoffix Profit!
02:00 Zoffix I'm writing an eCommerce system that has a blog in it, but it will use DISQUS comments :P~~~
02:02 asarch joined #mojo
02:13 caveman joined #mojo
02:13 caveman argh, god bless my shitty internet connection
02:14 caveman Zoffix: i wonder why nobody do that
02:14 caveman wordpress-esque cms with mojolicious that targeting non hackers
02:16 noganex_ joined #mojo
02:17 Zoffix caveman, because there's already Wordpress :)
02:17 caveman_ joined #mojo
02:17 Zoffix Why reinvent the wheel for non-hackers, when non-hackers are likely to use PHP, or whatever the latest language that tops "most used on the web" charts?
02:18 Zoffix When our @management contemplated updating our shitty main website, they questioned my proposal of using Apache webserver because "it's free, so it's likely not secure".
02:19 Zoffix These types of people ain't gonna be using perl, I'm 'fraid :)
02:20 caveman_ >Why reinvent the wheel? perhaps to promote mojolicious and perl...
02:20 Grinnz wait... they questioned -apache-?
02:20 Zoffix But how are you promoting it? You've just made a product for which there's no need.
02:20 Zoffix Differentiate or Die. There's a book of that title even
02:20 Grinnz the internet explorer of web servers?
02:21 caveman_ well, there's already Jekyll
02:21 caveman_ but everybody made their own static content builder with every language they knows
02:22 Grinnz purl, apache?
02:22 purl Goo Goo Ga Ga or a windows app
02:22 Grinnz wat
02:23 Zoffix Grinnz, in one conversation I said we used MySQL on some of our other sites, and one of the questions was "Yeah, but can you do ACTUAL SQL?" I was like "huh"? .... It took me a few minutes to realize by "actual SQL" they meant Microsoft SQL Server -_-
02:23 Grinnz yes, microsoft conveniently calls their SQL server "SQL Server"
02:23 Grinnz so they can pretend it's the correct one
02:23 Zoffix But there's an upside to that... Their ignorance makes them think I do magic and I get full say in what tech we use (well, except that main website in question) :P
02:24 Grinnz that's the way to do it... convince the management types you know what you're doing and you'll get a lot more pull
02:24 caveman_ here in my country, only big enterprise company uses sql server
02:25 caveman_ and their programmers always use shirt and suite
02:25 * Zoffix wears a tie to work....
02:25 Zoffix Not that it's mandatory, but it's nice to stand out :P
02:25 Grinnz luckily the company i work at is small so i don't have to worry about enterprise software, except when management occasionally suggests we switch to it
02:25 Grinnz hell, when i got there they were running production servers on fedora
02:25 Grinnz they're RHEL now at least :P
02:26 caveman_ chuck norris uses fedora on production servers
02:26 Grinnz heh... even i dont run fedora on my "production server"
02:27 Grinnz and all i run on it is some file storage and bots
02:30 Grinnz my biggest problem is trying to get us -off- apache and mysql
02:30 Zoffix hehe
02:30 Grinnz onto nginx and postgresql, so we can do websockets and have a database that fucking works properly
02:30 Zoffix I successfully accomplished that for 11/12th of our website :) Gonna switch when I finish writing XTaTIK :)
02:31 Zoffix s/website\K/s/;
02:31 Grinnz wth is \K
02:31 Zoffix "don't delete previous shit"
02:31 Grinnz huh
02:31 Zoffix like s/(?<=website)/s/; but there are some differences that I forget :)
02:32 Grinnz nifty
02:32 Grinnz purl, no, apache is the microsoft word of web servers
02:32 purl okay, Grinnz.
02:32 Zoffix The 1 site that's left is retarded though. You're complaining about mysql? Try working with a site that has code from 1999 and you can only change 50% of random bits of code and you can only do it through some shitty UI that doesn't even support CTRL+A for "Select all" :)
02:33 Grinnz haha oh god
02:33 Zoffix I actually wrote some code to interface with that website... to log in and stuff.. this is part of the code: http://fpaste.scsys.co.uk/476627
02:33 Grinnz well my problem is that the apache and mysql in quesiton are also running one other significant project, and you really don't want to see its code
02:33 Zoffix Yes... the server is custom too, and it spits out buggy cookies that even Mojo::UserAgent can't understand them properly :P
02:34 Grinnz haha
02:34 Grinnz the site in question is... at least using CGI.pm
02:34 Zoffix :)
02:34 Grinnz thats about the only good thing i can say about it though
02:36 Grinnz i've been trying to come up with ways we can separate our codebase, the trouble is that we call various functions from that code
02:36 Grinnz and it's unlikely i'm going to get the other team to write us a different interface... :P
02:37 Zoffix :P
02:37 Grinnz i'm thinking i'll write a daemon that calls the functions, and maintain it myself
02:37 Grinnz communicate with it by redis perhaps
02:40 Grinnz i may not have any chance of getting us off mysql, but if i can just make the codebase independent, there's so much we could do
02:41 Grinnz we've been wanting to put it on a different server for performance reasons to begin with
02:43 Grinnz joined #mojo
03:12 hshong joined #mojo
03:15 good_news_everyon joined #mojo
03:15 good_news_everyon [mojo] jberger pushed 2 new commits to master: http://git.io/vJH3b
03:15 good_news_everyon mojo/master 277ac26 Zoffix Znet: Fixed typo
03:15 good_news_everyon mojo/master 9f11ccd Joel Berger: Merge pull request #793 from zoffixznet/master...
03:15 good_news_everyon left #mojo
03:20 jberger I enjoyed writing Galileo
03:20 jberger but I would do a lot differently if I was going to do it again
03:21 jberger I can proudly say that it is where a lot of mojo's json over websocket handling and testing came from though
03:31 mattp Grinnz: https://metacpan.org/pod/AnyEvent::Task
03:35 Grinnz interesting, but i don't intend to write anything depending on AnyEvent
03:36 jberger Grinnz: minion would be close to that I suppose
03:37 Grinnz i dunno, would minion work across servers?
03:37 jberger are you building a reply to a client or just doing some work?
03:37 Grinnz replies are required
03:38 jberger yeah not minion then
03:38 Grinnz these aren't long running processes
03:38 Grinnz well, usually ;)
03:38 Grinnz i think i could whip something up with Mojo::Redis2 without too much trouble though
03:39 jberger anyway we have raw mysql all over our codebase too
03:39 jberger I'm never getting rid of it most likely
03:39 Grinnz the reason i want to do something with that instead of just communicating over the database like i do with other stuff, is to avoid adding more latency
03:39 Grinnz waiting for something to poll the db, etc
03:40 Grinnz the problem is that we're using mysql, not the raw mysql
03:40 Grinnz the database itself... apart from usability issues, it's just retarded sometimes
03:47 basic6_ joined #mojo
03:47 zivester joined #mojo
03:49 Grinnz let me tell you though.. trying to do real time analysis on millions of rows in a mysql database really gives you a good idea of orders of magnitude of efficiency
03:50 jberger I'm sure!
03:51 Grinnz it's pretty awesome when a query fails to use the index you expect for no apparent reason, and thus takes 3 hours instead of 10 seconds
03:53 Grinnz hmm why isn't there a redis backend for minion yet :P
03:56 jberger someone claimed they were going to
04:06 kaare joined #mojo
04:10 Grinnz not that i need one. just think it would be appropriate
04:16 mattastrophe1 joined #mojo
04:47 polettix joined #mojo
05:07 caveman_ joined #mojo
05:58 dustinm joined #mojo
06:08 polettix joined #mojo
06:12 polettix joined #mojo
06:14 bramirez joined #mojo
06:21 caveman_ joined #mojo
06:23 juikuen joined #mojo
06:34 claudio_ joined #mojo
06:38 jb360 joined #mojo
06:39 kaare joined #mojo
06:40 vmbrasseur joined #mojo
06:40 mgrimes joined #mojo
06:43 vmbrasseur joined #mojo
06:44 jberger joined #mojo
06:46 chansen joined #mojo
06:49 phillipadsmith joined #mojo
06:51 dod joined #mojo
06:56 dod joined #mojo
06:58 jabberwok joined #mojo
07:02 eseyman joined #mojo
07:06 bramirez joined #mojo
07:14 damaya joined #mojo
07:24 sivoais joined #mojo
07:25 trone joined #mojo
07:26 damaya_ joined #mojo
07:28 genio joined #mojo
07:39 dod joined #mojo
07:39 jberger joined #mojo
07:44 Onigiri joined #mojo
07:48 caveman_ joined #mojo
07:49 bramirez joined #mojo
07:51 damaya joined #mojo
07:51 Andreas joined #mojo
07:54 Vandal31341 joined #mojo
07:55 sivoais joined #mojo
08:00 dod joined #mojo
08:02 damaya joined #mojo
08:03 Lee_ joined #mojo
08:08 sivoais_ joined #mojo
08:27 jberger joined #mojo
08:33 sivoais joined #mojo
08:34 fhelmber_ joined #mojo
08:41 caveman_ joined #mojo
08:46 dod joined #mojo
08:49 jberger joined #mojo
09:10 caveman_ joined #mojo
09:14 jberger joined #mojo
09:34 punter joined #mojo
09:51 misty_g3ar joined #mojo
09:58 mattastrophe joined #mojo
10:20 jb360 joined #mojo
10:47 dotan joined #mojo
10:54 romel joined #mojo
11:05 romel joined #mojo
11:32 punter joined #mojo
11:34 dod joined #mojo
11:44 mikegrb joined #mojo
11:55 neilhwatson joined #mojo
12:04 mikegrb joined #mojo
12:05 Kripton joined #mojo
12:11 asarch joined #mojo
12:13 amon joined #mojo
12:18 bramirez joined #mojo
12:32 zivester joined #mojo
12:45 ajr_ joined #mojo
12:53 nf joined #mojo
12:58 punter joined #mojo
13:16 Mikey joined #mojo
13:28 gryphon joined #mojo
13:33 kaare joined #mojo
13:52 dod joined #mojo
14:08 dod joined #mojo
14:32 ashimema joined #mojo
15:03 caveman_ joined #mojo
15:08 ajr_ joined #mojo
15:54 jberger because of a discussion on #p5p I made this example
15:54 jberger perhaps some people will find it <s>terrifying</s> interesting
15:54 jberger https://gist.github.com/jberger/0006750cdfae8f078791
15:55 * Grinnz_ has no idea whats going on
15:59 jberger I pull the name value out of the stash by signature
15:59 pink_mist looks like Kavorka is another Function::Parameters clone?
15:59 jberger pink_mist: yes
15:59 jberger which of course was a Method::Signatures clone
16:00 jberger which was a MooseX::Declare clone
16:00 pink_mist yes :P
16:03 Grinnz_ lol
16:28 nf joined #mojo
16:30 jberger (in a related story, in figuring that one out I think I finally grok the dispatcher)
16:39 sh4 joined #mojo
16:46 mattastrophe joined #mojo
16:49 disputin joined #mojo
17:00 ajr_ joined #mojo
17:01 ajr_ joined #mojo
17:07 disputin joined #mojo
17:20 ToApolytoXaos joined #mojo
17:49 buu Is there some non-obvious way of setting the user agent on a Mojo::UserAgent->new call I'm missing?
17:50 jberger buu: http://mojolicio.us/perldoc/Mojo/UserAgent/Transactor#name
17:52 jberger in fact, the example is right there in the UA docs: http://mojolicio.us/perldoc/Mojo/UserAgent#transactor
17:53 pink_mist but he asked for the _non_-obvious way :P
17:53 buu Well, thanks.
17:53 Grinnz lol
17:54 buu Guess I was grepping for a different string
17:55 jberger pink_mist++
17:55 buu Oh come on
17:55 buu If you don't have the SSL module installed it returns a 404?
17:56 Grinnz if its https, probably
17:56 buu That seems unintuitive.
17:56 Grinnz i thought it actually errored, but that might just be on server listen
17:57 buu It prints a warning to stderr which usefully I wasn't logging.
17:57 dod joined #mojo
17:57 Grinnz oh
17:58 buu Well, it was getting hidden by less
17:58 buu But still
17:58 buu Not having a response object would have been far more useful
17:58 jberger a 404 or a 500?
17:59 Grinnz there's never "not a response object"
17:59 Grinnz the response object might have an error that doesn't have a code
17:59 Grinnz e.g. connection error
17:59 Grinnz er, the transaction *
18:08 buu How can there be a response object if the silly code died trying to make the request?
18:09 jberger buu: because: https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction.pm#L10-L11
18:11 Grinnz it's a general theme in mojo, if you don't have a specific object for some attribute it will make an empty one, so at least methods won't blow up
18:12 buu I wanted it to blow up =[
18:12 Grinnz then check $tx->error :P
18:17 jberger buu: I just reviewed the code, it look sane to me
18:22 buu I can't get past the idea of a completely normal looking 404 response being correct if it fails to load a module to make the request
18:22 buu But I'm not a huge fan of designs where you have to explicitly check for errors before the next line of code
18:22 Grinnz buu, yeah not_found being the default response is a little weird sometimes
18:35 mattastrophe joined #mojo
18:55 jabberwok joined #mojo
18:57 asarch joined #mojo
19:05 sivoais joined #mojo
19:08 woz joined #mojo
19:08 berov joined #mojo
19:11 ajr_ I'm having a "Page not found...yet" problem. What I believe to be the relevant information to follow.
19:11 ajr_ Controller is called Pertnerman.pm
19:11 ajr_ s/Pert/Part/
19:13 ajr_ A method called "add" works - path from diagnostic messages:
19:14 jberger joined #mojo
19:14 ajr_ +/add  GET "partnerman.add"
19:14 jberger joined #mojo
19:14 sivoais joined #mojo
19:15 jberger phew that was scary !
19:15 ajr_ the "edit" method +/edit/:id GET "partnerman.edit" does not
19:16 Grinnz_ ajr_: can you pastebin the route definitions?
19:16 Grinnz_ and the request URLs
19:17 ajr_ I'll try that; I assume subsets of the complete pages are OK?
19:17 Grinnz_ dont need the page output... just the code that defines the routes
19:20 ajr_ http://pastebin.com/LnhBK4xC
19:20 Repaster Repasted text from ajr_: http://fpaste.org/219133/09400561/
19:22 ajr_ The (portion) of the edit URL that failed: /partnerman/edit?company_nm=Aff
19:24 ajr_ The URL for add that returns a page: /partnerman/add
19:25 ajr_ Is that sufficient?
19:25 Grinnz_ ajr_: that IRC will not match that route
19:25 Grinnz_ er.
19:25 Grinnz_ that URL *
19:25 * Grinnz_ uncrosses brain wires
19:25 ajr_ What's the error?
19:25 purl the error is KABOOM!
19:25 Grinnz_ ajr_: a : placeholder requires a non-empty parameter to be there
19:26 Grinnz_ ajr_: https://metacpan.org/pod/Mojolicious::Guides::Tutorial#Placeholders
19:26 Grinnz_ ajr_: you can set a default if you want it to be optional
19:27 jberger purl++
19:27 jberger karma purl
19:27 purl purl has karma of 9698
19:27 Grinnz_ also see https://metacpan.org/pod/Mojolicious::Guides::Routing#Optional-placeholders
19:28 ajr_ purl: KABOOM is the effect; I'm looking for the cause.
19:28 purl ...but kaboom is <reply>Your Illidium Q37 Explosive Space Modulator|<reply>What, no kaboom? There was supposed to be an earth-shattering kaboom!...
19:29 Grinnz_ purl: is a bot
19:29 purl I AM NOT A NUMBER, denny is A FREE MAN!
19:29 Grinnz_ lol
19:31 ajr_ What would a valid URL for that form look like?
19:32 ajr_ (I'm still reading the links)
19:33 Grinnz_ /partnerman/edit/blah
19:34 ajr_ Ah, thanks.
19:35 woz joined #mojo
19:36 ajr_ At least I now have a different error; I'll go away and chase that for a while. :-)*
19:48 Jonis best way to create a makefile for a mojo project?
19:50 Jonis well
19:50 Jonis guess I should have googled that properly first
19:54 jberger Jonis: o/
19:55 jberger Jonis: does the generate command build one?
19:55 jberger I don't remember (as I don't use it)
19:55 jberger in fact I use Module::Build
19:55 jberger are you looking to make a CPAN module?
19:56 jberger if not then standard mechanisms are fine (for things like dependency management and test running etc)
19:56 jberger for CPAN the only thing that changes is how you do static files
19:56 jberger but I use a different pattern for that than most people (since I like MB(
19:56 jberger )) # OCD
19:56 Jonis ls
19:57 Jonis jberger: well, generate should actually, I'll try it in a sec :)
19:58 Jonis jberger: I'm looking to grab all the dependencies for a project from CPAN
19:58 jberger so you don't need to actually use the makefile  you are just declaring deps?
19:58 jberger I recommend cpanfile for that now
19:59 mishanti1 cpanfile is awesome
19:59 jberger https://metacpan.org/pod/cpanfile
19:59 mishanti1 Jonis: cpanm --installdeps .
19:59 jberger then just cpanm --installdeps .
19:59 jberger mishanti1++
19:59 mishanti1 Jonis: where '.' references the current directory, which holds a cpanfile.
19:59 mishanti1 :)
20:00 Jonis oh, sweet
20:00 Jonis thanks :)
20:01 Jonis I'd get so much more stuff done if I didn't have to sleep
20:04 * mishanti1 agrees
20:04 mishanti1 I've been fairly successful on cutting that bad habit though.
20:05 * jberger hands Jonis and mishanti1 each a large coffee
20:06 buu oh my god
20:06 buu ep templates
20:06 purl ep templates are made to use $x instead of stash 'x'! :)
20:06 mishanti1 jberger: thanks, I do appreciate coffee, but caffeine has absolutely no effect on me.
20:06 Jonis jberger++
20:06 Jonis it has plenty of effect on me
20:06 buu This may actually drive me insane
20:07 jberger mishanti1: you just aren't getting enough
20:07 Jonis buu: what's the problem?
20:07 purl the problem is probably semantics
20:07 buu I have code like this: if( success ) { $self->stash( results => $joy ) }
20:07 jberger http://tshirtgroove.com/wp-content/uploads/2013/01/coffee-intravenous-t-shirt.jpg
20:07 buu Then in my template I do %if($results){ ...}
20:07 buu And of course it throws a strict warning because $results isn't defined if it doesn't succeed
20:09 Jonis % if (defined $results) { .. ?}
20:09 buu If only
20:09 buu Its evaluated as perl code
20:09 buu Which means just mentioning the variable is enough
20:10 mishanti1 jberger: Heh. That's a funny one yes. I regularly drink 1+ litre of black coffee, then go straight to bed. No trouble sleeping.
20:10 jberger buu: in the template use stash('results') rather than $resutls
20:10 buu jberger: =/
20:10 buu ok
20:10 jberger buu: what is it you are trying to do
20:10 jberger ?
20:11 jberger you are making some UA request and then trying to serve something based on the result?
20:11 buu I am actually
20:12 jberger you could also do $c->stash( results => $success ? $joy : undef )
20:12 buu Well, there's a bunch of $result variables right now
20:12 buu But yeah
20:17 mattastrophe joined #mojo
20:20 Grinnz_ cpanfile++
20:21 Grinnz_ ive been using that for all my projects now and it's awesome for things i dont actually want to put on cpan
20:29 jberger Module::Build::Tiny actually requires cpanfile format
20:29 jberger but MBT is still a little way away from being a full replacement, its getting closer
20:32 Grinnz_ i've moved to defining my cpan module prereqs in cpanfile instead of the dist.ini directly
20:32 Grinnz_ mostly because my pluginbundle emptied the rest of my dist.ini :P
20:33 Vertig0 joined #mojo
20:33 * jberger HATES plugin bundles, sorry Grinnz_
20:34 jberger worst thing since, dzil
20:34 jberger worse maybe
20:35 Grinnz_ why? it does exactly the same thing as the 30-whatever lines of dist.ini i used to have, but it's easier to install
20:36 Grinnz_ cpanm Dist::Zilla::PluginBundle::Author::DBOOK # go make a sandwich, then you can release my modules :P
20:37 Grinnz_ granted some of them are ridiculous, mine is pretty straightforward so far
20:41 meredith i often install plugin bundles into separate lib dirs so i can trash all the bits at once later
20:42 jberger my thing is that when I go to contribute, I don't want to have to install 100 modules most of which aren't used
20:42 jberger which is how lots of authors bundles are
20:42 Grinnz_ i can understand that
20:43 jberger they just keep adding plugins
20:43 Grinnz_ as far as i'm concerned, you can do a prove -lr just fine and if you want to do anything more than that, well you're not just contributing anymore
20:44 jberger yeah, people have said that too
20:44 Grinnz_ but of course my modules are all pretty simple
20:44 jberger I guess I get that, but, don't know, still feels hinky
20:44 meredith yeah some people rig up a lot of dzil magic
20:45 jberger (does it still have that choose your own adventure documentation?)
20:45 Grinnz_ all my plugin bundle really is, is @Basic with some stuff for git integration and swapping out plugins in a couple cases
20:45 jberger I kept having a hard time learning how things were working and how to do things that were easy in MB
20:45 Grinnz_ but it's very wordy to put in each dist.ini so i finally made the bundle
20:46 Grinnz_ dzil's documentation? yeah i never liked it
20:46 jberger and then it started to appear to be a giant cargo cult (just add @Basic and some other things, I'm not sure how it works, its magic)
20:46 jberger and then bundles just confirmed that for me
20:46 polettix joined #mojo
20:46 jberger but I might be a stick in the mud too
20:46 jberger very possible
20:47 Grinnz_ well, it does a lot of things so it's difficult to explain what it does fully in a concise manner
20:47 Grinnz_ especially because of the "phases"
20:47 jberger I want to KNOW what my build tool is doing
20:47 jberger if it can't be explained, its too complex
20:47 Grinnz_ eh, it does what i want, is what's important :P
20:48 Grinnz_ i could go through and detail every step of every phase, but it would be tedious
20:49 jberger perl-reversion -bump; podselect <path/to/main.pm> > README.pod; perl Build.PL; ./Build dist; ./Build distcheck; ./Build disttest; mojo cpanify -u <username> -p <pass> <tarball>; git tag -a <version> -m <message>; git push --tags origin master
20:49 jberger tadaaaa!
20:49 Grinnz_ dzil release
20:49 purl dzil release is tempire's favorite
20:49 Grinnz_ done ;)
20:49 jberger zomg! did it do the right thing!?
20:49 Grinnz_ yep
20:50 Grinnz_ https://metacpan.org/pod/Dist::Zilla::PluginBundle::Author::DBOOK#DESCRIPTION -- some of it's self explanatory, some of it's kind of weird because of the phases... dunno
20:52 Grinnz_ the thing about @Basic is it's supposed to always do the "expected" things... it never really breaks anything even if you don't understand it, it'll error out first
20:52 Grinnz_ that last chunk i have is mostly @Basic with added MetaJSON and Git::GatherDir instead of GatherDir (it uses .gitignore)
20:53 Grinnz_ or actually, it uses what's being tracked by git specifically
20:53 Grinnz_ which i'm still getting used to :P
20:56 punter joined #mojo
20:56 jberger so how would I not gather README.pod though I want it in git
20:57 Grinnz_ add it to exclude, like i do with LICENSE
20:57 Grinnz_ (it generates a new license)
20:57 Grinnz_ thats another reason i split GatherDir out of @Basic initially
20:57 Grinnz_ @Basic doesnt let you configure it at all which is a pain in the ass
20:58 hernan604 joined #mojo
20:59 jberger wait, what do you mean it "uses .gitignore"
20:59 jberger I .gitignore the meta files, but those should be in the dist
20:59 Grinnz_ i misspoke, it actually uses git itself
20:59 Grinnz_ the meta files are generated
21:00 Grinnz_ so they don't show up in the tree at all
21:00 jberger so it doesn't care about those
21:00 jberger ok
21:00 jberger maybe I will try it again sometime
21:00 jberger I had converted several of my dists and then something (I wish I remembered what) was harder than it needed to be, right about the same time that I tried to contribute to somehting that had a monster bundle
21:01 jberger and I swore it off
21:01 Grinnz_ if i was starting out again, i'd just skip trying to use @Basic directly, once i stopped trying to do that everything was easier to configure
21:01 jberger (any WHYYYYYYY is it ini?)
21:01 jberger (everybody hates ini files)
21:01 Grinnz_ because ini is easy to read and write for humans
21:01 jberger well I didn't say I wanted xml
21:01 Grinnz_ the only alternative is something like yaml
21:02 Grinnz_ which is still a little too "strict" probably
21:02 jberger semicolon as comment is evil
21:02 Grinnz_ true
21:03 Zoffix No, it's awesome! It means I can keep my habit of showing semicolons at the end of the line and it'll still work :)
21:03 jberger I still don't get the difference between the gatherdir modules?
21:03 Grinnz_ Zoffix: lol
21:03 Zoffix I automated half my workflow at previous work before someone asked me why I was putting semicolons on every line in AutoIt code :P
21:04 jberger oh, the one doesn't use git at all
21:04 jberger I see
21:04 Grinnz_ jberger: the standard one grabs everything in the current directory dumbly
21:04 Grinnz_ and then PruneCruft skips the usual bunch of version-control-and-other-files-you-dont-want-to-include
21:04 Grinnz_ Git::GatherDir asks git what files it's tracking
21:05 jberger so you don't use PruneCruft then?
21:05 Grinnz_ no i left it there, it doesnt harm anything
21:05 jberger or you do, but just in case
21:05 jberger yah
21:08 Grinnz_ i forget where i found out what PruneCruft prunes, i know i saw it somewhere but as usual the docs aren't helpful
21:09 Grinnz_ maybe i'm just thinking of the standard MANIFEST.SKIP
21:12 woz joined #mojo
21:16 Grinnz_ jberger: btw relevant to what you asked about README.pod... i use ReadmeAnyFromPod which actually generates a README.pod from the main module, sticks it in root in the git repo but leaves it out of the dist
21:16 Grinnz_ with the configuration i have for it
21:17 jberger yes, I recall that module from when I was using dzil
21:17 disputin joined #mojo
21:18 Grinnz_ that module is definitely what i'd call "magical" in how it works, but somehow it does what's expected :P
21:19 jberger podselect <<path/to/lib.pm>> > README.pod
21:19 jberger no magic at all
21:19 Grinnz_ i mean, the part where it runs in the correct phases so the README.pod isnt included in the dist
21:19 jberger I wish I could remember what thing it was that I couldn't do to my liking
21:20 Grinnz_ i wish i could tell github to use metacpan links for pod :U
21:21 * jberger finds https://github.com/jberger/Physics-RayTransfer/blob/master/dist.ini
21:23 Grinnz_ maybe the versioning? you're still doing it manually there
21:23 Grinnz_ i never tried the autoprereqs so... dunno about that
21:23 woz joined #mojo
21:27 ajr_ If there's a multi-stage process on a single entity (e.g. add an item to a db, then go on to edit), what's the best way to hand over the identity of the item? params, stash, or add it to the URL?
21:28 Grinnz_ hand over to what?
21:29 ajr_ The next step; e.g. from an "add" routine to an "edit"
21:30 Grinnz_ but is this just a method call or something? or are you actually waiting for another request from the client?
21:30 ajr_ method call
21:30 purl i heard method call was a method call
21:30 Grinnz_ stash is fine, usually then
21:31 Grinnz_ purl: that's really not very helpful
21:31 purl Grinnz_: huh?
21:31 ajr_ I'll try that, then. (I'm converting code that seems to use "stash" in a rather different way
21:32 Grinnz_ try namespacing your stash values that you don't need in the templates. "something.thing" etc
21:34 ajr_ (Oh, and thanks for the help, Grinnz.
21:35 polettix joined #mojo
21:54 jberger Grinnz_: you know what it might have been?
21:54 jberger autoprereqs plus MooseX::Declare
21:54 Grinnz_ yeah... that stuff is all a little too magicky for me
21:55 jberger IF (and that's a big if) I go back, I wouldn't use autoprereqs
21:55 jberger also, I didn't know I could see all my release history, that's kinda cool
21:55 jberger https://metacpan.org/author/JBERGER/releases?size=500
21:55 Grinnz_ yeah heh
21:55 jberger I've been trying to track down when I switched
21:56 jberger I found this one: https://github.com/jberger/Tie-Array-CSV/commit/fc7ae4909002169e0ee5eec4041fb7b6968ddd0b
21:56 Grinnz_ heh
21:56 jberger but I doubt that was the catalyst, that must have been after I had been burned and was moving my dists slowly
21:57 jberger <3 Tie::Array::CSV, might still be my favorite CPAN dist
21:57 Grinnz_ does look pretty cool
21:58 Grinnz_ fortunately i don't have to work with CSVs very often
21:59 jberger $csv[$row][$column] = 'content' # writes to the file in the correct spot
21:59 jberger so much fun
21:59 jberger WAAYYYY magic
22:00 Grinnz_ heh
22:00 Grinnz_ as long as it's Gandalf magic and not Sauron magic
22:05 jberger a tied object that holds references to other tied objects?
22:05 jberger what would you call that?
22:06 Grinnz_ well, DBM::Deep kind of does that too
22:06 jberger https://github.com/jberger/Tie-Array-CSV/blob/master/lib/Tie/Array/CSV.pm#L104-L119
22:06 jberger I suppose so, yeah
22:06 Grinnz_ it gives me a similar tingly feeling
22:06 jberger and for similar reasons
22:07 Zoffix joined #mojo
22:12 Zoffix Hey. I can't seem to get Mojolicious::Plugin::Bootstrap3 to reload the custom theme unless I remove both public/sass and public/packed. Is there a way for it to reload when stuff changes? Here's my code: https://github.com/XTaTIK/XTaTIK.org  and what I'm doing is changing, say, this colour: https://github.com/XTaTIK/XTaTIK.org/blob/master/public/CSS/_variables.scss#L17
22:13 Zoffix Nuking public/sass alone seems to trigger asset re-generation (I get a message in the terminal) but nothing's changed.
22:22 jberger Zoffix: https://github.com/jhthorsen/mojolicious-plugin-assetpack#mojo_assetpack_no_cache ?
22:27 Zoffix jberger, that actually makes it worse :) with that option turned on, it doesn't generate Bootstrap file at all, after I delete sass or packed dirs (and if I don't there are no updates after I change the code). I get this error: Can't load application from file "/home/zoffix/Desktop/CPANPRC/XTaTIK.org/XTaTIK.org.pl": [BOOTSTRAP] move /_variables.scss /home/zoffix/Desktop/CPANPRC/XTaTIK.org/public/sass/xtatik/_variables.scss: No such file o
22:27 Zoffix r directory at /home/zoffix/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Mojolicious/Plugin/Bootstrap3.pm line 422.
22:27 jberger well that was just a guess
22:28 jberger batman is the one who would know
22:28 * Grinnz_ lights the batsignal
22:31 Zoffix $ENV{SASS_PATH} = $self->asset_path('sass');
22:31 Zoffix :O
22:32 * Zoffix would never be so bold :)
22:34 Grinnz_ sassy *
22:50 Zoffix Well, no idea. I tried to understand wtf is going on, but I ended up exactly where I started :P
22:51 Zoffix The sad thing is I think all I wanted to change in this theme is a single colour :O
22:56 mattastrophe joined #mojo
23:35 rwp joined #mojo
23:42 mattastrophe joined #mojo

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