Skip to content

Instantly share code, notes, and snippets.

View mmontone's full-sized avatar

Mariano Montone mmontone

View GitHub Profile
@mmontone
mmontone / tile-code-generation.lisp
Created March 4, 2019 16:09
Tile like code generation with fmt
;; http://250bpm.com/blog:149
(ql:quickload :fmt)
(ql:quickload :access)
(defparameter *data*
'(("Afghanistan" . "Kabul")
("Brazil" . "Brasilia")
("Canada" . "Ottawa")))
@mmontone
mmontone / mongo-rest.py
Created March 5, 2019 01:58
Simple MongoDB rest API with Python
from flask import Flask
from flask import jsonify
from flask import request
from flask_pymongo import PyMongo
from flask.json import JSONEncoder
from bson.objectid import ObjectId
from flask_cors import CORS
class CustomJSONEncoder(JSONEncoder):
@mmontone
mmontone / machine.js
Last active September 27, 2019 18:51
Generated by XState Viz: https://xstate.js.org/viz
const UINavigator = Machine({
id: 'UI',
initial: 'running',
states: {
running: {
initial: 'home',
states: {
home: {
entry: ['home'],
@mmontone
mmontone / machine.js
Created September 27, 2019 21:07
Generated by XState Viz: https://xstate.js.org/viz
const UINavigator = Machine({
id: 'UI',
initial: 'running',
states: {
running: {
initial: 'home',
states: {
home: {
entry: ['home'],
@mmontone
mmontone / weblocks-forms.lisp
Last active October 14, 2020 12:47
Weblocks forms with callback support
(defpackage :weblocks/forms
(:use :cl)
(:import-from #:weblocks/actions
#:make-action-url
#:function-or-action->action
#:get-request-action)
(:import-from #:weblocks/html
#:with-html)
(:import-from #:weblocks/request
#:get-path)
@mmontone
mmontone / quicksearch.el
Last active May 7, 2021 13:39
Emacs/SLIME frontend to Quicksearch, a search-engine-interface for Common Lisp.
;; Copyright (C) 2021 Mariano Montone
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@mmontone
mmontone / HeliosQuickGuide.md
Last active March 28, 2022 02:41
Helios Quick Guide

Quick guide to Helios

Introduction

Helios is an [Amber Smalltalk] IDE.

Usage

  • Select action - Use Ctrl+Space to open the actions popup. imagen
@mmontone
mmontone / cuis-packages.csv
Last active June 8, 2023 22:04
List of Cuis packages
AXAnnouncements https://bitbucket.org/mmontone/mold/raw/master/AXAnnouncements.pck.st
ValueModels https://bitbucket.org/mmontone/mold/raw/master/ValueModels.pck.st
IA-EN-Dictionary https://raw.githubusercontent.com/ebi1/cuis/master/IA-EN-Dictionary.pck.st
OMeta2 https://raw.githubusercontent.com/pbella/OMeta-Cuis/master/OMeta2.pck.st
OMeta2Extensions https://raw.githubusercontent.com/pbella/OMeta-Cuis/master/OMeta2Extensions.pck.st
OMeta2Tests https://raw.githubusercontent.com/pbella/OMeta-Cuis/master/OMeta2Tests.pck.st
OMeta2Examples https://raw.githubusercontent.com/pbella/OMeta-Cuis/master/OMeta2Examples.pck.st
AdventOfCode https://raw.githubusercontent.com/mpcjanssen/Cuis-Smalltalk-AOC/master/AdventOfCode.pck.st
PostgreSQL https://raw.githubusercontent.com/nmingotti/Cuis-Smalltalk-PostgreSQL/master/PostgreSQL.pck.st
Tools-Finder https://raw.githubusercontent.com/npapagna/cuis-finder/master/Tools-Finder.pck.st
@mmontone
mmontone / coalton-record-syntax.md
Last active December 19, 2021 04:42
Record syntax experiment for Coalton

This is an experiment on trying to implement record syntax for Coalton. The Haskell equivalent.

The define-record definition:

(cl:defmacro define-record (name members)
  (cl:flet ((make-member-matcher (member)
              (cl:loop :for m :in members
                 :collect (cl:if (cl:eq (cl:first m) member)
                                 member
(ql:quickload '(:cl-who :clog :cl-markdown))
(defpackage :clog-learn
(:use :cl :clog #:clog-gui)
(:import-from :cl-who :with-html-output
:with-html-output-to-string :htm :str :fmt)
(:export :start))
(in-package :clog-learn)