May 26, 2022
On Wednesday, 25 May 2022 at 23:34:30 UTC, max haughton wrote:
> On Wednesday, 25 May 2022 at 23:16:35 UTC, forkit wrote:
>> On Wednesday, 25 May 2022 at 21:47:38 UTC, Walter Bright wrote:
>>> On 5/25/2022 12:19 PM, H. S. Teoh wrote:
>>>> I wouldn't be against an explicit switch to disable bounds checks for
>>>> when you want to measure this.  But it should not be the default
>>>> behaviour of -release.
>>>
>>> It isn't. To turn off bounds check, you'll need -noboundscheck
>>>
>>> -release just turns off asserts.
>>
>> Hhh? You mean that's all -release does? Just turn off asserts? Nothing else (whatsoever)?
>
> https://d.godbolt.org/z/MjPe35Maz
>
> release does turn off bounds checking.

I'm gunna-hav-ta take your word for it ;-)

..(cause I can't read assembly, nor do I want to ;-)

But the fact that nobody seems to really know (even Walter!), is troubling, to say the least.

Perhaps someone well informed needs to write a brief article, so we can all learn what -release 'really' does.

May 26, 2022

On Wednesday, 25 May 2022 at 18:29:02 UTC, Alexandru Ermicioi wrote:

>

complained at disabled bounds checking in release mode as well as disabled contracts. So the opinion for release mode now leans towards more safety even for system code.

Maybe there should be a fine switch to meet the needs of different people .
For example,Like VIM which has many switches.

May 26, 2022

On Thursday, 26 May 2022 at 01:07:38 UTC, forkit wrote:

>

But the fact that nobody seems to really know (even Walter!), is troubling, to say the least.

Perhaps someone well informed needs to write a brief article, so we can all learn what -release 'really' does.

Well, I surely do know :-) And this is documented at least for GDC and LDC:

"man gdc":

       -frelease
           Turns on compiling in release mode, which means not emitting runtime
           checks for contracts and asserts.  Array bounds checking is not done for
           @system and @trusted functions, and assertion failures are undefined
           behavior.

           This is equivalent to compiling with the following options:

                   gdc -fno-assert -fbounds-check=safe -fno-invariants \
                       -fno-postconditions -fno-preconditions -fno-switch-errors

"ldc2 --help"

 --release  - Compile release version, defaulting to disabled
              asserts/contracts/invariants, and bounds checks in
              @safe functions only

But "man dmd" isn't helpful at all:

       -release
              Compile release version

Still DMD behaves in the same way as the other compilers.

May 26, 2022

On Thursday, 26 May 2022 at 02:04:18 UTC, Siarhei Siamashka wrote:

>

But "man dmd" isn't helpful at all:

       -release
              Compile release version

Still DMD behaves in the same way as the other compilers.

https://dlang.org/dmd-linux.html#switch-release

May 26, 2022
https://issues.dlang.org/show_bug.cgi?id=23141
May 27, 2022
On Sunday, 22 May 2022 at 22:59:25 UTC, Walter Bright wrote:
> On 5/22/2022 2:33 AM, Max Samukha wrote:
>> [...] many systems using plugins try to recover from bugs in a plugin.
>> In a sense, the plugin itself becomes an input that the host has to
>> validate.
>
> This is a faulty system design. There's nothing stopping modules from corrupting the memory of the caller.

True.

> The correct approach is to run those modules as separate
> processes, where they can only corrupt themselves. It's why operating systems support processes and interprocess communications.

Why is this so rarely done? According to my experience one can use the ssh or the curl binary in a subprocess instead of using the libssh/libcurl in the caller's address space.

Apropos cURL: When eyeballing https://dlang.org/phobos/etc_c_curl.html I discern nothing. The same goes for https://dlang.org/phobos/etc_c_sqlite3.html both start with an unfathomable cloud of symbols. There is no structure, there are no concepts. I think both components are good candidates for using their binaries in a subprocess instead of pulling their library code into the own address space.


May 28, 2022
On 28/05/2022 7:27 AM, kdevel wrote:
> Apropos cURL: When eyeballing https://dlang.org/phobos/etc_c_curl.html I discern nothing. The same goes for https://dlang.org/phobos/etc_c_sqlite3.html both start with an unfathomable cloud of symbols. There is no structure, there are no concepts. I think both components are good candidates for using their binaries in a subprocess instead of pulling their library code into the own address space.

Those are bindings.

They are not meant to have structure. They exist so that the D compiler can understand the non-D symbols.
May 27, 2022
On Friday, 27 May 2022 at 19:36:24 UTC, rikki cattermole wrote:
>
> On 28/05/2022 7:27 AM, kdevel wrote:
>> [...]
>> https://dlang.org/phobos/etc_c_curl.html I discern nothing. The same goes for https://dlang.org/phobos/etc_c_sqlite3.html [...]
>
> Those are bindings.
>
> They are not meant to have structure. They exist so that the D compiler can understand the non-D symbols.

dmd or gdc read those html files? I doubt that.
May 28, 2022
On 28/05/2022 7:43 AM, kdevel wrote:
> dmd or gdc read those html files? I doubt that.

What html files? All the documentation is generated from D files.

https://github.com/dlang/phobos/blob/master/etc/c/curl.d
May 29, 2022

On Friday, 29 April 2022 at 14:56:37 UTC, Paul Backus wrote:

>

On Friday, 29 April 2022 at 07:56:15 UTC, bauss wrote:

>

I think his point was that D seems to favor library-only solutions in a lot of cases and then the syntactic sugar is never added properly.

No matter how good your library solutions are then you can never implement async/await in a clear fashion without the compiler emitting you a state machine for it.

The dirty secret here is that the code quality of the DMD fronted has deteriorated to the point where it is basically impossible to do a correct, complete implementation of any non-trivial language feature. So we can either have a library solution that works, but has ugly syntax; or we can have a language solution that has nice syntax, but doesn't work.

wow