- 경사스러운 일입니다. 이제 이 곳에 달리는 댓글을 막을 수 있어 그리 하게 되었습니다. 그래도 이전에 달렸던 댓글들은 아무래도 볼 수 있는 다른 방법이 인터넷 상에 존재하긴 하는 모양입니다.
…
(U+2026),⋯
(U+22EF),⋮
(U+22EE)는 모두.
(U+002E)가 3번 연속으로 나열된 것과 같은 것으로 봅니다.- "한글 음절 문자"는 가(U+AC00) 이상 힣(U+D7A3) 이하의 유니코드 문자들을 의미합니다.
// ---- loading a font | |
static void load_font(void) | |
{ | |
hb_blob_t *blob; | |
hb_face_t *face; | |
size_t filelen = 0; | |
void *filedata = stb_file("c:/windows/fonts/arial.ttf", &filelen); | |
if (filedata == 0) stbpg_fatal("Couldn't load font"); |
{config, ...}: | |
let | |
allowHttps = true; | |
serverTemplate = { | |
domain, | |
proxyTarget, | |
redirectWww ? false, | |
enableHttps ? false | |
}: let |
…
(U+2026), ⋯
(U+22EF), ⋮
(U+22EE)는 모두 .
(U+002E)가 3번 연속으로 나열된 것과 같은 것으로 봅니다.#include <stdio.h> | |
#define HEIGHT 24 | |
#define STB_TRUETYPE_IMPLEMENTATION | |
#define STBTT_STATIC | |
// gcc -Wall -Wno-unused-function -g ttfont.c -o ttfont.exe | |
// https://github.com/nothings/stb/blob/master/stb_truetype.h | |
#include "stb_truetype.h" |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
# wayland-scanner is a tool which generates C headers and rigging for Wayland | |
# protocols, which are specified in XML. wlroots requires you to rig these up | |
# to your build system yourself and provide them in the include path. | |
xdg-shell-protocol.h: | |
wayland-scanner server-header \ | |
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
xdg-shell-protocol.c: xdg-shell-protocol.h |
(previous Yoneda blog) (reddit) (twitter)
Let's explore the Yoneda lemma. You don't need to be an advanced Haskeller to understand this. In fact I claim you will understand the first section fine if you're comfortable with map
/fmap
and id
.
I am not out to motivate it, but we will explore Yoneda at the level of terms and at the level of types.