This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# SCons builder for gcc's precompiled headers | |
# Copyright (C) 2006 Tim Blechmann | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<math.h> | |
static void do_something(int i) { | |
for (int j = 0; j < 3000; ++j) | |
{ | |
sqrt(double(i*j)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am a programmer, I don't manage people and I use time tracking to make sure I | |
am as effective as I can be. | |
Things I look for in a time tracker: | |
I like discretized time slots ala Pomodoro Technique, I want to click | |
"start" and focus on work until my tool tells me that a time unit has passed. | |
Then I can log what I did. | |
I want to measure the number of "time units". I usually go for a minimum of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have spent a lot of time doing algorithmic optimizations on Milton's | |
rasterizer. I am sure there must be many more things that I can do, but right | |
it is at a state where it is almost Good Enough. With multi-threading enabled, | |
the renderer is fast enough for comfortable use on any reasonably modern CPU. | |
That said, I would like it to be as smooth as possible, so it is time to do | |
some SSE optimizations. | |
I determined the bottleneck by profiling with Very Sleepy; the rasterizer | |
spends most of its time calculating the closest point in a stroke to the pixel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In reply to this tweet https://twitter.com/ApoorvaJ/status/649276841505624064 | |
Two things first | |
1) I have no idea how Papaya works. Haven't looked at the code. =) | |
2) A paint app is a simpler problem than an image editor. It's possible that I'm not seeing something | |
So, Milton has infinite undo/redo because every operation is defined declaratively. | |
All it does is apply "strokes". A stroke is either a brush stroke or an eraser stroke. | |
When displaying a drawing, it computes this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's tiny_jpeg as of 2015-10-22, with y flipped for OpenGL data. Refer to issue: https://github.com/serge-rgb/TinyJPEG/issues/3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sgl.h" | |
#include "lambda.h" | |
#include "test_lpp_lambda.h" | |
typedef float (*FloatFunc) (int x, int y); | |
int main() | |
{ | |
// Declare my_func_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sgl.h" | |
#include "lambda.h" | |
#include "test_lpp_lambda.h" | |
typedef int (*IntFunc) (int x, int y); | |
int main() | |
{ | |
void* ptr = lambda(void, empty_function, () {} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not sure if I understood what you meant by "tracking positions", but | |
I'm guessing that you need clarification on how change of coordinates | |
works between screen coordinates and what I call "canvas space". | |
This is how things work as of 1.4.0 (previous versions had a 32 bit | |
canvas instead of 64, but fundamentally it works the same) | |
A milton canvas is a -2^64 X 2^64 image. In that sense, it's not | |
really "infinite", but 64 bits is enough so that no one will ever run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype on | |
filetype plugin on | |
set nocompatible | |
" Setup notes: | |
" (git should be installed) | |
" git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" or (windows): (needs curl script. see vundle site.) | |
" git clone https://github.com/gmarik/Vundle.vim.git %userprofile%/vimfiles/bundle/Vundle.vim |
OlderNewer