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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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> | |
#include <limits.h> | |
#if (defined(__cplusplus) && (__cplusplus >= 202002L)) || \ | |
(defined(_MSVC_LANG) && (_MSVC_LANG >= 202002L)) | |
#include <type_traits> |
OlderNewer