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

IRC log for #mojo, 2014-11-03

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

All times shown according to UTC.

Time Nick Message
00:06 woz joined #mojo
00:12 jberger oh sri, it totally slipped my mind, but I came across this: https://github.com/perl-carton/carton/blob/master/lib/Carton/CLI.pm#L38-L46
00:12 jberger it is widely used on CPAN: http://grep.cpan.me/?q=Getopt%3A%3ALong%3A%3AParser&page=2
00:12 jberger ooops, you can knock off that &page=2
00:13 jberger http://grep.cpan.me/?q=Getopt%3A%3ALong%3A%3AParser
00:13 preaction Getopt::Long has GetOptionsFromArray too, it's what i use
00:14 jberger yes but in that case the configuration is still globals
00:14 jberger batman uses it! https://metacpan.org/source/JHTHORSEN/Applify-0.09/lib/Applify.pm#L420
00:14 preaction you could run GetOptionsFromArray more than once on an array
00:16 jberger hmmmm, looking at the code, it just sets and resets the globals :(
00:17 nicomen sri: I don't have very hard feelings about getting it back, hence my coment stating: "My quick points, too late, but nice to have around"
00:18 nicomen but I'll make a new issue for it anyway... to be kosher
00:19 jberger nicomen: I think thats how we all feel
00:19 jberger I never used it and so I'm not fighting to save it
00:19 jberger but I do recall that it was asked for by someone, not so long ago IIRC
00:20 jberger so I hate to see it just removed abruptly and for no other reason than you have to call ->first sometimes
00:20 jberger if it is documented to return a collection, IMO thats really enough
00:22 nicomen https://github.com/kraih/mojo/issues/701
00:24 oalders joined #mojo
00:24 jberger haha, it was sri: http://irclog.perlgeek.de/mojo/2014-07-23#i_9067181
00:25 jberger ok well if he wants to remove his own feature that's up to him I guess
00:26 sri heh
00:26 * sri forgot
00:26 sri jberger: not sometimes btw. you would always need ->first
00:27 jberger sri: sometimes you would want the collection
00:27 jberger can we settle at "most of the time"?
00:29 sri nope, but i'm ok with "almost always"
00:29 jberger rereading, I remember why I was in the fog about it, I was just leaving for vacation, and there was an issue with ForkCall
00:29 nicomen what I liked about val() is that it does the picking out "selected" and "checked" stuff
00:31 nicomen of course the secondary nice thing is to do the value vs text content, vs testarea childs... in one swoop
00:31 nicomen *textarea
00:34 * jberger misses purl
00:35 jberger her remarkably well placed jabs
00:35 jberger :(
00:38 jamesaxl joined #mojo
00:43 sri nicomen: if you want your proposals to have an actual chance you need to be less vague
00:43 sri Mojo::DOM::Form has no chance whatsoever
00:43 jberger from rereading, we had all the same questions then
00:43 jberger :/
00:44 sri and ironically, by bringing up the Mojo::DOM::Form topic, it weakens the first proposal ;p
00:45 sri wonder if Mojo::DOM::val would have happened at all if i hadn't pushed for it
00:47 sri vague proposal can usually only succeed if you have a group of people that really cares
00:56 sri ¯\_(ツ)_/¯
00:57 Adura Head that fell into a gap emote.
01:00 neyasov joined #mojo
01:09 sri my original proposal was more complete http://pastie.org/9414616
01:09 sri had support for extracting values from <form> blocks
01:09 sri it actually used different return values for different elements
01:10 sri hash, array or scalar
01:12 sri aaaah
01:12 sri here it is :)
01:12 sri https://github.com/kraih/mojo/commit/3564dd174aed
01:12 sri the real one i committed to a branch
01:13 sri real problem was selecting the correct button when extracting all values from the <form>
01:15 sri as far as i can see, the gist nicomen included is just wrong
01:15 sri it picks all buttons indiscriminately
01:16 mst if you click on a button, some browsers (IIRC an old IE) submit the values of all buttons
01:17 mst possibly he's accidentally duplicated that
01:28 sri oh noes... the memories are returning http://irclog.perlgeek.de/mojo/2014-07-23#i_9070437
01:29 sri button handling was... "special"
01:29 jberger sri: I wondered when you would get there
01:29 jberger :P
01:29 sri WHYYYYYYYYYY
01:29 sri i was so much happier not knowing :(
01:30 sri (╯°□°)╯︵ ┻━┻
01:32 sri time for some absinthe
02:26 KCL joined #mojo
02:48 neyasov joined #mojo
03:06 woz joined #mojo
04:37 neyasov joined #mojo
04:46 irq joined #mojo
04:48 basic6_ joined #mojo
04:54 woz joined #mojo
05:35 marmez joined #mojo
05:37 batman jberger: do i do something wrong in Applify..?
05:38 neyasov joined #mojo
05:52 sujithm joined #mojo
06:01 chankey joined #mojo
06:03 neyasov joined #mojo
06:03 rem_lex|pivo joined #mojo
06:33 basiliscos joined #mojo
06:43 woz joined #mojo
06:56 Eke- joined #mojo
06:57 batman "am i doing"...
07:09 dod joined #mojo
07:25 denis_boyun joined #mojo
07:56 ashimema joined #mojo
08:06 ashimema joined #mojo
08:16 vytas joined #mojo
08:20 rawler joined #mojo
08:23 Shaeto joined #mojo
08:32 woz joined #mojo
08:36 trone joined #mojo
08:37 woz_ joined #mojo
08:54 irq joined #mojo
08:56 ashimema joined #mojo
08:58 ashimema joined #mojo
09:04 ashimema joined #mojo
09:07 ashimema joined #mojo
09:12 Vandal joined #mojo
09:14 sujithm joined #mojo
09:15 sujithm joined #mojo
09:18 ashimema joined #mojo
09:36 hesperaux_ joined #mojo
09:42 fhelmber_ joined #mojo
10:21 romel joined #mojo
10:22 romel hi everyone. is there any way to prevent i18n request headers analysis for static files? i am using plugin::i18n
10:26 romel i am getting "found language" message for each static file request
10:26 sh4 joined #mojo
10:27 romel but as far as i can see in a source code, it shouldn't hapen (return if $self->res->code )
10:37 icjs joined #mojo
10:59 hoppie joined #mojo
11:20 hoppie batman: I will check out Mojo::SNMP the next time having to poll devices via SNMP.
11:20 batman hoppie: ok. any feedback is welcome :)
11:21 hoppie sure
11:43 hesperaux joined #mojo
11:59 jnbek joined #mojo
12:11 carneirao joined #mojo
12:13 carneirao joined #mojo
12:15 carneirao joined #mojo
12:16 Shaeto left #mojo
12:30 bc547 joined #mojo
12:41 jberger batman: I was saying that you knew about the oo getopt parser
12:42 jberger I'm sure you use it just fine
12:42 batman ok... i have no idea :)
12:42 batman i really like Applify
12:43 jberger no worries
12:43 jberger the code of it isn't what I had hoped anyway
12:50 ignacio_ joined #mojo
12:55 batman ok... i have no idea what the topic is :)
12:55 batman (no worries)
13:08 dod joined #mojo
13:39 Dandre joined #mojo
13:48 neilhwatson joined #mojo
13:53 dvinciguerra joined #mojo
13:57 * sri wonders what's going on here https://github.com/kraih/mojo/issues/700#issuecomment-61478889
13:58 sri UV has a very interesting Makefile.PL http://api.metacpan.org/source/TYPESTER/UV-0.24/Makefile.PL
14:03 tbushell_ joined #mojo
14:04 Ptolemarch joined #mojo
14:08 diegok sri: https://twitter.com/josetteg/status/529266107748986881 (sorry if already seen)
14:08 Adura Dat kraih.
14:09 mst sri: josette's good people. you should totally do it.
14:09 tbushell_ joined #mojo
14:09 tbushell left #mojo
14:13 Mad_Dud joined #mojo
14:14 Mad_Dud hi guys, could someone give me clue how to create comma-separated string out of $self->every_param('foo')?
14:14 Mad_Dud my $parameters = join (',',$self->every_param('foo')); doesn't seem to work
14:15 moritz what does it return?
14:15 sri diegok/mst: nope, not seen yet
14:15 moritz "doesn't seem to work" isn't an error condition
14:15 Mad_Dud moritz: it should return "1,2,3,4"
14:15 sri hmm, so Net::DNS::Native can work on OS X and Windows, because perls are linked with pthreads there automatically
14:15 Mad_Dud instead it returns "ARRAY(0xae92100)"
14:16 mst Mad_Dud: join ',', @{$self->every_param('foo')}
14:16 moritz Mad_Dud: so it returns an array ref, which you must dereference
14:16 moritz what mst said
14:17 Mad_Dud awesome!
14:17 Mad_Dud thanks mst and moritz
14:17 Mad_Dud this @{} is a bit complicated for me.
14:18 Mad_Dud thank you very much.
14:18 mst it's basic perl
14:18 mst http://sherlock.scsys.co.uk/~matthewt/NN-conjugation may help
14:18 mst also the links from http://p3rl.org/REF
14:18 Mad_Dud thank you
14:20 sri mst/diegok: hahaha, i missed that tweet because mojolicious as well as my handle are written wrong -.-
14:20 mst sri: yes, well, I said she was good people
14:20 mst sri: she's still (a) french (b) nuts
14:21 diegok sri: that's why I've cp the tweet here :)
14:25 mst and the 'd@' on the front suggests she was attempting to DM and tyoped *that* as well
14:25 mst <3 josette
14:26 arthas joined #mojo
14:26 KCL_ joined #mojo
14:38 dvinciguerra joined #mojo
14:48 sri jberger: this is kinda shitty for libuv bindings in the future
14:51 sujithm joined #mojo
14:51 sri at least it looks like default system perls are built with threads these days
14:52 sri i hate how that puts people who perlbrew in a bad position though
14:54 lipizzan joined #mojo
15:00 Ptolemarch joined #mojo
15:03 sri lol, i wonder if they will cut off the secure install instructions when they post mojolicio.us here http://curlpipesh.tumblr.com/
15:04 mst sri: shouldn't it be possible to build a non-thread/multi perl that can still operate w/pthreads ?
15:04 sri mst: certainly, but you have to actually do it
15:05 mst does linking pthreads reduce any of the performance advantages you get from being non-thread/multi ?
15:05 sri it's easier to tell people to just build a threaded perl :S
15:05 mst it is currently, yes, but it should in theory be possible to provide it as an option to perlbrew or perl-build or whatever
15:06 mst and/or maybe convince the authors to do it by feault
15:06 sri mst: i just learned all binaries on os x are linked to pthreads, so i have no clue about performance implications
15:06 mst I think this comes down to "at some point I'm going to have to build a bunch of perls on a bunch of different OSes and see what happens" then
15:11 hoppie joined #mojo
15:11 dod joined #mojo
15:12 hoppie sri: Recent Solaris 11.2 (checked last week), Perl is not built with threads support. Also the same for AIX.
15:12 sri :S
15:13 hoppie Not sure why... :(
15:13 sri at least it's the case with most linux distributions
15:13 sri still... i'm not sure if we should support Net::DNS::Native or not
15:14 sri kinda funny how windows users would get a nice feature more easily than linux users for once
15:15 hoppie Perl on some BSD variants also not configured with threads. I was surprised -- again not sure why.
15:16 mst because threads are usually pointless
15:16 mst distros that supply them usually do it because of shit like mod_perl's worker MPM
15:16 mst which was usually a terrible idea anyway
15:16 Lee yep, /me suspects mod_perl is to blame too
15:16 mst anybody who cares about performance compiles their own perl without threads
15:18 mst however, the threads and multiplicity compile options are a separate matter to linking libpthread
15:18 hoppie we had a process using threads actually (SNMP server) will capability to receive 550k traps per minute. The process runs 24x7, no issues, just runs.
15:19 mst that's nice for you
15:19 sri every now and then i wish you could just create totally clean threads (fork+exec style)
15:19 Lee if you want to see something truly bonkers involving threads and perl (and windows and cgi-fast): https://github.com/leejo/cgi-fast/issues/6
15:20 mst sri: leont's threads::lite thing was moving towards that, the problem is that then you need to figure out some way for them to talk
15:20 mst you can do it using multiplicity and a fresh VM on each C thread
15:20 sri i remember threads::lite, it looked promising a few years back
15:21 mst he problem is then you need a bunch of thread-safe stuff under the hood for marshalling so they can talk to each other
15:25 mgrimes joined #mojo
15:42 sweet_kid joined #mojo
15:42 Foxcool joined #mojo
15:48 dvinciguerra joined #mojo
16:03 dod joined #mojo
16:05 meshl joined #mojo
16:07 meshl Does anyone have any advice on developing single page app with Mojolicious? Is Mojolicious a good choice for single page app actually?
16:07 sri no, yes
16:08 augensalat joined #mojo
16:08 meshl Thanks, in your "yes", what would you just be implementing lots of Ajax routes?
16:09 sri single page apps depend much more on the client side framework than the server side
16:10 sri so design the server side to fit the client side
16:11 meshl OK, so you would be using one of these single page app Javascript framework on top of Mojolicious, right?
16:11 mst Mojo is a perfectly acceptable choice for implementing REST APIs
16:11 mst any sane single page app consists of some HTML+JS
16:11 mst that talks to a REST API
16:11 meshl any recommendation for the client side JS framework?
16:12 mst personally, I've been using angular.js with either Catalyst or Web::Simple recently, and I see no reason it wouldn't also work with Mojolicious
16:13 meshl thanks. I am a bit allergic to Angular though, I find the learning curve too steep
16:13 sri angular.js gets all the hype, ember.js is popular with ruby folks, and backbone.js is the original
16:14 sri personally, i'm trying to avoid single page apps actually
16:15 meshl Right, I'll dig back into backbone a bit. Ember I shall see as I dunno. But aren't single page apps the future actually? It seems to me like page reloading is stuff from the past already...
16:16 sri certainly not the future
16:16 sri the future is very diverse
16:17 meshl I guess it depends on the kind of app, yes. My app is basically a software I'd like to run in the browser. Nothing like GMail, but with pages reloading I feel it just would not do it...
16:20 mst meshl: maybe once you've written a couple and experienced the pain of more limited frameworks angular will make more sense :)
16:20 mst I totally agree that the learning curve is steep, but the view from the top is excellent ;)
16:20 sri the angular 2.0 situation is funny
16:20 meshl perhaps, yes... I know that the app I am about to develop is dead simple though
16:21 mst sri: the whining about it is hilarious
16:21 meshl so I should not really be bothered my a JS frameworks limitations
16:28 sri i guess React.js counts too, even though it's only the V in MVC
16:28 marty meshl:  www.dripdepot.com is a single page app running Mojolicous and Kendoui
16:29 sri web components can't arrive soon enough though
16:29 * marty is not completely sold on the single page app thing just yet.
16:30 sri great talk about web components http://www.youtube.com/watch?v=fqULJBBEVQE
16:42 marty web components - yum.   Definitely  a step in the right direction.
16:43 marty sri: thanks for that link.  very informative.  I had no clue about web components.
16:48 davido_ joined #mojo
16:52 meshl thanks all, helpful
17:13 sri i was on the edge about reverting the Mojo::DOM::val deprecation, but even after a post to the mailing-list there have been no supporters https://github.com/kraih/mojo/issues/701
17:17 sri haha, ember.js is profiting from the angular.js 2.0 drama... "no rewrite necessary...we will be taking the best parts from React.js" https://github.com/emberjs/rfcs/pull/15
17:38 Kripton joined #mojo
17:59 jamesaxl joined #mojo
18:08 sujithm joined #mojo
18:12 * sri falls off chair laughing at http://www.nomorejavascript.com/
18:17 neyasov joined #mojo
18:19 stephanj is that meannt serious?
18:19 neilhwatson Site needs javascript. Irony.
18:26 woz joined #mojo
18:26 woz joined #mojo
18:27 neilhwatson Is that site suggesting a Ruby interpreter in every browser?
18:40 dod joined #mojo
18:56 irq joined #mojo
18:58 vytas_ joined #mojo
19:01 rawler joined #mojo
19:06 disputin joined #mojo
19:07 marmez joined #mojo
19:27 dotandimet joined #mojo
19:31 bc547 what is the angular 2.0 situation/drama?
19:39 disputin joined #mojo
19:42 denis_boyun joined #mojo
20:21 amon joined #mojo
20:22 ignacio_ joined #mojo
20:38 * tempire uses reactjs, and doesn't care about the others
20:38 sri tempire: you ok with the pirate cloud?
20:39 tempire the one from a couple days ago?
20:39 sri https://twitter.com/kraih/status/529289505858420736
20:40 sri maybe with a 2015 and/or other decorations for the conference edition
20:41 tempire It's not quite my style, but I don't have any problem with it.
20:41 tempire Is the pirate theme referencing something, or just 'cause?
20:41 sri cause we are outlaws
20:47 hoppie joined #mojo
20:47 hoppie I have a silly question
20:47 * neilhwatson wonders which other web tool followers would be zombies.
20:48 hoppie MCE 1.520 will come with examples in POD format demonstrating MCE + Mojo.  This is not as nice. mce_loop { ... Mojo:IOLoop->( ... ) ... }
20:49 hoppie I want to be able to do this: just do not know what to call the method.
20:49 neyasov joined #mojo
20:50 hoppie MCE::Loop->go( sub { ... Mojo::IOLoop->( ... ) ... }.   I am reserving ->start for later use, so do not want to call it that.
20:50 hoppie MCE::Loop->run is another option.
20:52 nicomen sri: it's funny ;)
20:52 hernan604 sri: how to buy ?
20:53 sri you can't yet, it was an idea for mojoconf 2015, but tempire doesn't seem to like it :S
20:53 hoppie Seeing it here, going to go with ->run. mce_loop will still work, btw. MCE 1.520 will have 2 examples demonstrating Mojo
20:55 sri well, that's what you get when your instructions are "draw something", without directions ;p
20:58 hoppie No promises, in the future may add ->start and ->await; MCE runs in the background (pool of workers). That's why not wanting to use ->start.
20:59 hernan604 ask the designer to draw it more asynchronously
20:59 tempire A theme is probably a good idea.
20:59 hoppie Will support both Mojo and AnyEvent; actually one can specify which
20:59 hernan604 and pass the msg or more req/s
20:59 hernan604 :)
21:00 tempire rainbow pirate unicorn raptor
21:01 bwf s/pirate/rebel/  and use star wars font
21:01 tempire I don't dislike it. It just doesn't scream at me.
21:02 tempire Did I catch something about an eyepatch on the cloud?
21:02 tempire *didn't
21:06 hoppie MCE Models will have ->do.  Mojo examples will pop.  Do not want to use ->go.  ->process is too long.
21:06 hoppie thanks :)
21:07 hoppie putting in effort for Mojo to stand out among various examples.
21:18 rawler joined #mojo
21:35 good_news_everyon joined #mojo
21:35 good_news_everyon [mojo] kraih created net_dns_native (+1 new commit): http://git.io/8PJpzA
21:35 good_news_everyon mojo/net_dns_native bf9e5bf Sebastian Riedel: added basic support for Net::DNS::Native
21:35 good_news_everyon left #mojo
21:36 sri that's how Net::DNS::Native support would look like i guess
21:36 sri (just a hack)
21:37 sri supporting ipv4 and ipv6 would be a bit tedious though, i guess a hard dep on IO::Socket::IP would make it easier
21:38 dotan1 joined #mojo
21:38 sri same deal as the other two modules, install from cpan for older perls, and already in core for newer ones
21:39 hoppie is this okay -- the mojo example?  The ->do method is working.  http://pastie.org/9694162  Thanks.
21:40 dotandimet joined #mojo
21:42 hoppie has anyone become indecisive on such small matters? :)  ->do may become ->run  Will take a break.
21:42 cfedde those are always the hard ones.
21:49 neyasov joined #mojo
22:08 meshl joined #mojo
22:08 Adurah joined #mojo
22:09 sri haha, defaulting to always using IPv6 fails miserably
22:10 dotan joined #mojo
22:16 * tempire just used respond_to for the first timer
22:16 tempire EVER
22:16 tempire *time
22:16 btyler joined #mojo
22:16 tempire splendid
22:17 hernan604 respond_to++
22:17 hernan604 cant live without it
22:24 tempire why is postgres not set up by default in centos 7
22:24 tempire WHY
22:25 berov joined #mojo
22:31 cfedde most problems have good solutions that don't involve databases.
22:36 dotandimet joined #mojo
22:37 disputin joined #mojo
22:45 dotandimet joined #mojo
22:57 dotandimet joined #mojo
23:00 sri damn, ipv6 by default is really not workable :S
23:08 disputin joined #mojo
23:25 tbushell joined #mojo
23:28 hernan604 just saw mango news :~
23:29 dvinciguerra joined #mojo
23:33 tbushell left #mojo
23:38 neyasov joined #mojo
23:44 jberger_ joined #mojo
23:48 vytas_ joined #mojo
23:50 vytas_ joined #mojo

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