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
(** | |
* Computer Mathematics 2019 / Lecture 5, Part 1: The Horner's rule | |
* https://atelieraterui.page.link/NqaR | |
* | |
* 講義を読んで書いたコード断片。 | |
* - 整数の 10 <-> 2進数変換 | |
* - 実数の小数部の 10 -> 2進数変換 | |
*) | |
structure Main = |
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
_require "basis.smi" | |
_require "ffi.smi" |
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
環境 | |
==== | |
- CentOS Linux release 7.4.1708 (Core) | |
- https://github.com/ucsd-progsys/liquidhaskell.git (commit:16307c7403ba1aeeef9205b414785d36e93a402b) | |
- stack setup && stack install (GHC 8.2.1) | |
ログ | |
==== |
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
/** | |
* 動的リンクされたライブラリのパスを表示する | |
* | |
* **Linux specific program** | |
* | |
* build: | |
* $ gcc -Wall -pedantic-errors -std=c99 -DNDEBUG -o sopath sopath.c -ldl | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |
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
(** | |
* import from sample code | |
* > https://raw.github.com/MLton/mlton/master/doc/examples/ffi/iimport.sml | |
*) | |
signature DYN_LINK = | |
sig | |
type hndl | |
type mode | |
type fptr |
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
_require "basis.smi" | |
structure B = | |
struct | |
val g : {dir:string, name:string} -> unit | |
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
/* base/runtime/mach-dep/cygwin-fault.c */ | |
$ diff base/runtime/mach-dep/cygwin-fault.c base/runtime/mach-dep/cygwin-fault.new.c | |
20,21c20 | |
< #include <windows.h> | |
< #include <exceptions.h> /* Cygwin stuff */ | |
--- | |
> #include "cygwin-fault.h" /* Cygwin stuff */ |
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
(* .smi *) | |
_require "basis.smi" | |
structure S = | |
struct | |
val id : 'a -> 'a | |
end | |
structure Top = | |
struct |
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
(** | |
* SML# <-> PCRE(http://www.pcre.org/) binding sample | |
*) | |
(* | |
* ~/work/pcre_sharp$ rlwrap -c smlsharp -L/usr/lib -lpcre | |
* SML# version 1.2.0 (2012-11-14 18:25:26 JST) for x86-linux | |
* # use "pcre.sml"; | |
* match!(314) | |
* structure Pcre = ... |
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
(** | |
* 圏論勉強会#10 練習問題 回答 | |
* http://nineties.github.io/category-seminar/10.html#/38 | |
* | |
* | |
* 実行方法: | |
* $ cat tree.cm | |
* group | |
* is | |
* $/basis.cm |
NewerOlder