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

IRC log for #mojo, 2015-02-10

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

All times shown according to UTC.

Time Nick Message
00:14 sri reminds me that i also wanted to clean up how we parse cookies
00:15 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Cookie/Response.pm#L31-L36
00:15 sri it's about expires of course
00:16 sri perhaps Mojo::Util::split_cookie_header
00:16 sri could set a precedent for Mojo::Util::split_link_header
00:19 Grinnz OH!
00:19 Grinnz i just had a eureka moment with this weird issue in mojo irc heh
00:20 Grinnz it was only happening when getting these lines about SSL back from whois, but its happening on two different networks that use different numerics for that
00:20 Grinnz so i looked into IRC::Utils and it doesn't have a mapping for either numeric
00:20 Grinnz so its happening when theres no mapping and... yep theres a return
00:38 asarch joined #mojo
01:14 stryx` joined #mojo
01:24 marty joined #mojo
01:38 good_news_everyon joined #mojo
01:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NeRr
01:38 good_news_everyon mojo/master c97f588 Sebastian Riedel: add split_cookie_header function to Mojo::Util
01:38 good_news_everyon left #mojo
01:38 sri can't say the implementation makes me happy, but it's way better than before at least :)
01:40 sri that should be nicer https://github.com/kraih/mojo/blob/master/lib/Mojo/Util.pm#L389-L393
01:43 good_news_everyon joined #mojo
01:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NeEZ
01:43 good_news_everyon mojo/master d8a2218 Sebastian Riedel: no need for a regex
01:43 good_news_everyon left #mojo
02:20 sri grrr, how do people break their testing boxes like this? http://www.cpantesters.org/cpan/report/6f0190de-b0c0-11e4-861b-7df239500b96
02:23 Grinnz wat
02:23 Grinnz IO::Socket::IP 0.36 requires Socket 1.97, it has IO::Socket::IP 0.36 and Socket 1.94
02:23 Grinnz lol
02:26 Grinnz i got one like that: http://www.cpantesters.org/cpan/report/01093b9a-6bfd-1014-ab54-5778d00ef69e
02:58 klapperl_ joined #mojo
03:11 noganex_ joined #mojo
03:54 disputin joined #mojo
04:11 inokenty-w joined #mojo
04:33 dotandimet joined #mojo
04:50 sh4 joined #mojo
05:18 dotandimet joined #mojo
05:46 dotandimet1 joined #mojo
05:58 melo joined #mojo
06:18 hshong joined #mojo
06:59 dotandimet joined #mojo
07:13 Vandal joined #mojo
07:19 reneeb joined #mojo
07:51 reneeb joined #mojo
07:53 Dandre Hello,
07:57 Snelius_ hi
07:57 purl que tal, Snelius_.
07:58 Dandre I am using a route definition like $route->get('/:foo/*bar')... I get foo and bar as expected
07:58 Dandre but in $stash->{'mojo.captures'}->{format} I get nothing. I understand the format specification is got by bar parameter.
07:58 Dandre How can I get this stash value when doing a get on /foo/bar.json?
08:00 Snelius_ $self->req->headers->content_type ?
08:00 batman jberger: sorry. i need to fix *something*. i'll reply later
08:02 Dandre Snelius_: Yes I have this but I need the .format to
08:05 eseyman joined #mojo
08:07 bobkare Dandre: I'm pretty sure you aren't supposed to dig into the mojo.* stash values, they are internal. And it should be just $c->stash('format')
08:10 Dandre yes but $c->stash('format') is still empty
08:14 trone joined #mojo
08:17 batman which issues did Mojo::ByteStream in bool context == 1 fix..?
08:20 batman sri: this looks rather weird: if ('' .($err = $collection->compact->join('. '))) { ... } #:(
08:20 batman got any idea on how to format that without breaking it into multiple lines?
08:21 batman maybe i should use to_string...
08:25 basiliscos joined #mojo
08:30 cpan_mojo Mojolicious-Plugin-OAuth2-Server 0.06 by Lee Johnson - http://metacpan.org/release/LEEJO/Mojolicious-Plugin-OAuth2-Server-0.06
09:03 marcusr good morning.
09:03 purl Lies!
09:03 marcusr purl: diaf
09:03 purl hmmm... diaf is Die in a Fire
09:03 marcusr cunning like a bot
09:16 crab hi marcus
09:17 marcusr crab: how are you?
09:20 romel_ hi guys. is there any efficient way to extract conrtoller and action names inside before_dispatch hook?
09:21 romel_ the one i've found is $c->req->url
09:21 romel_ but maybe it can be done in a straight way
09:32 vytas joined #mojo
10:20 romel_ is anybody home? :)
10:21 romel_ *sigh*
10:30 pink_mist well what's wrong with $c->req->url if it does what you want?
10:32 romel_ i have to apply regex on it to obtain what i want. but i suppose this information can be easily retrieved from mojo's internals :)
10:48 Prostetnic joined #mojo
10:49 Prostetnic hi
10:50 romel_ hello
10:51 Prostetnic Just a quick beginner question, I would like to respond on a url to JSON requests with some data, but on the same url to resopnd with a static file, "index.html", how can I do so?
10:53 Prostetnic I can see the respond_to method to create the appropriate responses, but I don't see how to reference the static file I have in my public folder.
10:53 Lee Prostetnic: if ( $c->req->json ) { ... } else { $c->render( template => ... ) }
10:54 Prostetnic Ah, so not using the render_to method. Just manually check the request types?
10:54 btyler Prostetnic: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Content-negotiation ?
10:55 Lee ^ much better
10:55 fhelmber_ joined #mojo
10:56 btyler probably mixed with: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Serving-static-files
10:56 btyler unless index.html is actually a template
10:56 Prostetnic hmmm. the render_to example in the link above is the same one I am using, but failing to get to work.
10:57 pink_mist which render_to?
10:57 Prostetnic I guess maybe the issue is I am not understanding how the lookup for templates works
10:57 btyler is the client making the requests setting the 'Accept' HTTP header?
10:57 btyler or a 'format=foo' param
10:57 Prostetnic It's a browser so I guess so.
10:57 crab marcusr: pretty good, thanks. except i have chilblains on all my fingers. i must remember not to wash dishes in cold water.
10:57 btyler don't guess, check! :P
10:59 marcusr crab: or buy a heater, maybe? :)
11:02 Prostetnic 'accept' => ['text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ],
11:04 romel_ i apologise for being boring but would someone please check my question? thanks
11:06 Prostetnic This works if I define "Index.html.ep" in my "__DATA__" section: $c->respond_to(json => {json => $i}, html => {template => 'index'}, any => { data => '', status => 204 });
11:07 btyler ah, ok. when you use 'template' you tell mojo to look for a template, not a static file
11:07 Prostetnic However does not work to load a file in my public folder.
11:07 Prostetnic OK, is there an equivalent for a static file?
11:08 btyler for inline in __DATA__: http://mojolicio.us/perldoc/Mojolicious/Guides/Tutorial#Static-files for general usage: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Serving-static-files
11:09 btyler but note the bit about the public dir. that should be the first choice
11:11 btyler maybe? going to shut up now before I venture beyond what I know
11:12 Prostetnic btyler, I am hoping to serve a static file for a whole set of URLs like "mydomain.com/picture/image_file_name".
11:12 Prostetnic or "/picture/*file"
11:13 Prostetnic So I presume I have to tell it to fetch the static file.
11:14 btyler which seems to be pretty well handled by http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#reply-static mentioned in the two other static file serving bits of doc
11:16 Prostetnic Yep, thank you. Looks like I was barking up the wrong tree with render_to and I just need to check the request method myself and use the static render method.
11:16 btyler but ultimately the more robust solution is to untie static content serving from your web app, and have nginx or apache serve them as a reverse proxy in front of mojo. don't know how big/serious this project is, but that's a pretty good option in lots of cases. just tell nginx to serve static stuff out of webroot/picture/*
11:17 Prostetnic It's just a little project. :)
11:18 Prostetnic That would work if NGINX can respond to a specific request type.
11:19 Prostetnic OK. I think you've solved it for me any way. Thanks.
11:20 btyler no problem, good luck
12:02 jberger romel_: I don't understand your question
12:02 jberger before dispatch there aren't defined controller and action values
12:03 jberger those are determined during dispatch
12:11 jberger Dandre: yes indeed, using mojo. stash values is evil
12:11 jberger don't do it
12:14 romel_ jberger: the main idea is to catch controller / action as soon as possible during request handling and check whether the requesting user is allowed to do that.
12:15 romel_ or it's better to do that on a controller level?
12:16 Lee romel_: you probably want Mojolicious::Plugin::Authorization
12:18 niczero joined #mojo
12:18 niczero pumpkins are the height of irrelevance till once a year I carve one up then throw it in the trash 3 days later
12:19 niczero If perl5 is to be renamed (and I agree it should be) I reckon we have at most one chance to do so
12:20 marcusr mojo-perl
12:20 marcusr :S
12:25 romel_ Lee: i use it already but as far as i understand it's just an api for permission checking
12:25 romel_ so no matter where i put has_priv / is_role etc
12:26 Lee romel_: https://metacpan.org/pod/Mojolicious::Plugin::Authorization#ROUTING-VIA-CONDITION # doesn't this do what you're trying to do though?
12:26 romel_ i decided to put permission checking into mojolicious hooks to avoid duplicating checks inside each controller action
12:28 Lee hmm, byterock still hasn't merged my PR...
12:31 Prostetnic Ok, so I tried $c->req->json unless I a missing something this is for a completely different purpose than I need it for. I need to manage the requests Header Accepts type to return the correct content, $c->req->json gives the json as an alternative to passing form data when doing "POST" requests and the like. .
12:31 romel_ Lee: yes, this is almost what i am trying to accomplish except it complicates further privilege management without editing the code
12:31 Lee right, gotcha
12:32 Prostetnic I looked at the "format" option to try and detect the type there but it is looking at file extensions which is not what I am looking for.
12:33 Prostetnic I considered manually testing the header on $c->req myself for the Accepts value, but this seemed like giving up and ignoring Mojolicious.
12:34 Prostetnic Turns out the secret is that the respond_to method accepts function references.
12:34 Prostetnic Like: $c->respond_to(json => {json => $i}, html => sub { $c->reply->static('index.html'); }, any => { data => '', status => 204 });
12:35 Prostetnic TaDa!
12:41 jberger Prostetnic: ah, sorry, if I had realized that that was your problem I would have suggested it
12:42 Prostetnic jberger, probably my fault. If I could properly explain problem then I can probably fix it myself, catch 22.
12:42 jberger :)
12:42 jberger once you mentioned reply->static before I assumed you were good
12:47 neilhwatson joined #mojo
12:54 eseyman joined #mojo
12:56 Dandre jberger: ok so how can I modify my route definition to properly override stash('format') using .format convention?
13:10 sri hahaha https://github.com/Apple-FOSS-Mirror/Libc/blob/2ca2ae74647714acfc18674c3114b1a5d3325d7d/gen/wordexp.c#L192
13:11 marcusr sri: we're still relevant!
13:11 marcusr \o/
13:11 marcusr \o\
13:11 marcusr /o/
13:13 pink_mist so clearly we should rename perl 5 to 'apple word munger'
13:16 romel_ jberger: so is parsing $c->req->url a proper way to retrieve controller/action information?
13:16 marcusr no, that only gives you the url.
13:18 romel_ experiments led me to an understanding that the only way i can retrieve it properly is stash but it gets inflated after dispatch is finished
13:42 amon joined #mojo
14:02 gryphon joined #mojo
14:08 Ptolemarch joined #mojo
14:08 stryx` joined #mojo
14:15 * sri is still considering $c->res->links({url => '/css/foo.css', rel => 'preload'}) and $ua->res->links->[0]{url}
14:16 sri still interested if there are more rest apis using it than github https://developer.github.com/guides/traversing-with-pagination/
14:17 sri (we already knew about riak)
14:18 Lee gocardless? https://developer.gocardless.com/#pagination
14:18 sri and now there is http/2 server push in ghttp2 and h20 https://nghttp2.org/blog/2015/02/10/nghttp2-dot-org-enabled-http2-server-push/
14:19 sri Lee: ah!
14:19 asarch joined #mojo
14:20 Lee IIRC we did this in the optimal payments (netbanx) API before i left too
14:22 sri most apis seem to just put the links into the json though
14:23 Lee yeah, i can't think of anymore where they're in the headers
14:25 marty joined #mojo
14:26 good_news_everyon joined #mojo
14:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NJ5q
14:26 good_news_everyon mojo/master aca57be Sebastian Riedel: fix typo in split_cookie_header example
14:26 good_news_everyon left #mojo
14:28 sri btw. if anyone feels like golfing, i'm still looking for ways to format this nicer https://github.com/kraih/mojo/blob/master/lib/Mojo/Util.pm#L389-L398
14:30 reneeb joined #mojo
14:46 jontaylor joined #mojo
14:54 Ptolemarch joined #mojo
15:06 n2plato joined #mojo
15:18 ignacio_ joined #mojo
15:51 cpan_mojo Mojolicious-Plugin-Recaptcha 0.63 by Dmitrii Konstantinov - http://metacpan.org/release/DMITRYNOD/Mojolicious-Plugin-Recaptcha-0.63
15:54 nicomen sri: use /x with comments?
16:04 sri looks like Packt has not improved one bit in the last few years http://perlhacks.com/2015/02/penetration-testing-perl/
16:05 jontaylor has anyone had any experience wiht mojolicious on a raspberry pi?
16:05 sri i was really interested in that high performance postgresql book... but i don't want to touch a Packt book :S
16:06 sri jontaylor: i've seen multiple people talk about that
16:06 sri nicomen: lets not ;p
16:06 jontaylor I just had a go running the 3 line I love mojolicious example, under CGI, and it takes 8 seconds to complete
16:06 jontaylor which for all I know might be expected start up performance for a pi
16:07 sri sounds about right, think most people use the daemon
16:07 sri (i'm just guessing though)
16:07 jontaylor ok, I will consider that typical for now, thanks :)
16:07 jontaylor it does respond fast (for a pi) in preforking mode
16:08 sri you can try "time perl -e1" and "time perl -Mojo -e1"
16:08 marmez sri: why not use /x with comments?
16:09 sri marmez: i want to golf it down, not expand it ;)
16:09 marmez sri: ah, ok
16:09 sri those regular expressions are short enough to be readable for me
16:09 jontaylor 0.05 for just perl, 7.68 seconds to pull in ojo too :) so sounds right
16:10 sri sounds like file system access is very expensive on a pi
16:10 jontaylor interesting, i’ll give a ramdisk a quick go
16:12 aleksey joined #mojo
16:12 aleksey left #mojo
16:13 Ptolemarch joined #mojo
16:14 odin22 joined #mojo
16:15 btyler the file system on a pi is typically a SD card, so yeah, expensive is the word :)
16:16 btyler *is typically running off a
16:19 sh4 joined #mojo
16:28 good_news_everyon joined #mojo
16:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NUxU
16:28 good_news_everyon mojo/master fa631a9 Sebastian Riedel: mention what an expires value looks like
16:28 good_news_everyon left #mojo
16:34 nicomen sri: maybe a more elegant way would be to use POSIX::strptime ?
16:34 nicomen doh nevermind, it's not in POSIX...
16:37 jontaylor 5.6 seconds running from ramdisk btw, so the SD Card is adding 2 seconds !
16:42 marmez sri: mention what an expires value looks like
16:42 marmez that's definitely better, at least for me :-)
16:46 cpan_mojo Mojolicious-Plugin-ChromeLogger 0.06 by Viktor Tuskyi - http://metacpan.org/release/KOORCHIK/Mojolicious-Plugin-ChromeLogger-0.06
16:47 good_news_everyon joined #mojo
16:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NTLE
16:47 good_news_everyon mojo/master 85abcdb Sebastian Riedel: parse headers a little faster
16:47 good_news_everyon left #mojo
16:48 davido_ joined #mojo
16:48 disputin joined #mojo
17:05 sri this is odd https://travis-ci.org/kraih/mojo/jobs/50227422
17:05 Ptolemarch joined #mojo
17:05 sri i can't replicate that with my own 5.10.1
17:07 * sri restarts the job
17:08 pink_mist jberger: re Galileo: <alpha-> hm they dont have a demo site <alpha-> what a letdown <-- might want to get one up and running :P
17:08 sri wtf
17:08 sri https://travis-ci.org/kraih/mojo/jobs/50227421
17:08 sri now it fails with a different result
17:13 Oleg joined #mojo
17:14 jberger pink_mist: who said that?
17:15 good_news_everyon joined #mojo
17:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NTBE
17:15 good_news_everyon mojo/master 5e2db27 Sebastian Riedel: avoid reusing $1
17:15 good_news_everyon left #mojo
17:15 sri don't trust a web app without a pretty site ;p
17:15 jberger http://galileo-cms.herokuapp.com/
17:16 pink_mist jberger: alpha- ..
17:16 pink_mist oh I see
17:16 jberger who is alpha? where?
17:16 sri argh
17:16 sri https://travis-ci.org/kraih/mojo/jobs/50231772
17:16 sri and another result
17:17 sri can anyone replicate those test results with master?
17:18 pink_mist jberger: someone in #perl on freenode ... he did already find the demo site though :P
17:21 jberger sri: not here
17:21 jberger passes fine
17:21 jberger then again, you are also on OSX, so that isn't surprising I suppose
17:21 purl okay, jberger.
17:21 jberger purl, what?
17:21 purl jberger: no idea
17:21 jberger you are?
17:22 jberger you?
17:22 purl you is what you am
17:22 jberger then again, you?
17:22 good_news_everyon joined #mojo
17:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NTui
17:22 good_news_everyon mojo/master f578fba Sebastian Riedel: parse headers slower again
17:22 good_news_everyon left #mojo
17:22 jberger another worthless bit of information stored :-)
17:23 sri lets see if this one passes -.-
17:24 sri yea, that passes
17:24 Oleg I can replicate. Fail on 5.12.4
17:24 sri this ranks pretty high on the list of perl bugs that confuse the hell out of me
17:25 Oleg And all good after last commit
17:25 sri thanks
17:25 sri must be something that got fixed in 5.14
17:26 jberger any time I get into \G and /gc I always have to go back to HOP and refresh myself
17:26 sri argh... and metacpan is borked just as i want to dig into perldelta
17:26 sri one of those days :)
17:27 jberger I know what will make it better!
17:27 jberger purl: mojoconf?
17:27 purl mojoconf is https://www.youtube.com/watch?v=eWM2joNb9NE
17:27 jberger \o/
17:27 pink_mist then again, you are also on OSX, so that?
17:27 purl okay, pink_mist.
17:27 pink_mist guess not :/
17:28 pink_mist then again, you?
17:28 * pink_mist flaps arms up and down
17:35 sri \o\
17:35 sri /o/
17:35 jberger ~o~
17:37 Grinnz_ purl: TELL US YOUR SECRETS
17:37 purl Grinnz_: huh?
17:39 sri hmm, tons of regex fixes in 5.14
17:39 trone every_param('foo') force a array ref in response? so it's ok to do my @foos = $self->every_param('foo[]') ?
17:39 trone errr...
17:39 purl errr is probably making an irc bot that we are trying to get to work with our asterisk server. I am using Bot::BasicBot::Pluggable to make the bot, what Im wondering is: Is it possible to make an irc bot that can also open a socket and listen for messages on some external port and then handle them though irc... possibly sending users a /msg based on the data we pass to the external port
17:40 trone my @foos = @{ $self->every_param('foo[]') } <-- this
17:40 Grinnz_ trone: that should work yeah
17:40 sri $self->every_param('foo[]')->@*
17:40 sri :)
17:40 trone sri: AH! the new notation!
17:40 Grinnz_ purl: forget errr
17:40 purl Grinnz_: I forgot errr
17:41 Grinnz_ although that was an interesting anecdote, i guess
17:41 trone I'm pretty sure to used my @foos = $self->param('foo') in past
17:41 pink_mist and then there was a security bug because of it
17:41 nicomen is there a use Enligsh equivalent of ->@* for regular humans?
17:41 pink_mist so things changed
17:42 Grinnz_ nicomen: "the list referenced by this array"?
17:42 trone pink_mist: k, thx.
17:42 sri the bug https://groups.google.com/d/msg/mojolicious/aJTYjRCPjOE/QJZB6ORfYJAJ
17:42 nicomen Grinnz_: I mean writing and reading the code itself
17:42 Grinnz_ i dont think so no...
17:42 trone sri: thanks.
17:43 nicomen It's hard to convince people to use perl as it is without, "yeah and we added this other line-noise thing" for postfix-dereferencing...
17:43 sri embrace the line noise
17:43 Grinnz_ i just ignore that syntax for now, everything still works :P
17:43 dod joined #mojo
17:43 trone ahah
17:44 sri nicomen: "@{...}" is better than "...->@*"?
17:44 nicomen Grinnz_: yeah that was my plan too, I like explicit @{ }, I wish double-sigils was an optional syntax error
17:44 nicomen sri: yes
17:44 sri no it isn't
17:44 purl oh yes it is!
17:44 nicomen haha
17:44 Grinnz_ lol
17:44 nicomen <3 purl
17:44 Grinnz_ sri: it makes more positional sense to me i guess
17:44 sri circumfix operators are the worst
17:45 Grinnz_ but it could be just what i'm used to
17:45 sri you want to access nested data structures, left to right makes perfect sense
17:46 nicomen sure postfix is ok, but @* is not really intuitive
17:46 sri instead of left to right with "oh yea, now i've got to wrap all this garbage in ${...} or @{...} or %{...}"
17:46 Grinnz_ sri: yeah for nested it makes sense
17:47 sri nicomen: how many operators are intuitive?
17:47 nicomen most?
17:47 purl STOP SAYING THAT WORD.
17:47 Grinnz_ lol
17:47 sri |= is totally intuitive
17:47 noganex joined #mojo
17:48 sri what the hell does !~ mean?
17:48 nicomen it's !=~
17:48 sri or how is // intuitive?
17:48 nicomen it's a harsher ||
17:48 sri you learn operators
17:48 Grinnz_ yeah theyre not really intuitive
17:48 sri and || is intuitive because?
17:48 sri what real life concept does || relate to?
17:49 Grinnz_ but this is something new to learn
17:49 nicomen because 99-99% of the programming languages in the world has it
17:49 sri by that logic -> is unintuitive too
17:49 nicomen what _is_ the mnemonic of @* anyway?
17:50 sri the . would be the intuitive alternative because most languages use it for deref
17:50 nicomen that's actually true
17:50 nicomen but what would happen if you have an array ref
17:51 nicomen and you suddenly could call a sensical method on it
17:51 nicomen like ->to_array
17:51 ua_ joined #mojo
17:51 sri so you're saying concat with . is unintuitive too
17:52 nicomen oh yes
17:52 sri because most languages use +
17:52 nicomen I already quarreled with larry about it
17:52 nicomen I was sad perl6 continued the + route
17:52 nicomen sorry the opposite
17:52 sri what if your native language is japanese?
17:53 hahainternet i thought the concat in perl6 was now ~
17:53 sri it is
17:53 hahainternet i clearly don't pay enough attention
17:53 hahainternet oh ok
17:53 hahainternet i like tilde for concat, maybe i'm odd
17:54 sri nicomen: intuitive does not mean what you think it means, it is a very relative concept
17:54 sri you mean manybe familiarity for those that already know a few languages or come from western native languages
17:54 * pink_mist hates + for concat
17:55 hahainternet i think it's fair to say // is moderately intuitive when you know || but that's about it
17:55 hahainternet the compound .= or += or ~= type operators should be intuitive
17:55 hahainternet but meh
17:55 nicomen sri: well, perhaps, my point is I guess that making even more special cases is not what the language needs
17:56 sri nicomen: for the recors, i wanted ->@* to be ->list
17:56 sri s/s/d/
17:56 hahainternet ->@* is a thing?
17:56 sri but autoboxing is a whole new can of worms
17:56 pink_mist hahainternet: on recent enough perl, yes
17:56 * hahainternet goes to read
17:57 sri http://perltricks.com/article/68/2014/2/13/Cool-new-Perl-feature--postfix-dereferencing
17:57 * pink_mist thinks the k/v slice syntax is niftier
17:57 hahainternet sri takes 6 seconds to be relevant
17:57 hahainternet sri: you are too fast for people
17:57 hahainternet oh wait
17:57 hahainternet i have heard of this
17:57 hahainternet i'm with you
17:58 Grinnz_ sri: ->list would be nice
17:58 Grinnz_ sri: i think the main problem i have with learning the new syntax is that * means a lot of things
17:59 hahainternet it's the whatever star from p6 isn't it
17:59 hahainternet i mean that's where this appears to be inspired from
17:59 Grinnz_ hahainternet: and my favorite intuitive operator, //= :P
18:00 sri i think it's supposed to look like a nameless array
18:00 hahainternet Grinnz_: not a fan of goatse?
18:00 hahainternet probably best operator =()=
18:00 Grinnz_ hahainternet: that's not technically an operator :P
18:01 hahainternet pff pedanticism
18:01 sri more on the topic http://www.effectiveperlprogramming.com/2014/09/use-postfix-dereferencing/
18:01 hahainternet anyhow sorry i don't want to piss on your discussion
18:01 hahainternet i will shut up and pay attention
18:01 sri postderef slicing is nice
18:01 sri get_hashref()->@{ qw(cat dog) }
18:01 sri try doing that with circumfix deref
18:02 hahainternet i dunno why but i hate quote operators that use ()
18:02 sri i always have to look that up :)
18:02 hahainternet i always have to use //
18:02 hahainternet or ##
18:02 hahainternet just to make it distinctive
18:03 Grinnz_ @{get_hashref}{qw(cat dog)} # do i win?
18:03 Grinnz_ no, i don't because that should have a () on the function
18:03 sri fail
18:03 hahainternet you also don't win because your rihgt hand is now cramped to death
18:04 Grinnz_ how worse than the other way?
18:04 hahainternet extra {}s, i always find them annoying to type
18:04 Grinnz_ -> isnt a whole lot easier
18:05 hahainternet yeah it's not hugely nice
18:05 hahainternet i like perl's visual style of 'this follows'
18:05 hahainternet but i think changing it to the p6 style is probably a good thing
18:07 hahainternet sri: have you seen Inline::Perl5? i'm intrigued as to whether a gradual mojo port is plausible
18:07 hahainternet not that i'm expecting anyone to do it specifically
18:07 hahainternet but it'd be interesting if it would work
18:08 Grinnz_ i think the plan is to wait for a stable perl6 implementation first
18:08 hahainternet oh sure, there's lots sri wants to work on in 5
18:08 hahainternet i'm just intrigued as to whether mojo does anything truly incompatible
18:09 Grinnz_ event loops and forking/signals could be tricky things, who knows
18:09 sri i think a basic fork could be done already
18:09 sri s/fork/port/
18:10 jberger <3 postderef
18:10 sri don't need forking if you have threads
18:10 hahainternet sri: but i wonder if it works outright under Inline::Perl
18:10 jberger <3 hashy slice
18:10 sri and event loops are also less important
18:10 purl okay, sri.
18:10 Grinnz_ lol
18:10 hahainternet i can't think that you particularly use any fancy inheritance, or delegation or anything too complex
18:10 Grinnz_ so perl6 threads are good eh?
18:10 hahainternet mojo is kinda straightforward and perly
18:11 sri you just want an event loop running in a thread to manage all the connections, and do the real work in threads
18:11 hahainternet Grinnz_: it's a rough green threads implementation in rakudo i think
18:11 hahainternet JVM will have a better deal
18:11 hahainternet but actual usable threading yeah
18:11 sri if i had the time i think i'd give it a try now
18:11 ua_ left #mojo
18:12 sri a direct port is not feasible though (i believe)
18:12 hahainternet sri: i'd wait for GLR anyway
18:12 hahainternet sri: oh?
18:12 sri stuff like Mojo::DOM will be easy, but not the web servers and user agent
18:12 sri at least if you're serious
18:13 sri stuff like HTTP::Tiny prolly exists already... but if you want websockets and http/2 things get more complicated
18:13 hahainternet sri: well i'm mostly intrigued by Inline::Perl5 at the moment
18:13 hahainternet the idea that you can have both perl6 and perl5 code in the same file with a minor autoamtic bridge being put in place
18:13 hahainternet is interesting as hell
18:14 Grinnz_ hahainternet: automatic bridges are rarely ever perfect
18:14 hahainternet Grinnz_: exactly, so my question is where does it fall down with Mojo, and can that be avoided easily
18:14 sri if anyone feels like sponsoring a perl6 port, i'm available! :D
18:14 jberger a perl6 that runs perl5 code (as is) and can use perl5 libraries (as they exist on CPAN) is the only thing that will calm the 5/6 cold-war
18:14 hahainternet jberger: that is Inline::Perl5
18:14 hahainternet http://niner.name/talks/Leapfrogging%20the%20bootstrap/Leapfrogging%20the%20bootstrap.pdf
18:14 jberger hahainternet: assuming it works
18:15 hahainternet fosdem talk
18:15 hahainternet gives real examples
18:15 hahainternet worth a read
18:15 hahainternet anyhow sri next time i get some contract work
18:15 hahainternet i'll chat to you about sponsorshi
18:15 hahainternet p
18:15 hahainternet not that i care that strongly about getting mojo on perl6, i'd probably fund you for other stuff if i could right no
18:16 disputin joined #mojo
18:16 Grinnz_ hahainternet: that actually looks interesting
18:17 hahainternet Grinnz_: you ain't kidding
18:20 Grinnz_ haha, "Source Filters", of course
18:20 hahainternet yeah you can't do much else in 5
18:20 hahainternet but it's done intelligently
18:20 hahainternet just replaces everything with 1;
18:20 hahainternet lol
18:20 hahainternet i prefer "Perl 6 rules ok";
18:22 sri i love those boston dynamics robots https://www.youtube.com/watch?v=M8YjvHYbZ9w#!
18:22 sri that guy is gonna regret that kick at some point in the future though :)
18:23 hahainternet they're so adorable
18:23 hahainternet well the new one is cause it looks so cautious
18:23 hahainternet gently tapping along
18:24 Grinnz_ that is pretty awesome
18:24 Grinnz_ the sleigh bells rofl
18:25 hahainternet so my long term plan (5 years) is to build a house in france
18:25 hahainternet and i was going through machinery needed
18:25 hahainternet and i realised a little electric quad bike type arrangement with a small ~1 ton crane on top
18:26 hahainternet would be incredibly useful for doing stuff by myself
18:26 hahainternet at this rate i will simply buy the 'cranedog' from boston dynamics
18:26 hahainternet and it will walk around after me carrying my things
18:26 * sri will wait until he can 3d print a house
18:26 Grinnz_ you wouldn't download a car! (yet)
18:27 hahainternet sri: you can already do it in concrete
18:27 hahainternet but the problem is that to get any sort of strength it needs to inject steel fibres that interlock
18:27 hahainternet and that's yet to happen
18:27 hahainternet won't be long though
18:28 dotandimet joined #mojo
18:46 Ptolemarch joined #mojo
18:50 marmez joined #mojo
19:34 punter joined #mojo
19:37 Ptolemarch joined #mojo
19:59 Grinnz_ batman: i found a fix for that mojo-irc issue i ran into btw if you didnt see
20:01 ZadYree joined #mojo
20:42 batman joined #mojo
20:58 basiliscos joined #mojo
21:07 good_news_everyon joined #mojo
21:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NIaZ
21:07 good_news_everyon mojo/master da8ff04 Sebastian Riedel: better description for split_header function
21:07 good_news_everyon left #mojo
22:03 ignacio_ joined #mojo
22:07 n2plato joined #mojo
22:16 kaare joined #mojo
22:25 good_news_everyon joined #mojo
22:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NLIX
22:25 good_news_everyon mojo/master 79ee42a Sebastian Riedel: handle quoted values separately
22:25 good_news_everyon left #mojo
22:26 Ptolemarch joined #mojo
22:31 jberger sri: going to be giving my mojo talk at MadMongers in a few hours, do you have the latest #sloc/tests handy?
22:32 marcusr hey
22:32 * tempire looks into postgres connection pooling
22:32 sri a wild core team appears
22:33 sri jberger: 8778 lines, 10773 tests
22:33 ua_ joined #mojo
22:33 * marcusr enjoys the android hacker keyboard.
22:34 sri jberger: 91.3% test coverage according to Devel::Cover (but it doesn't count the forking stuff... so closer to 93-95%)
22:35 marcusr sjn: alivw
22:35 jberger crab! we need crab! and batman, WHERE IS BATMAN!!!
22:36 sri crab is somewhere in the mountains, becoming a yeti i believe
22:37 marcusr sjn: tried finding last years mojoconf docs, but forgot wherw.
22:37 marcusr crab was here this morning. co
22:38 jberger marcusr: sjn isn't in the room btw
22:38 al joined #mojo
22:38 jberger was 8815 lines and 10670 tests only a month ago
22:38 jberger sri++
22:38 sri :o
22:39 marcusr how inconvenient.
22:39 marcusr thanks joel
22:41 al joined #mojo
22:41 absolut_todd joined #mojo
22:45 ua_ left #mojo
22:59 jberger sri / all: is there a new buzzword to replace "web scale"?
22:59 jberger http://localhost:7007/index.html#/4/1
23:00 chansen driven -> marcus -> marcusr, whats next? ;)
23:00 * chansen s/driven/draven/
23:01 Ptolemarch joined #mojo
23:01 jberger maybe driven?
23:09 sri jberger: localhost? :)
23:09 jberger is that for "web scale" or marcusr's new nick?
23:10 sri http://irclog.perlgeek.de/mojo/2015-02-10#i_10094655
23:11 jberger ooooooh
23:12 jberger http://jberger.github.io/MojoliciousIntroduction/#/4/1
23:12 jberger I still think
23:12 jberger marcusr -> localhost
23:12 Grinnz_ lol
23:12 sri frontpage says "...perfect for building highly scalable web services."
23:12 jberger good enough for me
23:14 jberger updated
23:16 sri btw. catalyst core has 7687 lines of code now :D
23:16 sri just core, without any deps at all
23:19 jberger https://widgets.stratopan.com/wheel?q=Mojolicious-5.77&amp;fs=1
23:19 alnewkirk joined #mojo
23:19 jberger vs
23:19 jberger https://widgets.stratopan.com/wheel?q=Catalyst-Runtime-5.90082&amp;fs=1
23:20 Grinnz_ hahaha
23:20 sri wow, lol
23:20 Grinnz_ that is an impressive tree
23:20 Grinnz_ runtime only is still pretty good
23:20 sri it is beautiful
23:20 * jberger stares
23:21 Grinnz_ i'm curious, has anyone made a moo fork of catalyst
23:23 Grinnz_ i found a better one: https://widgets.stratopan.com/wheel?q=Dist-Zilla&amp;fs=1
23:24 Grinnz_ these really make me appreciate the highlight effect when you move your mouse over each name
23:26 jberger no, marcusr still wins
23:26 jberger https://widgets.stratopan.com/wheel?q=MojoMojo&amp;fs=1
23:26 Grinnz_ dear god what is that
23:26 jberger note: don't click on that with a low-powered box
23:26 Grinnz_ other than killing this poor celeron
23:27 jberger that is this: http://mojomojo.org/
23:27 Grinnz_ dependency on catalyst, aha
23:29 jberger and DBIx::Class
23:29 purl DBIx::Class is a resultset-driven ORM with a Class::DBI compatiblity or http://lists.scsys.co.uk/mailman/listinfo/dbix-class or see 'dbic repo' or http://dbix-class.shadowcatsystems.co.uk/ or discussed on #dbix-class or a bit like handing an automatic rifle to a squirrel. or ilmari's mro orm or known to be slow at startup
23:30 jberger Galileo's tree is rather large purely because of dbic
23:30 Grinnz_ mmm
23:33 jberger ok here I go
23:40 Anon021 joined #mojo
23:46 tempire I'm confused. The max_connections for Mojo::Pg is set to 2, however, when I try to push 100 queries through, it starts giving me errors @ around 100 - the max_connections setting for the postgres daemon.
23:47 tempire "FATAL:  remaining connection slots are reserved for non-replication superuser connections"
23:47 tempire I was assuming it would just queue up queries; I guess my assumption is incorrect.
23:49 csson joined #mojo
23:52 Averna joined #mojo

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