Re: Unknown bug disallows growth of dynamic arrays

2021-06-28 Thread frame via Digitalmars-d-learn
On Monday, 28 June 2021 at 21:45:05 UTC, frame wrote: The SpriteLayer.addSprite() method accepts ushort. That's max. 65535. You supply 65_536. Ah I mixed the argumets, forget that. However, your comment //ocd.objects[65_536] may also I hint that you try to access elements that are not

Re: Unknown bug disallows growth of dynamic arrays

2021-06-28 Thread frame via Digitalmars-d-learn
On Monday, 28 June 2021 at 20:55:44 UTC, solidstate1991 wrote: Here's the offending function: https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/sortedlist.d#L38 It causes to throw an exception with `Access violation reading location` and a memory address, int the

Unknown bug disallows growth of dynamic arrays

2021-06-28 Thread solidstate1991 via Digitalmars-d-learn
Here's the offending function: https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/sortedlist.d#L38 It causes to throw an exception with `Access violation reading location` and a memory address, int the function `_d_arraysetlengthT`. Variable `ti` is a TypeInfo_Array,

How to execute a random postgresql-query.

2021-06-28 Thread Alain De Vos via Digitalmars-d-learn
How to execute a random postgresql-query ? With random i mean execute any string as known by postgresql. void myexecutefunction(string string_to_execute){ // Some code to Execute postgre-sq-string } ... void main(){ myexecutefunction("CREATE DATABASE test"); myexecutefunction("CREATE USER

Re: Wrap + add methods?

2021-06-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/28/21 11:53 AM, Paul Backus wrote: On Monday, 28 June 2021 at 15:17:34 UTC, Steven Schveighoffer wrote: I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS

Re: Deploy vibe.d application on Heroku : App not compatible with buildpack

2021-06-28 Thread vnr via Digitalmars-d-learn
On Monday, 28 June 2021 at 16:14:07 UTC, Andre Pany wrote: On Monday, 28 June 2021 at 13:53:05 UTC, vnr wrote: [...] Hi, Heroku is Cloud Foundry? If yes, you can make use of the binary buildpack or deploying your app as container too. Kind regards Andre Thank you :) Via your explanation

Re: Deploy vibe.d application on Heroku : App not compatible with buildpack

2021-06-28 Thread Andre Pany via Digitalmars-d-learn
On Monday, 28 June 2021 at 13:53:05 UTC, vnr wrote: Hello, I'm trying to deploy my vibe.d application to Heroku via the GitHub deployment method, so that I can post the source code to my repo publicly, as well as use it so that Heroku can host it. I followed the instructions from Heroku and

Re: Wrap + add methods?

2021-06-28 Thread Paul Backus via Digitalmars-d-learn
On Monday, 28 June 2021 at 15:17:34 UTC, Steven Schveighoffer wrote: I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS methods. `std.typecons.Proxy` doesn't

Wrap + add methods?

2021-06-28 Thread Steven Schveighoffer via Digitalmars-d-learn
I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS methods. `std.typecons.Proxy` doesn't seem to wrap static methods, and besides, I want to return wrappers if

Deploy vibe.d application on Heroku : App not compatible with buildpack

2021-06-28 Thread vnr via Digitalmars-d-learn
Hello, I'm trying to deploy my vibe.d application to Heroku via the GitHub deployment method, so that I can post the source code to my repo publicly, as well as use it so that Heroku can host it. I followed the instructions from Heroku and the vibe.d build pack, but unfortunately there seems

Re: Are D classes proper reference types?

2021-06-28 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 28 June 2021 at 07:44:25 UTC, Mathias LANG wrote: (the case you are thinking of), but also provides us from making non backward-compatible downstream changes (meaning we can't change it as we see fit if we realize there is potential for optimization). Has this ever happened?

Re: Are D classes proper reference types?

2021-06-28 Thread Mathias LANG via Digitalmars-d-learn
On Monday, 28 June 2021 at 06:13:06 UTC, Ola Fosheim Grøstad wrote: On Sunday, 27 June 2021 at 23:20:38 UTC, Mathias LANG wrote: - It locks us in a position where we depend on an external committee / implementation to define our ABI. Well, that could be an issue, but it is not likely to

Re: Are D classes proper reference types?

2021-06-28 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 28 June 2021 at 06:25:39 UTC, Mike Parker wrote: Slack isn't like our IRC or Discord channels. It's more async like the forums. Thanks for the info, I might look into Slack if it doesn't require me to install anything. If it is an official channel you might consider adding it to

Re: Are D classes proper reference types?

2021-06-28 Thread Mike Parker via Digitalmars-d-learn
On Monday, 28 June 2021 at 06:13:06 UTC, Ola Fosheim Grøstad wrote: I don't have much time for chat, I prefer async communication. Slack isn't like our IRC or Discord channels. It's more async like the forums.

Re: Are D classes proper reference types?

2021-06-28 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 27 June 2021 at 23:20:38 UTC, Mathias LANG wrote: - It locks us in a position where we depend on an external committee / implementation to define our ABI. Well, that could be an issue, but it is not likely to change fast or frequently so I don't think it is a high risk approach.