Skip to content

Instantly share code, notes, and snippets.

View cben's full-sized avatar

Beni Cherniavsky-Paskin cben

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
beni@beni580 ~> tclsh
% set n 42
42
% tcl::unsupported::representation $n
value is a pure string with a refcount of 4, object pointer at 0x5604d811de00, string representation "42"
% expr {$n + 1}
43
% tcl::unsupported::representation $n
value is a int with a refcount of 4, object pointer at 0x5604d811de00, internal representation 0x2a:(nil), string representation "42"
%
@cben
cben / 00-MEMORY-USAGE-List.md
Last active December 7, 2020 10:34
High memory usage during ListAndWatch -> List

Point-free style is the default in "concatenative" programming languages like FORTH and PostScript. And, since they use postfix order, with function argument coming before the function, simulating "let" should be easy, right?

Funnily, there are no named-arg lambdas in most of these languages*. Not even the modern Factor (supports named arguments for named functions, but not in anonymous "quotations"). But FORTH and PostScript do have ways to simulate local variables. So we can show the equivalence the other way around: implement "let", then implement "lambda" in terms of "let" 😁.

FROM fedora:31
MAINTAINER sd-mp-devel@redhat.com
# TODO: how to use prebuilt rubygem-nokogiri? Compiling it is heavy and brittle.
# That's what tools/hack_bundle.rb tries to achieve, but still compiles it.
# Fedora's rubygem-bundler is patched (as opposed to upstream `gem install bundler`)
# but no luck, both compile it. See also https://github.com/rubygems/bundler/issues/1964
RUN dnf install -y ruby ruby-devel rubygem-bundler rubygem-nokogiri gcc-c++ make redhat-rpm-config git dnf-plugins-core
RUN dnf builddep -y rubygem-nokogiri
@cben
cben / selenium_.json
Created March 17, 2020 08:38
https://github.com/cben/mathdown/issues/193 - examples of current saucelabs supported browsers json
{
"list": [
{
"name": "Desktop",
"list": [
{
"name": "PC",
"list": [
{
"name": "Operating System",
@cben
cben / README.md
Last active August 9, 2019 07:32
testing github shell highlighting md vs rst
$ cd dir/ && ls -l "$files{@}"
drwxr-xr-x.  6 bpaskinc bpaskinc       4,096 Aug 30  2017  prometheus_api_client_ruby/
drwxr-xr-x.  2 bpaskinc bpaskinc       4,096 Feb  3  2016  Public/
$ rm -rf $(find -type f -name '*~')

Let's try fish:

@cben
cben / debt.md
Last active April 3, 2019 12:51
uhc config complexity debt example

Alt text

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: null
generation: 1
labels:
run: sise
name: sise