(draft; work in progress)
See also:
- Compilers
- Program analysis:
- Dynamic analysis - instrumentation, translation, sanitizers
(draft; work in progress)
See also:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
== MyItem 1 == | |
...some content... | |
Total: 10 | |
Success | |
== MyItem 2 == | |
...some content... | |
Total: 2 | |
Failed |
REBOL [ | |
title: "Rudimentary implementation of Logo Turtle" | |
date: 2015-02-16 | |
author: "Martin Ceronio" | |
] | |
{ Load the turtle image; you can find the original at https://edu.kde.org/images/icons/kturtle_32.png Thanks, KTurtle! } | |
turtle-img: do to-string debase | |
{bWFrZSBpbWFnZSEgWzMyeDMyICN7CjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDAwNjdBMDcwNjdBMDcwNjdBMDcwNjdBMDcKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDAwNjdBMDcwNjdBMDcKMDY3QTA3MDY3QTA3MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD |
#!/usr/local/Gambit-C/bin/gsi | |
; Copyright (C) 2004 by Marc Feeley, All Rights Reserved. | |
; This is the "90 minute Scheme to C compiler" presented at the | |
; Montreal Scheme/Lisp User Group on October 20, 2004. | |
; Usage with Gambit-C 4.0: | |
; | |
; % ./90-min-scc.scm test.scm |
Red [needs: view] | |
turtle: #() | |
win: layout [ panel [ | |
tfield: base 500x500 white draw [] | |
origin tfield/offset tlayer: base 500x500 255.255.255.255 draw [] ] | |
panel [ | |
text "History" return history: text-list 200x350 data [] return | |
panel [ button "Save" [save request-file history/data] |
Useful One-Line Scripts for Perl Dec 03 2013 | version 1.10 | |
-------------------------------- ----------- ------------ | |
Compiled by Peteris Krumins (peter@catonmat.net, @pkrumins on Twitter) | |
http://www.catonmat.net -- good coders code, great reuse | |
Latest version of this file is always at: | |
http://www.catonmat.net/download/perl1line.txt |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!perl | |
use strict; | |
use warnings; | |
package Lispl; | |
use Scalar::Util qw(blessed looks_like_number); | |
use List::Util qw(reduce); | |
my $global_env; |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.