HackerTrans
TopNewTrendsCommentsPastAskShowJobs

cbrogrammer

no profile record

comments

cbrogrammer
·4 yıl önce·discuss
TDD helps close to 0 % with fragility and only exists to help development
cbrogrammer
·4 yıl önce·discuss
> const createUser = (

> attributes: UserAttributes,

> onCreate: (user: User) => void

> ): User => {

> user = User.create(attributes);

> onCreate(user);

This stood out to me, in an otherwise tame article, as probably the most terrible overthought interface possible. A literal callback function passed as a function reference to something that does three lines of code? Good luck with that, I much prefer even a slightly procedual implementation.
cbrogrammer
·4 yıl önce·discuss
Well that is just objectively false. The man was never "sentenced to 13 federal crimes, 50 years of imprisonment and one million dollars in fines". It is blatantly false.
cbrogrammer
·4 yıl önce·discuss
Saying anyone is "responsible" for a suicide is disingenuous
cbrogrammer
·4 yıl önce·discuss
> Goal: Distribution of labor and resources based upon the needs of society > Proxy: Capitalism > Strong version of Goodhart's law leads to: Massive wealth disparities (with incomes ranging from hundreds of dollars per year to hundreds of dollars per second), with more than a billion people living in poverty

Nothing as annoying as online communists inserting their horrible political opinions everywhere. Try moving to a communist country. See how capitalism has raied billions out of poverty in only 30 years
cbrogrammer
·4 yıl önce·discuss
We could start by considering not writing stuff like

> /*

> * Truncate to 8 chars if standard DES since not all crypt()'s do this.

> * If this turns out not to be safe we will have to use OS #ifdef's (sigh).

> */

> sav = pass[8];
cbrogrammer
·4 yıl önce·discuss
there is no copy-on-write in the C language
cbrogrammer
·4 yıl önce·discuss
Gnome and making bad choices, name a better combo
cbrogrammer
·4 yıl önce·discuss
if C throws away portability it is no longer C
cbrogrammer
·4 yıl önce·discuss
That is what many people fail to understand as to why us C programmers dislike C++
cbrogrammer
·4 yıl önce·discuss
CUDA is absolutely fine just like x86 assembly is absolutely fine. They are well thought out. What I am saying is that from my perspective they are as granular and difficult, and programming directly in them for even small projects is not a good idea. GPU programming is, at the moment, stuck in 1960's way of thinking, as there are multiple people writing CUDA code by hand.
cbrogrammer
·4 yıl önce·discuss
> is **like** writing x86 assembly by hand

yes absolutely, way too granular and low level
cbrogrammer
·4 yıl önce·discuss
Writing CUDA by hand is like writing x86 assembly by hand, why would anyone ever do that willingly and not for fun?
cbrogrammer
·4 yıl önce·discuss
will this laptop ever ship with a non-US keyboard layout? The enter key is so bad on them, I hate that it is long and not high. Dealbreaker unfortunately, wish I could buy one of these.
cbrogrammer
·4 yıl önce·discuss
What do you mean? A cast to a char pointer is absolutely valid C. For most intents and purposes, a pointer "type" in C is merely the step size, and only void pointers cannot be decremented.

The line of code is basically two lines:

  (char*)hash_ptr.parm.v.p = (char*)hash_ptr.parm.v.p - 1; // move the pointer back by one byte
  *((char*)hash_ptr.parm.v.p) = fpop(sst); //At the memory location, write the output of fpop(sst)