Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
nddrylliog / Makefile
Created December 19, 2012 23:18
Makefiles for Legithief, for comparison and contrasting.
OOCFLAGS?=-v -g
all:
rock $(OOCFLAGS)
editor:
rock $(OOCFLAGS) --sourcepath=source editor
clean:
rock -x
@nddrylliog
nddrylliog / test.ooc
Created December 17, 2012 03:06
List files in ooc (testing here for platform compatibility)
import io/File
main: func {
file := File new("items")
children := file getChildrenNames() filter(|x| x endsWith?(".yml"))
for (c in children) {
"%s" printfln(c[0..-5])
}
diff --git a/src-IL/src/il_icon.c b/src-IL/src/il_icon.c
index 2ccb1a3..fd9475d 100644
--- a/src-IL/src/il_icon.c
+++ b/src-IL/src/il_icon.c
@@ -525,7 +525,7 @@ ILboolean ico_readpng_get_image(ICOIMAGE *Icon, ILdouble display_exponent)
// Expand low-bit-depth grayscale images to 8 bits
if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
- png_set_gray_1_2_4_to_8(ico_png_ptr);
+ png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
@nddrylliog
nddrylliog / scissors-conditionals-2
Created December 11, 2012 17:13
Scissors conditionals with variables, optimized by LLVM
===========================
Dice roll... 4!
===========================
---------------------------
old body = {4 }
new body = {a : <unknown type> = 1, b : <unknown type> = 2, c : <unknown type> = 3, b > a ? (c > b ? c : b) : a }
---------------------------
[scissors] Done tinkering
[scissors] resolved body = {a : SSizeT = 1, b : SSizeT = 2, c : SSizeT = 3, return b > a ? (c > b ? c : b) : a as Int }
@nddrylliog
nddrylliog / scissors-conditionals
Created December 11, 2012 10:09
Scissors handling some conditionals
===========================
Dice roll... 4!
===========================
---------------------------
old body = {4 }
new body = {a : <unknown type> = 1, b : <unknown type> = 2, c : <unknown type> = 3, b > a ? (c > b ? c : b) : a }
---------------------------
[scissors] Done tinkering
[scissors] resolved body = {a : SSizeT = 1, b : SSizeT = 2, c : SSizeT = 3, return b > a ? (c > b ? c : b) : a as Int }

Dear XXX, dear YYY,

We are offering the internship program "Summer Trainee Engineering Program" again in 2013. Would it be possible to inform female Computer Science students in the first and second year of their Bachelor at EPFL about it? Below you can find more information about the program:

Eligibility:

  • Female students currently enrolled in a Bachelor Program who will complete their first year of studies by summer of 2013
  • Studying computer science or related subjects
  • Programing experience in either Java, Python, C or C++
@nddrylliog
nddrylliog / oggplayer.ooc
Created November 22, 2012 18:23
An ogg player with libvorbis and cubeb in ooc
use cubeb
import cubeb
use vorbis
import vorbis
import structs/ArrayList, os/Time, io/FileWriter
main: func (args: ArrayList<String>) {
@nddrylliog
nddrylliog / output.txt
Created November 22, 2012 13:02
cubeb make output on mingw
$ make
make all-recursive
make[1]: Entering directory `/g/Dev/cubeb'
Making all in docs
make[2]: Entering directory `/g/Dev/cubeb/docs'
echo "*** Warning: Doxygen not found; documentation will not be built."
*** Warning: Doxygen not found; documentation will not be built.
touch doxygen-build.stamp
make[2]: Leaving directory `/g/Dev/cubeb/docs'
make[2]: Entering directory `/g/Dev/cubeb'
@nddrylliog
nddrylliog / test5.c
Created November 18, 2012 22:17
Test struct layout by GCC
#include <stdio.h>
struct s0 {
char c1;
};
struct s1 {
char c1;
char c2;
};
@nddrylliog
nddrylliog / compile.sh
Created November 18, 2012 18:46
How to compile an ooc program with libcurl on mingw
rock -x && ROCK_DIST=/g/Dev/rock/ rock -v wget-like -Ic:\\MinGW\\msys\\1.0\\include -Lc:\\MinGW\\msys\\1.0\\lib -lcurldll -lws2_32 -lwinmm