Haskell

DiazCarrete, (edited )
@DiazCarrete@hachyderm.io avatar

I know that Megaparsec doesn't backtrack automatically and that you have to use "try" for that, but this behavior of "many" was unexpected. Why oh why doesn't it parse the final space?
https://stackoverflow.com/a/78355045/1364288
Maybe I didn't read the documentation thoroughly, but I don't think it's actually spelled out in the Haddocks?

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Ok, the heart of the matter is the Alternative instance on which the "many" and "optional" combinators depend.

As the docs say, "empty is a parser that fails without consuming input". So a parser that fails while consuming input can't be equated to "empty". I guess the moral of the story is that one should almost always use "try" with Alternative-y combinators.

kosmikus,
@kosmikus@functional.cafe avatar

@DiazCarrete You have a choice between space and space, so you need try. In general, having choices start with space is not a good idea. Consume space after other content, not before.

haskell,
@haskell@fosstodon.org avatar

The GHC developers are very pleased to announce the release of GHC 9.10.1! 🎉

On the menu:
→ GHC2024 language edition
→ Linear let and where
bindings
→ Annotation of exceptions with backtraces
→ Required type arguments for functions
→ Javascript FFI support in the WebAssembly backend
… and many more!

https://discourse.haskell.org/t/ghc-9-10-1-is-now-available/9523

#Haskell #FunctionalProgramming #LinearTypes #DependentTypes

bgamari,
@bgamari@mastodon.social avatar

GHC 9.10.1 is at long last released!

Between the continued iteration on the GHC20xx meta-extension mechanisms, further improvements in the JS/wasm backends, and (my favorite) the availability of exception backtraces in base, there is lots in this release to be excited about.

See the Haskell Discourse thread for the full announcement:

https://discourse.haskell.org/t/ghc-9-10-1-is-now-available/9523

kosmikus,
@kosmikus@functional.cafe avatar

On Wednesday, 2024-05-15, at 1830 UTC, we'll stream the 25th episode of the . This episode should be interesting for Haskellers and non-Haskellers alike. Edsko and I will translate a server from to Haskell, contrasting the programming paradigms.

https://www.youtube.com/watch?v=YwshlQXKO80&list=PLD8gywOEY4HaG5VSrKVnHxCptlJv2GAn7&index=25

haskell,
@haskell@fosstodon.org avatar

Cabal 3.12 has been released! A plethora of changes and improvements, thanks to the dedicated work of the entire team. Grab it and give it a try! https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504

ffaff,
@ffaff@aleph.land avatar

Cabal 3.12 released! Lots of new features for users, but also for users (multicomponent repl sessions) and much more!

https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504

Boosts appreciated to reach the wider community!

BoydStephenSmithJr, (edited )
@BoydStephenSmithJr@hachyderm.io avatar

Hey, , what's the more conservative extension to the report?

I think I can do what I want either way, but I don't really know how to do it in Haskell2010 with no extensions. (I have a non-parameteric type function/family in my semantics, and don't want to give up totality.)

18+ kosmikus,
@kosmikus@functional.cafe avatar

@BoydStephenSmithJr I voted RankNTypes. Arguments in favour: RankNTypes (or at least Rank2Types) existed long before GADTs, and RankNTypes can be translated into "plain" Fω Core, without needing any equality constraints like FC.

joeyh,
@joeyh@hachyderm.io avatar

Last week I prototyped a git remote helper in a shell script, and now I'm rewriting that in as part of .

I don't do this often and I wonder if it was a mistake, probably I should have written the prototype in haskell and then integrated it into git-annex. It's kind of amazing how a lot of complexity is melting away and also how I'm adding So Many Types and also throwing in a lot of robustness improvements.

joeyh,
@joeyh@hachyderm.io avatar

This reminds me of when I rewrote all of debhelper from shell to perl in a couple days way back when.

mangoiv,
@mangoiv@functional.cafe avatar

Out:
(A -> D) -> B -> C -> D

In:
(A -> (D, B, C) ) -> D

mangoiv,
@mangoiv@functional.cafe avatar

I just realised in my real life example it is worse because d is an unconstrained type variable

BoydStephenSmithJr,
@BoydStephenSmithJr@hachyderm.io avatar

@mangoiv Higher ranked types, FTW?

haskell, (edited )
@haskell@fosstodon.org avatar

Haskellers can have a little UwU, as a treat.
https://haskell.org/?uwu=true

yujiri,
@yujiri@freeradical.zone avatar

@haskell nitpick: those are kana, not kanji. kanji are the logographic characters

haskell,
@haskell@fosstodon.org avatar

@yujiri Thanks!

maralorn,
@maralorn@chaos.social avatar

I would like to see CNN style real time coverage of software releases, e.g.:

BREAKING: New ghc release just dropped!

pomCountyIrregs,
@pomCountyIrregs@mstdn.social avatar

@maralorn When a showstopper bug/security flaw is found, would it be “BREAKING: {$sw} broken”?

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Made a video: generating HTML in Haskell using "lucid2"
https://www.youtube.com/watch?v=SQ78GVCzsz0

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

In which I completely mispronounce "lucid", among many other words.

mangoiv,
@mangoiv@functional.cafe avatar

Shoutout to @hecate for https://flora.pm/.

It’s just so awesome to have a fast, modern UI for hackage that really suits all your needs!

#haskell

flora_pm,
@flora_pm@functional.cafe avatar

@mangoiv cheers 👍

lyxia,
@lyxia@mamot.fr avatar

Bluefin-algae, an algebraic effect library using the Bluefin effect system.
https://discourse.haskell.org/t/bluefin-algae-algebraic-effects-in-bluefin/9470

mangoiv,
@mangoiv@functional.cafe avatar

@lyxia finally someone uses the native delconts! ❤️
Thank you for making this :)

koz,
@koz@chaos.social avatar

Fedi: do int2Word# and similar operations have a runtime cost? I assume 'no', but I'd like to be sure.

BoydStephenSmithJr,
@BoydStephenSmithJr@hachyderm.io avatar

@koz I'm not sure but I think https://github.com/ghc/ghc/blob/bf3d4db0894233ec72f092a4a34bce9ed4ff4e21/compiler/GHC/Builtin/primops.txt.pp#L817 says that actually no code is emitted for that prim op, which would mean no runtime cost.

Hopefully, a expert will come through and confirm or correct me.

Of course, that's not part of the language spec, or the public API of GHC, so it could change on a whim. (It won't.)

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