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

IRC log for #mojo, 2017-06-15

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

All times shown according to UTC.

Time Nick Message
00:15 howardito joined #mojo
01:20 aborazmeh joined #mojo
01:25 stryx` joined #mojo
02:19 stryx` joined #mojo
02:22 zivester joined #mojo
02:33 noganex_ joined #mojo
03:03 charsbar joined #mojo
04:04 dboehmer_ joined #mojo
04:52 karjala_ joined #mojo
05:44 marcus good morning
05:44 purl Lies!
05:44 * marcus hugs purl
05:44 * purl hugs marcus back
05:49 karjala_ joined #mojo
05:59 dod joined #mojo
06:05 dod joined #mojo
06:29 inokenty-w joined #mojo
06:43 AndrewIsh joined #mojo
06:55 dod joined #mojo
07:20 trone joined #mojo
07:21 stryx` joined #mojo
08:02 Dandre joined #mojo
08:18 karjala_ joined #mojo
08:41 CandyAngel Just to confirm my understanding.. when Content::Single->parse is called, it either returns itself or a Content::Multipart, which gets assigned as the content in Message::Request.. so sometimes it assigns it to what it already was?
08:47 stryx` joined #mojo
08:52 kes joined #mojo
08:53 kes Hi.
08:53 CandyAngel Heyas kes
08:53 kes Is there a way to keep schema definition (OpenAPI) near subroutines and do not move them all into swagger.json?
08:55 CandyAngel Sorry, I've not worked with those yet..
08:55 tholen joined #mojo
09:02 stryx` joined #mojo
09:04 nic sri: Is it considered valid to do: $minion->backend->list_jobs(0, 10, {queue => undef, state => undef, task => undef});
09:04 nic I've been told my code doesn't support that invocation, but I'm struggling to understand why someone would do that
09:05 nic (my head has been away from Minion for long times)
09:05 sri nic: i don't think so
09:05 nic thanks
09:28 rshadow joined #mojo
09:52 rshadow joined #mojo
09:54 tholen joined #mojo
09:55 tholen joined #mojo
09:55 tholen joined #mojo
09:59 rshadow joined #mojo
10:06 rshadow joined #mojo
10:09 rshadow joined #mojo
10:14 CandyAngel I have a crazy idea.. from the write up jberger did about how requests go through Mojolicious
10:14 CandyAngel A choose your own adventure..
10:16 CandyAngel "A voice booms out: Do you have a header named 'Upgrade'? [Yes] [No]" -> Yes -> "next to you, what appears to be a clone appears and you are stuffed inside"
10:16 CandyAngel Okay, maybe that's a little creepy
10:17 tholen joined #mojo
10:17 tholen_ joined #mojo
10:17 tholen__ joined #mojo
10:26 rshadow joined #mojo
10:31 PopeFelix joined #mojo
10:32 rshadow joined #mojo
11:03 aborazmeh joined #mojo
11:08 karjala_ joined #mojo
11:21 aborazmeh joined #mojo
11:30 aborazmeh joined #mojo
12:01 marcus :-o
12:05 sri Oo
12:07 karjala_ !!
12:12 maschine joined #mojo
12:18 sri CandyAngel: re Mojo::Content/Message, yes, that's how it works
12:25 CandyAngel Neat :)
12:27 gizmomathboy joined #mojo
12:40 CandyAngel I do wish this protocol was a bit more sane. There is a packet header.. except when it is a "collection" (basically, merged) packet, then there is data that is normally in the header, but in the payload
12:41 CandyAngel (That's why I was looking to Content Single/Multi, to see if I can map them to this bit of the protocol)
12:54 CandyAngel Actually, I have an idea
12:55 CandyAngel I can move the data around so it is always sent to Content as though it was a collection packet..
13:02 PryMar56 joined #mojo
13:06 * jabberwok waves the rusty rod, and a crystal bridge spans the fissure
13:22 Pyritic joined #mojo
13:58 * sri is glad he added enqueued_jobs to the minion stats
13:59 sri fun to know we are close to having processed 3 million jobs at work overall even though there are only 80k jobs in the queue that have not been cleaned up yet
13:59 sri minion really needs a web ui
14:04 maschine dumb question about websockets - do they work per user session, ie if I want to push a notification, does everyone get it or just the single session?
14:05 sri single session
14:05 sri see Mojo::Pg chat example for how to broadcast
14:06 maschine Ok so I can broadcast if I want, or just target a specific session.  Cool. :)
14:06 sri https://github.com/kraih/mojo-pg/blob/master/examples/chat.pl
14:07 maschine I originally tested my ws configuration with the chat example, which worked, but i wasn't sure if "broadcast" was the only option
14:08 maschine I have a minion job that I want to run and push a notification to the user when it's complete - speaking of minion interfaces. :)
14:09 sri the example app in the minion dist does something similar
14:09 sri you would just not pull with html refresh
14:10 sri but a recurring timer or so
14:10 sri https://github.com/kraih/minion/tree/master/examples/linkcheck
14:12 maschine I figured I could do something with Mojo::Useragent inside my minion job
14:13 batman maschine: you can broadcast if you're using "daemon" instead of prefork/hypnotoad, but then... it won't scale very well, compared to using a proper backend
14:16 maschine I don't want to broadcast so that's fine - I'm using hypnotoad
14:16 maschine sri: thanks for the example - lots of stuff I can use from there :)
14:18 maschine I'm always surprised how short most of the code is in Mojolicious for how much it does - I guess I keep expecting huge monolithic scripts like the ancient cgi-lib.pl :p
14:20 batman yeah. me too...
14:21 CandyAngel Also, for how much it can do :)
14:21 batman it's partly because mojo is awesome, but also (at least for my own case) that mojo has taught me that "less is more"
14:21 batman thanks again sri for showing me a completely different way to program, compared to what i was doing before.
14:22 sri glad my lazyness has been helpful to you :D
14:23 batman indeed, haha
14:23 batman what amazes me is how much improved testing has helped med, instead of thinking i would be saved by `has x => (isa => "SomeFunkyStuff")`
14:24 batman med = me
14:26 batman not sure if that is "amazing", but still :P
14:27 * CandyAngel starts the "Mojolicious helped me become a better coder" group
14:28 CandyAngel BABCOM? (Became A Better Coder On Mojolicious)
14:39 maschine it makes it a lot easier to learn - I never did figure out how cgi-lib.pl worked.  ugh.
14:39 sri CandyAngel: https://cdn.meme.am/cache/instances/folder870/37089870.jpg
14:40 sri that said, i did not like bacon on pizza
14:40 sri that's just wrong
14:40 purl Fire and brimstone coming down from the skies. Rivers and seas boiling! Forty years of darkness, earthquakes, volcanos. The dead rising from the grave! Human sacrifice, dogs and cats living together... mass hysteria!
14:41 sri yea
14:42 jberger to be fair, no one learned how cgi-lib.pl worked
14:44 maschine I think I could follow it for the first 20 lines or so, then....
14:44 maschine probably why it took me so long to learn to write Perl properly, since it was one of the examples I looked at a lot trying to figure out how to use it. :p
14:45 CandyAngel I think the thing I'm working on now uses it..
14:45 CandyAngel I mean, the original service
14:45 maschine http://cgi-lib.berkeley.edu/2.18/cgi-lib.pl.txt
14:46 maschine I still don't understand it. lol
14:47 maschine I used to write a lot of Perl without "strict".  I ran into so many issues with variables running into each other because they were all global. ugh.
14:59 jabberwok maschine: fond memories of the day of discovering "associative arrays" in the change from Perl4 to Perl5, no longer having to append multiple strings to build symbolic references  like ${'config-'.$parameter}
14:59 PopeFelix joined #mojo
15:02 pink_mist jabberwok: "associative arrays"? did you mean hashes? pretty certain they existed in perl4 too ... the thing perl5 got was proper references, so you could have arrayrefs/hashrefs inside an array/hash
15:03 jabberwok exactly pink_mist -- it was a period of great progress and renamings.  (Rebel operators striking from a hidden directory...)
15:03 zivester joined #mojo
15:04 PopeF joined #mojo
15:05 jberger I think he means ... this ... (may gods have mercy on me for linking this): https://perldoc.perl.org/perldata.html#Multi-dimensional-array-emulation
15:07 pink_mist yeah, but that's solved by having refs
15:07 jberger right
15:07 jberger but the name isn't so wrong
15:10 CandyAngel Aha! Another part of the project clicks into place
15:10 CandyAngel Yay for returning motivation!
15:11 Pyritic joined #mojo
15:16 CandyAngel I can use ::Content for parsing packets and ::Renderer for building them :D
15:20 CandyAngel Or ::Transaction::Request for parsing, rather
15:52 karjala_ joined #mojo
15:54 Intern42 joined #mojo
15:54 Grinnz maschine: that's the biggest problem with PHP, and i'm pretty sure it's still unsolved there
15:55 gryphon joined #mojo
15:56 arcanez PHP has namespaces now. \ seems like an odd choice for a delimiter
15:57 CandyAngel C:\PHP\php.exe
15:57 * arcanez remembers writing <?php3
15:58 Grinnz yes, \ as syntax is another amazing decision on their part
15:58 arcanez they had "reasons" but I didn't find them compelling enough to pick \
15:59 Grinnz as a token delimiter i should say
15:59 Grinnz or whatever you call that
15:59 arcanez https://wiki.php.net/rfc/namespaceseparator
15:59 Grinnz hahaha, they should have gone with smiley faces
16:02 maschine I avoid PHP at all costs :p  seems like it's the source of lots of security issues these days
16:02 maschine https://news.netcraft.com/archives/2017/05/18/web-shells-the-criminals-control-panel.html
16:03 maschine I get lots of bots searching my domain for PHP / Wordpress..
16:03 arcanez I think PHP _apps_ are more prone to vulnerabilities than PHP itself?
16:03 arcanez wordpress, drupal
16:03 Grinnz i mean, same as any language, it's up to how you use it
16:03 Grinnz but PHP certainly hasn't done itself any favors
16:04 maschine yeah but just having PHP installed leaves you vunerable to a shell attack (if they can get in)
16:04 arcanez at $work, people have written some admin script with PHP
16:04 PopeFelix joined #mojo
16:04 arcanez makes me cringe
16:05 Grinnz yes, things that arent web apps written in php are hilarious, until you have to use them
16:14 PopeF joined #mojo
16:50 bwf joined #mojo
16:53 dod joined #mojo
17:00 kgoess we finish our $route declarations with an explicit blackhole:
17:00 kgoess $route->any('/*')->to('notfound#nope')
17:01 kgoess bit that prevents the static files being served from public/
17:01 sri no, it doesn't
17:01 kgoess I'm having trouble finding the $route->get('/public')-> invocation
17:01 Grinnz static files aren't a route
17:01 Grinnz they're handled by https://metacpan.org/pod/Mojolicious#static
17:02 Grinnz just empty that attribute's "paths" attribute if you don't want to serve static files
17:03 kgoess oh, right, it doesn't, misread the test
17:23 disputin joined #mojo
17:53 gryphon joined #mojo
18:13 kermi joined #mojo
18:14 zivester joined #mojo
18:21 trone joined #mojo
18:35 stryx` joined #mojo
18:42 marty joined #mojo
18:54 rshadow joined #mojo
19:21 disputin joined #mojo
19:43 Petru_ joined #mojo
19:45 Petru_ How can I use the lexicon from plugin I18N which I use in templates inside testing code?
20:23 cheako joined #mojo
20:33 stryx` joined #mojo
20:52 gryphon joined #mojo
21:22 ssm joined #mojo
21:54 marty joined #mojo
22:16 zivester joined #mojo
22:28 CandyAngel Anyone know if Encode can handle Modified UTF-8 (from Java) off the top of their head?
22:29 pink_mist it can be pretty lenient in the utf8 it accepts afaik
22:29 pink_mist but I don't know what "Modified UTF-8" actually is
22:30 CandyAngel Java does special encoding when serialising so a null byte doesn't show up
22:31 CandyAngel https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8
22:36 Petru_ joined #mojo
22:41 Grinnz https://perlbot.pl/p/ls5jmd - doesn't appear to, nope
22:44 Grinnz you could write an Encode::MUTF8 or so
22:45 CandyAngel Seems I'll have to
22:46 Grinnz https://metacpan.org/pod/Encode::Encoding
23:00 Lee joined #mojo
23:01 PopeF joined #mojo

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