Hacker Newsnew | past | comments | ask | show | jobs | submit | awef's commentslogin

Would you mind linking said article?


What kind of problems are those? I would love to find problems, ultimately examples, where smart Haskell and c blends are superior to pure c.


It's not neccesarily which language is faster, but the which algorithm is faster. He said naively written C, which mean the algorithm may be entirely different and run in O(n2) and much slower than a Haskell version which use a different algorithm and run in O(nlogn).


actually in the specific example I'm thinking about, i'm talking about memory locality being the performance difference (and in this case, array layout for matrix multiplication).

The naive obvious "dot product" matrix mult of two Row Major matrices is 100-1000x slower than somewhat fancier layouts, or even simply transposing the right hand matrix can make a significant difference, let alone more fancy things.

Often the biggest throughput bottleneck for CPU bound algorithms in a numerical setting is the quality of the memory locality (because the CPU can chew through data faster than you can feed it). Its actually really really hard to get C / C++ to help you write code with suitably fancy layouts that are easy to use.

Amusingly, I also think most auto vectorization approaches to SIMD actually miss the best way to use SIMD registers! I've actually some cute small matrix kernels where by using the AVX SIMD registers as a "L0" cache, I get a 1.5x perf boost!


This is like replacing the compiler optimizer algorithm with your own, similar to the method of writing critical function in Assembly, right?

Still I don't see the connection to Haskell, can you elaborate ?


oh, thats just me rambling about why i don't trust compiler autovectorization :)

well: 1) i've been slowly working on a numerical computing / data analysis substrate for haskell for over a year now.

2) the haskell c ffi is probably the nicest c ffi you'll ever see. Also pretty fast, basically just a known jump/funcall! And no marshaling overhead too!

3) theres a lot of current and pending over the next year work to make it easy to write HPC grade code using haskell. Some approaches involve interesting libs for runtime code gen (the llvm-general lib for haskell is AMAZING).

Theres also a number of ways where ghc haskell will likely get some great performance improvements for numerical code over the next 1-2 years! (i've a few ideas for improving the native code gen / SIMD support over the next year that I hope to experiment with as time permits)


Right, I read 'naively' as 'natively'. Carry on!


to answer your question

just plain ole mathematical modeling / machine learning, and associated duct taping the tubes.

I am also going to be releasing the start of a "Numerical Haskell" tool chain sometime (hopefully this fall, but life happens and all that jazz)


Good idea! Two things:

- Spotlight searches makes it flicker

- Make it narrow for non-native (i.e. not only lion style) full screen aswell. It's awfully disturbing together with full screen iTerm, MacVim etc.

Other than that it's quite neat! I'd rather have it fill than empty though, maybe make that an option? ;)


I'll see what I can do about the flicker; thanks.

I'm not sure I can detect whether another app is non-natively full screened, I'm afraid. I'll give it a poke, but to be honest, working with full screen stuff is a bit difficulty on OS X. The APIs aren't super comprehensive.

Filling up rather than emptying out is a fun idea; I'll add that to the ol' feature request list.


Awesome work! Cheers airblade. One nitpicky thing though, why do you use "_" and not "-" for removed lines? Can't see why you wouldn't want it vertically centered!


Removed lines happen between existing lines, so using an underscore makes it look like that.

Compare:

    25  - def foo():
    26       baz()
With:

    25  _ def foo():
    26       baz()
(Where there used to be a bar() call before baz().) The first version makes it look like the `def foo():` was somehow removed.


Valid point! Can't believe it didn't occur to me ;)


I don't agree, to me he makes a lot of sense. I'd love for the social web to be more focused on the future and activities rather than that of an old photo album capturing the highlights of everyones oh so interesting lives.

I think your response to c) is somewhat over simplified, facebook is definitely not what I want but i still use it until what i actually want comes along and people start using that instead.


I would definitely sign up for a mailing list, +1


Get an email when the book is published: http://eepurl.com/pon-T

Like on Facebook Here: https://www.facebook.com/pages/Maxims/205350249545949

Follow on Twitter here: https://twitter.com/MaximsTheBook


Fix the encoding, add a favicon and change the font from Times and I'd probably use it :)


I've never heard of the term 'rage to master' but I've been told this behaviour is common in people with Aspergers Syndrome. Intense interests which takes priority in life only to be substituted with something else weeks, months or a couple of years down the line.

Maybe you can shed some more light on the 'rage to master' personality trait you're talking about?


Ellen Winner coined the term in the book "Gifted Children: Myths And Realities" --

http://www.amazon.com/gp/product/0465017592/ref=as_li_ss_tl?...

I'm not able to find the definitive research paper on it right now which was titled "The Origins and Ends of Giftedness," but here's one on the trait in the visual arts which should give you an idea --

https://www2.bc.edu/~winner/pdf/talent_in_visual_arts.pdf

Despite the term being catchy/interesting, most of the literature on it is very academic and somewhat dry. It probably makes for poor curiosity reading, but it's supremely valuable to dig through the academic papers if you have the trait yourself or you're a parent/guardian/teacher of someone who does.


Seeing as I have yet to read up on the matter I can't say that I do or do not have the trait myself. But from the little that I've come to understand I'd say it's highly plausible.

I'll continue to look into it, I find awareness of oneself's personality of highest importance and I always strive to learn more about why I do the things I do.


the definitive research paper on it right now which was titled "The Origins and Ends of Giftedness"

It seems this is it http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.110...


You probably should read the document lionhearted linked to:

> Google the term “rage to master” – click around, read some summaries, and then check out a couple academic papers. It will be very worth your time.

I'm not sure if it's related to Aspergers, but I don't think negativity[0] is warranted. Having an intense interest is good by itself; if it keeps for a few months—there you have a startup. =) The only problem is indeed that you have to master it, and not always do conscious attempts help.

[0] Although I might be mistaken and there wasn't any in your reply.


I'll go ahead and do a little research. My comment might've come out a bit blunt but there was no negativity implied. More of a partly sceptical tone as to where the seemingly hip term came from.

I'd love to discuss the good and the bad with the trait itself but I should probably do some reading first to verify that it's the same trait that I'm referring to.


Indeed, I can't say I recall its appearance at all.


I thought of this a few months back, glad to see it being done in such a polished manner! Looking forward to play more levels.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: