Rikki, could you explain? I did not understand where it can help
me
On 1/04/2015 7:19 p.m., Suliman wrote:
Rikki, could you explain? I did not understand where it can help me
Here is some example code. While I've only implemented one
InputRange!string instance. You would probably have one, for just zip's
and another raw text files. Keep in mind it returns
On 1/04/2015 6:15 p.m., Suliman wrote:
The situation is next:
I have got the function that get arrays of lognames and logfullname:
void loginsert(string [] lognames, string [] logfullname)
{
if(logfullname[i].endsWith(txt))
{
auto file = File(logfullname[i], r);
Maybe there is way to access of element of archive in the same
way as to txt file? I looked, but it's seems that constructor
accept only path to file. But I can't understand how to set path
to unpacked element of archive.
On 2015-03-31 at 22:56, Laeeth Isharc wrote:
1mm allocations
2.066: 0.844s
2.067: 0.19s
That is great news, thanks!
OT: it's a nasty financier's habit to write 1M and 1MM instead of 1k and 1M. :P
On Wednesday, 1 April 2015 at 10:09:12 UTC, FG wrote:
On 2015-03-31 at 22:56, Laeeth Isharc wrote:
1mm allocations
2.066: 0.844s
2.067: 0.19s
That is great news, thanks!
OT: it's a nasty financier's habit to write 1M and 1MM instead
of 1k and 1M. :P
Yeah, what's with that? I've never
On Tuesday, 31 March 2015 at 16:24:02 UTC, John Colvin wrote:
On Tuesday, 31 March 2015 at 16:10:07 UTC, Adam D. Ruppe wrote:
On Tuesday, 31 March 2015 at 15:59:53 UTC, John Colvin wrote:
Like almost never? I can't think of any reason to ever do
that.
I mentioned it because of this story:
Hi,
I have a bunch of square r16 and png images which I need to flip
horizontally.
My flip method looks like this:
void hFlip(T)(T[] data, int w)
{
import std.datetime : StopWatch;
StopWatch sw;
sw.start();
foreach(int i; 0..w)
{
auto row =
tchaloupka:
Am I doing something utterly wrong?
If you have to perform performance benchmarks then use ldc or gdc.
Also disable bound tests with your compilation switches.
Sometimes reverse() is not efficient, I think, it should be
improved. Try to replace it with a little function written
Hi,
Please help rewrite this code to D:
#include iostream
// Peano Arithmetic
struct zero;
template typename T
struct succ {
};
template typename T
struct increment {
using result = succT;
};
template typename T
struct decrement;
template typename T
struct decrementsuccT {
On Wednesday, 1 April 2015 at 10:35:05 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 10:09:12 UTC, FG wrote:
On 2015-03-31 at 22:56, Laeeth Isharc wrote:
1mm allocations
2.066: 0.844s
2.067: 0.19s
That is great news, thanks!
OT: it's a nasty financier's habit to write 1M and 1MM
Hello!
I’m having issues with setting a cookie via CURL(std.net.curl).
I’ve tried several time over the last week but can’t figure it
out. I feel like I've tried every suggestion I found searching
the web.
Basically - I receive the value set-cookie from a GET request
(got this), but have
There's two ways, you can let curl handle it by setting a cookie
jar file:
http://dlang.org/phobos/std_net_curl.html#setCookieJar
Make the HTTP object and set the jar on it before doing any
requests. Then it will be done automatically on that object,
saving to the file.
If you are manually
On Wednesday, 1 April 2015 at 14:22:57 UTC, Laeeth Isharc wrote:
On Wednesday, 1 April 2015 at 10:35:05 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 10:09:12 UTC, FG wrote:
On 2015-03-31 at 22:56, Laeeth Isharc wrote:
1mm allocations
2.066: 0.844s
2.067: 0.19s
That is great news,
On Wednesday, 1 April 2015 at 13:59:10 UTC, Dennis Ritchie wrote:
snip
You can do this:
import std.typetuple;
//helper for staticReduce
template Alias(alias a)
{
alias Alias = a;
}
// staticReduce should really be in std.typetuple, or
// the soon to arrive std.meta package.
template
On Wednesday, 1 April 2015 at 14:00:52 UTC, bearophile wrote:
tchaloupka:
Am I doing something utterly wrong?
If you have to perform performance benchmarks then use ldc or
gdc.
I tried it on my slower linux box (i5-2500K vs i7-2600K) without
change with these results:
C# (mono with
On Wednesday, 1 April 2015 at 16:08:14 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 13:52:06 UTC, tchaloupka wrote:
snip
I'm pretty sure that the flipping happens in GDI+ as well. You
might be writing C#, but the code your calling that's doing all
the work is C and/or C++, quite
On Wednesday, 1 April 2015 at 13:52:06 UTC, tchaloupka wrote:
snip
I'm pretty sure that the flipping happens in GDI+ as well. You
might be writing C#, but the code your calling that's doing all
the work is C and/or C++, quite possibly carefully optimised over
many years by microsoft.
Are
On Tue, 31 Mar 2015 13:25:46 +, John Colvin wrote:
Short answer: no. .codeof for functions is something I've wanted for
ages, but no movement so far.
'cause `.codeof` is a can of worms. it is just a bad replace for AST
macros, and having it means that internal string representation should
std.algorithm.reverse uses ranges, and shamefully DMD is really
bad at optimizing away range-induced costs.
On Tuesday, 31 March 2015 at 13:25:47 UTC, John Colvin wrote:
On Tuesday, 31 March 2015 at 12:49:36 UTC, Vlad Levenfeld wrote:
Is there any way (or could there be any way, in the future) of
getting the code from lambda expressions as a string?
I've noticed that if I have an error with a
Yess.but there are LOTS of nodes/BTree, and each node would need to
check whether the btFile was already initialized, et (ugh!) cetera. So
while possible, that's an even worse answer than depending on people
closing the BTree properly. I *am* going to separate the close routine
from the
The class Node is contained within the struct BTree.
The field btFile is contained within the struct BTree.
The statement is within a function within the Node class.
I've tried many variations, here are a few:
btFile.write(self.nodeId, cast(void*)(self));
results in:
need 'this' for 'btFile'
On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote:
Compile Time Function Evaluation (CTFE) is a very powerful tool
to avoid having to enter in to all that C++ style mess.
Yes, CTFE in D really cool. Thanks.
I need to implement arithmetic (addition / subtraction) only use
the type
On Wednesday, 1 April 2015 at 17:03:34 UTC, Dennis Ritchie wrote:
On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote:
Compile Time Function Evaluation (CTFE) is a very powerful tool
to avoid having to enter in to all that C++ style mess.
Yes, CTFE in D really cool. Thanks.
I need
On Wednesday, 1 April 2015 at 17:51:40 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 17:03:34 UTC, Dennis Ritchie
wrote:
On Wednesday, 1 April 2015 at 15:22:10 UTC, John Colvin wrote:
Compile Time Function Evaluation (CTFE) is a very powerful
tool
to avoid having to enter in to all
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote:
Perhaps BTree needs to be a class?
yes
On 2015-04-01 at 16:52, John Colvin wrote:
On Wednesday, 1 April 2015 at 14:22:57 UTC, Laeeth Isharc wrote:
On Wednesday, 1 April 2015 at 10:35:05 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 10:09:12 UTC, FG wrote:
On 2015-03-31 at 22:56, Laeeth Isharc wrote:
1mm allocations
2.066:
On 04/01/2015 11:39 AM, anonymous via Digitalmars-d-learn wrote:
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote:
Perhaps BTree needs to be a class?
yes
Thanks.
Sigh. I was hoping to preserve the determinate closing that one gets
with a struct.
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote:
Perhaps BTree needs to be a class? I made it a struct because
I want it to definitely close properly when it
goes out of scope.
Maybe `scoped` can help:
http://dlang.org/phobos/std_typecons.html#.scoped
(not translated into D yet)
http://blog.mgm-tp.com/2013/12/benchmarking-g1-and-other-java-7-garbage-collectors/
http://www.mm-net.org.uk/resources/benchmarks.html
http://www.ccs.neu.edu/home/will/GC/sourcecode.html
http://yoda.arachsys.com/csharp/benchmark.html
it's possible we already have
On 04/01/2015 11:25 AM, Charles Hixson via Digitalmars-d-learn wrote:
The class Node is contained within the struct BTree.
The field btFile is contained within the struct BTree.
The statement is within a function within the Node class.
I've tried many variations, here are a few:
32 matches
Mail list logo