On Thursday, 12 August 2021 at 02:03:39 UTC, Adam D Ruppe wrote:
On Thursday, 12 August 2021 at 01:53:12 UTC, frame wrote:
Is this a known DMD bug or feature?
Huh that is weird, it works correctly in gdc but i can
reproduce in dmd and ldc. And removing the debug keyword makes
it work. Certai
On Thursday, 12 August 2021 at 01:53:12 UTC, frame wrote:
Is this a known DMD bug or feature?
Huh that is weird, it works correctly in gdc but i can reproduce
in dmd and ldc. And removing the debug keyword makes it work.
Certainly smells like a regression bug to me.
Is this a known DMD bug or feature?
```d
void f(T)(int num)
{
writefln("recognized %d as %s", num, T.stringof);
}
void main()
{
try
{
throw new Exception("");
}
catch (Exception)
{
f!Exception(1);
}
catch (Throwable)
{
f!Throwable(1);
On Wednesday, 11 August 2021 at 19:17:40 UTC, jfondren wrote:
On Wednesday, 11 August 2021 at 19:16:25 UTC, jfondren wrote:
With two dashes:
```
default:
{
switches = [
"-defaultlib=phobos2-ldc,druntime-ldc",
"-link-defaultlib-shared=false",
"--linker=", // <-- add t
On Wednesday, 11 August 2021 at 19:38:38 UTC, Tejas wrote:
On Wednesday, 11 August 2021 at 19:27:34 UTC, Ali Çehreli wrote:
On 8/11/21 12:19 PM, Tejas wrote:
Atleast leave some pointers on where to start :(
I DuckDuckGo'ed it for you. :)
https://en.cppreference.com/w/cpp/language/memory_m
On Wednesday, 11 August 2021 at 19:27:34 UTC, Ali Çehreli wrote:
On 8/11/21 12:19 PM, Tejas wrote:
Atleast leave some pointers on where to start :(
I DuckDuckGo'ed it for you. :)
https://en.cppreference.com/w/cpp/language/memory_model
Then looked it up at Wikipedia too:
https://en.wiki
On 8/11/21 12:19 PM, Tejas wrote:
Atleast leave some pointers on where to start :(
I DuckDuckGo'ed it for you. :)
https://en.cppreference.com/w/cpp/language/memory_model
Then looked it up at Wikipedia too:
https://en.wikipedia.org/wiki/Memory_model_(programming)
Ali
On Wednesday, 11 August 2021 at 19:04:50 UTC, Ali Çehreli wrote:
This is an interesting thread but "memory model" does not cover
or mean all of the points discussed here. I can't define it
precisely, so I'm leaving it to interested parties to search
for themselves. :)
Ali
A little bit of sp
On Wednesday, 11 August 2021 at 19:10:09 UTC, _ZZ_ZZ_ZZ wrote:
On Wednesday, 11 August 2021 at 18:58:16 UTC, jfondren wrote:
confirm the location of ldc2.conf with `ldc2 -v`, then edit
that file. Mine was at ../usr/etc/ldc2.conf (relative to $HOME)
Mine was at `/data/data/com.termux/files/usr/
On Wednesday, 11 August 2021 at 19:16:25 UTC, jfondren wrote:
With two dashes:
```
default:
{
switches = [
"-defaultlib=phobos2-ldc,druntime-ldc",
"-link-defaultlib-shared=false",
"--linker=", // <-- add this
];
```
On Wednesday, 11 August 2021 at 18:58:16 UTC, jfondren wrote:
confirm the location of ldc2.conf with `ldc2 -v`, then edit
that file. Mine was at ../usr/etc/ldc2.conf (relative to $HOME)
Mine was at `/data/data/com.termux/files/usr/etc/ldc2.conf` too.
Now, the file contains:
```
$ cat ldc2.conf
This is an interesting thread but "memory model" does not cover or mean
all of the points discussed here. I can't define it precisely, so I'm
leaving it to interested parties to search for themselves. :)
Ali
On Wednesday, 11 August 2021 at 18:46:44 UTC, _ZZ_ZZ_ZZ wrote:
On Wednesday, 11 August 2021 at 18:20:13 UTC, Paul Backus wrote:
Maybe try compiling with `--linker=` (nothing after the `=`
sign) and see if that helps?
YOU ARE MY HERO!!!
it works, and it's great!
But in any case ... Can i confi
On Wednesday, 11 August 2021 at 18:20:13 UTC, Paul Backus wrote:
Maybe try compiling with `--linker=` (nothing after the `=`
sign) and see if that helps?
YOU ARE MY HERO!!!
it works, and it's great!
But in any case ... Can i configure the compiler to automatically
execute the `--linker =` fla
On Wednesday, 11 August 2021 at 17:17:23 UTC, _ZZ_ZZ_ZZ wrote:
After having downloaded `ldc` in Termux, i have tried to create
an example script (obviously, D-program) and after having
compiled it, it gives an error.
```
$ vim example_program.d
$ ldc2 example_program.d
clang-12: error: invalid
After having downloaded `ldc` in Termux, i have tried to create
an example script (obviously, D-program) and after having
compiled it, it gives an error.
```
$ vim example_program.d
$ ldc2 example_program.d
clang-12: error: invalid linker name in argument '-fuse-ld=bfd'
Error: /data/data/com.ter
On Wednesday, 11 August 2021 at 14:08:59 UTC, Paul Backus wrote:
[snip]
Should have read further--this does not work with template
functions due to [issue 1807.][1] My mistake.
[1]: https://issues.dlang.org/show_bug.cgi?id=1807
Looks like that strengthens the case for moving forward with
D
On Wednesday, 11 August 2021 at 14:08:59 UTC, Paul Backus wrote:
On Wednesday, 11 August 2021 at 14:03:50 UTC, Paul Backus wrote:
On Wednesday, 11 August 2021 at 14:00:33 UTC, Steven
Schveighoffer wrote:
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If I
On Wednesday, 11 August 2021 at 14:03:50 UTC, Paul Backus wrote:
On Wednesday, 11 August 2021 at 14:00:33 UTC, Steven
Schveighoffer wrote:
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If I try to bind the T only, and produce a partial template
function
On Wednesday, 11 August 2021 at 11:44:42 UTC, Steven
Schveighoffer wrote:
On 8/11/21 5:31 AM, tastyminerals wrote:
[...]
`dub -b unittest` should work (you don't need the extra build
type stuff)
dub test does something funky -- it removes the *whole module*
where your main function is (if
On Wednesday, 11 August 2021 at 14:00:33 UTC, Steven
Schveighoffer wrote:
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If I try to bind the T only, and produce a partial template
function which can accept any number of parameters, but has T
already spec
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If I try to bind the T only, and produce a partial template
function which can accept any number of parameters, but has T
already specified, I get an error, because instantiating `foo!T`
means Args is length
On 8/11/21 5:31 AM, tastyminerals wrote:
I would like to trigger tests in a simple dub project.
```
source/my_script.d
dub.json
```
Here is a dub config:
```json
{
"targetPath": "build",
"targetType": "executable",
"sourcePaths": ["source"],
"name": "my_script",
"buildT
On Wednesday, 11 August 2021 at 09:38:13 UTC, tastyminerals wrote:
Hahaha, I fixed it by renaming the `my_script.d` to `app.d`. Oh
boy.
What you want is the `mainSourceFile` entry. From the dub
documentation, [under "Build Settings"][1]:
Determines the file that contains the main() functi
On Wednesday, 11 August 2021 at 05:33:06 UTC, Tejas wrote:
On Tuesday, 10 August 2021 at 21:19:39 UTC, Bastiaan Veelo
wrote:
On Tuesday, 10 August 2021 at 16:00:37 UTC, Tejas wrote:
Basically, what are the subtle gotcha's in the differences
between C++ and D code that looks similar
The only g
On Wednesday, 11 August 2021 at 09:31:46 UTC, tastyminerals wrote:
I would like to trigger tests in a simple dub project.
```
source/my_script.d
dub.json
```
Here is a dub config:
```json
{
"targetPath": "build",
"targetType": "executable",
"sourcePaths": ["source"],
I would like to trigger tests in a simple dub project.
```
source/my_script.d
dub.json
```
Here is a dub config:
```json
{
"targetPath": "build",
"targetType": "executable",
"sourcePaths": ["source"],
"name": "my_script",
"buildTypes": {
"relea
On Wednesday, 11 August 2021 at 09:31:46 UTC, tastyminerals wrote:
I would like to trigger tests in a simple dub project.
```
source/my_script.d
dub.json
```
Here is a dub config:
```json
{
"targetPath": "build",
"targetType": "executable",
"sourcePaths": ["source"],
On Wednesday, 11 August 2021 at 06:46:34 UTC, Stefan Koch wrote:
On Wednesday, 11 August 2021 at 06:29:40 UTC, Tejas wrote:
```d
import std;
void main()
{
int[40] staticA;
auto c = staticA[0..50];//mistake
}```
results in:
```d
core.exception.RangeError@onlineapp.d(5): Range violation
-
29 matches
Mail list logo