What are you working on, /g/?Previous thread: >>107840984
>>107873347feel free to explain how applying design patterns before any implementation is better, especially in the context where someone is asking about design patterns the first place, which implies they have no experience with them>refectoring is somehow just renaming bunch of functionsdo you think renaming is all an IDE can do?
I implemented a better pruning algorithm for my text generator. I prune the top percentile of contexts by "cost" where cost is (roughly speaking) the ratio of the size of the context to the probability it is to be selected. The issue I'm running into now is sometimes the pruning process fails due to OOM. Pruning is triggered when the process hits its memory limit, but pruning itself requires a small amount of memory (removing a token from a context requires creating a new copy with the token removed, then freeing the old one), I currently work around this by reserving a small amount of memory that can only be used during pruning, but due to fragmentation even this will fail occasionally. I'm not sure how to work around this other than by gradually bumping the memory limit on OOM during the pruning process, but I want to be able to hard-limit the memory usage. Maybe some kind of compactifying allocation scheme could work? Like instead of using pointers to separate context objects, I could use keys in a map, and on OOM I could iterate the map to compactify several contexts together, thereby reducing fragmentation. I think it would work but makes everything more complicated (entries in the map would need to be tracked whether they're part of another allocation, etc.)
>>107877044>shit on runtime, good on memorydon't be stingy with caching or otherwise keeping things in memory, recalculating will always be slowerthis is what ram usage minimalists seem to never get
>>107874369Just got to OOP in the roadmap on the courses I'm followingEveryone kept telling me how scary OOPs but it's fun so farstill kinda new in programming and learning it currently using C++
>>107874369I lost all interest I had for programming. I used to care so much about the language, the editor, the dev environment, algorithms, etc. Now I just do whatever solves a problem with the least effort from me.
>>107877892You've grown to be a good code monkey.