On Monday, 4 September 2023 at 23:57:03 UTC, Hipreme wrote:
Hello again!
--
As of some requests in DConf, I'll post here some things
related (or not) to dub recipes.
Since there is so many ways to build D and dub is quite the
main way, I'll try to show other uncommon ways to use it, this
is
On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote:
On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote:
Completely new to D, and when trying to setup the toolchain,
Could you please specify the versions of macOS and DMD?
Probably DMD is broken for macOS - could you try to use
On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote:
Completely new to D, and when trying to setup the toolchain,
DMD seems to work fine, but dub is running into linker issues.
On my Intel iMac I have to set `MACOSX_DEPLOYMENT_TARGET`:
```
MACOSX_DEPLOYMENT_TARGET=11 dub run
```
On Saturday, 19 August 2023 at 08:59:40 UTC, Ferhat Kurtulmuş
wrote:
On Saturday, 19 August 2023 at 01:44:16 UTC, Kyle Ingraham
wrote:
On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş
wrote:
I think the main problem is the mir libraries won't get
updates since Ilya recently said
On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş wrote:
I think the main problem is the mir libraries won't get updates
since Ilya recently said that he was not an open source
developer anymore.
That’s unfortunate for D but hopefully beneficial for Ilya. Was
it said somewhere
I've been working on implementing some of the things I like about
the Django framework from Python in D. It started out as a vibe.d
router implementing Django's URL dispatching scheme
(https://forum.dlang.org/thread/mhnchxsabvvriavwq...@forum.dlang.org). Now it's a web framework of its own
On Saturday, 1 October 2022 at 21:18:05 UTC, Ali Çehreli wrote:
On 10/1/22 11:15, Kyle Ingraham wrote:
> storing structs as
> `void*` in a wrapper struct with information about their
module and
> identifier saved elsewhere.
Perhaps unrelated but that part reminded me of the
Hi all. I use Django and Python for web development in my day job
but vastly prefer working in D. I decided to try using D's
flexibility to bring a bit of Django's API to vibe.d's routing.
The result is a vibe.d router that implements Django's URL
dispatching system.
The package is available
On Tuesday, 13 September 2022 at 08:43:45 UTC, Nick Treleaven
wrote:
On Tuesday, 13 September 2022 at 03:00:17 UTC, Kyle Ingraham
wrote:
Any suggestions for being able to call one function for any
instance given but maintain flexible return types?
Not sure if it helps, but you can define
On Tuesday, 13 September 2022 at 01:46:14 UTC, Paul Backus wrote:
On Tuesday, 13 September 2022 at 00:57:58 UTC, Kyle Ingraham
wrote:
I am writing a library where I would like to be able to store
instances of a type of class to an associative array for later
usage. Each class stored has
I am writing a library where I would like to be able to store
instances of a type of class to an associative array for later
usage. Each class stored has to implement a function as part of
the required interface. The argument given is always the same
type but the return value should be
On Sunday, 11 September 2022 at 00:56:39 UTC, Adam D Ruppe wrote:
On Sunday, 11 September 2022 at 00:32:18 UTC, Kyle Ingraham
wrote:
I can't use default parameters because I want to be able to
call the delegate with arguments extracted from a URL path at
runtime
Some kind of wrapper might
On Sunday, 11 September 2022 at 00:04:55 UTC, Adam D Ruppe wrote:
On Saturday, 10 September 2022 at 23:37:30 UTC, Kyle Ingraham
wrote:
How can I write a type that is strict for the first two
parameters but tolerant of any other parameter following those?
That's not a type per se, but you can
Is there a way to write a delegate type as being specific for
some parameters and tolerant of anything for others? For example,
I can specify this type:
```d
alias MyDelegateType = void delegate(string name, int age);
```
It would be compatible with a pointer to this function converted
to a
On Tuesday, 2 August 2022 at 12:39:41 UTC, pascal111 wrote:
but I'm still stuck. Do you have a down-to-earth example for
beginners to understand this concept?
I often go back to this post when writing templates:
https://dlang.org/blog/2020/07/31/the-abcs-of-templates-in-d/
It helped me when
to D. Peter Jacobs,
Rowan Gallon, and Kyle Damm wrote a little about it for the D
Blog.
The blog:
https://dlang.org/blog/2022/02/02/a-gas-dynamics-toolkit-in-d/
Reddit:
https://www.reddit.com/r/programming/comments/sij99d/they_wrote_a_gas_dynamics_toolkit_in_d/
I thought this was a great
On Friday, 14 January 2022 at 17:56:48 UTC, Adam D Ruppe wrote:
On Friday, 14 January 2022 at 17:48:41 UTC, kyle wrote:
[...]
alias works in term of compile-time names, not values. This
means the `this` value, being run time, gets discarded.
[...]
Thanks Adam. We need a repository
I'm trying to use ```alias``` in an operator overload to reduce
typing, but what gets aliased is not what I expect. Tested in DMD
v2.098.1-dirty on Windows plus whatever versions of DMD, GDC, and
LDC I have installed on Linux. Thanks.
```
struct Broke
{
double num;
import std.traits
On Saturday, 4 December 2021 at 20:41:47 UTC, Steven
Schveighoffer wrote:
# BEERCONF!
As was done last year, instead of having beerconf on Christmas,
we will push it up a week to the 18-19th of December.
Bring your favorite eggnog and/or other beverages, and your
best singing voice, and we
Thanks for the writeup. How are you using this functionality?
On Sunday, 28 November 2021 at 07:27:35 UTC, ikod wrote:
On Sunday, 28 November 2021 at 01:06:45 UTC, Kyle Ingraham
wrote:
On Saturday, 27 November 2021 at 22:18:48 UTC, ikod wrote:
On Saturday, 27 November 2021 at 20:31:16 UTC, Kyle Ingraham
Hi Kyle,
```
object.Exception@C:\Users\Kyle
On Saturday, 27 November 2021 at 22:18:48 UTC, ikod wrote:
On Saturday, 27 November 2021 at 20:31:16 UTC, Kyle Ingraham
wrote:
On Saturday, 27 November 2021 at 19:21:28 UTC, frame wrote:
On Saturday, 27 November 2021 at 17:41:55 UTC, Kyle Ingraham
wrote:
I was afraid of that. Thank you
On Saturday, 27 November 2021 at 19:21:28 UTC, frame wrote:
On Saturday, 27 November 2021 at 17:41:55 UTC, Kyle Ingraham
wrote:
Is there a way to see that information? Google's API does not
seem to provide much more than a status code as to the reason
for the failure.
No, and it's a shame
Happy Saturday everyone. I am using `std.net.curl:post` to
request an OAuth access token from a Google API. Initially I was
getting a 400 status code back but could not tell why. I used the
`verbose` option on `HTTP()` to get more details:
```D
char[] tokenResponse;
auto connection = HTTP();
On Friday, 29 October 2021 at 18:19:58 UTC, Salih Dincer wrote:
On Thursday, 28 October 2021 at 21:23:15 UTC, kyle wrote:
```
void main()
{
import std.math : abs, sgn;
alias n_type = short; //or int, long, byte, whatever
assert(n_type.min == abs(n_type.min));
assert(sgn(abs
On Thursday, 28 October 2021 at 21:23:15 UTC, kyle wrote:
```
void main()
{
import std.math : abs, sgn;
alias n_type = short; //or int, long, byte, whatever
assert(n_type.min == abs(n_type.min));
assert(sgn(abs(n_type.min)) == -1);
}
```
I stumbled into this fun today. I
```
void main()
{
import std.math : abs, sgn;
alias n_type = short; //or int, long, byte, whatever
assert(n_type.min == abs(n_type.min));
assert(sgn(abs(n_type.min)) == -1);
}
```
I stumbled into this fun today. I understand why abs yields a
negative value here with overflow
On Monday, 27 September 2021 at 16:23:49 UTC, Adam D Ruppe wrote:
On Monday, 27 September 2021 at 16:20:59 UTC, Steven
Schveighoffer wrote:
That's a regression. In 2.092.1, it reports:
aye known bug here
https://issues.dlang.org/show_bug.cgi?id=21321
maybe once dmd can compile C code we'll
I'm attempting Markdown for the first time so forgive me if that
doesn't go well. Consider the following:
```d
interface A
{
bool broken();
}
abstract class B : A
{
}
class C : B
{
}
void main()
{
import std.stdio;
C test = new C();
writeln(test);
}
```
DMD compiles this
On Saturday, 5 June 2021 at 00:24:01 UTC, someone wrote:
On Saturday, 5 June 2021 at 00:24:01 UTC, someone wrote:
? 0 : cast(ushort)(this.pintBottom1 - 1); }
It looks like you’re being caught by D’s arithmetic conversions:
https://dlang.org/spec/type.html#usual-arithmetic-conversions
“If
On Sunday, 16 May 2021 at 18:30:49 UTC, Alain De Vos wrote:
Is there a list of compiler flags not shown ?
ldc2 -help-hidden
On Wednesday, 24 March 2021 at 12:24:19 UTC, Mike Parker wrote:
The blog:
https://dlang.org/blog/2021/03/24/d-2-096-0-released-and-other-news/
The blog post has made it to the front page of Hacker News:
https://news.ycombinator.com/item?id=26568542
On Tuesday, 9 March 2021 at 11:58:45 UTC, Andrey Zherikov wrote:
On Tuesday, 9 March 2021 at 02:57:46 UTC, Adam D. Ruppe wrote:
try
is(typeof(f) == function)
it is kinda weird but that's the trick
Thanks!
Should it work for in this case as well?
alias f = (){};
On Wednesday, 24 February 2021 at 20:15:08 UTC, Ali Çehreli wrote:
On 2/23/21 7:52 PM, Kyle Ingraham wrote:
Where would one find information on this
There are Point and Polygon struct templates on the following
page where one can pick e.g. the dimension (e.g. three
dimensional space
On Wednesday, 24 February 2021 at 06:18:02 UTC, H. S. Teoh wrote:
Usually it's when there's a decision that needs to be made at
compile-time (or desirable to be made at compile-time for
whatever reason). For example, if there are two very different
branches of code that should run depending
On Wednesday, 24 February 2021 at 03:57:37 UTC, Adam D. Ruppe
wrote:
On Wednesday, 24 February 2021 at 03:52:57 UTC, Kyle Ingraham
wrote:
The part that got my attention was `bool isBGR`. I was under
the impression that compile-time or template parameters were
only for types.
No, you can pass
I was reading the code for the DCV library and came across this
function:
https://github.com/libmir/dcv/blob/master/source/dcv/imgproc/color.d#L128
Here is a shortened form:
[return type] rgbbgr2gray(bool isBGR, V)([run-time
parameters]){[implementation]}
and an example call:
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
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
My problem is that I cannot figure out how to calculate a dot
product using mir. Here is my code:
import std.stdio;
import mir.glas.l1 : dot;
I've been doing some review of Andrei's book which has led me to
trying to figure out how placement new works, or doesn't work.
The new(address) Type syntax tells me "no allocator for TYPE". I
did find information on "Class Allocators" at
https://dlang.org/spec/class.html#allocators, but when
I’m sorry that this isn’t a solution to your problem but your
code caught my attention. What is your snippet supposed to do?
On Friday, 18 December 2020 at 19:14:25 UTC, Daren Scot Wilson
wrote:
So maybe beamui isn't ready for the real world. It's a one-off
personal tool for image processing, maybe will go up on Github,
so I don't need anything super-solid or well established. OTOH,
if it's too much on the WIP side
On Thursday, 3 December 2020 at 01:19:05 UTC, bachmeier wrote:
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham
wrote:
What did I do wrong in constructing the bindings? If it helps
the library provides a function called EdsRelease for
cleaning-up allocated objects
On Thursday, 3 December 2020 at 00:58:20 UTC, Paul Backus wrote:
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham
wrote:
// EDSDKTypes.h
typedef struct __EdsObject* EdsBaseRef;
typedef EdsBaseRef EdsCameraListRef;
//
[...]
// edsdk.d
struct EdsBaseRef;
alias EdsBaseRef
Hello all. I am new to D and loving the experience so far.
I am trying to make use of a C library from Canon that provides a
header and a pre-compiled binary containing implementations of
declarations found in the header. I used the excellent guide at
I'm just some random guy but for what it's worth the recorded
talks at DConf are valuable to me. I don't much care what format
the conference takes or if we even continue to have them since
it's not often practical for me to attend anyway, but I would
miss the talks. It would be cool if the
On Thursday, 15 February 2018 at 18:30:57 UTC, Jonathan M Davis
wrote:
On Thursday, February 15, 2018 17:53:54 Kyle via
Digitalmars-d-learn wrote:
I want to be able to pass an int to a function, then in the
function ensure that the int is little-endian (whether it
starts out that way or needs
"What I'm trying to achieve is to ensure that an int is in
little-endiannes"
Ignore that last part, whoops.
On Thursday, 15 February 2018 at 17:43:10 UTC, Jonathan M Davis
wrote:
On Thursday, February 15, 2018 16:51:05 Kyle via
Digitalmars-d-learn wrote:
Hi. Is there a convenient way to convert a ubyte[4] into a
signed int? I'm having trouble handling the static arrays
returned
On Thursday, 15 February 2018 at 17:25:15 UTC, ketmar wrote:
Nicholas Wilson wrote:
On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote:
Hi. Is there a convenient way to convert a ubyte[4] into a
signed int? I'm having trouble handling the static arrays
returned
Hi. Is there a convenient way to convert a ubyte[4] into a signed
int? I'm having trouble handling the static arrays returned by
std.bitmanip.nativeToLittleEndian. Is there some magic sauce to
make the static arrays into input ranges or something? As a side
note, I'm used to using D on Linux
On Tuesday, 19 December 2017 at 23:57:24 UTC, Mike Parker wrote:
Packt is having one of their sales right now. Each of their
ebooks is $5. If you haven't gotten the D books yet, now's a
great time to do so!
https://www.packtpub.com/application-development/d-cookbook
On Friday, 7 April 2017 at 15:14:40 UTC, Walter Bright wrote:
https://github.com/dlang/dmd/pull/6680
Yes, this is for real! Symantec has given their permission to
relicense it. Thank you, Symantec!
Excellent, good work.
Any word on live streaming?
Thanks! I look forward to trying this out.
Hi,
I have a function using the derelict-enet library:
void sendUbytes(ENetPeer* dest, ref ubyte[] data)
{
//create packet
ENetPacket* packet = enet_packet_create(cast(ubyte*)data,
data.length * ubyte.sizeof, ENET_PACKET_FLAG_RELIABLE);
//send packet to peer over channel id 0
On Sunday, 29 November 2015 at 01:57:25 UTC, Adam D. Ruppe wrote:
..
Are you compiling it as a 64 bit or a 32 bit program?
64 bit. You're probably right, I will take out the explicit
destroy and look for a memory leak elsewhere, and adjust for your
other suggestions. Thanks for the advice!
Thanks! I'll try this out after I get home.
If you memoize a method inside a class definition using
std.functional.memoize is caching done in a per-object manner, or
do all objects of this class share cached return values? Thank
you.
Hi,
Has anyone successfully used D to capture images from a webcam?
Something like what you can do with OpenCV or pygame's camera
API? Any idea how I can do this without having to know a lot of
complex stuff? Thanks!
On Friday, 12 September 2014 at 01:17:10 UTC, Kyle Siefring wrote:
I was thinking that there were a few useful applications for
using metaprogramming could be used as
int rng()
{
}
I think pressing the tab key just sent this message before I was
sure I even wanted to type it. Let's see
I was thinking that there were a few useful applications for
using metaprogramming could be used as
int rng()
{
}
On Friday, 12 September 2014 at 01:19:40 UTC, Kyle Siefring wrote:
On Friday, 12 September 2014 at 01:17:10 UTC, Kyle Siefring
wrote:
I was thinking that there were a few useful applications for
using metaprogramming could be used as
int rng()
{
}
I think pressing the tab key just sent
When I choose a programming language to work on a problem, one of
the factors I look at is whether there are enough tools and
libraries to construct a solution in a reasonable amount of time.
Back when I was looking at D for game development – and I still
am – there was Derelict. And now,
On Sunday, 4 May 2014 at 20:47:58 UTC, Nick Sabalausky wrote:
On 5/4/2014 3:55 PM, Gary Willoughby wrote:
On Sunday, 4 May 2014 at 19:19:57 UTC, Nick Sabalausky wrote:
Just updated to latest DUB release (v0.9.21), but now I'm
getting this:
That's building with the config 'library'. If you
Am I missing something? I thought this was supposed to be working with
the 7.2 release of GDB? Is this working for anyone else?
$ cat hello.d
import std.stdio;
int main(char[][] args)
{
writeln(hello world\n);
writefln(args.length = %d, args.length);
for (int i = 0; i
On 10/14/10 2:31 PM, Kyle Mallory wrote:
Am I missing something? I thought this was supposed to be working with
the 7.2 release of GDB? Is this working for anyone else?
$ dmd -g hello.d
FYI, I did get this working (mostly) by invoking:
$ dmd -gc -debug hello.d
I'm curious now
messages, no
exceptions, etc.
Am I the only one with this problem?
On 04/04/2010 11:36 AM, Kyle Mallory wrote:
I'm trying a bit of socket stuff. I went back to the htmlget.d sample,
and patched it up for 2.0 (I'm using DMD 2.042 on Ubuntu 9.10). I get
the same results from this as I do from
On 04/05/2010 06:56 PM, Jesse Phillips wrote:
I believe you are running into this bug:
http://d.puremagic.com/issues/show_bug.cgi?id=2835
Where sockets don't work in Linux.
Argh.. Thanks. Looks like an easy enough patch. Unfortunate the bug
its still lingering in the latest build
!
Very much appreciated!
Kyle
the other kids during the Winter Solstice Festival at school, that's
fine. But the chances of getting the recognition that it deserves is
severely diminished.
Kyle
Andrei Alexandrescu Wrote:
Yes; opBinary was just given as an example. Unary operators look like this:
T opUnary(string op)();
Why not do
T op(string op)(); // unary
T op(string op)(T rhs); // binary
Andrei Alexandrescu Wrote:
6. There must be many things I forgot to mention, or that cause grief to
many of us. Please add to/comment on this list.
Uniform function call syntax.
Andrei Alexandrescu Wrote:
6. There must be many things I forgot to mention, or that cause grief to
many of us. Please add to/comment on this list.
Static function parameters
Walter Bright Wrote:
For anyone looking for an easy, but valuable, contribution to D, take a
look at the go runtime library.
...
Should we submit these kinds of things through bugzilla? What is the
preferred method?
Sean Kelly wrote:
head/last
It seems fairly popular and doesn't cause any confusion with 'tail' if
we decide to use that later on.
Sean
This. +1
Andrei Alexandrescu wrote:
first/last - 13: Jarrett, Bill, dsimcha, Sandeep, Chad, Tiago, Robert,
Simen, Brian, Bill, Yigal, Gide, Ary.
head/toe - 9: Bill, dsimcha, Robert, Simen, Max, Don, Michel, Denis, Brian,
front/back - 15: dsimcha, Chad, Steve, Robert, Nick, BCS, Bill, BLS,
Yigal,
Gregor Richards wrote:
Daniel White wrote:
However, for many people who don't have these readers (and don't want
to try one yet)
Waitin' 'til '91 or so to see if this whole Internet thing pans out?
- Gregor Richards
Actually Gregor, the opposite is true. You're implying that anyone
78 matches
Mail list logo