On 04/18/2017 06:40 PM, Meta wrote:
> On Wednesday, 19 April 2017 at 00:22:14 UTC, Mike B Johnson wrote:
>> On Tuesday, 18 April 2017 at 23:49:35 UTC, ketmar wrote:
>>> Mike B Johnson wrote:
>>>
How can I get the return type of the current method without
specifying the name or any
On Wednesday, 19 April 2017 at 02:53:18 UTC, Stanislav Blinov
wrote:
I'd very much like to hear your thoughts on this, good/bad, if
it already was proposed, anything. If it's found feasible, I
could start a DIP. Destroy, please.
I don't have comments about the syntax, but I did want this
On Tuesday, 18 April 2017 at 13:48:57 UTC, Stanislav Blinov wrote:
There's a much more concise workaround, both in code written
and generated ;)
import std.stdio;
template func(string file = __FILE__, int line = __LINE__)
{
auto func(T...)(auto ref T args)
{
writeln("called
On Wednesday, 19 April 2017 at 03:52:54 UTC, Nierjerson wrote:
Major optilink bugs, blocker. Code is long but demonstrates the
issue. Compiles with ldc.
[...]
There are two instances of void ForegroundColor(cSolidColor rhs)
Nierjerson wrote:
Major optilink bugs, blocker.
not at optlink bug.
Major optilink bugs, blocker. Code is long but demonstrates the
issue. Compiles with ldc.
The source is large so I uploaded it
https://ufile.io/odaee
or
https://files.fm/u/frmks29t
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
https://issues.dlang.org/show_bug.cgi?id=17332
Issue ID: 17332
Summary: optilink or dmd bug
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: critical
Priority: P1
On Wednesday, 19 April 2017 at 00:30:31 UTC, Walter Bright wrote:
I'm not saying you cannot do cool and useful things with AST
macros. My position is it encourages absolutely awful code as
(usually inexperienced) programmers compete to show how clever
their macros are.
I'd think that that's
On Monday, 17 April 2017 at 14:23:50 UTC, Jonathan M Davis wrote:
On Monday, April 17, 2017 13:45:18 Dmitry via
Digitalmars-d-learn wrote:
[...]
Every time there's a new template instantiation, it's
essentially copy-pasting the entire template. So, if you have
the templated function
[...]
Currently, we have the ability to disable postblit and/or
assignments, thus create non-copyable types.
But it is always assumed that a value can be moved. Normally,
this is great, as we don't have to deal with additional
constructors explicitly. There are, however, occasions when move
is
https://issues.dlang.org/show_bug.cgi?id=17331
Heromyth changed:
What|Removed |Added
Summary|appender can't be use for |appender can't be used for
https://issues.dlang.org/show_bug.cgi?id=17331
Issue ID: 17331
Summary: appender can't be use for initialization
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
I've been wanting to have support for interpolated strings in
D for some time now that will allow you to write e.g.:
[...]
One place I'd appreciate interpolated strings is as an option
when working with heredoc strings. These
On Wednesday, 19 April 2017 at 00:22:14 UTC, Mike B Johnson wrote:
On Tuesday, 18 April 2017 at 23:49:35 UTC, ketmar wrote:
Mike B Johnson wrote:
How can I get the return type of the current method without
specifying the name or any complexity? Similar to
typeof(this).
typeof(return)
On Wednesday, 12 April 2017 at 06:22:26 UTC, Ali Çehreli wrote:
On 04/11/2017 11:01 PM, Szabo Bogdan wrote:
should.not.throwAnyException({
throw new Exception("test");
});
what do you mean, they are not documented? there is a md file
fith some
examples here:
On 4/18/2017 4:58 PM, bpr wrote:
Here's how it's done in Nim, a statically typed language similar to D, but with
Python syntax, and macros. It takes some knowledge to understand, sure, macros
are not a beginner tool, but wouldn't say this is extremely complex. I bet a
D-with-macros would have a
On Tuesday, 18 April 2017 at 23:49:35 UTC, ketmar wrote:
Mike B Johnson wrote:
How can I get the return type of the current method without
specifying the name or any complexity? Similar to typeof(this).
typeof(return)
Thanks, sweet and simple!
On 4/18/2017 2:56 PM, Jonathan Marler wrote:
Have you thought about supporting format specifiers as well? I looked at the C#
version and it looks like they can specify them using a colon like this:
$"{a} in hex is {a:x}"
There are additional problems, such as:
$"{a} in %s {b}"
and
On Tuesday, 18 April 2017 at 08:01:14 UTC, Jacob Carlborg wrote:
On 2017-04-18 08:59, Stefan Koch wrote:
The corresponding ast-macros would be extremely complex
No, it's not that complex.
Here's how it's done in Nim, a statically typed language similar
to D, but with Python syntax, and
Mike B Johnson wrote:
How can I get the return type of the current method without specifying
the name or any complexity? Similar to typeof(this).
typeof(return)
How can I get the return type of the current method without
specifying the name or any complexity? Similar to typeof(this).
On 2017-04-18 23:56, Jonathan Marler wrote:
I've thought about it and decided, I like this idea. I've only used
interpolated strings in PHP which left a bad taste, but I realized that
interpolating strings makes it impossible for your format string and
your arguments to get out of sync. This
On Tue, Apr 18, 2017 at 09:56:28PM +, Jonathan Marler via Digitalmars-d
wrote:
[...]
> I've thought about it and decided, I like this idea. I've only used
> interpolated strings in PHP which left a bad taste, but I realized
> that interpolating strings makes it impossible for your format
On Tuesday, 18 April 2017 at 08:50:07 UTC, Walter Bright wrote:
On 4/15/2017 4:51 PM, cym13 wrote:
Removing imports is a good point, the first concrete one to be
mentionned. I'm
not sure it matters that much though as I think those imports
are generic enough
that I believe they would be
On Tuesday, April 18, 2017 19:54:26 Mike B Johnson via Digitalmars-d-learn
wrote:
> can this be updated to work?
>
> https://wiki.dlang.org/Timing_Code
Wow, that's using some old stuff - stuff older than the wiki. Weird. It was
probably ported from somewhere.
The best thing to use now is
On 4/18/17 9:14 PM, Swoorup Joshi wrote:
On Tuesday, 18 April 2017 at 18:09:54 UTC, Thomas Brix Larsen wrote:
"Cap’n Proto is an insanely fast data interchange format and
capability-based RPC system. Think JSON, except binary. Or think
Protocol Buffers, except faster."
This is the initial
On Tuesday, 18 April 2017 at 18:09:54 UTC, Thomas Brix Larsen
wrote:
"Cap’n Proto is an insanely fast data interchange format and
capability-based RPC system. Think JSON, except binary. Or
think Protocol Buffers, except faster."
This is the initial public release of my optimized port of the
can this be updated to work?
https://wiki.dlang.org/Timing_Code
On Tuesday, 18 April 2017 at 17:58:32 UTC, WhatMeWorry wrote:
On Tuesday, 18 April 2017 at 15:15:47 UTC, Stanislav Blinov
wrote:
On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
When I try to upload these files to my new repo, GitHub
(rightfully so) complains that
I have too many
On Tuesday, 18 April 2017 at 18:09:54 UTC, Thomas Brix Larsen
wrote:
"Cap’n Proto is an insanely fast data interchange format and
capability-based RPC system. Think JSON, except binary. Or
think Protocol Buffers, except faster."
This is the initial public release of my optimized port of the
https://issues.dlang.org/show_bug.cgi?id=7102
--- Comment #5 from hst...@quickfur.ath.cx ---
To make matters worse, std.numeric.gcd has no sig constraints, so once you
import std.numeric.gcd, you cannot even define a BigInt specialization of gcd
in your own code without causing a conflict in the
"Cap’n Proto is an insanely fast data interchange format and
capability-based RPC system. Think JSON, except binary. Or think
Protocol Buffers, except faster."
This is the initial public release of my optimized port of the
Java implementation of Cap'n Proto.
State:
* Passes Cap'n Proto
On Tuesday, 18 April 2017 at 15:15:47 UTC, Stanislav Blinov wrote:
On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
When I try to upload these files to my new repo, GitHub
(rightfully so) complains that
I have too many files. Since I'm using sdl and not json, can I
safely delete
https://issues.dlang.org/show_bug.cgi?id=7102
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
On 04/18/2017 03:00 AM, Shachar Shemesh wrote:
D would have the ability to have a nice container that would do RAII
(for classes since for structs, __dtors are called automatically)
That's just it, though. They are not. Not reliably.
Yah, clearly there's a problem with the language
On 04/18/2017 10:55 AM, Russel Winder via Digitalmars-d wrote:
On Tue, 2017-04-18 at 09:23 -0400, Andrei Alexandrescu via Digitalmars-
d wrote:
On 4/18/17 8:48 AM, prdan wrote:
Thanks, maybe I will write a blog post about my experiences also.
That would be great! Michael Parker may be of
On Tue, Apr 18, 2017 at 07:34:34AM +, Alex via Digitalmars-d wrote:
[...]
> I realise there are no headers, that is the problem. SCons can't tell
> whether a change to a module affects the interface, only affects the
> implementation or only affects a unit test. This means everything that
>
https://issues.dlang.org/show_bug.cgi?id=17329
--- Comment #2 from Rainer Koschnick ---
Thanks for the hint, but it doesn't change anything.
Error:
On Tuesday, 18 April 2017 at 15:07:27 UTC, WhatMeWorry wrote:
When I try to upload these files to my new repo, GitHub
(rightfully so) complains that
I have too many files. Since I'm using sdl and not json, can I
safely delete all the files
that pertain to json? Can I do this some way at the
Just some basic questions regarding Dub projects with GitHub. I'm
just getting
my toes wet with GitHub so these might be pretty naive questions.
I've got about 35 mini dub projects where each project holds an
OpenGL tutorial.
like so:
01_01_hello_window
.dub
build
On Tuesday, 18 April 2017 at 14:15:59 UTC, Stanislav Blinov wrote:
On Tuesday, 18 April 2017 at 14:09:28 UTC, Stanislav Blinov
wrote:
foreach(row; result)
{
arr ~= row.toStruct(cargpspoint);
}
Sorry, this should be
foreach(row; result)
{
On Tue, 2017-04-18 at 09:23 -0400, Andrei Alexandrescu via Digitalmars-
d wrote:
> On 4/18/17 8:48 AM, prdan wrote:
> > Thanks, maybe I will write a blog post about my experiences also.
>
> That would be great! Michael Parker may be of help if you consider
> publishing in the official D Blog. --
On Tuesday, 18 April 2017 at 13:48:57 UTC, Stanislav Blinov wrote:
On Tuesday, 18 April 2017 at 13:28:06 UTC, Solomon E wrote:
I tried to produce an example of calling a function with
variadic template arguments using special tokens __FILE__ and
__LINE__.
This compiles and runs, producing
On Tuesday, 18 April 2017 at 14:09:28 UTC, Stanislav Blinov wrote:
foreach(row; result)
{
arr ~= row.toStruct(cargpspoint);
}
Sorry, this should be
foreach(row; result)
{
row.toStruct(cargpspoint);
arr ~= cargpspoint;
}
On Tuesday, 18 April 2017 at 13:28:57 UTC, Suliman wrote:
Also I can't understand why app take so much memory? I checked
array of structures size with this code:
auto mymem = cargpspoints.length *
typeof(cargpspoints[0]).sizeof;
writeln(mymem);
And it's print: 16963440
it's about 16MB...
On Tuesday, 18 April 2017 at 13:28:06 UTC, Solomon E wrote:
I tried to produce an example of calling a function with
variadic template arguments using special tokens __FILE__ and
__LINE__.
This compiles and runs, producing the output shown, using the
default gdc
provided by Ubuntu 17.04.
Also I can't understand why app take so much memory? I checked
array of structures size with this code:
auto mymem = cargpspoints.length *
typeof(cargpspoints[0]).sizeof;
writeln(mymem);
And it's print: 16963440
it's about 16MB...
What is takes all other memory?
On Tuesday, 18 April 2017 at 10:13:09 UTC, Jonathan M Davis wrote:
On Monday, April 17, 2017 07:23:50 Jonathan M Davis via
Digitalmars-d-learn wrote:
So, if you're okay with explicitly instantiating your variadic
function template instead of having the types inferred, then
it can work, but
On 4/18/17 8:48 AM, prdan wrote:
Thanks, maybe I will write a blog post about my experiences also.
That would be great! Michael Parker may be of help if you consider
publishing in the official D Blog. -- Andrei
https://issues.dlang.org/show_bug.cgi?id=17309
--- Comment #4 from ag0ae...@gmail.com ---
(In reply to Walter Bright from comment #3)
> I think that trouble here is that attribute inference is not done until the
> template is instantiated. But the compiler does not instantiate a template
> until
https://issues.dlang.org/show_bug.cgi?id=17330
Issue ID: 17330
Summary: [REG 2.072] BigInt's constructor used to be pure
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
On Tuesday, 18 April 2017 at 12:22:10 UTC, Andrei Alexandrescu
wrote:
Cool, thanks for this work! However, a word of caution -
experiments ran on different CPUs can't count as comparable.
I didn't compare D times to numbers from benchmarks game site.
I've ran other languages on the same
On 18/04/2017 1:22 PM, Andrei Alexandrescu wrote:
On 04/17/2017 10:57 PM, prdan wrote:
I've written multi-threaded regex-redux benchmark for D language and
made some tests. This is my first program written in D, I didn't know
much about D a week ago.
Here are the results for other languages:
On 04/17/2017 10:57 PM, prdan wrote:
I've written multi-threaded regex-redux benchmark for D language and
made some tests. This is my first program written in D, I didn't know
much about D a week ago.
Here are the results for other languages:
On Monday, 17 June 2013 at 22:38:47 UTC, Timothee Cour wrote:
inside std.process it says:
// Pids are only meant to be constructed inside this module, so
we make the
constructor private.
However, this makes a number of useful functions from
std.process useless
unless the processes were
On Tuesday, 18 April 2017 at 08:50:07 UTC, Walter Bright wrote:
It may not be necessary to have any dependencies on any import.
$"{a} times 3 is {a*3}"
could be rewritten by the parser to:
"%s times 3 is %s", a, a * 3
and that is that. (I.e. just an AST rewrite.) It would be quite
a
I am writing app that extract data from DB to array of structures.
void getSingleTrackInfo()
{
foreach(item; getTablesGPSSensorList)
{
ResultRange result = mysqlconnection.query(sqlquery);
On 2017-04-18 10:50, Walter Bright wrote:
It may not be necessary to have any dependencies on any import.
$"{a} times 3 is {a*3}"
could be rewritten by the parser to:
"%s times 3 is %s", a, a * 3
and that is that. (I.e. just an AST rewrite.) It would be quite a bit
simpler than
On Tuesday, 18 April 2017 at 07:22:29 UTC, thedeemon wrote:
Which compiler did you use for D?
I've used newest LDC.
In benchmarks where some fixed amount of work should be done as
fast as possible low CPU usage is not a good sign, it just
means some cores were idle when they could really
On Tuesday, 18 April 2017 at 07:22:29 UTC, thedeemon wrote:
In benchmarks where some fixed amount of work should be done as
fast as possible low CPU usage is not a good sign, it just
means some cores were idle when they could really be working.
Minor note: sometimes high CPU usage isn't good
On Monday, April 17, 2017 07:23:50 Jonathan M Davis via Digitalmars-d-learn
wrote:
> So, if you're okay with explicitly instantiating your variadic function
> template instead of having the types inferred, then it can work, but
> otherwise, no. Making it work would require a language enhancement
https://issues.dlang.org/show_bug.cgi?id=8687
Jonathan M Davis changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=17309
Walter Bright changed:
What|Removed |Added
Resolution|FIXED |WONTFIX
--
https://issues.dlang.org/show_bug.cgi?id=17309
Walter Bright changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=17309
--- Comment #2 from Walter Bright ---
(In reply to Walter Bright from comment #1)
> It also compiles with dmd 2.070, didn't check other versions.
I don't know what I did there. I can't get it to compile with any dmd
https://issues.dlang.org/show_bug.cgi?id=12115
Daniel Čejchan changed:
What|Removed |Added
CC||czda...@gmail.com
--
https://issues.dlang.org/show_bug.cgi?id=17321
Walter Bright changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=17326
--- Comment #3 from Walter Bright ---
The problem is I cannot get the DLL test cases into the autotester test suite,
which is why DLL support regularly breaks.
--
On Tuesday, 18 April 2017 at 09:24:39 UTC, Dsby wrote:
[...]
In github : https://github.com/dushibaiyu/yu
In dub : http://code.dlang.org/packages/yu
algorithm
snowflkeId.d : Twitter's Snowflke ID generate
algorithm.to generate only ID
container : the container base std.experimental.allocator
cirularqueue : Cirular Queue Struct Template.
vector : Like as C++'s std::vector
eventloop : the io(Net) event
On Tuesday, 18 April 2017 at 09:05:10 UTC, Andrea Fontana wrote:
On Tuesday, 18 April 2017 at 00:48:05 UTC, Jethro wrote:
How to combine the need to localize a result for an if
statement and have to call a method to get proper comparison:
[...]
which should simplify to
if ((auto x =
On Tuesday, 18 April 2017 at 00:48:05 UTC, Jethro wrote:
How to combine the need to localize a result for an if
statement and have to call a method to get proper comparison:
[...]
which should simplify to
if ((auto x = foo()).valid())
{
}
but this code does not work.
[...]
for(auto x =
On 4/15/2017 4:51 PM, cym13 wrote:
Removing imports is a good point, the first concrete one to be mentionned. I'm
not sure it matters that much though as I think those imports are generic enough
that I believe they would be imported anyway, but it's a real point.
It may not be necessary to
On 4/15/2017 1:04 PM, Jonas Drewsen wrote:
[...]
Thanks for doing the work to make a sample implementation, too. I don't know if
this will make it into D, but Jonas is a fine example of a champion.
On 2017-04-18 08:59, Stefan Koch wrote:
The corresponding ast-macros would be extremely complex
No, it's not that complex.
, slow and worst
of all not checkable.
What do you mean "not checkable"?
--
/Jacob Carlborg
On Tue, 2017-04-18 at 07:34 +, Alex via Digitalmars-d wrote:
>
[…]
> I know, I have been using your work in SCons to build in this
> mode since it was first available.
Excellent. :-)
[…]
> > >
> I realise there are no headers, that is the problem. SCons can't
> tell whether a change to a
On Tuesday, 18 April 2017 at 06:51:51 UTC, Russel Winder wrote:
I have been trying to do the opposite with scons - incremental
builds. In c++ the .h and .cpp files allowed the compilation
from many edits to be limited to one translation unit.
Per module compilation then linking is the default
On Tuesday, 18 April 2017 at 02:57:59 UTC, prdan wrote:
I've written multi-threaded regex-redux benchmark for D
language and made some tests.
Nice!
Rust version 1.16 (newest stable)
GCC ver 4.9.2 (newest debian 8 stable)
Which compiler did you use for D?
C was the fastest (1.32) but used
On Mon, 2017-04-17 at 15:10 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> alias RangeType = typeof(return);
> return new RangeType(() {});
It appears the answer to my question is:
return typeof(return)();
Thanks to Ali and T for setting on the right path.
--
Russel.
On Mon, 2017-04-17 at 22:56 +, Atila Neves via Digitalmars-d-learn
wrote:
>
[…]
> https://github.com/russel/ApproxGC/pull/2
>
> Unfortunately the auto generated integration test main file
> doesn't quite work (feel free to file a bug on unit-threaded) so
> in that PR I disabled
D would have the ability to have a nice container that would do RAII
(for classes since for structs, __dtors are called automatically)
That's just it, though. They are not. Not reliably.
Shachar
On Tuesday, 18 April 2017 at 06:54:11 UTC, Jacob Carlborg wrote:
On 2017-04-17 21:28, Jonas Drewsen wrote:
The page could also list pre-approved language
changes such as async functions (which Walter wants afaik).
Another feature that can be implemented with AST macros. This
is starting to
On Mon, 2017-04-17 at 18:53 +, Nordlöw via Digitalmars-d wrote:
>
[…]
> Nice. I'm using SCons in my everyday development. I'll give your
> feature a try.
My pull request is currently being reviewed and some updates are
needed. These will appear immediately in the SCons_D_Experiment. I'll
On 2017-04-17 21:28, Jonas Drewsen wrote:
The page could also list pre-approved language
changes such as async functions (which Walter wants afaik).
Another feature that can be implemented with AST macros. This is
starting to get ridicules. So many features have been added and are
talked
On Mon, 2017-04-17 at 22:59 +, Atila Neves via Digitalmars-d wrote:
> […]
> In D, this is nearly always slower (I measured). Compiling per
> package, however, is a lot faster.
I have only ever needed file-by-file or whole source compilation, I
have never needed package-oriented compilation.
On Mon, 2017-04-17 at 20:56 +, Alex via Digitalmars-d wrote:
> On Monday, 17 April 2017 at 17:51:33 UTC, Russel Winder wrote:
> > Just in case anyone gives a :
> >
> > I have submitted a pull request that adds ProgramAllAtOnce
>
> I have been trying to do the opposite with scons -
86 matches
Mail list logo