Skip to content

Instantly share code, notes, and snippets.

View TeamSPoon's full-sized avatar

Douglas R. Miles TeamSPoon

View GitHub Profile
@TeamSPoon
TeamSPoon / gist:62b26d489e653fee87ee74aa983d043b
Last active August 3, 2023 13:44 — forked from patham9/gist:ee21bf485a2565ebcd0450ccccc557c8
Prolog-like append/3 for Hyperon in MeTTa
use hyperon::metta::*;
use hyperon::metta::interpreter::*;
fn main() {
let space = metta_space("
(= (append () $L $L) True)
(= (append (Cons $H $T) $L (Cons $H $R)) (append $T $L $R))
?- run_pipeline("which countries are bordered by two seas?").
% not_conflicted_span_types('NP',np)
% not_conflicted_span_types('NP',nump)
% not_conflicted_span_types('SBAR',question)
% dropping(
% span( [ seg(6,8),
% phrase(np),
% size(3),
% lnks(4),
% #(r(np,seg(6,8))),
@TeamSPoon
TeamSPoon / cloudSettings
Last active August 3, 2021 13:31 — forked from elarib/travis-local.md
Run Travis build locally
{"lastUpload":"2021-08-03T13:31:55.153Z","extensionVersion":"v3.4.3"}
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, first visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
;; (load "cynd/cb-prolog.lisp")
#+Allegro
(sl::cpushnew :CYC-COMMON-LISP *features*)
#+Allegro
(use-package :CYC)
Commandline options:
-DGMP_LIBRARIES:FILEPATH="D:/GITHUB/mpir-2.7.2/build.vc14/dll_mpir_p3/Win32/Debug/mpir.lib" -DGMP_INCLUDE_DIRS:PATH="D:/GITHUB/mpir-2.7.2/build.vc14/dll_mpir_p3/Win32/Debug" -DWITH_SYSTEM_MALLOC:BOOL="1" -DCMAKE_C_STANDARD_LIBRARIES:STRING="kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib" -DWITH_CUDD:BOOL="0" -DGMP_LIBRARY_DLL:FILEPATH="D:/GITHUB/mpir-2.7.2/build.vc14/dll_mpir_p3/Win32/Debug/mpir.dll" -DCMAKE_C_FLAGS:STRING=" /DUSE_GMP /DWIN32 /D_WINDOWS /W3" -DWITH_SWIG:BOOL="0" -DWITH_Gecode:BOOL="0" -DWITH_MySQL:BOOL="0" -DWITH_RAPTOR:BOOL="0" -DWITH_ODBC:BOOL="0" -DWITH_CPLINT:BOOL="0" -DWITH_PythonInterp:BOOL="0" -DWITH_MPI:BOOL="0" -DWITH_CLPBN:BOOL="0" -DWITH_PRISM:BOOL="0" -DWITH_PythonLibs:BOOL="0" -DWITH_HORUS:BOOL="0" -DCMAKE_CONFIGURATION_TYPES:STRING="Debug;Release;MinSizeRel;RelWithDebInfo" -DWITH_Matlab:BOOL="0" -DWITH_Sqlite3:BOOL="0" -DCMAKE_CXX_FLAGS_RELEASE:STRING="/MD /O2 /Ob2 /D NDEBUG" -DWITH_Postgr
/*
I thought something like this already existed somewhere?
But anyhow it doesn't right?
Though how should this be written? Byrd box? debugger model?
*/
call_while(Setup,Goal,Undo):-
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function makeContext() { return { choices:[], trail:[], halted:false }; }
// Push a new choice point onto the stack
function pushChoice( ctx, choiceThunk ) {
ctx.choices.unshift( { thunk:choiceThunk, trailIndex:ctx.trail.length } );
}