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
[u2@user1-pc chicken-android-template-master]$ export PATH=$PATH:/home/u2/android/android-ndk-r11c:/home/u2/android/android-sdk-linux/platform-tools: | |
[u2@user1-pc chicken-android-template-master]$ export ANDROID_HOME=/home/u2/android/android-sdk-linux | |
[u2@user1-pc chicken-android-template-master]$ make | |
Warning: excluded identifier doesn't exist in module chicken: define-macro | |
make -C jni/chicken # should build the cross-chicken | |
make[1]: Entering directory '/home/u2/Desktop/chicken-android-template-master/jni/chicken' | |
Warning: excluded identifier doesn't exist in module chicken: define-macro | |
echo /home/u2/Desktop/chicken-android-template-master/jni/chicken/chicken-core/ |
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
(module grid * | |
(import chicken scheme ports) | |
(include "grid.scm")) |
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
;;; example macro for embedding raw data (in this case a font) as a | |
;;; "binary blob" during compile-time. | |
(use srfi-1) | |
(define-syntax make-font | |
(er-macro-transformer | |
(lambda (form r t) | |
;; specs is ((index scanlines ...) ...) | |
(let ((specs (cdr form))) |
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
modified hello-world.c | |
@@ -1,6 +1,5 @@ | |
#include <stdio.h> | |
int main() { | |
- fprintf(stderr, "Goodbye, "); | |
- fputs("World!\n", stderr); | |
+ fprintf(stderr, "Goodbye, World!\n"); | |
return 0; | |
} |
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 matchable hmac sha2 base64 tweetnacl) | |
(define (base64url-decode m) (base64-decode (string-translate m "-_" "+/"))) | |
(define (base64url-encode m) | |
(string-trim-right ;; remove = padding (not used/needed in jwt) | |
(string-translate (base64-encode m) "+/" "-_") #\=)) | |
(define (hs256 secret) (hmac secret (sha256-primitive))) | |
;; b64header ignored! (read https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/) |
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
# this is a comment. see | |
# http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader) | |
! this too. and empty lines are allowed | |
# this is an space-indented comment | |
#this is a tab-indented and space-indented comment | |
# key separators include any unescaped "=", ":" or ws. | |
key1=value |
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
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := hello-jni | |
HELLO_JNI_PATH := $(LOCAL_PATH) | |
LOCAL_LDLIBS := -llog | |
LOCAL_SRC_FILES := hello-jni.c | |
LOCAL_SHARED_LIBRARIES := chicken | |
include $(BUILD_SHARED_LIBRARY) |
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 sdl2 miscmacros (prefix opengl-glew gl:) glls-render gl-utils gl-math) | |
;; unhappy REPL on Android? (import (prefix opengl-glew gl:)) | |
(define window (create-window! "sokoworld" 0 0 640 480 '(resizable opengl))) | |
(gl-attribute-set! 'context-major-version 3) | |
(gl-attribute-set! 'context-minor-version 0) | |
(gl-create-context! window) | |
(gl:init) |
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 bson mongo) | |
(define (mak n) | |
(if (> n 0) | |
`((int . 1) | |
(double . 1.5) | |
(false . #f) | |
(nested ,@(mak (sub1 n)))) | |
"the end")) |
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
# build nanomsg for Android's aosp | |
# hope this is useful for someone! :D | |
LOCAL_PATH := $(ANDROID_BUILD_TOP)/external/nanomsg/src | |
include $(CLEAR_VARS) | |
LOCAL_SRC_FILES := core/epbase.c core/sock.c core/poll.c \ | |
core/symbol.c core/ep.c core/pipe.c \ | |
core/sockbase.c core/global.c devices/device.c \ |