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

IRC log for #mojo, 2015-04-08

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

All times shown according to UTC.

Time Nick Message
00:03 Grinnz using my calc function not eval, but perhaps i can work with that
00:17 _dave_ At the risk of angst from you guys, there's one part of that russian page I do agree with. The documentation is great with examples, but lacks some exacting documentation on methods and their exact arguments.
00:18 mattastrophe joined #mojo
00:18 _dave_ For example, I'm trying to add the httponly flag to a cookie written inside a controller. I'm having to read the source to find out how to do this.
00:19 Grinnz https://metacpan.org/pod/Mojo::Cookie::Response#httponly ?
00:19 sri _dave_: this is the part where is ask for specific documentation conventions that would make it easier
00:19 sri and examples of modules that implement those conventions
00:20 jberger cookie written outside of a controller?
00:20 _dave_ Grimz: inside a controller method $c->cookie(foo => bar, { httponly => 1}) ?
00:20 sri ironically, $bool is the closest we've come to dcumenting actual argument types
00:20 jberger oh sorry I misread
00:21 Grinnz _dave_, if you're creating a new cookie, i think so
00:21 _dave_ sri: I do enjoy reading your code.
00:22 Grinnz maybe https://metacpan.org/pod/Mojolicious::Controller#cookie needs a link to Mojo::Cookie::Response
00:22 _dave_ I bet Sri's first language was APL...like me :D
00:22 _dave_ the semantics are different if you are creating a cookie from an object vs using the controller method
00:22 Grinnz right, because the first is a method on the controller class
00:22 Grinnz or the latter
00:22 purl i think the latter is better
00:23 Grinnz lol
00:23 _dave_ purl, what are you?
00:23 purl I am a (modified) flooterbuck infobot, and my owner is hachi.  Download source at http://flooterbuck.sourceforge.net/ or edenc's bitch or espertinho or bugado or stupid. or the mongodb of irc bots or Nuclear Biological Chemical or a big metal dummy. or he mongodb of irc bots or a big fat liar
00:23 _dave_ omg lol
00:23 Grinnz rofl the mongodb of irc bots
00:24 Grinnz so with that source filter... how do i turn the current source code into a quoted string to pass to calc?
00:24 * Grinnz preponderates
00:25 _dave_ anyway...sri has a talent for writing very compact perl...I'd suggest someone other than sri try to enumerate every method and it's possible arguments in your documentation. (I realize that's probably a lot of work)
00:25 Grinnz _dave_, i thinkt he best solution to that is to send pull requests as you come across parts that are lacking
00:26 jberger agreed, I think the docs are very good
00:26 Grinnz unless you are thinking a large paradigm shift, that would have to have more discussion
00:26 jberger prs > vague comments
00:26 _dave_ I see. I'm not really sure what to do yet. :) I do know this is my biggest frustration with Mojo atm, it takes 10 min to figure out how to do something the first time you do it.
00:27 Grinnz that might be the problem, once you know how to do it, you understand the docs too well to fix them
00:27 Grinnz ;)
00:27 _dave_ I understand vague comments suck
00:27 _dave_ YES! Ding!
00:27 good_news_everyon joined #mojo
00:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veK0a
00:27 good_news_everyon mojo/master eaedce5 Sebastian Riedel: show how to create a secure cookie
00:27 good_news_everyon left #mojo
00:28 _dave_ now that's awesome...insta-changes
00:29 _dave_ Every single thing I've pointed out has resulted in a positive change in the documentation
00:29 _dave_ and within minutes
00:29 sri the thing about documenting arguments is that there needs to be rules if we do it, for consistency
00:29 * sri wants consistency
00:30 sri without establishing those, patches are likely to be rejected actually
00:30 _dave_ I agree, but why is that a problem?
00:30 sri do you have rules?
00:30 _dave_ Loaded question, I'm 10 sigmas off the mean. :)
00:30 sri what cpan module out there does?
00:30 sri that is the problem
00:31 _dave_ I see
00:31 mattastrophe joined #mojo
00:32 Grinnz this probably won't convince sri, but the authors that ive seen most consistently document arguments are leonerd and mlehmann
00:32 _dave_ Well, to be honest, I wouldn't necessarily contribute more than small small patches to Mojo...I can't emulate your coding style
00:32 _dave_ I'm much more wordy and I've lost my APL roots. You'd hate my code.
00:33 sri i clean up almost all contributions, that's no big deal
00:33 _dave_ What I can say is: Come up with your own rules. :) You came up with the toolkit, so rules should be a slam-dunk
00:34 sri i do like how some js projects document arguments and return values http://emberjs.com/api/classes/Ember.Application.html#method_cacheFor
00:35 sri it's easier if all your values have classes
00:35 _dave_ lol
00:36 zivester joined #mojo
00:36 _dave_ well, you -could- do that...*ducks*
00:38 sri i suppose you could make up a table of names for different types of scalar values
00:38 _dave_ you can bless scalar references
00:38 _dave_ attach a documentation object to them so you can call wtf() on every reference
00:39 Grinnz lol
00:39 _dave_ btw...cause you don't know me...I'm kidding with the above two sentences
00:39 Grinnz yeah that wouldn't slow things down at -all-
00:40 sri no parmateter docs here https://metacpan.org/pod/IO::Async::Loop#loop-await-future
00:41 sri i would at least use $loop->await(Future->new) or so
00:42 Grinnz sri, but you don't always pass a new future
00:42 sri ...
00:42 Grinnz the intention is to document what to pass, not the default
00:42 sri anyway, this is why! ;p
00:43 sri make good rules and i'll gladly apply them
00:43 Grinnz thats indeed the hard part
00:50 Averna joined #mojo
00:56 sri OMG, tabs won against spaces... WTF?! http://stackoverflow.com/research/developer-survey-2015
00:57 sri (╯°□°)╯︵ ┻━┻
00:57 Adurah Less bytes.
00:59 Grinnz :D
01:00 Grinnz at least git has a commanding lead as it should!
01:01 sri perl is not even the most dreaded technology
01:01 sri fear us!
01:01 Grinnz heh
01:08 jberger I hope all those tabs people find python
01:08 jberger BWAHAHAHAHAHA
01:10 jberger atom penetration is lower than I expected
01:10 jberger and I'm always shocked at the number of people who develop on windows
01:10 jberger I gues corporate is to blame for that
01:11 sri http://www.quickmeme.com/img/27/279af1e2564b709adc8adb7bf4c2df3605906c143c472dd1df3b0027af5dacb0.jpg
01:11 jberger lol
01:11 jberger ok fine
01:11 jberger I do like this though sri: "Developers increasingly prefer spaces as they gain experience."
01:12 jberger marcus/batman: put down the coffee
01:17 asarch joined #mojo
01:17 genio heh.  I moved from spaces to tabs
01:18 Zoffix joined #mojo
01:19 * jberger throws genio down a well
01:20 genio too many differences of opinions on how many spaces to use.  tabs nullifies that.
01:20 genio "I like 2"  "I like 4"  "I'm completely crazy and like 8"
01:22 preaction if a team can't agree on how many spaces, or at least finally agree that the question is stupid and arguing about it endlessly is for 3-year-olds, i don't think that team will ever produce software
01:22 Zoffix "The average developer is 28.9 years old. He or she was born in April 1986" wow... I'm the average developer!!!
01:23 preaction wow, i'm above average!
01:23 genio true.  but it makes working on multiple projects with different choices on spaces annoying.
01:23 genio I'm old
01:23 preaction genio is above average too!
01:24 _dave_ at least wordpress is in the top three most dreaded
01:24 Zoffix _dave_, there are few places where I did wish for more detailed info, but had I had that extra info in ALL of the docs, they would be massive.
01:24 Zoffix And I had my first mojo site running in fucking hours.
01:24 _dave_ I did too
01:25 Zoffix And I'm yet to finish reading Catalyst's "tutorial"...
01:25 _dave_ However, a second set of more comprehensive docs would be lovely
01:25 Zoffix I think that second set is the Guides
01:25 _dave_ "How do I do X"...scan docs...read code...
01:25 _dave_ every time
01:25 _dave_ well, 80%
01:25 purl 0.8
01:25 _dave_ thank you purl
01:25 purl You're welcome
01:26 sri we need a book
01:26 _dave_ Woo hoo...emacs is in the top 3 :)
01:26 _dave_ bah I read that wrong
01:27 _dave_ Also when they interpreted tabs vs spaces: It's bad form to say "most" when you don't even have > 50% of a category
01:29 _dave_ Actually the guides are great Zuffix; if your purpose is rapid develop and deploy I think the Mojo docs are perfect
01:29 _dave_ If you are being anal like me, it gets more difficult
01:29 Zoffix Zuffix, you hear that!
01:29 Zoffix :D
01:29 preaction züffix!
01:30 _dave_ oops sorry
01:31 _dave_ why do people like python so much?
01:31 Zoffix Ask them.
01:32 Zoffix Isn't it the go-to teaching language in many places?
01:32 _dave_ But I don't know any python devs
01:32 Zoffix People learn it and never bother to try out other languages.
01:32 _dave_ I teach perl when I teach languages :)
01:32 Zoffix :)
01:33 preaction it's ostensibly harder for bad developers to write completely unreadable python, which is patently false
01:33 _dave_ I thought you could write unreadable code in any language?
01:33 preaction python claims to be consistent, which is even falser
01:33 woz joined #mojo
01:34 genio preaction++  # falser.  When things are so bad you have to make up words...
01:35 preaction jberger had to do python for paid work, so he's got better-formed opinions than i. i only wrote python for a failed attempt at a video game company, and i apparently picked all the "wrong" most popular modules to use
01:35 _dave_ now -that- sounds familiar, CPAN likely has that issue too
01:36 preaction python looks better when the code is small, but that kind of cleanliness does not scale
01:36 Zoffix Well, python clearly wins in performance: http://i.imgur.com/MPQlbkg.png
01:36 preaction perl expects you to plug in to the community sooner. python, as far as i am presently aware, does not have a community
01:36 Zoffix And it's WAY more readable: https://github.com/zoffixznet/CodeEval-Solutions/blob/master/67/solution.py
01:36 Zoffix VS the same functionality in perl: https://github.com/zoffixznet/CodeEval-Solutions/blob/master/67/solution.pl
01:36 * Zoffix giggles and goes to bed
01:37 preaction Zoffix: i think you missed a <> in your perl co... oh ffs the -n flag in the shebang?
01:37 Zoffix ;)
01:37 preaction that's the kind of shit that leads to people thinking python is better!
01:37 Zoffix rofl
01:39 jberger like preaction said, I have plenty of qualms with python, and consistency is one of them
01:39 jberger actually my biggest is the syntactic trailing coma
01:39 preaction https://github.com/zoffixznet/CodeEval-Solutions/pull/1 <- pull request sent :p
01:39 jberger comma
01:39 jamesw add -l to the shebang and you can use print instead of say and skip the use 5.010
01:40 preaction but performance is a fun thing to talk about with pythonistas...
01:41 jberger I do miss the "with" keyword
01:42 jberger guard type objects just aren't quite as nice
01:42 preaction didn't you write some POC about a similar thing in Perl?
01:46 jberger probably
01:46 jberger I did a lot of that
01:46 preaction i think we talked about making it a topicalizer
01:46 jberger oh, that's probably when I stopped, topicalizers like that might get worrisome
01:46 Zoffix jamesw++ # good idea :)
01:46 jberger my generator is still fun, for some values of fun
01:46 preaction yeah, i remember my attempt at iterables...
01:47 ilbot2 joined #mojo
01:47 Topic for #mojo is now 🍻 cheers | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
01:55 woz joined #mojo
02:01 jberger backend web dev is among the least satifying jobs?! they need Mojo!!
02:05 _dave_ so...if I define a helper...am I guaranteed that the first argument in a helper subroutine is a controller?
02:06 jberger _dave_: yes
02:06 _dave_ and if I call that helper from the application object?
02:06 jberger a controller is built
02:06 _dave_ ahh...so "stash" is meaningless in that context
02:07 jberger correct, as is any transaction in the built controller
02:07 Grinnz mostly yeah
02:07 _dave_ wait...which controller is built?
02:07 Grinnz a new blank one
02:07 _dave_ ok thanks :)
02:07 jberger that stash is useful if you render_to_string or some such I suppose
02:08 Grinnz difficult use case to come up with
02:09 noganex_ joined #mojo
02:10 jberger app->helper( generate_hello => sub { shift->render_to_string( inline => '<h1>Hello <em>$name</em></h1>', name => shift ) } )
02:10 jberger that uses the stash
02:29 hshong joined #mojo
03:06 powerman joined #mojo
03:10 basic6_ joined #mojo
03:14 powerman sri: I would like to personally apologize for the tone of the message on the mailing list. It wasn't meant to be offensive. I was replying to someone else and doesn't take you in account, my mistake. I'll try to refrain from posting unconstructive critique about mojo.
03:19 inokenty-m1 joined #mojo
03:36 harry left #mojo
03:42 inokenty-m joined #mojo
03:44 inokenty-m1 joined #mojo
03:48 inokenty-m joined #mojo
03:49 irq joined #mojo
03:50 inokenty-m1 joined #mojo
03:52 inokenty-m joined #mojo
03:56 sri powerman: appreciated
04:06 kaare joined #mojo
04:13 inokenty-w joined #mojo
04:47 reneeb joined #mojo
04:47 Oleg joined #mojo
05:00 powerman left #mojo
05:16 absolut_todd joined #mojo
05:20 reneeb joined #mojo
06:03 dod joined #mojo
06:08 dod joined #mojo
06:22 bramirez1 joined #mojo
06:23 harry joined #mojo
06:42 jb360 joined #mojo
06:44 harry left #mojo
06:45 dotandimet joined #mojo
06:47 absolut_todd joined #mojo
06:50 berov joined #mojo
06:54 irq joined #mojo
07:00 bramirez1 joined #mojo
07:12 eseyman joined #mojo
07:19 AndrewIsh joined #mojo
07:35 trone joined #mojo
07:43 riche joined #mojo
07:49 bramirez1 joined #mojo
08:03 Vandal joined #mojo
08:16 absolut_todd joined #mojo
08:19 dotandimet joined #mojo
08:25 woz joined #mojo
08:30 mattastrophe joined #mojo
08:35 gatitskiy joined #mojo
08:56 fhelmber_ joined #mojo
09:07 bramirez1 joined #mojo
09:10 kaare joined #mojo
10:11 mattastrophe joined #mojo
10:23 amon joined #mojo
10:28 punter joined #mojo
10:37 irq_ joined #mojo
10:55 punter joined #mojo
11:06 neilhwatson joined #mojo
11:07 Kripton joined #mojo
11:12 jb360 joined #mojo
11:13 dotan joined #mojo
11:14 kaare joined #mojo
11:37 dp_ joined #mojo
11:45 risugg joined #mojo
11:49 harry joined #mojo
11:56 mattastrophe joined #mojo
12:09 jabberwok joined #mojo
12:28 bramirez1 joined #mojo
13:30 spyou joined #mojo
13:31 spyou hi there. Was wondering, what's the most elegant way to determine if we're running under morbo, hypnotoad or anything else inside an app ? any idea ?
13:34 jberger spyou: there is a mode attribute you can check which might give you a clue
13:35 jberger but usually when people think they need to know what server they are using they are doing something wrong
13:42 asarch joined #mojo
13:43 irq joined #mojo
13:43 batman spyou: there's no official way.
13:45 batman spyou: why do you need to know?
13:55 spyou to have a simple way to use "debug mode" (i'm testing under morbo as it should, at least i think, be :))
13:55 Grinnz spyou, yeah that is usually what the application mode is for
13:56 spyou basicaly, displaying various dumps on the foot of every pages when i'm coding and doesn't display them on production environnement or betatext
13:56 Grinnz morbo defaults to "development" mode and hypnotoad defaults to "production" mode
13:56 Grinnz if ($c->app->mode eq 'development') { ... }
13:56 gryphon joined #mojo
13:56 spyou oooo
13:57 spyou lemme try this :)
13:57 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Tutorial#Mode
14:01 risugg joined #mojo
14:02 zivester joined #mojo
14:02 spyou Grinnz, thanks :)
14:04 spyou sri : indeed. i got a nasty habit to search google for my problems and mojo doesn't return that much results (probably because the documentation is well written and that i really should read it all :))
14:09 ladnaV joined #mojo
14:15 Grinnz google is good for a lot of things, but not perl docs
14:18 sri did i miss something here? issue is very hard to understand... https://github.com/kraih/mojo/issues/780
14:20 nicomen Grinnz: try duck duck go
14:24 Grinnz nicomen, doesnt really help; the problem is the preponderance of bad perl code and advice
14:24 Grinnz from 1995
14:25 * jabberwok whispers "Matt's Script Archive" eeeeeee
14:25 nicomen make more good perl code online then ;)
14:26 genio lots of people are putting out really good content via blogs and such.  The problem is that there was so much bad Perl for so long put out there.
14:27 mst jabberwok: I used to be ISP ops
14:28 mst jabberwok: ARGH ARGH FormMail.PL ARGH
14:29 jabberwok *nod* mst.  i had a client with an über-modified webboard.pl who just couldn't understand that using the filesystem as a message database was a horrid idea, but they had budgeted about $50 annually for "web stuff"
14:30 jabberwok me, before jettisoning them last year: "We need to change this" (thinking, transition to a mojo style solution) them: "But you can't! it's the only thing that works on WebTV!"
14:32 absolut_todd joined #mojo
14:33 mst LOL
14:34 jberger :o
14:35 Onigiri What's a webtv
14:35 purl i think a webtv is really weird.
14:35 Grinnz rofl webtv
14:39 jabberwok if i want a route that has zero or more extra sublevels... sort of like: »$r->get('/page/:sub1/:sub2/:sub3/...')« I suppose i can use a regex and capture that all as one term but ... would it be useful to have something like: »$r->get('/page/@sub')« which as an array placeholder...?
14:44 nicomen my @sub = split m{/}, $self->req->uri->query; # or use a placeholder that swallows the rest and split on that
14:45 mst that's ... not the query?
14:49 nicomen mst: the query of the uri prameter of the request that belongs to the controller, I would expect is the full query, not a random part of the route matching
14:49 mst what
14:50 mst I'd've expected query to be ... query params
14:50 nicomen ah sorry
14:50 mst are you seriously re-using that term to refer to part of the path?
14:50 nicomen ->request
14:50 nicomen argh
14:50 * nicomen shoots himself
14:50 nicomen ->path
14:50 mst that sounds more like it.
14:51 nicomen my point was, forget regexp
14:51 jabberwok This is for static content (like WordPress pages) to be integrated into the site structure.
14:53 Grinnz_ jabberwok: wordpress pages are not static content.
14:54 jabberwok true, they come from a database.  ... perhaps there is a better way to serve the hierarchical text parts of a site, where each 'page' is embedded into a mojo template? i haven't found anything quite right in cpan.
14:55 nicomen $ perl -Mojo -lE 'a("/page/(*stuff)" => sub { my $c = shift; $c->render( text => join ", ", (split "/", $c->stash("stuff") ) ) })->start' get /page/foo/bar/baz
14:55 nicomen foo, bar, baz
14:55 sri hmmmm
14:55 sri i guess an open event actually makes sense server side :o
14:56 sri https://gist.github.com/anonymous/e199d5304349d7d91b41
14:57 sri the cookbook recipe is not quite correct
14:58 jabberwok cheers nicomen
14:58 jabberwok although that circumvents the automatic format selection, doesn't it.
14:58 sri if nobody cares i think i'll drop it though
15:00 mst nicomen: yeah, that makes total sense
15:00 mst I was just querying your saying ->query (pun not intended :)
15:01 Grinnz_ sri: i agree an open event would make sense
15:02 Grinnz_ sri: as this brings to light that it's not fully "open" when the action is run
15:04 nicomen mst: yeah sorry, I don't know what happened
15:05 mst nicomen: insufficient caffeine error :)
15:05 nicomen only one cup today, so could be
15:07 disputin joined #mojo
15:08 punter joined #mojo
15:09 sri marcusr, batman, tempire, jberger, crab: thoughts?
15:10 jberger just adding a new event?
15:10 sri and how
15:12 sri it would be a server-side event only, it makes no sense client-side
15:12 batman sri: is this related to #780 ? if so, i haven't run into anything similar.
15:13 sri http://irclog.perlgeek.de/mojo/2015-04-08#i_10409561
15:15 sri and then there's also the naming question
15:15 sri open/finish
15:15 batman i think i would rather make it so $c->finish would close the socket, even if not fully open.
15:15 batman as an end user: why do i care if it's handshake or open state?
15:15 sri that makes no sense at all
15:16 batman what doesn't?
15:16 sri what you just said
15:16 sri we are in the middle of an http request
15:17 inokenty-m joined #mojo
15:17 batman then i cannot comment, since i don't understand. (i thought i did)
15:17 meshl joined #mojo
15:17 sri you can send anything as a response to a websocket handshake, even a long-poll stream, in which case ->finish would be used to end it
15:18 sri there is a HUUUUUUGE diffrence if we are still in an http or already in a websocket context
15:19 batman then why doesn't $c->finish end the connection right away, instead of after 15 seconds in the browser?
15:19 sri in fact, a failed websocket handshake can live on as a normal http keep alive connection just fine
15:22 sri not sure why i have to defend this in the first place
15:22 sri it's not like i care a lot
15:23 sri not sure what's the right thing to do, so i'll drop it
15:23 sri anyone who cares can make a proposal and defend it themselves
15:24 jberger sri: I don't understand it, clearly, so I'm not going to fight one way or the other
15:25 jberger hey, good news though, my mojoification of our internal site at $work just went live today \o/
15:26 Onigiri So morbo, is it single request at a time in dev mode?
15:30 lb what does single request at a time mean - there's only one process, and it isn't threaded
15:31 Onigiri gotcha.
15:32 Onigiri I'm trying to kick off longer running stuff, say 15-25 seconds.  Just wondering why this random middleware somebody else wrote is freaking out.
15:32 sri it's not good that we have no core devs that understand the websocket lifecycle :/
15:32 lb you pretty much never want to do that in a limited resource like web workers
15:33 lb unless you really have to, of course ;)
15:34 Onigiri lb: basically the perl/postgresql group was "taking too long" and phb decided to get the .net team to write the web front end. So there's so much bs mash of tech here.
15:34 lb lovely
15:34 * lb converted/upgraded a .net web frontend to catalyst a couple of years ago
15:35 jberger sri: my head is only 10% here atm
15:37 d4rkie joined #mojo
15:39 jberger sri: is there something I can read?
15:39 jberger over lunch maybe
15:43 mustardrat I have a question:  Does Mojolicious have a function for generated a time/date string which is localized based on the timezone of the client web browser?
15:43 mustardrat "generating" sorry
15:44 Grinnz_ mustardrat: no, let the javascript do that
15:44 mustardrat Ah OK
15:44 Grinnz_ mustardrat: the web server does not know the client's time zone
15:44 Grinnz_ (unless you have the user set it in your preferences for an user or something, of course)
15:45 mustardrat Yes that makes sense..  Thanks.
16:00 sri this also reminds me that i wanted to make rules for our voting process
16:00 sri participation has not been great recently
16:00 inokenty-m1 joined #mojo
16:01 jberger sri: if I may say, part of the problem is the snap-nature of the elections
16:01 jberger should voting be open a little longer?
16:03 sri something like, votes happen in github issues labeled with "vote in progress", votes are collected for 2 weeks, everyone can vote and voice their opinion, but only core team votes are counted in the end, core team members who don't vote 3 times in a row are out, new core team members may only be nominated if they have participated in the last 3 votes
16:05 jberger sri: note: check queries
16:06 jberger I think 2 weeks might be unnecessarily long, I think it might prevent us from calling votes when we don't want to wait that long
16:06 jberger then again, I think ousting might be a bit much
16:06 jberger I see your point though, less indifference
16:07 sri marcusr, tempire, batman, crab: opinions?
16:08 sri "votes are collected for up to 2 weeks" maybe, no need to wait if everyone already voted
16:11 jberger yeah
16:11 sri it would be nice to see from regular vote participation who actually wants to be on the core team in the future
16:11 jberger maybe official votes should get a more official channel? like an mailing list thread?
16:12 jberger not sure I like that, but maybe some people don't keep up to date on IRC
16:12 sri i think github would be best
16:12 jberger yeah
16:12 jberger so pull requests
16:30 sh4 joined #mojo
16:31 punter_ joined #mojo
16:32 sh4 joined #mojo
16:33 Oleg joined #mojo
16:36 tempire 2 weeks is ok with me
16:36 tempire Though I think there should be a warning before ousting
16:36 tempire 'cause sometimes a person is inundated with life
16:36 * tempire points at himself
16:37 tempire and yeah, votes on github
16:37 Mikey is there an easy way to grab the template the renderer is currently rendering from within a helper
16:38 tempire Mikey: you generally don't specify the template until after you've called all the helpers
16:39 Mikey what if im calling a helper from within a template?
16:39 Mikey i could do a before_render i suppose
16:39 good_news_everyon joined #mojo
16:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ve1ue
16:39 good_news_everyon mojo/master 04f92e7 Sebastian Riedel: improve finish method in Mojolicious::Controller to work before the WebSocket connection has actually been established
16:39 good_news_everyon left #mojo
16:40 Mikey but i definitely don't want to do that work for all requests
16:40 sri batman: finish did not actually work for the http response of a websocket handshake
16:40 sri it just did nothing
16:41 sri now... if it should establish the connection to finish it right away... or be usable for a streaming response... i don't know
16:42 Mikey to clarify what i'm doing, i'm implementing a SAML2 IdP provider and i need to sign XML for that.. so i saw a clever opportunity to just allow myself to include a call to <%== $c->saml2->signature_for($id) %>, and it re-renders the template without the sig, does the sha digest, generates the signed info XML, signs that xml, and interpolates right into the XML template
16:42 Mikey but it might be too clever.. i might be better off generating the XML and then signing it
16:43 Mikey though i /am/ feeling pretty clever.  i might dig around and see if i can't pull this info out of the internals somehow
16:44 spyou joined #mojo
16:44 sri you want to sign a block of xml inside an xml template?
16:45 Mikey yeah... enveloped signature
16:45 Mikey so the helper renders what is currently being rendered and returns the signature
16:45 Mikey ideally
16:45 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-helpers
16:45 Mikey so the outer call just interpolates the signature
16:45 sri the trim_newline helper
16:46 Mikey ahh very nice
16:47 Mikey thank you this is just what i was looking for, and believe it or not I remember reading this already, which i am assuming is why i started down my hair brained path to begin with haha now that i am finally to the point of implementing signatures i forgot it of course
16:47 Mikey thank you sri
16:54 jb360 joined #mojo
16:54 Mikey hmm this might not work as it is, as the point i want to include the data at is inside a tag that needs to be included for my digest/signature
16:54 Mikey if it wasn't enveloped sigs tho this would be perfect
17:20 berov joined #mojo
17:21 good_news_everyon joined #mojo
17:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ve15s
17:21 good_news_everyon mojo/master 2b6dabd Sebastian Riedel: just document the current behavior
17:21 good_news_everyon left #mojo
17:23 sri right or wrong i don't really care
17:23 sri it's just how it used to work
17:24 trone joined #mojo
17:25 sri the author of #780 totally has a point, but i can't communicate with him https://github.com/kraih/mojo/issues/780
17:25 sri maybe someone else wants to pick it up
17:27 sri for the record, adding a simple $self->render(101) to ->send and ->finish would make everything work the way he expected, but cost a lot of performance
17:29 sri someone should work out the correct behavior, what we have right now cannot be it
17:29 genio https://groups.google.com/forum/#!topic/mojolicious/1SsRmG0SOoU  is his overuse of shift what's killing him?
17:30 sri because you can neither call ->finish during the handshake, nor send a streaming response with ->finish
17:30 sri no, he never actually accepts the handshake
17:31 sri only ->on() will automatically call ->rendered(101)
17:31 gryphon joined #mojo
17:31 sri a websocket handshake is http!
17:31 genio oh, oops.  nevermind what I said.  I got my eyes crossed up
17:31 sri you have to send a 101 response to accept it
17:33 sri jberger, batman, marcusr, crab: one of you should maybe pick it up
17:35 d4rkie joined #mojo
17:49 spyou joined #mojo
17:51 Grinnz_ sri: i'm not sure the right thing to do either, but with those examples it is a lot clearer what's going on
17:52 good_news_everyon joined #mojo
17:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veMJQ
17:52 good_news_everyon mojo/master eb71ecd Sebastian Riedel: the send method does not automatically respond with a 101 status
17:52 good_news_everyon left #mojo
18:01 sri things would be a lot easier if ->finish was not shared by websockets and streaming responses
18:08 good_news_everyon joined #mojo
18:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veMmd
18:08 good_news_everyon mojo/master 3bc22f3 Sebastian Riedel: actually show the response
18:08 good_news_everyon left #mojo
18:09 ribasushi joined #mojo
18:09 Grinnz_ hmm
18:14 irq joined #mojo
18:15 hummeleBop joined #mojo
18:17 dod joined #mojo
18:19 absolut_todd joined #mojo
18:22 punter joined #mojo
18:26 dotandimet joined #mojo
18:31 mustardrat joined #mojo
18:33 Grinnz_ i started using legit delay (helper)s for some API calls in my mojo app, instead of fork calls... so smooth
18:34 Grinnz_ i might try Mojo::mysql soon so i can do that for some db calls...
18:47 Oleg Just created ticket for this: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/PODRenderer.pm#L49 . Don't understand why Pod::Simple doesn't remove this whitespaces
18:47 Oleg https://rt.cpan.org/Ticket/Display.html?id=103389
18:53 dotandimet joined #mojo
19:20 kaare joined #mojo
19:25 _dave_ hmm Tokutek claims to have a mongodb that has full ACID compliance...wonder how real that is
19:27 meshl joined #mojo
19:31 punter joined #mojo
19:33 sri _dave_: the storage engine, not api
19:33 sri mongodb will prolly never get distributed transactions right
19:33 _dave_ there's a distinction? O.o
19:33 sri ever heard of mongos?
19:34 _dave_ the thing about mongodb is .. I like storing hash references :)
19:34 _dave_ no
19:34 d4rkie joined #mojo
19:34 sri http://docs.mongodb.org/manual/core/sharding-introduction/
19:35 _dave_ yeah I'm reading this atm ...
19:36 Grinnz_ sri: do mojo hooks use eventemitter?
19:36 _dave_ so to get your data, you first have to know which shard it's on?
19:36 sri i like storing hash references too, and do just that with postgresql
19:36 _dave_ er it's sql...hashes have to get translated into tables and schemas
19:36 sri Grinnz_: yes
19:36 _dave_ oh my
19:37 Grinnz_ ahh
19:37 Grinnz_ my irc bot has a similar hook concept, i was thinking it should be eventemitter
19:37 sri no, postgresql has native json support
19:37 _dave_ it does? I'm pretty clueless about postgres...most of my clients use mysql sadly
19:37 _dave_ I use mongodb personally but not in a live context
19:38 mst yes, postgres with json columns is what you use if you like storing hashrefs but also don't want your data randomly vanishing
19:38 Grinnz_ heh
19:38 sri say $db->query('select ?::json as foo', {json => {bar => 'baz'}})->expand->hash->{foo}{bar};
19:38 sri that is one of the Mojo::Pg examples
19:38 mst mongodb is lovely for ad-hoc data that fits in memory that you don't care if you lose
19:38 Grinnz_ as long as you're using a new enough postgres; but if you aren't using a new enough postgres, upgrade!
19:38 _dave_ I've not noticed random vanishing yet
19:38 gatitskiy joined #mojo
19:39 _dave_ but I'm the only one using my mongodb installation
19:39 Onigiri sri: dang you, I almost blocked pg's json out of my mind
19:39 mst emphasis on the 'yet'
19:39 sri _dave_: http://www.postgresql.org/docs/9.4/static/datatype-json.html
19:39 _dave_ nice!
19:39 Onigiri Man, I so want to upgrade to 9.4 to get the improved materialized views :/
19:40 * Grinnz_ is still considering setting up redis next to mysql for some nosql-like data
19:40 sri i liked the mongodb api enough to write a pure perl client for it... but have since grown to hate everything about it
19:40 Onigiri Too bad I had to rush this machine into production ~_~
19:40 _dave_ mst: what case did you find mongo to be unreliable, if I may ask?
19:41 Grinnz_ _dave_: more than just unreliability, iirc
19:41 mst _dave_: it's somewhat less mature than mysql 3
19:41 _dave_ lol
19:41 Grinnz_ https://groups.google.com/forum/#!searchin/mojolicious/mango/mojolicious/GFsXFQF3t-k/Tchin2EhJqgJ
19:42 mst _dave_: the point isn't any specific case, it's that there are lots of sharp edges and if you trigger one then you risk losing data
19:42 mst _dave_: whereas with postgres usually when you do something stupid it either slows down or throws an exception rather than eating things
19:42 sri _dave_: to give you an idea, two years ago i wanted to build a real-time chat with mongodb tailable cursors... but there was a bug that makes them unusable... that bug still exists today
19:43 sri every conenction eats like 10% cpu... mongodb was just spinning and spinning
19:43 sri that kinda garbage
19:43 _dave_ hm, I remember the tailable cursor issue vaguely...I dropped the idea too
19:44 sri it's not just unreliable, a lot of it was very very badly designed
19:44 ajr_ joined #mojo
19:45 _dave_ well the json support in pg is enough to get me to start trying to use it
19:45 _dave_ I'm just sick of SQL in general
19:45 mattastrophe joined #mojo
19:45 sri in the wire protocol you've got requests and responses, both have ids, to allow multiplexing... then they add options on top (exhaust) that just send responses you never asked for making multiplexing impossible
19:46 sri bad design from the ground up
19:47 mst _dave_: once you use postgres for a while you realise that most of what you thought was "sick of SQL" is actually "sick of the stupid contortions required because mysql is bad at SQL"
19:47 sri and if you compare that to postgresql... where the mvcc implementation makes even the most hardcore database geeks swoon...
19:48 mst yeah, postgres takes longer to get big features but that's because they obsess over getting them right
19:48 _dave_ mongodb sitting at 634 gigs VSZ atm
19:49 sri i'm not an sql fan at all... but i don't hate looking at this https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm
19:49 mst I'm not claiming SQL is wonderful, only that people replacing it tend to achieve '2 steps forward, 73 steps back'
19:50 Grinnz_ pg does make a lot of sql generation easy, in that you don't actually have to generate sql
19:50 sri some postgresql-isms take a little getting used to, like the funky operators (hello @@, @>...) or type annotations (::json), but it's rather pleasant to use
19:50 _dave_ yeah I just want to store hash references as documents...mongodb IMO got that part correct
19:50 _dave_ it's probably not unique to mongo tho
19:51 _dave_ but that's some odd SQL ... "extract()"?
19:52 sri oh yea, and my favorite... the mongodb query planner still can't use more than two indexes
19:52 Onigiri There are other ways to get at that data, date_part() for example
19:52 _dave_ sri: lol ... indeed!
19:52 mst sri: I'm pretty sure the mysql planner can still only ever use one index per table
19:52 Onigiri Just, extract's are pretty clear what they're doing.
19:52 sri that was actually a headline feature in a recent release "now you get two instead one index!"
19:53 sri i'm not going to argue that postgresql is nicer for basic crud... but once you touch the aggregation pipeline...
19:53 sri (in mongodb)
19:55 _dave_ I don't get so fancy to use aggregation
19:55 _dave_ I'm not one to put cpu load on a database unless I've no choice
19:55 _dave_ all I want is the data to be stored and retreived, like so much RAM
19:55 Onigiri _dave_: and I'm one to put massive load on the db. Heh
19:55 _dave_ heh
19:55 Onigiri So much plperl crammed in there.
19:56 _dave_ pretty much 75% of every web site company's speed issue is some uber query
19:56 _dave_ at least in my experience
19:56 _dave_ "Ooo stored procedures in mysql! Now PHP doesn't have to do that"
19:56 Onigiri Bet you'd think I was crazy if I showed you the on demand soap calls when selecting from a function. >_>
19:56 _dave_ The standard of "crazy" is an illusion to me, so no :)
19:57 * sri barely uses any stored procedures
19:57 _dave_ sri: I bet you hate Moose :)
19:58 sri trigger for real-time notifications on inserts and stuff are cool though
19:58 Grinnz_ mst: mysql "technically" has index merge as a plan type, but i have yet to see it used
19:58 sri _dave_: that's right, postgresql has pretty good pub/sub support
19:58 sri https://github.com/kraih/mojo-pg/blob/master/examples/chat.pl
19:59 sri that's a full chat server with postgresql backend
19:59 _dave_ That example is neat
19:59 _dave_ No channels or slash commands tho ;)
19:59 Grinnz_ i hate stored procedures, it's such a hassle to maintain in a project dependent on source control
19:59 mst given sufficiently automated migrations it's not that bad
19:59 sri gotta put them in migrations
19:59 _dave_ I've seen stored procedures cost companies many many dollars
19:59 mst but it's still a trade-off
19:59 Grinnz_ "why is this query doing something weird? oh it's using this stored procedure. what does that stored procedure do? who the fuck knows"
19:59 sri yea, i wouldn't overuse them
20:00 mst _dave_: I've also seen stored procedures save companies many many dollars
20:00 _dave_ Actually the fun gig was when no one knew there were stored procedures being used in their applications
20:00 mst _dave_: it's a big hammer, but it's perfectly possible to use it usefully
20:00 _dave_ Sure, it's a tool
20:00 _dave_ You have to know when to use it and when not to
20:00 Grinnz_ the only time it's been useful for me is for insert/update triggers
20:00 Grinnz_ which is another annoyance
20:00 mst and in database centric organisations, most of the stored procedures were definitely generated by a tool
20:01 Onigiri So Mojo::Pg transactions... I've got a prebuilt function that calls ->begin_work on a passed in dbh.  Do I have to do something more then a db->begin/commit around calling the function?
20:01 _dave_ A tool as in some SDK or as in some aberrant geek?
20:01 mst ThatWasTheJoke(tm)
20:01 Onigiri Mainly wondering if I need to teach the function about mojo::pg, even though it's not always going to be run this way.
20:01 _dave_ ah :)
20:02 sri Onigiri: http://mojolicio.us/perldoc/Mojo/Pg/Database#begin
20:03 sri it uses transaction scope guards, which work pretty well for non-blocking queries
20:03 Onigiri sri: yeah, I'm looking at that.
20:03 Onigiri I've already got a large object I can't really touch that does transactional junk itself already.
20:04 sri that's not gonna fit into Mojo::Pg
20:04 Onigiri I can't really remove the dbh->begin_work from the object.
20:04 sri Mojo::Pg is pretty opinionated
20:04 Onigiri Would it cause issues if I use the same dbh for it?
20:04 Grinnz_ yeah, you can't ever nest transactions
20:04 Grinnz_ thats a problem ive run into myself, only one layer of the code can be doing transaction stuff
20:05 mst savepoints nest
20:05 mst $schema->svp_do ftw if you want that
20:08 Grinnz_ for that reason i tend to leave the transactions to the highest level
20:08 sri why are you having multiple layers anyway?
20:08 Grinnz_ modularity :P
20:08 sri eeep
20:09 Onigiri Me? Cramming old code into this.
20:09 sri eeeeep
20:09 melo joined #mojo
20:09 Onigiri Yes, I've written a schedule creation tool.
20:10 Onigiri Now I need to carve out random chunks from it and expose as apis.... because the ui portion was taken away from my team.
20:11 ajr_ If morbo returns a 404 message, is there any way to find out exactly what it was looking for?
20:12 sri the 404 page should tell you everything
20:12 punter joined #mojo
20:12 Grinnz_ also the debug log will tell you the routes it checked if any
20:12 sri Grinnz_: the log is now also on the 404 page though :)
20:13 Grinnz_ true
20:20 sri _dave_: this is a fun read too regarding data loss with mongodb https://aphyr.com/posts/284-call-me-maybe-mongodb
20:20 _dave_ do any of you use CHI?
20:21 sri _dave_: this too :D http://hackingdistributed.com/2013/01/29/mongo-ft/
20:23 sri second one is not as good as the first though
20:39 woz joined #mojo
20:58 _dave_ good articles there
21:00 _dave_ "brogrammers" ... is this a new memetic?
21:05 Grinnz_ "The problem here is that the thinking has been nullsourced -- there is none taking place"
21:05 Grinnz_ hah
21:11 noganex joined #mojo
21:19 Grinnz_ wtf
21:19 Grinnz_ how do i favorite things on mcpan
21:19 Grinnz_ i ++d a module but it doesnt show up under my favorites
21:19 jberger Grinnz_: are you logged in?
21:19 Grinnz_ yes, and linked to PAUSE
21:19 jberger might be a lag
21:19 Grinnz_ maybe
21:20 Grinnz_ mcpan needs better indexing ;)
21:22 * Grinnz_ <3 real-time indexing with sphinx
21:33 d4rkie joined #mojo
21:38 punter joined #mojo
21:40 sri hmm, i think i have an elegant solution to the websocket problem earlier
21:42 punter_ joined #mojo
21:45 good_news_everyon joined #mojo
21:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veDba
21:45 good_news_everyon mojo/master 9411298 Sebastian Riedel: allow finish and send methods to work like most users would expect
21:45 good_news_everyon left #mojo
21:45 sri it's dwim and fast
21:46 sri one small inconsistency though, it doesn't work on the client side
21:46 mattastrophe joined #mojo
21:46 sri because there you're only dealing with established websockets all the time
21:48 neilhwatson joined #mojo
21:48 punter joined #mojo
21:50 Grinnz_ makes sense
21:51 sri one could add $ws->client_open... and wire it up to Mojo::UserAgent... but it wouldn't serve a purpose
21:52 sri i bet some people will use it wrong
21:53 mattastrophe joined #mojo
21:57 mattastrophe joined #mojo
22:04 sri the new atom theme gets more beautiful with every release http://i.imgur.com/DNaIjgA.png
22:05 Zoffix :S barely a theme
22:06 Zoffix Two icons and a decent font.
22:06 sri it's all in the details
22:08 Grinnz_ subtlety is a part of good design sometimes :P
22:08 Zoffix I'm not saying it doesn't look good. It's just there isn't much to it :)
22:08 * Zoffix prefers light themes: http://i.imgur.com/ZVIFAZy.png
22:09 * Grinnz_ doesnt have a lot of options with gedit and nano
22:10 Grinnz_ i suppose the terminal emulator that nano runs in can be themed pretty well though
22:12 nicomen son atom will end up like nano I guess... http://i.imgur.com/QXbMQPH.png
22:12 nicomen *soon
22:13 Grinnz_ nano's default perl highlighting isn't very great
22:14 nicomen Grinnz_: want a copy?
22:14 Grinnz_ i had a better one at some point but lost it...
22:14 * Zoffix shudders at the thought of coding in nano
22:15 Grinnz_ my only problem with coding in nano is that it's through the crappy terminal emulators we have today
22:15 Zoffix Why don't you use a proper editor?
22:15 Grinnz_ well, i'm not going to forward X from my VPS
22:15 Zoffix sshfs
22:16 Grinnz_ yeah, no.
22:16 purl yeah, no is better than use of this
22:16 Zoffix Why not?
22:16 Grinnz_ i've suffered enough at the hands of editing-files-in-places-that-aren't-where-they-actually-are
22:16 nicomen Zoffix: have you tried sshfs?
22:17 nicomen like in practice?
22:17 Grinnz_ some of my teammates use it, but i couldn't do it
22:17 Grinnz_ luckily, gedit still works here
22:17 Zoffix nicomen, that's what I use at $work to connect to our dev server. The only issue I ever had with it is Geany editor failing to work with it
22:17 nicomen I hate editors locking up waiting for the file to save, or all other stuff that happens when you are working on a mount
22:17 nicomen Zoffix: hm, I've had problems with geany too
22:18 nicomen sad, because it actually is quite nice
22:18 Zoffix Yeah
22:18 Grinnz_ i prefer editing in real time
22:18 nicomen as for nano, it's just there on every box anywhere
22:18 nicomen perl highlighting https://gist.github.com/nicomen/5f3aa2fa17461cbad61c
22:18 Grinnz_ yeah, and if it isnt i make them install it
22:18 Grinnz_ because fuck using vi
22:18 nicomen so setting it up is copying two files
22:18 Zoffix Grinnz_++
22:18 nicomen vi, is just, well I don't have time for it
22:19 nicomen although I could've learnt vi while waiting for emacs loading
22:19 Grinnz_ Image search result: ain't nobody got time for that « - http://colsblog.com/wp-content/uploads/2014/07/notime.jpg(http://colsblog.com/2014/07/30/aint-nobody-got-time-for-that/)
22:20 Grinnz_ 10% of the memory on our dev server is consistently used by one guy's emacs session <_<
22:20 nicomen haha
22:20 Grinnz_ it's a good thing only two people use emacs here
22:21 nicomen oh and on mac, I don't know how many times my collegues have been editing a wrong version of a file that was git pulled but their editors mount-system had cached things
22:22 nicomen but I guess all the hipsters making editors these days have 0 idea about what kind of precautions using remote fs's require...
22:26 Grinnz_ it's a constant battle here, with people git pulling then saving over...
22:26 Grinnz_ luckily i dont work on a lot of the same files as anyone else, but the frontend guys are always having that issue
22:26 nicomen lol, yeah, same here ;)
22:26 Grinnz_ i'm like, if a file changes gedit just tells me, fix your shit
22:27 * Zoffix loves the fact that he's the only dev in the company :)
22:27 Grinnz_ haha, must be nice
22:27 Zoffix Sure is :)
22:35 jberger why not vim?
22:35 jberger if you can use nano you can use vim
22:36 nicomen ecause it swallows your first letters
22:36 jberger ot if you hit "i" first
22:37 nicomen why would I need to hit a letter to be able to type something?
22:37 jberger because once you do, its better than nano
22:37 jberger and I like nano fine, I use it when I can't install vim
22:37 nicomen no, I have given it a chance many many times, that's why I learnt to do git commit -m ''
22:38 nicomen (and later set $EDITOR)
22:38 nicomen luckily most sentences that I copy/paste doesn't start with dd, or d1000 etc ;)
22:38 jberger and if they did, you hit "u"
22:39 Grinnz_ jberger: i hate vi's UX
22:39 Grinnz_ pretty simple ;)
22:39 jberger not vi, vim
22:39 nicomen jberger: how would I know that?
22:39 Grinnz_ no difference
22:39 Grinnz_ having to hit i to edit text, doesn't work for me
22:39 nicomen it takes me years to learn ESC,ESC,ESC,ESC,:q!<enter>
22:39 jberger nicomen: "undo" "insert"
22:40 nicomen takes=took
22:40 Grinnz_ nano has shortcuts to learn too, but none of them are required to change the text you see, and the important ones are at the bottom of the screen
22:40 Grinnz_ neither vi nor emacs can claim this
22:40 Grinnz_ well, emacs is just shortcut hell
22:40 jberger Grinnz_: sure, but once you learn a few basic ones, you might rather have that room for editing
22:41 Grinnz_ not really
22:41 Grinnz_ you can disable them, anyway
22:41 nicomen I'm not saying nano is great, it's sucks in many ways, although it's ok if you turn on the stuff that you would expect from an editor, it's just that emcas is too slow, and vim to unintuitive. easy.
22:41 Grinnz_ but i don't
22:41 nicomen jberger: if you look at my screenshot you will see them gone
22:42 nicomen Ctrl+G still works to show them all though
22:42 Grinnz_ where's an emacs worshipper when we need one
22:42 nicomen what annoys me with nano now is when I forget to turn temp off auto-indent when pasting code
22:42 Grinnz_ haha, i do that all the time
22:42 Grinnz_ i wish that was one of the shortcuts at the bottom of the screen
22:43 Grinnz_ but i'm starting to remember it's alt+I
22:43 nicomen but with selection mode and a couple of outdents it's quite fast to solve
22:43 Zoffix It has more shortcuts than what's at the bottom of the screen??
22:43 Grinnz_ lol
22:43 Grinnz_ see ctrl+G
22:43 jberger well this is a brilliant showing for nano :-P
22:44 Zoffix JESUS.... Lol.. maybe it's not as sucky as I thought it were all these *YEARS*
22:44 Grinnz_ rofl
22:44 nicomen I wouldn't say it's powerful but it has a few more things up its sleeve that most people don't know about. Just enough to not bother getting used to mode
22:44 nicomen *modes
22:44 Zoffix Hahaha.
22:44 purl Hahaha. are you asking for advice on #perl!? :)
22:44 nicomen hahaha
22:44 jberger botsnack
22:44 purl thanks jberger :)
22:44 Grinnz_ autoindent is the only shortcut i use often that isnt on screen
22:45 Grinnz_ although i accidentally hit alt+J all the fucking time
22:45 nicomen so for me people saying nano sucks, I listen to them as careful as people saying perl sucks. Sure, great, now let me get back to work ;)
22:45 Grinnz_ at least ctrl+U undoes that
22:45 Grinnz_ ctrl+J even
22:45 Grinnz_ alt+J is worse lol
22:45 jberger I don't say it sucks,  I say I want more power than that
22:45 nicomen I even use the spellchecker to run perl -c ;)
22:46 jberger its perfect for quick hacks on a minimalist box
22:46 Zoffix Well, I don't see a reason to display a few shortcuts at the bottom, when you offer more than that :) And Ctrl+G isn't one of the listed.
22:46 Grinnz_ the only "more power" i need than nano is a GUI editor
22:46 Grinnz_ so i dont need any shortcuts at all
22:46 Zoffix I didn't even know it had Undo..
22:46 jberger and now you have your X problem
22:46 Grinnz_ Zoffix: ^G is the first one listed...
22:47 Zoffix Well... it says "Get help" not "All teh shortcutz" :)
22:47 Grinnz_ Zoffix: undo is "experimental-ish" and only works after doing certain things
22:47 nicomen Zoffix: and after going to the ^G page, press page down ;)
22:47 Zoffix :D
22:47 Grinnz_ ^G SHORTCUTS EVERYWHERE
22:47 nicomen I wonder if I should start using the multi-buffer thing
22:47 jberger "undo is "experimental-ish"" hahahahhahahahahah
22:48 Grinnz_ :)
22:48 nicomen but ctrl+z or simple closing and using the bash history is as fast
22:48 nicomen jberger: just like the emacs ringbuffer feels like for noobs ;)
22:48 jberger assuming you want to undo everything
22:49 Grinnz_ well the only time i actually need undo is when i accidentally justify something
22:49 Grinnz_ which is when ^U turns into undo
22:49 Grinnz_ so it works out
22:49 Grinnz_ wtb nojustify option
22:49 * jberger starts writing down conditional usage of shortcuts, compares to vim
22:49 Grinnz_ who the fuck uses nano to write essays, anyway ;)
22:50 nicomen Grinnz_: it's for mail!
22:50 Grinnz_ oh god
22:50 nicomen and news
22:50 nicomen and everything else that makes sense to justify to a certain width ;)
22:50 Grinnz_ since i only ever use nano for code and config files...
22:50 nicomen and to fuck up python code ;)
22:50 nicomen \o/
22:50 Grinnz_ ehehehe
22:50 nicomen hehe
22:51 Grinnz_ usually my perl code still runs justified, it just looks like doo doo
22:51 nicomen it's the perlgolf-button ;D
22:51 jberger you can't seriously be arguing for an editor and then admit something like that :-)
22:51 nicomen I would love a mix of nano and irssi
22:52 Grinnz_ jberger: i can, because these problems are miniscule to me compared to hitting i to edit text :P
22:52 nicomen jberger: admit what?
22:52 purl well, admit is first.
22:52 nicomen the undo thing?
22:52 jberger "usually my perl code still runs justified, it just looks like doo doo"
22:52 nicomen I always yank/unyank changes that I need to undo
22:52 Grinnz_ it's a joke, directed at python
22:52 Grinnz_ ;)
22:52 nicomen jberger: haha, that's when he tells the editor to justify the text as if it was an email
22:52 jberger ok, if you say so
22:52 purl damn straight
22:53 zackiv31 joined #mojo
22:53 nicomen if I quit without saving it deletes everything too...
22:53 Grinnz_ you mean it doesn't autosave like microsoft word?!
22:54 nicomen Grinnz_: any idea if the auto-save extension ~ can be changed?
22:54 * jberger explodes
22:54 Grinnz_ thats not autosave so much as backup
22:54 Grinnz_ but dunno
22:54 nicomen sorry, backup
22:54 Grinnz_ i turn that off always
22:54 nicomen it's off by default AFAIK
22:54 Grinnz_ yeah, only gedit has it on by default
22:55 jberger I don't know how many ~ files I would almost commit when I was using gedit
22:55 Grinnz_ haha
22:55 Grinnz_ my gedit looks almost nothing like how it comes out of the box, gedit has a surprising amount of coding features
22:56 Grinnz_ but now gnome 3 made it all weird looking
22:56 Grinnz_ in the new versions
22:56 nicomen Grinnz_: it used to have a really hard time loading big files
22:56 Grinnz_ yeah, i'm still using a version that does :P
22:56 nicomen no, files with big lines
22:56 Grinnz_ its the syntax highlighting
22:56 nicomen just like nano haha
22:56 Grinnz_ i have to be careful opening one of the frontend guys minified js files
22:57 Grinnz_ i wonder if syntax highlighting could be turned off on the command line for nano
22:57 good_news_everyon joined #mojo
22:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veycU
22:57 good_news_everyon mojo/master 4f0399d Sebastian Riedel: more consistent formatting
22:57 good_news_everyon left #mojo
22:57 nicomen Grinnz_: yes of course?
22:58 Grinnz_ i see an option to add a syntax highglighting file but not to disable it
22:58 nicomen -Y none
22:59 Grinnz_ aha
23:00 Grinnz_ sri: more like "more consistently 4 less lines of code"
23:00 Zoffix They're not equivalent :)
23:01 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Upload.pm#L11
23:01 sri there's more like them :)
23:01 Zoffix Why ' and ' and not just a semicolon?
23:01 Grinnz_ huh?
23:02 stryx` joined #mojo
23:02 Grinnz_ oh
23:02 Grinnz_ you mean the "and" operator there
23:02 Zoffix Yeah
23:03 Grinnz_ sri is confident in his method chaining returning the object, i guess ;)
23:03 Zoffix :D
23:03 sri very
23:04 Zoffix I guess that functions as a test too
23:04 Zoffix (for that) :)
23:05 sri is_established not working on the client side still bugs me a little
23:06 nicomen would "&& $_[0]" work the same as "and return $_[0]" ?
23:06 Grinnz_ unless the previous argument has different precedence, yeah
23:07 sri no
23:07 sri you'd get a boolean
23:07 Grinnz_ oh right
23:07 nicomen ah
23:07 Grinnz_ you still need the return
23:07 sri and return reads better anyway
23:07 Grinnz_ indeed
23:08 nicomen yeah I guess, just thought about the precesing lines not having explicit return, but I guess having a single expression is ok to skip the return
23:08 nicomen *preceding
23:08 Grinnz_ but if the thing before that is assignment, && is not going to do the same thing ;)
23:11 * Grinnz_ wonders when that one 5.6.2 linux box will show up on cpantesters for his new release
23:11 jberger Grinnz_: who cares about 5.6.2?
23:11 nicomen nano users
23:12 nicomen ;)
23:12 Grinnz_ jberger: its fun to see my module working there cause it can :P
23:12 Grinnz_ http://www.cpantesters.org/cpan/report/11783e74-d3a5-11e4-9497-9324e14af301
23:12 jberger this isn't a mojo module then?
23:12 Grinnz_ haha, no
23:12 jberger ah ok
23:12 jberger that's what I meant
23:13 Grinnz_ 5.6.2 is even older than RHEL4 i think
23:14 Grinnz_ that version has to install like 3 of the required core modules
23:14 jberger I just meant that mojo requires 5.10 so 5.6 is right out
23:15 Grinnz_ yeah all my mojo modules have an explicit 5.010001 requirement
23:15 Grinnz_ i'm confident sri doesn't plan on lowering that :D
23:17 nicomen lol
23:17 jberger lower?! ha!
23:17 jberger Grinnz_: what are you using that module for? looks like fun
23:17 Grinnz_ if he raises it though ill have to upggrade to centos 7 D:
23:17 nicomen in 2016 mojo will require 5.20
23:17 Grinnz_ jberger: calc command for my bot, mostly
23:18 Grinnz_ i wrote it originally embedded in my old POE bot but it's much better suited to its own module lol
23:18 jberger I suspect that when perl core has a non experimental signatures we will be using it :-)
23:18 nicomen that would be debian jessie out for half a year, plenty of time for people that use distros that actually want to update, to update
23:18 jberger Grinnz_: I've wanted to write an number/unit parser
23:18 jberger and converter
23:18 purl somebody said converter was now known as converter, but you can call me Converter the Barbarian.
23:19 Grinnz_ jberger: yeah i started writing something like that, but gave up and used wolfram alpha instead
23:19 Grinnz_ its a bit of a shitfest...
23:20 jberger Grinnz_: https://metacpan.org/pod/MooseX::Types::NumUnit
23:20 jberger the problem is that Physics::Unit isn't great
23:20 jberger and that's what I use
23:20 Grinnz_ write a better one! ;)
23:21 jberger that's what I'm saying!
23:21 jberger oh and I don't need it anymore
23:21 Grinnz_ heh
23:21 Grinnz_ purl: wtf?
23:21 purl no idea, grinnz_
23:21 jberger Grinnz_: https://metacpan.org/pod/Physics::UEMColumn
23:22 jberger I sadly don't get to model ultrafast electron microscope columns anymore
23:22 Grinnz_ i know what most of those words mean, separately
23:23 jberger https://github.com/jberger/Thesis/blob/master/thesis.pdf
23:23 jberger hahahaha, github now inline renders that!!!
23:24 Grinnz_ man that almost broke this computer
23:24 Grinnz_ i thnk outlook crashed
23:24 Grinnz_ (as it is wont to do)
23:24 jberger https://github.com/jberger/Thesis/raw/master/thesis.pdf
23:25 Grinnz_ yeah github added a lot of inline rendering
23:25 jberger I assumed that it wouldn't do anything and reader would click raw
23:30 stryx` joined #mojo
23:31 nicomen Grinnz_: outlook?
23:31 purl outlook is broken or a big flashing neon sign that says "HEY! VIRUS WRITERS! HORK ME HARDER!" or lookOut! or Microsoft Outbreak or "Other e-mail programs like Eudora are not designed to enable virus replication." or not so good or fucked at quoting, see outlook quotefix or a potential source of billable hours
23:38 disputin joined #mojo
23:41 stryx` joined #mojo
23:42 _dave_ lol
23:42 _dave_ p.s. "Emacs"
23:42 pink_mist purl: outlook quotefix
23:42 purl hmmm... outlook quotefix is http://home.in.tum.de/~jain/software/outlook-quotefix/
23:44 Grinnz hehe
23:46 nicomen wonder if you can enfore that on google mail too
23:47 stryx` joined #mojo

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