Skip to content

Instantly share code, notes, and snippets.

View RickCarlino's full-sized avatar
💾

Rick Carlino RickCarlino

💾
View GitHub Profile
@RickCarlino
RickCarlino / clean.xyz
Created December 15, 2021 21:59
Outliers removed
1780 700 410
1790 700 410
1790 770 410
1730 760 413
1780 720 413
1780 770 413
1790 780 413
1770 700 417
1790 680 417
1740 750 420
@RickCarlino
RickCarlino / pointcloud.xyz
Created December 15, 2021 21:43
Point cloud
1000 1000 450
1000 1010 450
1000 1020 450
1000 1030 453
1000 1040 450
1000 1050 453
1000 1060 450
1000 210 443
1000 220 447
1000 230 447
@RickCarlino
RickCarlino / linked_list.md
Created June 30, 2021 12:42
A Linked List Implementation in RetroForth

Singly Linked List

This snippet provides a generic implementation of a singly linked list. Each value in the list points forward to the next item.

Currently only supports one list per VM, which is acceptable for my use case.

+------+
|LINK  |---*

+------+ |

@RickCarlino
RickCarlino / see.md
Last active June 27, 2021 14:24
Retroforth SEE implementation (sort of)

dump - A Memory Inspector for RetroForth

Two words are provided below: a regular dump word, plus a dump-s word for dealing with strings.

Example output:

> #16 [ 'Hello,_world! s:put nl ] dump
3C4C: 0x801
3C4D: 0xE97

3C4E: H

OK

RETRO 12 (2021.7)
524288 Max, 14948 Used, 509340 Free
'hmmm s:hash n:put
2090333460
bye
:activate-burners 'Burners_ON s:put nl ;
:begin-timer 'Timer_SET s:put nl ;
:toaster.on-start hook ;
:activate-toaster toaster.on-start activate-burners begin-timer ;
:custom-callback 'Hello_from_my_callback s:put nl ;

Run without callbacks:

@RickCarlino
RickCarlino / kernel_panic.log
Created January 24, 2021 19:50
Kernel panic
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.9-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1396 SMP Thu Jan 21 15:54:00 GMT 2021
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[ 0.000000] earlycon: uart8250 at MMIO32 0x3f215040 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x37400000, size 64 MiB
@RickCarlino
RickCarlino / mt.md
Created August 23, 2020 03:12
Multitask in RetroForth

Multitasking in Retro

This is a beta feature. For early access, consider donating to the RetroForth Patreon.

High Level Overview

Retro exposes multitasking as an I/O device at the VM layer.

#900 'task:DEVICE_ID const
@RickCarlino
RickCarlino / wait_for.exs
Last active March 31, 2020 15:57
wait_for_pid - Do I even need this as a test helper? I'm not sure...
@wait_time 25
# Base case: We have a pid
def wait_for(pid) when is_pid(pid), do: continue_waiting(pid)
# Failure case: We failed to find a pid for a module.
def wait_for(nil), do: raise("Attempted to wait on bad module/pid")
# Edge case: We have a module and need to try finding its pid.
def wait_for(mod), do: wait_for(Process.whereis(mod))
defp continue_waiting(pid) do
wait(pid, Process.info(pid, :message_queue_len))
@RickCarlino
RickCarlino / _notes.txt
Last active March 18, 2020 17:30
Video on Rpi0 stuff
Reference before I try a new Nerves System build
---Not included, Probably not important:
CONFIG_VIDEO_USBTV=m (USB TV Tuners)
CONFIG_USB_PWC_DEBUG=y (Debug support for a Phillis brand camera)
CONFIG_USB_S2255=m (Support for what appears to be a USB card for video studios)
BR2_PACKAGE_V4L2GRAB=y (Virtual video devices)
BR2_PACKAGE_V4L2LOOPBACK_UTILS=y (Virtual video devices)
BR2_PACKAGE_V4L2LOOPBACK=y (Virtual video devices)
Not included, will add: