Skip to content

Instantly share code, notes, and snippets.

View gamebox's full-sized avatar

Anthony Bullard gamebox

  • ServiceNow
  • Chicago. Il
View GitHub Profile
@gamebox
gamebox / html.roc
Created December 9, 2024 01:09
Just an idea for a Static rendering HTML library
module { someReasonableSize : U64 } -> [
Html,
text,
element,
div,
h1,
renderHtml,
]
Html : [
[
(
NoGuard,
TupleDestructure(
[
TupleDestruct {
index: 0,
variable: 227,
layout: InLayout(
106,
const h = (type) => (props, children = [], node, tag) => ({
type,
props,
children: Array.isArray(children) ? children : [children],
node,
key: props.key,
tag,
})
export default {
@gamebox
gamebox / string.gleam
Created February 28, 2020 05:02
Documentation of stdlib functions, with forward looking API
/// A built-in representation for efficient string manipulation. String literals
/// are enclosed in `"double quotes"`.
///
import gleam/iodata
import gleam/list
import gleam/order
@gamebox
gamebox / poyrvxv.markdown
Created September 10, 2019 21:38
PoYRvxv
import 'dart:async';
import 'package:flutter_test/flutter_test.dart';
void main() async {
LiveTestWidgetsFlutterBinding();
Future outsideFuture;
setUp(() {
outsideFuture = Future.microtask(() {
return 'outside';
import 'package:flutter_test/flutter_test.dart';
void main() {
Future<int> outerF;
final Duration delay = Duration(seconds: 20);
group('Async Tests - Fake Async', () {
setUpAll(() async {
outerF = Future<int>.delayed(delay, () => 42);
final Stopwatch waiting = Stopwatch()..start();
final AssetBundle bundle = TestAssetBundle(<String, List<String>>{
'assets/dart-logo.png': <String>['assets/dart-logo.png'],
});
@gamebox
gamebox / test_asset_bundle.dart
Created May 1, 2019 21:47
A possible implementation of TestAssetBundle for Flutter tests
class TestAssetBundle extends CachingAssetBundle {
TestAssetBundle(Map<String, List<String>> assets) : _assets = assets {
for (String assetList in assets.keys) {
for (String asset in assets[assetList]) {
_assetMap[asset] = bytesForFile(asset);
}
}
}
final Map<String, ByteData> _assetMap = <String, ByteData>{};
src/libponyc/pass/expr.c:640: pass_expr: Assertion `errors_get_count(options->check.errors) > 0` failed.
Backtrace:
This is an optimised version of ponyc: the backtrace may be imprecise or incorrect.
Use a debug version to get more meaningful information.
ponyc(ponyint_assert_fail+0x90) [0x732d90]
ponyc(pass_expr+0x11a) [0x67d79a]
ponyc(ast_visit+0x1c8) [0x6762e8]
ponyc(ast_visit+0x170) [0x676290]
ponyc(ast_visit+0x170) [0x676290]