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

IRC log for #mojo, 2014-01-18

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

All times shown according to UTC.

Time Nick Message
00:00 sivoais jberger: there's several references to it here <http://tex.stackexchange.com/questions/1551/use-latex-to-produce-epub>
00:00 sivoais I'll see if I can find the e-mail I saw on their ML
00:00 jberger cool, thanks
00:03 sivoais jberger: here's more info <http://www.maths-informatique-jeux.com/blog/frederic/?post/2013/11/07/Gecko-based-EPUB-Readers-and-LaTeXML> via <http://lists.jacobs-university.de/pipermail/project-latexml/2013-November/001555.html>
00:04 tempire_ dernit
00:05 tempire_ I wasn't finished.
00:05 tempire_ But ironman picked it up anyway.
00:05 tempire_ I guess it's released then
00:05 jberger sivoais, this seems to be the actual project: https://github.com/michal-h21/tex4ebook
00:07 * jberger finds tempire's early released post, via tempire's ironman relay: perlr.com
00:07 sivoais jberger: that uses another TeX processor called tex4ht which is also pretty good. I've used that to take notes in ikiwiki before
00:11 jberger sivoais, oh ok, I see that now
00:13 sivoais and just a heads up on TeX4ht... it works by running (La)TeX to generate a special DVI. Plus: you can define your own commands and use various packages. Minus: it's really slow to build a large document.
00:13 jberger also if its using dvi then you have to use eps pictures right?
00:13 jberger :-/
00:14 sivoais you can pass through HTML. iirc, I used PNGs
00:14 sivoais I don't know about TiKZ though
00:15 jberger tempire_++
00:15 jberger in the vein of my (stalled) series on non-blocking (I was waiting to be happy with Mojo::IOLoop::ForkCall)
00:18 ka2u joined #mojo
00:18 jberger the more mojo non-blocking posts the better!
00:18 jberger I keep trying to make the case to my fellow perlers that the true competition for Mojo is node, not Dancer
00:20 * jberger wonders who WANTS to program in javascript, really!!
00:21 tempire_ If you haven't made the jump to non-blocking, it's hard to understand.
00:21 tempire_ That's the main reasoning behind my post, not necessarily technical details.
00:21 sri https://twitter.com/horse_js/status/423520668429205504
00:28 jberger https://drive.google.com/file/d/0B-gBN2ue1FmVaDFjbWhvbWxONWs/edit?usp=sharing
00:29 jberger I watched the "Javascript: the good parts" talk, and cringed as he went throw the contortions to get private variables, etc, and then said "all of this is worth it for the closures"
00:29 jberger AAARGH Perl has had that since ...
00:29 * jberger finds perl5 release date
00:30 jberger 1994
00:31 sri and it doesn't matter, because browsers
00:31 jberger I know
00:39 jberger can someone confirm, did the drive link work?
00:39 jberger I
00:39 jberger I've never tried that before
00:41 jberger sivoais, btw, TikZ works in dvi
00:42 jberger hmmmm, pdf links don't seem to show in drive
00:42 marty joined #mojo
00:43 jberger the table of contents is all linked in a real viewer
00:44 tempire_ ok, I think that will do for graphic support.
00:44 sivoais oh, I meant if TiKZ worked in TeX4ht. PNG does.
00:44 tempire_ and a comment!
00:44 purl i heard a comment was free, but domains aren't
00:44 tempire_ woo
00:46 jberger from david, blast I've shown him non-blocking several times, (he never listens to me)
00:46 sri as a european, this is how the obama speech looked to me ;p https://pbs.twimg.com/media/BeOFFGbCYAAkXXV.jpg:large
00:46 tempire_ that's the trouble, understanding why it matters
00:46 tempire_ http://mediad.publicbroadcasting.net/p/wjct/files/styles/card_280/public/201304/sucess%20kid%20twitter.jpeg
00:46 sri 'MURICA
00:46 jberger sri, yeah, it gets pretty bad
00:47 tempire_ pshaw
00:47 tempire_ how many stars does your flag have.
00:47 jberger there are whole debates on wearing flag pins or whatever
00:47 tempire_ I'll tell you how many.
00:47 tempire_ NONE
00:47 jberger hahaha
00:47 jberger 50!
00:47 purl 3.04140932017134e+64
00:47 jberger hahahahah
00:47 purl LOLCON 4.5 reached.
00:47 sri none :,(
00:48 jberger I still think the reason that puerto rico is not a state is that no one wants to try to squeeze a 51st star on there
00:48 tempire_ seriously
00:48 purl is that for real?
00:48 tempire_ The whole design would have to change.
00:48 tempire_ No one wants that.
00:48 tempire_ God doesn't like puerto rico anyway
00:49 jberger hehe
00:49 jberger they changed it in the 50s after Alaska and Hawaii
00:49 tempire_ puerto rico probably doesn't want to be a state.
00:49 tempire_ I don't know what benefits they get from the deal, but they don't pay taxes.
00:49 tempire_ seems like a win.
00:50 jberger I just saw a special, they are at about 50% approval for statehood now
00:50 tempire_ ok, enough about the US
00:50 tempire_ let's talk about another country.
00:50 jberger right
00:50 tempire_ latvia?
00:50 purl latvia is .LV
00:50 sri the state i live in has a horse though! http://equinelaw.alisonrowe.com/uploads/image/Niedersachsen%20Flag.jpg
00:50 tempire_ whoa.
00:50 tempire_ when did that change?
00:50 jberger that is a good flag
00:51 jberger good *looking* flag
00:51 * jberger steps out for a bit
00:52 sri http://en.wikipedia.org/wiki/Lower_Saxony
00:53 sri welcome to geography 101!
00:54 tempire_ Hmm.
00:54 * tempire_ approves of Lower Saxony
01:01 cl left #mojo
01:03 DaniBunny joined #mojo
01:17 bpmedley joined #mojo
02:03 ka2u joined #mojo
02:38 dvinciguerra joined #mojo
02:39 klapperl joined #mojo
03:01 D4RK-PH0ENiX joined #mojo
03:03 btyler joined #mojo
03:04 ka2u joined #mojo
03:23 russum joined #mojo
03:24 D4RK-PH0ENiX joined #mojo
03:41 d4rkie_ joined #mojo
04:10 preflex_ joined #mojo
04:17 ka2u joined #mojo
04:46 irq joined #mojo
04:57 rem_lex|pivo joined #mojo
06:20 D4RK-PH0ENiX joined #mojo
06:30 Vandal joined #mojo
06:45 mire__ joined #mojo
06:48 good_news_everyone joined #mojo
06:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pszhJQ
06:48 good_news_everyone mojo/master 4154f72 Sebastian Riedel: improved request_ok method in Test::Mojo to handle WebSocket handshakes
06:48 good_news_everyone left #mojo
06:57 good_news_everyone joined #mojo
06:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/m3-skw
06:57 good_news_everyone mojo/master 59e5287 Sebastian Riedel: more tests for Mojo::UserAgent
06:57 good_news_everyone left #mojo
07:10 good_news_everyone joined #mojo
07:10 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sT8e_g
07:10 good_news_everyone mojo/master 932b965 Sebastian Riedel: preserve original test target
07:10 good_news_everyone left #mojo
07:28 good_news_everyone joined #mojo
07:28 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/uc37-Q
07:28 good_news_everyone mojo/master 5a17b76 Sebastian Riedel: requests do not have to be performed against the application
07:28 good_news_everyone left #mojo
08:25 cl joined #mojo
09:25 irq_ joined #mojo
09:30 dod joined #mojo
10:34 dvinciguerra joined #mojo
10:34 trone joined #mojo
10:51 dsteinbrunner joined #mojo
10:52 hummeleBop joined #mojo
10:57 odc joined #mojo
11:27 TitanOfOld joined #mojo
11:27 TitanOfO1d joined #mojo
11:37 dod joined #mojo
11:42 hesperaux joined #mojo
11:47 dod joined #mojo
12:01 amirite joined #mojo
12:22 irq joined #mojo
12:25 dsteinbrunner joined #mojo
12:35 Lucas11 joined #mojo
13:03 denisboyun joined #mojo
14:22 sh4 joined #mojo
14:25 cl left #mojo
15:14 amirite_ joined #mojo
15:16 marty joined #mojo
15:18 asarch joined #mojo
15:34 stl joined #mojo
15:36 laouji joined #mojo
15:41 D4RK-PH0ENiX joined #mojo
15:43 meshl joined #mojo
15:45 rem_lex joined #mojo
15:59 D4RK-PH0ENiX joined #mojo
16:08 yko joined #mojo
16:09 yko hey mojo people
16:16 good_news_everyone joined #mojo
16:16 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/W5H_EQ
16:16 good_news_everyone mojo/master d0ead41 Sebastian Riedel: show diagnostics for failed WebSocket handshakes
16:16 good_news_everyone left #mojo
16:22 nicomen hi
16:22 purl bonjour, nicomen.
16:24 good_news_everyone joined #mojo
16:24 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7uak4g
16:24 good_news_everyone mojo/master c4d59a6 Sebastian Riedel: WebSocket handshake test needs to be a little more strict
16:24 good_news_everyone left #mojo
16:25 basiliscos joined #mojo
16:31 good_news_everyone joined #mojo
16:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/6AKt-w
16:31 good_news_everyone mojo/master c71e687 Sebastian Riedel: mention that blocking operations require more worker processes than non-blocking operations
16:31 good_news_everyone left #mojo
16:37 marty yko!!!!!
16:37 marty welcome back dude
16:38 * marty pushes yko into the alligator pit for being gone so long
16:38 * yko closes the gate
16:38 yko bwahaha! now you can't get me
16:39 * yko lives in Amsterdam now. puff
16:39 marty wow,  that is quite a move.  How do you like it?
16:40 yko it's small.
16:41 marty small =~ less alligators.  Maybe safer :P
16:41 yko lots of good things, some bad/neutral. as usually. I think it was a good move
16:42 yko it was extremely hard to be in a ro mode for two months though
16:44 marty yep.  the speed that things move around here, two months is like f.o.r.e.v.e.r
16:44 marty good to see you back.  \o/
16:44 yko yep, thanks.
16:45 * yko is enjoying IOLoop->delay thing. kudos to whoever made it happen
16:46 jberger o/
16:46 marty \o
16:47 yko jberger++ # that is awesome
16:47 jberger ?
16:47 yko and finally I have a good use case to it
16:47 yko I thought you mean you're an author
16:47 jberger I didn't make it happen, I was just waving
16:47 yko jberger-- # lol
16:47 jberger I do like delays tho, and I blog about them
16:47 jberger :-)
16:48 * marty goes to read jbergers' blog
16:48 * yko is creating some porn animation using ->delay
16:48 jberger yko :o
16:49 yko data "porn". it's just so thrilling, I can't say its sexy
16:49 jberger back to last night's discussion about LaTeX, this is why it's handy: \providecommand{\cpan}[1]{\href{http://metacpan.org/module/#1}{{\tt #1}}}
16:49 * marty is only interested in porn that has green chicks
16:49 jberger then \cpan{Plack::Middleware}
16:49 good_news_everyone joined #mojo
16:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9EPHWg
16:49 good_news_everyone mojo/master acc842e Sebastian Riedel: mention another performance tuning trick
16:49 good_news_everyone left #mojo
16:51 jberger prints Plack::Middleware, in teletype font, with an embedded link to the metacpan page
17:15 dod1 joined #mojo
17:15 dod1 joined #mojo
17:16 amirite joined #mojo
18:44 stephan48 is there a simple way to do something like Moose Roles with Mojo::Base(especially isa "role)? i got a application which supports the creation of "providers" which can provide one or multiple functions, f.e. a tinyurl or a pastebin and i want to check if a provider implementation supports a certain function set(2-3 methods are required per function) so i can autodetect them. or would it be more sensible to use has to check for the methods required ...
18:44 stephan48 ... by a function?
18:48 ncls joined #mojo
18:53 ncls hello
18:54 ncls if I use the Mojo::UserAgent to connect to a minified url, will I be able to get the full url after the redirection ?
19:03 good_news_everyone joined #mojo
19:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jlUToQ
19:03 good_news_everyone mojo/master 80589f8 Sebastian Riedel: more documentation tweaks
19:03 good_news_everyone left #mojo
19:05 ncls auto response : yes
19:07 mst the docs suggest that each redirect will be a separate transaction
19:07 mst so the final returned $tx's ->req should contain the full URL
19:08 mst ncls: give it a go and find out :)
19:09 ncls yes that's what I found out
19:10 ncls looks like res->headers->location should do the trick !
19:10 ncls thanks
19:12 ncls I'm making a Twitter Streaming API client and want to track interesting urls about given subjects, but I didn't want to store the minified urls
19:13 mst the location header is potentially a subtly different thing
19:13 mst hence why I said req
19:14 mst but, sure, if you don't actually want the 'full url after redirection' but instead something different, please do ask Mojo for the something different
19:14 mst just remember it's easier for me to help you if you ask your real question first :)
19:14 gryphon joined #mojo
19:15 ncls well, my first question was quite near what I meant
19:17 good_news_everyone joined #mojo
19:17 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/zr4EJA
19:17 good_news_everyone mojo/master 9c0ca75 Sebastian Riedel: more consistent descriptions
19:17 good_news_everyone left #mojo
19:19 jberger I'm starting out with a quick note about Mojolicious::Lite not being magical, since that seems to be the most common question here
19:19 ncls how the location will be different than the url ?
19:19 ncls mst
19:19 jberger 'I do X in a lite app, how do I do it in the full'
19:20 jberger ncls, why rely on the header, when the transaction knows the request url?
19:21 ncls because I want to get the real URL of a webpage when I only had a minified URL from twitter
19:21 ncls oh no !
19:21 ncls the tweet does have this information !
19:22 mst ncls: yes! I KNOW
19:23 ncls url objects have three elements : url (minified), display_url (full) and expanded url ..
19:23 mst ncls: and that real URL would be in the request
19:23 mst ncls: so why are you looking in the location?
19:23 ncls mst: haha ok didn't get that
19:23 mst no, not the part about the tweet
19:23 mst the part about you not listening to the words
19:23 mst let me try again
19:23 mst if you request a minified URL
19:24 good_news_everyone joined #mojo
19:24 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/kFHUlw
19:24 good_news_everyone mojo/master f00a449 Sebastian Riedel: fixed Morbo example
19:24 good_news_everyone left #mojo
19:24 mst that will *redirect* to the real URL
19:24 mst as such, the *final* transaction, the $tx returned
19:24 mst will be the transaction for the request to the real URL
19:24 mst as such, the final $tx->req will have the real URL
19:24 mst so "because I want to get the real URL of a webpage" makes no sense
19:25 mst ncls: please answer jberger's question: why did you use the location header when you wanted the request URL? we don't understand.
19:25 btyler joined #mojo
19:26 mst or did you just ignore the part about redirects?
19:26 ncls well, I get a tweet and a minified url (the display_url might also be a minified one, copy-pasted for example). So I take the url, and I do "warn Dumper $ua->get($minified_url)"
19:27 mst yes, and?
19:27 ncls and I don't get any "full" URL but it the response object
19:28 ncls I will try with another one
19:28 mst wait
19:28 mst ncls: did you call max_redirects anywhere?
19:28 ncls no
19:28 mst right, so Mojo::UserAgent is currently configured to -not- follow redirects
19:29 ncls oh okay
19:29 mst so, yes, if you're not actually fetching the real URL, the location header makes sense
19:29 mst I'm sorry, remember my advice was 'from the documentation'
19:29 mst the idea was that you'd actually read the documentation and think
19:29 mst then write code
19:29 mst you'll find that in general that works better than just using Dumper() and guessing
19:30 ncls mst: well .. okay
19:30 jberger mojo eval -v 'app->ua->max_redirects(10)->get("http://t.co/oGQ3nC9HZA")->req->url'
19:30 jberger :D
19:30 mst jberger: yes, but you actually RTFMed
19:30 mst jberger: apparently that's cheating :)
19:31 mst I read the full docs to Mojo::UserAgent, Mojo::Transaction::HTTP and Mojo::Transaction first
19:31 mst made it all make perfect sense
19:31 ncls mst: I didn't mean that, I already used Mojo::UserAgent in the past, didn't know about this option
19:32 ncls you might be right about this, but you know something you just want to try by yourself and test stuff
19:32 ncls anyway, thank you for the help
19:33 jberger ncls, go forth and be Perly :-D
19:33 ncls jberger: how so ? by reading the fucking manual ?
19:34 jberger Mojolicious does have excellent documentation
19:34 jberger the guides are aimed at web development, but there is a cookbook section on the useragent
19:35 jberger ncls: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#USER_AGENT
19:35 ncls okay thanks
19:35 jberger lots of examples in the class synopsis too: http://mojolicio.us/perldoc/Mojo/UserAgent#SYNOPSIS
19:36 jberger np
19:36 ncls it's not *always* excellent however, I often got stuck with it
19:37 ncls joined #mojo
19:37 ncls joined #mojo
19:37 ncls Have I been kicked ?
19:38 jberger mst: ?
19:38 jberger ncls, its structure takes a little getting used to perhaps
19:38 mst ncls: you quit, twice.
19:39 ncls damn
19:39 mst that was definitely your client though
19:39 mst nothing happened from the server side
19:39 jberger ncls, you are intended to read the documentation in the order described here: http://mojolicio.us/perldoc
19:39 mst ncls: generally, before using a module I skim-read the docs, and possibly the source
19:39 jberger class documentation is a reference only
19:40 ncls mst: okay thanks ... using Thunderbird as IRC client is not the best option
19:40 mst in the case of mojo I can usually guess what the source looks like, because I've been reading sri's code for eight years plus now
19:40 ncls mst: yeah, I know, but sometimes you just want to get some code running in minutes
19:40 mst that's why I said skim-read
19:40 mst on average, doing it that way is faster than blindly experimenting
19:40 ncls I did look at the docs actually
19:41 mst and the Mojo::UserAgent SYNOPSIS has a redirect based example
19:41 ncls but didn't get the max_redirects meaning
19:41 dsteinbrunner joined #mojo
19:41 mst $ua->max_redirects(5)->get('latest.mojolicio.us') seemed pretty obvious to me
19:42 jberger mst: many people don't get the chainable-setters right away
19:42 ncls okay, good for you, just never dealed with redirections before
19:42 * jberger adds that to the list for the book
19:42 mst you've ... ah!
19:42 mst ncls: most people in here are newbies to Mojo but not to HTTP
19:42 mst that explains the confusion
19:43 ncls mst: you know your advices were really nice before you get sarcastic
19:44 ncls joined #mojo
19:44 mst the sarcasm level is inversely proportional to the amount of actually reading the docs you did
19:44 ncls okay, got it
19:45 mst I'm not always nice but I -am- fairly consistent :)
19:49 ncls joined #mojo
19:50 zivester joined #mojo
19:58 jberger its useful to think of mst as this guy: http://www.youtube.com/watch?feature=player_detailpage&amp;v=Qze6a7gydeg#t=41 and not just some characters in a chat
20:15 ncls the long hair guy ?
20:24 zivester joined #mojo
20:54 zivester joined #mojo
20:58 jberger ncls, yes
20:58 jberger hilarious
20:59 jberger (the talk, not the hair)
21:06 mst oh, I don't know ...
21:07 ncls haha, ok
21:08 ncls mst: where are you from ?
21:08 mst north west england.
21:08 ncls england england or england scotland ?
21:09 moritz I don't know a single scotsman who'd refer to himself as being from "north west england" :-)
21:09 mst I am a resident of the United Kingdom of Great Britain and Northern Ireland
21:09 moritz because, you know, Scotland is *not* England
21:09 mst Great Britain consists of Scotland, England, Wales, and some pissant little islands
21:09 mst they are disjoint
21:09 mst there is no part of scotland that can be described as england
21:10 mst so 'england scotland' is (a) impossible (b) a good way to make scots people really angry
21:10 mst I, however, am from north west england, as I said
21:10 mst so I'll be the one laughing while the scottish guy tries to kill you
21:10 ncls I know, just was testing without reading the docs
21:10 zivester joined #mojo
21:11 * mst laughs
22:05 zivester joined #mojo
22:37 mire__ joined #mojo
22:41 amirite joined #mojo
23:03 mire__ joined #mojo
23:12 btyler joined #mojo
23:19 KindOne joined #mojo
23:47 bpmedley https://gist.github.com/brianmed/8498402  <-- What's the proper way to do an exception (line 22)?
23:53 jberger bpmedley, you are attempting to propose that j die on error?
23:53 jberger if so, this gets brought up rather regularly
23:54 jberger after much debate the answer always is, "if you want it to die, you should be using the full object"
23:54 gryphon joined #mojo
23:55 jberger sri: I feel the BDFL issue too (as you might recall, I've said so before)
23:57 sri https://github.com/kraih/mojo/issues/568
23:58 sri jberger: having trouble getting my point across though... can't seem to find the right words...

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