#ghc — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ghc, aggregated by home.social.
-
"Immutability changes everything: We need it, we can afford it, and the time is now." -- Pat Helland
https://www.youtube.com/watch?v=xv-WApd-pSY
#simonpeytonjones #spj #interview #haskell #ghc #verse #gamedev #unreal #fortnight #functionalprogramming -
-
Might #GHC 9.14 be the first release that does not break anything (except for bounds bumps)? If you find anything, report it here:
https://discourse.haskell.org/t/was-any-breakage-caused-by-9-14/13902?u=jaror
-
"Compiler and runtime support for continuation marks" (PLDI 2020) https://dl.acm.org/doi/10.1145/3385412.3385981
"Continuation marks enable dynamic binding and context inspection in a language with proper handling of tail calls and first-class, multi-prompt, delimited continuations."GHC proposal: "scoped thread-locals" https://github.com/ghc-proposals/ghc-proposals/pull/751
"efficient storage and lookup for immutable context
attached to the current Haskell thread, which is inherited by child threads." -
Packages like `text` reach into the unstable bowels of #GHC to avoid allocating intermediate structures when reading IO.
But it is possible to do fusible lazy IO:
```
produce :: IO [Char]
produce = IO $ \s0 ->
(# s0 , build $ \c n ->
let go s = case runIO getChar s of
(# s' , x #) -> c x (go s')
in go s0
#)
```Perhaps GHC could expose something like that and the text package could use it.
-
TIL #GHC already has some functionality in place to check that a function is only used at a monomorphic type. Currently, I think it is only used for `tagToEnum#` but it would be useful to properly integrate it into the type system.
-
An new proposal for passing implicit parameters to #Haskell functions: https://github.com/ghc-proposals/ghc-proposals/pull/741
Done the right way; as opposed to the existing ImplicitParams extension, which is practically useless.
-
-fno-show-error-context
"Controls whether GHC displays information about the context in which an error occurred"
https://downloads.haskell.org/ghc/latest/docs/users_guide/using.html#ghc-flag-fshow-error-context
-
impurepics - #Haskell Extensions
https://impurepics.com/posts/2019-08-01-haskell-extensions.htmlA collection of short descriptions and examples of #GHC extensions
-
#Haskell New Year Resolutions
https://discourse.haskell.org/t/haskell-new-year-resolutions/13478These are very useful advices!
I learnt:
- Generically and DerivingVia
- StarIsType
- DuplicateRecordFields, NoFieldSelectors, and OverloadedRecordDotI must admits that there are just too many extensions in #GHC...
-
niklas-heer/speed-comparison: A repo which compares the speed of different programming languages.
https://github.com/niklas-heer/speed-comparisonThis projects tries to compare the speed of different #programming languages. It uses an implementation of the Leibniz formula for π to do the comparison.
Notably:
- #Julia is the only dynamically-typed languages amoung the top tier, only ~28ms slower from #Cpp (#Clang).
- #Rust got a huge boost with nightly compiler (it is said that hand-written SIMD is used?)
- #Go tops in 3rd tier (very crowded 0.8s~1s)
- #PyPy and #Haskell (#GHC) are very closed (~1s), preceding #Racket, beating #Python (#NumPy) by a lot (~1.2s)
- The slowest is #CPython (~86s) -
PSA: When using the #GHC API, the `setSessionDynFlags` function will modify the DynFlags, so be sure to discard the old DynFlags and use `getSessionDynFlags` if you need them again later.
Thanks to Rodrigo Mesquita for helping me figure this out!
-
While declaring peace and justice advocates are terrorist organizations, while outlawing international law authority of the United Nations, US profiteers’ recruitment increases to expand their presence in Gaza for trapping Palestinians next month. Happy Christmas. Great reporting from DropSite News.
#Gaza #UGSolutions #NorthCarolina #GHC #CAIR -
#GHC now runs in your browser (via #WASM)!
https://discourse.haskell.org/t/ghc-now-runs-in-your-browser/13169?u=jaror
-
PSA: RequiredTypeArguments, introduced in the upcoming #ghc 9.14 interacts strangely with ScopedTypeVariables. Can you guess what this program prints?
data A s where
A :: forall (s :: Symbol) -> KnownSymbol s => A "bar"instance Show (A s) where
show (A s) = symbolVal (Proxy @s)main = print (A "foo")
-
TIL: parallel sparks can take up to 20 ms to be scheduled, so you should not use them for small computations.
-
it's comic sans time.