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

IRC log for #mojo, 2017-10-05

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

All times shown according to UTC.

Time Nick Message
01:10 jnbek_ joined #mojo
01:13 tchaves joined #mojo
02:10 jnbek_ joined #mojo
02:30 jnbek_ joined #mojo
02:43 noganex joined #mojo
03:36 disputin joined #mojo
03:51 tardisx joined #mojo
04:04 dboehmer_ joined #mojo
04:18 jamesaxl joined #mojo
05:15 inokenty-w joined #mojo
06:09 dod joined #mojo
06:17 dod joined #mojo
06:46 AndrewIsh joined #mojo
06:52 Vandal joined #mojo
06:55 rba_ joined #mojo
07:12 dod joined #mojo
07:12 trone joined #mojo
07:24 kiwiroy joined #mojo
08:01 kiwiroy joined #mojo
08:36 dod joined #mojo
08:37 rba joined #mojo
08:43 rba_ joined #mojo
09:07 rba joined #mojo
09:34 prg joined #mojo
09:39 rba joined #mojo
09:44 irqq joined #mojo
09:53 petru joined #mojo
10:24 petru joined #mojo
10:46 mib_ro3l01 joined #mojo
11:17 dod joined #mojo
11:37 rba joined #mojo
11:59 tchaves joined #mojo
11:59 dod joined #mojo
12:36 dod joined #mojo
12:43 dod joined #mojo
12:52 rshadow joined #mojo
12:53 anparker joined #mojo
12:53 gabiruh_ joined #mojo
13:00 meredith joined #mojo
13:01 tcohen joined #mojo
13:20 rba joined #mojo
13:52 tcohen joined #mojo
14:08 maschine joined #mojo
14:20 Pyritic joined #mojo
14:33 bwf joined #mojo
14:49 rshadow joined #mojo
14:51 gizmomathboy joined #mojo
14:54 ChmEarl joined #mojo
15:03 rba_ joined #mojo
15:04 trone joined #mojo
15:23 jberger hmmm, I didn't know about this before: https://github.com/OmniDB/OmniDB
15:23 jberger web-based postgres client
15:23 jberger found that reading about the postgres 10 release
15:36 maschine ooh and it uses phython.. instead of PHP.  nice!
15:37 maschine I tried another postgres web client but I knew it was trouble right from the start.  It ended up crashing my server and i had to uninstall it
15:37 kes joined #mojo
15:39 maschine also it nearly corrupted my database :(
15:40 tcohen joined #mojo
15:45 rshadow joined #mojo
15:54 sh14 joined #mojo
15:58 sh14|2 joined #mojo
15:58 gryphon joined #mojo
16:23 trone joined #mojo
16:27 good_news_everyon joined #mojo
16:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRmF
16:27 good_news_everyon mojo/master dea681a Sebastian Riedel: more consistent Changes entries
16:27 good_news_everyon left #mojo
16:29 irqq joined #mojo
16:31 Pyritic joined #mojo
16:41 leont_ joined #mojo
16:53 maschine how to use the stylesheet tag helper with url_for?
16:54 maschine %= stylesheet ..... url_for('/style.css')->to_abs
17:03 maschine answer: trial and error :p
17:03 maschine %= stylesheet url_for ('/style.css')->to_abs
17:04 maschine just confusing because the url_for tag helper looks a bit different
17:11 sri hmm, i know how to fix #1131, but i'm not sure we can test it reliably :/
17:11 dod joined #mojo
17:27 disputin joined #mojo
17:28 Pyritic joined #mojo
17:35 jberger maschine I don't understand your question
17:35 jberger stylesheet is a function that takes either a block (begin/end) or a string, you want a string
17:35 jberger url_for is a function that returns an object that can be stringifie
17:35 jberger +d
17:36 jberger so %= stylesheet url_for('/style.css')->to_abs makes perfect sense to me
17:36 jberger (assuming you even want the to_abs)
17:37 jberger sri: what is the fix?
17:37 purl the fix is slowly in the works
17:37 * jberger pats purl
17:37 * purl bites!
17:38 good_news_everyon joined #mojo
17:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRWt
17:38 good_news_everyon mojo/master 0c47879 Sebastian Riedel: fix a bug in Mojo::File where parts of a path could get accidentally upgraded from bytes to characters (closes #1131)
17:38 good_news_everyon left #mojo
17:38 sri jberger: that
17:39 jberger hmmmm, wow
17:39 sri not entirely sure about the fix either, whole problem is annoying
17:41 sri and i think there's another bug where Mojo::Static can't find files with non-ascii characters
17:42 sri guess we'd have to require a UTF-8 file system to be able to test it
17:42 jberger perhaps you build a test directory on the fly to test with?
17:42 jberger tempdir with a template that includes utf8
17:42 jberger I wonder what that does on non utf8 filesystems
17:48 disputin joined #mojo
17:48 Grinnz why does the filename being upgraded matter D:
17:49 Grinnz also, that will fail if someone calls ->new with unicode characters that aren't in latin1
17:50 sri just create an invalid path, not really fail
17:51 Grinnz "Fails if the original UTF-8 sequence cannot be represented in the native 8 bit encoding. On failure dies or, if the value of $fail_ok is true, returns false." from utf8::downgrade
17:51 sri that's why i set $fail_ok to 1
17:51 Grinnz so in that case it will just stay upgraded i guess?
17:52 sri yes
17:53 Grinnz would you say the correct usage for a unicode filepath is to utf8-encode it before passing it to Mojo::File?
17:53 sri yes, file system paths are binary
17:54 sri we don't know the encoding, only the user does
17:54 Grinnz right
17:55 sri problem is perl upgrades a binary string if you append a string that happens to be upgraded, no matter if it's necessary or not
17:55 Grinnz yeah and usually that shouldn't matter. but i guess it matters when you're using it as a filesystem path?
17:57 sri it's the case for the moniker in the default app our app generator creates
17:57 sri which makes the config plugin fail
17:58 Grinnz i would still think that open and other filesystem operations would use the perl value of the string, not the internal value, so upgrading shouldn't matter, it will just fail weirdly if you give it wide characters
17:58 sri if you have a better solution please open a pull request
17:59 sri -e and friends do use the internal value
18:00 Grinnz yikes
18:01 sri oh, postgres 10 is out
18:11 maschine jberger: yes, but there aren't any examples that use url_for (or similar helpers) like that
18:12 maschine and the url_for tag helper is a little different.  I knew it could work, I just didn't have an example to copy
18:12 jberger maschine I must really not be following
18:12 jberger forget the term "helper" in this context they are just functions
18:12 purl jberger, I didn't have anything matching term "helper" in this context they are just functions
18:14 maschine http://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#url_for
18:15 maschine it wasn't clear which one of those I should use with a tag helper - my inclination was to use the second syntax
18:15 maschine er I mean the 1st
18:15 maschine since I was using it in a template
18:16 jberger don't worry about it being in a template
18:16 jberger that's a red herring for you
18:17 jberger the only relevant thing about a helper in a template is that it is called as a function rather than a method
18:17 jberger and since it is a function, round braces (parens) are optional
18:18 jberger ^^ just like in normal perl
18:18 jberger now that said, since you want to call a method on the result, the parens are useful
18:19 jberger but `url_for('/style.css')->to_abs` is the same as `(url_for '/style.css')->to_abs`
18:20 jberger except that since the parser hates you calling it the latter way as the argument to stylesheet won't work, because of the "looks like a function" rule
18:21 jberger but again, all of this is just procedural perl and parser stuff, nothing to do with being in a template
18:22 jberger could be `%= stylesheet((url_for('/style.css'))->to_abs)` if you wanted to go crazy
18:25 Pyritic joined #mojo
18:28 rickbol joined #mojo
18:48 tcohen joined #mojo
18:50 sri reminder that we still need a volunteer to write a url_for guide
18:51 sri https://github.com/kraih/mojo/issues/1109
19:39 Pyritic joined #mojo
19:47 Pyritic joined #mojo
20:02 rba joined #mojo
20:28 petru joined #mojo
21:32 disputin joined #mojo
21:34 good_news_everyon joined #mojo
21:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRQT
21:34 good_news_everyon mojo/master 9c5f215 Sebastian Riedel: let Mojolicious::Static handle UTF-8 file names too
21:34 good_news_everyon left #mojo
21:34 sri another one that can't be tested i think :/
21:35 sri that's why i didn't make it configurable with an encoding attribute
21:39 good_news_everyon joined #mojo
21:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRQ9
21:39 good_news_everyon mojo/master bc1ba83 Sebastian Riedel: no need for a method call
21:39 good_news_everyon left #mojo
22:35 Grinnz sri: according to #p5p, on windows file paths are expected to be characters /o\
22:45 Grinnz filenames in perl are really a mess
22:51 sri (╯°□°)╯︵ ┻━┻
22:57 sri so, what should Mojolicious::Static do?
22:58 Grinnz i dont know. it might have to only encode the filename when not win32
22:58 Grinnz but someone with win32 should try it...
22:59 Grinnz make a file with unicode characters outside perl, and then have perl try to access it
22:59 good_news_everyon joined #mojo
22:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRxB
22:59 good_news_everyon mojo/master b781241 Sebastian Riedel: file names in Perl are a mess, just do nothing for now
22:59 good_news_everyon left #mojo
23:01 good_news_everyon joined #mojo
23:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vdRxi
23:01 good_news_everyon mojo/master 3f22090 Sebastian Riedel: remove unused import
23:01 good_news_everyon left #mojo
23:01 sri so, the downgrade in Mojo::File is also wrong, since it messes up windows file names
23:01 G3ph4z joined #mojo
23:01 Grinnz well... it might not actually
23:02 jberger personally if we have to choose one I choose non-windows
23:02 Grinnz a downgraded string should still work if it does work that way, and if it fails, the string stays upgraded
23:02 jberger but I'm biased
23:02 Grinnz so it should accidentally work
23:02 G3ph4z Hello guys.
23:02 purl Hello guys. is it true that Larry Wall has said that because in perl AND has a higher precedence than OR, it proves that perl is a postmodern language (on the grounds that postmodernism has to do with favoring AND more than OR, whatever that means)  ?
23:03 Grinnz but i still don't really know how this works on windows, so testing would be needed
23:03 Grinnz purl: forget Hello guys.
23:03 purl Grinnz, I didn't have anything matching hello guys
23:03 Grinnz :|

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