On Wednesday, 22 July 2020 at 04:33:20 UTC, James Gray wrote:
Is there a better way to achieve behaviour similar to
rangeFuncIf
below? f gives a contrived example of when one might want this.
g is
how one might try and achieve the same with std.range.choose.
import std.stdio;
import std.range
Is there a better way to achieve behaviour similar to rangeFuncIf
below? f gives a contrived example of when one might want this. g
is
how one might try and achieve the same with std.range.choose.
import std.stdio;
import std.range : only, chain, join, choose;
import std.algorithm : map;
auto
On Tuesday, 21 July 2020 at 12:00:03 UTC, bioinfornatics wrote:
Dear,
I would like to use OpenCL in D. Thus I try to use DerelictCL.
But I fail to use it I encounter this error message:
--
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/derelict/opencl/constants.di(835):
Err
On Wednesday, 24 June 2020 at 18:53:34 UTC, matheus wrote:
Hi, I currently use D for small CLI/Batch apps, before that I
used to program in C.
Despite of using D I usually program like C but with the
advantage of: GC, AA, CTFE and a few classes here and there.
As we can see there are a lot o
On Tuesday, 21 July 2020 at 19:20:28 UTC, Simen Kjærås wrote:
Walter gives some justification in the post immediately
following:
whelp proves my memory wrong!
On Tuesday, 21 July 2020 at 13:42:15 UTC, Steven Schveighoffer
wrote:
On 7/21/20 8:34 AM, Adam D. Ruppe wrote:
The others aren't wrong about stack size limits playing some
role, but the primary reason is that it is a weird hack for
@safe, believe it or not.
...
I don't recall exactly when thi
On Tuesday, 21 July 2020 at 13:05:21 UTC, wjoe wrote:
On Sunday, 19 July 2020 at 09:48:24 UTC, notna wrote:
Someone once wrote about a UDP library, which was used to sync
data to somewhere in APAC (Hongkong?) and by doing so the data
transfer was magnitudes faster then before (over TCP)...
On Tuesday, 21 July 2020 at 12:00:03 UTC, bioinfornatics wrote:
Dear,
I would like to use OpenCL in D. Thus I try to use DerelictCL.
But I fail to use it I encounter this error message:
--
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/derelict/opencl/constants.di(835):
Err
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
1) The D Language Reference says:
"There are four kinds of arrays..." with the first example being
"type* Pointers to data" and "int* p; etc.
At the risk of sounding overly nitpicky, isn't a pointer to an
integer simply a pointe
On Wednesday, 24 June 2020 at 18:53:34 UTC, matheus wrote:
Hi, I currently use D for small CLI/Batch apps, before that I
used to program in C.
Despite of using D I usually program like C but with the
advantage of: GC, AA, CTFE and a few classes here and there.
As we can see there are a lot o
On Monday, 20 July 2020 at 20:03:05 UTC, Laurent Tréguier wrote:
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
On Tuesday, 21 July 2020 at 13:23:32 UTC, Adam D. Ruppe wrote:
But the array isn't initialized in the justification scenario.
It is accessed through a null pointer and the type system
thinks it is fine because it is still inside the static limit.
At run time, the cpu just sees access to memo
On 7/21/20 8:34 AM, Adam D. Ruppe wrote:
The others aren't wrong about stack size limits playing some role, but
the primary reason is that it is a weird hack for @safe, believe it or not.
...
I don't recall exactly when this was discussed but it came up in the
earlier days of @safe, I'm pretty
On Tuesday, 21 July 2020 at 13:16:44 UTC, IGotD- wrote:
Either the array will hit that page during initialization or
something else during the execution.
But the array isn't initialized in the justification scenario. It
is accessed through a null pointer and the type system thinks it
is fine
On Tuesday, 21 July 2020 at 12:34:14 UTC, Adam D. Ruppe wrote:
With the null `a`, the offset to the static array is just 0 +
whatever and the @safe mechanism can't trace that.
So the arbitrary limit was put in place to make it more likely
that such a situation will hit a protected page and s
On Sunday, 19 July 2020 at 09:48:24 UTC, notna wrote:
Someone once wrote about a UDP library, which was used to sync
data to somewhere in APAC (Hongkong?) and by doing so the data
transfer was magnitudes faster then before (over TCP)...
In the best case scenario, and orders of magnitude more
On 7/21/20 8:49 AM, Adam D. Ruppe wrote:
On Tuesday, 21 July 2020 at 12:44:23 UTC, Drone1h wrote:
Would it be possible to explain this, please ?
nothrow only applies to Exception and its children. Error is a different
branch.
Error means you have a programming error and cannot be caught and
On 7/21/20 8:44 AM, Drone1h wrote:
Hello All,
In phobos/std/process.d, in the ProcessPipes struct, we can see a few
functions which are marked with "nothrow", but which (under some
conditions) throw:
@property File stdout() @safe nothrow
{
if ((_redirectFlags & Redirect.st
On Tuesday, 21 July 2020 at 12:44:23 UTC, Drone1h wrote:
Would it be possible to explain this, please ?
nothrow only applies to Exception and its children. Error is a
different branch.
Error means you have a programming error and cannot be caught and
recovered (though the compiler allows it
Hello All,
In phobos/std/process.d, in the ProcessPipes struct, we can see a
few functions which are marked with "nothrow", but which (under
some conditions) throw:
@property File stdout() @safe nothrow
{
if ((_redirectFlags & Redirect.stdout) == 0)
throw new Error
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
How does that pertain to an array?
C arrays work as pointers to the first element and D can use that
style too.
2) "The total size of a static array cannot exceed 16Mb" What
limits this?
The others aren't wrong about stack size l
On 7/21/20 7:10 AM, IGotD- wrote:
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
2) "The total size of a static array cannot exceed 16Mb" What limits
this? And with modern systems of 16GB and 32GB, isn't 16Mb excessively
small? (an aside: shouldn't that be 16MB in the reference
On Tuesday, 21 July 2020 at 12:21:16 UTC, Steven Schveighoffer
wrote:
On 7/21/20 7:44 AM, Ecstatic Coder wrote:
On Tuesday, 21 July 2020 at 11:01:20 UTC, drug wrote:
On 7/20/20 10:04 PM, Ecstatic Coder wrote:
I'm currently implementing a small open source backup tool
(dub), and therefore I nee
On 7/21/20 7:44 AM, Ecstatic Coder wrote:
On Tuesday, 21 July 2020 at 11:01:20 UTC, drug wrote:
On 7/20/20 10:04 PM, Ecstatic Coder wrote:
I'm currently implementing a small open source backup tool (dub), and
therefore I need to accurately store the file modification SysTime in
binary format,
On 7/20/20 6:04 PM, Vladimir Panteleev wrote:
On Monday, 20 July 2020 at 20:55:52 UTC, Steven Schveighoffer wrote:
I tried redirecting /dev/null to stdin when executing my application
(and I assumed that would pass onto the process child), but it still
asks. What am I doing wrong?
Generically
On 7/21/20 2:44 PM, Ecstatic Coder wrote:
Ah thanks for telling me :)
The loaded byte array in the union type was indeed the same as the saved
one, so I immediately thought it was crashing because of some hidden
pointer for timezone or something which was then pointing to garbage at
reloadin
Dear,
I would like to use OpenCL in D. Thus I try to use DerelictCL.
But I fail to use it I encounter this error message:
--
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/derelict/opencl/constants.di(835):
Error: genCLVectorTypes cannot be interpreted at compile time, becau
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
2) "The total size of a static array cannot exceed 16Mb" What
limits this? And with modern systems of 16GB and 32GB, isn't
16Mb excessively small? (an aside: shouldn't that be 16MB in
the reference instead of 16Mb? that is, Doesn't b
On Tuesday, 21 July 2020 at 11:01:20 UTC, drug wrote:
On 7/20/20 10:04 PM, Ecstatic Coder wrote:
I'm currently implementing a small open source backup tool
(dub), and therefore I need to accurately store the file
modification SysTime in binary format, so that I can later
load this SysTime from
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
2) "The total size of a static array cannot exceed 16Mb" What
limits this? And with modern systems of 16GB and 32GB, isn't
16Mb excessively small? (an aside: shouldn't that be 16MB in
the reference instead of 16Mb? that is, Doesn't
On 7/20/20 10:04 PM, Ecstatic Coder wrote:
I'm currently implementing a small open source backup tool (dub), and
therefore I need to accurately store the file modification SysTime in
binary format, so that I can later load this SysTime from the snapshot
file to compare it with the current file
As my question obviously didn't interest any expert, I took
advantage of my lunch break to do some more research ;)
Maybe I'm wrong, but to my knowledge, there is no function to get
the number of hectonanoseconds since January 1, 1970.
Fortunately I can get the number of seconds since the sam
32 matches
Mail list logo