Pages

Thursday, March 6, 2014

"Why Boost doesn't boost my productivity"

어제 C++ 라이브러리 모음인 Boost에 대해 이것저것 찾아보다가 읽어보게 된 글입니다.
http://agentxcpp.wordpress.com/2013/05/18/why-boost-doesnt-boost-my-productivity/

내용이 좀 깁니다만, “Boost는 똑같은 결과를 내기 위해 가독성이 떨어지는 복잡한 코드를 요구한다”가 골자가 되겠습니다. 물론 boost::thread 등이 C++11에 채용되는 등 C++에 대한 Boost의 기여도가 적지 않음을 알고 있습니다만, 몇몇 소스 가독성을 떨어뜨리는 코딩을 유도하는 라이브러리와 부족한 문서화는 분명 Boost에 입문하려는 사람들에게 커다란 장벽으로 자리잡는다 할 것입니다.

게다가 하필 비교대상이 제가 가장 많이 의존하는 Qt더군요. 그러고보면 요즘 웬만한건 Qt로 다 되는데다가 Boost의 주요 기능들이 Qt에서 재구현되는 경우가 꽤 있는걸 보면 가끔은 ‘Boost를 왜 쓰지?’ 하는 생각이 들 때도 있습니다.

일견 공감이 많이 됩니다만, 한편으로 boost::thread나 boost::signal같은 것들은 별다른 공부 없이도 쉽게 쓸 수 있는걸 보면 이 건은 case by case라고 보는게 옳지 않을까 싶습니다.

뭐 정식(?)으로 프로그래밍을 배운 적이라고는 한 번도 없이, 모든걸 독학으로 공부했지만 얼떨껼에 니치 마켓(?)을 찾아 프로그래밍으로 밥벌어먹게 된 사람의 쓸데없는 뻘소리였습니다.

Sunday, March 2, 2014

넥서스 5와 내 영어실력

넥서스 5를 구매하다.
그 유명한 “OK Google”은 미국식 영어만 알아듣는다는 사실을 확인하다.
자, 그럼 이제 미국식 영어발음을 연습해볼까나. :P

P.S:Google Now가 U.S. English 세팅에서 내 발음을 거의 다 알아듣는다!
내 발음은 세계적인 글로벌 기업 구글이 인정한 발음이야!
내 쩔어주는 미국식 영어발음을 보고 다들 열폭하라고!

Nexus 5 and My English

Bought Nexus 5.
Found out that the famous ”OK Google” feature is available only when you set your language to U.S. English.
Time to practice “standard” U.S. English pronunciation. Hmpf. :P

P.S:Fortunately Google Now understand my English quite well.lol lol lol
OK Google. You accepted my pronunciation is quite that of American Native. ;)

Wednesday, February 26, 2014

Windows에서 MinGW-builds(MinGW-w64)를 이용하여 libssh를 빌드하는 경우 유 의점

라이브러리 의존성: zlib, openssl

메모

  • zlib: 큰 문제 없음. mingw32-make -f win32/Makefile.gcc 한방으로 해결 가능
  • openssl: www.mingw.org에서 MSYS를 다운로드받은 후, 소스코드를 MSYS의 tar로 풀어낼것. 그렇지 않은 경우 tarball 안에 있는 symlink가 제대로 처리되지 않음
  • libssh: 두가지 유의사항이 있음
    1. 빌드 디렉토리는 소스코드 디렉토리가 아닌 다른 곳이어야 함
    2. 소스코드 직접 수정 필요: return pthread_self().p를 return pthread_self()로 수정해야 함. 이는 MinGW-builds와 www.mingw.org 양쪽 경우에 대해 pthread 드라이버의 구현 방식이 다르기 때문일 것으로 추측함(소스코드를 비교해보지는 않았음)

Monday, February 24, 2014

Memo on building libssh in Windows with MinGW-builds(MinGW-w64)

Requirements: zlib, openssl

Remarks

  • zlib: Just mingw32-make -f win32/Makefile.gcc and that’s all
  • openssl: Install MSYS from www.mingw.org and use tar on that MSYS package to untar the source tarball. If not, the links on the tarballs are not adequately managed
  • libssh: two things
    1. The build directory should be other than the source tree
    2. You’ve got to edit source code to return pthread_self(), rather than pthread_self().p, which is used under #ifdef _WIN32_. This seems to be because of the differences of pthread implementations between mingw.org and mingw-w64 (though not I didn’t compare the source codes)

Sunday, February 9, 2014

QByteArray::indexOf()

QByteArray::indexOf() shows almost the same speed of my implementation of Boyer-Moore-Horspool full string search library based on char*. As Qt has the same source code, chances are GCC 4.8.2 devoted to the performance improvement.

QByteArray::indexOf()

Qt 5.2.1에서 QByteArray::indexOf()가 내가 만든 char* 기반의 Boyer-Moore-Horspool full string search와 거의 동일한 속도를 내고 있다. Qt쪽의 소스코드가 동일한 걸로 봐서 GCC가 4.8.2로 업데이트되면서 나온 최적화 결과인 듯.