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
| #ifndef ASYNCRT_BUILD_H | |
| #define ASYNCRT_BUILD_H | |
| #import <ObjFW/ObjFW.h> | |
| #pragma clang assume_nonnull begin | |
| @class Build; | |
| @class BuildBase; |
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
| #import <stdio.h> | |
| #import "AsyncRuntime.h" | |
| #pragma clang assume_nonnull begin | |
| @namespace(Utilities) | |
| + (Promise *)delayForSeconds: (OFTimeInterval)seconds onScheduler: (AsyncScheduler *)scheduler; | |
| @end |
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
| #import "jsobjc.h" | |
| #import "dom.generated.h" | |
| #include <emscripten/emscripten.h> | |
| EM_JS(void, install_demo_interop, (), { | |
| class BaseGreeter { | |
| constructor(name) { | |
| this.name = name; | |
| } |
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
| #include <stdio.h> | |
| #include <stdint.h> | |
| #import <ObjFW/ObjFW.h> | |
| int | |
| main(void) | |
| { | |
| void *pool = objc_autoreleasePoolPush(); | |
| OFMemoryStream *stream; |
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
| #include <type_traits> | |
| #define $return using result = | |
| #define $apply using apply = | |
| template<class A, class B> | |
| constexpr auto equals = std::is_same_v<A, B>; | |
| template<typename T> | |
| using call = typename T::result; |
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
| #include <cstdio> | |
| #include <string_view> | |
| #include <string> | |
| #include <memory> | |
| #include <unordered_map> | |
| #include <typeindex> | |
| #include <variant> | |
| #include <optional> | |
| #include <functional> | |
| #include <type_traits> |
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
| #!/usr/bin/env luajit | |
| local lfs = require("lfs") | |
| local function fail(message) | |
| error(message, 0) | |
| end | |
| local function printf(fmt, ...) | |
| io.write(string.format(fmt, ...)) |
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
| local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local table = _tl_compat and _tl_compat.table or table | |
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
| local record Sheep | |
| _naked: boolean | |
| _name: string | |
| __index: Sheep | |
| end | |
| Sheep.__index = Sheep | |
| -- impl Sheep | |
| function Sheep:shear() | |
| print(self._name, "gets a haircut!"); |
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
| local interface Animal | |
| -- Associated function signature; `Self` refers to the implementor type. | |
| new: function(string): self | |
| -- Method signatures; these will return a string. | |
| name: function(self): string | |
| noise: function(self): string | |
| talk: function(self) | |
| end |
NewerOlder