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
zero_ref_mut!(FOO, u32); | |
fn main() { | |
let mut val: u32 = 2; | |
// initialize static FOO | |
// fzero acts like a MutexHandle | |
// while it's in scope, FOO is used to store &mut val | |
let mut fzero = FOO.claim(&mut val).unwrap(); |
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
#![no_std] | |
#![no_main] | |
#![feature(never_type)] | |
#![feature(unwrap_infallible)] | |
#![feature(arbitrary_self_types)] | |
#![feature(alloc_error_handler)] | |
// unfortunately new asm doesn't let you set stack pointer... | |
#![feature(llvm_asm)] | |
#[macro_use] |
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
#![no_std] | |
#![no_main] | |
#![feature(never_type)] | |
#![feature(unwrap_infallible)] | |
mod framebuffer; | |
#[panic_handler] | |
fn panic(_info: &core::panic::PanicInfo) -> ! { | |
loop {} |
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
#![no_std] | |
#![no_main] | |
#[panic_handler] | |
fn panic(_info: &core::panic::PanicInfo) -> ! { | |
loop {} | |
} | |
fn color(fb: &blueloader_info::Framebuffer, c: (u8, u8, u8)) -> u32 { | |
use bitintr::Pdep; |
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
#![no_std] | |
#![no_main] | |
#[panic_handler] | |
fn panic(_info: &core::panic::PanicInfo) -> ! { | |
loop {} | |
} | |
#[no_mangle] | |
pub extern "C" fn _start() -> u32 { |
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
#![no_std] | |
#![no_main] | |
#![feature(abi_efiapi)] | |
use uefi::prelude::*; | |
use core::fmt::Write; | |
#[entry] | |
fn efi_main(image: Handle, st: SystemTable<Boot>) -> Status { | |
uefi_services::init(&st).expect_success("Failed to initialize services."); |
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
#![no_std] | |
#![no_main] | |
#![feature(abi_efiapi)] | |
use uefi::prelude::*; | |
use core::fmt::Write; | |
#[entry] | |
fn efi_main(image: Handle, st: SystemTable<Boot>) -> Status { | |
uefi_services::init(&st).expect_success("Failed to initialize services."); |
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
use plotters::prelude::*; | |
use plotters::chart::SeriesAnno; | |
use plotters::coord::{AsRangedCoord, Shift}; | |
use plotters::element::{DynElement, PointCollection}; | |
use std::ops::{Deref, DerefMut, Range}; | |
pub struct AutoRange<'a, 'b, DB: DrawingBackend, X: Clone, Y: Clone> { | |
chart: ChartBuilder<'a, 'b, DB>, | |
xrange: Range<X>, | |
yrange: Range<Y>, |
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
import collections | |
import pprint | |
import sys | |
import attr | |
import numpy | |
import scipy.spatial | |
import graphviz | |
from cached_property import cached_property |
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
<client> Nick(nickname='earendil-bot') | |
<client> User(user='earendil', mode=0, realname='Earendil the Mariner') | |
<server> Notice(target='*', message='*** Looking up your hostname...') | |
<server> Notice(target='*', message='*** Checking Ident') | |
<server> Notice(target='*', message="*** Couldn't look up your hostname") | |
<server> Notice(target='*', message='*** No Ident response') | |
<server> Welcome(target='earendil-bot', message='Welcome to the freenode Internet Relay Chat Network earendil-bot') | |
<client> ChannelJoin(channels=['#moosesocks'], keys=None) | |
<server> YourHost(target='earendil-bot', message='Your host is leguin.freenode.net[2001:6b0:e:2a18::119/6667], running version ircd-seven-1.1.9') | |
<server> Created(target='earendil-bot', message='This server was created Wed Feb 19 2020 at 12:18:38 UTC') |