Skip to content

Instantly share code, notes, and snippets.

//use std::time::Duration;
use std::task::Poll;
use std::future::{poll_fn, Future };
use tokio::process::Command;
fn main() {
// async fn foo() {
// println!("1");
// println!("{:?}", Command::new("date").output().await.unwrap().stdout);
// println!("{:?}", Command::new("date").output().await.unwrap().stdout);
kbd = Keyboard.new
kbd.init_direct_pins(
# For SparkFun RP2040 ProMicro
# https://learn.sparkfun.com/tutorials/pro-micro-rp2040-hookup-guide
[2, 3, 4, 5, 6, 7, 8, 9,
29, 28, 27, 26, 22, 20, 23, 21]
# See this if you are using Adafruit Kb2040
# https://github.com/alg0002/PRK_Firmware_keymap_rb/blob/main/Kasumigasane/KB2040/keymap.rb
)
#kbd.add_layer :default, %i[
function parseSExp(input) {
const tokens = tokenize(input);
const [exp, remainingTokens] = readFromTokens(tokens);
if (remainingTokens.length !== 0) {
throw new SyntaxError(`unexpected token(s): ${remainingTokens.join(' ')}`);
}
return exp;
}
diff --git a/keyboards/ez_maker/directpins/rp2040/info.json b/keyboards/ez_maker/directpins/rp2040/info.json
index 9b707d257f..f4be4a58db 100644
--- a/keyboards/ez_maker/directpins/rp2040/info.json
+++ b/keyboards/ez_maker/directpins/rp2040/info.json
@@ -11,8 +11,8 @@
},
"matrix_pins": {
"direct": [
- ["GP0", null],
- ["GP1", null],
; ModuleID = 'main'
source_filename = "main"
target triple = "x86_64-apple-macosx10.15.7"
%Dict = type { i8*, %Class.0*, %Array* }
%Class.0 = type { i8*, %Class.0*, %String*, %Object*, %Object* }
%String = type { i8*, %Class.0*, %"Shiika::Internal::Ptr"*, %Int* }
%"Shiika::Internal::Ptr" = type { i8*, %Class.0*, i8* }
%Int = type { i8*, %Class.0*, i64 }
%Object = type { i8*, %Class.0* }
@yhara
yhara / a.diff
Last active February 20, 2022 12:32
diff --git a/package.json b/package.json
index 2591ad0..5972b3c 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,8 @@
"optparse": "1.0.5"
},
"devDependencies": {
+ "@biwascheme/eval": "file:./src/bs_eval",
+ "@rollup/plugin-node-resolve": "^13.1.3",
@yhara
yhara / a.md
Last active January 26, 2021 02:52

少し大きめのリファクタリングを入れたので何をしたかを書いておく。

元のコード

リファクタリングしたのはHirMakerContextという構造体である。こいつはASTからHIR(高レベル中間表現)を作る際に使うもので、もとはこういう定義だった。

#[derive(Debug)]
pub struct HirMakerContext {
/*
* 別途、keyboards/alpha/config.hに以下を記入
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT
#define RGBLED_NUM 10
#define RGBLIGHT_LAYERS
//#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
#define COMBO_COUNT 6
#define COMBO_TERM 35
*/
@yhara
yhara / error.txt
Last active November 28, 2020 09:52
Ψ Compiling keymap with gmake alpha:yhara:flash
QMK Firmware 0.10.53 Making alpha with keymap yhara and target flash
avr-gcc (Homebrew AVR GCC 8.4.0) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before: text data bss dec hex filename
0 22924 0 22924 598c .build/alpha_yha
/Users/yhara/Dropbox/proj/shiika/examples % lldb -c /cores/core.67850
(lldb) target create --core "/cores/core.67850"
warning: (x86_64) /cores/core.67850 load command 433 LC_SEGMENT_64 has a fileoff + filesize (0x2f51e000) that extends beyond the end of the file (0x2f51d000), the segment will be truncated to match
warning: (x86_64) /cores/core.67850 load command 434 LC_SEGMENT_64 has a fileoff (0x2f51e000) that extends beyond the end of the file (0x2f51d000), ignoring this section
Core file '/cores/core.67850' (x86_64) was loaded.
(lldb) bt
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x000000010cf21e0d libgc.1.dylib`GC_clear_stack_inner + 46
frame #1: 0x000000010cf21e27 libgc.1.dylib`GC_clear_stack_inner + 72
frame #2: 0x000000010cf21e27 libgc.1.dylib`GC_clear_stack_inner + 72