Re: Comparison : mysql-native + asdf and hunt-database + asdf

2020-11-07 Thread Andre Pany via Digitalmars-d-learn
On Friday, 6 November 2020 at 04:58:05 UTC, Vino wrote: Hi All, We recently tested the below components and the test results are as below, even though hunt-database is faster than mysql-native it is hard to use this package as it lacks on documentation, non of the example provided in the

Re: Hunt database

2020-11-03 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 3 November 2020 at 18:48:16 UTC, Vino wrote: On Tuesday, 3 November 2020 at 18:14:33 UTC, Andre Pany wrote: [...] Hi Andre, We have also tried to change the connection (con) as dbconnect (con) as below, as per the example provided in the link

Re: Hunt database

2020-11-03 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 3 November 2020 at 14:05:18 UTC, Vino wrote: Hi All, Currently testing Hunt database, and facing an issue as below, hence request your help File : GetConnections.d ### module common.GetConnections; import hunt.database; class Connections { public Database

Re: merging container arrays

2020-11-01 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 1 November 2020 at 05:23:42 UTC, Vino wrote: On Saturday, 31 October 2020 at 15:16:22 UTC, Vino wrote: [...] Hi All, I was able to find a solution using a different approach, the code is in the link https://run.dlang.io/is/Jx4NLw, request your help on to get the value using

Re: Json output to container

2020-10-30 Thread Andre Pany via Digitalmars-d-learn
On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code Code: import asdf: parseJson; import std.algorithm; import std.container.array; import std.stdio: writeln; import std.typecons: Tuple, tuple; void main() { string apidata1 = `{"items": [

Re: vibe.d / experience / feedback

2020-10-17 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 17 October 2020 at 16:35:29 UTC, shamsmehra90 wrote: I could not even find demo code doing a redirect which is the most basic stuff. https://mcdvoicesurvey.onl https://mybk-experience.onl There are 6 examples doing a redirect: https://github.com/vibe-d/vibe.d/search?q=redirect=

Re: Error on dub build - Trying Vibe-d for the first time

2020-10-15 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 15 October 2020 at 14:26:37 UTC, Steven Schveighoffer wrote: On 10/15/20 10:22 AM, Steven Schveighoffer wrote: On 10/15/20 9:55 AM, Andre Pany wrote: I meant this one: https://github.com/vibe-d/eventcore/pull/154 I testing it at the moment, while there still "leaking"

Re: Error on dub build - Trying Vibe-d for the first time

2020-10-15 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 15 October 2020 at 13:17:57 UTC, Steven Schveighoffer wrote: On 10/14/20 2:25 PM, Andre Pany wrote: On Wednesday, 14 October 2020 at 18:08:40 UTC, H. S. Teoh wrote: On Wed, Oct 14, 2020 at 05:30:37PM +, Andre Pany via Digitalmars-d-learn wrote

Re: Error on dub build - Trying Vibe-d for the first time

2020-10-14 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 14 October 2020 at 18:08:40 UTC, H. S. Teoh wrote: On Wed, Oct 14, 2020 at 05:30:37PM +, Andre Pany via Digitalmars-d-learn wrote: On Wednesday, 14 October 2020 at 16:39:39 UTC, Imperatorn wrote: > On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany >

Re: Error on dub build - Trying Vibe-d for the first time

2020-10-14 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 14 October 2020 at 16:39:39 UTC, Imperatorn wrote: On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany wrote: On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues wrote: On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven Schveighoffer wrote: [...] Thank you,

Re: Error on dub build - Trying Vibe-d for the first time

2020-10-14 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues wrote: On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven Schveighoffer wrote: [...] Thank you, Steve! It did work but none of the examples on the Vibe.d page are working with current D version... Some errors I got When

Re: vibe.d / experience / feedback

2020-10-14 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 14 October 2020 at 12:29:24 UTC, Alaindevos wrote: One concept at a time. This is one of the simplest examples in vibe.d. I look for the code for the same functionality but without authentication/login. https://github.com/vibe-d/vibe.d/blob/master/examples/web/source/app.d Where

Re: vibe.d / experience / feedback

2020-10-13 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 13 October 2020 at 17:08:04 UTC, Robert M. Münch wrote: On 13 Oct 2020 at 09:57:14 CEST, "aberba" wrote: D is a great language that is capable of solving any problem easier than what it'll take to do in equivalent languages. Don't get me wrong, D is great, it has a lot of

Re: vibe.d / experience / feedback

2020-10-12 Thread Andre Pany via Digitalmars-d-learn
On Monday, 12 October 2020 at 11:21:40 UTC, Robert M. Münch wrote: On 12 Oct 2020 at 13:13:27 CEST, "Ola Fosheim Grøstad" wrote: Yes, it is a good fit for web services with medium sized code bases. We don't have a lot of "big project" experience with Go yet, but we would use it for a

Re: std.net.curl get json_encode

2020-10-11 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 11 October 2020 at 08:48:16 UTC, Vino wrote: On Friday, 9 October 2020 at 17:50:16 UTC, Andre Pany wrote: [...] Hi Andre, Thank you very much, now we are able to get the data as expected using jv["Name"], now when we try to print all the returned data with Key and Values as

Re: vibe.d / experience / feedback

2020-10-10 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 October 2020 at 16:00:47 UTC, Alaindevos wrote: For a framework to be successful you need at least a minimum of sample code in public domain. For vibe it is none existent. I could not even find demo code doing a redirect which is the most basic stuff. The number of books on a

Re: std.net.curl get json_encode

2020-10-09 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 October 2020 at 05:56:05 UTC, Vino wrote: On Friday, 9 October 2020 at 05:30:34 UTC, ikod wrote: On Friday, 9 October 2020 at 01:45:37 UTC, Vino wrote: On Friday, 2 October 2020 at 23:20:48 UTC, Imperatorn wrote: On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote: Hi All,

Re: Learn D while updating Rosetta code

2020-10-05 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 4 October 2020 at 19:45:29 UTC, Imperatorn wrote: Just a tip to everyone. If you're trying to learn D, you can try to implement some of these missing tasks and update the corresponding page: http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_D In addition you can solve

Re: Dub build failure

2020-10-04 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 4 October 2020 at 18:45:34 UTC, jerome wrote: I am trying to compile a simple lib, and a simple demo using this lib. [...] If I am not wrong there is following issue: in D a package is a folder. Having the package.d file as child of folder source is not correct. Moving the file

Re: dub fetching dependencies for wrong configuration(s)

2020-10-04 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 4 October 2020 at 14:08:24 UTC, Anonymouse wrote: My project depends on the requests dub package, which has two build configurations; one with an extra vibe-d dependency, one without (default). "configurations": [ { "name": "std" }, {

Re: I need "windowsx.d" Someone can send It to me?

2020-09-27 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 27 September 2020 at 07:55:56 UTC, Imperatorn wrote: On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote: I need windowsx.d but for I don't know the reason is not in dmd. Someone that have it can send to me? I don't know convert windowsx.h to windowsx.d You don't want to

How to use isLoggingEnabled?

2020-09-21 Thread Andre Pany via Digitalmars-d-learn
Hi, I am confused by the description of isLoggingEnabled. In my unittest version I want to disable logging and use this command: ``` d sharedLog = new NullLogger(LogLevel.off); ``` If have some stdout writeln coding (to avoid the timestamp / module prefix): ``` d private void

Re: Vibe.d

2020-09-19 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 19 September 2020 at 13:31:35 UTC, Jack wrote: On Saturday, 19 September 2020 at 13:13:56 UTC, Jack wrote: Hi, I am building a webapp using vibe.d which is working well on macOS and Linux. However, when I run it on windows I get: Program exited with code -1073741701 I created a

Re: Vibe.d

2020-09-19 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 19 September 2020 at 17:57:09 UTC, Andre Pany wrote: On Saturday, 19 September 2020 at 13:31:35 UTC, Jack wrote: On Saturday, 19 September 2020 at 13:13:56 UTC, Jack wrote: Hi, I am building a webapp using vibe.d which is working well on macOS and Linux. However, when I run it

Re: Passing string array to C

2020-09-10 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 10 September 2020 at 15:41:17 UTC, Adam D. Ruppe wrote: On Thursday, 10 September 2020 at 14:31:41 UTC, Andre Pany wrote: [...] You messed up the pointers. [...] Fantastic, thank you so much Adam. Kind regards André

Passing string array to C

2020-09-10 Thread Andre Pany via Digitalmars-d-learn
Hi, I have this coding. Function `sample` will later be called from C and should provide access to a string array. I tried to read the string values after the function call and I can access the first string, but for the second string, there is an access violation. Why does it crash? Kind

Re: Named parameters in function call

2020-09-08 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 07:43:05 UTC, Cecil Ward wrote: I can’t remember, do Ada or Modula2 have something like myfunc( x => 100, y => 200, color => blue )[1] which has named parameters that can be passed in any order. [...] I hope we have it this year or next year, as we

Re: dub run subPackage by default

2020-09-01 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 1 September 2020 at 19:38:39 UTC, ParticlePeter wrote: On Tuesday, 1 September 2020 at 14:45:43 UTC, Andre Pany wrote: On Tuesday, 1 September 2020 at 11:45:34 UTC, ParticlePeter wrote: [snip] I have a enhancement for dub in my mind, which would also solve your issue. Similiar

Re: dub run subPackage by default

2020-09-01 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 1 September 2020 at 11:45:34 UTC, ParticlePeter wrote: Hello, I have a targetType sourceLibrary and demonstrate its usage through a subPackage. For the library itself 'dub run' is meaningless, but not for the subPackage. Is there a way to tell dub through dub.sdl or dub.json to

Re: How package Dlang in a standalone portable executable?

2020-09-01 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 1 September 2020 at 01:29:43 UTC, Marcone wrote: I need package Dlang in a standalone portable executable. I need packcages all dependencies, dlls, files, etc in one executable file. Please see here https://p0nce.github.io/d-idioms/#Embed-a-dynamic-library-in-an-executable Kind

Re: D binary io functions

2020-08-30 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 30 August 2020 at 10:02:09 UTC, Arjan wrote: On Sunday, 30 August 2020 at 06:00:20 UTC, Andy Balba wrote: going nuts trying to figure out which D functions will read/write binary files see this blog: http://nomad.uk.net/articles/working-with-files-in-the-d-programming-language.html

Re: How do I statically build a project using DUB?

2020-08-29 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 29 August 2020 at 11:27:28 UTC, Kirill wrote: I need a stand-alone executable that does not require the user to install any libraries on their computer. Everything should be packed into the executable. I understand that I need to statically link all of the libraries I use in my

Re: vibe.d and my first web service

2020-08-23 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 23 August 2020 at 06:41:03 UTC, Pierce Ng wrote: On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote: [...] Recently I too started to look at web frameworks for compiled languages. Currently playing with Free Pascal - fast compiler, several web frameworks to evaluate, and

Re: vibe.d and my first web service

2020-08-20 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote: On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote: [...] After 18 years following DLang, and some disagrees about productivity lacks at the beggining (no IDE, Debugging?, an standard library battle, not a good database

pyd: calling methods using key arguments

2020-08-14 Thread Andre Pany via Digitalmars-d-learn
Hi, I want to call a python method, which can only be called using key arguments. (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs.html#SQS.Client.get_queue_url) I assume pyd is able to pass somehow key arguments to the python method, but I cannot find anything

Re: Leaving a pointer to it on the stack

2020-08-13 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 13 August 2020 at 21:10:57 UTC, Steven Schveighoffer wrote: On 8/13/20 4:51 PM, Andre Pany wrote: [...] So in your real world scenario, a non-D thread/program is calling sample, and it controls the location of *i? If so, then no, you can't depend on D not collecting that data,

Re: Leaving a pointer to it on the stack

2020-08-13 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 13 August 2020 at 20:11:50 UTC, Steven Schveighoffer wrote: On 8/13/20 4:04 PM, Andre Pany wrote: Hi, in the specification https://dlang.org/spec/interfaceToC.html#storage_allocation there is this paragraph: "Leaving a pointer to it on the stack (as a parameter or automatic

Leaving a pointer to it on the stack

2020-08-13 Thread Andre Pany via Digitalmars-d-learn
Hi, in the specification https://dlang.org/spec/interfaceToC.html#storage_allocation there is this paragraph: "Leaving a pointer to it on the stack (as a parameter or automatic variable), as the garbage collector will scan the stack." I have some trouble to understand what does this mean.

Re: dub build to generate different kinds of libs

2020-07-29 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 29 July 2020 at 17:42:20 UTC, jeff thompson wrote: On Wednesday, 29 July 2020 at 13:26:45 UTC, Andre Pany wrote: On Tuesday, 28 July 2020 at 22:10:58 UTC, jeff thompson wrote: On Tuesday, 28 July 2020 at 22:08:14 UTC, Steven Schveighoffer wrote: [...] Thanks Steve!, ya i know

Re: dub build to generate different kinds of libs

2020-07-29 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 28 July 2020 at 22:10:58 UTC, jeff thompson wrote: On Tuesday, 28 July 2020 at 22:08:14 UTC, Steven Schveighoffer wrote: On 7/28/20 5:50 PM, jeff thompson wrote: Hello Im brand new to D (loving it btw!) and have decided to build a largish windows project in the language. First

Re: vibe.d and my first web service

2020-07-18 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote: Hello, I wanted to create simple web service to start learning more about D lang and compare with another languages. I have used "dub init -t vibe.d" to create basic example: import vibe.vibe; void main() { auto settings

Re: getopt: How does arraySep work?

2020-07-16 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 16 July 2020 at 05:03:36 UTC, Jon Degenhardt wrote: On Wednesday, 15 July 2020 at 07:12:35 UTC, Andre Pany wrote: [...] An enhancement is likely to hit some corner-cases involving list termination requiring choices that are not fully generic. Any time a legal list value looks

Re: How import DUB packcages directly and compile with DMD without use dub.exe?

2020-07-16 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 16 July 2020 at 11:06:01 UTC, Marcone wrote: I just want import in file and run with dmd. Execute dub build with verbose output. You will find the info how dub is calling dmd. Kind regards Andre

Re: Question about publishing a useful function I have written

2020-07-15 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 09:31:27 UTC, Cecil Ward wrote: On Tuesday, 14 July 2020 at 23:10:28 UTC, Max Haughton wrote: On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote: I have written something which may or may not be novel and I’m wondering about how to distribute it to as many

Re: getopt: How does arraySep work?

2020-07-15 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 15:48:59 UTC, Andre Pany wrote: On Tuesday, 14 July 2020 at 14:33:47 UTC, Steven Schveighoffer wrote: On 7/14/20 10:22 AM, Steven Schveighoffer wrote: The documentation needs updating, it should say "parameters are added sequentially" or something like that, instead

Re: getopt: How does arraySep work?

2020-07-14 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 14:33:47 UTC, Steven Schveighoffer wrote: On 7/14/20 10:22 AM, Steven Schveighoffer wrote: The documentation needs updating, it should say "parameters are added sequentially" or something like that, instead of "separation by whitespace".

getopt: How does arraySep work?

2020-07-14 Thread Andre Pany via Digitalmars-d-learn
Hi, by reading the documentation of std.getopt I would assume, this is a valid call dmd -run sample.d --modelicalibs a b ``` d import std; void main(string[] args) { string[] modelicaLibs; getopt(args, "modelicalibs", ); assert(modelicaLibs == ["a", "b"]); } ``` but it fails,

Re: unit test that show more than one failure

2020-06-16 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote: I've tired different unit test libraries, but they jump out on errors instead of just adding to failed numbers. I'm thinking like this: ``` @("dummy"); unittset { 0.shouldEqual(0); 1.shouldEqual(2); 2.shouldEqual(3); } ``` Test:

Re: DUB project type support for Emacs Projectile

2020-06-14 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 13 June 2020 at 19:27:53 UTC, Jean-Louis Leroy wrote: On Monday, 18 November 2019 at 23:06:14 UTC, Per Nordlöw wrote: Have anybody written support for DUB project types in Emacs' projectile? See: https://www.projectile.mx/en/latest/projects/#adding-custom-project-types

Re: Alpine support for D

2020-06-10 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 10 June 2020 at 12:59:33 UTC, Jesse Phillips wrote: On Wednesday, 10 June 2020 at 01:06:30 UTC, aberba wrote: On Tuesday, 9 June 2020 at 14:23:34 UTC, Jesse Phillips wrote: I notice that in the new release for Alpine Linux it mentions support for D. I was curious what was meant

Re: Interfacing with C++ std::shared_ptr and std::unique_ptr

2020-06-10 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 10 June 2020 at 08:31:47 UTC, Mathias LANG wrote: On Wednesday, 10 June 2020 at 06:43:24 UTC, Andre Pany wrote: [...] Depending on your needs, it might be trivial. We use this, and it works accross all 3 platforms:

Interfacing with C++ std::shared_ptr and std::unique_ptr

2020-06-10 Thread Andre Pany via Digitalmars-d-learn
Hi, I would like to interface with the library https://github.com/NTNU-IHB/FMI4cpp and have following class definitions in the header file: ``` c++ namespace fmi4cpp { template class fmu_base { public: const std::string guid() const { return

Re: Dub Error Message "Invalid variable: DUB"

2020-06-08 Thread Andre Pany via Digitalmars-d-learn
On Monday, 8 June 2020 at 18:38:17 UTC, Paul Backus wrote: On Monday, 8 June 2020 at 17:55:24 UTC, Andre Pany wrote: I had a second look on the descriptions and from a non native speaker view it sounds correct. But you are right from a native speaker view the wording might be incorrect. If

Re: Dub Error Message "Invalid variable: DUB"

2020-06-08 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 7 June 2020 at 16:54:48 UTC, Paul Backus wrote: On Sunday, 7 June 2020 at 16:26:17 UTC, Andre Pany wrote: On Sunday, 7 June 2020 at 15:37:27 UTC, Paul Backus wrote: On Sunday, 7 June 2020 at 12:52:12 UTC, Andre Pany wrote: I am not sure but $DUB is a variable which could be used

Re: Dub Error Message "Invalid variable: DUB"

2020-06-07 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 7 June 2020 at 15:37:27 UTC, Paul Backus wrote: On Sunday, 7 June 2020 at 12:52:12 UTC, Andre Pany wrote: I am not sure but $DUB is a variable which could be used in dub descriptor file but it isn't an environment variable. $DUB_EXE is an environment variable. Kind regards Andre

Re: Dub Error Message "Invalid variable: DUB"

2020-06-07 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 7 June 2020 at 10:06:14 UTC, Russel Winder wrote: On Sun, 2020-06-07 at 10:24 +0100, Russel Winder wrote: Hi, Why on earth is Dub sending out this error message (Invalid variable: DUB) on GitLab but not on Travis-CI or locally? OK, that was slightly rhetorical, more reasonably,

Re: Dub Error Message "Invalid variable: DUB"

2020-06-07 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 7 June 2020 at 11:21:03 UTC, Jacob Carlborg wrote: On 2020-06-07 11:24, Russel Winder wrote: Hi, Why on earth is Dub sending out this error message (Invalid variable: DUB) on GitLab but not on Travis-CI or locally? OK, that was slightly rhetorical, more reasonably, why is dub

Re: How debugg unittest with visual code + code-d

2020-06-06 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 6 June 2020 at 08:06:02 UTC, Luis wrote: On Friday, 5 June 2020 at 18:13:52 UTC, WebFreak001 wrote: To build before running the debugger, add the following task to your task definitions file (Ctrl-Shift-B): { "label": "dub build", // <-- add a good name here

Re: Win32 DLLs in D

2020-06-05 Thread Andre Pany via Digitalmars-d-learn
On Friday, 5 June 2020 at 18:00:40 UTC, Poyeyo wrote: Hello everyone. I want to create a windows plugin.dll that could be called from rFactor, and I want to try D first, instead of going directly to C++ as the rFactor example. I am trying to wrap my head around this:

Re: Logging best practices

2020-05-30 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 30 May 2020 at 18:17:21 UTC, mw wrote: On Thursday, 25 April 2019 at 10:33:00 UTC, Vladimirs Nordholm wrote: Hello. Is there a current "Best Practices" for logging in D? For the actual logging, I know of `std.experimental.logger`. However, the `experimental` has kept me away

Re: How to pre build vibe-d dub package

2020-05-30 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 30 May 2020 at 00:12:20 UTC, kookman wrote: On Friday, 29 May 2020 at 11:45:24 UTC, Andre Pany wrote: André I do it by defining a configuration “build-deps” in my dub.sdl with target type “none” and then doing the build as two steps in the dockerfile: ``` dockerfile ...

How to pre build vibe-d dub package

2020-05-29 Thread Andre Pany via Digitalmars-d-learn
Hi, I have a docker image in which a vibe-d application is build from source code. Every time a file is changed, unfortunately the whole vibe-d dub packages are retrieved again from dub registry and compiled again (which takes ages). In my app.json I have these dependency declaration: ```

Re: Dub platform probes

2020-05-27 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 27 May 2020 at 04:19:46 UTC, Tim wrote: On Tuesday, 26 May 2020 at 09:17:52 UTC, Andre Pany wrote: Hi, What version of dub do you use? I am not 100 % sure but thought platform probes do not longer write files with recent dub version. Do you use DMD or LDC or GDC? Kind regards

Re: Dub platform probes

2020-05-26 Thread Andre Pany via Digitalmars-d-learn
On Monday, 25 May 2020 at 22:58:54 UTC, Tim wrote: Hi all I end up with a directory flooded with platform probes. How can I make sure that old ones are deleted automatically? Thanks Hi, What version of dub do you use? I am not 100 % sure but thought platform probes do not longer write

Re: undefined reference to 'deflateEnd'

2020-05-18 Thread Andre Pany via Digitalmars-d-learn
On Monday, 18 May 2020 at 06:02:03 UTC, ikod wrote: NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" [...] Thanks a lot. Kind regards André

undefined reference to 'deflateEnd'

2020-05-17 Thread Andre Pany via Digitalmars-d-learn
Hi, I have some issues, the get this program working on ubuntu: ``` Dockerfile FROM ubuntu:focal RUN apt-get update && apt-get upgrade -y \ && apt-get install --no-install-recommends -y build-essential ldc dub zlib1g-dev COPY app.d /tmp/ RUN dub build --single /tmp/app.d -v ``` ```

Re: Can't get dub dustmite to work

2020-04-27 Thread Andre Pany via Digitalmars-d-learn
On Monday, 27 April 2020 at 07:06:03 UTC, Aliak wrote: On Monday, 27 April 2020 at 06:23:08 UTC, Andre Pany wrote: On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote: On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote: [...] I'm sorry I didn't follow. You mean like: "dub

Re: Can't get dub dustmite to work

2020-04-27 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote: On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote: How do you call dub test causing the issue? Maybe there is a difference in the configuration/build type. I'm sorry I didn't follow. You mean like: "dub test" ?? I dont

Re: Can't get dub dustmite to work

2020-04-25 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote: Trying to get dub dustmite to work, but I keep getting "initial test fails" This is the error from a vanilla dub test: ``` result ~wip: building configuration "result-test-unittest"... inout(SumType!(int, FailureContainer))

Re: Can I use dub to build multiple app.d files?

2020-04-21 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 21 April 2020 at 16:14:54 UTC, Selim wrote: Hi there. I have been using dub for a while now -maybe 12 months- but I haven't been able to figure out if you can build multiple app.d files with it. Is it possible to use dub run command to build multiple executables in one shot?

Re: Can a lib file converted to 1 ob file?

2020-04-19 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 19 April 2020 at 10:53:09 UTC, Basile B. wrote: On Sunday, 19 April 2020 at 10:48:04 UTC, Basile B. wrote: This should work if you pass the static library files to the linker. It is exactly its job to select what's used from the archive. So you would have to pass your stuff and

Can a lib file converted to 1 ob file?

2020-04-19 Thread Andre Pany via Digitalmars-d-learn
Hi, My understanding is, a lib file is a collection of multiple obj files. From a delphi app I want to call D coding without using a dll. Delphi does not know the concept of lib files but can link obj files. Linking all single obj files of DRuntime, phobos and my library might be

Re: How user dub packages in dmd without dub.exe ?

2020-04-13 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 12 April 2020 at 17:31:14 UTC, Marcone wrote: On Sunday, 5 April 2020 at 14:19:40 UTC, WebFreak001 wrote: On Sunday, 5 April 2020 at 14:02:19 UTC, Baby Beaker wrote: On Saturday, 4 April 2020 at 21:54:34 UTC, Andre Pany wrote: On Saturday, 4 April 2020 at 20:21:03 UTC, Marcone

Re: How user dub packages in dmd without dub.exe ?

2020-04-04 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 4 April 2020 at 20:21:03 UTC, Marcone wrote: I want import modules from dub packages in my program.d and run using dmd.exe without dub.exe. How can I make it? Becouse when I try to import it says that can not found. Ag the end dub is calling DMD/LDC with some arguments. You can

Re: dub sourceFiles

2020-03-31 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 15:23:48 UTC, Anonymouse wrote: I have a library package that I split up into subpackages, but I'm having to do mental gymnastics to make it only compile the files I want. [...] Vibe-d is using approach 2a. You may have a look here

Re: How to import C/C++ module from D?

2020-03-16 Thread Andre Pany via Digitalmars-d-learn
On Monday, 16 March 2020 at 19:26:29 UTC, Quantium wrote: If it is possible to import C/C++ , module or C/C++ Header from D, how to do it? See example here https://github.com/atilaneves/dpp/files/4158227/dpp.zip Kind regards Andre

Re: std.net.curl.CurlException Couldn't resolve host name on handle

2020-03-13 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 14 March 2020 at 04:24:20 UTC, Vino wrote: On Friday, 13 March 2020 at 18:10:51 UTC, Vino wrote: [...] Hi All, I was able to resolve this issue by upgrading DMD from V88 to V91.0, and now I am getting the below error when i set any of the below options

Re: Using LDC2 on ARM

2020-03-02 Thread Andre Pany via Digitalmars-d-learn
On Monday, 2 March 2020 at 17:45:26 UTC, Severin Teona wrote: Hello, I am working on a project that uses a Raspberry Pi (armv7l) and the latest LDC version I found for this architecture is 1.13.0. Can you help me install the latest version(1.20.0)? Also, I'm having problems using the DPP

Re: Auto-generation of online documentation for my open libraries

2020-02-23 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 23 February 2020 at 17:14:33 UTC, Per Nordlöw wrote: I would like to setup auto-generation of online documentation for my public D libraries residing on Github and Gitlab. What alternatives do I have? If your Dub package is registered on code.dlang.org, this is automatically

Re: 2D matrix operation (subtraction)

2020-02-22 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 22 February 2020 at 08:29:32 UTC, 9il wrote: On Friday, 21 February 2020 at 13:42:24 UTC, Andre Pany wrote: Mir is great and actually I try to rewrite some Python Pandas Dataframe index logic. Maybe mir.series [1] can work for you. Series!(Key*, Value*) - is a pair of two 1D

Re: 2D matrix operation (subtraction)

2020-02-21 Thread Andre Pany via Digitalmars-d-learn
On Friday, 21 February 2020 at 11:53:02 UTC, Ali Çehreli wrote: On 2/21/20 12:51 AM, Andre Pany wrote: Hi, I have a 2D double array and I want to subtract from the first column a value, is this possible with matrix operation in D? ``` void main() {     double[][] data = [[0.0, 1.4], [1.0,

2D matrix operation (subtraction)

2020-02-21 Thread Andre Pany via Digitalmars-d-learn
Hi, I have a 2D double array and I want to subtract from the first column a value, is this possible with matrix operation in D? ``` void main() { double[][] data = [[0.0, 1.4], [1.0, 5.2], [2.0, 0.8]]; // subtract -2.0 from the first column for every value // Expected output

Re: DPP: Linker issue with functions implemented in C header files

2020-02-18 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 18 February 2020 at 08:32:47 UTC, Petar Kirov [ZombineDev] wrote: On Tuesday, 18 February 2020 at 05:41:38 UTC, Andre Pany wrote: Hi, I try to get wrap the "Azure SDK for C" using DPP and have following issue. Functions, which are actually implemented in C header files will cause

DPP: Linker issue with functions implemented in C header files

2020-02-17 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to get wrap the "Azure SDK for C" using DPP and have following issue. Functions, which are actually implemented in C header files will cause linker errors: https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/core/core/inc/az_span.h#L91 Example: AZ_NODISCARD AZ_INLINE az_span

Re: How to get to body of HTTP 500 error with std.net.curl.get()?

2020-02-14 Thread Andre Pany via Digitalmars-d-learn
On Friday, 14 February 2020 at 00:24:27 UTC, Gregor Mückl wrote: Hi! I am trying to write a client for pretty... well... creatively designed web API. The server gives HTTP status 500 replies if the requests are malformed, but the actual error message is hidden in the body of the reply (an

Re: Dynamically calling shared objects from statically build executable allowed

2020-02-11 Thread Andre Pany via Digitalmars-d-learn
On Monday, 10 February 2020 at 19:39:04 UTC, Ernesto Castellotti wrote: On Monday, 10 February 2020 at 19:00:36 UTC, Andre Pany wrote: [...] Static libraries are simple collections of object files, there is no difference between linking a static library or several object files If you

Re: Dynamically calling shared objects from statically build executable allowed

2020-02-10 Thread Andre Pany via Digitalmars-d-learn
On Monday, 10 February 2020 at 13:14:50 UTC, Ernesto Castellotti wrote: On Monday, 10 February 2020 at 04:41:31 UTC, Andre Pany wrote: Is this a bug with LDC and DMD, or is it not allowed to dynamically call a SO from a statically build executable on linux On Unix systems it is not possible

Dynamically calling shared objects from statically build executable allowed

2020-02-09 Thread Andre Pany via Digitalmars-d-learn
Hi, while dynamically calling a shared object from a statically build executable on linux, both LDC and DMD fails with a non-zero code 139. In my productive system the SO is written in C++, for reproduction I wrote a sample SO in D. You can find the example here

Re: dub for lib & app?

2020-02-04 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 4 February 2020 at 09:13:48 UTC, mark wrote: Is it possible to create a dub project that has one library and one or more executables (that use the library)? If so, could someone point me to the docs for this since I couldn't find this in the dub docs? Aside: I'm learning D to

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-01 Thread Andre Pany via Digitalmars-d-learn
On Friday, 31 January 2020 at 11:19:37 UTC, Saurabh Das wrote: I see that DUB has DMD as a library package, but I was not able to understand how to use it. Is it possible to use DMD as a library within a D program to compile a string to machine code and run the compiled code at runtime?

Re: dub dustmite struggles

2020-01-20 Thread Andre Pany via Digitalmars-d-learn
On Monday, 20 January 2020 at 06:48:08 UTC, DanielG wrote: I can't seem to figure out what dub's dustmite command is looking for with its regexes. No matter what I try - no matter how simple - the initial test fails. I am able to run dustmite standalone just fine with the following test

Re: Specify dmd or ldc compiler and version in a json dub file?

2020-01-20 Thread Andre Pany via Digitalmars-d-learn
On Monday, 20 January 2020 at 11:54:43 UTC, Bastiaan Veelo wrote: On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer wrote: I would like to know how to specify dmd or ldc compiler and version in a json dub file. Update: you can at least specify these in the toolchain requirements

Re: DMD docker image

2020-01-18 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 18 January 2020 at 13:58:01 UTC, Jan Hönig wrote: On Friday, 17 January 2020 at 17:31:29 UTC, Andre Pany wrote: If you really need small images, you could switch to Alpine, but MUSL c could lead to headaches ;) There are also the official docker images

Re: DMD docker image

2020-01-17 Thread Andre Pany via Digitalmars-d-learn
On Friday, 17 January 2020 at 16:43:17 UTC, Jan Hönig wrote: I have created a docker image. However the image size is not small (~500MB). I wonder if others have a suitable dockerfile. All i want is to install the current dmd release. Does somebody have something similar? Does somebody need

Re: How to create meson.build with external libs?

2020-01-14 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 14 January 2020 at 09:54:18 UTC, p.shkadzko wrote: [...] May I ask, whether you have tried to use Dub, or is s.th. blocking you from using Dub? Kind regards André

Re: Project setup for DUB

2020-01-01 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 1 January 2020 at 08:37:43 UTC, rikki cattermole wrote: On 01/01/2020 9:11 PM, Ankush Bhardwaj wrote: I am now stuck here not knowing what should I do next or how should I compile. Compile what? You successfully compiled and ran your dub build. Please note the default action is

Re: How to debug in vscode Windows?

2019-12-27 Thread Andre Pany via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:48:50 UTC, cfcd14f496326e429ce03c48650b7966 wrote: Hello. I spent many time to searching for find a solutions. Many posts not clearly or tell like brief. :( I tried "Microsoft C/C++(ms-vscode.cpptools)" and "Native Debug (webfreak.debug )" plugin. And I

Re: What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-26 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 26 December 2019 at 10:15:17 UTC, Ron Tarrant wrote: On Wednesday, 25 December 2019 at 13:32:45 UTC, Mike Parker wrote: For a while, typing in VS Code was clunky compared to Sublime. I gave it a spin every couple of months to see how it was shaping up and eventually I stopped

Re: DUB copyFiles for subPackages

2019-12-17 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 17 December 2019 at 13:03:17 UTC, Dmitriy wrote: { ... "configurations": [ { ... "targetPath": "/build", "copyFiles": [ "/template"

Re: Translating Java into D

2019-11-15 Thread Andre Pany via Digitalmars-d-learn
On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote: On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote: Greetings, Java seems to be almost a subset of D in various ways. No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do

  1   2   3   4   >