On 13/02/2012 03:04, bearophile wrote:
In the online docs I've seen that std.string.maketrans() is (going to be)
deprecated.
How do you adapt this code to the new regime?
snip
Use an associative array for the translation table.
Or write your own functions that work in the same way as
Stewart Gordon:
Use an associative array for the translation table.
A new version of the code:
import std.stdio, std.string, std.range;
void main() {
char[] text = dssdadsdasdas.dup; // lots of MBs of pure 7 bit ASCII text
dchar[dchar] aa = ['A':'5', 'a':'5', 'B':'7', 'b':'7', 'C':'6',
On 11 February 2012 10:45, Jonathan M Davis jmdavisp...@gmx.com wrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know that feeling. I had no exposure to functional programming and
options like chain never come to my head. Although map is a concept that
I made friends with
On Sat, 11 Feb 2012 08:56:01 -0500, Timon Gehr timon.g...@gmx.ch wrote:
On 02/11/2012 08:48 AM, Jonathan M Davis wrote:
On Friday, February 10, 2012 22:41:20 Ellery Newcomer wrote:
dmd 2.057
Two mixin templates, each define toString, mix them in to your class
and ..
Error: function
On Sat, 11 Feb 2012 14:24:53 -0500, H. S. Teoh hst...@quickfur.ath.cx
wrote:
On Sat, Feb 11, 2012 at 11:02:43AM -0800, Jonathan M Davis wrote:
On Saturday, February 11, 2012 10:51:36 H. S. Teoh wrote:
This brings up an interesting point: what does the GC do if you have
an
array that's
On 02/13/2012 03:19 PM, James Miller wrote:
On 11 February 2012 10:45, Jonathan M Davisjmdavisp...@gmx.com wrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know that feeling. I had no exposure to functional programming and
options like chain never come to my head. Although
On Monday, February 13, 2012 08:09:06 bearophile wrote:
Stewart Gordon:
Use an associative array for the translation table.
A new version of the code:
import std.stdio, std.string, std.range;
void main() {
char[] text = dssdadsdasdas.dup; // lots of MBs of pure 7 bit ASCII
text
On Sunday, February 12, 2012 10:07:52 Ali Çehreli wrote:
Related question: Does D define the order of evaluation in an expression
like
foo() ~ bar()
Or is it unspecified as in C and C++?
It's currently unspecified. Walter has stated that he wants to make it so that
it's always left to
On 02/13/12 18:57, Jonathan M Davis wrote:
On Sunday, February 12, 2012 10:07:52 Ali Çehreli wrote:
Related question: Does D define the order of evaluation in an expression
like
foo() ~ bar()
Or is it unspecified as in C and C++?
It's currently unspecified. Walter has stated that he
Jonathan M Davis:
Do you have data to backup that there is a significant speed difference?
I have just written a small benchmark, it contains both the URL to the test
data and the timings I am seeing on a slow PC. If your PC is faster feel free
to use it on more data (creating a larger input
I have some D code that I would like to integrate into an existing CMake
infrastructure. I've seen these two projects:
http://www.dsource.org/projects/cmaked
http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/cmake/modules/language_support/cmake/Platform/
Both are quite old. Can anybody
On Monday, February 13, 2012 19:47:03 Artur Skawina wrote:
On 02/13/12 18:57, Jonathan M Davis wrote:
On Sunday, February 12, 2012 10:07:52 Ali Çehreli wrote:
Related question: Does D define the order of evaluation in an
expression
like
foo() ~ bar()
Or is it unspecified as in C
On Mon, 13 Feb 2012 12:15:23 -0700
Kai Meyer k...@unixlords.com wrote:
Both are quite old. Can anybody comment on the usability of either of
these projects? Or perhaps point me to another project that will work?
Try with newer: http://code.google.com/p/cmaked2/
Sincerely,
Gour
--
The
On 02/13/12 20:47, Jonathan M Davis wrote:
On Monday, February 13, 2012 19:47:03 Artur Skawina wrote:
On 02/13/12 18:57, Jonathan M Davis wrote:
On Sunday, February 12, 2012 10:07:52 Ali Çehreli wrote:
Related question: Does D define the order of evaluation in an
expression
like
foo() ~
On Monday, February 13, 2012 14:08:16 bearophile wrote:
Jonathan M Davis:
Do you have data to backup that there is a significant speed difference?
I have just written a small benchmark, it contains both the URL to the test
data and the timings I am seeing on a slow PC. If your PC is faster
On Monday, February 13, 2012 21:49:05 Artur Skawina wrote:
argument evaluation in this context means that given eg f(a,b,c);
it's not specified in what order the expressions 'a', 'b', and 'c'
are evaluated, which matters if they are dependent or have side
effects. (depending on arg passing
On 02/13/12 21:52, Jonathan M Davis wrote:
On Monday, February 13, 2012 21:49:05 Artur Skawina wrote:
argument evaluation in this context means that given eg f(a,b,c);
it's not specified in what order the expressions 'a', 'b', and 'c'
are evaluated, which matters if they are dependent or have
On Monday, February 13, 2012 22:24:38 Artur Skawina wrote:
The important thing here is - the order absolutely *must* be foo(), then
bar(), what happens under the hood is completely irrelevant. The reason is
simple - if this is not what happens then it's a serious compiler bug. And
if you can't
Would be bad or hard dmd keep those information, and outputs like gcc aka?
Pedro Lacerda
2012/2/12 Jonathan M Davis jmdavisp...@gmx.com
On Sunday, February 12, 2012 13:00:16 Trass3r wrote:
dmd simply doesn't keep those information about aliases.
Exactly.
- Jonathan M Davis
On Monday, February 13, 2012 19:59:40 Pedro Lacerda wrote:
Would be bad or hard dmd keep those information, and outputs like gcc aka?
It should be quite possible, but I have no idea how hard it would be.
Regardless, it's not the kind of change I'd expect anytime soon, because the
benefits are
On 02/13/12 22:58, Jonathan M Davis wrote:
On Monday, February 13, 2012 22:24:38 Artur Skawina wrote:
The important thing here is - the order absolutely *must* be foo(), then
bar(), what happens under the hood is completely irrelevant. The reason is
simple - if this is not what happens then
On 02/13/2012 11:27 PM, Artur Skawina wrote:
On 02/13/12 22:58, Jonathan M Davis wrote:
On Monday, February 13, 2012 22:24:38 Artur Skawina wrote:
The important thing here is - the order absolutely *must* be foo(), then
bar(), what happens under the hood is completely irrelevant. The reason is
On Monday, February 13, 2012 23:27:37 Artur Skawina wrote:
I'm not arguing that it _should_ be defined - just pointing out that the
fact that it currently _is_ means one should be able to assume it works.
After all there's only one D frontend and it comes from the vendor that
also effectively
On 02/13/12 23:39, Timon Gehr wrote:
On 02/13/2012 11:27 PM, Artur Skawina wrote:
On 02/13/12 22:58, Jonathan M Davis wrote:
On Monday, February 13, 2012 22:24:38 Artur Skawina wrote:
The important thing here is - the order absolutely *must* be foo(), then
bar(), what happens under the hood
I discovered something really cool today, and I thought I'd share it
with my fellow learners:
The unittest block is used for inserting unit tests that are executed at
runtime before main() is called. They are very useful for inserting
little tests after a piece of complex code, to make sure it
On Monday, February 13, 2012 15:12:15 H. S. Teoh wrote:
I discovered something really cool today, and I thought I'd share it
with my fellow learners:
The unittest block is used for inserting unit tests that are executed at
runtime before main() is called. They are very useful for inserting
On 14 February 2012 06:25, Timon Gehr timon.g...@gmx.ch wrote:
On 02/13/2012 03:19 PM, James Miller wrote:
On 11 February 2012 10:45, Jonathan M Davisjmdavisp...@gmx.com wrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know that feeling. I had no exposure to functional
On 14 February 2012 12:26, Jonathan M Davis jmdavisp...@gmx.com wrote:
On Monday, February 13, 2012 15:12:15 H. S. Teoh wrote:
I discovered something really cool today, and I thought I'd share it
with my fellow learners:
The unittest block is used for inserting unit tests that are executed at
On 02/13/2012 03:34 PM, James Miller wrote:
Saying it is not quicksort as much as it may conceptually resemble
quicksort is kinda odd, its like saying it is not a car, as much as
it may conceptually resemble a car because it doesn't run on petrol
or gas, but instead runs on environment
On 14 February 2012 12:45, Ali Çehreli acehr...@yahoo.com wrote:
On 02/13/2012 03:34 PM, James Miller wrote:
Saying it is not quicksort as much as it may conceptually resemble
quicksort is kinda odd, its like saying it is not a car, as much as
it may conceptually resemble a car because it
On Tuesday, February 14, 2012 13:02:43 James Miller wrote:
On 14 February 2012 12:45, Ali Çehreli acehr...@yahoo.com wrote:
On 02/13/2012 03:34 PM, James Miller wrote:
Saying it is not quicksort as much as it may conceptually resemble
quicksort is kinda odd, its like saying it is not a car,
On Tue, Feb 14, 2012 at 12:40:13PM +1300, James Miller wrote:
[...]
Its pretty cool, I didn't think about it, but it makes sense, since
the compiler essentially makes a new version of the code for each
instantiation.
Also I imagine that common-to-all tests should probably be done inside
the
On Mon, 13 Feb 2012 18:12:15 -0500, H. S. Teoh hst...@quickfur.ath.cx
wrote:
I discovered something really cool today, and I thought I'd share it
with my fellow learners:
The unittest block is used for inserting unit tests that are executed at
runtime before main() is called. They are very
On Mon, Feb 13, 2012 at 07:15:18PM -0500, Steven Schveighoffer wrote:
[...]
3. If you are making classes like this, make *sure* all your unit
test helper functions are non-virtual! Otherwise, if some code
instantiates with unit tests on and some off, you will have vtable
inconsistencies.
Le lundi 13 février 2012 à 20:45 +0100, Gour a écrit :
On Mon, 13 Feb 2012 12:15:23 -0700
Kai Meyer k...@unixlords.com wrote:
Both are quite old. Can anybody comment on the usability of either of
these projects? Or perhaps point me to another project that will work?
Try with newer:
On 02/14/2012 12:34 AM, James Miller wrote:
On 14 February 2012 06:25, Timon Gehrtimon.g...@gmx.ch wrote:
On 02/13/2012 03:19 PM, James Miller wrote:
On 11 February 2012 10:45, Jonathan M Davisjmdavisp...@gmx.comwrote:
On Friday, February 10, 2012 13:32:56 Marco Leise wrote:
I know
How would you chat with a server? This is my naive attempt:
class Client {
Socket socket;
Token fetch() {
ubyte[1024] buffer; // if more space is needed...
socket.receive(buffer);
return decode(buffer);
}
void send(Token tkn) {
ubyte[] buffer = encode(tkn);
What is the correct format for named character entities? According to
the online specs, I should be able to write:
dchar ch = 'amp;';
But gdc-4.6.2 refuses to compile this; apparently it wants:
dchar ch = '\amp;';
Which is right??
T
--
People say I'm indecisive, but I'm not
On 02/13/2012 09:46 PM, H. S. Teoh wrote:
What is the correct format for named character entities? According to
the online specs, I should be able to write:
dchar ch = 'amp;';
But gdc-4.6.2 refuses to compile this; apparently it wants:
dchar ch = '\amp;';
Which is right??
T
On Tue, 14 Feb 2012 01:37:20 +0100
bioinfornatics bioinfornat...@fedoraproject.org wrote:
Maybe send a pull request to main cmake repo will be better. It is
always better to put code to upstream
I did ask in the mailing list (sometime ago) about the procedure to
include it to upstream, but got
40 matches
Mail list logo