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

IRC log for #mojo, 2017-07-22

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

All times shown according to UTC.

Time Nick Message
00:00 Craftsmanship You're the one who first mentioned slowing it down for "those who don't care about this"
00:01 Craftsmanship I totally get that closing over a perlvar is a pain in the ass.
00:02 Craftsmanship but it seems like the logging entry corresponding to a warning/exception would be a load more useful if it included the request that caused it.
00:02 preaction and i already explained how to do that
00:02 preaction i mentioned that if _Mojolicious_ were to maintain that state for you, it would slow it down for everyone using _Mojolicious_
00:03 preaction so, the solution i came to was to maintain that state myself using closures
00:03 Craftsmanship or to hap-hazardly monkeypatch mojo from plugins
00:04 preaction make your own IOLoop that wraps another IOLoop perhaps? much like the AE Debug loop?
00:04 Craftsmanship do you actually have code that maintains that state? it sounds like pages of _sub ($tx, sub{ ... }
00:04 preaction i have a set of helpers that take in a callback sub and return a sub. when called, they reset the state i want, and then call the callback sub
00:06 preaction technically if all you want is the context, it's already in there closed-over. i imagine you'd want to get rid of copy/paste boilerplate, and so would want to build a higher-order function to achieve the same effect without copy/paste
00:06 Craftsmanship Jinkies.
00:07 preaction i mean... that's what i said i was doing almost 30 minutes ago
00:07 Craftsmanship you said a lot of stuff.
00:07 preaction i did, yes, but i kept repeating that this was the way i was solving the problem you stated
00:07 Craftsmanship Anyway, given that it's late and you've already taken the time to call me an asshole once, I'm going to hit the hay.,.
00:09 preaction i asked if you were being an asshole, which you agreed you were being half of one
00:10 Craftsmanship Yep -
00:10 Craftsmanship cause asking a legit question is an asshole move.
00:10 Craftsmanship just like having the last word on IRC is.
00:10 preaction asking a legit question in an asshole way is an asshole move, yes
00:11 Craftsmanship Yep - all tone comes from the author, none from the reader
00:12 preaction which is why i asked instead of assumed
00:12 Craftsmanship hahaha
00:12 Craftsmanship when did you stop beating your wife tho?
00:12 preaction never
00:12 Craftsmanship i'll have a look at wrapping that loop in the morn'
00:13 preaction if the point of this part was to convince me i was wrong in thinking you were being an asshole, it's not working...
00:18 bpmedley joined #mojo
02:06 noganex_ joined #mojo
02:22 flogger joined #mojo
04:22 zach if you wanted a regex to test whether something is a username or password, should it be sufficient to just /@/ ?
04:23 preaction er... what?
04:23 purl er is derrr.. or http://www.imdb.com/title/tt0108757/
04:24 zach nevermind, I didn't have any rules on usernames yet, i'll just make a match rule in the user creation that rejects if username contains @ and then when given a string I'll just check for /@/
04:24 zach for password reset, enter email address or username
04:25 zach figure out if it's an email address and if not then look up the email address based on provided username
04:25 preaction you could provide two boxes and ask them to fill in one
04:26 zach I suppose, but wouldn't one be be cooler
04:26 zach it's like you're intuitive
04:26 zach when really you're just lazily matching on presence of a @ symbol
04:27 preaction i mean, i likely wouldn't allow a whole bunch of characters in usernames, @ included
04:27 zach I told someone today I was building this site in perl, and she laughed and was like, why aren't you using some web site builder this isn't 1985
04:28 preaction eh. there's no accounting for taste.
04:29 zach hah
04:29 zach I need to make something to eat
04:29 zach deciding on food is almost as hard as naming variables man
06:41 csson joined #mojo
06:56 dod joined #mojo
07:03 dod joined #mojo
07:23 bianca joined #mojo
08:00 Lee[home] joined #mojo
08:00 Lee_ joined #mojo
08:01 petru joined #mojo
08:04 Vandal joined #mojo
08:15 petru_ joined #mojo
09:18 someguy joined #mojo
09:40 bianca joined #mojo
11:48 dod joined #mojo
11:50 petru_ joined #mojo
12:00 howitdo joined #mojo
12:21 sri i guess netflix has now banned the opera vpn :(
12:37 ribasushi https://www.perl.org/advocacy/whyperl.html <--- this is so bad it is somewhat awesome
12:40 Lee[home] joined #mojo
12:41 Lee_ joined #mojo
13:13 bianca joined #mojo
13:14 kes joined #mojo
13:40 genio ribasushi: What do you mean?!?  \o/ CGI  </sarcasm>
14:02 zerah joined #mojo
14:06 karjala_ joined #mojo
14:13 dod joined #mojo
14:30 genio Grinnz: This large pile of mess now passes: https://github.com/genio/p5-UV/blob/master/t/05-poll.t
14:32 genio Now that I have some of their larger tests working and can feel a _bit_ more confident that UV::Poll works, I'll take another look at Reactor::UV later today
14:33 sri \o/
14:34 genio I think there's one more poll test for me to port over from their test suite.
14:50 genio Yea, this is the last one I have to port over: https://github.com/libuv/libuv/blob/v1.x/test/test-poll-oob.c
14:54 genio and I meant to thank plicease for all of his help in yesterday's explanations but somehow typed preaction.  oops.
14:55 dod joined #mojo
14:56 plicease oh np I am glad I have helped.  Also Alien::libuv helped drive Alien::Build development so genio++
14:59 petru_ joined #mojo
15:01 bianca joined #mojo
15:05 genio crap.  I have to implement UV::TCP before I can add the https://github.com/libuv/libuv/blob/v1.x/test/test-poll-oob.c test
15:10 petru_ I'm trying to output on a template some source code using Ace editor. I'm trying to do this by doing: editor.setValue('<%== quotemeta $submission->source_code %>'); Unfortunately quotemeta also escapes newlines. How can I prevent that behavior?
15:10 jberger genio++ && plicease++
15:11 jberger petru_ why do you want quotemeta?
15:11 jberger isn't that basically for regexes?
15:13 petru_ editor.setValue is javascript code and the generated code will contain something like '), then it won't render the whole source code
15:15 jberger There is a JavaScript escaping library on cpan
15:15 jberger I use it in Mojo::Phantom
15:15 jberger I'm on mobile atm or I'd link it
15:16 petru_ thanks, I'll look for it
15:28 genio I'm going to have reminder gists everywhere for the XS stuff I know I'll end up forgetting... https://gist.github.com/genio/a8020a64fae04879e90d7d33d53871ce
15:35 PryMar56 joined #mojo
15:59 bianca joined #mojo
16:26 bianca joined #mojo
16:58 stryx` joined #mojo
17:36 sri do we really have no ideas for solutions to this? https://github.com/kraih/mojo/issues/1094
17:41 someguy was kicked by sri: someguy
17:43 sri someguy is Craftsmanship
17:49 itaipu joined #mojo
17:49 jberger sri this was my suggestion
17:49 jberger http://paste.debian.net/933056/
17:50 jberger IIRC it broke some rest but didn't seem serious
17:50 sri doesn't that break the failraptor?
17:51 jberger s/rest/test/
17:51 jberger Hmm I don't recall
17:52 sri renderer is not really important
17:52 sri the one case i think that matters is favicon
18:15 brunoramos joined #mojo
18:44 petru_ joined #mojo
18:48 ilbot2 joined #mojo
18:48 Topic for #mojo is now � nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
18:58 kes joined #mojo
19:00 kes joined #mojo
19:00 bianca joined #mojo
19:06 karjala_ joined #mojo
19:42 kes joined #mojo
19:48 itaipu joined #mojo
21:12 * sri throws labels at all the issues on github
21:57 petru_ joined #mojo
22:27 flamey joined #mojo
22:30 sri i have a feeling this will be going nowhere https://github.com/kraih/mojo/issues/1094#issuecomment-317214612
22:33 flamey hi. is there a way to get a base url of the app inside template, when the app is running from a subdirectory on apache server? like http://www.domain.com/mojoapp/
22:35 flamey i need to somehow refer to css and image files. can't use "/css/.." or "./css/.." when route is deeper than one level (http://www.domain.com/mojoapp/foo/bar)
22:36 sri that's what url_for is there for
22:46 sri it's a bit of a hole in the docs though
22:46 sri https://github.com/kraih/mojo/issues/1109
22:46 sri think i'll make more of those isses when i see something missing
22:47 sri something for new contributors to start with
22:48 sri in fact, anyone who thinks something is missing from the docs, open an issue
22:49 flamey Thank you. I tried href="<%= url_for %>/css/styles.css"> in my template. The url_for gave me /mojoapp/app.pl/foo/bar/ on http://www.domain.com/mojoapp/foo/bar/ , but I'm looking for just /mojoapp/  :(
22:51 sri that means your app is deployed wrong
22:51 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Rewriting
23:00 Ptolemarch joined #mojo
23:03 flamey thanks. can't figure it out now. i'll try in the morning...
23:14 sri another one https://github.com/kraih/mojo/issues/1110
23:18 sri and another https://github.com/kraih/mojo/issues/1111

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