On 1/19/23 10:11 PM, Ruby The Roobster wrote:
Take this example:
```d
import std;
void main()
{
auto c = "a|b|c|d|e".splitter('|');
c.writeln;
string[] e = ["a", "b", "c", "d", "e"];
assert(c.equal(e));
typeof(c).stringof.writeln;
}
```
The program prints:
["a", "b",
On 1/19/23 6:24 PM, seany wrote:
Hello
Please consider this diet template:
doctype html
html(lang="es", dir="ltr")
head
meta(name="viewport", content="width=device-width,
user-scalable=no, initial-scale=1.0")
# BEERCONF!
Happy new year! Beerconf this month falls on January 28-29. It may seem
like it's been a while, and that's because it has. Dconf online last
month moved up the gathering by a couple weeks, and so we will be 6
weeks out from the last one. The last one was pretty good, with many of
On 1/12/23 12:05 PM, seany wrote:
How can I make it, that classes b and c can access each other, and
create instances of each other freely? Thank you.
So to just point out something that wasn't discussed by Salih:
When you declare a field of a class with an initializer, *that
initializer
On 1/10/23 7:55 AM, Adam D Ruppe wrote:
On Sunday, 8 January 2023 at 18:42:58 UTC, Salih Dincer wrote:
I'm wondering 2 things; firstly, does having an enum mean there is no
auto-return? Or could it be CTFE?
It means nothing. The keyword tells the parser a function is about to
begin, which
On 1/8/23 12:42 AM, Qusatlegadus wrote:
auto s = 1234.to!string.map!q{a - '0'}.sum;
works fine.
but if i do an alias
alias comb = to!string.map!q{a - '0'}
Error: unknown, please file report on issues.dlang.org
What's wrong with this alias?
Aside from the problem with the
On 1/4/23 2:27 PM, Ali Çehreli wrote:
On 1/4/23 10:48, H. S. Teoh wrote:
> Allocations are not necessarily consecutive; the GC may have its own
> strategy of allocation that doesn't follow a linear sequence.
That was one of my guesses. So, I put the objects into a 2-length static
array but
On 1/1/23 6:28 PM, torhu wrote:
I need to parse some JSON data into various data structures, so I'm
looking for a parser based on events or ranges. One that doesn't just
load the file and build a data structure that represents the whole
thing. So not std.json, at least.
It's pretty
On 12/27/22 9:31 PM, thebluepandabear wrote:
I am reading through the free book on learning D by Ali Çehreli and I am
having difficulties understanding the difference between compile time
execution and run time execution in D language.
Compile time execution is running your code being
On 12/27/22 10:31 AM, Sergei Nosov wrote:
On Tuesday, 27 December 2022 at 15:20:24 UTC, Salih Dincer wrote:
On Tuesday, 27 December 2022 at 15:09:11 UTC, Sergei Nosov wrote:
Consider, I have the following code:
```d
auto a = [3, 6, 2, 1, 5, 4, 0];
auto indicies = iota(3);
auto ai
On 12/16/22 7:17 AM, Nick Treleaven wrote:
This code segfaults when the GC calls the dtor after the unittest succeeds:
```d
unittest
{
int i;
struct S
{
~this() { i++; }
}
(*new S).destroy;
}
```
It seems destroy clears the context pointer. Is there a way to
On 12/23/22 10:07 AM, jwatson-CO-edu wrote:
On Friday, 23 December 2022 at 00:58:01 UTC, Steven Schveighoffer wrote:
Without the rest of the code, and how random is called, I have a
hunch... Are you using threads by any chance?
If, for instance, your calls to rand01 are done in a new thread
On 12/22/22 11:23 AM, jwatson-CO-edu wrote:
I am confused about why Program 1 produces random output but Program 2
does not.
---
### Program 1
```d
import std.stdio;
import std.conv;
import std.random;
Mt19937 rnd;
double rand01(){
// Uniform random sampling in [0,1)
return
On 12/13/22 3:35 PM, ryuukk_ wrote:
On Tuesday, 13 December 2022 at 20:01:40 UTC, torhu wrote:
On Tuesday, 13 December 2022 at 19:50:15 UTC, torhu wrote:
On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:
Hello. How to use version in dub?
https://dlang.org/spec/version.html
"The
On 12/13/22 10:20 AM, Steven Schveighoffer wrote:
Yeah, that's a known issue:
https://github.com/ldc-developers/ldc/issues/3864
Try building with `-b plain` to avoid the debug build
Oh, also, I have MACOSX_DEPLOYMENT_TARGET=11 in my environment, that
helps to avoid it as well.
-Steve
On 12/13/22 9:35 AM, zoujiaqing wrote:
On Saturday, 3 December 2022 at 20:33:59 UTC, Steven Schveighoffer wrote:
The issue is dub. Make sure you are using the dub built for ARM.
What Apple does is if any program in the same process group is x86
specific, then all the executed programs
On 12/13/22 6:22 AM, Per Nordlöw wrote:
On Monday, 12 December 2022 at 17:29:00 UTC, Steven Schveighoffer wrote:
Removing keys while iterating is not supported. It will break, in
confusing ways, and possibly include a null pointer dereference.
IRC, the specs says that it's an error to modify
On 12/12/22 8:45 PM, Steven Schveighoffer wrote:
for(auto r = aa.byKey, auto k = r.front; !r.empty; r.popFront)
err... forgot the continual front assignment
I think it's more like:
for(auto r = aa.byKey; !r.empty; r.popFront) {
auto k = r.front;
// foreach body
}
-Steve
On 12/12/22 7:54 PM, lili wrote:
is foreach Syntactic sugar?, like for-range in C++, if it is, compiler
how implement
Yes it is syntax sugar. The lowering depends on what the item you're
iterating is.
For an associative array `byKey`, it is converting the AA into a range
of keys, and
On 12/12/22 12:23 PM, lili wrote:
```
int[string] aa = ["ok":1, "aaa":2, "ccc":3, "ddd":4];
foreach (k ; aa.byKey)
{
if (k == "aaa") {
aa.remove(k);
aa["ww"] = 33;
}
if (k == "ww") {
aa.remove(k);
aa["vv"] = 33;
}
On 12/12/22 3:54 AM, realhet wrote:
Hi,
I'm writing a DLang parser and got confused of this.
What is a good way to distinguish lambda functions and structure
initialization blocks.
Both of them are {} blocks.
I'm thinking of something like this:
1. checking inside (on the first hierarchy
On Saturday, 10 December 2022 at 20:49:03 UTC, Christian Köstlin
wrote:
Is anybody participating with dlang in the advent of code 22?
It would be interesting to discuss dlang specific things from
the puzzles.
Mine: https://github.com/schveiguy/adventofcode
-Steve
On 12/10/22 1:11 AM, thebluepandabear wrote:
I was wondering more if there is an object oriented way of creating
arrays, like in Java there is an `ArrayList`, in C++ there is
`std::vector`, etc.
In D, you just use `T[]` for an array, it's similar to `std::vector`.
-Steve
On 12/10/22 12:46 AM, thebluepandabear wrote:
In most languages there is some sort of `List` type, is that the same
for D?
D doesn't focus on interfaces, we have concepts, like ranges.
Sorry, it's hard to answer your question without asking more questions:
are you looking for a linked list?
On 12/3/22 1:59 PM, zoujiaqing wrote:
```
dub build --compiler=ldc2 --arch=arm64-apple-macos
Starting Performing "debug" build using ldc2 for aarch64,
arm_hardfloat.
Building taggedalgebraic 0.11.22: building configuration [library]
Building eventcore 0.9.20+commit.4.g6744ae7:
On 12/3/22 2:17 PM, zoujiaqing wrote:
Thank you!!!
When will it support Apple M1 processors?
My macbook has been unable to use D for months.
I can use dmd and ldc on my M1. rosetta works great, and ldc supports
arm. I have not tried gdc.
-Steve
# BEERCONF!
As it was last year, and the year before, this month's beerconf will
coincide with the annual [Dconf
Online](https://dconf.org/2022/online/index.html). That means December
17-18.
Everything will be mostly the same, except we will probably be spending
a lot of time on the actual
On 12/2/22 4:18 PM, thebluepandabear wrote:
Hello (noob question),
I am reading a book about D by Ali, and he talks about the different
char types: char, wchar, and dchar. He says that char stores a UTF-8
code unit, wchar stores a UTF-16 code unit, and dchar stores a UTF-32
code unit, this
On 12/2/22 3:46 PM, Christian Köstlin wrote:
Please see this screenshot: https://imgur.com/Ez9TcqD of my browser
(firefox or chrome) of https://vibed.org/api/vibe.web.auth/
Not just you. And Sonke is aware (there's a conversation on the dlang
slack).
-Steve
On 12/1/22 5:50 PM, jwatson-CO-edu wrote:
On Thursday, 1 December 2022 at 22:16:30 UTC, jwatson-CO-edu wrote:
That was the trick, [inside the loop it detects the
gamepad](https://github.com/jwatson-CO-edu/nanoverse/blob/main/d/raylib/04_jsInput/source/app.d#L35). No other changes needed.
I
On 12/1/22 11:10 AM, ryuukk_ wrote:
Can you try with this page:
https://www.raylib.com/examples/core/loader.html?name=core_input_gamepad
Does it detect your gamepad?
It should work because the `IsGamepadAvailable` function call is inside
the loop. That's most certainly the problem with the
On 12/1/22 3:24 AM, bauss wrote:
But probably not on every frame, have a delay between checks.
It's not anything controllable by the user. The library does the check
every frame regardless of whether you use it or not.
When you call the raylib function, you are not actually querying the
On 11/30/22 8:49 PM, jwatson-CO-edu wrote:
Yes, following your instructions I have raylib 4.2.0 and raylib-d 4.2.4
in the project directory. I am now using the latest version of
raylib-d, but this did not resolve the gamepad issue. I can ask around
on the raylib channels.
Oh, I think I
On 11/30/22 7:56 PM, jwatson-CO-edu wrote:
uint MAX_LIGHTS = 4;
This needs to be an `enum`.
//...
Light[MAX_LIGHTS] lights; // Error: undefined identifier `Light`
The rlights header file is not part of the raylib library, but is in the
examples directory, you will need to port it. It's
On 11/30/22 7:28 PM, jwatson-CO-edu wrote:
On Wednesday, 30 November 2022 at 23:18:33 UTC, ryuukk_ wrote:
On Wednesday, 30 November 2022 at 22:46:52 UTC, jwatson-CO-edu wrote:
Hello,
I have this small [gamepad input test
On 11/29/22 7:50 PM, WebFreak001 wrote:
(note: I don't want to use a template, this way of writing it has the
advantage that the compiler checks all different code paths for errors,
so the errors aren't delayed until someone actually tries to iterate
over my data structure)
1. use the
On 11/25/22 11:40 AM, Steven Schveighoffer wrote:
On 11/12/22 4:51 PM, Steven Schveighoffer wrote:
## Presentations?
With dconf online so close, I'm pretty sure no presentations would be
forthcoming, but if you have something, let me know, and I'll schedule
it.
In this upcoming beerconf
On 11/12/22 4:51 PM, Steven Schveighoffer wrote:
## Presentations?
With dconf online so close, I'm pretty sure no presentations would be
forthcoming, but if you have something, let me know, and I'll schedule it.
In this upcoming beerconf, Stefan Koch is going to have a talk about
meta
On 11/12/22 4:51 PM, Steven Schveighoffer wrote:
# BEERCONF!
Let's hope my US compatriots can drag themselves out of their
turkey-induced comas to have some D discussions! The dates are November
26-27.
Forthcoming! Happy Thanksgiving everyone! 旅
See you in a couple days.
-Steve
On 11/16/22 11:25 PM, Daniel Donnelly wrote:
I have SubclassOf derived from PosetRelation. For any poset relation,
the transitivity law applies, however, I'd like to return the correct type:
```
PosetRelation transitivity(PosetRelation R, PosetRelation S)
{
if (R.op == S.op)
On 11/15/22 7:41 PM, zjh wrote:
On Tuesday, 15 November 2022 at 20:54:03 UTC, Iain Buclaw wrote:
Glad to announce D 2.101.0, ♥ to the 63 contributors.
...
Thank you very much, but can we have commands like `'dmd update'` to
update dmd directly?
https://github.com/jacob-carlborg/dvm
`dvm
# BEERCONF!
Let's hope my US compatriots can drag themselves out of their
turkey-induced comas to have some D discussions! The dates are November
26-27.
This is the last beerconf before actual [Dconf
online](https://dconf.org/2022/online/index.html), which will coincide
once again with
On 11/4/22 7:19 PM, Anonymouse wrote:
[#20699](https://issues.dlang.org/show_bug.cgi?id=20699) must be
non-trivial to fix, so I'm exploring makefiles. If possible I'd like to
keep dub for dependency management though, just not for actual compilation.
Is it at all possible (or even desireable)
On 11/4/22 3:49 PM, Adam D Ruppe wrote:
On Friday, 4 November 2022 at 19:34:58 UTC, jmh530 wrote:
Oh really, then what's the point of package.d?
It was originally added because Phobos had `std.algorithm` and
`std.datetime` and some people wanted to break them up into pieces, but
not break
On 11/3/22 1:46 PM, Tejas wrote:
Check my post, `A& a;` refuses to compile in C++20 atleast, asking to be
explicitly initialized, thus averting the problem altogether
That's different, `A&` cannot be rebound in C++, whereas a class
reference can.
Try `A* a;` and see if it compiles
-Steve
On 11/3/22 6:25 AM, bauss wrote:
Thanks for this project Steve,
Just trying it out and already enjoying it :)
You're welcome!
I should also mention that I fixed the issue with the macos binaries not
properly installing, so my note about that not working is moot. I still
have not figured
On 11/2/22 6:06 PM, Walter Bright wrote:
On 11/2/2022 4:19 AM, Steven Schveighoffer wrote:
On one of the only articles using ImportC (which otherwise shines a
positive light on the feature), this specific issue is the only one
that comes up as a blocker:
The easiest option would be to simply
On 11/2/22 8:58 AM, ryuukk_ wrote:
On Wednesday, 2 November 2022 at 04:42:06 UTC, Mike Parker wrote:
Following that, he had begun adding colors in the stack trace because
he thought they were unreadable, and adding colors was not that much
work. He had a proof-of-concept but still had a few
On 11/2/22 12:42 AM, Mike Parker wrote:
Walter said that ImportC doesn't support head const. His experience with
C is that people generally mean const in C to be transitive. So in
ImportC, he turned the head const cases into transitive const and it
appears to work well.
On one of the only
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
Oh yeah, isDaemon detaches the thread from the GC. Don't do
that unless you know what you are doing.
As discussed on discord, this isn't actually true. All it does is
prevent the thread from being joined before exiting
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
Oh yeah, isDaemon detaches the thread from the GC. Don't do
that unless you know what you are doing.
As discussed on discord, this isn't true actually. All it does is
prevent the thread from being joined before exiting
On 11/1/22 1:47 PM, mw wrote:
Can you show a code snippet that includes the parallel foreach?
(It's just a very straight forward foreach on an array; as I said it may
not be relevant.)
And I just noticed, one of the thread trace points to here:
On 11/1/22 12:02 PM, data pulverizer wrote:
On Tuesday, 1 November 2022 at 15:05:48 UTC, Mike Parker wrote:
I don't think anyone involved in organizing BeerConf knew that was
there. That's the first I've seen it.
I'd suggest that it is either removed or replaced with something more
On 11/1/22 11:40 AM, Keivan Shah wrote:
Hello,
Today I came across a strange bug while using D with `dmd`. I have still
not been able to figure out under what conditions does it happen but it
seems to be a DMD related bug to me. Here is a reproducible snippet of
the code
```D
import std;
On 11/1/22 7:54 AM, data pulverizer wrote:
It might just be my browser (Chrome) but I've noticed that there's
nothing in the events calendar (https://dlang.org/calendar.html).
Wouldn't it be helpful to include these sorts of things in the calendar
so that people visiting the site would be
On 10/29/22 2:00 PM, FeepingCreature wrote:
On Saturday, 29 October 2022 at 10:14:31 UTC, rikki cattermole wrote:
And now for some good news!
Its almost Halloween, so grab your candy and any spooky brews you may
have, and join us for a ghostly chat!
On 10/28/22 2:43 PM, Carsten Schlote wrote:
On Friday, 28 October 2022 at 18:31:25 UTC, Steven Schveighoffer wrote:
Are you passing the c file to the compiler? Also, you must be using
dmd for ImportC currently.
What is your build line?
```
$ cat dub.json
{
"au
On 10/28/22 1:45 PM, Carsten Schlote wrote:
Hi,
I created a Dub project containing two files: app.d and zstd_binding.c
```
$ cat source/zstd_binding.c
#include
#include
#include
void relatedCode(void)
{
printf("Hallo! This is some output from C code!\n");
}
```
and
```
$ cat
On 10/16/22 8:04 AM, Steven Schveighoffer wrote:
# BEERCONF!
Beerconf this month is on October 29-30, one day before Halloween.
Beerconf in 2 days, see you then!
-Steve
On 10/25/22 6:07 PM, WhatMeWorry wrote:
I'm naturally getting a undefined identifier `s` error in the return.
Is there some way to refactor my code? I tried to declare s outside of
the else brackets like:
auto screen = executeShell(cmdLine);
auto s;
...
{
s =
On 10/25/22 2:03 PM, Ali Çehreli wrote:
On 10/25/22 11:01, Ali Çehreli wrote:
> static arrays don't have .ptr to point
> to any member.
Why do I say incorrect things like that? :) Of course static arrays have
.ptr as well but that always point to their own body of N elements. They
own
On 10/22/22 5:53 PM, WhatMeWorry wrote:
string[] tokens = userSID.output.split!isWhite;
writeln("tokens = ", tokens);
tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "",
On 10/22/22 12:53 AM, Kevin Bailey wrote:
Steven,
Just because you don't see the value doesn't mean I don't. You should
try to
be more helpful, or don't bother.
I just mean that I don't understand what iterating from a random
position in the AA is. Why not iterate from the beginning? It
On 10/21/22 6:03 PM, Kevin Bailey wrote:
I'm trying to do this equivalent C++:
unordered_map map;
for (auto i = map.find(something); i != map.end(); ++i)
...do something with i...
in D, but obviously with an associative array. It seems that it's quite
easy to iterate
On 10/19/22 3:00 PM, Roman Funk wrote:
Hello,
I started playing with D and the hunt-framework. But I bumped into an
error using Validation.
```d
module app.forms.LoginForm;
import hunt.validation;
import hunt.framework.http.Form;
class LoginForm : Form {
mixin MakeForm;
@Email
# BEERCONF!
Beerconf this month is on October 29-30, one day before
Halloween. Feel free to wear your D costume, might I suggest a
beerconf T shirt?
https://www.zazzle.com/store/dlang_swag/products?cg=196874696466206954
## What is beerconf?
Check out the [wiki
On 10/13/22 3:18 PM, Dennis wrote:
The output is supposed to be a good starting point for manual
translation: tedious syntax changes are done for you, but you're left
with the task of translating (non-trivial) macros, fixing errors because
of D's stricter type system, and other misc things
On 10/13/22 3:00 PM, Sergey wrote:
I'm not a professional of IEEE 754, but just found this behavior at
rounding in comparison with other languages. I supose it happened
because in D float numbers parsed as double and have a full length of
double while rounding. But this is just doesn't match
On 10/12/22 7:46 AM, Dennis wrote:
On Wednesday, 12 October 2022 at 10:09:31 UTC, Steven Schveighoffer wrote:
I'm actually very surprised that just wrapping the statement in an ==
expression doesn't do the trick, what is the possible logic behind
outlawing that?
I looked
On 10/12/22 9:17 AM, Rene Zwanenburg wrote:
On Wednesday, 12 October 2022 at 02:15:55 UTC, Steven Schveighoffer wrote:
Am I missing something?
Perhaps I am, but why not turn it into a numeric comparison, like:
```
while((i = 5) == 0)
```
Yes, that is the answer, that was eluding me.
What
On 10/12/22 5:24 AM, Dennis wrote:
On Wednesday, 12 October 2022 at 02:15:55 UTC, Steven Schveighoffer wrote:
Porting some C code to D
This results in an error:
I had the same issue, where the pattern was this:
```C
void f()
{
int err;
if (err = some_api_call
Porting some C code to D
This results in an error:
```d
int x;
while(!(x = 5)) { break; }
```
Error is: assignment cannot be used as a condition, perhaps `==` was meant?
OK, fine, I'll use `==`:
```d
int x;
while(!(x = 5) == true) { break; }
```
Nope, same error. I tried reversing the
On 10/5/22 12:59 PM, torhu wrote:
I need a case-insensitive check to see if a string contains another
string for a "quick filter" feature. It should preferrably be perceived
as instant by the user, and needs to check a few thousand strings in
typical cases. Is a regex the best option, or what
On 10/5/22 12:57 PM, Paul wrote:
I'm sure I'm making this more difficult than it needs to be. I'm
trying to convert an integer to a dchar. The solution below works but
seems like overkill.
dstring dstrValue = to!dstring(5);
dchar dcharValue = to!dchar(dstrValue);
... this,
On 10/4/22 11:22 AM, Riccardo M wrote:
Is it possible to remove elements from a range without losing its capacity?
```
void main()
{
import std.algorithm.mutation : remove, SwapStrategy;
import std.stdio : writeln;
int[] arr = [1, 2, 3, 2, 4, 2, 5, 2];
assert(arr.length ==
On 10/2/22 12:21 PM, data pulverizer wrote:
I've noticed that `writeln` calls the destructor of a struct multiple
times and would like to know how to stop this from happening. It has
become a very serious problem when working with objects that have memory
management external to D.
I know you
On 10/1/22 12:57 AM, tsbockman wrote:
On Saturday, 1 October 2022 at 01:37:00 UTC, Steven Schveighoffer wrote:
The list of bit sizes is currently here:
I'm pretty sure those are in **bytes** not **bits**.
Yes, I meant bytes, sorry.
That's not a list of alignments, it is block sizes
On 9/30/22 11:57 AM, Quirin Schroll wrote:
When I do `new void[](n)`, is that buffer allocated with an alignment of
1 or what are the guarantees? How can I set an alignment? Also, is the
alignment of any type guaranteed to be a power of 2?
In practice, it's not necessarily a power of 2, but
On 9/26/22 4:57 PM, Christian Köstlin wrote:
Or posix only? Or not windows?
Kind regards,
Christian
We have specific directives based on os, I had an idea that you could
say something like:
```json
"dependencies-windows": {
"not-available" : "*"
}
```
But it still tries to find this
On Saturday, 24 September 2022 at 06:13:55 UTC, test123 wrote:
If so please report it for me to bugs platform. I can not
register one.
```d
package {
version(TEST) {
static:
} else {
__gshared:
}
uint test = 0;
}
```
ldmd2 -betterC -vtls -c ./test.d
On Sunday, 11 September 2022 at 23:44:45 UTC, Steven
Schveighoffer wrote:
# BEERCONF!
This month, beerconf is going to be happening without me,
unfortunately. But it is still happening!
The dates are Sept 24-25, 2 weeks from yesterday.
A quick reminder that this is coming up in 2 days
On 9/19/22 7:48 PM, mw wrote:
Hi,
I'm using dub.json to specify the dependencies libs for my project.
I'm just wondering how I can use dub to run all the tests of those
dependencies libs (of the transitive closure of *all* the libs) to make
sure my project is built on a very solid
On 9/19/22 10:24 AM, David wrote:
TLDR: How do I automatically specify the -I to the compilers so I don't
need to specify it manually each time ?
For dmd, dmd.conf: https://dlang.org/dmd-osx.html#dmd-conf
I believe for all compilers, there's an equivalent config file.
-Steve
Hi everyone,
I've released version 4.2.1 of raylib-d. This version is an attempt to
fix the issues with linking on Windows.
It introduces a new subproject, `raylib-d:install`, which will copy a
pre-built binary library of the appropriate version to your project
directory. While this is far
On 9/15/22 1:12 PM, cc wrote:
Why is Foo never deallocated here? (`DMD32 D Compiler v2.099.0-dirty`
win64)
In answer to your title question, no. It does not prioritize anything.
If it thinks something is ready to be freed, it is freed. If it thinks
something is not ready to be freed, it is
On 9/14/22 4:17 PM, jwatson-CO-edu wrote:
Hello,
I used the following steps to build the example `raylib-d` program.
(https://github.com/schveiguy/raylib-d#example)
### Install Raylib (Ubuntu/Debian)
1. `sudo apt install libasound2-dev mesa-common-dev libx11-dev
libxrandr-dev libxi-dev
On 9/14/22 12:53 AM, test123 wrote:
On Wednesday, 14 September 2022 at 00:40:38 UTC, Ruby The Roobster wrote:
The addresses of items stored in memory are by definition not
constant. This isn't a bug.
If so why this can work ?
```d
struct c { uint a, b;}
__gshared const c d = { 3, 4};
On 9/12/22 1:08 PM, Ali Çehreli wrote:
On 9/12/22 09:48, H. S. Teoh wrote:
>> @nogc nothrow pure @safe
>> unittest
>> {
>> // ...
>> }
>>
>> No, it isn't because unless my unittest code is impure, I can't catch
>> my incorrect 'pure' etc. on my member functions.
> [...]
>
> Sure
On 9/12/22 12:14 PM, Ali Çehreli wrote:
What are best practices here?
attributes such as `pure`, `@nogc`, `nothrow`, `@safe` should all be
left to inference. Either the function can do those attributes, or it
cannot.
attributes such as `const` or `inout` are different -- these are *not*
# BEERCONF!
This month, beerconf is going to be happening without me, unfortunately.
But it is still happening!
The dates are Sept 24-25, 2 weeks from yesterday. Nothing really special
to report, just a regular-old beerconf. Oh, and October 9th would be the
deadline for submitting a
On 9/10/22 12:33 PM, Erdem Demir wrote:
Can you please suggest alternatives?
Use a pointer.
```d
DListOfA *returnVal = (...);
returnVal.insert(a);
```
-Steve
On 9/9/22 10:35 AM, Andrey Zherikov wrote:
I have bunch of `static assert(, )` in my code and
would like to validate that specific code triggers specific assert by
checking what `` is thrown.
Right now I do `static assert(!__traits(compiles, { }));` but
since `` might not compile due to
On 9/8/22 11:34 AM, Ali Çehreli wrote:
I agree that the slides should take more room. The speaker can get more
space at the start, at the end, and occasionally as he/she is not
talking directly on any slide.
Other than that, I think Mike is overdoing a great work! ;)
Agreed! None of this
On 9/8/22 6:40 AM, Mike Parker wrote:
On Thursday, 8 September 2022 at 10:19:00 UTC, matheus. wrote:
My tip is for the next DConf, people in charge of recording should
watch all the previous Conferences and take what went right (The
conference at facebook was well done), because this was new
On 9/7/22 4:23 PM, Injeckt wrote:
On Wednesday, 7 September 2022 at 19:38:52 UTC, H. S. Teoh wrote:
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via
Digitalmars-d-learn wrote:
I need to include this Ws2tcpip.h header file to my project. How can
I do this? It's all because I need inet_ntop
On 9/7/22 8:42 AM, Mike Parker wrote:
If you haven't seen Walter's talk yet (or would like to watch it again),
please give it a look and let me know if you uncover any major problems:
Also note that the first 3 1/2 minutes were never streamed before as the
live stream started a bit late
On 9/6/22 6:31 PM, frame wrote:
Well, of course it would be the fault of the programmer. I did ask this
because I just want to know if there is any catch of this (probably not
intended/yet noticed) violation of some third party lib. I don't want do
debug this :D
You can be confident that if
On 9/5/22 7:12 AM, frame wrote:
And what if the programmer has no actual reference but wrongly forced a
`free()` through a pointer cast?
https://dlang.org/spec/garbage.html#pointers_and_gc
* Do not store pointers into non-pointer variables using casts and other
tricks.
```d
void* p;
...
int
On 9/4/22 11:24 PM, cc wrote:
On Saturday, 3 September 2022 at 14:37:16 UTC, Steven Schveighoffer wrote:
On 9/2/22 3:15 PM, cc wrote:
Tried casting away shared as a workaround but I assume that will
cause some kind of TLS catastrophe.
I think it will be fine, but you may have an issue
On 9/2/22 3:15 PM, cc wrote:
Tried casting away shared as a workaround but I assume that will cause
some kind of TLS catastrophe.
I think it will be fine, but you may have an issue. You are returning a
non-shared `VAL`, but your class is `shared`, which means `table`, and
all the `VAL`
301 - 400 of 11673 matches
Mail list logo