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

IRC log for #mojo, 2014-06-12

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

All times shown according to UTC.

Time Nick Message
00:03 jberger_ sri: what is the function of the ->{n} on some of the minion returns?
00:06 disputin joined #mojo
00:12 sri jberger_: it's the number of affected documents
00:13 jberger_ oh ok
00:13 jberger_ thats a mango implementation detail?
00:14 jberger_ or that's a mongo thing?
00:14 sri whole thing is implemented as a state machine, so you get a boolean return value indicating if the state transition was successful
00:16 neyasov joined #mojo
00:16 sri ->{n} would be 0 if no documents changed
00:16 sri if no documents changed, i know the transition failed
00:16 jberger_ right, but does that come from Mongo or is it Mango specific?
00:16 sri mongo
00:16 jberger_ cool
00:16 jberger_ chicago.pm project night
00:17 jberger_ working on DBM::Deep minion backend
00:17 sri most operations return a result document with different values like n
00:17 jberger_ I never knew that, thanks!
00:22 Averna joined #mojo
00:28 jberger_ sri: why does restart_job query check the state?
00:28 jberger_ {_id => $oid, state => {'$in' => [qw(failed finished)]}}
00:28 rem_lex|pivo joined #mojo
00:28 sri jberger_: why not?
00:29 sri like i said, it's a state machine, it only allows a very small number of transitions
00:29 jberger_ what happens if I call restart_job on an active job?
00:29 sri things will prolly blow up
00:29 jberger_ ok ;-)
00:30 sri point of the state machine is to maintain a consistent state
00:30 sri so it's as restrictive as possible
00:30 jberger_ understood
00:43 shmuel joined #mojo
00:45 fhelmber_ joined #mojo
00:47 * sri still wonders what our first bigger 5.x feature will be
00:47 sri guess pluggable minion backends kinda is
01:01 laouji joined #mojo
01:03 disputin joined #mojo
01:15 jberger_ so if I try to remove a job that is not in (failed finished inactive) ... ?
01:17 good_news_everyon joined #mojo
01:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/JJDEAQ
01:17 good_news_everyon mojo/master 0ed5a3c Sebastian Riedel: small optimizations
01:17 good_news_everyon left #mojo
01:18 sri it fails of course
01:19 sri the job belongs to a worker, if the worker failed then ->repair is supposed to handle the transition
01:21 rwp joined #mojo
01:21 sri i guess removing an active job would be rather harmless, but still, why would you want to?
01:21 sri (well, it screws up the stats)
01:21 jberger_ not that I want to, its that I'm just noticing gaps in the code as I port the backend line-by-line
01:22 sri gaps?
01:22 jberger_ I guess what you are saying is that these backend methods would never be called in those cases
01:23 jberger_ all the find* calls which give a list of possible states
01:23 sri i've put a lot more thought into the state transitions than it may seem
01:24 sri making it robust was the number one goal
01:25 jberger_ yeah, I'm just doing a direct port of the Mango backend
01:25 sri no transition that make no sense whatsoever
01:25 jberger_ these are really just idle questions
01:25 sri well, you said "gaps"
01:25 jberger_ sorry, "my perceived gaps"
01:29 klapperl joined #mojo
01:35 lupi joined #mojo
01:44 jberger_ sri: well this is as far as I have gotten tonight: https://github.com/jberger/Minion-Backend-DBMDeep/blob/master/lib/Minion/Backend/DBMDeep.pm
01:45 jberger_ a few methods still need to be ported
01:47 sri you also need to get rid of the bson stuff
01:48 sri jberger_: in case you missed it, this was my first attempt at a storable backend https://gist.github.com/anonymous/45eeebaf96b0cec19fff
01:48 jberger_ why get rid of it, its darn handy
01:48 sri hmm
01:48 jberger_ I guess I probably will, but for now
02:06 lupi joined #mojo
02:07 good_news_everyon joined #mojo
02:07 good_news_everyon [mojo] kraih tagged v5.06 at fb60386: http://git.io/pCBxsg
02:07 good_news_everyon left #mojo
02:08 good_news_everyon joined #mojo
02:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ZvwBYg
02:08 good_news_everyon mojo/master a5d43b3 Sebastian Riedel: bump version
02:08 good_news_everyon left #mojo
02:08 cpan_mojo Mojolicious 5.06 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.06
02:12 sri those false positive cpantesters results are annoying
02:12 sri clearly someone set up their smoker wrong http://www.cpantesters.org/cpan/report/22f2edaa-f1c1-11e3-8ae8-15c3bde15059
02:17 jberger_ I hate those
02:18 * jberger_ heads home
02:18 purl Slacker!
02:18 * jberger_ kicks purl
02:18 * purl blocks!  Paint the fence!
02:19 sri :)
02:36 asarch joined #mojo
02:37 asarch Any good Javascript dialect very compatible with Mojo?
02:37 asarch :-P
02:37 asarch I was thinking about jQuery
02:37 asarch SemanticUI uses it by default
03:04 beyhugobah joined #mojo
03:04 beyhugobah hi gents, if I read ovids beginning perl, and then modern perl, how close will I be to being able to make a db backed website?
03:04 beyhugobah assuming I then use mojo
03:04 beyhugobah :)
03:05 beyhugobah mojo has everything right?
03:05 beyhugobah I heard something called dbix::class or something is also part of learning curve
03:05 beyhugobah I am also curious if in production people can use name based virtual hosts with mojo to run say 30 sites on the same ip on the same box?
03:06 beyhugobah I love the net!
03:13 laouji joined #mojo
03:35 beyhugobah anyone awake?
03:35 purl nobody here but us chickens!
03:35 beyhugobah lol
03:39 beyhugobah awake ye sentiels of code!
03:39 beyhugobah postgresql and mojo on freebsd aw yeah
03:39 beyhugobah does mojo like to work with memcached?
03:52 shmuel beyhugobah: mojo itself does not handle DB / memcache connections
03:56 beyhugobah is it used with say postgresql and memcached?
03:56 beyhugobah to raelly handle big loads?
04:16 beyhugobah or does mojo have other cacheing than memcached?
04:16 beyhugobah hmm
04:16 beyhugobah wow
04:16 beyhugobah exciting perl stuff
04:16 beyhugobah 5.20!
04:17 beyhugobah seems like perl is on the move again
04:22 shmuel beyhugobah: are you doge?
04:23 shmuel and yes, it can be used with any DB you want.
04:23 shmuel why won't you try to do a small site using it, and report back?
04:28 rem_lex joined #mojo
04:35 kyshtynbai joined #mojo
04:40 denis_boyun joined #mojo
04:41 laouji joined #mojo
04:46 fhelmber_ joined #mojo
04:53 Eke- joined #mojo
05:27 laouji joined #mojo
05:36 cpan_mojo MojoX-Redis 0.86 by Sergey Zasenko - http://metacpan.org/release/UNDEF/MojoX-Redis-0.86
05:43 kyshtynbai joined #mojo
06:04 Vandal joined #mojo
06:11 rem_lex|pivo joined #mojo
06:12 d4rkie joined #mojo
06:15 Eke- joined #mojo
06:28 denis_boyun joined #mojo
06:33 dpetrov_ joined #mojo
06:33 Jonis anyone use any jQuery plugins for vim that they can recommend?
06:45 dod joined #mojo
07:03 eseyman joined #mojo
07:07 batman Jonis: what kind og jquery plugin..?
07:07 batman i don't, but i'm curious about what you need
07:11 laouji joined #mojo
07:17 laouji joined #mojo
07:22 trone joined #mojo
07:27 Jonis batman: looking for an updated autocomplete, basically.
07:27 Jonis there is one out there already, I might see if I can brush that one up a bit
07:30 laouji joined #mojo
07:30 igorsutton joined #mojo
07:32 batman ok
07:34 Dandre Hello,
07:35 Dandre Using Mango, what is the difference between Cursor->limit and Cursor->batch_size?
07:36 rawler joined #mojo
07:36 laouji joined #mojo
07:55 denis_boyun joined #mojo
07:56 hrupp joined #mojo
07:56 odc joined #mojo
08:00 cpan_mojo Mojolicious-Plugin-Qaptcha 0.10 by HRUPP - http://metacpan.org/release/HRUPP/Mojolicious-Plugin-Qaptcha-0.10
08:00 cpan_mojo Mojolicious-Plugin-Logf 0.01 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Logf-0.01
08:03 cpan_mojo Mojolicious-Plugin-Logf 0.02 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Logf-0.02
08:05 maze joined #mojo
08:06 * batman forgot dependencies :P
08:06 shmuel joined #mojo
08:09 laouji joined #mojo
08:10 laouji joined #mojo
08:11 mire joined #mojo
08:20 sh4 joined #mojo
08:40 basiliscos joined #mojo
08:43 nic http://www.tagspaces.org/
08:43 nic wow
08:43 fhelmber_ joined #mojo
08:44 meshl joined #mojo
08:44 Adura I never tag things... heh.
08:46 * moritz tags his releases in git
08:47 Adura Spaces in filenames, evil...
08:50 batman has "./script/myapp daemon" always default to MOJO_MODE "development" ?
08:51 Jonneh joined #mojo
08:57 meshl joined #mojo
09:17 shmuel_ joined #mojo
09:24 sh4 joined #mojo
09:32 arthas joined #mojo
09:34 crab yes, afaik
09:34 tomboh my mojo app now outputs json logs on STDOUT, which makes me happy
09:35 tomboh however Mojo::Server::Daemon does 'say "Server available at $url.";' at the end of _listen() which upsets the JSON processing tool I pipe STDOUT to
09:35 tomboh what's the reason for "say" instead of "$app->log"?
09:37 bjoernfan Probably because you want feedback on the command line when you start your app.
09:38 nicomen tomboh: try the silent attribute
09:39 kyshtynbai Hi everyone! Let's say I have such small  piece of code in index.html.ep: http://pastebin.com/1UxRnSFv . Is it possible to create helper with the same function? How should I call it than?
09:39 kyshtynbai I mean, call from templates.
09:40 tomboh nicomen: thank you - that's exactly what I want :)
09:41 bjoernfan kyshtynbai: % helper_name
09:41 bjoernfan kyshtynbai: Have a look at https://github.com/kraih/mojo/wiki/Working-with-helpers :)
09:42 kyshtynbai thanks!
09:46 cpan_mojo Mojolicious-Plugin-MostTagHelpers 0.04 by HRUPP - http://metacpan.org/release/HRUPP/Mojolicious-Plugin-MostTagHelpers-0.04
09:55 dexteruk joined #mojo
09:55 rem_lex joined #mojo
10:18 rem_lex|pivo joined #mojo
10:21 marcus my twitter is full of mst :-o
10:21 batman what's going on?
10:21 purl A complete clusterfuck.
10:22 batman oh.
10:22 marcus batman: Some gender issues in the perl community, apparently.
10:24 batman yeah...the last tweet was a bit off imho
10:25 batman mst++ # still like it when you speak out
10:26 mst batman: the 'fuck you if you didn't' ?
10:26 batman yeah
10:26 mst yeah, well, I started off with an apology for the ensuing spam
10:26 batman probably because i put more into "fuck" than you...
10:26 mst and it seemed like an appropriate end to an aggravated rant
10:27 marcus I actually read your rant, but I also cringed a bit at that ending.
10:27 batman i mean, i would agree if you wrote "thank you for agreeing, and..."
10:27 nicomen this is what I have always said: twitter == broken irc
10:27 batman but "listening"..?
10:27 nicomen mst exemplifies that well enough ;)
10:27 marcus He’s probably tweeting through irc anyways.
10:28 batman ;)
10:28 nicomen sucks
10:28 nicomen upside-down
10:28 purl well, upside-down is umop-3plsdn
10:28 nicomen text
10:28 nicomen reading
10:29 batman makes me sad when people add attributes to people by their externals.
10:29 batman (i do it as well of course though)
10:30 nicomen you only say that because you are fat
10:30 marcus And short
10:30 batman like mst walking around in his skirt.... what a tool...
10:31 batman (please don't take that serious)
10:31 mst it's a kilt, damnit. I don't bring my skirts to conferences, they don't have enough pockets.
10:31 marcus utilitkilt seems great for tools
10:31 batman mst: i know. that's what makes my comment extra stupid :)
10:32 batman marcus: haha
10:32 mst batman: sure, and it's only the fact I own several skirts that makes me feel allowed to complain about the difference :)
10:32 * batman has a utility belt... not quite the same
10:32 batman mst: i think people should complain about that difference anyway.
10:33 batman anyhow...
10:34 batman that was one sad comment on the yapc::na
10:34 batman too bad that actually ended the discussion.
10:34 mst what? that we succeeded entirely apart from one moronic hyperfeminist who thought she had an opinion?
10:34 batman i mean. the discussion should have ended with a punch in the face.
10:35 batman ...because after all: we all know violence solves problems
10:35 mst well, y'know, she's the one that schwern was arrested for strangling
10:35 crab what are we talking about?
10:36 mst now you know why every woman who met her during that conference reacted to the arrest with "damn, and he didn't finish the job? shame"
10:36 batman mst: no. i'm happy that it was a great success.
10:36 Adura Somebody doing some Perlquality trolling?
10:36 mst batman: right, so not 'sad comment' to my mind
10:36 batman i agree. bad wording from my side.
10:36 mst "we succeeded perfectly, except for somebody who wasn't part of the community anyway, and didn't come back"
10:36 crab schwern was arrested for strangling someone?!
10:36 batman oh! i though "somebody" was part of the community.
10:37 rem_lex joined #mojo
10:37 mst the woman who turned up was, and still is
10:37 mst noirin isn't, and never will be
10:37 batman \o/
10:37 mst crab: http://twitter.com/shadowcat_mst
10:37 purl http://twitter.com/shadowcat_mst is a little less formal :)
10:38 mst crab: and, yes, shortly after they signed the divorce papers, having not been married long enough to gain her US residency, his newly-ex-wife accused him of domestic violence, which allows her to file under an exemption to not be deported
10:39 mst crab: as to whether he was guilty, I've no idea; the relevant DAs declined to prosecute, and as I say, every woman who'd actually met her was more disappointed he didn't finish strangling her than worried about if she was guilty
10:39 mst crab: I judge not, I'm just glad she won't be at a YAPC ever again
10:42 mst anyway, that totally wasn't my point
10:46 marcus mst: schwern has sued noirin, and they are in court this week afaik
10:46 mst marcus: oh, I know. I doubt it'll gain either of them anything, tbh
10:56 batman tomboh: did you figure out how fix the logging? could you paste an example of what you're doing?
10:56 marcus mst: I’m rather sad about those Twitter hyperfeminists giving feminism a bad name. It’s not like there’s no real problems in this area to be tackled :-/
10:57 batman maybe you could subscribe to $app->log->on(message => sub { ... }); and send the messages directly to the parser instead of reading STDOUT
10:57 mst marcus: same. hence why I've been fighting for the middle ground for several years
10:58 marcus mst: yeah, I think we see eye to eye on this issue.
10:59 alnewkirk joined #mojo
10:59 tomboh batman: nicomen pointed out that I can use "silent"
10:59 tomboh which does exactly what I want :)
10:59 mst marcus: my mother was a feminist of the old school. I wish she was still around, she'd probably enjoy helping take those idiots down
11:00 mst marcus: her view was always "what the fuck are you doing in the name of feminism, you silly children", pretty much
11:00 Adura joined #mojo
11:00 tomboh also, the code I want to avoid calls perl's built-in say so using $app->log won't help
11:01 mst tomboh: local *STDOUT = <some tied filehandle>
11:02 tomboh yeah, that would work, but nicomen's solution appeals to my laziness
11:02 marcus mst: She sounds like a likeable woman :)
11:03 mst marcus: she's the one I inherited the chainsaw from
11:03 mst marcus: so, brilliant, but not always likeable ;)
11:05 tomboh an unusual, but effective, heirloom ;)
11:09 batman tomboh: cool :)
11:09 batman glad you (nicomen) figured it out
11:15 crab i don't think i have ever seen a chainsaw
11:16 marcus crab: You’ve lived a shielded life.
11:16 crab shielded from chainsaws, certainly
11:17 crab though it's hard to imagine that there were always chainsaws around, but i was deliberately denied access to them
11:17 d4rkie joined #mojo
11:25 mst crab: it's long since been a metaphor for being on the receiving end of my temper
11:25 mst crab: it wasn't my idea, don't expect me to explain it :)
11:28 jberger "So how about we just treat people presenting as men as men, and people presenting as women as women" mst++
11:32 nicomen I try to treat men as persons, and women as persons, and everything in between or outside as persons
11:33 nicomen equally bad
11:33 jberger I recommend a seriously awesome podcast for people who are interested: http://sexforsmartpeople.com
11:34 jberger nicomen++ #that'll do in my book
11:34 nicomen jberger: do you know what's the difference between Lego bricks and sex?
11:34 * jberger worries
11:35 jberger ?
11:35 nicomen then you should stick to the Lego
11:35 d4rkie joined #mojo
11:35 jberger Hahaha
11:35 nicomen (classic Norwegian (child's) joke)
11:39 batman hahahaha!
11:39 purl LOLCON 4 reached.
11:39 batman nicomen++
11:42 nicomen last off topic thing: The England team visited an orphanage in Rio today:
11:42 nicomen "It's heartbreaking to see their sad little faces with no hope," said Jose, age 6.
11:48 crab hahah
11:52 neilhwatson joined #mojo
11:53 rem_lex joined #mojo
12:02 Adurah joined #mojo
12:11 asarch joined #mojo
12:15 nic lol
12:19 bjoernfan jberger: Subscribed, thanks!
12:23 crab seems like this is apple only
12:41 marcus how so?
12:41 marcus podcasts are usually rss
12:41 bjoernfan It wasn't on gpodder, but they give you the rss feed on the website.
12:50 rem_lex|pivo joined #mojo
12:51 crab i guess i'm not really a smart people after all
13:00 rem_lex|pivo joined #mojo
13:05 mire joined #mojo
13:06 denis_boyun joined #mojo
13:13 * sri yawns
13:30 genio WAKE UP
13:31 jberger_ joined #mojo
13:32 jberger_ marcus: I'm leaning towards using Pg::PQ for Mojo::Pg
13:32 jberger_ https://metacpan.org/pod/Pg::PQ
13:33 sri jberger_: that does not look very reliable
13:33 jberger_ The PGA sync plugin is good enough for DBI use
13:34 jberger_ Sri I'm going to contact the author about the warning
13:35 sri jberger_: it's a plugin, which totally sucks
13:35 * sri will never ever recommend the pg async plugin
13:35 jberger_ sri there are some tests and there are more for AnyEvent::PQ which uses Pg::PQ and is from the same author
13:36 sri i was hoping for a postgres module we can actually recommend :S
13:36 jberger_ Me too
13:37 sri if you go pq, at least use the module name Mojo::PQ
13:37 sri leave Mojo::Pg for something real
13:38 jberger__ joined #mojo
13:39 jberger_ joined #mojo
13:39 jberger_ Ok well name aside PQ seems  to be the only option for nonblocking connect
13:40 * sri never really cared about non-blocking connect
13:41 jberger_ What isn't real about PQ? it uses the same c library as the DBI  driver
13:41 sri it's not a proven backend and i don't know the author
13:42 jberger_ I agree, I need to contact the author about viability
13:45 jberger_ But for PgAsync I think that just needs to be massaged into a regular module (not plugin) and it is a good as ours would have been
13:46 jberger_ So I will create a pr for that soon
13:51 sri jberger++
13:52 hummeleBop joined #mojo
14:03 mire joined #mojo
14:18 rem_lex| joined #mojo
14:21 gryphon joined #mojo
14:28 rem_lex joined #mojo
14:29 denis_boyun joined #mojo
15:11 nic For a template (helper) I need to get the last component of path
15:11 nic I'm thinking $c->url_for then s{.*/}{}
15:12 nic (the url will never be just '/')
15:12 crab pop
15:13 crab or, well. $c->req->url->path->[-1] or something
15:14 nic ah, brill, thanks crab
15:20 disputin joined #mojo
15:34 beyondcreed joined #mojo
15:57 gryphon joined #mojo
15:58 nic To get everything after the '?', do I use $c->req->url->query->to_string ?
15:59 nicomen did you try?
16:05 fhelmber_ joined #mojo
16:08 nic I really really
16:09 disputin joined #mojo
16:20 tempura So Mojo::Pg is dead?
16:20 tempura carb, were you not working on something non-blocking for postgres?
16:25 jberger_ It's not dead, it's just resting ????
16:25 voegelas joined #mojo
16:29 * batman started on https://github.com/jhthorsen/mojo-sql/tree/protocol-mysql
16:29 batman idle until i get more spare time
16:33 hummeleBop Mojo :: pg rest in peace
16:33 nicomen it seems Mojo::UserAgent encodes my content with gzip when I do a POST, how do I turn that off
16:33 nicomen ?
16:39 dod joined #mojo
16:47 nic I'm trying to do ->respond_to(html => sub { ->render(.., chunk => ->render_to_string(inline => q{..})    )  }  )
16:47 nic but the q{..} bit includes refs to stash, which I can't make work
16:50 dod joined #mojo
16:50 nic I guess the inline bit should be the template and the current template added to its layout
17:07 nic hm, I guess 'extends' and content() might be what I need
17:17 Eke- joined #mojo
17:20 kyshtynbai joined #mojo
17:24 kyshtynbai What source code editors do you guys use? I'm inerested in edtiro which would be able to a) Edit via ssh b) Highlight perl syntax in html.ep templates.
17:45 Mikey im still using sublimetext
17:45 mire joined #mojo
17:45 Mikey tho im not a fad follower, sublime has a very nice mojo plugin tho
17:48 voegelas joined #mojo
17:49 dgikiller joined #mojo
17:57 kyshtynbai sublime is not open-source as far as I remember.
17:57 sri atom here
17:57 sri which is open source now \o/
17:58 sri the mojo syntax highlighting is pretty great https://github.com/kraih/atom-mojo
17:59 jberger_ joined #mojo
17:59 kyshtynbai sri: for mac? No windows/linux version?
17:59 sri i think there are unofficial builds
17:59 sri it's still beta
18:00 kyshtynbai Well, if there're sources, it could be theoretically built).
18:03 Mikey sri: how does atom compare with sublime?  is it as nice?  i like find in files / command-p a lot
18:03 sri sublime find in files is total garbage in my opinion ;p
18:04 sri atom is closer to the awesome textmate version
18:04 sri command-p is present
18:05 hrupp joined #mojo
18:05 sri i hated sublime, loved textmate, and love atom
18:05 Mikey i loved textmate, too
18:05 Mikey tm bundles just work in atom
18:05 Mikey nice
18:08 sri extensions are just javascript/coffeescript, no python! https://github.com/kraih/atom-perltidy/blob/master/index.js
18:08 Mikey wait are all editor views web pages?
18:09 jberger_ kyshtynbai: editing over ssh seems to imply vim
18:09 sri yes, all web
18:09 sri super hackable
18:10 jberger_ And there is a mojo vim plugin
18:10 sri stuff like autocomplete is just a plugin https://atom.io/packages/autocomplete-plus
18:10 sri everybody can build their own version
18:10 kyshtynbai jberger_: the problem is - vim doesn't have in-bult ssh client and I have to do some magick with combining it with putty or something.
18:11 kyshtynbai It is when I run windows.
18:11 kyshtynbai I thought about installing x-server and just run gvim on server side actually.
18:11 Mikey i'm gonna have to rewrite some tools.  i also have to write a subversion plugin for work
18:11 kyshtynbai Not sure if it is a good solution though.
18:12 jberger_ I can't imagine that atom will work better over ssh directly than vim would work over a terminal
18:12 kyshtynbai and use x-forwarding on clien I mean,
18:13 sri editing over ssh is not my workflow
18:13 Mikey i like vim when i'm editing over ssh, but usually when i am editing over ssh i am fixing something in production, or i am writing a single script.  when i need to work on a larger project i need something like sublime/atom
18:13 sri i'd rather use a git commit hook to push stuff around
18:15 kyshtynbai Mikey: I actally ment the following: editor is running on client, it connects via ssh to remonte server, scps files to edtie and scps them back when they're saved
18:16 Mikey yeah for that i use something very much like what sri described, a commit hook in svn that auto-rolls content wherever it needs to be
18:16 kyshtynbai it is transparent so it seems like the remote file system is mounted
18:16 kyshtynbai I see.
18:16 kyshtynbai Gotta install git on win).
18:16 sri sounds like a shitty workflow really, how would you use version control with that?
18:16 kyshtynbai I dont)
18:16 kyshtynbai I'm just learning.
18:16 kyshtynbai :) .
18:17 Mikey kyshtynbai: that's the workflow i started with :)
18:17 sri i suppose we all started there at some point
18:17 Mikey scp is very slow though compared to other things which can happen asynchronously without using resources on your local machine
18:17 Mikey you'll find that scp operations lock up your UI in your editor or your finder/explorer windows
18:17 Mikey it's not optimal
18:18 kyshtynbai Well, the advantage of scp is that it doesn't require any additional software on server
18:18 kyshtynbai no ftp server or something,
18:18 kyshtynbai it just works.
18:19 kyshtynbai and every "unit" of additional software on server - is a possible break-in spot
18:19 kyshtynbai I'm paranoid I guess.
18:19 Mikey you can still have just ssh listening and use a post commit hook
18:19 sri git is generally used over ssh as well
18:22 Mikey my post commit hook uses rsync, which uses ssh for transport
18:29 Eke- joined #mojo
18:39 disputin joined #mojo
19:27 nic I have layout => 'xx' in my stash, but now that I'm using 'extends', the layout is being ignored
19:28 nic B extends A; they get rendered perfectly, but the layout doesn't appear
19:29 nic I'll test it with a minimal ex
19:51 disputin joined #mojo
20:01 shadowpaste "nic" at 217.168.150.38 pasted "layout from stash stops working when using 'extends'" (30 lines) at http://paste.scsys.co.uk/393747
20:02 nic In the example, render(a =>.. works, but render(b =>.. loses the layout
20:05 nic [If the layout is set in template a (as with 'generate lite_app') then it works]
20:07 kyshtynbai joined #mojo
20:15 ua_ joined #mojo
20:27 nic A bizarre twist on the problem, in my real app if I set the layout in template 'a', 'b' picks up the layout, but none of the formatting from 'a'!
20:41 denis_boyun joined #mojo
20:41 kyshtynbai A question about protecting files in public. Say I have 'images.html.ep' which is rendered only aftet authentication. It's a gallery of thumbs, which onclik load full file. But if user knows direct url to the image, he can avoid authentication and see it. Are there anu ways to avoid this?
20:50 lb don't allow access to images without authentication?
20:51 gryphon joined #mojo
20:52 kyshtynbai yes
20:52 kyshtynbai not only images, but any file in public
20:53 lb it depends on what you want to do - does it matter if a user who knows the url to the image can send that url to someone else? or is it good enough that noone can guess image-urls
20:55 kyshtynbai Well, the first sentece matters. Sharing direct links to images should be prohibited
20:56 lb so, don't allow access to images without authentication ;)
20:56 nic The wiki probably still has a note on guarding static files
21:04 kyshtynbai lb: hmm. that's what I'm acking) how exactly do I do it?
21:10 lb i dunno - there are many ways to do it, not least depending on your performance requirements
21:12 kyshtynbai Maybe it is possible to check the refferer and render dummy page for all therequests with wrong ref?
21:13 lb it's a terrible security model, but sure, if it fits your requirements :)
21:14 kyshtynbai I see).
21:18 denis_boyun_ joined #mojo
21:19 nic Maybe you can use after_static to abort the response if the req doesn't meet requirements (eg authenticated)
21:29 batman kyshtynbai: use a custom static renderer
21:30 batman Mojolicious::Static is just a class. Make your own instance and serve when access is granted
21:31 batman Access control can be done with a bridge ("under" in a lite app
21:31 batman )
21:31 kyshtynbai I see).
21:32 kyshtynbai Thanks guys, I'll think about it!
21:36 batman kyshtynbai: https://metacpan.org/pod/Mojolicious::Static
21:38 batman https://metacpan.org/source/SRI/Mojolicious-5.06/lib/Mojolicious.pm#L98
21:38 batman I would use that module to render static files. It supports seeking :)
21:44 jberger_ You can use nginx headers to allow access to static files
21:51 kyshtynbai Thank you!
21:54 denis_boyun joined #mojo
22:00 disputin joined #mojo
22:17 bjoernfan Oh yeah, finally getting to start some decent bandwidth at home. :)
22:20 cstamas joined #mojo
22:23 sri i wish the atom syntax highlighter was usable on the web
22:51 nic sri: Is there any way to have a template extend another template while also specifying a layout?
22:52 nic Changing Rederer::_extends did what I wanted, but also broke layouted_lite_app.t
22:55 sri check if it's a feature, and if not put your change up for a vote
22:56 sri and don't forget to explain the use case
22:58 nic ok, tomorrow I'll try out my change and write more tests, just to make sure I really do want it
22:59 nic According to that test file, you want the opposite to me, so I'm sure it won't get as far as a vote ;)
23:00 d4rkie joined #mojo
23:00 d4rkie joined #mojo
23:00 nic When B extends A and specifies layout L, the tests want A to override L where they compete
23:01 nic but I can't think why you'd have 'layout' as a distinct concept if you care about them competing
23:01 nic (to me, if you mix them up, the result would be undefined)
23:15 cstamas joined #mojo
23:34 disputin joined #mojo
23:44 meshl joined #mojo

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