Camelia, the Perl 6 bug

IRC log for #mojo, 2013-10-26

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

All times shown according to UTC.

Time Nick Message
00:07 SmokeMac_ joined #mojo
00:09 SmokeMachine joined #mojo
00:49 chansen sri: you might find this interesting/useful <https://gist.github.com/chansen/7163968>
00:49 kanishka1 joined #mojo
00:50 SmokeMachine joined #mojo
01:17 sri chansen: oh, i see a few i've not encountered yet :)
01:20 sri chansen: also love how webkit and firefox send utf-8 fields/filenames, making it not really header values
01:20 chansen yeah, crazy
01:31 sri https://bugzilla.mozilla.o​rg/show_bug.cgi?id=136676 # :S
01:38 KindOne joined #mojo
01:39 memowe joined #mojo
01:48 chansen hehe
01:48 chansen Did you see who reported the issue?
01:49 sri lol
01:49 chansen =)
01:57 duncanthrax2 joined #mojo
02:32 beyondcreed joined #mojo
02:34 asarch joined #mojo
02:52 duncanthrax joined #mojo
03:20 asarch joined #mojo
03:33 preflex_ joined #mojo
04:40 preflex_ joined #mojo
04:47 dqw110 joined #mojo
06:08 d4rkie joined #mojo
06:20 d4rkie joined #mojo
06:45 kanishka joined #mojo
06:45 damaya joined #mojo
06:45 damaya Are there any good books or other resources out there for learning Mojolicious?
07:12 Vandal joined #mojo
07:20 marcus damaya: I recommend the guides that ship with mojolicious
07:20 marcus damaya: http://mojolicio.us/perldoc
07:22 dotandimet joined #mojo
07:31 damaya I've read a lot of them and I am looking for something a bit more thorough. I don't particularly care for the guides, because they show a single example of something, but it doesn't really answer a lot of questions.
07:35 damaya I have quite a few examples of where the guides have completely fallen short for me. I really like Mojolicious, but the documentation is the one aspect that makes me not recommend it to others.
07:41 damaya And then this channel is basically dead, so this isn't a great resource either.
07:42 mire joined #mojo
07:42 damaya I mean no offense by any of this, because I think a lot of people (including myself) really appreciate what you guys are doing. In fact, I really like Mojolicious. However, the documentation is really bad.
07:44 damaya tempire had some really great mojocasts, but they didn't cover a whole lot. They ended far before they should have. And then you're left to basically figure things out yourself. I even saw on StackOverflow a question where the response was basically, "I opened the source for Mojo::Controller and this is how you do it..."
07:46 damaya Here's an example of something I am doing that I had to search for and found on a blog post (I think by jberger), but could find nowhere in the documentation explaining it: $end->($tx->res->dom('a[href]')->map(sub { "http://$host:8080/path/".$_->{href} })->each);
07:47 damaya And here I am, alone in this channel once again.
07:49 damaya Another example, while tempire has create an excellent example of how to accomplish a task in a Mojolicious full app vs a lite app, it's still not very well explained why one would want to go with one vs the other.
08:14 denisboyun joined #mojo
08:16 hrupp joined #mojo
08:50 rem_lex|pivo joined #mojo
09:17 damaya Anyone here?
09:39 dotandimet joined #mojo
09:52 dotandimet joined #mojo
09:54 punter joined #mojo
09:58 punter joined #mojo
10:06 basiliscos joined #mojo
10:42 dotandimet joined #mojo
10:52 sh4 joined #mojo
10:56 SmokeMac_ joined #mojo
11:04 SmokeMachine joined #mojo
11:07 dod joined #mojo
11:12 dqw110 joined #mojo
11:28 dod joined #mojo
11:28 espent joined #mojo
11:32 d4rkie_ joined #mojo
11:48 batman damaya: "this channel is basically dead" ..? i think you're either asking the wrong questions or at the wrong time during the day.
11:48 batman i'm not under the impression that this channel is dead in any way
11:51 batman i think mostly the doc is really good. the only issue i have is that it can be a bit difficult to find, but that's the way it is when there's a lot of doc
11:51 batman no book can solve that for me
12:18 nicomen damaya: adding a host prefix to all urls, isn't that something you would want to do in the template from the start?
12:30 batman sri: https://github.com/jhthorsen/mojoli​cious-plugin-assetpack/commit/7eee7​97c3ab8f977f00a54b07e64a9cd1574b6e4 # got any comments?
12:30 batman or anyone else...
12:41 nicomen file or filename will contain?
12:42 batman is that a sentence..?
12:42 nicomen yeah your first comment says the file will contain...
12:43 nicomen anyway, would you recommend serving static files thru mojo at all?
12:43 batman yes
12:43 batman but i would also recommend having a reverse proxy infront of any webapp
12:44 batman the filename will contain the md5 sum of the file... not sure how to write that a better way. help is welcome :)
12:44 nicomen an md5 sum of the file content will be appended to the filename before the file extension ;)
12:45 batman not bad.
12:45 marty Personally I think mojolicious documentation ranks up there with some of the best available for open source projects.
12:45 batman i'm using cloudflare infront of my apps. but any sane config of nginx would also do
12:46 batman marty: i agree. the lite app tutorial and rendering guide kick ass.
12:46 nicomen marty: I agree, but I also think the glue between the strict and concise docs is missing (but not complaining as if I wasn't that lazy I could've made some tutorials myself)
12:46 batman ;)
12:46 marty :)
12:46 batman i really hate complaints that does not contain ideas on how to make anything better.
12:47 batman like "your doc sucks", when you have tons of doc is not very constructive :P
12:47 marty I totally agree.  Writing docs is very hard and to complain without offering solutions is just bad form.
12:47 batman word.
12:48 nicomen well at least it would be nice to know how they suck ;)
12:48 nicomen turning off suck is not that easy
12:50 batman s/\bsuck\b//
12:54 nicomen I think substr should work?
12:54 batman could be
12:54 sri damaya: you're not entitled to help from this channel, and your attitude makes me want to not help you
12:55 sri damaya: in fact, i won't help you until you start helping others
12:56 batman stephan48: what do you mean md5 is insecure? i have no idea how that has anything to filename generation :P
12:56 batman nicomen: "The files in the packed directory will have a checksum added to the filename which will help broken browsers request a new version once the file is changed" ?
12:57 stephan48 batman: md5 is considered breached, and i would like to see it avoided where possible :) also whats wrong with the timestamp approach used in previous versions?
12:57 good_news_everyone joined #mojo
12:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_w_elA
12:57 good_news_everyone mojo/master 49a4ffc Sebastian Riedel: handle case sensitivity consistently
12:57 good_news_everyone left #mojo
12:58 batman stephan48: https://github.com/jhthorsen/mojo​licious-plugin-assetpack/issues/2
12:58 nicomen batman: yes, althought help is more like "force" ;)
12:58 batman stephan48: okidoki. let's use sha1_sum
12:58 sri stephan48: umm, how is that relevant for batmans use?
12:58 batman nicomen: hehe
12:58 nicomen ensure
12:59 nicomen I didn't check all code, but this means that whenever you link to this assets automatically get the checksum too?
13:00 batman nicomen: i don't get the question. "link"..?
13:00 nicomen sorry my english is detoriating, been two weeks in thailand
13:00 stephan48 sri: no, but considering that sha1 is no more overhead at all, theres no sense in my eyes to keep using md5 even throu its no issue in his case and probably never will be
13:01 nicomen batman: when you want to actually use this assets from a web page, do you lookup the md5 and paste the filename yourself, or is there some url_for_asset(blah) ?
13:01 sri batman: cryptographically speaking, sha1 is considered insecure too
13:01 dotandimet joined #mojo
13:02 batman stephan48: sorry. i won't change from md5 unless there's a really, really, really good reason since i have to update all my tests and it's boring
13:02 batman sri: sweet!
13:02 batman :(
13:02 stephan48 sri: but as far as i know, the attacks on sha1 are not finalized or near as effective as md5
13:02 batman nicomen: no.
13:02 sri batman: thing is, it mostly doesn't matter, hmac-sha1 for example is still secure
13:03 batman nicomen: but i don't see the use. the asset() helper does what i want
13:03 batman sri: i really don't see how crypto security matter to me at all :)
13:03 batman s/to me/to assetpack/
13:03 sri yea, it doesn't
13:03 batman :)
13:03 ryozi joined #mojo
13:04 sri stephan48 is being silly
13:04 nicomen batman: ah I see the asset thing now, you need to update the README.md with md5 instead of timestamp ;)
13:04 sri mojolicious still uses md5 in many places! ;p
13:04 sri because it's faster than sha1 and not security relevant
13:05 batman nicomen: not until i merge the branch
13:05 nicomen hm, I thought I was in the branch
13:06 batman sri: i think the issue and my branch makes sense.
13:06 nicomen yeah, no
13:06 nicomen batman: I guess I would approve your branch ;)
13:06 * batman is confused
13:07 batman hm... i remember now why i didn't do this in the first place
13:07 batman crap
13:07 batman i didn't want a gazillion files on the file system
13:07 batman gazillion = a new file for each change
13:07 nicomen do you get more than with ts?
13:08 batman yeah, because the file on the filesystem has a static filename
13:08 nicomen and so you did with foo-<ts>.js ?
13:09 batman no. it's just a virtual filename. it did not exist on the file system.
13:09 sri why can't you clean up old files?
13:10 batman i had "foo.js"
13:10 batman guess i can. but i could also not care :)
13:10 sri i think you should
13:11 batman so i should unlink all "foo-*.js" before i write the new "foo-$md5.js" file?
13:11 nicomen do you serve the files from a different dir than the original? cause rm foo-lookslikemd5.js will remoev my nico foo-withflowers.js
13:11 nicomen nico=nice
13:12 batman no. becuase withflowers does not look like md5 :)
13:12 batman anyway. i server the files from a different dir, unless you're doing weird things.
13:13 batman *serve
13:13 sri i don't like those flowers, you should delete them
13:13 nicomen batman: but, do you really have to make a new file? as long you keep around themd5-filename for each asset to generate the urls, you can ignore what the browsers asks you about, since you would just look for the file without the md5 part
13:15 nicomen sri: @-`-,--
13:15 batman that's what i used to do.
13:15 nicomen ;)
13:16 batman but that's not what issue #2 wants.
13:17 nicomen huh, I'm not sure
13:18 batman i'm implementing what sri suggested.
13:18 sri \o/
13:20 nicomen before, you made new filename using timestamp of server startup right? In addition he says that there was a 404 if browser asks for file-<old_ts>.js. md5 solves new filename on every startup, but just serving file.js to requests to file-<lookslikem5>.js would solve his 404 issue?
13:20 nicomen (and not create temporary files and having to clean up etc.)
13:20 batman nicomen: i'm going to ignore you until you start using assetpack
13:21 batman you're asking a lot of questions which does not matter :(
13:21 nicomen ok, I'm sorry
13:22 nicomen I was just referring to the bug description of #2 and the follwoing comments, but perhaps I'm bad at explaining
13:24 batman don't be sorry. the questions aren't stupid. just not relevant to me or you :)
13:25 nicomen well they are relevant to me, as I need to serve static, preprocessed files at work
13:25 batman then the new assetpack will work
13:26 batman i still think it's stupid, but it will work
13:26 batman i will not make my nginx setup serve my static mojo files. i wouldn't mind letting it cache my static mojo files though.
13:26 nicomen but I'm a bit unsure of how we prefer to handle various versions of stylesheets and scripts
13:27 batman right. assetpack will fix that as well.
13:27 batman because of the md5 instead of timestamp
13:27 nicomen maybe we actually need to let old files around in case of bad linking from other products...
13:27 batman timestamp was really bad btw... :P
13:27 batman right. that makes sense. i will add that as an option.
13:28 nicomen or the other options is to not ignore the md5sum in the filename and just serve the asset even if someone asks for an old version
13:28 nicomen and that's what I meant with my question
13:29 batman i won't do both.
13:29 nicomen correction: or the other option is to ignore the md5sum in the filename and just serve the asset even if someone asks for an old version
13:29 batman the new version if faster for pure mojo, so i'm going for that
13:29 nicomen yeah,I'm not asking you to change anything ;)
13:30 batman but you will get both if you don't cleanup the old md5 files.
13:30 batman and you can do that with a { cleanup => 0 } option to the module, once i get the new version out
13:30 nicomen batman: so, I still believe you don't need to physically create an md5 file ;)
13:30 asarch joined #mojo
13:30 batman then both the foo.12345.js and foo.23456.js files will be available
13:30 nicomen but I can rather show with a patch, when I need to add this at work ;)
13:30 nicomen batman: yes
13:31 batman i have to create it to close issue #2
13:31 batman it = the foo-12345.js file
13:31 batman where 123... is the md5 :P
13:31 bobkare The problem with having any kind of version tag in the filename and then ignoring it is that if you then have two machines in a cluster and while you upgrade your app the upgraded node creates a link to file.newversion.ext but the load balancer in front asks for it from the old node and suddenly it's caching the old file under the new name
13:31 nicomen bobkare: ah, that's a good point against my suggestion ;)
13:32 batman bobkare: right. the new version should fix that
13:44 batman https://github.com/jhthorsen/mojoli​cious-plugin-assetpack/commit/027f8​482a4df50bbafea0f9d674499df674c60e8
13:45 batman anyone actually using this module...?
13:53 sri batman: welcome to my world ;p
13:53 batman hehehe
13:53 batman well... you know you got someone who use it ;)
13:55 marty batman:  Not sure if I am missing anything, but I use this..   https://gist.github.com/kraih/3927875
13:56 sri marty: batmans plugin is much more complete
13:56 batman marty: mine is on cpan... :)
13:57 batman marty: and it understands less and sass
13:57 marty ahhh, that's what I was mising.   lol
13:57 sri i just made that one in the hopes of inspiring someone like batman :)
13:57 batman guess it worked! :)
13:57 sri \o/
13:58 marty batman: I'll have a look at switching over as soon as i can and let you know how things go.
13:58 sri batman++
13:58 batman marty: my new version is also faster, since it doesn't require before_dispatch hook
13:58 batman marty: i don't think mine use css_compress... *checking*
13:59 batman i'm using CSS::Minifier::XS
13:59 batman not sure if you care...
13:59 batman less, sass, JavaScript::Minifier::XS and CSS::Minifier::XS
14:00 batman but you can also bundle the files to your project if you only have less available while developing.
14:00 dotandimet joined #mojo
14:00 batman the git log will look terrible, but if you're working in an environment like me, then it's quite useful :)
14:01 batman less was just an example ^^ i'm currently using sass because marcus told me to :)
14:01 marty I'm not tied to css_compress so that should not be a problem.
14:01 batman https://metacpan.org/pod/Mojoliciou​s::Plugin::AssetPack::Preprocessors # not too difficult to define your own if you don't like mine
14:01 marty wow, it is complete.   batman++
14:04 batman :)
14:21 trone joined #mojo
14:27 good_news_everyone joined #mojo
14:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/5OriKA
14:27 good_news_everyone mojo/master d83c784 Sebastian Riedel: fixed a few more multipart form handling bugs
14:27 good_news_everyone left #mojo
14:31 good_news_everyone joined #mojo
14:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7qNbOg
14:31 good_news_everyone mojo/master 1a65dea Sebastian Riedel: fixed test descriptions
14:31 good_news_everyone left #mojo
14:51 denisboyun joined #mojo
15:36 bowtie_ joined #mojo
15:56 memowe_ joined #mojo
16:03 bowtie_ joined #mojo
16:06 good_news_everyone joined #mojo
16:06 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pw6lJQ
16:06 good_news_everyone mojo/master 4385521 Sebastian Riedel: better tests for Chrome and Firefox
16:06 good_news_everyone left #mojo
16:09 btyler joined #mojo
16:33 dotandimet joined #mojo
17:04 dod joined #mojo
17:08 marty_ joined #mojo
17:16 dotandimet joined #mojo
17:18 denisboyun joined #mojo
17:34 kanishka joined #mojo
17:36 dqw110 joined #mojo
17:53 bowtie_ joined #mojo
18:10 punter Is this the best OAuth 2.0 library to use, when you have Mojolicious? https://metacpan.org/pod/M​ojolicious::Plugin::OAuth2
18:10 punter Anyone used it?
18:21 dotandimet joined #mojo
18:26 kanishka left #mojo
18:27 SmokeMac_ joined #mojo
18:31 good_news_everyone joined #mojo
18:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pProQg
18:31 good_news_everyone mojo/master 50c2748 Sebastian Riedel: improved form_for performance
18:31 good_news_everyone left #mojo
18:41 SmokeMachine joined #mojo
18:42 SmokeMa__ joined #mojo
18:44 SmokeMachine joined #mojo
18:51 SmokeMac_ joined #mojo
18:53 SmokeMachine joined #mojo
18:57 SmokeMac_ joined #mojo
19:11 basic6 joined #mojo
19:11 basiliscos joined #mojo
19:15 Mike-PerlRecruiter_ joined #mojo
19:34 damaya sri: I don't see in what way I have an attitude. I myself work on open source projects, and I'm always open to criticism. I am saying that Mojolicious is awesome (which it is), but the documentation is lacking, and what is there is extremely scattered and difficult to find.
19:34 sri damaya: which perl project has better documentation?
19:35 damaya I am going to help with a series of blog posts covering what I have learned. You shall see soon a series of tutorial blog posts about making a linux system administration webapp that covers Mojolicious, websockets, jquery, and some other stuff. At this point though I am just trying to learn it myself.
19:35 sri damaya: you keep asking if this channel is dead to make people answer you, that's not cool
19:35 bpmedley_ joined #mojo
19:36 damaya sri: Ah, sorry. It's not that I am doing that to make people answer me, it's just that when I come here nobody is ever talking, so I assumed that nobody is ever here.
19:36 sri this is one of the most active channels on the network...
19:36 damaya I've been idling here for a bit and I see that I was wrong (there was a lot of activity).
19:37 damaya sri: I really think that Mojolicious needs a book. For example, the Modern Perl book is very good, Learning Perl, Programming Perl, etc.
19:37 sri you're welcome to write one ;p
19:37 damaya sri: Mojolicious is so big and capable of so much that it really warrants a book.
19:37 damaya :)
19:37 sri i don't disagree, but we lack a proper author, i even offered to write a foreword for anyone who tries
19:38 damaya Well, I am going to be covering it a lot on my blog. I'd love to write a book, but I don't know nearly enough about Mojolicious at this point to do it.
19:40 damaya I'm not complaining really. I don't want to be a downer. I absolutely love Mojolicious and it has given me the ability to create an amazing webapp. My only frustration is with the documentation, which I understand when you're working on a project this immense (and it's still young), that documentation will be lacking.
19:40 sri perhaps your expectations need to be adjusted
19:40 damaya As I figure things out that are not in the documentation, that I think others will be interested in as well, who can I speak with or what can I do to possibly get these as examples in the documentation?
19:41 damaya haha, perhaps :)
19:41 sri really, which project has a better core documentation?
19:41 damaya Honestly though, the lack of hand holding can be nice, and it is rewarding when I figure out what I am doing on my own.
19:42 damaya Well, no project this immense has better documentation really. I guess Catalyst has a book, but I was never too interested in Catalyst myself, so I haven't explored it too much. I do see your point. I mean, Net::LDAP has good documentation, but it's scope is nothing near what you guys are doing.
19:43 damaya As Mojolicious grows, and people in the community like myself write posts about it covering what they've learned, and Google becomes more helpful, that's what will make things easier I guess.
19:44 damaya Anyway, sorry if I came off as a whining downer. I really do appreciate everything you guys are doing.
19:45 * sri wants a book too
19:46 sri we do lack people in the perl community with a desire to build a reputation for themselves atm though
19:47 damaya Maybe actually my goal now will be to learn Mojolicious inside and out, really spend some time learning it, and I'd love to contribute a book to the project.
19:48 damaya I've actually been spending 10+ hours a day just sitting here working with it (and that's not on account of the documentation, but rather because I love figuring things out with it).
19:48 sri if you have any specific topics missing from the official docs, feel free to mention them, i usually address those pretty quickly
19:48 damaya I'm going from CGI to Mojolicious. There are a lot of aspects here that are new to me.
19:49 bpmedley damaya: You will love the mojo.
19:49 bpmedley :)
19:50 damaya I'm working on an open source project similar to Puppet, Chef, etc, that will be entirely written in Mojolicious. So, I should have a pretty good understanding of this by the time I am done.
19:50 damaya bpmedley: I already love Mojolicious :D
19:53 damaya sri: I cannot find it now, but there is a part of the documentation that states it is possible to have parallel blocking requests inside an event loop. I tried to get that working (i.e., a Mojo::IOLoop nested in another Mojo::IOLoop) with no success. It'd be interesting to see how it is done, though I have found another solution to my problem already.
19:54 sri damaya: pretty sure there is nothing in the documentation stating that, because it's impossible
19:55 bpmedley http://mojolicio.us/perldoc/Mojo/UserAgent  <-- Non-blocking parallel requests (does work inside a running event loop)
19:55 bpmedley Did you mean that?
19:55 damaya sri: Here it is (maybe I am just not reading it correctly): "The event "finish" in Mojo::IOLoop::Delay can be used for code that needs to be able to work standalone as well as inside an already running event loop."
19:55 damaya And what bpmedley has referred to.
19:55 sri that's *non*-blocking
19:56 damaya Ahh, the way I am referring to is under the heading "Parallel blocking requests."
19:57 sri non-blocking is a hard topic and i'm totally aware that i fail at explaining it well to beginners, i simply have no clue how to do it properly
19:57 damaya And, actually, I was trying to figure out how to embed a non-blocking loop inside an eventsource loop.
19:57 damaya haha, it is tough. Don't worry about it (I am a beginner), the project is still young, people will figure it out for themselves and these things will soon be something you can find with a simple Google search.
19:58 damaya I guess this is really what is to be expected working with something that is still somewhat new.
19:58 sri if you find a way to explain the concepts to beginners i'll gladly steal it
19:58 damaya I have yet to figure it out, but I will continue to give it a go. I personally want to figure it out myself at this point anyway :)
19:59 sri non-blocking, and synchronizing stuff with delays is the hardest part of mojolicious for sure
20:00 nicomen damaya: not sure if this is what you mean, but in my opinion everything is very well documented isolated, but it's putting things together that is lacking. I think it's not too hard to fix that, by like you aid blog posts, book, or simply more real life examples, done in a untangled manner ;)
20:00 damaya The other thing that I think would be helpful, something I struggled with a bit at first, the layout of things. A simple overview of the folder structure, what a helper is, a plugin, how things are organized, and why one would choose a lite app over a full app.
20:00 sri nicomen: that's what a book would do, yea
20:00 d4rkie joined #mojo
20:00 damaya nicomen, actually that's the biggest thing. I can often find it in the documentation, but 90% of that is finding where to find it in the documentation :)
20:01 sri my goal for the core docs is to have one good example for every feature, just cover the basics completely
20:01 nicomen concrete example, I was unable to answer some of my padwans the other day what the big difference is between using a helper and storing something in stash
20:01 nicomen damaya: oh, I thikn the hierarchy and the style of documentation is quite nice
20:01 sri search for the documentation would be nice
20:01 sri but perl is lacking there a bit
20:01 nicomen you mean pod?
20:02 nicomen sri: I think that goal is met quite good atm
20:02 sri nicomen: yea, which is why i said earlier that damaya needs to adjust his expectations :)
20:03 bpmedley I sometimes do: "parallel blocking requests event loop site:mojolicio.us"; works well.
20:03 nicomen sri: yes, but in the long run that answer doesn't help a new person that much
20:03 sri in the long run we will hopefully have a book
20:03 nicomen but I'll try to pitch in a bit too, no point in complaining
20:04 sri would be kinda nice if metacpan had a POD search feature you could limit to a dist with a json api, then we could use it on the site :)
20:05 bpmedley sri: Have you tried the site: keyword with google?
20:05 beyondcreed joined #mojo
20:06 sri bpmedley: yea, it kinda works, but is that good enough?
20:06 bpmedley parallel blocking requests event loop site:mojolicio.us/perldoc/Mojo  v.s. parallel blocking requests event loop site:mojolicio.us/perldoc/Mojolicious
20:06 bpmedley How is it lacking?
20:06 nicomen so make a form that redirects to google?
20:06 nicomen sorry posts to google, with preset site: param?
20:07 sri you would be ok with a form that uses google in the manu bar?
20:07 bpmedley https://www.google.com/cse/  <-- Not sure, this may be helpful
20:08 nicomen temporarily yes, if duckduckgo has this feature that would be even more awesomer ;)
20:09 bpmedley http://www.w3schools.com/ <-- See the search in the upper right?
20:11 d4rkie joined #mojo
20:13 sri omg, those google help pages make my head spin
20:14 bpmedley They need a book.. ;)
20:15 mire joined #mojo
20:15 sri hmm, i wonder if there are classes in mojolicious that are not reachable by the crawler
20:16 bpmedley Perhaps a sitemap?
20:16 sri guess it's all interlinked pretty well
20:16 sri how do you make a sitemap for a dist?
20:17 sri if you say manually i'm gonna punch you ;p
20:21 dotandimet joined #mojo
20:22 bobkare For ddg there's https://duckduckgo.com/search_box
20:24 bpmedley https://gist.github.com/brianmed/7174104
20:37 sri ddg results are not as good
20:37 * sri just tried both
20:37 sri i'm having trouble styling the google search box though
20:38 bpmedley I've never done that.  I'm short on time at the moment.
20:39 sri well, if anyone is able to make a pretty search box... here's the source https://github.com/kraih/mojo/blob/master/​lib/Mojolicious/templates/mojobar.html.ep
20:40 sri you can test it with a oneliner perl -Ilib -Mojo -E 'plugin "PODRenderer"; a->start' daemon
20:40 sri the id i signed up with for google custom search is 014527573091551588235:pwfplkjpgbi
20:43 damaya I have a quick question. In a full app I am trying to take something that is currently a daemon updating a database every minute. I am trying to implement that into my app. I don't want them to be helpers, because they need to run constantly. Where would you put IOLoops like this? No router, no helper, I don't think it'd be a plugin...
20:44 damaya It's only connection to the webapp is through an EventSource.
20:57 SmokeMachine joined #mojo
20:58 SmokeMa__ joined #mojo
21:03 punter joined #mojo
21:05 punter Whenever my Morbo site wants to display an error, the fancy error page makes the browser try to load "/mojo/<stuff>.png|js|whatever"
21:05 punter But my site isn't configured to show anything at /mojo/*
21:06 punter What should I point that directory to, exactly?
21:07 punter I think I found it: directory "public/" in the Mojolicious installation
21:08 nicomen damaya: https://github.com/kraih/mojo/commit/7b​d3d3163535dd0eafad73fc0cd0ed87275fdb0f -ish?
21:11 punter I believe in my older installation of Mojolicious, the styles and images in the error pages would appear automatically, without me having to create a new route in nginx - what am I doing wrong this time?
21:43 sri best i can do :S http://i.imgur.com/8iz2v74.png
21:44 sri the search box really doesn't want to be embedded in a menu
21:45 sri search results don't look too bad though http://i.imgur.com/LDMU87J.png
21:46 tba_ joined #mojo
21:52 punter How can I make $c->url_for->to_abs->to_string return the real host of my Morbo website, instead of localhost:8080 (which is reverse proxied) ?
21:53 punter I'd like to define the "real host" in some configuration file somewhere
21:54 nicomen punter: yes, you need to do that
21:54 punter nicomen: Where?
21:54 nicomen I think I have overriden the url_for helper to do that
21:54 nicomen punter: ah sorry, your own config file ;)
21:55 nicomen but maybe you can set the hostname that the Mojo::Url uses for the app as a whole somewhere
21:55 punter So do I need to override the url_for helper?
21:56 punter nicomen: I'd like to set the hostname somewhere, yes. And I do have a file to store information, I guess I could put it there. But who's going to read it?
21:57 punter nicomen: Do I need to override the url_for helper?
21:58 nicomen well, that is one way, if you use that
21:58 punter I'd rather not, it sounds like a big job to do
21:58 punter What other way is there?
22:00 punter base
22:00 punter ok
22:00 punter no, won't do
22:00 sri meh, everybody cares about search until there is actual work to be done
22:01 nicomen punter: I think maybe mojo has built-in to look for X-Forwarded-For headers
22:01 punter I see: I was setting X-Forwarded-Host all this time. Was I wrong?
22:02 nicomen punter: check this
22:02 nicomen https://github.com/kraih/mojo/wi​ki/Apache-deployment#wiki-___top
22:02 punter a thanks
22:02 nicomen here
22:02 nicomen https://github.com/kraih/mojo/wiki/Ap​ache-deployment#apachemod_proxy-path
22:03 punter you are right, thanks
22:03 nicomen just set host instead of path I guess
22:04 nicomen ah sorry, see, I'm tired
22:04 nicomen host should be taken care of
22:04 nicomen but if you need a different path, then that docs explain how to
22:05 punter There's an env variable also: MOJO_REVERSE_PROXY that I need to set to 1
22:05 nicomen right right
22:06 punter let's see now
22:07 punter failure. i'll keep trying, though, thanks nicomen
22:08 Bender joined #mojo
22:14 lizzin joined #mojo
22:18 nicomen punter: good luck, please share the good news when working ;)
22:21 punter nicomen: Works
22:21 punter nicomen: It was the plain old Host: header that was missing
22:21 punter I wasn't forwarding that at all, thought it was useless
22:22 punter But it's what mattered
22:22 punter X-Forwarded-Host was irrelevent. I guess the Mojolicious documentation was wrong
22:22 punter or maybe both are needed
22:22 nicomen hm, that sounds weird
22:22 punter let me check
22:23 nicomen Host is what the browser sets, but a reverse proxy will access your web app using your internal Host:
22:23 nicomen that's why you need an X-Forwarded-Host to set the original Host:
22:24 nicomen but need to go, 12 hour flight ahead from Bangkok to Oslo ;)
22:24 nicomen bbl
22:24 punter ok bye
22:25 punter sri: I think the documentation here is wrong: https://github.com/kraih/mojo/wiki/Ap​ache-deployment#apachemod_proxy-path
22:25 punter "If X-Forwarded-Host exists, url_for and redirect_to method can write absolute URL right. "
22:25 sri punter: that's not documentation, that's a wiki
22:26 punter Ok, you're right
22:26 sri you're as responsible for it as everyone else
22:26 punter Ok. But I won't touch it because I don't know Mojoliicous well-enough yet
22:27 punter but point taken
22:27 damaya joined #mojo
22:28 trone joined #mojo
22:29 damaya Sorry about that, got disconnected. Basically what I am trying to do is have a Mojo::IOLoop running that checks a database every 30 seconds and on changes it does a $self->write... However, I have one route '/event' and many different events that can happen, so I'd like multiple IOloops running constantly just emitting events as they occur.
22:30 punter The proper documentation is right - it says we should set Host:
22:35 damaya In the HTML I subscribe to route '/events' and then in my app I have multiple loops running that emit said events.
22:49 KindTwo joined #mojo
22:55 damaya I know about hooks, helpers, and plugins, but not entirely sure where the IOLoops that need to run constantly would go.
23:41 KindTwo joined #mojo
23:46 asarch joined #mojo
23:52 russum left #mojo
23:55 SmokeMachine joined #mojo
23:59 good_news_everyone joined #mojo
23:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/U269xQ
23:59 good_news_everyone mojo/master 24af3a5 Sebastian Riedel: improved built-in templates with documentation search
23:59 good_news_everyone left #mojo

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