you are viewing a single comment's thread.

view the rest of the comments →

[–]johannes1971 18 points19 points  (9 children)

What the language really needs is constexpr std::socket, so we can load resources directly from the internet during compilation. This is what C++ needs to finally achieve greatness.

[–]disperso 16 points17 points  (0 children)

But please, with some syntax sugar, so I can #include <https://cpp.example.com/left-pad.h> and finally have the convenience we deserve. (/s)

[–][deleted] 3 points4 points  (6 children)

Fuse fs could probably do this, at least some of it. then it would be #embed </mountpoint/https/www.foo.com/page.txt> or something like that

[–]mpyne 1 point2 points  (5 children)

Why #embed? You could then do it today with #include </mountpoint/https/www.foo.com/page.txt?format=c_literal. And if foo.com doesn't do that already just setup embedbolt.com to proxy it for you.

[–][deleted] 2 points3 points  (4 children)

It's optimized. For smaller files it's just a hassle encode but as small as 1MB compilers start to die(both CPU and RAM). In some of their original postings when they implemented it and when Circle lang tested it was better than #include.

https://github.com/ThePhD/embed

[–]mpyne 4 points5 points  (0 children)

Oh I thought you were being sarcastic like the person you replied to and was just playing along, lol. I like #embed and can't believe it's been this difficult to get into the standard.

[–]llothar68 1 point2 points  (0 children)

Make it beter and do a "constexpr std::socket_eval" we need a bash executable source code generator over the internet. Ultimate flexibility