Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for < 32 elements, O(log n) for >= 32 elements [2] |
Deletion | O(n) for < 32 elements, O(log n) for >= 32 elements |
# project_root/.formatter.exs | |
[ | |
# functions to let allow the no parens like def print value | |
locals_without_parens: [hello: 2, get_user: 1, addtion: *], | |
# files to format | |
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"], |
#lang racket | |
(require (rename-in racket/base [+ r:+])) | |
(provide +) | |
(define (join e1 e2) | |
(cond | |
[(and (number? e1) (number? e2)) | |
number?] | |
[(and (number? e1) (symbol? e2)) |
# -*- mode: conf; tab-width: 4; -*- | |
## Passwords | |
# When using iCloud it is best to create an app-specific password | |
# | |
# https://support.apple.com/en-us/HT204397 | |
# | |
# Store application specific passwords on macOS with |
Fortunatly we could use pre-built gccemacs right now.
Those two repos did the greate job for us.
https://github.com/twlz0ne/nix-gccemacs-darwin
https://github.com/twlz0ne/nix-gccemacs-sierra
Here is the tutorial:
At the time of this writing, Rust and Cargo are available on FreeBSD/amd64 and FreeBSD/i386 only, whether it is from rustup or from the FreeBSD ports tree. Here is how I could bootstrap Rust and Cargo for FreeBSD/aarch64 from FreeBSD/amd64.
To be able to cross-compile anything, you need a userland for the target.
I have a pet project I work on, every now and then. CNoEvil.
The concept is simple enough.
What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?
;; A space invaders game in Racket | |
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com) | |
;; Permission is hereby granted, free of charge, to any person obtaining a | |
;; copy of this software and associated documentation files (the "Software"), | |
;; to deal in the Software without restriction, including without limitation | |
;; the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
;; and/or sell copies of the Software, and to permit persons to whom the | |
;; Software is furnished to do so, subject to the following conditions: |
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
:- use_module(library(pairs)). | |
:- use_module(library(reif)). | |
not_in_list(K, L) :- | |
if_((L = []), | |
true, | |
([X | More] = L, | |
dif(K, X), | |
not_in_list(K, More))). |