Matthew Draper

422 posts

Matthew Draper

Matthew Draper

@_matthewd

@[email protected]

Adelaide, Australia Katılım Ağustos 2008
81 Takip Edilen876 Takipçiler
Keith Pitt
Keith Pitt@keithpitt·
@toolmantim Yes this! Ruby wanted you to learn it. Ruby is the golden retriever of programming languages, where as Bash is like that old cat that really can’t be bothered anymore.
English
1
0
3
86
Keith Pitt
Keith Pitt@keithpitt·
There is a lot of gate keeping in the Bash community, I think it’s one of the things that’s held it back from growing. Most questions get an “RTFM” response in the form of “run this: man bash” Bash is the main UX that most developers use to communicate with their computer, and yet it’s still unloved and overlooked. Most projects on GitHub that attempt to make it better get forgotten, or folks end up switching to zsh. I wonder if there’s a way to make it more popular, or do we just give up?
English
1
0
5
434
Matthew Draper
Matthew Draper@_matthewd·
@jankomarohnic @nateberkopec Pubgrub was most of the gain in the resolver, yes. I haven’t kept up with Bundler dev in the time since, so probably totally out of date, but at the time, I believe Gel was also independently faster at download, install, and require… plus no need for ‘exec’
English
1
0
3
159
Nate Berkopec
Nate Berkopec@nateberkopec·
@tenderlove some people think about the roman empire. I think about the code that Matthew Draper has sitting on his hard drive, unpublished.
English
3
1
17
1.7K
Matthew Draper
Matthew Draper@_matthewd·
@nateberkopec Overhead of the actual hash lookup maybe, but I imagine it’d be dwarfed by query construction — at least outside the fast-path on .find
English
2
0
0
239
Nate Berkopec
Nate Berkopec@nateberkopec·
First APM for Ruby I think I've seen do this. Sentry will show queries in the trace which hit the ActiveRecord Query Cache. Pluses and minuses I think. I like it b/c I think more should be aware of this, minus because this probably doubles the overhead of the cache access
Nate Berkopec tweet media
English
3
0
18
3.5K
Matthew Draper
Matthew Draper@_matthewd·
@sj26 Unfortunately not… I got as far as quotes and have then been procrastinating. My designer recommended mathewsfurniture.com.au, who are not your brand of local, but might show the shape of company to look for? 🤷🏻‍♂️
English
0
0
1
37
Samuel Cochran.oci
Samuel Cochran.oci@sj26·
Why are modern couches so afraid to be comfortable.
English
2
0
5
348
Matthew Draper retweetledi
Keith Pitt
Keith Pitt@keithpitt·
Here are @buildkite’s internal engineering principles on how UIs should be built with our majestic @rails monolith:
Keith Pitt tweet media
English
3
16
106
9.4K
Matthew Draper
Matthew Draper@_matthewd·
@nateberkopec Except when building a subquery. Accidental where(..: ….pluck(..)) makes me sad.
English
3
0
15
962
Nate Berkopec
Nate Berkopec@nateberkopec·
ActiveRecord's pluck + select generate the same exact SQL, but have very different purposes and performance. Pluck creates a simple Ruby object, like an Array of Integers, but Select creates an array of ActiveRecord objs. Select, therefore, is usually slower. Pluck if you can.
English
7
9
130
14K
Matthew Draper
Matthew Draper@_matthewd·
@nateberkopec @tenlinesofcode @JacobDaddario Genuinely curious about the sorts of invocations you're seeing for relation.present? that don't lead straight into .each Previously fun-policed in #issuecomment-415960380" target="_blank" rel="nofollow noopener">github.com/rails/rails/is… — I haven't changed my mind yet, but you see more apps than I do, so maybe I'm missing some common pattern?
English
2
0
3
660
Nate Berkopec
Nate Berkopec@nateberkopec·
The ONE simple ACTIVE RECORD PERFORMANCE trick that DOCTORS don't want you to know about!
Nate Berkopec tweet media
English
8
18
187
34.1K
Matthew Draper
Matthew Draper@_matthewd·
@jhawthorn @tenderlove There’s also separately the small matter of “at 100+ max conns, you should almost certainly be using pgbouncer”… but that’s PG scaling wisdom rather than Rails. (And in a far future, with fine-grained/per-statement connection pooling inside AR, maybe not required?)
English
0
0
2
0
Matthew Draper
Matthew Draper@_matthewd·
@jhawthorn @tenderlove I want to make the AR pool unlimited by default, to save the “max = however many threads I intend to spawn” setting (now that we do scale down an idle pool). That leaves the DB-side limit, but I guess at least you’d be getting outright “server says no” errors then 🤷🏻‍♂️
English
0
0
3
0
Matthew Draper
Matthew Draper@_matthewd·
@tenderlove Urgh. Is it from a common enough model that you could potentially obtain a chunk of the centre console from a scrapyard?
English
1
0
0
0
Aaron Patterson
Aaron Patterson@tenderlove·
@_matthewd Ya, I've been searching high and low for a spec from BMW, but can't seem to find anything 😩
English
2
0
0
0
Aaron Patterson
Aaron Patterson@tenderlove·
Does anyone know a good way to make an accurate 2d stl of a real world object? I want to model the collar around this shifter so I can make a case that fits it, but I'm having a hard time finding a way to get an accurate representation
Aaron Patterson tweet media
English
16
0
8
0
Matthew Draper
Matthew Draper@_matthewd·
@tenderlove I think 3d laser scanning is a thing that sometimes co-exists with those "bring a file and 3d print your thing" places
English
0
0
1
0
Matthew Draper
Matthew Draper@_matthewd·
@_byroot That’s a stack dup not a string dup, though, so while imperfect I wouldn’t expect it to alone account for a real measurable difference?
English
1
0
0
0
Jean Boussier
Jean Boussier@_byroot·
Looking at the bytecode, it's a bit weird. Looks like interpolated strings are being duped, no clue why (yet). But that would probably explain the difference.
Jean Boussier tweet media
English
2
0
2
0
Jean Boussier
Jean Boussier@_byroot·
Ok, so I have a bit of time to look at this today. 🧵
Jean Boussier@_byroot

@kddnewton @joeldrapper I have on my personal todo list to look at interpolation performance. On paper you'd think it would be almost always faster than concatenation, but most of the time it's slower. It has one big advantage by being able to right size the string.

English
1
5
26
0
Matthew Draper retweetledi
Jean Boussier
Jean Boussier@_byroot·
Since this comes up often: IMO the rule of thumb for whether or not you should yank a gem release is: don't. Two exceptions: - The gem was pushed by an attacker who took over your account. - Legal reasons (e.g. copyright, etc). 1/4
English
1
6
23
0
Mauro Otonelli
Mauro Otonelli@mauro_oto·
@nateberkopec do you know whether this is "production ready" yet, has it been battle-tested, or just experimental for now?
English
2
0
0
0
Matthew Draper
Matthew Draper@_matthewd·
@searls At first glance I thought that emoji was a banana peel. Read into that as you will.
English
0
0
0
0
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
@rails @github @code @fatkodima @_byroot (:19-:27) We can build our schema & model just as before. This time, we need to inherit from `ActiveRecord::Base`. I didn't dig into why, but maybe there's some additional things to load if we want to use `ApplicationRecord`? Anyone want to share what they know? 😅
English
2
0
3
0
Thomas Countz 🤍
Thomas Countz 🤍@ThomasCountz·
Ok! so I got @rails forked and up and running with @github Codespaces, but I have no business hacking away on rails/rails, right? Who do I think I am?? Well, why don't you come with me while I funk around and find out!? [Intro Music 😅 💃 👇 🧵 🧵 🧵]
Thomas Countz 🤍 tweet media
English
3
9
72
0
Matthew Draper
Matthew Draper@_matthewd·
@ryanbigg I swear every time we fix something like this it quietly uncovers latent bugs for some people, and allows many more to write a nicer thing in future… but only hearing from all the people who insist the now-deprecated behaviour was clearly more correct is just so exhausting 😕
English
1
0
1
0