Readit News logoReadit News
tinyspacewizard commented on .NET 10   devblogs.microsoft.com/do... · Posted by u/runesoerensen
jitbit · 4 months ago
For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%.

We were even able to downgrade our cloud servers to smaller instances, literally.

I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

tinyspacewizard · 4 months ago
Start-ups should strongly consider F#.

It's a force multiplier when you have a small team of strong developers.

tinyspacewizard commented on Show HN: OnlyJPG – Client-Side PNG/HEIC/AVIF/PDF/etc to JPG   onlyjpg.com... · Posted by u/johnnyApplePRNG
BrannonKing · 5 months ago
Note: please don't turn your screenshots and digital art into JPG. JPG uses compression based on natural lighting. It works well for photos, but it's the wrong solution where run-length encoding will do much better (e.g. in screenshots). Black text (or cartoon art) on white backround always looks lousy when converted to JPG.
tinyspacewizard · 5 months ago
What should we use instead?
tinyspacewizard commented on Migrating from AWS to Hetzner   digitalsociety.coop/posts... · Posted by u/pingoo101010
tinyspacewizard · 5 months ago
> Why two cloud providers? Initially we used only DigitalOcean, but a data intensive SaaS like tap needs a lot of cloud resources and AWS have a generous $1,000 credit package for self-funded startups.

So some Kubernetes experts migrated to AWS for $1k in credits. This is madness. That's weeks of migration work to save the equivalent of a day of contracting.

tinyspacewizard commented on Free applicatives, the handle pattern, and remote systems   exploring-better-ways.bel... · Posted by u/_jackdk_
Joker_vD · 5 months ago
> If you write all the queries directly in Haskell, you get an IO action which you can't inspect.

Of course you can inspect it: open the source code you wrote and read it. Also, don't write the code you don't want to be executed?

> but it's often much easier to ask a regex library to run an interpreter over a string describing the pattern to match.

Which, I might notice, you never inspect. You execute it blindly and look at the outputs of the match() method falling out of it. In fact, most regex libraries compile your regex into an opaque data structure which you can't inspect — and nobody complain about it.

tinyspacewizard · 5 months ago
> Of course you can inspect it: open the source code you wrote and read it. Also, don't write the code you don't want to be executed?

This is not what they meant by inspection.

What they mean is that you can write a function, in Haskell, that given a value in the DSL, it returns the list of all requests it will perform on execution.

This can be useful for tests, security, caching, performance, debugging...

tinyspacewizard commented on Free applicatives, the handle pattern, and remote systems   exploring-better-ways.bel... · Posted by u/_jackdk_
tinyspacewizard · 5 months ago
This seems like a cool article, but it isn't readable without Haskell background knowledge.

> For an intuition why this is true, consider that the constant functor Const r has an Applicative instance whenever r is a monoid, because pure stores a mempty value and (<*>) combines the held values with (<>). For a fun exercise, implement runAp_ in terms of runAp and Const.

Really?

tinyspacewizard commented on Free applicatives, the handle pattern, and remote systems   exploring-better-ways.bel... · Posted by u/_jackdk_
tinyspacewizard · 5 months ago
Weird feeling knowing that an ecommerce / wallet store has employees with more advanced programming knowledge than most financial institutions.
tinyspacewizard commented on Working pipe operator today in pure JavaScript   github.com/irony/aspipes... · Posted by u/urvader
nonethewiser · 5 months ago
wrap the object?

Why would you want to avoid that? It's controversial syntactic sugar. Enforcing a convention locally seems ideal.

tinyspacewizard · 5 months ago
1. Wrapping is more code than using a built-in pipe operator

2. There is a run-time overhead to wrapping

IMO a design goal of programming langauges should be for the most readable code to also be the most performant.

Language features tend to be controversial until they are mainstream.

tinyspacewizard commented on Working pipe operator today in pure JavaScript   github.com/irony/aspipes... · Posted by u/urvader
nonethewiser · 5 months ago
First of all, with the actual proposal, wouldnt it actually be like this? with the %.

    xs
      |> map(%, x => x * 2)
      |> filter(%, x => x > 4)
      |> sorted(%)
      |> take(%, 5);
Anything that can currently just chain functions seems like a terrible example because this is perfectly fine:

    xs.map(x => x * 2)
        .filter(x => x > 4)
        .sorted()
        .take(5)
Not just fine but much better. No new operators required and less verbose. Just strictly better. This ignores the fact that sorted and take are not actually array methods, but there are equivalent.

But besides that, I think the better steelman would use methods that dont already exist on the prototype. You can still make it work by adding it to the prototype but... meh. Not that I even liket he proposal in that case.

tinyspacewizard · 5 months ago
There is more than one proposal; the F#-style one doesn't have the (weird) placeholder syntax.

> You can still make it work by adding it to the prototype

This is exactly what we want to avoid!

u/tinyspacewizard

KarmaCake day248November 3, 2022View Original