On Monday, 5 March 2012 at 15:35:59 UTC, Steven Schveighoffer
wrote:
On Wed, 29 Feb 2012 20:25:35 -0500, bearophile
wrote:
Do you know why std.array.Appender defines a "put" method
instead of overloading the "~=" operator?
It should (in addition to put). I see you have already filed
an en
I tried to use map! but it's look like it do not work with
string, becouse I got error: Error: no property 'map' for type
'ByLine!(char, char)'
On Tuesday, 13 October 2015 at 13:21:54 UTC, Suliman wrote:
I tried to use map! but it's look like it do not work with
string, becouse I got error: Error: no property 'map' for type
'ByLine!(char, char)'
I suspect you don't have it imported.
import std.algorithm;
or
import std.algorithm : m
On Tuesday, 13 October 2015 at 13:34:02 UTC, John Colvin wrote:
On Tuesday, 13 October 2015 at 13:21:54 UTC, Suliman wrote:
I tried to use map! but it's look like it do not work with
string, becouse I got error: Error: no property 'map' for type
'ByLine!(char, char)'
I suspect you don't have
On Tuesday 13 October 2015 15:42, Suliman wrote:
> map!(a=> a~=" +") work fine, but how to add before
> at same time?
Use ~ instead of ~=, like so: map!(a => "+" ~ a ~ "+")
something like: auto content = file.byLine.map!("start " ~ a=>a ~
" end");
On Tuesday 13 October 2015 15:47, Suliman wrote:
> something like: auto content = file.byLine.map!("start " ~ a=>a ~
> " end");
That's not how it works at all. Maybe stick to the examples of whatever
resource you're learning from, for now.
On Tuesday, 13 October 2015 at 13:55:07 UTC, anonymous wrote:
On Tuesday 13 October 2015 15:47, Suliman wrote:
something like: auto content = file.byLine.map!("start " ~
a=>a ~ " end");
That's not how it works at all. Maybe stick to the examples of
whatever resource you're learning from, for
On Tuesday, 13 October 2015 at 13:51:50 UTC, anonymous wrote:
On Tuesday 13 October 2015 15:42, Suliman wrote:
map!(a=> a~=" +") work fine, but how to add before at same
time?
Use ~ instead of ~=, like so: map!(a => "+" ~ a ~ "+")
Thanks!
Hi,
I am trying to use variantArray() as a data table object to hold
columns each of which is an array of a specific type. I need to
be able to get values from data table but I am having problems ...
import std.stdio; // i/o
import std.variant; // type variations
void main(){
// Columns o
On Tuesday, 13 October 2015 at 15:17:15 UTC, data pulverizer
wrote:
Hi,
I am trying to use variantArray() as a data table object to
hold columns each of which is an array of a specific type. I
need to be able to get values from data table but I am having
problems ...
import std.stdio; // i
Thanks for the suggestion Alex, however I need the dynamic
behaviour properties of variantArray(), writing a struct each
time would be undesirable.
Perhaps I could boil down the question to something like, is
there a way of writing
auto x = dt[0][0];
auto y = x.get!(x.type - or whatever); //
On Tuesday, 13 October 2015 at 16:22:36 UTC, data pulverizer
wrote:
Thanks for the suggestion Alex, however I need the dynamic
behaviour properties of variantArray(), writing a struct each
time would be undesirable.
Perhaps I could boil down the question to something like, is
there a way of w
On Sunday, 11 October 2015 at 11:17:29 UTC, Nordlöw wrote:
Here's a solution:
https://github.com/nordlow/justd/blob/f8519e8a1af68bc25cc00c6ef12d13efa791250c/comparison_ex.d
Latest version contains a few fixes:
https://github.com/nordlow/justd/blob/master/comparison_ex.d
On Sunday, October 11, 2015 22:21:55 H. S. Teoh via Digitalmars-d-learn wrote:
> It's best to parenthesize when mixing other operators with ?, because ?
> has a pretty low precedence and may "steal" arguments from surrounding
> operators that you don't intend. My suspicion is that what you wrote i
I have defined a struct UTCOffset in
https://github.com/nordlow/justd/blob/master/datetime_ex.d
Everything works as desired except for
import std.conv : to;
assert(UTCOffset(+14, 0).to!string == "UTC+14:00");
which fails as
/usr/include/dmd/phobos/std/conv.d(293,14): Error: template
On Tuesday, October 13, 2015 21:07:07 Nordlöw via Digitalmars-d-learn wrote:
> I have defined a struct UTCOffset in
>
> https://github.com/nordlow/justd/blob/master/datetime_ex.d
>
> Everything works as desired except for
>
> import std.conv : to;
> assert(UTCOffset(+14, 0).to!string == "
On 10/13/2015 02:07 PM, Nordlöw wrote:
I have defined a struct UTCOffset in
https://github.com/nordlow/justd/blob/master/datetime_ex.d
Everything works as desired except for
import std.conv : to;
assert(UTCOffset(+14, 0).to!string == "UTC+14:00");
which fails as
/usr/include/dmd/ph
On Tuesday, 13 October 2015 at 21:50:54 UTC, Jonathan M Davis
wrote:
Just glancing at your code, you've marked toString with
@property, which is kind of a weird thing to do, nd if we ever
make @property enforce that it's not called with parens, then
that code won't work. So, you might try movin
On Tuesday, 13 October 2015 at 22:21:43 UTC, Ali Çehreli wrote:
Reduced with a workaround:
struct UTCOffset
{
import std.conv : to;// Move to module scope to compile
This introduces UTCOffset.to as an alias to std.conv.to.
string toString() const
{
return "hello";
https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow
Andrei suggested posting more widely.
On 13/10/15 5:17 PM, holo wrote:
On Tuesday, 13 October 2015 at 02:03:46 UTC, Rikki Cattermole wrote:
On 13/10/15 5:56 AM, holo wrote:
@Rikki:
If you didn't need to make it easily changeable I would say not even
bother with OOP at all.
Basically that what i had was enough for me and on top
On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote:
https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow
Andrei suggested posting more widely.
That's flaimbait:
«Many really popular websites use Python. But why is that?
Doesn't it affect the performance of the we
23 matches
Mail list logo