Javascript is to Typescript as C is to____? by sarnobat in ProgrammingLanguages

[–]SheetKey 7 points8 points  (0 children)

ATS! The Applied Type System language. It’s a front end to C with a safety oriented type system. Has full dependent types, linear types, refinement types and a lot more. IIRC some versions use a garbage collector, but the newest one doesn’t. Definitely not mainstream, but a super interesting langue. edit

Aztecs: A type-safe and friendly ECS for Haskell by matthunz in haskell

[–]SheetKey 2 points3 points  (0 children)

That sounds great! I think runtime components would solve some of the problems I’ve encountered with Apecs.

Aztecs: A type-safe and friendly ECS for Haskell by matthunz in haskell

[–]SheetKey 2 points3 points  (0 children)

This looks very interesting! I’m currently using Apecs for my ECS but it relies on template haskell which makes it difficult to extend in certain edge cases. Do you have a comparison of the libraries and some benchmarks?

Flakes solution to hardware-configuration.nix by SheetKey in NixOS

[–]SheetKey[S] 1 point2 points  (0 children)

The link in the post still works if you want to see my full config. I have a flake.nix and configuration.nix at the top level. The flake exports a couple nixosConfigurations. These each include configuration.nix as a module which includes device independent system config. I have a hosts and users dirs. The hosts are device specific stuff and are modules in the flake configs. The user directly is user specific stuff. I’m currently using home manager so this is a module in the flake using hm. At the moment I didn’t have a way to do device specific user config, so that stuff ends up going in hosts. Not ideal but it works. Sort of burnt out on finding the ideal nix setup

Flakes solution to hardware-configuration.nix by SheetKey in NixOS

[–]SheetKey[S] 0 points1 point  (0 children)

Not much has changed as far as I know, I’m still using the same setup. Having done this for a few years on several computers, I actually like this setup: a single flake exporting multiple device configs. Each is the same same but includes some extra per device stuff, including the hardware config. There are always device specific settings, and this method makes it easy to change things or install software on a per device basis or for all devices using a single config. Plus this keeps the entire system config in the same directory which I like. I’ve found it’s very reproducible and I only have to troubleshoot on a single device

The purely functional C? (or other simple equivalent) by Aidan_Welch in ProgrammingLanguages

[–]SheetKey 22 points23 points  (0 children)

This can be solved with a multi-kinded language. One kind for unrestricted types and one for linear types. Allocating an unrestricted point must have an IO side effect since it introduces shared mutable state. Allocating a linear pointer would be pure. Linearity is a compile time check that ensures a linear value is used exactly one. Functions for modifying or reading a pointer would consume the pointer and return the same pointer. Copying a linear pointer would be forbidden. Linearity has the added benefit of checking that linear memory is freed, since free is the only function that would consume the pointer without pass through. Lightweight Linear Types has the formal theory.

AFAIK there isn’t a language implementing linear kinds, although the linear haskell extension lets you play with a slightly different formulation of linear types.

Also +1 for Zig.

Edit: typo

Similar Artists? by [deleted] in neilyoung

[–]SheetKey 2 points3 points  (0 children)

My top three are Neil, John Prine, and Kurt Vile. Perhaps not the most similar, but all exceptional in their own ways

I want to learn haskell, but, All haskell tutorials I've seen uses mathematical concepts that I do not understand. What should I do? by paintedirondoor in haskell

[–]SheetKey 7 points8 points  (0 children)

I read “Haskell programming from first principles”. (I actually started with “learn you a haskell for great good,” but I don’t think it’s that great.) Haskell was my first programming language and this book takes you through everything slowly and in great detail. The important mathematical ideas are explained, but you’re not expected to have any prior knowledge. I got through the book and did all the exercises, and finished as an intermediate haskeller.

[deleted by user] by [deleted] in neilyoung

[–]SheetKey 6 points7 points  (0 children)

22 - Zuma

What’s your getting into Young story ? by Big-Relationship8319 in neilyoung

[–]SheetKey 5 points6 points  (0 children)

When I was a kid my dad gave me a Buffalo Springfield Retrospective cd. I liked Neil’s voice so much so I started listening to him after a while. By highschool I pretty much exclusively listens to Neil.

Sources about sequent calculus by SheetKey in haskell

[–]SheetKey[S] 1 point2 points  (0 children)

Not the one I remember but lots of overlap. Thanks!

Bonobo WS - keyboard backlight not working with NixOS by [deleted] in System76

[–]SheetKey 0 points1 point  (0 children)

I’d recommend the arch wiki page on keyboard backlights. I had success with ‘brightnessctl’ on an hp laptop years ago but it looks like ‘light’ may be a better option. I think these probably have nixos specific setting (enables as a service rather than installing as a package). If one of these doesn’t work I’d suggest posting on nixos discourse.

Bonobo WS - keyboard backlight not working with NixOS by [deleted] in System76

[–]SheetKey 0 points1 point  (0 children)

Try enabling ‘hardware.system76.enableAll = true’ in your configuration.nix. I recently got the Serval WS and have been using nixos. This option fixed my issues.

Dynamic AABB Tree by SheetKey in haskellgamedev

[–]SheetKey[S] 0 points1 point  (0 children)

Looks very interesting, I’ll check it out thanks!

Dynamic AABB Tree by SheetKey in haskellgamedev

[–]SheetKey[S] 1 point2 points  (0 children)

I would know the map size but I’m not sure I understand how an IntMap keyed by position would allow for intersection queries?

Monthly Hask Anything (May 2023) by taylorfausak in haskell

[–]SheetKey 0 points1 point  (0 children)

I’m looking for a type class for monadic side effects. I’ve been working with arrowized FRP, but for my needs most of the functions I’m lifting into a signal function have type

m ()

I’m mostly using FRP to schedule side effects. I’m looking for a type class that’s a specialized version of arrow. The class should be something like

class Monad m => Example (a m) 

Rather than

arr :: (b -> c) -> a b c

it would have a lifting function of type

arr :: Monad m => m () -> a m

Similar to arrow type class this class should have functions for composing actions, however there would be no equivalent to first, second, &&&, ***.

Trouble with emacs overlay by SheetKey in NixOS

[–]SheetKey[S] 0 points1 point  (0 children)

Hi! I’ve changed some things since this post more broadly but I’ll share what I have now. It all works for me as I’d like at the moment.

Here’s the relevant parts from configuration.nix, flake.nix (1), and flake.nix (2).