Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jstrong
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
151.
▲
by
jstrong
7y ago
it doesn't seem to me that your reading of brundolf's post is very generous. the post doesn't mention explicitness at all, but says that increasing the number of syntaxes that can be used for the same purpose increases mental
152.
▲
by
jstrong
7y ago
I've had good luck in the past using From<T> and TryFrom<T> to go from State<A> -> State<B>. It's similar to what you propose insofar as there are only some transitions defined, just relying on the built
153.
▲
by
jstrong
7y ago
for reusing code between states, did you try impl blocks that are generic over the state type parameter? for struct State<T> { state: T } with possible states struct A { id: Uuid } struct B { id: Uuid } use a tra
154.
▲
by
jstrong
7y ago
the article includes a section on the state as a generic type parameter, though? in general, state as a type parameter is useful when there's some data that you want for every state (say, unique id, time of event), so those can be norm
155.
▲
by
jstrong
7y ago
I consider myself a Steve Klabnik fan and even I was surprised to see this at the top of HN haha. Just goes to show you can never really predict how these things will go.
156.
▲
Productive Rust: Implementing Traits with Macros
(jstrong.dev)
2 points
by
jstrong
7y ago
|
0 comments
157.
▲
by
jstrong
7y ago
"Yeah, but your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should." -Dr. Ian Malcolm
158.
▲
by
jstrong
7y ago
perhaps he should have offered even one example where the borrow checker forced a "more complex" design. over time, I've come to realize the types of design decisions the borrow checker guides you to make are excellent for pr
159.
▲
by
jstrong
7y ago
I don't think your "11%" is the best representation of the data. black sheep (python): 101,508 req/sec actix (rust): 886,499 req/sec yes, 101508/886499 = 0.11 but your "x is % of y" doesn't seem
160.
▲
by
jstrong
7y ago
the hardware profile is listed in each row, also, the guy is totally meticulous!
161.
▲
by
jstrong
7y ago
I think of influx performance as similar to pandas. It's fast enough for many things it was designed for, but it's pretty easy to hit a performance cliff. In particular, "select * from table" type queries are very slow,
162.
▲
by
jstrong
7y ago
right but the cookie request can just as easily be ignored if you'd like. there's no gun to your head to "take this cookie OR ELSE!" if you walk into the local deli and there's a sign-up sheet to receive updates abo
163.
▲
by
jstrong
7y ago
when a user logs in, it's consent when a user sends a http request to a remote server with a client that saves cookies on their behalf, it's not consent? not arguing with you, per se, I just don't understand how sending a req
164.
▲
by
jstrong
7y ago
I just did a simple benchmark: 67 million rows, integers, 4 columns wide, with postgresql 10 and pandas. pg 10 huge=# \timing on Timing is on. huge=# copy lotsarows from '~/src/lotsarows/data.csv' with csv h
165.
▲
by
jstrong
7y ago
ok, so 20k * 60 minutes * 24 hours * 365 days * 3 years = 31,536,000,000 rows. You are querying 31.5 billion rows on a machine with 4 cores and 8gb ram? Are queries that return in 5-10 seconds running over the entire table? or small portion
166.
▲
by
jstrong
7y ago
is the database server running on a $700 workstation? how many rows? what types of queries? what is a typical query execution time? interested in your response because I generally find RDBMS performance quite poor, although I've never
167.
▲
by
jstrong
7y ago
this is not a laptop, or new, but thought relevant: used Dell Precision workstation, 2x 14-core xeons, so total 28 physical cpu cores (also your cpu isn't throttled all day so it can fit inside a tiny box) with 64gb ddr4: $1700 on ebay
168.
▲
by
jstrong
7y ago
one thing that confused me, why does incrementing an integer require returning a future?
169.
▲
by
jstrong
7y ago
what kind of design do you have in mind? I assume you don't mean simultaneous reads/writes from multiple threads without synchronization - yolo! there's a lot of possible designs, mutex, read/write lock, concurrent hashm
170.
▲
by
jstrong
7y ago
one related point: the article mentions utilizing rust's BTreeMap, which manages its heap allocations with cache efficiency in mind: https://doc.rust-lang.org/std/collections/struct.BTreeMap.ht... . The guts o
171.
▲
by
jstrong
7y ago
> I haven't benchmarked this yet if you don't measure, you're just guessing. > after my first experiences with somewhat complex data transformations in numpy and pandas there are fast ways and slow ways to use numpy
172.
▲
by
jstrong
7y ago
> Also it's fast as hell compared to what? excel?
173.
▲
by
jstrong
7y ago
this is generally not a matter of concern for a copy on write filesystem like zfs, since it's not possible for the file to be in an "in between" state. If a write were in progress, the filesystem would still be pointing to th
174.
▲
by
jstrong
7y ago
> I know you guys are going to want to crucify me for saying a lot of this thankfully for you, you live in a place where you can't be put in prison for expressing an unpopular idea.
175.
▲
by
jstrong
7y ago
> Reading this was like watching someone you don't politically agree with doing comedy. You know they're trying to be funny, but you also know they're missing the whole point and aren't self-aware. are you not suppose
176.
▲
by
jstrong
7y ago
note: doing anything on a 250gb file in python will require a lot more ram than 250gb. generally my expectation is I will need 10x the ram as the size of the file when using pandas, for when I accidentally do something that triggers patholo
177.
▲
by
jstrong
7y ago
in my mind, the facebook policy is limited in ways that mitigate the problems you present. the "hands off" policy (as I understand it) only applies to elected officials, meaning there is some level of inherent accountability (in s
178.
▲
by
jstrong
7y ago
do people say, "a table saw is simple and intuitive"?
179.
▲
by
jstrong
7y ago
I use the evcxr repl all the time. It has some rough edges but it's incredible to finally have a rust repl that's functional. I had been using rusti on an ancient rustc. One thing I really like is that you can add a crate with one
180.
▲
by
jstrong
7y ago
I've spent a lot of time writing python ML code, and I think 99% (of time inside fast C/cuda code) is much higher than most programs achieve. Off hand I'd say 80% is average and 90% is good (usually comes after a performance
More ›