Re: What would be the advantage of using D to port some games?

2020-07-20 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 20 July 2020 at 19:49:52 UTC, RegeleIONESCU wrote: Hello! I was wondering why some game related packages/libraries are not being developed anymore or are kind of paused. Fore example the last version of derelict-sdl2 is an alpha from May 2018. Lack of people to develop it, to take

Re: total newbie + IDE

2020-02-09 Thread Laurent Tréguier via Digitalmars-d-learn
On Sunday, 9 February 2020 at 22:10:57 UTC, solnce wrote: No, I understand that and agree - VSCode is impressive and I'll try it, but what is wrong with idea to have a dedicated IDE? At least one. C/C++ has tons of these and many of these are being actively developed, so why D cannot have?

Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-11 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 10 October 2019 at 18:31:25 UTC, Daniel Kozak wrote: What dmd version? https://issues.dlang.org/show_bug.cgi?id=20019 Ah, I should have read this before replying; that's precisely the issue I had.

Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-11 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 10 October 2019 at 18:12:51 UTC, Robert M. Münch wrote: I have two project I want to compile and both times get this error: Undefined symbols for architecture x86_64: "_dyld_enumerate_tlv_storage", referenced from: __d_dyld_getTLSRange in libphobos2.a(osx_tls.o) I'm

Re: DLS server can't install on my pc

2019-05-24 Thread Laurent Tréguier via Digitalmars-d-learn
On Wednesday, 22 May 2019 at 12:59:13 UTC, greatsam4sure wrote: I am having some difficulty installing DLS for dlang 1.16.4 the visual studio code plugin for Dlang on my pc-windows 10 Lenovo laptop ci7. it actually install in my ci3 running windows 10. It says this app can't install on this

Re: DLS server can't install on my pc

2019-05-24 Thread Laurent Tréguier via Digitalmars-d-learn
On Wednesday, 22 May 2019 at 12:59:13 UTC, greatsam4sure wrote: I am having some difficulty installing DLS for dlang 1.16.4 the visual studio code plugin for Dlang on my pc-windows 10 Lenovo laptop ci7. it actually install in my ci3 running windows 10. It says this app can't install on this

Re: a way of approximating "API internal" visibility?

2019-05-18 Thread Laurent Tréguier via Digitalmars-d-learn
On Saturday, 18 May 2019 at 06:23:37 UTC, DanielG wrote: I'm working on a library spread across multiple modules/packages. Sometimes I have symbols that I would like to share between internal packages, but I don't want to make 'public' because then it would be exposed to the client-facing

Re: DCD 0 symbols cached?

2019-04-11 Thread Laurent Tréguier via Digitalmars-d-learn
On Wednesday, 10 April 2019 at 18:39:23 UTC, Tom wrote: Total newbie to D, trying to get it to play nice with Neovim using ncm2-d and DCD. Issue: DCD never caches any symbols even when I point it directly to DMD's include files. Hate to ask for tech support on this forum but it's all I've

Re: Has anyone tried making a QtCreator plugin for D and what is your experience?

2019-01-15 Thread Laurent Tréguier via Digitalmars-d-learn
On Saturday, 12 January 2019 at 20:10:40 UTC, Enjoys Math wrote: On Saturday, 12 January 2019 at 16:09:22 UTC, Laurent Tréguier wrote: On Saturday, 12 January 2019 at 15:16:25 UTC, Laurent Tréguier wrote: QtCreator 4.8.0 introduced support for the LSP last month :

Re: Has anyone tried making a QtCreator plugin for D and what is your experience?

2019-01-12 Thread Laurent Tréguier via Digitalmars-d-learn
On Saturday, 12 January 2019 at 15:16:25 UTC, Laurent Tréguier wrote: QtCreator 4.8.0 introduced support for the LSP last month : https://blog.qt.io/blog/2018/12/06/qt-creator-4-8-0-released I think I'm going to add it to the list of editors to look into and perhaps try to make a plugin for

Re: Has anyone tried making a QtCreator plugin for D and what is your experience?

2019-01-12 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 11 January 2019 at 18:52:14 UTC, Enjoys Math wrote: I'm 5 years an expert at PyQt5 in conjunction with QtCreator-designed widgets. Where D is lacking is a good GUI editor and GUI library support. I am starting by building a python-based project called QDmt = Qt/D manager It

Re: dscanner --ctags: local variables, functions, ... are now shown in vim/neovim Tagbar

2018-12-17 Thread Laurent Tréguier via Digitalmars-d-learn
On Sunday, 16 December 2018 at 09:59:12 UTC, David wrote: I am wondering how I could display (nested) local variables and functions in vim's tagbar (majutsushi/tagbar) using dscanner? So far I only see gloable variables, functions, ... === script.d == import std.stdio; enum

Re: serve-d break on every update of vs code

2018-11-30 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 30 November 2018 at 13:04:37 UTC, greatsam4sure wrote: vs code update every time I am connected to internet. Each time I accept the update my code-d stops to show autocomplete. what is the best way to solve this problem. Just updated today. These are the error report Installing

Re: javascript or typescript

2018-11-05 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote: hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one. I haven't

Re: anyway to set a const object after the fact?

2018-10-30 Thread Laurent Tréguier via Digitalmars-d-learn
On Tuesday, 30 October 2018 at 11:23:48 UTC, aliak wrote: Guess I could do that. But would there be a difference if I just declared the restArgs as non const then? Given the objective is "set this var to point to this thing and not allow it to be set to point to anything else". The

Re: anyway to set a const object after the fact?

2018-10-30 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 29 October 2018 at 21:50:32 UTC, aliak wrote: Hi, so if you have this piece of code: struct C { void f() { string[] others; const string[] restArgs; foreach (i, arg; args) { if (isValidArg(arg)) { restArgs = args[i + 1 .. $]; break; }

Re: Small or big dub packages

2018-10-29 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 29 October 2018 at 11:31:55 UTC, Igor wrote: Can someone tell me what are pros and cons of having multiple extra small dub packages that depend on each other versus one dub package that has a bunch of functionality? Good example for this is dlib (https://github.com/gecko0307/dlib).

Re: Noob question about structs allocation

2018-10-15 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 15 October 2018 at 04:14:24 UTC, IM wrote: What is the effect of calling destroy? - calling the destructor? - deallocating the memory? - both? IIRC, it only calls the destructor, the GC will decide when to deallocate the memory.

Re: Converting a character to upper case in string

2018-09-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 21 September 2018 at 13:32:54 UTC, NX wrote: On Friday, 21 September 2018 at 12:34:12 UTC, Laurent Tréguier wrote: I would probably go for std.utf.decode [1] to get the character and its length in code units, capitalize it, and concatenate the result with the rest of the string.

Re: Converting a character to upper case in string

2018-09-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 21 September 2018 at 13:32:54 UTC, NX wrote: On Friday, 21 September 2018 at 12:34:12 UTC, Laurent Tréguier wrote: I would probably go for std.utf.decode [1] to get the character and its length in code units, capitalize it, and concatenate the result with the rest of the string.

Re: Converting a character to upper case in string

2018-09-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote: How can I properly convert a character, say, first one to upper case in a unicode correct manner? In which code level I should be working on? Grapheme? Or maybe code point is sufficient? There are few phobos functions like

Re: Converting a character to upper case in string

2018-09-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote: How can I properly convert a character, say, first one to upper case in a unicode correct manner? In which code level I should be working on? Grapheme? Or maybe code point is sufficient? There are few phobos functions like

Re: dmd64 on Windows: how?

2018-08-10 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 10 August 2018 at 12:15:55 UTC, Ivan Kazmenko wrote: Hi, How should I set up DMD to be able to `dmd -m64` on Windows nowadays? I usually download the 7z, but it broke when I replaced my Visual Studio with 2017 edition. Now, I tried the current 2.081.1 .exe installer. It didn't

Re: dmd64 on Windows: how?

2018-08-10 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 10 August 2018 at 12:15:55 UTC, Ivan Kazmenko wrote: Hi, How should I set up DMD to be able to `dmd -m64` on Windows nowadays? I usually download the 7z, but it broke when I replaced my Visual Studio with 2017 edition. If you were using another Visual Studio version, since VS

Re: Trying to use the libclang Dub package

2018-07-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 20 July 2018 at 14:03:20 UTC, bachmeier wrote: Yeah, I didn't need the symlink on a different machine with Ubuntu 18.04. After some digging around, I found that I had libclang1-3.9, libclang-dev, and libclang-common-3.9-dev installed. libclang1-3.9 installs libclang.so.1. The one I

Re: Trying to use the libclang Dub package

2018-07-20 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 19 July 2018 at 15:42:02 UTC, bachmeier wrote: Found the problem. The libclang package is looking for /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has libclang.so.1. Creating a symlink in that directory to libclang.so is a solution. Do you have the development

Re: Idiomatic way to add examples to dub package

2018-04-27 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 27 April 2018 at 10:18:53 UTC, drug wrote: dub.selections.json shouldn't be included in case of library because it should be configured at import site. in case of application it has been configured and so dub.selections.json should be included. IMHO. This is the way Rust packages

Re: Is using function() in templates possible at all?

2018-04-12 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 12 April 2018 at 11:53:21 UTC, Alex wrote: On Thursday, 12 April 2018 at 11:17:01 UTC, Laurent Tréguier wrote: If the function is declared with explicit parameter types: There are cool things possible, if the param type is explicitly typed :) ´´´ import std.traits; void

Re: Is using function() in templates possible at all?

2018-04-12 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 12 April 2018 at 00:05:26 UTC, Nicholas Wilson wrote: There is, with template constraints: class SortedList(T, alias comparer) if(is(typeof(comparer(T.init) : int)) { //... } If the function is declared with explicit parameter types: ``` auto list = new

Re: Initializing a class member that is an object

2018-03-30 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 30 March 2018 at 11:14:32 UTC, ketmar wrote: please, make an ER in bugzilla then. 'cause it will be lost here, and with ER we have a chance to eventually do that. Will do.

Re: Initializing a class member that is an object

2018-03-30 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 30 March 2018 at 11:04:59 UTC, ketmar wrote: p.s.: still, it may be nice to warn user about that. 'cause such runtime initializations are really belong to static ctor. dunno, i'm ok both with warning and without it. I simply think a word about it in the docs would be nice, since

Initializing a class member that is an object

2018-03-30 Thread Laurent Tréguier via Digitalmars-d-learn
Coming from a more Java-esque background, I'm used to sometimes initializing class members outside of the constructor : class MyClass { Object member = new Object(); } I've tried using this in D, but I've come to realize it acts very differently. In Java, the `new Object()` will be