background preloader

Advanced Stuff

Facebook Twitter

BETA. R and SQLite: Part 1. 1.

R and SQLite: Part 1

Introduction These notes show how to create an SQLite database from within R. The notes outline two way in which R can communicate with SQLite databases: using the RSQLite package and using the sqldf package. Both packages use reasonably standard versions of SQL to administer and manage the database, but the two packages differ in the way meta statements are constructed.

Management of SQLite databases requires the use of SQL (Structured Query Language). For convenience, R code and data files are available at GitHub. GPGPU-SIM Notes. GPGPU-SIM Code Study (version: 3.1.2) -by Yong Li This note is not a tutorial of how to use the GPGPU-Sim simulator.

GPGPU-SIM Notes

For the official manual and introduction of GPGPU-Sim please refer to This note aims to put together major components from the simulator and help understanding the entire simulation process from the source code level. Emphasis is put on the data structure and software flow of the simulator, which I think is critical for modifying and re-architecting the simulator for various research purposes. Just another WordPress.com weblog. Implementing Voxel Cone Tracing. The first step is to voxelize the scene.

Implementing Voxel Cone Tracing

I first output all the voxels from triangle meshes into a big voxel fragment queue buffer. Each voxel fragment use 16 bytes: The first 4 bytes store the position of that voxel inside the voxel volume which is at most 512, so 4 bytes is enough to store the XYZ coordinates. Voxel fragments are created using the conservative rasterization described in this OpenGL Insights charter which requires only 1 geometry pass by enlarging the triangle a bit using the geometry shader.

So I modify my shader generator to generate the shaders for creating voxel fragments based on the material. Each octree node is 28 bytes with the first 4 bytes storing the child tile index with another 24 bytes storing the neighbor node byte offset from the start of the octree node buffer: Solving the "Unblock Me" puzzle. (October 2012, Reddit-ed) Solving the "Unblock Me" puzzle Even since I can remember, I've always been fascinated with puzzles.

Solving the "Unblock Me" puzzle

This fascination has manifested itself in temporary obsessions of various natures - mathematical, probabilistic, chess related, AI ... you name it, I've probably wasted time playing with it :‑) A natural consequence is the kind of computer games I am drawn to... that is, puzzle games. I still consider Sokoban the best puzzle game I've ever played (and finished) - but also love most of Simon Tatham's collection.

This game is deceptively simple: you have to move horizontal blocks left or right, and vertical blocks up or down, in order to free ("unblock") the red block - i.e. allow it to escape from the exit to its right. Io.SmashTheStack.org level7 -> level8. 문제 소스, 주석 //written by bla #include <stdio.h> #include <string.h> #include <unistd.h> int main(int argc, char **argv) int count = atoi(argv[1]); //입력받은 값을 integer(정수형)로 변환 int buf[10]; if(count >= 10 ) return 1;

io.SmashTheStack.org level7 -> level8

How to Cross-Compile GCC for SPARC Solaris. Computer and Information Sciences Department University of Pennsylvania January 2010 To make it easier for my CIS534 students to compile code for our one and only SPARC machine (a 128-thread Niagara T2 box, generously donated by Sun Microsystems), I created a cross-compiler for GCC on x86/Linux to SPARC/Solaris.

How to Cross-Compile GCC for SPARC Solaris

This page documents how I did it. I'm putting it on-line in case anyone else finds it helpful. There are three steps to building the cross compiler: Specifying the configuration and pathsFinding and installing the proper system header files and librariesCross-compiling GNU binutils and GCC The "host" is the machine on which the compiler executes (x86/Linux in my case). I set these options using environment variables: Llvm 2.5, BrainF_8cpp-source.html. Report from JavaOne: High Performance: Writing a Sony PlayStation Emulator in Java - Emuforums.com. Michael's Ray Tracing Blog. Interactive Ray Tracing. By Jacco Bikker Introduction.

Interactive Ray Tracing

Code « Lumps 'n' Bumps. My publisher, No Starch Press, sent me a review copy of another of their books a few months ago.

Code « Lumps 'n' Bumps

Regrettably I’ve been a bit slow in getting around to properly reading it, but here, finally, is my review of Think Like a Programmer, by V. Anton Spraul. Programming is as much an art as it is a science. When you’re starting out as a programmer, there’s a big mess of concepts and rules to get into your head before you can do anything much more complicated than printing out a shopping list on-screen – things like differences between different types of variable, and how pointers work. Even if you’re dealing with a language that hides all of these icky details, like Python, you’re still going to find yourself spending most of your time learning about specific structures like for loops or class declarations.

Most books for the newbie programmer focus on these mechanical details, generally with specific application to only one programming language.