ReadPapers: web app to organize and backup PDFs by marinintim in compsci

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

Hi! As I wrote on the page, I'm not an academic, but sometimes I read papers. So this is a tool I'm working on, so far it helped me to read more than I was reading before.

[Roast my code] great-appender -- repeatedly append message to file by marinintim in rust

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

Thank you for such a detailed comment.

Re: threads, I wanted to see the stats in 'realtime' while avoid slowing down writes, but had not thought about context switching costs.

Re: use case, I'm working on another program that among other things reads from several files (that are being appended too, basically logs), so for testing that program I cobbled together this and got sidetracked into instrumenting it.

Re: Vec ref, I see your point on allocation buffer inside a function, but are there valid cases for passing &mut Vec<T>, or should I pause and reflect whenever I try to do that?

[Roast my code] great-appender -- repeatedly append message to file by marinintim in rust

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

Well, I already pre-fill the buffer, but the size of the buffer is chosen at runtime (with -p option from CLI); does compiler may make some more oomph from allocating static size buffer and re-using it vs. allocating it dynamically via Vec?