Skip to content

Instantly share code, notes, and snippets.

@pjc0247
pjc0247 / a.md
Last active September 22, 2015 08:19

SAM(Super Annoying & Manualized) AOP with C++

Overview

// inject 'logme', 'becnhmark' aspects 
void foo() { $$(logme) $$(benchmark)
  /* ... */
}

Merona.Go.cs

__Merona.Go__는 서버 프로그래머가 아닌 클라이언트 프로그래머에게 친숙한 인터페이스를 제공하기 위한 확장입니다.
클라이언트의 게임 오브젝트와 1:1 매칭되는 서버 오브젝트 개념이 제공되며, 서버-클라이언트간의 쉬운 동기화를 위해 클라이언트용 라이브러리 또한 제공됩니다.

  • Unity3D
using Merona.Go.Unity3d;
// Merona.Client.cpp.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
//
#include "stdafx.h"
#include <string>
#include <winsock2.h>
#include <windows.h>
@pjc0247
pjc0247 / Features.md
Last active August 29, 2015 14:26

패킷 디스크립터

ORM

Pointer & Reference

단순 복사 회피용 전달일 때

void foo_with_ref(const string &ref);
void foo_with_ptr(string *ptr);


foo_with_ref("ASDF"); // OK
@pjc0247
pjc0247 / future.cs
Last active September 16, 2015 09:02
very simple future implementation for .Net 3.5 or below, without promise
public sealed class Future<T>
{
object m = new object();
T storage;
bool hasValue = false;
public void Produce(T value)
{
if (hasValue == true)
throw new InvalidProgramException ();
item
quest
character
savedata
window
class Foo
attr_accessor :bar
visible_owner :bar
end
class Chicken
def initialize
@foo = Foo.new
@foo.bar = 1234
// test_lemon.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
//
#include "stdafx.h"
#include <stdlib.h>
#include <Windows.h>
#include <setjmp.h>
//jmp_buf co;
module Minipack
class Package
end
class Item
end
def load path
end
end