What was the reasoning behind this decision?
On 10/14/20 1:15 PM, Jack wrote:
>> auto x = malloc(s)[0..s];
>
https://wiki.dlang.org/Memory_Management#Explicit_Class_Instance_Allocation
Note that 'x' is passed to emplace() at that link and emplace() requires
a slice. That's why the a slice is made from the pointer returned by
On Wednesday, 14 October 2020 at 20:15:39 UTC, Jack wrote:
What's the difference between:
import core.stdc.stdlib : malloc;
auto x = malloc(s)[0..s];
and
auto x = cast(T)malloc(s);
?
I have been using the last but I saw in some code examples,
like this[1] the first being used. What's the
Hi,
Is there a way to make this in a nicer way without the string
mixin?
private auto generateVector(CT, alias fun, T...)(in T args){
static if(anyVector!T){
Vector!(CT, CommonVectorLength!T) res;
static foreach(i; 0..res.length) res[i] = mixin("fun(",
T.length.iota.map!(j =>
On Wednesday, 14 October 2020 at 20:27:10 UTC, Jack wrote:
What was the reasoning behind this decision?
Andrei's std::allocator talk from a few years ago at cppcon
covers this (amongst other things)
What's the difference between:
import core.stdc.stdlib : malloc;
auto x = malloc(s)[0..s];
and
auto x = cast(T)malloc(s);
?
I have been using the last but I saw in some code examples, like
this[1] the first being used. What's the difference? in the first
one bounds checking is performed,
So, it did work...
The problem was on me, I guess.
I was using this example:
https://tour.dlang.org/tour/en/dub/vibe-d
It wasn't working at all...
So I've changed to this one, and it did work.
https://code.dlang.org/packages/vibe-d/0.9.2
I've used the first example, there are some
On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven
Schveighoffer wrote:
On 10/13/20 8:40 PM, Bruno Rodrigues wrote:
So, I tried building a simple hello world with Vibe-d and got
this error
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit
On Wednesday, 14 October 2020 at 12:29:24 UTC, Alaindevos wrote:
One concept at a time.
This is one of the simplest examples in vibe.d.
I look for the code for the same functionality but without
authentication/login.
https://github.com/vibe-d/vibe.d/blob/master/examples/web/source/app.d
Where
One concept at a time.
This is one of the simplest examples in vibe.d.
I look for the code for the same functionality but without
authentication/login.
https://github.com/vibe-d/vibe.d/blob/master/examples/web/source/app.d
Where are the @ lines explained ?
On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues
wrote:
On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven
Schveighoffer wrote:
[...]
Thank you, Steve!
It did work but none of the examples on the Vibe.d page are
working with current D version...
Some errors I got
When
forms.
Is there an example just more functional then skeleton http
server ?
Sending data to the server and back .
On Wed, Oct 14, 2020 at 05:30:37PM +, Andre Pany via Digitalmars-d-learn
wrote:
> On Wednesday, 14 October 2020 at 16:39:39 UTC, Imperatorn wrote:
> > On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany wrote:
[...]
> > > Please add this to your dub.json file:
> > > "versions": [
On Wednesday, 14 October 2020 at 18:08:40 UTC, H. S. Teoh wrote:
On Wed, Oct 14, 2020 at 05:30:37PM +, Andre Pany via
Digitalmars-d-learn wrote:
On Wednesday, 14 October 2020 at 16:39:39 UTC, Imperatorn
wrote:
> On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany
> wrote:
[...]
> >
On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany wrote:
On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues
wrote:
On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven
Schveighoffer wrote:
[...]
Thank you, Steve!
It did work but none of the examples on the Vibe.d page
On Wednesday, 14 October 2020 at 16:39:39 UTC, Imperatorn wrote:
On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany wrote:
On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues
wrote:
On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven
Schveighoffer wrote:
[...]
Thank you,
On Wednesday, 14 October 2020 at 15:27:46 UTC, Andre Pany wrote:
On Wednesday, 14 October 2020 at 13:20:53 UTC, Bruno Rodrigues
wrote:
On Wednesday, 14 October 2020 at 01:32:34 UTC, Steven
Schveighoffer wrote:
[...]
Thank you, Steve!
It did work but none of the examples on the Vibe.d page
On Wednesday, 14 October 2020 at 01:55:13 UTC, Adam D. Ruppe
wrote:
On Wednesday, 14 October 2020 at 01:46:11 UTC, Jack wrote:
extern(C):
int mul(int a, int b) { return a * b;}
mark it `export` as well
and then be sure you are compiling in this module as well, it
must be included on the
19 matches
Mail list logo