Skip to content

Instantly share code, notes, and snippets.


Vittorio Romeo SuperV1234

View GitHub Profile
cslarsen / euler_phi.cpp
Created Jan 18, 2012
Euler's totient function phi --- a fast implementation in C++
View euler_phi.cpp
* Euler's totient function phi(n).
* This is an *EXTREMELY* fast function and uses
* several tricks to recurse.
* It assumes you have a list of primes and a fast
* isprime() function. Typically, you use a bitset
* to implement the sieve of Eratosthenes and use
alex-ac /
Last active Dec 11, 2018
Lua C++ wrapper. C++11 templates street magic.
#include <Lua.hh>
extern "C" {
#include <lualib.h>
#include <lauxlib.h>
using namespace util;
int Lua::call(lua_State *vm) {
sim642 / delegate.hpp
Last active Jul 22, 2020
C++11 variadic template class for C# equivalent of delegates.
View delegate.hpp
#include <functional>
#include <vector>
// general case
template<typename R, typename... Args>
class delegate
SuperV1234 / FastFunc.hpp
Last active Mar 2, 2020
Don Clugston's fast delegate C++11 implementation
View FastFunc.hpp
#include <cstring>
#include <type_traits>
#include <cassert>
#include <cstddef>
#include <memory>
#include <new>
#include <utility>
lichray /
Created Sep 13, 2014
Implement static_if using C11 generic selection
#include <type_traits>
#include <tuple>
#include <iostream>
// Link:
//count arguments
//COUNT_ARGS :: ... -> Int
#define COUNT_ARGS(...) COUNT_ARGS_(,##__VA_ARGS__,6,5,4,3,2,1,0)
#define COUNT_ARGS_(z,a,b,c,d,e,f,cnt,...) cnt
imneme / randutils.hpp
Last active Jun 23, 2020
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
View randutils.hpp
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
* The MIT License (MIT)
* Copyright (c) 2015 Melissa E. O'Neill

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

bmwalters / PKGBUILD
Last active Nov 20, 2018
Arch PKGBUILD for Vittorio Romeo's OpenHexagon / SSVOpenHexagon
# Maintainer: Bradley Walters <>
pkgdesc='C++14 FOSS clone of "Super Hexagon"'
arch=('i686' 'x86_64' 'armv6h') # TODO: check these
depends=('sfml' 'lua')
You can’t perform that action at this time.