In celebration of Matariki (the Māori New Year) of the 24th, and Ethan's
birthday, lets start Beerconf!
So happy birthday Ethan and remember, today is all about togetherness!
https://meet.jit.si/Dlang2022JuneBeerConf
https://www.newzealand.com/nz/matariki/
Very nice.
Only one error in about 30 minute time frame. Significantly down!
:D
Thanks.
A white content area, means that you didn't draw something.
As long as the border ext. is showing up, you're ok.
registeredClass.style = 32_769;
Don't use an integer like that, stick with bit wise ors.
LPCWSTR classname = toUTF16z(name);
GC owned memory, that could result in surprises.
const LPWSTR windowname = toUTF16z(title);
Ditto
I'm not sure your window callback procedure is right.
For
Looking good so far!
Been watching keenly on this release, cheers!
Bitmap is a class, not a namespace.
The function you want is actually a constructor.
https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-headers/include/gdiplus/gdiplusheaders.h#L179
Adam created the link this time:
https://meet.jit.si/Dlang2022MayBeerConf
No password
On 23/05/2022 8:22 AM, Chris Piker wrote:
Hey thanks! I bet LDC is pretty cool, have to look into it sometime.
For now at my site just introducing D is a bit radical, don't want to
capsize the boat by leaving the gcc toolchain altogether. I'm willing
to help out with GDC work were I can,
On 23/05/2022 8:05 AM, Chris Piker wrote:
Vibe.d is well tested against the frontend.
Its part of dmd's test suite.
See: https://buildkite.com/dlang/dmd/builds/26775
Thanks, that's handy. Do you know where the equivalent test suite is
for gdc?
No idea.
I've pinged Iain, because you are
On 23/05/2022 7:24 AM, Chris Piker wrote:
2. Testing common packages against gdc
Why?
Mostly because I've put in about 15 hours effort so far trying to get a
vibe.d based project to build using gdc, with no success. I'm about to
give up and declare either gdc or vibe.d unsuitable for
On 23/05/2022 6:06 AM, Chris Piker wrote:
1. Supporting gdc development and distribution.
Iain's workload should be decreasing now that it is using the up to date
frontend. Rather than the older C++ version with backports that he has
been maintaining.
My understanding is that he is
On 22/05/2022 10:44 AM, Alain De Vos wrote:
I want to install the DCD language server on Raspberry PI4.
But the dub build for DCD requires rdmd which is not available.
Can I compile rdmd from source ? Or install a binary ?
[PS: I have ldc 1:1.24.0-2 installed ]
I grabbed a copy of
On 19/05/2022 7:03 AM, H. S. Teoh wrote:
We keep coming back to this impasse: write barriers. It's high time
somebody implemented this in a dmd fork so that we can actually test out
more advanced GC designs.
No. Not dmd.
LDC or GDC.
DMD is not suitable for experimentation due to the
On 19/05/2022 5:51 AM, Kenny Shields wrote:
Also, I know that D has some sort of interface for allowing custom GC
implementations -- has anyone ever made a functional alternative?
Something that takes the incremental approach that you mentioned as
opposed to the pause and scan method?
Snap package source: https://github.com/dlang-snaps/dmd.snap/
Hasn't been updated in 3 years.
As far as I know, no D compiler guarantees compatibility between objects
built on different version of itself.
The change would have been[0].
[0]
https://github.com/dlang/druntime/commit/c6762914682d4fa894e2b746bf4bd9ce3ec9f7cb
Its compiled in statically to Phobos (however this may depend on
compiler ext.).
Very excited for this release!
Still waiting on a documentation PR for dub, kinda need to get this
merged + deployed since the feature is now live.
https://github.com/dlang/dub-docs/pull/43
On 15/05/2022 4:00 AM, eugene wrote:
The more I have studied memory allocators & management strategies
memory allocators and GC are different things
i've had at some point 'free list' based allocator
and it worked ~3 times faster than malloc/free
when used for classical linked list
On 15/05/2022 2:51 AM, eugene wrote:
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
Garbage collection.
I am not programming languages theorist at at, but my imression is:
* GC came from purely
Phobos curl wrapper may be an option:
https://dlang.org/phobos/std_net_curl.html#.FTP
On 13/05/2022 7:03 PM, MichaelBi wrote:
On Friday, 13 May 2022 at 06:43:30 UTC, rikki cattermole wrote:
On 13/05/2022 6:23 PM, MichaelBi wrote:
render!("index.dt", showData());
There ya go, template arguments are run at compile time.
Unh, then how to dynamically generate pages
On 13/05/2022 6:23 PM, MichaelBi wrote:
render!("index.dt", showData());
There ya go, template arguments are run at compile time.
Okay that is fine, now we need to see where showData is being called.
On 13/05/2022 5:52 PM, MichaelBi wrote:
struct Camera{
@name("_id") BsonObjectID id; // represented as "_id" in the database
string brand;
string model;
}
the structure is mapping of database field structure. how to resolve?
That code isn't the cause of your issue (its fine,
On 13/05/2022 5:18 PM, MichaelBi wrote:
i have code here:
auto uri = environment.get("MONGODB_URI");
MongoClient conn = connectMongoDB(uri);
MongoDatabase eqpdb = conn.getDatabase("MbEqpHeroku");
the "MONGODB_URI" showed above already put into heroku's app config
On 12/05/2022 11:33 PM, Andrea Fontana wrote:
Too bad dub doesn't work with wsl, it sounds like a lost opportunity.
Does dmd/rdmd work? Serverino uses std.net.curl just for running its
unittests, so maybe that bug is not blocking.
It doesn't look like it is dub that is failing.
This is a
On 12/05/2022 4:55 AM, templatedperson wrote:
for a good reason, the default is the GC.
Good reason or not, people sometimes need to do manual memory management.
I usually use the GC and like that we have it, but if you care about
performance you gotta drop down to manual managements
On 12/05/2022 3:54 AM, templatedperson wrote:
2. Look at alternatives to GC for allocation/deallocation.
Maybe add `@nogc` overloads that take `std.experimental.allocator`s?
That could be the best way to accomplish this.
That won't help much. The virtual types are not @nogc, and for a
Compiler optimizations should not be defined by a programming language
specification.
This will be on LLVM.
If I am understanding the problem correctly, this is a super expensive
method for doing something pretty simple. Even if it is a bit more code,
this won't require memory allocation which in this case wouldn't be
cheap (given how big DNA tends to be).
string s = "ACGTACGT";
uint[4] counts;
On 09/05/2022 11:44 AM, Ali Çehreli wrote:
While we are on topic :) and as I finally understood what generational
GC is[1], are there any fundamental issues with D to not use one?
This is not a D issue, its an implementation one.
We don't have write barriers, that's it.
Make them opt-in
Well done Iain!
We should do a celebration party for both it and 2.100.0 release!
For me the bug that is potentially limiting me (design wise) is:
https://issues.dlang.org/show_bug.cgi?id=21416
#dbugfix
Good stuff moving forward and that tool looks interesting to try out.
On 30/04/2022 5:22 AM, Adam D Ruppe wrote:
On Friday, 29 April 2022 at 17:07:27 UTC, rikki cattermole wrote:
Password: `dub4life`
I see you are gatekeeping to keep a certain clique out!
Lol, given the amount of emotions that has gone into it in recent days I
got a little inspired as to
It is that time of the month, once again!
Beerconf.
https://meet.jit.si/Dlang2022AprilBeerConf
Password: `dub4life`
See you all there!
This works:
```d
struct Data
{
int[] digits;
}
int parseDigit(char c) pure
{
return c - '0';
}
Data parse(string str) pure
{
Data data;
if (__ctfe) {
size_t used;
data.digits.length = str.length;
while (str.length != 0)
{
// Skip
On 27/04/2022 10:05 AM, Guillaume Piolat wrote:
On Tuesday, 26 April 2022 at 21:59:39 UTC, rikki cattermole wrote:
Putting an int into a ubyte absolutely should error, that is a lossy
conversion and should not be automatic.
It's just VRP, here it works in 2.094
On 27/04/2022 9:55 AM, Guillaume Piolat wrote:
On Tuesday, 26 April 2022 at 21:44:56 UTC, rikki cattermole wrote:
On 27/04/2022 9:39 AM, Guillaume Piolat wrote:
On Tuesday, 26 April 2022 at 21:13:38 UTC, Alexander Zhirov wrote:
more build errors
If you "dub upgrade" it should work a bit
On 27/04/2022 9:39 AM, Guillaume Piolat wrote:
On Tuesday, 26 April 2022 at 21:13:38 UTC, Alexander Zhirov wrote:
more build errors
If you "dub upgrade" it should work a bit better.
No success in reproducing the bug here.
It definitely on your end.
void main() {
int scale;
int*
No args added there.
https://github.com/AuburnSounds/Dplug/blob/master/graphics/dplug/graphics/pngload.d#L1972
Yup that code certainly looks wrong.
Note the casts above it in around:
https://github.com/AuburnSounds/Dplug/blob/master/graphics/dplug/graphics/pngload.d#L1956
So yeah upstream
To get the commands dub used, use -v.
$ dub build -v
This release is very exciting.
Semver versioning, lots of shared library support for dub, @mustuse and
lots of deprecations + removals.
Could we add a check for this in DScanner?
Otherwise I'm not sure how else we are going to find all of these
instances and fix them.
noreturn is the bottom type which can implicitly convert to any type,
including void. A value of type noreturn will never be produced and the
compiler can optimize such code accordingly.
https://dlang.org/spec/type.html#noreturn
On 21/04/2022 2:15 AM, rempas wrote:
Unfortunately, this will not work for me as it uses "TypeInfo" and it is
not available with "-betterC". Thank you for trying to help regardless!
You can't use AA's in -betterC.
The implementation is not templated and is in druntime.
One way you can do it:
import std.range : chunks;
import std.algorithm : map;
import std.array : array;
import std.conv : text;
string[] split = "Hello D".chunks(2).map!(v => v.text).array;
writeln(split);
foreach(val; "Hello D".chunks(2)) {
writeln(val.text);
}
Storage classes like immutable/const/shared are not tied to any memory
management strategy. Nor does it dictate memory lifetime.
It only dictates how it can be interacted with when you have a reference
to it.
immutable isn't tied to lifetime semantics.
It only says that this memory will never be modified by anyone during
its lifetime.
Anyway, the real problem is with const. Both mutable and immutable
become it automatically.
## Razvan
### Reference counting
Going through some old DRuntime pull requests, Razvan found several PRs
adding reference-counted things (RCArray, RCPointer, etc) from a period
when reference counting was a hot topic in the D community. The problem
with reference counting in D has been the
What on earth are you talking about.
ImportC is highly experimental and was announced far too soon.
If you look at the last release a very large number of the bug fixes
were for ImportC specifically.
https://dlang.org/changelog/2.099.0.html#bugfix-list
Hello hello hello!
Beerconf is inviting you to a meeting.
Join the meeting: https://meet.jit.si/Dlang2022MarchBeerConf
Password: `ValueTypeExceptions`
**How do I join?** You'll need to have a [compatible
browser](https://jitsi.github.io/handbook/docs/user-guide/supported-browsers)
to
Changes look good +1
On 21/03/2022 11:19 PM, Tobias Pankrath wrote:
This would be much easier, if there were a `dub provide` (or whatever)
that builds all deps for a project, installs them into a given
prefix/path and makes them usable from `dub describe` afterwards, so
that dub describe works more or less like
On 18/03/2022 5:56 PM, rikki cattermole wrote:
Are you trying to build dub on Android?
Android support for ldc is currently broken to due to removal of a
linker that is currently required for TLS support.
https://github.com/ldc-developers/ldc/issues/3918
My bad I didn't see FreeBSD.
Are you trying to build dub on Android?
Android support for ldc is currently broken to due to removal of a
linker that is currently required for TLS support.
https://github.com/ldc-developers/ldc/issues/3918
The recommended solution by Unicode is to use Trie tables for Look Up
Tables (LUTs).
https://en.wikipedia.org/wiki/Trie
You can generate these as read only global arrays and are very fast for
this.
There are a few goodies hiding in the nightlies that didn't make it into
the beta.
Stuff like https://issues.dlang.org/show_bug.cgi?id=18362
And https://dlang.org/changelog/pending.html#actual-dynamiclibrary
(which I did :3)
This is gonna be a good release I think!
On 17/02/2022 6:37 PM, StarCanopy wrote:
On Tuesday, 15 February 2022 at 12:22:05 UTC, Mike Parker wrote:
[...]
I regret not getting into D sooner, when I could have driven to a dconf.
There will be plenty of stuff online.
Depending on how BeerConf will be scheduled I'm sure we could do
There are some files available at https://d-apt.sourceforge.io/
On 10/02/2022 5:21 AM, Paul Backus wrote:
- C (gcc/clang): __attribute__((warn_unused_result))
C23 will also have [[nodiscard]]
Not only will it have that on functions, but also support a string too.
Unfortunately its looking like we have chosen to diverge from C, and
therefore won't be
BeerConf is among us once again!
https://meet.jit.si/Dlang2022JanuaryBeerConf
Password: @mustUse
On 16/01/2022 12:45 PM, Ali Çehreli wrote:
On 1/15/22 10:45, WebFreak001 wrote:
> we have now bridged all the Discord rooms to Matrix rooms.
What does all that mean? Is that something that only Discord users
should understand be interested in? :)
Ali
This is for Matrix users, so that
On 09/01/2022 4:01 PM, Walter Bright wrote:
I buried my PDP-11 long ago. Sob.
There is a kit for the control panel[0].
Backed by a raspberry pi.
I'm pretty keen to eventually buy one and build it. These kits are cool!
[0]
On 27/12/2021 12:10 AM, max haughton wrote:
I would start by removing the use of stdout in your loop kernel - I'm
not familiar with what you are calculating, but if you can basically
have the (parallel) loop operate from (say) one array directly into
another then you can get extremely good
Seems to be working just fine as of 2.098.
```d
import std;
void main()
{
static foreach(Foo; ["Abc", "def"]) {{
string str = Foo;
writeln("Hello D ", str, __VERSION__);
}}
}
```
```
Hello D Abc2098
Hello D def2098
```
Anyway, AliasAssign has nothing to do with this.
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
bumped into.
Just another example: I just learned that linking against C++ DLLs is
quite limited. I ran into the issue that
The string is not the problem.
```d
string ip_address = "192.168.1.1";
auto x = new InternetAddress(ip_address, 8008);
```
That works.
A string in D is an alias for immutable(char)[]. This is defined in
druntime (object.d).
Immutable does cast to const implicitly, so a string argument to
On 21/11/2021 3:13 PM, russhy wrote:
betterC already is niche on its own, so let's do the move?
Except -betterC is not niche at all.
It is simply the language with any of the runtime dependencies disabled.
No language level changes have to be made for this.
Both full D and -betterC should
It is 2 hours before DConf starts!
I welcome everyone to hope on over to Discord and join our General voice
channel while we wait for the action to begin.
Don't use ~> for branches.
alpha@DESKTOP-RB97SA4 /tmp/dutils
$ dub build
Invalid SemVer format: stable.0.0
alpha@DESKTOP-RB97SA4 /tmp/dutils
$ nano dub.json
alpha@DESKTOP-RB97SA4 /tmp/dutils
$ dub build
Performing "debug" build using
C:\Tools\D\dmd_2.097.2\windows\bin\dmd.exe for
On 11/11/2021 2:13 PM, Ruby The Roobster wrote:
Branch ~master: Invalid SemVer format: testing.0.0
Branch ~testing: Invalid SemVer format: testing.0.0
Version 0.1.2: Invalid SemVer format: testing.0.0
testing is a branch.
You are using ~>testing for it.
To use a branch in the SEMVER is
On 09/11/2021 12:44 PM, Luis wrote:
It should work with the last version of DMD :
https://dlang.org/changelog/2.098.0.html#target
It won't.
https://github.com/dlang/dub/blob/master/source/dub/compilers/dmd.d#L111
On 08/11/2021 11:34 AM, Imperatorn wrote:
On Sunday, 7 November 2021 at 22:19:08 UTC, russhy wrote:
If i remember correctly, all you have to do is:
dub build --arch=x86_64-pc-windows-msvc --compiler=ldc2
Is this information on dub.pm? If not, we should add it.
This is compiler
You probably don't want to be using C variadics.
Instead try the typed one:
float mean(float[] input...) {
// you don't want to divide by zero
if (input.length == 0)
return 0;
float temp = 0;
// floats and double initialize to NaN by default, not
I think you are wanting this?
https://dlang.org/phobos/core_cpuid.html#.processor
The repo itself hasn't been archived as of this writing. So a PR may
succeed.
But yeah the guy is gone by the looks.
If he is willing this could be a possible candidate for moving it to
dlang-community although it'll need someone to shepherd it.
https://github.com/nomad-software/tkd
On 27/09/2021 7:05 AM, Brian wrote:
What is Beefconf, indeed. Are we getting an additional online meetup
this month? :)
Considering I was running polls about giving beef to dogs during
BeerConf, I'm afraid that it has already passed.
But maybe we can do something impromptu on Discord in
The link will be added closer to the time (its immediately available).
From there, just use a compatible web browser.
https://dlang.org/spec/expression.html#add_expressions
"7. If both operands are of integral types and an overflow or underflow
occurs in the computation, wrapping will happen. For example, uint.max +
1 == uint.min, uint.min - 1 == uint.max, int.max + 1 == int.min, and
int.min - 1 == int.max."
On 13/09/2021 3:21 PM, leikang wrote:
Are there any recommended books or videos to learn about the principles
of compilation? What else should I learn besides the principles of
compilation?
The classic book on compilers that Walter recommends is the dragon book.
No.
https://github.com/dlang-community/D-Scanner#implemented-checks
On 15/08/2021 8:11 PM, rempas wrote:
Still don't know what "pragma" does but thank you.
pragma is a set of commands to the compiler that may be compiler specific.
In the case of the msg command, it tells the compiler to output a
message to stdout during compilation.
On 13/08/2021 9:40 AM, russhy wrote:
also this but it's pretty old: https://github.com/rikkimax/Duml
It was a neat idea duml of mine, but I wouldn't recommend going down the
path of CTFE for this.
Best to write a tool using dmd-fe instead.
On 12/08/2021 9:36 PM, Learner wrote:
It seems that there is no easy way to transition from a postblit to a
copy constructor, no?
struct Foo {
this(ref Foo other) {
foreach(i, v; other.tupleof)
this.tupleof[i] = v;
}
@disable
On 10/08/2021 4:32 AM, Tejas wrote:
Just switch to LDC? The discussion on bugzilla seems to conclude that
its purely DMD backend problem.
While that is a good workaround to issues like this, dmd-be does need to
be fixed regardless.
So a field that will automatically be resolved to as part of the
behavior of generated toString methods.
That really isn't what alias this is used for commonly. I.e.
struct ValueReference {
private {
SomethingElse* impl;
}
bool isNull() { return impl is
On 02/08/2021 9:19 AM, Brian Tiffin wrote:
Question, or suggestion. In the Community forums, there is General and
Announce.
Announce is only for announcements.
General is used sometimes for OT stuff, like I've congratulated Andrei
on the birth of one of his kids (I asked prior). Or some
On 02/08/2021 5:18 AM, Alain De Vos wrote:
A simple and small wrapper around for instance the C-library libpq
should be part of the language itself and should not pull in more than
libpq itself.
Just so that we are all using the same terminology.
A binding defines the functions and types
It appears you are using the wrong lowercase character.
https://en.wikipedia.org/wiki/Dotted_and_dotless_I
From a quick experiment, it appears std.uni is treating the upper case
dotted I's lower case as a grapheme. Which it probably shouldn't be as
there is an actual character for that.
We
On 01/08/2021 6:30 AM, tastyminerals wrote:
So I thought there may be a way in D to communicate with the system
clipboard...
No, this requires a windowing library and yes a window to do it
(depending on the windowing system and even the desktop environment).
On 31/07/2021 7:33 AM, tastyminerals wrote:
I made a GUI app using tkd library. I am reading the string from one of
the app widgets and would like to put it into the clipboard. Does anyone
have an idea how to copy a string to the clipboard in D?
copyText on a Text widget appears to do what
On 22/07/2021 3:44 PM, Brian Tiffin wrote:
What is the preferred syntax for simple on/off states? Did I read that
D was moving to strictly 1 and 0 literals instead of true/false on/off
yes/no?
This is the first time I'm hearing about it, so almost certainly no.
On 18/07/2021 12:56 AM, Dennis wrote:
I don't know whether the spec or code is correct.
Unless otherwise specified, the code is authoritative.
On 17/07/2021 3:31 AM, Scotpip wrote:
In dub.sdl I see: ```dependency "msgpack-d" version="~>1.0.3"```
In dub.selections.json I see:
```
{
"fileVersion": 1,
"versions": {
"msgpack-d": "1.0.3"
}
}
```
Okay, its been added to your dub project. So far so good.
When I
On 16/07/2021 11:45 PM, Iain Buclaw wrote:
Just a forewarning, it was brought to my attention last month that for
some people, Beerconf would fall on the Sunday/Monday 25-26th for them.
Why? If you're living in Apia, Saturday 24th July would begin on Friday
23rd at 13:00 CEST, while in
Different doc generators, same source.
DDOC (phobos) and DDOX (library).
There is also adrdox[0] whose site does dub libraries also.
[0] https://dpldocs.info/
Will -fvisibility=public support be upstreamed into dmd?
If yes, it might be worth it to get rid of export as a keyword out right
in a DIP (as it introduces the possibility of linker errors that would
otherwise not need to exist).
On 10/07/2021 2:51 AM, rempas wrote:
The file can be found quickly
[here](https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d)
or in your system if you want. Now the question is, why isn't there an
"open" function for the equivalent system call? "close", "write", "read"
On 10/07/2021 2:30 AM, lili wrote:
Why standard D Runtime can not run on MCU?
It requires things like threads.
Basically it assumes there is a kernel.
Anyway, you don't want the regular runtime on a MCU, a MCU is too small
in memory to really hold it all and your own logic and any
101 - 200 of 2710 matches
Mail list logo