Today, John Tromp - creator of the Binary λ-Calculus, and one of the smartest functional wizards alive - ported his famous prime number generator (first published 12 years ago!) to HVM:
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
unit AsyncThread; | |
interface | |
uses | |
{Delphi} | |
System.SysUtils | |
{Project} | |
; |
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
function TFrmMain.ConsoleModule_Print( pself, args : PPyObject ) : PPyObject; cdecl; | |
var | |
pprint: NativeInt; | |
val1: Integer; | |
val2: Single; | |
val3: PAnsiChar; | |
begin | |
with GetPythonEngine do | |
begin | |
if (PyErr_Occurred() = nil) and |
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 is a very simple "overengineered" version of FizzBuzz written in Delphi | |
// See also | |
// https://github.com/jongeorge1/FizzBuzzEnterpriseEdition-CSharp | |
// https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition | |
program FizzBuzzEnterpriseEdition; | |
{$APPTYPE CONSOLE} | |
uses |
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
// Tested on Windows, MacOS, Linux, and Android. From what I've read /dev/urandom works on iOS too. | |
unit MultiPlatformCryptoRando; | |
interface | |
uses System.Classes, System.SysUtils; | |
function CryptoRandoCardinal: Cardinal; | |
function CryptoRandoFloat: Single; |
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
(**************************************************************************** | |
___ _ _ _ ___ _ _ ___ ___ _____ | |
| \ ___ | | _ __ | |_ (_) / __|| |_ __ _ | |_ / __|| _ \|_ _| | |
| |) |/ -_)| || '_ \| ' \ | || (__ | ' \ / _` || _|| (_ || _/ | | | |
|___/ \___||_|| .__/|_||_||_| \___||_||_|\__,_| \__| \___||_| |_| | |
|_| | |
Copyright © 2022-present tinyBigGAMES™ LLC | |
All Rights Reserved. |
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
/* | |
* Copyright 2022-2024 NVIDIA Corporation | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
program AutoFreeTest; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses | |
System.SysUtils, | |
System.Classes; | |
type | |
IAutoFree = interface |
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
// morseCodes[asciiCode - 32] | |
// Non-existend codes are represented by "" | |
String morseCodes[65] = { | |
" ", // 32 - [SPACE] | |
"-.-.--", // 33 - ! | |
".-..-.", // 34 - " | |
"", // 35 - # | |
"...-..-",// 36 - $ | |
"", // 37 - % |
In this video we come across about 50 online resources for category theory:
I quickly comment on about 20 major ones. I link to the university sites, arXiv sites or Amazon page - most of the mentioned books are online available.
Here's another category theory list on github
NewerOlder