On Monday, 20 May 2019 at 02:18:51 UTC, Era Scarecrow wrote:
Here's some outputs if you are interested
Noticing how Heapify moves a large portion of areas more or less
in their location, doing heapify before binary insertion sort
lowers how much moving goes on quite a bit. Doing 2 heapify's
On Sunday, 19 May 2019 at 06:13:13 UTC, Era Scarecrow wrote:
Making a struct type/array that visually outputs and displays
compares/mutations of a type. While using the library sorting
functions (which relies on std.algorithm.mutation.swap
Well been having fun with sorting and more of this;
On Sunday, 19 May 2019 at 23:54:27 UTC, Anonymouse wrote:
Tweakig
I'd edit the title if I could. Grumble mutter.
I have CircleCI set up to test my project when I push to GitHub.
For a free user there the memory restriction is pretty severe (4
Gb), and as such non-trivial programs cannot be compiled without
separate compilation.
This sounded like a clear-cut case for -lowmem, but the process
is still
On Sunday, 19 May 2019 at 22:20:48 UTC, Josh wrote:
Thank you, that helps big time.
This is just more curiosity, but do you happen to know why I
have to use DList.linearRemove() instead of DList.remove()?
import std.stdio;
import std.container.dlist;
import std.algorithm;
import std.range;
On Sunday, 19 May 2019 at 22:20:48 UTC, Josh wrote:
This is just more curiosity, but do you happen to know why I
have to use DList.linearRemove() instead of DList.remove()?
These two functions are separate because they differ in
complexity. remove is O(1), linearRemove on the other hand
Thank you, that helps big time.
This is just more curiosity, but do you happen to know why I have
to use DList.linearRemove() instead of DList.remove()?
import std.stdio;
import std.container.dlist;
import std.algorithm;
import std.range;
void main()
{
auto list = make!DList("the",
On Sunday, 19 May 2019 at 20:55:28 UTC, Josh wrote:
Just started looking at D this weekend, coming from a
C++/Java/Go/Rust background and it's really not going well.
Trying to write something to play with the language and need a
linked list, looking in std.container you have a single or
Last version using more from the outer template
#!/usr/bin/env rdmd
import std.stdio;
import std.algorithm;
import std.typecons;
import std.array;
import std.range;
import std.traits;
auto byMinimum(Ranges)(Ranges ranges)
{
auto getNonEmpty()
{
return ranges.filter!("!a.empty");
Just started looking at D this weekend, coming from a
C++/Java/Go/Rust background and it's really not going well.
Trying to write something to play with the language and need a
linked list, looking in std.container you have a single or doubly
linked list...great.
Now how to I iterate over
On 19.05.19 20:38, Jacob Carlborg wrote:
On 2019-05-19 15:36, Christian Köstlin wrote:
Unfortunately I have no idea how to even store the result of this
search in an attribute of ByMinimum, as I cannot writeout its type.
In general you can use `typeof()`, where `` is
the expression you want
On Sunday, 19 May 2019 at 17:13:11 UTC, Alex wrote:
The operation itself is, however, a simple one. To implement a
basic version I would cite
http://rosettacode.org/wiki/Matrix_multiplication#D
This is awesome. Thank you very much.
Andrew
On Sunday, 19 May 2019 at 17:55:10 UTC, Robert M. Münch wrote:
It seems that the debugger has quite some problem when the code
was compiled with optimization and debug-information.
I remember having similar problems in a C program years ago,
ended up just releasing the code unoptimized and
On 2019-05-19 15:36, Christian Köstlin wrote:
Unfortunately I have no idea how to even store the result
of this search in an attribute of ByMinimum, as I cannot writeout its type.
In general you can use `typeof()`, where `` is
the expression you want to get the type of.
--
/Jacob Carlborg
On 2019-05-19 13:13:16 +, Robert M. Münch said:
I use debug(...) specifications on my code. My app works when compiled
in debug mode.
When I compile in release mode and explicitly use:
debug = debugprints;
on module level, my understanding is, that the debug guarded code will
be
On 2019-05-19 16:11:19 +, Robert M. Münch said:
I'm wondering why the root and win.layout_root values are not the same?
What's happening here? I thought that root is a class reference which
uses the same data as win.layout_root.
When I compile in debug mode and run the same code, the
On 5/19/19 2:34 AM, Andrew Edwards wrote:
P.S. Why do we still have two sets of documentations ([1],[2]) for the
language? Which is the official one and when can we get rid of the other?
[1] https://dlang.org/library/std/array.html
[2] https://dlang.org/phobos/std_array.html
I have wondered
On Sunday, 19 May 2019 at 16:17:17 UTC, Andrew Edwards wrote:
´´´
import std;
void main()
{
int[][] M = [[1,2,3],[1,2,3],[1,2,3]];
M.recursiveMultiplier(4);
writeln(M);
}
void recursiveMultiplier(T, V)(T arr, V val) @nogc
{
static if(isArray!(ElementType!T))
On Sunday, 19 May 2019 at 07:46:11 UTC, Johannes Loher wrote:
Am 18.05.19 um 08:20 schrieb Mike Brockus:
Hello there this is your hometown Meson build system user here
just
happen to have a
question related to unit testing in D.
So is there a way to run the unit-test in the test main as a
On Sunday, 19 May 2019 at 10:07:35 UTC, Alex wrote:
On Sunday, 19 May 2019 at 06:34:18 UTC, Andrew Edwards wrote:
So the question is, how do I pull this off in D using just
builtin arrays and phobos?
Any assistance is appreciated.
Slice operations exist, but they are defined mainly for
I have the following code I compile in release mode but with
"debugInfo" bulildOptions in my dub.json:
gob root = win.layout_root = new gob();
After executing this code line I see this in the debugger:
Name
Wert
Typ
◢
root
0x00f17deff760 {node=0x7ff629fb {__guard_fids_table} {},
On Wednesday, 22 June 2016 at 07:57:01 UTC, TheDGuy wrote:
I am wondering if it is possible to get the name of the current
CSS-class the button is asigned to?
Very late to this party, but:
getName() does the job.
I would like to join several sorted files into one big sorted file.
For that I came up with this snippet:
#!/usr/bin/env rdmd
import std.stdio;
import std.algorithm;
import std.typecons;
import std.array;
import std.range;
auto byMinimum(Ranges)(Ranges ranges)
{
auto getNonEmpty()
{
Hello,
Let we have got 3 template functions:
void func1(int a)() {}
void func2(int a, string b)() {}
void func3(int a, string b, bool c)() {}
As we see, the first function accepts 1 template argument, the
second - 2 and the third - 3.
What compiles faster:
1. When a program has got 100
I use debug(...) specifications on my code. My app works when compiled
in debug mode.
When I compile in release mode and explicitly use:
debug = debugprints;
on module level, my understanding is, that the debug guarded code will
be included. But, some debug guarded code is include and some
On 2019-05-12 17:33:16 +, kdevel said:
On Wednesday, 8 May 2019 at 09:15:41 UTC, Ron Tarrant wrote:
On Wednesday, 8 May 2019 at 06:30:56 UTC, Robert M. Münch wrote:
Our focus is executable size (I'm an old school guy) and speed.
What about correctness?
Correctness of what? Of the
On 2019-05-18 17:46:52 +, Stefan Koch said:
On Saturday, 18 May 2019 at 16:35:44 UTC, Robert M. Münch wrote:
I want to profile my windows app which has a WinMain(). One of the
first statements in WinMain() within a try{} is:
Runtime.initialize();
But when I compile my app with -profile,
On Saturday, 18 May 2019 at 21:05:13 UTC, Les De Ridder wrote:
On Saturday, 18 May 2019 at 20:34:33 UTC, Patrick Schluter
wrote:
* hurrah for French keyboard which has a rarely used µ key,
but none for Ç a frequent character of the language.
That's the lowercase ç. The uppercase Ç is not
On Sunday, 19 May 2019 at 06:34:18 UTC, Andrew Edwards wrote:
Sooo... I'm trying to learn this stuff so that I can fully
grasp the content of Jens Mueller's 2019 DConf talk and its
applications in financial sector (forex and options/futures
trading). Unfortunately, I'm doing so using python
Am 18.05.19 um 08:20 schrieb Mike Brockus:
> Hello there this is your hometown Meson build system user here just
> happen to have a
> question related to unit testing in D.
>
> So is there a way to run the unit-test in the test main as a costume
> test runner in
> "test/test.d", and run the
On Monday, 13 May 2019 at 03:06:07 UTC, evilrat wrote:
On Monday, 13 May 2019 at 01:35:58 UTC, evilrat wrote:
I have project using pyd with python 3.7, that also using
ptvsd (visual studio debugger for python package) to allow
mixed debugging right inside VS Code.
I'll reduce the code and
Sooo... I'm trying to learn this stuff so that I can fully grasp
the content of Jens Mueller's 2019 DConf talk and its
applications in financial sector (forex and options/futures
trading). Unfortunately, I'm doing so using python but I'd like
to accomplish the same in D. Here goes:
Array
Making a struct type/array that visually outputs and displays
compares/mutations of a type. While using the library sorting
functions (which relies on std.algorithm.mutation.swap) it
doesn't call opAssign and doesn't pass through the struct. (which
also changes the indexes which it shouldn't).
33 matches
Mail list logo