I am trying to create some fast sin, sinc, and exponential
routines to speed up some code by using tables... but it seems
it's slower than the function itself?!?
The code below uses matplotlibd but is not necessary. The timing
code is lower.
Ideally I'd like to have quadratic interpolation
On 22/05/2019 12:22 PM, JS wrote:
I am trying to create some fast sin, sinc, and exponential routines to
speed up some code by using tables... but it seems it's slower than the
function itself?!?
The code below uses matplotlibd but is not necessary. The timing code is
lower.
Ideally I'd
On Tuesday, 21 May 2019 at 21:48:22 UTC, Jonathan Marler wrote:
Is there a way to prevent dmd from adding any default libraries
to its linker command?
dmd -defaultlib= yourfile.d
Note it is = then nothing; you set it to a null library. Then it
will not link any D library.
that takes the D
On Wednesday, 22 May 2019 at 00:22:09 UTC, JS wrote:
I am trying to create some fast sin, sinc, and exponential
routines to speed up some code by using tables... but it seems
it's slower than the function itself?!?
There's intrinsic cpu instructions for some of those that can do
the math
On Wednesday, 22 May 2019 at 00:55:37 UTC, Adam D. Ruppe wrote:
On Wednesday, 22 May 2019 at 00:22:09 UTC, JS wrote:
I am trying to create some fast sin, sinc, and exponential
routines to speed up some code by using tables... but it seems
it's slower than the function itself?!?
There's
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
Hi,
consider this:
interface Base
{
void setup();
}
interface FeatureX
{
void x();
}
class Foo: Base, FeatureX
{
void setup(){};
void x(){};
}
void main()
{
Base foo = new Foo(); // This would be the result of a
factory class
On Tuesday, 21 May 2019 at 07:16:49 UTC, Jim wrote:
On Tuesday, 21 May 2019 at 07:04:27 UTC, rumbu wrote:
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
That's because foo is of type Base, not implementing FeatureX.
Right, Base isn't implementing FeatureX, but foo is really a Foo
On 2019-05-20 19:26:38 +, kdevel said:
Open a new document in MS Word or any other word processor and then
press and hold the "L" key until the cursor hits the right margin. What
do you see? Evenly spaced els?
The layout stuff we do is not meant to handle text layouting. That will
be
On Tue, May 21, 2019 at 7:55 AM Jim via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> Hi,
>
> Question: How to call foo.x in @safe code ?
>
@safe:
interface Base
{
void setup();
}
interface FeatureX
{
void x();
}
interface FeatureY
{
void y();
}
class Foo: Base,
Is it possible to compile a release build with debug information?
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
Tuesday creeps up on us again and it's time for another blog
post. Today's instalment continues from last time with a
multi-select file dialog. You can find it here:
http://gtkdcoding.com/2019/05/21/0037-file-open-multiple.html
On Tuesday, 21 May 2019 at 07:19:38 UTC, Marco de Wild wrote:
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
Hi,
consider this:
interface Base
{
void setup();
}
interface FeatureX
{
void x();
}
class Foo: Base, FeatureX
{
void setup(){};
void x(){};
}
void main()
{
Base foo
On Tuesday, 21 May 2019 at 07:33:17 UTC, rumbu wrote:
On Tuesday, 21 May 2019 at 07:16:49 UTC, Jim wrote:
On Tuesday, 21 May 2019 at 07:04:27 UTC, rumbu wrote:
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
That's because foo is of type Base, not implementing FeatureX.
Right, Base
On Tuesday, 21 May 2019 at 07:16:29 UTC, Boqsc wrote:
I'm getting unsure why executeShell works on the pause command,
but cls that is responsible for clearing the text do not.
import std.stdio, std.process;
void main()
{
writeln("Some text that will appear in cmd");
try next:
spawnShell( "cls" ).wait;
On Tuesday, 21 May 2019 at 10:03:38 UTC, KnightMare wrote:
try next:
spawnShell( "cls" ).wait;
Wow, spawnShell indeed does the job as I would expect, as of
right now. Thanks.
spawnShell Function indeed sounds like it would spawn a new shell
instead of what it does, at first I didn't look
On Tuesday, 21 May 2019 at 12:51:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 21 May 2019 at 07:16:29 UTC, Boqsc wrote:
I'm getting unsure why executeShell works on the pause
command, but cls that is responsible for clearing the text do
not.
When you ran pause, did it print the text "press any
On Tuesday, 21 May 2019 at 11:54:08 UTC, Robert M. Münch wrote:
Is there a trick to accomplish 2 when objects are created from
different scopes which need to be kept? So, I have one function
creating the objects and one using them. How can I keep things
on the stack between these two
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
Hi,
consider this:
interface Base
{
void setup();
}
interface FeatureX
{
void x();
}
class Foo: Base, FeatureX
{
void setup(){};
void x(){};
}
void main()
{
Base foo = new Foo(); // This would be the result of a
factory class
I'm getting unsure why executeShell works on the pause command,
but cls that is responsible for clearing the text do not.
import std.stdio, std.process;
void main()
{
writeln("Some text that will appear in cmd");
executeShell("cls"); // Does not clear the text?
On Tuesday, 21 May 2019 at 07:04:27 UTC, rumbu wrote:
On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
That's because foo is of type Base, not implementing FeatureX.
Right, Base isn't implementing FeatureX, but foo is really a Foo
which does:
class Foo: Base, FeatureX
{
void
On Tue, 2019-05-21 at 05:21 +, Mike Brockus via Digitalmars-d-learn wrote:
>
[…]
> The solution from Reddit solves the problem for 'dub' but as part
> of my project C to D I wanted to use Meson and run test with
> whatever is available, coming next week I will try to incorporate
>
On Tuesday, 21 May 2019 at 09:48:34 UTC, Robert M. Münch wrote:
Is it possible to compile a release build with debug
information?
with plain dmd
dmd -g -release -O
or
dmd -g -release -debug -O
The -g is debug info. The -debug switch turns on `debug` code
blocks. -O turns on
The D docs for interfacing with C state:
If pointers to D garbage collector allocated memory are passed to C
functions, it's critical to ensure that that memory will not be
collected by the garbage collector before the C function is done with
it. This is accomplished by:
1. Making a copy of
On Tuesday, 21 May 2019 at 09:48:34 UTC, Robert M. Münch wrote:
Is it possible to compile a release build with debug
information?
There is a "release-debug" version in case you are using dub. Not
sure, if there is enough debug info for you.
On Tuesday, 21 May 2019 at 07:16:29 UTC, Boqsc wrote:
I'm getting unsure why executeShell works on the pause command,
but cls that is responsible for clearing the text do not.
When you ran pause, did it print the text "press any key to
continue"?
executeShell captures the output of the
Hi,
Has anyone used D to work with arbitrary length bitfields with multiple
occurences of a sub-bitfield. I am working with DVB Sections and EIT packets
are defined as bitfields with loops in them and the header is 112 bits. The
loops are handleable with subfields obviously, assuming you can work
On Tuesday, 21 May 2019 at 17:16:05 UTC, Russel Winder wrote:
As far as I can see std.bitmanip only caters for 8, 16, 32, and
64 bit long bitfields.
I worked on/with bitfields in the past, the limit sizes is more
or less for natural int types that D supports.
However this limitation is
On Tuesday, 21 May 2019 at 17:16:05 UTC, Russel Winder wrote:
Hi,
Has anyone used D to work with arbitrary length bitfields with
multiple occurences of a sub-bitfield. I am working with DVB
Sections and EIT packets are defined as bitfields with loops in
them and the header is 112 bits. The
Is there a way to prevent dmd from adding any default libraries
to its linker command?
Something equivalent to "-nodefaultlibs" from gcc?
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
I'd still like to use the dmd.conf file, so I don't want to use
"-conf="
On 22/05/2019 8:31 AM, Dennis wrote:
I was replacing a memcpy with a slice assignment and accidentally used
== instead of =.
Usually the compiler protects me from mistakes like that:
```
int[4] a;
a == a;
```
Error: a == a has no effect
However, because I was using slices it didn't:
```
I was replacing a memcpy with a slice assignment and accidentally
used == instead of =.
Usually the compiler protects me from mistakes like that:
```
int[4] a;
a == a;
```
Error: a == a has no effect
However, because I was using slices it didn't:
```
int[4] a;
a[] == a[];
```
No errors
Does
On Tuesday, 21 May 2019 at 13:23:54 UTC, Benjamin Schaaf wrote:
On Tuesday, 21 May 2019 at 11:54:08 UTC, Robert M. Münch wrote:
Is there a trick to accomplish 2 when objects are created from
different scopes which need to be kept? So, I have one
function creating the objects and one using
On Tuesday, 21 May 2019 at 21:48:22 UTC, Jonathan Marler wrote:
Is there a way to prevent dmd from adding any default libraries
to its linker command?
Something equivalent to "-nodefaultlibs" from gcc?
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
I'd still like to use the dmd.conf
On Monday, 20 May 2019 at 13:41:15 UTC, Boris-Barboris wrote:
On Sunday, 19 May 2019 at 23:54:27 UTC, Anonymouse wrote:
What makes it decide to collect? What triggers it?
You can try setting heapSizeFactor option to something lower
than 2 to increase collection frequency:
35 matches
Mail list logo