Reputation
3,264
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 9 23
Newest
 Nice Answer
Impact
~99k people reached

1d
comment Question on password hashing security
what do you mean by "Request Sent to server"? Do you mean the application server sending a request to the database server, or the client to the application server?
Jan
30
comment How to decrease compile time when reading includes over a network?
Why do you have include files hosted on a network? The normal way for distributing source files is version control.
Jan
29
comment Is break a code smell?
You might want to use C#'s TakeWhile instead of filter/Where as your alternative.
Jan
29
comment How do I unit test multi-threaded code?
The problem with (3) is that many of those events are implicit, such as the CPU updating a cache line. And then there is the joy of a CPU or compiler that reorders instructions.
Jan
28
comment Is anti-aliasing still relevant in a high resolution display?
Are you talking about AA for rendered text, or for 3D games?
Jan
28
comment Is anti-aliasing still relevant in a high resolution display?
Most monitors don't have high enough ppi to omit any-aliasing (and those that have are pretty damn expensive).
Jan
27
comment File Hashing between OSes when Perforce changes line endings
Have you benchmarked the performance impact? If you're IO limited, the conversion might not have a big performance impact. For a simple test you could pipe the file through dos2unix into whatever hashsum utility you want. You should be IO bound, unless your disk produces more than about 300MB/s (and that's assuming a slow hash, a fast hash should approach 1GB/s single-core)
Jan
27
comment Is it good practice to avoid warnings and notices?
@Cerad Using @ is perfectly fine if you check the return value for errors and handle them appropriately. Not every API lets you rule out the possibility of errors before calling it. For example how would you convert user supplied (and thus potentially invalid) data between charsets if not by using @iconv and checking the result for FALSE? | The new random_int API would have almost ended like that before it was changed to raise an exception instead of emitting a warning and returning FALSE when it fails. (I am very happy they made that change)
Jan
27
comment Handling exceptions I don't know about
Personally I think that expected errors should be returned as some kind of tagged union/maybe type instead of being thrown as exception and the language should offer something like Rust's try! macro as syntax sugar.
Jan
27
comment Handling exceptions I don't know about
Check the documentation and hope it lists all relevant errors. Java has checked exceptions as a language feature to avoid this problem (but that decision leads to other problems)
Jan
26
comment Does unused code affects the assembly after startup (Memory for example)?
Defining memory usage for memory-mapped-files isn't trivial.
Jan
26
comment Why Garbage Collection if smart pointers are there
@Gulshan Rust is one of the very few languages that supports safe unique pointers.
Jan
26
comment What are polymorphic messages?
You might know them as virtual methods.
Jan
25
comment Why are semantics and type systems are so important?
@thorstenmüller I'd consider associativity a syntactic issue.
Jan
24
comment Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?
But numerical computations will typically use == which has always followed IEEE, so they'd get the fast code no matter how Equals is implemented. IMO the whole point of having a separate Equals method is using in in algorithms that don't care about the concrete type, such as LINQ's Distinct() function.
Jan
24
comment Option<T> functional type implementation and scenarios
This question might be a better fit for Code Review
Jan
23
comment Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?
I agree that numerical purposes are more important. But we already have the == and != operators for them. In my experience the Equals method is pretty much only used by non numeric algorithms.
Jan
23
comment Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?
@diemaus Some reasons why I don't find that convincing: 1) for float/double and several other types, == and Equals are already different. I think an inconsistency with existing types would be even more confusing than the inconsistency between == and Equals you'll still have to deal with for other types. 2) Pretty much all generic algorithms/collections use Equals and rely on its reflexivity to function (LINQ and dictionaries), whereas concrete floating-point algorithms typically use == where they get their IEEE semantics.
Jan
22
comment Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?
That NaN == NaN should return false is undisputed. The question is what the .Equals method should do. For example if I use NaN as a dictionary key, the associated value becomes unretrievable if NaN.Equals(NaN) return false.
Jan
22
comment Is it bad to refer to access array elements via pointer arithmetic instead of the [] operator?
Arrays aren't pointers, the just decay to pointers implicitly.