alternativebit.fr
rss2
AlternativeBit
alternativebit.fr · American English
Recent posts
rss2 indieweb atom
https://alternativebit.fr/posts/index.xml
- Last post
- Jun 1, 2026
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 0
- Our last check
- Answering
- Served from
- France
- Site title
- Alternativebit
- Text score at discovery
- 12,196
- Format
- rss2
- Features in the feed
- atom
- Community
- indieweb
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- Nar-klepto: Guix and Nix Offline Cache
Jun 1, 2026 · original
TL;DR: introducing nar-klepto , the context that led to its inception, and some fun experiments we did last week with it. 4 years ago, I moved out of Bayonne to a rural area. My quality of life almost instantly skyrocketed; however, I quickly felt a bit frustrated that I could only discuss computer-related things via online video meetings. After the 2024 FOSDEM, I realized that if there s no nerds around, why not invite my online friends at my place? And, for the last three years, I ve been renting a very nice place close to where I live for a full week. I invite my favorite online friends there. Each year, a few strangers join, friends of friends, usually becoming new friends by the end of the week. This is nice, it makes me happy every time. I just came back from this year s edition. Physically a bit exhausted, but mentally fully energized. A full week of nice discussions, drone and RC - Nsncd, Anniversary Updates
Oct 30, 2023 · original
Last year, flokli and I worked towards re-using TwoSigma s Nsncd as the main NixOS Nscd daemon. What is that even about? Well, Nscd is a Glibc daemon that was originally meant to cache the host/user resolution requests. It s mostly obsolete by now, but on NixOS and Guix, we abuse this daemon to get a stable ABI to load the host NSS modules from a potentially different glibc version. If you have no idea what I m talking about here and want to read more about that context, you should probably read flokli s original release blog post . It s now been a year since we released the Nsncd host lookups. Since then, Nsncd is used by default on NixOS in place of Nscd. The migration has been mostly bugless. Emphasis on the mostly ! While this switch has been beneficial for most of us, getting rid of the too-much-caching numerous bugs, some unexpected side effects appeared. Such as breaking the hostn - The Nix, OpenGL and Ubuntu Integration Nightmare
Apr 20, 2023 · original
In this article, we re about to dive into the uncharted OpenGL on Linux waters. After briefly explaining how the OpenGL calls are routed from your application to the GPU, we ll look at the NixOS special case. We’ll then explore how we can run the OpenGL programs built by Nix on a foreign distribution, such as Ubuntu or Fedora. Finally, we’ll introduce NixGLHost a new approach to solve this problem. OpenGL/CUDA on Linux? Everybody, including your favorite pet play video games. Your favorite go-to desktop application is relying on GPU acceleration to render on your screen, and AI is taking over the world. Welcome to 2023. In the last 15 years, GPUs transitioned from being this gamer-specific niche hardware to being this globally-used parrallel platform. There are a lot of GPU-related APIs in the wild. OpenGL, OpenCL, Vulkan, DirectX, Metal, etc.. In this article, we ll focus on a very smal - Nix Substitution: the Way Forward
Mar 31, 2022 · original
Abstract Nix and Guix have the unfortunate reputation to require a lot of bandwidth to distribute software. This reputation is sadly grounded. It seems like explicitly pointing to your dependencies comes with an overhead cost in terms of download size. Or does it? Currently, both Guix and Nix can substitute pre-built store paths from a binary cache using the Nix Archive (NAR) format. After conducting several benchmarks, we conclude that the substitution granularity should be finer to improve the substitution performance. We can increase the substitution granularity either by substituting files individually or by substituting chunked individual files. If you are already familiar with the Nix and Guix substitution mechanism, feel free to ignore the next two sections and directly jump to the Rethinking The Substitution Granularity one. You Said Substitution? We usually don t want to rebuild - Ex-Hack: a Haskell Example-based Documentation
Nov 15, 2018 · original
Abstract Ex-Hack is an example-based documentation automatically generated using the packages posted on Stackage. There s a live demo here . We ve just released the alpha version; you can have a look to the code here . We are actively looking for new contributors . After briefly introducing the project s incentives and explaining how this software works, we discuss the current roadmap and what we need to do before releasing the V1.0.0. An Effort to Fill the Documentation Gap Accordingly to the 2017 Haskell survey results , the lack of good documentation seems to be a major issue in the Haskell community. How can we fix this? The obvious solution is to write more documentation. However, writing more documentation does not necessarily mean writing a better one. The best documentation writers I met are not necessarily the best programmers I met. Being able to write a clear, concise and usef - Ultimate Writer: an Open Digital Typewriter
Oct 17, 2018 · original
TL;DR: A digital typewriter based on a Raspberry Pi and an E-Ink screen. The code/build instructions are available on GitHub . I am easily distracted. This is both a blessing and a curse. On one hand, I can deal with a large amount of boredom without driving crazy: remaining artifact from my school years and necessary skill to survive in our meeting-based modern corporate environment. On the other hand, completing a task requiring more than two minutes of my attention can turn into an escape game. My behavior is far from being exceptional. As a matter of fact, some dodgy people are making entire careers selling people like me books with clickbaity titles. Overcome your Procrastination and Setup your own Ponzi Scheme in 30 Days. The definitive guide. - picnoir 2018 More seriously, I am a firm believer that restriction fuels creativity. I don t think it s the result of a transcendental zen - Loading a Cabal module in the GHC API
Aug 8, 2018 · original
If you plan to build some Haskell tooling or any kind of static code analyzer, chances are you ll need to use the GHC API at some point. While loading a simple module into GHC s API is quite trivial and well documented, loading complex modules (modules having some c dependencies, some specific options in the .cabal file, etc.) will require you to find the appropriate dynamic flags . These flags are usually retrieved and loaded into GHC by Cabal. Sadly for us, Cabal s API does not seems to expose a direct way to get these flags. Some people have developed solutions to work around this problem. In this post, we ll explore two of them. Revision: If you plan to use GHC = 8.6.1, you might as well want to check out GHC source plugins. Mpickering wrote about them. They will not be mentionned in this article. GHC Plugin + GHCi Wrapper This technique has been detailed by Edward Yang on his websit - Silver Searcher: Useful Regexes for a Haskell Code-Base
Jul 22, 2018 · original
TL;DR I use 4 Perl Regex patterns most of the time when it comes to search some Haskell code: Functions: "\bargs\b[ \t\n]+::" Types: "(data|newtype|type)(\ +)\bargs\b" TypeClasses: "class(\ +)(.*)(=)*(\ *)\bargs\b" Constructors: "\|[\t\ ]+\bargs\b" I am looking for a better way to search for a type constructor, email me at picnoir at this domain if you have any better idea. Ag Exploring an unknown code-base is always tricky: you need to somehow translate a text-based representation of a software to an accurate model in your own mind. Being able to efficiently search through the code helps to reduce the read-search loop feedback and frees a lot of headspace. Unlike many languages, Haskell does not have a real IDE and like many developers, I use a traditional text-based searching tool: the silver searcher . This software is blazing fast and supports Perl regexes. After using it to search t - Please, Keep your Blog Light
Jan 24, 2018 · original
TL;DR: keeping your blog lightweight is important, I show you how to design a blog fitting in less than 10kB. You re already convinced weight really matters when it comes to web pages? You can skip the introduction and directly see how you can reduce your blog s weight through a practical example . Why Does Size Matters? I grew up in a French isolated village during the early 2000 s. Living in an isolated place during the early 2000 s meant no public libraries, no technical bookstore, no access to computer-related knowledge or any kind of technical expertise. When my parents decided to subscribe to an RTC connection, everything changed. All of sudden, I had access to virtually an infinite amount of information about computers, RC models, and other technical fields. By reading blogs and forums, I had access to everything a geeky kid could dream of: I learned to write websites using table- - Bracket: a Tale of Partially Applied Functions
Nov 29, 2017 · original
TL;DR In this post, we describe how we can use partially applied functions as a design building block though the study of a practical example: the bracket function. I ll use the Haskell programming language to illustrate this post. Just keep in mind this could be applied to almost any language. It all Begins with Code Reuse HSpec is a BDD-style unit-test framework for Haskell. In that kind of tests, it is quite common to create and destroy resources such as database handles, complex data structures, an HTTP server, etc. I was looking for a way to share a resource across several it clauses without having to duplicate its instantiate/tear-down process. I quickly found the around function and have been instantly confused by its type. around :: ( ActionWith a - IO () ) - SpecWith a - SpecWith a ActionWith and SpecWith being some alias types, let me de-sugar it for you. around :: (( a - IO () - Writing a Twitch Overlay using Haskell
Oct 21, 2017 · original
I have been watching Jessica s Mak streams lately. She is an indie game developper, but most of all, she has a kick ass overlay that shows what she is typing in real time. I wanted the same one, I made it using Haskell, Gloss and Chipmunk via the Hipmunk binding. Long story short, it ended up looking like this. The source code is available in this git repository . Gloss, display library Gloss is a graphics library built upon OpenGL. The API is high level enough to mask a lot of low level nastiness. To keep it short, the API is based around two functions: An update function, which processes the input events and update the world data structure. A display function, which renders the world as a Picture. Those two functions are using two datastructures: The world datastructure. This structure can be what you want, you will define it by yourself. The Picture datastructure. It represents someth - Wireguard-Haskell: Getting Started
Oct 16, 2017 · original
Why Starting this Project? After finishing DobadoBots, I was looking for a Haskell project in which I could be confronted with some performance and parallelism problems. Wireguard seemed to be the perfect project for that. At the time, no userspace implementation was available, the specification seemed to be simple enough for being implemented by a single person in a couple of months. Furthermore, a work in progress Haskell implementation called Nara was already available. The only contributor to this project sadly abandoned it, undocumented, several months ago. This is a great opportunity for me to complete what he started. Starting Point The userspace implementation is not providing a CLI by itself. Instead, we are using the wg CLI utility to communicate with the VPN daemon through a Unix socket. The overall architecture looks like this. We first need to test this RPC interface impleme - DobadoBots: Project Wrap Up
Sep 28, 2017 · original
Yet another post about DobadoBots: my programming video-game. Right, let s face it: it is done for two months now, this blog post is long overdue! The video-game is now completely playable, I reached the MVP stage. Here s a short video presenting the final result. Let s debrief this project. Getting Familiar with Haskell The main goal was to get some practical experience with Haskell. I had literally zero real-world experience before that. After two months in, I can use Haskell productively enough. Yup, that s a pretty steep and long learning curve. But it worth mentioning that I had no prior experience using a purely functional language. It worth mentioning that you do not need to understand what s a free monad or what are GADTs to be productive. You do not need a category theory PHD either. There is a huge gap between getting productive enough and understanding what s discussed on Hask - DobadoBots: Writing a Text Editor
Sep 4, 2017 · original
Yup, yet another post on my programming videogame: Dobadobots. Today, we are going to dig into the editor s implementation. Motivations I wanted the game to be as enjoyable as possible, I wanted a quick write/feedback loop. Using an external editor would have killed this fast feedback loop, it was just not an option. I first thought about integrating a pre-existing editor in it. An option would have been to create a web-view and embedding an HTML5 based text editor. After writing a quick proof of concept, I ran into some problems: I did not find any lightweight way to make the editor communicate with the core Haskell application. The only solution I found would have been to make this happen by running a WebSocket server. This solution seemed totally overkill, I decided to dismiss it. Another option would have been to find a library implementing the basic features of an editor. However, I - DobadoBots: Implementing the Parser
Jul 20, 2017 · original
Lately, I have been working on a video-game called DobadoBots . This game is about programming a robot s artificial intelligence to solve mazes. The robot is materialized by a white triangle. The goal is to reach the objective (orange square) while avoiding several obstacles. Instead of using a standard embeddable script language such as LUA, I went the custom way and wrote my own language. In a previous post, we detailed the AST specification and structure. In this post, we go through the implementation of the parser. As a quick reminder, the language we are attempting to parse looks like this IF laserDistance 20 moveForward ELSE IF laserScan = objective moveForward ELSE IF laserScan = obstacle turnLeft ELSE faceObjectives TL;DR, show me the code instead: here you go . Parsec As a new Haskell developer, I went through the various available parsing libraries. I finally decided to use the - DobadoBots: Specifying the Language
Jun 25, 2017 · original
Lately, I have been working on a video-game called DobadoBots . This game is about programming a robot s articial intelligence to solve mazes. The robot is materialized by a white triangle. The goal is to reach the objective (orange square) while avoiding several obstacles. Instead of using a standard embeddable script language such as LUA, I went the custom way and wrote my own language. Specifying the Language I had only one idea in mind when started to specify this language: keep it as simple as possible. I started wondering, what do we really need to program this kind of artificial intelligence? What is the smallest set of operations the language needs to support? I decided to specify the language as a decision tree. Each condition being a node, each robot movement being a leaf. No loops, no variable assignments, no functions. We do not want to embarrass the player with unnecessary c - One Year of FOSS
Jun 18, 2017 · original
One Year of FOSS Hello internet friends, long time no see. After doing a total revamp of this weblog, I think it is finally time to explain what s happening in my life. Two months ago, I decided to quit my job. I was tired of Paris s pollution. I was tired of Paris s shitty public transportation. I was not really happy doing my job. I had one year of runway. Long story short, I moved to Bayonne , a really nice place in southern France. Sadly, as nice as this place is, we cannot call it a tech-friendly place. There is not a lot of software-related jobs there, even less interesting ones. So instead of looking for a new job, I decided to do something bold. Why not, instead of constantly whining about low quality software, trying to write something I can be proud of, software I personally enjoy, and in the meantime, forgetting about getting any income for one year? The Manifesto I came up wi - Real World Haskell Chapter 9 Solutions
Apr 4, 2017 · original
Exercise P.221 Is the order in which we call bracket and handle important? Yup, it is pretty important: the code executed during the in-between statement of bracket still can raise an exception. We do not want our application to crash in case of an error while opening the file, therefore, we still need the handle statement. We could put the handle statement inside of the bracket statement, but since no exception would be thrown, we would risk to leak some resources. Exercise P.228 Question 1 How could we traverse the directory three in reverse alphabetic order? Well, it is quite straightforward, before iterating on directories, we apply the order function on the list containing them. Therefore, we only need to apply reverse as the order function. ControllerVisit ControllerVisit . traverse reverse "/home/minoulefou/test" Question 2 Implement an order function which traverses the tree in p - Real World Haskell Chapter 8 Solutions
Mar 28, 2017 · original
Hello, it s been a long time. Despite having done some progress on the resolution of the exercises of this book, I haven t blogged about my solutions, which is a shame. The solutions are available in this git repository though. Let s start again for the end of chapter 8. Exercises P.205 Here, we need to implement a case insensitive version of the glob checker. Despite having looked on Hoogle for some elegant solution, I did not found anything suitable… I ended up writing a dirty hack. The idea is to add a boolean flag to the matches glob. If this boolean is unset - meaning that we do not want to be case sensitive - we uppercase both the filename and the pattern. Despite not being an elegant solution, it works. matchesGlob :: FilePath - String - Bool - Bool matchesGlob name pat True = name =~ globToRegex pat matchesGlob name pat False = map toUpper name =~ globToRegex ( map toUpper pat ) - Real World Haskell Chapter 4 Solutions
Dec 18, 2016 · original
Okay, in this chapter, we will apparently learn more about common techniques in FP, can t wait! Exercises page 84 Let s rewrite safe versions of partial list functions The first two functions are very straightforward: a bit of pattern matching, some identification of edge cases and we re done. safeHead :: [ a ] - Maybe a safeHead [] = Nothing safeHead ( x : xs ) = Just x safeTail :: [ a ] - Maybe [ a ] safeTail [] = Nothing safeTail ( x : xs ) = Just xs safeLast :: [ a ] - Maybe a safeLast [] = Nothing safeLast [ x ] = Just x safeLast ( x : xs ) = safeLast xs It gets a bit more tricky for the last one. Indeed, we need to recursively construct a list from the end to the beginning and wrap everything in a Maybe. In order to do that, I first calculate the list in a sub-function defined in a where section and then encapsulate everything in the Maybe. safeInit :: [ a ] - Maybe [ a ] safeInit
Discovered by the rss-feed-index crawler, which checks each feed at most once a month.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_alternativebit_fr_1d04cc9af4ab3dd6. More from this site: alternativebit.fr in the Feeds tab.