Skip to content

Instantly share code, notes, and snippets.

Daniel Szmulewicz danielsz

Block or report user

Report or block danielsz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danielsz
danielsz / pretty-lambda.el
Created May 24, 2019
Custom font locking for Clojure mode
View pretty-lambda.el
(eval-after-load 'clojure-mode
(font-lock-add-keywords
'clojure-mode `(("(\\(fn\\)[\[[:space:]]"
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "λ")
nil))))))
(eval-after-load 'clojure-mode
(font-lock-add-keywords
'clojurescript-mode `(("(\\(fn\\)[\[[:space:]]"
@danielsz
danielsz / fsm-ho.scm
Last active May 19, 2019
Refactoring of William Byrd's higher-order implementation of a finite state machine with driver
View fsm-ho.scm
(define fsm-ho2
(lambda (str)
(letrec ([S0 (lambda (b)
(case b
[(0) S0]
[(1) S1]
[else #t]))]
[S1 (lambda (b)
(case b
[(0) S2]
View NoLipService
(defn new-paste
([s]
(new-paste s s s))
([d n c]
(client/post "https://api.paste.ee/v1/pastes" {:form-params {:key api-key
:description d
:sections [{:name n
:contents c}]}
:socket-timeout 1000
:conn-timeout 1000
View *scratch*.el
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with \[find-file] and enter text in its buffer.
λ XPS13 ~/scheme/projects/empty/ gsc -exe -o empty empty.scm
empty_.o:(.data.rel+0xc0): undefined reference to `_____gambit'
collect2: error: ld returned 1 exit status
*** ERROR IN ##main -- target link failed while linking "/home/arch/daniel/scheme/projects/empty/empty_.o" "/home/arch/daniel/scheme/projects/empty/empty.o"
View sfsdfsfds.txt
gcc --verbose -L/usr/lib/openssl-1.0 -lssl -I/usr/include/openssl-1.0 -Wno-unused -Wno-write-strings -Wdisabled-optimization -O2 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -rdynamic -D___SINGLE_HOST -I"/usr/local/Gambit/v4.8.9/include" -o "gxprof" gxprof_.o gxprof.o "/usr/local/Gambit/v4.8.9/lib/libgambit.a" -lutil -ldl -lm -L/usr/local/opt/openssl/lib -lssl -lcrypto
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --d
View sfsdfsfds.txt
ld -verbose
GNU ld (GNU Binutils) 2.30
Supported emulations:
elf_x86_64
elf32_x86_64
elf_i386
elf_iamcu
i386linux
elf_l1om
elf_k1om
View sfsdfsfds.txt
Parsing:
"namespace"
"namespace"
"declare"
__gx#libdir
__gx#load-mdoule
__gx#expander-loaded
__gx#rtlibs
__gx#method-ref
View sfsdfsfds.txt
optimize-call _else132148_ => #<!lambda #551> lambda
optimize-call _else132148_ => #<!lambda #551> lambda
optimize-call _else132148_ => #<!lambda #551> lambda
optimize-call gx#module-context-export => #<!struct-getf #552> gx#module-context::t
optimize-call gx#core-resolve-module-export => #<!lambda #553> lambda
optimize-call gerbil/tools/gxprof#find-export-binding => #<!lambda #554> lambda
optimize-call gx#runtime-binding? => #<!struct-pred #555> gx#runtime-binding::t
optimize-call gx#binding-id => #<!struct-getf #556> gx#binding::t
optimize-call gx#expander-context-id => #<!struct-getf #557> gx#expander-context::t
optimize-call with-unwind-protect => #<!lambda #558> lambda
View sfsdfsfds.txt
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.3.1 20180406 (GCC)
View *scratch*.el
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with <open> and enter text in its buffer.
... compile exe gxprof -> gxprof
/usr/bin/ld: cannot find -lieee
collect2: error: ld returned 1 exit status
*** ERROR IN ##main -- target link failed while linking "/home/arch/daniel/scheme/gerbil/bin/gxprof_.o" "/home/arch/daniel/scheme/gerbil/bin/gxprof.o"
*** ERROR IN gxc#compile-exe-stub-module -- Syntax Error
*** ERROR IN ?
--- Syntax Error at compile: Compilation error; gsc exit with nonzero status
You can’t perform that action at this time.