ghc
xvm
Our great sponsors
ghc | xvm | |
---|---|---|
95 | 110 | |
2,957 | 189 | |
0.8% | 0.0% | |
9.6 | 9.8 | |
6 days ago | 6 days ago | |
Haskell | Java | |
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.
ghc
-
Veryl: A Modern Hardware Description Language
of course it does! what else would you call something like chicken scheme [https://call-cc.org/], ats [https://ats-lang.sourceforge.net/], or ghc [https://www.haskell.org/ghc/]? they are not "scripts", they are full-blown compilers that happen to use C as their compilation target, and then leverage C compilers to generate code for a variety of architecures. it's a very sensible way to do things.
-
XL: An Extensible Programming Language
Agree about Haskell... as far as I'm aware there is actually no declarative/easily-readable definition of the Haskell syntax that is also complete, especially when it comes to the indentation rules, and the syntax is basically defined by the very (ironically) imperatively-defined GHC parser[0].
I prefer a syntax like in Pure[1], where the ambiguous, hard to parse indentation-based syntax is replaced by explicit semicolons (Yeah, you can use braces/semicolons in Haskell as well, but most code doesn't).
[0] https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser/L...
-
Revisiting Haskell after 10 years
GHC, the main Haskell compiler
-
Introducing NeoHaskell: A beacon of joy in a greyed tech world
Depending on who you ask, a programming language can be different things. If you ask the Haskell community, many will tell you that the language is the Haskell specification, and that what currently is being used is not Haskell itself, but an extension of Haskell that is supported by the GHC compiler. Similar to the C language, a programming language would be a specification.
- Exploring the Internals of Linux v0.01
- Why did GHC go from "occurs check failed" to talking about rigid type variables?
-
How to get Bounded or Enum functionality for arbitrary Ints?
bss@monster % cat > File.hs pred 1 = 4 succ 4 = 1 succ 1 = 2 bss@monster % 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 deriving-trans @master]$ nix develop [jumper deriving-trans @master]$ cabal repl Build profile: -w ghc-9.2.4 -O1 In order, the following will be built (use -v for more details): - deriving-trans-0.8.0.0 (lib) (first run) Preprocessing library for deriving-trans-0.8.0.0.. GHCi, version 9.2.4: https://www.haskell.org/ghc/ :? for help :1:1: warning: [-Wmissing-local-signatures] Polymorphic local binding with no type signature: _compileParsedExpr :: forall {a}. ghc-prim:GHC.Types.IO a -> ghc-prim:GHC.Types.IO a macro 'doc' overwrites builtin command. Use ':def!' to overwrite. Loaded GHCi configuration from /home/jumper/.ghc/ghci.conf : warning: [-Wunused-packages] The following packages were specified via -package or -package-id flags, but were not needed for compilation: - unliftio-core-0.2.0.1-4aEaNp8xHRK6Ey6KEoq0BU - transformers-base-0.4.6-BO3yqj8kK7N1FV1bV9s5yP - transformers-0.6.0.4-F8uVRiS1g8K3h8Rsxr0UMd - resourcet-1.2.6-GkviYKmTWlu24k3qS4ih9J - random-1.2.1.1-DsRhotp5Bx34wv1CRGomTB - primitive-0.7.3.0-1lmZ3PZm6JAE7HP2AgnD1I - mtl-2.3.1-A9dQ96c1wA8f1tgidK0Kj - monad-control-identity-0.2.0.0-C96eAiqAq5HPusYxrNzzr - monad-control-1.0.3.1-9k4XD0NyvERHbSFKJZxIuC - logict-0.8.0.0-5sZNS401Hrq2OkYkpVhzEI - exceptions-0.10.7-LidfE6miSbs6Y1NYj1lBV5 - base-4.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: [-Wpartial-type-signatures] • 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: [-Wmonomorphism-restriction] • 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: [-Wpartial-type-signatures] • 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: [-Wmonomorphism-restriction] • 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
xvm
-
How do you parse function calls?
I'm just going to warn you in advance that invocation is one of the hardest things in the compiler to make easy. In other words, the nicer your language's "developer experience" is around invocation, the more hell you're going to have to go through to get there. The AST nodes for Name( (NameExpression) and Invoke( (InvocationExpression) alone are 7kloc in the Ecstasy implementation, for example -- but the result is well worth it.
-
What are some important differences between the popular versions of OOP (e.g. Java, Python) vs. the purist's versions of OOP (e.g. Smalltalk)?
Ecstasy uses message passing automatically behind the scenes for asynchronous calls, but the message passing isn't visible at the language level (i.e. there is no "message object" or something like that visible). Basically, all Ecstasy code is executing on a fiber inside a service, and services are all running concurrently, so from any service realm to any service realm, the communication is by message.
-
Is your language solving a real world problem?
Regarding Ecstasy, we did not set out to build a new language; we actually set out to solve a real world problem. Specifically, we wanted to be able to dramatically improve the density of workloads in data centers, by at least two orders of magnitude in the case of lightly used applications. Our initial goal was to create a runtime design that would support 10,000 stateful application instances on a single server. Let's call it the "a10k" problem 🤣 ... a tribute to the c10k problem from 1999. We refer to our goal as "zero carbon compute", i.e. we want to push the power and hardware cost for an application to as close to zero as possible; you can't reach zero, but you can get close. If we succeed, we will help reduce the electricity used in data centers over the next few decades by a significant percentage.
-
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 C-style & 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 cloud-based 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.
What are some alternatives?
seed7 - Source code of Seed7
list-exp - Regular expression-like syntax for list operations [Moved to: https://github.com/phenax/elxr]
polysemy - :gemini: higher-order, no-boilerplate monads
effect-zoo - Comparing Haskell effect systems for ergonomics and speed
in-other-words - A higher-order effect system where the sky's the limit
vim-multiple-cursors - True Sublime Text style multiple selections for Vim
kuroko - Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easy-to-embed bytecode compiler and interpreter.
frp-zoo - Comparing many FRP implementations by reimplementing the same toy app in each.
fused-effects - A fast, flexible, fused effect system for Haskell
TablaM - The practical relational programing language for data-oriented applications
RustScript2 - RustScript is a functional scripting language with as much relation to Rust as Javascript has to Java.