Skip to content

Instantly share code, notes, and snippets.

View WorldSEnder's full-sized avatar

WorldSEnder

  • Worldwide
View GitHub Profile
@WorldSEnder
WorldSEnder / PKGBUILD
Last active August 16, 2020 15:18
Idris 2 improved PKGBUILD for archunix
pkgname=idris2
pkgver=0.2.1
pkgrel=1
pkgdesc="Funtional Programming Lanugage with Dependent Types"
url="https://www.idris-lang.org/"
license=('custom')
arch=('x86_64')
depends=('chez-scheme')
makedepends=('git')
source=("https://www.idris-lang.org/idris2-src/idris2-$pkgver.tgz")
@WorldSEnder
WorldSEnder / lib.rs
Last active December 20, 2021 15:51
Generator components
#![feature(generators, generator_trait, never_type, type_alias_impl_trait)]
use yew::html::AnyScope;
use pin_cell::PinMut;
use pin_cell::PinCell;
use std::rc::Rc;
use std::pin::Pin;
use yew::Html;
use yew::Component;
use yew::ComponentLink;
@WorldSEnder
WorldSEnder / main.rs
Created April 11, 2022 11:42
Function component Yew counter example
use gloo_console as console;
use js_sys::Date;
use std::rc::Rc;
use yew::{function_component, html, use_reducer, Callback, Html, Reducible};
// Define the possible actions which can be sent to the counter
pub enum Action {
Increment,
Decrement,
}
use gloo_events::EventListener;
use wasm_bindgen::{JsCast, UnwrapThrowExt};
use yew::events::{Event, KeyboardEvent};
use yew::html::IntoPropValue;
use yew::prelude::*;
use yew::virtual_dom::VNode;
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum TooltipPosition {
Top,