On Saturday, 23 September 2017 at 20:43:36 UTC, Patrick Schluter
wrote:
So I checked for all the languages listed: C, C#, Java,
Javascript, C++, PHP, Perl and D. All have the same order of
precedence except, as always the abomination of all languages:
C++ (kill it with fire).
C++ is the only
On Tuesday, 19 September 2017 at 19:16:05 UTC, EntangledQuanta
wrote:
[snip]
I'm just glad there is at least one sane person that decided to
chime in... was quite surprised actually. I find it quite
pathetic when someone tries to justify a wrong by pointing to
other wrongs. It takes away all
On Tuesday, 19 September 2017 at 18:17:47 UTC, jmh530 wrote:
On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta
wrote:
Thanks for wasting some of my life... Just curious about who
will justify the behavior and what excuses they will give.
Pretty sure it would be exactly the same
On Thursday, 14 September 2017 at 23:53:20 UTC, Your name wrote:
Every time I go to use something like strip it bitches and
gives me errors. Why can't I simply do somestring.strip("\n")???
import std.string would be the likely strip yet it takes a
range and somestring, for some retarded
On Tuesday, 17 January 2017 at 03:21:39 UTC, Yuxuan Shui wrote:
The built in chain seems to only be able to chain a fixed
number of ranges, is there a way to chain a range/array of
ranges?
See std.algorithm.iteration.joiner
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote:
It is often being claimed that D is at least as fast as C++.
Now, I am fairly new to D. But, here is an example where I want
to see how can this be made possible.
So far my C++ code compiles in ~850 ms.
While my D code runs in about
On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller wrote:
vibe.d does not have much lateral support as the most commons
web technologies do. Can vibe.d leverage pre-existing techs
such as php, ruby/rails, etc? Starting from scratch and having
to build a robust and secure framework is
On Wednesday, 8 June 2016 at 14:41:55 UTC, Ola Fosheim Grøstad
wrote:
[snip]
I like the "are we fast yet" websites that various project put
up, displaying improvements over time.
You mean like this? http://digger.k3.1azy.net/trend/
On Saturday, 4 June 2016 at 18:55:09 UTC, Brad Anderson wrote:
On Saturday, 4 June 2016 at 18:20:26 UTC, Alex wrote:
[...]
Check out enumerate() in std.range;
int counter = 5;
foreach(i, el; enumerate(randomCover(iota(counter
writeln("index: ", i, " element: ", el);
On Saturday, 4 June 2016 at 18:20:26 UTC, Alex wrote:
Hi all!
Could you help me clearify why a iota can't be accessed with
two arguments in a foreach loop?
following tests show my problem:
What does work:
int[] ku = [0, 1, 2, 3, 4];
foreach(i, el; ku)
writeln("index: ", i, "
On Thursday, 21 January 2016 at 22:13:38 UTC, Brad Anderson wrote:
On Thursday, 21 January 2016 at 21:24:49 UTC, H. S. Teoh wrote:
[...]
What about wrapping the slices in a range-like interface that
would unescape the quotes on demand? You could even set a flag
on it during the initial pass
On Thursday, 21 January 2016 at 21:24:49 UTC, H. S. Teoh wrote:
[snip]
There are some limitations to this approach: while the current
code does try to unwrap quoted values in the CSV, it does not
correctly parse escaped double quotes ("") in the fields. This
is because to process those values
On Thursday, 21 January 2016 at 21:54:36 UTC, Dibyendu Majumdar
wrote:
Is there a way to disable GC in D?
I am aware of the @nogc qualifier but I would like to
completely disable GC for the whole app/library.
Regards
Dibyendu
GC.disable();
This prevents the garbage collector from running
On Friday, 18 December 2015 at 22:30:00 UTC, Jakob Jenkov wrote:
I am just looking at DUB and I can read that there are two
config formats: SDLang and JSON. Which one is the "new" format?
Which one is the "future" of DUB?
SDLang is the new one. JSON will remain supported. Use whichever
you
On Friday, 4 December 2015 at 00:50:17 UTC, Meta wrote:
On Friday, 4 December 2015 at 00:26:23 UTC, Jim Barnett wrote:
On Friday, 4 December 2015 at 00:23:45 UTC, Jim Barnett wrote:
The `import` statement inside the `for`-loop kind of smells
to me.
Sorry, inside the `while` loop
In D
On Friday, 27 November 2015 at 00:17:34 UTC, brian wrote:
[snip]
Can the developers in the room confirm if this is the correct
approach?
Are there examples of betters ways of doing this?
Regards
Brian
Botan has well thought out password hashing:
On Tuesday, 17 November 2015 at 22:47:17 UTC, Jon D wrote:
I'd like to chain several ranges and operate on them. However,
if the chains are different lengths, the data type is
different. This makes it hard to use in a general way. There is
likely an alternate way to do this that I'm missing.
On Wednesday, 21 October 2015 at 18:50:08 UTC, Adam D. Ruppe
wrote:
Use the .exe installer and it will offer to download and
install visual studio for you as part for its process.
I don't know if that feature has made it into a release yet. I
don't think Vc2015 is supported yet either in a
On Saturday, 14 March 2015 at 15:45:30 UTC, Charles Cooper wrote:
I think I may have answered my own question. It seems
std.typecon provides a facility for this.
http://dlang.org/phobos/std_typecons.html#.Proxy
http://dlang.org/phobos/std_typecons.html#.Typedef
Is this the 'right' way to do
On Thursday, 16 October 2014 at 22:26:51 UTC, RBfromME wrote:
I'm a newbie to programming and have been looking into the D
lang as a general purposing language to learn, yet the D
overview indicates that java would be a better language to
learn for your first programming language. Why? Looks
On Tuesday, 14 October 2014 at 20:05:07 UTC, Brad Anderson wrote:
https://github.com/D-Programming-Language/phobos/blob/master/std/json.d#L579
Oops. Linked the the parser section. I actually don't see any
unicode escape encoder in here. Perhaps he meant the upcoming
JSON module.
On Tuesday, 14 October 2014 at 20:03:37 UTC, jicman wrote:
On Tuesday, 14 October 2014 at 19:49:16 UTC, Sean Kelly wrote:
On Tuesday, 14 October 2014 at 19:47:00 UTC, jicman wrote:
Greetings.
Imagine this code,
char[] s = ABCabc;
foreach (char c; s)
{
// how do I convert c to something an
On Tuesday, 14 October 2014 at 20:08:03 UTC, Brad Anderson wrote:
On Tuesday, 14 October 2014 at 20:05:07 UTC, Brad Anderson
wrote:
https://github.com/D-Programming-Language/phobos/blob/master/std/json.d#L579
Oops. Linked the the parser section. I actually don't see any
unicode escape
On Monday, 29 September 2014 at 17:02:43 UTC, Martin Nowak wrote:
Does anyone know a construct to turn a lambda into an infinite
range.
import std.random;
unittest
{
Random gen;
foreach(v; xxx!(() = uniform(0, 100, gen)).take(10))
writeln(v);
}
I
On Monday, 25 August 2014 at 17:10:11 UTC, Etienne wrote:
People have been saying for quite a long time not to use the
`delete` keyword on GC-allocated pointers.
I've looked extensively through the code inside the engine and
even made a few modifications on it/benchmarked it for weeks
and I
On Thursday, 21 August 2014 at 03:02:53 UTC, Paul D Anderson
wrote:
What changed? It ran okay with early beta versions, but not
with the release.
Paul
It compiles in beta-5 but not beta-6. Is the list of changes in
the beta testing wiki complete? None seem pertinent.
monarch_dodra:
On Wednesday, 20 August 2014 at 23:56:23 UTC, Baz wrote:
Hello, I've been very interested about the announce saying that
DMD is able to produce COFF object files. Mostly because I'm
thinking using some objects programmed in D in a software
programmed in another lang, a bit like when statically
On Thursday, 14 August 2014 at 07:46:29 UTC, Carl Sturtivant
wrote:
The default size of the runtime stack for a Fiber is 4*PAGESIZE
which is very small, and a quick test shows that a Fiber
suffers a stack overflow that doesn't lead to a clean
termination when this limit is exceeded.
This
On Thursday, 14 August 2014 at 19:10:18 UTC, Jonathan M Davis
wrote:
I've never really tried to benchmark it, but it was my
understanding that the idea behind Appender was to use it to
create the array when you do that via a lot of appending, and
then you use it as a normal array and stop
On Thursday, 7 August 2014 at 01:15:36 UTC, Phil Lavoie wrote:
[...]
make release -fwin32
Here is the output:
Error: can't read makefile 'win32'
I'm building on Windows btw.
Thanks,
Phil
Close. You need the extension, I believe.
make -f win32.mak release
On Thursday, 7 August 2014 at 01:27:55 UTC, Phil Lavoie wrote:
Nope, still not working, but thx.
Hmm, are you in the src directory?
On Thursday, 7 August 2014 at 01:50:50 UTC, Phil Lavoie wrote:
On Thursday, 7 August 2014 at 01:37:46 UTC, Brad Anderson wrote:
On Thursday, 7 August 2014 at 01:27:55 UTC, Phil Lavoie wrote:
Nope, still not working, but thx.
Hmm, are you in the src directory?
Yes and ls *.mak shows three
On Tuesday, 5 August 2014 at 01:23:19 UTC, Andrew Edwards wrote:
Is there a way to take a bounded rage from a infinite forward
range?
Given the Fibonacci sequence:
auto fib = recurrence!(a[n-1] + a[n-2])(1, 1);
I can take the first n elements:
take(fib, 10);
But say I want
On Wednesday, 16 July 2014 at 15:44:03 UTC, Adam D. Ruppe wrote:
I would just change all the longs to ints and it would probably
work. Or all the longs to ints.
It really should have been consistent in the docs, since the
point of this is delegate vs function, not int vs long...
On Tuesday, 15 July 2014 at 20:18:58 UTC, seany wrote:
Consider this:
import std.stdio, std.regex, std.array, std.algorithms ;
void main(string args[])
{
string[] greetings = [hello, hallo, hoi, salut];
regex r = regex(hello, g);
for(short i = 0; i greetings.count(); i++)
{
auto m =
On Monday, 14 July 2014 at 22:21:36 UTC, bearophile wrote:
Nordlöw:
Is there a natural way of generating/filling a
string/wstring/dstring of a specific length with random
contents?
Do you mean something like this?
import std.stdio, std.random, std.ascii, std.range, std.conv;
string
On Monday, 14 July 2014 at 22:27:57 UTC, Brad Anderson wrote:
Alternative:
randomSample(lowercase, 10, lowercase.length).writeln;
std.ascii should really be using std.encoding.AsciiString. Then
that length wouldn't be necessary.
On Monday, 14 July 2014 at 22:32:25 UTC, bearophile wrote:
Brad Anderson:
Alternative:
randomSample(lowercase, 10, lowercase.length).writeln;
From randomSample docs:
Selects a random subsample out of r, containing exactly n
elements. The order of elements is the same as in the original
On Wednesday, 18 June 2014 at 21:58:48 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
Sent: Wednesday, June 18, 2014 at 11:02 PM
From: Brad Anderson via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
To: digitalmars-d-learn@puremagic.com
Subject: Re: '!' and naming conventions
On Monday, 16 June 2014 at 16:38:15 UTC, Sanios wrote:
snip
And I'm getting this - Error: undefined identifier splitter
It seems like std.string doesn't contain splitter.
You can find the solution to this and other issues you may hit in
the errata:
http://erdani.com/tdpl/errata/
On Friday, 6 June 2014 at 22:16:36 UTC, John wrote:
So let's say I'm trying to create a really simple ORM. I have a
struct:
struct foo {
int a;
float b;
}
I can iterate over the struct elements with the traits
FieldTypeTuple!foo, I can iterate over the the string that
On Friday, 6 June 2014 at 23:18:49 UTC, John wrote:
On Friday, 6 June 2014 at 22:27:38 UTC, bearophile wrote:
John:
I can iterate over the struct elements with the traits
FieldTypeTuple!foo,
In such iteration you are using a static foreach. Types are
compile-time constructs in D. If you
On Thursday, 5 June 2014 at 00:33:26 UTC, Ali Çehreli wrote:
On 06/04/2014 05:05 PM, Robert Hathaway wrote:
I've got a program that reads a text file line by line (using
std.stdio
readln())
Consider using byLine() instead. (Important: byLine uses an
internal buffer for the line; so, don't
On Tuesday, 3 June 2014 at 18:22:59 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
Well, I would prefer to do it myself, but I obviously can't say
that I
wouldn't accept it if someone else did it and did a good job of
it. The main
problem however is that we need to come up with a good
On Thursday, 22 May 2014 at 23:22:44 UTC, kaz wrote:
Is there a way to get the length of an array out of slice
bracket in D?
Tks.
Just use .length:
void main()
{
import std.stdio;
auto a = new int[5];
auto b = a[];
writeln(a.length, , b.length);
}
45 matches
Mail list logo