On Tuesday, 22 July 2025 at 21:24:04 UTC, Andy Valencia wrote:
I'm trying to convince the library's sort() to order an array
of JSON objects, where the "name" field is the key for the
sort. The following is the closest I've come, but it's not
very close!
Closer than I thought. I just had to
I'm trying to convince the library's sort() to order an array of
JSON objects, where the "name" field is the key for the sort.
The following is the closest I've come, but it's not very close!
TIA (as always),
Andy
```d
import std.json : JSONValue;
import std.algorithm.sorting : sort;
void ma
On Tuesday, 22 July 2025 at 07:32:00 UTC, Serg Gini wrote:
On Monday, 21 July 2025 at 16:13:44 UTC, monkyyy wrote:
On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote:
But array doesn't look right..
If you want a balanced ("always sorted") structure with
"filter" (ability to make some req
On Monday, 21 July 2025 at 16:13:44 UTC, monkyyy wrote:
On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote:
But array doesn't look right..
If you want a balanced ("always sorted") structure with
"filter" (ability to make some requests for the data) - this
looks more like some Tree struct
On Monday, 21 July 2025 at 17:21:58 UTC, Albert wrote:
On Monday, 21 July 2025 at 17:08:17 UTC, Albert wrote:
How do I build & run the executable though?
Anyway with some perseverance I managed to build & run hello
world app. Thank you guys for your help.
Though I do think D could do so muc
On Monday, 21 July 2025 at 17:08:17 UTC, Albert wrote:
How do I build & run the executable though?
Anyway with some perseverance I managed to build & run hello
world app. Thank you guys for your help.
Though I do think D could do so much better with onboarding first
time users...
On Monday, 21 July 2025 at 16:42:31 UTC, Albert wrote:
Sorry to be blunt, but not great first impression so far. I'm
still trying to make this work, but stuck with no clue...
I think setting sodlib path in settings helped somewhat. At least
errors are gone and seems to have detected the build
On Monday, 21 July 2025 at 16:24:31 UTC, Luna wrote:
The script works by adding a special startup script to your
shell session; as such you may need to restart your mac for it
to fully work.
I've tried everything I can think of, now getting the following
errors:
```
Could not initialize dub
On Monday, 21 July 2025 at 14:25:57 UTC, Albert wrote:
Thanks, how do I get the beta/nightly version? Only one I see
is 0.23.1 from 2021. Thanks
It's an option in the code-d extension settings.
On Monday, 21 July 2025 at 14:32:49 UTC, Albert wrote:
On Monday, 21 July 2025 at 14:16:29 UTC, Luna wrote:
[...]
Thank you. This seems to have worked better! Though I am still
getting errors:
```
Could not initialize DCD for
```
and in the output get a lot of:
```
2025-07-21T15:30:59.455
On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote:
But array doesn't look right..
If you want a balanced ("always sorted") structure with
"filter" (ability to make some requests for the data) - this
looks more like some Tree structure
Your thinking in classical theory and textbook read
On Monday, 21 July 2025 at 14:15:07 UTC, Monkyyy wrote:
On Monday, 21 July 2025 at 08:31:42 UTC, Serg Gini wrote:
That filter is not aware of the data structure nor is that
array maintaining a sort
I'm not sure what you are trying to do.
But array doesn't look right..
If you want a balanced (
On Monday, 21 July 2025 at 14:16:29 UTC, Luna wrote:
The script I posted automates some of these steps by the way;
so you'll just have to set the paths correctly in the plugin
(/opt/SDKs/serve-d/bin/serve-d, /opt/SDKs/dcd/bin/dcd-server,
/opt/SDKs/dcd/bin/dcd-client); then set the serve-d versi
On Monday, 21 July 2025 at 14:10:44 UTC, Serg Gini wrote:
Also don't forget to switch the version of the "code-d"
extension to "beta/nightly". Stable is very old and not
updating properly.
Thanks, how do I get the beta/nightly version? Only one I see is
0.23.1 from 2021. Thanks
On Monday, 21 July 2025 at 13:29:23 UTC, Albert wrote:
Hi all,
I am completely new to D, wished to try it out and write a
small app in it. However, for the last couple hours I am ready
to pull my hair out as I have no idea how to compile even a
simplest hello world app.
I installed ldc and
On Monday, 21 July 2025 at 08:31:42 UTC, Serg Gini wrote:
On Friday, 18 July 2025 at 18:35:40 UTC, monkyyy wrote:
`shapes.filter(isnt:shapeenum.isstatic)`
https://forum.dlang.org/thread/apbcqxiifbsqdlrsl...@forum.dlang.org
I know its possible to make complex, datastructure aware
filters, but I
On Monday, 21 July 2025 at 14:10:44 UTC, Serg Gini wrote:
On Monday, 21 July 2025 at 13:29:23 UTC, Albert wrote:
[...]
I agree with Luna that installing from official GitHub Releases
are the easiest way.
There is also this project:
https://code.dlang.org/packages/ldcup
regarding serve-d -
On Monday, 21 July 2025 at 13:29:23 UTC, Albert wrote:
Hi all,
I am completely new to D, wished to try it out and write a
small app in it. However, for the last couple hours I am ready
to pull my hair out as I have no idea how to compile even a
simplest hello world app.
I installed ldc and
On Monday, 21 July 2025 at 13:52:52 UTC, Luna wrote:
On Monday, 21 July 2025 at 13:29:23 UTC, Albert wrote:
Hi all,
I am completely new to D, wished to try it out and write a
small app in it. However, for the last couple hours I am ready
to pull my hair out as I have no idea how to compile ev
Hi all,
I am completely new to D, wished to try it out and write a small
app in it. However, for the last couple hours I am ready to pull
my hair out as I have no idea how to compile even a simplest
hello world app.
I installed ldc and dub (nowhere on the download page did it even
mention t
On Friday, 18 July 2025 at 18:35:40 UTC, monkyyy wrote:
`shapes.filter(isnt:shapeenum.isstatic)`
https://forum.dlang.org/thread/apbcqxiifbsqdlrsl...@forum.dlang.org
I know its possible to make complex, datastructure aware
filters, but I never done it
what patterns do people use? lets say you
On Sunday, 20 July 2025 at 20:26:02 UTC, Salih Dincer wrote:
I want the program to end with the F6 key on my keyboard
instead of the tilde. I use Windows as the platform.
Thank you for all your responses. I checked the ASCII table, and
0x1A is indeed the character I was looking for. I'm not su
On Sunday, 20 July 2025 at 21:59:48 UTC, Steven Schveighoffer
wrote:
There is no F6 Unicode character. Are you seeing tildes when
you press F6 and thinking it’s an actual tilde in the stream?
When I press the F6 key, ^Z characters appear on the screen. I
want the program to terminate using t
On Sunday, 20 July 2025 at 20:26:02 UTC, Salih Dincer wrote:
On Sunday, 20 July 2025 at 12:32:17 UTC, user1234 wrote:
No problem here either. Where are you running the program from
(embedded terminal in an editor ? a terminal emulator ?). Are
you on Windows or Linux ?
I want the program to en
On Sunday, 20 July 2025 at 12:32:17 UTC, user1234 wrote:
No problem here either. Where are you running the program from
(embedded terminal in an editor ? a terminal emulator ?). Are
you on Windows or Linux ?
I want the program to end with the F6 key on my keyboard instead
of the tilde. I use
On Sunday, 20 July 2025 at 08:46:08 UTC, Salih Dincer wrote:
Hello D Language Forum!
I’m running the InputRange example below and it dutifully reads
from stdin until it spots a tilde, printing each character in
every loop iteration. I even tried to break out with F6 but
couldn’t get it to sto
I've tested your code on the source code itself and it works as
expected:
```
» ./salih2 < salih2.d
import std;
struct StdinByChar
{
@property bool empty()
{
if(isEmpty)
return true;
if(!hasChar)
{
auto buff = new char[1];
stdin.rawRead(buff);
if (buff[
Hello D Language Forum!
I’m running the InputRange example below and it dutifully reads
from stdin until it spots a tilde, printing each character in
every loop iteration. I even tried to break out with F6 but
couldn’t get it to stop. Curiously, swapping the tilde for the
'\t' character makes
On Saturday, 19 July 2025 at 00:23:28 UTC, Jonathan M Davis wrote:
If you're looking to operate on tags in audio files, then
there's https://code.dlang.org/packages/taglib-d, which might
do what you need, but I don't know much about it, so I can't
say for sure.
Thank you! That handles my ne
On Saturday, 19 July 2025 at 03:01:51 UTC, Richard (Rikki) Andrew
Cattermole wrote:
A quick look for dpq2 shows that by default it is configured to
use a static binding to PostgreSQL client library.
https://github.com/denizzzka/dpq2/blob/master/dub.json#L20
It explicitly adds a shared library
A quick look for dpq2 shows that by default it is configured to use a
static binding to PostgreSQL client library.
https://github.com/denizzzka/dpq2/blob/master/dub.json#L20
It explicitly adds a shared library dependency on it (``libs``
directive). Which is appropriate if you are on a posix sy
There isn't a pg.lib file in my PG17 installation on Win11 Pro -
the closest I see is postgres.lib. What did I miss?
- D source code
import dpq2;
import std.stdio;
void main() {
// Adjust credentials as needed
On Friday, July 18, 2025 4:47:04 PM Mountain Daylight Time Andy Valencia via
Digitalmars-d-learn wrote:
> Is anyone aware of a library like "tinytag" (a Python module)?
>
> https://github.com/devsnd/tinytag
>
> I guess I'll wrestle with porting it to dlang
Is anyone aware of a library like "tinytag" (a Python module)?
https://github.com/devsnd/tinytag
I guess I'll wrestle with porting it to dlang if there's nothing
available.
tinytag is nice, because it handles wav/ogg/flac/opus/mp3
uniformly.
Thanks,
Andy
On Friday, 18 July 2025 at 16:58:13 UTC, Luna wrote:
On Friday, 18 July 2025 at 16:50:07 UTC, realhet wrote:
On Friday, 18 July 2025 at 15:42:23 UTC, realhet wrote:
On Friday, 18 July 2025 at 15:25:04 UTC, Kagamin wrote:
ldc has libs in lib/mingw
libcmt and co are a part of the Windows SDK.
`shapes.filter(isnt:shapeenum.isstatic)`
https://forum.dlang.org/thread/apbcqxiifbsqdlrsl...@forum.dlang.org
I know its possible to make complex, datastructure aware filters,
but I never done it
what patterns do people use? lets say you have an always sorted
array and the user is asking for v
On Friday, 18 July 2025 at 16:50:07 UTC, realhet wrote:
On Friday, 18 July 2025 at 15:42:23 UTC, realhet wrote:
On Friday, 18 July 2025 at 15:25:04 UTC, Kagamin wrote:
ldc has libs in lib/mingw
Ok I was doing too much:
I uninstalled the whole sdk and it turned out It works
miraculously just
On Friday, 18 July 2025 at 15:42:23 UTC, realhet wrote:
On Friday, 18 July 2025 at 15:25:04 UTC, Kagamin wrote:
ldc has libs in lib/mingw
Ok I was doing too much:
I uninstalled the whole sdk and it turned out It works
miraculously just by itself:
`ldc2 win32_app.d -L/subsystem:windows` as si
On Friday, 18 July 2025 at 15:25:04 UTC, Kagamin wrote:
ldc has libs in lib/mingw
Please help me how to use it.
Currently I managed to compile a very simple example, after
installing win10 sdk:
I was happy that I don't even need to pass
--m64
--line-internally
Because it was defaulted.
I onl
ldc has libs in lib/mingw
Hello,
What are the minimal environment to do generate win32 64bit
windoswed exe's nowadays?
Can I do it with only these two?
- LDC2 release
- and a few static lib files extracted from the windows 10 sdk
Is it right?
Is there a way to avoid that 2 gigabytes of SDK somehow?
Is it possible to a
On Thursday, 17 July 2025 at 18:56:08 UTC, Dukc wrote:
- You won't be able to do much anything with `void[]` in
`@safe` code.
Thanks, I realized that was missing from the docs. Copying into
`void[]` is not allowed in @safe code.
https://github.com/dlang/dlang.org/pull/4262
On Wednesday, 16 July 2025 at 13:29:01 UTC, z wrote:
I also see this in the language documentation :
```
A void array cannot be indexed.
```
But i can slice it just fine in DMD 2.111...
You can _slice_ it, meaning, getting a subarray out of it.
However, _indexing_ means getting a single elemen
On Thursday, 17 July 2025 at 16:26:43 UTC, Nick Treleaven wrote:
Perhaps there should be an entry for `void` in the types page.
A `void` value cannot be accessed. `void.sizeof` is 1 so that a
void array can have length equivalent to the number of bytes in
the array.
https://github.com/dlang/d
On Wednesday, 16 July 2025 at 13:29:01 UTC, z wrote:
I also see this in the language documentation :
```
A void array cannot be indexed.
```
But i can slice it just fine in DMD 2.111...
Is this by design or is there a hole in the language
specification?
The sentence before says:
Array indice
On Wed, Jul 16, 2025 at 01:29:01PM +, z via Digitalmars-d-learn wrote:
[...]
> I also see this in the language documentation :
> ```
> A void array cannot be indexed.
> ```
> But i can slice it just fine in DMD 2.111...
Probably an oversight.
> Is this by design or is t
```D
import std;
void main()
{
void[] a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 0x12345678];
void[] b = cast(ubyte[])[0, 1, 2, 3, 4, 5, 6, 7, 8];
ubyte[] c = cast(ubyte[])(cast(void[])[0, 1, 2, 3, 4, 5, 6,
7, 8,0x12345678]);
ubyte[] d = [0, 1, 2, 3, 4, 5, 6, 7, 8];
void[] e = cast(uby
On Thursday, 10 July 2025 at 23:57:48 UTC, Ali Çehreli wrote:
On 7/10/25 7:28 AM, Bienlein wrote:
> some blockinglist wrapper around slist
I would try std.concurrency first because its message queue is
a blocking queue anyway if you limit the size with
setMaxMailboxSize(). I have some example
On Saturday, 12 July 2025 at 23:55:39 UTC, Ali Çehreli wrote:
On 7/11/25 11:36 PM, Bienlein wrote:
> Unhappily class MessageBox is private and therefore cannot be
reused.
Ah! :) That's one more data point against 'private', that
little feature that helps with nothing. I don't know what
langua
On Sunday, July 13, 2025 1:45:01 PM Mountain Daylight Time Ali Çehreli via
Digitalmars-d-learn wrote:
> On 7/12/25 5:35 PM, Jonathan M Davis wrote:
> > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali
> Çehreli via Digitalmars-d-learn wrote:
> Anything can b
On 7/12/25 5:35 PM, Jonathan M Davis wrote:
> On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali
Çehreli via Digitalmars-d-learn wrote:
>> On 7/11/25 11:36 PM, Bienlein wrote:
>>
>> > Unhappily class MessageBox is private and therefore cannot be
reused.
On Sunday, July 13, 2025 8:38:08 AM Mountain Daylight Time H. S. Teoh via
Digitalmars-d-learn wrote:
> On Sat, Jul 12, 2025 at 06:35:42PM -0600, Jonathan M Davis via
> Digitalmars-d-learn wrote:
> > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli
> >
On Sunday, July 13, 2025 5:00:12 AM Mountain Daylight Time Bienlein via
Digitalmars-d-learn wrote:
> On Sunday, 13 July 2025 at 00:35:42 UTC, Jonathan M Davis wrote:
>
> > Whereas I think that using private makes perfect sense when you
> > want something to be an implementatio
On Sat, Jul 12, 2025 at 06:35:42PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli via
> Digitalmars-d-learn wrote:
[...]
> > Meanwhile, engineers like you suffer because of 'private'. I pic
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
What do the 4096 resulting complex numbers represent
Bin 0 is energy at 0Hz
Bin 1 to 2047 are energy at (bin * samplingRate / 4096) hz
Bin 2048 is energy at Nyquist frequency
Bin 2049 to 4095 are the energy for negative frequencies and
co
On Thursday, 10 July 2025 at 09:22:30 UTC, Bienlein wrote:
Hello,
I'm looking for some kind of blocking queue for D, that is if
the queue is empty the thread doing a take on the queue is
blocked until an item has been added to the queue. Couldn't
find anything in the standard library.
Thank
On Saturday, 12 July 2025 at 23:55:39 UTC, Ali Çehreli wrote:
On 7/11/25 11:36 PM, Bienlein wrote:
The only thing 'private' achieves is this: You don't want your
users to be disappointed when they go out of their way to use
features that they are advised not to use, and those features
behave
On Sunday, 13 July 2025 at 00:35:42 UTC, Jonathan M Davis wrote:
Whereas I think that using private makes perfect sense when you
want something to be an implementation detail. Exposing it
means that you have to deal with someone using it, you have to
design its API for public use, and you can'
On Sunday, 13 July 2025 at 00:35:42 UTC, Jonathan M Davis wrote:
And when the code is open source, if someone wants to use it,
they can always just copy it into their own code and do
whatever they want with it
Not necessarily true, part of the issue with autodecoding is that
string.front is
On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli via
Digitalmars-d-learn wrote:
> On 7/11/25 11:36 PM, Bienlein wrote:
>
> > Unhappily class MessageBox is private and therefore cannot be reused.
>
> Ah! :) That's one more data point against 'p
On 7/11/25 11:36 PM, Bienlein wrote:
> Unhappily class MessageBox is private and therefore cannot be reused.
Ah! :) That's one more data point against 'private', that little feature
that helps with nothing. I don't know what language invented it but I
wouldn't be surprised if it came to D from
On Thursday, 10 July 2025 at 23:57:48 UTC, Ali Çehreli wrote:
On 7/10/25 7:28 AM, Bienlein wrote:
> some blockinglist wrapper around slist
I would try std.concurrency first because its message queue is
a blocking queue anyway if you limit the size with
setMaxMailboxSize(). I have some example
On Fri, Jul 11, 2025 at 10:17:02PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
> ```
> // working function
>
> SDL_Texture* changeTextureAccess(SDL_Texture *texture, SDL_TextureAccess
> newAccess)
> {
> // pertinent code only
> texture = createTextu
On Friday, 11 July 2025 at 22:17:02 UTC, WhatMeWorry wrote:
```
// working function
SDL_Texture* changeTextureAccess(SDL_Texture *texture,
SDL_TextureAccess newAccess)
{
// pertinent code only
texture = createTexture(renderer, pixelFormat, newAccess,
width, height);
return textur
```
// working function
SDL_Texture* changeTextureAccess(SDL_Texture *texture,
SDL_TextureAccess newAccess)
{
// pertinent code only
texture = createTexture(renderer, pixelFormat, newAccess,
width, height);
return texture;
}
```
The above function is working for me when I call it
On 7/10/25 7:28 AM, Bienlein wrote:
> some blockinglist wrapper around slist
I would try std.concurrency first because its message queue is a
blocking queue anyway if you limit the size with setMaxMailboxSize(). I
have some examples of std.concurrency here:
https://ddili.org/ders/d.en/conc
On Thursday, 10 July 2025 at 14:28:31 UTC, Bienlein wrote:
Thanks, Jonathan. The send and receive functions might do the
job for some specific purpose, but I would like to have some
general blockinglist class like an abstract data type.
It sounds like you have in mind shared memory coding tech
Thanks, Jonathan. The send and receive functions might do the job
for some specific purpose, but I would like to have some general
blockinglist class like an abstract data type.
I'm following the D forum for quite a while, but have so far only
written little code in D mostly in order to better
On Thursday, July 10, 2025 3:22:30 AM Mountain Daylight Time Bienlein via
Digitalmars-d-learn wrote:
> Hello,
>
> I'm looking for some kind of blocking queue for D, that is if the
> queue is empty the thread doing a take on the queue is blocked
> until an item has bee
Hello,
I'm looking for some kind of blocking queue for D, that is if the
queue is empty the thread doing a take on the queue is blocked
until an item has been added to the queue. Couldn't find anything
in the standard library.
Thank you, Oliver
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
Hi,
I'm writing a program where I'm trying to decode DTMF tones. I
already completed the wave file decoder and I know I'm supposed
to use an FFT to transform the samples from time domain to
frequency domain but I'm stuck on determining w
On Wednesday, 9 July 2025 at 19:39:43 UTC, Matthew wrote:
Checking the closest bins to each frequency seems to work well,
at least with clean sound from a wav file. It remains to be
seen how it fares against noisy real life signals. I'll likely
need a window function or interpolation but this
On Tuesday, 8 July 2025 at 19:39:37 UTC, Dennis wrote:
The magnitude of each element (computed with `std.complex.abs`)
corresponds to the amplitude of each frequency component, the
angle in the complex plane represents the phase (computed with
`std.complex.arg` in radians).
This is what I pi
On 7/8/25 23:06, Timon Gehr wrote:
auto fToWave(R)(size_t N,R coefficients_f){
return iota(N/2+1).map!(j=>
tuple!("magnitude","frequency","phase")(
(j==N/2?1.0:2.0)*abs(coefficients_f[j]).re,
K(j)*sample_rate/N,
std.complex.log(coefficients_f[
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
Hi,
I'm writing a program where I'm trying to decode DTMF tones. I
already completed the wave file decoder and I know I'm supposed
to use an FFT to transform the samples from time domain to
frequency domain but I'm stuck on determining w
On Tuesday, 8 July 2025 at 21:10:35 UTC, Serg Gini wrote:
On Tuesday, 8 July 2025 at 19:59:39 UTC, Serg Gini wrote:
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
From my perspective - solve it in NumPy will be safer
approach, but it should be doable in D as well.
Or even better - cr
On Tuesday, 8 July 2025 at 19:59:39 UTC, Serg Gini wrote:
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
From my perspective - solve it in NumPy will be safer approach,
but it should be doable in D as well.
Or even better - create D library for this :)
It seems (after fast googling) t
On 7/8/25 20:11, Matthew wrote:
Hi,
I'm writing a program where I'm trying to decode DTMF tones. I already
completed the wave file decoder and I know I'm supposed to use an FFT to
transform the samples from time domain to frequency domain but I'm stuck
on determining which of the DTMF frequen
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
Hi,
What do the 4096 resulting complex numbers represent?
How should I use the result to check whether the 1209Hz,
1336Hz, 1477Hz, or 1633Hz tones are present in that part of the
sound?
Thanks,
Matthew
The result of FFT should be the s
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote:
I can't figure out how the 4096 results of the FFT relate to
the frequencies in the input.
I tried taking the magnitude of each element,
That's correct!
What do the 4096 resulting complex numbers represent?
The magnitude of each elem
Hi,
I'm writing a program where I'm trying to decode DTMF tones. I
already completed the wave file decoder and I know I'm supposed
to use an FFT to transform the samples from time domain to
frequency domain but I'm stuck on determining which of the DTMF
frequencies are present.
Consider the
On Wednesday, 19 February 2025 at 15:21:19 UTC, Danny Arends
wrote:
Hey all,
I am looking to integrate a GUI library like IMgui / Nuklear
into my app that uses Vulkan within SDL2 for rendering so that
it can run on Windows, Linux, and Android
(https://github.com/DannyArends/CalderaD).
I've
When it comes to timeless elegance and symbolic value, few pieces
of jewelry can match the allure of diamond rings for women. For
centuries, diamonds have been treasured for their beauty, rarity,
and the emotions they represent. From engagement rings to
anniversary gifts and fashion statements,
On Thursday, 3 July 2025 at 15:29:53 UTC, Nick Treleaven wrote:
On Monday, 30 June 2025 at 04:51:58 UTC, Rajesh wrote:
On Sunday, 29 June 2025 at 21:56:19 UTC, 0xEAB wrote:
On Sunday, 29 June 2025 at 13:06:38 UTC, Rajesh wrote:
Is there a restriction that I cannot call **return** from
foreach
On Saturday, 5 July 2025 at 10:52:21 UTC, Steven Schveighoffer
wrote:
By using WinMain, You are bypassing the runtime startup.
Check out this article: https://wiki.dlang.org/D_for_Win32
-Steve
Thank you very much. It's working perfectly.
stef
On Saturday, 5 July 2025 at 10:39:13 UTC, stef wrote:
Hello,
I'm totally new using D. I'm trying to create a thread using
this code:
```d
…
extern (Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
…
```
I'm testing this program using
Hello,
I'm totally new using D. I'm trying to create a thread using this
code:
```d
import std.stdio;
import core.thread;
import core.time;
import std.format;
import core.stdc.stdio;
void myThread()
{
for (int i = 0; i < 5; i++)
{
writefln("Message from secon
On Saturday, July 5, 2025 2:19:11 AM Mountain Daylight Time partypooper via
Digitalmars-d-learn wrote:
> On Saturday, 5 July 2025 at 08:08:08 UTC, Jonathan M Davis wrote:
> > On Friday, July 4, 2025 12:04:55 PM Mountain Daylight Time
> > partypooper via Digitalmar
On Saturday, 5 July 2025 at 08:08:08 UTC, Jonathan M Davis wrote:
On Friday, July 4, 2025 12:04:55 PM Mountain Daylight Time
partypooper via Digitalmars-d-learn wrote:
[...]
The only time that a setter function would be triggered would
be assignment such as
[...]
Thanks for your thorough
On Friday, July 4, 2025 12:04:55 PM Mountain Daylight Time partypooper via
Digitalmars-d-learn wrote:
> On Friday, 4 July 2025 at 17:34:59 UTC, monkyyy wrote:
> > On Friday, 4 July 2025 at 17:15:48 UTC, partypooper wrote:
> > if you add ref to line 28 it works; there wont be a rea
```d
auto bar(int i){
foo()
}
unittest{
bar(3);
}
```
Given any definition of foo, any compiler bugs, how would you
detect the `3` from `foo`?
___
My attempts at scanning the call stack didn't work but for anyone
attempting it, I believe this breakdown of control flow may be
part of the
On Friday, 4 July 2025 at 18:04:55 UTC, partypooper wrote:
It doesn't work. Or it works even worse: changing _pos, but not
_dest. What is going on is that on `+=` it for some reason
invokes "getter", not "setter". I specifically omitted "ref",
because I already have known of that behavior.
In
On Friday, 4 July 2025 at 17:34:59 UTC, monkyyy wrote:
On Friday, 4 July 2025 at 17:15:48 UTC, partypooper wrote:
if you add ref to line 28 it works; there wont be a reasonable
way to make an error happen, you just have to know when to do
refness
It doesn't work. Or it works even worse: chang
On Friday, 4 July 2025 at 08:17:34 UTC, Richard (Rikki) Andrew
Cattermole wrote:
```d
import std.stdio;
__gshared int literal;
void main() {
int[0] callstack;
(&callstack+literal).writeln;
}
```
```asm
_Dmain:
.Lfunc_begin0:
.file 1 "/" "app/example.d"
.loc1 5 0
On Friday, 4 July 2025 at 17:15:48 UTC, partypooper wrote:
```d
struct Vector
{
float x, y;
Vector opBinary(string op)(inout Vector rhs) const if (op
== "+")
{
return Vector(mixin("x", op, "rhs.x"), mixin("y", op,
"rhs.y"),);
}
ref Vector opOpAssign(string op)(in
```d
struct Vector
{
float x, y;
Vector opBinary(string op)(inout Vector rhs) const if (op ==
"+")
{
return Vector(mixin("x", op, "rhs.x"), mixin("y", op,
"rhs.y"),);
}
ref Vector opOpAssign(string op)(inout Vector rhs) if (op ==
"+" || op == "-")
{
On 7/5/25 1:06 AM, confuzzled wrote:
ulong rdtsc() {
ulong result;
uint* res = cast(uint*) &result;
asm {
rdtsc; // Puts result in edx:eax
// Cast our ulong's address to a 32-bit integer pointer
// and move the register values into the correct memory lo
On Thursday, 20 February 2025 at 10:05:13 UTC, Danny Arends wrote:
Running into some weird linker issues within
bindbc.common.codegen:
```
/usr/bin/ld:
/home/danny/.dub/cache/betterct/~master/build/betterC-debug-gZx8lRyN8EaQ6hq_UuhHCw/betterct.o:(.data._D39TypeInfo_S6bindbc6common7codegen6FnBi
Good day all,
What is the proper way to assign to accomplish this?
ulong rdtsc() {
ulong result;
uint* res = cast(uint*) &result;
asm {
rdtsc; // Puts result in edx:eax
// Cast our ulong's address to a 32-bit integer pointer
// and move the register values i
On 6/15/25 9:06 AM, Steven Schveighoffer wrote:
On Monday, 9 June 2025 at 07:24:41 UTC, confuzzled wrote:
Hello community,
Is it possible to accomplish the following using ref instead of
pointers? If so, please share an example.
A ref cannot be a member of a type. But ref can be returned by
1 - 100 of 2147 matches
Mail list logo