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

IRC log for #mojo, 2017-10-02

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

All times shown according to UTC.

Time Nick Message
00:58 crab joined #mojo
02:32 trippeh joined #mojo
02:46 noganex_ joined #mojo
03:29 Ralesk joined #mojo
04:04 dboehmer joined #mojo
04:56 inokenty-w joined #mojo
05:58 dod joined #mojo
06:10 ashimema joined #mojo
06:29 petru joined #mojo
06:37 dod joined #mojo
06:46 aborazmeh joined #mojo
06:50 AndrewIsh joined #mojo
07:22 trone joined #mojo
07:31 Vandal joined #mojo
08:02 petru joined #mojo
08:06 leont_ joined #mojo
08:56 rshadow joined #mojo
09:01 kiwiroy joined #mojo
11:56 dod joined #mojo
11:57 rob joined #mojo
11:57 rob Hey guys
11:59 rob Hoping someone can help me with sending a multipart/related message using UserAgent? It's JSON metadata followed by file contents
12:00 rob multipart/formdata I can do, but I don't see how to specify multiple parts
12:09 schelcj joined #mojo
12:31 dod joined #mojo
12:37 batman jberger: i think it only validates the json. i don't think you can query it. (iirc)
13:02 petru joined #mojo
13:06 orev joined #mojo
13:07 dantti_laptop joined #mojo
13:18 gizmomathboy joined #mojo
13:22 tcohen joined #mojo
13:40 Pyritic joined #mojo
13:42 dod joined #mojo
14:00 dod joined #mojo
14:02 sri there's some easy to solve open issues on github btw.
14:02 sri i'll leave them open for volunteers
14:08 bc547 joined #mojo
14:11 genio have you seen inhumans yet?
14:12 sri unfortunately yes... :S
14:13 sri it makes iron fist look good
14:13 pink_mist lol
14:14 pink_mist most of the marvel's agents of shield series does the same as well
14:14 tcohen hi #mojo, is anyone running minion on multiple servers? is it possible to control in which node tasks are ran?
14:14 sri disagree, AoS is at least campy fun in it's weaker seasons
14:15 sri tcohen: use different named queues for the servers
14:15 tcohen sri: you mean I should deal with the (sort-of) round robin picking the queue?
14:16 sri you could have each server watch the global default queue and one server specific queue
14:16 sri tcohen: i don't know what that means
14:17 tcohen if I only have one global default queue, then the servers compete for the task, right?
14:18 tcohen so only one server will pick each task?
14:19 sri yes
14:19 * tcohen is already loving monion :-D
14:20 gryphon joined #mojo
14:34 genio sri: aww, an. I was kind of looking forward to watching that tonight
14:39 sri genio: it's basically uwe boll level of awful... sorry
14:40 Trelane joined #mojo
14:40 sri watch star trek instead, apparently episode 3 is really good
14:40 sri (about to watch it)
14:43 jberger I liked ep 4 of Orville too
14:43 jberger haven't started Discovery yet
14:44 genio I'm still loving The Orville. I've only seen 1 and 2 of Discovery thus far. I don't hate Discovery, it's just not what I think of as Star Trek
14:45 jberger 3 and 4 are even better
14:45 jberger oh, sorry, misread
14:46 jberger batman: I'm not sure what your comment was in regards to
14:48 karjala_ joined #mojo
15:02 maschine joined #mojo
15:22 zivester joined #mojo
15:25 leont_ joined #mojo
15:32 gryphon joined #mojo
15:41 maschine Any reason session data would suddenly disappear?  I have the cookie set to expire after one year (which I verified)
15:41 maschine $self->session('foo') = bar works for about 5 minutes, then it resets back to undef.
15:43 maschine could it be because I'm running a dev server?  It seems to do it after I update something
15:44 jberger that shouldn't affect it
15:44 jberger assuming you aren't randomizing your secret
15:44 jberger oh I bet you're randomizing your secret
15:45 jberger that or the foo value isn't all thats going on, are you using foo to look up something in a memory cache that gets cleared on server restart?
15:47 maschine my secret isn't randomized - basically I'm using it to override a config value.  if the session value is defined, then it gets set, otherwise it falls back to the config value
15:47 jberger so the value in the config is being unset?
15:48 jberger or reset back to the original
15:49 jberger anyway, details aside, a session value should survive a server restart if the secret isn't changed
15:49 maschine No, I'm not touching that, I'm doing if (defined session->('foo')){ $foo = session->('foo')), else { $foo = config->{foo'} }
15:50 maschine since it defaults back to the config value after a while I'm assuming the session value is going undef, but the cookie is still there with the same date/time
15:52 sri after watching episode 3 i kinda like discovery, it's good sci-fi, you just have to ignore that it's supposed to be star trek
15:53 coolo :)
15:53 coolo they have klingons
15:53 sri weird looking klingons
15:53 coolo and nuschelnde Klingons
15:55 jberger maschine: you might try: https://metacpan.org/pod/Mojolicious::Plugin::ConsoleLogger
16:00 maschine I'll try that thanks
16:01 sh14 joined #mojo
16:11 perlpilot joined #mojo
16:13 ChmEarl joined #mojo
16:35 sh14|2 joined #mojo
16:52 leont_ joined #mojo
17:14 Trelane So, I'm trying to help nchelluri with the problem he's trying to solve: JavaScript libraries like angular treat '{{' and '}}' in HTML as deliminators that contain JavaScript code
17:14 Trelane Thanks to your help last week he managed to get <%= ... %> to escape the { into its entity
17:16 Trelane The next problem we're having is that we use the TagHelper to create tags, and that bypasses the custom escaping
17:16 Trelane I dug deep, and found the code is using Mojo::DOM::HTML, which is directly using xml_escape
17:18 Trelane So...what would be a good way to fix this?  I guess we could simply monkey patch xml_escape and that would fix everything everywhere, but the moment I start using phrases like 'monkey-patch' I think there must be a better way to do this
17:22 dod joined #mojo
17:26 tchaves joined #mojo
17:57 preaction you can replace all the tag helpers with versions that use your own escaping
18:03 gryphon joined #mojo
18:33 marty joined #mojo
18:38 jberger in this case perhaps there isn't a better way (or maybe preaction is right, but that's quite a lot of work, and is essentially monkey patching too)
18:38 jberger the tag helpers expect to be creating html and thus escape thusly and without a good hook into changing it
18:38 preaction it's not overriding a widely-called thing with new behaviors, it's more focused
18:39 jberger conceded
18:40 preaction like, i also do not agree with it, but...
18:41 sh14 joined #mojo
18:43 gordonfush joined #mojo
19:01 jamesaxl hi
19:02 jamesaxl what database module do you use with Mojolicious ?
19:02 genio I tend to either go with Mojo::Pg or DBIx::Connector (depending on which DB I'm using at the time)
19:05 preaction i use DBIx::Class mostly
19:06 jamesaxl genio: i think, Mojo::Pg is good, but I am using postgres
19:06 jamesaxl genio: i think, Mojo::Pg is good, but if I am using postgres
19:08 Grinnz what database are you using?
19:08 jamesaxl Grinnz: postregsql, mysql and sqlite
19:09 jamesaxl why? because i want to give many choice to users.
19:10 Grinnz then i would either provide backends using Mojo::Pg, Mojo::mysql and Mojo::SQLite, like Minion does, or use DBIx::Connector
19:10 Grinnz or DBIx::Class if you want an orm
19:11 preaction there's also https://metacpan.org/pod/Mojo::TypeModel
19:11 jamesaxl Grinnz: Mojo::Pg, Mojo::mysql and Mojo::SQLite I think is good for me
19:12 jamesaxl are*
19:13 jberger I like promoting my modules, but I don't see what TypeModel does for DB abstraction
19:13 jberger other than I guess you could build different models for different backends
19:14 Grinnz regardless of the approach you take, you'll need to build different backends for each database, since the queries they need will be different
19:15 Grinnz (unless you go the DBIx::Class route which abstracts that for you)
19:19 rshadow joined #mojo
19:21 jamesaxl I see that the authors of DBIx::Class are fan of Metallica band
19:44 Trelane preaction: I think you have come up with a really good idea.  This will make the interface much cleaner too
19:45 preaction .. which?
19:45 preaction replacing tag helpers?
19:45 Trelane Overriding the tag helpers
19:46 Trelane This means that you could make it so that passing a b($something) as an attribute won't be escaped
19:46 preaction i mean, if i can't dissuade you from it... it's not a terrible difficult thing to do: list all the helpers, wrap them all in the same subref that knows how to escape its whatevers. it's a few lines of code max
19:46 Trelane meaning the helper can still output things where you really do mean to pass in '{{...}}' attributes
19:47 Trelane I'll get nchelluri to do it ;-)
20:21 kiwiroy joined #mojo
20:45 kiwiroy joined #mojo
20:48 CandyAngel Uh.. what is the right way of doing this in the routing? /tag (list) /tag/:id (show) /tag/:id/edit (edit) /tag/:id/delete (delete)... I don't get where I meant to put the form to create new tags :|
20:48 CandyAngel Or should it be /tags to list them and /tag has the form?
20:49 Grinnz i was going to say you would usually use get/post/etc verbs but i guess you're talking about pages not an api
20:49 CandyAngel yeah
20:49 preaction /tag/new
20:49 Grinnz (and make sure to put that before /tag/:id so id can't be new)
20:50 CandyAngel So whatever I make that, it essentially becomes a reserved id (e.g. if id can be numeric or a slug)
20:50 preaction yes
20:51 CandyAngel Hm... okie dokie
20:51 CandyAngel Thankies, as always :)
20:51 preaction you could also use something totally reserved and inappropriate for IDs, like ~: /tag/~new
20:52 preaction unfortunately + is a kind of terrible thing for URLs (stupid old URL encodings)
21:15 kiwiroy joined #mojo
21:34 kiwiroy joined #mojo
23:00 marty joined #mojo
23:16 gryphon joined #mojo

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