Re: From the D Blog: Crafting Self-Evident Code in D

2023-10-05 Thread angel via Digitalmars-d-announce
I think if `class` is a reference type, it should've been explicit: ```sh class C { ... } auto obj = new C(); void func(ref C obj) { ... } ``` I don't mind if it does not compile without the `ref`, but it should be on the table - WYSIWYG.

Re: Destroy All Memory Corruption

2021-04-22 Thread angel via Digitalmars-d-announce
On Thursday, 22 April 2021 at 13:08:39 UTC, matheus wrote: On Thursday, 22 April 2021 at 01:31:09 UTC, Ali Çehreli wrote: On 4/19/21 6:12 PM, Walter Bright wrote: I'll be doing a reprise of my DConf 2020 talk on Destroy All Memory Corruption on April 21, 2021 at 7PM PST. https://nwcpp.org/

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

2021-01-06 Thread angel via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 09:24:28 UTC, Mike Parker wrote: The Feedback Thread is here: https://forum.dlang.org/post/qglydztoqxhhcurvb...@forum.dlang.org Why not "int[auto] arr = [1, 2, 3]" ? IMHO auto keyword is less ambiguous than $.

Re: DIP 1030-- Named Arguments--Formal Assessment

2020-09-17 Thread angel via Digitalmars-d-announce
On Thursday, 17 September 2020 at 12:58:06 UTC, Mike Parker wrote: DIP 1030, "Named Arguments", has been accepted. I would really want to see tuples ...

Re: Mimicking a shell

2019-12-29 Thread angel via Digitalmars-d-learn
On Sunday, 29 December 2019 at 17:03:14 UTC, Jan wrote: Hi, Is there a way to forward all input and output from a shell? This implies that e.g. pressing the left arrow on the keyboard is immediately being forwarded to the shell and that the output from a shell would be *exactly* the same as

Re: What is the point of a synchronized lock on a single return statement?

2019-11-25 Thread angel via Digitalmars-d-learn
On Monday, 25 November 2019 at 08:22:17 UTC, Andrej Mitrovic wrote: From: https://github.com/dlang/phobos/blob/10b9174ddcadac52f6a1ea532deab3310d3a8c03/std/concurrency.d#L1913-L1916: - /// final @property bool isClosed() @safe @nogc pure { synchronized (m_lock) { return

Re: The Future of the GtkDcoding Blog

2019-11-21 Thread angel via Digitalmars-d-announce
On Tuesday, 19 November 2019 at 19:37:41 UTC, Ron Tarrant wrote: In 2006, I started a blog on PHP-GTK 2.x that ran for 40 posts before the blog site I was using closed its door. By then, I was caught up in writing Corkboard, the first full-featured application I'd written for my own amusement

Re: A tutorial teaching the basics about multimedia with the arsd library

2019-06-30 Thread angel via Digitalmars-d-announce
On Sunday, 30 June 2019 at 23:46:27 UTC, Murilo wrote: Hi everyone, I am writing a tutorial teaching the basics about multimedia programming using the arsd library. This is a library all D programmers should have since it is very useful and easy. In this tutorial I will teach in a fun and easy

Re: gtkDcoding Facelift

2019-06-23 Thread angel via Digitalmars-d-learn
On Sunday, 23 June 2019 at 10:55:52 UTC, Ron Tarrant wrote: Stage 1 is now complete. Blog entries are color-associated in an effort to make things more visual. Each topic also has its own avatar. Points to anyone who can figure out why each avatar is associated with its topic.

Re: Started a neat 3D model project of D's mascot in Paint3D

2019-06-04 Thread angel via Digitalmars-d-announce
On Tuesday, 4 June 2019 at 12:23:27 UTC, Aurélien Plazzotta wrote: On Tuesday, 4 June 2019 at 01:54:28 UTC, Kaylan Tussey wrote: I hope someone is better in paint3d than I am! https://github.com/KaylanTussey/3DD Very nice and thanks! Perhaps you could add a C++ corpse being trampled by D

Re: DConf 2019 Livestream

2019-05-08 Thread angel via Digitalmars-d-announce
On Wednesday, 8 May 2019 at 08:00:15 UTC, Andrej Mitrovic wrote: On Wednesday, 8 May 2019 at 07:57:40 UTC, Mike Parker wrote: The venue uses WebEx for livestreaming. All the information is available in this PDF: https://drive.google.com/open?id=1yekllbfOmxHqJNuuWIVeP9vNeROmfp1I "When

Re: Singleton in Action?

2019-02-02 Thread angel via Digitalmars-d-learn
On Saturday, 2 February 2019 at 19:23:58 UTC, Ron Tarrant wrote: Thanks for the replies, fellow programmers. (generic, unisex, PC, and all-encompassing) If I could trouble someone for a complete working example so I have something to study, that would be excellent. I think that's what you

Re: Reverse and sort array elements

2018-12-18 Thread angel via Digitalmars-d-learn
On Tuesday, 18 December 2018 at 12:07:37 UTC, Andrey wrote: Hi, Have array: enum array = ["qwerty", "a", "baz"]; Need to reverse and sort array elements to get this result: [a, ytrewq, zab] Did this: enum result = array.map!(value => value.retro()).sort(); Got: Error: template

Re: allMembers broke for __

2018-06-17 Thread angel via Digitalmars-d
On Sunday, 17 June 2018 at 02:25:59 UTC, Adam D. Ruppe wrote: On Sunday, 17 June 2018 at 01:02:17 UTC, DigitalDesigns wrote: If this was a sane language constraint then any identifiers starting with __ that were not reserved would at least give a warning but particularly give an error! Not

Re: Submit D Machine Learning libraries

2018-01-10 Thread angel via Digitalmars-d
It is funny, there is 'DLib' under C++. On Tuesday, 9 January 2018 at 20:39:25 UTC, aberba wrote: On Tuesday, 9 January 2018 at 19:46:00 UTC, aberba wrote: [1] is a curated list of machine learning libraries for several programming languages (no D library in list). I don't know much about ML

Re: ArithEval v0.5.0 released

2018-01-07 Thread angel via Digitalmars-d-announce
On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote: Updating this library I coded more than a year ago, so that I could use it as an optional dependency of the coming up dli library. It allows the runtime evaluation of simple math expressions like `1 + 2 * 3` or `1 ^ foo`, with foo

Re: What do you want to see for a mature DLang?

2017-12-29 Thread angel via Digitalmars-d
Built-in tuples: {val1, val2} = func(); On Friday, 29 December 2017 at 07:53:51 UTC, IM wrote: I will start: -- Better compiler errors, better compiler errors, better compiler errors. I really wish that the compiler errors could receive some refinement. Mostly it feels like some

Re: Proposal: Support for objects in switch statements

2017-11-04 Thread angel via Digitalmars-d
On Wednesday, 1 November 2017 at 01:16:32 UTC, solidstate1991 wrote: After I started to alter my graphics engine to use the multiple kinds of bitmaps (now using multiple language features, like templates and aliases) on one layer, I noticed that type detection of bitmap objects would be easier

What is wrong with core.stdc.signal ?

2017-10-27 Thread angel via Digitalmars-d
Core.stdc.signal.signal() requires that a signal handler function is "nothrow @nogc @system". These attributes impose quite a limitation - one cannot even print which signal was accepted. While if one imports this same function via "extern (C)" path, he can freely throw and allocate memory in

Re: How to list all process directories under /proc/

2017-09-22 Thread angel via Digitalmars-d-learn
On Sunday, 17 September 2017 at 08:15:58 UTC, Ky-Anh Huynh wrote: Hi, I want to list all processes by scanning /proc/. The following code doesn't work [code] foreach (string fstatm; dirEntries("/proc/", "[0-9]*", SpanMode.shallow)) { writefln("pid %s", fstatm); } [/code] as it

Re: real simple delegate question.

2017-08-20 Thread angel via Digitalmars-d-learn
On Saturday, 19 August 2017 at 18:33:37 UTC, WhatMeWorry wrote: On Friday, 18 August 2017 at 20:39:38 UTC, angel wrote: On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote: [...] This actually appears correct ... The 1-st example: Each call to makeCalculator() increments a static

Re: real simple delegate question.

2017-08-18 Thread angel via Digitalmars-d-learn
On Friday, 18 August 2017 at 02:38:15 UTC, WhatMeForget wrote: Can someone explain what is the difference between the two? Thanks. module gates; import std.stdio; import std.random; alias Calculator = int delegate(int); Calculator makeCalculator() { static int context = 0; int

Re: Create class on stack

2017-08-05 Thread angel via Digitalmars-d-learn
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones wrote: using gtk, it has a type called value. One has to use it to get the value of stuff but it is a class. Once it is used, one doesn't need it. Ideally I'd like to treat it as a struct since I'm using it in a delegate I would like

Re: Is this related to D?

2017-07-26 Thread angel via Digitalmars-d
On Wednesday, 26 July 2017 at 18:09:23 UTC, Andrei Alexandrescu wrote: I got this on a Google Alert for "dlang": https://launchpad.net/ubuntu/+source/language-pack-kn/1:17.10+20170724/+build/13147073. Is it connected to the D language? -- Andrei No, this is related to Kannada language

Re: Showcasing the power of D on HackerRank

2017-04-01 Thread angel via Digitalmars-d
On Saturday, 1 April 2017 at 19:17:01 UTC, aberba wrote: HackerRank (https://www.hackerrank.com) "is a place where programmers from all over the world come together to solve problems in a wide range of Computer Science domains such as algorithms, machine learning, or artificial intelligence,

Re: What about this logo ":D" to advertise the D language ?

2017-03-02 Thread angel via Digitalmars-d
On Thursday, 2 March 2017 at 12:31:27 UTC, qznc wrote: On Thursday, 2 March 2017 at 09:45:40 UTC, Martin Tschierschke wrote: On Thursday, 2 March 2017 at 09:05:43 UTC, Jared Jeffries wrote: I'm not completely joking ;) D deserves a lot more fame, because it really allows programmers to

Re: Factory using an alias template parameter to set a member of the new tool ?

2017-02-09 Thread angel via Digitalmars-d-learn
On Thursday, 9 February 2017 at 14:39:41 UTC, angel wrote: On Thursday, 9 February 2017 at 13:30:07 UTC, jkpl wrote: I'm looking for a better way to do this, if possible: ``` class Tool { string name; } T namedTool(alias Variable, T)() { T result = new T; result.name =

Re: Factory using an alias template parameter to set a member of the new tool ?

2017-02-09 Thread angel via Digitalmars-d-learn
On Thursday, 9 February 2017 at 13:30:07 UTC, jkpl wrote: I'm looking for a better way to do this, if possible: ``` class Tool { string name; } T namedTool(alias Variable, T)() { T result = new T; result.name = Variable.stringof; return result; } void main() { Tool grep;

Re: capture stdout or stderr

2017-02-01 Thread angel via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 01:08:19 UTC, Emil wrote: is it possible to intercept the STDOUT or STDERR and capture the output into a variable ? some pseudocode to explain what I mean string[] output_buffer; stdout.capture_to(output_buffer); writeln("test 1"); # not printed

Re: @property get/set or public varaible?

2016-12-04 Thread angel via Digitalmars-d-learn
On Sunday, 4 December 2016 at 15:30:22 UTC, vladdeSV wrote: Hello! I have a question not directly related to D as it is with coding standards. My issue at hand is if I have one variable for a class, which I want to be directly accessible for anything else, should it be 1. public, or 2.

Re: ThinLTO is there. I think that should settle the final/virtual debate

2016-12-04 Thread angel via Digitalmars-d
On Sunday, 4 December 2016 at 01:36:50 UTC, deadalnix wrote: First, presentation: https://www.youtube.com/watch?v=9OIEZAj243g Some of this is available in LLVM today, and everything presented here will be in 4.0 . The long story short: ThinLTO can do most of what LTO does but with a price

An interesting article on GC interaction with OS scheduler

2016-12-03 Thread angel via Digitalmars-d
This article presents an insight into a peculiar interaction between Java GC and Linux scheduler on the background of Linux containerization technology - the CGROUP. IMHO the CGROUP only amplifies the discussed impact, that exists anyway. A short summary: Linux scheduler allocates a time

Re: Examples Wanted: Usages of "body" as a Symbol Name

2016-10-05 Thread angel via Digitalmars-d
On Wednesday, 5 October 2016 at 02:11:14 UTC, Meta wrote: I'm currently writing up a DIP to propose removing `body` as a keyword to allow it to be used for variable names, functions, etc. I'm looking for examples and contexts where `body` would normally be used as a variable, function name,

Re: iPhone vs Android

2016-09-13 Thread angel via Digitalmars-d
I think the conclusions about iOS vs. Android OS-level memory collection are not applicable to D GC discussion. An OS collects all the memory pages allocated for a process upon exit - no heap scan, no RC. It more resembles a one huge free() call. The discussion is mainly about eager vs.

Is it a bug in unittest ?

2016-09-01 Thread angel via Digitalmars-d
If one creates a unittest block in a templated class (or struct), the unittest block will be multiplied per class specialization, which might turn out to be quite large number. E.g. struct A(T) { ... unittest { ... } } ... auto a = A!int; auto b = A!int; auto c

Re: Is this the best way to share Tids between threads?

2016-08-14 Thread angel via Digitalmars-d
Let each thread have a name related to its task. It is like having a shared Tid array, but already implemented. Reference: http://dlang.org/phobos/std_concurrency.html#.register

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-14 Thread angel via Digitalmars-d
I happen to be CompuLab's ex-employee, and I have even been involved in SW development of the AirTop computer ... So it is D-friendly at least to the extent, that a D fan was involved in its development. It is indeed quite powerful. The technical support is also very good. Building a fanless

Re: Graylog Extended Log Format (GELF) for D

2016-04-09 Thread angel via Digitalmars-d-announce
But what about this ? https://forum.dlang.org/thread/eryphpbznrrovjvxj...@forum.dlang.org

Re: Defer in D

2016-03-21 Thread angel via Digitalmars-d
I would, actually, like to see it integrated with the core language syntax, kinda: scope(function) ... While your solution is viable from the technical point of view, having a consistent language syntax could also be nice.

Re: The relationship of invariants and alias this

2014-11-11 Thread angel via Digitalmars-d
Wait ! x.value -= 100; would call the invariant ? Alias this only rewrites your expression: x -= 100; becomes x.value -= 100; No method is called. Then there is no reason (is there ?) to call the invariant. If you would create getter/setter properties ...

Re: spawnProcess() not child?

2014-11-03 Thread angel via Digitalmars-d-learn
The parent / child relationship always exists. In POSIX OSs, you may ignore SIGCHLD signal (announcing child process death), so that in case of child process exit it will not become zombie, rather it will be disposed on the spot. As a side note, in Linux, there exist a system call allowing