On 07/15/2017 09:27 AM, RedCAT wrote:
> I have only TypeInfo taken dynamically from an arbitrary type, and I
> need to initialize the Variant variable to the default value for this
> type.
I'm afraid there is no way of setting the value of Variant dynamically
because it wants to do type-checking
On 07/16/2017 10:37 AM, Jon Degenhardt wrote:
There's a good discussion in this thread ("Why GNU grep is fast" by Mike
Haertel):
https://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html
--Jon
Another fast GNU utility was on Reddit a month ago:
https://www.reddit.com/r/pro
On Saturday, 15 July 2017 at 18:14:13 UTC, Joakim wrote:
core.exception.InvalidMemoryOperationError@src/core/exception.d(696): Invalid
memory operation
...
See the wiki page about this:
https://wiki.dlang.org/InvalidMemoryOperationError
If you can't do all that, look for places you might be
Of course now I will try to have it work first. Than replace for
loops with Cartesian product calls. Than I will make 2D array
template and even maybe with random access range. And finally for
being able to use this class later in the some other coding
challenge I will make Searching( == 'W' pa
Hi Guys,
@Nicholas , thanks a lot for cool solution but actually I weren't
working on image processing. I was trying to solve
"http://codeforces.com/contest/828/problem/B";. I really needed
finding connected components this time.
@Ivan, your solution is much more elegant than what I did. But
Thanks for reply, Ali.
I understand the main problem. dirEntries by default follows
symlinks.
Without it my first grep works only 28.338s. That really cool!
On Sunday, 16 July 2017 at 17:37:34 UTC, Jon Degenhardt wrote:
On Sunday, 16 July 2017 at 17:03:27 UTC, unDEFER wrote:
[snip]
How to write in D grep not slower than GNU grep?
GNU grep is pretty fast, it's tough to beat it reading one line
at a time. That's because it can play a bit of a tric
On 16.07.2017 19:10, Timon Gehr wrote:
...
(This works even if there are * at the border.)
Well, not really. :)
Version that actually works if there are * at the border:
import std.stdio, std.range, std.algorithm, std.array;
char[][] arr;
int componentSize(int row,int col){
if(row>=arr.l
On Sunday, 16 July 2017 at 17:03:27 UTC, unDEFER wrote:
[snip]
How to write in D grep not slower than GNU grep?
GNU grep is pretty fast, it's tough to beat it reading one line
at a time. That's because it can play a bit of a trick and do the
initial match ignoring line boundaries and correct
On 16.07.2017 18:55, Timon Gehr wrote:
On 16.07.2017 12:37, kerdemdemir wrote:
My goal is to find connected components in a 2D array for example
finding connected '*'
chars below.
x x x x x x
x x x x x x
x x * * x x
x x * * x x
x x x * * x
* x x x x x
Hello, there!
I have the next "grep" code:
https://dpaste.dzfl.pl/7b7273f96ab2
And I have the directory to run it:
$ time /home/undefer/MyFiles/Projects/TEST/D/grep "HELLO" .
./strace.log: [pid 18365] write(1, "HELLO\n", 6HELLO
real1m17.096s
user0m54.828s
sys 0m13.340s
The same res
On 16.07.2017 12:37, kerdemdemir wrote:
My goal is to find connected components in a 2D array for example
finding connected '*'
chars below.
x x x x x x
x x x x x x
x x * * x x
x x * * x x
x x x * * x
* x x x x x
There are two connected '*' group in t
On Sunday, 16 July 2017 at 10:37:39 UTC, kerdemdemir wrote:
My goal is to find connected components in a 2D array for
example finding connected '*'
chars below.
x x x x x x
x x x x x x
x x * * x x
x x * * x x
x x x * * x
* x x x x x
...
Is there any bett
On Sunday, 16 July 2017 at 10:37:39 UTC, kerdemdemir wrote:
My goal is to find connected components in a 2D array for
example finding connected '*'
chars below.
x x x x x x
x x x x x x
x x * * x x
x x * * x x
x x x * * x
* x x x x x
There are two connected
My goal is to find connected components in a 2D array for example
finding connected '*'
chars below.
x x x x x x
x x x x x x
x x * * x x
x x * * x x
x x x * * x
* x x x x x
There are two connected '*' group in this example. First group is
composes of six '*
16 matches
Mail list logo