Skip to content

Instantly share code, notes, and snippets.

View binghe's full-sized avatar
🎯
Sanskrit

Chun Tian binghe

🎯
Sanskrit
View GitHub Profile
@shortsightedsid
shortsightedsid / cl-udpip.lisp
Created October 27, 2014 22:01
Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
; Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand.
; After working on a short example on TCP, I found the
; need for a UDP tutorial. So, here goes.
; As usual, we will use quicklisp to load usocket.
@shortsightedsid
shortsightedsid / cl-tcpip.lisp
Last active January 15, 2024 02:36
Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand. After spending a day trying, I finally came up with a small
; bit of code that makes it easy to understand the basics. I've written this
; primarily for myself, but should help others get started as well.
; As usual, we will use quicklisp to load usocket.
@nicky-zs
nicky-zs / memcpy.c
Created November 19, 2013 06:31
One way to solve the glibc compatibility problem. In my case, when building a program with libthrift.a on linux with glibc version 2.15, ld always links memcpy@GLIBC_2.14 which cannot be found on systems with glibc version < 2.14. So, use this file to define a symbol __wrap_memcpy and use -Wl,--wrap=memcpy to tell ld using this symbol when meeti…
#include <string.h>
void *__memcpy_glibc_2_2_5(void *, const void *, size_t);
asm(".symver __memcpy_glibc_2_2_5, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n)
{
return __memcpy_glibc_2_2_5(dest, src, n);
}