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

IRC log for #mojo, 2017-05-27

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

All times shown according to UTC.

Time Nick Message
00:01 genio for C lib inclusions? Maybe, but that would require the author being well enough versed in XS first.
00:03 preaction which is why putting FFI::Raw in core would be great
00:07 genio I'm still playing around with my XS project because I'm learning something new. But, there's no way this thing is going to make it to a release-able version
00:07 genio (without a TON of help)
01:09 tchaves joined #mojo
02:56 noganex joined #mojo
02:57 tchaves joined #mojo
03:38 jberger I guess someone had to do it: https://metacpan.org/pod/release/TOMCHA/Acme-Helloworld-0.01/lib/Acme/Helloworld.pm
03:40 jberger genio look at FFI::Platypus or even better, its sugar layer NativeCall
04:03 arcanez jberger: wow, that needs perl 5.8.1
04:03 Grinnz ... oh no?
04:04 Grinnz tbh i don't know if MBT can install on 5.6
04:04 dboehmer joined #mojo
05:40 aborazmeh joined #mojo
06:33 aborazmeh joined #mojo
07:38 dod joined #mojo
07:43 dod joined #mojo
08:16 sh14 joined #mojo
08:17 mib_b33ok7 joined #mojo
08:18 mib_b33ok7 left #mojo
09:45 Bloke joined #mojo
10:29 dod joined #mojo
11:20 karjala_ joined #mojo
12:02 pink_mist http://i.imgur.com/hyjec4p.jpg
12:42 gryphon joined #mojo
13:13 sri jberger: btw. it looks like the :scope selector is now pretty well supported across most browsers https://developer.mozilla.org/en-US/docs/Web/CSS/:scope#Browser_compatibility
13:15 sri crazy how it's already been two years since you last worked on it
13:15 sri https://github.com/kraih/mojo/compare/css_scope
13:16 sri it looks like :scope and :has have been very stable in the css4 draft spec since then though
13:16 sri think i could +1 a patch that marks both as experimental
13:41 stryx` joined #mojo
13:54 kaare joined #mojo
14:05 jberger I wonder if I still have that code someplace
14:11 sri you had more than the branch?
14:20 sri also stumbled over this while looking through the branches https://github.com/kraih/mojo/compare/get_form
14:20 sri and i think we can do better than that
14:26 tchaves joined #mojo
14:28 good_news_everyon joined #mojo
14:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHnKM
14:28 good_news_everyon mojo/master bc47f29 Sebastian Riedel: add -f option to get command
14:28 good_news_everyon left #mojo
14:28 sri i think this is worth the 4 lines
14:31 PryMar56 joined #mojo
14:32 sri wonder if it should allow -f 'foo=bar&baz=yada'
14:32 sri and of course -f 'foo=bar&upload=@some_file.txt&baz=yada'
14:35 good_news_everyon joined #mojo
14:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHn6L
14:35 good_news_everyon mojo/master 0fea4d4 Sebastian Riedel: mention which arguments can appear more than once
14:35 good_news_everyon left #mojo
14:46 good_news_everyon joined #mojo
14:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHn6X
14:46 good_news_everyon mojo/master 07ec508 Sebastian Riedel: use a little less code
14:46 good_news_everyon left #mojo
14:51 kaare joined #mojo
15:04 sri also reminds me that we've been meaning to add this feature https://groups.google.com/d/msg/mojolicious/_EMNV-RiFDE/SltUw7W_CAAJ
15:21 dod joined #mojo
15:43 Janos joined #mojo
15:45 good_news_everyon joined #mojo
15:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHnXw
15:45 good_news_everyon mojo/master 9e15b0d Sebastian Riedel: allow multiple values with the same name
15:45 good_news_everyon left #mojo
15:46 sri sadly adds two more lines, hard to golf down
15:46 sri but i imagine testing this kinda stuff is common enough that we need it
15:46 sri mojo get -f 'foo=@Makefile.PL' -f 'foo=bar' /
15:47 sri gets you a multipart/form-data with a file upload and a value
15:50 aborazmeh joined #mojo
16:04 good_news_everyon joined #mojo
16:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHn1g
16:04 good_news_everyon mojo/master 53d63ae Sebastian Riedel: use a little less code again
16:04 good_news_everyon left #mojo
17:29 karjala_ joined #mojo
18:14 disputin joined #mojo
18:16 disputin1 joined #mojo
18:20 kaare joined #mojo
18:41 tchaves joined #mojo
19:06 ssm joined #mojo
19:20 ssm joined #mojo
21:29 tchaves joined #mojo
21:54 litwol_ Hello
21:55 litwol I've read on some online answers about db-backed session storage (instead of stuffing in cookie)
21:55 litwol most/all of them say 'it's easy, just write or replace the *handler*'
21:56 litwol all the answers say how easy it is :)
21:56 litwol yet.. I don't know how/where to do that.
21:56 litwol by any chance, does anyone have a /link/ handy to some additional and more detailed documentation?
21:57 litwol or better yet, to an example/blog showing exactly how to change default session handing to be able to store session data in persistent db.
21:58 pink_mist personally I would partly keep the session cookie like it is - but have it only contain a single UUID which would be a primary key in my backend session store ... and you'll need to make a table for it in your DB ... there's too many different ways you can do this for there to be a single answer
21:58 * litwol nods
21:58 litwol i had the same in mind. to store UUID.
22:00 litwol How to retain $c->session(id, data) pattern is what i'm curious about.
22:00 litwol i would like to avoid creating new helper such as $c->my_session()
22:01 pink_mist you'd make a helper, say helper db_session { my ($c, $id, $data) = @_; $c->database->query("SELECT ... WHERE uuid = ?;", $c->session('UUID')); ... };
22:02 pink_mist or something
22:02 pink_mist ... no, you need a new helper
22:02 litwol ah
22:02 litwol okey. i guess that's the part i needed to hear.
22:03 pink_mist I missed a "=> sub " bit in my example
22:13 litwol ty for the tip
22:25 * sri wonders what the best way might be to handle optional data from STDIN in the get command
22:28 sri interesting, if i use IO::Poll to check STDIN for available data on macos it segfaults half the time
22:29 pink_mist 0_o
22:29 sri IO::Select seems rather portable though
22:30 pink_mist I thought it was preferable to use select() itself rather than IO::Select?
22:30 pink_mist at least LeoNerd has several times blasted IO::Select for being useless :P
22:32 sri i never remember how to use select() correctly ;p
22:32 sri someone got a quick one-liner for checking STDIN for readability?
22:36 aborazmeh joined #mojo
22:41 sri looks like i can only do it in two lines :(
22:47 gizmomathboy joined #mojo
22:47 Grinnz i use redis for session storage now, and store the nonsequential session id in the session cookie like pink_mist said
22:48 Grinnz the database was having ahard time as session store for our app but redis does it np
22:48 Grinnz i just have an object that manages the connection to redis and session parameters for the given id
22:49 good_news_everyon joined #mojo
22:49 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHnh7
22:49 good_news_everyon mojo/master 93f9c3d Sebastian Riedel: add support for piping data to STDIN as well
22:49 good_news_everyon left #mojo
22:49 sri no clue if that's correct
22:50 pink_mist well, it would be "from" STDIN, not "to", in the commit msg :P
22:51 pink_mist oh, and the changelog :P
22:51 sri but you're piping the data to STDIN of the get command
22:52 pink_mist oh .. right :P oops
22:52 pink_mist my bad :P
22:52 sri but i admit it reads awkward
22:54 sri ¯\_(ツ)_/¯
22:56 sri pbpaste | ./myapp.pl get -M PUT /whatever
22:56 sri that's kinda neat on macos
22:56 sri sends the content of the clipboard as message body
22:59 sri guess on linux it's xsel
22:59 genio The Great Wall isn't quite as terrible as the IMDB score says.  It's entertaining
22:59 sri next on my list is the lego batman movie ;p
23:01 genio oh, yea.  I forgot about that one. I need to add it to the list
23:02 sri the new alien movie was kinda disappointing again
23:04 sri i mean, it's not a bad movie at all, and answers lots of questions... but it's still far away from the old movies
23:06 genio I haven't watched that yet.  We tried to watch Guardians of the Galaxy 2, but a family that refused to take their crying toddler out of the theater made it unwatchable
23:08 canw joined #mojo
23:22 dboehmer joined #mojo
23:49 Grinnz s4 of sherlock is on netflix woo
23:49 Grinnz genio: :(
23:50 Grinnz i'm looking forward to taht one, once its on amazon
23:56 genio yea. we got about 2/3 through it and my wife couldn't take the screaming kids anymore. we were the last ones. every single last person other than that family left because of them
23:56 aborazmeh joined #mojo
23:56 genio they refunded us and gave us four free tickets though

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