Readit News logoReadit News
Cervisia commented on Optimizing Top K in Postgres   paradedb.com/blog/optimiz... · Posted by u/philippemnoel
jmgimeno · 5 days ago
Maybe I'm wrong, but for this query:

SELECT * FROM benchmark_logs WHERE severity < 3 ORDER BY timestamp DESC LIMIT 10;

this index

CREATE INDEX ON benchmark_logs (severity, timestamp);

cannot be used as proposed: "Postgres can jump directly to the portion of the tree matching severity < 3 and then walk the timestamps in descending order to get the top K rows."

Postgres with this index can walk to a part of the tree with severity < 3, but timestamps are sorted only for the same severity.

Cervisia · 5 days ago
The SQLite documentation explains how (and how well) this works: https://www.sqlite.org/optoverview.html#the_skip_scan_optimi...
Cervisia commented on AI scrapers request commented scripts   cryptography.dog/blog/AI-... · Posted by u/ColinWright
jraph · 4 months ago
When I open an HTTP server to the public web, I expect and welcome GET requests in general.

However,

(1) there's a difference between (a) a regular user browsing my websites and (b) robots DDoSing them. It was never okay to hammer a webserver. This is not new, and it's for this reason that curl has had options to throttle repeated requests to servers forever. In real life, there are many instances of things being offered for free, it's usually not okay to take it all. Yes, this would be abuse. And no, the correct answer to such a situation would not be "but it was free, don't offer it for free if you don't want it to be taken for free". Same thing here.

(2) there's a difference between (a) a regular user reading my website or even copying and redistributing my content as long as the license of this work / the fair use or related laws are respected, and (b) a robot counterfeiting it (yeah, I agree with another commenter, theft is not the right word, let's call a spade a spade)

(3) well-behaved robots are expected to respect robots.txt. This is not the law, this is about being respectful. It is only fair bad-behaved robots get called out.

Well behaved robots do not usually use millions of residential IPs through shady apps to "Perform a get request to an open HTTP server".

Cervisia · 4 months ago
> robots.txt. This is not the law

In Germany, it is the law. § 44b UrhG says (translated):

(1) Text and data mining is the automated analysis of one or more digital or digitized works to obtain information, in particular about patterns, trends, and correlations.

(2) Reproductions of lawfully accessible works for text and data mining are permitted. These reproductions must be deleted when they are no longer needed for text and data mining.

(3) Uses pursuant to paragraph 2, sentence 1, are only permitted if the rights holder has not reserved these rights. A reservation of rights for works accessible online is only effective if it is in machine-readable form.

Cervisia commented on How Not to Buy a SSD   andrei.xyz/post/how-not-t... · Posted by u/speckx
lelele · 7 months ago
> I usually buy second hand enterprise SSDs off eBay.

How do you find them, please? Do you just query for "enterprise ssd"? I've just run this search and indeed it returns lots of models from different brands. Thank you.

Cervisia · 7 months ago
The sellers usually do not write "enterprise" in the offer. You have to know the model numbers (for example, the SK Hynix Platinum P41 is the same as the Solidigm P44 Pro and the SK Hynix PC801).
Cervisia commented on How Not to Buy a SSD   andrei.xyz/post/how-not-t... · Posted by u/speckx
senectus1 · 7 months ago
Had the same issue with a Crucial drive from amazon. looked just like the real thing but for some small discrepancies. Performed like an absolute dog and the SMART data was waaaay off.

amazon just refunded me the whole amount and I pulled it apart to see what was inside: https://imgur.com/a/NUSuuEh

quite annoying, though also amusing.

Cervisia · 7 months ago
There is nothing obviously suspicious with what's inside. The SATA form factor was designed for HDDs; solid-state drives usually are not much larger than a M.2 drive.

These flash part numbers look like Intel. This is actually plausible; until 2018, Intel and Micron had a flash partnership. And while their Crucial brand has some good high-end drives, they are also willing to sell absolute bottom-of-the-barrel trash.

What are these discrepancies, and what's off in the SMART values?

Cervisia commented on Choosing an op-amp for your project   lcamtuf.substack.com/p/ch... · Posted by u/zdw
kragen · a year ago
I found this post extremely interesting and informative, well above my expectations even given the eminence of its author. I'm not sure that everything in it is covered in The Art of Electronics — it's the kind of stuff the book covers, but I learned things from this post I didn't learn from the book. (But possibly it's information that's in the book that I just failed to absorb the last few times.)

I was recently looking at opamps as alternatives to the LM324 and found some interesting-sounding parts, in particular for a poor man's SMU application (precision, low current, and voltage requirements, but not much bandwidth). Haven't tried any of them yet. Comments would be welcome.

- LM324B: TI's improved LM324, with half the input offset voltage and otherwise improved ratings, and just as cheap, but still bipolar.

- OPA4197 and family: three dollars but it's a quad RRIO 36V 10MHz opamp in a 14-SOIC with ±15nA input bias current, ±100μV max input offset voltage, and 120dB min CMRR. The datasheet makes it sound amazing for the price. The OPA177 seems like it would be better but pricier.

- OP4177ARUZ: a 16-dollar quad 36V 1.3MHz opamp with ±2nA input bias current, 75μV max input offset voltage (at ±15V power supply), and min 120dB CMRR

Then I decided I'd screwed up my design sketch by requiring one of the opamps to sink significant current very close to the negative rail, which is something even "rail-to-rail" opamps can't do; I was planning to use millivolts from ground to represent measured nanoamps. If you want to look at a simulation with idealized opamps, it's at https://tinyurl.com/2aomvpn5, but don't take it as exemplary in any sense; it's a novice design with novice mistakes (and I would be grateful in the unlikely case that someone took the trouble to point some of them out). I think I need to redesign the circuit as a bipolarity-supply circuit or something, or use a differential output for the current measurement, or rethink it entirely.

Cervisia · a year ago
Nowadays, it is hard to recommend a general-purpose opamp. Just plug the desired parameters into the search function and sort what's left by price.

(Distributors like DigiKey and Mouser have somewhat adequate search functions; I usually have to go to manufacturers' web sites like https://www.ti.com/amplifier-circuit/op-amps/general-purpose... to be able to filter by all important parameters. I'm mentioning TI because they have a large selection and a good search; even when you do not end up selecting on of theirs, you see what is possible.)

___

If you need only a small negative supply and have nothing else, the LM7705 charge pump can generate −0.23 V. (This is designed to fit into the typically allowed 5.5 V range of a nominal 5 V opamp.)

I do not know what a "significant current" is for you, but there are opamps with strong outputs. (When comparing opamps, you usually have to estimate the drive strength from the short-circuit current.)

Cervisia commented on Types of Parser Combinators   sgt.hootr.club/molten-mat... · Posted by u/todsacerdoti
CornCobs · 4 years ago
I don't really understand what implementation of ideas the author is talking about at the end. Is he proposing anything different from existing parser combinators?

From what I read the author seems to abstract the idea of parsing to "transforming data with the possibility of failure". Not sure if I missed the point here

Cervisia · 4 years ago
The idea of parsing indeed is to transform data, from a lower level of abstraction to a higher level of abstraction.

Parsing text (a sequence of characters) or binary files (a sequence of bytes) are well known.

The author mentions the case where a JSON parser has generated a bunch of JSON objects, but you want your own object types. (Deserialization libraries can do this automatically if all that is required is setting fields or properties, but for more complex cases you need custom code.)

Similar for XML parsing: all you get is a stream of element events, or a tree of generic XML objects, and you have to transform that further.

Another case would be when you get import data in the form of an Excel or CSV file. Your code starts with a 2D array of generic cells/values, and has to transform it into your own table/object types.

Cervisia commented on Writing an ALSA Driver (2007)   kernel.org/doc/html/v4.17... · Posted by u/kick
ptah · 6 years ago
if you can recommend a different forum to ask about this, please go ahead
Cervisia · 6 years ago
unix.stackexchange.com (or askubuntu.com); midi.org/forum; alsa-user mailing list; linux-audio-user mailing list

Please check if the device shows up in the output of "lsusb", "amidi -l", and "arecordmidi -l".

Cervisia commented on Bug: Cat sitting on keyboard crashes lightdm   bugs.launchpad.net/unity/... · Posted by u/edward
Cervisia · 10 years ago
Related Linux kernel bug report: https://lkml.org/lkml/2011/11/3/110

However, that particular key combination ([Alt]+[SysRq]+[C]rash) works as designed. The old adage about security and physical access comes to mind.

u/Cervisia

KarmaCake day31November 14, 2015View Original