Camelia, the Perl 6 bug

IRC log for #mojo, 2012-09-06

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

All times shown according to UTC.

Time Nick Message
00:43 stephan48 joined #mojo
00:54 laouji joined #mojo
01:38 scott joined #mojo
01:52 zivester joined #mojo
01:58 d4rkie joined #mojo
02:08 noganex_ joined #mojo
02:16 abra joined #mojo
02:49 AmeliePoulain joined #mojo
03:52 xaka joined #mojo
04:30 good_news_everyone joined #mojo
04:30 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2rjfCg
04:30 good_news_everyone [mojo/master] even more xor_encode tests - Sebastian Riedel
04:30 good_news_everyone left #mojo
04:48 jmmills hey, is it normal behavior for morbo to clobber the MOJO_APP env?
04:48 sri define clobber
04:49 jmmills in a controller do a use Env [MOJO_APP]; and concat into a string
04:49 jmmills run it in morbo get an uninit warning
04:49 jmmills run it as daemon works like a peach
04:49 sri stay away from MOJO_ENV, its behavior is mostly undefined
04:49 sri umm
04:49 sri MOJO_APP
04:49 purl MOJO_APP is only around for backwards compatibility and will be gone in 4.0
04:50 sri !!!
04:50 jmmills really?
04:50 jmmills okay
04:50 sri it should be completely useless to you in recent 3.x releases
04:51 sri what are you using it for anyway?
04:52 jmmills I'm not, buddy of mine was giving a wtf on another network about why it was uninit and after taking a quick look at it I realized it was getting clobbered under morbo but not daemon
04:52 sri env vars without documentation are internal
04:56 jmmills roger, I've already chided him for testing a perl behavior using another packages ENV
05:11 Antisoche joined #mojo
05:11 good_news_everyone joined #mojo
05:11 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/r06n8A
05:11 good_news_everyone [mojo/master] simplified application detection - Sebastian Riedel
05:11 good_news_everyone left #mojo
05:20 arthas joined #mojo
05:27 laouji joined #mojo
06:06 memowe_ joined #mojo
06:34 alexeiras joined #mojo
06:42 Vandal joined #mojo
06:43 crab sri: hey, have you read this twelve-factor application thing from the heroku people?
06:49 crab btw, my command script still does $ENV{MOJO_APP} ||= 'MyApp'; before calling Commands->start. i can get rid of that now, right?
06:49 sri crab: nope, not seen it yet
06:49 sri crab: yes, generators switched to ->start_app() a long time ago
06:51 sri maybe we should just deprecate ->start, so people know they should switch
06:52 sri hmm... maybe just breaking it in 4.0 is better
06:52 sri since other stuff will break anyway
06:53 sri (the config plugins will generate different default names in some cases)
06:55 * crab ponders start vs start_app
06:56 crab interesting. when i switch from ->start to start_app('App'), it seems to switch debug logging on.
06:57 sri crab: you're making that up ;p ->start is a tiny wrapper around ->start_app https://github.com/kraih/mojo/blob/ma​ster/lib/Mojolicious/Commands.pm#L112
06:59 crab btw, the generator outputs: my $lib = join('/', @base, 'lib');
07:00 crab since you're using catdir on the next line anyway... hm. maybe not.
07:00 crab oh yes, catdir will work.
07:00 crab any reason why it shouldn't be changed?
07:04 crab hmm. what's the reason for this -e catdir(@base, 't') ? unshift(@INC, $lib) : push(@INC, $lib);? the unshift vs. push logic was introduced in a commit that just says "improved portability of scripts"
07:06 crab if we have a t directory, give our $lib precedence, otherwise not? how does this help scripts?
07:08 batman joined #mojo
07:15 sri crab: hypnotoad and morbo tests
07:17 sri i wouldn't touch lib portability tests without *a lot* of research
07:18 sri s/test/code/
07:18 sri took me like 10 releases to figure something out that's really portable
07:19 sri crab: re catdir... that's not portable i believe
07:20 sri baah... i really don't want to read up on that code, find out for yourself! ;p
07:20 crab really? but it's used on the very next line
07:21 crab i won't try to change it.
07:21 sri lib always uses /, -e is platform specific
07:21 crab but please, write more in commit messages. nobody is going to remember these things that took you a long time to work out a few years later, not even you.
07:22 crab i generated a new app and was just going through the code to bring my old scripts up-to-date, and i found that the
07:22 sri says the man who committed "Don't clobber $_ in xor_encode" :D
07:23 crab "it looks like you don't have the Mojolicious framework installed" message had gone away, to be replaced by a "require". fine. but why? "improved exception handling of all scripts"
07:24 crab sri: that was actually a stupid mistake, i was trying to paste in the bug number so github would link it, but i hit enter too soon or something. sorry.
07:24 sri none of our core devs produces good commit message
07:24 crab i am ashamed.
07:24 sri github links are not good anyway, what if we switch git hosts?
07:25 crab i'm ashamed enough already.
07:26 sri you're welcome to propose stricter rules for commit messages, but everybody would have to follow them
07:26 crab i don't know how to convert "include more background in commit messages" into a rule.
07:27 sri neither do i
07:28 sri linus enforces it by being the only one with a commit bit and OCD i believe :)
07:29 cosmincx joined #mojo
07:31 crab i really don't want to turn this into a commit-message-size war, but if you look at some of my commits (e.g. 02034bc5ff913d622dae51c3d3d72be905ed2841, f55a143c96a836426bf3887a145905e852a9e082), i've tried to include some explanation too. i don't know about rules, but i think everyone should try to follow the practice, definitely including me.
07:32 crab it's not possible to improve commit messages, or i would volunteer to do it.
07:35 crab there. my startup scripts have become shiny new.
07:36 sri re require change, i believe we had multiple complaints about hidden errors
07:36 sri i made a similar change for commands, they don't hide errors anymore either
07:39 crab hmm. i wonder if anyone's using my nice recipe for generating randomness.
07:43 crab i wish i could inject a new format method into the existing Mojo::Log object.
07:44 crab (that's why i currently replace the existing Log object, and i was just looking at switching to ->on(message => ...) instead. but it would mean copying even more code.)
07:44 crab oh well. replacing the object is ok for now.
07:45 sri i've thought about that too, but never found a pretty api
07:45 crab i wonder if any languages have a neat way to do something like that.
07:46 sri define "something like that"
07:47 crab "take the global log object and override <this part> of its behaviour (thought it didn't expect it)"
07:47 sri only for the object and not the class?
07:47 sri you can do that in perl6
07:47 sri apply arbitrary roles to instantiated objects
07:49 crab interesting.
07:50 crab i guess you can do it in javascript too
07:50 crab kinda sorta.
07:50 purl i guess kinda sorta is perhaps, almost, like maybe, y'know.
07:50 sri of course
07:51 Kwa joined #mojo
07:51 sri many popular node.js apis depend on it
07:51 rem_lex| joined #mojo
07:51 sri well... you can do it in perl5 too
07:52 sri https://metacpan.org/module/Package::Anon
07:52 sri pretty cool stuff
07:52 Netfeed crab: can't you do that in ruby?
07:53 sri Netfeed: only based on classes i believe, not instance
07:53 Netfeed maybe
07:54 sri oh, actually you can
07:54 sri def object.hello_world; puts "Hello World!"; end
07:54 sri cute
07:56 crab nice.
08:28 xxtjaxx joined #mojo
08:38 spleenjack joined #mojo
08:40 fhelmber_ joined #mojo
08:46 xxtjaxx joined #mojo
08:53 * crab tries to figure out local::lib
08:55 andrefs joined #mojo
09:06 xxtjaxx joined #mojo
10:02 daxim joined #mojo
10:23 xxtjaxx joined #mojo
10:37 Perl326 joined #mojo
10:37 basic6 joined #mojo
10:39 basic6 hi mojolicious users ... ?
10:41 vervain Howdy
10:45 basic6 I'm relatively new to Mojolicious and I'd like to see some good example applications (code)... any suggestions?
10:45 basic6 Basically I'd like to see where other people put which functions (MVC), how they're organized and such...
10:51 marcus basic6: https://github.com/tempire/MojoExample
10:51 batman basic6: http://mojocasts.com/e1
11:06 Lucas1 joined #mojo
11:13 xxtjaxx_ joined #mojo
11:22 memowe_ \o/
11:23 memowe basic6: a non-trivial lite app: https://github.com/memowe/boot​ylite/blob/master/bootylite.pl
11:35 ghandi joined #mojo
11:50 ryozi joined #mojo
12:11 Andrei666 joined #mojo
12:13 xxtjaxx_ joined #mojo
12:56 nour joined #mojo
12:57 nour yesterday when i mentioned that mojo uses a lot of virtual memory to run even with a naked freshly generated app someone said they tested and it was only using 20 some odd megs
12:57 nour who was that?
12:58 crab marcus
12:58 vervain <snap>
12:58 marcus yeah
12:58 marcus it was me
12:58 nour i just tested again with both hypnotoad and morbo and it uses ~90 megs for the manager and ~80 for the worker
12:58 vervain Lite or Full?  I'll run my own test
12:59 nour as for resident memory, yes it's within the 10-25 meg range
12:59 nour full
12:59 nour but i'm interested in how you're getting such low consumption on virtual memory marcus
13:00 marcus 1. who cares about virtual memory 2. http://nordaaker.no/docs/skitch/Ac​tivity_Monitor-20120906-150018.jpg
13:00 nour didn't you say yesterday "virtual memory is everything"
13:00 nour ?
13:00 nour or someone else ?
13:00 purl someone else is the compiler.
13:01 crab nobody said virtual memory is everything.
13:01 marcus virtual memory includes swap
13:01 marcus real memory is ram
13:01 nour someone said virtual memory consumption is what counts
13:02 nour what is resident memory ?
13:02 marcus nour: actual ram
13:02 crab marcus: is this os x?
13:02 marcus crab: yeah
13:02 crab because how is your VSZ smaller than RSS?
13:02 crab they must be different values, or os x must account differently somehow.
13:06 crab anyway, worrying about VSZ is a waste of time.
13:09 nour true enough
13:09 marcus got 99 problems but VSZ ain't one
13:12 pingup3rl joined #mojo
13:17 gryphon joined #mojo
13:18 bluescreen joined #mojo
13:22 jnap joined #mojo
13:34 inokenty joined #mojo
14:19 andrefs joined #mojo
14:39 knshaum joined #mojo
15:11 zivester joined #mojo
15:17 xaka joined #mojo
15:31 pingup3rl joined #mojo
15:38 d4rkie joined #mojo
15:55 rihegher joined #mojo
16:01 labrown joined #mojo
16:07 Lucas1 joined #mojo
16:12 abra joined #mojo
16:17 rihegher Hi all
16:17 rihegher I'm trying to implements websockets using mojolicious::Lite
16:18 rihegher So far it's working ok to send and receive text messages
16:18 batman joined #mojo
16:18 rihegher but I'm not sure how to send and receive binary data
16:19 rihegher I've checked the doc and found the functions $tx->server_read et $tx->server_write
16:19 batman left #mojo
16:19 rihegher But I can't find any code sample using it
16:20 batman joined #mojo
16:21 rihegher and I'm quite new with mojolicious I found it hard to figure out how to use it as this is not managed like an "onmessage" event.
16:22 rihegher Any help to point me to a sample or to help understand how it works would be appreciated
16:35 alexeiras joined #mojo
17:02 rihegher left #mojo
17:11 good_news_everyone joined #mojo
17:11 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/4CGQ-Q
17:11 good_news_everyone [mojo/master] more WebSocket examples - Sebastian Riedel
17:11 good_news_everyone left #mojo
17:18 andrefs joined #mojo
17:22 sri apache is heading into awkward territory there https://github.com/apache/httpd/commit/a​381ff35fa4d50a5f7b9f64300dfd98859dee8d0
17:40 jnap joined #mojo
17:42 stephan48 what sucks.
17:42 purl and swallows
17:42 stephan48 that*
17:50 pingup3rl joined #mojo
18:22 zeke joined #mojo
18:35 rem_lex|pivo joined #mojo
18:41 * tempire jigs
18:45 tempire Github's ui says "Great commit summaries are 50 characters or less"
19:00 stephan48 aha?
19:00 purl i think aha is a different band
19:03 dwierenga joined #mojo
20:05 xaka joined #mojo
20:26 good_news_everyone joined #mojo
20:26 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rh_z-w
20:26 good_news_everyone [mojo/master] documentation tweaks - Sebastian Riedel
20:26 good_news_everyone left #mojo
20:48 good_news_everyone joined #mojo
20:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ld-T5w
20:48 good_news_everyone [mojo/master] better Mojo::Base example - Sebastian Riedel
20:48 good_news_everyone left #mojo
22:35 augensalat joined #mojo
22:59 * sri wonders why we have not deprecated all the _escape functions and methods yet for _encode ones
23:02 mandreacchio joined #mojo
23:06 sri stuff like url_escape and xml_escape should really be url_ecndoe and xml_encode
23:06 jzawodn joined #mojo
23:07 mandreacchio_ joined #mojo
23:33 pingup3rl joined #mojo
23:43 mandreacchio joined #mojo
23:49 mandreacchio_ joined #mojo
23:52 mandreacchio_ joined #mojo
23:53 sri guess it doesn't matter

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