Re: Unclear about the benefits of D over C++ and Java

2016-01-02 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 2 January 2016 at 11:31:24 UTC, Dibyendu Majumdar wrote: I am a long time observer of D but have never done any coding in D. I have considered using D several times but have ended up either going with C++ or Java. I feel that for someone like me it is not clear what significant

Unclear about the benefits of D over C++ and Java

2016-01-02 Thread Dibyendu Majumdar via Digitalmars-d
Hi, I am a long time observer of D but have never done any coding in D. I have considered using D several times but have ended up either going with C++ or Java. I feel that for someone like me it is not clear what significant advantages D has over C++ or Java to make a switch. I cannot

Re: Unclear about the benefits of D over C++ and Java

2016-01-03 Thread Dibyendu Majumdar via Digitalmars-d
Hi, I am looking to choose between D, Swift and Rust for a project that I am currently coding in C++. So far D seems the alternative but I guess I won't know until I try out a few things. Is this the right forum to ask questions or should questions be sent to another forum? Regards

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 14:40:05 UTC, bachmeier wrote: On Thursday, 14 January 2016 at 13:47:39 UTC, Dibyendu Majumdar wrote: I did find that I had to go through many articles, video presentations etc. to form my conclusions - it would have been nice if there was a single page on the

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 17:04:35 UTC, Ali Çehreli wrote: On 01/14/2016 05:47 AM, Dibyendu Majumdar wrote: > I had to go through many articles, video presentations etc. to > form my conclusions - it would have been nice if there was a > single page on the D website that explained why D

Re: Premake officially gains D support

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote: Perhaps of interest, I have been maintaining D support in Premake for years (as an extension). It was finally merged into mainline... so Premake now officially supports D out-of-the-box. Huzzah! Curious to know if anyone here uses Premake,

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 14:02:58 UTC, Joakim wrote: On Thursday, 14 January 2016 at 13:47:39 UTC, Dibyendu Majumdar wrote: Hi I wrote recently that I am looking at an alternative to C++ for a project currently being coded in C++. I am pleased to say based on preliminary

Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
Hi I wrote recently that I am looking at an alternative to C++ for a project currently being coded in C++. I am pleased to say based on preliminary investigations I have chosen D over Go, Rust, and Swift. I have yet to write a line of D code so I will give you an update after I do some

dmd installation question

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d
Hi I have downloaded and installed DMD on a Windows 10 64-bit machine. When I try to build my app in Visual Studio - I am getting an error: Error: cannot find source code for runtime library file 'object.d' dmd might not be correctly installed. Run 'dmd -man' for installation

Re: dmd installation question

2016-01-15 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar wrote: I have downloaded and installed DMD on a Windows 10 64-bit machine. When I try to build my app in Visual Studio - I am getting an error: Error: cannot find source code for runtime library file 'object.d' dmd might

Re: DMD - issue building shared library

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 17 January 2016 at 19:10:16 UTC, bitwise wrote: On Sunday, 17 January 2016 at 16:10:01 UTC, Dibyendu Majumdar wrote: LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup _DllMainCRTStartup: D shared libs on windows still require a DllMain. If you follow this post

Re: dmd installation question

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 02:10:44 UTC, Brad Anderson wrote: On Saturday, 16 January 2016 at 02:07:13 UTC, Brad Anderson wrote: On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar wrote: [...] Probably this: https://issues.dlang.org/show_bug.cgi?id=15456 I'm going to try

Re: Premake officially gains D support

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Friday, 15 January 2016 at 21:13:22 UTC, Dibyendu Majumdar wrote: On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote: Perhaps of interest, I have been maintaining D support in Premake for years (as an extension). It was finally merged into mainline... so Premake now officially supports D

Re: dmd installation question

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 11:53:07 UTC, Dibyendu Majumdar wrote: Probably this: https://issues.dlang.org/show_bug.cgi?id=15456 I'm going to try to get around to fixing that and making an installer for LDC this weekend. Reading more carefully it may not be the same bug. It seems

Re: dmd installation question

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 17 January 2016 at 03:27:29 UTC, Mike Parker wrote: On Saturday, 16 January 2016 at 22:04:58 UTC, Dibyendu Majumdar wrote: It seems that the sc.ini is modified by the installer - and in doing so it loses the group "Users" assignment so that no one other than the administrator

DMD - issue building shared library

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
Hi I have an existing C shared library that I am trying to link to a D shared library. The D shared library at present only has a binding (extern (C)) definition, nothing else. When I try to create the shared library using the DMD command line I get link errors. Platform is Windows 10

Re: DMD - issue building shared library

2016-01-18 Thread Dibyendu Majumdar via Digitalmars-d
On Monday, 18 January 2016 at 05:58:38 UTC, bitwise wrote: On Sunday, 17 January 2016 at 22:12:44 UTC, Dibyendu Majumdar wrote: Presumably there is no compiler flag to auto generate this? There's no compiler flag, but you can use this:

Re: DMD - issue building shared library

2016-01-18 Thread Dibyendu Majumdar via Digitalmars-d
On Monday, 18 January 2016 at 23:53:45 UTC, Dibyendu Majumdar wrote: Thanks - that worked, but I had to write it this way: import std.c.windows.windows; import core.sys.windows.dll; mixin SimpleDllMain; I noticed that above modules are documented in the library reference so I assume

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 20:33:50 UTC, Dibyendu Majumdar wrote: Another example of what I think ought to be easily accessible is Andrei's response to following: https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why BTW I

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 17:10:34 UTC, Jack Stouffer wrote: On Thursday, 14 January 2016 at 13:47:39 UTC, Dibyendu Majumdar wrote: I did find that I had to go through many articles, video presentations etc. to form my conclusions - it would have been nice if there was a single page on

Re: Choosing D over C++, Go, Rust, Swift

2016-01-14 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 14:35:27 UTC, bachmeier wrote: Are you familiar with https://github.com/dlangscience https://gitter.im/DlangScience/public Thank you for pointing me to above. Regards

Re: Official compiler

2016-02-28 Thread Dibyendu Majumdar via Digitalmars-d
On Friday, 26 February 2016 at 22:20:09 UTC, Walter Bright wrote: I am referring to this thread: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091536.html Thanks for the pointer. If anyone wants to chip in on that thread, feel free! Hi Walter, Should LLVM move to an Apache License

Re: Official compiler

2016-02-26 Thread Dibyendu Majumdar via Digitalmars-d
On Friday, 26 February 2016 at 11:35:04 UTC, Dibyendu Majumdar wrote: On Friday, 26 February 2016 at 06:19:27 UTC, Walter Bright wrote: [...] I recall there was a thread in the LLVM mailing list last year about moving to a different license. So maybe that is on the cards, and the D

Re: Official compiler

2016-02-26 Thread Dibyendu Majumdar via Digitalmars-d
On Friday, 26 February 2016 at 06:19:27 UTC, Walter Bright wrote: I wish LLVM would switch to the Boost license, in particular removing this clause: "Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the

Why do some attributes start with '@' while others done't?

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d
I am puzzled as to why there is @nogc on the one hand and simply nothrow on the other? Why are some attributes prefixed with '@' while others aren't? Regards

Re: Why do some attributes start with '@' while others done't?

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 21 January 2016 at 23:08:07 UTC, Brad Anderson wrote: On Thursday, 21 January 2016 at 23:05:51 UTC, Dibyendu Majumdar wrote: I am puzzled as to why there is @nogc on the one hand and simply nothrow on the other? Why are some attributes prefixed with '@' while others aren't?

Re: Why do some attributes start with '@' while others done't?

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 21 January 2016 at 23:18:16 UTC, tsbockman wrote: A revision of D that wasn't constrained by backwards compatibility would almost certainly either require all attributes to be prefixed by @, or change the grammar such that attribute names could be reused as identifier names

Re: Choosing D over C++, Go, Rust, Swift

2016-01-24 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 14 January 2016 at 13:47:39 UTC, Dibyendu Majumdar wrote: I wrote recently that I am looking at an alternative to C++ for a project currently being coded in C++. I am pleased to say based on preliminary investigations I have chosen D over Go, Rust, and Swift. 1. D appears to

Re: Eclipse OMR project provides a reusable Garbage Collector

2016-12-03 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 3 December 2016 at 06:26:22 UTC, Chris Wright wrote: On Sat, 03 Dec 2016 02:23:13 +, Dibyendu Majumdar wrote: IBM has open sourced the J9 Garbage Collector as part of Eclipse OMR project. Perhaps D could use this. It is claimed that the GC implementation is relatively straight

Re: Eclipse OMR project provides a reusable Garbage Collector

2016-12-03 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 3 December 2016 at 10:29:02 UTC, Dibyendu Majumdar wrote: That said, let's look at the API: omrobjectptr_t OMR_GC_Allocate(OMR_VMThread * omrVMThread, uintptr_t allocationCategory, uintptr_t size, uintptr_t allocateFlags); omrobjectptr_t OMR_GC_AllocateNoGC(OMR_VMThread *

Re: Eclipse OMR project provides a reusable Garbage Collector

2016-12-03 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 3 December 2016 at 02:23:13 UTC, Dibyendu Majumdar wrote: IBM has open sourced the J9 Garbage Collector as part of Eclipse OMR project. Perhaps D could use this. It is claimed that the GC implementation is relatively straight forward to reuse. https://github.com/eclipse/omr

Eclipse OMR project provides a reusable Garbage Collector

2016-12-02 Thread Dibyendu Majumdar via Digitalmars-d
Hi Not sure if I am repeating information already known here - if so I do apologise! IBM has open sourced the J9 Garbage Collector as part of Eclipse OMR project. Perhaps D could use this. It is claimed that the GC implementation is relatively straight forward to reuse.

Re: Eclipse OMR project provides a reusable Garbage Collector

2016-12-02 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 3 December 2016 at 02:23:13 UTC, Dibyendu Majumdar wrote: IBM has open sourced the J9 Garbage Collector as part of Eclipse OMR project. Perhaps D could use this. It is claimed that the GC implementation is relatively straight forward to reuse. https://github.com/eclipse/omr

Re: D future ...

2016-12-20 Thread Dibyendu Majumdar via Digitalmars-d
On Tuesday, 20 December 2016 at 12:43:38 UTC, Andrei Alexandrescu wrote: On 12/20/16 3:41 AM, Benjiro wrote: [snip] Thanks for the rant. Though it was pretty awesome, I too feel the focus was missing in the sense that I'm unclear on what steps we can take to alleviate your pain points. Do

Re: Walter and Andrei and community relationship management

2017-04-07 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 6 April 2017 at 07:24:28 UTC, Nick B wrote: But, it seems that while Walter and Andrei are prepared to put a proposal out on the newsgroup, and then discuss it with the community, and then LATER, if its any good, state they will formally document it into a DIP. For the community,

Re: Fantastic exchange from DConf

2017-05-14 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 14 May 2017 at 01:30:47 UTC, Jack Stouffer wrote: On Sunday, 14 May 2017 at 00:05:56 UTC, Dibyendu Majumdar wrote: (a) Trust the programmer. That's the first and most deadly mistake. Buffer overflows and null pointers alone have caused hundreds of millions of dollars of damages.

Re: Fantastic exchange from DConf

2017-05-15 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 14 May 2017 at 21:01:40 UTC, Jack Stouffer wrote: On Sunday, 14 May 2017 at 10:10:41 UTC, Dibyendu Majumdar wrote: b) If you want to do things that C allows you to do, then Rust is no more safer than C. That's the entire bloody point isn't it? Maybe you shouldn't be doing a lot of

Re: Fantastic exchange from DConf

2017-05-13 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: Walter: I believe memory safety will kill C. Hi, I think that comparing languages like D to C is not appropriate. C is a high level assembler and has different design goals. A useful document to refer to is:

Re: Fantastic exchange from DConf

2017-05-14 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 14 May 2017 at 02:11:36 UTC, bachmeier wrote: On Sunday, 14 May 2017 at 00:05:56 UTC, Dibyendu Majumdar wrote: (a) Trust the programmer. I don't understand this point. C doesn't offer the programmer much to work with. If you trust the programmer, shouldn't that mean you provide

Re: Tiny D suitable for embedded JIT

2018-05-23 Thread Dibyendu Majumdar via Digitalmars-d
On Wednesday, 23 May 2018 at 20:08:53 UTC, Jonathan Marler wrote: I've recently been looking into how QEMU works and it uses something called TCG (Tiny Code Generator). QEMU works by taking code from another platform/cpu and translates it to TCG, which then gets "jitted" to the instructions

Re: Tiny D suitable for embedded JIT

2018-05-24 Thread Dibyendu Majumdar via Digitalmars-d
On Wednesday, 23 May 2018 at 18:49:05 UTC, Dibyendu Majumdar wrote: The ultimate goal is to have JIT library that is small, has fast compilation, and generates reasonable code (i.e. some form of global register allocation). The options I am looking at are a) start from scratch, b) hack LLVM,

Re: Tiny D suitable for embedded JIT

2018-05-24 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 24 May 2018 at 02:39:18 UTC, Joakim wrote: I don't know if this does exactly what you want, but have you seen it? https://forum.dlang.org/thread/bskpxhrqyfkvaqzoo...@forum.dlang.org Hi - thanks I hadn't seen it. It is based on LLVM - I already use LLVM and it isn't a small /

Tiny D suitable for embedded JIT

2018-05-23 Thread Dibyendu Majumdar via Digitalmars-d
Now that D has a better C option I was wondering if it is possible to create a small subset of D that can be used as embedded JIT library. I would like to trim the language to a small subset of D/C - only primitive types and pointers - and remove everything else. The idea is to have a high

Re: Tiny D suitable for embedded JIT

2018-05-29 Thread Dibyendu Majumdar via Digitalmars-d
On Monday, 28 May 2018 at 19:24:58 UTC, MrSmith wrote: You may like the project of a compiler I am doing https://github.com/MrSmith33/tiny_jit TLDR: fully in D. No dependencies. Currently for amd64 + Win64 calling convension. Cool - I will keep an eye on it. Regards

Re: Tiny D suitable for embedded JIT

2018-05-29 Thread Dibyendu Majumdar via Digitalmars-d
On Thursday, 24 May 2018 at 22:14:50 UTC, Jonathan Marler wrote: Sad to hear. Was interested to see if this was feasible. I don't have much experience with the backend but if you're still up for the task, take a look at `dmd/glue.d`. I don't know how much of the glue layer this includes but

Re: Tiny D suitable for embedded JIT

2018-05-31 Thread Dibyendu Majumdar via Digitalmars-d
On Wednesday, 30 May 2018 at 00:05:52 UTC, rikki cattermole wrote: https://github.com/dlang/dmd/blob/master/src/dmd/glue.d Hi - not really as I don't know what this does. In any case my understanding is the interface between the front-end and GDC/LDC is at the level of ASTs. The input is

Re: Maybe D is right about GC after all !

2017-12-30 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 23 December 2017 at 09:10:25 UTC, Walter Bright wrote: On 12/22/2017 7:23 AM, Russel Winder wrote: I think we are now in a world where Rust is the zero cost abstraction language to replace C and C++, except for those who are determined to stay with C++ and evolve it. Maybe it

Re: C's Biggest Mistake on Hacker News

2018-07-28 Thread Dibyendu Majumdar via Digitalmars-d
https://sqlite.org/whyc.html Personally I think D team should try to convince some well known project to switch from C to D. Not many projects are written in C these days though ... but SQLite is amongst the few.

GDC talk at GNU Cauldron 2018

2018-07-30 Thread Dibyendu Majumdar via Digitalmars-d
Hi, Noticed that there is a GDC talk by Iain Buclaw at the GNU Cauldron 2018. Apologies if this is old news. https://gcc.gnu.org/wiki/cauldron2018 Regards Dibyendu

Re: GDC talk at GNU Cauldron 2018

2018-07-31 Thread Dibyendu Majumdar via Digitalmars-d
On Tuesday, 31 July 2018 at 08:47:21 UTC, Iain Buclaw wrote: Noticed that there is a GDC talk by Iain Buclaw at the GNU Cauldron 2018. Apologies if this is old news. https://gcc.gnu.org/wiki/cauldron2018 It's happening in Manchester UK, and attendance is free (just send an email ahead of

Re: GDC talk at GNU Cauldron 2018

2018-07-31 Thread Dibyendu Majumdar via Digitalmars-d
On Tuesday, 31 July 2018 at 08:47:21 UTC, Iain Buclaw wrote: Noticed that there is a GDC talk by Iain Buclaw at the GNU Cauldron 2018. Apologies if this is old news. https://gcc.gnu.org/wiki/cauldron2018 It's happening in Manchester UK, and attendance is free (just send an email ahead of

Re: CMake support for D

2016-01-04 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Monday, 4 January 2016 at 08:28:03 UTC, Luis wrote: I suggest use dub instead of cmake. I did a try to use cmake some time ago (a few years ago, before dub), and was a nightmare to get ir working on GNU/Linux and Windows. With dub , simply works fine with a simple json file. CMake has

CMake support for D

2016-01-03 Thread Dibyendu Majumdar via Digitalmars-d-learn
Does CMake recognise D in the enable_language command? If not is there a workaround? Thanks and Regards Dibyendu

Re: DUB - link error on Windows 10 64-bit

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 17 January 2016 at 03:07:39 UTC, Mike Parker wrote: Have you verified that this is the only DMD installation on your path? Looks like the problem is not in dub - but the fact that a shared library in D requires a DllMain - as described in:

DUB - link error on Windows 10 64-bit

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi I am using DUB on Windows 10 64-bit with DMD. I have simple project with following configuration: { "name": "testing", "description": "A minimal D application.", "copyright": "Copyright © 2016, dibyendu", "authors": ["dibyendu"], "targetType":

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Saturday, 16 January 2016 at 20:50:51 UTC, Robert M. Münch wrote: Check your paths in sc.ini Looks like the D link libraries are not found. Well as far as I can tell they are correct (unchanged from whatever the installer set them to): ; environment for both 32/64 bit [Environment]

Re: Using double value in string template mixin

2016-02-26 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 26 February 2016 at 11:07:28 UTC, BBasile wrote: On Friday, 26 February 2016 at 11:03:43 UTC, Dibyendu Majumdar wrote: How do I use a double value in a mixin template that is generating string? Have you an example of what's failing right now to show ? I am trying something like

Using double value in string template mixin

2016-02-26 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi, How do I use a double value in a mixin template that is generating string? Thanks and Regards Dibyendu

Re: Using double value in string template mixin

2016-02-26 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 26 February 2016 at 11:37:32 UTC, BBasile wrote: Erratum! Actually you can, example: import std.stdio; string foo(double a)() { return "auto value = " ~ a.stringof ~ ";"; } void main(string[] args) { mixin(foo!0.1); writeln(value); // 0.1

Re: Linking C libraries with DMD

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 16:14:40 UTC, jmh530 wrote: I'm trying to understand calling C libraries from D on Windows with DMD. I made a simple example and compiled it with a static library fine (so I've converted the .h file correctly). Then, I compiled with gcc to a shared library

Re: Linking C libraries with DMD

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:09:47 UTC, jmh530 wrote: The -L/LIBPATH:c:\lib gives me an error that OPTLINK : Warning 9: Unknown Option : LIBPATH and then gives the path I put is not found. At least when it's outputting the text, it's combining :C:\lib\yourlib.lib so it seemingly is

Re: Disabling GC in D

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:44:14 UTC, H. S. Teoh wrote: Hi - I want to be sure that my code is not allocating memory via the GC allocator; but when shipping I don't need to disable GC - it is mostly a development check. I want to manage all memory allocation manually via malloc/free.

How to represent struct with trailing array member

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi I have C code where the struct has a trailing array member: struct matrix { int rows; int cols; double data[1]; }; In C code this is allocated dynamically to be variable size. The array is used just as normal. How should this be translated to D? Will D's array access allow data

Disabling GC in D

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
Is there a way to disable GC in D? I am aware of the @nogc qualifier but I would like to completely disable GC for the whole app/library. Regards Dibyendu

Re: Disabling GC in D

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:34:43 UTC, cym13 wrote: Out of curiosity, why would you force not being able to allocate memory? Hi - I want to be sure that my code is not allocating memory via the GC allocator; but when shipping I don't need to disable GC - it is mostly a development

Re: Linking C libraries with DMD

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:23:36 UTC, jmh530 wrote: Thanks. I had been trying to get 32bit code to work. I don't think I did anything special with gcc to compile the dll as 64bit. Anyway, this is what I get when I try it again (stuff in brackets I replaced). C:>dmd -m64 .d

Re: Linking C libraries with DMD

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:49:06 UTC, jmh530 wrote: I'm not trying to created a shared library in D. My goal is to use a shared library from C in D. Right now, I'm working with a simple test case to make sure I could understand it before working with the actual shared library I want

Re: Linking C libraries with DMD

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 21:55:10 UTC, jmh530 wrote: For the latter - on Windows 10 b64-bit - I am using following options for example: -shared -L/LIBPATH:c:\\lib -L//IMPLIB:mylib.lib I'm not having any luck using your options with dmd either (excluding -shared because I don't

Re: Disabling GC in D

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Thursday, 21 January 2016 at 22:15:13 UTC, Chris Wright wrote: Finally, you can use gc_setProxy() with a a GC proxy you create. Have it throw an exception instead of allocating. That means you will get crashes instead of memory leaks if something uses the GC when it shouldn't.

Re: htod question

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote: Counter question: What's so bad about the D std library ? I am trying to create bindings for existing C library so I was trying to use htod for that.

htod question

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
I tried using htod but got errors as it could not handle the std C header files (Visual C++). How do people work around this? Thanks and Regards Dibyendu

Re: htod question

2016-01-21 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar wrote: On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote: Counter question: What's so bad about the D std library ? I am trying to create bindings for existing C library so I was trying to use htod for that. The library

Re: Disabling GC in D

2016-01-22 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 22 January 2016 at 05:15:13 UTC, Mike Parker wrote: On Thursday, 21 January 2016 at 23:06:55 UTC, Dibyendu Majumdar wrote: On Thursday, 21 January 2016 at 22:44:14 UTC, H. S. Teoh wrote: Hi - I want to be sure that my code is not allocating memory via the GC allocator; but when

Shared library question

2016-01-22 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi I am trying to create a simple shared library that exports a D function, but when I try to link to it I get errors such as: error LNK2001: unresolved external symbol _D7xxx12__ModuleInfoZ Here xxx is the module inside the shared library. I am using DMD and MS LINKER (Windows 64-bit) to

Re: How to represent struct with trailing array member

2016-01-22 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 22 January 2016 at 01:53:53 UTC, Chris Wright wrote: On Thu, 21 Jan 2016 21:52:06 +, Dibyendu Majumdar wrote: Hi I have C code where the struct has a trailing array member: struct matrix { int rows; int cols; double data[1]; }; D has bounds checking, which makes this

Re: Shared library question

2016-01-22 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Friday, 22 January 2016 at 22:06:35 UTC, Dibyendu Majumdar wrote: Hi I am trying to create a simple shared library that exports a D function, but when I try to link to it I get errors such as: error LNK2001: unresolved external symbol _D7xxx12__ModuleInfoZ I have uploaded my small

Re: Vision for the first semester of 2016

2016-01-25 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Monday, 25 January 2016 at 02:37:40 UTC, Andrei Alexandrescu wrote: Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei Hi, I am new to D, and having my own language implementation (based off Lua) - therefore I think I can appreciate some of the difficulties around getting

Distribution of D apps

2016-01-20 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi, I am trying to understand the options for distributing a D app to users. My assumption is that only the shared libraries and binaries need to be distributed, and I need to include the D libraries. Is this correct? Thanks and Regards Dibyendu

Example of code with manual memory management

2016-02-19 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi, I am looking for example of types where memory management is manual, and the type supports operator overloading, etc. Grateful if someone could point me to sample example code. Thanks and Regards Dibyendu

Re: Vision document for H1 2017

2017-01-04 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Wednesday, 4 January 2017 at 19:22:33 UTC, Andrei Alexandrescu wrote: We release a brief Vision document summarizing the main goals we plan to pursue in the coming six months. This half we are focusing on three things: safety, lifetime management, and static introspection.

Re: Vision document for H1 2017

2017-01-07 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Saturday, 7 January 2017 at 15:58:43 UTC, Andrei Alexandrescu wrote: On 01/04/2017 08:06 PM, Dibyendu Majumdar wrote: C++ integration has disappeared? Is this now "done"? We have a student on that. I've added a line for that to the doc. -- Andrei Cool. C++ integration would be a big

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 12:00:00 UTC, Basile B. wrote: On Sunday, 12 November 2017 at 11:01:39 UTC, Dibyendu Majumdar wrote: [...] The assembly code uses static allocation of registers, but because of the differences in how registers are used in Win64 versus Unix X64 - different

Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi, I have recently started work on building a VM for Lua (actually a derivative of Lua) in X86-64 assembly. I am using the dynasm tool that is part of LuaJIT. I was wondering whether I could also write this in D's inline assembly perhaps, but there is one aspect that I am not sure how to

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 11:55:23 UTC, Eugene Wissner wrote: On Sunday, 12 November 2017 at 11:01:39 UTC, Dibyendu Majumdar wrote: I have recently started work on building a VM for Lua (actually a derivative of Lua) in X86-64 assembly. I am using the dynasm tool that is part of LuaJIT. I

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 12:32:09 UTC, Basile B. wrote: On Sunday, 12 November 2017 at 12:17:51 UTC, Dibyendu Majumdar wrote: On Sunday, 12 November 2017 at 11:55:23 UTC, Eugene Wissner wrote: [...] Thank you - I probably could use something like this. It is uglier than the simpler

Re: Inline assembly question

2017-11-13 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 22:40:06 UTC, Dibyendu Majumdar wrote: On Sunday, 12 November 2017 at 22:00:58 UTC, Basile B. wrote: no in naked mode you have to save and restore by hand. So how does one manually generate the .pdata and .xdata sections? Are you saying that this is what I

Re: Inline assembly question

2017-11-13 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Monday, 13 November 2017 at 18:40:42 UTC, Basile B. wrote: TBH I wonder if this is not worth a enhancement (or even a DIP) to have in asm blocks a special alias syntax... { asm { version(...) { alias First = RDI; alias Second = RSI;

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 18:48:02 UTC, Eugene Wissner wrote: https://dlang.org/spec/iasm.html#agregate_member_offsets aggregate.member.offsetof[someregister] Sorry I didn't phrase my question accurately. Presumably to use above with the mnemonics I would need additional mixin

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 22:00:58 UTC, Basile B. wrote: On Sunday, 12 November 2017 at 21:27:28 UTC, Dibyendu Majumdar Does the compiler generate appropriate unwind information on Win64? Prsumably if a function is marked 'naked' then it doesn't? yeah about stack frame..., also don't

Re: Inline assembly question

2017-11-12 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 12 November 2017 at 22:24:08 UTC, Basile B. wrote: On Sunday, 12 November 2017 at 22:20:46 UTC, Dibyendu Majumdar wrote: On Sunday, 12 November 2017 at 22:00:58 UTC, Basile B. wrote: On Sunday, 12 November 2017 at 21:27:28 UTC, Dibyendu Majumdar I am not sure I have understood

Re: Add D front-end, libphobos library, and D2 testsuite... to GCC

2018-11-02 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Monday, 29 October 2018 at 03:43:49 UTC, Mike Parker wrote: Congratulations are in order for Iain Buclaw. His efforts have been rewarded in a big way. Last Friday, he got the greenlight to move forward with submitting his changes into GCC:

Re: DConf 2019 Livestream

2019-05-08 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Wednesday, 8 May 2019 at 12:13:18 UTC, Mike Parker wrote: On Wednesday, 8 May 2019 at 10:13:35 UTC, Ethan wrote: Sorry for those of you having difficulties with WebEx. I am able to watch on Webex but I can't rewind back to the morning presentations. Webex allows the recordings to be

Re: DConf 2019 Livestream

2019-05-08 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Wednesday, 8 May 2019 at 07:57:40 UTC, Mike Parker wrote: The venue uses WebEx for livestreaming. All the information is available in this PDF: https://drive.google.com/open?id=1yekllbfOmxHqJNuuWIVeP9vNeROmfp1I Hi, I missed the morning two talks, is there a way to rewind the Webe video?

Re: DConf Invited Keynote Speaker, Formal Call for Submissions & Early-bird Registration

2020-03-04 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Wednesday, 4 March 2020 at 19:07:21 UTC, Mike Parker wrote: It’s possible I didn’t see it. I replied to someone over the weekend. It was a presentation with a duration of something like “30 minutes plus time for questions”. If that wasn’t yours, then I haven’t seen it yet. I’m on the road

Re: DConf Invited Keynote Speaker, Formal Call for Submissions & Early-bird Registration

2020-03-03 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Tuesday, 3 March 2020 at 03:59:30 UTC, Mike Parker wrote: I submitted a talk proposal but did not receive an acknowledgement. Please let me know if you have received the submission. I’m pretty sure I replied to your email. Sometimes emails from soc...@dlang.org get marked as spam. But

Re: DConf Invited Keynote Speaker, Formal Call for Submissions & Early-bird Registration

2020-03-02 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Thursday, 6 February 2020 at 14:19:13 UTC, Mike Parker wrote: I've just published the blog post that serves as the public launch (outside of this community) of early-bird registration and the call for submissions. I'm also very happy that I was able to include the announcement that our

Re: Trying to understand a simple piece of code: dmd barray

2020-03-07 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Saturday, 7 March 2020 at 12:26:32 UTC, drug wrote: I am trying to understand https://github.com/dlang/dmd/blob/master/src/dmd/backend/barray.d. Two questions: 1. What does this mean and why is it needed? line 95: alias array this; This means that `array` can be used instead of `this`

Trying to understand a simple piece of code: dmd barray

2020-03-07 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi, I am trying to understand https://github.com/dlang/dmd/blob/master/src/dmd/backend/barray.d. Two questions: 1. What does this mean and why is it needed? line 95: alias array this; 2. The struct has no property called length - but this is referenced. Where does this come from? Thank

Re: Trying to understand a simple piece of code: dmd barray

2020-03-07 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Saturday, 7 March 2020 at 14:33:29 UTC, Steven Schveighoffer wrote: It's D's version of implicit conversion. You can make the alias this a no-arg function and it will try calling that function. Okay thank you.

Re: Alpine Linux 3.12 Released With D Language Support

2020-05-30 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Saturday, 30 May 2020 at 20:03:30 UTC, Andrei Alexandrescu wrote: https://www.phoronix.com/scan.php?page=news_item=Alpine-Linux-3.12-Released I recently installed Ubuntu 20.04 LTS on Windows 10. $sudo apt info gdc Package: gdc Version: 4:10.0-1ubuntu2 Priority: optional Section:

  1   2   >