Re: Noob questions

2019-04-24 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 22:44:17 UTC, 0x10001 wrote: Hello, i've hit some roadblocks while trying to learn D, i'll try to explain each of them below : [...] Regarding question 1, I had the same question some days ago https://forum.dlang.org/thread/akootxwiopsltifwd...@forum.dlang.org

Re: Question regarding readf

2019-04-23 Thread Andre Pany via Digitalmars-d-learn
On Monday, 22 April 2019 at 23:53:59 UTC, Ali Çehreli wrote: On 04/22/2019 03:29 PM, Andre Pany wrote: > I wonder wheter std.stdio is missing a readfln function. Which executes > readln, strips the #10#13 characters and then executes formattedRead. > Does that make sense to you? Makes sense

Re: Future of D language

2019-04-24 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 05:22:35 UTC, Arjunkumar wrote: I am title bit confuse about learning D Lang and is it well good for future point of view. Currently in a market many of language is present, so why people learn D Lang and any site which provide best tutorials for D Lang? For

Re: How would I write a travis-ci file for a Meson Dlang project?

2019-07-16 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 16 July 2019 at 15:07:11 UTC, Mike Brockus wrote: If you never seen Meson before then pick up a camera and take a picture: 樂  https://mesonbuild.com/ Hello, everyone. I started adding continues integration as part of my development cycle and I was wondering how would I write a

Re: How to build a package as application ?

2019-07-02 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 2 July 2019 at 08:50:36 UTC, guiguidu60 wrote: I'm a newbie with D language, and my first problem ever is: I have a hello world program build with DUB on Linux, but the program as marked as "application/x-sharedlib" and not "application/x-executable" (in properties of the file):

Re: How to setup D language with Apache httpd cgi?

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 12:51:09 UTC, Adam D. Ruppe wrote: On Wednesday, 31 July 2019 at 09:09:12 UTC, BoQsc wrote: dependency "arsd-official" version="~>4.0.1" I just changed the thing, so now you will want to use version 4.0.2 and also require the cgi configuration rather

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-16 Thread Andre Pany via Digitalmars-d-learn
On Friday, 16 August 2019 at 11:42:01 UTC, Ron Tarrant wrote: Continuing on with Cairo, this post covers loading and displaying three types of image (including a structured drawing) using two different load-n-display methods. As an extra bonus, you'll see a photo of my cat, Bob, and three of

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:18:23 UTC, Ron Tarrant wrote: On Sunday, 18 August 2019 at 09:28:30 UTC, Andre Pany wrote: II noticed you use an indentation level of 8 spaces. Is this by purpose? As far as I know, 4 spaces is recommended. I only use three in PS Pad, so the extra spaces are

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 17 August 2019 at 23:40:10 UTC, Ron Tarrant wrote: On Friday, 16 August 2019 at 12:58:23 UTC, Andre Pany wrote: This causes some distruction on mobile phone as you have scroll horizontally although it would fit the screen if the source code would start at column 0. That didn't

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 18 August 2019 at 16:34:21 UTC, Ron Tarrant wrote: On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: the indentation level are 8 spaces. Turns out it's settable in CSS. Tab size for quoted code blocks in the blog posts is now set to three. If you could check a few out

Re: How to run the dub bundle with dmd

2019-08-10 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 August 2019 at 14:06:11 UTC, greatsam4sure wrote: On Saturday, 10 August 2019 at 13:46:23 UTC, Andre Pany wrote: On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure wrote: [...] Can you make a screenshot of the popup? Kind regards Andre I have make a screenshot of

Re: How to run the dub bundle with dmd

2019-08-10 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 August 2019 at 14:06:11 UTC, greatsam4sure wrote: On Saturday, 10 August 2019 at 13:46:23 UTC, Andre Pany wrote: On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure wrote: [...] Can you make a screenshot of the popup? Kind regards Andre I have make a screenshot of

Re: How to run the dub bundle with dmd

2019-08-10 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure wrote: I came across the problem recently. I have dub 1.11.0 install on my windows 10 core i7 but does not support the command "dub add package name" since all the packages in dub package register now use this command. I cannot find

Re: How to run the dub bundle with dmd

2019-08-11 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 August 2019 at 16:44:48 UTC, greatsam4sure wrote: On Saturday, 10 August 2019 at 15:42:39 UTC, rikki cattermole wrote: This is a crazy question but is your Windows install 64bit? yes. See the spec below https://ibb.co/M1TwY7W I am currently assuming it is not a general

Adam D. Ruppe's Minigui using example

2019-08-17 Thread Andre Pany via Digitalmars-d-learn
https://forum.dlang.org/post/mumgkqopnsnowcmhi...@forum.dlang.org On Saturday, 16 January 2016 at 03:14:01 UTC, Adam D. Ruppe wrote: On Saturday, 16 January 2016 at 01:27:32 UTC, Andre Polykanine wrote: Does anyone have an actual example of, say, a simple form with a set of radio buttons or

Re: Setting up Dlang Environment

2019-08-17 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 17 August 2019 at 20:42:41 UTC, Mike Brown wrote: Hi All, I've tried installing and setting up Dlang a few times now. I'm struggling to get it reliable and to a decent environment in place. I don't really want to make this thread about specific issues - Id very much like to

Re: How do I execute a sql-file inside D code

2019-08-20 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 20 August 2019 at 11:33:33 UTC, Anders S wrote: I'm creating an application that connect to a database and write data from another application. Now when I start the application I want it to check if the database exists and if not create the database and it's tables. I have

stdin/stdout and flush

2019-08-27 Thread Andre Pany via Digitalmars-d-learn
Hi, I have a small application like this: ---a.d import std; void main() { while(true) { string enemy1 = readln.strip; int dist1 = to!int(readln.strip); string enemy2 = readln.strip; int dist2 = to!int(readln.strip); writeln((dist1 < dist2) ?

Re: stdin/stdout and flush

2019-08-27 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote: On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote: This applications will be called by a second application: import std; void main() { auto p = pipeShell("a", Redirect.all); p.stdin.writeln("e1");

Re: stdin/stdout and flush

2019-08-27 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 27 August 2019 at 21:42:55 UTC, a11e99z wrote: On Tuesday, 27 August 2019 at 21:01:58 UTC, Andre Pany wrote: On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote: On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote: "b" should send data in loop too, then "a" will

How to use xargs to remove whitespaces (Dub executable path)

2019-09-03 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list | xargs But the output always contains a space between target-path and target-name: /home/user/.dub/packages/dscanner-0.8.0/dscanner/bin/ dscanner

Re: Dub importPath and sourcePath variables

2019-08-28 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 00:26:24 UTC, Max wrote: Hello, I am having a problem working with custom build types in Dub. For my project, when I perform a regular build, all of my source code is contained in ./source or ~/.dub/packages/. However, I want to specify a custom build type

Deactivate windows MessageBox dialog on exception

2019-08-28 Thread Andre Pany via Digitalmars-d-learn
Hi, I call another process using function pipeShell and Redirect.all. In case the child process(also D application) throws an exception (str to int conversion exception), the child process shows a message box on windows. I found the source code within DRuntime but I do not see a way to

Re: How to learn Phobos,Phbos hard to used for me.

2019-08-28 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 11:34:27 UTC, lili wrote: Hi: Masters who can write a book for Phbos, the dlang doc not friendly to beginner. There are 2 articles which I really like: http://nomad.uk.net/articles/hidden-treasure-in-the-d-standard-library.html

Re: Deactivate windows MessageBox dialog on exception

2019-08-28 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 13:15:14 UTC, a11e99z wrote: On Wednesday, 28 August 2019 at 12:19:54 UTC, Andre Pany wrote: Hi, I call another process using function pipeShell and Redirect.all. import std; void main() { auto p = pipeShell("a.exe", Redirect.all);

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 06:40:13 UTC, H. S. Teoh wrote: On Wed, Sep 04, 2019 at 05:52:12AM +, Andre Pany via Digitalmars-d-learn wrote: Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 10:34:28 UTC, Sebastiaan Koppe wrote: On Wednesday, 4 September 2019 at 05:52:12 UTC, Andre Pany wrote: Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list | xargs

Throwing from a lambda isn't supported by the compiler

2019-09-09 Thread Andre Pany via Digitalmars-d-learn
Hi, I noticed, that I cannot throw from the lambda expression: Error: expression expected, not throw but have to use the longer syntax () {throw new Exception();} --- void foo(void function() e){} void main() { foo( () => throw new Exception() ); } --- The shorter lambda

Re: Throwing from a lambda isn't supported by the compiler

2019-09-09 Thread Andre Pany via Digitalmars-d-learn
On Monday, 9 September 2019 at 09:37:25 UTC, a11e99z wrote: On Monday, 9 September 2019 at 09:14:08 UTC, Andre Pany wrote: I noticed, that I cannot throw from the lambda expression: Error: expression expected, not throw but have to use the longer syntax () {throw new Exception();} --- void

need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
Hi, following coding is throwing compiler error: need this for name of type string The error disappears if I delete method0. My gut feeling is, this is a compiler bug? --- class C { static this() { getT!(typeof(this))(); } @Foo void method0(){} @Foo("abc") void

Re: need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 11:20:03 UTC, Ali Çehreli wrote: On 09/10/2019 03:32 AM, Andre Pany wrote: > [...] The UDA syntax allows both types and an objects. method0 uses Foo type and method1 uses a Foo object. So, if your API allows both, your code that deals with UDA must

Re: Moving '.dub' build directory outside of project root

2019-09-14 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 14 September 2019 at 14:22:40 UTC, DMan wrote: Dear all, I need to keep the project root clean from build artifact, how I can tell DUB to store the '.dub' directory in a sibling directory of my project root directory? Thank This is currently not possible afaik. What is your

Re: How to setup D language with Apache httpd cgi?

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 10:24:38 UTC, BoQsc wrote: On Wednesday, 31 July 2019 at 09:09:12 UTC, BoQsc wrote: On Wednesday, 31 July 2019 at 09:03:47 UTC, BoQsc wrote: And this is the error I get now: [Wed Jul 31 11:51:15.341790 2019] [cgid:error] [pid 870:tid 140153708345088] [client

Re: How to setup D language with Apache httpd cgi?

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 10:24:38 UTC, BoQsc wrote: On Wednesday, 31 July 2019 at 09:09:12 UTC, BoQsc wrote: On Wednesday, 31 July 2019 at 09:03:47 UTC, BoQsc wrote: And this is the error I get now: [Wed Jul 31 11:51:15.341790 2019] [cgid:error] [pid 870:tid 140153708345088] [client

Re: Is there a way to adjust lookup paths for modules during compilation?

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 20:25:44 UTC, Ali Çehreli wrote: On 07/31/2019 10:29 AM, Andrey Zherikov wrote: I want my program to add some directories into module lookup process (like adding -I dmd options). List of directories is known at compile time but the choice of what exact directories

Re: How to setup D language with Apache httpd cgi?

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 17:04:58 UTC, BoQsc wrote: However I tried to add options (--single) to the dub shebang and apache now throwing: "bad header error" Without "--single" option seems to work. #!/usr/bin/env -vS dub --single /+ dub.sdl: name "application" dependency

Re: Help me decide D or C

2019-07-31 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote: Hi everyone, I would like an honest opinion. I have a beginner level (able to do very small programs) in a few languages such as python, go, C, guile(scheme) and common lisp. I want to pick a language and go deep with it and focus

Re: Dub version

2019-08-09 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 August 2019 at 08:30:49 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 03:52:11 UTC, Andre Pany wrote: On Friday, 9 August 2019 at 01:36:43 UTC, greatsam4sure wrote: On Friday, 9 August 2019 at 01:18:12 UTC, Elronnd wrote: [...] dub fetch dub Fetching dub 1.16.0...

Re: Dub version

2019-08-08 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 August 2019 at 01:36:43 UTC, greatsam4sure wrote: On Friday, 9 August 2019 at 01:18:12 UTC, Elronnd wrote: Dub add is not supported in dub 1.11.0 Use 'dub fetch'. dub fetch dub Fetching dub 1.16.0... Please note that you need to use `dub run ` or add it to dependencies of

Re: Dub version

2019-08-09 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 August 2019 at 12:10:21 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 09:01:54 UTC, Andre Pany wrote: On Friday, 9 August 2019 at 08:30:49 UTC, GreatSam4sure wrote: [...] My assumption is, you have several dub executables on your computer. A recent one, bundled with

Re: Dub version

2019-08-09 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 August 2019 at 13:59:51 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 13:01:51 UTC, Andre Pany wrote: On Friday, 9 August 2019 at 12:10:21 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 09:01:54 UTC, Andre Pany wrote: [...] I am at lost here. Before I can run

Re: Dub version

2019-08-09 Thread Andre Pany via Digitalmars-d-learn
On Friday, 9 August 2019 at 15:41:08 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 14:15:36 UTC, Andre Pany wrote: On Friday, 9 August 2019 at 13:59:51 UTC, GreatSam4sure wrote: On Friday, 9 August 2019 at 13:01:51 UTC, Andre Pany wrote: On Friday, 9 August 2019 at 12:10:21 UTC,

Re: Moving location of dub packages?

2019-07-21 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 20 July 2019 at 12:47:59 UTC, Paul wrote: I'd like to move where dub has stored packages to a shorter path, is there a procedure for this? Thanks in advance! Maybe the custom cache paths could help you here: https://dub.pm/settings.html Kind regards Andre

Re: Moving location of dub packages?

2019-07-21 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 21 July 2019 at 09:20:52 UTC, Andre Pany wrote: On Saturday, 20 July 2019 at 12:47:59 UTC, Paul wrote: I'd like to move where dub has stored packages to a shorter path, is there a procedure for this? Thanks in advance! Maybe the custom cache paths could help you here:

__stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread Andre Pany via Digitalmars-d-learn
Hi, this scripts throws 2 times this error: __stdin.d(2): Error: found End of File when expecting } following compound statement __stdin.d(2): Error: found End of File when expecting } following compound statement ``` #!/bin/bash text=" import std; void main() { while(true) {

Re: __stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 17 July 2019 at 20:02:51 UTC, ag0aep6g wrote: On 17.07.19 21:05, Andre Pany wrote: [...] Check out what `echo $text` prints: import std; void main() { while(true) { string enemy1 = readln().strip; int dist1 = to!int(readln().strip); string enemy2 = readln().strip; int

Re: Moving location of dub packages?

2019-07-21 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 21 July 2019 at 22:45:02 UTC, Paul wrote: On Sunday, 21 July 2019 at 09:42:15 UTC, Andre Pany wrote: On Sunday, 21 July 2019 at 09:20:52 UTC, Andre Pany wrote: On Saturday, 20 July 2019 at 12:47:59 UTC, Paul wrote: [...] Maybe the custom cache paths could help you here:

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-26 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 17:03:51 UTC, Ron Tarrant wrote: On Wednesday, 25 September 2019 at 13:52:48 UTC, bioinfornatics wrote: I think I misunderstood your need but are lo looking for dub tool with its repository https://code.dlang.org/ I don't think so, but I could be wrong. I

Re: Struct initialization has no effect or error?

2019-10-02 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 2 October 2019 at 18:35:39 UTC, mipri wrote: On Wednesday, 2 October 2019 at 17:37:57 UTC, Brett wrote: X y = {3}; works fine. So one has to do x[0] = y; You could initialize x all at once. Complete example: import std.stdio; struct Point { int x, y; string

Re: Dub and gitsubmodules

2019-11-05 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 19:26:54 UTC, user5678 wrote: On Monday, 4 November 2019 at 13:37:47 UTC, Sebastiaan Koppe wrote: Does anyone know a reliable way of having a dub package that contains git submodules and is to be used as a dependency? I am looking for a way to ensure the

Re: CI: Why Travis & Circle

2019-11-14 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 14 November 2019 at 13:47:32 UTC, jmh530 wrote: I'm curious what the typical motivation is for using both Travis CI and Circle CI in a project is. Thanks. With the public availability of Github Actions I highly recommend it if you have open source project on Github. If is free

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

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: PHP to D Conversion

2019-10-21 Thread Andre Pany via Digitalmars-d-learn
On Monday, 21 October 2019 at 15:29:33 UTC, zoujiaqing wrote: On Friday, 18 October 2019 at 06:22:33 UTC, Vino wrote: [...] import hunt.database; class avmtest { private Database db; this() { db = new Database("mysql://testusr:x...@test.srv.com:3910/test"); }

Re: PHP to D Conversion

2019-10-21 Thread Andre Pany via Digitalmars-d-learn
On Monday, 21 October 2019 at 11:36:00 UTC, Vino wrote: On Saturday, 19 October 2019 at 20:40:36 UTC, Boris Carvajal wrote: [...] Hi Boris, [...] Hi, Where do you call avmconnect? Is this.conn null when connection fails? What happens if the query does not contains rows? Kind regards

Re: D for sciencetific scripting / rapid protoryping

2019-10-22 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 08:30:36 UTC, Daniel Kozak wrote: On Tue, Oct 22, 2019 at 10:25 AM Prokop Hapala via Digitalmars-d-learn wrote: ... Also where is RDMD in the equation? I really like the idea run binary programs like: #!/usr/bin/env rdmd import std.stdio; void main(){

Re: PHP to D Conversion

2019-10-18 Thread Andre Pany via Digitalmars-d-learn
On Friday, 18 October 2019 at 09:21:46 UTC, Vino wrote: On Friday, 18 October 2019 at 09:17:24 UTC, Vino wrote: On Friday, 18 October 2019 at 09:11:18 UTC, Vino wrote: [...] App.d import vibe.vibe; import avm.test; void main() { auto settings = new HTTPServerSettings;

Re: Import sources from parent project

2019-10-19 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 19 October 2019 at 18:00:12 UTC, Andrey wrote: Hi, I have got this structure of my project: parentapp dub.json source common.d childapp1 dub.json source app.d somefile.d childapp2 dub.json source

Re: Import sources from parent project

2019-10-20 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 20 October 2019 at 10:04:56 UTC, Andrey wrote: On Saturday, 19 October 2019 at 18:54:28 UTC, Andre Pany wrote: In dub.json of your child apps you need to add a dependency to parentapp. I added via "dependencies" parameter and after got this error: "Detected dependency cycle".

Re: Vibe/Mysql Testing

2019-10-17 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 17 October 2019 at 19:05:44 UTC, Vino wrote: Hi All, Request your help on the below code and error Error: source\app.d(25,15): Error: none of the overloads of writeBody are callable using argument types (VariantN!20LU), candidates are Code: import vibe.vibe; import std.array

Re: Vibe.d Error

2019-10-17 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 17 October 2019 at 10:58:20 UTC, Vino wrote: Hi All, We are planning to migrate our website form Mysql/PHP to Mysql/D using vibe.d , as part of the plan we tried to install the vibe.d (vibe.d 0.8.6 release) and we are facing below issue, we have tried both the version of

Re: What is the extension of ".pdf"

2019-10-05 Thread Andre Pany via Digitalmars-d-learn
On Friday, 4 October 2019 at 20:12:47 UTC, mipri wrote: On Friday, 4 October 2019 at 19:58:16 UTC, Andre Pany wrote: Hi, I try to solve the puzzle https://www.codingame.com/training/easy/mime-type but have some issue because std.path:extension returns null for file name ".pdf" while the

What is the extension of ".pdf"

2019-10-04 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to solve the puzzle https://www.codingame.com/training/easy/mime-type but have some issue because std.path:extension returns null for file name ".pdf" while the puzzle (test case 3) expects that the extension is ".pdf". Is the puzzle wrong or the phobos extension implementation?

Re: What is the recommend tool for D linting from CI pipelines? Does such a tool exist at all?

2019-10-12 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 12 October 2019 at 04:55:02 UTC, Carsten Schlote wrote: Hi, many companies started to use CI pipelines, and as part of their pipelines they introduced mandatory linting for source code. There are tools for many languages, esp. for C/C++. These tools usually return '0' on

Reading parquet files from D

2019-10-14 Thread Andre Pany via Digitalmars-d-learn
Hi, did someone has some info or even an example of reading Parquet files from D? Parquet is part of Arrow (https://github.com/apache/arrow/). It has C and C++ headers. The C headers using GObject Introspection. Maybe that is the reason why they look little bit different than usual C

Re: Reading parquet files from D

2019-10-14 Thread Andre Pany via Digitalmars-d-learn
On Monday, 14 October 2019 at 09:39:11 UTC, Andre Pany wrote: Hi, did someone has some info or even an example of reading Parquet files from D? Parquet is part of Arrow (https://github.com/apache/arrow/). It has C and C++ headers. The C headers using GObject Introspection. Maybe that is

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: 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: 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 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: 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

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: 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

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

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: 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: 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,

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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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-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'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 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?

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: 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é

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

<    1   2   3   4   5   >