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

IRC log for #mojo, 2016-08-09

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

All times shown according to UTC.

Time Nick Message
00:27 tchaves joined #mojo
00:33 marty joined #mojo
00:51 tchaves1 joined #mojo
01:06 zivester joined #mojo
01:36 itaipu joined #mojo
01:57 tchaves joined #mojo
02:08 asarch joined #mojo
02:13 tchaves1 joined #mojo
02:24 tchaves joined #mojo
02:25 noganex joined #mojo
02:31 tchaves1 joined #mojo
02:52 tchaves joined #mojo
03:25 bc547 joined #mojo
04:03 kid511 joined #mojo
04:16 jberger guy guys guys
04:17 jberger https://morbotron.com/
05:24 inokenty-w joined #mojo
06:30 Jonis haha
06:50 che-quest joined #mojo
07:30 ivi joined #mojo
07:31 Vandal joined #mojo
07:47 osfabibisi joined #mojo
07:50 mpapec jberger: isn't openshift actually utilizing Docker images?
07:55 mpapec btw, when speaking about images it probably makes sense to bundle only mojolicious
07:57 mpapec and leave app out of image (easier upgrades when deploying to one physical server?)
08:07 inokenty-w joined #mojo
08:22 Atog i'm having
08:23 Atog some random errors while trying to run ffmpeg under a ioloop stream
08:23 Atog https://ssl.thorsen.pm/paste/af4a1d721827 that's the route and the errors
08:24 Atog i guess i'm missing some method handling or losing context somehow
08:24 Atog i'll try with MOJO_IOLOOP_DEBUG
08:38 Atog also getting "Mojo::Reactor::EV: Timer failed: Can't call method "is_websocket" on an undefined value at /usr/local/lib/perl5/site_perl/Mojolicious/Controller.pm line 110, <DATA> line 267."
08:42 anparker probably transaction had closed before you started to write response. try to store it controller my $tx = $c->tx and than in close event $tx = undef
08:45 anparker s/controller/in route code/
08:50 nicomen joined #mojo
08:50 romel joined #mojo
08:50 chandwki joined #mojo
08:50 Riviera joined #mojo
08:50 oalders joined #mojo
08:50 robinsmidsrod joined #mojo
08:50 yuni joined #mojo
08:50 iamb joined #mojo
08:50 CHYC joined #mojo
08:50 batman joined #mojo
08:50 cstamas joined #mojo
08:50 tianon joined #mojo
08:50 kamyl joined #mojo
08:50 stephan48 joined #mojo
08:50 Jonis joined #mojo
08:50 tinita joined #mojo
08:50 jantore joined #mojo
08:50 augensalat joined #mojo
08:50 haarg joined #mojo
08:50 tempire joined #mojo
08:50 lari joined #mojo
08:50 sivoais joined #mojo
08:50 Foxcool joined #mojo
08:50 simcop2387 joined #mojo
08:50 kivilahtio joined #mojo
08:50 charsbar joined #mojo
08:50 harleypig joined #mojo
08:50 a6502 joined #mojo
08:50 Eke joined #mojo
08:50 kwa joined #mojo
08:50 meredith joined #mojo
08:50 caeles joined #mojo
08:50 degeberg joined #mojo
08:50 bobkare joined #mojo
08:50 isomorphismes joined #mojo
08:50 vinnix joined #mojo
08:50 SmokeMachine joined #mojo
08:50 mantovani joined #mojo
08:50 Grinnz_ joined #mojo
08:50 abracadaniel joined #mojo
08:50 bpmedley joined #mojo
08:50 allison joined #mojo
08:50 da5id joined #mojo
08:50 diegok joined #mojo
08:50 phillipadsmith joined #mojo
08:50 Lucas1 joined #mojo
08:50 mrallen1 joined #mojo
08:50 Phil21 joined #mojo
08:50 mgrimes joined #mojo
08:50 matt_ joined #mojo
08:50 marcus joined #mojo
08:50 jberger joined #mojo
08:50 cpan_mojo joined #mojo
08:50 vicash joined #mojo
08:50 CW joined #mojo
08:50 dave joined #mojo
08:50 genio joined #mojo
08:50 jehdin joined #mojo
08:50 xdg joined #mojo
08:50 bwf_ joined #mojo
08:50 eseyman joined #mojo
08:50 Grinnz joined #mojo
08:50 noganex joined #mojo
08:50 ivi joined #mojo
08:50 osfabibisi joined #mojo
08:50 bc547 joined #mojo
08:50 Zx3 joined #mojo
08:50 jabberwok joined #mojo
08:50 jnbek joined #mojo
08:50 Atog joined #mojo
08:50 vytas joined #mojo
08:50 ashimema_ joined #mojo
08:50 VVelox joined #mojo
08:50 Adurah joined #mojo
08:50 bwf joined #mojo
08:50 dantti_laptop|2 joined #mojo
08:50 y1mmm joined #mojo
08:50 janus joined #mojo
08:50 mrEriksson joined #mojo
08:50 preaction joined #mojo
08:50 dustinm joined #mojo
08:50 jacoby joined #mojo
08:50 Mikey joined #mojo
08:50 nic joined #mojo
08:50 ribasushi joined #mojo
08:50 marcusr joined #mojo
08:50 geheimnis` joined #mojo
08:50 cfedde joined #mojo
08:50 Kundun joined #mojo
08:50 esh joined #mojo
08:50 go|dfish joined #mojo
08:50 HtbaaPi joined #mojo
08:50 Gedge joined #mojo
08:50 plicease joined #mojo
08:50 karjala joined #mojo
08:50 ksmadsen joined #mojo
08:50 cosimo joined #mojo
08:50 Trelane joined #mojo
08:50 garu_ joined #mojo
08:50 BinGOs joined #mojo
08:50 Ralesk joined #mojo
08:50 Caldrin joined #mojo
08:50 saki joined #mojo
08:50 ranguard joined #mojo
08:50 pink_mist joined #mojo
08:50 tyldis joined #mojo
08:50 crab joined #mojo
08:50 klapperl joined #mojo
08:50 coolo joined #mojo
08:50 csson joined #mojo
08:50 bjakubski joined #mojo
08:50 ssm joined #mojo
08:50 chansen joined #mojo
08:50 mfontani joined #mojo
08:51 Adurah joined #mojo
08:54 dustinm` joined #mojo
08:59 janus joined #mojo
08:59 nicomen joined #mojo
08:59 romel joined #mojo
08:59 chandwki joined #mojo
08:59 Riviera joined #mojo
08:59 oalders joined #mojo
08:59 robinsmidsrod joined #mojo
08:59 yuni joined #mojo
08:59 iamb joined #mojo
08:59 CHYC joined #mojo
08:59 batman joined #mojo
08:59 cstamas joined #mojo
08:59 tianon joined #mojo
08:59 kamyl joined #mojo
08:59 stephan48 joined #mojo
08:59 Jonis joined #mojo
08:59 tinita joined #mojo
08:59 jantore joined #mojo
08:59 augensalat joined #mojo
08:59 haarg joined #mojo
08:59 tempire joined #mojo
08:59 lari joined #mojo
08:59 sivoais joined #mojo
08:59 Foxcool joined #mojo
08:59 simcop2387 joined #mojo
08:59 kivilahtio joined #mojo
08:59 charsbar joined #mojo
08:59 harleypig joined #mojo
08:59 a6502 joined #mojo
08:59 Eke joined #mojo
08:59 kwa joined #mojo
08:59 meredith joined #mojo
08:59 caeles joined #mojo
08:59 degeberg joined #mojo
08:59 bobkare joined #mojo
08:59 isomorphismes joined #mojo
08:59 vinnix joined #mojo
08:59 SmokeMachine joined #mojo
08:59 mantovani joined #mojo
08:59 Grinnz_ joined #mojo
08:59 abracadaniel joined #mojo
08:59 bpmedley joined #mojo
08:59 allison joined #mojo
08:59 da5id joined #mojo
08:59 diegok joined #mojo
08:59 phillipadsmith joined #mojo
08:59 Lucas1 joined #mojo
08:59 mrallen1 joined #mojo
08:59 Phil21 joined #mojo
08:59 mgrimes joined #mojo
08:59 matt_ joined #mojo
08:59 marcus joined #mojo
08:59 jberger joined #mojo
08:59 cpan_mojo joined #mojo
08:59 vicash joined #mojo
08:59 CW joined #mojo
08:59 dave joined #mojo
08:59 genio joined #mojo
08:59 jehdin joined #mojo
08:59 xdg joined #mojo
08:59 bwf_ joined #mojo
08:59 eseyman joined #mojo
08:59 Grinnz joined #mojo
08:59 noganex joined #mojo
08:59 ivi joined #mojo
08:59 osfabibisi joined #mojo
08:59 esh_ joined #mojo
08:59 bc547 joined #mojo
08:59 Zx3 joined #mojo
08:59 jabberwok joined #mojo
08:59 jnbek joined #mojo
08:59 Atog joined #mojo
08:59 vytas joined #mojo
08:59 ashimema_ joined #mojo
08:59 VVelox joined #mojo
08:59 bwf joined #mojo
08:59 dantti_laptop|2 joined #mojo
08:59 y1mmm joined #mojo
08:59 mrEriksson joined #mojo
08:59 preaction joined #mojo
08:59 jacoby joined #mojo
08:59 Mikey joined #mojo
08:59 nic joined #mojo
08:59 ribasushi joined #mojo
08:59 marcusr joined #mojo
08:59 geheimnis` joined #mojo
08:59 cfedde joined #mojo
08:59 Kundun joined #mojo
08:59 go|dfish joined #mojo
08:59 HtbaaPi joined #mojo
08:59 Gedge joined #mojo
08:59 plicease joined #mojo
08:59 karjala joined #mojo
08:59 ksmadsen joined #mojo
08:59 cosimo joined #mojo
08:59 Trelane joined #mojo
08:59 garu_ joined #mojo
08:59 BinGOs joined #mojo
08:59 Ralesk joined #mojo
08:59 Caldrin joined #mojo
08:59 saki joined #mojo
08:59 ranguard joined #mojo
08:59 pink_mist joined #mojo
08:59 tyldis joined #mojo
08:59 crab joined #mojo
08:59 klapperl joined #mojo
08:59 coolo joined #mojo
08:59 csson joined #mojo
08:59 bjakubski joined #mojo
08:59 ssm joined #mojo
08:59 chansen joined #mojo
08:59 mfontani joined #mojo
09:05 osfabibisi joined #mojo
09:13 sugar joined #mojo
09:13 bc547 joined #mojo
09:13 Zx3 joined #mojo
09:13 jabberwok joined #mojo
09:13 jnbek joined #mojo
09:13 Atog joined #mojo
09:13 vytas joined #mojo
09:13 ashimema_ joined #mojo
09:13 VVelox joined #mojo
09:13 bwf joined #mojo
09:13 dantti_laptop|2 joined #mojo
09:13 y1mmm joined #mojo
09:13 mrEriksson joined #mojo
09:13 preaction joined #mojo
09:13 jacoby joined #mojo
09:13 Mikey joined #mojo
09:13 nic joined #mojo
09:13 marcusr joined #mojo
09:13 geheimnis` joined #mojo
09:13 cfedde joined #mojo
09:13 Kundun joined #mojo
09:13 go|dfish joined #mojo
09:13 HtbaaPi joined #mojo
09:13 Gedge joined #mojo
09:13 plicease joined #mojo
09:13 karjala joined #mojo
09:13 ksmadsen joined #mojo
09:13 cosimo joined #mojo
09:13 Trelane joined #mojo
09:13 garu_ joined #mojo
09:13 BinGOs joined #mojo
09:13 Ralesk joined #mojo
09:13 Caldrin joined #mojo
09:13 saki joined #mojo
09:13 ranguard joined #mojo
09:13 pink_mist joined #mojo
09:13 tyldis joined #mojo
09:13 crab joined #mojo
09:13 klapperl joined #mojo
09:13 coolo joined #mojo
09:13 csson joined #mojo
09:13 bjakubski joined #mojo
09:13 ssm joined #mojo
09:13 chansen joined #mojo
09:13 mfontani joined #mojo
09:15 osfabibisi joined #mojo
09:15 janus joined #mojo
09:15 esh_ joined #mojo
09:15 ivi joined #mojo
09:15 noganex joined #mojo
09:15 Grinnz joined #mojo
09:15 eseyman joined #mojo
09:15 bwf_ joined #mojo
09:15 xdg joined #mojo
09:15 jehdin joined #mojo
09:15 genio joined #mojo
09:15 dave joined #mojo
09:15 CW joined #mojo
09:15 vicash joined #mojo
09:15 cpan_mojo joined #mojo
09:15 jberger joined #mojo
09:15 marcus joined #mojo
09:15 matt_ joined #mojo
09:15 mgrimes joined #mojo
09:15 Phil21 joined #mojo
09:15 mrallen1 joined #mojo
09:15 Lucas1 joined #mojo
09:15 phillipadsmith joined #mojo
09:15 diegok joined #mojo
09:15 da5id joined #mojo
09:15 allison joined #mojo
09:15 bpmedley joined #mojo
09:15 abracadaniel joined #mojo
09:15 Grinnz_ joined #mojo
09:15 mantovani joined #mojo
09:15 SmokeMachine joined #mojo
09:15 vinnix joined #mojo
09:15 isomorphismes joined #mojo
09:15 bobkare joined #mojo
09:15 degeberg joined #mojo
09:15 caeles joined #mojo
09:15 meredith joined #mojo
09:15 kwa joined #mojo
09:15 Eke joined #mojo
09:15 a6502 joined #mojo
09:15 harleypig joined #mojo
09:15 charsbar joined #mojo
09:15 kivilahtio joined #mojo
09:15 simcop2387 joined #mojo
09:15 Foxcool joined #mojo
09:15 sivoais joined #mojo
09:15 lari joined #mojo
09:15 tempire joined #mojo
09:15 haarg joined #mojo
09:15 augensalat joined #mojo
09:15 jantore joined #mojo
09:15 tinita joined #mojo
09:15 Jonis joined #mojo
09:15 stephan48 joined #mojo
09:15 kamyl joined #mojo
09:15 tianon joined #mojo
09:15 cstamas joined #mojo
09:15 batman joined #mojo
09:15 CHYC joined #mojo
09:15 iamb joined #mojo
09:15 yuni joined #mojo
09:15 robinsmidsrod joined #mojo
09:15 oalders joined #mojo
09:15 Riviera joined #mojo
09:15 chandwki joined #mojo
09:15 romel joined #mojo
09:15 nicomen joined #mojo
09:19 kiwiroy joined #mojo
09:22 ribasushi joined #mojo
09:35 Atog joined #mojo
10:23 ribasushi joined #mojo
10:51 Kripton joined #mojo
10:57 tchaves joined #mojo
11:05 tchaves joined #mojo
11:13 hertzhaft joined #mojo
11:32 sugar joined #mojo
11:37 cpan_mojo Mojolicious-Plugin-OpenAPI-0.11 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-OpenAPI-0.11
11:44 panshin joined #mojo
11:44 kid51 joined #mojo
11:50 mpapec ok, how to explain someone why js as in nodejs is subpar to mojo
11:51 mpapec - exception handling (crashing server takes all streaming/websocket clients out)
11:51 mpapec http://stackoverflow.com/questions/5999373/how-do-i-prevent-node-js-from-crashing-try-catch-doesnt-work
11:51 mpapec - .. :)
12:15 panshin joined #mojo
12:17 panshin joined #mojo
12:32 jberger Wow, that really seems hard to believe that they can let an exception take down that much
12:36 mpapec beside deprecated domain, there is also "cluster" https://nodejs.org/api/cluster.html#cluster_how_it_works
12:37 mpapec but you still have collateral
12:37 mpapec (all clients attached to passed worker?)
12:38 mpapec perhaps this should be stressed out in docs/wiki as strength point
12:40 Kripton joined #mojo
12:42 Janos joined #mojo
12:42 gizmomathboy joined #mojo
12:47 zivester joined #mojo
12:49 kid51 joined #mojo
12:51 perlpilot joined #mojo
12:56 neilhwatson joined #mojo
13:11 noganex joined #mojo
13:18 marty joined #mojo
13:19 marty_ joined #mojo
13:28 hahainternet joined #mojo
13:29 hahainternet I'm hooking Mojo into an existing process framework, and I'd like to pass it HTTP requests directly (or through a filehandle is fine). Fastcgi was my first choice but that's clearly gone, any other recommendation short of having mojo serve HTTP directly?
13:35 hahainternet ah seems PSGI is common enough
13:47 jberger hahainternet: can you explain what you are trying to do?
13:48 jberger I mean PSGI is generally good with the exception that it can't do websockets (and some ioloop stuff)
13:49 jberger the reason I ask is that if you are trying to use apache as a frontend webserver, you can use hypnotoad to serve your mojo app and use mod_proxy to reverse proxy the requests back to hypnotoad
13:49 jberger (and similarly for nginx and others)
13:50 pink_mist Grinnz: wasn't there a mojolicious based paste app? (as in, for interfacing with other paste sites, not running your own)
13:50 pink_mist oh, jberger already answered
13:51 ptolemarch joined #mojo
13:53 bossert joined #mojo
13:58 hahainternet jberger: I'm not using any webserver inline, this is being driven by an app you see
13:58 jberger hahainternet: I'm sorry, I don't understand
13:58 hahainternet jberger: I've used hypnotoad before and know of its power, but psgi should be more than sufficient for now
13:58 hahainternet jberger: you said if i was using apache as a webserver, i could proxy to hypnotoad
13:59 hahainternet but i'm not using any webserver, i'll be creating HTTP requests directly
13:59 jberger right
13:59 jberger but surely something is going to be your server
13:59 hahainternet well that's really the question i'm asking, anyhow i got my answer by googling already i think
14:00 jberger if you use psgi then you are using starman or plackup or something?
14:00 hahainternet jberger: no no, it's more the intermediary mechanism i was interested in, how Mojo::Server::PSGI (or similar) actually reads the request
14:00 hahainternet that's all answered for me now, so i'll probably just end up making a trivial wrapper around Mojo::Server for my own needs :)
14:01 jberger I still have the gut feeling that you are making something more difficult for yourself than it needs to be
14:01 jberger but I can't understand what your end goal is
14:01 hahainternet it's too boring and long winded to explain really
14:02 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Application-embedding
14:02 hahainternet damn sri you've pre-thought of everything :)
14:02 jberger sri just ninja posted me
14:02 sri we needed that for the Mount plugin
14:02 hahainternet yeah that looks pretty much perfect
14:03 hahainternet jberger: to answer your question ultimately this is legacy code that was originally CGI
14:03 hahainternet but i'm now trying to wrap it with something a little more modern so it can either be modernised or removed
14:03 jberger then see also Mojolicious::Plugin::CGI
14:03 hahainternet jberger: that was the first thing i found, then the server CGI
14:04 hahainternet hence why i thought of fastcgi, but as usual this is all well thought out and ideal
14:04 jberger cool, good luck!
14:04 AirDisa joined #mojo
14:04 hahainternet I have to convince a guy this is the way to go, but it's hard to argue with Mojo
14:04 hahainternet oh, one question, probably in the FAQ
14:04 hahainternet any huge windows caveats?
14:04 hahainternet it's likely this is where it'll be running
14:05 jberger hypnotoad/prefork doesn't work on windows proper, though it does work on WSL
14:05 jberger you'd need windows 10 servers for that though
14:05 hahainternet i think we have w2k12, preforking is irrelevant though, the CGI fork might be useful but that should work fine i think?
14:06 izz joined #mojo
14:06 jberger forking on windows is emulated with threads
14:06 jberger just be aware of that
14:06 jberger (this is at the perl level, nothing to do with mojo)
14:09 hahainternet heh, an annoyance, but shouldn't be too big of one
14:15 kid511 joined #mojo
14:18 jehdin I'm having some issues wrapping my head around mojo::upload objects - I understand they are a subclass of mojo::asset, but it appears mojo::asset defaults to m::a::memory.
14:18 jehdin Is there any particular way to force m::a::file?
14:19 Bean joined #mojo
14:19 jehdin My original thought was to set max_memory_size in order to force auto_upgrade, but either I'm not doing it right, or that's not the way to go
14:22 marty joined #mojo
14:28 marty joined #mojo
14:29 doc joined #mojo
14:31 sri where did you read Mojo::Upload is a subclass of Mojo::Asset?
14:32 jehdin I might be using the wrong word here, but the docu I'm reading from is here: http://mojolicious.org/perldoc/Mojo/Upload
14:33 jehdin mojo::upload gets me to the asset, at least.
14:33 sri ok
14:33 sri that's delegation, not inheritance
14:34 jehdin Gotcha - my apologies
14:34 sri you're prolly setting max_memory_size too late
14:35 jehdin Well, in my script I'm expecting some relatively large text dump files
14:36 jehdin So in order to sidestep issues with those kinds of files, I set $ENV{MOJO_MAX_MESSAGE_SIZE} in the beginning of my script
14:37 jehdin O
14:37 jehdin laf, oops
14:37 doc Hi all, I'm new to Mojolicious and also developing web applications (I am reading docs, html/css/js/etc background, watching casts, etc).  (I'm also new to IRC so sorry if I'm butting in out of turn)
14:37 vytas joined #mojo
14:37 doc There is a cgi program I'm trying to rewrite with mojo.  It uses js to enable file upload and drag/drop and then runs a perl cgi script on the uploaded file.  I found Mojoload on github
14:38 doc is there an example that will take me closer to running the script on the file?
14:38 doc and outputting back via mojo
14:43 jehdin I'm thinking maybe what I need to do is use asset->is_file, and if false, open a new filehandle at the path, and dump the file there.
14:43 jehdin @doc - I'm doing something similar, but my stuff isn't working =)
14:43 doc ahhh!
14:43 doc perfect
14:44 jehdin My issue is that my backend CLI scripts aren't receiving the right filehandle
14:45 jberger mojoload is quite old, I had never heard of it before
14:46 doc indeed, but it seems pretty simple
14:46 jberger when receiving an upload you really shouldn't need to create a Mojo::Asset::File
14:48 sri why even care about the asset?
14:48 sri http://mojolicious.org/perldoc/Mojo/Upload#move_to
14:48 sri and be done with it
14:49 jberger exactly
14:50 doc in MojoLoad, in routes/index.pl:  my $asset = Mojo::Asset::File->new; $asset->add_chunk($body); $asset->move_to($filename);
14:50 doc this can be done with Upload
14:50 doc ?
14:51 doc my $upload = Mojo::Upload->new;
14:51 jberger doc: be careful using a random github project as your example
14:51 doc $upload->filename($somename);   ... and then move?
14:52 doc I know; I'm just trying to learn by building something
14:52 jehdin That doesn't seem to graduate it from M::A::Memory to M::A::File
14:52 jberger doc: I'm going to guess (tell me if I'm wrong) that you haven't read the Guides yet
14:52 jehdin Or if it does, I'm not sure how to hook into that filehandle and not the M::A::Memory handle
14:52 Lee doc: try to find a more up to date example, that one hasn't been touched in 5 years
14:52 doc I have read through some, but I do need to keep reading
14:52 doc That's why I am here
14:53 Grinnz <jberger> Wow, that really seems hard to believe that they can let an exception take down that much
14:53 doc could you point me in a better direction
14:53 Grinnz don't know how it is now but i remember exception handling in PHP to be basically nonexistent
14:54 jberger well for starters we highly encourage newcomers to read the Tutorial and the Guides in the order listed here: http://mojolicious.org/perldoc#TUTORIAL
14:54 doc I've been through the growing guide, which is great
14:54 Grinnz but yeah taking down the server on an exception that's a new one
14:54 jberger there is a file upload example in the Tutorial http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#File-uploads
14:55 doc sweet!
14:56 jberger jehdin / doc: just because I'm curious, is there some article or talk or something that lead you to us today? it seems we have several newcomers (which is great!) but I'm curious where you are coming from
14:56 jberger or is it just coincidence (which is fine too)
14:56 jehdin I've been idling for a bit now =)
14:56 jehdin I'm betting it's probably just coincidence
14:57 doc the link on the mojolicious website
14:58 doc I'm a chemist. I'm out in Boulder now after teaching for two years
14:58 doc now i have to figure out all this god damn web stuff!
14:59 bossert me, for one, I have been using mojolicious for at least the last 4-5 years, but never signed on to the IRC channel…figured it was high time…
15:01 Bean I don't generally contribute to the discussion, but I like to lurk and click on links and read through the questions others ask
15:01 bossert Stalker!
15:01 purl hmmm... stalker is at ftp://ftp.stalker.com/ or at http://www.stalker.com/SIMS/ or stalker.pl at http://xrl.us/bh3wvo
15:03 jberger doc: cool, I'm a physicist by training myself
15:03 jberger Ph.D. in Physics with a specialization in Ultrafast Instrumentation
15:03 jberger of course I defended right before the sequester and here I am working for ServerCentral
15:04 jberger I also had a friend go out to CSM for his Ph.D.
15:04 doc yeah, we've met.  I did my phd up in madison, wisconsin.  my name is demian, I was hoping to sneak by anonymously, because I have too much to learn
15:05 jberger oh nice, was it at perl mongers or the yapc up there? (I am especially terrible at names so I'm sorry if I don't recall now)
15:06 doc yes, I wrote HackaMol
15:08 doc I presented to initial phase at the yapc in madison
15:11 jehdin So this is what I ended up with - and I'm getting output! https://gist.github.com/jehdin007/589bf68b7f06d83357e9bf460a22acc0
15:11 blonewolfs joined #mojo
15:13 zivester joined #mojo
15:16 batman jehdin: are you sure you want to trust $upload->filename ?
15:16 jehdin Since it's arbitrary, all I need is the specific instance
15:17 jehdin But I think I might put a test in there just in case
15:17 batman jehdin: pretty sure it could be "/../../etc/passwd" or something weird
15:18 jberger doc: ah right
15:18 jehdin It could be
15:20 batman jehdin: you might also be interested in http://shadow.cat/blog/matt-s-trout/indirect-but-still-fatal/ (side note)
15:48 disputin joined #mojo
15:49 asarch joined #mojo
15:49 jehdin @batman - is that in reference to the FileHandle call?
16:02 doc should this work with the CGI plugin?                 plugin CGI => { route => "/some/path", run => sub { 1 } }; app->start;
16:02 doc loading http://localhost:3000/some/path   returns an 500 Internal Server Error
16:03 jberger doc: what error do you get from the server side?
16:04 doc running with morbo:  GET "/some/path"; Routing to a callback ; [CGI:CODE(0x7fd0cc8ba6b0):96877] START CODE(0x7fd0cc8ba6b0); 500 Internal Server Error
16:05 doc Could not run CGI script (7424, No such process). is printed out to the browser
16:07 PryMar56 joined #mojo
16:21 mcsnolte joined #mojo
16:31 jehdin Silly, sort of off-topic question - overloading is when I'm using multiple ->?
16:34 preaction no. it's when you "use overload" and assign some overloads to things like addition, subtraction, stringification, and otherwise
16:37 cfedde jehdin: what you are doing might be called chaining or maybe functional composition
17:03 batman jehdin: yes. (FileHandle)
17:04 batman doc: https://github.com/jhthorsen/mojolicious-plugin-cgi/blob/master/t/run.t
17:11 doc I was just poking around in the test suite.  Thanks batman
17:16 blonewolfs joined #mojo
17:16 batman doc: you're welcome (it's my plugin)
17:17 kaare joined #mojo
17:21 doc you have nice tests!
17:21 batman doc: thanks :)
17:21 batman i do my best... trying to improve all the time
17:22 doc so you need the first three print lines for it to work
17:22 doc the 200 ok, the content type, and then the "\r\n"
17:23 pazt joined #mojo
17:23 batman i don't think so, but that's the easiest way to make it work.
17:24 batman there's this "nph" thing that might make it work if you want to do longpolling
17:24 dantti_laptop joined #mojo
17:25 batman not quite sure how that works... https://github.com/jhthorsen/mojolicious-plugin-cgi/blob/master/t/Helper.pm#L78
17:26 pazt hello monks... a mojo rookie here. I am an almost old guy using old cgi and i decided to change. But mojo is not so easy to beginners
17:27 doc I see. Thanks!
17:28 pazt I found this to authenticate users... http://search.cpan.org/~blr/Mojolicious-Plugin-BasicAuthPlus-0.10.2/README.pod
17:29 pazt but i can't insert a login form to work together with that
17:29 sri oh man, a dozen job interviews and the one i was most looking forward to is the one with the "reverse a btree on a whiteboard" question, which i of course botched
17:30 pazt does someone has any login form working with 'basic_auth_plus' plugin? Sorry about my rookie question. I'm started w/ mojo this week
17:34 sri gotta give props to the folks that do "lets talk a bit about that open source code you wrote, or here's some real code from our codebase to talk about if you prefer that"
17:38 jberger sri: "Hi I literally wrote 2 of the top 3 web frameworks in Perl", interviewer: "can you invert this btree?"
17:38 Grinnz_ lol
17:39 sri also in C, while interviewing for a Perl job
17:39 jberger joel: "I find a library, and/or use a high-level language to do that for me"
17:40 jberger I don't beat about the bush with that crap
17:40 jberger "if that isn't good enough, I go learn about it"
17:40 jberger I think this is where it helps when I say "I have a Ph.D. in Physics, I learn quickly"
17:41 jberger if they want me to come in with every detail of a formal CS degree they aren't going to get it and I tell them so
17:41 jberger I also imply that within a few weeks of learning their codebase I'll be coding rings around their CS majors
17:41 jberger that usually works
17:41 jberger or has so far :-P
17:42 Grinnz_ and describing the effect of said rings on the local gravity?
17:43 jberger negligible
17:46 batman i wouldn't know how to answer the btree questio n :P
17:46 sri they're even mojolicious users with an otherwise nice company culture
17:47 jberger in that case it is probably a standard question which hopefully under the circumstances they will just ignore
17:48 Grinnz_ giving interviews is as much a challenge as interviewing sometimes
17:51 asarch joined #mojo
17:56 dod joined #mojo
18:04 doc Thanks for helping, IRC!  while far from perfect or modern, I have an app that uploads a file and then runs a Cgi script.  Back to the Guides to learn more!
18:08 jberger nice work, keep it up!
18:09 doc left #mojo
18:09 perlpilot joined #mojo
18:15 cuechan joined #mojo
18:54 disputin joined #mojo
19:07 asarch joined #mojo
19:20 Bean interview questions are all we learned in cs100 and 200 linked lists binary trees sorting/searching algorithms
19:21 jberger and how often have you used them since then?
19:21 jberger if you tested me on rotational dynamics out of the blue right now I'd have a hard time with it
19:23 Bean Just going into sophomore year so I haven't worked anywhere that required a formal interview yet.
19:23 Bean I can't imagine I'll need to know the preorder inorder and postorder of a btree though
19:24 kaare joined #mojo
19:24 jberger you might, but that'll be the last time you will until the next time you interview
19:25 jberger unless of course you are implementing something at that level, which you likely won't be
19:25 disputin joined #mojo
19:25 kaare joined #mojo
19:25 Bean Any time I've had to store data, I've used a database. In school, we learned to print to and read a text file
19:27 genio They taught us how to recreate every wheel known to the standard library for C++, only square-er.  Very little that was learned in any of my programming course work for my CS degree was useful to me.  Much of it has been forgotten.
19:28 kaare joined #mojo
19:31 asarch joined #mojo
19:32 jberger it is important that some people know how the low level stuff works
19:32 jberger and it is also important that you get an impression of how stuff works
19:32 purl okay, jberger.
19:32 jberger purl: it?
19:32 purl or important that you get an impression of how stuff works
19:32 jberger purl: forget it
19:32 purl jberger: I forgot it
19:33 jberger ANYWAY, the idea that you then get "tested" on that stuff to get a job wherein that information will never be useful is just silly
19:34 Josepha joined #mojo
19:37 ribasushi that's a bit simplistic though: while the bias here (and on this IRC network in general) is towards "self selection towards folks with a clue", this is not the case for the wider industry (by a *very* long shot)
19:38 ribasushi compounded by the problem of there being no reliable indicators of telling apart sri from someone who fucked around with mojo for a weekend
19:38 ribasushi we get interviewers grasping at various straws
19:38 ribasushi one of them (not the most efficient but everything is relative) is checking the understanding of the basics
19:39 lluad The number of people I've phone screened only to discover that they don't appear to have even googled the things they claim expertise in is depressing.
19:40 ribasushi this.
19:40 jberger in sri's case I'm assuming his CV states his relationship to mojo
19:40 jberger but for the mojo power user yes this is true
19:40 ribasushi I was hyperbolising
19:40 ribasushi s/sri/jberger/
19:40 jberger as to screening people, yeah, I'm amazed at the people that got through the basic screening to us
19:41 jberger but I didn't usually need to ask them about btrees to tell :-P
19:41 jberger we had a code sample challenge that caught many of them
19:42 jberger and tbh the question that tripped up most of the bad candidates was literally "tell me anything you personally have ever accomplished in your professional work, any example is fine, a good day of work"
19:42 jberger I would usually get "well my team did <blah blah>" to which I would say "ok in that project, tell me one thing that you personally did"
19:43 jberger amazing how many people couldn't give me any detail about anything they had EVER DONE!
19:43 ribasushi jberger: yes, but forming such a question *also* requires a non-trivial amount of "self-selection for clue"
19:43 ribasushi jberger: it cuts in all directions ;)
19:44 genio The worst interview I ever had was when the person asked me why a manhole cover was round.  Nonsense questions made me not care and walk away from the interview.
19:45 genio The worst interviewee I had was one that came in high and answered each question about how his brother is great at that and this is what his brother did.
19:45 genio we now do phone screens first
19:49 jberger that one is fairly common knowledge now anyway, means it is literally just trivia: "have you heard this thing?"
19:50 jberger at the bank it was HR screen, then code challenge, then phone screen, then in-person
19:50 genio jberger: exactly why it annoyed me. why ask me trivia questions in an interview for a developer position.
19:50 jberger kinda amazing how many in-persons were still terrible
19:51 genio That one had no phone screen.  We went in, took an on-paper code challenge. They then called in those that "passed" their code challenge for the real interview, where they asked trivia questions.
20:00 sri genio: google asks that question :)
20:00 genio sri: I'd have a hard time not being annoyed with them in that interview
20:03 jberger http://mathtourist.blogspot.com/2010/08/manhole-cover-geometry.html
20:04 jberger therefore the answer is, because producing a circular shape is easier than producing one of the others that would also work
20:05 sri spolier!
20:05 sri oh boy, with that grammar i'll not get a job
20:58 sugar joined #mojo
21:20 sri doesn't look like i'll have much of a future as an overwatch pro either :o
21:24 Bean_ joined #mojo
21:26 sri genji is hard to play
21:26 Grinnz_ heh, he took a week or two for me to get the hang of
21:26 docdurdee joined #mojo
21:27 Grinnz_ the real key to genji is to double jump a lot, you'll find especially against average players, they can't hit you
21:27 Grinnz_ and also resist the urge to dive into melee until someone's close to dying
21:28 Grinnz_ after that its just a matter of getting kills with his ult without dying immediately
21:28 sri it's definitely fun to climb all the walls
21:29 Grinnz_ yeah and both him and hanzo can throw off an enemys targeting with the wall climbing
21:31 CW joined #mojo
21:33 doc joined #mojo
21:34 doc batman, I am still playing around with the Mojolicious::Plugin::CGI
21:35 doc I plug it in, upload a file in a 'post', and then run it using $c->cgi->run.  I know it runs, but I'm unsure how to get the STDOUT from script at this point.  Is it stashed somewhere in $c?
21:38 Grinnz_ you're running an uploaded cgi script?! that sounds like a bad idea
21:40 doc no, I am running a cgi script on an uploaded file
21:40 purl okay, doc.
21:40 Grinnz_ oh ok
21:40 Grinnz_ wasn't sure with the phrasing :P
21:40 doc yes, I see
21:40 doc it was poorly worded
21:40 Grinnz_ havent looked at the code but I would assume ->run will directly render the STDOUT
21:41 Grinnz_ https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-CGI-0.34/lib/Mojolicious/Plugin/CGI.pm#L222
21:44 doc hmmm..  if I run it using a route, the STDOUT gets rendered by the browser.
21:45 Grinnz_ right.
21:45 doc I would like to be able to get the results from within another method
21:45 Grinnz_ it directly writes the STDOUT to the client
21:45 Grinnz_ with some parsing of headers
21:45 doc the post '/upload' method
21:45 doc sure
21:46 doc brb. I'm going to fool around
21:50 marty_ joined #mojo
21:51 marty joined #mojo
21:58 jberger it would be nice to have some per-request-cycle information attached to the logger if in a request cycle
21:58 jberger and yes I know that's insane but it seems almost possible
22:02 doc ok, when I call $c->write, it sends it to the client.  Is there anyway to shove that into the $c->render?   (thank you for your patience, I'm slowly climbing the hill)
22:14 jberger doc: write is usually used when you intend to write more than once
22:14 jberger otherwise, just use render
22:21 doc here is my app: https://gist.github.com/dmr3/c11672384aeed51084076183a7d9d492
22:22 doc if the cgi script output json or something, could I capture and use it?
22:24 batman doc: are you sure you want to use CGI?
22:24 batman i don't understand at all what you're trying to acc omplish :(
22:24 doc the trouble is that I'm trying to step up from some legacy stuff
22:24 batman do you have an existing CGI script?
22:24 batman do you know how CGI works?
22:25 doc yes
22:25 doc not entirely!
22:25 doc the yes was for the existing script
22:25 batman then why are you messing around with sub{} ? just point to the script instead.
22:26 doc the sub in the post '/upload' method?
22:27 batman that post /upload code is very confusing
22:28 batman not even sure how you're supposed to be able to render both from mojo and from the cgi script
22:28 batman sorry... i need to get some sleep.
22:28 batman good luck.
22:28 purl You'll need it.
22:28 doc yes!
22:28 doc this is the confusion I suffer from
22:29 jberger the idea of the CGI plugin is that the mojo app just delegates to the cgi script
22:30 doc as in, mojo gets you the file then lets you cgi the file to your hearts content.
22:31 doc so I should have the cgi file output some data in a file or something that I can use in logic elsewhere rather than try to stuff it into the post '/upload' method
22:31 doc ?
22:37 doc OK!!!  i get it.  I'm so sorry for the crazy questions!
22:38 doc Thanks everyone

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