Skip to content

Instantly share code, notes, and snippets.

View spirinvladimir's full-sized avatar
💭
💯

Spirin Vladimir spirinvladimir

💭
💯
View GitHub Profile
@tkachenko1503
tkachenko1503 / why-do-we-need-types-in-javascript.md
Last active April 21, 2020 10:35
Do we need types in JavaScript? Or maybe not?

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!

@egri-nagy
egri-nagy / merge-sort-single-fn.clj
Created May 10, 2015 23:57
Merge sort in Clojure in a single function
(defn merge-sort
"sorting the given collection with merge-sort"
[coll]
(if (or (empty? coll) (= 1 (count coll)))
coll
(let [[l1 l2] (split-at (/ (count coll) 2) coll)]
;recursive call
(loop [r [] l1 (merge-sort l1) l2 (merge-sort l2)]
;merging
(cond (empty? l1) (into r l2) ;when l1 is exhausted
@portnov
portnov / Ridders.hs
Last active February 21, 2017 02:34
Ridders method
module Ridders where
import qualified Data.Map as M
import Control.Monad.State
type R = Double
ridders :: R -> R -> R -> (R -> R) -> Maybe R
ridders ε a b fn = evalState (go a b) M.empty
where
@axelpale
axelpale / combinations.js
Last active July 7, 2023 10:37
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* 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,
@thejhh
thejhh / js.nanorc
Created August 27, 2011 02:25
Nanorc for javascript
## JavaScript
##
syntax "JS" "\.js$" "\.sjs$"
# Reserved Keywords
color yellow "\b(instanceof|typeof|break|do|new|var|case|else|return|void|catch|finally|continue|for|switch|while|this|with|debugger|function|throw|default|if|try|delete|in)\b"
# Future Reserved Words
color brightblue "\b(class|enum|extends|super|import|const|export|implements|let|private|public|yield|static|interface|package|protected)\b"