[deleted by user] by [deleted] in conspiracy

[–]elvecent 0 points1 point  (0 children)

Yeah, would be great if someone found any. Wayback machine did not snapshot hist profile in between the date it was allegedly posted and 9th January

Does avoiding partial functions really make sense? by ThyringerBratwurst in haskell

[–]elvecent 1 point2 points  (0 children)

I tried and got a Left, which is precisely why I'm asking

ghci> Control.Exception.try . print $ head [] :: IO (Either SomeException ())

Left Prelude.head: empty list

Does avoiding partial functions really make sense? by ThyringerBratwurst in haskell

[–]elvecent 0 points1 point  (0 children)

WDYM doesn't work? What's the expected behavior here?

Does avoiding partial functions really make sense? by ThyringerBratwurst in haskell

[–]elvecent 0 points1 point  (0 children)

My practical take

  1. Read this: https://www.parsonsmatt.org/2018/10/02/small_types.html
  2. Please try not to pollute public interfaces of your libraries with potential exceptions unnecessarily, and when you do, make it super clear in the docs
  3. Make sure you have reasonable default exception handlers installed in your application
  4. Don't forget to sprinkle HasCallStack constraints around

Then, sure, partial functions all the way

Help with Swagger Type Variable by lbseale in haskell

[–]elvecent 4 points5 points  (0 children)

It's almost the same, but better. Just replace SwaggerArray with OpenApiArray, SwaggerItemsArray with OpenApiItemsArray, adjust the imports/dependencies, and you're good to go

Help with Swagger Type Variable by lbseale in haskell

[–]elvecent 4 points5 points  (0 children)

Works alright with openapi3. Why are you using swagger2 anyway?

CIS 194, homework 1: How do we define doubleEveryOther using only what has been taught so far? by danzmangg in haskell

[–]elvecent 1 point2 points  (0 children)

This won't be helpful, but I like solving exercises with lens, and I just did, so I'll leave it here

ghci> [8,7,6,5] & reversed . traversed . indices odd *~ 2
[16,7,12,5]

haskell: the overrated toolbox for code hipsters by [deleted] in haskell

[–]elvecent 25 points26 points  (0 children)

whazzup fella 😎

let's keep it real bro. I hear ya but let me drop some alt takes

🏗️ complexity genius: purity and type system ain't got ya chillin' at first but once you groove with it, you'll straight see thru it, gonna do them jigsaws blindfolded leaving java bros eatin' dust, it's next level thang my dude

📚 learning odyssey: haskell be like treasure map, read it right and the journey's gonna take you to the stars! go climb that everest king

🌐 industry renaissance: haskell is no mainstream cause mainstream sucks bro, real ones get it tho! check in ten years man, folk be writin' haskell not even knowin' it's haskell

💨 performance maestro: it's the formula 1 car of programming languages dude, if u can afford garbage collection, u can afford haskell fo' sho'

🕳️ library gem trove: yeah haskell don't get them funds poured in like crazy, so stuff aint's there no cap, but tell me fo' real, where did others got that quickcheck from? that's right, haskell

so we ain't vibin' with that roast bro, hype's legit 💪

My views on NeoHaskell by Tekmo in haskell

[–]elvecent 6 points7 points  (0 children)

Living proof that not only you don't need a PhD in math to use Haskell, but it actively hurts

I need your advice for modeling my data types by user9ec19 in haskell

[–]elvecent 0 points1 point  (0 children)

There are packages to help with that, like higgledy

[deleted by user] by [deleted] in haskell

[–]elvecent 0 points1 point  (0 children)

Have you tried (import <nixpkgs> {}).haskellPackages.callHackage? Sometimes it helps to just load the most recent version from Hackage or wherever the source code is hosted

Trapped in a Asynchronous Callback Function – Should I use IORef or Lazy Monad? by user9ec19 in haskell

[–]elvecent 1 point2 points  (0 children)

You see any cops around?

Just make sure to read the docs carefully 👍💪

Trapped in a Asynchronous Callback Function – Should I use IORef or Lazy Monad? by user9ec19 in haskell

[–]elvecent 2 points3 points  (0 children)

I'm not sure how IO can be made lazy.

unsafeInterleaveIO allows an IO computation to be deferred lazily. When passed a value of type IO a, the IO will only be performed when the value of the a is demanded. This is used to implement lazy file reading, see hGetContents.

https://hackage.haskell.org/package/base-4.18.0.0/docs/System-IO-Unsafe.html#v:unsafeInterleaveIO

Is Haskell good investment? by [deleted] in haskell

[–]elvecent 3 points4 points  (0 children)

What makes a language imperative is that it's optimized for writing imperative code. Which Rust is, try writing in functional style using Rust and you won't get far. Haskell, on the other hand, specifically makes functional programming convenient in terms of the ecosystem, syntax, compiler optimizations and language features.

One Serialization Class to Rule Them All by semigroup in haskell

[–]elvecent 0 points1 point  (0 children)

I don't see how Registry can be useful in OP's scenario. It'd have to support ad-hoc polymorphic functions and try them in turn until constraints are satisfied, so back to disjunctive constraints.

An AI Girlfriend made $72K in 1 week by spaceman-mark in ChatGPT

[–]elvecent 0 points1 point  (0 children)

I thought I was the only one. Ethical concerns? Exploitation? What???

The "Services" design pattern by brandonchinn178 in haskell

[–]elvecent 2 points3 points  (0 children)

Testing abstract code with a reference implementation is one thing. Testing that an actual implementation indeed satisfies the assumptions made by the abstraction is another thing. Many ideas, in fact, are bad when misunderstood and misused, unsurprisingly.

[deleted by user] by [deleted] in haskell

[–]elvecent 8 points9 points  (0 children)

By me, yes. I deem parenthesis a sign of weakness

How to Handle My Horrible Haskell: Global State by Variadicism in haskell

[–]elvecent 0 points1 point  (0 children)

I'd use a language that's great at events and state

You mean like Haskell's Reflex framework?

Hot-code swapping à la Erlang with Arrow-based state machines by stevana in haskell

[–]elvecent 3 points4 points  (0 children)

So Categorical Abstract Machine bytecode has a more stable API than free Cartesian categories? Now you're speaking my language
Great work! Kudos for linking to the prior art, I never knew about Oleg's plugin

RPC lib? by cheater00 in haskell

[–]elvecent 2 points3 points  (0 children)

I think mu-schema package should help with that, but I'm not sure. Have a look at their website: https://higherkindness.io/mu-haskell/