Re: How to unit-test a phobos module?

2020-11-27 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 27 November 2020 at 04:08:33 UTC, Q. Schroll wrote: I think using digger in principle works and I assume the problems I got aren't Digger's fault, but ae's. Building DMD + DRuntime failed. Sorry about this. It was caused by a breaking change in Druntime's build script: https://gi

lambda recursion

2020-11-27 Thread ddcovery via Digitalmars-d-learn
I want to express in D the known Haskell qsort 3 lines code (it is not a quick sort, but an example of how functional programming is expressive). This is the "javascript" version I use as reference: const sorted = ( [pivot, …others] ) => pivot===void 0 ? [ ] : [ … sorted( others.fi

Re: lambda recursion

2020-11-27 Thread ddcovery via Digitalmars-d-learn
On Friday, 27 November 2020 at 16:40:43 UTC, ddcovery wrote: ... * Can the lambda be transformed to a template (using T instead "int") but avoiding function/return syntax? This is an example using function template qs(T){ T[] qs( T[] items ){ return items.length==0 ? items

Re: vibe.d and my first web service

2020-11-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/12/20 9:46 AM, James Blachly wrote: On 7/18/20 8:16 AM, Andre Pany wrote: On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote: >> ... I started the program with "dub" command and everything worked as I expected. Except that there were a lot "deprecation" warnings and long time t

Questions about D

2020-11-27 Thread Walter via Digitalmars-d-learn
Hi, I have some questions to ask regarding D: 1) Should I learn D ? 2) Can I cross-compile D programs? 3) Is it a low-level language? 4) Which type of applications is D most used in? 5) Is it fast and not bloated with useless features?

Re: Questions about D

2020-11-27 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Friday, 27 November 2020 at 19:34:41 UTC, Walter wrote: Hi, I have some questions to ask regarding D: 1) Should I learn D ? Why not? What are you looking for? 2) Can I cross-compile D programs? You should be able to with ldc/gdc if you have some experience. 3) Is it a low-level langua

Re: Questions about D

2020-11-27 Thread Walter via Digitalmars-d-learn
On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim Grostad wrote: Why not? What are you looking for? I'm looking for a general purpose which I can use everywhere

Re: Questions about D

2020-11-27 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Friday, 27 November 2020 at 19:56:38 UTC, Walter wrote: On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim Grostad wrote: Why not? What are you looking for? I'm looking for a general purpose which I can use everywhere It is fairly general, but I don't think it is the best option for

Re: Questions about D

2020-11-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/27/20 2:56 PM, Walter wrote: On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim Grostad wrote: Why not? What are you looking for? I'm looking for a general purpose which I can use everywhere Depends on how you define "everywhere". If you mean can it be used in all manner of purpo

Re: Automatic update system

2020-11-27 Thread aberba via Digitalmars-d-learn
On Friday, 27 November 2020 at 20:00:22 UTC, aberba wrote: On Thursday, 26 November 2020 at 12:13:59 UTC, vnr wrote: On Linux, both Flatpak and Snap all provide suck functionality. Such* was what I meant 😁. On Flatpak, it's not really a pure auto-update...but users get to up update from t

Re: Automatic update system

2020-11-27 Thread aberba via Digitalmars-d-learn
On Thursday, 26 November 2020 at 12:13:59 UTC, vnr wrote: Hello, I have a program written in D which is open-source on GitHub. I would appreciate it if, when I release a new version, users would be notified by the program and that it offers an automatic update, i.e. the user doesn't have to r

Re: How to unit-test a phobos module?

2020-11-27 Thread aberba via Digitalmars-d-learn
On Friday, 27 November 2020 at 04:08:33 UTC, Q. Schroll wrote: On Thursday, 26 November 2020 at 05:29:16 UTC, Mike Parker wrote: Tomorrow, I'll try setting up a dual boot and give it a shot there. (Not the dub experience but following https://wiki.dlang.org/Building_under_Posix) Have you h

Re: lambda recursion

2020-11-27 Thread Ali Çehreli via Digitalmars-d-learn
On 11/27/20 9:01 AM, ddcovery wrote: On Friday, 27 November 2020 at 16:40:43 UTC, ddcovery wrote: ... * Can the lambda be transformed to a template (using T instead "int") but avoiding function/return syntax? This is an example using function   template qs(T){     T[] qs( T[] items ){