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

IRC log for #mojo, 2016-06-24

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

All times shown according to UTC.

Time Nick Message
00:28 Lee joined #mojo
00:29 sri wow, i've seen results from 8 cities now for the brexit votes, and 7 out of 8 voted for leave
00:55 genio wow.  I was thinking how surprising it'd be if it happened
01:20 disputin joined #mojo
01:28 disputin joined #mojo
01:42 disputin joined #mojo
01:46 cpan_mojo Mojo-Reactor-Epoll-0.006 by DBOOK https://metacpan.org/release/DBOOK/Mojo-Reactor-Epoll-0.006
01:46 Grinnz ^ now using Linux::Epoll, which in addition to being nicer to use and better maintained, seems to be slightly faster than IO::Epoll despite the OO interface
01:46 Grinnz still beaten handily by the poll reactor on my machine, though
01:50 _dave_ So if I'm the middle of a number of Mojo::IOLoop::Delay->steps(...), can another event be possibly executed in the middle of these steps?
01:51 bpmedley _dave_: Yes, we had a discussion with nic about that.. want some example code?
01:51 _dave_ I love examples :)
01:52 bpmedley _dave_: https://gist.github.com/brianmed/4166e7acdf5c850502b463a597d20a77
01:52 bpmedley That's the beauty of IOLoop
01:53 bpmedley Would a simpler example be better?
01:54 _dave_ no, that was great :)
01:54 _dave_ thanks very much
02:04 jberger ummm, I'm not sure that proves what you think it does, and the style is a little awkward
02:04 bpmedley How could the example be improved?
02:04 jberger normally I use a ticker outside of the delay, like Mojo::IOLoop->recurring(1 => sub { say $i++ })
02:05 jberger then do some work which also prints inside of the delay
02:05 jberger then you see both happening interleaved
02:05 jberger ->pass($value)->begin is really going to confuse someone
02:06 bpmedley I believe the callbacks are interleaved; if you want the output interleaved, perhaps change the timer 0 to a timer of three.
02:06 jberger how would those be interleaved? they are sequential are they not?
02:07 bpmedley One sec
02:07 disputin joined #mojo
02:12 bpmedley jberger: Aren't the steps setup via next_tick?
02:12 jberger next_tick?
02:13 jberger don't count on job insertion order
02:13 bpmedley https://github.com/kraih/mojo/blob/master/lib/Mojo/IOLoop/Delay.pm#L23 <-- Here for starting the steps
02:13 jberger why does that matter?
02:14 bpmedley https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor/Poll.pm#L26 <-- Because they are all timers in Mojo::Reactor::Poll..
02:16 zivester joined #mojo
02:16 noganex_ joined #mojo
02:18 jberger http://paste.ubuntu.com/17781021/
02:18 jberger that's what I mean
02:19 jberger the ticker keeps ticking even though the delay is doing stuff
02:19 bpmedley I gather that; however, are you saying my timer happens a) before, b) after, or c) during the delay steps?
02:19 jberger even if it occurs during, it is not defined to be during
02:19 jberger it is an implementation detail
02:19 bpmedley How so?
02:20 bpmedley Dunno.  What documentation are you point to?
02:20 jberger there is no documentation on steps being inserted in the next_tick
02:20 jberger that's why it isn't documented
02:21 jberger let me try saying this again
02:21 aborazmeh joined #mojo
02:21 jberger to make a better example to show someone, show the creation of two different code paths that are executing "simultaneously"
02:21 bpmedley Perhaps I'm confused.  What does my example not prove?
02:22 bpmedley I believe the timer above the steps does happen concurrently.
02:23 jberger but the output doesn't actually show the user that
02:23 bpmedley Fair.  I should have used a 3.
02:23 jberger I ...
02:23 bpmedley Sorry, what?
02:23 jberger oh a 3 in the first timer (outside)?
02:24 bpmedley Yes, sir.
02:24 jberger so that it happens after the first few
02:24 bpmedley Yeah
02:24 jberger yeah, even that would have demonstrated the difference more clearly
02:24 bpmedley my $next = $delay->pass('B')->begin  <-- How can that be golfed, or improved?
02:25 jberger I normally try to avoid calling the result of ->begin in examples
02:25 sri now i kinda want to tell you that you're both wrong ;p
02:25 bpmedley Gaw!! Ok, please.. :)
02:26 jberger haha, ok go for it, I can take it
02:26 sri i've not actually payed attention... let me try
02:26 jberger oh, ok
02:28 jberger sidenote: Grinnz nice work
02:29 sri phew
02:30 sri jberger was almost right, until he agreed with bpmedley ;p
02:31 sri using a 3 second timer won't guarantee for it to run after the first step, something could block the event loop long enough for both timers to fire at the same time
02:31 jberger ah good point
02:32 jberger though in these examples, that isn't likely
02:32 jberger but in real world code, sure
02:32 bpmedley However, I thought the original question was "Can an event be executed while steps are running".  Did I mis-understand?
02:34 sri i actually bought way less steam games than i thought i would :o
02:36 jberger bpmedley: I think the issue is just making sure that the person asking the question can clearly tell when the events occur, and so creating a scenario where they will definitely appear to execute in some convolved manner
02:36 jberger sri is just saying that by only having one timer that fires out of order there is a possibly way that even that won't show the case
02:36 bpmedley That makes sense.  And pray that the events fire like we want? :-0
02:37 jberger because timers are only guaranteed to fire after the given amount of time
02:37 jberger so if your system hung for 4s at just the wrong time, then all of the events would appear to fire in order again
02:37 jberger (even with the 3s timer on the "zero")
02:39 sri it might work most of the time, but there's no way i would make that a test case for example
02:39 sri you'd want a recurring timer for a test
02:40 sri omg
02:40 jberger now I have no idea if this is a great test (and it doesn't use delay) but this is a real world example: https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/t/basic.t
02:41 sri brexit vote for leave is now 500k votes ahead
02:41 jberger woah
02:45 jberger I was hoping Firewatch would be cheaper
02:45 jberger I've been waiting for it to go on sale, but ... meh
02:46 sri haha, me too
02:47 sri don't forget to get limbo for free
02:55 jberger done
02:55 jberger oh but I can download it now
02:56 jberger I "purchased" it from the plane (on the ground via tether) when you mentioned it the other day
03:04 jberger downloaded
03:04 jberger cool
03:35 leejo joined #mojo
03:38 sri wow, brexit is really happening, leave is now almost a million votes ahead
03:40 sri just 30% of the votes remaining
03:41 sri bbc already says leave won :o
03:42 sri WE NEVER REALLY LIKED YOU BRITS ANYWAY!
03:42 * sri sobs and walks off
03:46 dabudabu http://finance.yahoo.com/echarts?s=GBPJPY%3DX+Interactive#{%22range%22:%221d%22,%22allowChartStacking%22:true}
04:01 sri bitcoin is rising again -.-
04:03 sri we still love scotland though
04:03 _dave_ anything like mojo rising?
04:04 leejo http://www.theguardian.com/politics/ng-interactive/2016/jun/23/eu-referendum-live-results-and-analysis # it really is big smoke vs rest of the country (and scotland)
04:05 leejo utterly unsurprised and utterly disappointed
04:07 leejo i mean look at it: london, bristol, manchester, leeds, scotland vote remain and the rest say out
04:12 disputin joined #mojo
04:17 mattp joined #mojo
04:19 sri rather annoying that osx can't write to the bootcamp partition
04:39 sri it appears i'm really unlucky
04:40 sri was about to reinstall windows o the macbook with bootcamp... and the bootcamp assistant crashed, now half of my storage is gone without a trace Oo
04:41 sri and the os x partitioning tool thinks everything is cool, like those 128gb never existed
04:42 inokenty joined #mojo
04:48 inokenty-w joined #mojo
05:19 che-quest joined #mojo
05:33 sri looks like the new macbook is bricked
05:34 sri crash during recovery, crash during repartitioning, crash during internet recovery
05:51 sri shit, it doesn't make the sound anymore during startup
05:51 sri that's hardware failure, isn't it?
06:09 sri omg, that was scary
06:10 sri no hardware failure after all, the bootcamp crash messed up the pram
06:11 sri or not :(
06:12 sri now it crashed again during the time machine restore
06:28 jberger :o
06:34 sri smc and pram reset now... it starts up fine into recovery mode again, but something is broken with the ssd
06:34 sri in disk utility it tells me it can't unmount the existing partition to erase the hd
06:45 dod joined #mojo
06:48 jberger so I have to ask, .... did you tell your laptop about the UK vote? Maybe it just gave up?
06:51 dod joined #mojo
06:51 sri not really in the mood for joking :(
06:55 Vandal joined #mojo
06:56 jberger yeah, I can imagine
07:08 bd_ sri: tried running memtest?
07:08 sri how?
07:08 bd_ boot from usb stick?
07:09 bd_ i think one could even network boot it
07:09 sri boot what?
07:09 AndrewIsh joined #mojo
07:09 bd_ http://www.memtest.org/
07:10 sri how could that help me?
07:11 bd_ to see if you have a memory problem?
07:11 sri who cares
07:12 sri all this shit is soldered onto a tiny mainboard, me knowing what exactly broke makes no difference whatsoever
07:13 trone joined #mojo
07:27 berov joined #mojo
07:58 leejo joined #mojo
08:42 osfabibisi joined #mojo
08:49 * nic packs bags  # time to leave the UK
08:52 bpmedley sri: Still having issues?
08:52 tim joined #mojo
08:56 tim Hi, the latest Mojo::UserAgent changes for CONNECT requests cause these errors: https://gist.github.com/tim-2/5ffb894d327134e4cbc797bedecded1d
08:56 bpmedley tim: Can we see code?
09:10 bpmedley be back in a bit
09:26 ashimema joined #mojo
09:30 icjs joined #mojo
09:46 batman off topic: does anyone know if there's a way to declare a function which should be "invisible" in runtime, just like my_func() if DEBUG; will be invisible if DEBUG is a false constant?
09:46 batman i tried sub my_func () {} but it seems like perl will still call my_func, even if it doesn't do anything
09:48 batman oh. maybe i can hack it using constant.pm *checks*
09:59 meshl joined #mojo
10:03 kaare joined #mojo
10:05 pink_mist batman: what's the purpose for this? you want it to error out because you're calling something that doesn't exist?
10:05 batman i want to make a new keyword instead of warn "....\n" if DEBUG;
10:06 batman looking at Keyword::Declare now ;)
10:20 meshl joined #mojo
10:33 icjs2 joined #mojo
11:02 punter joined #mojo
11:10 icjs joined #mojo
11:13 ashimema joined #mojo
11:17 tchaves joined #mojo
11:18 meshl joined #mojo
11:27 tchaves joined #mojo
11:30 tchaves joined #mojo
11:31 dvinciguerra joined #mojo
11:32 tchaves joined #mojo
11:33 zivester joined #mojo
12:34 meshl joined #mojo
12:38 leejo_ joined #mojo
12:46 gizmomathboy joined #mojo
12:48 dantti_laptop joined #mojo
12:58 dvinciguerra joined #mojo
13:03 cuechan joined #mojo
13:11 emakarov joined #mojo
13:47 zivester joined #mojo
13:51 bpmedley sri: how is the mac book?
14:16 user_7801 joined #mojo
14:19 marty joined #mojo
14:19 user_7801 Is there an easy way to have the json rendered as I pass it?
14:19 user_7801 http://nopaste.linux-dev.org/?1119042
14:19 user_7801 i want to turn off alphabetical order
14:20 user_7801 it does not make sense when I use beautified rendering, since the result is not sorted correctly then.
14:23 batman user_7801: no. hashes in perl are not ordered
14:27 bpmedley user_7801: also, i see no mention of sorting in the docs of "pretty" for JSON::XS.
14:27 jabberwok there is https://metacpan.org/pod/JSON::XS#json-json-canonical-enable  but your choices are either (1) alphabetical or (2) effectively random
14:31 user_7801 I see. I have tried canonical(1), but it does not change anything
14:32 batman user_7801: canonical = alphabetical order
14:33 batman user_7801: but.... why do you want to accomplish having it in the order that you enter it?
14:41 user_7801 it's just for the users that call the API from curl (cmdline). Some text is placed on the bottom of the json response currently, but should stay on top.
14:41 perlpilot joined #mojo
14:41 user_7801 but I guess there is no way to do it easily
14:42 batman that doesn't make any sense
14:42 batman are you sure you don't want curl http://api.com/foo.json | json_xs ?
14:42 batman that's what i do. i also use "JSONView" in chrome to make it easy to read the json data
14:43 pink_mist iirc there's a way to do it with Tie::IxHash
14:43 pink_mist but no promises
14:44 bpmedley pink_mist: shouldn't the canonical option work for JSON::XS?
14:44 pink_mist no?
14:45 pink_mist that's completely different
14:45 batman pink_mist: i don't think that is recursive.
14:45 pink_mist that'd in fact ruin it
14:45 batman bpmedley: user_7801 is asking for the opposite
14:45 pink_mist batman: well yes, every single hash in your data structure would need the magic done to it
14:45 batman json rendering in mojo has been canonical for a while - https://metacpan.org/changes/distribution/Mojolicious#L53
14:46 batman pink_mist: sounds awful, haha :D
14:46 pink_mist batman: canonical sorts it alphabetically. he doesn't want that. he wants it in the same order as he put it in. that's what Tie::IxHash *might* accomplish.
14:46 bpmedley I see.  They want the order as entered.. Sorry.
14:46 batman i don't get these questions :(
14:46 pink_mist err, bpmedley
14:46 pink_mist sorry
14:46 batman pink_mist: i know.
14:46 pink_mist I can't tell you two apart :P
14:46 batman what's that supposed to mean??
14:46 batman hahahaha
14:46 bpmedley That's because i have my viking hat on
14:47 pink_mist you both start with b, and I just b<tab> and don't look at your nicks properly when answering :P
14:48 batman bpmedley: https://s-media-cache-ak0.pinimg.com/236x/6d/3a/db/6d3adb6f901aca4b6cd517fc40ae6b68.jpg
14:48 user_7801 i'm gonna leave it as it is
14:49 bpmedley user_7801: did you try Tie::IxHash?
14:49 pink_mist user_7801: not even going to try Tie::IxHash?
14:49 batman user_7801: leave it as it is! don't listen to them
14:49 batman :)
14:55 marty joined #mojo
15:00 user_7801 you guys want to give me an old module from 1995
15:00 user_7801 and make my code slow
15:01 mishanti1 user_7801: I'm from '82, and I'm not slow.
15:01 bpmedley user_7801: Where do you get your year from?
15:02 Kripton joined #mojo
15:07 jabberwok slow? punched cards are slow.  you know, with whitespaces-that-count like Fortran and Python.
15:07 pink_mist user_7801: there's nothing wrong with Tie::IxHash, and it's from 2013
15:08 cfedde I'm from 1961 and I am slow.
15:10 batman user_7801: they did try to help you. there wouldn't been much alternatives if you really wanted to do what you asked for.
15:10 batman i'm certain you will be happy with not doing it.
15:14 mcsnolte joined #mojo
15:25 bwf user_7801: https://gist.github.com/bfaist/7342712c2c91bd3e626833072a78fe84
15:35 user_7801 Thanks bwf. :) Exactly what I wanted, but perhaps I should only use it upon request from the user.
15:35 user_7801 The module Tie::IxHash is great!
15:36 lluad joined #mojo
15:38 sri bpmedley: the macbook is completely fucked
15:39 genio your mac's broken again?
15:40 sri mainboard this time it seems
15:40 genio sheesh.  not making me want to get a new MBP
15:41 sri startup sound goes away after a few reboots, it starts internet recovery instead of normal recovery, and just freezes up during recovery now
15:41 bpmedley sri: All I can say is that I have an empathetic viewpoint.  I'd be stressed, angry, and frustrated.
15:42 sri no matter what happens, i've lost another windows license too
15:42 sri you have no idea how fucking angry i am
15:42 mishanti1 sri: Germany does have pretty decent consumer purchase laws right? Could you get a refund at some point?
15:42 bpmedley Gaw!! That's awful..
15:43 sri mishanti1: think they get to repair it like a dozen time first or so
15:43 sri but, of course apple service sucks again, and i can't even try anything before next week
15:43 vicash sri: its the year of Linux on the desktop
15:44 mishanti1 sri: Pretty similar here. Anyway; hoping you get it fixed soon. Those things are never any fun to deal with.
15:46 sri i just want a dell now
15:47 sri but instead i'll be losing at least a week of work time... at some point it would just have been cheaper to buy two laptops
15:49 sri also no 7.0 next weeks
15:52 perlpilot joined #mojo
16:03 berov left #mojo
16:16 jberger There are faster/newer alternatives to IxHash
16:17 jberger sri: I'm really sorry to hear about your laptop, that sucks
16:18 marty_ joined #mojo
16:18 dod joined #mojo
16:18 user_7801 Do you mean Hash::Ordered for example?
16:19 marty joined #mojo
16:20 jberger Yes I think that was the one i was thinking of
16:20 jberger There are a few
16:21 * jberger is just waking up, will metacpan
16:21 marty joined #mojo
16:23 jberger Yes that's it
16:25 marty joined #mojo
16:33 user_7801 Are there any drawbacks when I order the hashes before calling $self->render with IxHash or Hash::Ordered?
16:33 user_7801 Beside a small performance loss.
16:34 jberger I shouldn't think so
17:20 ashimema sri: your laptop woes are getting silly :(, feel for you man
17:49 disputin joined #mojo
18:02 PopeFelix joined #mojo
18:17 jberger watching Gabor's talk now
18:17 jberger I see that he says "Based on Ruby Sinatra" ... ummmm?
18:17 jberger does that just mean the routing syntax?
18:17 jberger or maybe he's just thinking that Lite is kinda small looking?
18:39 Lee joined #mojo
18:48 itaipu joined #mojo
18:54 Kripton joined #mojo
18:57 dvinciguerra_ joined #mojo
19:14 thowe_work joined #mojo
19:15 jberger all in all, that was a really good talk
19:15 jberger Gabor++
19:18 PryMar56 joined #mojo
19:39 jberger posted to reddit: https://www.reddit.com/r/perl/comments/4posf6/yapcna_2016_getting_started_with_modern_web/
19:41 jberger think I'll watch Lee's talk next
19:50 CW Sorry, this is probably a dumb question but its friday and my brain is fried... What is wrong with this -> Mojolicious::Commands->start_app('InstallerApp','daemon','-l', 'http://*:7170');
19:51 bpmedley CW: i've always put daemon, -l, and friends in ARGV
19:54 jberger CW: the problem is when you wan to use your application script as anything other than a daemon
19:54 CW Is there an example of how to do that in the documentation?
19:54 jberger CW do which thing, sorry?
19:56 jberger anyway, basically what I suggest is setting the hypnotoad values from a config file
19:56 bpmedley CW: https://github.com/brianmed/sparky/blob/master/script/sparky
19:56 jberger that way when you start up the application via hypnotoad you get the listen port as you like it
19:56 jberger and otherwise, it just starts the application normally (with command line options passed by the user)
19:57 CW Ah, Thanks for the example. That will help.
20:00 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
20:07 bpmedley CW: will the user pass in args for that app?
20:08 meshl joined #mojo
20:09 CW Nope
20:10 jberger bpmedley / CW: that is a short sighted view
20:10 jberger for example ./myapp get /some/path is a wonderful debugging tool
20:10 bpmedley When i wrote sparky i was targeting windows
20:10 jberger also the eval command for one-off actions/diagnostics
20:11 jberger and adding commands to do things like deployment
20:11 jberger bpmedley: can you not run scripts on windows?
20:12 bpmedley I wanted a single command for the common case..
20:12 CW This should be removed from the documentation since it doesnt work -># Always start daemon for application
20:12 CW Mojolicious::Commands->start_app('MyApp', 'daemon', '-l', 'http://*:8080');
20:12 jberger CW where is that documented?
20:13 CW Bottom of this page -> http://mojolicious.org/perldoc/Mojolicious/Commands
20:13 jberger that is the reference documentation for Mojolicious::Commands
20:14 jberger it does work, it isn't recommended for a standard mojolicious app since most apps want to do other things as well as being a daemon
20:14 jberger but as class reference documentation it is valid
20:18 CW Then why does the auto-built-mojo app use it in the script used to start the app? Shouldn't it do it the proper way?
20:21 jberger sidenote: I borked the reddit post, here is a new one, this time with more link: https://www.reddit.com/r/perl/comments/4pozv6/yapcna_2016_getting_started_with_modern_web/
20:22 jberger CW: I don't believe the generated full app does that
20:22 jberger https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Command/generate/app.pm#L125
20:22 jberger that looks like the correct form (in template format of course)
20:24 CW Yah, so now I am confused. Why is ->  Mojolicious::Commands->start_app('InstallerApp'); ok, but Mojolicious::Commands->start_app('InstallerApp','daemon','-l', 'http://*:7170'); <- is bad.
20:25 CW Or different
20:26 jberger because you want to pass in those arguments not hard code them
20:27 jberger ./myapp daemon -l 'http://*:7170'
20:28 CW But thats not the issue. The problem is it doesn't work. So how will passed in arguments have a different result from hard coded?
20:29 jberger CW what do you mean it doesn't work?
20:29 CW It doesn't set the port to 7170 it stays on 808
20:29 CW 0
20:30 jberger are you trying to use hypnotoad?
20:30 CW yah, can you not set ports on hypnotoad?
20:31 jberger yes you can, but you don't use the daemon command to do it
20:31 jberger as I linked before, you use the hypntoad configuration parameter
20:31 CW Ah, There is my failings...
20:31 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
20:31 jberger hypnotoad is a preforking collection of many processes each running the daemon command (effectively)
20:32 jberger what you were kinda-sorta telling it to do was to start a daemon on 7170 but then use that as the hypnotoad manager process (which doesn't serve requests) and of course hilarity ensures
20:34 jberger maybe the wording on that reference documentation is "wrong", the emphasis should be "always start the daemon (and use port blah)" whereas you read it as "whenever you use the daemon start it on port blah"
20:34 jberger (I have no idea if I've made myself clear, so I ramble when that happens)
20:38 CW yah, Had to read it like three times before I got the distinction. Brian needs a vacation... Anyhoo, that makes a lot of sense. Now I just have to figure out how to put it in practice. :-S
20:39 CW Thank you very much.
20:39 jberger are you using a config file?
20:39 CW Not currently
20:39 jberger http://mojolicious.org/perldoc/Mojolicious/Plugin/Config
20:40 CW yah, reading that now
20:41 jberger also relevant: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Adding-a-configuration-file
20:42 jberger the fact that it will merge in mode-specific configuration is especially nice
20:45 itaipu joined #mojo
20:52 mad_hatter joined #mojo
20:53 mad_hatter Can anyone point me to a good non-blocking tutorial on mojolicious. it seems a bit complex, and the mojo docs provide a lot of good information but lack real world context and examples.
20:56 jberger mad_hatter: I wrote a series of articles a few years ago: http://blogs.perl.org/users/joel_berger/2013/10/writing-non-blocking-applications-with-mojolicious-part-1.html
21:01 ptolemarch joined #mojo
21:12 mad_hatter jberger, thanks this is brilliant
21:12 jberger hope you enjoy it
21:12 jberger it is a little old, if something doesn't work right or something just ping me and I can help and hopefully update the post
21:13 mad_hatter is the render_dumper call the same
21:14 mad_hatter or does it look like render(dumper => $foo);
21:18 madhatter_ joined #mojo
21:20 inokenty joined #mojo
21:20 madhatter__ joined #mojo
21:25 madhatter_ joined #mojo
21:27 jberger render_dumper was a helper I built IIRC
21:28 jberger yeah, it is defined at the top of the article (part 2)
21:29 jberger it really was just to keep the later examples concise
21:29 jberger you could as easily use ->render(json => ... )
21:30 madhatter__ joined #mojo
21:32 bpmedley CW: I assumed you were doing some app embedding, are you working on deployment?
21:38 jberger bpmedley: why would you use ->start_app for application embedding?
21:38 bpmedley Perhaps embedding is the wrong word.  A standalone install.
21:38 jberger in mojo, embedding has a specific meaning
21:39 bpmedley Right, I just used a better word..
21:39 jberger yeah
21:56 disputin joined #mojo
22:14 madhatter_ joined #mojo
22:16 madhatter__ joined #mojo
22:17 disputin joined #mojo
22:20 cuechan joined #mojo
22:34 madhatter_ joined #mojo
22:37 madhatter__ joined #mojo
22:40 Lee joined #mojo
22:42 madhatter_ joined #mojo
22:48 madhatter__ joined #mojo
23:01 disputin joined #mojo
23:02 madhatter_ joined #mojo
23:04 madhatter__ joined #mojo
23:07 user_7801 joined #mojo
23:10 user_7801 Guys, I was playing with Tie::IxHash a few hours now and tried the same with Hash::Ordered (faster implementation) to sort the output from json, but the results are odd.
23:10 user_7801 http://paste.arn-fai.net/?2104201
23:11 user_7801 Any idea?
23:17 bpmedley user_7801: https://gist.github.com/brianmed/3f3e47c1fb9dddd840f3f7e9a17cc53b <-- Does this work for you?
23:19 user_7801 Tie::IxHash is working fine
23:19 bpmedley user_7801: However, you want to use Hash::Ordered?
23:19 user_7801 Yeah, it's faster and newer?
23:20 bpmedley I have no idea on those points..
23:20 madhatter_ joined #mojo
23:21 user_7801 bpmedley: this works well https://gist.github.com/bfaist/7342712c2c91bd3e626833072a78fe84
23:21 bpmedley Cool; however, you may want to use "data" instead of "text"..
23:23 madhatter__ joined #mojo
23:23 bpmedley user_7801: Perhaps someone here has better experience with Hash::Ordered than me..
23:37 madhatter_ joined #mojo
23:39 madhatter__ joined #mojo
23:40 tchaves joined #mojo
23:41 madhatter_ joined #mojo
23:45 madhatter__ joined #mojo
23:46 cuechan joined #mojo
23:49 gizmomathboy joined #mojo
23:53 madhatter_ joined #mojo
23:55 madhatter__ joined #mojo

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