Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,496 karma · joined Feb 1, 2017 (9y ago) · 2,551 submissions

Submissions

comment 6y ago · link · parent

What's great about "not so great about Golang" posts:

- it's the exact same 4-6 criticisms every single time

- "no generics" is on the chopping block

comment 6y ago · link · parent

I concur. It's not just gofmt (although it is great). With go and an IDE, I can drill straight down and basically hit "bottom of the stack" within <5-7 jumps of "jump to definition" (C-b for me). Python it's like layer on layer on layer of indirection, "clever" code everywhere, and frequently the track runs cold. I don't have to sit there and study some inscrutable nugget for minutes/hours cause it's all obvious.

Not sure if it's the language, culture, or both, but I love it.

comment 6y ago · link · parent

Signal to noise, mate. This isn't like chat with coworkers over lunch, "have you taken thermal expansion of the turboencabulator into account?" where there's a high potential for novelty. Nay, 90% of these comments are:

Did you try (increasing exercise/water intake/sleep/just not sucking)? How about (decreasing gluten/carbs/aspartame/"toxins"/bogons)? it's just low-hanging fruit.

comment 6y ago · link · parent

This is most decidedly not lame! I'm sitting there looking at the code poem trying to figure out how the sound happens, it looks like it's just writing bytes to a file. I figured there was some driver or something but "sound driver from file" is not super googleable.

aplay was the missing link.

comment 6y ago · link · parent

> comma pump

Well this is a fun rabbit hole!

https://en.xen.wiki/w/Comma_pump

comment 6y ago · link · parent

Can confirm. All I see are [X]'s.

𝐔𝐧𝐢𝐜𝐨𝐝𝐞 𝐡𝐚𝐬 𝐜𝐡𝐚𝐫𝐚𝐜𝐭𝐞𝐫𝐬 𝐭𝐡𝐚𝐭 𝐥𝐨𝐨𝐤 𝐬𝐢𝐦𝐢𝐥𝐚𝐫 𝐭𝐨 𝐟𝐨𝐫𝐦𝐚𝐭𝐭𝐞𝐝 𝐭𝐞𝐱𝐭.

I'm curious if that copied the text or the placeholders. It's like hunter2 for the modern era.

comment 6y ago · link · parent

That's one of the effects we model in fact, "social media laundering" is the term of art.

Various detectors are more or less thwarted by it. It actually surprised me how strong the artifacts from some GANs are - they can survive several passes of re-encoding, but accuracy does suffer.

But I still need the raw 720/1080 stream for training.

comment 6y ago · link · parent

> In an era of fakes and deepfakes, we need tools like youtube-dl more than ever.

I've been working on deepfake detection for the past two years. I use pytube3 and youtube-dl to scrape hours and hours of footage, not just youtube, but cspan, news sites, anything I can get my hands on. I have ~100 hours pulled so far, at multiple encoding rates.

Facebook recently changed their API and now the best I can scrape easily is 240p. That's insufficient to detect the artifacts the models need to train on. I can only pull 1/3rd of cspan videos I can watch through the viewer because again, api changes. It's a constant cat and mouse.

I'm not exaggerating when I say that if I don't have those wonderful folks out there keeping these tools and test suites up-to-date, this project is massively disadvantaged.

I don't have any public release assets at the moment, but you can read about Siwei Lyu and Hany Farid, who are leading the charge in deepfake detection.

http://www.cs.albany.edu/~lsw/

https://futurism.com/expert-online-disinfo-covid-black-lives...

comment 6y ago · link · parent

This, along with screen capture, is known as a form of rebroadcast and it's used to obscure and obfuscate digital alterations, watermarks, deepfake artifacts and the like. When doing media forensics, it's optimal to get as close to the raw source as possible.

comment 6y ago · link · parent

Symbols for Legacy Computing (Range: 1FB00–1FBFF) would be a helpful block to look at as a possible optional even-higher-fidelity mode. Has all kinds of slopes that you could better approximate edges with.

You could probably solve for it efficiently by computing a small Histogram of Oriented Gradients block, say 3x3, and use that as a hashmap key. Or Sobel filters might be even easier.

comment 6y ago · link · parent

I find this really useful! I seem to frequently run into dns weirdness. Does it work internally e.g. diagnosing dns queries on a local net?

comment 6y ago · link · parent

First, reproducibility is a spectrum, from a simple recipe to run `make` and get a byte-for-byte reproduction.

A cookie recipe is reproducible - follow these steps and get tasty cookies. But will they be the tastiest cookies? For that, you need more detail, but the write-ups almost never have the full story.

Having put dozens of academic ML algos into production, anything short of `make reproduce` which bare minimum gives you a table of results on some validation subset, is merely reproducible-ish. Not having vcs cause it's "hard" is straight-up slacking (use svn if git is too hard).

comment 6y ago · link · parent

> How this Christmas gift was ever given to the RIAA is mind blowing.

$$$.

I think this is a part of a bigger issue. 1st amendment protects citizens from government censorship. DMCA creates a loophole where the govt isn't deciding what to censor, they are merely enforcing compliance of what a corporation wants to censor, sidestepping any 1A defense.

This means ultimately either platforms arbitrate, or the receiving party has to sue, either way it's chilling.

comment 6y ago · link · parent

Seems to me like you could ddos a repo this way, though I guess that would be true of any pr spamming?

comment 6y ago · link · parent

So why can't we crowdsource some Youtube partners that are willing to allow their copyright to be used, while still utilizing the obfuscation?

Or are we talking a sweetheart deal only available to specific parnters ?coughvevocough

comment 6y ago · link · parent

There's nothing fancy in youtube-dl. It's just a bunch of ad-hoc scripts maintained by folks which make it convenient to route the api responses to files on disks. Literally things like pulling html and regexing for certain snippets. In fact it supports many video services, cspan for one. It just dispatches to the appropriate scraper based on the endpoint.

comment 6y ago · link · parent

I've gobbled hours of Cspan videos with youtube-dl. Turns out cspan is a hodgepodge of like 3-5 video hosting and codec schemes, but it is able to pull about a 3rd of them no problem.

Definitely forking it, I need this to continue my research.

comment 6y ago · link · parent

Former chemist, yeah this always bugs me. Laypeople use "plastic" to refer to mostly inexpensive injection molded parts, but it really includes everything from LDPE bags to glass fibre reinforced nylon powertools to Rayon fibers to thermoplastic elastomers.

comment 6y ago · link · parent

Have you tried xonsh? It's lovely. If you have python, you can install xonsh. It's packaged in apt, brew, conda, and probably more.

It's pretty seamless to flow from bashlike pipelines to pythonic imports and functions.

Autocomplete out of the box is better than bash, comparable to fish or ipython.

https://xon.sh/

comment 6y ago · link · parent

So what's the next step? Elsewhere in this thread, picoseconds were mentioned and that seems plausibly useful, so that's 10 bits. And it would be nice to avoid "year xyz" problems, so maybe we could have a coding region of say 2 bits to encode 4 overlapping epochs to allow rolling updates. That seems to imply at least a 10-byte or 12-byte time.

I don't see any way in which that could easily fit with POSIX time types, unless you keep the existing 32-bit time_t and tv_nsecs fields and tack on two 16-bit fields for extending precision in either direction. But ISO C allows time_t to be a floating point number, which opens a few doors.

What about UTF-8 style variable length times? Would that be too messy?

Edit: looks like most 64-bit OSes are already or are switching to 64-bit time_t. So that solves half the problem, but no picoseconds just yet. I guess that's what int64 or float64/80 is for.

comment 6y ago · link · parent

I dunno how you folks do it, but I admire anyone that can stick with JS. It's just so...bonkers, every aspect about it, from the obvious "wat" moments, lack of integers, to the mental overhead of libs, modules, frameworks, templates, and packing. But I'm glad I have coworkers that grok it.

I like trying new languages and have played with dozens, and JS and Prolog are the only languages that have made me actually scream.

You should definitely try to branch out. At the very least it gives you new ways of thinking about things.

Go or dart is probably the best for "JS killer" in terms of maturity, tooling, and targeting the front end, followed by haxe, swift and/or rust (they may be better even, but frankly I'm not as familiar with them).

comment 6y ago · link · parent

I thought the same thing and most certainly slow way the heck down while trying to figure out what the heck I just saw. I'd probably presume it was some sort of programmable temporary signage on the fritz and treat it like a traffic light with the lights out.

comment 6y ago · link · parent

Conceptually, I think this makes sense. People already bend Python into horrendous DSL-esque abominations using the flexibility already afforded. Macros might allow for these contortions to be more principled and vettable.

OTOH, I am not keen on this opening the door to even more stuff newbies have to learn, especially in the ML domain, where you just know people will use macros to do all manner of "clever tricks".

This proposal also seems too limited to truly enable the kind of performance speedups numerical Pythonistas really want.

The ! notation feels icky and "un-python" to me. Maybe that's just (lack of) mere exposure effect.

What I want instead: improve/stabilize tools and CPython hooks for decompiling, code generation, AST manipulation, and the like. When I can go source -> AST -> source with confidence, maybe lets revisit macros.

comment 6y ago · link · parent

I can readily imagine some cross-discipline techniques achieving this. A little lithography, some selective dissolution like Gorilla glass, perhaps some tricks from the optical fiber industry, and bam, you have a fine coaxial filament which creates a region of 100's-of -MPa stress along the length of the fiber. Maybe even GPa, though that's tensile-strength-of-nanotubes territory.

Certainly it's years away but I dunno...This feels possible in an engineering sense.

comment 6y ago · link · parent

Huh, TIL. I'll give that a try. Usually, that's the least of my problems. In my line of work, I'm often doing things which would likely horrify most webapp devs, like building a container with multiple conda envs in it. OTOH, most of these containers run on airgapped systems with petabytes of storage, so shipping a bit of bloat barely hurts the end user. But every time I do, I die a bit on the inside.

comment 6y ago · link · parent

Apt update just updates the cache of the package lists - /var/lib/apt/lists/ - based on your lists - /etc/apt/sources.list.d/. "upgrade" actually upgrades the code on the system.

`rm -rf /var/lib/apt/lists/*` in the same RUN decreases bloat and I think possibly decreases cache misses as well.

comment 6y ago · link · parent

The sugar in American bread is ostensibly to allow yeast to ferment quicker than they would on flour alone, to impart bread-y flavors, not for sweetness. This shortens processing time.

comment 6y ago · link · parent

Totally agree. Apple has often been one to change things in a way that makes the tech crowd moan. The winning situation is dump lightning and switch the iPhone to usb C - just like they did with the iPad.

comment 6y ago · link · parent

I had basically this exact discussion with a coworker. I said something offhand that I rarely consider big O, beyond avoiding obviously inefficient patterns; they replied they basically are always considering big O. Personally, that strikes me as premature optimization. My priorities are generally:

1. Solve the problem.

2. Ensure correctness of that solution

3. The code is easy to reason about

4. The app is robust

5. "good enough" performance

6. Performance tuning

Which is of course the "correct answer", and of course in practice these all blend together I will emphasize any number of those at a given time (who doesn't love spending an occasional afternoon just chasing pointless benchmarks?). But I never come at it from a "big O mindset" even when that's what I'm doing in practice, I just call it "common sense" and heuristics: don't put slow things in tight loops, memoize when you can, and leverage concurrency.

In my line of work (CV), moving a slow blocking operation from serial to async will get you easy, bigger wins 90% of the time, vs seeking out something in polytime and refactoring to nlogn.

comment 6y ago · link · parent

I've started using it to replace bash for automated testing. It's easy to add since I'm already installing pytest et al in the container/env. Makes it easy to test situations where I have some python program interacting with other programs thru pipes and such.
1
676869
86