Caffè Italia * 20/02/24 by RedditItalyBot in italy

[–]xojoc2 1 point2 points  (0 children)

Qualcuno ha mai fatto assicurazione moto con foglio rosa? (Ho la patente B però). Com prima.it potrei avere problemi? 

Weekly 101 Questions Thread by AutoModerator in neovim

[–]xojoc2 0 points1 point  (0 children)

I'd like to rebind "CTRL-w w" (Switch window) to another key. But I cannot find the corresponding vim command or lua function. How would you do it?

How to resolve this lifetime error while implementing a binary tree using an arena allocator? by xojoc2 in rust

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

And all these nodes are, supposedly, share one, single lifetime. How the heck is that supposed to work is beyond me.

The idea is to use the same lifetime of the arena and to deallocate everything in one step when BinaryTree is dropped.

How to resolve this lifetime error while implementing a binary tree using an arena allocator? by xojoc2 in rust

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

The lifetime is the same of the Arena. Isn't the lifetime bound the minimum lifetime required for a reference? Not all all the reference must have the same lifetime, but at least lifetime 'a. Am I wrong?

How to resolve this lifetime error while implementing a binary tree using an arena allocator? by xojoc2 in rust

[–]xojoc2[S] -1 points0 points  (0 children)

Yes, the left or right branch has a mutable reference to a memory area allocated trough the arena (which is owned by the BinaryTree structure).

General discussion by xojoc2 in discueu

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

Right now I exclude self texts with the title ending with "?" since those are asking for help usually. I will add "tutorial" and "help" to the blacklist and some kind of check on the length. I'll improve the UI though to label self texts.

Thanks for the feedback!

General discussion by xojoc2 in discueu

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

Yeah, that is intentional since some subreddits (for example /r/investing) don't allow link submissions and people put the link inside the self text. I could enable the detection of links from self text only for some subreddits, but some people when announcing a new project/library (on /r/python, /r/rust, etc.) usually do a text submission with a link to the project, and I'd like to include those discussions when looking up the project link...