Readit News logoReadit News
detrino commented on DisplayPort and 4K   etbe.coker.com.au/2020/02... · Posted by u/ecliptik
proverbialbunny · 6 years ago
I do use OSX, but I'm also on Linux Mint. Both are sharp and smooth as butter. I'm uncertain why your experience has been what it has with Linux. Could be drivers or something. I did have to set Mint to work for 4k60. It did not work out of the box properly. (HiDPI was off. Hardware vsync was off.) Mint has never had sub pixel rendering as far as I know. It looks crisp and great.
detrino · 6 years ago
I think you misunderstand me. I am saying that on Linux text at normal PPI is pretty much as good (to me) as text at high PPI because it has sub pixel rendering and strong hinting that Mac OS X lacks,
detrino commented on DisplayPort and 4K   etbe.coker.com.au/2020/02... · Posted by u/ecliptik
jjoonathan · 6 years ago
When did that happen? Back in my day, OSX was the one with sub pixel rendering and Windows users would constantly complain that it looked fuzzy.
detrino · 6 years ago
OSX has had sub pixel rendering disabled by default since Mojave. It also never had the strong hinting that you can find on Linux and Windows which makes text significantly sharper at the cost of differing from the shape as specified by the font.
detrino commented on DisplayPort and 4K   etbe.coker.com.au/2020/02... · Posted by u/ecliptik
proverbialbunny · 6 years ago
I'm an early adopter of 4k60. If you write code and you're not on 4k, you don't know what you're missing. 4k is great.

Back then display port ran at 60fps, and hdmi ran at 30fps. My hardware has changed and moved on, but I still default to using a display port cable. It's rare to not find a graphics card without display port, and it's rare to find a monitor without one, so I've never had a reason to try HDMI. As far as I can tell it's a stubborn format that continue to fight to live on. Frankly, I don't really get why we still have HDMI today.

detrino · 6 years ago
Do you use Mac OS X?

When using Windows or Linux I don't find much benefit in text rendering on a 4k display.

But as Mac OS X has no sub pixel rendering or grid fitting text looks terrible without a high ppi display.

detrino commented on Schwab Removes U.S. Stock, ETF and Options Commissions   pressroom.aboutschwab.com... · Posted by u/lxm
mehrdadn · 6 years ago
They increase the cash back by 75% of whatever it already was. So if you were getting 3% back (currently, for their Cash Rewards card, that can be 1 of the following categories: gas, online shopping, dining, travel, drug stores, or home improvement/furnishings), you'd now be getting 5.25% back.

Which is a complete rip-off. You could easily get 2% interest on that $100k you're leaving with them by just leaving it with a better bank. For that to be worth it, you'd need to get at least $2k cash back on that credit card. At 5.25% (which is only for that 1 category you chose!) you'd need to burn through $38k/year... i.e., you gotta $100 a day on that card.

Except even if you somehow were planning to spend $100/day on that one lucky category, your cash back would be an order of magnitude lower, because they'd only give you that cash back on the first $2,500 in purchase, i.e. you could only earn $131 at most. So you're losing out on at least $2,000 to earn at most $131. Terrific deal!

detrino · 6 years ago
You can still get 2% interest on that buy buying treasury ETFs, or 1.56% currently by asking them to open a preferred deposit account for you, which is essentially a savings account with a high interest rate. You dont have to keep it in cash.
detrino commented on Schwab Removes U.S. Stock, ETF and Options Commissions   pressroom.aboutschwab.com... · Posted by u/lxm
StevePerkins · 6 years ago
Similar story with Fidelity.

Honestly, I just don't understand why people bother with traditional banks at this point. Pretty much all of the major brokers offer cash management accounts that are equivalent of online banking. Pretty much all with standard:

- No fees

- No minimum balance

- Free checkwriting (usually free physical checks for that matter!)

- ATM fee reimbursement (at least anywhere in the U.S., if not internationally too)

- Free debit cards

- Direct deposit

- Deposit paper checks by taking a picture with a phone app, etc etc etc.

The only possible downside that I can think of is that I'd have to deal with a little extra hassle if I wanted a cashier's check. But even then, it would simply take an extra day or two. And it's not like I'm closing on a new home purchase all that frequently.

Nevertheless, people that I talk to get weird and SCARED when I talk about it. Even my wife keeps a separate checking account at a physical bank, because she just likes knowing that a brick-and-mortar building is there. I don't get it myself, but human nature can be odd when it comes to money.

detrino · 6 years ago
If you have bank of america you can link your bofa and merrill accounts. They even give you bonuses on your credit cards of +25/50/75% cash back for balances over 25/50/100k in assets between both.
detrino commented on Show HN: Array with Constant Time Access and Fast Insertion and Deletion   github.com/igushev/IgushA... · Posted by u/igushev
piccolbo · 6 years ago
How is that different from a rope data structure?
detrino · 6 years ago
Depends what you consider a Rope.

Does it require constant time concat?

Does it require immutability?

Does it require a balancing scheme based on the fib sequence?

Does it require that the tree is binary?

My tree is an attempt to be as fast as possible with log everything operations and no pointer/reference stability.

detrino commented on Show HN: Array with Constant Time Access and Fast Insertion and Deletion   github.com/igushev/IgushA... · Posted by u/igushev
malisper · 6 years ago
For those reading along, the post describes a vector-like datastructure that has O(1) access time and O(sqrt(N)) insert and deletion time at an arbitrary index. The idea is pretty clever. The datastructure maintains sqrt(N) circular arrays each of size sqrt(N). For reference indexing into a circular array has O(1) access time and O(1) insert and deletion time at the ends.

For accesses, you can in constant time determine which circular array contains the element at the given index (it's simply i % sqrt(N)) and then in constant time access the element from the underlying array. For inserts and deletions, you find the circular array that contains the location you want to insert into. First you make sure there is space in the array to insert. You do this by moving one element from each circular array to the next one. Since deleting and inserting from the end of a circular array takes O(1) and there are O(sqrt(N)) arrays, this takes a total of O(sqrt(N)) time. Then you insert the new element into the middle of the designated circular array which is of size sqrt(N) so it takes in the worst case O(sqrt(N)). This means insertions take a total of O(sqrt(N)) time.

As immawizard pointed out, there is a generalized version of this idea called tiered vectors[0] that supports an arbitrary level of nesting. A 1-tiered vector is a circular array. A k-tiered vector is an array of n^(1/k) tiered vectors of tier (k-1). You can show that for a k-tiered vector, access time is O(k), while insertion and deletion have a runtime of O(n^(1/k)). The datastructure mentioned in the post can be considered a 2-tiered vector.

The post includes benchmarks comparing the datastructure to std::vector. I would be interested in seeing benchmarks vs a binary search tree. Even though the datastructure has O(sqrt(N)) performance, that's still a lot slower than O(log(N)). The square root of a million is 1000, while the log base 2 of a million is only ~20.

One nitpick is that the author names the datastructure after themselves. Naming things after yourself is typically a faux pas.

[0] https://www.ics.uci.edu/~goodrich/pubs/wads99.pdf

detrino · 6 years ago
Re benchmarking vs other data structures: Here is a B+Tree based sequence container I made: https://github.com/det/segmented_tree

Basically, it has O(log n) everything like a binary search tree you suggested but also very good constant factors.

By default, leaves hold 1024/sizeof(T) elements and branches hold 47 elements, so it can access up to 13,289,344 8 byte elements with only 4 levels.

detrino commented on Linux kernel coding style   01.org/linuxgraphics/gfx-... · Posted by u/e19293001
nolemurs · 9 years ago
Other people are complaining about the 80 character line limit, but personally, I'm shocked and dismayed by the preference for no braces on `if` statements with single line blocks. It is so easy to accidentally add a line to what looks like an `if` block (but isn't since there are no braces), and then you have a bug that is visually very difficult to spot. I'm pretty strongly against this rule!
detrino · 9 years ago
If you enforce the use of clang-format then this is not an issue as it will indent the code correctly.
detrino commented on ‘Abusing’ the C switch statement – beauty is in the eye of the beholder   blog.feabhas.com/2017/02/... · Posted by u/ingve
detrino · 9 years ago
It's impressive that clang generates the same assembly for both versions: https://godbolt.org/g/yLh1EF

Note that the assembly for process_message2 calls each function only once even though some appear twice in the body.

u/detrino

KarmaCake day482July 15, 2013
About
chris@detrino.org
View Original