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

IRC log for #mojo, 2014-10-04

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

All times shown according to UTC.

Time Nick Message
00:02 jberger this is way cool: https://metacpan.org/pod/Scalar::Watcher
00:15 jberger berov, I don't know that I understand
00:17 berov jberger: I needed to dump perl references into my templates to JS objects
00:18 woz joined #mojo
00:18 berov but encode_json was encoding it to UTF-8 and then again when the result is sent to the browser
00:18 berov thus I had double encoding===garbage
00:19 berov so I propose these two functions to be addded
00:22 berov it would be very handy to be able to have some functionality to convert Perl references to JavScript objects and vice versa without any character encoding/decoding
00:22 berov this allows me to have in my app $app->helper(ref2js =>sub { Mojo::JSON::encode_javascript($_[1]) });
00:23 berov and then use it in a template: var user = <%== ref2js($user->data) %>;
00:24 jberger oh ok
00:24 jberger I get it
00:24 jberger I had to do something similar once
00:24 * jberger tries to remember when
00:26 berov result: var user = {"disabled":0,"last_name":"Беров","group_id":17,"first_name":"Краси","id":17....}
00:29 jberger berov: https://github.com/jberger/Galileo/blob/master/lib/Galileo/Page.pm#L42 and https://github.com/jberger/Galileo/blob/master/lib/Galileo/files/templates/page/edit.html.ep#L22
00:29 jberger and what you are saying is that if I have unicode in $pagedown_extra_options I will have double encoding errors
00:30 jberger correct?
00:30 berov yes
00:31 jberger hmmmmm, well I definitely see the point
00:31 berov e.g if there are some cyrrilic characters
00:33 berov I may have to add more tests to json.t to show it
00:34 jberger yikes I didn't know how much $_ slinging was being done in the decoding paths!
00:34 jberger guess I hadn't looked that closely
00:36 jberger so the real problem is that in this case, rendering the JSON is not rendering at a boundary
00:37 berov letter cyrrilic B: "Б"...
00:37 jberger when does the reverse happen
00:37 jberger ?
00:37 berov encode_json:"\320\221\"
00:37 jberger I understand encode_javascript now, when would decode_javascript be needed?
00:38 berov encode_javascript:"\x{411}\"
00:38 jberger i guess it's needed for round-trip testing
00:38 berov last slashes I forgot to remove them
00:39 jberger almost makes me wish we had kept render_partial, I would rather call this encode_partial
00:39 jberger rather than encode_javascript
00:40 berov open for suggestions :)
00:40 sri encode_javascript is a terrible name
00:40 berov :)
00:40 jberger berov, I understand the need, I'm not sure how to designate it
00:41 berov the morning is wiser than the evening
00:41 berov we are not in a hurry now
00:42 jberger berov++
00:42 berov thanks
00:42 jberger dump_javascript_object
00:42 berov can be
00:42 jberger or just dump_javascript
00:43 berov better
00:43 sri no
00:43 berov but hen we have
00:43 jberger evokes data::dumper and the point there being it is eval-able
00:43 berov the other way around
00:43 purl the other way around is, like, not better
00:43 jberger javascript_literal
00:44 sri what does any of it have to do with javascript?
00:44 sri you get characters instead of bytes, that's entirely a perl concept, without any connection whatsoever to javascript
00:44 berov just wanted to say this is not bvalid json
00:45 jberger sri: I suppose that's true
00:45 jberger the use-case we are thinking of is embedding into a javascript snippet
00:46 jberger but you are right
00:46 jberger encode_json_chars
00:46 jberger decode_json_chars
00:46 * jberger doesn't really like that
00:46 sri the decode function is also very flawed
00:46 sri ompletely bypasses our exception handling
00:47 sri pretty much all just copypasta
00:48 berov yep
00:48 jberger well for the record, I support this functionality if we can come up with a name
00:48 sri i'm -1-ish now
00:48 jberger Gaileo would use it immediately
00:48 jberger I have the same bug
00:48 berov so much I could do
00:48 berov sri: but why you need it
00:48 sri what?
00:49 berov I meen why the decode
00:49 sri i already told you
00:49 sri consistency
00:49 purl consistency is a problem. or highly overrated or the hobgoblin of small minds or (see FOOLISH consistency) or apparently beyond the orthographical faculties of the vulgar USian vernacular
00:49 berov I mean I needed so far only to produce js object from erl
00:49 berov ok
00:49 jberger berov: you have to be able to test it if nothing else
00:49 sri and i already told you about other solutions
00:50 sri in fact, i recommended an entirely different approach
00:50 berov other solutions? let me go back and see
00:52 sri making decode_json more relaxed and allowing it to accept wide characters
00:52 berov sri: obviously I did not get what you meant
00:52 sri that's not good
00:52 berov ok
00:53 berov no idea how to do this now, need to get some sleep
00:55 jberger even if decode_json could accept wide characters, you still have to be able to specify that you want to encode utf8 in encode(_json)
00:56 jberger or rather that you do not want to encode
00:56 jberger anyway, once I get some dinner I would be interested in discussing the nonblocking resolver stuff
00:57 berov but this would require either a new parameter or some flag somewhere
00:58 jberger I could see the method/function taking another parameter, I could also see the object having an attribute, and if you wanted to avoid the utf8 encoding you would have to use the OO form
00:59 jberger has utf8 => 1;
00:59 sri holy shit NO!
00:59 jberger has encoding => 'UTF8';
00:59 jberger if you make it falsey, no encoding is performed
01:00 * jberger might have broken sri
01:00 * jberger pulls out the robot repair guide
01:00 sri this brings back very bad memories from when i was considering the feature
01:00 meredith I know it's kind of a waste but I'd sooner just offer the tip in docs that one could have a helper decode back from encode_json's bytes if this is really necessary.
01:01 jberger meredith: sad but true
01:01 sri it's kinda funny nobody has done any research yet on the topic actually
01:01 jberger then again, I hate the encode -> decode -> encode thing that that entails
01:01 sri first thing i did was looking into how other implementation handle the problem
01:02 * sri shrugs
01:02 sri *+s
01:02 jberger anyway, dinner
01:02 purl i guess anyway, dinner is ready, time to snuggle with ann
01:02 jberger wow purl, who is ann?
01:02 jberger purl, seen ann?
01:02 purl ann was last seen on #yapc 8 years, 97 days, 30 minutes and 13 seconds ago, saying: hey, where did everyone go?  [Jul  1 00:32:46 2006]
01:03 jberger wow, this is getting kinda depressing, look at that last comment
01:03 * jberger goes to search for ann
01:05 berov at $work we were makein JS objects from Perl almost manually with concatenations and joins in TT and wit was rather ugly
01:07 berov but having something like <%== ref2js($data) %>; would be splendid
01:13 Bolwind1 joined #mojo
01:19 woz joined #mojo
01:25 sri jberger, berov: https://gist.github.com/anonymous/f35b12dfbc306020a858
01:25 sri that is the patch i would have expected
01:27 sri of course it would be less strict about the encoding
01:32 sri or a little more strict https://gist.github.com/anonymous/003f2ce5f0b089b74107
01:39 good_news_everyon joined #mojo
01:39 good_news_everyon [mojo] kraih created json_text (+1 new commit): http://git.io/FLEnlQ
01:39 good_news_everyon mojo/json_text 8156b11 Sebastian Riedel: added encode_json_text function to Mojo::JSON
01:39 good_news_everyon left #mojo
01:51 jberger sri++
01:57 sri jberger: is that a +1 vote?
01:57 jberger +1
01:57 purl 1
01:57 jberger https://github.com/jberger/Galileo/issues/40
01:57 sri that's pretty optimistic ;p
01:59 sri i really wonder why we didn't deprecate the OO api
02:03 noganex joined #mojo
02:04 jberger I could have formed the bug differently, and I would have if I had realized if before there was a solution at hand
02:05 good_news_everyon joined #mojo
02:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/CDP0qQ
02:05 good_news_everyon mojo/master 6c51bc5 Sebastian Riedel: use more unicode hearts in examples
02:05 good_news_everyon left #mojo
02:06 sri merged it for now
02:07 jberger OH
02:07 jberger I hadn't seen that that was a branch!
02:07 d4rkie joined #mojo
02:07 jberger thus the apparent optimism
02:11 D4RK-PH0ENiX joined #mojo
02:14 sri heh
02:16 jberger if you don't like it, don't just merge because of my optimism
02:16 jberger crab, marcus, batman, thoughts?
02:17 jberger tempire
02:17 jberger damn I knew I missed one
02:17 sri tempire might be busy with http://dancejs.io/
02:17 sri xD
02:20 woz joined #mojo
02:24 jberger /o/
02:24 jberger \o\
02:24 jberger /o/
02:25 sri indeed
02:25 sri \o\
02:25 sri /o/
02:26 jberger sri: so what's the deal with the non-blocking resolver
02:26 sri well, look for yourself https://metacpan.org/pod/Net::DNS::Native
02:27 jberger yeah, I see that
02:27 sri oleg has proposed a new pluggable Mojo::Resolver api, but i don't like that
02:27 sri considering there are literally no alternatives
02:28 sri if we do it, i think it would be a localized optimization in Mojo::IOLoop::Client
02:29 sri of course we need to be careful, Net::DNS::Native is only a week old, and there are many portability concerns
02:29 jberger that's really the only place that needs it right?
02:29 sri yes, everything else would benefit automatically
02:29 jberger also, we know that libuv has the possibility
02:30 * jberger checks the state of UV.pm
02:30 sri right, which makes a pluggable api harder to design
02:30 sri i'd rather be super conservative and slowly extend the api from there
02:31 jberger yeah
02:31 jberger I agree
02:31 jberger abstraction based on one usage isn't really possible
02:31 sri there was also a timeout problem, oleg proposed the ability to cancel a running lookup
02:32 sri but i think we both agreed that it's not a good idea
02:32 sri since it can only be implemented with hacks
02:32 jberger you can't do that in the blocking form can you?
02:32 sri of course not
02:32 jberger right, so...
02:33 sri Net::DNS::Native can't do it either, it just abandons the thread i believe
02:33 sri hacks
02:33 jberger right
02:34 sri there's also the real possibility of perl crashing a lot, since Net::DNS::Native is still so new and portable threads are hard
02:36 sri in general i'm very +1 on a non-blocking resolver, but i we need to be careful and take it slowly
02:46 D4RK-PH0ENiX joined #mojo
03:03 basic6 joined #mojo
03:18 fhelmber_ joined #mojo
03:22 woz joined #mojo
03:38 preaction joined #mojo
03:48 Guest joined #mojo
04:12 bpmedley https://bitbucket.org/bpmedley/net-dns_a/src <— Thoughts?
04:23 woz joined #mojo
04:38 rwp joined #mojo
04:52 irq joined #mojo
05:01 Bolwind joined #mojo
05:20 KCL_ joined #mojo
05:24 woz joined #mojo
05:59 Guest joined #mojo
06:00 Guest joined #mojo
06:01 Guest joined #mojo
06:02 Guest joined #mojo
06:03 Guest joined #mojo
06:03 Guest joined #mojo
06:04 Guest joined #mojo
06:05 Guest joined #mojo
06:06 Guest joined #mojo
06:07 Guest joined #mojo
06:08 Guest joined #mojo
06:09 Guest joined #mojo
06:10 Guest joined #mojo
06:11 Guest joined #mojo
06:12 Guest joined #mojo
06:13 Guest joined #mojo
06:14 Guest joined #mojo
06:15 Guest joined #mojo
06:16 Guest joined #mojo
06:17 Guest joined #mojo
06:17 Guest joined #mojo
06:18 Guest joined #mojo
06:19 Guest joined #mojo
06:20 Oleg joined #mojo
06:20 Guest joined #mojo
06:21 Guest joined #mojo
06:22 Guest joined #mojo
06:23 Oleg bpmedley: getaddrinfo_a is a GNU extension, so it will work only with Linux, i think
06:23 Guest joined #mojo
06:23 Oleg btw, libuv about getaddrinfo_a: https://github.com/joyent/libuv/issues/617
06:24 Guest joined #mojo
06:25 Guest joined #mojo
06:25 woz joined #mojo
06:26 Guest joined #mojo
06:26 Oleg left #mojo
06:27 Guest joined #mojo
06:27 Oleg joined #mojo
06:28 Guest joined #mojo
06:29 Guest joined #mojo
06:30 Guest joined #mojo
06:30 irq joined #mojo
06:30 Guest joined #mojo
06:31 Guest joined #mojo
06:32 Guest joined #mojo
06:33 Guest joined #mojo
06:34 Guest joined #mojo
06:35 Guest joined #mojo
06:36 Guest joined #mojo
06:37 Guest joined #mojo
06:38 Guest joined #mojo
06:39 Guest joined #mojo
06:40 Guest joined #mojo
06:41 Guest joined #mojo
06:42 Guest joined #mojo
06:43 Guest joined #mojo
06:44 Guest joined #mojo
06:45 Guest joined #mojo
06:45 Bolwind joined #mojo
06:47 Guest joined #mojo
06:49 Guest joined #mojo
06:50 Guest joined #mojo
06:51 Guest joined #mojo
06:51 Guest joined #mojo
06:52 Guest joined #mojo
06:53 Guest joined #mojo
06:54 Guest joined #mojo
06:55 Guest joined #mojo
06:56 Guest joined #mojo
06:56 Vandal joined #mojo
06:57 Guest joined #mojo
06:58 Guest joined #mojo
06:59 Guest joined #mojo
07:00 Guest joined #mojo
07:01 Guest joined #mojo
07:02 Guest joined #mojo
07:03 Guest joined #mojo
07:04 Guest joined #mojo
07:05 Guest joined #mojo
07:05 Guest joined #mojo
07:06 Guest joined #mojo
07:07 Guest joined #mojo
07:08 Guest joined #mojo
07:09 Guest joined #mojo
07:10 Guest joined #mojo
07:11 Guest joined #mojo
07:12 Guest joined #mojo
07:13 Guest joined #mojo
07:14 Guest joined #mojo
07:15 Guest joined #mojo
07:16 Guest joined #mojo
07:16 neyasov joined #mojo
07:17 Guest joined #mojo
07:18 Guest joined #mojo
07:19 Guest joined #mojo
07:19 Guest joined #mojo
07:20 Guest joined #mojo
07:21 Guest joined #mojo
07:22 Guest joined #mojo
07:23 Guest joined #mojo
07:24 Adura Hmm...
07:24 Guest Guest...2?
07:26 Guest joined #mojo
07:26 Adura Darn it.
07:27 woz joined #mojo
07:27 Guest joined #mojo
07:28 Guest joined #mojo
07:29 Guest joined #mojo
07:30 Guest joined #mojo
07:31 Guest joined #mojo
07:33 Guest joined #mojo
07:34 Guest joined #mojo
07:35 Guest joined #mojo
07:36 Guest joined #mojo
07:37 Guest joined #mojo
07:38 Guest joined #mojo
07:39 Guest joined #mojo
07:40 Guest joined #mojo
07:41 Guest joined #mojo
07:42 Guest joined #mojo
07:43 Guest joined #mojo
07:44 Guest joined #mojo
07:45 Guest joined #mojo
07:45 Guest joined #mojo
07:46 Guest joined #mojo
07:47 Guest joined #mojo
07:48 Guest joined #mojo
07:49 Guest joined #mojo
07:50 Guest joined #mojo
07:51 Guest joined #mojo
07:51 bobkare joined #mojo
07:52 Guest joined #mojo
07:53 Guest joined #mojo
07:54 Guest joined #mojo
07:55 Guest joined #mojo
07:56 Guest joined #mojo
07:57 Guest joined #mojo
07:58 Guest joined #mojo
07:58 Guest joined #mojo
07:59 d4rkie joined #mojo
07:59 Guest joined #mojo
08:00 Guest joined #mojo
08:01 Guest joined #mojo
08:02 Oleg May be some expert will give right answer: http://stackoverflow.com/questions/26190860/threaded-shared-library-for-non-threaded-application
08:02 Guest joined #mojo
08:03 Guest joined #mojo
08:04 Guest joined #mojo
08:05 Guest joined #mojo
08:06 Guest joined #mojo
08:07 Guest joined #mojo
08:08 Guest joined #mojo
08:09 Guest joined #mojo
08:10 Guest joined #mojo
08:11 Guest joined #mojo
08:12 Guest joined #mojo
08:12 Guest joined #mojo
08:13 Guest joined #mojo
08:14 Guest joined #mojo
08:15 Guest joined #mojo
08:16 Guest joined #mojo
08:17 Guest joined #mojo
08:17 berov joined #mojo
08:18 Guest joined #mojo
08:21 Guest joined #mojo
08:22 Guest joined #mojo
08:23 Guest joined #mojo
08:24 Guest joined #mojo
08:25 Guest joined #mojo
08:26 Guest joined #mojo
08:27 Guest joined #mojo
08:28 woz joined #mojo
08:28 Guest joined #mojo
08:29 Guest joined #mojo
08:30 Guest joined #mojo
08:31 Guest joined #mojo
08:32 Guest joined #mojo
08:32 Guest joined #mojo
08:33 Guest joined #mojo
08:34 Guest joined #mojo
08:35 Guest joined #mojo
08:36 Guest joined #mojo
08:37 Guest joined #mojo
08:38 Guest joined #mojo
08:39 Guest joined #mojo
08:40 Guest joined #mojo
08:41 Guest joined #mojo
08:42 Guest joined #mojo
08:43 Guest joined #mojo
08:43 berov sri: thanks for encode_json_text() I hope other will enjoy it too
08:44 Guest joined #mojo
08:45 Guest joined #mojo
08:45 berov if utf8::downgrade $bytes, 1;  did not came to my mind at all but is just what is needed
08:46 Guest joined #mojo
08:46 Guest joined #mojo
08:47 Guest joined #mojo
08:48 Guest joined #mojo
08:49 Guest joined #mojo
08:50 Guest joined #mojo
08:51 Guest joined #mojo
08:52 Guest joined #mojo
08:53 Guest joined #mojo
08:54 Guest joined #mojo
08:55 Guest joined #mojo
08:55 dp_ joined #mojo
08:56 Guest joined #mojo
08:57 Guest joined #mojo
08:58 Guest joined #mojo
08:58 Guest joined #mojo
08:59 Guest joined #mojo
09:00 Guest joined #mojo
09:01 Guest joined #mojo
09:02 Guest joined #mojo
09:03 Guest joined #mojo
09:04 Guest joined #mojo
09:05 Guest joined #mojo
09:06 Guest joined #mojo
09:07 Guest joined #mojo
09:08 Guest joined #mojo
09:09 Guest joined #mojo
09:10 Guest joined #mojo
09:11 Guest joined #mojo
09:12 Guest joined #mojo
09:13 Guest joined #mojo
09:13 Guest joined #mojo
09:14 Guest joined #mojo
09:15 ladnaV joined #mojo
09:15 Guest joined #mojo
09:16 Guest joined #mojo
09:17 Guest joined #mojo
09:18 Guest joined #mojo
09:19 fhelmber_ joined #mojo
09:19 Guest joined #mojo
09:20 Guest joined #mojo
09:21 Guest joined #mojo
09:22 Guest joined #mojo
09:24 Guest joined #mojo
09:25 Guest joined #mojo
09:26 Guest joined #mojo
09:27 bpmedley Oleg: I agree that it’s GNU specific, thanks for looking at the code
09:27 Guest joined #mojo
09:29 woz joined #mojo
09:30 Guest joined #mojo
09:31 Guest joined #mojo
09:32 Guest joined #mojo
09:33 Guest joined #mojo
09:34 Guest joined #mojo
09:35 Guest joined #mojo
09:36 Guest joined #mojo
09:37 Guest joined #mojo
09:37 bpmedley Oleg: Is this the dlopen issue you’re seeing?  https://sourceware.org/bugzilla/show_bug.cgi?id=16628
09:38 Guest joined #mojo
09:38 Guest joined #mojo
09:39 sh4 joined #mojo
09:39 Guest joined #mojo
09:40 Guest joined #mojo
09:41 Guest joined #mojo
09:42 Guest joined #mojo
09:43 Guest joined #mojo
09:44 Guest joined #mojo
09:45 Guest joined #mojo
09:46 Guest joined #mojo
09:47 Guest joined #mojo
09:48 Guest joined #mojo
09:49 Guest joined #mojo
09:50 Guest joined #mojo
09:51 Guest joined #mojo
09:52 Guest joined #mojo
09:53 Guest joined #mojo
09:53 Guest joined #mojo
09:54 Guest joined #mojo
09:55 Guest joined #mojo
09:56 woz joined #mojo
09:56 Guest joined #mojo
09:57 Guest joined #mojo
09:58 Guest joined #mojo
09:59 Guest joined #mojo
10:00 Guest joined #mojo
10:01 Guest joined #mojo
10:02 Oleg bpmedley: this bug looks relevant to the problem, but don't know is this the only problem
10:02 Guest joined #mojo
10:03 Oleg On stackoverflow I got one answer: "this is impossible to use threaded library with non-threaded main app"
10:03 Guest joined #mojo
10:03 Oleg btw, is getaddrinfo_a uses threads to be async?
10:04 bpmedley Oleg: I don’t think getaddrinfo_a uses threads; however, I could be wrong.  Hrmm.  I wonder how I can find that out.
10:04 Guest joined #mojo
10:05 Oleg strace may help. If you'll see clone() syscall then it uses
10:05 Guest joined #mojo
10:06 Guest joined #mojo
10:06 Oleg Actually I see clone()
10:07 Guest joined #mojo
10:08 Guest joined #mojo
10:09 Guest joined #mojo
10:09 bpmedley Oleg: That’s a good point.  It sure does..
10:09 Oleg I also found this: http://bitsup.blogspot.ru/2008/09/asynchronous-dns-lookups-on-linux-with.html
10:09 Guest joined #mojo
10:10 Oleg He also says that it uses threads
10:10 Oleg So, your module also may crash on non-threaded perl
10:10 Guest joined #mojo
10:11 Oleg welcome to the threads hell :)
10:11 bpmedley Gaw!
10:11 Guest joined #mojo
10:12 Guest joined #mojo
10:13 Guest_ joined #mojo
10:14 Guest_ joined #mojo
10:15 Guest joined #mojo
10:16 Guest joined #mojo
10:17 bpmedley Oleg: How can I tell if my perl is threads or non-threaded?
10:18 Oleg This is how I make it right now: https://metacpan.org/source/OLEG/Net-DNS-Native-0.09/Makefile.PL#L5
10:19 Guest joined #mojo
10:20 bpmedley I don’t believe the perl I used to create the DNS_A module was compiled with threads.
10:20 Guest joined #mojo
10:21 Guest joined #mojo
10:22 Guest joined #mojo
10:22 Oleg It may work, but some day it will crash. Try to make crash test like: for (1..10000) { #make dns query to localhost }
10:23 Guest joined #mojo
10:23 bpmedley What would cause the crash?
10:24 Guest joined #mojo
10:24 Oleg see this: http://stackoverflow.com/questions/13587325/threads-vs-pthread-in-perl
10:25 Guest joined #mojo
10:26 Guest joined #mojo
10:27 Guest joined #mojo
10:27 bpmedley Hrmm.  Will libc ever be called via dlopen?
10:28 Guest joined #mojo
10:29 Guest joined #mojo
10:29 Guest joined #mojo
10:30 Guest joined #mojo
10:31 Oleg I just got segfault with your module on non-threaded perl with this example https://gist.github.com/olegwtf/da98965769ba60b65ae9
10:31 Guest joined #mojo
10:32 Guest joined #mojo
10:32 Oleg don't know much about libc
10:33 Guest joined #mojo
10:34 Guest joined #mojo
10:35 Guest joined #mojo
10:36 D4RK-PH0ENiX joined #mojo
10:36 Guest joined #mojo
10:37 Guest joined #mojo
10:38 Guest joined #mojo
10:39 Guest joined #mojo
10:40 Guest joined #mojo
10:41 Guest joined #mojo
10:42 Guest joined #mojo
10:43 Guest joined #mojo
10:44 Guest joined #mojo
10:44 Guest joined #mojo
10:45 Guest joined #mojo
10:46 Guest joined #mojo
10:47 Guest joined #mojo
10:48 Guest joined #mojo
10:49 Guest joined #mojo
10:50 Guest joined #mojo
10:51 Guest joined #mojo
10:52 Guest joined #mojo
10:53 Guest joined #mojo
10:54 Guest joined #mojo
10:55 Guest joined #mojo
10:56 Guest joined #mojo
10:57 Guest joined #mojo
10:58 Guest joined #mojo
10:58 Guest joined #mojo
10:59 Guest joined #mojo
11:00 Guest joined #mojo
11:01 Guest joined #mojo
11:02 Guest joined #mojo
11:03 Guest joined #mojo
11:04 Guest joined #mojo
11:05 Guest joined #mojo
11:06 Guest joined #mojo
11:07 Guest joined #mojo
11:08 Guest joined #mojo
11:09 Guest joined #mojo
11:10 Guest joined #mojo
11:11 Guest joined #mojo
11:12 Guest joined #mojo
11:13 Guest joined #mojo
11:14 Guest joined #mojo
11:14 Guest joined #mojo
11:15 Guest joined #mojo
11:16 Guest joined #mojo
11:17 Guest joined #mojo
11:18 Guest joined #mojo
11:19 Guest joined #mojo
11:20 Guest joined #mojo
11:21 Guest joined #mojo
11:22 Guest joined #mojo
11:23 Guest joined #mojo
11:24 Guest joined #mojo
11:25 Guest joined #mojo
11:26 Guest joined #mojo
11:27 Guest joined #mojo
11:27 Guest joined #mojo
11:28 Guest joined #mojo
11:29 Guest joined #mojo
11:30 Guest joined #mojo
11:31 Guest joined #mojo
11:33 Guest joined #mojo
11:34 Guest joined #mojo
11:35 Guest joined #mojo
11:36 Guest joined #mojo
11:37 Guest joined #mojo
11:38 Guest joined #mojo
11:39 Guest joined #mojo
11:40 Guest joined #mojo
11:41 Guest joined #mojo
11:42 Guest joined #mojo
11:43 Guest joined #mojo
11:43 Jonis ..
11:43 Jonis that's annoying
11:44 Guest joined #mojo
11:45 Guest_ joined #mojo
11:46 Guest joined #mojo
11:47 Guest joined #mojo
11:47 Guest joined #mojo
11:48 Guest joined #mojo
11:49 Guest joined #mojo
11:50 Guest joined #mojo
11:51 Guest joined #mojo
11:52 Guest joined #mojo
11:53 Guest joined #mojo
11:53 irq_ joined #mojo
11:54 Guest joined #mojo
11:55 Oleg somebody should kill Guest
11:55 Guest joined #mojo
11:56 Jonis mst: ? ;)
11:56 Guest joined #mojo
11:57 Guest joined #mojo
11:58 Guest joined #mojo
11:58 Adura Even Github's staff is infested with SJWs, gah.
11:59 Guest joined #mojo
12:00 Guest joined #mojo
12:01 Guest joined #mojo
12:02 Guest joined #mojo
12:02 Guest joined #mojo
12:03 Guest joined #mojo
12:03 Adura Guest, why is your client doing that?
12:04 Guest joined #mojo
12:05 Guest joined #mojo
12:06 Guest joined #mojo
12:07 Guest joined #mojo
12:08 Guest joined #mojo
12:09 Guest joined #mojo
12:09 Guest was kicked by jberger: Guest
12:10 Guest joined #mojo
12:11 Guest joined #mojo
12:12 Guest joined #mojo
12:13 lipizzan joined #mojo
12:13 Guest joined #mojo
12:13 chansen Oleg: I have an idea for a portable solution. You can turn the threaded DNS code into a executable which you launch from the Perl module using fork() and exec, a socketpair() can be used for IPC between executable and module, perhaps using STDIN_FILENO. When a request is made for a lookup, the module passes the request using the socket to the executable and
12:13 chansen the executable uses File Descriptor Passing to pass the socket which the caller waits for. No API changes would be needed =)
12:14 Guest joined #mojo
12:15 Guest joined #mojo
12:16 Guest joined #mojo
12:17 Guest joined #mojo
12:18 Guest joined #mojo
12:18 Oleg chansen: Looks ugly :) +Fork is not so good on windows
12:18 Guest joined #mojo
12:19 Guest joined #mojo
12:20 Oleg I think somebody should make proposal to p5p mailing list to always link perl with threads library, even for non-threaded perl
12:20 Guest joined #mojo
12:21 Guest joined #mojo
12:21 chansen Mmm, Windows ....
12:22 jberger ok so how do I ban someone?
12:22 jberger I tried: /mode #mojo +b Guest!textual@CPE-58-173-129-76.cjcz1.cht.bigpond.net.au
12:22 Guest joined #mojo
12:22 jberger and it had no effect
12:22 Jonis mode #mojo +b *!*@CPE-58-173-129-76.cjcz1.cht.bigpond.net.au
12:22 Jonis will do the trick
12:22 Jonis for that host
12:23 Jonis thing is there's no ident, so your ban didn't cover the ~
12:23 Guest joined #mojo
12:23 Jonis could also use +b Guest!*textual@*.*
12:23 Jonis ish
12:24 jberger oh you think it needs the ~
12:24 Jonis it does
12:25 jberger I've never banned anyone before :/
12:25 Jonis :/
12:25 Jonis I have banned so many people for so many reasons
12:25 jberger anyway, I **hope** that worked
12:25 Jonis yeah
12:25 Jonis it did
12:25 jberger I really didn't want to ban a whole host, I suspect that that is a bad client app not a bad user
12:26 Jonis it's weird that they kept connecting and disconnecting
12:26 Oleg When I logged in as Guest he changed nick ti Guest_, so I think this is not bad client
12:27 jberger Oleg: clients can do that for you
12:27 Jonis yeah, client did that.
12:28 Oleg especially if it is perl script :)
12:28 jberger oh, which means if someone does log in as Guest, then we will see connect/disconnect from Guest_
12:28 jberger hrm
12:28 jberger ok, just banned Guest*
12:28 jberger from that host
12:29 basiliscos joined #mojo
12:32 Claudio joined #mojo
12:38 jberger chansen: you could use Mojo::IOLoop::ForkCall for that
12:39 jberger except that there are SERIOUS bugs on Windows
12:39 jberger Perl level
12:39 jberger see: https://github.com/jberger/Mojo-IOLoop-ForkCall/issues/5
12:43 chansen I was proposing an alternative implementation to Oleg for his XS module, Net::DNS::Native which requires that Perl is linked with the systems thread library in order to work properly
12:45 jberger chansen: I get that, but what you proposed is the logic I already have in ForkCall
12:45 jberger so you could copy/use it
12:45 jberger except that I happen to know that in practice there are perl bugs that will prevent it from helping
12:46 jberger specifically this one: https://rt.perl.org/Public/Bug/Display.html?id=120767
12:46 jberger which I might go try to vote for somewhere
12:49 chansen Oh, I see
12:58 woz joined #mojo
13:02 bpmedley Oleg: I punted an only allow one async request at time: https://metacpan.org/source/BPMEDLEY/Net-DNS_A-0.02/DNS_A.xs  <— I think that will fix the seg fault
13:08 Oleg bpmedley: only one parallel request? no way :)
13:08 bpmedley Oleg: :)
13:08 Oleg this will just delay segfault
13:09 Oleg Now I am writing perl bug with proposal to link with pthreads by default
13:09 bpmedley Why do you say that?
13:09 purl Because ey thinks it is true. Duh.
13:10 bpmedley Rather, where would the segfault be given the constraints?
13:14 Oleg here or there, i really don't know how it suffers by non properly initialized libc
13:17 bpmedley Hrmm.  I was under the impression that the libc issue was only for a program that was dynamically loading a library dependent on pthreads.  I don’t think that’s the issue I had.  The assumption I’m making is that loading libc is different than dlopen’ing a library.
13:19 fhelmber_ joined #mojo
13:28 woz joined #mojo
13:53 Oleg don't know is it proper place, but who cares? https://rt.perl.org/Public/Bug/Display.html?id=122906
13:55 cpan_mojo Rex-JobControl 0.18.0 by Jan Gehring - http://metacpan.org/release/JFRIED/Rex-JobControl-0.18.0 (depends on Mojolicious::Plugin)
13:58 Oleg bpmedley: your library was dinamically loaded and depends on pthreads. Why you ate thinking this is not issue you had?
14:00 woz joined #mojo
14:03 zivester joined #mojo
14:04 mudler joined #mojo
14:09 woz joined #mojo
14:39 woz joined #mojo
14:49 * sri starts to wonder if the encode_json_text patch was a mistake
14:52 Akron joined #mojo
14:52 dod joined #mojo
14:53 sri not sure if this is acceptable https://github.com/kraih/mojo/blob/master/lib/Mojo/JSON.pm#L70
15:08 Oleg sri: now i am 90% sure that there is no way to safely use threaded xs module with perl not linked with threads
15:09 sri :(
15:09 bpmedley Oleg: I think you’re right.  Sorry.
15:09 Oleg so, looks like non-blocking resolver try #2 failed :)
15:10 bpmedley Probably so.. ;)
15:15 denis_boyun joined #mojo
15:24 cpan_mojo joined #mojo
15:33 Ralesk joined #mojo
15:36 batman sri: what was wrong about passing on encoding to the function?
15:37 sri ?
15:37 batman encode_json({ foo => "øl" }, undef); # no encoding.
15:37 sri ...
15:37 batman encode_json({ foo => "øl" }, "iso-8859-1"); # no encoding.
15:37 sri that is what's wrong!
15:38 batman that it will be invalid json?
15:39 sri what was right about passing on encoding to the function?
15:39 sri (yes, i'm turning your question around)
15:39 mst o/ you turn me right round baby right round / like a question baby o/
15:39 batman you avoid the "what should the function be called?" question
15:40 sri what is wrong with encode_json_text?
15:42 woz joined #mojo
15:42 mst what would encode_json_text do? encode to text? encode a text string? what does 'encode to text' mean? how is that different from encode_json?
15:42 batman it was just a suggestion.
15:42 mst (was how my brain reacted to hearing encode_json_text as a function name)
15:43 sri i'm just gonna leave now...
15:45 sri or you know what... i'm reverting the patch and you guys get to start over
15:45 sri batman, mst, berov, jberger: you find a better solution if you don't like it
15:46 mst you asked what was wrong with a function name. I replied.
15:47 mst I never said I like/don't like any particular piece of code
15:47 mst if you want to throw a tantrum at your contributors over something, leave me out of it
15:49 batman jberger: i wonder if we can make mandel work with Mojo::Pg ... :)
15:49 sri i never cared very much about the feature, and i'm not going to defend it, if you want it, you fight it out
15:50 good_news_everyon joined #mojo
15:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/aUlAUw
15:50 good_news_everyon mojo/master 3f13a8a Sebastian Riedel: removed encode_json_text function again
15:50 good_news_everyon left #mojo
15:50 mst I don't even know which feature you're talking about
15:50 sri i expect a formal proposal with a pull request now and a discussion with formal votes
15:51 sri sorry berov, but you have to defend the feature
15:52 Ralesk joined #mojo
15:52 Bolwind joined #mojo
15:52 sri i was always neutral on encode_json_text and jberger was the only one who gave it a +1, now there's vocal opposition, so i think this requires more thought to be put into it
15:53 sri batman also happens to be on the core team, so i'm taking his concerns seriously even if i don't agree with them
15:54 batman sorry. it wasn't meant as a concern. it was more an alternative to the solution.
15:55 batman i have no idea if i'm +1 or not. i got encoding issues at work, but i'm not sure if it's me doing something wrong or that i need encode_json_text()
15:55 batman i hate encoding.
15:55 sri anyone is welcome to take my patch and turn it into a pull request for discussion btw.
15:56 batman encoding and datetime probably be the main reasons for me dying young :P
15:56 * sri pokes tempire, jberger, marcus and crab to make them aware of the problem
16:01 Jonis I got 99 problems and haskell is all of them
16:08 sri hahaha... i was just googling for information on postgresql and json... and got this picture... which sums up my experience so far pretty well http://blog.redfin.com/devblog/wp-content/uploads/sites/3/2012/03/happy-elephant-011.jpg
16:09 mst sri: btw, while I'm aware you're not a huge fan of SQL generation at all, vti's SQL::Composer doesn't appear to be terrible
16:14 marcus I don't understand the json encoding issue.
16:30 woz joined #mojo
16:38 jberger I don't understand what the new issue is either?
16:39 jberger encode_json_text was just meant to not encode to bytes but leave it at characters
16:39 jberger that way you can embed the object literal into a javascript template
16:41 jberger I'm not exactly sure what the implementation concern is of sri's, but I have done enough encoding work with him to know that his feeling for problems is usually right
16:41 mst oh, *that*s what it was for
16:42 jberger yep, that's all
16:42 mst right. I found the name immensely confusing
16:42 mst encode_json_to_characters is hardly an improvement though
16:42 jberger finding a name has been most of the problem
16:42 berov marcus: the JSON if produced using encode_json  and used in Javascript in a template is getting couded twice
16:42 Foxcool joined #mojo
16:43 berov encoded* twice
16:44 jberger helper javascript_literal => sub { Mojo::Util::decode 'UTF-8', encode_json(pop) } # works too, but involves an unnecessary encode->decode
16:44 sri mst: json_text was a reference to RFC 7159, which uses "JSON text" to describe JSON independent of encoding
16:44 mst mmm
16:45 jberger screw it: ASCII ALL THE THINGS!!!
16:45 jberger :-P
16:46 jberger on a different note, I think I'm willing to pay a bounty on this bug: https://rt.perl.org/Public/Bug/Display.html?id=120767
16:46 sri like i said, i'm neutral on the issue and will not pursue this further, anyone who cares enough should please send a pull request and force a vote
16:46 jberger I have done enough code spelunking on it to know that I'm probably not the right one to fix it, but I want it fixed
16:47 sri (i already had a feeling something like this might happen yesterday, and hinted at the commit maybe getting reverted)
17:03 neyasov_ joined #mojo
17:08 neyasov_ joined #mojo
17:14 atmh joined #mojo
17:19 atmh hi there, I'm trying to create a route that'll create an account for my users, following successful creation of the account, I want to transparently authenticate them, knowing that I have an authentication route already can I pass them over to that in Mojolicious?
17:20 mst why do you need to use the *route* rather than just calling the method?
17:20 fhelmber_ joined #mojo
17:20 KCL joined #mojo
17:21 atmh mst: I don't know actually, I was just thinking the same this very moment
17:24 atmh mst: that said, from my register#create sub, how can I reference the login#auth sub?
17:24 mst I'd either have both in one controller or use a superclass/role
17:27 atmh hmm, I think this is why I was trying to route ..
17:28 mst because abusing the dispatcher to share code is better than doing it using straight perl?
17:30 woz joined #mojo
17:31 atmh fair point, I vaguely remember when I used Catalyst I was able to do this with relative ease so guess I'm still holding on to that .. my memory could well be betraying me here though
17:32 mst yeah, in Catalyst you could use ->forward to abuse the dispatcher, and that was a fucking horrible antipattern too
17:32 mst my experience debugging apps where people did that instead of using straight perl
17:32 mst is specifically why I'm trying to get you to not do that
17:35 atmh okay, superclass it is then, so I'll have to abstract my auth into a role, mix that into my auth and register controllers, Moose Role?
17:35 mst er. you could just have ... a superclass
17:35 mst though Moo::Role and/or Role::Tiny should work fine with Mojo
17:39 atmh excuse my lack of knowledge here please, a superclass being a Mojolicious::Controller that I'll reference in the controller?
17:39 mst what?
17:39 mst superclass as in base class
17:40 mst as in you write a subclass of ::Controller
17:40 mst and then your controllers subclass *that*
17:40 atmh yes, I guess this is what I meant :)
17:49 Eke- joined #mojo
17:50 berov "removed encode_json_text function again" , sri: why?
17:51 sri berov: see backlog
17:56 basiliscos joined #mojo
17:56 berov ok will write later. family things...sorry
18:00 atmh mst: thanks!
18:02 mst atmh: far too easy to end up trying to do framework specific things when "just use some perl" would've worked
18:09 preaction joined #mojo
18:30 woz joined #mojo
18:37 sri think i'll make Minion::Backend::File use DBM::Deep
18:38 Eke- joined #mojo
18:43 marcus Seems Mojolicious isn't very fatpacker friendly.
18:43 mst my fault or yours? :)
18:45 marcus invalid output was: Can't open file "/Users/marcus/.ansible/tmp/ansible-tmp-1412448345.8-109302261813070/entities.txt": No such file or directory at /Users/marcus/.ansible/tmp/ansible-tmp-1412448345.8-109302261813070/cloudflare line 18257.
18:46 mst wtf is entities.txt ?
18:47 marcus something Mojo::Util loads it seems
18:47 mst are you relying on sharedir-like functionality?
18:47 mst I never figured out a good solution for that, I don't think
18:48 marcus https://github.com/kraih/mojo/blob/master/lib/Mojo/Util.pm#L38
18:49 marcus Guess people will just have to install Mojo::Cloudflare before using my ansible library =]
18:49 sri there's more
18:49 marcus s/library/module/
18:49 sri bundled certs, templates and static files are also in there
18:50 marcus sri: also loaded during package load?
18:50 sri some
18:51 sri others at runtime
18:53 sri i wanted to put everything into one place, but some tools like those from activestate have a mojolicious that handles those files specifically...
18:53 sri *mojolicious mode
18:54 sri so they keep being scattered around a bit
19:04 atmh joined #mojo
19:05 marcus What tools from activestate?
19:12 Bolwind1 joined #mojo
19:26 bpmedley marcus: When I used activestate PDK I used something like this: https://gist.github.com/brianmed/87859d8e5f6965670415
19:27 marcus bpmedley: you mean you hacked that into Mojo::Util?
19:28 bpmedley Basically.. heh.  It’s the only line I had to change for Mojolicious and PDK.
19:29 mst marcus: basically, direct file access like that won't work
19:29 mst the easiest 'solution' I've found to this is to wrap the content in a HERE doc and a .pm file
19:30 mst I put solution in quotes intentionally :)
19:30 marcus mst: I don't actually need the entities either.
19:30 woz joined #mojo
19:31 marcus I guess the easiest for my use case is just commenting them out. Just tested, and it works.
19:34 marcus sri: Any chance we could push %ENTITIES into an accessor so the file is only read on the first _decode call?
19:34 mst or, y'know, (our %ENTITIES) ||= do { ... };
19:34 marcus or that
19:35 marcus certainly less overhead
19:35 marcus I guess pushing it to first runtime use could increase memory use due to COW
19:38 marcus mst: or even state would work, given that it only happens inside one sub
19:38 mst I'm happy with the 'our' pattern, since it also lets me local() for testing
19:44 _eugen joined #mojo
19:48 Akron joined #mojo
19:49 Akron marcus: As far as I remember, the entities were shipped like that before and then extracted to lower sloc.
19:51 uqurat_ joined #mojo
19:56 marcus Akron: I didn't suggest bundling them, I suggested loading them on first use.
20:05 sri Akron: you remember wrong, moving constants into a separate file to reduce sloc would be silly
20:07 atmh joined #mojo
20:14 sri hmm, DBM::Deep is pretty cool
20:17 odc joined #mojo
20:17 Akron joined #mojo
20:25 Akron sri: Well - the reason was maintenance as far as I remember ... and lower sloc is part of that.
20:25 Akron Didn't jberger started a Minion engine with DBM::Deep?
20:30 woz joined #mojo
20:30 Bolwind2 joined #mojo
20:31 sri i'll be damned
20:32 mst I think we both were years ago
20:32 sri i just hacked DBM::Deep into Minion::Backend::File, without running a test in the process... and it just works
20:33 mst prepare to be paranoid for weeks.
20:33 sri i've never used DBM::Deep before, just skimmed through the pod to see how locking works
20:33 sri DBM::Deep++
20:35 sri well, i know i still need to do some cloning to prevent accidental modifications... but this thing is really really well done
20:36 sri ah, it's called ->export
20:37 sri too easy!
20:37 purl too easy is, like, codeword for "restrict coral's creativity, it's hurting me"
20:40 ryozi_ joined #mojo
20:40 sri jberger: why didn't you tell me about DBM::Deep before?!
20:41 * sri shakes jberger
21:02 htindon joined #mojo
21:04 FlyingSquirrel Hi! I'm trying to understand how to send an email with a Mojolicious App and the least I can say is I'm very unsuccessful, can anyone help me please?
21:04 mst use Email::Sender::Simple;
21:05 FlyingSquirrel I'm going to try that and come back if I have trouble, thank you mst
21:05 mst Mojolicious is a web framework. the same thing that works in plain perl works fine in Mojolicious too :)
21:05 FlyingSquirrel I don't know how to send mail in Perl either ^^
21:08 atmh joined #mojo
21:09 * mst grins
21:10 bpmedley FlyingSquirrel: https://bitbucket.org/bpmedley/infoservant-feeds/src/8a47cb9992b73b3c27fba6e47276a344ca522dd4/docroot/info_servant/lib/SiteCode/Account.pm?at=master#cl-236
21:10 FlyingSquirrel O_O
21:11 bpmedley It’s somewhat older code - there are some better ways to do these things.  However, I thinkt he email code is basically ok.. I hope.. :)
21:12 odc bpmedley, for such a simple email, you could just use Net::SMTP ;)
21:13 bpmedley odc: Probably so.. :)
21:13 mst Email::Sender::Simple is the current best practice, and what #perl-help or freenode #perl would recommend
21:13 mst I'd rather open a pipe to sendmail than use Net::SMTP directly :)
21:13 odc bpmedley, oh! unless you're using an external mail server
21:14 FlyingSquirrel *smashing head on desk*
21:14 bpmedley odc: Yes, it does.
21:14 purl if you say so...
21:14 bpmedley FlyingSquirrel: What’s up?
21:14 FlyingSquirrel nothing, I still feel like a squirrel with a keyboard
21:14 FlyingSquirrel it threw me all kinds of errors when I tried the examples from Email::Sender::Simple
21:15 mst for an even easier interface, there's Email::Stuffer and Emailesque
21:16 mst e.g. https://metacpan.org/pod/Email::Stuffer#SYNOPSIS
21:16 FlyingSquirrel I kind of have the feeling that it will keep throwing errors because I'm doing it wrong no matter the module I'm using. The thing is, I have no idea how this works.
21:17 mst well, try with Email::Stuffer and then share code+error if it doesn't work
21:17 FlyingSquirrel ok
21:17 mst also remember you can write a small command line script to test it
21:17 FlyingSquirrel true
21:18 mst I always write business logic code separately, unit test it, then have my controllers call it
21:18 mst otherwise you end up doing transaction script style instead of sane OO
21:21 fhelmber_ joined #mojo
21:23 sri and done, the default backend for Minion is now DBM::Deep https://github.com/kraih/minion/commit/817471769f79d10180ce1e48cabc5d0b9ca8d7e0
21:23 * sri pokes jberger
21:24 jberger sri: I did!!!
21:24 FlyingSquirrel mst, it throws no error now but it doesn't do anything
21:25 sri jberger: but seriously, shame on you for not telling me about it earlier!
21:25 sri \o\
21:25 sri /o/
21:26 * jberger searches the log
21:26 * sri notes that he is just joking
21:27 Eke- joined #mojo
21:27 mst jberger: it's ok, I'm sure I told him about it years ago
21:27 mst he's going senile in his old age, is all :D
21:27 jberger well that's true
21:27 sri GET OFF MY LAWN
21:27 FlyingSquirrel ^^
21:28 jberger and seriously, DBM::Deep is really cool
21:28 mst FlyingSquirrel: what code "doesn't do anything" ?
21:28 jberger I take heat on SO when I suggest it for simple projects, I'm not sure why
21:28 sri http://big.assets.huffingtonpost.com/clint-disgusted.gif
21:28 FlyingSquirrel isn't it supposed to send an email?
21:29 mst FlyingSquirrel: WHAT CODE DID YOU RUN
21:29 * mst facedesks
21:29 sri that gif is me when i looked at the DBI code in DBM::Deep :o
21:30 * jberger worries that mst forgot to move that pin cushion off his desk first
21:30 FlyingSquirrel mst, the example from email stuffer, no need to yell
21:30 odc FlyingSquirrel, do you have a worker mail server on your computer?
21:30 woz joined #mojo
21:30 mst the example has invalid email addresses, so you would expect the result to be the email entering your mail queue and then sitting there, undeliverable, before being bounced back to the -other- fake address
21:30 mst so obviously running the example exactly is completely fucking useless
21:30 FlyingSquirrel I changed the addresses
21:31 FlyingSquirrel I'm not that stupid
21:31 mst see, so it -wasn't- just the example. which is why I asked what code.
21:31 FlyingSquirrel oh
21:31 * mst doesn't understand why "I want to see code if I'm going to help you debug it" is hard
21:31 mst odc: if it didn't error out, one would presume he has a sendmail binary of -some- sort, so we can work from there :)
21:32 jberger sri: I have never used the DBI backend
21:32 FlyingSquirrel *she
21:32 odc oh ok
21:32 mst FlyingSquirrel: note that 98% of the time when people say "I copied the example exactly" the second half of the sentence is "except for a subtle mistake I didn't notice, but will be immediately obvious once mst sees the code"
21:32 FlyingSquirrel ok
21:33 jberger also note that often the authors don't actually run their examples
21:33 mst in fact, I've already spent more time trying to convince you to show me it than I usually spend actually finding the damn problem
21:33 mst so, no need to shout, but plenty of incentive :P
21:33 mst I need an irssi alias for this
21:33 jberger mst: well now you've built it up, its never going to live up to expectation :-)
21:34 mst it's probably going to turn out that the script's fine and his local mail server isn't delivering and it's sat in the queue somewhere and we'll be checking /var/log just as soon as he lets me check the code :)
21:35 mst that or it'll take him more than 20 minutes to decide to listen to me and I'll fuck off to the pub and let you lot do it instead :D
21:35 jberger mst: reminder: *her
21:35 FlyingSquirrel I'm part of the 98% and didn't copy-pasted properly so I'm starting again first
21:36 * mst GRINS
21:36 FlyingSquirrel then I will feel a bit less ashamed when showing my code
21:36 mst FlyingSquirrel: please note that I am too, I'm just so used to being this stupid that I'm faster at assuming I'm wrong than most people and sometimes they confuse that with intelligence :D
21:37 mst jberger: ah, I'd missed that
21:38 mst FlyingSquirrel: please apply appropriate s/his/her/ etc. to my previous comments. or don't, if you prefer not to.
21:38 FlyingSquirrel that's ok
21:38 jberger since I have never tried, Email::Sender still needs an external SMTP server yeah?
21:38 mst eh?
21:38 mst Email::Sender::Simple, by default, uses your system sendmail; it will also, if you configure it to do so, use Net::SMTP
21:39 mst but the latter just means you have to input your smarthost information once per app, rather than once
21:39 mst so except in fairly specific scenarios I'd rather get the local mailer working
21:39 mst also, the local mailer tends to return pretty much immediately
21:39 mst whereas Net::SMTP is a really good way to block your web handler process
21:39 jberger FlyingSquirrel: can you send an email via your sendmail on the command line?
21:39 FlyingSquirrel jberger, can you tell me the syntax?
21:40 jberger egad, its been a while since i've done that
21:40 * jberger googles
21:40 FlyingSquirrel mst there's a problem with the AMBUSH_READY thing http://pastebin.com/a5PAbYGa
21:40 mst sendmail -oi -t <<END
21:40 mst Subject: I HATE EVERYTHING
21:40 mst From: some@address.com
21:40 mst To: other@address.com
21:40 mst <blank line>
21:40 mst ALL THINGS MUST DIE
21:40 mst END
21:40 odc haha
21:41 mst FlyingSquirrel: you indented AMBUSH_READY
21:41 mst FlyingSquirrel: here documents don't work like that
21:41 FlyingSquirrel did I?
21:41 FlyingSquirrel ok
21:41 mst you did. there's two spaces in front of it
21:41 mst remove all the spaces off the front of the email block
21:41 mst it has to be left aligned if you use that synta
21:41 FlyingSquirrel I dearly hate indentation :)
21:41 mst (well, no, you can do more complicated things, but 'has to' is a reasonable start)
21:42 FlyingSquirrel synta?
21:42 mst x
21:42 FlyingSquirrel ah
21:43 odc FlyingSquirrel, ah! You're a 42 student?
21:43 FlyingSquirrel yup
21:43 odc 1st year?
21:43 purl 1st year is GE bullshit, 2nd year is when you start touching the stuff
21:43 FlyingSquirrel I didn't validate anything last year so yeah, kinda first year
21:44 odc heh
21:44 odc courage!
21:44 purl courage is a man with diarrhea risking a fart.
21:44 FlyingSquirrel Oo
21:44 odc lol
21:44 FlyingSquirrel sounds like life experience
21:44 jberger hahahahaha
21:44 purl LOLCON 5 reached.
21:45 * jberger smacks purl with a fish
21:45 mst we have the best bots.
21:45 mst purl: be mst
21:45 purl WE ARE NOT FUCKING GUESSING
21:45 jberger damn, I mistyped
21:45 FlyingSquirrel oh
21:45 * jberger slaps purl with a fish
21:45 * purl slaps jberger with comically large fish in return
21:45 mst botsnack
21:45 purl :)
21:45 odc no, i was a supinfo student. But I heard horror stories from other 42 students. Like they really give you *a lot* of homework
21:45 mst see, now I miss batmop on irc.netgoth.org.uk #orgy
21:45 mst you'd try and hug it and it'd stab you repeatedly
21:45 FlyingSquirrel homework
21:45 purl We won't do your homework for you. Don't ask. Use http://icanhaz.com/perl instead.
21:45 FlyingSquirrel XD
21:46 mst note: the above sendmail invocation should be about right
21:46 FlyingSquirrel odc, to have 'homework' you need to have the hope of getting home sometimes
21:46 odc oh right :D
21:46 mst jberger: it's been mostly years for me too but the scars of large scale mail administration heal very slowly
21:47 mst odc: looks to me like on debuntu at least /usr/sbin/sendmail ends up being a symlink to whichever mail server, which should help clue us in as to which logfile to spelunk in
21:47 jberger isn't there something about ending with a line with a single dot
21:47 jberger ?
21:47 FlyingSquirrel odc, but yeah the projects and deadlines are kind of tough
21:47 mst jberger: that's SMTP over telnet
21:47 mst my fingers know how to do that too, admittedly
21:47 odc mst, should be exim
21:47 * jberger is having waking nightmares
21:48 odc /var/mail.log me thinks
21:48 preaction "i'm ready to host my own mail server! i'm not afraid!" "oh? you will be..."
21:48 mst odc: I'd bet on exim or postfix
21:48 mst then again I went and checked a bunch of our systems and they're all ssmtp to our main exim hub
21:49 odc exim is on debian i'm sure. Ubuntu may use ssmtp
21:49 odc nope
21:49 mst I've encountered plenty of both exim or postfix
21:50 mst ssmtp on our systems will be intentional
21:50 FlyingSquirrel yay I received a mail from myself with sendmail
21:50 mst right. then assuming you get the code right, Email::Stuffer should Just Work
21:50 mst since it defaults to using sendmail
21:50 FlyingSquirrel yup, correcting it right now
21:51 mst of course, this is why I didn't bother debugging the mail server to begin with; I try and pick the thing most likely to have gone wrong first, and that wasn't it :)
21:51 mst (this comment mostly consists of "I told you so" to odc and jberger ;)
21:51 jberger purl: be mst
21:51 purl Different things are different.
21:51 odc pffff
21:52 FlyingSquirrel is it normal that it takes ages to send an email?
21:52 odc no
21:52 mst no. there might be an inline DNS lookup happening somewhere that's timing out or something
21:52 mst did sending one manually also take ages?
21:52 FlyingSquirrel yes
21:52 preaction check the mailq
21:53 mst right, so I vote for 'DNS' or 'firewall' or basically 'something is waiting to time out, and software hates us all'
21:53 mst bah
21:54 FlyingSquirrel dafuq, I received a message at my address to tell me my address is invalid
21:54 FlyingSquirrel interesting
21:54 mst the old oneliner.cgi went away so purl is no longer hooked directly to http://trout.me.uk/cgi-bin/mstomatic.cgi
21:54 FlyingSquirrel trying with another address
21:55 jberger hmmm, pastebin.com does suck
21:55 sri purl: be sri
21:55 purl i am teh help-vampire slayer! (lesbian witch wanted...to umm...assist me...)
21:55 FlyingSquirrel Oo
21:55 jberger HAHAHAH
21:55 sri oO
21:55 mst purl: be sri
21:55 purl lets destroy the sun!
21:55 sri \o/
21:55 jberger it really should set tianon on fire too
21:55 ribasushi purl: be mst
21:56 purl RTFMTALITY
21:56 FlyingSquirrel works fine with the other email address
21:56 jberger oh now we've got ribasushi in the mix, there goes the neighborhood :-)
21:56 jberger ribasushi: o/
21:56 ribasushi \o
21:56 FlyingSquirrel hey wait no
21:56 FlyingSquirrel it doesn't work
21:56 purl It's a Y2K error!  Panic!  Sue!
21:57 jberger purl: botsnack
21:57 purl thanks jberger :)
21:57 jberger purl is on a roll today
21:57 FlyingSquirrel ah ok, just received it
21:57 FlyingSquirrel uh uh my config is bad, very bad
21:59 FlyingSquirrel can I call a sub 'sendmail'?
22:00 jberger so I tried to offer a bounty for a fix for https://rt.perl.org/Public/Bug/Display.html?id=120767
22:00 jberger but I think google groups ate my email
22:01 odc FlyingSquirrel, yes
22:02 woz joined #mojo
22:03 mst yes, but if you still have 'use Email::Sender::Simple' in your code confusion will ensue, so make sure to remove that first
22:07 FlyingSquirrel ok
22:09 atmh joined #mojo
22:25 jberger mst: dear lord how many entries are in the mstomatic?
22:33 Bolwind1 joined #mojo
22:34 woz joined #mojo
22:57 FlyingSquirrel mst, I keep trying to understand what AMBUSH_READY is but I don't have any clue.
23:07 jberger FlyingSquirrel: look for heredoc
23:07 jberger google for
23:09 FlyingSquirrel thank you jberger
23:10 atmh joined #mojo
23:10 FlyingSquirrel ooh
23:13 FlyingSquirrel jberger, I made a simple html form but I saw there are other way of doing forms when using Mojolicious, is there a module in particular that is practical for login/register/contact forms?
23:29 sri i almost made a redis backend for minion, but the unstable state of Mojo::Redis* modules makes me too nervous
23:30 woz joined #mojo
23:31 Bolwind1 joined #mojo
23:52 D4RK-PH0ENiX joined #mojo
23:56 sri it's not very popular... but i still like the Minion api :o
23:59 cpan_mojo Minion 0.39 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-0.39 (depends on Mojolicious)

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