But if I write
@(hello) struct Hello {}
so all of the variables that have type Hello will have attribute
@(hello) like come type qualifier because attribute is a part
of declaration of Hello. Do I understand correctly?
Hi,
I'm using scriptlike, which imports everything from std.process
for convienience, but I also need to import another module, which
contains a class `Config`, it conflicts with std.process.Config.
I don't actually need std.process.Config, but I need many other
symbols in scriptlike and
Puming:
I'm using scriptlike, which imports everything from std.process
for convienience, but I also need to import another module,
which contains a class `Config`, it conflicts with
std.process.Config. I don't actually need std.process.Config,
but I need many other symbols in scriptlike and
On Thursday, 26 June 2014 at 08:36:15 UTC, Chris wrote:
On Wednesday, 25 June 2014 at 09:29:35 UTC, Orfeo wrote:
I wanted to create a simple application to display and edit
data from postgresql database using GtkD and ddb
(https://github.com/pszturmaj/ddb)
The application should run on
On Wednesday, 25 June 2014 at 09:29:35 UTC, Orfeo wrote:
I wanted to create a simple application to display and edit
data from postgresql database using GtkD and ddb
(https://github.com/pszturmaj/ddb)
The application should run on WinXp or Win7. After a week of
work I throw in the towel ...
On Thursday, 26 June 2014 at 08:39:46 UTC, Chris wrote:
On Thursday, 26 June 2014 at 08:36:15 UTC, Chris wrote:
On Wednesday, 25 June 2014 at 09:29:35 UTC, Orfeo wrote:
I wanted to create a simple application to display and edit
data from postgresql database using GtkD and ddb
On Thursday, 26 June 2014 at 02:33:43 UTC, Mathias LANG wrote:
On Wednesday, 25 June 2014 at 18:49:27 UTC, Stefan Frijters
wrote:
Let me preface this by admitting that I'm not sure I'm using
the DDoc functionality properly at all, so let me know if my
questions are bogus.
Is it possible to:
Stefan Frijters:
I found a pull request to add __traits(documentation, ...)[1]
which would also allow me to solve my problem as a workaround,
does anyone know if this is still moving forward?
You can state in that GitHub thread that you could use that
feature. There are many stalled nice
How can i close my application by code?
+ 1 for own GUI + graphics module for D
On Wednesday, 25 June 2014 at 14:17:50 UTC, Meta wrote:
If you want something like a hash table that preserves
insertion order, you could try using an array of tuples
instead. Then to pop the first element, just do 'arr =
arr[1..$]'.
Thank you, this is _exactly_ what I was looking for!
On Wednesday, 25 June 2014 at 14:17:50 UTC, Meta wrote:
Then to pop the first element, just do 'arr = arr[1..$]'.
Or import std.array to get the range primitives for slices:
import std.array;
void main()
{
auto arr = [1, 2, 3, 4];
arr.popFront();
assert(arr.front == 2);
}
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you mean exit status? Just call exit function from C library.
import std.c.stdlib;
void main()
{
exit(0);
}
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote:
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you mean exit status? Just call exit function from C library.
import std.c.stdlib;
void main()
{
exit(0);
}
wow, thank you
On Wednesday, 25 June 2014 at 14:44:22 UTC, John Colvin wrote:
On Tuesday, 24 June 2014 at 10:16:38 UTC, bearophile wrote:
John Colvin:
I'm getting OutOfMemoryErrors on some machines when calling
GC.malloc (or new) for anything large (more than about 1GB),
where core.stdc.malloc works fine.
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote:
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you mean exit status? Just call exit function from C library.
import std.c.stdlib;
void main()
{
exit(0);
}
Will destructors
Is there an unqualified version of __FUNCTION__ that returns just
treeContentId
instead of
fs.Dir.treeContentId
?
On Thursday, 26 June 2014 at 10:40:00 UTC, John Colvin wrote:
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote:
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you mean exit status? Just call exit function from C
library.
Nordlöw:
Is there an unqualified version of __FUNCTION__ that returns
just
treeContentId
instead of
fs.Dir.treeContentId
?
I suggest to use the string functions to strip the part you need.
Bye,
bearophile
John Colvin:
isn't this exactly what the System V ABI specifies anyway?
Large aggregate returns are allocated on the calling stack,
passed by hidden pointer.
So do you know why D is not using that design?
Bye,
bearophile
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote:
They won't. Same for module destructors.
If you need those to work, another option is to throw some
custom Exception type which is only caught in main.
I really wish this wasn't the answer, but for some programs I've
had to
On Thursday, 26 June 2014 at 12:06:34 UTC, bearophile wrote:
John Colvin:
isn't this exactly what the System V ABI specifies anyway?
Large aggregate returns are allocated on the calling stack,
passed by hidden pointer.
So do you know why D is not using that design?
Bye,
bearophile
It is,
John Colvin:
It is,
As far as I know, D is using that as an optimization, not as an
ABI default that must happen at all optimization levels.
but a copy is made after the function returns anyway, for
reasons unknown to me. For some reason the optimizer can't
elide it (ldc2 -O5 -release,
On Thu, Jun 26, 2014 at 01:23:17PM +, Chris Nicholson-Sauls via
Digitalmars-d-learn wrote:
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote:
They won't. Same for module destructors.
If you need those to work, another option is to throw some custom
Exception type which
---
module main;
void main()
{
struct Tree { int apples; }
import std.container;
SList!Tree list;
Tree tree = Tree(5);
list.insert(tree);
//list.linearRemove(tree); // -- Error. What is the correct way?
}
---
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote:
On Thursday, 26 June 2014 at 10:40:00 UTC, John Colvin wrote:
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote:
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you
Lemonfiend:
//list.linearRemove(tree); // -- Error. What is the correct
way?
}
---
linearRemove is linear, so I think it accepts a range. Perhaps
the once range is enough.
Bye,
bearophile
linearRemove is linear, so I think it accepts a range. Perhaps
the once range is enough.
I cannot find once in the docs. Did you mean std.range.only?
Error: function std.container.SList!(Tree).SList.linearRemove
(Range r) is not callable using argument types (OnlyResult!(Tree,
1u))
```
import std.process : Config_ = Config;
```
Sorry, wrong one.
There seems no solution for this. So, you must use fully
qualified name.
Take a look at unittests in [std.container.slist][0]:
```
unittest
{
auto s = SList!int(1, 2, 3, 4, 5);
auto r = s[];
popFrontN(r, 3);
auto r1 = s.linearRemove(r);
assert(s == SList!int(1, 2, 3));
assert(r1.empty);
}
unittest
{
auto s = SList!int(1, 2, 3, 4, 5, 6, 7,
On Thursday, 26 June 2014 at 09:21:28 UTC, seany wrote:
On Wednesday, 25 June 2014 at 14:17:50 UTC, Meta wrote:
If you want something like a hash table that preserves
insertion order, you could try using an array of tuples
instead. Then to pop the first element, just do 'arr =
arr[1..$]'.
Dirty solution:
```
import scriptlike;
import your_module;
import your_module : Config;
```
So, `Config` from your module will override one from scriptlike.
On Tue, 24 Jun 2014 21:53:51 -0400, WhatMeWorry kc_hea...@yahoo.com
wrote:
I open a command line window, and run the following 6 line program
void main()
{
string envPath = environment[PATH];
writeln(PATH is: , envPath);
envPath ~= r;F:\dmd2\windows\bin;
environment[PATH]
On Thursday, 26 June 2014 at 07:11:03 UTC, Uranuz wrote:
But if I write
@(hello) struct Hello {}
so all of the variables that have type Hello will have
attribute @(hello) like come type qualifier because attribute
is a part of declaration of Hello. Do I understand correctly?
No, it is only
I use Tango's example from
http://www.dsource.org/projects/tango/docs/stable/
// open a web-page for posting (see HttpGet for simple reading)
auto post = new HttpPost (http://yourhost/yourpath;);
// send, retrieve and display response
Cout (cast(char[]) post.write(posted data, text/plain));
unittest
{
auto s = SList!int(1, 2, 3, 4, 5);
auto r = s[];
popFrontN(r, 3);
auto r1 = s.linearRemove(r);
assert(s == SList!int(1, 2, 3));
assert(r1.empty);
}
This works:
auto s = SList!int(1, 2, 3, 4, 5);
auto r = s[];
popFrontN(r, 1);
auto r1 = s.linearRemove(r);
This
On Thursday, 26 June 2014 at 16:33:57 UTC, JJDuck wrote:
I tried to use phobos , but there is no such function exists for
posting to https too
I am attempting to make use of std.net.curl and having trouble
acquiring libcurl for 64 bit Windows. I need to be able to link
with the MSVC linker (which happens to be the default when
compiling using dmd with -m64). I've looked on the libcurl
website and not found any downloads that look
Managed to build it successfully I think, but have actually
returned to the problem that initially caused me to want to try
and build the library in the first place:
If I try to build a simple program:
import std.stdio;
import std.net.curl;
void main() {
writeln(Hello world);
}
The program
On 6/26/14, 11:11 AM, Mark Isaacson wrote:
Managed to build it successfully I think, but have actually
returned to the problem that initially caused me to want to try
and build the library in the first place:
If I try to build a simple program:
import std.stdio;
import std.net.curl;
void
First case is a bug. I'll make pull request.
Not sure about second.
Resolved the issue.
The one that the win64 auto-tester uses is here:
http://downloads.dlang.org/other/
curl-7.28.1-devel-rainer.win64.zip
There's a newer one available there, but I can't vouch for it.
On 6/26/14, 11:49 AM, Andrei Alexandrescu via Digitalmars-d-learn wrote:
On 6/26/14, 11:11 AM, Mark
On Thursday, 26 June 2014 at 16:02:15 UTC, sigod wrote:
Dirty solution:
```
import scriptlike;
import your_module;
import your_module : Config;
```
So, `Config` from your module will override one from scriptlike.
I'm currenly renaming my own symbol:
```d
import scriptlike;
import config :
On Thursday, 26 June 2014 at 08:02:24 UTC, bearophile wrote:
Puming:
I'm using scriptlike, which imports everything from
std.process for convienience, but I also need to import
another module, which contains a class `Config`, it conflicts
with std.process.Config. I don't actually need
46 matches
Mail list logo