Re: How to deploy on GitHub pages

2020-03-31 Thread WebFreak001 via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 12:52:09 UTC, Ahmat wrote: Hi all, I want to use vibe.d for my personal website hosted on Github pages. I am not familiar with vibe.d and I am confused about how to approach this. Any suggestions, ideas ? I will appreciate your help. as Mathias said, GitHub onl

Re: Array fill performance differences between for, foreach, slice

2020-03-31 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-03-31 23:30, data pulverizer wrote: $ dmd fill.d && ./fill You have not enabled optimizations. You should compile with `-O -release -inline` to enable all optimizations. Without optimizations I get numbers like these: Slice: Mean time(usecs): 92.91, Standard Deviation: 49.8002 Fore

Re: Vibe.d navigation

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 10:15 PM, Steven Schveighoffer wrote: I have purposely not made the names of the functions different from page1 and page2 That should have read I have purposely *made* the names different. Sorry if that was confusing. I edited my post a lot and didn't reread before posting. -Stev

Re: Why can meson find hunt-net but not hunt-proton in dependency resolution?

2020-03-31 Thread YD via Digitalmars-d-learn
On Wednesday, 1 April 2020 at 01:56:26 UTC, Heromyth wrote: On Wednesday, 1 April 2020 at 01:21:22 UTC, YD wrote: [...] Sorry for the inconveniences. We are still testing Hunt-AMQP. The problems about dub.json will be fixed soon. Thanks for the reply! BTW is hunt-amqp for AMQP 1.0 only? Bec

Re: Array fill performance differences between for, foreach, slice

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 5:30 PM, data pulverizer wrote: I've observed large differences in timing performance while filling arrays using different methods (for vs foreach vs arr[] = x) and don't know why. I've looked at array.d (https://github.com/dlang/dmd/blob/9792735c82ac997d11d7fe6c3d6c604389b3f5bd/src/

Re: Vibe.d navigation

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 4:43 PM, GreatSam4sure wrote: Thanks for your reply. My problem is that I have two views say page1.dt and page2.dt each are HTML 5 pages with head and body. I want to click a button or a link in page to go page 2 vis-a-vis using webinterface. How do I define the web interface func

Aborting from core/sync/mutex.d(147) Error: pthread_mutex_init failed.

2020-03-31 Thread mitchell via Digitalmars-d-learn
Hello, I've just finished migrating a project from GDC/Makefile to LDC with dub. The program now compiles and runs, and works fine until such time as the following error occurs: Aborting from core/sync/mutex.d(147) Error: pthread_mutex_init failed. out of GDB, the whole text is: Aborting

Re: Why can meson find hunt-net but not hunt-proton in dependency resolution?

2020-03-31 Thread Heromyth via Digitalmars-d-learn
On Wednesday, 1 April 2020 at 01:21:22 UTC, YD wrote: On Tuesday, 31 March 2020 at 19:59:25 UTC, YD wrote: [...] So I found that the issue is that dub.json file in hunt-proton has an entry referring to the parent package with a relative file path in it. When that relative file path is remove

Re: Why can meson find hunt-net but not hunt-proton in dependency resolution?

2020-03-31 Thread YD via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:59:25 UTC, YD wrote: On Tuesday, 31 March 2020 at 19:51:31 UTC, YD wrote: Hi, I am trying to use Meson, and I did the followings to get dub packages: dub fetch hunt-net dub fetch hunt-proton dub build hunt-net dub build hunt-proton when I have this

Re: Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:34:55 UTC, Steven Schveighoffer wrote: On 3/31/20 2:57 PM, GreatSam4sure wrote: [...] I'm not sure what you mean. Vibe has ways to control the route names of the members of your web interface using UDAs, but primarily uses the name of the functions. A nice

Re: Dynamic twodimensial array

2020-03-31 Thread data pulverizer via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 21:39:30 UTC, Quantium wrote: I know that to create a dynamic array: int[] m = new int[a]; where a is a variable. And if I need a twodimensial array, code int[][] m = new int[a][b]; where a and b are variables doesn't work. I used dmd compiler, it says: "Cannot read

Dynamic twodimensial array

2020-03-31 Thread Quantium via Digitalmars-d-learn
I know that to create a dynamic array: int[] m = new int[a]; where a is a variable. And if I need a twodimensial array, code int[][] m = new int[a][b]; where a and b are variables doesn't work. I used dmd compiler, it says: "Cannot read b at compile time" but there is new int, so array should be

Array fill performance differences between for, foreach, slice

2020-03-31 Thread data pulverizer via Digitalmars-d-learn
I've observed large differences in timing performance while filling arrays using different methods (for vs foreach vs arr[] = x) and don't know why. I've looked at array.d (https://github.com/dlang/dmd/blob/9792735c82ac997d11d7fe6c3d6c604389b3f5bd/src/dmd/root/array.d) but I'm still none the wis

Re: Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:34:55 UTC, Steven Schveighoffer wrote: On 3/31/20 2:57 PM, GreatSam4sure wrote: I am playing with the vibe.d for some days now. One thing I am struggling with is move from one page to another using web interface. The naming of the functions and proper navigation

Re: Vibe.d navigation

2020-03-31 Thread JN via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 18:57:51 UTC, GreatSam4sure wrote: I am playing with the vibe.d for some days now. One thing I am struggling with is move from one page to another using web interface. The naming of the functions and proper navigation from one page to another is not clear to me. H

Re: Why can meson find hunt-net but not hunt-proton in dependency resolution?

2020-03-31 Thread YD via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:51:31 UTC, YD wrote: Hi, I am trying to use Meson, and I did the followings to get dub packages: dub fetch hunt-net dub fetch hunt-proton dub build hunt-net dub build hunt-proton when I have this line in my meson.build file: dependency('hunt-net'

Why can meson find hunt-net but not hunt-proton in dependency resolution?

2020-03-31 Thread YD via Digitalmars-d-learn
Hi, I am trying to use Meson, and I did the followings to get dub packages: dub fetch hunt-net dub fetch hunt-proton dub build hunt-net dub build hunt-proton when I have this line in my meson.build file: dependency('hunt-net', method: 'dub') It works fine: Run-time dependen

Re: Vibe.d navigation

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 2:57 PM, GreatSam4sure wrote: I am playing with the vibe.d for some days now. One thing I am struggling with is move from one page to another using web interface. The naming of the functions and proper navigation from one page to another is not clear to me. How to move from one pag

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 https://github.com/vibe-d/vibe

Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
I am playing with the vibe.d for some days now. One thing I am struggling with is move from one page to another using web interface. The naming of the functions and proper navigation from one page to another is not clear to me. How to move from one page to another. I will appreciate any help.

Re: How to deploy on GitHub pages

2020-03-31 Thread Mathias Lang via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 12:52:09 UTC, Ahmat wrote: Hi all, I want to use vibe.d for my personal website hosted on Github pages. I am not familiar with vibe.d and I am confused about how to approach this. Any suggestions, ideas ? I will appreciate your help. You can't. Vibe.d is a serv

dub sourceFiles

2020-03-31 Thread Anonymouse via Digitalmars-d-learn
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. The problem is that even if you specify some `sourceFiles`, it will build everything under the sun inside `sourcePaths`, which defaults to "source" or "s

Re: Allocating an empty non null associative arary

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 9:41 AM, Superstar64 wrote: On Tuesday, 31 March 2020 at 06:51:16 UTC, WebFreak001 wrote: This doesn't only happen with null, you will notice that that function will eventually not add anything if you only add values. This is because by adding values you might reallocate the map at s

Re: Allocating an empty non null associative arary

2020-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/20 2:51 AM, WebFreak001 wrote: On Tuesday, 31 March 2020 at 02:51:11 UTC, Superstar64 wrote: I want to be modify an associative array by reference from another function. However null associative arrays are pass by value. How do I generically create an empty associative array? --- impor

Re: Allocating an empty non null associative arary

2020-03-31 Thread Superstar64 via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 06:51:16 UTC, WebFreak001 wrote: This doesn't only happen with null, you will notice that that function will eventually not add anything if you only add values. This is because by adding values you might reallocate the map at some other place in memory and because i

How to deploy on GitHub pages

2020-03-31 Thread Ahmat via Digitalmars-d-learn
Hi all, I want to use vibe.d for my personal website hosted on Github pages. I am not familiar with vibe.d and I am confused about how to approach this. Any suggestions, ideas ? I will appreciate your help.

Re: linking obj files compiled with LDC2 1.20.0 on Win64

2020-03-31 Thread realhet via Digitalmars-d-learn
On Tuesday, 24 March 2020 at 15:22:19 UTC, Steven Schveighoffer wrote: On 3/24/20 10:28 AM, realhet wrote: On Sunday, 22 March 2020 at 20:20:17 UTC, Steven Schveighoffer If this were Linux, I'd start using nm to search the object files for the symbol that is missing (like search for symbols de

Re: linking obj files compiled with LDC2 1.20.0 on Win64

2020-03-31 Thread realhet via Digitalmars-d-learn
On Thursday, 26 March 2020 at 14:52:36 UTC, Ferhat Kurtulmuş wrote: On Sunday, 22 March 2020 at 18:43:50 UTC, realhet wrote: Hello, I'm try to use the latest LDC2 version: 1.20.0 Previously I used 1.6.0 [...] Try to run the compiler in visual studio command line terminal. I set up the envi

Re: Wired question related with Chinese characters

2020-03-31 Thread walker via Digitalmars-d-learn
On Sunday, 29 March 2020 at 10:36:53 UTC, lovemini wrote: import std.stdio; void main() { version( Windows ) { //直接运行中文显示乱码,原因在于Windows控制台默认编码为 936,而D语言输出utf-8 //可以将控制台编码修改为 utf-8,命令为 "CHCP 65001" //修改后就可以显示中文了 import core.s