H
So I tried the a new unlifted Int type to track the array position, and did not see any changes in run time performance that I can’t attribute to noise. Total allocated memory, however, increased by 0.7%. I measured it over many runs with much larger benchmark test sizes, and it’s pretty consistent (memory goes from range 51790MB-51825MB to range 52200MB-52234MB over >10 runs), but it’s late and my branch needs to be rebased, so this could very well be my mistake. My bet is that memory…
H
Can it be used without HLS? As for names, Haskell Curry’s middle name was Brooks…
H
tmcgilchrist: I’m using it with envrc, if it doesn’t work for you please open a bug report. Well, that explains why it ran cabal repl in the wrong directory when I tried it. I don’t really want to use direnv — do you have any other suggestions for getting this to work? (Maybe curry-mode should use project-current? It looks like that’s what eglot uses.) tmcgilchrist: I found lsp-mode too busy and mouse-oriented for my taste. While Eglot is in a good place with mode support and features. I never…
H
I found lsp-mode too busy and mouse-oriented for my taste. While Eglot is in a good place with mode support and features.
H
I’m using it with envrc, if it doesn’t work for you please open a bug report. Does it work OK with code that uses quasiquotes? It’ll be whether the tree-sitter grammar handles the [hsx|YOUR HSX CODE|] syntax properly. I haven’t really used it on any quasiquote code yet. In my experience with tree-sitter, maybe it should also warn when it’s newer.. Emacs usually tells me that by promptly segfaulting when trying to load the shared library. tree-sitter support ends up being very version specific…
H
maybe youre interested in building a static blog generator? https://learn-haskell.blog/
H
make games, make lots and lots of games, make games in keid engine, make games with brillo, geomancy or linear, and especially apecs too, use apecs and learn it
H
olf: I especially like the idea of units of measure. Is there a way to carry these over into the (Haskell) program being configured? The detour via JSON would erase the units, wouldn’t it? So a JSON parser would need to have a contract with the .ppo author to output a dedicated unit? The only way to do so currently would be manual, yes. The units aren’t strictly erased because Prospero only provides a ToJson instance for Integer<1> and Decimal<1>. That means the expected approach to serialise a…
H
GHC will indeed omit the tag check for unlifted datatypes. I couldn’t find the commit just now, but here’s an easy check: {-# LANGUAGE UnliftedDatatypes, MagicHash #-} module Unlifted where import GHC.Exts data L = L Int# type U :: UnliftedType data U = U Int# getL :: L -> Int# getL (L x) = x getU :: U -> Int# getU (U x) = x Compiled with ghc -O -fforce-recomp -ddump-cmm -dsuppress-all -dno-typeable-binds -c Unlifted.hs You will find the Cmm entry code for the getL (getL_entry) checks the…
H
learn you a haskell is always a good place to start. have ghci open so you can follow along!
H
I have been programming for a while in rust and decided to start learning haskell for fun, There’s a large selection of different books, guides, youtube playlists, etc and i’m not sure which ones to read/watch. Currently my only haskell experience is that i managed to get a basic cabal hello world project working and figured out how to replace String with Text, I don’t know much more.
H
Can someone explain to me what is the appeal of URL imports? I can understand them in the case of e.g. Nix, but I’d argue that’s a package manager / build language and not a configuration language so it needs to fetch dependencies. I’ve used Dhall and similar languages and I’ve never needed the URL import nor would I feel comfortable using it. Not because of “security” or what ever, but because I don’t want my app not starting if the server that’s supposed to serve the config is down at the…
H
Much better. Ideally, the onboarding example should follow the steps 1-4 in the workflow above. Unfortunately, the full output of step 2 in the tutorial looks scary and I can understand why you omitted it from the Hackage README. Can there be a simpler example database schema that results in a less scary Sch.hs file? In contrast, persistent hides all the scary stuff (tons of data- and type family instances) from the unknowing user’s eyes in Template Haskell splices, while generating innocent…
H
Oh yes no worries for responses. I’m just throwing out random ideas while trying to learn.
H
TheInnerLight: In my opinion, being able to write arbitrary side effects and arbitrary non-terminating code in configuration isn’t a feature, it’s a category error. Yet you were wise enough to give Prospero an import statement and URL fetching is on the agenda. Without imports, prospero files quickly would become rather repetitive. I especially like the idea of units of measure. Is there a way to carry these over into the (Haskell) program being configured? The detour via JSON would erase the…
H
Oh right, indeed I didn’t try an unlifted Int, only the unboxed Int#. That’s an interesting idea. In my simplistic brain, it shouldn’t reduce allocations because GHC does use pointer tagging with lifted types, but maybe it at least omits the tag checks and doesn’t increase allocated memory. I’m not sure I’ll be able to get feedback to you so quickly, though, as being unlifted means I have to change a lot of code to even try this (one of the feedback points of my article is exactly how painful…
H
Yes some sort of pointer tag for Int. For the part where you noticed that using unboxed Int# instead of boxed Int caused more allocations. I’m wondering if GHC does something like this and has some optimizations for it? docs.scheme.org An Introduction to Scheme and its Implementation - Immediate Values The solution to this is tagging. The value in each variable actually has a few bits devoted to a type tag which says what kind of thing it is–e.g., whether it’s a pointer or not.
H
tmcgilchrist: Could you open an issues describing your lsp-mode setup? Well, I was about to do that, but then I decided to have a look at eglot again… and much to my surprise found that flycheck now supports it. So I decided to give eglot + curry-mode a go. Looks good so far — let’s see how it goes!
H
Matti and Farhad are joined by Trevis Elser, chairman of the Stability Working Group, to talk about the working group, Haskell in industry, and what we can learn from senior Java engineers! haskell.foundation Trevis Elser Matti and Farhad are joined by Trevis Elser, chairman of the Stability Working Group, to talk about the working group, Haskell in industry, and what we can learn from senior Java engineers!
H
Thank you, and glad you enjoyed! Interesting use-case of skipping some fields to reuse a query. You’re right that the variable lengths mean you have to still do some work even for fields you’re not interested in, but at a glance I don’t see why a new skipFields :: Int -> RowDecoder () couldn’t help reduce that load. It would still decode the field lengths, but wouldn’t decode field values because it would just bump the offset over them. No allocations per field here either as within a single…
H
Ptr and ForeignPtr are both mutable, so any reading must happen in IO. Oh, of course And thanks for the hint on vector, array, and your array-simple package. I honestly went straight into ByteArray# once I saw the primitives without considering there might be something simpler and as efficient. I actually forgot to mention I gave ShortByteString a go too, and some of the bindings in the code are still named sbs. I can’t remember exactly why I dropped it now, but perhaps I chose pinned arrays…
H
I’m announcing Prospero - a new configuration language with Haskell-like syntax that currently evaluates to JSON or YAML. For a good few years now, I’ve been investigating the space of configuration languages like Dhall and Nickel. If you have to write complex configuration when working with the likes of terraform or kubernetes, these kinds of languages can drastically reduce the amount of complexity you’re confronted with and the volume of repetitive code you have to maintain. Despite their…
H
cpp-hs is essentially writing a .hsc file that is run through g++ first, to resolve the cpp macros, then run through ghc to compile the Haskell. hspec-discover (and my testing library skeletest) writes its own preprocessor that GHC invokes using the -pgmF flag. A preprocessor is essentially just an executable that takes the path to an input file and the path to an output file, and does whatever transformation it wants to the input file and write the output file. So you can do this approach to…
H
I enjoyed reading the report since I want to experiment with protocol parsing. Being able to close the gap that much is amazing. I’m wondering if the remaining gap could be traded off with lazy parsing? So if an application uses a generic query but doesn’t touch all the fields then it doesn’t parse as much. Guess that might be tough given the variable length nature of the data. Does Int use a tag bit? Maybe that reduces boxing costs?
H
Since the old tech-proposals repo has been archived: Do you plan to take up any of the projects from Pull requests · haskellfoundation/tech-proposals · GitHub ? I personally would be very happy to see Split out AST and Parser libraries from GHC by Ericson2314 · Pull Request #56 · haskellfoundation/tech-proposals · GitHub proceed (splitting out AST + parser as a library), since I think it will be an important piece in the puzzle to improve the tooling situation. From what I heard by Rodrigo last…
H
A technical vision for the Haskell ecosystem I’d like to have first class OCaps in Haskell some day… What’s missing from that being a reality? tomjaguarpaw: Perhaps a mod should split this off into its own topic? Suggesting again, if any mod is reading and willing.
H
(Our regular reminder that there’s no “safety” without a threat model.) I’d like to have first class OCaps in Haskell some day…
H
6d03: I suppose one could make a runtime, that doesn’t allow FFI and doesn’t have unsafePerformIO. This already exists, is called Safe Haskell, and is enabled by the Safe language extension: The use of Safe … includes disallowing unsafePerformIO, Template Haskell, pure FFI functions … downloads.haskell.org 6.18. Safe Haskell — Glasgow Haskell Compiler 9.14.1 User's Guide
H
Thanks @wiz, @Execute - I don’t really mind where it is, if it fits in the title then you hook people earlier, but just opening any announcement with one to three sentences explaining the context and the problem being solved would help a lot. Also none of this is supposed to be directed at anyone in particular, I just picked recent examples, it happens everywhere. Just trying to do my bit to make the community that little bit more successful by communicating better and helping to get people…
H
In Haskell, effects can’t be security boundaries, for the reason you mention; but: https://discourse.haskell.org/t/a-technical-vision-for-the-haskell-ecosystem/15078/13?u=6d03 OTOH, I suppose one could make a runtime, that doesn’t allow FFI and doesn’t have unsafePerformIO.