This file contains hidden or 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
| /* | |
| Simple Java Prolog engine. | |
| This is basically a Java port of Chris Meyers' Python Prolog interpreter [1]. | |
| This currently only contains the first part, but maybe I'll port the remainder at | |
| a later stage. | |
| I actually wanted a Datalog [5] engine, but ended up going with the Prolog engine | |
| since Datalog is a Prolog subset. |
This file contains hidden or 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 the annotated version of my first attempt at a Quine | |
| * | |
| * I wonder if it is still considered a quine if it is annotated? :) | |
| * You'll find that if you compile and run this, the output is equivalent | |
| * to this code, so I'm still calling it a quine. | |
| * | |
| * Anyway, if you don't know what a Quine is, enlighten yourself at | |
| * the wikipedia: http://en.wikipedia.org/wiki/Quine_(computing) | |
| */ |
This file contains hidden or 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
| /* | |
| http://paulbourke.net/dataformats/ms3d/ms3dspec.h | |
| http://www.chumba.ch/chumbalum-soft/files/ms3dsdk184.zip | |
| http://sappersblog.blogspot.co.za/2014/08/milkshape-3d-185-ms3d-file-format.html | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> |
This file contains hidden or 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
| /** | |
| * Validates a South African ID number | |
| * | |
| * See http://geekswithblogs.net/willemf/archive/2005/10/30/58561.aspx and | |
| * https://www.westerncape.gov.za/general-publication/decoding-your-south-african-id-number-0 | |
| * | |
| * @param id | |
| * @return | |
| */ |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Markdown Editor</title> | |
| <!-- | |
| It uses showdownjs to render the Markdown https://github.com/showdownjs/showdown | |
| --> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js"></script> |
This file contains hidden or 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
| /* | |
| Compile all the lua source in one go. | |
| Put this in the `lua-5.3.5/src` directory, then compile like so: | |
| $ cc lua.c luaone.c | |
| $ cc luac.c luaone.c | |
| Or compile to an object file like so: |
This file contains hidden or 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
| #! python | |
| # Version 1.0 | |
| # Naive, with no negation. | |
| # Also, no parser | |
| class DatalogException(Exception): | |
| pass | |
| class Expr: |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| typedef struct internTreeNode ITNode; | |
| /* ============================================================= | |
| String Interning |
This file contains hidden or 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
| /* | |
| * JSON Parser and serializer. | |
| * | |
| * https://www.json.org/json-en.html | |
| * https://tools.ietf.org/id/draft-ietf-json-rfc4627bis-09.html | |
| * | |
| * | |
| * TODO: I came across this test suite for JSON parsers: | |
| * [Parsing JSON is a Minefield](http://seriot.ch/parsing_json.php); | |
| * I should maybe try running this parser through it one day. |
This file contains hidden or 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
| CC=gcc | |
| CFLAGS=-c -Wall -DTEST | |
| LDFLAGS=-lm | |
| EXECUTABLE=gap | |
| BUILD=debug | |
| # Detect operating system: | |
| # More info: http://stackoverflow.com/q/714100 |
OlderNewer