/dpt/ - Daily Programming Thread

Old thread: What are you working on, Any Forums?

Attached: 1573211917114.png (4000x3530, 72.39K)

I'm working on some Haskell and struggled to make the performance acceptable. I wrote like three different versions with various monad stacks and RWST.
Then I wrote a trash version with ST passing a context manually and it's just ridiculously fast.

A polite remember to all the future posters: please don't lewd Chen.

NOT nakadashi chen

Thanks a lot user this reply has helped me a lot. I ended up getting rid of the modulo stuff and created a generic timer class that just checks for the difference between the last tick and current tick every tick

writing yet another programming language, third rewrite.

post your language, cutie

Attached: 1657672799954_80e16fc426d7e836d1b3d23d1fc8ce34a0556983.jpg (149x212, 18.26K)

>third rewrite
absolute state of language newfaggotry

writing a matrix client sdk in C++ because noone else will

I'm feeling empty....
I'm bored of doing small projects like coding retro games etc. I once started doing big project something like game engine in C++ but quickly came up in conclusion that writing these kind of stuff from scratch is not for me (at least for now).
Now I spending weeks trying to find good idea for c++ pet-project that won't be very hard, but still will be a good playground for long-term solo development. But everything I think of is rather insanely easy or insanely hard. The only good "medium" tier project I can think of is something like messenger-bots, but writing telegram bot in c++ is yet another level of autism that I'm not ready to dive into.

Attached: s.png (372x231, 155.81K)

How do I improve my code reading comprehension, especially bits of code spread throughout a larger project, such as when debugging or reviewing other people's bugfixes?

Attached: file.png (211x400, 68.58K)

Just do it more. Go through the code line by line with a debugger if possible. Set breakpoints and debug print statements so you can see where code is actually executing.

maybe if it actually becomes something i can be proud of ^v^

i thought of implementing it in a way how functional language have their syntax where they just propagate it down, it looked nice but the function call on every level made it undesirable, i was really hoping for zero cost opt to kick in but after popping a release build O3 in IDA the generated code wasn't looking good. picrel

now im rewriting it as small as possible with no "gimmicks"

Attached: file.png (1063x901, 143.42K)

what would you say you've learnt so far to get where you are skill level wise? I've been making a 'game engine' from scratch using c++ win32, with no background in programming prior to this project. it has been arduous, but I've been chipping away at it little by little. would love to know what you know and the resources you've used to facilitate learning to get me where you are right now

I can't recommend something unique, you've probably already know about Cherno channel (guy who's making HUGE engine with video about every part of it), I kinda connected both my own ideas and his tips. Maybe I was too dramatic calling "it" an game engine, because this small project quickly wen't abandoned when I came to point when I understood that in future I'll need ton off work like implementing additional scripting language support etc.

Also there was a point when I decided to take EnTT for Entity-Component-System which I knew nothing about so I spent week figuring out usage of this thing. Spent days looking at games that used EnTT inside them (I remember there was for example open source implementation of black&white), so the whole day I was just travelling around diffent files of that and other projects looking how they implement different game features and I think it was useful to look how other people write their code.

stop falling for ECS meme, it's shit

I wish Mojang-icrosoft made their C++ Minecraft at least partly opensource to show how they used EnTT, because every example of usage of it is a complete mess

>because every example of usage of it is a complete mess
and every proprietary codebase that was ever leaked is even worse, get a grip

That's what I do but it's painfully slow and doesn't always yield results. My coworkers can do the same job 10x faster. And in code review, I tend to focus on irrelevant details that easily could be handled by a linter if we used one whereas they seem to be able to actually tell what the code does and if it does it well just by looking at it.

I'm sure Minecraft is also a mess
ECS is a meme

I quit programming for like. 3 years and I'm finally getting back into it. studying how compilers work and hopefully can get a C compiler working by the end of this week or the next. OH also I want to fix clover on android, or if anybody knows any good Foss chan viewers LMK. I stopped browsing Any Forums along with my prog break so I'm kind of out of the loop. never get a gf Any Forums, they will hurt your programming life! (having a bf is perfectly fine, ofc)

I need to rewrite my language too. And make it somewhat usable.

How do you send a digital signature over http?? This is making me lose my mind, I have created a signature on a node app, encoded it in base64url, and then sent it to the java app and decoded it, but that fraudulent pos keeps telling me that the signature is of invalid length (300+ vs 256) when I am certain it receives the exact base64url signature.

Either node-forge is screwing me over and not giving me correct signatures, or the Signature object on Java is screwing me over, in either cases something is screwing over...