Skip to content

Instantly share code, notes, and snippets.

View hoichi's full-sized avatar
🤔
baffled

Sergey Samokhov hoichi

🤔
baffled
View GitHub Profile
@cristianoc
cristianoc / PragmaticTerminationAnalysis.md
Last active December 28, 2022 01:54
Pragmatic Termination Analysis

Pragmatic Termination Analysis

We present a program analysis motivated by the need to solve some termination problems observed during the development of a parser for the new syntax introduced with the ReScript language. Learning from previous experience, it was decided to avoid parser generators, and go instead for a hand-crafted parser. In this way, the parser could be optimized for performance, be more maintainable, and most importantly give much more flexibility with error messages.

The new parser delivered on the promises, though a new issue appeared during live testing. The laptop would get hot once in a while, and only improve after re-starting the editor. Not all the time, but often enough to notice. The problem was an infinite loop in the parser, triggered by unexpected character combinations introduced while editing and never encountered in automated tests. It took a while to reproduce the issue and locate a mistake in the p

@srdjan
srdjan / 100+ different counter apps...
Last active May 6, 2024 05:13
100+ different js counter apps...
100+ different js counter apps...
@francoiscabrol
francoiscabrol / webstorm.desktop.md
Last active April 24, 2018 13:31
webstorm.desktop

For getting webstorm fully install as a regular ubuntu app, and don't have to launch it with the script ./webstorm.sh add these webstorm.desktop in your /usr/share/applications/. Don't forget to replace WEBSTORM_PATH by your webstorm absolute path

[Desktop Entry]
Type=Application
Name=JetBrains WebStorm
Exec=WEBSTORM_PATH/bin/webstorm.sh %f

Icon=WEBSTORM_PATH/bin/webide.png

@nire0510
nire0510 / debounce.js
Created June 7, 2015 10:56
7 Essential JavaScript Functions
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links