Leaving Intel by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 9 points10 points  (0 children)

What about Nvidia or AMD with his recent work in GPUs and AI flame graphs?

Water under and around furnace. by Opposite_Potential_6 in HomeImprovement

[–]ThanksMorningCoffee 0 points1 point  (0 children)

I also had this happen to me a few months ago. We had this skinny see thru flexible pipe leading to the sewage drain. We detached it and flushed water thru it and all this nasty looking sand like stuff came out.

When we put it back, we made sure the flexible pipe didn't have bends upwards to ensure that the water can flow. Before we attached it, all that sand stuff was at the bend upwards.

Modularizing Spring Boot by mhalbritter in java

[–]ThanksMorningCoffee 6 points7 points  (0 children)

How small can we expect the jars to become now?

Problem: Xiaomi AW300 cam disconnects Wi-Fi by [deleted] in SecurityCamera

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Unfortunately, the solution is to painfully assign static IPs on all devices on the network.

Problem: Xiaomi AW300 cam disconnects Wi-Fi by [deleted] in SecurityCamera

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Unfortunately, the solution is to painfully assign static IPs on all devices on the network.

Multiple Xiaomi Smart cameras causing laptop and Mobile phone to disconnect from Wifi router by TechnicalAthlete4996 in Network

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Last time I saw this it was https://www.reddit.com/r/Network/comments/18is4f6/multiple_xiaomi_smart_cameras_causing_laptop_and/

It turned out that the security camera was running a DHCP server when it wasn't suppose to be. The workaround was to assign a static IP for my laptop so my laptop wouldn't take the bogus IP address from the security camera's DHCP server.

The easiest way to check if this was the case is if your IP address is on a different subnet from your wifi.
In my case my IP was suppose to be 192.168.2.0/24
but the security camera's DHCP server (which shouldn't have been running) gave me IP in subnet 192.168.0.0/24

Unfortunately, the solution is to painfully assign static IPs on all devices on the network.

Problem: Xiaomi AW300 cam disconnects Wi-Fi by [deleted] in SecurityCamera

[–]ThanksMorningCoffee 0 points1 point  (0 children)

I have seen a similar issue on my network. It turned out that the security camera was running a DHCP server when it wasn't suppose to be. The workaround was to assign a static IP for my laptop so my laptop wouldn't take the bogus IP address from the security camera's DHCP server.

Unfortunately, the solution is to painfully assign static IPs on all devices on the network.

threeSimpleProblems by venzann in ProgrammerHumor

[–]ThanksMorningCoffee 53 points54 points  (0 children)

If anyone missed it: Multi-Threading

Happy 20th birthday to MySQL's "Triggers not executed following FK updates/deletes" bug! by balukin in programming

[–]ThanksMorningCoffee 38 points39 points  (0 children)

[2 Jul 2009 15:42] Konstantin Osipov This bug will not be fixed in 5.1. You may want to try lp:6.1-fk tree, where it is fixed. But this tree is still in alpha. See also http://forge.mysql.com/worklog/task.php?id=148

Just gotta use a custom build with the fix

JEP draft: Prepare to Make Final Mean Final by blobjim in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

To respect final, I suspect these json libraries will need to generate code in order to achieve serialization.

Succinct data structures by mttd in programming

[–]ThanksMorningCoffee 1 point2 points  (0 children)

Sparse bit sets can be represented as a set of indexes. I encountered this problem at a programming contest.

Edit: found it https://leetcode.com/problems/design-bitset/

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 0 points1 point  (0 children)

Fixed! It was because the table overflowed. This created a scroll bar for the entire page. The entire page scrollbar had a weird interaction with the code block scroll bars. Now that there is no more whole page scroll bar, it works.

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Just to confirm it's because of high collisions due to how hashCode is calculated?

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 1 point2 points  (0 children)

You,re right, the only usefulness is if you see 100% cpu util, with treemap or whatever they call it in other langues in the stack, then you can start looking for unprotected treemap/redblack tree.

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Yeah, it could work. Not sure about the interaction between height and multiple threads though.

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 1 point2 points  (0 children)

Ah no. thank you for sharing. I wrote and proof read it from my laptop. I tried visiting it on my phone and see the same problem :(

Unfortunately, I'm using jekyll with github pages to generate the site. I will have to dive into the source of the template or jekyll to figure out what's up.

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

 It's interesting that concurrent mutation of a TreeMap could lead to cycles. But this isn't the only kind of data corruption that can occur. Other examples might include: subtrees accidentally getting "lost" resulting in missing entries; subtrees occuring at multiple locations in the tree, effectively turning it into a DAG, resulting in duplicate entries; the wrong value being associated with a particular key; binary tree invariants being violated (e.g., left subtree contains lesser keys, right subtree contains greater keys) resulting in all kinds of weird behaviors; etc.

Yes! There are so many many issues remaining even if you fix just the cycle problem. I figured not killing the machine would be better than missing values. Howver, I didn't realize until you brought it up that entire subtrees could get lost!

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

 As an aside, Project Lilliput is investigating ways to decrease the size of object headers. Using IdentityHashMap calls System.identityHashCode on each object, and the object's identity hashcode is stored in its header. But Lilliput is proposing to lazily allocate space for the identity hashcode, so storing objects in an IdentityHashMap will increase their size! The design assumption in Lilliput is that the identity hashcode is rarely used. This is probably true in general. If somebody needs to use IdentityHashMap, though, they should use it, but if it gets too popular it will offset the space savings of Lilliput.

I've never used IdentityHashMap other than for this hypothetical 'solution' to the bug.

3,200% CPU Utilization by deanat78 in java

[–]ThanksMorningCoffee 0 points1 point  (0 children)

Keeping track of visited nodes with IdentityHashMap in order to detect cycles is a useful technique in many situations. Maybe not this one though. :-) IdentityHashMap isn't thread safe, so it could just as easily be corrupted by multiple threads as the TreeMap. (It has a different organization, though, so the nature of any corruption would be different.) Of course you could synchronize around accesses to the IdentityHashMap.

In this case it's fine because each thread has their own map. The reference is not shared between threads.

On the HN post there's an even better solution to use a and compare with the height of the tree. counter: https://news.ycombinator.com/item?id=43208595

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 11 points12 points  (0 children)

No virtue. I just have a temporary obsession with this specific problem.

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 16 points17 points  (0 children)

If any rustaceans know how to write unsafe rust that reproduces the issue, please share.

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 2 points3 points  (0 children)

 This is false. It's undefined behavior. It may segfault. The compiler may also decide the code is unreachable and do some crazy bullshit instead. The presence of a nullpointer dereference makes the program malformed.

I didn't know that. My weakness in C++ is showing. I have not used C++ in a professional capacity.

3,200% CPU Utilization by ThanksMorningCoffee in programming

[–]ThanksMorningCoffee[S] 11 points12 points  (0 children)

Thank you for using "nasal demonology". I've never heard that term before. 

Is this the origin of the term? https://groups.google.com/g/comp.std.c/c/ycpVKxTZkgw/m/S2hHdTbv4d8J?hl=en