On Mon, 27 Oct 2014 03:07:12 +
MachineCode via Digitalmars-d-learn
wrote:
> You're welcome :) what do you call git head is the dmd compiler
> compiled from dmd's source code on github?
yes. i'm updating my compiler on dayly basis, so my "git head" is
really "head". ;-)
but i also have alot
On Monday, 27 October 2014 at 02:27:32 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 27 Oct 2014 02:19:49 +
MachineCode via Digitalmars-d-learn
wrote:
It worked fine for me. Output:
> abc
> abc
Environment: Win 8.1 64-bit (but dmd target is 32-bit, IIRC),
dmd v2.066.0
yes, thank
On Monday, 27 October 2014 at 02:24:04 UTC, MachineCode wrote:
On Sunday, 26 October 2014 at 23:57:41 UTC, Mike wrote:
Are you going to use HTML in the posts? because neither Walter
and probably forum maintainer wants to use it.
I don't plan on adding HTML to the posts. And you don't need to
On Mon, 27 Oct 2014 02:25:50 +0200
ketmar via Digitalmars-d-learn
wrote:
for those who interested here is the patch that broke everything:
https://github.com/D-Programming-Language/dmd/pull/3806/
i simply forgot that i included it for testing purposes, and it breaks
something inside Phobos.
si
On Saturday, 25 October 2014 at 22:16:12 UTC, John Colvin wrote:
On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:
Where is a variable declared in a module allocated? is it same
as a C's global?
for example:
module foo;
int myvar;
that is in thread local storage.
__shared, s
On Mon, 27 Oct 2014 02:19:49 +
MachineCode via Digitalmars-d-learn
wrote:
> It worked fine for me. Output:
>
> > abc
> > abc
>
> Environment: Win 8.1 64-bit (but dmd target is 32-bit, IIRC), dmd
> v2.066.0
yes, thank you too. that was one of my custom patches that broke this.
i already fou
On Sunday, 26 October 2014 at 23:57:41 UTC, Mike wrote:
Does forum.dlang.org have an open source repository somewhere
that we can contribute pull requests to, or are bug reports to
recommended procedure.
I see that the left navigation menu needs updating, and I think
we can wordsmith the foru
On Monday, 27 October 2014 at 00:26:00 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
let's assume we have this code:
void doWrite(A...) (A args) {
import std.stdio;
import std.conv;
writeln(to!string(args[0]));
}
void main () {
char[3] a0 = "abc";
char[3] a1 = ['a
On Sun, 26 Oct 2014 17:41:28 -0700
Ali Çehreli via Digitalmars-d-learn
wrote:
> Yeah, works with git head.
ah, thank you. seems that one of the custom patches i'm using broke
that. i just checked this on unpatched DMD, and it works too.
sorry for the noise.
signature.asc
Description: PGP signa
On 10/26/2014 05:33 PM, anonymous wrote:
On Monday, 27 October 2014 at 00:26:00 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
let's assume we have this code:
void doWrite(A...) (A args) {
import std.stdio;
import std.conv;
writeln(to!string(args[0]));
}
void main () {
On Mon, 27 Oct 2014 00:33:13 +
anonymous via Digitalmars-d-learn
wrote:
> On Monday, 27 October 2014 at 00:26:00 UTC, ketmar via
> Digitalmars-d-learn wrote:
> > Hello.
> >
> > let's assume we have this code:
> >
> > void doWrite(A...) (A args) {
> > import std.stdio;
> > import std
On Monday, 27 October 2014 at 00:26:00 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
let's assume we have this code:
void doWrite(A...) (A args) {
import std.stdio;
import std.conv;
writeln(to!string(args[0]));
}
void main () {
char[3] a0 = "abc";
char[3] a1 = ['a
On Mon, 27 Oct 2014 02:25:50 +0200
ketmar via Digitalmars-d-learn
wrote:
p.s. i know how to block using non-dynamic arrays in this case, but i
don't want to. i found this when writing writef-like function with CTFE
parsing of formatting string and spent alot of time looking for bug in
my code. ;-
Hello.
let's assume we have this code:
void doWrite(A...) (A args) {
import std.stdio;
import std.conv;
writeln(to!string(args[0]));
}
void main () {
char[3] a0 = "abc";
char[3] a1 = ['a', 'b', 'c'];
doWrite(a0);
doWrite(a1);
}
i don't know why, but this code
On Mon, 27 Oct 2014 02:07:09 +0200
ketmar via Digitalmars-d-learn
wrote:
> > Thank you for clearing this up. If I understand correctly,
> > __gshared is more of a hack to get C-like global variables,
> > whilst shared is typed shared variable and more preferred?
> yes and no. 'shared' is the pa
On Sunday, 26 October 2014 at 23:57:41 UTC, Mike wrote:
Does forum.dlang.org have an open source repository somewhere
that we can contribute pull requests to, or are bug reports to
recommended procedure.
http://forum.dlang.org/help#contributing
On Sun, 26 Oct 2014 23:37:25 +
Neven via Digitalmars-d-learn wrote:
> >Mutex mutex;
> >static this()
> >{
> > mutex = new Mutex();
> >}
>
> I have synchronization problems with this one. Even when I
> prepend __gshared Mutex mutex in this case.
ah, there is another subtle thing. 'static th
Does forum.dlang.org have an open source repository somewhere
that we can contribute pull requests to, or are bug reports to
recommended procedure.
I see that the left navigation menu needs updating, and I think
we can wordsmith the forum descriptions a little to make it
clearer where to post
@Damian
You can use auto mutex = cast(shared)(new Mutex());
Not working; Error: constructor core.sync.mutex.Mutex.this
core.sync.mutex.Mutex cannot be constructed at compile time,
because the constructor has no available source code
Mutex mutex;
static this()
{
mutex = new Mutex();
}
I
On Sun, 26 Oct 2014 22:53:07 +
Neven via Digitalmars-d-learn wrote:
> Why cannot I globally have auto mutex = new Mutex? And why it
> works now when I put __gshared?
this is because 'auto mutex = new Mutex' is not a global declaration,
it's thread-local declaration. all D variables are threa
On Sunday, 26 October 2014 at 22:53:09 UTC, Neven wrote:
On Sunday, 26 October 2014 at 22:21:17 UTC, Damian wrote:
On Sunday, 26 October 2014 at 22:14:25 UTC, Neven wrote:
I'm trying to use Mutex from core.sync.mutex; but when I try
to initialize it at compile time this error pops up:
Error:
On Sunday, 26 October 2014 at 22:53:09 UTC, Neven wrote:
On Sunday, 26 October 2014 at 22:21:17 UTC, Damian wrote:
On Sunday, 26 October 2014 at 22:14:25 UTC, Neven wrote:
I'm trying to use Mutex from core.sync.mutex; but when I try
to initialize it at compile time this error pops up:
Error:
On Sunday, 26 October 2014 at 22:21:17 UTC, Damian wrote:
On Sunday, 26 October 2014 at 22:14:25 UTC, Neven wrote:
I'm trying to use Mutex from core.sync.mutex; but when I try
to initialize it at compile time this error pops up:
Error: constructor core.sync.mutex.Mutex.this
core.sync.mutex.Mu
On Sunday, 26 October 2014 at 22:14:25 UTC, Neven wrote:
I'm trying to use Mutex from core.sync.mutex; but when I try to
initialize it at compile time this error pops up:
Error: constructor core.sync.mutex.Mutex.this
core.sync.mutex.Mutex cannot be constructed at compile time,
because the con
I'm trying to use Mutex from core.sync.mutex; but when I try to
initialize it at compile time this error pops up:
Error: constructor core.sync.mutex.Mutex.this
core.sync.mutex.Mutex cannot be constructed at compile time,
because the constructor has no available source code
So I try to initia
On Friday, 24 October 2014 at 22:29:12 UTC, Peter Alexander wrote:
Further, I would like to extend isPalindrome() with a minimum
length argument minLength that for string and wstring does
I extended my algorithm with a minLength argument
https://github.com/nordlow/justd/blob/master/algorithm_e
On Sun, 26 Oct 2014 20:16:18 +
via Digitalmars-d-learn wrote:
> The documentation specifically says that:
> "Any functions that execute at compile time must also be
> executable at run time. [...] This means that the semantics of a
> function cannot depend on compile time values of the func
On Sunday, 26 October 2014 at 19:32:28 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 26 Oct 2014 12:46:06 +
via Digitalmars-d-learn
wrote:
The second possibility doesn't exist right now. The core
problem is that the compiler needs to be able to generate
runtime code for `buildWrite
On Sun, 26 Oct 2014 12:46:06 +
via Digitalmars-d-learn wrote:
> Ok, I see two possibilities. The first is to make `prstr` into a
> normal function. You cannot use `stringof` then, but need to
> escape the string yourself. Luckily, std.format provides
> functionality for this already, albei
On Sun, 26 Oct 2014 12:46:06 +
via Digitalmars-d-learn wrote:
> The second possibility doesn't exist right now. The core problem
> is that the compiler needs to be able to generate runtime code
> for `buildWriter()`, because it's just a function after all.
but it's templated function, and i
On 2014-10-25 23:31, H. S. Teoh via Digitalmars-d-learn wrote:
Hmm. You can probably use __traits(getAllMembers...) to introspect a
library module at compile-time and build a hash based on that, so that
it's completely automated. If you have this available as a mixin, you
could just mixin(exportL
On Sunday, 26 October 2014 at 10:48:46 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
the following code is not working:
template prstr(string s) {
enum prstr = "write("~s.stringof~");\n";
}
string buildWriter() (string fmt) {
return prstr!(fmt[0..$-1]);
}
string writer(s
On Sunday, 26 October 2014 at 12:27:55 UTC, Marc Schütz wrote:
On Sunday, 26 October 2014 at 10:48:46 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
the following code is not working:
template prstr(string s) {
enum prstr = "write("~s.stringof~");\n";
}
string buildWriter() (string f
On Sunday, 26 October 2014 at 10:48:46 UTC, ketmar via
Digitalmars-d-learn wrote:
Hello.
the following code is not working:
template prstr(string s) {
enum prstr = "write("~s.stringof~");\n";
}
string buildWriter() (string fmt) {
return prstr!(fmt[0..$-1]);
}
Your passing the
Hello.
the following code is not working:
template prstr(string s) {
enum prstr = "write("~s.stringof~");\n";
}
string buildWriter() (string fmt) {
return prstr!(fmt[0..$-1]);
}
string writer(string fmt) () {
enum s = buildWriter(fmt);
return s;
}
void main () {
On Saturday, 25 October 2014 at 19:44:25 UTC, Suliman wrote:
I found only https://github.com/Bystroushaak/DHTMLParser
But I can't get it work:
C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-master>dmd
find_links.d
OPTLINK (R) for Win32 Release 8.00.15
Copyright (C) Digital Mars 1989-2
I have found the problem.
It was the nested mixin that was causing the scope degradation
(not sure if that is intended behaviour).
The correct way to iterate through members and get their
attribute is like this:
foreach(member; __traits(allMembers,T))
{
37 matches
Mail list logo