Discover and read the best of Twitter Threads about #ifdefs

Most recents (4)

I suspect that the number of Bazel experts out there is not terribly large, but: I'm hitting github.com/bazelbuild/rul… - one of the dependencies of a go_library() target needs a specific build tag to work in my environment. Is there any way to do that at the moment?
Ok so the right thing to do here is to express the tags in the go_binary() target, but what's actually breaking things for me here is that go_repository() has "helpfully" called gazelle and generated a BUILD file that has copts set for the default tags
Which means even when I pass the correct build tags, gcc is being called with the flags set by the wrong build tags, and all the #ifdefs are wrong as a result
Read 4 tweets
One thing about this bug is "why does a JSON parser need random numbers?"

The answer is that all libraries need random numbers. It's one of the things they don't teach you in computer science class.

news.ycombinator.com/item?id=264636…
While a JSON parser parses the input, it puts things into a hash table, which is very efficient ON AVERAGE. But if a hacker constructs the input in a special way, it becomes very inefficient -- essentially, it'll crash/hang.
Thus, you need to randomize where things get placed in a hash table such that a hacker can't possibly guess the order. This means grabbing a TRUELY random number from the operating system or hardware.
Read 14 tweets
1/ @werat asked about whether the debugger was using the C# compiler or language service in VS 2002. It was not. The debugger has a component called an ‘expression evaluator’ that is provided per language and is responsible for parsing and evaluating expressions when stopped at a
2/ breakpoint. For example, if you type into the immediate window, hover over a variable, type into the watch window, etc. the expression evaluator is involved. The debugger and the language service are actually deeply integrated in a number of scenarios in VS, which may
3/ initially seem surprising. I may talk about more of these scenarios in the future, but to give a flavor, when you set a breakpoint at design time the language service is involved, when you are using Edit and Continue the LS is involved, the range of what is being evaluated
Read 14 tweets
This is great. The only time I get to see code like this is typically under NDA while under development or while under a court protective order.

First review note: traditional older style C code, but looks professional. Some encoding issues in the comments...
HMI code is c++ though. Appears to be custom framework, not sure yet.
French comments I believe.
Visual Studio Code is handling the code fairly well.
Qt Creator IDE use will need effort.
References to Keil and Borland.
<sigh> My old enemy: busy loops to enable delays, waits, etc.
Read 21 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!