tinkralge

joined 2 years ago
[–] tinkralge@programming.dev 1 points 8 months ago

Thanks for reporting. I hope it'll get resolved!

[–] tinkralge@programming.dev 1 points 8 months ago

Man... that's unfortunate. Thanks for the link!

 

I keep getting this error in element

MatrixError: [403] You do not belong to any of the required rooms/spaces to join this room. (https://matrix.org/_matrix/client/v3/join/%23librewolf%3Amatrix.org?server_name=matrix.org&via=matrix.org)

Anybody else?

[–] tinkralge@programming.dev 1 points 10 months ago (1 children)

You typically want a slightly-more-elaborate approach than just handing the network a hash and then getting a file.

[...]

Blake 3 supports verified streaming as it is built upon merkle trees as you described. So is IPFS. As I mentioned, IPFS hashes are that of the tree, not the file contents themselves, but that doesn't help when you have a SHA256 sum of a file and want to download it. Maybe there are networks that map the SHA256 sum to a blake3 sum, an IPFS CID, or even an HTTP URI, but I don't know of one, hence the question here.

BitTorrent and Hyphanet have mechanisms that do this.

Do you know of a way to exploit that? A library maybe?

[–] tinkralge@programming.dev 2 points 10 months ago (2 children)

It's quite simple: I want to retrieveFile(fileHash) where fileHash is the output of md5sum $file or sha256sum $file, or whatever other hashing algorithm exists.

[–] tinkralge@programming.dev 1 points 10 months ago (1 children)

I'm not sure what your concern is. I'd basically like to call a function retrieveFile(fileHash) and get bytes back. Or call retrieveFileLocations(fileHash) and get URIs back to where the file can be downloaded. Also, it'll be opensource, so nothing to reverse engineer.

[–] tinkralge@programming.dev 1 points 10 months ago

How do I retrieve a file from bittorrent with just its hash? Does WebMirror solve that? I'll have a look at it...

[–] tinkralge@programming.dev 1 points 10 months ago

If you sha256sum $file and send that hash to somebody, they can't download the file from IPFS (unless it's <2MB IINM), that's the problem. And it can be any hashing algorithm md5, blake, whatever.

 

I have no experience with android apps and just started working on one that needs to work with relational data. The relational data has multiple many-to-many relationships and the inbuilt ORM (Room) is leads to class explosion.

While looking at ORM libraries for android, there seem to be many that are out of date:

From 5 of the Best Android ORMs (2014) and AlexeyZatsepin/Android-ORM-benchmark (2017)

I'm leaning towards Requery because I like its API the most (hides SQL the most), but haven't looked at ObjectBox yet.

[–] tinkralge@programming.dev 1 points 1 year ago

Sure, why not. I'm not the creator of the room 🙂

[–] tinkralge@programming.dev 1 points 1 year ago (1 children)

I know that @Ategon@programming.dev is there. Maybe he can make you a mod there too? And the channel could be added to the sidebar of this community too.

 

I wrote a simple algorithm for predictive text that uses preceding words as context. Without looking at prior, it was an attempt as seeing what I could come up with.

The goal is for it to be incorporated in chorded input and pick the best candidate for the entered chord with the given context. Chorded input is the method of hitting all keys for a word simultaneously instead of hitting each key individually in expected order.

E.g you've typed "this is the worst" and hit the chord "aet", which word should be chosen? ate? tea? eta? This algorithm is there to answer that.

What I'm looking for in the code review in order of importance:

  • documentation (is it understandable? are there things missing? ...)
  • code architecture, code structure (function should be a member? composition could be changed? clarity, ...)
  • algorithm review (optimisations, improvements)
  • variable and class names (naming things is hard)
  • rust specific stuff (f64 instead of u32 maybe? dyn vs impl? ...)

The code is linted and automatically formatted.