Theme from Attack on Titan but on a gameboy emulator. 

This was posted 3 days ago. It has 55 notes.

I think I lost it.

I keep looking at code I wrote months ago and it all looks OK. That should never happen. Guess I haven’t learnt anything useful in ages.

Finding good books is important. I’m about 80% of the way through SICP and Build Your Own Lisp, trying to read Purely Functional Data Structures and Knuth’s Empricial Study of FORTRAN Programs. Last week I read Apprenticeship Patterns and More Programming Pearls, and I’ve had Seven Languages in Seven Weeks on the go for ages, though I did all of the Clojure section last weekend. (Nice language btw. I’m thinking of moving to it for all my Processing sketches). Keep meaning to read Spivak’s Calculus and something about category theory.

But somehow I still don’t feel like I’m learning anything. Like I’m writing better code. My job’s all plain C++ and Python, and none of it’s beautiful. And I’m just getting less creative and more boring.

Am I reading the wrong things? Should I be doing stuff instead of reading? Does anyone have any good ideas for gifs? Because I sure don’t.

Someone tell me everything will be OK please.

This was posted 6 days ago. It has 15 notes.

My phone finally arrived this week, and the camera has a snazzy hdr mode. Yesterday I decided to take advantage of my newfound picture-taking ability, by venturing outside and walking from Sacré Coeur to the Eiffel Tower. More photos here.

This was posted 1 week ago. It has 20 notes.

True story:

When I was in sixth form, I went to a party. Someone tried to hug me but I don’t really like human contact so the hug effort failed. On a later date they made me a cake with ‘sorry for touching you’ written on it. They took it along to another party, which I wasn’t at, because I was studying or didn’t feel like it or because no-one let me know it was happening. I found out about it maybe two weeks later and it is a source of sorrow to this day that I never witnessed the ‘sorry for touching you’ cake in all its glory.

This was posted 2 weeks ago. It has 22 notes.

sometimes I write silly theme songs for my friends so that they have an incentive to keep being my friends

the image was the first google result for ‘productive man’

I’m sorry

This was posted 2 weeks ago. It has 10 notes.
This was posted 2 weeks ago. It has 69 notes.
updating my CV for when my placement ends

updating my CV for when my placement ends

This was posted 3 weeks ago. It has 28 notes.

Sketches for my current project.

This was posted 3 weeks ago. It has 68 notes.
I beat it!

I beat it!

This was posted 3 weeks ago. It has 29 notes.




I’m assuming yes, but does this look like it’d be a kosher use of malloc and free?

MyClass** stuff;
stuff = (MyClass**)malloc( sizeof(MyClass*) * 8 );

stuff[0] = new MyClass(...);
// etc.

// do things with stuff

free( stuff );
stuff = nullptr;

You still need to walk through stuff and delete stuff[n] (with delete rather than free). Why not just do stuff = new MyClass[8] … delete [] stuff?

Short answer: because I’m a butt.

Long answer: this is for a quad tree, more specifically the pointer to the divisions. I’m basically just doing a direct port of my C# code, and I didn’t know how to check if an array of pointers had been initialized yet so I figured the most direct way would be to use malloc and free (without using a separate variable to keep check of that) so I could just compare against 0/NULL/nullptr. Visual Studio told me I couldn’t assign the nullptr value to an array, which was when I decided to use this way.

I’m going to leap in with a few points here:

  1. This is C++, so use C++ idioms - try not to resort to malloc if possible. You can use ‘new’ to allocate an array of pointers like this: MyClass** stuff = new MyClass*[8]; That way you don’t have to cast the pointer, and each pointer will be NULL’d out already.
  2. That being said, if you have to use a Cism, use calloc instead. You get a nicer syntax, and your pointers will be NULL’d for you. Malloc really doesn’t guarantee that much about the state of the returned array, so the pointer values will initially be undefined rather than NULL.
  3. Typically you use malloc to init a really big or an unknown (at compile-time) amount of memory. In this case neither of those are issues - why not use a std::array<MyClass *, 8>? Admittedly, the pointer values won’t be NULL’d for you, but you do get automatic (and templated, so probably optimised a bit) memory management and some helpful member functions. You could even write a small subclass of std::array<MyClass *, 8> that just defines a new constructor to NULL out the array contents.
This was posted 4 weeks ago. It has 14 notes.

9999bc asked: love your work! what are you in paris for and where are you from originally?

Thank you! Your animations are super cool too… and your blog! Those animated rollovers are the best!

I’m on a placement year for my Uni course, working at IRCAM. It’s fun - I get to spend most of my time programming audio software, which I enjoy. I don’t speak the language though, so currently my life is even more rife with awkward moments than usual…

I’m originally from the south of England, but my university is up north.

This was posted 1 month ago. It has 2 notes.

Sans Form do t-shirts the same way I would do t-shirts if I were any good at design :3

This was posted 1 month ago. It has 10 notes.

Today I discovered that on OS X, dynamic libraries have a name, like most files. But they also have an ‘install name’ which you can find with the install_name_tool.

The install name can be a filepath. Which means, if you link your executable against a library in one location, that library may use its install name to redirect the link to a completely unrelated location on your drive. Lovely. I guess it could have its uses, but it got me super confused for a while today.

This was posted 1 month ago. It has 3 notes.

(Source: SoundCloud / Reuben_Thomas_)

This was posted 1 month ago. It has 18 notes.

In lieu of actual interesting stuff, I’ll post a life update instead.

I realised that 7 months in a foreign country without a phone is probably enough, so I bought a new one. I’ll try to actually carry this one around like a normal person. Maybe people will even try to contact me on it. Who knows.

The new phone has a camera, so I’ll try to venture out and make sure there’s some photographic evidence of my stay in Paris. It would be a shame to get home and to not have a single cheesy photo of the Eiffel Tower.

Work’s going well, I think. I’ve been writing fairly low-level C and C++ stuff, and mucking around with build systems. It’s fun when it works, but that happens less often than I’d like. Recently I finished my ongoing projects, so I get a couple of new ones now. Exciting!

I’m also trying to learn Lisp. I’m halfway through chapter 2 of SICP, doing most of the exercises. Today I built a system with polymorphic functions, for manipulating different representations of polynomial expressions. I’m beginning to see how powerful Lisp can be, but I think that’s also a weakness. With so many ways to express yourself, you have to say a lot more before you start making sense. Well, that’s how it seems so far. I’m probably missing all the zen. I have been using DrRacket, but the GUI seems to be really hefty, and probably overkill, so I just downloaded and compiled Gambit. Command-line tools for the win.

I still have a few ideas for the rayverb tools, but I’m probably going to leave them for now. I’d like to continue working on the project as part of my final-year university project, so I need to leave some stuff to work on…

In terms of other projects, I’m working on an ongoing collab with an artist and musician from Huddersfield, and I keep meaning to make more gifs and music. I’m finding it really tricky though, and I think I may have a more generalised form of writers’ block. Hope it goes away soon.

Also thinking about learning modern openGL. I’d like to make an iOS app as part of the collab, but newer iOS version only seem to support the new openGL API, which means I have a lot of reading and keyboard-bashing to do.

15 weeks left in Paris.

This was posted 1 month ago. It has 13 notes.