Skip to content

Instantly share code, notes, and snippets.

View neuro-sys's full-sized avatar
💭
💾

Fırat Salgür neuro-sys

💭
💾
View GitHub Profile
vocabulary mandelbrot.fs also mandelbrot.fs
require sdl.fs
also sdl.fs
\ z = z^2 + c
\ z = x0 + iy0
\ z^2 = (x + iy)(x + iy)
\ = x^2 + 2xiy + (iy)^2
\ = x^2 + 2xiy - y^2
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
@neuro-sys
neuro-sys / vec.fs
Last active March 7, 2021 16:15
fixed point vector operations
0 warnings !
vocabulary f8
f8 definitions
\ fixed point 8.8 conversion
: d>f8 ( d -- f8 ) 256 * ;
: f8>d ( f8 -- d ) 256 / ;
; Transition effect 1
nolist
org #7000
jp start
fc ds 1 ; frame count
y1 ds 2 ; y pos counter
y2 ds 2 ; upper bound position
y3 ds 2 ; lower bound
@neuro-sys
neuro-sys / multable.c
Last active December 16, 2020 23:19
mul table
1 2 3 4 5 6 7 8 9
--- --- --- --- --- --- --- --- ---
1 | 1 2 3 4 5 6 7 8 9
2 | 2 4 6 8 10 12 14 16 18
3 | 3 6 9 12 15 18 21 24 27
4 | 4 8 12 16 20 24 28 32 36
5 | 5 10 15 20 25 30 35 41 45
6 | 6 12 18 24 30 36 42 48 54
7 | 7 14 21 28 35 42 49 56 63
8 | 8 16 24 32 41 48 56 65 72
\ Advent of Code 2020 day 1.0
include reader.fs
: 2020? + 2020 = ; \ true if sum is equal to 2020
: find-pair-j ( uaddr1 uaddr2 -- uaddr3 uaddr4 t )
begin
dup list->end? invert
while
BITS 16
org 0x100
;-----------------------------------------------------------------------+
; Set up mode 13h, and screen address at es:di
;-----------------------------------------------------------------------+
mov al, 13h
int 0x10
;-----------------------------------------------------------------------+
; made for 6502asm.com
; $0 equ ds 2 ; pointer to screen
; $2 equ ds 2 ; pointer to table
jmp start
; IN Y amount
sleep: ldx #$ff
sleep1: dex
@neuro-sys
neuro-sys / erc-ext.el
Created May 5, 2020 21:42
ERC ZNC connection and extensions
;; M-x erc-start to connect
;; M-p to prompt ZNC password
;; Once the server buffer is killed, kills all erc-mode buffers
(require 'erc)
(defconst *erc-my-user-name* "my_nickname")
(defconst *erc-my-server-name* "myzncserver.com")
(defconst *erc-my-server-port* 8888)
(defconst *erc-my-server-buffer-name* (concat *erc-my-server-name* ":" (number-to-string *erc-my-server-port*)))
$ cat .local/share/xorg/Xorg.0.log | grep LoadModule
[118485.831] (II) LoadModule: "glx"
[118485.832] (II) LoadModule: "intel"
[118485.832] (II) LoadModule: "nouveau"
[118485.832] (II) LoadModule: "nv"
[118485.832] (II) LoadModule: "modesetting"
[118485.832] (II) LoadModule: "fbdev"
[118485.833] (II) LoadModule: "vesa"
[118485.834] (II) LoadModule: "dri3"
[118485.834] (II) LoadModule: "dri2"