Showing posts with label post-hardcore. Show all posts
Showing posts with label post-hardcore. Show all posts

Thursday, May 20, 2010

Project Euler | Problem 1

Okay, so I'm going to try and learn some more languages, and improve my knowledge of those I already know. I'm going to keep a log of the code I write on this blog. I'll try and write the solution in as many languages as possible. Plus, maybe the fact that everyone can read my ugly code means I'll try and write things in a nicer way. This post-series is mostly just personal; I don't expect people to read this.

Anyway, lets get started with Problem 1. Of course, the basic solution is simple: walk over the numbers between 0 and 1000, check whether 3 or 5 divides it, add them to the sum. I figured I could play with some efficiency, but it turned out (clicky) that there is simply an x86 operator that does the modular operation, so there's not a whole lot to speed up here. Here's what I did in C:
#include 
int main(){
int i = 0;
int sum=0;
while (i<1000){
if ((i%3==0) | (i%5==0)){
sum+=i;
}
i++;
}
printf("%d\n",sum);
}

I'm kind of bothered by the fact that I need the include. But anyway, you can also do this without a division if you really want it. it's easiest to demonstrate with python:
rresult=0
for i in range(999,0,-3):
result+=i

for i in range(995,0,-5):
result+=i

for i in range(15,1000,15):
result-=i
print result

Of course, these numbers are pretty boring. I tried to scale things up a bit, so I modified the C code to use longs for the sum and had both go up to 1 000 000. Using memtime (a little tool to record time and used memory for whatever you feed it), I recorded the time each took. As expected, python is way slower:
namnatulco@namnatulco-desktop:~/codestuff$ memtime ./a.out
233333166668
Exit [0]
0.01 user, 0.00 system, 0.10 elapsed -- Max VSize = 1616KB, Max RSS = 56KB
namnatulco@namnatulco-desktop:~/codestuff$ memtime python test.py
233333166668
Exit [0]
0.27 user, 0.00 system, 0.40 elapsed -- Max VSize = 12472KB, Max RSS = 8544KB

However, if I change the python code to match what the C code does, this happens:
namnatulco@namnatulco-desktop:~/codestuff$ memtime python test.py
233333166668
Exit [0]
0.74 user, 0.00 system, 0.80 elapsed -- Max VSize = 7212KB, Max RSS = 3312KB

Surprising? Perhaps at first, yes. But if you know a little bit about python, you'll know it has a lot of C in the background. Looks like even though the range() function takes a large amount of memory, it's way faster than manual computation.

So that's it. Enough toying with code; go listen to this magnificent post-hardcore album:
Lungfish - The Unanimous Hour
There's a sample track (Vulgar Theories) for listening on the dischord website (take note: flash).

Tuesday, July 28, 2009

hip hop

Finally, time for a new post.

I ordered some hip hop goodies this weekend:
Dälek - Absence
This one I haven't heard at all yet. Abandoned Language was so good this has to be worth it, though.
Gnarls Barkley - St. Elsewhere
An album I've liked for some time, and this one was with a DVD for the same price! I wonder what's actually on it though. Not sure I got the right RYM link for this.
Rites of Spring - End on End
The last album I ordered. Not hip hop at all, but just posting it for the record. This album is fucking amazing and I recommend it to any fan of (hardcore) punk. It's basically where emo began. Go google it.


Also, I gave MF DOOM's projects another listen because I got so excited buying the above:
Madvillainy cover
Madvillain is a project by MF DOOM (rapping) and Madlib (producer). They've got short tracks, with some rather unusal sounds and voice samples. But not nearly as much comic/villain notions and references as does the following album.
The Mouse and the Mask cover
DangerDoom is a collaboration between Danger Mouse (who also did production in Gnarls Barkley) and MF DOOM. They've got a truckload of funny lyrics, with enjoyable beats.

Go and find those albums, too.

Sunday, July 19, 2009

Free (and good!) music post

Hey folks,

I had my harddrive break down yesterday, so I couldn't make any posts I wanted to make. Instead, I'll post a good bunch of free music now. These are all bands I've known for a while and think you should totally hear.

We'll start off with the Russian post-hardcore band called .crrust.
.crrust - You Came for the Everest, You'll Find Your Way Dead
Their album, You Came for the Everest, You'll Find Your Way Dead is up for free download on last.fm. The music is rather chaotic for post-hardcore, but I personally don't mind that (I've had a long love for grindcore).

Next up is the now-disbanded Hungarian band Gire. They play metal which I find hard to classify. It certainly has black metal influences, but it feels more like tharshy industrial metal. Make sure to check them out if you like rawer metal. here is their audio downloads page. The second demo, Energire, is amazing.
Gire - Energire
It has keyboards, but also has some of the rawest guitar sounds I've heard. I think they're pretty unique with this sound: I have yet to hear anything like it (feel free to let me know if you don't agree!).

Next up is something completely different: gay against you. It's glitchy, poppy, and hilarious chiptune stuff. Just go listen to it, their self-titled EP is right here.
Gay Against You - Gay Against You

And back to Russian hardcore we go: Follow the White Rabbit. Don't let the first track of their EP fool you: they play loud, chaotic mathcore. And they play it well.
Follow the White Rabbit - Follow the White Rabbit
Get it right here.

Tuesday, July 7, 2009

Kehlvin - The Mountain Daylight Time

Time for yet another metal (well, metal related) post!

This time, Kehlvin is the name. Kehlvin is a Swiss band that consists of five members. They formed in 1999 as Loaf A. They have released one album (this one), one EP (Holy Cancer) and a split with a band called Rorcal.
Anyway, lets move on to the album:
Kehlvin - The Mountain Daylight Time

On this album, they play a mixture of post-hardcore, sludgy goodness and a strong atmosphere. Before we get in to yet another debate about what (atmospheric) sludge/sludge metal is: I use it in the sense of hardcore fused with doom metal. I use it for this band, along with similar-sounding bands like Neurosis and Mouth of the Architect (and if you like those, you should definitely check this one out too). If you think I'm wrong, feel free to enlighten me.
The album has few flaws, but no real high-point, either. It's (atmospheric) sludge done well, that's for sure. Another big plus is that the whole thing is that you can stream most of it from last.fm here. Unfortunately, they inherited one trait that is rather annoying: a lengthy silence in the last track. Apart from that, the album isn't really memorable (which could be good or bad- that depends on you).

To conclude, check these guys out if you enjoy Neurosis, Mouth of the Architect and that sort of thing. Before I forget, here you can get the album.

If you liked this, you'll probably like the Dutch band Izah too, which has a free EP on their site. The now-disbanded band Transmission0 might also be relevant to your interests. This link will stream their album Memory of a Dream in your last.fm player.

Info:
MySpace
Last.fm
Official site (rather dead)
The album on RYM

Thanks to:
GoodNoisyCore, the blog that published this stuff too (see here).