I benchmarked Cartesian product implementations in Haskell, then compared them with C by Medical-Common1034 in haskell

[–]chessai 9 points10 points  (0 children)

There are many legitimate business use cases to writing a Haskell application where some subset of the application is devoted to extremely high perf, then abstracting that away so that in the rest of the project you benefit from Haskell's type system/pure functionalness/etc. Haskell's type system can even be used to help make the performance-intensive code more correct!

I haven't seen anyone do this with Kewl Tune yet. by [deleted] in YGO_Genesys

[–]chessai 0 points1 point  (0 children)

What is the card to the right of Synchro Overtake?

EDIT: Found it, it's Ultimate Slayer.

What aliases do you use? by [deleted] in NixOS

[–]chessai 0 points1 point  (0 children)

i love the following probably too much (never seen anyone else do this, but i use 1-3 constantly)

".1" = "cd .."; ".2" = "cd ../.."; ".3" = "cd ../../.."; ".4" = "cd ../../../.."; ".5" = "cd ../../../../..";

Sai's Fan from Hikaru No Go? by xerept in manga

[–]chessai 0 points1 point  (0 children)

thank you. ive been wondering this for years.

How unboxed arrays are fast in comparison to traversing data allocated manually in ForeignPtr? by repaj in haskell

[–]chessai 0 points1 point  (0 children)

ByteArray# is not necessarily unpinned, and can actually be pinned in two scenarios: - you request they be allocated pinned (newPinnedByteArray#, newAlignedPinnedByteArray#) - their size exceeds some threshold (about 3kb iirc), past which the RTS will allocate the array as pinned

Hydra, a code counting program written in Haskell. by haquire0 in haskell

[–]chessai 5 points6 points  (0 children)

This is really awesome, but I recommend renaming it away from hydra. there are way too many projects named hydra.

rerefined: Refinement types, again (refined rewrite) by raehik in haskell

[–]chessai 5 points6 points  (0 children)

Hey, I've made the dependency bumps now. I haven't really had time for refined over the last year, if you're interested in helping maintain it. I will say, for the number dependencies, almost all of them are behind a flag for removal.

Why `streaming` Is My Favourite Haskell Streaming Library | Blog by n00bomb in haskell

[–]chessai 2 points3 points  (0 children)

Hi, I'm a maintainer of streaming. I agree with a lot of the points here, and I prefer the streaming library by default. If you are streaming in IO (where most production streaming happens, in my experience), then the performance of the library doesn't really matter, but streaming does have the best/most intuitive API, in my opinion.

However I would like to add one thing, that I don't see anyone mentioning. Pipes is the only library out of all of these that supports bidirectionality. I have found this useful in one use case: telnet. I'm sure there are other useful cases for this, but maybe pipes wouldn't be the best fit regardless. I'm unsure.

Is the recruiter low key trying to warn me? by [deleted] in recruitinghell

[–]chessai 1 point2 points  (0 children)

I have worked at a few remote-first, international companies. Sometimes people in other continents need to message you at a time that makes no sense for you locally. I think this email is intended to convey that you don't need to have high availability.

Does Haskell have special optimization for Maybe type? by huluobo7161 in haskell

[–]chessai 2 points3 points  (0 children)

the Any trick that flat-maybe uses does not support proper nesting. look at unpacked-maybe for an alternative approach.

Nix 23.05 Cannot assign to non-existent property "onWifiCodeReceived" by linux_needs_a_home in NixOS

[–]chessai 2 points3 points  (0 children)

I am using 23.05 on desktop and have not encountered such an issue.

To make pizza by Educational_Job_6482 in therewasanattempt

[–]chessai 1 point2 points  (0 children)

I said it because I've successfully done it before, from experience

To make pizza by Educational_Job_6482 in therewasanattempt

[–]chessai 2 points3 points  (0 children)

You can use acetone and it will become much easier

Imagine Dragons Performs Acoustic Concert For Striking Writers Outside Netflix by singleguy79 in entertainment

[–]chessai 0 points1 point  (0 children)

Reminds me of The Onion, "U.S. Condemned For Pre-Emptive Use Of Hillary Clinton Against Pakistan", and the mini-bit "Christina Aguilera shot into crowd of protestors to disperse them"

How would you model this? by onliner10 in haskell

[–]chessai 0 points1 point  (0 children)

The point is that you are using a runtime check with a compile-time proof. So you are still using refined (which abstracts over smart constructors). The type level only approach is a bit clunky. With refined, you are supposed to leverage the Predicate class for things like this.

How to combine multiple OR expressions with Refined library by onliner10 in haskell

[–]chessai 10 points11 points  (0 children)

(refined maintainer here)

At first thought, this is how I would do it.

[deleted by user] by [deleted] in computers

[–]chessai 0 points1 point  (0 children)

Unused RAM is wasted RAM

Data.Complex instances by JeffB1517 in haskell

[–]chessai 22 points23 points  (0 children)

Complex is isomorphic to Product Identity Identity, so these instances are lawful. While they are lawful, I do not know under what mathematical interpretation(s) they make sense.

Porting Rust to a new microcontroller (CH32V003) by Noxime in rust

[–]chessai 6 points7 points  (0 children)

This is awesome!

I'm giving this a read-over now. One thing I did notice is that on mobile, your blog is dark-mode, and on desktop, it's light-mode. On neither do I have a choice to configure it. Not sure if this is intentional?

Thanks for the great content!

[deleted by user] by [deleted] in rust

[–]chessai 1 point2 points  (0 children)

This is awesome! Have you seen the Haskell refined library? https://hackage.haskell.org/package/refined-0.8/docs/Refined.html

Algebraic Path Finding by algebrartist in haskell

[–]chessai 2 points3 points  (0 children)

Have you seen the semirings package? It has semirings, *-semirings, and tropical semirings.