Uma arena online feita em uma nova linguagem de programação ultra-segura desenvolvida por nós, o Formality. O jogo será non-profit, get-paid-to-win: todo seu lucro é redirecionado pros próprios jogadores competitivos. Também será open-source e 100% modável: jogadores poderão criar seus próprios heróis. Será um jogo competitivo, real-time, top-view e muito dinâmico. O gameplay será uma mistura de League of Legends
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note, bsf/bsr are used by default. | |
// Enable /arch:AVX2 compilation for better optimizations | |
#if defined(_MSC_VER) && !defined(__clang__) | |
#include <intrin.h> | |
static __forceinline int __builtin_ctz(unsigned x) | |
{ | |
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) | |
return (int)_CountTrailingZeros(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open Suave | |
open Suave.Filters | |
let subPath path (ctx:HttpContext) = | |
async { | |
let localPath = ctx.request.url.LocalPath | |
let result = | |
match (localPath.StartsWith(path)) with | |
| false -> None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn make_test_evaluator() -> Box<Fn(YourTestCaseTypeHere)> { | |
use std::cell::RefCell; | |
struct EvalGuard(bool); | |
impl Drop for EvalGuard { | |
fn drop(&mut self) { | |
if !self.0 { | |
panic!("Did not actually evaluate test cases"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <limits> | |
#define _USE_MATH_DEFINES | |
#include <math.h> | |
namespace framework { | |
namespace math_constexpr { | |
int constexpr abs(int x) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// LinqPad script that downloads all PDFs/etc from Bret Victors worry dream refs page. | |
var targetPath = @"PATH_TO_WHERE_YOU_KEEP_YOUR_EBOOK\eBooks"; | |
//These filenames were extracted from http://worrydream.com/refs/ -- using NimbleText. | |
//(TODO: Use regex or html agility pack to find them programmatically) | |
var refs = new string[] { | |
"Hamming-TheArtOfDoingScienceAndEngineering.pdf", | |
"Licklider-IntergalacticNetwork.pdf", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This F# language suggestion wants a way to name collections of constraints: | |
// http://fslang.uservoice.com/forums/245727-f-language/suggestions/8509687-add-constraints-as-a-language-construct | |
// | |
// This is a type alias X<T> = T, so X<int> = int etc. | |
type X<'T> = 'T | |
// This is a type alias X<T> = T which adds a constraint | |
type WithStruct<'T when 'T : struct> = 'T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE UnicodeSyntax #-} | |
module Proof where | |
import System.Console.ANSI | |
import Prelude.Unicode | |
import Control.Monad.Unicode | |
{- | |
Calculations and mathematical proofs of circular computations. | |
@author Marcelo Camargo | |
-} |
Normal Raspbian startup sequence
/usr/bin/raspi-config
is a shell script to change some of the following options. docs
/etc/inittab
sets the default runlevel and runs/etc/init.d/rc
to execute startup scripts./etc/rc3.d/S03lightdm
launches lightdm for runlevel 3./etc/lightdm/lightdm.conf
contains configuration options for lightdm, including autologin-user/etc/X11/Xsession
sources all files in/etc/X11/Xsession.d
/etc/X11/Xsession.d/50x11-common_determine-startup
will set STARTUP to either~/.xsession
or~/.Xsession
if it exists. If not executable, it will prepend${SHELL:-sh}
. The default is STARTUP=/usr/bin/x-session-manager
which is linked to/etc/alternatives/x-session-manager
which is linked to/usr/bin/startlxde-pi
- lxde is the "Lightweight X11 Desktop Environment"
- `/usr/bin/startlxde
NewerOlder