HNHacker News
TopNewBestAskShowJobs

gp7

180 karma · joined January 3, 2015

submissionscomments
gp7··on Fourier transform – A math tool used in optics, MP3s, JPEGs and more (2013)
If you forget the complex exponential part of the fourier transform (of which cosine is the real part) and just present it as

F(x) = ∫f(x)g(x)dx

for some arbitrary g, then the short time fourier transform is

F(x, t) = ∫f(x)w(x - t)g(x)dx.

So the mental model is your windowing the function you're taking the transform of. Remember that's just multiplication, so if w(x) is 0 outside of some interval, then so is f(x)w(x), and you use t to slide the window around.

But multiplication is associative, so you could easily think of it as windowing g(x) instead! Windowing the complex exponential gives you a wavelet. Rather than leaving it there, wavelet transforms add a scaling factor as well, giving

F(x, t, s) = ∫f(x)g((x - t)/s)dx

where g is now some 'mother wavelet'. Which could be the complex exponential, windowed or otherwise. If you remember that the complex exponential maps R onto the complex unit circle, with period 2pi, then increasing s increases the period (with respect to x), allowing for larger frequencies, and decreasing s gives you more detail in the frequencies you can see.

So, you'd want a wavelet that lowpasses the signal to avoid aliasing (which you can do by windowing!); and by the nyquist theorem in the discrete case you then need less samples to represent it fully. Taking that idea forward leads you to the whole filterbank thing you see all the time

I think the key thing is that wavelets aren't transforms of one variable, in the discrete case indices, but of three; index, time (location) and scale.

gp7··on Pythagorean Theorem proof in a 2100 year old Chinese book
I think you're being a little unfair to philosophy of science here, bearing in mind how poorly 'Leviathan and the air-pump' was received by actual scientists.
gp7··on JavaScript in Parallel: Web Workers and SharedArrayBuffer
You can just call toString on a function and Blob the string. You have to keep your head straight about the fact that scopes won't transfer (no closures), which is probably why the API doesn't do it for you.
gp7··on Fix the GitHub Dark Menubar
:) First time I saw the new dark menubar was on this repo
gp7··on A letter to the Editorial Board, Journal of Algorithms (2003) [pdf]
Thank you!
gp7··on ‘Abusing’ the C switch statement – beauty is in the eye of the beholder
1) All four versions are O(1)

2) Textually interleaving two implementations is bad no matter what language you're in

3) You could achieve the same effect with gotos without giving anyone a migraine... but it still wouldn't be worth it

gp7··on Ian's Shoelace Site
http://thewirecutter.com/ comes close
gp7··on Programming Is Forgetting: Toward a New Hacker Ethic
Find me an example of a bandlimited finite time signal in the real world, please. _Technically_ the example is correct (although the diagram is not)

Any time you digitise a signal, what information you are willing to lose is the first question you ask. The answer is different depending on the signal and what you need it for. That's what is being brought to attention. Not the fact that all the information in the signal anyone would care to represent is representable.

gp7··on Why I’m thankful for JavaScript fatigue
You misunderstand his point--with a few exceptions, what these frameworks are doing is fundamentally not difficult for someone with practice in the broad base of knowledge that falls under computing science
gp7··on Practice Doesn't Make Perfect
Knowing what good technique is is a bit of a red herring I think--the bugbear of people who aren't that good yet, or the recently-good. I say this because I used to watch out for examples of poor guitar technique and be sort of critical of them but in doing so I noticed something--the moment poor technique got in the way of what they were doing they stopped doing it. Immediately, mid tune, no problem. I've seen this countless times--you can watch someone go from having their thumb on the top of the neck and their pinky on the soundboard and all sorts of little deficiencies and just watch each of them drop away and come back as the music requires it. This kind of malleability in the moment is the common element in the best musicians I think. As a matter of practice you'll certainly waste less time if someone points out poor technique early for you, but beyond the edge cases where poor technique is injurious that's about it (and I'd note, the vast majority of steel string guitar finger-style playing is of the injurious sort, but its just rarely played long and vigorously enough to become so). On the other hand, read this interview with Keith Frazer [1], whose slavish devotion to proper technique has left him irreparably damaged.

The fact is, at a certain level of playing, you stop asking "is this correct technique?" and you start asking, "does this make the music I am playing better? am i bringing attention to what i want to bring out of the piece? does it make it easier to play?" Preoccupation with correct technique as a separate existing thing from external authority becomes a hindrance. You want to learn about your art from those around you, and have them learn from you. If you don't feel ready or capable of being independent in this regard, that's fine. But not everyone is an amateur, and no one claims to ever stop learning, so what are they doing differently?

e: What most interests me about the article is that this comment section is filled entirely with people, like myself, who's opinion on the matter has not been changed one iota by the article

[1] http://www.keithfrazer.com/interview.htm

gp7··on Announcing Quill 1.0
Before the document format was added to sharedb I found it real easy to transform quill deltas into sharejs ops. Sharejs has a fuzzer you can use to test things like that, which was invaluable, but I want to stress how little work it was getting them to talk to each other. It'll be even less now
gp7··on “Baffling” “signal” “from HD 164595” is probably none of the above
I find myself frustrated at researchers who get frustrated at non-researchers being interested at all in their work. It's the same as the hypothetical megastructure; all the news is quite clear: no satisfying explanation is available. That's the news! That's interesting, even to people who decided not to devote their lives to astronomy!

People jump to the alien angle because it's interesting. The few left with that impression that aliens really are involved are likely not going to be dissuaded by more technical reporting

gp7··on Major next steps for fusion energy based on the spherical tokamak design
Please at least have a cursory glance of the history of any of these countries from around WW1 to the present day instead of just assuming things magically came to be the way they were 6 hours before the first gulf war. States are _not_ abstract entities that just sort of float around existing at geographic locations
gp7··on Tabby's star is dimming at an incredible rate
Pretty cool that observed phenomena in space that can't yet be explained gets so much attention in the media. When you step back a bit and stop thinking about aliens
gp7··on A x64 OS #1: UEFI
hue­hue­hue­hue­hue is a wonderful name for a kernel
gp7··on Memory management in C programs (2014)
In my opinion, writing code that consists of malloc/free pairs is inviting all the problems RAII and garbage collectors were designed to solve and which rust can now statically check for correctness. So that's basically it: at this point, I don't use the heap to manage memory in C, because if I did I'd instead use either rust or, more likely, a garbage collected language. The fact is, despite going out of their way to use the stack as much as possible in this article (including copying into the stack), its sort of a wonder they didn't realise a second, manually managed stack would be easy to manage and be orthogonal to the program stack. Yes, it has a top, but so does the program stack, and so does the memory backing the heap (yes, yes, pages, et cetera). It doesn't get you all the way there, but for many small programs, which might otherwise do a lot of mallocing and freeing as it dutifully initializes and destroys objects, you can get away with just one call to malloc, and never pop the second stack. Allocate a few stacks in your stack, throw them in a free list, and now you're cooking with gas
gp7··on 3.5mm audio vs. USB Type-C: the good, bad and the future
The article raises the spectre of DAC-less phones to cut costs but I don't see that ever happening unless the microphone and speaker are removed too, so not implementing it, at least for the foreseeable future where everything still has 3.5mm sockets, seems.. foolhardy. Maybe we'll have worse DACs? I know that in my experience the difference between an acceptable dac and a great dac is not one I can notice with my ears
gp7··on 3.5mm audio vs. USB Type-C: the good, bad and the future
Consider d) phones necessarily require DACs for their speakers so they'll always be able to dump analog signals onto the usb-c pins. All that's needed is an agreement of what to expect from the connector when analogue audio is playing and not fry equipment expecting something else, and best-case scenario all those pins can now be used even for balanced 5.1 audio (there are 6 positive-negative pairs free for alternate use according to wikipedia). So the dreaded adapter, while still unappealing, can be as simple as connecting pins to the correct 3.5mm pins (altho if usb requires some acknowledgment to get to that point it would only require a small finite state machine to achieve, I couldn't say what the impact of that would be on adapter size)

e; it occurs to me i have no idea the different impedance for usb signals and line level, so this could all be hogwash

gp7··on A Nihilist's Guide to Meaning
Disclosure: I'm a big time nihilist and genuinely take questions like "does the morality of an action propagate at the speed of light," seriously which i encourage everyone who understands relatively to at least consider for a brief time

I don't really agree with much in this post, principally because it's preoccupied by personal meaning, for the individual. Often when reading contemporary philosophical texts you come across this idea of neoliberal logic (try searching google for it as a phrase)--it is, I think, 90% of the time, a nonsense idea used to obscure a bad argument, but in this case I think it applies: it's an atomised way of thinking about people and how they relate to the world. You'll note towards the end that the list of examples given of meaningful objects/activities are all entirely social in nature; except perhaps one, a career, a notion very central to our (neoliberal!) age, which hides is social nature under a cloak of economic relationships. The mention of Marx's idea of alienation is therefore funny to me: although one can understand alienation as the ennui of rote labour, you should remember that the idea is rooted too in commodity fetishism. The mistaking of relationships between people as the relationships between commodities. Each of his examples are, in strange way, social "commodities": abstract objects that an individual "has", and whose use-value is defined from its abilities to grant "meaning" to her, and can be "exchanged" between other individuals so that you might benefit from a fulfilling father-son relationship, or between the collaboration between famous artists, or the networking with workers from a prestigious company.

I say: it is the very relationships between people that are the generators of meaning, and (stands up on soapbox, music swells) that all meaning is rooted in social relationships between people, and that for anything to meaning anything whatsoever is necessarily proof of a relationship between you and some other person who may even be hidden from you. Reading an ancient text is a relationship that stretches back before you were even born: it's not an object that exists as a person does but is as real as a mathematical entity, and its understanding as a thing that can be conceived of in it's own right is the only way to build a worthwhile theory of meaning that is not just a handwavey precursor to information theory and problems of interpretation. Meaning is a relationship between people.

For a better treatment on nihilism--which better reckons on the effect science has on philosophy, or more to say the direction philosophy must take in order to be relevant after the ruin science has made of it--I recommend the work of Ray Brassier, altho it is.. very technical. There's a good interview with him here http://www.kronos.org.pl/index.php?23151,896 and in particular the following quote still lights a fire in my timid heart:

> Like Nietzsche, I think nihilism is a consequence of the ‘will to truth’. But unlike Nietzsche, I do not think nihilism culminates in the claim that there is no truth. Nietzsche conflated truth with meaning, and concluded that since the latter is always a result of human artifice, the former is nothing but a matter of convention. However, once truth is dismissed, all that remains is the difference between empowering and disempowering fictions, where ‘life’ is the fundamental source of empowerment and the ultimate arbiter of the difference between life-enhancing and life-depreciating fictions. Since the abandonment of truth undermines the reason for relinquishing illusion, it ends up licensing the concoction of further fictional narratives, the only requirement for which is that they prove to be ‘life-enhancing’.

> I consider myself a nihilist precisely to the extent that I refuse this Nietzschean solution and continue to believe in the difference between truth and falsity, reality and appearance. In other words, I am a nihilist precisely because I still believe in truth, unlike those whose triumph over nihilism is won at the cost of sacrificing truth. I think that it is possible to understand the meaninglessness of existence, and that this capacity to understand meaning as a regional or bounded phenomenon marks a fundamental progress in cognition.

gp7··on 45 years since its creation. The C language still very popular
Encapsulation is done better and is easier to manage in C than it is C++.
gp7··on Apple Stole My Music
wavs having "more samples" is a new one to me. Neat.
gp7··on Performance These Days
Battery life.
gp7··on Apricity OS: A Beautiful Arch Linux Distro
Every time I see a new tiling window manager I get a little thrill of excitement. Then I discover it's identical to every other one, including the one I already use. This isn't a complaint. I'm really happy with how pointless they make constant tweaking and customising
gp7··on Why Musicians Need Philosophy
Very pleased to see Roger Scruton is answering the same question a lecturer of mine once posed as a curveball essay question. I'm not convinced he answers it very well though, it sounds more like "Why musicians need 19th century philosophy," or perhaps, "Why musicians need to return to the past."

To HN: what do you think Harman's object oriented ontology has to offer composers and performers of classical music? Or what about speculative realism? Or effective altruism?

gp7··on Amazon rainforest was home to millions of people before European arrival
With a little digging you can trace back the development of the consenus surrounding this issue over the past 25 years or so, which would probably be worth an article on its own.
gp7··on The Space Doctor’s Big Idea
For a layman's mathematical understanding of relativity I recommend "Why does E=mc^2" by brian cox and jeff forshaw, which explains both the theory and why the equations used to describe the theory, well, describe the theory. It does it all with a nice just-so narrative that builds on physics from galileo all the way through to einstein and ends up at particle physics. It's just a very good book.
gp7··on Why has the quality of brick buildings declined in the last 100 years?
Capital?
gp7··on Emulating Swift's “defer” in C, with Clang or GCC+Blocks
It puts the whole #define code into a single expression so you can do

  if (cond)
    MACRO;
and the macro won't expand incorrectly to

  if (cond)
    foo;
  bar;
I personally just go the anal retentive route and use brackets everywhere.
gp7··on The Greatest Regex Trick Ever (2014)
beautiful url
gp7··on How I came to love Typescript
> My fundamental problem with typed systems is that they force you to know – in advance – the exact format of every incoming data structure you’re going to be working with, which is often impossible.

I am at a loss as to what could have caused this kind of confusion.

← PreviousPage 2 of 3Next →