Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.
/* | |
* wintypes.h | |
* | |
* Windows Data Types | |
* Copyright 2020 (c) Samantaz Fox | |
* | |
* This file is in the public domain. | |
* Feel free to copy, modify, redistribute it! | |
* |
This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.
Run python.exe portable-msvc.py
and it will download output into msvc
folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.
You can list available versions with python.exe portable-msvc.py --show-versions
and then pass versions you want with --msvc-version
and --sdk-version
arguments.
To use cl.exe/link.exe from output folder, first run setup.bat
- after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.
To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc
argument (msvc is folder name where output is stored).
#pragma once | |
#define _GNU_SOURCE | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <sched.h> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <linux/perf_event.h> |
import numpy as np | |
# 'f'rom is a set of (x, y) | |
# 't'to is a set of (u, v) | |
# H * (x, y, 1) = k*(u, v, 1) for every point | |
# combine all equtaions and solve: Ah = b | |
# h is (h0, .., h7), add h8 = 1, zeros for z | |
# and make a 4x4 projection matrix | |
if __name__ == '__main__': | |
f = [(0.0, 0.0), (0.0, 100.0), (100.0, 100.0), (100.0, 0.0)] |
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 |
FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
I'm exploring the right data types for writing a type inference with higher kinds and poly types.
Putting more things in the type system can force you to think about more things, but it also can make it harder and more verbose to write and read algorithms.
- This one implements a fairly good type inferer, with a free monad, but kinds are not enforced, and forall/schemes are not considered atll.
- This one pushes kinds and generic vars into the type system with a nested tuples approach
- This one borrows from Oleg's typed eval, but doesn't actually implement any hard things yet.
(use '[clojure.core.match :only [match]]) | |
(defn evaluate [env [sym x y]] | |
(match [sym] | |
['Number] x | |
['Add] (+ (evaluate env x) (evaluate env y)) | |
['Multiply] (* (evaluate env x) (evaluate env y)) | |
['Variable] (env x))) | |
(def environment {"a" 3, "b" 4, "c" 5}) |