Replies

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

neloj, to haskell

I've been trying to make this work for a few days and finally I achieved it, the most basic form of a wayland client using unix sockets, and well in other languages it was not difficult at all, I did it in hare, c, typescript (deno), and in the end I wanted to try with a language that I had never used, Haskell, and I learned many things but I still don't know what a monod is, anyway, here I leave a link to the code for those who are interested: https://gitlab.com/-/snippets/3711372
#haskell #programming #wayland

maralorn,
@maralorn@chaos.social avatar

@neloj This is fracking awesome. Really cool!

Monads are the bane of 's image, they are really not that important, so don’t worry about it.

kosmikus, to haskell
@kosmikus@functional.cafe avatar

Later today, 2024-05-15, at 1830 UTC, join Edsko and me for the 25th episode of the #Haskell #Unfolder "from #Java to Haskell" live on #youtube.

https://well-typed.com/blog/2024/05/haskell-unfolder-episode-25-from-java-to-haskell/

maralorn,
@maralorn@chaos.social avatar

@kosmikus I was wondering, why using an MVar? The possibility for it to be empty seemed completely unnecessary for the example.

maralorn,
@maralorn@chaos.social avatar

@mangoiv @kosmikus Using a var type which takes a lock makes sense. But MVar seems a bit unfiting, because it can be empty. I was wondering what the argument over atomicModifyIORef or using a TVar would be. It seems like MVar has the best ergonomics and concurrency behavior?

I always wonder why the square of

TMVar TVar
MVar ?

seems to be missing a corner.

maralorn,
@maralorn@chaos.social avatar

@mangoiv In my mind an MVar a is similar to an IORef (Maybe a) and that doesn’t feel quite right.

maralorn,
@maralorn@chaos.social avatar

@kosmikus

@mangoiv

Yeah, It's kinda IORef but I thought that doesn't count because it has less concurrency guarantees.

But I think I get now why MVars are much more useful. I have even used TMVars myself as locks when the action I wanted to do with it contained effects.

domenkozar, to random
@domenkozar@fosstodon.org avatar

What you're observing on the surface of the Nix community is internal fighting.

The actual game is classic divide and conquer, splitting the community on topics like flakes and military funding.

The next step is to conquer, where we'll see gaslighting and power-grabbing.

maralorn,
@maralorn@chaos.social avatar

@domenkozar
Who are you accusing of using the military funding topic with the goal to split the community?

thomasfuchs, to random
@thomasfuchs@hachyderm.io avatar

The weirdest thing about the AI hype is the claims that computers will become sentient and human-level intelligent.

There’s zero evidence that the human brain (the only thing that we know of that is capable of human-level sentience and intelligence) works like a computer or that it could even be simulated by one.

Some neuroscience points to quantum mechanical effects being at the core of how neurons work, which basically means that we don’t have a clue how the brain really works.

maralorn,
@maralorn@chaos.social avatar

@thomasfuchs

  1. There is a huge difference between sentience and intelligence. If something kills me I don’t care if was sentient if it was smart enough.

  2. Saying that we don’t understand something because "quantum" makes no sense. Actually, modern computers work on quantum effects.

  3. I am not aware of a scientific argument that anything physical (like a brain) cannot be simulated by a computer.

That being said, it might still be super hard and long of, so I am also sceptical of the hype.

maralorn,
@maralorn@chaos.social avatar

@thomasfuchs Wondering if this is a hype by itself.^^

But if there is really no adequate classical approximation for how our brain works and quantum effects are fundamental to its operation that would truly be interesting.

(Just hope that no one thinks that it solves their free will problem for them.)

Would still leave the question whether some level of "human-like intelligence" can only be implemented by exactly simulating a human brain.

lhp, to random
@lhp@mastodon.social avatar

Randomized terminal background colour?

It actually works.

maralorn,
@maralorn@chaos.social avatar

@lhp That actually makes a lot of sense. Although it also makes it harder to have a good contrast color theme.

maralorn, (edited ) to random
@maralorn@chaos.social avatar

Doing a large refactor in a code base you didn’t write feels like being trapped in a maze of Chesterton‘s fences.

maralorn,
@maralorn@chaos.social avatar

Obviously, you should only disregard that toot if you know what Chesterton’s fence is.

maralorn, to programming
@maralorn@chaos.social avatar

current status: calling a executable from typed template

maralorn,
@maralorn@chaos.social avatar

@pmidden Yeah, I am not saying it’s complicated, it just feels a little cursed.

maralorn, (edited ) to haskell
@maralorn@chaos.social avatar

After extensively using the library for half a year at work I have now played around with the library again. I am amazed by how much more helpful error messages are with . It’s an amazing library and I would recommend it over whenever you have the choice.

maralorn,
@maralorn@chaos.social avatar

@pmidden Well, they compose with % instead of . which you might find less pretty.

They use an opaque type for optics which is the big selling point but also means you need to depend on optics-core to define compatible optics.

I remember missing one operator from which I found to be quite cool, but I don’t remember which one, so it can’t be that important.

maralorn,
@maralorn@chaos.social avatar

@mangoiv I do not know what you mean. You need to depend on optics-core to provide lenses usable with the library, just because the type of those optics is not a type alias like it is in lens.

maralorn,
@maralorn@chaos.social avatar

@mangoiv Hasn’t been my impression with yet. To me it feels like the type level stuff is "finished". As long as you only define and use existing types of optics you don’t need to worry about it.

w4tsn, to NixOS
@w4tsn@darmstadt.social avatar

Was ist go-to newsletter, mailing list, blog oder magazin für alles rund um neues in (packages)?

maralorn,
@maralorn@chaos.social avatar

@w4tsn Weirdly subscribing to nixpkgs.news on my crashes my reader app .

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