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

IRC log for #mojo, 2016-11-23

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

All times shown according to UTC.

Time Nick Message
00:02 sugar joined #mojo
00:34 jontaylor joined #mojo
00:57 disputin1 joined #mojo
01:06 aborazmeh joined #mojo
01:09 marty joined #mojo
01:26 disputin joined #mojo
01:29 sugar joined #mojo
01:40 Paddi joined #mojo
01:55 polettix joined #mojo
02:31 asarch joined #mojo
03:31 noganex joined #mojo
05:04 dboehmer joined #mojo
05:28 AndrewIsh joined #mojo
06:19 dod joined #mojo
06:26 Paddi joined #mojo
06:26 dod joined #mojo
06:26 Paddi Hi all, is that possible $c->session data went missing but cookies still exist? I having this problem the cookies still exist but suddenly session data all gone
06:51 ssm joined #mojo
07:00 dod joined #mojo
07:06 Vandal15263 joined #mojo
07:26 inokenty-w joined #mojo
07:37 Jonis Paddi: sounds like your session is expiring. http://mojolicious.org/perldoc/Mojolicious/Controller#session
07:49 mbudde joined #mojo
08:20 batman joined #mojo
08:27 trone joined #mojo
08:29 dod joined #mojo
08:30 mishanti1 Does anyone where apply any particular strategy for determining if code is made properly non-blocking? Can checks for it be automated, and does anyone here do that?
08:32 rshadow joined #mojo
08:45 Paddi joined #mojo
08:51 Lee joined #mojo
08:59 parv joined #mojo
09:09 rshadow joined #mojo
09:29 osfabibisi joined #mojo
09:37 gregf_ joined #mojo
10:06 rshadow joined #mojo
10:28 alexbyk joined #mojo
11:23 jontaylor joined #mojo
11:37 marty joined #mojo
11:57 trwww joined #mojo
12:00 preaction joined #mojo
12:02 sivoais joined #mojo
12:02 Jonis joined #mojo
12:02 Vandal15263 joined #mojo
12:02 genio joined #mojo
12:03 sugar joined #mojo
12:06 marty joined #mojo
12:07 rshadow joined #mojo
12:26 marty joined #mojo
12:42 marty joined #mojo
12:54 gregf_ joined #mojo
12:57 marty joined #mojo
13:01 marty joined #mojo
13:12 jontaylor joined #mojo
13:19 jontaylor_ joined #mojo
13:40 aborazmeh joined #mojo
13:42 gizmomathboy joined #mojo
13:42 jberger mishanti1 set up a recurring timer that increments a counter
13:42 jberger And check that it actually increments
13:43 jberger For example https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/t/basic.t
13:49 gregf_ joined #mojo
14:14 ramortegui joined #mojo
14:24 gryphon joined #mojo
14:34 Jonis C/w 1
14:58 mishanti1 jberger: Thanks a bunch. :)
15:06 espen joined #mojo
15:07 espen hello, arn't these supposed to create identical request:
15:07 espen $ perl -wlE "use Mojo::UserAgent;say Mojo::UserAgent->new->post('https://example.com' => {'content-type' => 'application/json'}  => q|{top => 'secret'}|)->req->to_string"
15:07 espen $ perl -wlE "use Mojo::UserAgent;say Mojo::UserAgent->new->post('https://example.com' => json => q|{top => 'secret'}|)->req->to_string"
15:08 rshadow joined #mojo
15:08 espen hmm.. maybe my mojo is old
15:09 espen yeah that was it
15:22 jberger espen were you here a couple days ago using a mibbit default name?
15:23 jberger either way, what you are doing isn't JSON
15:23 jberger that's a string containing a perl-like deserialization of a hash reference
15:25 Pyritic joined #mojo
16:21 polettix joined #mojo
16:23 jberger https://twitter.com/HollyGraceful/status/801125945528684544
16:25 asarch joined #mojo
16:26 rshadow joined #mojo
16:30 disputin joined #mojo
16:32 jabberwok another chicken-and-egg problem: I want to use temp db with the 'test' command. Yet when my 'startup' runs, the Mojo command hasn't been parsed or is unavailable; I can make each t/*.t look at app->mode and fail if user didn't put "-m test" on command line but that seems nasty?
16:35 jberger -m isn't always very useful
16:36 jberger MOJO_MODE is much more useful
16:36 jberger in fact, I often have a test configuration file
16:36 jberger myapp.test.conf
16:37 jberger and then the test scripts have BEGIN { $ENV{MOJO_MODE} = 'test' }
16:37 jabberwok ahhhhhhh
16:38 jabberwok someone twist my arm if i don't do a blog post shortly with all this wrapped up into a "How do I create a testable database-driven Mojo app" article
16:39 jberger and if you don't, I know where you monger!
16:39 espen jberger: wasn't me.. you mean that the string in the first example is not json? yeah i know, i was a bit quick putting together the example
16:39 espen anyway, it didn't have anything to do with my problem
16:40 jberger espen: ok, the other day someone came in and was trying to do something like emitting dumper output as json and worrying about escaping slashes or some such?
16:40 jberger it was really strange
16:43 espen ah ok, not me :) my issue was that json => $hashref (second example) didn't work in 6.63
16:57 tchaves joined #mojo
17:02 tchaves joined #mojo
17:03 tchaves joined #mojo
17:11 Grinnz espen: neither of those examples are json => $hashref, they're both json => $string, which is probably not what you wanted
17:16 PryMar56 joined #mojo
17:22 sugar joined #mojo
17:31 dod joined #mojo
17:32 kes joined #mojo
17:34 kes Hi, is there a way to restart task by command like:
17:34 kes ./myapp.pl minion job 3 restart
17:35 kes by default I see the status of the task
17:37 Pyritic joined #mojo
17:39 schelcj joined #mojo
17:52 bwf ./myapp.pl minion job -R 3
17:54 sri this is harsh :o https://learnpythonthehardway.org/book/nopython3.html
17:54 Grinnz it's interesting how much pushback there has been to python 3
17:58 pink_mist wow
18:01 osfabibisi Zed is harsh
18:04 stryx` joined #mojo
18:33 Natalya joined #mojo
18:33 Natalya привет всем!)
18:33 Natalya left #mojo
18:36 pink_mist you too
18:44 jontaylor joined #mojo
18:47 disputin joined #mojo
18:50 kes bwf: thank you
18:59 marty_ joined #mojo
19:02 sugar joined #mojo
19:03 kes when I list workers I got the: '2  work:17925'
19:03 kes but 'ps' does not show process with PID 17925
19:03 kes what does that mean?
19:03 purl That boy needs therapy.
19:04 disputin joined #mojo
19:05 preaction purely psychosomatic!
19:44 sugar joined #mojo
19:45 bwf https://www.humblebundle.com/books/unix-book-bundle
19:51 Grinnz no "how to write perl like a sysadmin" book, i'm disappointed :P
19:55 mishanti1 Grinnz: You mean "A practica guide to obfuscation"? :)
19:58 polettix joined #mojo
20:01 coolo sri: related to the pyton3 link - if you wanted to introduce a (rather smart, but lazy) 9 year old boy into programming, what tool/language would you chose? I've seen python as answer often, but I have my doubts personally
20:01 Grinnz have him reinvent data structures in base C, that's what schools always do :P
20:01 pink_mist 9 year old? too old for perl 6 then :P
20:01 [vlad] spectrum 48k basic :)
20:02 spicyjack http://www.lexaloffle.com/pico-8.php
20:02 spicyjack you can code in a browser, or install the app
20:02 spicyjack runs a subset of Lua
20:02 spicyjack and you make games with it
20:02 spicyjack which may be attractive for 9 year olds
20:03 pink_mist sounds decent
20:03 spicyjack the same author also has a game engine that runs on voxels (3-D pixels)
20:03 spicyjack it's $20 for both engines
20:03 spicyjack or, if you bought a CHIP computer, it comes with PICO-8 already
20:04 coolo looks interesting indeed. an additional challenge is english. but we get around that if the set of commands is limited
20:04 spicyjack coolo: http://www.lexaloffle.com/pico-8.php?page=manual
20:04 spicyjack coolo: there's all the commands it wants
20:04 spicyjack coolo: I think most programming languages are in english, but you can think of the logic in your native language ;)
20:05 pink_mist it's usually best to learn to think in english for coding anyway
20:05 spicyjack you can at least try out some of the demos in the browser
20:05 coolo spicyjack: yeah. thanks for the hint
20:06 spicyjack coolo: n/p
20:06 spicyjack there's an open-source thingy like PICO-8 too, let me dig up the link
20:06 spicyjack also Lua
20:06 spicyjack coolo: https://nesbox.itch.io/tic
20:07 coolo we've been through https://code.org/minecraft and lightbot
20:07 spicyjack coolo: okay, then this stuff isn't too far off from what you've done in the past
20:07 coolo spicyjack: I already fail there. it says type 'HELP' but you have to type 'help' :)
20:08 spicyjack coolo: yeah, all lower case ;)
20:08 spicyjack coolo: that will bite you on naming files, too
20:08 spicyjack coolo: with these engines though, you could design any kind of game you wanted; you just have to work inside the limitations of the engine
20:09 coolo (unrelated to current topic - I think I crashed my VM :)
20:09 coolo spicyjack: no idea how well you know 9 years olds - but limitations are GOOOOOD! :)
20:10 spicyjack coolo: FWIW, it's similar to 8-bit consoles/computers from the 80's and early 90's, which is where I learned
20:11 coolo damn. I showed my (database savy) wife my current cleanup task and she said it looks good to parallize. and that took me at the honour, so I scripted that over a beer - and now I DoSed the VM :(
20:12 Grinnz heheh
20:12 Grinnz if you just keep forking, everything will run instantly!
20:12 coolo spicyjack: yeah. I'm different there as my road to programming always came from math, not from games. But I see the appeal it can have to him
20:13 coolo Grinnz: man wait(1p) said it would wait for all processes known, but it failed me there and just kept forking :)
20:18 Pyritic joined #mojo
20:22 sri coolo: yea, that minecraft thingy looks good
20:22 sri coolo: but personally, i guess i would pick something you won't like ;p
20:22 sri http://www.apple.com/swift/playgrounds/
20:24 sri bwf: wow, that book bundle looks great
20:24 coolo sri: yeah, I'm so going to buy an ipad
20:29 sugar joined #mojo
20:32 sri coolo: but yea, game scripting is prolly the best way to get younger kids interested in programming i guess
20:32 * sri only started programming when he was older
20:35 coolo there are plenty of books how to program minecraft plugins - this seems to be easier on him than let's say python turtle
20:35 vicash coolo: use Parallel::ForkManager
20:36 coolo but java?
20:36 purl If java had true garbage collection, most applications would delete themselves. or written by creeps or what's in the box or like a pointy stick in the eye or vogon poetry or Java is to JavaScript what Ham is to Hamster!
20:36 coolo purl nailed it
20:36 purl coolo: huh?
20:36 pink_mist botsnack
20:36 purl :)
20:40 polettix joined #mojo
20:59 stryx` joined #mojo
21:25 dmanto joined #mojo
21:42 Pyritic joined #mojo
21:47 dmanto Hi all, is it possible that AssetPack is not rendering well sometimes?. Like it misses the begining of the asset. My app is running under hypnotoad at port 8080 (and it was working perfectly for a week now). Now even if I curl from localhost to the asset, I get a timeout and the beginig of the file is missing.
21:48 jontaylor joined #mojo
21:49 dmanto http://mibpaste.com/F9a06d
21:49 dmanto just put some relevant information
21:50 dmanto anyway I guess there are not so many people in my south american TZ ...
21:59 pink_mist I know there are a couple in US timezones
21:59 pink_mist which should be pretty similar to south american timezones
22:02 dmanto yes east zone is just one hour diff
22:02 dmanto :)
22:05 marty joined #mojo
22:07 jberger dmanto i expect the reason you don't see any answers is that is a pretty specific and complex question, not that no one saw it :p
22:08 jberger How do you get both a timeout and part of a file?
22:09 pink_mist (and how is the part of the file you get *not* the beginning?)
22:10 mtj joined #mojo
22:19 dmanto could you see the pastebin?
22:19 polettix joined #mojo
22:20 dmanto I mean there are two intents, one with wget and the other with curl -i to get the headers
22:20 dmanto with the wget, it seems that it retrys
22:22 dmanto I mean, with wget the end result (after 15 secs) is the complete file
22:24 marty joined #mojo
22:29 dmanto ooops
22:30 dmanto sory after the retry I guet the right amount of bytes, but the file is not otk
22:30 dmanto I dont get the beginning, and the end is repeated .... :(
22:31 dmanto which, I guess, makes sense somehow
22:31 dmanto wgets thinks the LAST 6874 are missing
22:33 dmanto so it just retryies asking for those last bytes, and get the 206 partial content answer that you see in the pastebin
22:34 mtj joined #mojo
22:41 jberger How big is the file you are sending? Is it possible that you've hit one of the limits?
22:41 sri oh, steam sale also started today :o
22:42 preaction ... i just did the humble unix book bundle... why must you torture me?!
22:46 dmanto well this one is 458842 bytes
22:46 dmanto is jquery.mobile
22:46 dmanto I mean I wanted to minimize it, have to check that anyway...
22:46 dmanto but it happened with a smaller file also
22:47 dmanto this morning
22:47 dmanto I just added one space to one line
22:47 dmanto restarted hypnotoad with -s
22:47 dmanto and now that one works
22:48 pink_mist why would you assetpack that? if you simply link the minimized version from the cloudflare js cdn, all mobile users won't need to download it again and again for your site, and that other site, and the third site ...
22:48 dmanto love assetpack...
22:48 dmanto thats one reason
22:48 preaction because not all cdns are available to everyone
22:49 dmanto and also I can manage to touch something and make caches to caduce
22:49 pink_mist preaction: huh? I'm talking about a specific cdn ... that really should be
22:50 preaction pink_mist: i explicitly started using assetpack because $work[-2]'s singapore office could not reach cdnjs.com
22:50 cpan_mojo Mojo-IOLoop-HoboProcess-0.002 by MARIOROY https://metacpan.org/release/MARIOROY/Mojo-IOLoop-HoboProcess-0.002
22:50 pink_mist 0_o
22:51 preaction it's an investment bank. they have proxies and firewalls and all sorts of fun stuff
22:53 pink_mist well alright, for that specific usecase I can understand not using the cdn ... but for a random mobile site? hells no
22:54 preaction meh. if my server is up, then they get my app. but cdns require that both my server is up, and some random unknowable server on the internet is also up.
22:55 dmanto jberger sorry 458842 is the wrong size
22:55 preaction also, i've had trouble with cdnjs.com specifically not having files that were required for the script to work right. had to send in a few PRs for that
22:56 mroy joined #mojo
22:56 pink_mist cloudflare does have a pretty decent track-record of staying up though
22:56 dmanto 465716
23:00 jberger Bytes? If so that should be fine
23:00 dmanto yes bytes
23:00 jberger I think the limit is in the tens of Mb
23:00 jberger I'm not in a great place to check
23:01 jberger Look in the docs for Mojo::Message I think
23:01 dmanto is the jquery.mobile v 1.4.5
23:01 dmanto ok
23:02 mroy joined #mojo
23:03 dmanto there are several limits, but max_message_size is 16MB
23:03 mroy Just released Mojo::IOLoop::HoboProcess along with updated MCE::Shared where MCE::Hobo spawned threads on the Windows platform for better reliability.
23:03 mroy https://metacpan.org/recent
23:04 mroy s/spawned/spawns/ threads ...
23:10 dmanto pink_mist the reason a cdn is not really an option here is that I need all traffic goes through the server
23:11 sugar joined #mojo
23:11 dmanto it is a internet meter app, and the idea is to measure as much traffic as possible going through the server, not with other connection
23:13 dmanto so at the end I will like to measure several aspects of the download, and I need that the traffic go through the site
23:16 dmanto if you can wget this public url:   http://170.51.242.85/asset/19a8576129/jquery.mobile-1.4.5.js
23:16 pink_mist well alright, that's a valid reason too :P
23:16 dmanto yes it is probably a very specific case :)
23:17 dmanto if you can wget that address above, you will notice the retry
23:17 dmanto what i finally get is the right amount of bytes, but the content is wrong
23:33 mroy left #mojo

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