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

IRC log for #mojo, 2016-05-30

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

All times shown according to UTC.

Time Nick Message
01:10 marty joined #mojo
01:55 ivi joined #mojo
02:45 noganex joined #mojo
04:42 mpapec1 joined #mojo
05:17 indianowl joined #mojo
05:34 inokenty-w joined #mojo
05:36 dod joined #mojo
05:41 dod joined #mojo
05:54 mpapec regarding code style, is there some rule when to use shift(), and when $_[X]?
05:54 mpapec https://github.com/kraih/mojo/blob/master/lib/Mojo/EventEmitter.pm#L25-L27
06:03 preaction mpapec: speed and aliasing
06:06 mpapec hm, didn't notice aliasing usage
06:07 preaction because it's usually pretty terrible to do
06:07 mpapec :)
06:09 mpapec as for microoptimisations,
06:09 mpapec @{$self->{events}{$name}} = grep $cb ne $_, @{$self->{events}{$name}};
06:09 mpapec might be better than https://github.com/kraih/mojo/blob/master/lib/Mojo/EventEmitter.pm#L51
06:11 mpapec but I guess that depends on where bottlenecks are
06:16 dod joined #mojo
06:29 cpan_mojo Mojo-Webqq-1.8.0 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.8.0
06:53 mib_8mtat6 joined #mojo
07:07 dod joined #mojo
07:12 sri mpapec: if you have a performance optimization send a pull request with benchmark
07:14 punter joined #mojo
07:18 trone joined #mojo
07:20 cpan_mojo Mojo-Pua-0.002 by ALEXBYK https://metacpan.org/release/ALEXBYK/Mojo-Pua-0.002
07:32 Vandal joined #mojo
08:25 McA joined #mojo
08:32 mpapec sri: without profiling benchmark is not much useful as the result depends on size of @{$self->{events}{$name}}
08:33 mpapec but as general rule of thumb, working with existing array is better than creating new one
08:33 Hippan joined #mojo
08:36 ATog joined #mojo
08:48 sri mpapec: you mean you're too lazy to do a benchmark ;p
09:25 dhg joined #mojo
09:28 Dandre Hello,
09:28 Dandre Is there any way to have only one Mojo::Cache object for all my hypnotoad processes. Or is there a better suited approach?
09:47 pink_mist Dandre: objects cannot be shared between different processes in perl. at least not as far as I'm aware.
09:54 sri umm, is he contradicting himself here? https://github.com/kraih/mojo/issues/963#issuecomment-222390562
09:55 sri the whole issue is so weird
09:56 sri his error is exactly because of the silly use of Mojo::DOM::CSS
10:01 mpapec sri: actually it is fine as it is ;)
10:01 mpapec https://gist.github.com/mpapec/837f9457b61738430fc74c34b93d6732
10:42 sri hmm, tv GoT coldhands seems a little cheap
10:47 Kripton joined #mojo
10:49 kaare joined #mojo
11:16 punter joined #mojo
11:38 Jonis can go nowhere without GoT spoilers today :(
11:50 mib_6nqpqd joined #mojo
11:50 mib_6nqpqd Jonis: <SPOILER> Kingslayer murders Dumbledore!!! </SPOILER>
11:52 coolo oh shit
11:52 Jonis lolwat
12:21 marcus spoiler no spoiling!
12:21 marcus https://torinelson.files.wordpress.com/2013/11/swiper2.jpg
12:28 tchaves joined #mojo
12:31 Dandre pink_mist: ok
12:35 coolo joined #mojo
12:35 Dandre in my case I need to use data from a Mongodb database mostly using readin operations. The reading process is quite heavy so I have tried to use an in memory cache with some package variable. On a write operation I clear the cache for that entry. This is working well with morbo but under hypnotoad where there are more than one process I have one cache per process ans my data are possibly not in sync.
12:35 Dandre Is there an alternative?
12:42 coolo joined #mojo
12:49 mpapec Dandre: memcached or redis comes to mind
12:49 mpapec btw, isn't Mngo suitable for caching?
12:49 mpapec *Mongo*
12:51 Dandre maybe but I read from Mongo and then prostprocess my data. It the postprocess that is intensive
12:52 mpapec then caching after postprocess?
12:52 mpapec that is, caching in Mongo after postprocess
13:04 ramortegui joined #mojo
13:06 marty joined #mojo
13:09 dvinciguerra joined #mojo
13:11 Kripton joined #mojo
13:12 marty joined #mojo
13:22 McA joined #mojo
13:31 cpan_mojo Mojo-Pua-0.003 by ALEXBYK https://metacpan.org/release/ALEXBYK/Mojo-Pua-0.003
13:46 Adura joined #mojo
13:47 zivester joined #mojo
13:52 jberger Dandre: look at CHI, especially https://metacpan.org/pod/CHI#compute-key-options-code
14:00 itaipu joined #mojo
14:06 Dandre Ok thanks, I am reading Cache::FastMmap which seems interesting in my case
14:07 coolo I wonder what magic is required to have morbo redo assetpacks while developing
14:07 * coolo finds himself killing morbo way too often
14:08 jberger Dandre: fastmmap is mostly good, though it has some size limitations
14:08 jberger Be sure you understand those
14:10 coolo hah, now that I said it aloud: -w public/javascripts does the trick
14:10 dantti_laptop joined #mojo
14:15 Dandre ok I'll check them all
14:16 sri hahaha, looks like i was not the only one https://twitter.com/davorg/status/736154748571680768
14:16 sri booking really gotta up their game
14:26 genio What's wrong with bringing in junior level people who are willing to learn?  Or is this more that they're hitting people who are very familiar with Perl and that message?
14:28 sri latter
14:29 sri they have recruiters exclusively for tech jobs inhouse
14:29 sri and they still just spam everyone
14:33 jberger genio: do you know davog?
14:33 jberger davorg even
14:33 jberger He does perl training
14:34 jberger It's like asking sri if he knows how to build a webapp
15:09 mpapec Dave Cross? http://stackoverflow.com/users/7231/dave-cross
15:36 ramortegui left #mojo
15:36 PryMar56 joined #mojo
16:15 punter joined #mojo
16:23 dvinciguerra joined #mojo
16:33 jberger yess
16:33 jberger s/s//
17:10 trone joined #mojo
17:34 itaipu joined #mojo
17:37 PryMar56 joined #mojo
17:38 dod joined #mojo
17:39 mpapec any recommendations on scalability topic?
17:40 jberger mpapec: you're going to have to be more specific than that
17:40 mpapec are there systems which inherently can't scale?
17:41 jberger wars on multiple fronts?
17:41 mpapec ? :)
17:42 mpapec ok, in network realm
17:42 mpapec how to measure scalability
17:42 preaction toss a bunch of network at it and see how it scales
17:42 mpapec eg. elixir/phoenix vs. golang/something
17:43 jberger The question is always developer time vs performance required
17:44 jberger Perl is much easier for me to write than Go
17:44 mpapec yes, that is true
17:44 mpapec I'm not sure why https://en.wikipedia.org/wiki/Scalability
17:44 jberger I can usually make up for the performance hit of a dynamic language with a little more hardware
17:44 mpapec does not mention developer time
17:45 jberger But if i don't ever get the system written then scalability is zero
17:45 preaction because developers don't scale
17:45 jberger Of course if you are doing HFT then maybe it is worth learning to use the very fastest thing
17:45 jberger But in all else consider the trade offs
17:45 mpapec hf trading
17:46 mpapec ?
17:46 jberger Do you really expect Google scale traffic immediately
17:46 preaction high-frequency trading
17:46 jberger (Yes high frequency trading)
17:46 mpapec how do you mean to scale immediately?
17:47 jberger Asking the question of scaling in the abstract is almost certainly premature optimization
17:48 mpapec why I'm asking on this topic
17:48 jberger What is it you are trying to do?
17:48 mpapec you can pick almost anything and make it scale
17:49 jberger Are you dancing around some actual question or are you asking in the abstract intentionally?
17:49 jberger If the former, I'll have to bow out
17:49 jberger Sorry, if the latter i mean
17:50 mpapec jberger: there are a lot of benchmarks on the internet
17:50 mpapec and I'm wondering if they make any sense
17:50 mpapec and what should be the metric
17:50 jberger Microbenchmarks are rarely useful
17:51 jberger Case studies might be but they rarely can be compared apples to apples
17:51 mpapec how to measure the things
17:51 jberger What things?!
17:51 mpapec various frameworks
17:51 mpapec if you can't measure them
17:52 jberger To a first approximation the bottleneck is always the database
17:52 mpapec then any of them is good enough
17:52 jberger That's my view
17:52 mpapec ok
17:52 jberger So i like to use Mojo because i like perl and Mojo is in my opinion the best perl web framework
17:53 sri don't conflate performance and scalability
17:53 mpapec fair enough
17:53 sri mojo apps *scale* pretty easily since you can usually just add more servers indefinitely
17:53 mpapec sri: can you recommend reading regarding these two topics?
17:54 mpapec btw
17:54 sri afraid not
17:54 mpapec are there some systems that can't scale by adding more servers?
17:55 sri performance does make it easier to scale, since faster is usually better, but it's not a requirement
17:55 mpapec like Sinatra, Dancer,.. ?
17:55 jberger mpapec: you might look at scaling case studies from well known websites
17:55 sri databases tend to scale less easily
17:55 jberger I've seen some interesting ones lately, I wish I could remember from where
17:56 mpapec please post them if you stumble upon them
17:57 mpapec I've read something regarding LinkedIn
17:57 jberger here's one: http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
17:57 mpapec tnx
17:57 jberger but framework is rarely the problem IMO
17:58 jberger yes one or the other might get more RPS, but just make up for it with more hardware in that case
17:58 sri yea, from the framework you want primarily that it keeps things maintainable
17:58 mpapec ok, so cost of harware is the main issue
17:59 sri database is a bigger decision
17:59 mpapec *hardware*
18:00 jberger I acutally am a little surprised at how hard it is to multi-master posgres
18:00 jberger we are using governer now
18:00 jberger but that is still just hot-failover
18:00 mpapec how many pg servers?
18:00 jberger I think we have 3 for quorum
18:00 jberger but I'd have to ask my devops guy
18:01 sri i guess sometimes performance can make a big difference, like choosing TT for templates, which can become an actual bottleneck
18:01 sri with proven frameworks that's rare though
18:01 jberger we are still in development though, and even then this is an internal tool so master-slave(s) is ok for us
18:01 jberger TT is a bear
18:01 mpapec :)
18:02 mpapec I hope NYTProfiler plugin can show that
18:03 sri argh, ups is delaying the delivery of the replacement macbook :(
18:03 sri earlier it said tomorrow, now it says day after tomorrow
18:04 jberger buy a bluetooth keyboard and work from your phone!
18:04 * jberger ducks
18:05 sri i... don't... even... wat?!...
18:05 mpapec what would be hardware quality wise equivalent for win lap?
18:05 jberger laptop?
18:05 mpapec hehe
18:05 mpapec yes
18:05 jberger any server that fits in a rack :-P
18:06 jberger probably most VPS hosts too for that matter
18:06 mpapec I mean, you know what do i mean :)
18:06 sri but what do you mean?
18:06 mpapec macbook equivalent with windows10
18:06 anparker rack server would be a bit heavy for a laptop :)
18:07 mpapec so I thought
18:07 jberger mpapec: are you still talking about your theoretical scaling exercise or are we talking about personal hardware now?
18:07 mpapec sri mentioned hiw macbook
18:07 sri mpapec: i looked at the sufrace book and dell xps 13
18:08 sri *surface
18:08 jberger ok, sorry, I thought you were still talking about scaling
18:08 sri would have gotten a surface book if it was in the budget
18:08 mpapec similar displays as with mac?>
18:08 sri yea
18:10 mpapec my coworker says mac touchpad is a few orders of magnitude
18:10 sri he's right
18:10 mpapec better than anything in pc area
18:10 mpapec heh
18:10 sri hehe, i said the same a few days ago here, it's all about the touchpad
18:11 sri from what i hear the surface book is very close though
18:11 mpapec nice!
18:11 sri which suggests that software is to blame
18:11 mpapec so, if you're to install win10 on macbook
18:11 sri maybe microsoft will get its act together with the experience gained fromt he surface book
18:12 anparker maybe it's drivers and not touchpad
18:12 mpapec it would work teribly?
18:12 sri yea, the macbook touchpad becomes trash with windows10 ;p
18:12 mpapec I hope so
18:12 mpapec I'll tell him that :D
18:12 sri tried it a few weeks ago
18:12 anparker I run hacjintosh on okd laptop and it's works bettter than win
18:12 mpapec that his hardware has no magic in it ;)
18:13 mpapec didn't know that
18:13 sri doesn't really make a difference though, as long as touchpad drivers on windows suck
18:15 mpapec so installing win10 on macbook is wasted money
18:15 sri well, if you need it for testing you don't really have a choice
18:16 sri but you can dual-boot
18:16 mpapec anparker: which model?
18:16 mpapec ok, and paralels are handy too I guess
18:17 sri i'm really curious what they will change on the 2016 macbook pro
18:17 mpapec (which laptop models you are using for htosh)
18:17 sri oled touch strip is kinda interesting
18:18 sri not that i think i'd really use it ;p
18:18 mpapec it would be still glossy?
18:18 sri the rumor is that they will replace the f* keys with an oled touch strip
18:19 preaction er... that's context aware or something?
18:19 sri so every program can have its own special keys
18:19 sri yea
18:19 mpapec I don't believe in this oncept
18:19 preaction that sounds like exactly the opposite of what i want, but yes, i guess it is interesting
18:19 mpapec *concept*
18:20 anparker mpapec: asus z99-something with cpu upgraded to core2. and that thing is *realy* old)
18:20 sri hehe, i don't really want it either, but i like the idea of trying something new
18:20 mpapec anparker: great if all drivers work as they should
18:21 sri lenovo did it first though http://core0.staticworld.net/images/article/2014/04/lenovocarbonx1_5-100258974-orig.jpg
18:21 sri maybe apple will do it right now? ;p
18:21 mpapec the thing is you can't be sure you've pressed the button
18:22 preaction sure, there are buttons i could do without, but there are buttons that i don't want to move, too
18:22 preaction eh, feedback is pretty easy to do. the current mac f-buttons all have a screen feedback when you press them
18:23 preaction i'm more interested in that home/end where capslock should be. that's useful
18:23 sri indeed, capslock is a huge waste of space
18:25 mpapec it looks more important than cursor keys for apple
18:26 mpapec http://www.imore.com/sites/imore.com/files/styles/larger/public/field/image/2015/10/how-to-pair-magic-keyboard-apple-tv-screens-02.jpg?itok=HDJ132y8
18:26 jberger They should move esc to that spot, where it is supposed to be!
18:27 sri i liked the old apple arrow keys more
18:28 sri http://i.imgur.com/iVqxk.jpg
18:28 mpapec hm, it would be difficult to Alt-Tab
18:28 mpapec if Esc and Tab would switch places
18:28 preaction no, esc and capslock
18:29 mpapec sri: anything looks better than what I've posted
18:29 mpapec preaction: ah, my bad
18:48 punter joined #mojo
20:15 dmanto joined #mojo
20:24 itaipu joined #mojo
20:43 sri funny idea for syntax highlighting https://asvd.github.io/microlight/
20:46 preaction huh, that does look nice
20:48 jberger could it really tell // the comment from // the perl defined-or
20:48 jberger you still need to parse something
21:23 punter joined #mojo
21:44 punter joined #mojo
22:26 disputin joined #mojo
23:18 dhg joined #mojo
23:50 jwang joined #mojo

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