Skip to content

Instantly share code, notes, and snippets.

Jai Checklist
by Colin McMillen, Jason Reed, and Elly Fong-Jones, 2011-10-10
updated by BoppreH, 2024-01-24
You appear to be advocating a new:
[ ] functional [X] imperative [X] object-oriented [ ] stack-based [X] concurrent
[ ] interpreted [X] compiled [ ] JIT [ ] cloud [ ] AI [ ] beginner-friendly
[ ] academic-friendly [ ] visual [ ] sharable [ ] esoteric
[ ] memory safe [X] memory unsafe [ ] provable [ ] Turing-incomplete
[X] statically-typed [ ] dynamically-typed [ ] completely incomprehensible
@Steve132
Steve132 / Programming Language Checklist 2024.md
Last active July 29, 2024 18:42 — forked from boppreh/Programming Language Checklist 2024.txt
Updated version of the tongue-in-cheek Programming Language Checklist

Programming Language Checklist by Colin McMillen, Jason Reed, and Elly Fong-Jones, 2011-10-10 updated by BoppreH, 2024-01-24

You appear to be advocating a new:

  • functional
  • imperative
  • object-oriented
  • stack-based
  • concurrent -[ ] interpreted -[ ] compiled [ ] JIT [ ] cloud [ ] AI [ ] beginner-friendly
@Steve132
Steve132 / eventy.hpp
Created October 19, 2023 06:04
Eventy.hpp
#pragma once
#include<vector>
#include<cstdint>
#include<cstdlib>
#include<algorithm>
namespace eventy{
@Steve132
Steve132 / Output1.txt
Last active June 21, 2023 00:35 — forked from VirtuosoChris/groupimages.py
groupimages.py
image0 in group_0 0
image1 in group_0 1
image2 in group_0 2
image3 in group_0 3
Processing: 1/12 groups. 8.33% done.
image5 in group_1 5
image7 in group_1 7
Processing: 2/12 groups. 16.67% done.
image9 is unmatched
Processing: 2/12 groups. 16.67% done.
template<class T>
struct minihive:
public std::pmr::list<T>; //iterators and everything work the same way from this root.
{
protected:
using base_type=std::pmr::forward_list<T>;
using iterator=base_type::iterator;
minihive():
std::pmr::polymorphic_allocator<T>(inner_pool),
find_package(Python COMPONENTS Interpreter) #make sure you have python and populate Python::Interpreter from the system.
add_executable(sometool sometool.cpp) #the target for the tool that generates the code.
#I assume that somescript.py accepts two arguments: the path to sometool.exe and the path to the output
set(MY_SCRIPT_OUTPUT "${CMAKE_CURRENT_BUILD_DIR}/generated.cpp")
add_custom_command(OUTPUT "${CMAKE_CURRENT_BUILD_DIR}/generated.cpp" #...additional outputs here if necessary
COMMAND Python::Interpreter
@Steve132
Steve132 / Foo.cpp
Last active March 16, 2017 21:55
Example Circular Include Failure
#include "Foo.h"
Foo::Foo()
{
}
void member()
{
}
Secure protocol for blockchain voting:
First, a voter registers some kind of authentication system (dongle, registration card, password, all of the above?)
A voter authenticates.
Vote workers (or a machine printer?) gives them a 'ballot' which is a pre-decided card with QR codes on it representing a signed transaction from the election commisssion account
to the address. then
Ballots can easily be independently checked if they have already been used or if they do not go to the proper locations.
@Steve132
Steve132 / quantum_sha.cpp
Last active August 17, 2016 14:56
Simple Quantum Sha1
//THis is an implementation for a quantum simulator showing that sha1 iterations are computable and reversible with no global ancillary bits and one *local*
//ancillary register that is uncomputed per iteration. This iteration is only 5 bits, of course, for space.
#include<qcpp/QRegister.h>
#include<qcpp/QMachine.h>
uint32_t msha1_computeF(int i,QRegister& B,QRegister& C,QRegister& D,QRegister& F)
{
static const uint32_t k[4]=[0x5A827999,0x6ED9EBA1,0x8F1BBCDC,0xCA62C1D6]
switch(i/20)
@Steve132
Steve132 / sharethis.py
Created December 4, 2015 20:53
Python server download
import SimpleHTTPServer
import SocketServer
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("gmail.com",80))
IP=s.getsockname()[0]
s.close()
PORT = 8000