jpfreely

joined 1 year ago
 

When returning an immutable reference to a private struct field. (On mobile and used vertical bars instead of a bunch of HTML codes)

 

I started off avoiding mod.rs because it's the old way and I prefer having the module name as the filename. However, if the module needs a folder for submodules anyway, then there's a reason to tuck it away as mod.rs, especially if not doing so leaves lots of duplicate names (a.rs, b.rs, c.rs, ..., a/, b/, c/).

But then I don't really like to have much else in mod.rs other than mod declarations and pub use. Maybe a utility fn or a not-unwieldly implementation of struct "Foo", the module's namesake.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Thanks for the feedback.

  • I'll definitely drop the Cypher prefix, and think it's a good idea to at least move the shorthand attribute macros to a crate feature. The readmes would use derive instead of the shorthand mostly.
  • ty::new() just uses the types in the struct (plus &str for String and &[T] for Vec). The extra builder struct is to help with updates, where you may want to just change a couple of fields, or bind it to editable UI fields.

I didn't realize how strong the rust presence is here. Experienced-devs on reddit is hard to go without :)

 

Hi everyone! I started learning rust about 3 months ago and had a sort of working version of this for my own needs, but spent some time (maybe lots) cleaning it up, testing it, and making it worthy of publishing.

https://crates.io/crates/cypher-dto

It's for working with Neo4j (cypher query language). It aims to assist in creating manual queries but provides unitary CRUD operations for nodes and relationships out of the box. Some other niceties:

Generates new(), getter methods, and a builder struct, and copies doc comments to them.

Has 'smart' handling of created/updated timestamp fields.

Supports multi-valued primary keys; uses the term "identifier" for that set of fields.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

One time we got around the security for a shared windows folder (Win98). Another time a couple of us printed fake midterms for ourselves on official headered paper. But the one that sticks out is this trojan program I got from my older brother called deepthroat. I put it on a couple of other people's computers that I wanted to mess with, and proceeded to open their cd tray, pop up fake warnings/errors, and other random stuff that a friend and I thought was hilarious at the time. It all stopped when I popped up a message that said "Contacting [name]'s parents..." on this girls computer and she got the teacher's attention about it. He knew what was up and scanned all the computers. He was mad but we didn't really get in trouble. We also did the fake desktop screenshot stuff :D

[–] [email protected] 12 points 1 year ago

Must have forgot to write it down

 
[–] [email protected] 4 points 1 year ago (1 children)

What user data is visible by and admin on a federated server?

[–] [email protected] 14 points 1 year ago (4 children)

I'm not. How bad was it?

[–] [email protected] 7 points 1 year ago (1 children)

My understanding of trunk based development is that it allows for short lived branches and keeps longer work behind feature flags as it is merged in pieces. The common CI approach with pull/merge requests having to pass tests still applies.

[–] [email protected] 1 points 1 year ago

Jerboa is pretty good so far. I wish it had its own browser built in though, like RiF did.

[–] [email protected] 3 points 1 year ago

This is awesome. Scary

[–] [email protected] 12 points 1 year ago

That's the one problem. An LLM enhanced terminal sounds great. Sharing every command with the cloud does not.

[–] [email protected] 9 points 1 year ago (2 children)

You should check that your stuff isn't undeleted by Reddit. Some other people have reported them doing that.

 

Wasn't sure where to post this. It's pretty funny but also sad. As a human, I feel that way.

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

This is c/dart (!dart?). See also c/flutter.

Edit: there's also https://lemmy.world/c/dartlang

view more: next ›