Re: Adding Modules to C in 10 Lines of Code
On Tuesday, 3 May 2022 at 01:54:16 UTC, forkit wrote: On Friday, 22 April 2022 at 19:54:13 UTC, Walter Bright wrote: On 4/17/2022 1:12 PM, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Slides: https://nwcpp.org/talks/2022/modules_in_c.pdf Video: https://www.youtube.com/watch?v=2ImfbGm0fls Here is the answer to the 2 questions you posed in your presentation: (1) why nobody has done this in 40 years? (2) what went on with C++ for 20 years? It's simple. Rational choice theory tell us, that the reward of the action must outweigh the costs incurred. Stepstone did it for Objective-C with #import, and Apple with module maps for C and Objective-C, the modules design that preceeded C++ modules on clang. Then we have those failed attempts at fixing C like SafeC. And if we count research work, Bjarne Stroustoup and Gabriel dos Reis, did it back when they were teaching in Texas university, here is the 2009 paper, "A Principled, Complete, and Efficient Representation of C++" https://www.stroustrup.com/gdr-bs-macis09.pdf Both Visual Age for C++ v0.4 and Lucid's Energize C++ did 40 years ago, by serializing C++ code into database representation, both failed due to high hardware requirements for late 80's/early 90's PCs. Lucid Energize Demo in 1993 https://www.youtube.com/watch?v=pQQTScuApWk Its database system, Cadillac, "Foundation for a C++ Programming Environment" https://dreamsongs.com/Files/Energize.pdf Visual Age for C++ v4, http://www.edm2.com/0704/vacpp4/vacpp4.html The build environment is totally different from traditional compilers. The concept of header files and source code files is obsolete. VAC++ utilizes a global approach to definitions and implementations. That is, once a definition is processed it stays in memory for the duration of the build. To maintain compatibility, header files can still be #included. This new approach to handling source code is disorienting at first and will make migrating existing code to the compiler somewhat difficult. Errors pertaining to objects being defined more than once will likely occur while migrating. Often these errors are incorrect. The work around is to remove the #include line in the source file that contains the offending “redefinition”. https://books.google.de/books?id=ZwHxz0UaB54C&pg=PA206&redir_esc=y#v=onepage&q&f=false Additionally the way pre-compiled headers work on C++ Builder and Visual C++, versus the UNIX way, meant that on Windows the reward of the action did not outweigh the costs incurred, and ironically Visual C++ is the one leading the C++ modules support anyway, thanks to Gabriel dos Reis being part of the team, and pinging back on those 2009 learnings.
Re: D News April-May - DConf '22 BeerConf Has a Sponsor!
On Sunday, 29 May 2022 at 19:44:47 UTC, Iain Buclaw wrote: On Sunday, 29 May 2022 at 12:41:18 UTC, Mike Parker wrote: GDC 12.1 (the first GDC release with the D version of the D backend), That should also be frontend, not backend. :-) At least I got it right in the video.
Re: Added xxhash 0.8.1 DUB module (D implementation)
On Sunday, 29 May 2022 at 07:43:20 UTC, Carsten Schlote wrote: Source: https://gitlab.com/carsten.schlote/xxhash3 Dub Code: https://code.dlang.org/packages/xxhash3 [...] Optimized code already outperforms the phobos built-in digest types. See the benchmarks reported by tool at https://gitlab.com/carsten.schlote/hashbench Great work! High-quality implementations of foundational algorithms like these are always a welcome addition to the D ecosystem. :)
D at BSDCan
Hi all -- I'm giving a redux of my PolyglotBSD talk at BSDCan this year: https://www.bsdcan.org/events/bsdcan_2022/schedule/session/96-polyglotbsd/ It's virtual, so feel free to come by. It won't be all about D, but D is a major part of the story. ~Brian
Re: D News April-May - DConf '22 BeerConf Has a Sponsor!
On Sunday, 29 May 2022 at 12:41:18 UTC, Mike Parker wrote: GDC 12.1 (the first GDC release with the D version of the D backend), That should also be frontend, not backend. :-)
Re: D News April-May - DConf '22 BeerConf Has a Sponsor!
On Sunday, 29 May 2022 at 12:41:18 UTC, Mike Parker wrote: hire out space for BeerConf every evening August 1-4. Sorry, that should be August 1-3.
D News April-May - DConf '22 BeerConf Has a Sponsor!
If you've been following the Announce forum, then you already know about most of the news in my latest D News video covering April and May: the releases of D 2.100.0, LDC 1.30.0-beta1, and GDC 12.1 (the first GDC release with the D version of the D backend), the publication of the DConf '22 schedule, and the upcoming deadline for DConf '22 early-bird registration. One bit of news I hadn't announced anywhere before this video: we have a sponsor for the DConf '22 BeerConf! A big thanks to Funkwerk for supporting us. Thanks to them, we'll be able to hire out space for BeerConf every evening August 1-4. And each night, everything you order (drinks and food) will be covered until we reach the minimum spending amount. Symmetry is making the arrangements with a local pub that we've picked out. I'll provide the details as soon as I hear from them that everything is settled. Part of the funding for BeerConf is provided by the D Language Foundation. If you'd like to buy a round or two, or a few, for your fellow D programming language enthusiasts, please leave a donation at our Open Collective page: https://opencollective.com/dlang Or via one of the other options on our donation page: https://dlang.org/foundation/donate.html You can find the video here: https://youtu.be/qTH1S6z-n-s I'll have the text version of it up on the blog in a day or so.
Added xxhash 0.8.1 DUB module (D implementation)
Source: https://gitlab.com/carsten.schlote/xxhash3 Dub Code: https://code.dlang.org/packages/xxhash3 This is an implementation of the XXHASH non-cryptographic digests, version 0.8.1, in D code. The subdirectory "./demos" contains a simple test dub project. This module conforms to the APIs defined in `std.digest`. The XXH3 64 and 128 bit variants do not yet use the vector units provided by some architectures. Optimized code already outperforms the phobos built-in digest types. See the benchmarks reported by tool at https://gitlab.com/carsten.schlote/hashbench Open issues/ToDos: - Apply more optimisations, eleminate more C-ish code, improve performance - Add vector unit support for XXH3 variants - Apply for inclusion into lib phobos, when code reached a matured state.