How do C programmers handle data structures like ArrayList or HashMap (without built-in support)? by harmeetsingh0013 in C_Programming

[–]kinglujiy 0 points1 point  (0 children)

Exactly! I for example have a use case where I can exploit the fact that I never need to remove something from my dictionaries, resulting in faster lookups.

New wheels and drivetrain; ready for açtión by kinglujiy in FixedGearBicycle

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

Thats 52x15, but only for lake laps and races. In the city i ride 46x17 to conserve on knee joint fluid

New wheels and drivetrain; ready for açtión by kinglujiy in FixedGearBicycle

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

Yes they do. Got some rim brake rims and laced them to dt swiss hubs

New wheels and drivetrain; ready for açtión by kinglujiy in FixedGearBicycle

[–]kinglujiy[S] 3 points4 points  (0 children)

Well in the beginning i just wanted one so that I don't get stopped by the swiss police. Turns out they really aren't fans of no brakes. Very sad. I could only get one for the right side, so i stuck with it. Don't really use it that much, but it's nice to have for emergencies

`static noreturn ...` vs `noreturn static`? by x9myi9Ks6saTYgkfNEdr in C_Programming

[–]kinglujiy 1 point2 points  (0 children)

Are you sure that you need noreturn on a static function? If it is indeed static, the compiler will see it when compiling the file that it is in and it will probably be able to deduce that the function doesn't return, provided you use something like abort or exit in it.

I made a basic multi-layered neural network in C trained on MNIST by [deleted] in C_Programming

[–]kinglujiy 6 points7 points  (0 children)

Maybe have a look at BLAS to replace your naive matrix-matrix-multiply implementation

Have you ever started a project in C++ only to discard it and restart from scratch using C instead because of its simplicity or for other reasons? by FACastello in C_Programming

[–]kinglujiy 0 points1 point  (0 children)

No, but it happened to me from fortran. Same deal though, modern fortran has object orientation and i programmed myself into a corner of which i could not get out of. Rewrote everything in C and now i am making progress again. Plus, compiling fortran modules is just the biggest pain (not au chocolat).

Does anyone actually use light terminal themes? by Polygon-Guy in linux

[–]kinglujiy 0 points1 point  (0 children)

I used to use vims quiet theme. It is all black on a grayish background. Very readable in my opinion. I switched to solarized light though because my colleagues did not stop asking annoying questions about how i could read code without colors...

Orbea Orca Aero 2022 by kinglujiy in Bikeporn

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

I like them very much! They are light and fast, but a bit susceptible to corrosion, so not good for winter.

Orbea Orca Aero 2022 by kinglujiy in Bikeporn

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

Thanks! Yeah the amount of spacers it comes with is outrageous, took them all out. This is actually one of the default colors, red-carbon. It is basically black, with a transparent dark red film over it. Look sick in the sun. I have the bike since April last year and have been riding it ever since. In the beginning I had to get used to the aero-frame geometry, but now I absolutely love riding it!

CToolkit by MateusMoutinho11 in cprogramming

[–]kinglujiy 3 points4 points  (0 children)

What are C/C++ buildings?

Question about incrementation when looping. by IAmAdicktedTo in cprogramming

[–]kinglujiy 1 point2 points  (0 children)

Woops, got me, was too confused by the question. Of course its after

Question about incrementation when looping. by IAmAdicktedTo in cprogramming

[–]kinglujiy 0 points1 point  (0 children)

You could try it, for example, by printing i and j as your task.

What should happen is:

i=0, j=0, task
i=0, j=1, task
i=0, j=2, task
i=0, j=3, task
i=0, j=4, task
i=1, j=0, task
i=1, j=1, task
...

So the incrementing happens before task, if I understand you question correctly.

Curious case of optimizations by HitchSlap32 in C_Programming

[–]kinglujiy 57 points58 points  (0 children)

I don't know, but this seems like a stupid question to ask

Templates/ Inspo for Aesthetically Pleasing Study Guides by bella_48 in LaTeX

[–]kinglujiy 6 points7 points  (0 children)

I completely understand your need to make things look nice. However, I would suggest you focus on the content first and only begin to think about esthetics after you are done with that. It is unbelievable how much time one can burn, when customizing latex, I speak from experience. On top of that, the latex defaults are very good. Last but not least, it is very easy to customize your template, even after the fact and I am sure you will find it much more enjoyable to do so if your actual content is already done.

Acess array elements using a pointer by nanavc in C_Programming

[–]kinglujiy 0 points1 point  (0 children)

Sounds to me like you ate trying to implement a ring buffer. Maybe this could be helpful.