반응형
반응형

Erlang

 

http://www.erlang.org/

 

wiki kor : http://xper.org/wiki/seminar/ErlangLanguage

 

What is Erlang?

Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.

 

 

Starting erlang

If you are running a unix system type "erl" or, if you are running on windows start Erlang by clicking on the Erlang start icon. You should see something like this:

$ erl
Erlang R14B (erts-5.8.1.1) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

Eshell V5.8.1.1 (abort with ^G)

 


1>

 

The ">" prompt means the system is waiting for input.Using Erlang as a calculator

 

1> 2*6.
12
2>

 

Remember to terminate every expression with a DOT followed by a newline!

Editing previous expressions

Previous expressions can be retrieved and edited using simple emacs line editing commands. The most common of these are:

  • ^P fetch the previous line.
  • ^N fetch the next line.
  • ^A Go to the beginning of the current line.
  • ^E Go to the end of the current line.
  • ^D Delete the character under the cursor.
  • ^F Go forward by one character.
  • ^B Go Back by one character.
  • Return Evaluate the current command.

Note: ^X means press Control + X

Try typing Control+P to see what happens.

Compiling your first program

Type the following into a file using your favorite text editor:

 

 

-module(test).
-export([fac/1]).

 

 
fac(0) -> 1;
fac(N) -> N * fac(N-1).

 

 

Save the file as test.erl The file name must be the same as the module name.

Compile the program by typing c(test) then run it:

 

 

3> c(test).
{ok,test}
30> test:fac(20).
2432902008176640000
4> test:fac(40).
815915283247897734345611269596115894272000000000
32>

 

 

Now go and write some games!

Digging deeper
반응형
반응형

이상  : 수량이나 정도가 일정한 기준보다 더 많거나 나음. 기준이 수량으로 제시될 경우에는,

           그 수량이 범위에 포함되면서 그 위인 경우를 가리킨다.

 

ex) A >= B : A는 B 이상이다.

 

이하 : 수량이나 정도가 일정한 기준보다 더 적거나 모자람. 기준이 수량으로 제시될 경우에는,

          그 수량이 범위에 포함되면서 그 아래인 경우를 가리킨다.

 

ex) A <= B : A는 B 이하이다.

 

초과 : 일정한 수나 한도 따위를 넘음. 기준이 수량으로 제시될 경우에는,

          그 수량이 범위에 포함되지 않으면서 그 위인 경우를 가리킨다.

 

ex) A > B : A는 B를 초과한다.

 

미만 : 정한 수효나 정도에 차지 못함. 또는 그런 상태. 기준이 수량으로 제시될 경우에는,

          그 수량이 범위에 포함되지 않으면서 그 아래인 경우를 가리킨다.

 

ex) A < B : A는 B 미만이다.

 

 

 


 

반응형

'프로그래밍 > Architect' 카테고리의 다른 글

[OSX] Shuttle — SSH shortcut menu for OS X  (0) 2013.08.05
[Erlang] 얼랑 : Erlang/OTP  (0) 2013.07.11
TDD, BDD  (0) 2013.06.13
도로명에 따른 우편번호 신규 내려받기  (0) 2013.06.04
개인정보보호법  (0) 2013.05.29
반응형

TDD : Test Driven Development

BDD : Behavior Driven Development

 

TDD에 대한 코칭을 하던 BDD의 아버지 댄 노스(Dan north)의 고민.

  1. 프로세스의 어디서부터 시작해야 하는가?
  2. 무엇을 테스트하고 또 무엇을 하지 말아야 하는가?
  3. 한 번에 얼마만큼 테스트 해야 하는가?
  4. 테스트를 어떻게 명명해야 하는가?
  5. 테스트가 실패하는 이유에 대해 어떻게 이해해야 하는가?

 

전통적인 TDD 소프트웨어 개발 방법론

  1. 첫 번째로 유닛을 위한 테스트 셋을 정의한다.(define a test set for the unit first).
  2. 유닛을 구현한다(the implement the unit).
  3. 마지막으로 유닛에 대한 구현이 테스틀르 통과하는지 검증한다(finally verify that the implementation of the unit makes the tests success).

TDD 템플릿

  1. 특정 값이 주어지고(Given)
  2. 어떤 이벤트가 발생했을 때(When)
  3. 그에 대한 결과를 보장해야 한다(Then).

 

 

 

 

 

 

반응형
반응형

http://www.epost.go.kr/search/zipcode/newAddressDown.jsp

 

공개되는「도로명주소의 우편번호 DB」는 안전행정부에서 제공하는 도로명주소-지번주소
매칭테이블에 현재 사용되는 지번우편번호를 부여한 자료이며, 향후 도로명주소 체계에
맞는 새 우편번호로 개편할 예정입니다.

 

 

반응형
반응형

개인정보보호법

 

 

http://www.law.go.kr/DRF/lawService.do?OC=jw9124&target=law&MST=111327&type=HTML

 

 

 

이 법은 개인정보의 수집·유출·오용·남용으로부터 사생활의 비밀 등을 보호함으로써 국민의 권리와 이익을 증진하고, 나아가 개인의 존엄과 가치를 구현하기 위하여 개인정보 처리에 관한 사항을 규정함을 목적으로 한다.

반응형
반응형

모바일 웹/앱 관점에서 본 2012년 비즈니스 동향 및 2013년 전망

 

http://www.slideshare.net/neovis/ss-15264461

 

 

.

반응형

+ Recent posts