;; Getting rid of explicit indexing was just step one.
-- After a few days/months/years, I now realize that it is more important and less buggy if I think only of the function to call (and whether I want to end up with a new (maybe pruned) collection, a single thing, or "both" (that's how I think of scans))
@aksharvarma Loop bodies are F-algebras and the "collection" over which you loop is a fixpoint of F. The #haskell recursion-schemes library handles that when F is an endofunctor on the term/expression category in your language.
You can still apply algebra semantics for "higher" functors F (when F is "really"/also a [type-indexed] functor family) with the appropriate Kan extensions.
The #Haskell#Unfolder is now 1 year old! In the anniversary episode, Edsko and I will return to the very first topic and consider (un)folds, but now in a more generic setting. Live on YouTube 2024-05-01 at 1830 UTC.
Brisbane Functional Programming Group #BFPG May meetup, Tue 14th: #Gleam v1 (Rob Ellen) + Do your taxes with #Haskell (Fraser Tweedale). All curious minds are welcome!
I wanted to declare something of type Code m a -> m Exp so I can pass the type variable of the typed code to a function used within the untyped code (which I have to do because TTH will not allow me a polymorphic function where I don’t name all type variables in the AST within the Code) but of course this doesn’t work because „untyped code cannot appear in type splice“ ARGH #haskell
#Haskell, #Jones, #Texas National Weather Service: #TORNADO WARNING in this area until 11:15 PM CDT. Take shelter now in a basement or an interior room on the lowest floor of a sturdy building. If you are outdoors, in a mobile home, or in a vehicle, move to the closest substantial shelter and protect yourself from flying debris. Check media. Source: NWS San Angelo TX
quoting @prophet
mli files are mostly used to constrain the visibility of definitions whereas hs-boot files are about allowing mutual recursion between modules (which OCaml doesn't support, even with mli files!)
But the mechanism by which they achieve their goals is nearly identical even though the perception of it is so vastly different.
I guess the conclusion to draw from this is that both sides are wrong: IMO, mli files are not nearly as good as OCamlers think they are, but hs-boot files aren't as ugly as Haskellers think either.
-- prettySrcLoc and prettyCallStack are defined here to avoid hs-boot
-- files. See Note [Definition of CallStack]
Backpack's design is primarily driven by compatibility considerations (“how do we build upon GHC's existing foundation?”), rather than elegance. In particular, Backpack doesn't eliminate those ugly .hs-boot files, it just automates and hides their generation and processing.
Hewwo, I'm Luna! :nkoLove: and am new to Fediverse. I'm a housecat-fox hybrid #furry :blobcat_nwn: :collar: :blobcatpats:. You can just call me Luna or Floof.
I'm a #trans#nonbinary :heart_transgender: and my pronouns are she/they/it.
I also find smol animals like cats, domesticated rats, pigeons and guinea pigs to be super adorable :ablobcathappypaws:.
My hobbies are #programming#haskell, #rust and #python casually :blobfoxcomputer: and playing Stardew Valley, Skyrim, CDDA and Widelands. Occasionally I read epic fantasy, romantic or horror novels whenever I feel cozy :blabcat:. My knowledge in these aren't deep though :blobcatgiggle:.
I mostly will be using Fediverse to share about my own journey on programming, sharing (boosting?) furry or cute arts and my own random (cat? meow?) thoughts in general.
On that note, I refrain from sharing suggestive content on my page and whenever I do, they will be tagged & marked with NSFW content warnings.
Also, "dani-servant-lucid2" has a public sublibrary with extra definitions, but it seems as if Hackage doesn't display info for public sublibraries yet.
In Servant, the ServerError type has an Exception instance https://hackage.haskell.org/package/servant-server-0.20/docs/Servant-Server.html#t:ServerError
You might speculate that when throwing a ServerError using liftIO . throwIO in a Handler, the ServerError is automatically caught and served as a response, but it ain't so: it's treated as just another exception, and the response code is 500.
A weird thing about being 50 is that there are programming languages that I've used regularly for longer than some of the software developers I work with have been alive. I first wrote BASIC code in the 1980s. The first time I wrote an expression evaluator--a fairly standard programming puzzle or homework--was in 1990. I wrote it in Pascal for an undergraduate homework assignment. I first wrote perl in the early 1990s, when it was still perl 4.036 (5.38.2 now). I first wrote java in 1995-ish, when it was still java 1.0 (1.21 now). I first wrote scala, which I still use for most things today, in 2013-ish, when it was still scala 2.8 (3.4.0 now). At various times I've been "fluent" in 8086 assembly, BASIC, C, Pascal, perl, python, java, scala; and passable in LISP/Scheme, Prolog, old school Mathematica, (early days) Objective C, matlab/octave, and R. I've written a few lines of Fortran and more than a few lines of COBOL that I ran in a production system once. I could probably write a bit of Haskell if pressed but for some reason I really dislike its syntax so I've never been enthusiastic about learning it well. I've experimented with Clean, Flix, Curry, Unison, Factor, and Joy and learned bits and pieces of each of those. I'm trying to decide whether I should try learning Idris, Agda, and/or Lean. I'm pretty sure I'm forgetting a few languages. Bit of 6502 assembly long ago. Bit of Unix/Linux shell scripting languages (old enough to have lived and breathed tcsh before switching to bash; I use fish now mostly).
When I say passable: in graduate school I wrote a Prolog interpreter in java (including parsing source code or REPL input), within which I could run the classic examples like append or (very simple) symbolic differentiation/integration. As an undergraduate I wrote a Mathematica program to solve the word recognition problem for context-free formal languages. But I'd need some study time to be able to write these languages again.
I don't know what the hell prompted me to reminisce about programming languages. I hope it doesn't come off as a humblebrag but rather like old guy spinning yarns. I think I've been through so many because I'm never quite happy with any one of them and because I've had a varied career that started when I was pretty young.
I guess I'm also half hoping to find people on here who have similar interests so I'm going to riddle this post with hashtags:
@abucci I didn't write an interpreter until college, but I also started with BASIC in the 80s.
Currently writing #haskell for work and #purescript (and Haskell) when I'm not on the clock. Previously did everything from PHP or PowerBuilder to C and C++ to Java and Scala or C#.
Really want a practical language based on Graded Modal Dependent Type Theory so putting some of my spare cycles into playing with that. Interested in having safe+easy lexical capture AND GC-free execution regions.
> none of the modifying functors are the same as the type being defined, that is, we do not consider non-linear non-uniform recursion
Oh, fiddlesticks. I've been trying to use this paper for non-linear recursion. I think I might have to invent/discover instead of just mimic. I'm not as good at that! :P
Please send me your best references for non-linear non-uniform recursion since Blampied2000. Bonus points for #haskell code, but categorical abstract nonsense is fine, too.