@jaror@kbin.social avatar

jaror

@jaror@kbin.social

All the side effects were never mentioned to me
I am innocent of uncontrolled abuse

This profile is from a federated server and may be incomplete. View on remote instance

Simple Programming Languages ( ryanbrewer.dev )

In this post I want to make this kind of simplicity more precise and talk about some reasons it's important. I propose five key ideas for simple programming languages: ready-at-hand features, fast iteration cycles, a single way of doing things, first-order reasoning principles, and simple static type systems. I discuss each of...

jaror ,
@jaror@kbin.social avatar

The machine itself can generally only do very simple things

I disagree. Assembly languages for modern architectures are a complexity hell. You need books with thousands of pages to explain how they work. In comparison the lambda calculus is much simpler.

RE: Is Ernest still here? ( kbin.social )

I check in here quite often, but for now, I'm just focusing on clearing spam and keeping the instance alive. In January, I was working on the AP module, and there has been significant progress in the work, which hasn't been publicly published yet. Unfortunately, at the beginning of the year, I developed a skin condition that...

mangoiv , to Random stuff
@mangoiv@functional.cafe avatar

what would interest me is; how do you actually transfer imperative datastructures to functional ones; I have made the experience, that there are some mutable datastructures that are hard to find replacements for and one of them I once got so stuck on that I gave up finding an alternative for.

If you wanna riddle yourself, then here are the requirements: random access in O(1), including updatescons and snoc in O(1)

The imperative version of that datastructure is a simple mutable doubly list; random access is done by storing the pointers to the places you want to access and then just mutating the parts of the list in place; snoc and cons are just inserting a new element.

Thanks for the video again @kosmikus :)

https://www.youtube.com/watch?v=WHVMjMIJnB4

jaror ,
@jaror@kbin.social avatar

@mangoiv RE: "random access is done by storing the pointers to the places you want to access", that's not what I would consider random access, because if you want to be able to access any place in the list then you'd need to store all those pointers in an array and then you run into problems when you want to cons and uncons things in that array. So your proposed mutable solution only gives you random access for a select group of pointers, which cannot be changed in constant time.

I believe it is possible to generalise immutable fingertrees to have an arbitrary amount of "fingers" instead of just the one at the beginning and the one at the end of the sequence. That data structure would give you the same operations.

The Pure Programming Language (2022) ( agraef.github.io )

Pure is a modern-style functional programming language based on term rewriting. It offers equational definitions with pattern matching, full symbolic rewriting capabilities, dynamic typing, eager and lazy evaluation, lexical closures, built-in list and matrix support and an easy-to-use C interface. The interpreter uses LLVM as a...

jaror ,
@jaror@kbin.social avatar

The symbolic rewriting is interesting.

I do wonder what "modern-style" functional programming means.

Also their FAQ says:

But considering other FPLs like Haskell and ML, Pure's library support isn't bad

Clicking that link reveals a list of about 34 libraries. In comparison, Haskell's current curated Stackage snapshot has 3340 packages in it (the total number of packages is probably more than 10x that). So, I think it is odd to claim its ecosystem is anywhere near Haskell's.

jaror , to Random stuff
@jaror@kbin.social avatar

Anyone want to guess how many errors this code generates:

{-# LANGUAGE DerivingVia #-}

module T where

newtype OrdList1 a = OrdList1 [a]
  deriving (Functor, Foldable, Traversable) via []

newtype OrdList2 a = OrdList2 [a]
  deriving (Functor, Foldable, Traversable) via Maybe

jaror OP ,
@jaror@kbin.social avatar

Haskell Interlude 34 – Lindsey Kuper ( haskell.foundation )

In this episode Niki Vazou and Wouter Swierstra chat with Lindsey Kuper, Assistant Professor at University of California, Santa Cruz. They discuss what to do when your data center gets hit by a tornado, life in academia versus life in industry, and what is choreographic programming.

jaror , to Random stuff
@jaror@kbin.social avatar

The GitHub repo of the basement and foundation packages was just archived, while it currently has 3764 indirect reverse dependencies including cryptonite, pandoc, and accelerate. I don't know why and I don't know what will happen now, but I am concerned.

Laziness in Haskell — Part 1: Prologue ( www.youtube.com )

Laziness is a critical but often maligned aspect of Haskell, and as this video argues, it is frequently misunderstood. In this video, Alexis explains how even strict evaluation in imperative programming languages is not always quite as strict as it seems, and how deviating from strictness can often significantly improve...

Haskell Interlude 30: Bartosz Milewski ( haskell.foundation )

In this episode, Bartosz Milewski is interviewed by Wouter Swierstra and Andres Löh. Bartosz shares his thoughts on the "fringe topics" in programming, from C++ templates to category theory in Haskell. How he considers monads to be like fingers sticking out of the water. And he'll talk a little bit about his upcoming book and...

  • All
  • Subscribed
  • Moderated
  • Favorites
  • supersentai
  • WatchParties
  • Rutgers
  • jeremy
  • Lexington
  • cragsand
  • mead
  • RetroGamingNetwork
  • loren
  • steinbach
  • xyz
  • PowerRangers
  • AnarchoCapitalism
  • kamenrider
  • Mordhau
  • WarhammerFantasy
  • itdept
  • AgeRegression
  • mauerstrassenwetten
  • MidnightClan
  • space_engine
  • learnviet
  • bjj
  • Teensy
  • khanate
  • electropalaeography
  • neondivide
  • fandic
  • All magazines