duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| #!/usr/bin/env python3 | |
| # encoding: utf-8 | |
| """Use instead of `python3 -m http.server` when you need CORS""" | |
| from http.server import HTTPServer, SimpleHTTPRequestHandler | |
| class CORSRequestHandler(SimpleHTTPRequestHandler): | |
| def end_headers(self): | |
| self.send_header('Access-Control-Allow-Origin', '*') | 
| ### Generic Dockerfile demonstrating good practices | |
| ### Imports | |
| # Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better | |
| FROM ubuntu:latest | |
| # Better, using a small image since our app has no dependency on Ubuntu | |
| FROM alpine:3.3 | 
I am currently dealing with a lot of libraries at work. Both third party as well as libraries written or being currently in process of being written by me. I absolutely love writing and working with libraries. Especially if they present or bring me to either a new or different approach to solve a problem. Or at least provide a different view.
Over time I noticed however that quite regulary we had to decide that we cannot use a third party library. Often it is the usual reason.
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdatomic.h> | |
| #include <limits.h> | |
| #include <pthread.h> | |
| /* | |
| * Intel® 64 and IA-32 Architectures Software Developer’s Manual | |
| * | |
| * Volume 3A - 8.1.1 Guaranteed Atomic Operations | 
Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.
Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.
Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.
The book is build around 34 chapters organised in chapters.
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
| WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
| # wayland-scanner is a tool which generates C headers and rigging for Wayland | |
| # protocols, which are specified in XML. wlroots requires you to rig these up | |
| # to your build system yourself and provide them in the include path. | |
| xdg-shell-protocol.h: | |
| wayland-scanner server-header \ | |
| $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
| xdg-shell-protocol.c: xdg-shell-protocol.h |