28 Followers
17 Following
478 Posts

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

1
0%
2
0%
3
0%
4
0%
Poll ended at .

#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 🔗️: http://prng.di.unimi.it/

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

xoshiro/xoroshiro generators and the PRNG shootout

~namark/libsimple_support: source/simple/support/algorithm.hpp - sourcehut git

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

Add an innocent constant variable -> clang segmentation faults x_x
http://ix.io/2nlF/cpp
power through without the quality of life constant.
Brag about bugs you found.
Feel alive.

#cpp

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

https://video.qoto.org/videos/watch/6b952c22-d141-495b-bd36-9c5a2d96d31f

Concerning Hobbits - Clawhammer banjo

PeerTube
Who's afraid of Spectre and Meltdown? — GNU MediaGoblin

Learning C++

I have decided to embark on a journey to learn C++. It&#39;s something i&#39;ve wanted to do for a while and in fact started doing a few years ago...

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

https://onpaper.su/antanas-sutkus-nezryachij-pioner-kaunas-1962/

Антанас Суткус. Незрячий пионер. Каунас, 1962. - On Paper - Опыт фотографии

Можно было бы сказать, что слепой человек не реагирует на камеру, и его лицо не превращается в маску. Или что образ головы без волос тянет из памяти множество других образов...

On Paper
A short break from commissions for a future charm!
#redpanda #artist https://t.co/2faQlMcopt
Éire COMMS CLOSED on Twitter

“A short break from commissions for a future charm! #redpanda #ArtistOnTwitter”

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

#closeuprussia #alexanderaksakov
#rf #photography

@[email protected]