On Sunday, 24 October 2021 at 05:54:43 UTC, data pulverizer wrote:
Actually it's more complicated than that. On construction I do
need to call `protect` and call `unprotect` or `unprotect_ptr`
when the function in which the object is created returns. At
the moment, I'm not even sure (or more l
On Saturday, 23 October 2021 at 17:42:32 UTC, data pulverizer
wrote:
On Saturday, 23 October 2021 at 16:39:08 UTC, data pulverizer
wrote:
```
...
this(R_xlen_t n)
{
SEXPTYPE _real_ = SEXPTYPE.REALSXP;
_data = protect(allocVector(_real_, n));
unprotect(1);
}
...
```
Looking at t
I'd like that to some friends getting start with programming.
Sadly that platform doesn't support D.
On Saturday, 23 October 2021 at 20:14:25 UTC, solidstate1991
wrote:
If I wanted to check whether the assigned value is within a
range, and I want to throw a certain exception if outside of
it, then how I can do that?
You can't with ref, you will need to do separate getter and
setter propertie
On Saturday, 23 October 2021 at 19:52:19 UTC, Simon wrote:
Thanks for putting up with me! I tried a bunch and it seems
like I left out too much code, because I can't get it working
100%. I didn't even know about the q{} syntax, so I didn't
think the stuff I left out would matter, but when usi
Let's say I have something like this:
```
struct Foo {
int[] bar;
this() {
bar.length = 10;
}
ref int opIndex(size_t i) {
return bar[i];
}
}
void main() {
Foo f = Foo();
f[3] = 15;
}
```
If I wanted to check whether the assigned value is within a
rang
On Saturday, 23 October 2021 at 18:23:47 UTC, Simon wrote:
For debugging purposes, I have built a mixin that will, when
declared inside a function, output code to the console that
will reproduce the exact function call.
Sounds like what you really want is
https://github.com/dlang/dmd/pull/130
On Saturday, 23 October 2021 at 19:03:41 UTC, Tim wrote:
On Saturday, 23 October 2021 at 18:56:48 UTC, Simon wrote:
And I tried to use your suggestion like this:
enum OUTPUT_REPRO_CASE(alias func = __traits(parent, {})) =
"build the actual code stuff with"~fullyQualifiedName!func~"
and so on"
On Saturday, 23 October 2021 at 18:56:48 UTC, Simon wrote:
And I tried to use your suggestion like this:
enum OUTPUT_REPRO_CASE(alias func = __traits(parent, {})) =
"build the actual code stuff with"~fullyQualifiedName!func~"
and so on";
Which doesn't work. In that case func seems to become
On Saturday, 23 October 2021 at 18:36:27 UTC, Tim wrote:
On Saturday, 23 October 2021 at 18:23:47 UTC, Simon wrote:
So what I am looking for then is the equivalent to
__FUNCTION__ that evaluates to the actual symbol of the
function instead of its name, so it can be used as a parameter
to Param
On Saturday, 23 October 2021 at 18:23:47 UTC, Simon wrote:
So what I am looking for then is the equivalent to __FUNCTION__
that evaluates to the actual symbol of the function instead of
its name, so it can be used as a parameter to
ParameterIdentifierTuple.
You could use the following:
alias
For debugging purposes, I have built a mixin that will, when
declared inside a function, output code to the console that will
reproduce the exact function call.
So, as an example, for the following function
int reproducible_function(int a, int b){
mixin(OUTPUT_REPRO_CASE!reproducible_functio
On Saturday, 23 October 2021 at 16:39:08 UTC, data pulverizer
wrote:
```
...
this(R_xlen_t n)
{
SEXPTYPE _real_ = SEXPTYPE.REALSXP;
_data = protect(allocVector(_real_, n));
unprotect(1);
}
...
```
Looking at that code, I realise didn't need the un/protect.
On Friday, 22 October 2021 at 16:16:22 UTC, Dave P. wrote:
I think you ran into this
[issue](https://issues.dlang.org/show_bug.cgi?id=22404). The
bug fix isn’t part of a released dmd yet.
Yes that's the same error. When I try this:
```
...
this(R_xlen_t n)
{
SEXPTYPE _real_ = SEXPTYPE
On Saturday, 23 October 2021 at 14:28:14 UTC, Imperatorn wrote:
On Saturday, 23 October 2021 at 08:41:35 UTC, Imperatorn wrote:
I think I shared this earlier, but I'm unsure if I got the
link right:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf
A vibe.d tutorial pdf
To
On Saturday, 23 October 2021 at 08:41:35 UTC, Imperatorn wrote:
I think I shared this earlier, but I'm unsure if I got the link
right:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf
A vibe.d tutorial pdf
To summarize, this should work:
https://github.com/reyvaleza/vibed/
On Saturday, 23 October 2021 at 13:37:19 UTC, Tejas wrote:
On Saturday, 23 October 2021 at 08:41:35 UTC, Imperatorn wrote:
I think I shared this earlier, but I'm unsure if I got the
link right:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf
A vibe.d tutorial pdf
For som
On Saturday, 23 October 2021 at 08:41:35 UTC, Imperatorn wrote:
I think I shared this earlier, but I'm unsure if I got the link
right:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf
A vibe.d tutorial pdf
For some very strange reason, it says __invalid format__ when you
Did you try the MmFile workaround?
I did. I also pinpointed the problem, I use x86_mscoff to run dub
and it's specific to that architecture selection. It's related to
MapViewOfFileEx [1].
I still haven't found a way around it though.
[1]
https://stackoverflow.com/questions/12121843/mapview
I think I shared this earlier, but I'm unsure if I got the link
right:
https://github.com/reyvaleza/vibed/blob/main/BuildWebAppsinVibe.pdf
A vibe.d tutorial pdf
On Saturday, 23 October 2021 at 00:54:17 UTC, Ruby The Roobster
wrote:
On Friday, 22 October 2021 at 21:57:02 UTC, Ruby The Roobster
wrote:
On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote:
On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster
wrote:
I have a simple vibe-d pro
21 matches
Mail list logo