On Thursday, 3 September 2020 at 15:12:14 UTC, Steven
Schveighoffer wrote:
int[int] aa;
aa[4] = 5;
auto b = aa[4];
How is this code broken? It's valid, will never throw, and
there's no reason that we should break it by adding an
exception into the mix.
int foo() nothrow {
return
On Thursday, 3 September 2020 at 11:12:49 UTC, user1234 wrote:
On Thursday, 3 September 2020 at 10:47:04 UTC, Curious wrote:
otherwise what you get as args are D dynamic arrays (a payload
made of .ptr and .length) so you can use std.file or std.stdio
to open a file using the "D main"
On Tuesday, 1 September 2020 at 20:39:58 UTC, Mike Brown wrote:
Is there an alternative that works with BetterC for dynamic
arrays?
You may give these a try:
https://github.com/aferust/dvector
For associative arrays: https://github.com/aferust/bcaa
On Thu, Sep 03, 2020 at 06:18:00PM +, Mike Brown via Digitalmars-d-learn
wrote:
[...]
> I did however, get taken in by how small and precise the D code was
> compared to my C++ equivalent. The templating is beautiful, I’m now
> considering writing in D rather than C++ as the smaller and
Hi again,
I now understand the issues at play. I get linking errors to the
druntime features. I now understand the earlier replies.
I was able to resolve all but TypeInfo errors from the suggested
druntime replacements. Coming from a C++ background - I’m not
even sure how I’m using TypeInfo
I tried to use a function from a library written in C++ in D.
I've been trying to use it in D. But I got an error in LNK2019
and the build failed.
So I created a simple static library as follows and built it.
```cpp
#pragma once
#include
namespace static_test {
void str_test(LPCSTR
On 9/3/20 10:43 AM, Jesse Phillips wrote:
On Tuesday, 1 September 2020 at 18:55:20 UTC, Steven Schveighoffer wrote:
On 9/1/20 2:20 PM, Jesse Phillips wrote:
Using RangeError is nice as it allows code to use array index inside
`nothrow.`
This is the big sticking point -- code that is nothrow
On Tuesday, 1 September 2020 at 18:55:20 UTC, Steven
Schveighoffer wrote:
On 9/1/20 2:20 PM, Jesse Phillips wrote:
Using RangeError is nice as it allows code to use array index
inside `nothrow.`
This is the big sticking point -- code that is nothrow would no
longer be able to use AAs. It
On 2020-09-03 14:41, glis-glis wrote:
Yes I already tried that, but I get the error
Error: only one main allowed. Previously found main at src/scripts/copy.d
Looks like DUB doesn't like multiple binaries?
Oh, multiple binaries, I missed that. You can try to add multiple
configurations [1].
On Thursday, 3 September 2020 at 13:31:01 UTC, Mike Parker wrote:
On Thursday, 3 September 2020 at 12:36:35 UTC, Thomas wrote:
My example code:
-
import std.stdio;
int main()
{
import gfm.math.matrix;
const int width = 800;
const int height = 600;
auto
On Thursday, 3 September 2020 at 12:36:35 UTC, Thomas wrote:
My example code:
-
import std.stdio;
int main()
{
import gfm.math.matrix;
const int width = 800;
const int height = 600;
auto projectionMatrix = mat4!(float).identity();
auto ratio =
On 9/3/20 3:36 PM, Thomas wrote:
Hi!
I am following some examples in C++ about how OpenGL is working. There
are great tutorials out there and most of it works also with D.
For my code I am using gfm.math.matrix (Version 8.0.3) to be able to
calculate the mouse position in a 3d world.
Now I
On Thursday, 3 September 2020 at 09:36:53 UTC, Jacob Carlborg
wrote:
On Thursday, 3 September 2020 at 08:22:25 UTC, glis-glis wrote:
I usually would just write a makefile for that, but I thought
I'd give DUB a go. Unfortunately, the DUB-documentation is a
little thin and I cannot find a way
On Thursday, 3 September 2020 at 11:14:14 UTC, tastyminerals
wrote:
I have a specific curl query that I want to use in a D script
via std.net.curl.
Here is the query:
curl -v -X POST
--data-urlencode "username=u...@gmail.net"
--data-urlencode "password=12345"
-H
Hi!
I am following some examples in C++ about how OpenGL is working.
There are great tutorials out there and most of it works also
with D.
For my code I am using gfm.math.matrix (Version 8.0.3) to be able
to calculate the mouse position in a 3d world.
Now I have some problems with the
I have a specific curl query that I want to use in a D script via
std.net.curl.
Here is the query:
curl -v -X POST
--data-urlencode "username=u...@gmail.net"
--data-urlencode "password=12345"
-H "Content-Type: application/x-www-form-urlencoded"
-H "Accept:
On Thursday, 3 September 2020 at 10:47:04 UTC, Curious wrote:
Given the following:
=a==
void main(string[] args)
{
FILE* fp = fopen(args[1].ptr, "r");
if (!fp) throw new Exception("fopen");
}
=b==
void main(string[] args)
{
FILE* fp = fopen(args[1].dup.ptr, "r");
On 9/3/20 1:47 PM, Curious wrote:
Given the following:
=a==
void main(string[] args)
{
FILE* fp = fopen(args[1].ptr, "r");
if (!fp) throw new Exception("fopen");
}
=b==
void main(string[] args)
{
FILE* fp = fopen(args[1].dup.ptr, "r");
if (!fp) throw new
Given the following:
=a==
void main(string[] args)
{
FILE* fp = fopen(args[1].ptr, "r");
if (!fp) throw new Exception("fopen");
}
=b==
void main(string[] args)
{
FILE* fp = fopen(args[1].dup.ptr, "r");
if (!fp) throw new Exception("fopen");
}
Why does a fail but
On Thursday, 3 September 2020 at 08:22:25 UTC, glis-glis wrote:
I usually would just write a makefile for that, but I thought
I'd give DUB a go. Unfortunately, the DUB-documentation is a
little thin and I cannot find a way to tell DUB
"compile all the files in the scripts folder and put the
Hi,
I have a few modules for parsing different file formats and a
folder with d-scripts using these parsers to perform
manipulations, extract information, ...
Until now, I just added
#!/usr/bin/env rdmd
to the d-scripts and run them that way, but I'd like to make the
scripts available to
21 matches
Mail list logo