• 2008-05-02

    libjingle

    어제 출시된 SteamWorks 1.0 API 을 살펴보다가 얘네들이 libjingle 을 쓰고 있다는 사실을 발견했다.
    libjingle is a collection of open-source C++ code and sample applications that enables you to build a peer-to-peer application. The code handles creating a network connection (through NAT and firewall devices, relay servers, and proxies), negotiating session details (codecs, formats, etc.), and exchanging data. It also provides helper tasks such as parsing XML, and handling network proxies.
    시간이 꽤 흘러 또 기억이 가물가물해졌지만, 역시나 홀펀칭은 STUN 인가보다.

  • 2008-05-01

    Customize Wordpress Prologue theme

    http://boxcatstudio.files.wordpress.com/2009/07/prologue-269x300.png

    이런 저런 스트레스가 머리끝까지 다다른 어느날, 불현듯 팀 내에 저레벨(?) 커뮤니케이션의 필요성이 느껴져서, 얼마전부터 prologue 테마를 한글화해서 뒷담화 온라인이라는 이름으로 절찬리에 운영중이다. 며칠 쓰다보니 외부 링크를 보다 손쉽게 추가할 수 있게 해달라는 요청이 들어와서, Custom Field 를 저장하고 보여주는 기능을 구현해봤다.

    가장 먼저 post-form.php 에 link 라는 이름의 input text 필드를 추가했다.

    
    
    <input type="text" name="link" id="link" autocomplete="off" />
    
    

    이걸 link 라는 이름의 custom field 로 저장하기 위해서 function.php 에 다음과 같은 함수와 콜백을 추가했다.

    
    
    function add_link_custom_field($post_id) {
    if( $_POST['link'] ) {
    add_post_meta($post_id, 'link', $_POST['link'], true) or update_post_meta($post_id, 'link', $_POST['link']);
    }
    }
    add_action('publish_post', add_link_custom_field );
    

    이제 글을 작성할 때마다 link 폼으로 넘어온 값이 custom field 에 저장이 될 것이다. 다음은 이걸 화면에 아이콘으로 보여주는 코드를 살펴보자.

    
    
    <?php
    $links = get_post_custom_values('link');
    if(count($links)>0)
    {
    echo "<a href='" . $links[0] . "'><img src='/blog/wp-content/uploads/link.jpg' /></a>";
    }
    ?>
    
    

    가끔은 정형화된 인트라넷에서는 쏟아낼 수 없는, 너무 소소하고 쓸데없는 잡담들을 펼쳐줄 공간이 회사원에게는 필요할지도 모르겠다. 물론 그걸 악용하고 소모적으로 사용하는 경우는 없어야겠지만. 결국은 쓰는 사람이 그 선을 잘 지켜줘야 할 게다. 그런 의미에서 확실히 자신의 얼굴을 보여준다는 건 참 괜찮은 아이디어인 듯하다.

  • 2008-04-14

    boost with Visual Studio 2008 express

    visual studio express 시리즈들이 커맨드라인 빌드를 지원하지 않는다고만 알고 있었는데, 구글님께 여쭤보니 역시나 해결책이 있었다.
    bjam --toolset=msvc-9.0express --with-system --with-thread --with-date_time --with-regex --with-serialization --with-test --stagedir=. debug release link=static runtime-link=shared threading=multi stage

  • 2008-04-05

    boost 1.35

    지난 달에 boost 1.34.1 을 일년만에 업그레이드해서 소스 트리에 넣었다가 느리다는 불평을 많이 들었는데, 금방 1.35가 나와버렸다. 이번에는 ASIO 가 정식으로 포함되었고, 그 외에 Circular Buffer 라든지 Interprocess 같은 라이브러리들이 새로 추가되었다.

    이 정도라면 boost 만으로도 game server 을 만들어내도 될 법한 분위기렸다. 누가 boost.reliable_udp 이라든지 boost.patch, boost.crash_dump 같은 거 만들어줬으면...