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

IRC log for #mojo, 2014-03-01

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

All times shown according to UTC.

Time Nick Message
00:29 marty joined #mojo
00:30 sri i've fixed the snippets in the atom-mojo package btw... so all of my 5 users can update now ;p
00:31 Akron No push updates via chrome-updates for plugins? ;)
00:32 Akron That would be nice - I just have to follow the plugin on GitHub and whenever it's tagged It is pushed to me.
00:32 sri don't think so, just a notification to hit the update button
00:33 Akron Hm, well. Good enough.
00:35 Akron Was just informed that I will give a talk on Mojolicious Plugins at te German Perl Workshop. Surprisingly it seems to be the only Mojo talk in march.
00:35 sri \o/
00:35 Akron I am happy for any suggestions - it was a late submission so I have to hurry! :)
00:36 sri maybe show assetpack, that stuff is not very common in the perl world
00:38 sri or simple things like multiple renderers cooperating, also not common
00:39 sri assets bundled with plugins
00:39 Akron I wanted to make it more tutorial style. I never attended GPW, but there seems to be a focus on these kind of talks. So introducing Helper, Validator checks, Hooks, Shortcuts and Commands to create a simple plugin. But showcasing some nice existing plugins is a good idea. I also wanted to show some figures regarding the growing of the mojo ecosphere on cpan ...
00:39 Akron Ah - multiple renders is great! Yeah!
00:40 sri ah, then i won't even start with the non-blocking ideas :)
00:40 Akron No - I always sruggle explaining it. ;)
00:40 Akron And I'm doing it wrong myself all the time!
00:41 Akron ;)
00:41 sri an explanation of this one should fill a talk https://gist.github.com/kraih/6082061
00:42 Akron However - mentioning these concepts is mandatory.
00:43 Akron And it would heavily depend on the daytime of the talk.
00:43 Akron "... and watch out for futures and promises and ... now enjoy your breakfast!"
00:44 Akron Naaa ...
00:44 sri Naaa ...
00:46 d4rkie joined #mojo
00:55 aggrolite joined #mojo
01:06 d4rkie joined #mojo
01:11 bpmedley http://liveperl.us/tutorials <-- Can I get some feedback on the expanded Tutorials?  Basically all of them except "Hello World" were modified.
01:13 bpmedley Akron: You can use my code to make some live demos: https://github.com/brianmed/liveperl.us
01:19 Akron bpmedley++ That's a brillant idea!
01:19 webart sri: converting from xml->json is silly but I want to do things with the data using javascript (d3 three raphael etc) with those js libs json as a data source generally works better
01:20 bpmedley Akron: You might even be able to use the website itself, dunno.
01:21 webart perl does a decent job converting with a one liner (stolen from a blogs.perl.org somewhere):
01:21 webart perl -MJSON::Any -MXML::Simple -E'say JSON::Any->new()->objToJson(XMLin("some.xml"))'
01:21 webart heh
01:23 bpmedley The rapid visual feedback that morbo, auto saving, and auto refreshing provides with bootstrap is pretty cool.
01:23 malicious dernit
01:23 webart there's even a hint re: mojo  at the bottom of the page: http://blogs.perl.org/users/jhannah_mutation_grid/2010/09/one-liner-xmlperljson.html
01:23 malicious Net::XMPP is blocking
01:23 malicious ARG
01:24 bpmedley malicious: What are you trying to do?
01:24 malicious use non-blocking requests
01:24 bpmedley https://metacpan.org/pod/Mojo::IOLoop::ForkCall  <-- This may help
01:24 malicious but Net::XMPP ->Process blocks
01:24 malicious fork is the devil
01:25 malicious But I might try it
01:26 jack joined #mojo
01:28 GabrielV_ joined #mojo
01:31 malicious huh
01:31 malicious works like a charm
01:31 malicious jberger++
01:32 Akron bpmedley: I think the problem would be showing how to write plugins in separated files. As plugins aren't supported in-file (using package XY ... package main ...) I may have to hack on your code for a presentation.
01:33 bpmedley I see.  I'm hoping to add file uploads and whatnot; however, that's a few weekends away - probably.
01:34 bpmedley Akron: Did you try any of the tutorials besides Hello World?
01:34 Akron But showing liveperl.us and using parts for a demo is a great idea.
01:34 malikai heh.. sri, interested to hear how the vim module is
01:35 bpmedley If app supported file uploads would you need anything else?
01:35 malikai that would be the "taste" that gets me hooked
01:36 malikai (or at least bridge for me to cross)
01:36 Akron bpmeadley: I'm now going through all tutorials.
01:36 bpmedley Sweet, thanks.  Did you try editing the bootstrap html to get rapid feedback from the reloading iframe?
01:37 Akron bpmedley: Don't know ... well - I would like to show cmmands - so please give us a shell! :-P
01:38 bpmedley Hrmm.  I'm not sure exactly how to do that with docker, although it's not out the realm of possibility.
01:40 Akron bpmedley: Update takes quite a while here - but my internet connection is quite busy currently.
01:40 bpmedley Understood.  How long is quite a while?
01:41 marty joined #mojo
01:41 malicious oh dear
01:42 malicious jberger: Magic number checking on storable string failed at /.../Storable.pm line 417, at /.../Mojo/IOLoop/ForkCall.pm line 72.
01:43 Akron bpmdley: ~6s. Not bad.
01:43 Akron But maybe Bootstrap is a bit verbose for the tutorials ... don't know.
01:44 bpmedley Akron: Hrmm.  Could be - I need something to keep a user's interest.
01:44 Akron Yeah - I agree.
01:46 Akron To make thinks less verbose you could create a heavy-bootstrap layout - and just do the interesting stuff in the main template.
01:46 bpmedley Ahh, I see what you mean by verbose.  Yes; I need to focus the user's attention on what is changing.  Templates would help with that.
01:46 bpmedley Or, layouts rather.
01:50 sri bpmedley: the html makes me go all TLDR
01:51 bpmedley Ok, thanks for the feedback.  I need to use Layouts, I think.
01:53 Akron And I think without bootstrap at all you could show more interesting things in your code.
01:54 bpmedley Before, there was no bootstrap and everything was barren and dull.  Now, it's too verbose.. gaw.
01:55 Akron ;) Using a sensible global layout should be fine.
01:56 * Akron doesn't like bootstrap anymore ... to be honest.
01:56 bpmedley What would you suggest?
01:57 Akron Plain html and a global decent styling.
01:57 bpmedley I'm still learning styling.
01:58 Akron Oh - and is the description of the placeholder tutorial correct? param shouldn't be able to access path placeholders as far as I remember ...
02:02 ka2u joined #mojo
02:03 Akron And I think some parts in the tutorials are non-necessarily redundant, like the $project_name pattern.
02:03 bpmedley I agree on that point.
02:04 Akron The session example is nice and on the point.
02:06 Akron The under example as well.
02:09 bpmedley Akron: How is the Stash and templates tutorial now?
02:10 skullbocks joined #mojo
02:10 Akron In the websockets example there may be a more interesting response processing - like making everything capital or leetspeeching it using tr///. ;)
02:10 bpmedley Good idea!
02:11 bpmedley http://liveperl.us/tutorial/stash <-- is the example small enough to read?
02:13 Akron Better! You could ignore the indenting and possibly store more in another template using "include", but it's definately better to understand now.
02:14 bpmedley I wanted to show the difference between manual <h4> and programmatic.
02:14 Akron The description could be more MVC style - the stash is a pretty complex concept, so sri wouldn't agree that it is used to pass data to templates I guess. ;)
02:14 bpmedley I believe I copied 'n pasted the description from the mojolicious::lite perldoc.
02:14 Akron Why is the difference important?
02:15 Akron Really?
02:15 Akron Oh ... okay - then forget what I said! ;)
02:16 bpmedley I dunno why the difference is important.  I'm trying to put myself in the shoes of someone that knows HTML and another programming languag, or a total newbie.
02:17 sri Akron: yea, i wrote that sentence originally :p
02:18 Akron sri: And you agree with yourself? ;)
02:18 malikai if you don't agree with yourself, who can you agree with?
02:18 Akron If you are married, the answer is simple ..
02:19 malikai :nobody
02:20 Akron bpmedley: Maybe you are right and it matters.
02:20 bpmedley We're probably both wrong.. :P
02:22 Akron :)
02:22 Akron Anyway - that's a damn cool thing! Thanks for your effort you are putting into this! bpmedley++
02:23 bpmedley You're welcome.  Thanks for perusing: Akron++.
02:23 Akron You're welcome! Any non-robot germans now have to go to bed ... so ... bye everyone!
02:25 webart for a "DOM walker" mojo does a fantastic job ... I don't even need XML::XPath and the like ....
02:30 skullbocks joined #mojo
02:30 sri webart: i doubt xml to json transformation will ever be considered a valid use case for mojolicious
02:31 webart mojo get http://localhost/transactions-by-month.xml 'transaction value' |  perl -MJSON::Any -MXML::Simple -E'say JSON::Any->objToJson(XMLin("-"))' almost works :)
02:31 webart sri: agreed but ... just proves how deeply good mojo is
02:31 jack joined #mojo
02:42 webart sri: like a sewing awl on a swiss army knife ... not the main reason to have a SAK but works when you need it  ;-)  cheers
02:45 sk joined #mojo
02:46 klapperl joined #mojo
02:54 bpmedley All bootstrap tutorials updated with Layouts.
02:54 webart (btw for it to replace other munging scripts I have the only thing missing from the mojo commandline "client"  is a -w --wrap switch)
02:56 webart (that way  something like mojo get -w localsection http://localhost/file.xml 'catalogitem'
02:56 webart would spit out <localsection><catalogitem>Swiss Army Knife</catalog></localsection>
02:56 webart but I see your point ;-)
03:04 jnbek is there a plugin for Template::Alloy ?
03:06 aggrolite joined #mojo
03:07 sri lets do something hilariously awful... just because we can... perl -Mojo -E 'my $dom = g("mojolicio.us")->dom; $dom->all_contents->each(sub { $_->tree->[$_->node eq "tag" ? 3 : 2] = undef }); say j($dom->tree)'
03:08 * sri murdered a tree
03:13 sri webart: that's what you get when your only requirement is "xml -> json" without any sort of spec
03:19 ka2u joined #mojo
03:42 webart 8-)
03:58 ka2u joined #mojo
03:58 aggrolite joined #mojo
04:40 ka2u joined #mojo
04:46 GabrielVieira joined #mojo
05:08 asarch joined #mojo
05:31 GabrielV_ joined #mojo
06:21 jberger_ joined #mojo
06:22 jberger_ malicious: I have seen that error on occasion
06:22 jberger_ Try upgrading Storable
06:23 jberger_ If that doesn't work try another serializer, that is totally replaceable
06:23 jberger_ If that doesn't work let me know
06:24 jberger_ Oh and if you are on cygwin, well,  it's a work in progress
06:26 jberger_ I have a dev release out which I hope will fix cygwin, but there have been no tester reports yet
06:27 * jberger_ returns to his regularly scheduled blissful warmth
06:28 sri fighting with the atom documentation made me realize how important a class index is
06:28 sri wonder how to render a class hierarchy with pod
06:33 sri when i look at mojolicious, i mostly see a class hierarchy, maybe i should try making others see it the same way
06:46 sri only downside... the list is kinda big
06:46 sri but i got it rendered in pod
06:47 crab is this atom thing nice?
06:57 good_news_everyone joined #mojo
06:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QokuvA
06:57 good_news_everyone mojo/master db45a2e Sebastian Riedel: added class hierarchy to guides
06:57 good_news_everyone left #mojo
06:57 sri not sure how useful that is... considering its size http://mojolicio.us/perldoc#REFERENCE
07:00 sri i've also tried merging the highlights section into the class hierarchy, but it gets unreadable
07:00 crab it's not too bad.
07:01 crab yes, don't merge
07:03 sri the atom thing is very nice
07:04 sri a few rough edges, but i already like it a lot more than sublime text
07:06 dod joined #mojo
07:11 ka2u joined #mojo
07:23 dod joined #mojo
07:33 Vandal joined #mojo
07:34 skullbocks joined #mojo
07:49 aggrolite joined #mojo
07:59 GabrielVieira joined #mojo
08:03 ladnaV joined #mojo
08:07 Vandal joined #mojo
08:15 batman maybe *someone* should make a plugin to metacpan that could show class hierarchies...
08:19 hrupp joined #mojo
08:24 plenum joined #mojo
08:44 dotandimet joined #mojo
08:49 basiliscos joined #mojo
08:52 Andy2 joined #mojo
09:30 Jonneh joined #mojo
10:00 plenum joined #mojo
10:16 hesco joined #mojo
10:20 bpmedley joined #mojo
10:23 sh3 joined #mojo
10:37 denisboyun joined #mojo
10:40 sh4 joined #mojo
10:47 mire_ joined #mojo
11:04 rem_lex| joined #mojo
11:07 ryozi joined #mojo
11:23 dotandimet joined #mojo
11:35 plenum joined #mojo
12:03 sujithm joined #mojo
12:06 batman is there a clever way to convert relative href="" to absolute url when parsing $tx->res->dom?
12:06 batman (i don't know up front if the href="" is relative or absolute)
12:11 batman http://p.thorsen.pm/6a72e08bc890 # this is what i'm currently doing
12:34 chansen joined #mojo
12:38 skullbocks joined #mojo
12:54 batman anyone here who has a thinkpad x240? i'm trying to combine my knowledge here about how to hate it less: https://github.com/jhthorsen/thinkpad-helper
13:12 crab hate it less
13:13 batman crab: yes?
13:13 purl it has been said that yes is the answer to the latest question
13:15 crab nothing. something about the phrasing just struck me as odd.
13:16 batman crab: you don't own a x240, do you..? :(
13:18 crab no. t430s.
13:18 crab i had to make many of the same changes you're doing in your script though.
13:18 crab but once i did, especially the powersave stuff (using tlp, which i assume you know about?), i am very happy with it.
13:19 batman yeah. tlp made it worse. not sure why :(
13:20 crab weird. but it got me down to 8W running usage at reasonable screen brightness.
13:20 batman i used "powertop --html" instead
13:21 sh3 joined #mojo
13:27 batman i don't get how to get proper stats when having two batteries
13:28 batman upower -d|grep -i energy-rate # not too bad...around 8.3W
13:28 batman i mean. the app. 8.3W might not be very good :)
13:30 skullbocks joined #mojo
13:35 batman crab: the worst thing is the clickpad btw. don't get why lenovo changed to it :(
13:35 batman guess it's "hip"
13:56 crab i don't know what a clickpad is. i guess i should be happy?
13:57 batman yeah, hehe
13:57 crab oh, is it the thing without physical buttons?
13:57 crab that was a major factor in my model selection... there were models that were newer/lighter/battery-er than the t430s but none of them had physical mousey buttons
13:58 batman it's what the macbook has. just that the lenovo is awful and the macbook is just a thing to get used to :)
13:58 batman yeah: no physical buttons
13:58 batman i've managed to get it working pretty well, but i still miss my trackpoint.
13:59 batman i have a trackpoint, but i can't make scrolling work like i had with my x201
14:01 jb360 joined #mojo
14:02 asarch joined #mojo
14:29 mire__ joined #mojo
14:47 d4rkie joined #mojo
14:50 * malicious likes the existence of the class reference in the pod
14:51 malicious would have helped me out a lot early on
14:51 GabrielVieira joined #mojo
15:13 GabrielV_ joined #mojo
15:14 judofyr joined #mojo
15:31 bpmedley http://pearls.liveperl.us/tutorial/stash <-- Is this minimal enough so the user can figure out what is going on?  It's geared towards a tutorial where someone new to Mojo can tinker.
15:41 * batman still thinks it's too much
15:51 jack_ joined #mojo
16:05 dotandimet joined #mojo
16:09 sh4 joined #mojo
16:30 zivester joined #mojo
16:34 sujithm joined #mojo
16:35 zivester joined #mojo
16:44 good_news_everyone joined #mojo
16:44 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/UbONgQ
16:44 good_news_everyone mojo/master 56afdcd Sebastian Riedel: fixed a few errors in the class hierarchy
16:44 good_news_everyone left #mojo
16:58 asarch joined #mojo
16:59 dod joined #mojo
17:05 nic joined #mojo
17:28 plenum joined #mojo
17:37 trone joined #mojo
17:38 sk joined #mojo
17:53 sri bpmedley: too much, and i *hate* the push @{app->static->paths} part
17:54 sri if you have to use bootstrap, at least use absolute urls in the template and don't mess with the app
17:54 sri that stuff is really distracting
17:55 bpmedley Hrmm.  Ok.  The reason I have to modify the path is due to docker; however, there may be a workaround such as using their cdn.
18:11 aggrolite joined #mojo
18:23 basiliscos joined #mojo
18:29 donk joined #mojo
18:35 davido_ joined #mojo
19:25 good_news_everyone joined #mojo
19:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/LF7qdA
19:25 good_news_everyone mojo/master e3d58c1 Sebastian Riedel: use square list style
19:25 good_news_everyone left #mojo
19:28 judofyr joined #mojo
19:31 judofyr joined #mojo
19:46 aggrolite joined #mojo
19:58 dj_goku joined #mojo
20:03 sri bpmedley: btw. if you're still looking for ways to polish the design... i like jsfiddle a lot http://jsfiddle.net/
20:05 sri especially the code boxes
20:19 mattastrophe joined #mojo
20:28 skullbocks joined #mojo
20:34 dotandimet joined #mojo
20:38 judofyr joined #mojo
20:41 judofyr_ joined #mojo
20:53 judofyr joined #mojo
20:56 judofyr_ joined #mojo
20:56 jb360 joined #mojo
21:00 judofyr joined #mojo
21:03 hummeleBop joined #mojo
21:09 bpmedley sri: They do have a compact, nice design.
21:11 meshl joined #mojo
21:48 judofyr joined #mojo
21:49 judofyr joined #mojo
22:10 punter joined #mojo
22:36 good_news_everyone joined #mojo
22:36 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_aF0_A
22:36 good_news_everyone mojo/master b257bf1 Sebastian Riedel: better description for Mojo
22:36 good_news_everyone left #mojo

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