Useful adjust indent
1. Move the cursor to top
2. *Visual Block Mode* ctrl+v or ctrl+q and select the region
3. *Insert Mode* by shift+i
4. Put text you want to add
5. esc
Useful adjust indent
1. Move the cursor to top
2. *Visual Block Mode* ctrl+v or ctrl+q and select the region
3. *Insert Mode* by shift+i
4. Put text you want to add
5. esc
2. 버즈워드를 써서 낚였다.
Galeta, Tomislav, Pero Raos, and Marija Somolanji. "Impact of structure and building orientation on strentgh of 3D printed models." KGK Kautschuk Gummi Kunststoffe 65.10 (2012): 36-42.
흥미롭다:뭔가 정말 흥미롭다면, 그게 흥미롭다는 이야기를 굳이쓸필요가 없다
짧은단어:쓰기도 쉽고 이해하기도 쉽다. 뜻이 같은 두 단어가 있다면 짧은 쪽을 쓰자
Best Practices for Scientific Computing
하스켈을 들여다 보면 자주 보게되는 FFI에 대해 정리 9/5/2013 9:54:57 PM
Foreign function interface (FFI)은 프로그래밍 언어에서 다른 프로그래밍 언어로 정의 된 함수 등을 이용하기위한 기법이다. 주로 고급 언어에서 C / C + + 등의 함수 나 메서드를 호출하여 OS 고유의 기능 등을 이용하기 위해 사용되는 경우가 많다. FFI라는 용어는 Common Lisp의 사양에 유래,Haskell에서도 마찬가지로 FFI라는 용어가 사용되고있다. Ada 등의 언어 사이 바인딩 (또는 바인딩 language binding)이라고한다. FFI라는 용어 자체에 "함수 (Function)"라는 말이 포함되어 있지만, 많은 FFI는 단순히 다른 언어로 작성된 함수를 호출 할뿐만 아니라 개체의 메서드를 호출하거나 그 결과를 가져 하고 데이터 형식 또는 클래스를 언어간에 상호 변환 할 수있다.
FFI의 주요 기능은 호출자의 언어 (호스트 언어)와 수신자의 언어 (게스트 언어)의 호출 규칙과 의미론을 맞추는 것이이다. 주로 다음과 같은 방법 등으로 구현된다: 게스트 언어 호출되는 함수에 대해 호스트 언어에서 사용 가능한 특정 프로토콜을 구현하는 것을 요구한다 (예 : Java Native Interface). 게스트 언어의 함수를 감싸기 글루 코드를 작성하는 래퍼 라이브러리를 만든다. (예 : Haskell 98 FFI) 게스트 언어로 정의 된 함수는 호스트 언어의 기능과 의미론의 하위 집합이여야 한다 (예 : C + +에서 C 언어의 기능을 사용)
또한, FFI의 이용 및 구현에는 다음과 같은 경우에 주의가 필요하다.
두가지 방법이 있다.
Alt+d - 현재 경로를 선택
F4 - 커서를 현재 경로 마지막에 두고 드랍다운 리스트를 펼친다
Bridge pattern은 객체지향 설계방법이고, PIMPL은 파일 물리적으로 설계하는 방법이다.
PIMPL은 실제 구현을 감추는 한 방법으로, 우선적으로 컴파일 의존성을 쪼개는 것이다
Bridge pattern은 기본 추상화 객체에 여러가지 구현을 허락하는 방법이다.
swap()은 두 가지 객체의 값을 교환하는 표준 함수이다. 만약 각 구현에서 포인터를 swap한다면, 런타임에 클래스의 구조를 바꿔줘야 한다. 기본적으로 PIMPL을 사용하는 클래스는 한 가지 구현만을 갖는데, 다른 하위클래스를 가지는 추상 클래스는 없고, forward declared, 다른 곳에서 컴파일되는 한 클래스만을 가질 뿐이다. 구현 클래스를 바꾸는 일이 메인 헤더파일을 include하는 소스 파일을 다시 컴파일하게 만들지 않는다.
예로 많은 수의 private 멤버함수, enums, 데이터를 갖고 있다면, 클래스를 개발하는 도중에는 이러한 private 구성원들을 자주 바꾸게 된다. 만약에 여러파일에 이러한 클래스를 include 한다면, 그래서 private 멤버의 변화때문에 많은 파일을 재컴파일해야 한다면 PIMPL을 사용하는게 좋다.
PIMPL is a way of hiding the implementation, primarily to break compilation dependencies.
The Bridge pattern, on the other hand, is a way of supporting multiple implementations.
swap is a standard C++ function for exchanging the values of two objects. If you swap the pointer to the implementation for a different implementation, you are essentially changing the mechanism of the class at runtime.
But in its basic and common form, a class using PIMPL points to a single implementation, so there is no abstract class with distinct subclasses — just one class, forward declared, and compiled elsewhere. Changing the implementation class does not require any recompilation of sources that include the main header.
For example, say you have a lot of private member functions, private enums, and private data. And these private "bits" change fairly frequently as the class is developed and maintained. If the #include dependencies are such that touching this header file causes a large number of sources to be recompiled, you have a good candidate for PIMPL.
So the Bridge pattern is about object-oriented design, while the PIMPL idiom is about physical design of files.
http://stackoverflow.com/questions/2346163/pimpl-idiom-vs-bridge-design-pattern
http://books.google.com/books?id=qW1mncii_6EC&printsec=frontcover&hl=ko#v=onepage&q&f=false
병렬 프로그램을 만드는 3단계
1. 병렬처리가 가능한 작은 단위로 문제를 쪼개고
2. 각 단위 문제를 프로세서에 나눠주고
3. 병렬 프로세서간의 통신과 동기화를 시키자
병렬프로그래밍의 대부분은 데이터 간의 의존을 명확하게 하는 것이다.