On Wednesday, 9 August 2017 at 02:11:13 UTC, Johnson Jones wrote:
I like to create code that automates much of the manual labor
that we, as programmers, are generally forced to do. D
generally makes much of this work automatable. For example, I
have created the following code which makes
I like to create code that automates much of the manual labor
that we, as programmers, are generally forced to do. D generally
makes much of this work automatable. For example, I have created
the following code which makes loading dlls similar to libs:
/* Import DLL functions in to type T.
Why does the following code error out with:
app.d(12,10): Error: function app.FunctionWithArguments (uint i)
is not callable using argument types ()
Code:
import std.stdio;
void FunctionWithoutArguments() {
}
void FunctionWithArguments(uint i) {
}
void main()
{
On Tuesday, 8 August 2017 at 21:37:40 UTC, Mike Wey wrote:
On 07-08-17 23:52, Johnson Jones wrote:
On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote:
On 07-08-17 22:46, Johnson Jones wrote:
[...]
This appears to be a GTK issue, a work around might be to get
the Window handle from
On 07-08-17 23:52, Johnson Jones wrote:
On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote:
On 07-08-17 22:46, Johnson Jones wrote:
[...]
This appears to be a GTK issue, a work around might be to get the
Window handle from gtk and use the Windows API to set the taskbar
visibility.
On Monday, 7 August 2017 at 13:40:18 UTC, Moritz Maxeiner wrote:
Thanks, I wasn't aware of this. I tried fooling around scope
classes and DIP1000 for a bit and was surprised that this is
allowed:
Thanks for the test case :-)
It was fun to see that ASan can catch this bug too. Because
Has anybody written a wrapper around `std.file.readText` (or
similar) that appends a final zero-byte terminator in order to
realize sentinel-based search in textual parsers.
I'm wondering if there is an easy way to create a single extra
thread that one can pass delegates(code) to and it executes it
properly. The thread never closes except at shutdown.
The idea is that isn't of creating one thread per task, there is
one thread that executes each task.
Obviously
I was about to say "use NotNull" but there still isn't one in
std.typecons. ugh.
But it is just a wrapper type that checks null in the contracts
too, so you can do it at the function itself.
On Tuesday, 8 August 2017 at 10:07:54 UTC, data pulverizer wrote:
On Tuesday, 8 August 2017 at 09:51:40 UTC, Moritz Maxeiner
wrote:
If your code depends on capabilities of a specific D compiler,
I wouldn't depend on build tools for that, I'd make it clear
in the source code via conditional
On 2017-08-08 12:38 PM, Steven Schveighoffer wrote:
On 8/8/17 2:56 PM, ag0aep6g wrote:
On 08/08/2017 08:34 PM, Johan Engelen wrote:
How would you express the function interface intent that a
reference to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is
On Tuesday, 8 August 2017 at 19:38:19 UTC, Steven Schveighoffer
wrote:
Note that C++ also can do this, so I'm not sure the & is
accomplishing the correct goal:
void foo(Klass&);
int main()
{
Klass *k = NULL;
foo(*k);
}
In C++, it is clear that the _caller_ is doing the
On Tuesday, 8 August 2017 at 18:57:48 UTC, Steven Schveighoffer
wrote:
On 8/8/17 2:34 PM, Johan Engelen wrote:
Hi all,
How would you express the function interface intent that a
reference to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is
valid. How do I
On Tuesday, 8 August 2017 at 16:00:17 UTC, Steven Schveighoffer
wrote:
I wouldn't use formattedRead, as I think this is going to
allocate temporaries for a and b.
What would you suggest to use in its stead? My use-case is
similar to the OP's in that I have a string of tokens that I want
On 8/8/17 2:56 PM, ag0aep6g wrote:
On 08/08/2017 08:34 PM, Johan Engelen wrote:
How would you express the function interface intent that a
reference to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is valid. How do
I express that that is invalid? (let's
On 08/08/2017 08:34 PM, Johan Engelen wrote:
How would you express the function interface intent that a reference
to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is valid. How do I
express that that is invalid? (let's leave erroring with a compile error
On 8/8/17 2:34 PM, Johan Engelen wrote:
Hi all,
How would you express the function interface intent that a reference
to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is valid. How do I
express that that is invalid? (let's leave erroring with a compile error
Hi all,
How would you express the function interface intent that a
reference to a class may not be null?
For a function "void foo(Klass)", calling "foo(null)" is valid.
How do I express that that is invalid? (let's leave erroring with
a compile error aside for now)
Something equivalent to
On Tuesday, 8 August 2017 at 16:00:17 UTC, Steven Schveighoffer
wrote:
On 8/8/17 11:28 AM, Guillaume Chatelet wrote:
Let's say I'm processing MB of data, I'm lazily iterating over
the incoming lines storing data in an associative array. I
don't want to copy unless I have to.
Contrived
On 8/8/17 11:28 AM, Guillaume Chatelet wrote:
Let's say I'm processing MB of data, I'm lazily iterating over the
incoming lines storing data in an associative array. I don't want to
copy unless I have to.
Contrived example follows:
input file
--
a,b,15
c,d,12
Efficient
On 8/8/17 10:52 AM, Suliman wrote:
your examples generate me:
DLANG.ru
(c) DLANG 2017
That's the template without the block.
The only one modification that I did I changes pages names:
Let's say I'm processing MB of data, I'm lazily iterating over
the incoming lines storing data in an associative array. I don't
want to copy unless I have to.
Contrived example follows:
input file
--
a,b,15
c,d,12
...
Efficient ingestion
---
void main() {
your examples generate me:
DLANG.ru
(c) DLANG 2017
The only one modification that I did I changes pages names:
extends home
Am I right understand that I can extend only one template?
On 8/8/17 9:19 AM, Suliman wrote:
Still can't get it work.
include header
..MainContainer
..Header
.HeaderMenu
.HeaderBlock
a(href="/") General
.HeaderBlock
a(href="/FAQ") FAQ
.HeaderBlock
a(href="/book") Book
.HeaderLoginBlock Sign in
..Middle
f
On Tuesday, 8 August 2017 at 13:22:58 UTC, Steven Schveighoffer
wrote:
On 8/8/17 9:10 AM, Suliman wrote:
Yes, thanks what: extends layout mean?
It means that your final file will be layout.dt, but with the
block statements replaced with the contents defined by the
specific view file.
On 8/8/17 9:10 AM, Suliman wrote:
Yes, thanks what: extends layout mean?
It means that your final file will be layout.dt, but with the block
statements replaced with the contents defined by the specific view file.
Think of it like an interface, where the "blocks" are function
prototypes,
Still can't get it work.
include header
.MainContainer
.Header
.HeaderMenu
.HeaderBlock
a(href="/") General
.HeaderBlock
a(href="/FAQ") FAQ
.HeaderBlock
a(href="/book") Book
.HeaderLoginBlock Sign in
.Middle
f
include footer
it's template is compilable,
Yes, thanks what: extends layout mean?
On 8/8/17 8:38 AM, Suliman wrote:
On Tuesday, 8 August 2017 at 11:59:38 UTC, Suliman wrote:
On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote:
For example I am making simple site with header and footer. header
and footer will be same for all pages. I do not want to do copy-paste
it in
On Tuesday, 8 August 2017 at 11:59:38 UTC, Suliman wrote:
On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote:
For example I am making simple site with header and footer.
header and footer will be same for all pages. I do not want to
do copy-paste it in every page. I want write it's once
On Tuesday, 8 August 2017 at 11:55:09 UTC, Suliman wrote:
For example I am making simple site with header and footer.
header and footer will be same for all pages. I do not want to
do copy-paste it in every page. I want write it's once and than
simpy import in every page. Is it's possible to
For example I am making simple site with header and footer.
header and footer will be same for all pages. I do not want to do
copy-paste it in every page. I want write it's once and than
simpy import in every page. Is it's possible to do with vibed?
On Tuesday, 8 August 2017 at 09:51:40 UTC, Moritz Maxeiner wrote:
If your code depends on capabilities of a specific D compiler,
I wouldn't depend on build tools for that, I'd make it clear in
the source code via conditional compilation [1]:
---
version (DigitalMars)
{
}
else version (LDC)
{
On Tuesday, 8 August 2017 at 09:31:49 UTC, data pulverizer wrote:
On Tuesday, 8 August 2017 at 09:21:54 UTC, Moritz Maxeiner
wrote:
On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer
wrote:
Hi,
I would like to know how to specify dmd or ldc compiler and
version in a json dub file.
On Tuesday, 8 August 2017 at 09:21:54 UTC, Moritz Maxeiner wrote:
On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer
wrote:
Hi,
I would like to know how to specify dmd or ldc compiler and
version in a json dub file.
Thanks in advance.
You can't [1]. You can specify the compiler to
On Tuesday, 8 August 2017 at 09:17:02 UTC, data pulverizer wrote:
Hi,
I would like to know how to specify dmd or ldc compiler and
version in a json dub file.
Thanks in advance.
You can't [1]. You can specify the compiler to use only on the
dub command line via `--compiler=`.
[1]
Hi,
I would like to know how to specify dmd or ldc compiler and
version in a json dub file.
Thanks in advance.
On Tuesday, 8 August 2017 at 05:37:41 UTC, ANtlord wrote:
On Sunday, 6 August 2017 at 15:47:43 UTC, Moritz Maxeiner wrote:
If you use this option, do be aware that this feature has been
> scheduled for future deprecation [1].
It's likely going to continue working for quite a while
(years),
On Tuesday, 8 August 2017 at 06:03:06 UTC, Nrgyzer wrote:
Hi guys,
I've the following code:
abstract class a {}
class b : a { this(a* myAttr = null) {} }
class c : a { this(a* myAttr = null) {} }
void main()
{
auto myb = new b();
auto myc = new c();
}
DMD says "Constructor c.this(a*
Hi guys,
I've the following code:
abstract class a {}
class b : a { this(a* myAttr = null) {} }
class c : a { this(a* myAttr = null) {} }
void main()
{
auto myb = new b();
auto myc = new c();
}
DMD says "Constructor c.this(a* myAttr = null) is not callable
using argument types (b*)".
On Tuesday, 8 August 2017 at 00:01:05 UTC, Johnson Jones wrote:
On Monday, 7 August 2017 at 22:56:37 UTC, Moritz Maxeiner wrote:
On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote:
Why would that be. Program take about 4 seconds to compile
and 12 for x64. There is fundamentally no
On Monday, 7 August 2017 at 12:39:31 UTC, lobo wrote:
On Monday, 7 August 2017 at 00:07:26 UTC, Johnson Jones wrote:
On Sunday, 6 August 2017 at 23:11:56 UTC, Nicholas Wilson
wrote:
On Sunday, 6 August 2017 at 19:56:06 UTC, Johnson Jones wrote:
[...]
It is deliberately not possible.
43 matches
Mail list logo