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

IRC log for #mojo, 2013-12-10

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

All times shown according to UTC.

Time Nick Message
00:17 asarch joined #mojo
00:19 d4rkie joined #mojo
00:43 d4rkie joined #mojo
00:43 * jberger worries about sri
00:44 d4rkie joined #mojo
00:45 jberger ENOBENDERS
00:53 jberger EBENDERISNOTOP
01:13 dvinciguerra joined #mojo
01:26 ka2u joined #mojo
01:28 laouji joined #mojo
01:51 jberger_ joined #mojo
01:52 jberger joined #mojo
01:55 d4rkie joined #mojo
01:58 sri jberger: don't worry, i'm still around, just reducing my open source hours
01:59 jberger Figured :-)
02:01 jberger That's fine actually, I've been amazed at the amount of open source hours you have!
02:08 sri yea, i might have taken it a bit too far... gonna try to find a better balance :)
02:55 zivester joined #mojo
03:01 Dandre joined #mojo
03:29 crab hi.
03:39 BillRuppert joined #mojo
03:41 BillRuppert I'm building my first app, not lite.  Using DBIx::Class, lots of CRUD.  Having a hard time coming up with a validation strategy given the many options available.  Is there a current recommended package/packages?
03:43 crab how about the built-in validation
03:45 BillRuppert I found the documentation to be on the cryptic side, and having a hard time finding non-lite examples that are up to date.  However, if that is the recommended approach I can work harder at it.
03:46 crab well, it's still pretty new.
03:46 crab but it's probably worth putting some effort into
03:47 BillRuppert Great, I'll look into it some more.
03:48 crab feel free to ask questions and stuff.maybe you could write a blog post about it all later.
03:48 BillRuppert That would be good.  Thanks.
04:01 BillRuppert joined #mojo
04:17 preflex_ joined #mojo
04:46 laouji joined #mojo
05:05 ka2u joined #mojo
05:05 jberger_ joined #mojo
05:16 jberger joined #mojo
05:36 laouji joined #mojo
05:41 espent joined #mojo
05:57 zacts joined #mojo
05:59 marcus Good morning
05:59 purl For you maybe.
06:00 marcus sri: I think maybe validations->error should have a setter as well. Or at least, I just manually set validation->{errors}{login} :p
06:04 marcus crab: What do you think? ^^ ( https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Validator/Validation.pm#L50 )
06:06 marcus I guess the problem would be clearing errors with the setter, since has_error checks for exists
06:06 marcus (My use case is actually adding an error from the model layer tho)
06:09 Lee joined #mojo
06:12 marcus (If this doesn't sound crazy, I'll cook up a pull request for it)
06:16 crab it doesn't sound crazy, at least
06:16 crab but what are you going to do about has_error? change it to check that the string is != ""?
06:32 russum joined #mojo
06:32 russum left #mojo
06:49 Vandal joined #mojo
07:05 marcus crab: I thought maybe check for undefined?
07:05 marcus exists || defined ?
07:05 marcus I guess the bigger problem is the keys check for any error
07:07 marcus Or I could just delete the key if you pass in undef, seems cleaner.
07:19 trone joined #mojo
07:21 crab yeah
07:22 crab maybe have an unset_error() too
07:37 batman marcus: https://gist.github.com/jhthorsen/7886985 # redis backend for mandel
07:38 marcus batman: holy cow :)
07:39 batman hehe
07:39 batman i'm not sure if it should be one key pr field
07:39 batman it could be faster if i just serialized the whole data structure into one key
07:39 batman but i like structure
07:39 marcus You mean like a hash?
07:40 batman $doc->data == a hash. could do $redis->set("persons:$id", j($doc->data))
07:41 batman but i would rather have it *slow* and structured instead of that json string
07:41 batman at least that's my idea now.
07:42 marcus Yeah, I think you are right, and I don't think it will be that slow regardless
07:42 marcus You can always optimize later.
07:42 batman i agree
07:42 batman i'm using ":m:" for metadata and ":d:" for data
07:42 batman and ":i:" for indexes
07:42 marcus MEAT DATA!
07:43 batman ;)
07:43 batman i still don't understand how to search and use the indexes...
07:43 batman the :i:_id index is easy enough. it's not ordered though...
07:44 batman maybe it should be a sorted set instead
07:44 batman s/maybe //
07:44 marcus you mean like manually creating a reverse index in redis?
07:44 batman yes. manually = created by Mandel, without you knowing
07:44 marcus right
07:44 batman you need to tell mandel which fields to index though.
07:44 marcus And you need a tokenizer
07:45 batman what's that?
07:45 purl it has been said that that is the issue.  I would like to have the catalyst stuff just as adaptors for the plack stuff but there's enough trouble there to not encourage the work to do so :(
07:45 marcus batman: something that splits strings into searchable tokens
07:45 dod joined #mojo
07:45 batman i'm going to do basics now: can't search, just look up exact values
07:46 batman like lookup "name = ?" and "_id = ?" instead of just _id
07:46 batman not "name =~ ..." stuff (at least not yet)
07:46 batman i think it will actually cover the requirements for convos...
07:49 marcus Yeah, that's fine
07:49 marcus I just misunderstood what you meant is all. Lookup indexes are very useful inded :)
07:50 batman :)
07:53 batman i think the indexes need to look like this: "persons:i:name:bruce" = "$id" ?
07:53 batman err...
07:53 laouji joined #mojo
07:53 batman i think the indexes need to look like this: sadd "persons:i:name:bruce" "$id" ?
07:53 marcus BRUCE!
07:54 batman yeah. completely random of course ;)
07:54 marcus yeah, seems sane.
07:55 batman ok. i wonder how to do order_by...
07:56 nicolaas joined #mojo
08:04 keedi joined #mojo
08:07 batman guess i could just do sadd "persons:i:name" "bruce" as well and use sort "persons:i:name" later on
08:10 dod joined #mojo
08:19 rem_lex|pivo joined #mojo
08:20 ka2u joined #mojo
08:41 ka2u joined #mojo
08:52 denis_boyun joined #mojo
08:55 fhelmber_ joined #mojo
08:59 Kulag joined #mojo
09:28 Dandre hello,
09:37 batman jberger: would really like feedback on https://gist.github.com/jhthorsen/7886985
09:43 ver joined #mojo
09:43 stephan48 81
10:20 jamesw joined #mojo
10:29 denis_boyun__ joined #mojo
10:36 mire_ joined #mojo
10:37 denis_boyun joined #mojo
10:54 denisboyun joined #mojo
11:00 HtbaaPi BillRuppert: Validation::Class is a very nice validation module as well
11:30 meshl joined #mojo
11:36 hrupp joined #mojo
11:46 Vandal joined #mojo
11:47 pau4o joined #mojo
11:52 pau4o joined #mojo
12:02 punter joined #mojo
12:04 d4rkie joined #mojo
12:05 d4rkie joined #mojo
12:17 basiliscos joined #mojo
12:18 d4rkie joined #mojo
12:20 basiliscos joined #mojo
12:32 memowe joined #mojo
12:43 maxhq joined #mojo
13:24 jberger_ joined #mojo
13:33 dvinciguerra joined #mojo
13:40 crab ok, i'm off on vacation for ten days or so.
13:40 crab seeya.
13:42 jovial_chat crab: hope you have a great time
13:42 jovial_chat and don't get bitten by any crabs :D
13:48 russum joined #mojo
13:50 hummeleBop joined #mojo
13:58 fhelmber_ joined #mojo
14:04 Ulti joined #mojo
14:04 russum left #mojo
14:05 jberger_ crab: have fun!
14:05 Ulti has anyone had issues using Net::FTP alongside Mojo::UserAgent before?
14:05 jberger_ batman what am I looking at?
14:07 jberger_ Ulti: afaik the user agent doesn't do any kind of ftp
14:07 jberger_ So I don't know what you mean by along side
14:08 jberger_ Bender trust jberger
14:08 Bender But I don't trust you in #mojo, jberger_
14:09 jberger_ How am I op then?
14:09 sri Bender: trust jberger_
14:09 Bender OK, sri
14:09 * jberger_ is confused
14:09 jberger_ sri thanks
14:10 jberger_ Bender trust jberger
14:10 Bender OK, jberger_
14:11 * jberger finally turned off the old computer that had the jberger nick
14:22 ver joined #mojo
14:42 mire_ joined #mojo
14:46 sh4 joined #mojo
14:50 sh4 joined #mojo
14:53 bluescreen joined #mojo
14:57 Ulti jberger: I mean using both modules together, we are having issues with UserAgent->get if we replace the get request with LWP and then just use the Mojo DOM parser everything works ok... otherwise we get really weird problems with Net::FTP that we haven't quite pinned down yet
15:00 jberger again, are you using get on an ftp address? I don't think the mojo ua does ftp of any kind
15:00 espent joined #mojo
15:01 ver joined #mojo
15:02 Ulti no why would I be using http get on ftp :/ I mean we are doing FTP and HTTP requests in the same script but doing the HTTP gets with Mojo is causing the FTP session to bail out in a reproducable way everytime... if the HTTP get is done with LWP instead of Mojo Net::FTP does what we'd expect
15:02 Ulti should have a simplified example soon
15:02 Ulti still can't work out why because the error messages from Net::FTP are basically useless
15:02 Ulti might be something weird like numbers of sockets open as we are making a lot of requests in a tight loop
15:03 Ulti if no one has seen this sort of stuff we'll try and get to the bottom of it, just thought it might be a known issue since Net::FTP is in core
15:04 basiliscos joined #mojo
15:06 btyler joined #mojo
15:06 crab i have used Net::FTP and not noticed such a problem, but i have to tell you that (a) i haven't done exactly what you're doing, and (b) Net::FTP is kinda fragile, especially when the server misbehaves at all.
15:07 cooper joined #mojo
15:16 sri btw. i'm not going to jump at every github issue anymore from now on, maybe that will create some opportunity for others to step up
15:35 gryphon joined #mojo
15:38 ka2u joined #mojo
15:41 Dandre hello
15:42 Dandre alnewkirk: Are you available?
16:03 basiliscos joined #mojo
16:13 jovial_chat came across another csrf instance
16:13 jovial_chat cross site stuff
16:13 jovial_chat you'll be happy to know mojo's method is best
16:13 jovial_chat replying on accessing session cookie fails when you want to allow a diff origin or similar
16:29 Dandre I have watch this screencast: http://blogs.perl.org/users/awncorp/2011/11/validationclass-mojoliciouslite-and-html5-form-field-rendering.html
16:30 Dandre I haven't found the render_field. Can anyone help me?
16:40 webart joined #mojo
16:47 Dandre ok I have found, sorry
16:55 BillRuppert @Dandre did you get that example to work?  I couldn't.
16:57 groundnuty I'm trying to use mojo-legacy. It complains about IO:Scoket:SSL beeing <1.75. I downloaded newer added path to @INC. it is seen by perl but mojo/perl still picks old-system one first
16:57 Dandre it seems an old example
16:57 groundnuty anyway I can help it?
16:57 Dandre BillRuppert: the necessary plugin is here: http://search.cpan.org/~awncorp/Validation-Class-Plugin-FormFields-7.900022/
16:58 Dandre but there is no render_field
16:58 Dandre It was in an older version available on cpan too and uses TemplateToolkit
16:59 Dandre I will browse the source and see how it works and probably pickup some ideas w/o using the full distro
17:02 BillRuppert I'm new to IRC.  What is the equivalent of @Dandre?
17:02 preflex_ joined #mojo
17:03 nic BillRuppert: <- just like that
17:04 BillRuppert nic Thanks!
17:04 BillRuppert nic: Thanks
17:04 nic BillRuppert: np :)
17:05 BillRuppert Dandre: Did you find the source code for that example anywhere or did you type it in from the screencast like I did?  I'm not sure I got it all right.
17:05 Dandre I didn't find it
17:05 nic If that screencast is 2+ yrs old, that's a long time in Mojo World
17:06 BillRuppert nic: Yes, it is clearly out of date.
17:06 nic That was back when the web was still in black & white
17:06 beyondcreed joined #mojo
17:06 BillRuppert lol
17:08 BillRuppert Validation::Class seems to work fine (I wrote a batch program to test it) but I don't think the plugin is quite right.
17:09 stephan48 the example is from 2011 if i am right chances are high that its not up2date/working anymore
17:10 batman jberger: sorry... been working :(
17:10 stephan48 also theres a validation plugin in core now
17:10 batman jberger: you're looking at using redis as backend instead of mongodb for mandel
17:10 batman there's also a link to the pull request i've made (it's not complete)
17:13 jberger batman, as an alternate or are you thinking of changing the backend entirely?
17:14 punter joined #mojo
17:19 batman i want to support both
17:19 batman like dbic support both mysql and oracle
17:22 asarch joined #mojo
17:27 fhelmbe__ joined #mojo
17:28 Ulti super olde Mojolicious version looks like the problem we had
17:34 Ulti by super olde I mean the version with longterm release Ubuntu... :'[
17:51 ka2u joined #mojo
18:00 bd Ulti: you know dh-make-perl --cpan Mojolicious?
18:10 ka2u joined #mojo
18:14 tempire http://www.shirocosmetics.com/item_193/Why-Not-Zoidberg.htm
18:20 beyondcreed joined #mojo
19:05 abra joined #mojo
19:08 ka2u joined #mojo
19:10 preaction joined #mojo
19:15 genio joined #mojo
19:34 dod joined #mojo
19:43 jberger WHY NOT ZOIDBERG???
19:43 purl (V) (;,,;) (V)
20:00 mire_ joined #mojo
20:18 cfedde sometimes I have to check pasted urls just to see if they will be blocked by the company filter.
20:23 rem_lex|pivo joined #mojo
20:51 hummeleBop joined #mojo
20:53 tl joined #mojo
20:56 lukep joined #mojo
22:00 punter joined #mojo
22:23 tholen42 joined #mojo
22:32 jmmills left #mojo
22:56 good_news_everyone joined #mojo
22:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/kWlPxQ
22:56 good_news_everyone mojo/master 1746449 Sebastian Riedel: improved Mojolicious::Validator::Validation to allow custom validation errors
22:56 good_news_everyone left #mojo
22:56 sri i need this too
23:13 nicomen joined #mojo
23:37 ka2u joined #mojo
23:37 rem_lex joined #mojo
23:44 beyondcreed joined #mojo

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