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

IRC log for #mojo, 2015-07-19

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

All times shown according to UTC.

Time Nick Message
00:36 mattastrophe joined #mojo
01:30 tchaves joined #mojo
01:32 tchaves Hello guys! Someone in the channel that can give me a hand in creating a chart using Mojo and Hightcharts http://www.highcharts.com/?
01:32 jberger tchaves: to a first approximation the examples should work as is
01:32 jberger Just serve the examples statically
01:33 tchaves I created a json in Mojo, but the chart is not being created. I wanted a help because I find it in my json.
01:37 jberger tchaves: post a minimal example on done pastie site
01:37 tchaves ok, 1 min
01:37 jberger s/done/some/
01:43 tchaves This one is my api sending the json to the template: http://pastebin.com/2J4KDryF
01:45 Repaster Repasted text from tchaves: http://fpaste.org/245762/72702051/
01:45 tchaves This one is my api sending the json to the template:
01:45 tchaves The other is to create the chart, but is not creating, I think it can be problem in json because I do manually and works: http://pastebin.com/pVYVjWC0
01:45 Repaster Repasted text from tchaves: http://fpaste.org/245763/14372702/
01:45 mst <3 Repaster for saving us from skiddiebin
01:45 jberger tchaves: the comment is wrong of course, no template :p
01:45 mst tchaves: did you try console.log on what you think is the json?
01:45 mst ogods complicated UI code in jquery
01:47 jberger tchaves: you say that the json makes it to the browser?
01:47 tchaves because if I do manual: [{name: 'foo', y: 10, drilldown: 'bar'}] works where there has date: json
01:47 jberger If so there's nothing much else that we will be able to help you with here
02:06 noganex_ joined #mojo
05:06 deserted joined #mojo
05:28 dotandimet joined #mojo
05:32 irqq joined #mojo
07:10 esh joined #mojo
07:30 dod joined #mojo
07:35 dod joined #mojo
07:38 Vandal joined #mojo
08:45 berov1 joined #mojo
09:13 esh joined #mojo
09:45 mattastrophe joined #mojo
09:49 jontaylor joined #mojo
10:03 mattastrophe joined #mojo
10:03 esh joined #mojo
10:12 absolut_todd joined #mojo
10:14 amon joined #mojo
10:29 mattastrophe joined #mojo
10:35 sh4 joined #mojo
10:56 absolut_todd joined #mojo
11:08 esh joined #mojo
11:12 mattastrophe joined #mojo
11:36 trone joined #mojo
11:40 dod joined #mojo
11:49 Craftsmanship joined #mojo
11:54 Craftsmanship Does anyone happen to have an example of an app that renders stuff to atom? I'm rummaging in here https://github.com/kraih/mojo/wiki/Projects-and-Companies-Using-Mojolicious
11:55 Craftsmanship I don't really want to try writing my own rederer
11:55 Craftsmanship but i guess ->render(feed => {} ) could be a thing.
12:02 pink_mist you could take a look at what Statocles does; it's based on mojolicious and sports RSS and Atom feeds
12:03 pink_mist maybe you could even convince preaction to separate the RSS/Atom stuff into a plugin of its own
12:12 Craftsmanship Statocles... that's far down the alphabet ...
12:13 Craftsmanship so you think that perhaps if we talk about preaction, that might be enough?
12:14 pink_mist I ... don't understand what you mean
12:17 stephen joined #mojo
12:19 Craftsmanship I just started at the top of the page, which I assumed was alphabetically ordered.
12:21 pink_mist I didn't even look at your link ... I just searched metacpan for Mojolicious Atom, and Statocles was the second result (the first result wasn't Mojolicious-related at all..)
12:21 pink_mist oh wait, it was
12:21 pink_mist guess you could try that too
12:21 pink_mist XML::Loy
12:23 pink_mist I'm not sure why you think your link is useful
12:24 Craftsmanship because it came up in a google search for "mojoliocous feeds" and contains a bunch of links to repos full of mojo apps
12:27 deserted Craftsmanship, being Atom is XML, couldn't you just render XML and a template?
12:28 deserted ie $self->render(template => 'myfeedtemplate', format => 'xml');
12:29 Craftsmanship rendering xml via templates seems like a bad thing :(
12:29 Craftsmanship I was secretly hoping for something to also deal with the mess that is negotiating down to rss too
12:30 pink_mist which is why I pointed you to Statocles .... have you not checked its source yet?
12:31 deserted why? it's a structured format, all you need is to define an entry in your feed, fill stash with an arrayref of hashrefs, and bobs you're proverbial second cousin ;) defining a template for the channel deets and item block is pretty straight forward with a template?
12:33 Craftsmanship sure, templating xml is easy enough, but calling ->to_xml on an object that knows how seems simpler
12:34 pink_mist https://metacpan.org/source/PREACTION/Statocles-0.052/share/theme/default/blog/index.atom.ep <-- this seems to be the Statocles atom template
12:35 deserted true, but you can do that to by passing data instead of template, and generating with the likes of http://search.cpan.org/~aristotle/XML-Atom-SimpleFeed-0.861/lib/XML/Atom/SimpleFeed.pm
12:36 deserted_ joined #mojo
12:36 Craftsmanship I was looking at XML::Atom::Feed
12:37 Craftsmanship the long and short of it is always going to be "construct structure" "format xml"...
12:37 Craftsmanship so i'll go and do that.
12:37 deserted yeah can't really see a way around that unfortunately
12:37 deserted but thanks for makign me look, I've been putting off atom feeds :) time to implement
12:41 Craftsmanship Can I just wait here for your implementation then?
13:07 cpan_mojo Etherpad-1.2.12.1 by LDIDRY https://metacpan.org/release/LDIDRY/Etherpad-1.2.12.1
13:12 jberger Craftsmanship: why not steal the Statocles template?
13:12 jberger What else are you waiting for?
13:40 mattastrophe joined #mojo
13:57 Craftsmanship I went and stole the example from wikipedia
13:57 Craftsmanship it wasn't full of all that pesky perl
13:58 Craftsmanship (that refused to compile)
14:18 Craftsmanship The default 404 needs a leading / on the image url at the top ... otherwise it gets silly things... and 404s more [debug] GET "/2015/10/01/mojo/logo-black.png"
14:33 gryphon joined #mojo
14:34 disputin joined #mojo
14:48 Craftsmanship should /:thing in path be in $self->param('thing')
14:48 Craftsmanship it seems to only turn up there for things in caps
14:48 Craftsmanship or am i just colliding with something else? I guess "path" collides with something?
14:48 Craftsmanship (unrealted, can i make mojo dump the stash instead of going to the templates?)
15:09 zivester joined #mojo
15:14 PryMar56 joined #mojo
15:27 inokenty joined #mojo
15:36 CandyAngel Can I use Mojo::UserAgent and Mojo::DOM outside of Mojolicious or anything like that?
15:37 bpmedley CandyAngel: Yes, easily.
15:37 CandyAngel Aweeeeesome
15:41 bpmedley CandyAngel: https://bitbucket.org/snippets/bpmedley/jggjj <-- Here is an example.  I think it's correct.
15:47 deserted Craftsmanship, routing placeholders like :thing are available in stash
15:47 deserted so $self->stash('thing')
15:47 deserted param should grab it from stash as well
15:47 deserted but stash is where it's actually stored
16:01 CandyAngel bpmedley: You can just 'use' it and it seems to work :)
16:01 bpmedley Amazing, eh?  They've thought of everything.. :)
16:02 CandyAngel I'm so used to "this is part of our system and.. you have to use our system if you want to use it"
16:02 CandyAngel I just presume it :|
16:04 mst apparently you're not used to perl yet.
16:04 mst generally if you can't use individual packages independently
16:04 mst we call that "a bug"
16:04 CandyAngel :P
16:04 mst this is no a criticism of you, it's a complaint at the rest of the world for getting it wrong all the time :D
16:13 melcher joined #mojo
16:33 mattastrophe joined #mojo
16:36 disputin joined #mojo
16:40 stephen joined #mojo
17:04 deserted_ joined #mojo
17:16 jberger mst++
17:24 preaction i've generated atom/rss both from objects (XML::FeedPP and Mojo::DOM) and templates (as you've seen). templates are so much easier
17:26 mst I tend to use XML::Tags for that
17:26 mst which is faintly mental
17:26 mst do { use XML::Tags qw(...); <entry>, <title>, $title, </title>, ..., </entry> }
17:29 mattastrophe joined #mojo
17:33 melo joined #mojo
17:36 dod joined #mojo
18:30 dod joined #mojo
19:33 punter joined #mojo
19:47 yt7fms joined #mojo
19:48 yt7fms joined #mojo
19:50 disputin joined #mojo
20:01 disputin joined #mojo
20:10 dotandimet joined #mojo
20:13 irqq_ joined #mojo
20:26 disputin joined #mojo
20:37 disputin joined #mojo
20:47 berov joined #mojo
20:52 davido__ joined #mojo
21:01 Adura joined #mojo
21:20 inokenty joined #mojo
21:55 disputin joined #mojo
21:57 mattastrophe joined #mojo
22:32 Dandre joined #mojo
22:47 melcher joined #mojo
22:50 mattastrophe joined #mojo
22:55 melcher whoever made those mojo episodes, just needs to do that for everything.  He is awesome
23:01 pink_mist do you mean the mojocasts by glen hinkle? aka tempire
23:05 bpmedley They're like Seinfeld episodes, all amazing.
23:08 jberger tempire: MOAR MOJOCASTS!
23:09 Dandre joined #mojo
23:13 melcher yes
23:13 melcher we need moar
23:22 PryMar56 joined #mojo

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