This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
- 日時: 2015-08-24 19:15-20:40
- 講師:
- 野島 梨恵氏 (東京山王法律事務所)
- 場所: Co-Edo
- 資料
- ハッシュタグ #coedo
% $R16B03_1_hipe/bin/erlc utf8_with_magic_comment.erl | |
% $R16B03_1_hipe/bin/erl -noshell -s utf8_with_magic_comment start -s init stop | |
===== format by 's' | |
[bytes]: あ | |
===== format by 'ts' | |
[codepoint]: \x{3042} | |
[bytes]: あ | |
[string_literal]: \x{3042} | |
===== format by 'ts' with io:setopts([{encoding, utf8}]) | |
[codepoint]: あ |
import sys | |
import csv | |
tabin = csv.reader(sys.stdin, dialect=csv.excel_tab) | |
commaout = csv.writer(sys.stdout, dialect=csv.excel) | |
for row in tabin: | |
commaout.writerow(row) |
<!DOCTYPE html> | |
<title>localStorage test</title> | |
<body> | |
<h1>localStorage test</h1> | |
<script> | |
if ( ! window.console ) { | |
console = { | |
log : function( s ) { | |
alert( s ); | |
} |
#include <stdint.h> | |
#include <avr/interrupt.h> | |
#include <avr/wdt.h> | |
byte sample = 0; | |
boolean sample_waiting = false; | |
byte current_bit = 0; | |
byte result = 0; | |
void setup() { |
* Bluetail/Alteon/Nortel (distributed, fault tolerant email system, SSL accelerator) | |
* Cellpoint (Location-based Mobile Services) | |
* Corelatus (SS7 monitoring). | |
* dqdp.net (in Latvian) (Web Services). | |
* Facebook (Facebook chat backend) | |
* Finnish Meteorological Institute (Data acquisition and real-time monitoring) | |
* IDT corp. (Real-time least-cost routing expert systems) | |
* Kreditor (Electronic payment systems) | |
* Mobilearts (GSM and UMTS services) |
{erl_opts, [fail_on_warning, debug_info]}. | |
{xref_checks, [undefined_function_calls]}. | |
%% {eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}. | |
{cover_enabled, true}. | |
{clean_files, [".eunit", "ebin/*.beam"]}. | |
{dialyzer_opts, | |
[{warnings, | |
[no_return, | |
no_unused, | |
no_improper_lists, |
(Note: this is a rough translation added to the original Japanese. No warranty.)
RpbErrorResp の errcode はより適切な値が設定されるべきである。(The errcode of RpbErrorResp should be set to more appropriate value.)
PBC API ではエラーが起きると、RpbErrorRespが返るがRIAKC_ERR_GENERALが常に設定されており意味がないのでREST APIと同等の値が設定されているべきです。 (When an error occurs on the PBC API, the value of RpbErrorResp is returned, though RpbErrorResp is always set to RIAKC_ERR_GENERAL so that the recipient cannot find what the real cause is. The value should be set the same as with the REST API.)
例えば、get operation において、notfound が返るのは多くの場合クライアント側にとって特に問題ないので、コストの高い例外処理がトリガーされない事が望ましい。
一方で、modifiedが返る場合、データのリペアをトリガするべきか、単に再度getするべきかはアプリケーションの設計の問題である。 (For example, on get operation the clients will find no problem when notfound is returned - exceptions of higher cost should not be triggered. On the other hand, if modified is returned, it is up to how the application is designed to trigger the repairment of the data, or to re-execute the get operation.)
errmsgフィールドの様にHum
#!/usr/bin/env bash | |
emacs --batch --eval " | |
(progn (find-file \"$1\") | |
(if (string-equal \"darwin\" (symbol-name system-type)) | |
(setq erlang-root-dir (car (file-expand-wildcards \"/usr/local/Cellar/erlang/R*\"))) | |
(setq erlang-root-dir \"/usr/lib/erlang/\")) | |
(setq load-path (cons (car (file-expand-wildcards (concat erlang-root-dir \"/lib/erlang/lib/tools-*/emacs\"))) load-path)) | |
(require 'erlang-start) | |
(erlang-mode) | |
(untabify (point-min) (point-max)) |