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

IRC log for #mojo, 2017-01-06

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

All times shown according to UTC.

Time Nick Message
00:00 pink_mist sri: so in my mind, the stringification would be slower
00:00 sri nope, it's a sub { ${$_[0]} }
00:00 pink_mist oh
00:00 sri vs sub to_string { "${$_[0]}" }
00:00 pink_mist then that, since method lookup is slow as heck
00:01 pink_mist oh, so to_string stringifies
00:01 pink_mist well then
00:01 sri ->to_string actually wins :)
00:01 pink_mist 0_o wut
00:01 sri 0.0900741s vs 0.10684s for 100k iterations
00:02 sri perl -Ilib -MMojo::File=path -Mojo -E 'n { path("/foo/bar")->to_string } 100000; n { path("/foo/bar") . q{} } 100000'
00:02 sri 5.24.0
00:03 sri with 5.10.1 it's slightly different
00:03 sri 0.144159s vs 0.167165s
00:03 sri ->to_string always wins though
00:04 sri https://github.com/kraih/mojo/compare/mojo_file#diff-23288abbf7581bb56bb0af7b60e03593R6
00:06 pink_mist wonder what perl is actually doing there then :P that seems very illogical to me ... though the difference isn't significant
01:17 aborazmeh joined #mojo
01:54 aborazmeh joined #mojo
02:08 bpmedley joined #mojo
02:23 asarch joined #mojo
03:01 aborazmeh joined #mojo
03:20 aborazmeh joined #mojo
03:36 aborazmeh joined #mojo
03:56 aborazmeh joined #mojo
05:04 dboehmer_ joined #mojo
05:13 asarch joined #mojo
06:29 dod joined #mojo
06:35 dod joined #mojo
07:03 dod joined #mojo
07:34 Vandal joined #mojo
08:01 AndrewIsh joined #mojo
08:26 hahainternet joined #mojo
08:45 Dandre joined #mojo
09:40 Dandre joined #mojo
09:41 osfabibisi joined #mojo
10:12 Dandre joined #mojo
10:12 schelcj joined #mojo
10:26 kes joined #mojo
10:30 kes Why $app->home is not described at: https://metacpan.org/pod/Mojolicious ?
10:37 Sebbe kes: Mojolicious inherits from Mojo, which describes it: https://metacpan.org/pod/Mojo
10:42 kes Sebbe, thank you. I have miss that
10:43 nic If I have an app running under daemon, say, and run a battery of hits (from eg wrk), how could I go about finding out the max IOLoop interruption that occurred during that run?
10:44 nic (The question isn't specific to Mojo::Test, but I'm only interested in that metric during that particular test)
10:45 nic 'interruption' means gap/interval in the event loop and is a measure of the worst case of blocking encountered during that run
10:48 sri nic: my guess would be, make your own version of Mojo::Reactor that collects metrics and caller information when callbacks are registered
10:49 nic cool, thanks
10:49 pink_mist that sounds like it would cause a lot of overhead
10:50 sri which is why you'd make it a new reactor backend specifically for diagnostics
10:50 sri Mojo::Reactor::PollWithDiagnostics or whatever
10:50 sri MOJO_REACTOR=PollWithDiagnostics
10:51 nic awesome, was just about to ask how to set it for use :)
10:51 sri oops
10:51 sri MOJO_REACTOR=Mojo::Reactor::PollWithDiagnostics
10:52 nic loving it
10:52 purl YESSIR APPLYING SOME HOT LOVIN' RIGHT NOW SIR
11:06 sword_smith joined #mojo
11:07 kes is there guides about that in which configuration section plugins should read their config?
11:20 tchaves joined #mojo
11:36 batman kes: that is plugin specific
11:37 batman the generic answer is probably $app->plugin(cool_plugin => $app->config("cool_plugin"));
11:40 jamesaxl joined #mojo
11:41 sri jberger, batman, marcus, tempire, crab: so, where do you all stand on Mojo::File? yay or nay?
11:45 nic https://www.techempower.com/benchmarks/#section=data-r13&hw=ph&test=query
11:45 nic 43.4% is awesome
11:46 nic anyone know the source of the errors?
11:46 purl the source of the errors is the database layer which i didnt write.
11:46 nic thanks purl
11:49 batman sri: Yay
11:50 batman sri: do i still have time to fiddle with parent(), basename() and dirname() ?
11:50 inokenty joined #mojo
11:50 batman i'm setting aside hacking time tomorrow (and hopefully tonight)
11:51 sri definitely until tomorrow
11:52 jamesaxl joined #mojo
11:53 sri with ->parent things get kinda complicated though
11:53 sri since then you have to deal with root directories and volumes and stuff
11:54 sri (which is not something we really need for core uses, and why i've avoided it so far)
12:03 batman i see... i was thinking i would just use dirname() :/
12:07 kes err: Useless use of a constant ("a") in void context at Mojolicious/Plugin/Config.pm:13
12:07 kes if configuration file is: {(), a => 1 }
12:08 kes But { a => 1 } works fine
12:12 kes ah. This is counted as block and not as hash ref
12:13 kes I should use '+' sign: +{(), a=>1 }
12:22 crab sri: i looked at Mojo::File and i'm positive overall
12:25 batman kes: why do you have "()" ?
12:30 kes batman: http://paste.scsys.co.uk/540520
12:31 kes I like it and this gives some benefit
12:32 ashimema hmm.. think I'm getting somthing wrong in my understanding of minion tasks..
12:33 ashimema on a fw of my tasks I sometimes get a 'result' of "Non-zero exit status (255)"..
12:33 ashimema but I'm not sure where that's coming from.. anyone able to point me in the right direction?
12:37 crab that's a very haskelly thing to do (, foo)
12:49 Janos joined #mojo
12:56 sh14 joined #mojo
13:36 batman kes: really glad i don't have to read your programming code
13:36 kes )
13:37 batman s/programming//
13:40 kes is that really scaring?
13:42 Lee kes: just put the semicolon on a new line if it bothers you that much
13:42 gryphon joined #mojo
13:42 Lee (in the first example)
13:42 Lee i think you're asking for a debugging nightmare at some point doing it the way in the paste
13:44 Lee egadz that config example :(
13:50 sri this is why i don't want to help kes anymore, he intentionally makes things as difficult as possible
13:53 sri i mean, if you want to improve your job security that's between you and your employer... but spare the open source community at least!
13:55 Lee i *really* don't understand that config example, perl supports trailing commas already!
13:55 sri it makes no sense
13:55 Lee gah! i've lost my train of thought now
13:56 Lee cannot unsee !
13:56 sri that paste is pretty close to assault
13:58 * sri does feel physical pain looking at it
14:04 eseyman that paste does remind me of the saying "code is read more than it is written and should be written with that in mind"
14:07 * jberger yawns
14:07 kes not every thing is bad as that: http://paste.scsys.co.uk/540523
14:08 jberger Perhaps kes doesn't know that the leading comma style is intended for languages which don't allow a trailing comma?
14:09 jberger Also I'm fairly sure (though i haven't tried) that it allows a leading comma too, so the () shouldn't be necessary
14:09 kes no, without () it is counted as undef
14:10 jberger Ah
14:10 Lee jberger: for a hash? no
14:10 Pyritic joined #mojo
14:11 jberger I guess that makes sense
14:11 * jberger needs coffee
14:11 purl Bloody addict
14:11 * Lee needs tea
14:11 Lee :)
14:11 nic addict
14:11 jberger Oh what purl, you're ok with tea addicts are you?!
14:12 Zen_ some tea also contains c8h10n4o2
14:12 Lee although i will be having herbal tea
14:13 Lee for a moment i thought that was elite speak
14:13 Lee soo much for my chemistry degree...
14:13 Zen_ :)
14:14 nic oh, I assumed you'd accidentally pasted your password
14:14 Zen_ that would be a really crappy password
14:15 jberger But tasty
14:15 nic yeah, how is anyone going to remember a password that doesn't match Password[0-9] ?
14:15 nic If anyone is wondering why lawyers only drink Earl Grey...
14:16 nic it's cos proper tea is 90% of the law
14:16 Lee nic++ # tea connoisseur
14:16 jberger Captain Picard isn't a lawyer
14:23 jberger https://media.tenor.co/images/09f6ca2753d2e27e8c9ba50437cd645c/raw
14:27 * sri started drinking chai tea
14:28 * Zen_ likes mate
14:37 jberger both good choices
14:40 gizmomathboy joined #mojo
15:18 dikim joined #mojo
15:22 lluad joined #mojo
16:30 sri downside of working for suse... sometimes you end up being responsible for making something like this maintainable :S https://github.com/openSUSE/desktop-file-translations/blob/automation/50-tools/update-po-files.sh
16:31 Janos joined #mojo
16:33 lluad That actually looks a lot healthier than I was expecting from the .sh suffix.
16:41 asarch joined #mojo
16:55 vicash The Hindi word for tea is "chai", so "chai tea" seems redundant to me
16:56 Zen_ hehe, I wanted to say that before
16:56 vicash it's marketing
17:00 stryx` joined #mojo
17:06 mcsnolte joined #mojo
17:08 jabberwok vicash: In Arizona there are landmarks like Table Mesa and Picacho Peak (from the Dept of Redundancy Dept)
17:28 pink_mist <kes> no, without () it is counted as undef <-- no, without () it is a syntax error
17:28 pink_mist kes: but seeing as perl allows trailing comma, just use that instead
17:30 dod joined #mojo
17:35 pink_mist jabberwok: on Qi they mentioned a hill in the UK which had a name that would be translated as the Hill Hill Hill Hill or something (might have only been 3 Hills, not sure)
17:36 pink_mist ah, this place: http://quiteinteresting.wikia.com/wiki/Torpenhow_Hill
17:37 lluad And the river Avon. And the majestic  river"Your finger, you fool."
17:43 PryMar56 joined #mojo
17:54 disputin joined #mojo
19:06 disputin joined #mojo
19:26 Janos joined #mojo
19:28 wingfold joined #mojo
19:35 khfeng joined #mojo
19:39 khfeng_ joined #mojo
19:43 bobkare joined #mojo
21:19 Janos joined #mojo
21:23 sri batman: re ->parent, does that mean you won't try?
21:33 jberger sri (batman): I haven't followed this I guess, what need trying re parent?
21:37 sri jberger: ->parent is hard to get right because of porability, root dir, volumes and stuff
21:38 sri right now Mojo::File sidesteps that problem
21:39 sri batman prolly thought a splitdir/pop/catdir would do
21:40 preaction symbolic links, i think, break that case
21:41 jberger as it stands now dirname is basically a simplistic "parent" right?
21:42 jberger or does that only work once?
21:45 jberger catfile with File::Spec::updir and then apply Cwd::realpath to normalize and effectively move up?
21:45 sri you're guessing ;p
21:45 jberger I am, but in fairness I've thought about it for about 30s
21:46 marcus that's how security issues are made
21:46 * jberger looks at Path::Tiny
21:46 sri yea, i'll only add 100% proven things to Mojo::File
21:47 marcus sri++
21:47 jberger wow, Path::Tiny::parent aint too pretty
21:47 sri think for core use we only need a non recursive ls now
21:47 sri then it's mostly feature complete for a first release
21:52 irqq joined #mojo
21:56 jberger dirname mostly does what you want in parent anyway
21:57 jberger perl -Ilib -Mojo -E 'say f(shift)->dirname->dirname' `pwd`
21:57 jberger question, do we want to use "dirname"? does "dir" or "directory" sound better?
21:58 * jberger should shut up
21:58 sri it alreay does cwd when you call path() without arguments
21:58 jberger oh
21:58 jberger neat
22:02 jberger rereading the doc for the File::Basename functions, probably better to leave them that was to keep the linkage of understanding there
22:42 disputin joined #mojo
23:51 odc joined #mojo

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