Skip to content

Instantly share code, notes, and snippets.

🍔
(probably) Eating sandwich

Nikita Prokopov tonsky

🍔
(probably) Eating sandwich
Block or report user

Report or block tonsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tkachenko1503
tkachenko1503 / why-do-we-need-types-in-javascript.md
Last active Nov 9, 2018
Do we need types in JavaScript? Or maybe not?
View why-do-we-need-types-in-javascript.md

This is my lightning talk submission to ReactiveConf 2018 https://reactiveconf.com/

In this talk, I want to share my experience gained during the development of frontend applications in several programming languages.

I think it's not a secret for anybody that developing large JavaScript applications is not so easy as it seems at first glance. We all want something simpler and more reliable. Therefore, many developers and even entire companies switch to different, compiled in JavaScript, programming languages. The bulk of such transitions is accounted for TypeScript and flow, and often, developers faced with more problems than they were before.

I wasn't the exception. Moving to a new project, I started using TypeScript and was disappointed. Luckily in my next project I used ClojureScript and it was like everything is illuminated!

View sablono-hacks.clj
(ns your.macros-for-cljs.ns
(:require [sablono.compiler :as sablono-c]))
;; Make sablono also walk into other forms:
;; if, for, let, do: Already exist
(.addMethod @(var sablono-c/compile-form) "when"
(fn
[[_ bindings & body]]
`(when ~bindings ~@(for [x body] (sablono-c/compile-html x)))))
@kwf
kwf / pretty-pragmata.el
Last active Sep 1, 2019
Mappings for prettify-symbols-mode to enable Pragmata Pro's ligatures in Emacs. I've taken some slight liberties with the original ligature map, to suit my own tastes.
View pretty-pragmata.el
;; PRETTIFY SYMBOLS (with Pragmata Pro)
(defun setup-pragmata-ligatures ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("!!" . ?)
("!=" . ?)
("!==" . ?)
("!≡" . ?)
("!≡≡" . ?)
("!>" . ?)
@DeLaGuardo
DeLaGuardo / pragmatapro-font-lock-symbols-v2.el
Last active Dec 1, 2019
Snippet for support ligatures from PragmataPro font in Emacs
View pragmatapro-font-lock-symbols-v2.el
;; Enable ligatures without prettify-symbols
(provide 'add-pragmatapro-symbol-keywords)
(defconst pragmatapro-fontlock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)
View richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@fogus
fogus / gist:3123867
Created Jul 16, 2012 — forked from stuarthalloway/gist:2645453
Datomic queries against Clojure collections
View gist:3123867
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
42)
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
View collector.erl
-module(collector).
-behaviour(gen_server).
-export([start_link/1, do/2, ended/0]).
-export([handle_call/3, handle_cast/2]).
-export([init/1, terminate/2, handle_info/2, code_change/3]).
%% Client interface
View gist:2899967
#include <stdio.h>
#include <unordered_map>
#include <iostream>
using namespace std;
#define N 1000000
View tagged-parsing.js
load('./cljjs.js')
// USING EXISTING PARSER
clj.read_string("#queue [1 2 3]")
//=> #queue [1 2 3]
// REGISTERING NEW PARSER
@stuarthalloway
stuarthalloway / gist:2645453
Created May 9, 2012
Datomic queries against Clojure collections
View gist:2645453
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
42)
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
You can’t perform that action at this time.