Re: Is D programming friendly for beginners?

2024-03-12 Thread Meta via Digitalmars-d-announce
On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote: On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote: ... I really think D would be a wonderful first language.  Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro

Re: Is D programming friendly for beginners?

2024-03-12 Thread Andrea Fontana via Digitalmars-d-announce
On Tuesday, 12 March 2024 at 19:12:03 UTC, H. S. Teoh wrote: I don't know how CS programs are carried out these days, but back when I was in university, the choice of language is largely irrelevant, because the whole point of a programming course isn't to teach you a specific language, but to

Re: Is D programming friendly for beginners?

2024-03-12 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Mar 12, 2024 at 06:03:43PM +, Lance Bachmeier via Digitalmars-d-announce wrote: > On Tuesday, 12 March 2024 at 17:03:42 UTC, Mike Shah wrote: > > > As a note, the 'which language is best for CS 1' debate has long > > been debated -- but at least in a school s

Re: Is D programming friendly for beginners?

2024-03-12 Thread M.M. via Digitalmars-d-announce
them and then eliminate the languages that aren't suitable. D is one of many languages that would work with the right content. Other languages, like C++, add unnecessary overhead and thus should not be used. It's often said "X is a complicated language" but that's the wrong w

Re: Is D programming friendly for beginners?

2024-03-12 Thread Lance Bachmeier via Digitalmars-d-announce
choice. As someone that's been teaching beginners to program at a university for a long time (but not in a CS department) I've come to see the choice of language as largely unimportant. You have to decide what you want to teach them and then eliminate the languages that aren't suitable. D

Re: Is D programming friendly for beginners?

2024-03-12 Thread Mike Shah via Digitalmars-d-announce
On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote: On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote: ... I really think D would be a wonderful first language.  Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro

Re: Is D programming friendly for beginners?

2024-03-12 Thread matheus. via Digitalmars-d-announce
On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote: ... I really think D would be a wonderful first language.  Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course. If you say that D would be a good language to learn

Re: Is D programming friendly for beginners?

2024-03-12 Thread Mike Shah via Digitalmars-d-announce
On Tuesday, 12 March 2024 at 14:03:30 UTC, Bastiaan Veelo wrote: On Monday, 11 March 2024 at 12:30:10 UTC, Doigt wrote: On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote: I want to start learning D programming language it looks interesting Depends what you mean by "beginner".

Re: Is D programming friendly for beginners?

2024-03-12 Thread Bastiaan Veelo via Digitalmars-d-announce
On Monday, 11 March 2024 at 12:30:10 UTC, Doigt wrote: On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote: I want to start learning D programming language it looks interesting Depends what you mean by "beginner". If you've never programmed before and D is your firs

Re: Is D programming friendly for beginners?

2024-03-11 Thread Doigt via Digitalmars-d-announce
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote: I want to start learning D programming language it looks interesting Depends what you mean by "beginner". If you've never programmed before and D is your first language, then the answer is a definite no.

Re: Can a D library have some types determined by the client program?

2024-03-10 Thread Liam McGillivray via Digitalmars-d-learn
On Sunday, 10 March 2024 at 04:39:33 UTC, Liam McGillivray wrote: https://github.com/LiamM32/Open_Emblem/tree/templates-interfaces I will probably merge it into master soon. I have put up a merge request for these changes I have made to the library and the Raylib front-end. I would be

Re: Can a D library have some types determined by the client program?

2024-03-10 Thread cc via Digitalmars-d-learn
interfaces. Or a combination, but multiple inheritance is not a well-liked idea. ```d class Map { int someVar = 3; void someFunc() { // default behavior writeln("hello"); } } class CustomMap!TierType : Map { override voi

Re: Can a D library have some types determined by the client program?

2024-03-09 Thread Liam McGillivray via Digitalmars-d-learn
I have made a new branch of my project called "templates-interfaces" which reworks some things, and turns the Map class into an interface and template. It is now functioning like the master branch, but I think the code should now be (arguably) easier to follow. At least that's true for the

Re: Can a D library have some types determined by the client program?

2024-03-09 Thread Liam McGillivray via Digitalmars-d-learn
Update on two things: One is that I now better understand what it means that D objects are "reference by default". This means that references *can* be null if they are declared with a class. In my commits last night, I have changed many pointers into references. I thi

Re: Can a D library have some types determined by the client program?

2024-03-08 Thread Liam McGillivray via Digitalmars-d-learn
master" class dominating the program that it's worth splitting it up despite the more complex programming. After changing `class Unit` to `class Unit (TileType)`, it complains about the line `Unit* occupant;` in Tile. Are you sure you need a pointer here? Class objects in D are already referen

Re: Can a D library have some types determined by the client program?

2024-03-08 Thread cc via Digitalmars-d-learn
on one file, you could wrap everything in a single template, but I don't usually favor this strategy. ```d //version=Interfaced; version=AllTemplated; //version=AllTemplatedAliases; //version=OneTemplate; version(Interfaced) { interface IMap { Unit addNewUnit

Re: Can a D library have some types determined by the client program?

2024-03-07 Thread Liam McGillivray via Digitalmars-d-learn
in any way than your second example, then I don't know why I wouldn't choose this one. Typically in D we use templates quite heavily, but what you are wanting is probably more familiar to you via the OOP method with a factory of some kind. Nope, but thank you. I am not a very experienced programmer

Re: Can a D library have some types determined by the client program?

2024-03-07 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
/basics/delegates ```d class Map(ATile : Tile) { ATile[] tiles; } ``` Thank you. Is this first example you gave the template? Is the syntax `(ATile : Tile)` saying that ATile must be a derived class of Tile? If this isn't worse in any way than your second example, then I don't know why I

Re: Can a D library have some types determined by the client program?

2024-03-07 Thread Liam McGillivray via Digitalmars-d-learn
On Thursday, 7 March 2024 at 22:18:40 UTC, Richard (Rikki) Andrew Cattermole wrote: There are two ways to do this. 1. Use templates. https://tour.dlang.org/tour/en/basics/templates 2. Use a factory function. https://tour.dlang.org/tour/en/basics/delegates ```d class Map(ATile : Tile

Re: Can a D library have some types determined by the client program?

2024-03-07 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
There are two ways to do this. 1. Use templates. https://tour.dlang.org/tour/en/basics/templates 2. Use a factory function. https://tour.dlang.org/tour/en/basics/delegates ```d class Map(ATile : Tile) { ATile[] tiles; } ``` Or: ```d class Map { Tile[] tiles; Tile

Can a D library have some types determined by the client program?

2024-03-07 Thread Liam McGillivray via Digitalmars-d-learn
In a source library written in D, is it possible to have some objects, variables, pointers etc which are determined by the program using the library? An example of where this would be useful is in the library I am currently writing. I have a class called `Map`, which holds an array

Re: Is D programming friendly for beginners?

2024-03-05 Thread thinkunix via Digitalmars-d-announce
Fidele via Digitalmars-d-announce wrote: I want to start learning D programming language it looks interesting Get familiar with https://dlang.org/ web site, you'll use it a lot. Do the Tour, https://tour.dlang.org/ Books, full list here: https://wiki.dlang.org/Books I would recommend

Re: D Language Foundation November 2023 Monthly Meeting Summary

2024-03-04 Thread Steven Schveighoffer via Digitalmars-d-announce
On Monday, 4 March 2024 at 11:07:07 UTC, Mike Parker wrote: ### Steve and Me I have to apologize to Steve. I managed to botch the initial recording, so whatever he and I said at the top of the meeting is lost. I'm pretty sure I talked about preliminary planning for DConf '24, but beyond

Re: Is D programming friendly for beginners?

2024-03-04 Thread evilrat via Digitalmars-d-announce
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote: I want to start learning D programming language it looks interesting Answering thread question: It can be complicated, D has a lot of features and mastering it will take quite a lot of time. Since D is statically typed compiled system

Re: Is D programming friendly for beginners?

2024-03-04 Thread Sergey via Digitalmars-d-announce
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote: I want to start learning D programming language it looks interesting Please use "Learn" Group of the forum, this part of the forum for Announcements. Here are some useful links: * Tour - https://tour.dlang.org * Online B

Is D programming friendly for beginners?

2024-03-04 Thread Fidele via Digitalmars-d-announce
I want to start learning D programming language it looks interesting

Re: D Language Foundation November 2023 Monthly Meeting Summary

2024-03-04 Thread jmh530 via Digitalmars-d-announce
On Monday, 4 March 2024 at 11:19:57 UTC, Mike Parker wrote: On Monday, 4 March 2024 at 11:17:16 UTC, Sergey wrote: On Monday, 4 March 2024 at 11:07:07 UTC, Mike Parker wrote: snip Thanks for keep posting it just a bit awkward to read in March about November.. Yeah, sorry about that. I'll

D Language Foundation October/November 2023 Planning Updates

2024-03-04 Thread Mike Parker via Digitalmars-d-announce
the week before our monthly meeting. The main points of discussion were details about the Bugzilla to GitHub migration and more implementation details for DMD as a library. For the former, Robert had already migrated the Visual D issues and wanted feedback on the order in which to migrate

Re: D Language Foundation November 2023 Monthly Meeting Summary

2024-03-04 Thread Mike Parker via Digitalmars-d-announce
On Monday, 4 March 2024 at 11:17:16 UTC, Sergey wrote: On Monday, 4 March 2024 at 11:07:07 UTC, Mike Parker wrote: snip Thanks for keep posting it just a bit awkward to read in March about November.. Yeah, sorry about that. I'll get caught up this month. Then I'll be back to posting them

Re: D Language Foundation November 2023 Monthly Meeting Summary

2024-03-04 Thread Sergey via Digitalmars-d-announce
On Monday, 4 March 2024 at 11:07:07 UTC, Mike Parker wrote: snip Thanks for keep posting it just a bit awkward to read in March about November..

D Language Foundation November 2023 Monthly Meeting Summary

2024-03-04 Thread Mike Parker via Digitalmars-d-announce
# Summary The D Language Foundation's monthly meeting for November 2023 took place on Friday, the 10th, at 16:00 UTC. It lasted around one hour and ten minutes. ## The Attendees The following people attended the meeting: * Walter Bright * Martin Kinkelin * Mathias Lang * Átila Neves * Mike

Re: A math expression parser, written fully in D.

2024-03-04 Thread Ferhat Kurtulmuş via Digitalmars-d-announce
On Saturday, 2 March 2024 at 14:05:03 UTC, Murilo wrote: I've finally finished my math expression parser, written totally in D. It is able to interpret and solve any mathematical expression. https://github.com/MuriloMir/Math-expression-parser Nice. I have also written one some weeks ago

A math expression parser, written fully in D.

2024-03-02 Thread Murilo via Digitalmars-d-announce
I've finally finished my math expression parser, written totally in D. It is able to interpret and solve any mathematical expression. https://github.com/MuriloMir/Math-expression-parser

Re: Release D 2.107.1

2024-03-02 Thread M. M. via Digitalmars-d-announce
On Saturday, 2 March 2024 at 00:03:43 UTC, Iain Buclaw wrote: Glad to announce D 2.107.1, ♥ to the 6 contributors. http://dlang.org/download.html This point release fixes 15 issues over 2.107.0, see the changelog for more details. http://dlang.org/changelog/2.107.1.html -Iain on behalf

Re: Release D 2.107.1

2024-03-01 Thread Salih Dincer via Digitalmars-d-announce
On Saturday, 2 March 2024 at 00:03:43 UTC, Iain Buclaw wrote: Glad to announce D 2.107.1, ♥ to the 6 contributors. Thanks to the team for continuing to bring us an awesome D compiler! SDB@79

Release D 2.107.1

2024-03-01 Thread Iain Buclaw via Digitalmars-d-announce
Glad to announce D 2.107.1, ♥ to the 6 contributors. http://dlang.org/download.html This point release fixes 15 issues over 2.107.0, see the changelog for more details. http://dlang.org/changelog/2.107.1.html -Iain on behalf of the Dlang Core Team

Re: Minor note, D on NASA Goddard software page

2024-02-29 Thread Chris Piker via Digitalmars-d-announce
On Thursday, 29 February 2024 at 03:27:14 UTC, Tejas wrote: So now we can add NASA in the list of organisations that use D, right?... # 﫠 Well not quite yet*, but it is supporting a few payloads on some rather well known robotic spacecraft. *AFAIK

Re: Minor note, D on NASA Goddard software page

2024-02-28 Thread Tejas via Digitalmars-d-announce
On Wednesday, 28 February 2024 at 20:19:30 UTC, Chris Piker wrote: Hi D Just a minor note. My simple bindings for the NASA Common Data Format (CDF) library are listed on the user supplied software page: https://cdf.gsfc.nasa.gov/html/user_supplied_sw.html (scroll down) The library

Minor note, D on NASA Goddard software page

2024-02-28 Thread Chris Piker via Digitalmars-d-announce
Hi D Just a minor note. My simple bindings for the NASA Common Data Format (CDF) library are listed on the user supplied software page: https://cdf.gsfc.nasa.gov/html/user_supplied_sw.html (scroll down) The library itself is absolutely nothing to crow about. The only useful thing it does

[Issue 23926] ImportC: D can’t pass pointer to const struct to C function declared taking pointer to const struct

2024-02-28 Thread d-bugmail--- via Digitalmars-d-bugs
from Lance Bachmeier --- Can this be resolved by having ImportC generate a D overload? If const struct Foo* is rewritten to Foo*, it should. This is a solution for this particular example: struct Foo; void foo(Foo* x) {} // ImportC generates this function when encountering const struct Foo* void

A Conversation with Razvan Nitu on his D Programming Language Work

2024-02-25 Thread Mike Parker via Digitalmars-d-announce
A few days back, I sat down with Razvan Nitu for this month's Community Conversation. We talked about his path to D, how he got onto the core team, his work teaching D at university, mentoring SAOC, and more. https://youtu.be/Wndz2hLpbdM Thanks to Razvan for taking the time to do this. Look

[Issue 22098] Spurious failure in runnable/test20855.d with -inline

2024-02-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22098 Iain Buclaw changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Using ImportC to augment a big C project with D

2024-02-21 Thread Carl Sturtivant via Digitalmars-d-learn
On Tuesday, 20 February 2024 at 18:33:42 UTC, Carl Sturtivant wrote: 1. When the resulting executable runs it will have D call C which in turn calls D. In that last D (the D files replacing some C files), if I throw an exception and don't catch it in the D files that replace some C files

Re: Using ImportC to augment a big C project with D

2024-02-21 Thread Carl Sturtivant via Digitalmars-d-learn
On Wednesday, 21 February 2024 at 12:45:50 UTC, Bastiaan Veelo wrote: What do you mean by "need"? You can call https://dlang.org/phobos/core_stdc_stdlib.html#.exit from D: Of course, but does it respect D shutdown? Output: ``` onlineapp._sharedStaticDtor_L11_C1 ``` So it does

Re: Using ImportC to augment a big C project with D

2024-02-21 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 20 February 2024 at 18:33:42 UTC, Carl Sturtivant wrote: 2. The C source calls exit() from C's stdlib, and D needs to terminate properly. What do you mean by "need"? You can call https://dlang.org/phobos/core_stdc_stdlib.html#.exit from D: ```d import std.stdio;

Using ImportC to augment a big C project with D

2024-02-20 Thread Carl Sturtivant via Digitalmars-d-learn
I just saw the announcement that macros with parameters are now translated into D by ImportC. Incredible! Congratulations to all involved. As an occasional D user, I have long wanted a fast route to using D with an existing large C project (100K lines approximately). I want to replace the C

[Issue 7063] No error or warning for conflicting D and C symbols

2024-02-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7063 Chance Snow changed: What|Removed |Added CC||g...@chancesnow.me --

Re: Vibe D: Get access to files

2024-02-09 Thread Alexander Zhirov via Digitalmars-d-learn
In the files, dt specified the path to the files from the root `/style.css` and now, with any path from the root, files are loaded into the page, instead of `style.css`. My mistake.

[Issue 24376] New: ImportC: .di generator outputs D keywords for members

2024-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24376 Issue ID: 24376 Summary: ImportC: .di generator outputs D keywords for members Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC

Re: Fluid 0.6.0 — UI library for D

2024-02-07 Thread ryuukk_ via Digitalmars-d-announce
On Wednesday, 7 February 2024 at 15:27:34 UTC, cookiewitch wrote: On Wednesday, 7 February 2024 at 12:49:31 UTC, ryuukk_ wrote: On Wednesday, 7 February 2024 at 07:43:58 UTC, cookiewitch wrote: Windows: * Static Windows libraries for Freetype have been replaced with dynamic ones, which makes

Re: Fluid 0.6.0 — UI library for D

2024-02-07 Thread cookiewitch via Digitalmars-d-announce
On Wednesday, 7 February 2024 at 12:49:31 UTC, ryuukk_ wrote: On Wednesday, 7 February 2024 at 07:43:58 UTC, cookiewitch wrote: Windows: * Static Windows libraries for Freetype have been replaced with dynamic ones, which makes it a lot easier to compile. I am working on a PR that makes

Re: Fluid 0.6.0 — UI library for D

2024-02-07 Thread ryuukk_ via Digitalmars-d-announce
On Wednesday, 7 February 2024 at 07:43:58 UTC, cookiewitch wrote: Windows: * Static Windows libraries for Freetype have been replaced with dynamic ones, which makes it a lot easier to compile. I am working on a PR that makes working with static libraries easier

Re: Fluid 0.6.0 — UI library for D

2024-02-06 Thread cookiewitch via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something

Re: Fluid 0.6.0 — UI library for D

2024-02-06 Thread cookiewitch via Digitalmars-d-announce
On Wednesday, 31 January 2024 at 06:38:17 UTC, aberba wrote: On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user

Re: Upcoming talk at FOSDEM 2024 - The D Programming Language for Modern Open Source Development

2024-02-05 Thread Mike Shah via Digitalmars-d-announce
here -- I'll do my best to figure out how to link a few projects in the presentation. Mike, If you want to show some applications written in D, I can offer the Eilmer compressible flow solver as an example. This year it will be ten years that we have been using D to build our flow solver

Re: Fluid 0.6.0 — UI library for D

2024-02-04 Thread aberba via Digitalmars-d-announce
On Wednesday, 31 January 2024 at 09:34:06 UTC, Bastiaan Veelo wrote: On Wednesday, 31 January 2024 at 06:38:17 UTC, aberba wrote: On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing

Re: sokol-d: Static Struct

2024-02-02 Thread Matheus Catarino via Digitalmars-d-learn
On Saturday, 30 December 2023 at 19:27:08 UTC, Matheus Catarino wrote: Hi everyone.  Currently I'm working on D binding for sokol project (truly a dual bindgen [sokol-tools, sokol-header]) which could be merged into the upstream project. Up to now, my "ideal" configuratio

Re: Release D 2.107.0

2024-02-02 Thread Dennis via Digitalmars-d-announce
On Friday, 2 February 2024 at 11:26:11 UTC, Richard (Rikki) Andrew Cattermole wrote: Doesn't look like any of Dennis's work on improving the Unicode tables for Phobos has made it in this release. The master branch for 2.107 was cut off on Jan 1st, and the table improvements came after that.

Re: Release D 2.107.0

2024-02-02 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
Doesn't look like any of Dennis's work on improving the Unicode tables for Phobos has made it in this release. Bit of a shame, they are a lot faster now! But good stuff in this release anyway!

Release D 2.107.0

2024-02-02 Thread Iain Buclaw via Digitalmars-d-announce
Glad to announce D 2.107.0, ♥ to the 37 contributors. This release comes with 10 major changes and 61 fixed Bugzilla issues, including: - Unrecognized pragmas are no longer an error, but instead simply ignored. - Added `@core.attribute.standalone` for shared static module constructors

Project Euler solution in D

2024-02-01 Thread Menjanahary R. R. via Digitalmars-d-announce
I came accross D early in 2004... It was since then a never ending _Love story_. Time to give back now! https://github.com/pe-solutions/pe-dlang #math #code #dlang

Re: Upcoming talk at FOSDEM 2024 - The D Programming Language for Modern Open Source Development

2024-01-31 Thread Mike Shah via Digitalmars-d-announce
in the presentation. Mike, If you want to show some applications written in D, I can offer the Eilmer compressible flow solver as an example. This year it will be ten years that we have been using D to build our flow solver. It has been a good ride. There is a blog entry from a couple

Re: Fluid 0.6.0 — UI library for D

2024-01-31 Thread Bastiaan Veelo via Digitalmars-d-announce
On Wednesday, 31 January 2024 at 06:38:17 UTC, aberba wrote: On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. [...] Could you

Re: Fluid 0.6.0 — UI library for D

2024-01-30 Thread aberba via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-27 Thread Chris Katko via Digitalmars-d-announce
On Wednesday, 24 January 2024 at 08:22:49 UTC, Walter Bright wrote: On 1/23/2024 8:01 AM, Steven Schveighoffer wrote: zero proposals that infer type from how they are used have been accepted by Walter, this one probably will be no different. Types are inferred in D from the bottom up. Mixing

Re: Upcoming talk at FOSDEM 2024 - The D Programming Language for Modern Open Source Development

2024-01-27 Thread matheus via Digitalmars-d-announce
On Saturday, 27 January 2024 at 14:47:51 UTC, Bastiaan Veelo wrote: ... This is the link: https://fosdem.org/2024/schedule/event/fosdem-2024-2092-the-d-programming-language-for-modern-open-source-development/ ... Thanks, Matheus.

Re: Fluid 0.6.0 — UI library for D

2024-01-27 Thread cookiewitch via Digitalmars-d-announce
Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something I've spent a significant amount of time in the past, so I saw

Re: Upcoming talk at FOSDEM 2024 - The D Programming Language for Modern Open Source Development

2024-01-27 Thread Bastiaan Veelo via Digitalmars-d-announce
On Monday, 15 January 2024 at 00:49:25 UTC, matheus wrote: On Sunday, 14 January 2024 at 23:16:40 UTC, Mike Shah wrote: Hi D Community, My talk on how I'm using the D programming language and why I think it is an excellent language choice for open source projects will be featured at FOSDEM

Re: Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-26 Thread zjh via Digitalmars-d-learn
On Friday, 26 January 2024 at 14:46:08 UTC, Emmanuel Danso Nyarko wrote: Yes, this is a project currently in progress. Vector was only working for windows but we have it working on linux but it's not yet ready to be used that's why you could only use it from a standalone fork.

Re: Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-26 Thread Emmanuel Danso Nyarko via Digitalmars-d-learn
June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2): ``` main.d(32): Error: undefined identifier `vector` in module `core.stdcpp.vector`, did you mean enum member `MIctor`? ``` So what's wrong the LDC? how do I write `core.stdcpp.vector.vector` then? Currently, I was only

Re: Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-26 Thread Matheus Catarino via Digitalmars-d-learn
On Friday, 26 January 2024 at 09:06:16 UTC, Emmanuel Danso Nyarko wrote: On Thursday, 25 January 2024 at 21:41:36 UTC, Matheus Catarino wrote: https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2

Re: Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-26 Thread Emmanuel Danso Nyarko via Digitalmars-d-learn
On Thursday, 25 January 2024 at 21:41:36 UTC, Matheus Catarino wrote: https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2): ``` main.d(32): Error: undefined identifier `vector` in module

Re: Fluid 0.6.0 — UI library for D

2024-01-25 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a flexible UI library for the D programming language. Minimal setup. Declarative. Non-intrusive. Awesome!

Using C++ Classes From D: dmd cannot link, while ldc segfault

2024-01-25 Thread Matheus Catarino via Digitalmars-d-learn
https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote: LDC - the LLVM D compiler (1.32.2): ``` main.d(32): Error: undefined identifier `vector` in module `core.stdcpp.vector`, did you mean enum member `MIctor`? ``` So what's wrong

Re: Fluid 0.6.0 — UI library for D

2024-01-25 Thread zjh via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something

Re: Fluid 0.6.0 — UI library for D

2024-01-25 Thread Matheus Catarino via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something

Re: Fluid 0.6.0 — UI library for D

2024-01-25 Thread cookiewitch via Digitalmars-d-announce
On Thursday, 25 January 2024 at 12:33:31 UTC, cookiewitch wrote: Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something

Fluid 0.6.0 — UI library for D

2024-01-25 Thread cookiewitch via Digitalmars-d-announce
Fluid is a library I started developing 3 years ago when I joined the D community, after failing to find a suitable library for my gamedev project. Developing user interfaces through websites, games or applications is something I've spent a significant amount of time in the past, so I saw

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-24 Thread Walter Bright via Digitalmars-d-announce
On 1/23/2024 8:01 AM, Steven Schveighoffer wrote: zero proposals that infer type from how they are used have been accepted by Walter, this one probably will be no different. Types are inferred in D from the bottom up. Mixing in special cases of it being top down leads to confusion over how

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-23 Thread Steven Schveighoffer via Digitalmars-d-announce
also can do some library tricks (unfortunately this won't count as construction, but probably is fine in most cases) ```d auto create(T, Args...)(out T val, Args args) { static if(is(T == class)) val = new T(args); else static if(...) // do eveyrything else. } ... dataGrid.create(15

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-23 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, January 23, 2024 4:11:00 AM MST ryuukk_ via Digitalmars-d-announce wrote: > On Tuesday, 23 January 2024 at 06:30:08 UTC, Jonathan M Davis > > wrote: > > That being said, I expect that it would be pretty easy to write > > a mixin to do something like that

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-23 Thread Sergey via Digitalmars-d-announce
On Tuesday, 23 January 2024 at 11:11:00 UTC, ryuukk_ wrote: [OT] btw what did you find? Which one could you recommend? https://forum.dlang.org/post/cqgrciflmvuwonsnz...@forum.dlang.org

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-23 Thread ryuukk_ via Digitalmars-d-announce
On Tuesday, 23 January 2024 at 06:30:08 UTC, Jonathan M Davis wrote: That being said, I expect that it would be pretty easy to write a mixin to do something like that if you really wanted to. Also, if you're simply looking to not have to name the type, you could do dataGrid = new

Re: Would this be a useful construct to add to D? auto for constructor call.

2024-01-22 Thread Jonathan M Davis via Digitalmars-d-announce
On Monday, January 22, 2024 11:05:28 PM MST Chris Katko via Digitalmars-d- announce wrote: > ```D > class dataGridLayerView{ > int t; > this(int _t){ >t = _t; >} > } > > class myClass{ > dataGridLayerView dataGrid; > > this(

Would this be a useful construct to add to D? auto for constructor call.

2024-01-22 Thread Chris Katko via Digitalmars-d-announce
```D class dataGridLayerView{ int t; this(int _t){ t = _t; } } class myClass{ dataGridLayerView dataGrid; this() { dataGrid = new auto(15); // <--- new // instead of dataGrid = new dataGridLayerView(15); } } ``` Because it se

[Issue 24179] Ddoc broke D code sections

2024-01-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24179 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-21 Thread Daniel Kozak via Digitalmars-d-learn
Dne so 20. 1. 2024 21:21 uživatel Renato via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> napsal: > On Saturday, 20 January 2024 at 19:45:19 UTC, Daniel Kozak wrote: > > On Sat, Jan 20, 2024 at 2:11 PM Renato via Digitalmars-d-learn > > < digitalmars-d-le

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-20 Thread Renato via Digitalmars-d-learn
On Saturday, 20 January 2024 at 19:45:19 UTC, Daniel Kozak wrote: On Sat, Jan 20, 2024 at 2:11 PM Renato via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: Wow, fantastic feedback from lots of people, thanks so much! ... > evilrat: > There is another important d

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-20 Thread Daniel Kozak via Digitalmars-d-learn
On Sat, Jan 20, 2024 at 2:11 PM Renato via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > Wow, fantastic feedback from lots of people, thanks so much! > ... > > > evilrat: > > There is another important difference, i quickly looked up D > >

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-20 Thread Renato via Digitalmars-d-learn
On Saturday, 20 January 2024 at 13:07:39 UTC, Renato wrote: D overhead with the fastest compiler, LDC, compared with Rust: ``` 1.0 1.707627119 1.919527897 1.954595186 1.351342502 1.556217748 ``` Oh sorry, I only posted the rates for the Linux benchmark... On Mac M1, for some reason, D

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-20 Thread Renato via Digitalmars-d-learn
rray fully, you need to do something like this (it's just how hashing works): ```d auto currentHash = ; foreach(item: array) { currentHash = hashOf(item); } ``` But by the structure of the problem, we know that we keep adding items to the `array` and re-computing the hash (in the `printTr

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-20 Thread Siarhei Siamashka via Digitalmars-d-learn
On Saturday, 20 January 2024 at 01:27:50 UTC, H. S. Teoh wrote: On Sat, Jan 20, 2024 at 01:35:44AM +0100, Daniel Kozak via Digitalmars-d-learn wrote: [...] > Try addressing the points I wrote above and see if it makes a > difference. I have tried it (all of it) even before you

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Jan 20, 2024 at 01:35:44AM +0100, Daniel Kozak via Digitalmars-d-learn wrote: [...] >> Try addressing the points I wrote above and see if it makes a >> difference. > >I have tried it (all of it) even before you wrote it here, because >I have comp

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Jan 19, 2024 at 4:44 PM H. S. Teoh via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > Taking a look at this code: > ... > Try addressing the points I wrote above and see if it makes a > difference. > > I have tried it (all of it) even before yo

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread ryuukk_ via Digitalmars-d-learn
On Friday, 19 January 2024 at 17:18:36 UTC, evilrat wrote: On Friday, 19 January 2024 at 16:55:25 UTC, ryuukk_ wrote: You do hash map lookup for every character in D, it's slow, whereas in Rust you do it via pattern matching, java does the same, pattern matching Yet another reason

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread Jordan Wilson via Digitalmars-d-learn
On Friday, 19 January 2024 at 08:57:40 UTC, Renato wrote: Do you know why the whole thread seems to have disappeared?? There's a lot of good stuff in the thread, it would be a huge shame to lose all that! I agree! Thanks for posting your benchmarks, I thought your whole benching setup was

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread evilrat via Digitalmars-d-learn
On Friday, 19 January 2024 at 16:55:25 UTC, ryuukk_ wrote: You do hash map lookup for every character in D, it's slow, whereas in Rust you do it via pattern matching, java does the same, pattern matching Yet another reason to advocate for pattern matching in D and switch as expression

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread ryuukk_ via Digitalmars-d-learn
means it's still faster than your D solution), but the Java version that's equivalent to Rust's implementation is around 3x slower... i.e. it runs at about the same speed as my current fastest numeric algorithm in D as well. Additionally if you comparing D by measuring DMD performance

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 19, 2024 at 01:40:39PM +, Renato via Digitalmars-d-learn wrote: > On Friday, 19 January 2024 at 10:15:57 UTC, evilrat wrote: [...] > > Additionally if you comparing D by measuring DMD performance - > > don't. It is valuable in developing for fast iterations, but it

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-19 Thread Renato via Digitalmars-d-learn
On Friday, 19 January 2024 at 10:15:57 UTC, evilrat wrote: On Friday, 19 January 2024 at 09:08:17 UTC, Renato wrote: I forgot to mention: the Java version is using a Trie... and it consistently beats the Rust numeric algorithm (which means it's still faster than your D solution

<    1   2   3   4   5   6   7   8   9   10   >