Boris Nagaev · Home page

Home page of Boris Nagaev (), bnagaev@gmail.com

© 2012-2016 Boris Nagaev

Boris Nagaev ·Home page|About|Contact| |Code|

NPG-explorer 0.5.1 and 0.5.2 released

08 Nov 2015

NPG-explorer is a new tool for nucleotide pangenome construction and analysis of closely related prokaryotic genomes.

was released on Oct 30, 2015.

was released on Nov 08, 2015.

Version 0.5.1 has a focus on bug fixes and a few new developments. Version 0.5.2 fixes bugs of the Windows version.

Read more

Speeding up byte substitution

05 Sep 2015

Let us speed up the following program:

c char translate[256] = {substituion table}; const char* input = "input string"; int len = length of input string; char* output = malloc(len); for (int i = 0; i < len; ++i) { output[i] = translate[input[i]]; }

This code solves many practical problems:

  • ,
  • .
Read more

NPG-explorer 0.5.0 released

16 Jul 2015

NPG-explorer is a new tool for nucleotide pangenome construction and analysis of closely related prokaryotic genomes.

was released on Jul 16, 2015.

This release has a focus on bug fixes and a few new developments.

Read more

NPG-explorer 0.4.0 released

12 Jun 2015

NPG-explorer is a new tool for nucleotide pangenome construction and analysis of closely related prokaryotic genomes.

was released on Jun 12, 2015.

This release has a focus on new developments and a few bug fixes.

Read more

Brainfuck to C translator written in Lua

16 May 2015

Lua code translating to C:

```lua local brainfuckToC_map = { [’>’] = ‘++ptr;’, [’<’] = ‘–ptr;’, [’+’] = ‘++ptr;’, [’-‘] = ‘–ptr;’, [’.’] = ‘putchar(ptr);’, [’,’] = ‘ptr=getchar();’, [’[’] = ‘while (*ptr) {‘, [’]’] = ‘}’, }

local function brainfuckToC(bf_code) local c_code = bf_code:gsub(‘.’, function(op) return brainfuckToC_map[op] or ‘’ end) return c_code end

local PROLOGUE = [[ #include int main() { #define TAPE_SIZE 30000 char array[TAPE_SIZE] = {0}; char *ptr=array; ]]

local EPILOGUE = [[ return 0; } ]]

print(PROLOGUE) for line in io.lines() do print(brainfuckToC(line)) end print(EPILOGUE) ```

This script reads Brainfuck code from stdin and writes corresponding C code to stdout.

Read more
OlderNewer