« first day (4117 days earlier)      last day (65 days later) » 

12:25 AM
0
Q: How to make bit manipulation in Rust even faster?

DaveI have a very hot segment of code in a large project. I've extracted the relevant segment and a toy example to illustrate it. The project involves an unavoidable combinatorial explosion related to graph theory, so there's no limit to how fast is 'good enough' -- but rather, each significant speed...

 
2 hours later…
2:29 AM
0
Q: Byte Pair Encoding Compression in C89

qwrThis is a small project to implement Philip Gage's Byte Pair Encoding compression for the purpose of learning C. In particular, it's written in C89 for fun as that's what would've been contemporary (though I really miss some nice C99 features). Disclaimer: To start the project, I used his provide...

 
2 hours later…
4:13 AM
0
Q: Parsing strings indicating duration in seconds (e.g. "60", "60s", "1m", etc.)

xiazhuThis is a simple function that accepts a null-terminated string that represents a non-negative number of seconds. It can optionally end in the suffix "s" (seconds, default), "m" (minutes), "h" (hours), or "d" (days). The number is read by strtod and so it can accept floating point notation. For e...

 
6 hours later…
9:46 AM
0
Q: Swift: Mocking a REST API-request

michael.zechI have read the last two days through several tutorials about how to mock a HTTP-request against a REST API. Finally I made a prototype for applying, what I have understood from the tutorials. Here's the relevant code of the actual app-target. Main UI: struct ContentView: View { // Create an ...

 
1 hour later…
11:14 AM
No @Duga?
 
3 hours later…
2:43 PM
Looks dead.
Monking
0
Q: Operator-precedence calculator in C

CeciliaRecently, I've been wanting to do some larger C projects than I'm used to, since I really like the language. So, as a first step, I decided to implement a nice calculator. My end goal is implementing continued-fraction arithmetic, since I've never really seen that used anywhere before, but curren...

0
Q: How to use partialmethod (or partial) with setattr outside the class definition?

Yulia VThe methods in the snippet below are defined using setattr outside the class. I had to create wrappers my_method and my_method_ because I could not work out how to use partial/partialmethod in this context. The code works, but these wrappers feel like clutter. Is there a way to shorten the code? ...

 
2 hours later…
4:35 PM
0
Q: Handler for YAML file settings values

alexandrovI am writing a program for calculating rocket engines and for its operation I store all the settings in files with the extension .yaml . To do this, I wrote this code and I want to get feedback and understand what can be improved or added in it and how best to implement the reset function in it. ...

 
1 hour later…
5:37 PM
0
Q: tideman insertion sort

Alex MI'm currently working on cs50 tideman pset, I recently just attempted to implement one of the functions: sort pairs, which sorts pairs of candidates in a pairs array by decreasing order using insertion sort. I just want some feedback on this code to see if there was anything I did wrong and if th...

 
1 hour later…
6:39 PM
AI answers are bad enough, but image if AI also started posting questions on stackoverflow when people ask questions

« first day (4117 days earlier)      last day (65 days later) »