Re: Setting import paths - project (dub) and also rdmd or dmd

2022-10-01 Thread David via Digitalmars-d-learn
Thank you Steven and Christian. I had a look at both those methods, creating a local dmd.conf file almost worked but it wasn't a simple modification, I was hoping it would be as simple as just adding the extra path but it seems that I needed to add the whole path from the existing dmd.conf ot

Re: Poste some interesting vibe.d webpages

2022-09-20 Thread David via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 19:34:01 UTC, Alain De Vos wrote: Although the framework is good. There is no community. Or general acceptance. Which is a pitty. Currently I ask myself how to do "sessions" with vibe.d. Hi Alain, I'm new to D and looking at vibe as well but I'm not as far d

Setting import paths - project (dub) and also rdmd or dmd

2022-09-19 Thread David via Digitalmars-d-learn
Hi, New to D (and enjoying the learning..) I've probably missed something obvious but I'm slightly confused with the best way to achieve a simple build. I like to keep my reusable modules in a directory outside of the project directory so I can use them on another project for example. I d

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-17 Thread David via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 15:16:36 UTC, Jacob Carlborg wrote: On Wednesday, 17 March 2021 at 13:52:48 UTC, Guillaume Piolat wrote: On Sunday, 14 March 2021 at 11:33:00 UTC, David wrote: Anyone else done this? Pointers welcome. Sorry for delay. Just add "dflags-osx-ldc": ["-static"],

Re: How do I load dylib (i.e. phobos and druntime for ldc) in Macos sandboxed app?

2021-03-14 Thread David via Digitalmars-d-learn
On Sunday, 14 March 2021 at 11:40:25 UTC, David wrote: This is more a macos thing than a D thing but still relevant. In another thread I was asking about cleaning up a D dylib for using in Excel. Ldc was suggested though first I have to figure out how to make the phobos and druntime loadable fr

How do I load dylib (i.e. phobos and druntime for ldc) in Macos sandboxed app?

2021-03-14 Thread David via Digitalmars-d-learn
This is more a macos thing than a D thing but still relevant. In another thread I was asking about cleaning up a D dylib for using in Excel. Ldc was suggested though first I have to figure out how to make the phobos and druntime loadable from within the sandbox. (I've posted in a new topic as

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-14 Thread David via Digitalmars-d-learn
On Sunday, 14 March 2021 at 01:38:23 UTC, David Skluzacek wrote: On Thursday, 11 March 2021 at 22:10:04 UTC, David wrote: I wasn't aware that object files could be manipulated like the strip manual page - thx for the heads up. With the caveats that the linked post is almost 14 years old, I ca

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-14 Thread David via Digitalmars-d-learn
On Sunday, 14 March 2021 at 00:00:59 UTC, Adam D. Ruppe wrote: On Saturday, 13 March 2021 at 23:41:28 UTC, David wrote: So Excel complains that it can't load my library - presumably because libphobos2 and libdruntime are not in the sandbox.ly You *might* be able to compile with --link-default

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-13 Thread David via Digitalmars-d-learn
On Friday, 12 March 2021 at 00:12:37 UTC, Guillaume Piolat wrote: Create a exports.lst file with: _addDD_D as the only line there. Build with: "lflags-osx-ldc": [ "-exported_symbols_list", "exports.lst", "-dead_strip" ], Thx that's really helpful. I've hit a snag with LDC. After serveral

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-11 Thread David via Digitalmars-d-learn
On Thursday, 11 March 2021 at 18:35:37 UTC, Imperatorn wrote: On Thursday, 11 March 2021 at 17:00:06 UTC, David wrote: On Thursday, 11 March 2021 at 14:49:32 UTC, Imperatorn wrote: On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote: On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn w

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-11 Thread David via Digitalmars-d-learn
On Thursday, 11 March 2021 at 14:49:32 UTC, Imperatorn wrote: On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote: On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote: On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote: I thought it would be fun to convert some old C++/C quant

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-11 Thread David via Digitalmars-d-learn
On Thursday, 11 March 2021 at 14:35:45 UTC, rikki cattermole wrote: Pipe it to grep should work | grep -v "__D2" Thanks - though I'm trying to suppress the symbols being generated in the library. A colleague says it can be done in ldc but not dmd. I'll think I'll try that out.

Re: Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-11 Thread David via Digitalmars-d-learn
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote: On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote: I thought it would be fun to convert some old C++/C quant utils to D. I'm starting with a simple library that I call from vba in Excel on macos: [...] *trigger warning* "v

Is it possible to suppress standard lib and dlang symbols in dylib (macos)

2021-03-11 Thread David via Digitalmars-d-learn
I thought it would be fun to convert some old C++/C quant utils to D. I'm starting with a simple library that I call from vba in Excel on macos: module xlutils; import core.stdc.string : strlen, strcpy; //import std.conv : to; //import std.string : toStringz; import core.stdc.stdlib : malloc,

Re: Memory allocation

2021-02-23 Thread David via Digitalmars-d-learn
On Wednesday, 24 February 2021 at 06:14:58 UTC, Imperatorn wrote: On Tuesday, 23 February 2021 at 19:44:39 UTC, David wrote: Not sure if `learn` is the right topic or not to post this.. I've been going through Bob Nystrom's "Crafting Interpreters" for a bit of fun and over the weekend put toge

Memory allocation

2021-02-23 Thread David via Digitalmars-d-learn
Not sure if `learn` is the right topic or not to post this.. I've been going through Bob Nystrom's "Crafting Interpreters" for a bit of fun and over the weekend put together a toy allocator in D - free and gc not yet done. It's single threaded and unsurprisingly faster than malloc for small ob

Re: do mir modules run in parallell

2019-10-06 Thread David via Digitalmars-d-learn
On Sunday, 6 October 2019 at 05:32:34 UTC, 9il wrote: mir-blas, mir-lapack, and lubeck parallelism depend on system BLAS/LAPACK library (OpenBLAS, Intel MKL, or Accelerate Framework for macos). mir-optim by default single thread but can use TaskPool from D standard library as well as user-def

Re: do mir modules run in parallell

2019-10-05 Thread David via Digitalmars-d-learn
On Saturday, 5 October 2019 at 04:38:34 UTC, 9il wrote: On Friday, 4 October 2019 at 20:32:59 UTC, David wrote: Hi I am wondering if MIR modules run in parallel by default or if I can enforce it by a compiler flag? Thanks David Hey David, Do you mean unittests run in parallel or mir algor

do mir modules run in parallell

2019-10-04 Thread David via Digitalmars-d-learn
Hi I am wondering if MIR modules run in parallel by default or if I can enforce it by a compiler flag? Thanks David

Re: mir.ndslice: assign a vector to a matrix row

2018-12-28 Thread David via Digitalmars-d-learn
On Friday, 28 December 2018 at 08:11:37 UTC, 9il wrote: On Friday, 28 December 2018 at 08:09:09 UTC, 9il wrote: On Thursday, 27 December 2018 at 21:17:48 UTC, David wrote: On Wednesday, 26 December 2018 at 18:59:25 UTC, 9il wrote: [...] great many thanks!! Is there any logic why getting a ro

Re: mir.ndslice: assign a vector to a matrix row

2018-12-27 Thread David via Digitalmars-d-learn
On Wednesday, 26 December 2018 at 18:59:25 UTC, 9il wrote: On Saturday, 15 December 2018 at 19:04:37 UTC, David wrote: Hi I am wondering if it is possible to assign a vector to a row of a matrix? main.d == import mir.ndslice; void main() { auto matrix = slice!double(

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

2018-12-17 Thread David via Digitalmars-d-learn
On Monday, 17 December 2018 at 08:56:07 UTC, Laurent Tréguier wrote: I think that's not possible right now, D-Scanner skips over body functions and unittest blocks to not clutter the tags with potentially lots of local names. A pity; nevertheless many thanks for coming back on it!

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

2018-12-16 Thread David via Digitalmars-d-learn
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 globalEnum1 { A = 1, B = 2 } enum globalEnum2 { C, D } void

mir.ndslice: assign a vector to a matrix row

2018-12-15 Thread David via Digitalmars-d-learn
Hi I am wondering if it is possible to assign a vector to a row of a matrix? main.d == import mir.ndslice; void main() { auto matrix = slice!double(3, 4); matrix[] = 0; matrix.diagonal[] = 1; auto row = matrix[0]; row[3] = 4; assert(matrix[0, 3] == 4); //

Re: working with and installing multiple versions of dmd and D's std-library on linux/ubuntu

2017-01-20 Thread David via Digitalmars-d-learn
Many thanks! dvm works as a dream and I will also give Coedit a try

working with and installing multiple versions of dmd and D's std-library on linux/ubuntu

2017-01-20 Thread David via Digitalmars-d-learn
Hi I am wondering what a good strategy would be to install and work with multiple versions of DMD and the associated standard library on Linux/Ubuntu? The background is that for some features and libraries I need another compiler/std-lib version than for others. So having the opportunity to c

Re: Address of an array

2016-10-27 Thread David via Digitalmars-d-learn
A dynamic array looks something kind of like this: struct DynamicArray(T) { size_t length; T* ptr; } So, if you take the address of a dynamic array, you're basically taking the address of a struct on the stack, whereas the address in ptr is the address in memory where the data is (be

Re: Address of an array

2016-10-27 Thread David via Digitalmars-d-learn
On Thursday, 27 October 2016 at 16:13:34 UTC, David wrote: Hi The pointer (.ptr) of an array is the address of the first array element. But what exactly is the address of the array? And how is it used? auto myArray = [5, 10, 15, 20, 25, 30, 35]; writeln("myArray.ptr: ", myArray.ptr); //

Address of an array

2016-10-27 Thread David via Digitalmars-d-learn
Hi The pointer (.ptr) of an array is the address of the first array element. But what exactly is the address of the array? And how is it used? auto myArray = [5, 10, 15, 20, 25, 30, 35]; writeln("myArray.ptr: ", myArray.ptr); // myArray.ptr: 7FFA95F29000 writeln("&myArray[0]: ", &myArr

Game Development Using D

2016-05-21 Thread David via Digitalmars-d-learn
Hi, I want to try to create a game using D. I'm a complete newbie though (other than having C/C++ experience). Where would I start? Does D have an openGL binding? I am assuming I'll need to leverage a good amount C APIs? Any list of these that would be useful it a game setting? Obviously th

Re: Programming a Game in D? :D

2014-08-31 Thread David via Digitalmars-d-learn
Hi, About 2 month ago I started learning modding for minecraft with the Forge API I was reading through a lot of classes of minecraft and even no it might not seem like, I learned a freking lot about how games work and stuff and improved my programming skill a lot (Yes for Java but also overal

Re: Programming a Game in D? :D

2014-08-02 Thread David via Digitalmars-d-learn
Hi, not too sure if there's still someone reading this post, but i do have another question. So, I heared so much good stuff about D, it's powerfull, fast the syntax is nice, but well, why is D actually not used for common games yet? (I mean I know about some smaller projects, but nothing "big"

Re: Programming a Game in D? :D

2014-05-28 Thread David via Digitalmars-d-learn
On Wednesday, 28 May 2014 at 21:38:07 UTC, Francesco Cattoglio wrote: I'll be honest, perhaps I risk being misunderstood, but the questions you are asking denote a lack of even basic knowledge about the subject, so I really think you should do some good amount of research before even trying t

Re: Programming a Game in D? :D

2014-05-28 Thread David via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 10:13:13 UTC, Szymon Gatner wrote: On Tuesday, 27 May 2014 at 10:03:36 UTC, David wrote: On Saturday, 24 May 2014 at 08:54:53 UTC, ponce wrote: Hi David, Learning programming, learning D and learning 3D are 3 significant endeavours. You might want to begin with htt

Re: Programming a Game in D? :D

2014-05-27 Thread David via Digitalmars-d-learn
On Saturday, 24 May 2014 at 08:54:53 UTC, ponce wrote: Hi David, Learning programming, learning D and learning 3D are 3 significant endeavours. You might want to begin with http://www.basic4gl.net/ which will get you going with 3D, quite a topic in itself. Then learn D regardless :) So, I'

Re: Programming a Game in D? :D

2014-05-24 Thread David via Digitalmars-d-learn
On Saturday, 24 May 2014 at 09:49:30 UTC, evilrat wrote: On Saturday, 24 May 2014 at 09:35:01 UTC, David wrote: On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java b

Re: Programming a Game in D? :D

2014-05-24 Thread David via Digitalmars-d-learn
On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P

Re: Programming a Game in D? :D

2014-05-23 Thread David via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:11:26 UTC, David wrote: Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it says that the exe file of my file doesn't exsist wich

Re: Programming a Game in D? :D

2014-05-23 Thread David via Digitalmars-d-learn
Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it says that the exe file of my file doesn't exsist wich I actully thought I creat by clicking on run? In Ja

Programming a Game in D? :D

2014-05-22 Thread David via Digitalmars-d-learn
Hey, I'm really new to D, and pretty new to programming overall too, But I want to make a 3d Game, (just sth. small). I really like D and want to do it in D, but in the Internet there is no shit about programming a game in D ^^ Is there any engine written in D? For example the CryEngine is for

Re: DMD & Deimos || GDC & Deimos?

2014-04-27 Thread David via Digitalmars-d-learn
Am 26.04.2014 20:18, schrieb Entry: > I'd like to use GLFW from Deimos, but I couldn't get it to work (DMD > said it cannot use libglfw.a) and I've read somewhere that only GDC can > use these DLLs directly (with a D header, but that's still better than > hooking the methods). So do I need GDC for