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

IRC log for #mojo, 2016-11-04

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

All times shown according to UTC.

Time Nick Message
00:47 howitdo joined #mojo
01:11 aborazmeh joined #mojo
01:45 aborazmeh_ joined #mojo
02:03 genio I think I might have found a possible bug in Mojo::Headers.  Can someone check my reading of the RFC and see if I'm misunderstanding?
02:03 genio https://tools.ietf.org/html/rfc7230#section-3.2
02:03 genio my $headers = Mojo::Headers->new->parse("X-Meta-Twitter:card: 42\x0d\x0a\x0d\x0a");
02:04 asarch joined #mojo
02:04 genio It's seeing the name as X-Meta-Twitter instead of the full X-Meta-Twitter:card   When parsing, the field and value must be separated by ':\s' if I'm reading that correctly.
02:05 genio Going through https://github.com/libwww-perl/HTTP-Message/issues/3 lead me to this, by the way
02:10 genio led*
02:13 genio nevermind, I can't read.  https://tools.ietf.org/html/rfc7230#section-3.2.4 is where I was confusing myself.
02:13 * genio goes to do something else for a while
02:14 preaction the RFC seems to say that : is not a valid http header character
02:15 genio yea. I got myself turned around in circles and wasn't doing a good enough job of reading thoroughly.
02:18 genio I mentally skipped right over the OWS part and was parsing this "a single SP preceding the field-value is preferred" as that there must be a space somehow.
02:28 preaction right, but even if, : is explicitly not allowed in a header name, so that thread you found on HTTP::Message is all messed up
02:40 genio way down there in the appendix.  token is defined
02:41 genio thanks!
02:46 preaction also, weirdly they're doing <meta name=""> as though it's the same as <meta http-equiv=""> which is also totally not right
02:51 lluad joined #mojo
03:17 jberger asarch: sorry I'm rereading and i see that i missed your question. Yes I have a thing that does anonymous classes. It is called ... Class::Anonymous :p
03:54 noganex_ joined #mojo
05:30 asarch Actually, I found the answer:
05:31 asarch http://paste.scsys.co.uk/538958
05:31 asarch Thank you jberger
05:31 asarch Thank you very much :-)
06:22 dod joined #mojo
06:27 dod joined #mojo
06:40 aborazmeh joined #mojo
06:55 mbudde joined #mojo
06:56 dod joined #mojo
07:08 polettix joined #mojo
07:14 Vandal joined #mojo
07:55 AndrewIsh joined #mojo
07:58 Atog joined #mojo
08:04 sivoais joined #mojo
08:24 trone joined #mojo
08:25 noganex joined #mojo
08:27 janl joined #mojo
08:37 osfabibisi joined #mojo
08:55 polettix joined #mojo
09:58 bc547 joined #mojo
10:54 tchaves joined #mojo
11:31 parv joined #mojo
11:49 powerman joined #mojo
11:50 powerman left #mojo
12:23 asarch joined #mojo
12:25 hrupp joined #mojo
12:32 gizmomathboy joined #mojo
13:04 Pyritic joined #mojo
13:05 parv joined #mojo
13:13 ramortegui joined #mojo
13:28 suede are there mojo libraries for interacting with bitcoind?
13:28 suede well
13:29 suede i suppose i should ask if there are libraries for jsonrpc
13:30 suede http://search.cpan.org/~henryykt/MojoX-JSON-RPC-0.01/README.pod
13:30 suede ohoho
13:31 suede here we go
13:31 suede thanks for the help #mojo :)
13:31 Jonis :)
13:32 Jonis was trying to find out why one api endpoint was crashing when using Mojo::JSON::MaybeXS
13:32 Jonis turns out DBIC resultsets don't directly translate well to JSON
14:08 * sri just open sourced a little mojo app he wrote for suse :)
14:08 sri https://github.com/openSUSE/build-check-statistics
14:11 sri not quite example app quality yet *cough*, but it covers some FAQ-ish things, like adding an attribute with a new component to the app object and app specific commands
14:12 sri and the tests with a mock server that replicates the behavior of the real web service used for gathering data
14:12 janl that last is a nice touch
14:13 janl maknig a mockery :-)
14:16 sri think the structure of the app might be interesting too, because it's a very small app written in a way that works for much bigger apps
14:17 sri app specific plugin, the updater component, a util package, mock server tests
14:17 mcsnolte joined #mojo
14:21 * sri also learned that you can install directly from github with cpanm
14:24 sri anyway, it's nice being able to open source a lot of stuff you write at work, i'm sure we'll be getting a lot more example apps out of this ;)
15:10 osfabibisi joined #mojo
15:24 lluad joined #mojo
15:41 Cyb3rn3t joined #mojo
15:41 Cyb3rn3t hi all !
15:44 Cyb3rn3t can I have Mojo question here ?
15:47 suede no .
15:48 suede (yes, this is the channel for mojo- ask away!)
15:50 Cyb3rn3t so I am very new in Mojo
15:50 Cyb3rn3t I have a little plan what I want to create in Mojo, so I can learn it
15:50 Cyb3rn3t (at least start learning :D)
15:51 Cyb3rn3t so what I know that I'd like to write in full Mojo, not in Lite
15:51 Cyb3rn3t I'd like to follow the MVC,
15:51 Cyb3rn3t right now, I can create Controller,
15:52 Cyb3rn3t and using embeded templating
15:52 Cyb3rn3t where I stuck now is the Model
15:52 Cyb3rn3t I know that I shoud put under lib/Myapp/Model/...
15:53 Cyb3rn3t so how can I call this model, inside a controller ?
15:55 Grinnz sri: you can only install directly from github if you keep Makefile.PL/Build.PL and META.json in the repo (which is why Dist::Milla/Minilla/my plugin bundle do this)
15:55 Grinnz i mainly do it to simplify travis's life
15:55 trone Cyb3rn3t: as a simple module. and you don't need to put it in lib/Mysapp/etc.
15:56 Cyb3rn3t trone: how do you think ?
15:57 trone in controller: use My::Module; in method: sub { ... my $m = My::Module->new(); ... } <- simple
16:00 Cyb3rn3t trone: and inside my module, do I need to use Mojo::base, or somewhat ?
16:00 Cyb3rn3t trone: or only declare package My::model
16:02 trone Cyb3rn3t: You don't need Mojo::Base in your model module if you don't want the Mojo::Base features.
16:03 sh14 joined #mojo
16:05 trone Cyb3rn3t: the model is just a simple perl module. isn't a "special mojolicious" module.
16:06 Cyb3rn3t trone: oh I see
16:06 Cyb3rn3t trone: so I want to communicate with the mysql db in my model
16:07 Cyb3rn3t trone: so do you think I should create this independent from Mojo ?
16:09 trone Cyb3rn3t: Imho, sure. If you have a working interface to mysql among your modules, why create another one specific for mojolicious app? (of course, if you don't need it)
16:12 Cyb3rn3t trone: I think that make sense
16:17 kes joined #mojo
16:24 Cyb3rn3t trone: still not works for me, I think that is some path problem...
16:24 Cyb3rn3t it is not searching in the folder wher I put the file
16:24 Cyb3rn3t file is here
16:25 Cyb3rn3t lib/App/Model/Test.pm
16:25 Cyb3rn3t and in controller I tried: use App::Model::Test
16:25 Cyb3rn3t and lib::App::Model::Test , and no success
16:29 cosimo joined #mojo
16:38 trone Cyb3rn3t: man use lib, and/or FindBin
16:40 trone Cyb3rn3t: you  can also make a test with perl -Ilib ...
16:40 sri Cyb3rn3t: Mojo::Pg and Mojo::SQLite contain good example apps
16:40 sri https://api.metacpan.org/source/DBOOK/Mojo-SQLite-1.000/examples/blog/
16:42 sri not sure about the quality of Mojo::mysql, never used it
16:44 Cyb3rn3t sri: aah, great example, thanks
16:45 Cyb3rn3t WOWW
16:45 Cyb3rn3t the funny part is the following
16:45 Cyb3rn3t while I trusted in my IDE (Eclipse EPIC)
16:46 Cyb3rn3t it allways warning me that my use syntax is not good, becaouse cannot find module in @INC, .....
16:46 CHYC joined #mojo
16:46 Cyb3rn3t since if I run the app with morbo, it works perfectly :o
17:03 disputin joined #mojo
17:13 mattp_ joined #mojo
17:29 Cyb3rn3t left #mojo
18:25 trone joined #mojo
18:47 dod joined #mojo
19:00 PryMar56 joined #mojo
19:39 sri ouch, now samsung washing machines explode too :O http://www.nbcnews.com/business/consumer/samsung-recalling-almost-2-8m-washers-due-impact-injuries-n677891
19:39 kes joined #mojo
19:41 Grinnz lol
19:41 sivoais joined #mojo
20:00 suede okay, i have a question about mojolicious sessions
20:01 suede i'm rolling my own captcha system as an exercise
20:01 suede are mojolicious sessions encrypted? or just signed
20:05 preaction signed
20:06 suede okay so it's probably a bad idea for me to store the captcha *value* in the session
20:06 suede instead, maybe i'll generate a random captcha id and keep the value in a hash server-side
20:06 suede and then check it against the sessions captcha ID
20:07 suede (and expire the captcha IDs over time in case someone wants to try and exhaust app memory)
20:07 suede does that sound reasonable?
20:08 marcus samsung seems like a pretty horrible company to me.
20:08 marcus I'm glad I didn't buy a lot of their hardware
20:09 marcus I think the only thing I've got is a soundbar, which I'm not even using with the TV anymore, because it's too bass'y
20:09 Pyritic joined #mojo
20:10 Grinnz their TVs and SSDs have always been top notch
20:10 marcus I always felt like their tvs prioritized feature lists over usability
20:15 mishanti1 The only brand SSD's I have yet to kill are Samsungs. They have been pretty awesome so far.
20:33 suede okay friends
20:34 suede i'm working on a web application that accepts image uploads
20:34 suede i'm wondering the best practices for such a thing
20:34 suede in that
20:35 suede if i want to deploy another instance of my app with the same data, i can just attach whatever folder to the production branch i'm using (for images) and create/insert the table of locations to those images and have it work fine
20:35 suede i don't think the static folder would be a good idea for this
20:37 vicash suede: you can use any folder. as long as you have a full path you can send the file back to the browser using Mojo::File::Asset
20:38 suede okay, sounds good
20:38 suede thanks
20:46 vicash suede: sorry, Mojo::Asset::File
20:58 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Custom-responses
20:58 sri and yea, samsung SSDs seem top notch... so far
20:58 sri think all my laptops actually use those
21:04 pink_mist considering samsung's track record they'll explode :P
21:11 suede does this use Mojo::Redis2 or Mojo::Redis1?
21:11 suede http://search.cpan.org/~bluet/MojoX-Session-Store-Redis-0.07/lib/MojoX/Session/Store/Redis.pm
21:12 suede or can it use either?
21:13 sri don't use search.cpan
21:14 suede thanks that helped
21:16 jnbek joined #mojo
21:16 demian joined #mojo
21:17 Grinnz according to https://metacpan.org/source/BLUET/MojoX-Session-Store-Redis-0.07/Makefile.PL it uses Redis.pm
21:18 Grinnz the standard Redis driver for perl
21:18 suede huh, i wonder why
21:18 suede thanks Grinnz
21:18 Grinnz its dependencies can't be listed by metacpan because it doesn't include a META.json or META.yml
21:18 Grinnz which is highly irregular for such a recent distribution
21:21 demian I am trying to get Minion (with SQLite backend) to process some work for me, but my jobs remain in the inactive state.  This is true when I run the liteapp (with morbo): http://mojolicio.us/perldoc/Minion#DESCRIPTION
21:22 Grinnz are you running a minion worker?
21:22 demian probably not!
21:22 suede sometimes i feel like a minion worker :|
21:23 demian ok
21:23 demian I need to run ./myapp.pl minion worker and morbo to get it to work?
21:23 sri purl: this channel is http://weknowyourdreams.com/images/minions/minions-04.jpg
21:23 purl ...but this channel is not for help, it is for laying down and avoiding...
21:24 sri purl: this channel is also http://weknowyourdreams.com/images/minions/minions-04.jpg
21:24 purl okay, sri.
21:25 demian holy moly.  that worked!
21:26 demian I was confused by the: "Background worker processes are usually started with the command Minion::Command::minion::worker, which becomes automatically available when an application loads the plugin Mojolicious::Plugin::Minion."
21:27 demian I thought that meant that the worker was automatically available when the app was started
21:27 Grinnz yeah, it just means the "minion worker" command is automatically available to run from your app
21:27 Grinnz you still have to start the worker yourself ;)
21:27 demian can you do that from within the app?
21:28 stryx` joined #mojo
21:28 demian queue it up and tell it to go off and run
21:28 sri not currently, no
21:29 sri i've been meaning to make it possible, but never got around to it
21:30 demian thanks!  It's still unbelievably awesome, for real.  Thank you
22:04 trwww joined #mojo
22:11 lluad joined #mojo

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