Re: D function in a .d file calling printf refuses to link.

2020-10-19 Thread Siemargl via Digitalmars-d-learn
On Sunday, 18 October 2020 at 21:44:10 UTC, WhatMeWorry wrote: module mydll; extern (C): import core.stdc.stdio : printf; export { int addSeven(int a, int b) { //printf("Hello from within my DLL"); return a+b+7; } } The above D code file compiles and links, no

Re: Why filling AA in shared library freezes execution?

2021-01-28 Thread Siemargl via Digitalmars-d-learn
On Thursday, 28 January 2021 at 16:46:40 UTC, frame wrote: On Thursday, 28 January 2021 at 12:42:09 UTC, Siemargl wrote: Update. Something is broken in DLL support in druntime for Win7. I take previous working in Win10 binary and try run it in virtual Windows 7 SP1 x64. Got this You can't

Re: Why filling AA in shared library freezes execution?

2021-01-26 Thread Siemargl via Digitalmars-d-learn
Vitalii, I test your program and it runs without any problem. Consuming about 1Gb RAM at end. But i have а slightly different environment. Win10 1909 x64, DMD32 D Compiler v2.092.1-dirty

Re: Why filling AA in shared library freezes execution?

2021-01-28 Thread Siemargl via Digitalmars-d-learn
On Friday, 29 January 2021 at 00:45:12 UTC, Siemargl wrote: Then i modify program, just removing DLL, copying TestFun() in main module and it runs. Same compiler -m64 target. Ups. Sorry, I just forget copy test_dll.dll inside VM :-) So, program runs in Win7, but hangs after printing i:64511

Re: Why filling AA in shared library freezes execution?

2021-01-28 Thread Siemargl via Digitalmars-d-learn
On Thursday, 28 January 2021 at 12:42:09 UTC, Siemargl wrote: Update. Something is broken in DLL support in druntime for Win7. I take previous working in Win10 binary and try run it in virtual Windows 7 SP1 x64. Got this C:\Proj\dtest>test_dll_exe.exe object.Exception@test_dll_exe.d(7):

Re: Why filling AA in shared library freezes execution?

2021-01-30 Thread Siemargl via Digitalmars-d-learn
On Friday, 29 January 2021 at 10:10:56 UTC, frame wrote: On Friday, 29 January 2021 at 01:23:20 UTC, Siemargl wrote: On Friday, 29 January 2021 at 00:45:12 UTC, Siemargl wrote: Then i modify program, just removing DLL, copying TestFun() in main module and it runs. Same compiler -m64 target.

Re: Why filling AA in shared library freezes execution?

2021-01-30 Thread Siemargl via Digitalmars-d-learn
On Saturday, 30 January 2021 at 19:52:09 UTC, Vitalii wrote: On Friday, 29 January 2021 at 01:23:20 UTC, Siemargl wrote: On Friday, 29 January 2021 at 00:45:12 UTC, Siemargl wrote: Then i modify program, just removing DLL, copying TestFun() in main module and it runs. Same compiler -m64

Re: wanting to try a GUI toolkit: needing some advice on which one to choose

2021-05-30 Thread Siemargl via Digitalmars-d-learn
On Thursday, 27 May 2021 at 01:17:44 UTC, someone wrote: Yes, I know this is a question lacking a straightforward answer. Requirements: - desktop only: forget about support for mobile tablets whatever You forget semi-official DWT https://forum.dlang.org/group/dwt

Re: dlang vs crystal-language

2021-04-30 Thread Siemargl via Digitalmars-d-learn
On Friday, 30 April 2021 at 14:16:16 UTC, Vinod K Chandran wrote: BTW, I wonder to see someone says that they have succeeded in compiling a **tkD** example code. I tried it with no luck. So I gave up that idea. I did this @2014. No problems remembered.

Re: dlang vs crystal-language

2021-04-29 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 28 April 2021 at 22:41:03 UTC, Alain De Vos wrote: What are the strengths and weaknesses comparing the two languages ? I can name a strength of dlang is the working binding to tk and gtk. Crystal is Web-only focused. And Crystal is not popular, even compared to D.

Re: Why filling AA in shared library freezes execution?

2021-01-28 Thread Siemargl via Digitalmars-d-learn
Update. Something is broken in DLL support in druntime for Win7. I take previous working in Win10 binary and try run it in virtual Windows 7 SP1 x64. Got this C:\Proj\dtest>test_dll_exe.exe object.Exception@test_dll_exe.d(7): Enforcement failed 0x0001400013A3

Re: WinUI 3

2021-03-15 Thread Siemargl via Digitalmars-d-learn
On Monday, 15 March 2021 at 16:41:08 UTC, Imperatorn wrote: Could D be used with WinUI 3? https://docs.microsoft.com/en-us/windows/apps/winui/winui3/ Would the win32metadata help? 樂 No need to going in another dead end

Re: Name mangling problem with tiny Windows 10 load-time DLL example

2021-02-28 Thread Siemargl via Digitalmars-d-learn
On Sunday, 28 February 2021 at 18:29:11 UTC, WhatMeWorry wrote: It seems pretty obvious the problem is with name mangling. But how to fix it? fixing int numb = 1; and your example work correct ldc 1.24 / win10 P.S.I'm not recommend using such keywords as 'file', may cross with other

Re: Name mangling problem with tiny Windows 10 load-time DLL example

2021-03-01 Thread Siemargl via Digitalmars-d-learn
On Sunday, 28 February 2021 at 23:00:56 UTC, WhatMeWorry wrote: On Sunday, 28 February 2021 at 22:10:21 UTC, Siemargl wrote: On Sunday, 28 February 2021 at 18:29:11 UTC, WhatMeWorry wrote: It seems pretty obvious the problem is with name mangling. But how to fix it? fixing int numb = 1;

Re: DUB is not working correctly

2021-02-24 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 24 February 2021 at 19:04:02 UTC, Maxim wrote: On Wednesday, 24 February 2021 at 18:52:12 UTC, H. S. Teoh I recently tried that. Even compiler was reinstalled. It didn't help. Just try remove dsfml and all depencies. My void "dub init"? which works { "authors": [

Re: DUB is not working correctly

2021-02-24 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 24 February 2021 at 19:42:05 UTC, Maxim wrote: On Wednesday, 24 February 2021 at 19:35:46 UTC, Siemargl wrote: On Wednesday, 24 February 2021 at 19:18:32 UTC, Siemargl wrote: [...] Yes, i see th error. If in your dub.json change > "targetType": "executable", [...] Tried and

Re: DUB is not working correctly

2021-02-24 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 24 February 2021 at 19:48:10 UTC, Siemargl wrote: On Wednesday, 24 February 2021 at 19:42:05 UTC, Maxim wrote: On Wednesday, 24 February 2021 at 19:35:46 UTC, Siemargl wrote: On Wednesday, 24 February 2021 at 19:18:32 UTC, Siemargl wrote: [...] Yes, i see th error. If in your

Re: DUB is not working correctly

2021-02-24 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 24 February 2021 at 20:10:29 UTC, Siemargl wrote: Works fine on void dub init project, but underscore problem whith dsfml still here I think, its a problem with dsfml project. You can see it in %userprofile%\AppData\Local\dub\packages\dsfml-2.1.1\dsfml There is a build.d

Re: DUB is not working correctly

2021-02-26 Thread Siemargl via Digitalmars-d-learn
On Thursday, 25 February 2021 at 17:38:11 UTC, Maxim wrote: On Thursday, 25 February 2021 at 17:34:29 UTC, Maxim wrote: On Wednesday, 24 February 2021 at 16:13:48 UTC, Maxim wrote: [...] I think, I need to rephrase the question for the present situtation: how can I force DUB to change

Re: DUB is not working correctly

2021-02-25 Thread Siemargl via Digitalmars-d-learn
On Thursday, 25 February 2021 at 12:49:05 UTC, Maxim wrote: Wait, I have just noticed that you said about dub which came with dmd. So, was dub on your computer right after compiler installation or you did you do this manually? Many years DMD come together with dub. Look at dmd2\windows\bin\

Re: D's Continous Changing

2021-03-04 Thread Siemargl via Digitalmars-d-learn
On Friday, 5 March 2021 at 03:32:35 UTC, harakim wrote: I want this almost every week at work. When I run into some trivial statement that I need to know for sure how it works, it's rarely worth it to create a whole new file and make a main method and all that. I just edit and run the entire

Re: tiny alternative to std library

2021-03-02 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 3 March 2021 at 03:52:13 UTC, Anthony Quizon wrote: On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote: Having a library with bare minimum meta programming would help with this I think. I'm willing to pay the cost of safety. Strange, usual D programs builds fast. As a

Re: D's Continous Changing

2021-03-04 Thread Siemargl via Digitalmars-d-learn
On Thursday, 4 March 2021 at 06:43:57 UTC, user1234 wrote: otherwise another solution is to check every two monthes the sanity of your projects. E.g a montly cronjob on a CI service and that uses latest DMD Docker image. If it fails you got an email... It certainly cooler to take 5 mins

Re: tiny alternative to std library

2021-03-03 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote: I test full rebuild of dlang-IDE (20k loc) now for dmd under Update, 20k loc without counting libraries.

Re: tiny alternative to std library

2021-03-03 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 3 March 2021 at 09:02:54 UTC, Anthony wrote: Strange, usual D programs builds fast. What build times do you get? Seems like some other people have similar issues: https://forum.dlang.org/post/pvseqkfkgaopsnhqe...@forum.dlang.org

Re: Visual Studio 2019

2021-03-07 Thread Siemargl via Digitalmars-d-learn
On Sunday, 7 March 2021 at 20:43:22 UTC, Alexey wrote: Does Visual Studio 2019 support D development? If yes, please give me instructions on how to work in this environment. Visual D https://forum.dlang.org/thread/s1kuna$geb$1...@digitalmars.com

Re: tiny alternative to std library

2021-03-05 Thread Siemargl via Digitalmars-d-learn
On Friday, 5 March 2021 at 16:54:48 UTC, Kagamin wrote: On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon wrote: I'm having some success pulling out small bits of code from other libraries and keeping things minimal and c-style-ish. If you're really ok with minimalism, I'm writing

Re: Minimize GC memory footprint

2021-02-06 Thread Siemargl via Digitalmars-d-learn
On Saturday, 6 February 2021 at 11:20:18 UTC, Imperatorn wrote: On Saturday, 6 February 2021 at 09:42:38 UTC, rikki cattermole wrote: On 06/02/2021 3:32 PM, frame wrote: [...] This won't do anything. [...] Don't forget to stdout.flush; Otherwise stuff can get caught in the buffer

Re: Why filling AA in shared library freezes execution?

2021-02-06 Thread Siemargl via Digitalmars-d-learn
On Saturday, 6 February 2021 at 10:44:08 UTC, Siemargl wrote: On Saturday, 30 January 2021 at 20:32:36 UTC, Siemargl wrote: No, this is a deadlock in memory manager. To find roots of problem, needed a debug version of druntime, but i were unsuccesfull to compile it. I make debug vesion of

Re: Why filling AA in shared library freezes execution?

2021-02-06 Thread Siemargl via Digitalmars-d-learn
On Saturday, 30 January 2021 at 20:32:36 UTC, Siemargl wrote: No, this is a deadlock in memory manager. To find roots of problem, needed a debug version of druntime, but i were unsuccesfull to compile it. I make debug vesion of druntime and catch nicer stacktrace. Maybe this can help

Re: Minimize GC memory footprint

2021-02-06 Thread Siemargl via Digitalmars-d-learn
On Saturday, 6 February 2021 at 19:10:14 UTC, Mike Parker wrote: On Saturday, 6 February 2021 at 17:50:18 UTC, frame wrote: On Saturday, 6 February 2021 at 15:45:47 UTC, rikki cattermole wrote: Default settings should work out of the box. If not - it's bad for reputation of the language.

Re: Minimize GC memory footprint

2021-02-06 Thread Siemargl via Digitalmars-d-learn
On Saturday, 6 February 2021 at 19:10:14 UTC, Mike Parker wrote: On Saturday, 6 February 2021 at 17:50:18 UTC, frame wrote: Sorry, i forgot mem leak. Or maybe i incorrect understand Gc counters So log Usage: 698.46 MiB (free 187.42 MiB) / collected: 14

Re: Creating 1000 instances

2021-02-19 Thread Siemargl via Digitalmars-d-learn
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş wrote: Since classes are reference types all instances of files will be the same reference of "new File()", which you probably don't want. Is any differences between x and y definitions? MyClass [] x, y; x = new MyClass[7]; y=

Re: Minimize GC memory footprint

2021-02-13 Thread Siemargl via Digitalmars-d-learn
On Tuesday, 9 February 2021 at 04:05:04 UTC, frame wrote: On Saturday, 6 February 2021 at 20:24:00 UTC, frame wrote: Hmmm.. with -m64 it's reporting 80 MB used, 203 MB are really marked as private bytes. Constant. If I use GC.minimize() it goes up and down and sometimes consumes more than 203

Re: Minimize GC memory footprint

2021-02-13 Thread Siemargl via Digitalmars-d-learn
On Saturday, 13 February 2021 at 19:14:32 UTC, frame wrote: On Saturday, 13 February 2021 at 17:54:53 UTC, Siemargl wrote: And it works too, for 32-bit also =) Consuming about 100MB RAM. Yes, Appender is nice but I had no control about .data since the real property is private so I chose

Re: Why filling AA in shared library freezes execution?

2021-02-13 Thread Siemargl via Digitalmars-d-learn
On Saturday, 6 February 2021 at 15:21:17 UTC, Siemargl wrote: extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0" ]; LDC 1.24 is also affected and rt_options helps

Re: What are (were) the most difficult parts of D?

2022-05-11 Thread Siemargl via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote: What are you stuck at? What was the most difficult features to understand? etc. To make it more meaningful, what is your experience with other languages? Ali When i take old library from a dub or github and cannot compile it

Re: Verbosity in D

2022-08-07 Thread Siemargl via Digitalmars-d-learn
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote: It's clear by working with D that it has the same bad point like Pascal language; the "verbosity". Is there any plans in future to make some shorthanded techniques that clean verbosity from D? In most cases this is a false