u/Affectionate_Text_72

25 post karma · 279 comment karma · joined Aug 2020

Affectionate_Text_72

You can blow with this! you can blow with that!

If you Walken without Rythym you'll never [deep] learn

Affectionate_Text_72

Sounds like he's an open source envangelist ;)

Affectionate_Text_72

In C++ you can explicitly declare which variables are captured and whether they are captured by reference or value.

Lambda Expression in C++ - GeeksforGeeks https://share.google/dOxoPu89OM92KzAKT

Affectionate_Text_72

This is an evolution of scons which predates many of those. Scons showed a lot of potential at the time but lost out on performance and other grounds.

Scons was part of the software carpentry project

Software Carpentry: SC Build; or making a better make https://share.google/2WNaZNAcpAriuvhE4

Its been around since 2001. In a way cmake is vhs that one over the scons betamax.

Affectionate_Text_72

Substitute any time units you want and someone will be happy or unhappy.

That said people here are either exaagerating or very lucky

Affectionate_Text_72

Labelling exports is only half the problem though. I don't think attributes would be the right choice for that. They arent supppsed to significantly alter semantics so thats why export has to be a keyword.

Generation does work but its an extra step and so like documentation it wont always happen. And you have the usual problems of keeping things in sync.

Affectionate_Text_72

That would actually be great the economy and tech industry

Affectionate_Text_72

Long live modules!

Affectionate_Text_72

As many others have pointed out we have #pragma once and modules.

But that doesnt address your two other points:

  • Why isnt that (#pragma once) the default?

  • because it would be a breaking change. Some arcane programs deliberately include headers multiple times with different macros. I wouldnt do that myself but its a choice more common in C, which we try to stay compatible with.

A compiler option to flip that default might be a good idea but it would only save you one line per file and break anything that did do that in equally arcane ways.

  • why arent interfaces generated automatically from source?

The "modern" answer is becuse before modules there was no way to select which bits of your source were for public consumption as part of the interface amd which were private.

Actually I prefer to have headers to clearly demarcate what is part of the interface. I do not like having to wade through implementation code in languages that allow implementation and interface to be mixed when i am not trying to debug it. I also put all my api documentation there. Its not perfect as we have to expose some details unless we hide them behind pimpl types.

Affectionate_Text_72

Yes. The examples are motivating.

Also its important to remember c++ is a big tool box. Different tools for different jobs. Otherwise if all you have is a hammer everything looks like a nail.

Affectionate_Text_72

Yes but being questioned is far from being imprisoned. Over here you won't get detained indefinitely for being a journalist say or tortured or have your hands cut off after a show trial

Affectionate_Text_72

But what about convictions?

I'd be more worried in say Saudi than in the Uk on that.

Affectionate_Text_72

Love the Troy McClure style intro:

https://share.google/JkShGvFeMvQtzwLeu

Affectionate_Text_72

Its a DSL whether its in toml or whatever already. The problem I have with these configurations is that they ignore or throw away the structure inherent in the DSL being implemented. On top of that some add visual noise. Try expressing a table in json or xml. Where's the constraint that rows have to have the same length say. Xml and json have schemas, though people rarely seem to use the json ones, but these are not the best way to describe syntax or semantics beyond a low level of complexity. Probably the best or worst you can do in this space is reimplement half of lisp badly) via Greenspun's tenth rule

Affectionate_Text_72

Can you do that in any language? Interrupt handling is cpu or os specific. Very hard to standardise.

Affectionate_Text_72

Loads of tools out there but many are commercial only.

Affectionate_Text_72

It seems to be defacto standard across the main compilers. It will never be iso std though as modules are the intended solution to that problem. The tooling maturity there varies.

Affectionate_Text_72

No. This trend for using json, toml, yaml or Xml as a substitute for proper syntax is terrible.

Its the parsing equivalent of treating everything as a string. Which as you mention is also terrible.

Affectionate_Text_72

Isn't something like this coming with safety profiles?

Affectionate_Text_72

Q

Affectionate_Text_72

Couldn't you just swap your doctor for one that isn't sexist. Maybe report him/her/it too?

Affectionate_Text_72

The jerk here is surely the posting of a link to X about a talk from 2015 when X was still twitter without the link to the talk itself?

Affectionate_Text_72

What about if its a distributed computation for a large dataset? I guess the parallel distributed effect talks to a broker which does need network access but itself should not declare an interest. However the mere fact that data is going over the network because of it could create a hole. Perhaps the network broker provides abstracr channels to abstract machines but strictly limits the capabilities exposed

Affectionate_Text_72

In case the reference is obscure - Source: YouTube https://share.google/dRWX7du3uXai7gOcV

Affectionate_Text_72

Gus your wife is a god damn bigfoot. I took her fishing and she dangled her hairy feet into water. Turned to me and said "A goony goo goo" then flipped a fish into the boat with her feet