News for hackers. Stuff that matters.

tobbebex

Re:The Ultimate Conditional Syntax on Monday October 21, 2024 @05:50PM (#41908888)
Re:C++ Coroutines Do Not Spark Joy on Friday April 05, 2024 @03:26AM (#39939600)
C# 8 introduced async generators with IAsyncEnumerable, so you can combine yield and await in C# as well. Those async generators are consumed using the ”await foreach” statement (which offcourse can be used nested from within another async generator).

https://learn.microsoft.com/en-us/archive/msdn-magazine/2019...

Re:Can Types Replace Validation? on Thursday August 25, 2022 @02:28AM (#32590295)
Dependently typed languages such as Idris or Agda uses types for validation. Their type systems are also Turing complete, but you are only allowed to use total functions (that do halt) as proofs in types.
Re:My Logging Best Practices (2020) on Tuesday October 05, 2021 @05:41PM (#28766004)
I used to work with a medical software where we turned off logging completely in production, to mitigate the risk of accidentally log patient information.

We needed to log that kind of data during development and just tagging what messages were sensitive would have been too error prone, so we couldnt reliably have any logs once we went live.

We did however have a special crash handler that logged the exception type and callstack, but not even the exception message could touch the harddrive.

Re:Asynchronous Programming in C# on Friday September 24, 2021 @12:01PM (#28644203)
An non-async Task<int> is returning a Task<int> object, where the return statement of an async Task<int> method is of type int (which will be wrapped in the resulting Task). ”return 1;” eg only works in the latter case.
Re:Adding is favoured over subtracting in problem solving on Thursday April 08, 2021 @02:37PM (#26742182)
We did exactly this for my first son.

We had been trying for weeks without result, both with trainer wheels and to run behind with an attached handle. Then one day we unmounted the pedals and lowered the seat... after just an afternoon we could reattach the pedals and he was now cycling on his own!

Re:You Only Need to Test with 5 Users (2000) on Monday July 15, 2019 @05:46AM (#20439299)
It depends on the userbase. I write medical imaging software intended to be used by MDs, and can’t just ask a random person at a coffeshop to try to establish a certain cancer diagnosis using our software. Finding candidates that have time for usability testing in that target group can be quite a challenge.
Indeed, it even has a Y2K bug in it!
Dailyscandinavian seems to have mixed up the numbers a bit.

In Sweden parents get 480 in total together, of which 390 are at 80% (capped at 989 SEK = 138 USD / day), and 90 days are at a minimum level (180 SEK = 25 USD). Out of the 480 days, 90 are reserved to each parent (used to be 60 before 2016) and the non-pregnant parent (usually a father) gets extra 10 days at the birth.

Re:Lock-Free Rust: Crossbeam in 2019 on Wednesday January 30, 2019 @03:04PM (#19038831)
It’s when you want to synchronize multiple atomics it gets complicated.

With a mutex you can lock for an entire ”transaction” where you fetch a unique index and write your value to the queue. With just atomics you can get a unique index into the queue concurrently with other threads, sure, but how do you mark it as ready to be unqueued once you are done writing your data?

Thats where lock free data structures come into play. They have solved this intricate synchronization between multiple atomics so you don’t have to.

Re:Looking Glass – A new type of holographic interface on Wednesday July 25, 2018 @07:42AM (#17608486)
A couple of years ago I worked with the 3d engine for an autostereoscopic display at Setred (https://m.youtube.com/watch?v=zkwq_cQNLU8&feature=youtu.be).

For us the DVI bandwidth was the limiting factor to deliver 40-50 views at reasonable framerates (besides raw GPU computing power), so our display actually had 8(!) DVI inputs. That also gave us a natural interface to add distributed rendering, supporting up to 8 GPUs for rendering. In most cases though, one monster PC with 3 GPUs and 5 DVIs was enough to produce interactive framerates.