On Wednesday, 24 April 2024 at 19:50:45 UTC, Chris Piker wrote:
Hi D
I have a somewhat extensive CGI based web service written in
Python and I'd like to port it to D. I can do this manually of
course, and maybe that's the best way, but for a rough start,
is anyone aware of any tools that gen
On Saturday, 24 June 2023 at 15:16:37 UTC, Cecil Ward wrote:
I have LDC running on an ARM Mac. If anyone else out there is
an LDC or GDC user, could you knock up a quick shell program to
compile and link a .d file to produce an executable ? found the
linker but these tools are all new to me and
On Sunday, 29 January 2023 at 21:45:11 UTC, Ruby the Roobster
wrote:
I'm trying to do something like
```d
void main()
{
auto d = &c;
*d.writeln;
}
void c()
{
}
```
In an attempt to get the hexadecimal representation of the
machine code of a function. Of course, function pointers
can
On Sunday, 1 January 2023 at 21:11:06 UTC, Ogi wrote:
I’ve read this [series if
articles](https://www.gamedeveloper.com/design/decision-modeling-and-optimization-in-game-design-part-1-introduction) about using Excel Solver for all kinds of optimization problems. This is very neat, but of course,
On Wednesday, 16 November 2022 at 23:00:40 UTC, Adam D Ruppe
wrote:
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics
wrote:
[...]
It would be pretty cool if you could just mark `@wasm` on a
function and have it magically convert... the dcompute thing i
*think* does something li
On Tuesday, 8 November 2022 at 00:05:18 UTC, vushu wrote:
Any where to find learning material for using dmd as a library?
thanks.
What do you want to do with it.
On Thursday, 27 October 2022 at 18:41:36 UTC, Dennis wrote:
On Thursday, 27 October 2022 at 17:17:01 UTC, ab wrote:
How can I prevent the compiler from removing the code I want
to measure?
With many C compilers, you can use volatile assembly blocks for
that. With LDC -O3, a regular assembly b
On Thursday, 14 July 2022 at 13:00:24 UTC, ryuukk_ wrote:
On Thursday, 14 July 2022 at 05:30:58 UTC, Siarhei Siamashka
wrote:
On Tuesday, 12 July 2022 at 13:23:36 UTC, ryuukk_ wrote:
I wonder if DMD/LDC/GDC have built in tools to profile and
track performance
Linux has a decent system wide pr
On Monday, 11 July 2022 at 18:15:16 UTC, Ivan Kazmenko wrote:
Hi.
I'm looking at the compiler output of DMD (-O -release), LDC
(-O -release), and GDC (-O3) for a simple array operation:
```
void add1 (int [] a)
{
foreach (i; 0..a.length)
a[i] += 1;
}
```
Here are the outputs: htt
On Monday, 11 July 2022 at 00:19:23 UTC, Era Scarecrow wrote:
On Friday, 8 July 2022 at 15:32:44 UTC, Rob T wrote:
[...]
There was a discussion on this not long ago. Walter tried
implementing it recently too, though I'm guessing he gave up.
[...]
Note that you're replying to a message con
On Monday, 20 June 2022 at 17:48:48 UTC, Antonio wrote:
Is there any way to specify that a variable, member or
parameter can't be null?
You can use an invariant if it's a member of an aggregate but be
warned that these are only checked at the boundaries of public
member functions.
On Monday, 6 June 2022 at 15:13:45 UTC, rempas wrote:
I tried to find anything that will show code but I wasn't able
to find anything expect for an answer on stackoverflow. I would
find a lot of theory but no practical code that works. What I
want to do is allocate memory (with execution mappin
On Tuesday, 7 June 2022 at 09:12:25 UTC, ag0aep6g wrote:
On 07.06.22 11:00, max haughton wrote:
On Tuesday, 7 June 2022 at 08:56:29 UTC, ag0aep6g wrote:
[...]
That wasn't mw's question.
I also answered this in my original one IIRC.
You didn't.
Ok I must have assumed it was obvious it wou
On Tuesday, 7 June 2022 at 08:56:29 UTC, ag0aep6g wrote:
On 07.06.22 03:02, max haughton wrote:
I'm talking about the data in the array.
void[] might contain pointers, float[] does not so it won't be
scanned.
That wasn't mw's question.
I also answered this in my original one IIRC. There's
On Tuesday, 7 June 2022 at 00:40:56 UTC, ag0aep6g wrote:
On 07.06.22 00:22, max haughton wrote:
float[] doesn't contain pointers, so the GC won't do anything
to or with it.
wat
float[] is a pointer (plus a length). The GC will deal with it
like any other pointer.
I'm talking about the data
On Monday, 6 June 2022 at 22:18:08 UTC, mw wrote:
Hi,
Suppose I have this code:
```
class GCAllocated {
float[] data;
this() {
// non-gc-allocated field
this.data = cast(float[])(core.stdc.stdlib.malloc(nBytes)[0
.. nBytes]);
}
}
void foo() {
auto obj = new GCAllocated(); /
On Sunday, 22 May 2022 at 20:05:33 UTC, Chris Piker wrote:
On Sunday, 22 May 2022 at 19:33:21 UTC, rikki cattermole wrote:
I should probably jump back to another thread, but maybe one
more reply isn't too much off topic discussion...
[...]
https://github.com/gcc-mirror/gcc/tree/master/gcc/t
On Saturday, 21 May 2022 at 19:00:04 UTC, Johan wrote:
On Tuesday, 17 May 2022 at 06:28:10 UTC, cc wrote:
On Monday, 16 May 2022 at 15:08:15 UTC, H. S. Teoh wrote:
[...]
According to the dlang.org wiki entry for LDC:
[...]
So I'm not touching it for now.
Lol, what?
Don't misquote the wi
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
Learning D is almost a complete blur in my memory but I
distinctly re
On Friday, 13 May 2022 at 21:07:12 UTC, Christopher Katko wrote:
Is there any way we can get numbered errors like C++ /
Microsoft have?
E2040 Declaration terminated incorrectly
Because then we could easily have a wiki for common error cases
with code snippets of it occurring, and a fix for i
On Friday, 13 May 2022 at 17:51:55 UTC, Ozan Süel wrote:
Hi
My situation: I'm working on and with many projects based on
many libraries. I know how to handle these in Git, GitHub and
Dub. But what would be the Best Practice in current dub?
Let's say, we have many apps (1 app = 1 package), whi
On Saturday, 30 April 2022 at 18:18:02 UTC, Dukc wrote:
I have figured out that my development build of Phobos is for
some reason including instances of `__cmp` and `dstrcmp`
templates from DRuntime in the Phobos binary. Since `-betterC`
client code does not link Phobos in, it fails if it tries
On Thursday, 21 April 2022 at 05:49:12 UTC, Alain De Vos wrote:
Following program:
```
import std.stdio;
void main() @trusted
{
int *p=null;
void myfun(){
int x=2;
p=&x;
writeln(p);
writeln(x);
}
myfun();
*p=16;
writeln(p);
writeln(*p);
}
```
outputs :
7FFFD
On Sunday, 17 April 2022 at 03:00:28 UTC, Elfstone wrote:
I'm reading some d-sources, and it looks like they pass big
structs by value.
Such as:
Matrix4x4f opBinary(string op)(Matrix4x4f rhs) { ... }
I came from a C++ background, and I would have written:
Matrix4x4f opBinary(string op
On Saturday, 26 February 2022 at 22:25:46 UTC, Chris Piker wrote:
Hi D
I'm trying out the vibe.d framework for the first time and it
looks like many of the functions mutate some hidden global
state. Take for example `listenTCP`. To help me build a
mental picuture of the framework I'd like t
On Saturday, 26 February 2022 at 17:06:06 UTC, Remi Thebault
wrote:
On Saturday, 26 February 2022 at 12:01:14 UTC, max haughton
wrote:
Getting the UDAs from inside a symbol must be done via a
recursive procedure in the same manner one would identify the
aforementioned symbol i.e. you have to
On Saturday, 26 February 2022 at 11:38:16 UTC, Remi Thebault
wrote:
On Saturday, 26 February 2022 at 11:26:54 UTC, max haughton
wrote:
On Saturday, 26 February 2022 at 10:39:18 UTC, Remi Thebault
wrote:
Hi all,
I'm trying to establish a REST API by using the type system
(used in both client a
On Saturday, 26 February 2022 at 10:39:18 UTC, Remi Thebault
wrote:
Hi all,
I'm trying to establish a REST API by using the type system
(used in both client and server code).
[...]
https://dlang.org/phobos/std_traits.html#getUDAs
On Monday, 7 February 2022 at 14:20:31 UTC, Arjan wrote:
On Monday, 7 February 2022 at 13:14:19 UTC, max haughton wrote:
On Monday, 7 February 2022 at 12:16:53 UTC, Arjan wrote:
In c++ our release builds are build `-O2 -g` and the
resulting binaries are stripped with GNU/strip.
Is this also po
On Monday, 7 February 2022 at 12:16:53 UTC, Arjan wrote:
In c++ our release builds are build `-O2 -g` and the resulting
binaries are stripped with GNU/strip.
Is this also possible with LDC2 generated binaries for D code?
So build D code with `-O2 -g` and then strip the resulting
binary?
Why b
On Saturday, 29 January 2022 at 18:28:06 UTC, Ali Çehreli wrote:
On 1/29/22 10:04, Salih Dincer wrote:
> Could you also try the following code with the same
configurations?
The program you posted with 2 million random values:
ldc 1.9 seconds
gdc 2.3 seconds
dmd 2.8 seconds
I understand such s
On Wednesday, 29 December 2021 at 16:51:47 UTC, rempas wrote:
On Wednesday, 29 December 2021 at 16:27:22 UTC, max haughton
wrote:
Inlining + constant propagation. Fancier iterations on those
exist too but 90% of the speedup will come from those since
for it to matter they likely would've been u
On Wednesday, 29 December 2021 at 15:53:38 UTC, rempas wrote:
On Wednesday, 29 December 2021 at 11:09:04 UTC, max haughton
wrote:
If the value is known at compile time the compiler can pretty
easily do that for you unless you're really unlucky.
How is this even possible?
Inlining + constant
On Wednesday, 29 December 2021 at 08:56:47 UTC, rempas wrote:
On Tuesday, 28 December 2021 at 22:26:33 UTC, max haughton
wrote:
Why do you need this? What's wrong with a normal branch in
this case.
Runtime performance. I want the value to get checked at compile
time and use "static if" with i
On Tuesday, 28 December 2021 at 21:19:29 UTC, rempas wrote:
I would like to know if that's possible. Actually I would like
to do something like the following:
```
extern (C) void main() {
void print_num(int num, comp_time_type int mul) {
static if (is(mul == ten)) {
printf("%d\n", n
On Sunday, 26 December 2021 at 21:22:42 UTC, Adam Ruppe wrote:
On Sunday, 26 December 2021 at 20:50:39 UTC, rempas wrote:
[...]
write just transfers a sequence of bytes. It doesn't know nor
care what they represent - that's for the receiving end to
figure out.
[...]
You are mistaken. Th
On Sunday, 26 December 2021 at 06:10:03 UTC, Era Scarecrow wrote:
This is curious. I was up for trying to parallelize my code,
specifically having a block of code calculate some polynomials
(*Related to Reed Solomon stuff*). So I cracked open
std.parallel and looked over how I would manage thi
On Friday, 12 November 2021 at 11:32:16 UTC, rempas wrote:
On Thursday, 11 November 2021 at 19:22:33 UTC, max haughton
wrote:
There's an attribute to tell it the function is safe to inline.
And can't you do that with inline asm?
Not always. The attribute is intended for naked asm since
inl
On Thursday, 11 November 2021 at 17:29:33 UTC, rempas wrote:
On Thursday, 11 November 2021 at 13:22:15 UTC, Basile B. wrote:
Yes, this is still the case. A particularity of DMD inliner is
that it does its job in the front-end, so inlining asm is
totally impossible. Then, even if inlining was
On Sunday, 3 October 2021 at 22:21:45 UTC, Tim wrote:
Hi all,
I am currently using GDB within VScode with the -gc DMD2
compiler switch and my debugging is not amazing. Whenever I
inspect a struct/object it just shows me the pointer rather
than the object information and strings come up as a g
On Saturday, 2 October 2021 at 18:05:06 UTC, Dennis wrote:
On Saturday, 2 October 2021 at 16:57:48 UTC, max haughton wrote:
Do you have optimizations turned on? i.e. are you compiling
with -O by accident?
Not needed, it's declared:
```D
pragma(inline, true) @property _timezone() @safe const pu
On Saturday, 2 October 2021 at 14:44:16 UTC, Padlev wrote:
On Saturday, 2 October 2021 at 13:26:27 UTC, Adam D Ruppe wrote:
On Saturday, 2 October 2021 at 13:24:19 UTC, Padlev wrote:
-o-
how to run only semantic and avoid codegen to have a quicker
run?
-o- does skip codegen already
so
On Friday, 1 October 2021 at 19:23:06 UTC, james.p.leblanc wrote:
D-ers,
After experimenting with ldc's autovectorization of avx code,
it appears there may
be counter-intuitiveness to the autovectorization (especially
for complex numbers).
(My comment may be wrong, so any corrections are quit
On Tuesday, 14 September 2021 at 05:06:01 UTC, Elronnd wrote:
On Tuesday, 14 September 2021 at 03:24:45 UTC, max haughton
wrote:
On Tuesday, 14 September 2021 at 03:19:46 UTC, Elronnd wrote:
On Monday, 13 September 2021 at 11:40:10 UTC, max haughton
wrote:
The dragon book barely mentions SSA f
On Tuesday, 14 September 2021 at 03:31:17 UTC, Kenneth Dallmann
wrote:
On Sunday, 27 March 2011 at 10:28:00 UTC, Ishan Thilina wrote:
[...]
I had the exact same problem, very frustrating. I believe I
solved the issue,
it was a simple error.
When you are installing D, on Windows, it as
On Tuesday, 14 September 2021 at 03:19:46 UTC, Elronnd wrote:
On Monday, 13 September 2021 at 11:40:10 UTC, max haughton
wrote:
The dragon book barely mentions SSA for example
In fairness, dmd doesn't use SSA either
That's not a good thing.
On Monday, 13 September 2021 at 04:08:53 UTC, rikki cattermole
wrote:
On 13/09/2021 3:21 PM, leikang wrote:
Are there any recommended books or videos to learn about the
principles of compilation? What else should I learn besides
the principles of compilation?
The classic book on compilers th
On Monday, 13 September 2021 at 00:53:06 UTC, leikang wrote:
I want to contribute to the development of the dlang language,
but I feel that I am insufficient, so I want to ask the big
guys, can I participate in the development of the Dlang
language after learning the principles of compilation?
On Monday, 21 June 2021 at 04:12:55 UTC, someone wrote:
I mean, coding as following:
```d
int intWhatever = 0; /// default being zero anyway
foreach (classComputer objComputer, objComputers) { ... } ///
explicitly declaring the type instead of letting the compiler
to figure it out
struc Wha
On Friday, 5 March 2021 at 20:13:54 UTC, Jack wrote:
On Friday, 5 March 2021 at 20:10:39 UTC, Max Haughton wrote:
On Friday, 5 March 2021 at 20:03:58 UTC, Jack wrote:
On Friday, 5 March 2021 at 09:23:29 UTC, Mike Parker wrote:
On Friday, 5 March 2021 at 05:31:38 UTC, Jack wrote:
[...]
https
On Friday, 5 March 2021 at 20:03:58 UTC, Jack wrote:
On Friday, 5 March 2021 at 09:23:29 UTC, Mike Parker wrote:
On Friday, 5 March 2021 at 05:31:38 UTC, Jack wrote:
The following code returns a memory error. I did notice it
did happens whenever I did a memory allocation. Is this not
possible
On Thursday, 4 March 2021 at 22:30:17 UTC, tastyminerals wrote:
I got a company MacBook with M1 chip and gradually migrate all
the stuff from Linux machine. I got precompiled ldc binary
installed without any problem now is the time for dub since I
have couple of D projects I use at work and all
On Sunday, 28 February 2021 at 09:18:56 UTC, Rumbu wrote:
On Sunday, 28 February 2021 at 09:04:49 UTC, Rumbu wrote:
On Sunday, 28 February 2021 at 07:05:27 UTC, Jack wrote:
I'm using a windows callback function where the user-defined
value is passed thought a LPARAM argument type. I'd like to
On Monday, 22 February 2021 at 07:14:26 UTC, 9il wrote:
On Sunday, 21 February 2021 at 16:18:05 UTC, Kyle Ingraham
wrote:
I am trying to convert sRGB pixel values to XYZ with mir using
the following guide:
http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
[...]
mir-glas is de
On Friday, 19 February 2021 at 10:18:28 UTC, Preetpal wrote:
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base
(it is not large). I do not anticipate interop being an issue.
[...]
C++ interop is used every day. The LLVM
On Wednesday, 10 February 2021 at 13:31:09 UTC, Guillaume Piolat
wrote:
On Wednesday, 10 February 2021 at 11:52:51 UTC, JG wrote:
[...]
Here is what I use for sampling profiler:
(On Windows)
Build with LDC, x86_64, with dub -b release-debug in order to
have debug info.
Run your program int
On Tuesday, 9 February 2021 at 19:53:27 UTC, Temtaime wrote:
On Sunday, 7 February 2021 at 14:13:18 UTC, vitamin wrote:
Why using 'new' is allowed in pure functions but calling
GC.addRange or GC.removeRange isn't allowed?
pure is broken. Just don't [use it]
[Citation needed]
On Thursday, 4 February 2021 at 20:54:15 UTC, Ali Çehreli wrote:
On 2/3/21 8:44 AM, Marcone wrote:
[...]
I think the following would be improvements:
>[...]
I don't know the protocol but obviously 8192 must be sufficient.
[...]
Less calls to std.conv can also mean less surface area fo
On Wednesday, 3 February 2021 at 05:30:37 UTC, Виталий Фадеев
wrote:
Reason:
Reuse component,
bind custom callback without creating new class.
Concept example:
class SaveFilePopup
{
void onSuccess() { /* default operations */ }
}
auto saveFile = new SaveFilePopup
On Wednesday, 3 February 2021 at 07:20:06 UTC, Imperatorn wrote:
As the title says:
1. Are there any (automated) refactoring tools for D?
2. If not, why? (Is D still too small?)
D is also designed to not need as much refactoring as other
languages, so even for our size there isn't a huge amou
On Saturday, 30 January 2021 at 16:42:35 UTC, frame wrote:
Is there a way to force the GC to re-use memory in already
existing pools?
I set maxPoolSize:1 to gain pools that can be quicker released
after there no longer in use. This already reduces memory usage
to 1:3. Sadly the application cr
On Friday, 15 January 2021 at 21:49:07 UTC, H. S. Teoh wrote:
On Fri, Jan 15, 2021 at 09:04:13PM +, welkam via
Digitalmars-d-learn wrote:
[...]
As the joke goes, "you can write assembly code in any
language". :-D If you code in a sloppy way, it doesn't matter
what language you write in,
On Tuesday, 5 January 2021 at 19:42:40 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 5 January 2021 at 18:23:25 UTC, sighoya wrote:
No error handling model was the HIT and will never be,
therefore I would recommend to leave things as they are and to
develop alternatives and not to replace existin
On Friday, 25 December 2020 at 21:25:40 UTC, sighoya wrote:
I've read a bit in Dlang traits.
It now has the ability to retrieve all method signatures of an
overload set.
Big plus from me.
Is generally possible to get the declaration of a
type/module/value as string in traits?
I didn't have
On Sunday, 20 December 2020 at 13:51:08 UTC, Rekel wrote:
I found a lot of the Phobos documentation to contain template
arguments and if statements that made no sense to me, for
example:
```
uint readf(alias format, A...) (
auto ref A args
)
if (isSomeString!(typeof(format)));
uint readf(A.
On Sunday, 6 December 2020 at 11:35:17 UTC, Ola Fosheim Grostad
wrote:
On Sunday, 6 December 2020 at 11:27:39 UTC, Max Haughton wrote:
[...]
No, unique doesnt need indirection, neither does ARC, we put
the ref count at a negative offset.
shared_ptr is a fat pointer with the ref count as a s
On Sunday, 6 December 2020 at 11:07:50 UTC, Ola Fosheim Grostad
wrote:
On Sunday, 6 December 2020 at 10:44:39 UTC, Max Haughton wrote:
On Sunday, 6 December 2020 at 05:29:37 UTC, Ola Fosheim
Grostad wrote:
It has to be either some kind of heavily customisable small GC
(i.e. with our resources t
On Sunday, 6 December 2020 at 05:29:37 UTC, Ola Fosheim Grostad
wrote:
On Sunday, 6 December 2020 at 05:16:26 UTC, Bruce Carneal wrote:
How difficult would it be to add a, selectable, low-latency GC
to dlang?
Is it closer to "we cant get there from here" or "no big deal
if you already have th
On Wednesday, 2 December 2020 at 00:08:55 UTC, ddcovery wrote:
On Tuesday, 1 December 2020 at 23:43:31 UTC, Max Haughton wrote:
On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote:
Yesterday I really shocked when, comparing one algorithm
written in javascript and the equivalent in D, ja
On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote:
Yesterday I really shocked when, comparing one algorithm
written in javascript and the equivalent in D, javascript
performed better!!!
[...]
Use ldc, rdmd can invoke it for you. DMD's optimizer is not even
close to as advanced as
On Wednesday, 25 November 2020 at 21:36:36 UTC, Q. Schroll wrote:
On Wednesday, 25 November 2020 at 21:16:15 UTC, Steven
Schveighoffer wrote:
I typically do:
make -f posix.mak std/.test
-Steve
For some reason, [1] says `make.exe` would be installed by the
DMD installer, but I found none. It
On Monday, 23 November 2020 at 01:20:04 UTC, data pulverizer
wrote:
Hi all,
I am trying to construct a tree data structure composed of
differently (statically) typed nodes. The basic case is a
binary tree. So you have a node like:
```
struct Node(T)
{
T value;
Node* next;
Node* prev;
}
On Monday, 16 November 2020 at 17:44:08 UTC, Vino wrote:
Hi All,
Request your suggestion, we have a program which call's an
api, the output of the api is parsed using json parser and the
result is stored in an array(Array!string[string] data), then
these stored result are inserted into MySQ
On Monday, 16 November 2020 at 17:03:32 UTC, Steven Schveighoffer
wrote:
On 11/14/20 5:44 PM, kdevel wrote:
$ dmd -version=X -i foo
$ ./foo
void A.bar(int s)
Is the latter behavior intended or a bug?
That seems like a bug. It shouldn't be less ambiguous because
you *added* an overload that
On Thursday, 15 October 2020 at 06:39:00 UTC, Patrick Schluter
wrote:
On Wednesday, 14 October 2020 at 20:32:51 UTC, Max Haughton
wrote:
On Wednesday, 14 October 2020 at 20:27:10 UTC, Jack wrote:
What was the reasoning behind this decision?
Andrei's std::allocator talk from a few years ago at
On Wednesday, 14 October 2020 at 20:27:10 UTC, Jack wrote:
What was the reasoning behind this decision?
Andrei's std::allocator talk from a few years ago at cppcon
covers this (amongst other things)
On Sunday, 11 October 2020 at 23:57:31 UTC, Ali Çehreli wrote:
I find D's %( and %) range format specifiers very useful:
import std.stdio;
import std.range;
void main() {
5.iota.writefln!"%(%s, %)"; // Prints 0, 1, 2, 3, 4
}
Are there similar features in other languages?
Thank you,
Ali
I
On Sunday, 4 October 2020 at 14:26:43 UTC, Anonymouse wrote:
On Saturday, 3 October 2020 at 23:47:32 UTC, Max Haughton wrote:
The guiding principle to your function parameters should be
correctness - if I am passing a big struct around, if I want
to take ownership of it I probably want to take
On Saturday, 3 October 2020 at 23:00:46 UTC, Anonymouse wrote:
I'm passing structs around (collections of strings) whose
.sizeof returns 432.
The readme for 2.094.0 includes the following:
This release reworks the meaning of in to properly support all
those use cases. in parameters will now b
On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote:
I have written something which may or may not be novel and I’m
wondering about how to distribute it to as many users as
possible, hoping others will find it useful. What’s the best
way to publish a D routine ?
[...]
GitHub is the b
On Thursday, 25 June 2020 at 03:35:00 UTC, repr-man wrote:
I have the code:
int[5] a = [0, 1, 2, 3, 4];
int[5] b = [5, 6, 7, 8, 9];
auto x = chain(a[], b[]).chunks(5);
writeln(x);
It produces a range of slices as is expected: [[0, 1, 2, 3, 4],
[5, 6, 7, 8, 9]]
However, when I define a functi
On Monday, 18 November 2019 at 00:20:12 UTC, Steven Schveighoffer
wrote:
I'm fighting some out of memory problems using DMD and some
super-template heavy code.
I have ideas on how to improve the situation, but it involves
redesigning a large portion of the design. I want to do it
incrementall
On Saturday, 2 November 2019 at 17:27:14 UTC, Martin Brezel wrote:
Is there a trick to execute only the test, defined in one file?
Or the Tests of a certain Module?
Or in general: How to avoid to execute all the tests, when
running "dub test"?
It doesn't has to be dub, though.
Not by default
On Tuesday, 8 October 2019 at 16:28:51 UTC, Marcel wrote:
I'm been thinking about using D in conjunction with C11 to
develop a set of applications with hard real-time requirements.
While initially the goal was to use C++ instead, it has become
clear that D's introspection facilities will offer
On Saturday, 24 August 2019 at 05:03:43 UTC, Jonathan M Davis
wrote:
On Friday, August 23, 2019 10:14:56 PM MDT lili via
Digitalmars-d-learn wrote:
Hi:
In C we can definition const int *ncp_to_cv;
or int * const cp_to_ncv;
How to do this in D.
D uses parens to restrict how much of th
On Tuesday, 13 August 2019 at 18:54:58 UTC, H. S. Teoh wrote:
On Tue, Aug 13, 2019 at 11:28:35AM -0700, Ali Çehreli via
Digitalmars-d-learn wrote: [...]
Summary: Ditch the linked list and put the elements into an
array. :)
[...]
+1. The linked list may have been faster 20 years ago, before
t
On Monday, 12 August 2019 at 10:41:57 UTC, GreatSam4sure wrote:
Pls I want to know if it is possible to build desktop app with
vibe.d just like nodejs. I am not satisfy with the GUI of Dlang
such as dlangui and gtkd. I don't think they have good styling
capabilities like HTML and CSS.
I will
On Sunday, 4 August 2019 at 18:22:30 UTC, matheus wrote:
On Sunday, 4 August 2019 at 18:15:30 UTC, Max Haughton wrote:
What do you want to do? If you just want to count to 255 then
use a foreach
This was just an example, what I'd like in this code is either:
Get an error (exception) when over
On Sunday, 4 August 2019 at 18:12:48 UTC, matheus wrote:
Hi,
The snippet below will produce an "infinite loop" because
obviously "ubyte u" will overflow after 255:
import std.stdio;
void main(){
ubyte u = 250;
for(;u<256;++u){
writeln(u);
}
}
Question: Is there a way (Fla
On Sunday, 28 July 2019 at 12:56:12 UTC, BoQsc wrote:
Right now, I'm thinking what is correct way to run another .d
script from a .d script. Do you have any suggestions?
You'd need to bring a compiler with you and then build it into a
shared library (then dlopen it).
To do this you'd need a
On Thursday, 25 July 2019 at 14:20:03 UTC, Ali Çehreli wrote:
On 07/25/2019 05:46 AM, Oleg B wrote:
On Thursday, 25 July 2019 at 12:34:15 UTC, rikki cattermole
wrote:
Those restrictions don't stop at runtime.
It's vary sad.
What reason for such restrictions? It's fundamental idea or
tempora
On Friday, 19 July 2019 at 15:30:25 UTC, Newbie2019 wrote:
for example:
void ASSERT(string fmt, string file = __FILE_FULL_PATH__,
size_t line = __LINE__, T...) (bool c, scope T a) @nogc {
assert(c, string, file, line);
}
but i get this error:
error.d(39): Error: found file when expecting
On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:
https://dlang.org/phobos/std_windows_registry.html
https://github.com/dlang/phobos/blob/master/std/windows/registry.d
Can someone provide some examples on how to:
set, change, receive something from the Windows registry using
Phobos std.wi
Is this a 64 or 32 bit compiler? Also could you post the source
code if possible?
You could try "--DRT-gcopt=profile:1" druntime flag to see if the
compiler is running out of memory for real
On Tuesday, 9 July 2019 at 17:48:52 UTC, Andrey wrote:
Hello,
I have got a problem with compile-time calulations.
I have some code generator that should create some long string
of code during CT and after generation I mixin it. If I run it
normally - in run time - then there is no error and I g
On Friday, 5 July 2019 at 16:25:10 UTC, Nick Treleaven wrote:
On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
static immutable arr = [1, 2];
You have to spell it out that the data is static.
Yes, I was wondering why the compiler doesn't statically
allocate it automaticall
On Thursday, 20 June 2019 at 19:09:11 UTC, Emmanuelle wrote:
Hello!
Is there any trait or Phobos function for transforming a
function/delegate/lambda/whatever's body into a string suitable
for `mixin(...)`? For example:
---
__traits(getBody, (int a, int b) => a + b); // returns "(int a,
int
On Wednesday, 19 June 2019 at 19:25:59 UTC, Jonathan M Davis
wrote:
On Wednesday, June 19, 2019 12:28:12 PM MDT XavierAP via
Digitalmars-d-learn wrote:
[...]
The DIPs are here: https://github.com/dlang/DIPs
[...]
DIP1014 has not been implemented in DMD or druntime yet, AFAIK
On Friday, 14 June 2019 at 18:07:11 UTC, Q. Schroll wrote:
Basically the headline. I want to try to implement my DIP. I've
already forked DMD from GitHub. Now, what would I have to do in
order to get a D compiler with my changes?
I have Windows on x86-64 and Visual Studio on my machine.
It m
1 - 100 of 104 matches
Mail list logo