- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
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
:- module store_example. | |
:- interface. | |
:- import_module store, io. | |
:- pred main(io::di, io::uo) is det. | |
:- some [S] pred new_counter(int_var(S)::out, S::uo) is det => store(S). | |
:- implementation. |
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
#!/bin/usr/env bash | |
# Originaly from: https://www.reddit.com/r/NixOS/comments/5yxt45/simple_nix_package_search/ | |
nq () { | |
local CACHE="$HOME/.cache/nq-cache" | |
if ! ( [ -e $CACHE ] && [ $(stat -c %Y $CACHE) -gt $(( $(date +%s) - 3600*24*7 )) ] ); then | |
# read gotcha.. can't pipe to read (as usual zsh beats bash) | |
read x MEM_AVAIL_KB UNIT < <(grep MemAvailable: /proc/meminfo) | |
if [[ $UNIT != "kB" || $MEM_AVAIL_KB -lt 1000000 ]]; then | |
# nix-env can easily use up to 1GB during -qa |
In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.
You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm
.
If you have wasm support already you should see:
$ llc --version
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
-- UnBIOS by JackMacWindows | |
-- This will undo most of the changes/additions made in the BIOS, but some things may remain wrapped if `debug` is unavailable | |
-- To use, just place a `bios.lua` in the root of the drive, and run this program | |
-- Here's a list of things that are irreversibly changed: | |
-- * both `bit` and `bit32` are kept for compatibility | |
-- * string metatable blocking (on old versions of CC) | |
-- In addition, if `debug` is not available these things are also irreversibly changed: | |
-- * old Lua 5.1 `load` function (for loading from a function) | |
-- * `loadstring` prefixing (before CC:T 1.96.0) | |
-- * `http.request` |