- https://reasonml.github.io/
- Facebook製のOcaml方言
- OCamlのライブラリもJSのライブラリも使える
- Javascript、ネイティブに変換
- Reactにも使える(作者が同じ)
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 'dart:core'; | |
| Iterable<int> fib() sync* { | |
| int first = 1; | |
| int second = 1; | |
| yield 1; | |
| yield 1; | |
| while (true) { | |
| final next = first + second; | |
| first = second; |
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 'dart:core'; | |
| import 'dart:core' as prefix0; | |
| import 'dart:mirrors'; | |
| class Author { | |
| const Author(this.name, this.email); | |
| final String name; | |
| final String email; | |
| } |
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 'dart:core'; | |
| class A { | |
| A(this.i); | |
| A.double(int k) { | |
| i = k * 2; | |
| } | |
| int i; | |
| } |
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
| cat lib/l10n/intl_ja.arb | jq -r '.|with_entries(select(.key|contains("@")|not))|to_entries[]|.key + "=" + .value' |
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
| # :a: :b: :o: の箇所を好きな絵文字に置き換える。 | |
| ruby -e "puts %i(:a: :b: :o:).repeated_permutation(3).map(&:join)" | pbcopy |
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
| extension String: ExpressibleByIntegerLiteral { | |
| public init(integerLiteral value: Int) { | |
| if value % 15 == 0 { | |
| self = "FizzBuzz" | |
| } else if value % 3 == 0 { | |
| self = "Fizz" | |
| } else if value % 5 == 0 { | |
| self = "Buzz" | |
| } else { | |
| self = String(value) |
最近はまたiOSやってる
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 "Arduboy.h" | |
| Arduboy arduboy; | |
| int x = 0; | |
| int y = WIDTH / 2; | |
| float dx = 0; | |
| float dy = 0; | |
| float g = 3; | |
| void setup() { | |
| arduboy.begin(); |
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
| #!/bin/sh | |
| for pdf in `find . -name '*.pdf'` | |
| do | |
| name=`basename $pdf .pdf` | |
| if ! grep -shqI "$name" `find . -type f -name "*.[mh]" -o -name "*.xib" -o -name "*.storyboard"`;then | |
| echo "$pdf is not used" | |
| fi | |
| done |
NewerOlder