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

IRC log for #mojo, 2016-02-09

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

All times shown according to UTC.

Time Nick Message
00:05 disputin joined #mojo
01:12 batman joined #mojo
01:42 mspo how common is the minion -> minion -> minion flow?
01:46 bpmedley mspo : I'm not sure what you mean.  Can you describe with more words?
01:48 mspo have a job that enqueues more jobs
01:49 bpmedley mspo : I've heard of other people enqueue from a running job.
01:49 mspo I am trying to setup a task that has two long running parts but they could run independently
01:50 bpmedley Are you having issues?
01:51 jberger mspo: imo it's a totally valid workflow
01:53 mspo no just getting started with this thing
01:53 vicash mspo: are you talking about conditional enqueueing, where more jobs are enqueued if results of the previous jobs are acceptable ? I would be interested in that too.
01:53 mspo my plan was to use rabbitmq but the client libs all seem to suck
01:53 sri yea, jobs creating jobs is totally normal
01:53 bpmedley mspo : Awesome, sounds like what you want to do will work well.. :)  What are you working on, may i ask?
01:53 mspo bpmedley: an aws thing
01:54 mspo bpmedley: hopefully I will be able to get some testers in the next few days
01:54 mspo if you use s3 at all let me know :)
01:54 bpmedley Cool.  Sounds like Mojo::UserAgent and Minion will be you friends.
01:55 sri peoples expectations for scheduled jobs are pretty wild... i might just scrap the feature :p https://github.com/kraih/minion/issues/24
01:55 vicash sri: i just gave an example. scheduling jobs is context sensitive
01:56 bradjm joined #mojo
01:57 mspo sri: http://nerds.airbnb.com/introducing-chronos/ or vanilla mesos was the recommendation I got for that at a large-ish scale
01:59 mspo but yeah it's common
01:59 mspo I think I've talked about some of my work's scheduled jobs using laravel artisan before
01:59 sri seriously, i'm interested in traditional job queues
01:59 sri as used by big web apps
02:00 mspo we do periodic but frequent large data pulls from a bunch of sources, munge them into another db, build solr indexes from them, and use it on a live site
02:02 mspo the more obvious web app stuff like scheduled or spaced publishing of content groupings
02:02 sri celery is pretty much the most underwhelming so far http://docs.celeryproject.org/en/master/userguide/periodic-tasks.html
02:02 mspo like if we import a big batch of stuff from $writers and want to release them throughout the day in a more natural look
02:02 sri just a separate daemon
02:03 sri i'll be damned
02:03 sri almost all of them do that
02:04 sri this is resque doing the same https://github.com/resque/resque-scheduler
02:05 mspo how else would it be done?
02:05 mspo quartz is an in-jvm cron
02:06 sri by one of the workers
02:06 sri the cluster could have an election process, where one of the workers becomes the scheduler
02:06 sri when the scheduler vanishes, the election process restarts
02:06 mspo so just a scheduler worker? :)
02:09 mspo I can tell you one thing many of these systems seem to lack is a way to query them effectively
02:09 sri i don't know what that means
02:09 mspo I am scheduling jobs to do work on behalf of logged in users
02:10 mspo so if I could get the list of jobs with that user as a key or something
02:11 vicash sri: why not use Gearman ? it seems to be doing everything that a job queue needs to do.
02:11 mspo app->minion->query_queue(key => $userid)
02:12 sri is gearman being maintained anymore?
02:13 sri thought it was in the same boat as Danga::Socket
02:18 sri lol, this is the perl binding the site recommends https://metacpan.org/pod/Gearman::XS
02:18 vicash the last update was in 2014-12 for Gearman::Server as per metacpan. however, maybe there are no more features to add. not sure if it is being maintained.
02:19 sri 2013... and cpantesters says 15 ok 13 fail
02:20 sri vicash: so, why should i want to use gearman?
02:21 mspo fork it/steal it
02:23 sri honestly, whenever i see Danga stuff, it makes me think "yea, that looks like it was very reasonable in the 1990s"
02:24 vicash sri: i agree. it isn't clear as of now. however, the principles will eventually be the same where it boils down to message broker based architecture for scheduling.
02:24 vicash currently for my project, I am using Minion to enqueue jobs onto Slurm
02:25 vicash i have to look at RabbitMQ one day to see how they do stuff
02:25 sri not at all, to me it looks like gearman is deliver and forget
02:26 sri minion is totally stateful, it records exactly what happens to a job, possibly even a result
02:26 sri does it even resquedule on failure?
02:27 vicash yes that's definitely an advantage of minion. I am using jberger's suggestion to open a pipe and run a command-line command and retrieve outputs accordingly and mark those as results for minion's jobs.
02:29 sri rabbitmq is a delivery mechanism
02:29 vicash i know Slurm reschedules on failure if you set the option for that particular job.
02:30 noganex_ joined #mojo
02:30 sri there are different types of job queues, minion uses one backend for everything, celery for example uses a delivery backend (like rabbitmq) and a persistence backend like postgres
02:31 sri ruby job queues mostly use redis for everything
02:35 noganex joined #mojo
02:39 jberger someday in the far-flung future (or if someone else wants to do it) I would love to make a better Mojo module for RabbitMQ
02:39 jberger we were just starting to use it when $previous_job went under
02:40 jberger but I found that while in concept RabbitMQ could have a very Mojo interface if done right, the existing stuff had a huge api mismatch for mojo
02:42 mattp_ sri: what is difficult to get right about cron based tasks?
02:45 jberger mattp_: cron-based or cron-like?
02:45 jberger the idea is when you want/need to get away from cron
02:45 jberger cron is good for what cron is for
02:45 mattp_ jberger: i assume the latter in this case
02:45 jberger right
02:45 jberger so the hard part is that in minion (and most other queues it seems) the guts of the system is a database
02:45 jberger and therefore you need something to trigger jobs if they are going to be periodic
02:45 jberger databases don't do that
02:46 mattp_ ah, without a running scheduler process. i see the problem you describe now
02:46 jberger exactly
02:46 jberger at which point you are looking at a single point of failure (back to just using cron again) or you need to do something complex like elect a scheduler from a pool
02:47 sri yea
02:48 sri also with cron you might get duplicated jobs
02:48 sri say you enqueue the same job every 5 minutes, but for some reason the old job did not get performed yet
02:48 mattp_ why is running a scheduler process a big deal? if youre already committed to managing N workers
02:49 sri it's a single point of failure
02:50 sri minion as it stands doesn't have that
02:50 sri if you database has failover
02:51 mattp_ sri: re; election process is that something youd want baked into minion?
02:52 mattp_ i guess the whole low dep thing would throw the idea of using consul/etcd out the window
02:52 jberger the nice thing about the spot we are in it actually the opposite, nothing being discussed couldn't be done externally as a module
02:52 jberger consul would be way out
02:53 jberger but you would be welcome to build somethign based on it
02:53 sri that's true, a job scheduler could just be a 3rd party module
02:54 jberger I have a half finished job scheduler in the works not for periodic jobs but for job dependency trees
02:55 jberger it doesn't need any core minion features added (that haven't already been added ;-P )
02:55 mattp_ jberger: you reminded me i was looking at https://pypi.python.org/pypi/luigi earlier today
02:56 sri also been thinking about job progress updates and logging
02:57 jberger mattp_: that's interesting, I should look at it
03:04 bradjm joined #mojo
03:06 Grinnz just added https://github.com/Grinnz/maverick/blob/master/lib/Bot/Maverick.pm#L472-L482 to convert from Mojo::IOLoop::ForkCall-like callbacks to futures in my bot, man that was a bit of a mind bender (you can see it used in the fork_call method below it)
03:07 rabbit joined #mojo
03:07 rabbit I'd like to ask a cookie question. Does this cookie expire in 60 seconds? I'm assuming time is the same as Perl time, and we are working in seconds, but just want to double check
03:07 rabbit $c->cookie(user => 'sri', {domain => 'example.com', expires => time + 60});
03:08 Grinnz thats correct
03:09 rabbit great, thank you.
03:10 mspo jberger: rabbitmq is nice but the perl clients aren't fun to use
03:12 noganex_ joined #mojo
03:13 jberger Grinnz: what's with that sereal serializer pair?
03:13 Grinnz because Sereal is better than Storable
03:13 jberger Is that wrapping some other serializer?
03:14 Grinnz pretty sure i've mentioned this to you :P
03:14 mspo rabbit: why not use the session
03:14 Grinnz but yeah its just using Sereal
03:14 jberger Grinnz: I have no love for Storable
03:15 bradjm mspo: what's wrong with the perl clients, clunky apis? or more serious problems?
03:15 jberger So why does it wrap the existing serializer?
03:15 Grinnz what do you mean?
03:15 Grinnz oh, $self->serializer is from the bot object not the forkcall lol
03:15 bradjm (just curious, I haven't used any of them)
03:16 jberger Grinnz: oh
03:16 Grinnz sereal_encode_with_object($serializer, $data) is equivalent to $serialize->encode($data) just without the method call
03:17 jberger Ok that makes more sense :p
03:19 jberger bradjm: I don't follow your thread, sorry there are a few conversations going on here at once
03:19 jberger Client to what?
03:20 mspo bradjm: yeah, clunky
03:20 mspo bradjm: not well documented
03:20 mspo abandoned-feeling maybe
03:20 bradjm jberger: no worries, was just asking mspo why they didn't like the perl rabbitmq clients
03:21 jberger Ahh yeah, same
03:21 jberger Like I said earlier, their apis don't really mesh with mojo well
03:22 jberger Not for any technical reason
03:22 jberger Grinnz: that future wrapper is interesting
03:24 jberger I'm not sure it makes me want to switch mind you :p
03:24 jberger I'm not sure what adopt_future is but it looks hairy :D
03:25 Grinnz jberger, futures normally go out of scope if they're not held onto by anything
03:26 Grinnz normally you create the future from the event loop, which automatically adopts it, but i'm not using IO::Async so i cant do that here
03:27 jberger Ahh
03:27 Grinnz the nice thing is, since a "chain" of futures is really just one parent future which contains a bunch of others, you only have to adopt the last future you get back
03:29 Grinnz so i have my bot commands run a callback, and if the callback returns a future, it adopts it
03:29 Grinnz and that takes care of all the normal cases
03:31 jberger It makes sense
03:32 Grinnz generally i've found that switching my bot to futures makes for less hairy code where i'm using the futures, and more hairy code in the backend, lol
03:32 jberger Someday I'll wake up after enough of these conversations and futures will just make sense to me
03:32 Grinnz you really have to use them to make sense of it, at least i had to
03:34 jberger Delays make me write a few lines of boilerplate each time but it's not enough to make me feel like I need to try futures
03:34 jberger I'm not sure what would get me there
03:35 sri you need a promises based ecosystem
03:36 Grinnz yeah it really helps having everything in the system based on futures, hence why i wrote that wrapper
03:36 sri like go all in with IO::Async
03:36 sri i bet if mojolicious went all promises it would get popular :)
03:39 Grinnz you know how I feel about the various ways of error handling for delays, error handling in the promises approach is so straightforward, thats the big thing for me
03:40 jberger Grinnz: I always do the same thing on errors in delays
03:40 pink_mist run away screaming?
03:40 Grinnz lol
03:40 Grinnz jberger, yeah and I'm doing that for Mojo::WebService::Twitter, but just because it's consistent doesn't mean it's pretty
03:41 jberger die on them in the steps early, and attach a catch handler that calls your callback with the error
03:41 jberger That's the boilerplate I mentioned
03:42 jberger The errors just bubble up, it feels very natural to me
03:42 Grinnz with futures, I do no error handling at all
03:42 Grinnz basically
03:42 sri how would you even promisify Mojo::UserAgent?
03:42 Grinnz attach an on_fail to the adopted future, and thats that
03:43 sri so, Mojo::UserAgent generates a $tx
03:43 sri what does rejected get?
03:43 sri the $tx?
03:44 Grinnz it could, i suppose, i've always gone with an exception-like thing for that
03:44 sri so, now you make special exception objects? ;p
03:47 Grinnz the trouble with the whole chain sharing error handling is that then you have to handle errors from different things in the same way... maybe theres a way to 'split it up' but i havent dug into that part yet
03:52 Grinnz also i think i'm actually at a point where i can release this twitter api client now :o
03:53 jberger Grinnz: nice
03:54 jberger Be sure to blog about it when you do
03:54 Grinnz hrm... blogs... dont think i have any of those
03:59 sri guess the main focus for minion will be the ui now
04:00 sri would be nice if i had two free weeks to make something pretty
04:31 mspo does minion worker detect file changes?
04:35 mcsnolte joined #mojo
04:40 cpan_mojo Mojo-WebService-Twitter-0.001 by DBOOK https://metacpan.org/release/DBOOK/Mojo-WebService-Twitter-0.001
04:43 * Grinnz compares https://widgets.stratopan.com/wheel?q=Net-Twitter-4.01010&runtime=1&fs=1 to https://widgets.stratopan.com/wheel?q=Mojo-WebService-Twitter-0.001&runtime=1&fs=1
04:43 Grinnz teehee
05:07 kaare joined #mojo
05:18 inokenty-w joined #mojo
05:56 cpan_mojo Mojo-WebService-Twitter-0.002 by DBOOK https://metacpan.org/release/DBOOK/Mojo-WebService-Twitter-0.002
05:57 rabbit I'm wondering if there is a way to extract all cookies at once (in a hash or array) rather than one by one
05:57 Grinnz https://metacpan.org/pod/Mojolicious::Controller#every_cookie
05:58 Grinnz oh, all names
05:58 rabbit A yes, I remember that one now. Thanks.
05:58 Grinnz https://metacpan.org/pod/Mojo::Message::Request#cookies
05:59 Grinnz that returns an arrayref i believe
05:59 rabbit great. Yes, I see that every_cookie is actually not what I want; so I will that. Thanks.
07:39 Shaeto joined #mojo
07:51 sugar joined #mojo
08:00 osfabibisi joined #mojo
08:11 dod joined #mojo
08:11 Vandal joined #mojo
08:17 dod joined #mojo
08:22 trone joined #mojo
08:25 McA joined #mojo
08:26 rwp joined #mojo
08:33 AndrewIsh joined #mojo
11:02 punter joined #mojo
12:07 dod joined #mojo
12:29 asarch joined #mojo
13:25 mdom joined #mojo
13:27 mdom I have a html fragment in cp1252, all code points that are not in cp1252 are represented as character entites
13:27 mdom I decode the html fragment create a new Mojo::DOM objekt, transform it and need to output it again as cp1252
13:28 mdom If i simple Encode::encode it, i loose all character not representable in cp1252. Is there a way with Mojo::DOM to transform those? Or is there another easy way to achieve it that i just don't see?
13:30 jberger certainly mojo doesn't know what characters are or aren't representable in cp1252
13:31 mdom I can provide a list of characters that need to be converted
13:31 pink_mist use HTML::Entities to encode?
13:31 mdom I'm not sure if i can jusr call HTML::Entities on the result of to_string?
13:32 mdom Can something evil happen? Can i substitute stuff i shouldn't? Like cdata or whatever?
13:32 mdom Or do i need to call HTML::Entities on every text node?
13:32 pink_mist ¯\(°_o)/¯ try it and see
13:33 jberger mdom: sorry I really don't know
13:33 jberger I agree with pink_mist, try it
13:35 mdom If i call $node->content('ě') it's converted to '&x11b;' so working on text nodes seems to not work
13:37 mdom And calling HTML::Entities on the html string does work, i just wonder if there are some cases where i will break stuff by doing that
13:38 mdom And it's hard to test those... :)
13:38 mdom But thanks, i'll see
13:39 jberger mdom: you don't want to encode the &#x form directly
13:39 jberger or maybe I'm not understanding
13:40 jberger ok I understand
13:43 pink_mist I believe Encode.pm can provide a way to catch errors and act on them: https://metacpan.org/pod/Encode#coderef-for-CHECK
13:43 mdom jberger: If that would work i could just iterate over the text nodes and call HTML::Entities on them
13:43 pink_mist which you could then use to encode entities from whatever your encoding step can't manage
13:45 mdom But i would again work on the complete html string and not just on the text nodes ... which might be okay ... *mhhh*
13:47 pink_mist this would only happen for the exact characters that otherwise made the encoding operation croak
13:47 neilhwatson joined #mojo
13:48 pink_mist if the browser expects the source to be in a certain encoding, it'd better all be in that encoding
13:48 jberger I'm working without expertise here, but it seems that the problem is the html node being text vs raw here: https://github.com/kraih/mojo/blob/master/lib/Mojo/DOM/HTML.pm#L196-L201
13:49 pink_mist (why you aren't using utf8 though, I can't understand)
13:50 jberger pink_mist: cp1282 I assume "because the boss says we use microsoft"
13:51 pink_mist *52
13:52 pink_mist well yes, I assume there's some legacy software of some kind that can only deal with cp1252; I wondered if that was actually the case, and if that software isn't available in a better version or if it's homegrown if they can't just fix it
13:53 Caldrin left #mojo
13:58 kes joined #mojo
14:00 kes is it OK to check multiple values like this: http://paste.scsys.co.uk/505166
14:00 kes ?
14:01 kes $v_rows is 'Mojolicious::Validator::Validation' object
14:03 mdom pink_mist: No, it's a big publishing engine for newspapers, there might be a new version in some distant feature that serves utf8 but not today
14:04 ribasushi pink_mist: us/eu windows platforms are like 95% 1252
14:05 ribasushi utf8 is virtually unheard of in the asp world
14:05 mdom The engine is even written in perl, so there's no reason not to use the native encoding or utf8, but oh my
14:06 jberger mdom: I don't see any officially approved way to change a node's type, I can think of a gray-area way but I'm not sure I should recommend that
14:07 mdom jberger: Than better refrain ... this is code that needs to work if i'm on vacation... :)
14:07 mdom s/Than/Then/
14:09 mdom ALthough it would be sweet to be able to put characters entities in text nodes ... maybe there could be a way to say "this data is already safe, do not touch it"
14:10 chienjo joined #mojo
14:10 chienjo_ joined #mojo
14:12 jberger mdom: wait a minute ...
14:12 jberger if the problem is double encoding doing it that way, can't you just put in the literal and let it get encoded?
14:13 pink_mist I thought the problem was outputting into cp1252
14:13 jberger pink_mist: mdom is pre-encoding things which cp1252 doesn't support
14:13 jberger as html entities
14:14 pink_mist that's the first step
14:14 jberger oh nevermind, my idea doesn't work either
14:15 mdom jberger: You mean "\x{11b}"? Sure but how do i or some part of mojo::dom converts that to ě
14:15 jberger yeah, I was wrong
14:16 jberger the problem is that its encoding the &
14:16 jberger http://mojolicious.org/perldoc/Mojo/Util#xml_escape
14:16 jberger it isn't escaping unicode to entities, just & to &
14:16 jberger so your original problem would remain
14:17 mdom I have the same problem with libxml: XML::LibXML->load_html(string => "<p>&#x011b;</p>", encoding => 'WINDOWS-1252')->findnodes('//p')->get_node(0)->toString(0,1) => '<p></p>'
14:17 mdom Which is even worse as i loose a character
14:18 mdom Without warning, totally crazy
14:33 ramortegui joined #mojo
14:40 ashimema I'm using Mojo::JSON::MaybeXS and it certainly loading Cpanel::JSON::XS correctly.. is there a way to change some of the settings
14:40 ashimema for instance.. changing the max nested depth?
14:42 ashimema monkey_patch perhaps looks like what I'm wanting
14:42 Grinnz there isnt currently, but it's simple code so you're welcome to monkey patch it yourself
14:42 Grinnz https://metacpan.org/source/DBOOK/Mojo-JSON-MaybeXS-0.010/lib/Mojo/JSON/MaybeXS.pm
14:43 ashimema haha.. was just reading that code :)
14:43 ashimema glad my question made sense to start with to be honest ;)
14:44 ashimema looks relatively trivial :)
14:45 wingfold joined #mojo
14:47 mdom Harhar, i mean i can always set $node->tree->[0] = 'raw' and then i can do what i want .... :)
14:47 Grinnz https://s-media-cache-ak0.pinimg.com/564x/58/ab/9d/58ab9d580b07f5ffcf75764bb8576b7c.jpg
14:48 genio heh.  that was going through my head, too.
14:51 mdom Do you think providing a way to enter data that is not escaped is something that would get approved?
14:52 mdom Like $node->content(\"do not escape me")
14:56 ashimema haha.. that max_depth was actually protecting me form another problem entirely :)
14:57 jberger mdom: that has been considered before
14:57 jberger the performance cost is too high
14:58 mdom calling ref on $_[1]?
14:58 mdom Maybe making type a setter?
14:58 jberger mdom: monkeying with the tree directly was my gray-area solution but that's more black than gray I think
14:59 ribasushi now I am curious if `ref $foo` can really show up on a profile
14:59 mdom But yeah, making it a setter sound also dangerous
14:59 jberger ribasushi: it isn't ref $foo, it would be this: https://github.com/kraih/mojo/blob/master/lib/Mojo/Util.pm#L345
15:01 jberger the only other thing i'm thinking about would be adding like a "raw_replace" which would change the content and change the type to raw
15:01 jberger its opaque relative to the tree structure
15:02 mdom Okay, i have to fetch my kid, i'm checking in later ... but thanks for all the help!
15:02 jberger yeah, I have to get off to work too
15:02 mdom jberger: That sounds good!
15:02 ribasushi jberger: the cost of an extra 'eq' added to the ternary is going to be dwarfed 1000:1 by the actual method call to xss_escape
15:02 ribasushi I'd put together a demo if you don't believe me out right
15:03 jberger its only a function call not a method
15:03 ribasushi either way - it's entersub that is incredibly costly
15:03 ribasushi method lookup is cached post first call anyway
15:04 jberger anyway, the render method is called recursively a ton, performance matters at any level
15:04 * jberger biab
15:05 ribasushi ok demo time, as you don't really get it
15:05 ribasushi bbl ;)
15:08 mcsnolte joined #mojo
15:10 sri for the record, Mojo::DOM is benchmarked with https://html.spec.whatwg.org
15:10 sri so, if you do any changes, benchmark it against that page
15:14 * pink_mist wonders if sri has a handy alias defined in his .bashrc for running that benchmark
15:14 sri perl -Ilib -Mojo -E 'my $html = b("../../html5.html")->slurp->to_string; my $dom;n { $dom = x($html) }; n { $dom->to_string }'
15:14 sri that'll do for starters
15:15 sri so, if you exchange xml_escape in Mojo::DOM::HTML with xss_escape the results change significantly
15:15 sri 1.28452 wallclock secs ( 1.23 usr +  0.05 sys =  1.28 CPU) @  0.78/s (n=1)
15:15 sri 1.52393 wallclock secs ( 1.47 usr +  0.05 sys =  1.52 CPU) @  0.66/s (n=1)
15:15 sri before and after
15:17 sri and if you only change the one for text nodes
15:17 sri 1.43986 wallclock secs ( 1.39 usr +  0.04 sys =  1.43 CPU) @  0.70/s (n=1)
15:17 sri so yea, it's pretty significant
15:17 sri and that matters because that's how we handle the escaping issue in the template system
15:18 sri http://mojolicious.org/perldoc/Mojolicious/Plugin/TagHelpers#tag
15:18 sri no wait, we don't anymore ;p
15:19 sri ignore that part
15:20 sri but, whatever you do in Mojo::DOM::HTML, does matter for it https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/TagHelpers.pm#L182
15:22 jabberwok hm, are those Larry Wall Clock seconds?
15:23 sri i have never heard that joke
15:26 ribasushi I take the "will dwarf" part back, preliminary testing indicates that it matters
15:26 * ribasushi times more to present accurate results
15:27 sri fir the record, in a perfect world we would just do this https://gist.github.com/anonymous/a6e6eb5089d7711527d1
15:27 sri s/i/o/
15:28 sri then ->content(Mojo::ByteStream->new('...')) would not get escaped
15:29 sri but in our reality it's a massiver performance hit
15:38 ribasushi http://paste.scsys.co.uk/505195?tx=on
15:38 ribasushi ^^ that's what I get, on a low-state-locked CPU
15:39 ribasushi "oneliner" is runnable as-is in a terminal
15:40 ribasushi two refs (checked in a row) indeed is notably slower :(
15:40 ribasushi otoh checking the "common case of nonref" first seems to bring it back to "negligible diff"
15:41 dod joined #mojo
15:42 sri wow, that is actually true
15:42 sri with a length(ref $_[0]) check it goes way down
15:42 sri 1.34788 wallclock secs ( 1.28 usr +  0.06 sys =  1.34 CPU) @  0.75/s (n=1)
15:43 ribasushi ! ref $_[0] is likely even faster
15:43 dod joined #mojo
15:43 ribasushi I always use length ref to catch bless( $foo, '0' )
15:43 ribasushi which for your case hardly matters
15:44 sri oh wait, i made a mistake :(
15:44 sri it is worse in this case
15:44 * sri was on the wrong branch
15:44 jberger omg, I never thought of "package 0;"
15:44 ribasushi what is the diff you are testing?
15:45 ribasushi sri: ^^
15:45 Grinnz_ jberger: package name can't actually start with a 0, but you can still bless a ref into that
15:45 Grinnz_ if you're sadistic or something :P
15:45 jberger yeah, makes sense, still ewwwwww
15:46 sri https://gist.github.com/anonymous/fab5c45b1830dc5db482
15:46 sri and the length(ref $_[0]) is never true
15:52 ribasushi sri: http://paste.scsys.co.uk/505197?tx=on
15:53 ribasushi according to this if you drop length you should see difference
15:54 ribasushi anyway - all of the above is microbench - there may be other considerations when running within Mojo itself
15:54 sri it might be a tiny bit faster, but not enough to really make a difference here
15:54 ribasushi but adding an extra "unlikely" ref shouldn't change much based on that
15:55 ribasushi s/ref/refcheck/
15:55 * ribasushi just was curious op-wise how it looks is all, no horse in the game ;)
15:57 sri "ref $_[0] &&..." is also insignificant
16:01 ribasushi I'd be surprised if it was in the grand scheme of things - all the numbers I cited are 10k runs
16:01 ribasushi i.e. in the worst case my shitty laptop does 4.5 million / sec of these
16:01 sri it's the extra function calls that make the difference
16:02 jberger time for some mojo custom ops!
16:02 sri if i deal with the refs in xml_escape there is no measurable cost
16:02 ribasushi sri: exactly, which was jberger's original comment (that it'd matter) which lead me to write the benches :)
16:03 sri this is silly
16:03 sri we want xss_escape semantics everywhere
16:04 sri and we can totally have it if we turned xml_escape into xss_escape
16:04 sri xml_escape is not actually used anywhere else
16:08 sri this patch has no measurable performance impact https://gist.github.com/anonymous/65b86b7461bc31113ea5
16:09 robinsmidsrod joined #mojo
16:10 ribasushi ... ergo having special \' ... ' handling is doable with no perf. penalty
16:11 sri i don't understand that reference
16:11 ribasushi <mdom> Like $node->content(\"do not escape me")  <jberger> the performance cost is too high
16:11 ribasushi sri: ^^ I started digging because of this exchange
16:12 jberger ribasushi: I was never considering \"stuff"
16:12 sri ->content is no a hotspot, it should be totally insignificant
16:12 sri +t
16:12 jberger I was considering Mojo::ByteStream as that is the mojo way
16:12 ribasushi jberger: then I entirely misunderstood, apologies
16:13 sri $node->content(\"do not escape me") is inconsistent with everything else though
16:13 sri what would it do if $node is a tag?
16:14 ribasushi mdom: ^^ that's your baby now ;)
16:14 jberger ribasushi: ah, that clears a bit up then
16:14 jberger no apology needed, but appreciated all the same
16:20 sri at least i know now that nobody actually looks at the patches i paste ;p
16:22 vicash hello. i am trying to unit test a portion of my application that enqueues minion jobs. in test mode, the job does nothing but mocks a result and sleeps 5 seconds. However, $t->app->minion->perform_jobs returns immediately. Is the perform_jobs call async ? The code is supposed to invoke the job before dequeueing it as I understand it.
16:25 jberger sri: why do you say that?
16:25 sri because my last one was just plain wrong :)
16:25 jberger vicash: perform_jobs should be blocking
16:26 jberger ah, yep
16:26 jberger shifty shift
16:26 vicash jberger: i would think so. my job is not being invoked. do I need to create a worker object too ?
16:26 jberger are you sure you have the right task/job names
16:27 jberger add_task "this", enqueue "that" and nothing gets done
16:27 vicash yes I am sure since there is only one task that I have added and am enqueueing. but I can test that actually using Minion attributes.
16:28 vicash the funny thing is that the app works when I use it from a browser with a worker running. just the unit test fails
16:29 jberger well I wouldn't be able to help without seeing code, I have used perform_jobs successfully in tests before
16:30 sri same here
16:30 vicash jberger: i think i got it. I have a delay of  1 second setup in the job. $minion->enqueue(myjob => [@args] => { delay => 1 })
16:30 vicash is that the problem ?
16:30 PryMar56 joined #mojo
16:30 vicash i can remove it and check
16:30 sri allright, should we deprecate xml_escape or xss_escape? :)
16:31 vicash jberger: yes that was the problem. now it works as expected.
16:32 jberger I'd deprecate xss_escape
16:32 vicash jberger,sri: so how do I allow for a delay in enqueueing in the unit test ? just sleep 1 second before perform_jobs is called ?
16:32 perlpilot joined #mojo
16:33 jberger vicash: that would probably suffice, kinda ugly, but as long as its only 1s its probably ok
16:33 vicash yea that should work for now and i will deal with it later.
16:34 vicash thanks!
16:34 sri ah, xss_escape makes sense, since it is not exposed in Mojo::ByteStream, so the least impact
16:34 sri also no tests breaking, so a very clean deprecation
16:41 bwf Trying websocket with wss:// URL but debug output has it switched to https://
16:41 bwf https://gist.github.com/bfaist/ba5cdb5e234a8d1fb0e3
16:43 sri the handshake is http
16:44 bwf ok
16:47 good_news_everyon joined #mojo
16:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgzLg
16:47 good_news_everyon mojo/master ccbd7e9 Sebastian Riedel: deprecate Mojo::Util::xss_escape in favor of Mojo::Util::xml_escape
16:47 good_news_everyon left #mojo
16:48 sri there we go, it's actually a performance gain for templates :)
16:48 sri a bad stringify in xss_escape was eating up cpu like crazy
16:49 sri "$str = "$_[0]"" vs "$str = shift // ''"
16:49 sri obvious when you think about it
16:50 sri suppose the "$_[0]" was cargo culted from a silly previous implementation of the xss feature
16:51 sri the difference is actually significant enough for a 0.1s difference in the html5 benchmark
16:52 sri interesting side effect is that we now have exceptions for b('<div>') on all layers
16:52 sri from tag helper to Mojo::DOM
16:53 sri including attributes
16:54 jberger sri++
16:54 jberger mdom: there you go
16:54 sri whoever donated earlier to the "let sri work more on mojo fund", this performance optimization is yours!
16:54 jberger perl -Ilib -Mojo -E 'my $x = x("<p>hello world</p>"); $x->at("p")->child_nodes->first->content(b("hello &#x11b world")); say $x'
16:55 sri lets see if we can add some hints into the docs
16:56 sri it's not a very fancy feature, but i like the consistency
16:58 sri there are a few edge cases though
16:59 sri $node->append_content('whatever') will kill the Mojo::ByteStream wrapper
17:04 jberger but that is the usual behavior with Mojo::ByteStream
17:04 jberger $string .= b("anything"); ref $string # undef
17:05 sri it kills it because internally it works like $node->[1] = $node->[1] . 'whatever'
17:05 sri i'm not particularly concerned with it
17:15 disputin joined #mojo
17:21 * jberger wonders about overloading '.' on Mojo::ByteStream
17:21 jberger I assume that that is totally insane
17:21 jberger it would certainly be a breaking change
17:23 sri the actual implementation stringifies ;p
17:23 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/DOM.pm#L233
17:24 jberger yeah, but I mean overload '.' to make b("a") . "b" === b("ab")
17:24 jberger (pseudocode of course)
17:28 ribasushi jberger: that's hardly inconsistent
17:29 ribasushi "string interpolation of $thing will invoke the ',' overload anyway"
17:29 ribasushi not the "" overload (it works most of the time due to '.' being auto-generated form ""
17:29 jberger it makes my head hurt
17:30 jberger overloading is hard, let's go shopping
17:30 jberger or more precisely, /me goes to get lunch
17:33 cpan_mojo JSON-Validator-0.66 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/JSON-Validator-0.66
17:34 rabbit joined #mojo
17:35 jontaylor joined #mojo
17:36 rabbit because mojolicious is persistent, there an issue with using require, so I must now use do, which "solves" the problem. My question is, however, is the data going to be persistently in RAM after that, even if I use do? This is data used on a per user basis only (I am creating a .pm file with that data when a user logs on).
17:37 jberger rabbit: what?
17:38 rabbit Well, normally, if the script is not persistent, then a require will require the file (such as Joe.pm) each time, but since mojo is persistent, when using require, it does not fetch the contents each time.
17:38 mgrimes joined #mojo
17:38 jberger rabbit: why are you storing data that way?
17:38 rabbit um, I'm converting an old script.
17:39 jberger what kind of data is in the file?
17:39 jberger it is a simple data structure?
17:39 rabbit yes, it's a hash of hashes
17:39 jberger in the interim, I'd use DBM::Deep
17:39 jberger then try to get it into a true database asap
17:39 rabbit Actually, I am using mysql
17:40 jberger then encode_json that data and store it as a blob
17:40 jberger (if not something better)
17:41 jberger back to the original question, doubly now, if you have a database at your disposal, why are you storing data as files in that way?
17:41 Grinnz_ blob is about the best you can do in mysql, though you could use Sereal or something to make the blob too
17:41 jberger if its about caching, there are other ways to do that
17:41 Grinnz_ (i generally stick to json for readability unless it's a particularly large structure)
17:42 Vitrifur joined #mojo
17:43 rabbit well, I thought it be better on resource usage when I designed it, since I have to do some preprocessing. And it's used "all the time" for an authenticated user.
17:44 rabbit basically, these are temp files that I use on a per user basis, when they logon. I did not think it would be more efficient to store it (in mysql), but if it is, I can easily do that
17:46 rabbit my impression (maybe I was wrong) was that a require used less resources than a select, and this particular file is used on every single action when an authenticated user is on their account.
17:47 rabbit and since there is zero sorting to do, and it's temporary, and a hash of hashes works well, that is why I did it that way
17:48 jberger rabbit: I'd personally suggest looking at CHI
17:49 jberger but also, depending on what is in the data you might just store it in the session
17:49 jberger depending on size and sensitivity of the data
17:50 rabbit in all I have maybe 100 to 200 (max) kb of data
17:50 rabbit that's kb
17:50 rabbit it's not really that sensitive
17:50 rabbit there are no passwords
17:50 jberger but cookies are limited to 4kb
17:51 rabbit however, there are user names
17:52 rabbit jberger: when you say store in session, you are just referring to cookies right?
17:52 jberger yeah
17:53 jberger so that's out at 100-200 kb
17:53 rabbit I might be able to shorten it quite a bit ... but certainly not down to 4kb .... but I could if several cookies
17:54 jberger not worth it IMO
17:54 jberger because you are still sending lots of data back and forth, you lose some of the benefit of caching in the first place
17:54 jberger again, I say investigate CHI
17:54 jberger its an abstraction layer for caching
17:55 jberger for certain kinds of data, redis can be very nice or similar k/v stores
17:55 rabbit do you have a link?
17:55 jberger https://metacpan.org/pod/CHI
17:56 rabbit ah, ok
17:56 rabbit great
17:56 rabbit thanks
17:56 jberger different backends have different pros and cons
17:56 jberger but you can do nice things like set TTL on values
17:57 jberger I like the "compute" method's style quite a bit
17:57 rabbit so with mojo, I guess you are saying it's a "bad idea" to require/do/use a personalized .pm file.
17:57 rabbit cause it gets cached
17:58 rabbit and will eventually blow the ram apart
17:58 rabbit with many users
17:58 jberger I'm not even sure I'd go that far
17:58 jberger but its not ... pretty
17:58 rabbit got it
17:59 rabbit well, I can definitely see that mojo will not 'require' twice like regular perl does.
17:59 rabbit it's treating require identical to use
17:59 jberger you mean like a CGI script would
17:59 rabbit right
18:00 jberger yeah, that's not gonna work
18:00 jberger do-load is a workaround
18:00 rabbit however, it's treats do like do
18:00 rabbit right
18:00 jberger its not the worst idea in the world, it just strikes me that there are better, for some value of better
18:00 jberger working is good usually too though
18:00 jberger so take everything I say with a grain of salt
18:01 jberger remember that with a preforking server like hypnotoad you don't just have a persistent server, you have lots of them
18:01 jberger so you might have to think about resource contention and locking
18:01 rabbit well, another easy solution is just add another few fields on to the auth table, because I'm doing a select there each time, as well, for auth purposes, so that would remove the need for these tables.
18:02 rabbit and it does not add any overhead
18:02 rabbit actually, come to think of it, it reduces overhead
18:02 rabbit :-)
18:02 jberger rabbit: if you store a session key (usually the username) in the session, since its hmac signed you don't need to auth on each request
18:03 rabbit hum, that's interesting
18:03 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Growing
18:03 jberger that's the example here
18:04 jberger the session cookie cannot be altered on the client side (though it is visible, signed not encrypted)
18:04 jberger (and you do need a good secret)
18:04 jberger anyway, really /me goes for lunch
18:04 rabbit ok. thanks a lot.
18:04 rabbit appreciate it
18:04 jberger np
18:04 jberger read through the Guides
18:05 jberger again even if you have read them once
18:05 jberger it takes a few readings for it all to sink in, and it really helps
18:05 jberger http://mojolicious.org/perldoc#TUTORIAL
18:06 rabbit thanks.
18:06 rabbit so far, I have 30 bookmarks ... making my way through them
18:11 melo joined #mojo
18:16 sri oh, there will be a new star trek series in 2017 :o
18:20 disputin joined #mojo
18:27 sri hehe, a $199 programming typeface http://www.typography.com/blog/introducing-operator/
18:28 jberger ummmm, looking at it, .... no
18:29 sri no way i would switch to that from Consolas
18:30 preaction ... is the italic a completely different font?
18:31 sri looks like they went all nostalgia, and ignored readability
18:35 asarch joined #mojo
18:36 mspo sri: you want your screencasts to look unique or not?
18:37 mspo your live-programming client inerviews needs to be memorable
18:37 preaction use comic sans
18:37 mspo then you'd get confused as an openbsd developer
18:39 jberger why are some letter cursive and others not
18:40 sri italics
18:40 jberger within the italic set
18:40 jberger the p and m vs the l and i
18:41 * sri shrugs
18:41 sri onClickOut looks pretty bad
18:42 jberger className
18:42 jberger actually anything with an s or an r in the middle
18:43 jberger ref doesn't look terrible because they are all essentially script
18:44 * jberger closes the window and backs away slowly
18:46 mspo just installed inconsolatas and am running it @18 instead of monaco @16
18:46 mspo pretty nice so far
18:54 * sri likes Consolas more
18:55 good_news_everyon joined #mojo
18:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgzX4
18:55 good_news_everyon mojo/master cb226a2 Sebastian Riedel: more tests for tag helpers
18:55 good_news_everyon left #mojo
19:09 bowtie joined #mojo
19:37 mdom So, my daughter is sleeping at last ... a lot of catching up to do!
19:44 good_news_everyon joined #mojo
19:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgzAb
19:44 good_news_everyon mojo/master 5465580 Sebastian Riedel: it is a little more expensive to stringify
19:44 good_news_everyon left #mojo
19:49 bowtie_ joined #mojo
19:55 mdom woah!
19:55 * mdom is blown away!
19:56 mdom Thanks everyone! This works great. Now let me see what happens when i replace libxml with mojo::dom
20:04 disputin joined #mojo
20:05 jberger stuff happens fast around here ;-P
20:21 melo joined #mojo
20:30 melo joined #mojo
20:35 bowtie_ joined #mojo
20:36 PryMar56 joined #mojo
20:43 jberger sri I think xss_escape was the right thing to deprecate
20:43 jberger http://grep.cpan.me/?q=xss_escape
20:43 mspo how many cpan websites are there
20:43 jberger That one isn't official
20:43 jberger Just a handy tool
20:44 jberger Though it would be a nice official feature
20:44 pink_mist only cpan.org is official, isn't it? not even metacpan is "official"
20:45 jberger Well search.cpan.org isn't even open source
20:45 Grinnz_ neither is search.cpan.org, reall
20:45 Grinnz_ you'll note http://www.cpan.org/ has links to metacpan, not search.cpan
20:45 pink_mist well yeah, sco is so unofficial I didn't even think it warranted a mention :P
20:45 jberger metacpan is much more community involved
20:46 Grinnz_ search.cpan "looks" official which is the annoying part
20:46 jberger Sees parallels to other things that look official
20:46 pink_mist if something were to be official in my opinion it should be hosted by the perl foundation and written by the p5p
20:47 * jberger shuts up before he starts yelling about things he can't change again
20:47 genio heh
20:51 bowtie_ joined #mojo
20:51 mspo "official" is kind of a weird term
20:52 sri not really when you actually have someone in charge
20:53 mspo someone should shutdown perl.com
20:55 sri meh
20:56 jberger wow, I'm still on the front page of perl.com
20:56 jberger \o/
20:56 sri \o/
20:57 jberger of course seeing an article from 2014 as the top story does help perpetuate the perl is dead meme
20:57 jberger sigh
20:57 genio why did I click on that?!?
20:57 mspo jberger: that was my main issue with it
20:57 pink_mist genio: surely to see jberger
20:59 genio yea.... that.  :)
20:59 jberger I wish more people used my electron microscope column simulator module on CPAN
21:00 jberger to my knowledge there's only one user, the Ph.D. student that followed me at my graduate institution
21:00 genio "Recent Entries       Perl today (February 2014)"  ugh
21:00 pink_mist I'm not sure what I would use it /for/, jberger :P
21:01 genio who owns perl.com?
21:01 * sri thinks even cpan.org is still privately owned
21:02 * genio wonders if the owners of cpan.org and perl.com could be persuaded into handing them over to the p5p
21:02 jberger pink_mist: for simulating the pulse dynamics of your dynamic/ultrafast electron microscope columns of course!
21:02 pink_mist jberger: yeah, I've never even seen one of those :P
21:03 genio Tom Christiansen owns perl.org
21:03 genio err. .com
21:03 jberger pink_mist: https://archive.org/stream/ultrafast_electron_microscopes_berger_phd_thesis.pdf/thesis#page/n89/mode/1up now you have
21:04 genio Elaine Ashton of the Perl Institute owns cpan.org
21:04 genio hey, she's in FL
21:04 Grinnz_ the institute? that's gone in 3 of my 4 fallout 4 saves anyway <_<
21:04 jberger genio: really? I see Ask in the whois db
21:05 jberger whois says perl.com is tchrist, yeah
21:05 bowtie joined #mojo
21:07 genio so, talk to those two and see what we can do about that :)
21:08 vicash who owns perl.io ?
21:08 jberger what is perl.io?
21:08 jberger parked
21:09 vicash considering all the hip websites have .io domains, i figured there must be a perl.io
21:09 jberger btw don't everyone go clicking on that button!
21:09 jberger it will increase their purchase price
21:10 mspo I bought a .io recently
21:10 * pink_mist imagines a bidding-war between everyone here hiking up the price to ridiculous levels
21:10 mspo another stalled mojo side project ;)
21:10 genio are tchris or elaine ashton IRC regulars?
21:10 genio tchrist
21:10 vicash mspo: did you buy it from a provider or directly from nic.io ?
21:10 genio I'm apparently incapable of typing today.
21:11 vicash mspo: i mean registrar
21:11 jberger tchrist is
21:11 jberger or I thought he was at least
21:11 jberger he is active though
21:11 jberger should I bid on perl.io?
21:11 genio I've never had any dealings with him, so I'm not a good person to initiate contact.  "who's this random person talking to me?"  Can someone else get in touch with him?
21:12 mdom So, my code does now pass the same test cases with Mojo::DOM as the old code with LibXML ... except the one with characters not in cp1252, but that should be easy with HTML::Entities and Mojo::ByteStream
21:12 jberger genio: I'd think that others have already tried
21:12 vicash jberger: maybe you should and see how much it really costs.
21:12 jberger tchrist is "old guard"
21:12 mdom We'll see tomorrow. Nevertheless, thanks again! The new code is even shorter... :)
21:12 jberger tchrist is the one who argues that perl documentation doesn't need strict and shouldn't ignore the one- let alone two- arg open
21:13 Grinnz_ D:
21:13 jberger mdom++
21:13 genio ugh.  that sounds like a long battle then and I'm definitely not the one to try.
21:14 pink_mist I agree that the official perl documentation shouldn't need strict, but imo it should be written as if it had it anyway
21:14 jberger pink_mist: and tchrist would disagree with you
21:14 pink_mist with perhaps a few exceptions to illustrate the difference
21:14 pink_mist :(
21:14 mspo vicash: gandi
21:14 jberger his argument is that package variables are part of the language, and as the defaults should take precedence
21:15 mspo I thought use Common::Sense made some good arguments concerning strict and warnings
21:15 pink_mist urgh, not common::sense again
21:16 pink_mist we had someone over in #perl on freenode earlier today who had problems with that because in newer versions things changed
21:16 mspo although reading php code where variables show up out of nowhere does get trying
21:16 genio common::sense is... yea, let's use strictures instead
21:17 pink_mist strictures++
21:17 Grinnz_ aside from the fatalized warnigns which i will always disagree with, the opinions of strictures are closest to what i'd agree with
21:17 jberger Mojo::Base -strict # ftw
21:17 bowtie_ joined #mojo
21:18 Grinnz_ but if you take out the fatalized warnings, it's basically "use strict; use warnings; no warnings 'once';"
21:18 Grinnz_ so yeah
21:19 jberger the number of times I need to turn that one off ...
21:19 pink_mist I see the point of the fatalized warnings; I think they're a good idea
21:19 Grinnz_ that warning isn't even very good at occurring when it's supposed to, and it's not that useful when it does
21:19 jberger pink_mist: until someone adds a warning that you didn't plan for
21:19 Grinnz_ right and strictures 2 tries to account for that, but i still don't agree with it
21:19 sri what jberger said, fatalized warnings are madness
21:20 vicash fatalized warnings ? is that another name for fatal error ?
21:20 Grinnz_ i just dont see the point of warnings making things blow up, when i can just as easily watch the log
21:20 Grinnz_ vicash: no it means making warnings (like uninitialized value in string) become exceptions
21:21 pink_mist vicash: use warnings FATAL => 'all';
21:21 sri and something that doesn't come up as often but has helped mojolicious tremendously... "use utf8;"
21:21 pink_mist vicash: makes any warning that occurs make your program die
21:21 sri the number of unicode questions has gone down soooooo much
21:21 mib_8xo6rn joined #mojo
21:21 jberger mojo is about as "unicode just works" as you could hope
21:21 vicash pink_mist right like gcc's -Werror. that is really just a debugging thing to fix your warnings. i don't see why it should be used in production ever.
21:22 patrickz joined #mojo
21:22 meredith i've been in several shops where the log is a flood of warnings and i like the idea of slowing that down early, but i wouldn't do blanket fatal warnings
21:22 jberger sure, add it to your PERL5OPT on your dev boxes
21:22 Grinnz_ we have lots of warnings that only show up in production, because production load is very different from development load, etc
21:23 Grinnz_ so i look at the log, and i fix the warnings... if i were to fatalize warnings, all i'd get are customers complaining about pages breaking
21:23 pink_mist vicash: because code that causes warnings is the closest perl comes to C's undefined behaviour, and I would wish for C to be able to properly die when that happens without incurring a major speed penalty
21:25 vicash pink_mist: your statement is a little vague. C's undefined behavior ? the C programmer is not doing their checks and verifications correctly then.
21:25 pink_mist vicash: exactly
21:25 pink_mist vicash: the same can be said of uninitialized warnings from perl
21:26 vicash yes I get the unitialized warnings from Mojo::Util's trim() function when it is passed an undef during call from Mojo::Validation::Validator
21:27 pink_mist vicash: if your code produces warnings, things may be breaking in ways you never foresaw, and I'd rather have the code stop executing than doing something crazy
21:27 * Grinnz_ still annoyed that it says "uninitialized" and not "undefined"
21:27 sri vicash: didn't you promise me a test case for that?
21:27 vicash sri: oh i did ? i will give you one soon then.
21:27 sri i have no idea how you get an undef value into Mojo::Validator::Validation
21:28 Grinnz_ pink_mist: "may" being the operative word; empty string is very often not breaking enough to justify breaking the application for customers
21:28 sri somehwere along the way there would have to be a bug
21:28 vicash simple. $validation->required('username', 'trim') does it when you submit a form with a text_field 'username' and don't fill it with anything
21:28 pink_mist Grinnz_: yes that's why I drew the parallel with undefined behaviour; it *may* do anything
21:29 Grinnz_ the warning is there, so i can fix it; in the meantime, all of the tested cases still work
21:32 sri vicash: that's just not true
21:32 sri perl -Mojo -E 'a(sub { $_->render(data => r $_->validation->input) })->start' get "/?username=&test=1"
21:32 sri it's an empty string
21:33 vicash sri: let me verify and get back to you.
21:33 jberger I've requested perl.io, don't anyone else try to bid me up
21:33 jberger I have a great idea for it too
21:33 sri not sure about .io domains... with the moral problems and all
21:34 jberger moral problem?
21:34 sri https://gigaom.com/2014/06/30/the-dark-side-of-io-how-the-u-k-is-making-web-domain-profits-from-a-shady-cold-war-land-deal/
21:34 Grinnz_ that site isnt working for me
21:35 Grinnz_ theres a header and a footer but no content
21:35 jberger well that sucks but that's ICANN's problem
21:35 Grinnz_ ah, it was adblock :P
21:35 jberger io has de-facto become what tech groups use
21:35 sri switch to ublock origin
21:36 mspo it wasn't expensive
21:36 Grinnz_ rather just not load this site tbh
21:37 mspo gandi has a perpetual sale on .xyz but it's just too hard to type
21:37 mspo since I and O are right next to eachother they're nice
21:38 jberger perl.io is parked so you have to negotiate with the owner
21:38 jberger they claim to be reasonable at $99
21:38 jberger I'll see if that's true
21:39 * genio starts making a list of people who would be best to talk to tchrist about perl.com
21:39 mspo larry wall?
21:39 jberger I'm assuming another member of "the old guard" but I don't know who likes/hate who
21:39 jberger larry wall deigning to help in perl5 ha
21:40 sri larry doesn't care about organizational stuff
21:40 Grinnz_ jberger: "perl" is his language's name too, after all <___<
21:40 mspo that doesn't mean he wouldn't write an email
21:40 mspo although he might want some links to perl6 :)
21:40 jberger my plan for perl.io would actually include perl6
21:41 sri back in the days i tried to get tpf to do something about perl.de, which has been owned by scammers since the 90s... nobody cares
21:41 jberger I want to have a really pretty site with near-live version/release date of perl5 and perl6
21:41 jberger and a brief description of their relationship
21:41 jberger and a few key links
21:41 Grinnz_ the raptor and the butterfly!
21:41 jberger REALLY easy for managers to understand
21:41 mspo sri: you can only care about so many tld's
21:42 sri i'm from .de, it was the first contact i had with a perl site
21:44 mspo it's $1500 to dispute a domain name
21:44 mspo and it's not fun; I just did one last year
21:44 sri anyway, most language sites are a mess
21:44 mspo UDRP process
21:45 disputin joined #mojo
21:46 sri except for python.org and scala-lang.org
21:46 sri i've not heard much about scala in a long time
21:48 Grinnz_ mspo: i imagine it's a trying process dealing with trademarks and such
21:48 jb360 joined #mojo
21:50 vicash jberger: while you're at it register perl5.io and perl6.io
21:50 jberger perl5.io is available
21:50 jberger not sure I like it as much
21:50 jberger perl6.io someone else can have (if its open)
21:55 jberger perl.love is available
21:56 Grinnz_ lol
21:56 jberger this new plethora of tlds is really messing up the asethetics of domain names
22:05 vicash sri: the uninitialized warning is not in trim() as I thought. it is in the way I am rendering the optional fields when they are undefined.
22:06 sri vicash: so, you're saying it's your code?
22:06 vicash sri: yes.
22:06 vicash while trying to build a unit test for you i figured out what i was doing wrong
22:28 jberger genio: maybe I should propose that same vision of perl.io to tchrist for perl.com
22:29 jberger and offer to leave a link to his consultancy on it
22:29 jberger hahahaha, the link to his training doesn't respond
22:30 jberger then again, there are a bunch of back articles
22:31 jberger I wonder if perhaps one of the newer sites like perltricks.com might be able to take it over on the promise to keep the existing articles
22:49 disputin joined #mojo
23:28 good_news_everyon joined #mojo
23:28 good_news_everyon [mojo] kraih tagged v6.45 at 254661e: https://git.io/vgg9b
23:28 good_news_everyon left #mojo
23:28 punter joined #mojo
23:30 good_news_everyon joined #mojo
23:30 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vggHt
23:30 good_news_everyon mojo/master 2195b07 Sebastian Riedel: bump version
23:30 good_news_everyon left #mojo
23:50 Adura joined #mojo
23:53 asarch joined #mojo

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