Re: Release D 2.108.0

2024-04-03 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 3 April 2024 at 08:39:03 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 2 April 2024 at 21:15:16 UTC, Nick Treleaven wrote: Official docs: https://dlang.org/spec/istring.html Things like: Can it be used in nogc code? etc. Yes, the literal is just a value sequence. Thank you. It

Re: Release D 2.108.0

2024-04-02 Thread Nick Treleaven via Digitalmars-d-announce
On Tuesday, 2 April 2024 at 19:41:52 UTC, Ferhat Kurtulmuş wrote: Could you please provide a link to the documentation that one should read to know everthing related to string interpolation in dlang. Official docs: https://dlang.org/spec/istring.html Things like: Can it be used in nogc

Re: DConf Online Livestream Link

2024-03-18 Thread Nick Treleaven via Digitalmars-d-announce
On Monday, 18 March 2024 at 11:33:08 UTC, Andrea Fontana wrote: https://github.com/dlang/dconf.org/tree/master/2024/online/slides Thanks!

Re: DConf Online Livestream Link

2024-03-18 Thread Nick Treleaven via Digitalmars-d-announce
On Sunday, 10 March 2024 at 16:07:23 UTC, Mike Parker wrote: The countdown is on! I'll kick off the DConf Online Livestream at 14:55 UTC on March 16. You can find it here: https://www.youtube.com/live/8GV_TuYk3lk And if you haven't seen the details yet, take a look here:

Re: D Language Foundation October 2023 Quarterly Meeting Summary

2023-12-10 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 6 December 2023 at 16:28:08 UTC, Mike Parker wrote: One way to do that in D is to use `alloca`, but that's an issue because the memory it allocates has to be used in the same function that calls the `alloca`. So you can't, e.g., use `alloca` to alloc memory in a constructor, and

Re: Evolving the D Language

2023-07-12 Thread Nick Treleaven via Digitalmars-d-announce
On Sunday, 9 July 2023 at 18:51:01 UTC, IchorDev wrote: On Friday, 7 July 2023 at 13:19:51 UTC, Nick Treleaven wrote: Changing the syntax just for an obsolete feature would send the wrong message. [...] cent and ucent are already an error as of 2.100. Were they even implemented? Clearly

Re: Evolving the D Language

2023-07-07 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 7 July 2023 at 10:57:57 UTC, IchorDev wrote: Hexstring literals, They were first deprecated on Mar 01, 2018: https://dlang.org/changelog/2.079.0.html#hexstrings And removed in 2.086, so it's probably unlikely that any maintained code is using them. complex and imaginary floating

Re: Evolving the D Language

2023-07-07 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 7 July 2023 at 10:45:33 UTC, Guillaume Piolat wrote: alias this was a relatively bad idea, even if an iconic feature. I don't remember people from outside the community being impressed by alias this. There was no way to rewrite the code without breaking dependent code. That should

Re: D Contributor Tutorials Part 1 - Building the Compiler From Source - Windows

2023-01-23 Thread Nick Treleaven via Digitalmars-d-announce
On Sunday, 22 January 2023 at 12:51:53 UTC, Nick Treleaven wrote: sppn.exe src\core\stdc\errno.c -HIsrc\importc.h -ED -oerrno.i -I. Error: C preprocess command sppn.exe failed for file src\core\stdc\errno.c, exit status 1 failed launching sppn.exe src\core\stdc\errno.c -HIsrc\importc.h -ED

Re: D Contributor Tutorials Part 1 - Building the Compiler From Source - Windows

2023-01-22 Thread Nick Treleaven via Digitalmars-d-announce
On Sunday, 8 January 2023 at 11:27:14 UTC, Mike Parker wrote: In this first tutorial of the series, he gives an overview of what happens when compiling a D source file, then shows how to set up an environment from which to build dmd and the standard library/runtime binary. The next video will

Re: D Contributor Tutorials Part 1 - Building the Compiler From Source

2023-01-22 Thread Nick Treleaven via Digitalmars-d-announce
On Sunday, 8 January 2023 at 19:28:59 UTC, ryuukk_ wrote: The Wiki is outdated and mentions tools that do not exist https://wiki.dlang.org/Building_under_Windows I haven't been able to build druntime on Windows. I have just updated the page to make it clear that DM make is needed even when

Re: DIP 1043---Shortened Method Syntax---Accepted

2022-09-24 Thread Nick Treleaven via Digitalmars-d-announce
On Saturday, 24 September 2022 at 08:45:33 UTC, Dukc wrote: On Wednesday, 21 September 2022 at 10:39:27 UTC, Mike Parker wrote: The fact that the feature was already implemented behind a preview switch carried weight with Atila. He noted that, if not for that, he wasn't sure where he would

Re: Beta 2.099.0

2022-02-17 Thread Nick Treleaven via Digitalmars-d-announce
On Tuesday, 15 February 2022 at 13:06:47 UTC, Martin Nowak wrote: http://dlang.org/changelog/2.099.0.html Thanks. Regarding: https://dlang.org/changelog/2.099.0.html#allow_casting_from_typetuple_to_typetuple I don't understand why this is allowed: ```d alias Tuple(T...) = T; void foo() {

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-13 Thread Nick Treleaven via Digitalmars-d-announce
On Tuesday, 12 January 2021 at 17:27:50 UTC, Q. Schroll wrote: On Monday, 11 January 2021 at 21:17:20 UTC, jmh530 wrote: Gotcha. I think I would use that more than the current DIP (though I prefer [1]s to [1]$). You can do it today if you don't mind putting the marker in front:

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-13 Thread Nick Treleaven via Digitalmars-d-announce
On Monday, 11 January 2021 at 20:25:14 UTC, Luhrel wrote: I think if the DIP proposed a literal syntax instead of a new variable declaration syntax, it would be much less of a burden to the compiler. I think we don't have any partial (variable) type inference syntax ATM. I don't think that

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-13 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 13 January 2021 at 14:48:07 UTC, Atila Neves wrote: Why do they have to scroll to the top? They don't, you're right. But if you want to use it throughout the module you need a top-level import, by convention at the top. Also the convention seems to be to put a local import at

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-11 Thread Nick Treleaven via Digitalmars-d-announce
On Monday, 11 January 2021 at 13:05:18 UTC, jmh530 wrote: On Monday, 11 January 2021 at 12:32:42 UTC, Nick Treleaven wrote: [snip] I think if the DIP proposed a literal syntax instead of a new variable declaration syntax, it would be much less of a burden to the compiler. I think we don't

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-11 Thread Nick Treleaven via Digitalmars-d-announce
On Monday, 11 January 2021 at 12:32:42 UTC, Nick Treleaven wrote: ``` int[2] bar() { return [1,2]; } long[$] a6 = bar(); // implicit conversion static assert(is(typeof(a6) == long[2])); ``` Error: cannot implicitly convert expression `bar()` of type `int[2]` to `long[]` This is the error

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-11 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 8 January 2021 at 14:07:29 UTC, Luhrel wrote: Example a3 is straightforward the primary use case for staticArray: auto a3 = [1,2,3].staticArray; I really don't like the `.staticArray` because it's non-esthetic. I don't know if it's really argument, mainly because it's very

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-06 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 18:33:54 UTC, Dukc wrote: ``` int[$] bar(int[2] arr) // Error: not allowed in functions declarations { return arr ~ [3, 4]; } ``` causes an error if the return type is specified as int[4]. Why? `arr` is static so the compiler should be able

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-06 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 18:29:05 UTC, Nick Treleaven wrote: Can be fixed (probably with another name): //import std.array; Actually template overloading seems to work fine: template staticArray(T) { T[n] staticArray(ulong n) (auto ref T[n] a) {return a;} } T[n] staticArray(T,

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-06 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 18:14:42 UTC, Luhrel wrote: It works only for the `int` type and above (and other types as structs). example with short: --- extern(C) void main() { import std.array; auto a = [0, 1].staticArray!short; // error } Can be fixed (probably with another

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-06 Thread Nick Treleaven via Digitalmars-d-announce
From the feedback thread: On Wednesday, 6 January 2021 at 17:54:34 UTC, Dukc wrote: `std.array.staticArray` can already handle most of the problems described, and it does work in betterC - I just tested with LDC 1.20.1 targeting WebAssembly. while there are remaining cases (`auto fun(int[$] =

Re: New language based on D

2020-11-25 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 00:58:40 UTC, dangbinghoo wrote: both of them uses keyword `interface`, and "Interfaces describe a list of functions that a class that inherits from the interface must implement". shows these may not work with betterC. Pretty sure tardy only uses an

Re: From the D Blog: A Pattern for Head-mutable Structures

2020-07-03 Thread Nick Treleaven via Digitalmars-d-announce
On Thursday, 25 June 2020 at 13:17:55 UTC, jmh530 wrote: Good piece. I've been following the recent thread, but this really helped make some things clear. Do you have a link to that thread (or title) please?

Re: Beta 2.093.0

2020-07-03 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 24 June 2020 at 21:01:05 UTC, Martin Nowak wrote: http://dlang.org/changelog/2.093.0.html Thanks. BTW The list of bug fixes and enhancements seems to be missing.

Re: DIP 1028 "Make @safe the Default" is dead

2020-05-30 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 29 May 2020 at 21:18:13 UTC, Walter Bright wrote: On 5/29/2020 2:07 AM, Timon Gehr wrote: It would be great if `@safe:` did not affect declarations that would otherwise infer annotations. The idea is the simple, general rule that: attribute declaration; attribute {

Re: now it's possible! printing floating point numbers at compile-time

2018-12-27 Thread Nick Treleaven via Digitalmars-d-announce
On Saturday, 22 December 2018 at 20:08:12 UTC, Stefan Koch wrote: I came across a short and efficient implementation[0] of the grisu2 algorithm for converting floating point numbers into strings. Which I then ported into CTFEable D code. Thus enabling you to convert doubles into strings at

Re: Blogpost about the T.init problem

2018-07-23 Thread Nick Treleaven via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 07:30:59 UTC, FeepingCreature wrote: To reproduce the format issue, try to print the struct with writefln!"%s"(MyDomainType()). I implemented the compile time format string checking by evaluating `format(fmtStr, Args.init)` at compile time and seeing if an

Re: Blog post on automem

2017-05-04 Thread Nick Treleaven via Digitalmars-d-announce
On Thursday, 4 May 2017 at 08:41:55 UTC, Atila Neves wrote: I took a look at this. It's a druntime problem. Unique.~this calls std.experimental.allocator.dispose, which calls destroy in object.d which calls rt_finalize: extern (C) void rt_finalize(void *data, bool det=true); Notice the lack

Re: Vision document for H1 2017

2017-01-13 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 13 January 2017 at 12:53:16 UTC, Nick Treleaven wrote: On Friday, 13 January 2017 at 05:33:07 UTC, Chris Wright wrote: On that topic, D's arrays would play nicer with both refcounting *and* modern garbage collectors if they were structured as base, offset, length instead of start,

Re: Vision document for H1 2017

2017-01-13 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 13 January 2017 at 05:33:07 UTC, Chris Wright wrote: On that topic, D's arrays would play nicer with both refcounting *and* modern garbage collectors if they were structured as base, offset, length instead of start, length. That might be slower sometimes as slices wouldn't fit in

Re: Vision document for H1 2017

2017-01-12 Thread Nick Treleaven via Digitalmars-d-announce
On Thursday, 12 January 2017 at 09:54:08 UTC, Mark wrote: I think the "D for C++ programmers" page could use a revamp: https://dlang.org/cpptod.html At the moment it mainly explains where and how D differs from C++. Whoever reads it may be ready to write C++ code in D, but this seems

Re: Release D 2.072.0

2016-11-01 Thread Nick Treleaven via Digitalmars-d-announce
On Monday, 31 October 2016 at 07:27:50 UTC, Ali Çehreli wrote: Is the only valid remaining use for the comma operator the 'for' loop iteration? for ( ; ; ++i, ++j) { // ... } Are there other uses? The changelog shows it can be used for an expression statement: // This is okay, the

Re: DIP1000: Scoped Pointers

2016-08-22 Thread Nick Treleaven via Digitalmars-d-announce
On Thursday, 18 August 2016 at 17:05:05 UTC, Dicebot wrote: On 08/11/2016 04:38 PM, Sönke Ludwig wrote: That will just leave one hole in conjunction with the @trusted destructor, which is (presumably) not easy to fix without much larger changes to the type system, as well as to how container

Re: C#7 features

2016-05-07 Thread Nick Treleaven via Digitalmars-d-announce
On Friday, 6 May 2016 at 23:51:59 UTC, Steven Schveighoffer wrote: Of COURSE D supports local ref variables: struct RefVar(T) { private T * var; this(ref T v) { var = } auto get() { return *var; } alias this get; } ref get() return {... Which is unsafe even if the ctor is marked

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 04:38, thedeemon wrote: int x, y, z, age; string name; let (name, age) = getTuple(); // tuple let (x,y,z) = argv[1..4].map!(to!int); // lazy range let (x,y,z) = [1,2,3]; // array SomeStruct s; let (s.a, s.b) = tuple(3, piggies); Alternatively

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 17:00, Nick Treleaven wrote: Alternatively std.typetuple.TypeTuple can be used instead of let not for ranges and arrays though Yes, but `tuple` overloads could be added for those. Or not - the length isn't known at compile-time. Tuple already supports construction from a

Re: let (x,y) = ...

2015-02-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/02/2015 14:59, John Colvin wrote: On Thursday, 19 February 2015 at 13:52:29 UTC, Nick Treleaven wrote: On 19/02/2015 04:38, thedeemon wrote: int x, y, z, age; string name; let (name, age) = getTuple(); // tuple let (x,y,z) = argv[1..4].map!(to!int); // lazy range let (x,y,z)

Re: Digger 1.0

2014-10-02 Thread Nick Treleaven via Digitalmars-d-announce
On 01/10/2014 04:51, Vladimir Panteleev wrote: On Tuesday, 30 September 2014 at 12:19:05 UTC, Nick Treleaven wrote: On 23/09/2014 11:20, Nick Treleaven wrote: Linking phobos.lib is the first time I've got OOM, I use Firefox heavily. phobos.lib is only 10 MB, which is why I thought it odd that

Re: Digger 1.0

2014-09-30 Thread Nick Treleaven via Digitalmars-d-announce
On 23/09/2014 11:20, Nick Treleaven wrote: Linking phobos.lib is the first time I've got OOM, I use Firefox heavily. phobos.lib is only 10 MB, which is why I thought it odd that linking uses well over 1 GB. I'm now building Phobos 'myself' with win32.mak rather than with Digger, and it seems

Re: Digger 1.0

2014-09-23 Thread Nick Treleaven via Digitalmars-d-announce
On 22/09/2014 19:59, Vladimir Panteleev wrote: Firefox requires 4GB of memory to build. Chromium requires 8GB of memory to build. Android requires 16GB of memory to build. Thanks for the info, I didn't realize. If you want to work on big projects, you WILL need a decent computer. I think

Re: Digger 1.0

2014-09-22 Thread Nick Treleaven via Digitalmars-d-announce
On 21/09/2014 18:43, Rainer Schuetze wrote: I tried it on Windows and Digger does an amazing job at installing dependencies. I think we should recommend it as the first thing to run when trying to get your hands on building dmd/phobos. +1 In case someone starts creating patches: Would it be

Re: DCD v0.4.0-beta1

2014-09-22 Thread Nick Treleaven via Digitalmars-d-announce
On 22/09/2014 10:35, Brian Schott wrote: https://github.com/Hackerpilot/DCD/releases/tag/v0.4.0-beta1 Changelog at the above link. Let me know if and how you manage to break it by filing an issue on Github. I found this link to explain what DCD is ;-)

Re: D 2.066 is out. Enjoy!

2014-08-19 Thread Nick Treleaven via Digitalmars-d-announce
On 19/08/2014 08:21, Jacob Carlborg wrote: Did someone finish the changelog? One thing missing is a Note on compiler conversions for unique expressions, like: https://github.com/D-Programming-Language/phobos/pull/2109/files#diff-0baf0d34bf308dc66e131c0e56e4239bR761