namark boosted

Considering a generic function, that accepts a count of numbers (usual + - * / algebra) and returns their average (sum over count), what requirements make sense to be imposed on the number to allow division by count?

(count is 2 in example pseudo code)

1. explicit construction from a single natural number:
(n1 + n2)/number(2)

2. straight up a division operator that accepts a natural number as second argument:
(n1 + n2)/2

3. multiplication identity constructor/value that can be accumulated (using addition) to reach count:
(n1 + n2)/(number::one + number::one)

4. addition operator that accepts a natural number as second argument (assuming zero/default constructor available):
(n1 + n2)/(number() + 2)

#cpp #programming #generic_programming

namark boosted

#xoshiro is a family of #publicdomain (#CC0) pseudorandom number generators.

xoshiro (xor-shift-rotate) and #xoroshiro (xor-rotate-shift-rotate) are public domain #algorithms that shift state to produce very random numbers at high speeds suitable for insecure applications. The algorithms only use a few bytes of state and are suitable for embedded applications which require good pseudorandom numbers.

Website 🔗️:

#free #opensource #foss #fossmendations #RNG #programming

namark boosted
namark boosted
namark boosted
namark boosted
namark boosted

c++ obstacle course 

Try to write transparent wrapper using implicit conversion ->
-> templates don't pick it up, cause type deduction -> fix with metamagic ->
gcc rejects valid >~<
Isolate, work around.

Add an innocent constant variable -> clang segmentation faults x_x
power through without the quality of life constant.
Brag about bugs you found.
Feel alive.


namark boosted

Decided to sell this though I'm not sure anyone would be interested
Watercolor, A5 size. 370€ + shipping, dm me if you want it

Boosts very much appreciated!
#art #MastoArt #CreativeToots

namark boosted

I got some nice mini cards and a new awesome paper for color prints! Thought I'd celebrate with a raffle 🌟

Win a set of 3 mini cards: 'Dream dwellers'
Boost & follow to enter
Ends on may 23rd

Check out my shop:

namark boosted

I decided to start publishing me playing some stuff on my peertube channel, as a way to motivate me to get better and get over my shyness...
I'm not very good, but whatever, you gotta start somewhere. Hopefully with time I'll look back and laugh at the goofy attempts =D

This is the first song. From now on I'll just boost my peertube status with every video

namark boosted

The bird who sowed the wind 🐦
The three little birds:
- oh no
- wtf is this
- fly you fools!!
The fourth little bird:
- aaaaaaaaaaaaa

#MastoArt #art #TraditionalArt #watercolor #HugeBirdsAreDragons

namark boosted
namark boosted
namark boosted

Антанас Суткус. Незрячий пионер. Каунас, 1962. Можно было бы сказать, что слепой человек не реагирует на камеру, и его лицо не превращается в маску. Или что образ головы без волос тянет из памяти множество других образов, которые сохранили длинную историю страданий. Но самое главное не это. Иногда фотография при всей материальности своих инструментов может проникнуть в невидимое. И тогда перед нами не просто мальчик с хрустальными глазами. Чувствительная к свету пленка сохранила то, что легко назвать душой. Это портрет как будто вывернутый наизнанку, и внутреннее здесь явно настолько, что обычная царапина на правой щеке мальчика, как порез по сердцу зрителя. Но невыносимей всего его взгляд удивленный и нездешний за рамки кадра, как за границу жизни. И наверное то, что мальчик не смотрит прямо в камеру, это снисхождение к нам. Кто готов к тому, что эти глаза будут смотреть на него?

namark boosted
namark boosted

Кускургуль, Тюменская область | Kuskurgul, Tumen region, 2015.
(c) Alexander Aksakov

#closeuprussia #alexanderaksakov
#rf #photography


namark boosted
namark boosted

frivolous variable naming 

auto table = x - floor(x);
auto swing = ceil(x) - x;

namark boosted
namark boosted

but why are those gliders leaving trails? no those are not video artifacts(the discoloration and random red patches are), those are the ancestors!

Show thread
Show older
Gamedev Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!