Camelia, the Perl 6 bug

IRC log for #mojo, 2013-07-25

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

All times shown according to UTC.

Time Nick Message
00:01 good_news_everyone joined #mojo
00:01 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/0xyZdQ
00:01 good_news_everyone mojo/master ffdc824 Sebastian Riedel: better descriptions for a few collection methods
00:01 good_news_everyone left #mojo
00:02 sri holy shit is angular.js magical
00:48 tm joined #mojo
00:49 shmuel joined #mojo
00:50 tm hey guys, really quick question - I have an app that does a lot of db requests for the same piece of information that is not changing at all (can be treated as config data)
00:51 tm I'd like to move it from restful route to some other place so it's executed at start time - startup() comes to mind but is this a good place to do so?
00:58 hotsnow joined #mojo
01:17 gtodd is there an easy way to see the whole HTTP environment for a given request to mojo?  for debugging I'd sor of like that bottom of each page to have link that popped up a window full of such nonsense :-)  and I'm sure in mojo there's some ridicuously simple method where I call show_http_env->route('/whatever') or something like that ...
01:20 jberger_ sri: that's why I wish I from grokked using those js frameworks in a multipage app
01:20 jberger_ s/from//
01:56 Meiermann joined #mojo
02:01 d4rkie joined #mojo
02:43 jberger joined #mojo
02:50 dr joined #mojo
02:56 btyler joined #mojo
03:07 fildon__ joined #mojo
03:07 dr_ joined #mojo
03:20 dr joined #mojo
03:21 basic6 joined #mojo
03:32 preflex_ joined #mojo
03:40 jberger_ joined #mojo
03:50 hotsnow joined #mojo
03:51 jberger__ joined #mojo
03:56 hesperaux joined #mojo
04:17 jberger joined #mojo
05:16 batman tm: yes.
05:17 batman gtodd: what is the "HTTP environment"..? do you want to see the request headers or something?
05:24 Meiermann joined #mojo
05:45 Britzel_ joined #mojo
06:09 dotandimet joined #mojo
06:27 Mike-PerlRecruiter_ joined #mojo
06:54 marcus_ sri: I didn't mean nuthin' by it. Just found the json patch thing interesting is all.
06:54 nicolaas joined #mojo
07:16 dod joined #mojo
07:24 basiliscos1 joined #mojo
07:34 fhelmber_ joined #mojo
07:38 Vandal joined #mojo
07:41 dod joined #mojo
07:42 SmokeMachine joined #mojo
07:42 trone joined #mojo
07:55 jast joined #mojo
08:03 maxhq joined #mojo
08:13 shmuel_ joined #mojo
08:40 KindOne joined #mojo
08:49 jzawodn joined #mojo
09:36 wk joined #mojo
09:44 jast joined #mojo
10:26 sri marcus: ah
10:31 logioniz joined #mojo
10:37 asarch joined #mojo
10:48 bpmedley joined #mojo
10:49 batman i css'n
10:49 batman oops! wrong window :)
10:51 hotsnow joined #mojo
10:56 nicolaas_ joined #mojo
10:59 marcus So frickin' hot
11:01 iankent joined #mojo
11:02 iankent quick question! we have a route like /some/page/section, where "section" can be one of a predefined list of values. we're struggling to decide between, 1) having the section as a placeholder and validating it using a bridge (i.e. /some/page/:section), or 2) explicitly defining the routes for every section
11:02 iankent is there any performance gain/loss either way? whats the 'best practice' approach - the difference in route count could be in the hundreds (approx 50 pages, perhaps 5 - 10 "sections" per page)
11:05 sri more routes cost performance, but the route cache could make it not matter much, you have to try
11:05 * sri wonders why he has not done stuff with d3.js before, it's so pretty
11:06 iankent but if we chose placeholder, we have to validate at the bridge point anyway, which could also hurt performance. i'll try profiling, my personal dislike of the fixed routes is that it turns my routing table into a 10+ page list!
11:14 batman iankent: that doesn't sound right.
11:30 iankent batman: which bit?
11:30 batman "10+ page list with routes"
11:31 Vandal iankent, make one restrict route per section
11:31 iankent as in, when you go to a 404 page in dev mode and it lists all the routes, if we use fixed routes for each section the list is insanely long
11:32 Vandal *per page
11:32 iankent Vandal: thats our option, a placeholder route per 'page', or fixed routes per section/page - the first gives us about 40 routes, the second about 400
11:34 batman i would make it dynamic first and then static after benchmarking
11:34 batman pre-optimization is always the path to the dark side
11:35 iankent batman: making it dynamic was our preoptimization :) at the moment we only have around 40 routes with the fixed route option, but we know in a few months it'll be hitting 400+
11:35 iankent having said that, my preference was for dynamic anyway, its more concise and easier to follow whats going on in our routing setup
11:36 batman if that was your preoptimization...why do you want to change it into static routes?
11:36 iankent we had static routes, it was messy, we changed it to make it cleaner, then realised we may have performance gains one way or another so thought I'd ask
11:36 batman sounds like you try to make it faster..? faster == more optimized ... or?
11:37 iankent make it easier to understand tbh, but performance is always a consideration
11:37 batman don't make it anything faster before you need to.
11:37 batman s/it//
11:38 iankent thats what we're trying to do, but other parts of our code rely on the implementation of the routing, so while we don't generally pre-optimize, we also don't want to have to rework a lot of code in a few months time :)
11:39 iankent but, for now we'll go with dynamic I think, and stick profiling on the backlog :)
11:44 sri yea, don't guess, profile
11:45 sri depending on what your app does, you might not even notice a few thousand routes
11:47 iankent the app isn't much more than a web form interface to an API, so in terms of actual work done by the front-end part, the routing is becoming one of most significant parts :/
11:47 iankent but you're right, i'm starting to live by your don't guess philosophy!
11:54 batman my philosophy is really that nothing is too slow unless proven wrong :P
11:55 basiliscos joined #mojo
12:11 basiliscos joined #mojo
12:40 gtodd batman yeah something like that
12:40 batman gtodd: there's no magic thing that will show you "something like that" :(
12:40 gtodd if I run mojo inside the debugger or something :)
12:42 gtodd I will look at the little chrome plugin that tempire made
12:42 gtodd or maybe it was someone  else
12:44 gtodd years ago I used to use zope which had this console you'd go in ... and issue commands like log, debug, etc and then watch the requests and how the code handled them
12:45 * sri wanted to build something like that for mojolicious, live diagnostics with a websocket console for a hypnotoad cluster
12:46 gtodd oh my .... I forgot about websockets
12:46 gtodd I mean I forgot that they are a strong point for mojolicious ... that would be cool
12:47 gtodd FAQ Q: "How do I use websockets?" A: "You're using them right now!"
12:52 crab sri: tell me more
12:52 crab sri: (as in, i wouldn't mind working on something like that)
12:53 sri i have no concrete plan
12:54 sri but i'd imagine it to be a plugin that hooks into all kinds of layers to collect as much metrics as possible, which get sent to a central daemon and turned into pretty graphs there
12:55 crab hmm
12:55 sri not server specific, but hypnotoad could provide a few additional hooks through the config if there's a need
12:55 gtodd 1. blablla
12:55 gtodd 2. blablah
12:55 gtodd 3. *** pretty graphs there****
12:55 gtodd 4. KACHING!
12:56 sri http://hummingbirdstats.com # you know, fancy live graphs
12:56 sri possibly collect matching route strucutre, timing information and so on
12:57 gtodd nice
12:58 dod joined #mojo
12:59 gtodd I would worry that such a framework for monitoring Mojolicious when turned loose into the wild might end up monitoring and producing graphs of anything ... like once perl is involved people will start making graphs of *EVERYTHING* ...
13:01 ver joined #mojo
13:02 sri http://www.unionstationapp.com/tour # that kinda stuff
13:02 gtodd when  I say worry I mean .... the machines could turn every flow of data into a websocket and possibly use this to achieve consciousness
13:03 * sri wonders if there's a market yet for a commercial fancy analytics addon
13:04 gtodd ...  there's even still a market for commercial data storage ala dropbox
13:04 gtodd so I would say "probably"
13:04 moltar joined #mojo
13:05 gtodd it would be nice if mojolicious became the basis of several popular commercial applications :-)
13:05 gtodd as in step 4. above
13:05 gtodd but IANAMBA IANAPM
13:05 jast I suspect the default error pages in production mode are too... sophisticated for many commercial developers
13:06 crab IANAMBA IANAPM? huh?
13:06 jast I am not a [...]
13:06 crab a what?
13:06 jast MBA/PM
13:06 jast if you've never heard of those, you're pretty darn lucky ;)
13:07 crab master of business administration/prime minister.
13:07 crab (so says google)
13:08 jast project manager
13:08 sri pesky prime ministers
13:08 crab ah.
13:08 crab sri: thanks for the links
13:33 dod joined #mojo
13:41 btyler joined #mojo
13:54 libsysguy joined #mojo
13:59 gryphon joined #mojo
14:06 ryozi joined #mojo
14:07 phips|mac joined #mojo
14:11 chinaXing joined #mojo
14:12 russum joined #mojo
14:12 russum left #mojo
14:39 d4rkie joined #mojo
14:39 asarch joined #mojo
15:02 marcusie joined #mojo
15:08 chinaXing left #mojo
15:13 sh4 joined #mojo
15:17 Britzel_ joined #mojo
15:23 bluescreen joined #mojo
15:24 bluescreen_ joined #mojo
15:25 bowtie_ joined #mojo
15:50 doby joined #mojo
16:12 Britzel joined #mojo
16:33 libsysguy joined #mojo
17:10 moltar joined #mojo
17:22 marcus wirc on mobile is starting to get quite pleasant. http://db.tt/ZqItOtCQ
17:23 * marcus hasacquired a prepaid sim card in Croatia.
17:32 sri cute
17:34 sri your icons look washed out though
17:35 sri marcus: did you switch to android completely?
17:40 basic6 joined #mojo
17:45 libsysguy joined #mojo
17:54 marcus sri: I just added a task for rob to fix better icons and pick a less boring font, since we just switched from monospace.
17:54 marcus sri: No, I carry two phones.
17:54 marcus Because Ingress.
17:55 sri lol
17:55 marcus Thinking I should probably get something like a Samsung Note
17:55 marcus So the android has a bigger enough screen that it matters.
17:56 marcus I only use it as a computer anyways, not a phone.
17:56 marcus Guess the new Nexus 7.2 is kinda nice.
17:57 sri ubuntu edge :)
17:57 marcus It probably won't fit in my Nexus dock tho :/
17:57 marcus sri: Yeah, but due in May 2014...
17:57 sri yea
17:58 marcus Maybe Ubuntu Mobile will be nice by then.
18:01 dr joined #mojo
18:05 btyler joined #mojo
18:07 r0b3rt joined #mojo
18:28 marcus sri: is there any approved way to reset a mojo::base attr so it gets a new default value? delete $obj->{attr} seems a bit dirty.
18:28 sri ohoh, i accidentally a tweet only @hipsterhacker favorited so far :S
18:29 sri marcus: no
18:29 Mike-PerlRecruiter_ joined #mojo
18:30 * sri wonders if Mango needs a ->clone method or if it should have fork support
18:32 sri might also be worth thinking about the same for Mojo::UserAgent
18:33 sri ->clone is a lot easier to test
18:33 sri but requires the user to think
18:41 jnbek joined #mojo
18:57 moltar joined #mojo
19:06 KindTwo joined #mojo
19:07 marcus sri: I guess I should just use a method instead of an attr then. Copied your ->handle attr from Mojo::Log, but I need to change log files based on date.
19:13 tm joined #mojo
19:14 tm afternoon
19:16 nic I thought it was ok for the owning class to access ->{myattr} (when useful) and it was only outside the class that ->myattr was obligatory
19:16 batman is there a "Forgot your password" thing for rt.cpan.org ?
19:18 sri it's your pause password
19:20 batman oh. thanks!
19:20 batman about the washed out icons: yeah i know. doing some seriously bad hacking on my sprite.png background image :(
19:20 sri use a font
19:20 batman should have used the font-awesome font directly instead
19:21 batman exactly ;)
19:21 sri or the one that ships with bootstrap now
19:23 batman http://glyphicons.com/ ?
19:27 sri oh, it has been removed again Oo
19:28 KindTwo joined #mojo
19:29 sri https://github.com/twbs/bootstrap-glyphicons # i think it was this
19:37 sri ah, DBIx::Connector tests fork safety by localizing $$... wonder if that's a supported perl feature
19:49 KindOne joined #mojo
19:57 marcusie joined #mojo
19:57 batman :)
19:58 basic6 joined #mojo
19:59 Ralesk joined #mojo
20:02 dod joined #mojo
20:30 lukep joined #mojo
20:47 wk joined #mojo
20:53 basic6 joined #mojo
20:56 marcus sri: Like 'Under the Dome'? Just finished ep3, seems pretty decent so far.
21:02 dod joined #mojo
21:03 gryphon joined #mojo
21:06 jberger joined #mojo
21:11 basiliscos joined #mojo
21:16 stephan48 joined #mojo
21:52 rem_lex|pivo joined #mojo
21:52 basic6 my mojolicious apps have different controllers (like Classic, Documents, Extras...) and whenever i need a URL (for a link or redirect), i have to prepend the hardcoded controller name url_for('/Classic/overview') so i've written my own version (as hook) that just takes 'overview' as argument (within the same controller)
21:52 basic6 but i'm wondering if there's an official/better solution?
22:28 sri marcus: only seen the first two so far, seems nice, but i've heard the side stories get annoying later on
22:29 sri think i might wait and watch everything in one marathon :)
22:43 btyler joined #mojo
23:09 bluescreen joined #mojo
23:30 sri hmm, fork safety is pretty easy to add it seems
23:30 sri easier than ->clone actually :o
23:40 dsteinbrunner joined #mojo
23:45 basic6_ joined #mojo
23:47 sri https://github.com/kraih/mango/commit/7​eeac87446a066a6f22271142b1daf1cb111edfa
23:47 sri that should do
23:48 sri might be worth thinking about doing the same for Mojo::UserAgent
23:49 sri this means you don't have to lazy initialize Mango in the worker processes, but can just perform operations during startup without thinking about it
23:58 Adura joined #mojo

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