How Neurons do Differentiation

0

Nature is simply amazing.

Today I learnt…

…how neural networks (think brains) can do differentiation by using temporal inhibition – i.e. by using a delayed signal. In the figure below, the node α will send a signal to two nodes. One of them – β – will pass on an inhibitory signal of the same strength as its input signal, but with a delay. Thus, when β‘s signal gets sent to the final node, α will at the same time be sending its “next” output signal to the final node.

“Differentiation” by using delayed inhibition. Solid lines indicate excitatory signals and the dotted line an inhibitory signal.

Therefore, the final node will receive two signals: the current output of α and the inverted previous output of α. If the final node sums these together its output will therefore be α‘s current value minus its old value – i.e. positive if α‘s output signal is increasing and negative if it is decreasing. Simple and beautiful!

Game of Life

0

While reading about cellular automata in preparation for an essay it struck me that I have never actually written Conway’s Game of Life. No, really!

To correct this embarrassing fact I quickly wrote a version in Haskell using the GLUT bindings.

Conway's Game of Life

(more…)

Code Reading as a Team Activity

1

I am currently reading “Coders at Work” by Peter Seibel, a really interesting read for a code monkey like me. The book is full of good tips and experiences from actual coders who learnt by doing. Peter Seibel’s questions are really good – no doubt because he himself is a programmer – and all his interview subject have different and interesting stories to tell.

monkey_tutor

(more…)

HsUnixCompat.hs on Debian

2

Just so that a others (hopefully) will be spared the annoying and time-consuming work of tracking down the source of the following error message:

* Missing header file: HsUnixCompat.h

On my Debian system (Debian 5.0.3 – “Lenny”) the missing package was libbsd-dev:

$ cabal unpack unix-compat
Unpacking unix-compat-0.1.2.1…
$ cd unix-compat-0.1.2.1/
$ runhaskell Setup.lhs configure -v3
[…]
/usr/bin/gcc returned ExitFailure 1 with error message:
In file included from include/HsUnixCompat.h:1,
from /tmp/18515.c:1:
/usr/lib/ghc-6.10.4/unix-2.3.2.0/include/HsUnix.h:79:21: error: libutil.h: No such file or directory
$ apt-file search libutil.h
libbsd-dev: /usr/include/libutil.h

Cold Ocean

0



Cold Ocean, originally uploaded by ehamberg.

View from Råkvåg, Norway.

Winter Sun

0



Winter Sun, originally uploaded by ehamberg.

The sun over the Trondheim fjord a really cold day.

December in Trondheim

0



December in Trondheim, originally uploaded by ehamberg.

Sjakk på «Nabon»

0



Chess at “Den gode nabo”, originally uploaded by ehamberg.

Wish: Options for Kate’s Indenting Scripts

1

At the start of Kate’s indenting script for C/C++, the following options are available:

// BEGIN USER CONFIGURATION
var cfgIndentCase = true; // indent ‘case’ and ‘default’ in a switch?
var cfgIndentNamespace = true; // indent after ‘namespace’?
var cfgAutoInsertStar = false; // auto insert ‘*’ in C-comments
var cfgSnapSlash = false; // snap ‘/’ to ‘*/’ in C-comments
var cfgAutoInsertSlashes = false; // auto insert ‘//’ after C++-comments
// END USER CONFIGURATION

To set these options one would first have to actually find the indenting scripts under /usr/share, then copy it to one’s home directory to be able to modify it, and then modify the javascript source. This could – of course – be done in a much better way. In an ideal world options like these should be available in Kate’s settings as check boxes. It should also be possible to have non-boolean options, like choosing a value from a list of possible values for a setting.

I would love to see something like the following:

registerSetting(“Indent ‘case’ and ‘default’ in switch statements”, “cfgIndentCase”,  “boolean”);

produce

☑ Indent ‘case’ and ‘default’ in switch statements

in Kate’s settings.

I don’t have the time myself, but I don’t think it would be very hard, and I’m sure that many people would be a bit happier. Me and the other Kate developers would glady be of assistance. ☺

Kate’s Vi Input Mode — What will KDE 4.4 bring?

24

Please see http://kate-editor.org/kate-vi-mode/ for an updated overview of the Kate VI mode project.

Dear “Katevim” users.  Kate’s Vi Mode is steadily improving and I want to take a moment to tell what’s on the horizon for KDE 4.4. There has been quite a few bugs fixed since 4.3, but some major new features have also been introduced:

(more…)

Go to Top