Skip to content

Instantly share code, notes, and snippets.

View mmontone's full-sized avatar

Mariano Montone mmontone

View GitHub Profile
@mmontone
mmontone / estimated-time-progress.lisp
Last active March 1, 2023 19:21
Displays progress with time estimation (useful for long tasks)
(defpackage estimated-time-progress
(:local-nicknames
(:pb :cl-progress-bar.progress))
(:use :cl)
(:export :with-estimated-time-progress))
(in-package :estimated-time-progress)
(defconstant +seconds-in-one-hour+ 3600)
(defconstant +seconds-in-one-minute+ 60)
@mmontone
mmontone / auto-gensym.lisp
Last active October 5, 2022 13:19
Clojure style automatic symbol generation for Common Lisp
;; Copyright (c) 2022 Mariano Montone
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;; The above copyright notice and this permission notice shall be included in all
@mmontone
mmontone / cider-utils.el
Last active September 14, 2022 21:24
Emacs utils
(require 'cider)
(require 's)
;; Browse namespace from info -*- lexical-binding: t -*-
(defun cider-docview-render-info (buffer info)
"Emit into BUFFER formatted INFO for the Clojure or Java symbol."
(let* ((ns (nrepl-dict-get info "ns"))
(name (nrepl-dict-get info "name"))
(added (nrepl-dict-get info "added"))
(depr (nrepl-dict-get info "deprecated"))
@mmontone
mmontone / webrtc-jscl.lisp
Last active September 22, 2022 14:04
WebRTC with JSCL
;; WebSocket and WebRTC based multi-user chat sample with two-way video
;; calling, including use of TURN if applicable or necessary.
;; This file contains the JavaScript code that implements the client-side
;; features for connecting and managing chat and video calls.
;; To read about how this sample works: http://bit.ly/webrtc-from-chat
;; Any copyright is dedicated to the Public Domain.
;; http://creativecommons.org/publicdomain/zero/1.0/
(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)
@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
@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 / 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 / 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 / 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)