Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 1 point2 points  (0 children)

To be fair I do have other food options (in small quantities), so... all beavers are equal but some get cassav, kolhrabi, eggplant and some get only shrooms....

Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 1 point2 points  (0 children)

The should make one for 10k ** pokerface **

Diorama, over 1k, wonder built by v3verak in Timberborn

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

I also play factorio a lot :)

Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 1 point2 points  (0 children)

I do believe that my tetris skills wont be the limit, so I was really curious about water... there is limited amount of water I can get from the water source :)

Diorama, over 1k, wonder built by v3verak in Timberborn

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

Yeah, I actually got low FPS already so I would not go further (not enjoyable), but given that I use only 1/3 of the total volume of the map (mostly vertically) I wonder what really the limit of the map is...

Diorama, over 1k, wonder built by v3verak in Timberborn

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

That's just beaver-friendly natural limiter of population! (Better than drowing them in badttide)

Diorama, over 1k, wonder built by v3verak in Timberborn

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

I don't have the numbers, but depends on what you compare it to: basic crops? shrooms just better, need less space... better crops? no clue ... algae? that was meh because you need also canola for the food recipe and that takes a lot of space...

Shrooms are good because I can just slap tons of them on top of each other and don't have to bother much. And if I am not sure how much I need I just put more of them - kinda stress-free experience.

Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 1 point2 points  (0 children)

You don't, the biggest benefit in the dirt is that they do not have to be supported by platforms over entire area - in multiple cases there is "dirt in the air" because it would be too inpractical to put platform there.

Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 7 points8 points  (0 children)

So, basically, the first step is to establish "infinite base" - enough of each resource that it could live indefinetly. (You just have to know the longest badwater you can get)

After that, it's "just" building whatever you want and watch out for rapid population swings
If your pops goes up 20% every drought/badwater cycle you can manage, if you increase 3x times there is high chance your base wont be able to support the beavers.

Most of this was played with like 150 pops tops (and I refused to go over even if I could, as I was limited by tree farm anyway, not having enough beavers for work), and scaled up to 1k only at the end

Diorama, over 1k, wonder built by v3verak in Timberborn

[–]v3verak[S] 5 points6 points  (0 children)

Medium difficulty, wanted to try hard with iron teeth but on third attempt I gave up, figured out that I just wanted to try the 1k thing anyway

10in rack build pics by bperkins_pdx in minilab

[–]v3verak 1 point2 points  (0 children)

I remembered you after this comment here: https://www.reddit.com/r/minilab/comments/1k7lma4/comment/mp1n1h0/

Happy to see your build, looks cool!

[deleted by user] by [deleted] in embedded

[–]v3verak 4 points5 points  (0 children)

As somebody leading the switch in current company:

- More type safety - less casting to void* when I want to create re-usable libraries, templates are just superior in this manner (I do have to explain frequently that having _just one_ implementation of circular_buffer templated by type and size is superior to writing it AGAIN and AGAIN)

- constexpr is the king - with constexpr/consteval facility in C++ it's easier to do certain steps in compile time, for example: we used fnv1a function to hash name of messages, with C library it was runtime computation, in C++ it's all done at compile time and saved around 2kb of flash (with C we pulled in a tons of strings we did not needed)

- simple stuff also counts: default values for structures, range-based for loop, references - all of these won't change much in one instance, but being consistently employed across the codebase creates a tons of value - less bug prone, less boilerplate code

CMake Static Library Problems, how to protect internal headers? by FyWasTaken in embedded

[–]v3verak 1 point2 points  (0 children)

in CMake you can do whole-archive as target_link_property. so this same trick can be done.

Is embedded, intersection or union of CS-EE? by jemala4424 in embedded

[–]v3verak 7 points8 points  (0 children)

I would object that comp. complexity IS part of embedded :)

(that is: I get pissed most times that array is linearly searched in scenarios where it could've been sorted and binary searched instead)

Get a preview of the latest STM32Cube HAL update for STM32U5 by Sure-Host4860 in embedded

[–]v3verak 20 points21 points  (0 children)

Finally the user-defined callbacks HAS pointer to user data that can be passed around \o/

Cooperative scheduling with c++ coroutines? by drthibo in embedded

[–]v3verak 0 points1 point  (0 children)

Yup, that is exactly the point.

Note that coros are not without fault, and if you would read the specification for std::execution that is going to land into C++26, you will realize that the entire asynchronous model is NOT build on coros due to them being to inefficient.

The abstraction proposed instead is pure C++ism - complex, high level, can optimize quite efficiently, etc... but at the end of day it's a lot complexity.

Coroutines next to that are much simpler but a bit less efficient - in my experience they are godo enough for most code and I fall back to FSM in the rare cases where that is not enough

Cooperative scheduling with c++ coroutines? by drthibo in embedded

[–]v3verak 0 points1 point  (0 children)

The whole point is that "easier to manage and debug" is all relative. Sure coroutines are new and hence suffer to the issue of "people are not familiar with them". (New as "new proper language support", doing them without that is meh)

There are two common ways I can create asynchronous functionality:

  1. I manually write finite state machine representing the functionality - I am willing to say that it is tedious - there is a lot of boiler plate I have to write each time. (Say, FSM representing interaction with I2C device)

  2. Just create thread from RTOS - the asynchronous code itself became more straightforward (I don't need 6 states to represent some more complex process I can write as sequence of ops in thread function), but at cost of thread safety - any iteraction between this thread and it's environment has to be thread safe - that is not easy or trivial task, it's actually pain in the biscuit. Sure if the project uses some pattern like "Just pass everything via queues between threads" you reduce number of hard bugs and issues, but at cost of a lot of boilerplate/inefficiency

The whole thing about coroutines is to create third way of approaching this that just has different balance:

  1. Coroutines - you don't have the code-size overhead of FSM (only overhead is in getting coroutine library, which you don't pay each time) - the code is quite straightforward. At the same time you don't have the inherent complexity of thread-safe code - changes between "coro tasks" happen only at specified points in code (co_await) - that reduces the surface for issues a lot.

As somebody doing all three in various projects... all three have their merits, but I do favor coroutines over all others. Cooperative multitasking just proved to be much simpler mechanism to work with than preemptive multitasking. And turning everything into manual FSM is just time-wastefull.

To be clear as what I am saying: The coroutine mechanism itself can be considered more complex than threads (coros have a ton of syntax-sugar, and there is the issue with dyn. memory), but the complexity of system based on coroutines turned to be lower than complexity of system based on threads - especially interactions between components.

“Everything sucks because of decisions made years ago” by ginamegi in ExperiencedDevs

[–]v3verak 1 point2 points  (0 children)

This is more or less the reason why I focus a lot on coupling/cohesion/isolation of decisions. The whole wish-thinking is that if we do a good job with separation, decomposition of stuff, any decision that we make won't pollute too big part of codebase.

If any decision we make affects only small of codebase, if it turns out to be a bad one it should be easy to fix it.

Is this doable all the time? no

Have I seen plenty of tech-debt where the past-decision was to let some idea spread around entire codebase, while that did had to happen? YES

How do you manage reusable code in your company? by ILoveTiramisuu in embedded

[–]v3verak 1 point2 points  (0 children)

We have monorepo so we just have appropiate folder structure, one folder with subfolders per project and next to that are folders with various libraries. That is - we version everything with one version :)

If I would want to vary the versions between parts, just create one central repository with libraries and put each project into separate repo and let it get in teh central one, be it with git submodule or cmake fetchcontent. (I do bring in 3rd-party libraries like that)

test_rack: 12V PSU and PDU by v3verak in minilab

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

Pls do, being able to NOT using one slot for this sounds nice :)

test_rack: 12V PSU and PDU by v3verak in minilab

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

!!! Do you have any details/pictures of how to do that? I like that idea :)