Skip to content

Instantly share code, notes, and snippets.

View splhack's full-sized avatar

Kazuki Sakamoto splhack

View GitHub Profile
diff --git a/magma/syntax/combinational.py b/magma/syntax/combinational.py
index 3a651fa..ae60506 100644
--- a/magma/syntax/combinational.py
+++ b/magma/syntax/combinational.py
@@ -145,9 +145,15 @@ class FunctionToCircuitDefTransformer(ast.NodeTransformer):
types = [arg.annotation for arg in node.args.args]
IO = []
for name, type_ in zip(names, types):
+ is_inout = False
+ if isinstance(type_, ast.Call):
diff --git a/magma/digital.py b/magma/digital.py
index e6f9392..f9609e0 100644
--- a/magma/digital.py
+++ b/magma/digital.py
@@ -54,8 +54,6 @@ class DigitalMeta(ABCMeta, Kind):
return cls
else:
return cls.undirected_t[direction]
- if direction == direction.Undirected:
- return cls
karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/splhack/9e609fc9be49814ffa836a0cba4bd85d/raw/f0175db7090c67a6502a01bd0e0835b9c2ea2c09/change_grave_accent_to_escape.json
{
"title": "Change grave accent (backtick) to escape if alone",
"rules": [
{
"description": "Post escape if grave accent is pressed alone; post grave_accent (backtick) if with modifiers.",
"manipulators": [
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var Yoga = Yoga || require('../src/Yoga.js');
@splhack
splhack / log
Created November 11, 2016 04:56
==== start log session ====
0.000047 : Starting job: jscs
0.000093 on 0: Created channel
0.000467 on 0: reading from buffer '/Users/hoge/Desktop/foo.js'
0.000512 SEND on 0: '/* jshint maxerr : 10000 */
'
0.000526 SEND on 0: '/* jslint browser : true */
'
0.000534 SEND on 0: '/* jslint esversion : 6 */
'
function! s:HandleExitVim(...)
"echo a:000
endfunction
function! s:GatherOutputVim(...)
echo a:000
endfunction
call ch_logfile('log')
@splhack
splhack / python2+3.md
Created May 18, 2016 06:01
MacVim with Python 2.x and Python 3.x
  • Install python 2.7.11

command line

$ PYTHON_CONFIGURE_OPTS="--enable-shared" \
    LDSHARED="clang -bundle" \
    LDCXXSHARED="clang++ -bundle" \
    BLDSHARED="clang -bundle -lpython2.7" \
    pyenv install 2.7.11
set guifont=Andale\ Mono:h14
set guifontwide=ヒラギノ角ゴ\ StdN\ W8:h14
diff --git a/src/if_lua.c b/src/if_lua.c
index 167e865..df032b5 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -402,7 +402,8 @@ lua_link_init(char *libname, int verbose)
int
lua_enabled(int verbose)
{
- return lua_link_init(DYNAMIC_LUA_DLL, verbose) == OK;
+ char *dll = *p_luadll ? (char *)p_luadll : DYNAMIC_LUA_DLL;