Skip to content

Instantly share code, notes, and snippets.

View dingsdax's full-sized avatar
🐢
slow coding

Joesi D. dingsdax

🐢
slow coding
View GitHub Profile
@dingsdax
dingsdax / gist:ad517d63fbf7b5bd29c4
Last active September 28, 2015 12:47
Ruby NLP resources

Ruby NLP resources

require "bundler/inline"
# allows for declaring a Gemfile inline in a ruby script
# optionally installing any gems that aren't already installed
gemfile(true) do
source "https://rubygems.org"
gem "rails", "6.1.4.1"
gem "sqlite3"
gem "graphql", "~> 1.12"
@dingsdax
dingsdax / tiny_prolog.rb
Last active February 27, 2025 21:56
tiny_prolog.rb
# Ruby archeology: sources:
# https://web.archive.org/web/20070226052918/http://codezine.jp/a/article.aspx?aid=461
# https://web.archive.org/web/20061216170428/http://www.okisoft.co.jp/esc/prolog/in-ruby.html
# Ruby による簡単な Prolog 処理系 h18.9/8 (鈴)
# Simple Prolog processing system using Ruby h18.9/8 (Rin)
# Prolog の述語 (predicate)
class Pred
attr_reader :defs
@dingsdax
dingsdax / Makefile
Created February 27, 2025 22:12 — forked from lnznt/Makefile
Mini Prolog Parser (for Ruby with Racc)
RACC := racc
RACCFLAGS := -g
SOURCES := prolog_parser.ry
TARGETS := ${patsubst %.ry, %.rb, ${SOURCES}}
.SUFFIXES : .rb .ry
%.rb : %.ry