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

IRC log for #mojo, 2015-05-09

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

All times shown according to UTC.

Time Nick Message
00:29 fhelmber_ joined #mojo
00:30 mattastrophe joined #mojo
00:38 jb360 joined #mojo
00:53 jberger I think I can do it in one line of c(), but it's too long!
01:07 davido_ joined #mojo
01:09 klapperl_ joined #mojo
01:13 good_news_everyon joined #mojo
01:13 good_news_everyon [mojo] jberger created pod-ascii-art-fix (+1 new commit): http://git.io/vUq7K
01:13 good_news_everyon mojo/pod-ascii-art-fix c657525 Joel Berger: determine the verbatim pod indent from shortest indented line...
01:13 good_news_everyon left #mojo
01:13 caveman_ joined #mojo
01:14 mattastrophe joined #mojo
01:16 jberger its clever, but it makes it the block long again
01:16 jberger https://github.com/kraih/mojo/commit/c65752511ac697f8b43c9ed7c32e42ca79cb69d0#diff-8ba7992c8651f06d0182159daf4cea72R101
01:31 Zoffix joined #mojo
01:39 jberger I can get it down to 2 lines of 80 columns but the readability is bad
01:57 caveman_ joined #mojo
02:03 marty_ joined #mojo
02:03 marty_ joined #mojo
02:12 * jberger misses sri :'(
02:12 noganex joined #mojo
02:13 * preaction signs jberger up for target practice
02:13 * jberger dodges
02:14 jberger preaction: got some golf in ya? https://github.com/kraih/mojo/pull/796/files#diff-8ba7992c8651f06d0182159daf4cea72R102
02:15 punter joined #mojo
02:16 jberger hmmm, that also has O(L^2) where L is number of lines in the verbatim block
02:16 jberger schwartzianizing that will make it worse
02:17 preaction isn't that O(2n), which is just O(n)?
02:17 preaction you're just running over the set twice
02:18 preaction you could reduce that to running over the set once in a single reduce
02:20 jberger yeah, I was never good at O
02:22 jberger anyway, reduce is tricky because of the starting behavior
02:23 preaction right, i'm saying you could combine the map and the reduce into something like: sub { my ( $c ) = $b =~ /^(\s+)/; length $c < length $a ? $c : $a }
02:23 preaction so you only go over it once instead of twice
02:23 preaction but Benchmark to be sure
02:24 jberger I don't think that works
02:24 jberger reduce's first operation takes two elements as $a and $b
02:24 preaction why not? $a is your accumulator, $b is the item off the list. oh. start $a with ''
02:25 jberger right, but thats the lose condition
02:25 jberger we are looking for the shortest leading space
02:25 preaction then ' ' x 100
02:25 jberger you would ahve to start with ' 'x1e3
02:25 jberger yeah
02:26 jberger anyway, here is the schwartzian form
02:26 preaction or !$a || length $b < length $a ? $b : $a; but then you've got an extra check every time through the loop
02:26 jberger http://pastie.org/10178896
02:26 preaction but Benchmark will be your friend here
02:27 jberger meh
02:27 jberger in some sense I'm arguing to have the "feature" removed
02:27 jberger but I'm trying to do it in a good faith effort to fix it
02:28 jberger noted in the PR
02:47 jberger slightly cuter schwartzian (from a golfer's perspective) http://pastie.org/10178911
03:05 jberger gods dammit I hate perltidy
03:05 jberger I so have a short version, and perltidy is screwing me
03:06 mst so don't use perltidy, it's shit
03:07 mst or notidy the line or something
03:09 * jberger suspects mst has a highlight on "gods dammit"
03:09 mst you might like to think that; I couldn't possibly comment
03:10 good_news_everyon joined #mojo
03:10 good_news_everyon [mojo] jberger pushed 1 new commit to pod-ascii-art-fix: http://git.io/vUmmJ
03:10 good_news_everyon mojo/pod-ascii-art-fix 90408da Joel Berger: more compact form of strip_verbatim_indent
03:10 good_news_everyon left #mojo
03:10 jberger anyway, I got it
03:11 jberger makes the PR a much more palatable https://github.com/kraih/mojo/pull/796/files
03:11 preaction sort, very nice
03:11 preaction though mergesort is logarithmic complexity
03:11 jberger most times when I think I need reduce, I actually don't
03:12 preaction you really ought to benchmark the 4-5 options you made ;)
03:12 jberger I doubt anyone is looking for performance pod rendering in the plugin
03:12 preaction i mean, yeah, i'd go with this for its terseness
03:13 preaction you just mentioned complexity so i got sidetracked ;)
03:13 Grinnz must pod render faster!!!
03:20 brainbuz joined #mojo
03:26 asarch joined #mojo
03:44 basic6 joined #mojo
04:31 good_news_everyon joined #mojo
04:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vUmlt
04:31 good_news_everyon mojo/master 0ed66c5 Sebastian Riedel: Mojo::ByteStream is not actually used
04:31 good_news_everyon left #mojo
04:33 jberger a wild sri makes his presence known
04:34 jberger if not quite appears
04:35 good_news_everyon joined #mojo
04:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vUml1
04:35 good_news_everyon mojo/master a885ddc Sebastian Riedel: avoid alternative constructors
04:35 good_news_everyon left #mojo
04:35 cpan_mojo Mojolicious-Plugin-DigestAuth-0.09 by SHAW https://metacpan.org/release/SHAW/Mojolicious-Plugin-DigestAuth-0.09
04:50 jberger I step away from Ubuntu for just a little bit and check this out! http://developer.ubuntu.com/en/snappy/
05:52 kaare joined #mojo
06:21 buu jberger: We're going to bundle all the dependencies!
06:21 buu Its brilliant!
06:37 melo joined #mojo
06:47 dod joined #mojo
06:48 dod joined #mojo
06:54 dod joined #mojo
07:34 berov joined #mojo
07:38 mattastrophe joined #mojo
07:40 dod joined #mojo
07:42 Vandal31341 joined #mojo
08:14 frudas joined #mojo
08:15 frudas hello there
08:17 frudas i have a problem with jquery and event listener in mojo
08:19 frudas i the server load dont charge the event listener
08:19 frudas http://paste.ofcode.org/nNwwRXQpZJMBz27dBjnqsm
08:19 frudas any clue? thankx
08:21 frudas i click the buttons and they dont work
08:21 frudas :(
08:22 frudas 9.6
08:26 trone joined #mojo
08:28 tgt joined #mojo
08:30 tgt joined #mojo
08:40 dod joined #mojo
08:40 dod joined #mojo
08:49 sh4 joined #mojo
08:52 amon joined #mojo
12:23 mattastrophe joined #mojo
12:41 mattastrophe joined #mojo
12:41 asarch joined #mojo
14:04 * marcus just rewrote his slide stack in vroom.
14:04 marcus ingy++
14:19 jberger what is vroom?
14:19 purl i heard vroom was http://video.google.com/videosearch?q=yapcasia2008&amp;sitesearch=video.google.com or Vroom::Vroom or http://search.cpan.org/~ingy/Vroom-0.26/
14:19 jberger I just am moving to reveal
14:20 batman jberger: have you looked at http://slides.com ?
14:21 jberger batman: yeah, but I have one very specific requirement for my presentations
14:21 marcus jberger: I'm doing it all in vim now.
14:22 jberger they have to import all example code from the repository directly
14:22 jberger I always want my examples in the repo to be exactly what I show to the audience
14:23 jberger vroom that might be possible, slides.com I would doubt it
14:23 jberger batman: http://mojolicious-introduction.herokuapp.com/#/
14:24 jberger and actually, that is the "live" version, but the static version is on github pages too
14:27 mattastrophe joined #mojo
14:50 mattastrophe joined #mojo
15:15 jberger mst: https://github.com/jberger/Mojolicious-Plugin-RevealJS/commit/c9003cdc00e8b916434510f887fbe51448277a0c
15:15 jberger still not perfect
15:15 jberger but maybe getting closer
15:18 hasan joined #mojo
15:37 genio jberger: nothing constructive to provide, but there's a typo in the description of the README.pod.  boilerplate had a 'd' creep into it
15:38 jberger well if you don't like boilerplate you certainly aren't going to like boilderplate
15:39 jberger :P
15:39 jberger fixed, thanks
15:40 genio I hate those boilderplates!
15:42 jabberwok so, this is effectively a filter that emits a set of static, serve-able files?
15:42 jberger yeah
15:42 jb360_ joined #mojo
15:42 jberger but the point is (as I was saying to batman) I always want the code displayed in the talk to exist in the repository as runnable examples
15:43 jberger all the talks I give contain only runnable examples
15:43 jberger for several reasons
15:43 jberger first of all, they usually also have tests (because I display those too) and when they pass, they are working
15:43 genio I'm still eyeballs deep in WebRTC stuff for taking rtsp:// streams from ip cams and making them browser ready :/
15:43 jberger so I know when my slides break
15:44 jberger and also, because people might want to play with things starting for a real working example, and this makes it easy for them
15:44 jabberwok cheers jberger
15:44 jberger WebRTC sounds nice, but I mostly hear about it and rarely see it in action
15:45 frudas joined #mojo
15:47 jberger jabberwok: also, you don't have to emit them as static, you can serve them directly (which is the more supported option atm anyway)
15:47 genio Yea... there isn't much help out there.
15:48 genio I can use ffmpeg or gstreamer to convert the streams and serve them out via a web socket and do a little JS trickery to display the streams on a canvas, but that's...
15:48 batman sorry for running away... i was preparing a lightning talk...
15:48 batman *bbl*
15:49 jberger batman: that's cool!
15:49 Adura joined #mojo
15:49 jberger wish I could be there
15:49 * jberger should be working on YAPC::NA talk
15:50 jabberwok my main project is a multi-tenant CMS. the minor kerfluffle with set uid/gid security in mojo made me revert to thinking: users (often: $self) will compose content and send it (via web socket / database submission / other authenticated magic) to the actual server (in Mojo) - no uid/gid mess, and with a clear path to devel->test->production deployment, with rollback even. sort of a "journaled" cms. -- wish i had it now, WordPress
15:50 frudas hello there :)
15:51 frudas i have a little problem with mojo and jquery
15:52 frudas when i deploy the program the listener in jquery dont work
15:52 frudas :(
15:52 frudas http://paste.ofcode.org/nNwwRXQpZJMBz27dBjnqsm
15:52 frudas is a code for stop pause resume and kill a websocket
15:53 frudas any help thankx :)
15:53 jberger jabberwok: cool I'll be interested to see it
15:55 jberger frudas: please define doesn't work
15:55 frudas ok
15:55 frudas is just adapting the idea of this code
15:56 frudas http://jsfiddle.net/zrNV5/81/
15:56 mst jberger: oooooo
15:56 jabberwok aye aye.  -- the reveal examples are quite nice.  (( wanders off to ponder reformatting existing presentations ))
15:56 frudas :)
15:57 frudas the send button is working
15:57 frudas only
15:59 jberger frudas: one quick thing
15:59 jberger don't use the bundled jquery
15:59 basic6_ joined #mojo
15:59 jberger official no no
15:59 ajr_ joined #mojo
16:00 frudas jejeje any idea to do same things whitout jquery?
16:00 jberger just load one from Google cdn
16:02 jberger to your actually problem
16:02 jberger maybe try keeping the ws variable visible?
16:02 jberger I don't know, I'm not at my computer at the moment
16:03 frudas that is not for a internet webservice if for controling a machine
16:03 frudas that is not for a internet webservice is for controling a machine
16:03 frudas im just testing how i can pause stop resume javascript code
16:04 frudas with websocket  for the main software
16:05 jberger in that car it sounds like the backend is working and I know just barely enough front-end to know I should stay away
16:05 jberger perhaps someone else
16:05 purl perhaps someone else is interested
16:06 frudas :D
16:06 frudas so any way to force mojo to load jquery properly
16:06 frudas :)
16:07 frudas or i miss something
16:44 kaare joined #mojo
16:49 asarch joined #mojo
17:03 mattastrophe joined #mojo
17:51 kaare joined #mojo
18:05 batman WebRTC? http://appear.in ! :)
18:06 punter joined #mojo
18:16 dod joined #mojo
18:52 mattastrophe joined #mojo
18:55 frudas joined #mojo
19:49 punter joined #mojo
19:59 mattastrophe joined #mojo
20:25 ajr_ joined #mojo
21:30 mattastrophe joined #mojo
21:49 borkur joined #mojo
22:14 borkur left #mojo
22:23 gorfel joined #mojo
22:34 cpan_mojo Mojolicious-Plugin-SemanticUI-0.17 by BEROV https://metacpan.org/release/BEROV/Mojolicious-Plugin-SemanticUI-0.17
23:13 berov jberger: "don't use the bundled jquery" why?
23:18 pink_mist it's not guaranteed to be updated, and also, if it suddenly does get updated your stuff relying on it may suddenly stop working properly
23:19 berov pink_mist: thanks, I was thinking there is something more...
23:19 pink_mist there might be something more as well
23:20 pink_mist but that's plenty reason for me not to use the bundled one
23:21 berov well that is the same as dependency management with all Perl modules
23:59 mishanti1 On the topic of managing perl modules: we've been running with stratopan.com for a while. Fantastic service! Can absolutely recommend it.

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