xvm
ghc
Our great sponsors
xvm  ghc  

105  81  
174  2,830  
4.0%  0.8%  
7.1  9.9  
2 days ago  3 days ago  
Java  Haskell  
GNU General Public License v3.0 or later  GNU General Public License v3.0 or later 
Stars  the number of stars that a project has on GitHub. Growth  month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
xvm

Have you written your own language in itself yet?
Parts of Ecstasy are now implemented in Ecstasy. Here's the Lexer, for example.

Top programming languages created in the 2010's on GitHub by stars
Ecstasy

What are you doing about async programming models? Best? Worst? Strengths? Weaknesses?
A Future reference has the various capabilities that you'd imagine, taking lambdas for thenDo(), whenComplete(), etc. The reference, in the above example, is a local variable, so you just obtain it using the Cstyle & operator:

October 2022 monthly "What are you working on?" thread
FWIW  here is the stage manager code that I referred to.

September 2022 monthly "What are you working on?" thread
Ecstasy (xtclang.org): Currently working on session management for a cloudbased HTTP back end. Not exactly compiler or language stuff, but it certainly is exercising the compiler and language.

Abstract Syntax Tree structure for variable definition
I prefer to make my AST nodes fairly rich, and let them do the brunt of the work themselves. Instead of the 5 lines of code above, the assignment statement node in Ecstasy is over 1000 LOC. But it handles everything from initial validation through the MLIR emission.
No, not that specific project. It's our own Mid Level Intermediate Representation (or Mid Level Intermediate Language), aka MLIR/MLIL. Here's a snapshot of the operators.

Thoughts on building on a VM (in particular, .NET/CLR) but not "exposing" the underlying VM?
Ecstasy project on Github: https://github.com/xtclang/xvm

August 2022 monthly "What are you working on?" thread
Quite a few improvements in Ecstasy over the past month:

Any language with a 'self' type?
Early on, we had the This keyword, and its meaning was "this type". So if a method on class Collection was declared as This add(Element), it meant that the method returned the autonarrowing type of this. We later changed it from This to Collection (or whatever the class name is) and added the Collection! (nonnarrowing) form, because there were syntactic needs (e.g. inner and outer autonarrowing class references) that could not be covered by This. We evaluated a few different options, and we liked (and still like) the result that we came up with. That said, I still wish we had a This keyword (see the 5th bullet point) for the "this type", but π€·ββοΈ.
ghc

How to get Bounded or Enum functionality for arbitrary Ints?
[email protected] % cat > File.hs pred 1 = 4 succ 4 = 1 succ 1 = 2 [email protected] % ghci XNoImplicitPrelude File.hs GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/bss/.ghc/ghci.conf [1 of 1] Compiling Main ( File.hs, interpreted ) Ok, one module loaded. (0.04 secs,) GHCi> pred 1 4 it :: GHC.Num.Num p => p (0.01 secs, 79,688 bytes) GHCi> succ 1 2 it :: GHC.Num.Num p => p (0.01 secs, 78,088 bytes)
GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/bss/.ghc/ghci.conf GHCi> :{ GHCi pred 1 = 4 GHCi succ 4 = 1 GHCi succ 1 = 2 GHCi :} pred :: (Eq a, Num a, Num p) => a > p succ :: (Eq a, Num a, Num p) => a > p (0.04 secs, 0 bytes) GHCi> pred 1 4 it :: Num p => p (0.01 secs, 62,784 bytes) GHCi> succ 4 1 it :: Num p => p (0.01 secs, 61,864 bytes) GHCi> succ 1 2 it :: Num p => p (0.01 secs, 61,928 bytes)

Monad Transformer Compatibility
[jumper derivingtrans @master]$ nix develop [jumper derivingtrans @master]$ cabal repl Build profile: w ghc9.2.4 O1 In order, the following will be built (use v for more details):  derivingtrans0.8.0.0 (lib) (first run) Preprocessing library for derivingtrans0.8.0.0.. GHCi, version 9.2.4: https://www.haskell.org/ghc/ :? for help :1:1: warning: [Wmissinglocalsignatures] Polymorphic local binding with no type signature: _compileParsedExpr :: forall {a}. ghcprim:GHC.Types.IO a > ghcprim:GHC.Types.IO a macro 'doc' overwrites builtin command. Use ':def!' to overwrite. Loaded GHCi configuration from /home/jumper/.ghc/ghci.conf : warning: [Wunusedpackages] The following packages were specified via package or packageid flags, but were not needed for compilation:  unliftiocore0.2.0.14aEaNp8xHRK6Ey6KEoq0BU  transformersbase0.4.6BO3yqj8kK7N1FV1bV9s5yP  transformers0.6.0.4F8uVRiS1g8K3h8Rsxr0UMd  resourcet1.2.6GkviYKmTWlu24k3qS4ih9J  random1.2.1.1DsRhotp5Bx34wv1CRGomTB  primitive0.7.3.01lmZ3PZm6JAE7HP2AgnD1I  mtl2.3.1A9dQ96c1wA8f1tgidK0Kj  monadcontrolidentity0.2.0.0C96eAiqAq5HPusYxrNzzr  monadcontrol1.0.3.19k4XD0NyvERHbSFKJZxIuC  logict0.8.0.05sZNS401Hrq2OkYkpVhzEI  exceptions0.10.7LidfE6miSbs6Y1NYj1lBV5  base4.16.3.0 [1 of 7] Compiling Control.Monad.Accum.OrphanInstances ( src/Control/Monad/Accum/OrphanInstances.hs, interpreted ) [2 of 7] Compiling Control.Monad.Select.OrphanInstances ( src/Control/Monad/Select/OrphanInstances.hs, interpreted ) [3 of 7] Compiling Control.Monad.Trans.Elevator ( src/Control/Monad/Trans/Elevator.hs, interpreted ) [4 of 7] Compiling Control.Monad.Trans.Compose.Transparent ( src/Control/Monad/Trans/Compose/Transparent.hs, interpreted ) [5 of 7] Compiling Control.Monad.Trans.Compose ( src/Control/Monad/Trans/Compose.hs, interpreted ) [6 of 7] Compiling Control.Monad.Trans.Compose.Stack ( src/Control/Monad/Trans/Compose/Stack.hs, interpreted ) [7 of 7] Compiling Control.Monad.Trans.Compose.Infix ( src/Control/Monad/Trans/Compose/Infix.hs, interpreted ) Ok, 7 modules loaded. Ξ» *Control.Monad.Trans.Compose > :set XPartialTypeSignatures Ξ» *Control.Monad.Trans.Compose > import Control.Monad.Trans.Compose.Infix Ξ» *Control.Monad.Trans.Compose Control.Monad.Trans.Compose.Infix > import Control.Monad.Trans.Compose.Transparent Ξ» *Control.Monad.Trans.Compose Control.Monad.Trans.Compose.Infix Control.Monad.Trans.Compose.Transparent > runTransparentT ./> (`Mtl.T.runReaderT` 'a') ./> (`Mtl.T.runReaderT` True) $ (,) <$> (Mtl.ask :: _ Char) <*> (Mtl.ask :: _ Bool) :4:98: warning: [Wpartialtypesignatures] β’ Found type wildcard β_β standing for βComposeT (Mtl.T.ReaderT Bool) (ComposeT (Mtl.T.ReaderT Char) (Elevator NoT)) IO :: * > *β β’ In the type β_ Charβ In an expression type signature: _ Char In the second argument of β(<$>)β, namely β(Mtl.ask :: _ Char)β :4:98: warning: [Wmonomorphismrestriction] β’ The Monomorphism Restriction applies to the binding for ββ Consider giving it a type signature β’ In the second argument of β(<$>)β, namely β(Mtl.ask :: _ Char)β In the first argument of β(<*>)β, namely β(,) <$> (Mtl.ask :: _ Char)β In the second argument of β($)β, namely β(,) <$> (Mtl.ask :: _ Char) <*> (Mtl.ask :: _ Bool)β :4:122: warning: [Wpartialtypesignatures] β’ Found type wildcard β_β standing for βComposeT (Mtl.T.ReaderT Bool) (ComposeT (Mtl.T.ReaderT Char) (Elevator NoT)) IO :: * > *β β’ In the type β_ Boolβ In an expression type signature: _ Bool In the second argument of β(<*>)β, namely β(Mtl.ask :: _ Bool)β :4:122: warning: [Wmonomorphismrestriction] β’ The Monomorphism Restriction applies to the binding for ββ Consider giving it a type signature β’ In the second argument of β(<*>)β, namely β(Mtl.ask :: _ Bool)β In the second argument of β($)β, namely β(,) <$> (Mtl.ask :: _ Char) <*> (Mtl.ask :: _ Bool)β In the first argument of βGHC.GHCi.ghciStepIO :: IO a > IO aβ, namely β(runTransparentT ./> (`Mtl.T.runReaderT` 'a') ./> (`Mtl.T.runReaderT` True) $ (,) <$> (Mtl.ask :: _ Char) <*> (Mtl.ask :: _ Bool))β ('a',True)

Why does 0.1 and 0.2 = 0.30000000000000004?
GHCi, version 8.10.7: https://www.haskell.org/ghc/ :? for help

I β€οΈ PEG
Haskell (in the form of GHC) uses Alex, which is regular expressionbased.

GHC JS and WA backends documentation ?
A good starting point for the JS backend is the modulelevel documentation in GHC.StgToJS, but it doesn't look like there's much good documentation yet, no.

How can type inference represent calculation?
GHCi, version 9.4.2: https://www.haskell.org/ghc/ :? for help ghci> :load Evolution.hs [1 of 2] Compiling Main ( Evolution.hs, interpreted ) Ok, one module loaded. ghci> :t fac four fac four :: Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Zero)))))))))))))))))))))))

Monthly Hask Anything (September 2022)
[email protected] % ghci GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/bss/.ghc/ghci.conf GHCi> :t foldMap foldMap :: (Foldable t, Monoid m) => (a > m) > t a > m GHCi> :t fold :1:1: error: β’ Variable not in scope: fold β’ Perhaps you meant one of these: βfoldlβ (imported from Prelude), βfoldrβ (imported from Prelude) GHCi> :t Data.Foldable.fold Data.Foldable.fold :: (Foldable t, Monoid m) => t m > m GHCi> :t foldMap id foldMap id :: (Foldable t, Monoid m) => t m > m

Monthly Hask Anything (August 2022)
% ghci GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/bss/.ghc/ghci.conf GHCi> import Control.Applicative (liftA3) (0.00 secs, 0 bytes) GHCi> import Data.Bool (bool) (0.00 secs, 0 bytes) GHCi> liftA3 bool (* 2) (`div` 2) even 4 2 it :: Integral t => t (0.01 secs, 60,272 bytes)

Alex Biehl: Open Sourcing a Tool to Generate Haskell Server Stubs
βI was a maintainer for Haddock. It's the de facto standard documentation tooling for Haskell. And I also contributed to the core build system called Cabal and also contributed a few small patches to GHC itself, as well as, all the ecosystem around it."
What are some alternatives?
seed7  Source code of Seed7
listexp  Regular expressionlike syntax for list operations [Moved to: https://github.com/phenax/elxr]
polysemy  :gemini: higherorder, noboilerplate monads
inotherwords  A higherorder effect system where the sky's the limit
effectzoo  Comparing Haskell effect systems for ergonomics and speed
vimmultiplecursors  True Sublime Text style multiple selections for Vim
fusedeffects  A fast, flexible, fused effect system for Haskell
frpzoo  Comparing many FRP implementations by reimplementing the same toy app in each.
kuroko  Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easytoembed bytecode compiler and interpreter.
TablaM  The practical relational programing language for dataoriented applications
TypeScript  TypeScript is a superset of JavaScript that compiles to clean JavaScript output.