Posts

This profile is from a federated server and may be incomplete. Browse more on the original instance.

arialdo, to random
@arialdo@mastodon.online avatar

How
Much
I
Hate
YAML
Based
Build
Pipelines

mykhaylo,
@mykhaylo@fosstodon.org avatar

@arialdo just use edn or json and compile with something like https://github.com/borkdude/jet

arialdo, to CSharp
@arialdo@mastodon.online avatar

Apparently, the fastest way to check if an enumerable contains at least 2 elements in #csharp is:

xs.Skip(2).Any()

Unbelievably faster than:

xs.Take(2).Count() == 2

or a foreach list with a counter.

arialdo, to random
@arialdo@mastodon.online avatar

Current status: reading The Book of Monads

https://leanpub.com/book-of-monads

arialdo, to emacs
@arialdo@mastodon.online avatar
arialdo, to firefox
@arialdo@mastodon.online avatar

dumps ? Good reason to dump Mailchimp

arialdo, to random
@arialdo@mastodon.online avatar

How would you write a test to verify that the function

shuffleList xs

returns the list xs with shuffled items?
Even more generally, how to write tests of functions having to do with randomicity?

BoydStephenSmithJr,
@BoydStephenSmithJr@hachyderm.io avatar

@arialdo First, use formal methods and the implementation to prove the output is always a permutation of the input.

Then, shuffle a small list a large number of times and verify the distribution is uniform. Other, more complex tests of random number generators can also be adapted and used. Since, for any finite input, repeated calls to shuffle is effectively a RNG.

Might be able to use parametricity to extend finite results to infinite lists?

arialdo, to random
@arialdo@mastodon.online avatar

I love this definition by Eugunia Cheng:

“Pedantry is precision that does not increase clarity“

arialdo, to random
@arialdo@mastodon.online avatar

Just published: Boolean Blindness

https://arialdomartini.github.io/boolean-blindness

"A Prolog programmer is delivering a baby.
The mother asks, “Is it a boy or a girl?”
and the Prolog programmer says: “Yes”."

arialdo, to random
@arialdo@mastodon.online avatar

One of the funniest algorithms I stumbled upon. Genius as much as Sleep Sort

https://www.timwarriner.com/carddata/

arialdo, to vim
@arialdo@mastodon.online avatar

Now that NeoVim, with Lua, made Vim an extendible platform for applications, what the main reasons why one should prefer over ?

Honest and genuine question.

holgerschurig,

@arialdo Even with Lua Neovim can still only do 10% of what Emacs can do.

arialdo, to random
@arialdo@mastodon.online avatar

I'm surely pedantic, but I think that technical articles should have links that make it clear which source they target.

For example:

BAD
As you can read [here] and [here]

BETTER BUT STILL NOT IDEAL
As you can read about [monads] and [burritos].

BETTER
As you can read in [John Doe's Monads Tutorial] and [Making burritos by Mark Foo]

arialdo, to haskell
@arialdo@mastodon.online avatar

f = foldr (flip (const . (+1))) 0

kosmikus,
@kosmikus@functional.cafe avatar

@arialdo Should be foldl'. Better:

g = foldl' (const . (+1)) 0

arialdo, to haskell
@arialdo@mastodon.online avatar

It seems Void is not that uninhabited, after all...

f :: Void -> String
f _ = "WAT??"

f undefined

arialdo,
@arialdo@mastodon.online avatar

@dpwiz I was not aware that Void was not completely void.

dpwiz,
@dpwiz@qoto.org avatar

@arialdo There’s Void#, for the times when you really want to a-void something :ablobpeek:

arialdo, to random
@arialdo@mastodon.online avatar

Please, don't use medium.com to publish your articles. Please.

arialdo, to rust
@arialdo@mastodon.online avatar

I'm playing with .
So far, I'm more disappointed than excited.

I find it schizophrenic.

It aspires to be a high level language like , with traits, immutability, HOF, all the things you expect from a modern language.

All brilliant.

But then, its low-level, system language nature - borrowing, ownership, move, stack, heap, scopes, Box, dyn, size of variables - get in the way, no matter the level of abstraction you are operating, and on top of a C-style oldish syntax.

Nope.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines