Re: My interest in contributing to the D language and participation in the Symmetry Autumn of code

2024-05-15 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 14 May 2024 at 18:42:56 UTC, Dennis wrote: Hello everyone, My name is Dennis and I’m from Nigeria and I want to contribute to the D language, perhaps engage in the upcoming Symmetry Autumn of code, and contribute immensely to the D language and beyond. I’m open to anyone directing

Re: std.string.assumeUTF() silently casting mutable to immutable?

2024-02-14 Thread RazvanN via Digitalmars-d-learn
On Wednesday, 14 February 2024 at 11:56:29 UTC, Forest wrote: On Wednesday, 14 February 2024 at 10:57:42 UTC, RazvanN wrote: This has already been fixed, you just need to use -preview=fixImmutableConv. This was put behind a preview flag as it introduces a breaking change. I just tried that

Re: DLF September 2023 Monthly Meeting Summary

2023-11-15 Thread RazvanN via Digitalmars-d-announce
On Monday, 13 November 2023 at 16:52:06 UTC, Paul Backus wrote: On Monday, 13 November 2023 at 16:23:05 UTC, Tim wrote: The visitor can already be `extern(D)`. Only member functions overriding those in the base class need to be `extern(C++)`. Other member functions can then use paratemers,

Re: DLF September 2023 Monthly Meeting Summary

2023-11-13 Thread RazvanN via Digitalmars-d-announce
On Sunday, 12 November 2023 at 21:55:31 UTC, Paul Backus wrote: On Sunday, 12 November 2023 at 19:50:02 UTC, Mike Parker wrote: https://gist.github.com/mdparker/f28c9ae64f096cd06db6b987318cc581 There was a side discussion about how the `extern(C++)` interface affects dmd-as-a-library.

Re: Dlings first release

2023-02-15 Thread RazvanN via Digitalmars-d-announce
On Monday, 23 January 2023 at 10:21:04 UTC, João Lourenço wrote: [1] https://github.com/rust-lang/rustlings [2] https://github.com/iK4tsu/dlings [3] https://github.com/crazymonkyyy/dingbats Maybe you can find some inspiration from our D summer school exercices[1][2]. Many of them are

Re: SAOC 2022 Result

2023-02-07 Thread RazvanN via Digitalmars-d-announce
On Sunday, 5 February 2023 at 16:15:38 UTC, Mike Parker wrote: We had three participants in SAOC 2022. You may have noticed their periodic updates in the General forum. Keeping the community informed through those updates is one of the requirements of the event each year. They also have to

Re: Druntime merged into dmd repo

2022-07-15 Thread RazvanN via Digitalmars-d-announce
On Friday, 15 July 2022 at 05:46:53 UTC, StarCanopy wrote: On Tuesday, 12 July 2022 at 07:12:25 UTC, RazvanN wrote: This is not something a user is going to be affected by. But it will make it much easier for the compiler/druntime devs to do work. DMD and druntime are very strictly coupled and

Re: Druntime merged into dmd repo

2022-07-12 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 12 July 2022 at 03:36:42 UTC, StarCanopy wrote: On Saturday, 9 July 2022 at 22:24:45 UTC, max haughton wrote: Say thank you to Iain, Mathias, Vladimir, and Martin. This will make D better. More details to come. I'm ignorant. Why is this significant? This is not something a user

Re: Druntime merged into dmd repo

2022-07-12 Thread RazvanN via Digitalmars-d-announce
On Sunday, 10 July 2022 at 17:17:30 UTC, IGotD- wrote: On Saturday, 9 July 2022 at 22:24:45 UTC, max haughton wrote: Say thank you to Iain, Mathias, Vladimir, and Martin. This will make D better. More details to come. Does this mean that druntime for LDC and GDC were also moved into the

Winners of the April 1st - July 1st 2022 Bugzilla Cycle

2022-07-05 Thread RazvanN via Digitalmars-d-announce
Hello everyone, It is my pleasure to announce that the winners of the 2nd bugzilla cycle of the year are: 1. BorisCarvajal - 370 points 2. MoonlightSentinel - 135 points 3. FeepingCreature - 120 points Congratulations! The cycle standings are here:

Re: A New Game Written in D

2022-05-19 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 17 May 2022 at 16:36:34 UTC, Kenny Shields wrote: Hello, I've been building a game engine in D for the past 2 and a half years and have finally reached a point where it's usable in day-to-day game development. Earlier this year I decided to make a simple shooter game to serve as

Re: D Language Foundation April Quarterly Meeting and Server Meeting Summaries

2022-05-05 Thread RazvanN via Digitalmars-d-announce
On Wednesday, 4 May 2022 at 21:31:44 UTC, rikki cattermole wrote: 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. Potential fix:

Winners of the 1st Jan - 31st March 2022 Bugzilla Cycle

2022-04-04 Thread RazvanN via Digitalmars-d-announce
Hello everyone, I am happy to announce that this bugzilla rewarding cycle winners are: 1. MoonlightSentinel 830 points 2. ljmf00270 points 3. aG0aep6G 240 points The prizes that the winners will be getting are 100$, 50$ and 25$ Amazon eGift cards. Congrats! The

Re: Is it possible to do this with a template?

2021-12-17 Thread RazvanN via Digitalmars-d-learn
On Friday, 17 December 2021 at 07:52:18 UTC, rempas wrote: I want to use an expression and put it in place inside the `if` parentheses. The expression is: `is(typeof(val) == type)`. I want to use a template called "is_same" that will take the value and a type to place them to the respective

Re: template ctor overload Segmentation fault

2021-12-14 Thread RazvanN via Digitalmars-d-learn
On Sunday, 12 December 2021 at 11:57:43 UTC, vit wrote: Hello, why does this code fail to compile? ```d struct Foo(T){ this(Rhs, this This)(scope Rhs rhs){ } this(ref scope typeof(this) rhs){ } } struct Bar{ Foo!int foo; } void main(){ } ``` error: Segmentation

Re: template ctor overload Segmentation fault

2021-12-14 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 14 December 2021 at 13:02:16 UTC, Tejas wrote: On Tuesday, 14 December 2021 at 12:04:36 UTC, RazvanN wrote: [...] Then why did my modification work? ```d struct Foo(T){ this(Rhs, this This)(scope Rhs rhs){ } this(scope Foo!(T)* rhs){ //replaced typeof(this) with

Re: template ctor overload Segmentation fault

2021-12-14 Thread RazvanN via Digitalmars-d-learn
On Sunday, 12 December 2021 at 11:57:43 UTC, vit wrote: Hello, why does this code fail to compile? ```d struct Foo(T){ this(Rhs, this This)(scope Rhs rhs){ } this(ref scope typeof(this) rhs){ } } struct Bar{ Foo!int foo; } void main(){ } ``` error: Segmentation

Re: Bugzilla Reward System

2021-09-17 Thread RazvanN via Digitalmars-d-announce
On Thursday, 16 September 2021 at 14:35:08 UTC, Paul Backus wrote: On Thursday, 16 September 2021 at 11:56:21 UTC, Mike Parker wrote: https://dlang.org/blog/2021/09/16/bugzilla-reward-system/ From the post: The scoring is designed to reward contributors based on the importance of the issues

Re: Bugzilla Reward System

2021-09-17 Thread RazvanN via Digitalmars-d-announce
On Friday, 17 September 2021 at 01:07:09 UTC, Ali Çehreli wrote: On 9/16/21 4:56 AM, Mike Parker wrote: > This was Razvan Nitu's baby from conception to implementation Thank you, Razvan! Great job and a great article. Thank you, Ali! What I missed in the article is whether we are going to

Re: D Summer School v3

2021-08-27 Thread RazvanN via Digitalmars-d-announce
On Friday, 27 August 2021 at 07:45:42 UTC, M.M. wrote: On Thursday, 26 August 2021 at 14:33:25 UTC, Mike Parker wrote: Very nice event and blog. Thanks! I wonder about the hackathon: did you, Razvan et al., pre-selected a list of bugzilla issues to work on? We do have a keyword,

Re: No rdmd.exe in /bin64 on Windows - is this an issue?

2021-07-16 Thread RazvanN via Digitalmars-d-learn
On Monday, 12 July 2021 at 23:57:37 UTC, Scotpip wrote: Hi guys Just installed the DMD 2.097.0 .exe download for Windows on my 64 bit Win 10 workstation. [...] PR: https://github.com/dlang/installer/pull/484

Re: Cannot call find with haystack elements having a explicit copy constructors

2021-07-15 Thread RazvanN via Digitalmars-d-learn
On Thursday, 15 July 2021 at 11:08:25 UTC, Per Nordlöw wrote: The adding of copy construtors to `Service` defined as ```d @safe struct Service { this(ref return scope typeof(this) rhs) {} this(const ref return scope typeof(this) rhs) const {} } @safe struct Session { void

Re: A Pull Request Manager's Perspective

2021-05-18 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 18 May 2021 at 14:28:52 UTC, Dennis wrote: On Tuesday, 18 May 2021 at 12:58:51 UTC, Mike Parker wrote: https://dlang.org/blog/2021/05/18/a-pull-request-managers-perspective/ Ths emphasizes the fact that druntime needs more love. That conclusion is given along with these

Re: [GSoC] Google Summer of Code 2021: Organization Applications Open

2021-02-03 Thread RazvanN via Digitalmars-d-announce
On Sunday, 31 January 2021 at 00:45:18 UTC, Ahmet Sait wrote: Hi everyone! It's that time of the year again. Google announced that mentoring organizations can now apply for summer of code in their blog:

Re: Say Hello to Our Two New Pull-Request/Issue Managers

2021-01-14 Thread RazvanN via Digitalmars-d-announce
On Wednesday, 13 January 2021 at 11:33:44 UTC, Mike Parker wrote: I'm very, very happy that I can finally announce the news. Some of you may recall the job announcements I put out on the blog back in September [1]. Symmetry Investments offered to fund one full-time, or two part-time, Pull

Re: D mentionned in the ARTIBA webzine for an article on Silq

2020-09-02 Thread RazvanN via Digitalmars-d-announce
On Wednesday, 2 September 2020 at 07:38:01 UTC, JN wrote: On Wednesday, 2 September 2020 at 00:35:07 UTC, user1234 wrote: [...] One thing I always feel this forum is missing is a section for work in progress projects, even if they never end up anywhere. Right now people are shy about their

Re: DIP1028 - Rationale for accepting as is

2020-05-27 Thread RazvanN via Digitalmars-d-announce
On Wednesday, 27 May 2020 at 10:40:18 UTC, Walter Bright wrote: On 5/27/2020 3:07 AM, Johannes Loher wrote: This is a very specific situation. There are a lot of teams / developers that do not work in this manner. I don't know the numbers so I will make no statement about what is more common

Re: Bug?

2020-05-05 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 5 May 2020 at 05:37:08 UTC, Simen Kjærås wrote: On Tuesday, 5 May 2020 at 04:02:06 UTC, RazvanN wrote: [...] Surely the above code, which silently discards the exception, does not print "hello"? Regardless, I ran your code with writeln inside the catch(), and without the

Bug?

2020-05-04 Thread RazvanN via Digitalmars-d-learn
truct K { ~this() nothrow {} } void main() { static class C { this(K, int) {} } static int foo(bool flag) { if (flag) throw new Exception("hello"); return 1; } try { new C(K(), foo(true)); }

Re: The Serpent Game Framework - Open Source!!

2020-03-01 Thread RazvanN via Digitalmars-d-announce
On Thursday, 27 February 2020 at 22:29:41 UTC, aberba wrote: There's this ongoing open source game framework by Ikey. I knew him to be a diehard C guru (from the Solus Project) but is now rocking D, hence Serpent. Check is out and support if you can, please. I don't know how he does it but

Re: GSOC 2020 projects

2020-02-24 Thread RazvanN via Digitalmars-d-announce
On Monday, 24 February 2020 at 17:43:41 UTC, Panke wrote: On Monday, 24 February 2020 at 02:52:04 UTC, RazvanN wrote: On Tuesday, 18 February 2020 at 05:59:47 UTC, RazvanN wrote: Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring

Re: GSOC 2020 projects

2020-02-23 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 18 February 2020 at 05:59:47 UTC, RazvanN wrote: Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring organization for Google Summer of Code 2020. If we get accepted, I think that we should have a list of priority projects

GSOC 2020 projects

2020-02-17 Thread RazvanN via Digitalmars-d-announce
Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring organization for Google Summer of Code 2020. If we get accepted, I think that we should have a list of priority projects that we should propose to students. I have started tagging what

Re: "D for a @safer Linux Kernel" poster presentation at APLAS

2019-10-04 Thread RazvanN via Digitalmars-d-announce
On Thursday, 3 October 2019 at 17:30:20 UTC, Arun Chandrasekaran wrote: On Thursday, 3 October 2019 at 11:21:41 UTC, RazvanN wrote: [...] Good to know. May be you could publish the code on GitHub/GitLab and that could attract interest among people who care about performance to take a look.

Re: "D for a @safer Linux Kernel" poster presentation at APLAS

2019-10-03 Thread RazvanN via Digitalmars-d-announce
On Thursday, 3 October 2019 at 07:13:05 UTC, Arun Chandrasekaran wrote: On Friday, 27 September 2019 at 09:26:22 UTC, RazvanN wrote: Hello all, Alexandru Militaru's work "D for a @safer Linux Kernel" [1] has just been accepted for a poster presentation at APLAS [2]. We hope that this will be

Re: "D for a @safer Linux Kernel" poster presentation at APLAS

2019-09-27 Thread RazvanN via Digitalmars-d-announce
On Friday, 27 September 2019 at 10:39:42 UTC, M.M. wrote: On Friday, 27 September 2019 at 09:26:22 UTC, RazvanN wrote: Hello all, Alexandru Militaru's work "D for a @safer Linux Kernel" [1] has just been accepted for a poster presentation at APLAS [2]. We hope that this will be good

"D for a @safer Linux Kernel" poster presentation at APLAS

2019-09-27 Thread RazvanN via Digitalmars-d-announce
Hello all, Alexandru Militaru's work "D for a @safer Linux Kernel" [1] has just been accepted for a poster presentation at APLAS [2]. We hope that this will be good publicity for D, Cheers, RazvanN [1] https://www.youtube.com/watch?v=weRSwbZtKu0 [2]

Re: The New Bug Bounty System

2019-08-19 Thread RazvanN via Digitalmars-d-announce
On Saturday, 17 August 2019 at 12:04:46 UTC, Mike Parker wrote: Thanks to BOS Platform Korea, the new Bug Bounty system is live. Anyone willing to seed new bounties or increase the existing ones is free to do so. We hope to see the number of bounties grow and a few folks make some money from

UPB D Summer School

2019-07-17 Thread RazvanN via Digitalmars-d-announce
Hello, Edi and myself are glad to announce that the first edition of the D Summer School that we organized for the students at the University Politehnica of Bucharest has just ended. We had 8 practical sessions and a hackathon, during which students had to work on their project a

Re: DConf 2019 Livestream

2019-05-08 Thread RazvanN via Digitalmars-d-announce
On Wednesday, 8 May 2019 at 12:13:18 UTC, Mike Parker wrote: On Wednesday, 8 May 2019 at 10:13:35 UTC, Ethan wrote: Good news everyone! A Youtube stream will be arriving after the lunch break. Cheers for your patience. Now I get to bring the bad news. There's an issue right now with

Re: DIP 1018--The Copy Constructor--Formal Review

2019-02-26 Thread RazvanN via Digitalmars-d-announce
On Sunday, 24 February 2019 at 10:46:37 UTC, Mike Parker wrote: Walter and Andrei have requested the Final Review round be dropped for DIP 1018, "The Copy Constructor", and have given it their formal approval. They consider copy constructors a critical feature for the language. Walter

Re: std.container.rbtree as Interval Tree?

2019-02-05 Thread RazvanN via Digitalmars-d-learn
On Monday, 4 February 2019 at 22:54:01 UTC, James Blachly wrote: I tried to implement an interval tree backed by std.container.rbtree today and fell flat. [...] You can use alias this [1] in your interval element type: struct IntervalElem { size_t start, end; /* ... other

Re: Segfault when adding a static destructor in druntime/src/rt/sections_elf_shared.d

2019-01-11 Thread RazvanN via Digitalmars-d-learn
On Thursday, 10 January 2019 at 23:04:37 UTC, Steven Schveighoffer wrote: On 1/10/19 5:12 PM, RazvanN wrote: On Thursday, 10 January 2019 at 15:04:25 UTC, Steven Schveighoffer wrote: On 1/8/19 7:54 AM, RazvanN wrote: [...] That is a thread-local static destructor. Are any shared static

Re: Segfault when adding a static destructor in druntime/src/rt/sections_elf_shared.d

2019-01-10 Thread RazvanN via Digitalmars-d-learn
On Thursday, 10 January 2019 at 15:04:25 UTC, Steven Schveighoffer wrote: On 1/8/19 7:54 AM, RazvanN wrote: [...] That is a thread-local static destructor. Are any shared static destructors accessing the array? No, there aren't. Indeed, the problem is as Johan as said: the loadedDSOs

Re: Segfault when adding a static destructor in druntime/src/rt/sections_elf_shared.d

2019-01-10 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 8 January 2019 at 14:30:24 UTC, Johan Engelen wrote: On Tuesday, 8 January 2019 at 12:54:11 UTC, RazvanN wrote: [...] Great! (I am _extremely_ surprised that dtors are not called for globals.) [...] Thanks! This is really helpful! RazvanN

Segfault when adding a static destructor in druntime/src/rt/sections_elf_shared.d

2019-01-08 Thread RazvanN via Digitalmars-d-learn
Hi all, I am working on issue 14650 [1] and I would like to implement a solution where static destructors are destroying global variables. However, I have the following problem in druntime/src/rt/sections_elf_shared: struct ThreadDSO { DSO* _pdso; static if (_pdso.sizeof == 8) uint

Re: Blog post: What D got wrong

2018-12-13 Thread RazvanN via Digitalmars-d-announce
On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves wrote: On Thursday, 13 December 2018 at 09:40:45 UTC, RazvanN wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately:

Re: Blog post: What D got wrong

2018-12-13 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ That was a really good blog post, however I am strongly against the following sentence: "I think

Re: The #dbugfix Campaign Round 1 Report

2018-11-06 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 6 November 2018 at 11:12:44 UTC, Mike Parker wrote: On Tuesday, 6 November 2018 at 08:45:13 UTC, RazvanN wrote: /the_dbugfix_campaign_round_1_report/ [...] It faded out. It went well in the first round, then I got only a handful in the second round (all from two people), then it

Re: The #dbugfix Campaign Round 1 Report

2018-11-06 Thread RazvanN via Digitalmars-d-announce
On Monday, 14 May 2018 at 15:23:41 UTC, Mike Parker wrote: I planned an extended vacation with my wife around DConf this year and, despite my intentions before we left, fell quite far behind on my D duties. I'm in the process of getting caught up with everything, and that includes publishing

Re: Copy Constructor DIP and implementation

2018-10-08 Thread RazvanN via Digitalmars-d-announce
On Monday, 8 October 2018 at 10:26:17 UTC, Nicholas Wilson wrote: On Monday, 8 October 2018 at 10:14:51 UTC, RazvanN wrote: On Tuesday, 2 October 2018 at 09:26:34 UTC, RazvanN wrote: Hi all, I just pushed another version of the DIP in which the major modifications among otthers are removing

Re: Copy Constructor DIP and implementation

2018-10-08 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 2 October 2018 at 09:26:34 UTC, RazvanN wrote: Hi all, I just pushed another version of the DIP in which the major modifications among otthers are removing implicit and use copy constructor calls in all situations where a copy is made. For more details, please visit [1] and if

Re: Copy Constructor DIP and implementation

2018-10-02 Thread RazvanN via Digitalmars-d-announce
Hi all, I just pushed another version of the DIP in which the major modifications among otthers are removing implicit and use copy constructor calls in all situations where a copy is made. For more details, please visit [1] and if you have the time, please offer some feedback, Thank you,

Re: `shared`...

2018-10-01 Thread RazvanN via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must

Copy Constructor DIP and implementation

2018-09-11 Thread RazvanN via Digitalmars-d-announce
Hello everyone, I have finished writing the last details of the copy constructor DIP[1] and also I have published the first implementation [2]. As I wrongfully made a PR for the DIP queue in the early stages of the development of the DIP, I want to announce this way that the DIP is ready for

Re: @betterC, @TestBetterC , @betterCTest or @("betterC") to annotate Phobos's unittests?

2018-07-30 Thread RazvanN via Digitalmars-d
On Sunday, 29 July 2018 at 14:21:20 UTC, Seb wrote: Phobos has recently gotten a primitive way to run betterC tests (https://github.com/dlang/phobos/pull/6640). Now, it would be really cool if we can annotate existing tests with e.g. `@betterCTest` and thus ensure that those tests work with

Re: Moving druntime into the DMD repository

2018-07-30 Thread RazvanN via Digitalmars-d
On Friday, 27 July 2018 at 11:03:50 UTC, Seb wrote: This a thread to explore whether it would be feasible to do so. From my experience, whenever a change in dmd required a change in druntime the protocol was pretty straightforward and not at all annoying: -> you make the dmd PR and it

Re: Generated opAssign in the presence of a copy constructor

2018-07-27 Thread RazvanN via Digitalmars-d
Why the memcpy? This looks inefficient. Is it in case the constructor throws? Have a 'nothrow' case where it constructs directly to this? The copy constructor must be called on an object in the initial state, so it cannot be called directly on this as it is already initialized. __dtor is

Generated opAssign in the presence of a copy constructor

2018-07-26 Thread RazvanN via Digitalmars-d
Hello everyone! As you probably know, I am working on the copy constructor DIP and implementation. So far, I managed to implement 95% of the copy constructor logic (as stated in the DIP). The point that is a bit of a headache is how/when should opAssign be generated when a copy constructor

Re: Disabling struct destructor illegal?

2018-07-19 Thread RazvanN via Digitalmars-d-learn
On Thursday, 19 July 2018 at 09:50:32 UTC, Jim Balter wrote: On Thursday, 19 July 2018 at 08:50:15 UTC, RazvanN wrote: struct A { int a; @disable ~this() {} } void main() { A a = A(2); } Currently, this code yields: Error: destructor `A.~this` cannot be used because it is

Disabling struct destructor illegal?

2018-07-19 Thread RazvanN via Digitalmars-d-learn
struct A { int a; @disable ~this() {} } void main() { A a = A(2); } Currently, this code yields: Error: destructor `A.~this` cannot be used because it is annotated with @disable I was expecting that disabling the destructor would make it as if the struct does not have a

Re: Copy Constructor DIP

2018-07-13 Thread RazvanN via Digitalmars-d
In a post-blit world, with no opAssign specified, postblit will call for copy construction AND for assignment, thereby assignment is always correct. Once postblit is swapped for a copy-constructor, absence of opAssign will result in invalid behaviour on assignment. Indeed, but this was the

Re: Copy Constructor DIP

2018-07-13 Thread RazvanN via Digitalmars-d
The above code contains a typo. The parameter type of the second copy constructor is meant to be B not A

Re: Copy Constructor DIP

2018-07-12 Thread RazvanN via Digitalmars-d
That's my point; so this is a compile error then: S b = S(a); // <- explicit construction of copy? ie, explicit call to stated `@implicit` function Consider this code: import std.stdio : writeln; struct S { this(this) { writeln("postblit"); } int a; this(int a)

Re: Copy Constructor DIP

2018-07-12 Thread RazvanN via Digitalmars-d
What's wrong with: struct S { this(ref S copyFrom); } That looks like a perfectly good copy constructor declaration ;) I'm just saying, the DIP needs to explain this. That is actually a valid constructor, according to today's compiler. There might be code out there that uses this syntax

Re: Copy Constructor DIP

2018-07-11 Thread RazvanN via Digitalmars-d
But there's a super explicit `@implicit` thing written right there... so should we expect that an *explicit* call to the copy constructor is not allowed? Or maybe it is allowed and `@implicit` is a lie? The @implicit is there to point out that you cannot call that method explicitly; it gets

Re: Copy Constructor DIP

2018-07-11 Thread RazvanN via Digitalmars-d
On Tuesday, 10 July 2018 at 20:58:09 UTC, Manu wrote: On Tue, 10 Jul 2018 at 03:50, RazvanN via Digitalmars-d wrote: Hi everyone! I managed to put together a first draft of the DIP for adding the copy constructor to the language [1]. If anyone is interested, please take a look. Suggestions

Copy Constructor DIP

2018-07-10 Thread RazvanN via Digitalmars-d
Hi everyone! I managed to put together a first draft of the DIP for adding the copy constructor to the language [1]. If anyone is interested, please take a look. Suggestions and comments about technical aspects and wording are all welcome. Thanks, RazvanN [1]

Re: Class qualifier vs struct qualifier

2018-06-14 Thread RazvanN via Digitalmars-d-learn
Honestly, from what I understand of how this works, what I find weird is the struct case. immutable on classes does _not_ make the class itself immutable. It just makes all of its members immutable - hence the error about trying to allocate new Foo instead of new immutable Foo. So, that is

Class qualifier vs struct qualifier

2018-06-13 Thread RazvanN via Digitalmars-d-learn
Hello, I'm having a hard time understanding whether this inconsistency is a bug or intended behavior: immutable class Foo {} immutable struct Bar {} void main() { import std.stdio : writeln; Foo a; Bar b; writeln("typeof(a): ", typeof(a).stringof); writeln("typeof(b): ",

Constructor qualifiers; bug or expected behavior?

2018-04-02 Thread RazvanN via Digitalmars-d-learn
Hi all, Let's say we have this code: struct B { int a; this(int a) immutable { this.a = 7; } this(int a) { this.a = 10; } } void main() { B a = immutable B(2); writeln(a.a); a.a = 4; immutable B a2 = immutable B(3);

Postblit documentation

2018-03-29 Thread RazvanN via Digitalmars-d-announce
Hi all, I've been documenting how the postblit works [1] and discovered that it has some major issues when used with qualifiers. I will try to come up with an alternative design, but until then, anyone interested please take look and modify/add anything you find suitable. Cheers, RazvanN

Re: CTFE ^^ (pow)

2018-03-23 Thread RazvanN via Digitalmars-d
On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote: What is so hard about implementing a pow intrinsic that CTFE can use? It's ridiculous that we can't CTFE any non-linear function... It's one of those blocker bugs that's been there almost 10 years. Well, there is this PR :

Re: Understanding the AST...

2018-02-22 Thread RazvanN via Digitalmars-d-learn
On Thursday, 22 February 2018 at 13:21:04 UTC, joe wrote: On Monday, 12 February 2018 at 08:47:58 UTC, RazvanN wrote: Hi Joe, /SNIP On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote: [...] The FuncDeclaration node contains all the information for that. For example, you can access

Re: How to check if aggregate member is static templated method?

2018-02-15 Thread RazvanN via Digitalmars-d-learn
On Thursday, 15 February 2018 at 13:51:41 UTC, drug wrote: 15.02.2018 16:50, drug пишет: https://run.dlang.io/is/zHT2XZ I can check againts if member is either static function or template. But I failed to check if it both static and templated. The best I could come up with is: struct Foo {

Re: Understanding the AST...

2018-02-12 Thread RazvanN via Digitalmars-d-learn
Hi Joe, I suggest you watch this video which explains how the parse time visitors work: https://www.youtube.com/watch?v=tK072jcoWv4 . On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote: Hello everybody! Last week end I found this post (

Re: Who can make Phobos faster to import?

2017-12-27 Thread RazvanN via Digitalmars-d
On Tuesday, 26 December 2017 at 15:38:14 UTC, Joakim wrote: On Tuesday, 26 December 2017 at 13:27:38 UTC, RazvanN wrote: On Thursday, 21 December 2017 at 03:31:16 UTC, Joakim wrote: On Wednesday, 20 December 2017 at 18:21:33 UTC, Andrei Alexandrescu wrote: A tool (call it depend - heh) to

Re: Who can make Phobos faster to import?

2017-12-26 Thread RazvanN via Digitalmars-d
On Thursday, 21 December 2017 at 03:31:16 UTC, Joakim wrote: On Wednesday, 20 December 2017 at 18:21:33 UTC, Andrei Alexandrescu wrote: On 12/15/2017 02:10 PM, Seb wrote: [...] Dmitry wrote a nice PR for that, and I wrote two: https://github.com/dlang/phobos/pull/5942

Re: ddox empty public methods/interfaces etc

2017-11-10 Thread RazvanN via Digitalmars-d-learn
On Thursday, 9 November 2017 at 14:21:52 UTC, Steven Schveighoffer wrote: On 11/8/17 10:45 PM, Andrey wrote: I just added to dub.json this: "-ddoxFilterArgs": [     "--min-protection=Public" ] i.e. without --only-documented option, in this way ddox will generate documentation for all

Re: std.concurrency.setMaxMailboxSize

2017-10-11 Thread RazvanN via Digitalmars-d-learn
On Wednesday, 11 October 2017 at 11:26:11 UTC, rikki cattermole wrote: On 11/10/2017 12:09 PM, RazvanN wrote: Hi all, I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other

std.concurrency.setMaxMailboxSize

2017-10-11 Thread RazvanN via Digitalmars-d-learn
Hi all, I have seen that the concurrency api has this method specified in $title [1] and I was wondering what is the use of it? Enabling threads to modify the message box of other threads doesn't seem to be a good idea and I can't think of any real use case. Best regards, RazvanN [1]

Default hashing function for AA's

2017-10-09 Thread RazvanN via Digitalmars-d
Hi all, We in the UPB dlang group have been having discussions about the hashing functions of associative arrays. In particular, we were wondering why is the AA implementation in druntime is not using the hash function implemented in druntime/src/core/internal/hash.hashOf for classes that

Re: [your code here]

2017-09-07 Thread RazvanN via Digitalmars-d
On Thursday, 7 September 2017 at 04:01:21 UTC, Lionello Lunesu wrote: Thought this code ended up really concise and readable: https://gist.github.com/lionello/60cd2f1524c664d4d8454c01a05ac2c8 Suitable for dlang.org? L. The best way to find out it to make a pull request [1] [1]

Re: [OT] - A hacker stole $31M of Ether — how it happened, and what it means for Ethereum

2017-08-04 Thread RazvanN via Digitalmars-d
On Friday, 4 August 2017 at 05:57:00 UTC, Nick B wrote: See - https://medium.freecodecamp.org/a-hacker-stole-31m-of-ether-how-it-happened-and-what-it-means-for-ethereum-9e5dc29e33ce [...] I don't think the problem was with the blockchain here. It is usually a bad idea to have

Codecov and CyberShadow failure

2017-02-08 Thread RazvanN via Digitalmars-d
I've noticed a couple of days ago that the 2 components mentioned in $title aren't working when making PRs. I don't have any experience with this, so what is there to be done? RazvanN

Re: D bindings for TensorFlow

2017-01-06 Thread RazvanN via Digitalmars-d-learn
On Friday, 6 January 2017 at 13:22:28 UTC, llaine wrote: Did anyone used Tensorflow with D ? I would be really interesting to know if some libs allows it right now. I read an old thread about TS on the forum, but since then nothing ... At the moment there is no support in D to use

Re: Swap front for char[] input ranges

2016-12-21 Thread RazvanN via Digitalmars-d-learn
On Monday, 19 December 2016 at 20:26:26 UTC, Ali Çehreli wrote: On 12/19/2016 06:09 AM, RazvanN wrote: > [...] wrote: >> [...] InputRanges. >> [...] following > [...] char[] > [...] function, so > [...] http://dlang.org/phobos/std_algorithm_mutation.html#bringToFront [...] No need to mention

Re: Swap front for char[] input ranges

2016-12-19 Thread RazvanN via Digitalmars-d-learn
On Monday, 19 December 2016 at 12:25:02 UTC, Ali Çehreli wrote: On 12/19/2016 02:41 AM, RazvanN wrote: > [...] As your comments make it clear below, they cannot be InputRanges. > [...] swapping code > [...] Obivously, tmp1 and tmp2 are unusued there. :) > [...] passed. > [...]

Swap front for char[] input ranges

2016-12-19 Thread RazvanN via Digitalmars-d-learn
Hi, I have a function which accepts 2 input Ranges and swaps the first element in Range1 with the first element in Range2. The swapping code looks something like this : static if (is(typeof(swap(r1.front, r2.front { swap(r1.front, r2.front); } else {

Range of uncopyable elements

2016-12-08 Thread RazvanN via Digitalmars-d-learn
Hi, I am trying to create a range with uncopyable elements. My thought process was the following: 1.I have created a struct : struct S { int a; @disable this(this); } 2. I declared an array : S[] arr = [S(1), S(2), S(3)]; expecting that arr will be a range like, for example, an

Re: Char representation

2016-11-22 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 14:23:28 UTC, Jonathan M Davis wrote: On Tuesday, November 22, 2016 13:29:47 RazvanN via Digitalmars-d-learn wrote: [...] You misunderstand. char[] is a dynamic array of char, wchar[] is a dynamic array of wchar[], and dchar[] is a dynamic array of dchar

Char representation

2016-11-22 Thread RazvanN via Digitalmars-d-learn
Given the following code: char[5] a = ['a', 'b', 'c', 'd', 'e']; alias Range = char[]; writeln(is(ElementType!Range == char)); One would expect that the program will print true. In fact, it prints false and I noticed that if Range is char[], wchar[], dchar[], string, wstring, dstring

Re: The return of std.algorithm.find

2016-11-15 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 15 November 2016 at 09:43:27 UTC, RazvanN wrote: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For

The return of std.algorithm.find

2016-11-15 Thread RazvanN via Digitalmars-d-learn
The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For example: find(assumeSorted[1, 2, 4, 5, 6, 7], 4) would return [4, 5,

Re: Concatenate 2 ranges

2016-11-11 Thread RazvanN via Digitalmars-d-learn
On Friday, 11 November 2016 at 13:33:20 UTC, Vladimir Panteleev wrote: On Friday, 11 November 2016 at 13:30:17 UTC, RazvanN wrote: I know that I can use the .array property, but I think that this iterates through all of my elements. Using assumeSorted(chain(r1, r2).array) will return a

Concatenate 2 ranges

2016-11-11 Thread RazvanN via Digitalmars-d-learn
I am trying to concatenate 2 ranges of the same type (SortedRange in my case). I have tried merge, join and chain, but the problem is that the result is not an object of the type of the initial ranges. For example: 1. If I use chain(r1, r2), the result will be an object of type Result which

Re: is operator and SortedRange

2016-11-11 Thread RazvanN via Digitalmars-d-learn
On Friday, 11 November 2016 at 12:02:10 UTC, ketmar wrote: On Friday, 11 November 2016 at 11:49:25 UTC, RazvanN wrote: [...] template isSortedRange(T) { private import std.range : SortedRange; static if (is(T : SortedRange!TT, TT)) { enum isSortedRange = true; } else { enum

is operator and SortedRange

2016-11-11 Thread RazvanN via Digitalmars-d-learn
I am a bit confused about how the is operator works. I have a function which receives an InputRange and a predicate. Now I need to be able to test if the InputRange is actually a SortedRange. I don't care about how the datatypes behind the SortedRange or the predicate, I just need to see if

Obtain predicate from SortedRange

2016-11-09 Thread RazvanN via Digitalmars-d-learn
Given a SortedRange object, is there a way to obtain the predicate which was used for it to be sorted?

Re: typeof(SortedRange) and is operator

2016-11-08 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 8 November 2016 at 13:59:19 UTC, Nicholas Wilson wrote: On Tuesday, 8 November 2016 at 13:22:35 UTC, RazvanN wrote: Sorry, I accidentally posted the above message and I don't know how to erase it. You can't, this is a mailing list not a forum. The following post is the complete

  1   2   >