Readit News logoReadit News
_fbpt commented on The Polygons of Another World: Atari Jaguar   fabiensanglard.net/anothe... · Posted by u/masklinn
_fbpt · 5 years ago
The URL links to the #back_1 anchor/id and ends up half a page down.
_fbpt commented on Building Spectro: a Real-Time WebGL audio spectrogram visualizer   github.com/calebj0seph/sp... · Posted by u/shakes
Lichtso · 5 years ago
The signal will continue over the seam between two windows, meaning you will cut the wave in the signal "in half". Mathematically, waves are always infinite and to cut them you would actually introduce overtones (higher frequencies) to model the sharp end / start of the base wave. These then result in artifacts regardless of what method is used for the transformation (Fourier or Wavelet).
_fbpt · 5 years ago
> The signal will continue over the seam between two windows, meaning you will cut the wave in the signal "in half".

You can window the wavelet, then slide the finite-duration wavelet by a few samples at a time, even if the wavelet is hundreds to thousands of samples long. This is possible in STFT as well (each part of the original signal shows up in many separate FFTs).

Again, I don't know the implementation details of wavelet transforms. Maybe I'll look into your repo when I have time. What's your asymptotic and practical runtime?

_fbpt commented on Building Spectro: a Real-Time WebGL audio spectrogram visualizer   github.com/calebj0seph/sp... · Posted by u/shakes
Lichtso · 6 years ago
Yes, but then you are back at time-windows, a window-function, overlap and artifacts, which is defeating the purpose.
_fbpt · 5 years ago
I'm more familiar with Fourier transforms and have limited experience with wavelets. But if each wavelet intrinsically falls off at a Gaussian curve, cutting it off (possibly with a window) at 3-4 sigmas won't change the wavelet substantially. Maybe for some use cases, the wavelet will be narrower at high frequencies (short delay), and wider at low frequencies (high delay). I don't know how you'd perform incremental updates of a plot drawn with non-uniform delays though...
_fbpt commented on Building Spectro: a Real-Time WebGL audio spectrogram visualizer   github.com/calebj0seph/sp... · Posted by u/shakes
Lichtso · 6 years ago
Also try using the Wavelet-Transform instead of short time FFT (with overlapping windows).

It is easier to configure (less parameters, there is no need for a window function), offers more flexibility (exponential frequency band; e.g. for music scales) and can reach the Gabor-Heisenberg uncertainty limit without artifacts.

The only downside is that you need to know the entire signal in advance, so it can only be used for recordings.

Shameless self-promo of my implementation: https://github.com/Lichtso/CCWT

_fbpt · 6 years ago
Your repo and tutorial are really cool! But do you have any sort of interactive "out-of-the-box" demo that doesn't require me to write code to call the library (online or downloadable)?
_fbpt commented on Clojure: A Lisp that wants to spread   simongray.github.io/essay... · Posted by u/simonpure
rubyn00bie · 6 years ago
For anyone else wondering, "holy crap, WTF does -client do?" here you go: https://stackoverflow.com/a/198651/931209

And to save folks a click:

> The Client VM compiler does not try to execute many of the more complex optimizations performed by the compiler in the Server VM, but in exchange, it requires less time to analyze and compile a piece of code. This means the Client VM can start up faster and requires a smaller memory footprint.

There's literally so many just insane things about the JVM and its variants, I totally get why some folks are like "JAVA OR DEATH." I just wish I had started learning it 20 years ago, like a lot of 'em, so it wasn't such a gigantic wall of pedantic knowledge to acquire.

_fbpt · 6 years ago
> A 64-bit capable JDK currently ignores this option and instead uses the Java Hotspot Server VM.
_fbpt commented on Show HN: A first project in Rust – in-memory order book   github.com/connorwstein/e... · Posted by u/cstein2
roblabla · 6 years ago
A string works. If a numerical/in-place representation is wanted for efficiency, you could rely on the fact that stock symbols are always less than 8 characters, so we can parse it into an array of 8 bytes.
_fbpt · 6 years ago
Is wrapping a String in a semi-opaque newtype (or a type alias at least) good to encode the semantic meaning of the string type?
_fbpt commented on Move, simply   herbsutter.com/2020/02/17... · Posted by u/davidmckenna
unlinked_dll · 6 years ago
>So, what do you propose std::move<int> should do?

Just copy Rust. Trivially copyable types aren't invalidated by moves, and "move" just aliases copy.

_fbpt · 6 years ago
Is the intention of std::move<unique_ptr> that the "moved-from" pointer no longer has its destructor run?

What if you move a unique_ptr from a std::vector? You don't know which elements of the vector need to have their destructors run.

I think Rust unconditionally doesn't run the destructor of a moved-from Box, but uses drop flags for "maybe-moved-from" local variables, and doesn't allow maybe-moved-from Vec elements.

_fbpt commented on SciPy 1.0: fundamental algorithms for scientific computing in Python   nature.com/articles/s4159... · Posted by u/Anon84
enriquto · 6 years ago
> (...) In the best possible way.

I do not see it that way. A whole generation of students is growing with the wrong impression that writing a "for" loop is inevitably inefficient. Also, they believe that it is OK for large arrays of numbers not to be a core language construct, requiring an external library like numpy. These two incorrect beliefs are incredibly damaging in my view.

In a sane programming environment (e.g., with jit compilation), writing a matrix product using three loops should be just as efficient than calling a matrix product routine. The matrix product should also be rightly available without need to "import" anything.

_fbpt · 6 years ago
I agree with your comment to some extent. I'm kinda allergic to writing loops, even in C++ where it's the best solution.

On the other hand, in C++, hand-rolled matrix multiplication is both slower and an order of magnitude less accurate than MKL (or possibly OpenBLAS too).

_fbpt commented on The Shadow Inc. app that failed in Iowa last night   vice.com/en_ca/article/y3... · Posted by u/kitrose
abetlen · 6 years ago
This Motherboard article has more details on the app including screenshots https://www.vice.com/en_ca/article/y3m33x/heres-the-shadow-i...

My favorite screenshot is the last one, it looks like a generic mobile Firefox error for a misspecified URL.

_fbpt · 6 years ago
In particular it looks like Firefox Fenix/Preview (or possibly Reference Browser), not Fennec (regular Android). Only Fenix and Reference have bottom URL/tab bars. Fenix has a purple "Try Again" button, I don't know about Reference Browser, and Fennec has a gray button.

One possible issue is that Fennec/Fenix doesn't open http URLs in external apps by default (unsure about custom protocols), whereas Chrome does.

_fbpt commented on Why Discord is switching from Go to Rust   blog.discordapp.com/why-d... · Posted by u/Sikul
oconnor663 · 6 years ago
There are two things you'd have to do at the same time that make this complicated:

- You'd have to ensure that your large data structure gets allocated entirely within the special region. That's simple enough if all you have is a big array, but it gets more complicated if you've got something like a map of strings. Each map cell and each string would need to get allocated in the special region, and all of the types involved would need new APIs to make that happen.

- You'd have to ensure that data structures in your special region never hold references to anything outside. Since the whole point of the region is that the GC doesn't scan it, nothing in the region will be able to keep anything outside the region alive. Any external references could easily become dangling pointers to freed memory, which is the sort of security vulnerability that GC itself was designed to prevent.

All of this is doable in theory, but it's sufficiently difficult, and it comes with sufficiently many downsides, that it makes more sense for a project with these performance needs to just use C or Rust or something.

_fbpt · 6 years ago
Both of these requirements kinda remind me of Microsoft's Verona language.

u/_fbpt

KarmaCake day221August 6, 2018View Original