Skip to content

Instantly share code, notes, and snippets.

View worldbeater's full-sized avatar
☦️

Artyom V. Gorchakov worldbeater

☦️
View GitHub Profile
@nerodono
nerodono / JsonParser.hs
Last active April 23, 2024 22:53
JSON parser written in haskell: no adequate error checking, just JSON
module JsonParser where
import qualified Data.Map as M
import qualified Data.Bifunctor as Bi
import Data.Char ( ord
, chr
, isHexDigit
, isDigit
)
@XlogicX
XlogicX / games.md
Last active April 27, 2024 12:22
List of Boot Sector Gamers

Boot Sector Games

A list of playable boot sector games, most of which are on github. Fun to play, great to learn from. There are also many cool non-booting boot sectors out there that aren't games (so more like demos), but this page is just reserved to interactive boot sectors / games. This list is also not complete, but not on purpose, it is a best effort collection of games, so if you know of any fun boot sector games, please contribute.

This page lists a collection of 31 games spanning several authors: nanochess, me, daniel-e, shikhin, JulianSlzr, XanClic, QiZD90, darkvoxels, guyhill, w-shackleton, egtzori, VileR, ish_works, franeklubi, queso_fuego, franeklubi, Jethro82, waternine9, tevoran, palma3k, taylor-hartman. peterferrie should also be mentioned as he has touched a lot of these games.

TetrOS

https://github.com/daniel-e/tetros

Tetris Clone. Full color, no score. This was one of the older boot sector games out there. ![tetros](https://gist.github.com/assets/1570856/3a0d1023-cbe6-4b4d-

namespace GlobalHotKey
{
public class GlobalKeyboardHookEventArgs : HandledEventArgs
{
public GlobalKeyboardHook.KeyboardState KeyboardState { get; private set; }
public GlobalKeyboardHook.LowLevelKeyboardInputEvent KeyboardData { get; private set; }
public GlobalKeyboardHookEventArgs(
GlobalKeyboardHook.LowLevelKeyboardInputEvent keyboardData,
GlobalKeyboardHook.KeyboardState keyboardState)
@mrange
mrange / on-tail-recursion.md
Last active March 15, 2022 04:57
On the topic of tail calls in .NET

On the topic of tail calls in .NET

Let's say you have implemented a small data pipeline library to replace LINQ.

module TrivialStream =
  type Receiver<'T> = 'T            -> unit
  type Stream<'T>   = Receiver<'T>  -> unit

  module Details =
@wcooley
wcooley / README.md
Last active April 3, 2023 14:35
Pytest: Ab(using) parametrize to alias long fixture names

Problem

I am testing an object with varied datasets, which I am creating as separate fixtures, so my fixture names become rather long due to encoding enough distinguishing characteristics so I can keep their purposes straight. I have to refer to my object a number of times throughout the test and futhermore there is a local convention for the name of the object in production code, so it makes sense to use the same short name in my tests. As a result, one of the very first things I do in the test is alias the long fixture name to the short conventional name, as can be seen in the assignment to foo in test_01_before.py. Whenever I do this, I wish to myself "it's too bad there isn't a way to express the fixture declaration/import with an alias