This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (fib n) | |
(if (< n 2) | |
1 | |
(+ (fib (- n 2)) | |
(fib (- n 1))))) | |
(define (range from to) | |
(if (= from to) | |
(list to) | |
(cons from (range (+ from 1) to)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 | |
0 | |
1 | |
2 | |
0 | |
1 | |
0 | |
2 | |
-2 | |
-6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> (defn main [] (IO.println "hej")) | |
> :b | |
In file included from out\main.c:24: | |
C:\Users\erik\Documents\Carp/core\carp_string.h(19,5): warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'ssize_t' (aka 'long') | |
[-Wformat] | |
CHK_INDEX(i, strlen(*s)); | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
C:\Users\erik\Documents\Carp/core\core.h(27,64): note: expanded from macro 'CHK_INDEX' | |
printf(__FILE__ CHK_INDEX_FORMAT_STRING, __LINE__, (ssize_t)i, \ | |
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Put into ~/.emacs.d/init.el | |
(menu-bar-mode -1) | |
(tool-bar-mode -1) | |
(ido-mode 1) | |
(ido-everywhere 1) | |
(global-set-key (kbd "C-x k") 'kill-this-buffer) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(setq package-archives | |
'(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "https://marmalade-repo.org/packages/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn gcd [a b] | |
(let [r (mod a b) | |
q (Int./ a b)] | |
(if (= r 0) | |
b | |
(gcd b r)))) | |
(defn gen [] | |
(let [a (Int.random-between 0 99) | |
b (Int.random-between 0 99) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(menu-bar-mode -1) | |
(ido-mode 1) | |
(ido-everywhere 1) | |
(global-set-key (kbd "C-x k") 'kill-this-buffer) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(setq package-archives | |
'(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "https://marmalade-repo.org/packages/") | |
("melpa" . "https://melpa.org/packages/"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frame-count: 0 target-frame-count: 7.98333, monotonic-time: 479, frames-ahead: -7.98333, delay: -133 | |
frame-count: 1 target-frame-count: 8.03333, monotonic-time: 482, frames-ahead: -7.03333, delay: -117 | |
frame-count: 2 target-frame-count: 8.26667, monotonic-time: 496, frames-ahead: -6.26667, delay: -104 | |
frame-count: 3 target-frame-count: 8.55, monotonic-time: 513, frames-ahead: -5.55, delay: -92 | |
frame-count: 4 target-frame-count: 8.88333, monotonic-time: 533, frames-ahead: -4.88333, delay: -81 | |
frame-count: 5 target-frame-count: 8.96667, monotonic-time: 538, frames-ahead: -3.96667, delay: -66 | |
frame-count: 6 target-frame-count: 9.08333, monotonic-time: 545, frames-ahead: -3.08333, delay: -51 | |
frame-count: 7 target-frame-count: 9.11667, monotonic-time: 547, frames-ahead: -2.11667, delay: -35 | |
frame-count: 8 target-frame-count: 9.15, monotonic-time: 549, frames-ahead: -1.15, delay: -19 | |
frame-count: 9 target-frame-count: 9.2, monotonic-time: 552, frames-ahead: -0.2, delay: -3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Bench_bench__void(Fn___void f) { | |
/* let */ { | |
double _9 = Bench_ns_MINUS_iter_MINUS_inner__void(f, 1); | |
double ns = _9; | |
double ns_MINUS_target_MINUS_total = 1000000.0; | |
double _17 = Bench_min_MINUS_one(ns); | |
double _18 = Double__DIV_(ns_MINUS_target_MINUS_total, _17); | |
double _n = _18; | |
double _22 = Bench_min_MINUS_one(_n); | |
double n = _22; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENIAS_TILE_ADDRESS=$B000 | |
ENIAS_SPRITE_ADDRESS=$F400 | |
ENIAS_PALETTE_ADDRESS=$F500 | |
ENIAS_NAMETABLE_ADDRESS=$F000 | |
.org $0200 | |
ldx #$00 ; offset into sprite-table | |
lda #$00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.org $0200 | |
jsr setup_hardware_registers | |
ldx #$00 ; offset into sprite-table | |
lda #$00 | |
sta sprites,x ; x-position | |
inx |
NewerOlder