On Sunday, 1 September 2024 at 08:50:53 UTC, ryuukk_ wrote:
if checking for/getting a value from a hashmap requires all
that crap, then perhaps something is wrong with the language,
and it perhaps isn't the one i should have picked for the task
my mistake perhaps, not yours
besides, i do u
On Monday, 19 August 2024 at 10:59:33 UTC, Daniel Donnelly, Jr.
wrote:
I give up on Visual Studio VisualD plugin as it's had the same
issues for over five years, and currently my program runs from
the command line, but VisualD complains with a 528 nonsensical
errors.
So I investigated using V
On Tuesday, 9 July 2024 at 07:54:12 UTC, kiboshimo wrote:
Hi,
Some stuff must look obvious to an experienced programmer so
they are not explicit on articles and documentation over the
internet. I'm somewhat inexperienced, so:
- betterC does not need glue code to interop with C. Does it
achi
On Monday, 17 June 2024 at 04:32:50 UTC, Andy Valencia wrote:
In the alias:
alias Unshared(T) = T;
alias Unshared(T: shared U, U) = U;
as used in:
cast(Unshared!mytype)value
turns a mytype with shared attribute into one without shared.
I deduce the alias is using some sort of typ
On Wednesday, 12 June 2024 at 17:00:14 UTC, Vinod K Chandran
wrote:
On Wednesday, 12 June 2024 at 10:16:26 UTC, Sergey wrote:
Btw are you going to use PyD or doing everything manually from
scratch?
Does PyD active now ? I didn't tested it. My approach is using
"ctypes" library with my dll.
On Thursday, 6 June 2024 at 17:49:39 UTC, Andy Valencia wrote:
I was using instance initialization which allocated a new
object. My intention was this initialization would happen
per-instance, but all instances appear to share the same
sub-object? That is, f1.b and f2.b appear to point to a s
On Wednesday, 5 June 2024 at 11:27:32 UTC, Nick Treleaven wrote:
On Wednesday, 5 June 2024 at 09:24:23 UTC, evilrat wrote:
for simple cases like this it might work, but 2d array is not
even contiguous,
A 2D static array is contiguous:
https://dlang.org/spec/arrays.html#rectangular-arrays
D st
On Wednesday, 5 June 2024 at 06:22:34 UTC, Eric P626 wrote:
On Tuesday, 4 June 2024 at 16:19:39 UTC, Andy Valencia wrote:
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
Thanks for the comments. So far, I only managed to make it work
by creating a dynamic array and keeping the same
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I am currently trying to learn how to program in D. I thought
that I could start by trying some maze generation algorithms. I
have a maze stored as 2D array of structure defined as follow
which keep tracks of wall positions:
~~~
struct
On Wednesday, 29 May 2024 at 07:47:01 UTC, Dakota wrote:
I try use
https://github.com/microsoft/garnet/blob/main/libs/storage/Tsavorite/cc/src/device/native_device_wrapper.cc from D
Not sure how to make this work with D:
```c++
EXPORTED_SYMBOL FASTER::core::Status
NativeDevice_ReadAsync(Nat
On Friday, 10 May 2024 at 13:27:40 UTC, Dukc wrote:
Steven Schveighoffer kirjoitti 10.5.2024 klo 16.01:
On Friday, 10 May 2024 at 11:05:28 UTC, Dukc wrote:
This also gets inferred as `pure` - meaning that if you use
it twice for the same `WeakRef`, the compiler may reuse the
result of the firs
On Thursday, 9 May 2024 at 00:39:49 UTC, Liam McGillivray wrote:
What's a good way I can achieve what I'm trying to do, using
either reference counting or a garbage-collected object?
There is libraries like `automem`[1] that implements refcounting
and more.
Without showing your code for ref
On Monday, 4 March 2024 at 16:02:50 UTC, Andy Valencia wrote:
On Monday, 4 March 2024 at 03:42:48 UTC, Richard (Rikki) Andrew
Cattermole wrote:
A way to do this without spawning threads manually:
...
Thank you! Of course, a thread dispatch per atomic increment
is going to be s.l.o.w., so not
On Friday, 19 January 2024 at 16:55:25 UTC, ryuukk_ wrote:
You do hash map lookup for every character in D, it's slow,
whereas in Rust you do it via pattern matching, java does the
same, pattern matching
Yet another reason to advocate for pattern matching in D and
switch as expression
Th
On Wednesday, 17 January 2024 at 11:20:14 UTC, Renato wrote:
That means the input file is still not ASCII (or UTF-8) as it
should. Java is reading files with the ASCII encoding so it
should've worked fine.
It seems that it is only works with ASCII encoding though.
On Wednesday, 17 January 2024 at 10:43:22 UTC, Renato wrote:
On Wednesday, 17 January 2024 at 10:24:31 UTC, Renato wrote:
It's not Java writing the file, it's the bash script
[`benchmark.sh`](https://github.com/renatoathaydes/prechelt-phone-number-encoding/blob/master/benchmark.sh#L31):
```
On Wednesday, 17 January 2024 at 07:06:25 UTC, Renato wrote:
On Tuesday, 16 January 2024 at 22:15:04 UTC, Siarhei Siamashka
wrote:
On Tuesday, 16 January 2024 at 21:15:19 UTC, Renato wrote:
It's a GC allocations fest. Things like this make it slow:
```diff
{
-string digit = [digit
On Wednesday, 17 January 2024 at 07:11:02 UTC, Renato wrote:
If you want to check your performance, you know you can run the
`./benchmark.sh` yourself?
Out of curiosity I've tried to manually run this on Windows and
it seems that Java generator for these numbers files is "broken",
the resul
On Saturday, 30 December 2023 at 00:47:04 UTC, Agent P. wrote:
Hello everyone,
I'm looking for a 2D game engine for Dlang that offers
flexibility but has a high-level interface, preferably less
verbose. Although I've explored options on GitHub and in
general, I haven't found something that ex
On Friday, 22 December 2023 at 19:12:14 UTC, Dmitry Ponyatov
wrote:
D lang noted as having a very fast compilation time.
Playing with tiny web-interface apps I found that modern
versions of dmd & vibe has such a fast compiling but a very
long executable linking time.
Something like 2-3 secon
On Friday, 22 December 2023 at 19:55:07 UTC, Dmitry Ponyatov
wrote:
It is possible to statically precompile some JS libs and media
fragments into an app binary?
My colleagues asks me to distribute app as a single standalone
executable if it is possible, and maybe few millisecond of page
load
On Monday, 20 November 2023 at 16:09:33 UTC, Antonio wrote:
Is there any way to force D compiler to treat this
"createCounter" declaration as **delegate** instead of
**function**?
```d
auto createCounter = (int nextValue) => () => nextValue++;
```
generally there is a way to tell the com
On Monday, 20 November 2023 at 09:44:32 UTC, Antonio wrote:
- Why writeln doesn't treat ```next``` and ```Counter``` the
same way? (I think I understand why, but it shows a "low"
level difference of something that syntactically is equivalent)
- What is the way to show Counter signature usin
On Monday, 20 November 2023 at 08:47:34 UTC, Antonio wrote:
Now, I uncomment the ```writeln( "'Counter' is ", Counter );```
line and compiler says
```
/home/antonio/Devel/topbrokers/whatsapp-srv/admin/x.d(12):
Error: function `x.Counter(int nextValue)` is not callable
using argument types `
On Wednesday, 8 November 2023 at 20:43:21 UTC, solidstate1991
wrote:
Here's this precompiler macro from Pipewire, on which many
important inline functions depend on, like this one:
```c
/**
* Invoke method named \a method in the \a callbacks.
* The \a method_type defines the type of the metho
On Sunday, 29 October 2023 at 10:44:03 UTC, ryuukk_ wrote:
If D had tagged union and pattern matching, it would be a great
candidate to succeed in that field
Well, we sort of have it, just not as good as it can be.
https://dlang.org/phobos/std_sumtype.html
The default example though makes i
On Sunday, 29 October 2023 at 08:55:24 UTC, Dmitry Ponyatov wrote:
Maybe someone played in this topic, and can give some advice:
is D language with its OOP without multiple inheritance and
maybe other semantic limitations able and good enough to be
used with these books mechanics?
You can hav
On Thursday, 19 October 2023 at 06:03:06 UTC, Daniel Zuncke wrote:
Hello, I need some help getting into the debugger in vscode on
macOS. It did work some months ago but that was finicky to set
up. Maybe I am forgetting something now?
I am compiling the project with `dub build --build debug
--
On Thursday, 5 October 2023 at 22:32:36 UTC, mw wrote:
So ModuleInfo contains all the modules (transitive closure)
built into the current binary that is running?
Is there document about this ModuleInfo?
I only find Struct object.ModuleInfo
https://dlang.org/library/object/module_info.html
On Sunday, 1 October 2023 at 08:22:48 UTC, dhs wrote:
Hi,
What's the meaning of the dot in the call to writeln() below?
```d
.writeln("Hello there!");
```
I haven't found this in the spec or anywhere else. This is used
very often in the source code for Phobos.
Thanks,
dhs
It is either
On Sunday, 17 September 2023 at 15:05:59 UTC, Vitaliy Fadeev
wrote:
It works! But I want to ask how to make this 100% the best of
the best?
What should I consider before changing ```__vptr``` ?
If that works for you with that constraint of having exact memory
layout then it should be ok.
Th
On Saturday, 9 September 2023 at 16:49:30 UTC, user1234 wrote:
not sure why you append "/?" to the program name.
Windows maybe? Try this.
auto result = std.process.pipeProcess(["whoami", "/?"], redirect);
On Friday, 8 September 2023 at 11:50:52 UTC, rempas wrote:
That's interesting, I wasn't able to find something else! The
bug happens when I run the testing suit and well... the tests
before pass so I cannot find anything that goes wrong except
for the fact that I do not free the memory that i
On Friday, 8 September 2023 at 07:59:37 UTC, rempas wrote:
I do have the following struct:
```d
struct Vec(T) {
private:
T* _ptr = null; // The pointer to the data
u64 _cap = 0; // Total amount of elements (not bytes) we
can store
public:
/* Create a vector by just allocating memory f
On Monday, 4 September 2023 at 07:39:21 UTC, confused wrote:
So then I guess I'd still like to know how I'm expected to
store and access an array of characters without the C runtime
as I tried in my original post.
Without C runtime functions such as malloc you can still have
fixed-length ar
On Saturday, 2 September 2023 at 03:27:51 UTC, confused wrote:
So I guess my next question is why, exactly, classes *can*, in
fact, be implemented in ``` betterC ```, but are not?
IIRC you can have extern(C++) classes in betterC, the real issue
is the plain extern(D) classes which has some ass
On Friday, 1 September 2023 at 13:17:08 UTC, confused wrote:
On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki)
Andrew Cattermole wrote:
``size_t`` is defined in ``object.d`` which is implicitly
imported into all modules.
If it cannot be found, one of three things is happening:
1) Y
On Saturday, 25 February 2023 at 19:31:10 UTC, solidstate1991
wrote:
Well, VS turned to be even less cooperative than before. Now it
only loads and runs a specific old version of an EXE file.
I'm asking around for other debuggers, I'm definitely moving to
another.
Nothing happens without a
On Saturday, 25 February 2023 at 16:58:44 UTC, solidstate1991
wrote:
I used to use Visual Studio, but I forgot how to set it up
properly to break on handled throws. Now it doesn't do anything
if throws are handled in any fashion, and I can't find an
option to change it (it was removed maybe?)
On Saturday, 25 February 2023 at 15:55:33 UTC, solidstate1991
wrote:
I had a lot of trouble trying to get Visual Studio to catch
handled exceptions
VisualD for Visual Studio provides some extra help with
displaying your data in debugger and on Windows is the best you
can get for D.
You can
On Saturday, 28 January 2023 at 02:40:58 UTC, thebluepandabear
wrote:
I am really confused as to how I even am supposed to get the
library name in the first place, which is another thing that is
confusing me.
It is up to the library author to choose a name. The extensions
is `.so/.dll/.dy
On Sunday, 22 January 2023 at 18:16:35 UTC, Hipreme wrote:
Nope. Those DFLAGS environment variable is used to affect
projects such as my dependencies. For example, my dependency
needs to be built using my own runtime. The dflags defined in
the dub.json only affect the current project, not its
On Sunday, 22 January 2023 at 16:57:56 UTC, Hipreme wrote:
The way to use dub's packages is by using the DFLAGS. With
DFLAGS, I can set the import path to my own DRuntime and own
std. That way I can make the dependencies behave more or less
the same, this is an example of what is being done n
On Sunday, 22 January 2023 at 04:42:09 UTC, dan wrote:
I would like to write a function which takes an array as input,
and returns a sorted array without duplicates.
```d
private S[] _sort_array( S )( S[] x ) {
import std.algorithm;
auto y = x.dup;
y.sort;
auto z =
On Friday, 20 January 2023 at 13:17:05 UTC, Ruby The Roobster
wrote:
On Friday, 20 January 2023 at 13:03:18 UTC, thebluepandabear
wrote:
ll
a function without instantiating said class, as functions act
on the class object.
Ok, thanks.
I think D should implement something similar to `static c
On Wednesday, 11 January 2023 at 18:56:47 UTC, eXodiquas wrote:
Hello everyone,
I build a web tool that allows people to upload some files.
Those files should not be public, so I copy them into a folder
hidden away on the filesystem. But, I want an authenticated
user to be able to look at the
On Sunday, 10 July 2022 at 09:15:59 UTC, Bagomot wrote:
Based on Thread, I managed to do what I intended. I have not
yet been able to figure out how to do the same through the Task.
Here in the example, when you click on the Start button, a
worker is launched that updates the progress bar.
.
On Monday, 6 June 2022 at 21:07:58 UTC, Steven Schveighoffer
wrote:
On 6/6/22 3:46 PM, Jack wrote:
I just found out a game using D to develop games but later I
see the last updates on the github, web site, twitter etc is
from 2015. Does anyone knows what happend to the company?
It appears to
On Thursday, 20 January 2022 at 19:31:06 UTC, H. S. Teoh wrote:
I'm not sure how it works on Windows, but there should be
corresponding binaries that might give a hint as to what's the
correct -fuse-ld=... option you need to use.
Here I documented some of the quirks I've hit during android
On Wednesday, 22 December 2021 at 10:37:51 UTC, Michel wrote:
Hey, I've tried coding in Visual Studio Code but there isn't
any function checking/showing what arguments a function
accepts, I can just write `Foo.Bar("somerandomarg");` and it
will not give me errors or warnings.
Which IDE do you
On Wednesday, 15 December 2021 at 12:02:08 UTC, Jan wrote:
On Wednesday, 15 December 2021 at 11:03:27 UTC, rikki
cattermole wrote:
On 15/12/2021 11:54 PM, Jan wrote:
On Wednesday, 15 December 2021 at 09:36:54 UTC, Jan wrote:
Unfortunately it's the "annoying little details" that I
immediately
On Tuesday, 14 December 2021 at 06:21:39 UTC, Tejas wrote:
Hey, evilrat, I've seen people make claims that our C++ interop
has reached phenomenal levels and that going any further would
basically require a C++ compiler ala ImportC++, the issue is
just that the docs haven't been updated yet to
On Monday, 13 December 2021 at 12:16:03 UTC, Ola Fosheim Grøstad
wrote:
On Monday, 13 December 2021 at 12:08:30 UTC, evilrat wrote:
Yeah but it sucks to have making C++ wrapper just for this. I
think either pragma mangle to hammer it in place or helper
dummy struct with class layout that mimics
On Monday, 13 December 2021 at 11:13:12 UTC, Tejas wrote:
On Monday, 13 December 2021 at 09:21:26 UTC, Jan wrote:
On Monday, 13 December 2021 at 07:48:34 UTC, evilrat wrote:
On Sunday, 12 December 2021 at 21:24:39 UTC, Jan wrote:
In D I have an extern(C++) class:
```cpp
extern(C++) class A
{
On Sunday, 12 December 2021 at 21:24:39 UTC, Jan wrote:
In D I have an extern(C++) class:
```cpp
extern(C++) class A
{
~this();
// other stuff
}
```
An a function that takes A by const reference:
```cpp
void CppFunc(const A& arg);
```
But how do I bind this in D ?
```cpp
extern(C++)
On Sunday, 10 October 2021 at 08:28:30 UTC, rempas wrote:
Is there a way to "stringnify" in Dlang? In C we would do
something like the following:
`#define STRINGIFY(x) #x`
What's the equivalent in D?
That's probably depends on what you are trying to achieve.
If you want to write code-like s
On Saturday, 18 September 2021 at 08:02:13 UTC, Dylan Graham
wrote:
On Friday, 17 September 2021 at 14:37:29 UTC, Meta wrote:
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
[...]
It's just another "useless" attribute th
On Saturday, 21 August 2021 at 23:50:51 UTC, Ruby The Roobster
wrote:
On Saturday, 21 August 2021 at 23:50:08 UTC, Ruby The Roobster
wrote:
On Saturday, 21 August 2021 at 06:08:17 UTC, evilrat wrote:
First parameter for CreateWindow should be window class
string that you used in
wndclass.lps
On Saturday, 21 August 2021 at 08:14:22 UTC, Виталий Фадеев wrote:
I know, i know... It not possible, but part of the C code we
can to convert to the D.
Show me, please, solutions, projects, tools, scripts, docs.
Can you give the link ?
`htod` is 1.
Any more ?
dstep
https://code.dlang.org/pac
On Friday, 20 August 2021 at 21:19:09 UTC, Ruby The Roobster
wrote:
int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int iCmdShow)
{
// ...
if(!RegisterClassA(&wndclass))
{
return 0;
}
hwnd = CreateWindowA( "Test",
On Thursday, 19 August 2021 at 18:04:58 UTC, Tejas wrote:
On Thursday, 19 August 2021 at 17:43:59 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
No, because all constructors are exp
On Thursday, 19 August 2021 at 15:12:03 UTC, Ferhat Kurtulmuş
wrote:
On Thursday, 19 August 2021 at 07:30:38 UTC, Bienlein wrote:
Hello,
I allocate some instance of class C manually and then free the
memory again:
[...]
I just wanted to leave this here.
https://github.com/AuburnSounds/Dplu
On Thursday, 19 August 2021 at 08:25:23 UTC, Bienlein wrote:
Oops, I just realized that you can also not call emplace when
@nogc is present. Well that is at least consistent with not
either being able to call destroy ;-).
So, I guess this means that you can forget about manually
allocating
On Wednesday, 4 August 2021 at 07:21:56 UTC, Denis Feklushkin
wrote:
On Sunday, 1 August 2021 at 17:37:01 UTC, evilrat wrote:
vibe-d - probably because it handles DB connection and/or keep
things async way, sure you probably can do it with Phobos but
it will be much more PITA and less performa
On Sunday, 1 August 2021 at 17:25:26 UTC, Alain De Vos wrote:
A simple example, dub package dpq2 pulls in,
money,vide-d,stdx-allocator,derelict-pq,derelict-util
This all for a handfull of C-functions.
let's see
Money - fits pretty ok, cause your average SQL has decimal type
for that purpose b
On Sunday, 1 August 2021 at 15:38:32 UTC, Alain De Vos wrote:
2. Let's say you need bindings to postgresql library and you
will see dub pulling in numerous of libraries, which have
nothing at all to do with postgresql.
More like a framework stuff. This creates unneeded complexity,
bloatware, de
On Thursday, 15 July 2021 at 17:49:06 UTC, Tejas wrote:
I'm sorry, I should've explicitly mentioned I'm interested in
learning how to do friend injection in D.
I know that access specifiers operate at module scope, seen a
few posts about that here already.
Thank you for answering though.
On Thursday, 10 June 2021 at 19:06:42 UTC, Tejas wrote:
But how scalable will this be? We have to get real D code to
enrich our ambiguously-defined-small ecosystem.
It says bindings generator, but it has to convert the code
keeping the semantic as close as possible.
It does direct translat
On Thursday, 10 June 2021 at 15:09:02 UTC, Tejas wrote:
Sorry, I'm rather ignorant when it comes to this, but why can't
we use [pegged](https://github.com/PhilippeSigaud/Pegged) to
transpile C++ code to D? Then we won't need a nogc compatible
std library and so many other things could get easie
On Thursday, 10 June 2021 at 15:57:44 UTC, Imperatorn wrote:
On Thursday, 10 June 2021 at 15:09:02 UTC, Tejas wrote:
Sorry, I'm rather ignorant when it comes to this, but why
can't we use
[pegged](https://github.com/PhilippeSigaud/Pegged) to
transpile C++ code to D? Then we won't need a nogc c
On Wednesday, 9 June 2021 at 17:56:24 UTC, Gregor Mückl wrote:
Consider the following code:
```d
class Foo { }
class Bar { Foo foo = new Foo(); }
void main()
{
Bar b1 = new Bar();
Bar b2 = new Bar();
assert(b1.foo != b2.foo);
}
```
The assert fails. This is completel
On Monday, 7 June 2021 at 14:02:14 UTC, Prokop Hapala wrote:
Basically I'm desperate do find anything which encapsulates
OpenGL calls into some nice D-lang classes to learn from it. I
don't really want to use Dagon, nor Godot. What I want is to
use it as learning resources fro learning graphi
On Wednesday, 2 June 2021 at 05:43:49 UTC, evilrat wrote:
Yep, use Skia/Cairo or something like this, don't build your
own full blown 2D engine for every possible graphics API.
I would like to tune my C++ bindings generator to be able to
handle Skia ASAP, but can't tell when it will be possi
Btw there is also (dear) imgui, which is immediate mode GUI that
builds geometry to draw for you, how one would draw it is up to
programmer. It is very popular in game dev because there is very
little setup to get it working.
Source
https://github.com/ocornut/imgui
D bindings with GL3 demo
ht
On Tuesday, 1 June 2021 at 20:07:39 UTC, Prokop Hapala wrote:
After some sime I tried to return to this, using dependency on
older version of dagon
I got errors in dlib
Not sure how to understadn this
```
Error: incompatible types for (box.pmax) - (box.center): both
operands are of type Vecto
On Tuesday, 1 June 2021 at 06:31:28 UTC, Ola Fosheim Grostad
wrote:
On Tuesday, 1 June 2021 at 05:27:41 UTC, Imperatorn wrote:
On Tuesday, 1 June 2021 at 03:32:50 UTC, someone wrote:
[...]
Yeah, "fragmentation" is a problem. We do a lot of things 90%.
We need more "100% projects" that are ju
On Sunday, 30 May 2021 at 07:03:38 UTC, Chris Piker wrote:
On Thursday, 27 May 2021 at 07:00:32 UTC, Imperatorn wrote:
I would like to recommend DlangUI [1], but we have tried now
for months to get in contact with the owner of it (to take
over development) and are getting no reponse.
1. https
On Tuesday, 25 May 2021 at 18:12:27 UTC, Gavin Ray wrote:
On Tuesday, 25 May 2021 at 18:03:00 UTC, evilrat wrote:
That last one with someInt is what I warned about. D ctor
messed up class layout, in this simple case where class data
isn't used it almost works, but will be practically unusable
On Tuesday, 25 May 2021 at 17:52:14 UTC, Gavin Ray wrote:
```d
void main()
{
Derived dlangDerived = new Derived(123);
printf("[D] Derived.Base1::getSomething() = %d \n",
dlangDerived.getSomething());
printf("[D] Derived.Base2::getOtherThing() = %d \n",
dlangDerived.getOtherThing());
pr
On Tuesday, 25 May 2021 at 08:10:25 UTC, sighoya wrote:
On Tuesday, 25 May 2021 at 02:47:19 UTC, Gavin Ray wrote:
The below seems to work at least, which is encouraging:
Awesome!
At least, it becomes problematic with fields in base classes,
it would be nice if we could map them to @property
On Tuesday, 25 May 2021 at 02:47:19 UTC, Gavin Ray wrote:
Unfortunately, it does not work if I try to add `final int
getSomething()` or the other one to the D interfaces, it throws
a symbol error because the mangled names are slightly different:
```sh
unresolved external symbol "public: int
On Friday, 21 May 2021 at 12:28:36 UTC, Alain De Vos wrote:
On a gtkd drawingarea I want to capture the mouse-pressed event
and get the coordinates of the pointer on the area.
I have
```
addEvents(GdkEventMask.BUTTON_PRESS_MASK);
```
Maybe I must add a signal-handler ?
Not a gtk user, but mayb
On Saturday, 15 May 2021 at 08:37:21 UTC, cc wrote:
Are these identical? Or is there a different usage for the (T
: something) form?
```d
auto opCast(T)() if (is(T == bool)) {
return _obj !is null;
}
```
They are the same in this case.
```d
auto opCas
On Sunday, 9 May 2021 at 17:37:40 UTC, Andrey Zherikov wrote:
Compilation of this code:
```d
auto foo(T)()
{
return T(); // Error: cannot access frame pointer of
`onlineapp.main.T`
}
void main()
{
struct T
{
int a=1;
void argsFunc(int a) {} // (1)
}
pragm
On Sunday, 2 May 2021 at 16:06:10 UTC, Danny Arends wrote:
On Sunday, 2 May 2021 at 12:35:51 UTC, evilrat wrote:
As for SDL2, are you sure it was built with Vulkan support?
That's the thing I worry about, since the SDL2 libraries are
locally build using android studio and I'm kind of a noob i
On Sunday, 2 May 2021 at 12:35:51 UTC, evilrat wrote:
On Sunday, 2 May 2021 at 08:58:30 UTC, Danny Arends wrote:
Any thoughts on why loading the Vulkan library using SDL2
would not work ?
thoughts in general about the process ?
Just few tips.
GC "crashes" since you have custom main, D defaul
On Sunday, 2 May 2021 at 08:58:30 UTC, Danny Arends wrote:
Any thoughts on why loading the Vulkan library using SDL2 would
not work ?
thoughts in general about the process ?
Just few tips.
GC "crashes" since you have custom main, D default main has
runtime initialization code so it "just wor
On Wednesday, 28 April 2021 at 19:46:00 UTC, Alain De Vos wrote:
It is rather clear what I want to achieve but virtual functions
give me headache because dlang does not now the word virtual.
It's virtual by default. The opposite is `final`.
On Monday, 19 April 2021 at 17:37:31 UTC, MoonlightSentinel wrote:
On Monday, 19 April 2021 at 16:26:20 UTC, evilrat wrote:
Or maybe there is a way to tell it whitelist/blacklist modules?
The header generator only translates modules passed on the
command line, other declarations are omitted u
It is annoying, it tries to write all derived classes where it
only needs interface.
Or maybe there is a way to tell it whitelist/blacklist modules?
Marking class private is not an option.
On Monday, 12 April 2021 at 18:16:14 UTC, Jack wrote:
Give this class:
```d
class A
{
int X() { return x; }
int X(int v) { return x = v;}
private int x;
}
```
I'd like to allow use ```+=```, ```-=``` operators on ```X()```
and keep encapsulation. What's a somehow elega
On Thursday, 8 April 2021 at 21:36:02 UTC, Alain De Vos wrote:
The most important task is
"give me a list of to include .d files"
"give me a list of the link libraries .a .so"
sure, use -v flag, this will give you compiler flags and other
info
```
dub build -v
```
this will give you extens
On Tuesday, 30 March 2021 at 04:01:12 UTC, Brad wrote:
I would like to use an updated version of the Termbox library
(written in C) with D. I have the .h file. This is new
territory for me (why try something easy - right?). I think I
need to create a .di file that corresponds to the .h file.
On Monday, 29 March 2021 at 17:52:13 UTC, Gavin Ray wrote:
Trying to read this function signature:
void my_func(T, XS)(string a, string b, string c, lazy T
function(XS)[] t...)
Does this say "Generic void function 'my_func', which takes two
generic/type params "T" and "XS", and is a func
On Monday, 29 March 2021 at 15:13:04 UTC, Gavin Ray wrote:
Brief question, is it possible to write this so that the "alias
fn" here appears as the final argument?
auto my_func(alias fn)(string name, string description, auto
otherthing)
The above seems to work, since the type of "fn" can va
On Monday, 15 March 2021 at 16:41:08 UTC, Imperatorn wrote:
Could D be used with WinUI 3?
https://docs.microsoft.com/en-us/windows/apps/winui/winui3/
Would the win32metadata help? 🤔
I've seen some slides about WinUI 3 future directions and roadmap
but haven't tried it yet.
Probably it will b
On Monday, 15 March 2021 at 02:43:01 UTC, Tim wrote:
On Monday, 15 March 2021 at 02:03:09 UTC, Adam D. Ruppe wrote:
On Monday, 15 March 2021 at 01:53:31 UTC, Tim wrote:
I'm needing to use a c/c++ library in a D program and I'm
struggling with creating a binding as it seems like an
enormous amo
On Sunday, 14 March 2021 at 09:35:40 UTC, frame wrote:
// this returns null in the program (but works in a debugger
watch):
MyExceptionObj imported = cast(MyExceptionObj)e;
// this actually works:
MyExceptionObj imported = cast(MyExceptionObj) cast(void*)e;
Is there are way to copy the e
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 in the descontrutor? if so, why?
GC prohibits allocation during collection, since this dtor is
likely called b
On Tuesday, 2 March 2021 at 04:26:52 UTC, Pillager86 wrote:
On Tuesday, 2 March 2021 at 04:13:31 UTC, Pillager86 wrote:
On Tuesday, 2 March 2021 at 03:42:14 UTC, Pillager86 wrote:
Update: the dub "dynamicLibrary" target option is busted on
Windows and does not build anything at all. This should
1 - 100 of 256 matches
Mail list logo