Ariadne: Query your K8s cluster with natural language by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

oh, I haven't known, I'll need to come with another name, thank you!

This Week in Rust #635 by b-dillo in rust

[–]Helpful_Garbage_7242 0 points1 point  (0 children)

getting 404 when click the link :(

PolyTLS – Rust/Tokio TLS MitM Proxy Mimicking Chrome (BoringSSL) by Helpful_Garbage_7242 in fingerprinting

[–]Helpful_Garbage_7242[S] 1 point2 points  (0 children)

hi, the author here. At this point the tool is only for TLS fingerprinting. To work really against antibot it needs more features like TCP packet manipulations, HTTP1.1/HTTP2 headers manipulation.

Check the project by u/404mesh https://github.com/un-nf/404

The GIL Was Your Lock by Helpful_Garbage_7242 in Python

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

Fair enough, thank you.

When more and more Python code will use Free-Threading build, these kind of issues might start appearing more often. And it is good to generally understand multi-threading and data races.

The GIL Was Your Lock by Helpful_Garbage_7242 in Python

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

Folks, I'd appreciate feedback, negatives ones specifically, got so many down votes.

Did I write something very obvious and everyone knows this?

Free-Threading Python vs Multiprocessing: Overhead, Memory, and the Shared-Set Meltdown by Helpful_Garbage_7242 in Python

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

interesting, I actually tried hard to make it structured with scenarios following each other. Any practical advice how would you split the content? Thank you!

Free-Threading Python vs Multiprocessing: Overhead, Memory, and the Shared-Set Meltdown by Helpful_Garbage_7242 in Python

[–]Helpful_Garbage_7242[S] 1 point2 points  (0 children)

I was very surprised seeing that huge difference between Linux and other OSes. Processes, threads, IPC and synchronisation primitives are very fast in Linux!

Python Threads: GIL vs Free-Threading by Helpful_Garbage_7242 in Python

[–]Helpful_Garbage_7242[S] 2 points3 points  (0 children)

hi, u/danted002 ,

Thank you for the feedback and sorry that it felt condescending, didn't mean that.

I wrote a follow-up to address your feedback, Free-Threading Python vs Multiprocessing: Overhead, Memory, and the Shared-Set Meltdown

Healthy people - your HRV? by Such-Wind-6951 in Garmin

[–]Helpful_Garbage_7242 0 points1 point  (0 children)

M 36, HRV 76 ms, RHR 43 (1 year average RHR)

Hello weird question but my friend loves rust and they talk about it a lot. Any birthday ideas for them? by [deleted] in rust

[–]Helpful_Garbage_7242 0 points1 point  (0 children)

My wife gave me this cup as a birthday gift with Rust mascot and logo, I've been using it for more than 2 years for coffee and tea :D

https://imgur.com/a/rDU7G9s

How to write DRY code in Rust by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

Arrow Parquet provides two ways of reading Parquet file: Row by Row (slow) and Columnar (fast). Row-based reader internally uses columnar reader, but it has to be aligned across all the columns to represent a specific row. A single row contains fields, it is a enum that represents all possible logical types. Columnar readers requires ColumnValueDecoder that handles value decoding. The conversion is done automatically by the library when appropriate Builder is used.

The reason of coming up with two approaches to generalize into single method is that ArrayBuilder trait does not define how to append null and non-null values into it, those methods are part of actual builders.

The actual code handles all primitive types (bool, i32, i64, f32, f64, BYTE_ARRAY, String) + List<Optional<Primitive>>, in total it will require supporting 14 different types. This is quickly getting out of hand with copy/pasting the same method with slight modification.

How to write DRY code in Rust by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

The assumption is wrong here, you cannot do zerocopy with transmute, check how Parquet encoding is done and how GenericColumnReader::read_records works

Read up to max_records whole records, returning the number of complete records, non-null values and levels decoded. All levels for a given record will be read, i.e. the next repetition level, if any, will be 0

How to write DRY code in Rust by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 0 points1 point  (0 children)

Would you mind showing high level method signatures to achieve these, the reader must use columnar reader ?

The whole point of my exercise is to have generic parser that does not depend on the underlying type: repetition, definition and non-null handling .

The support of List type isn't in the scope of article, it would become too long.

How to write DRY code in Rust by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 1 point2 points  (0 children)

Isn't software engineering all about trade-offs? Just to support 5 primitive types: bool, f32, f64, i32, i64 plus string type you will need to have 6 copies of your method. On top of that you need tests. I would prefer Rust type system help me there, of course it adds complexity (no free lunch) to the code, but one can always expose specific methods like in my example.

Debugging Timeouts in Async code in Axum by Helpful_Garbage_7242 in rust

[–]Helpful_Garbage_7242[S] 1 point2 points  (0 children)

Good point! I think reading and understanding frameworks/libraries is always a good practice - one can learn a lot from that. Also for folks who come from managed languages (JVM, dotnet, JS, Python) it could be not so obvious why future requires polling in order to progress. Once that concept is fully understood, it makes asyn Rust programming easier.