i don't understand whole theread.
why all import must be written on one line?
curent syntax very handy and readable.
On Friday, 29 December 2017 at 10:35:53 UTC, Andrei wrote:
Though it is not suitable for GUI type of a Windows application.
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
For Windows ANSI/OEM problem you can use also
https://dlang.org/phobos/std_windows_charset.html
you can just set console CP to UTF-8:
https://github.com/CyberShadow/ae/blob/master/sys/console.d
On Monday, 9 October 2017 at 19:44:24 UTC, Martin Nowak wrote:
Glad to announce D v2.076.1.
http://dlang.org/download.html
This point release fixes a few issues over v2.076.1, see the
changelog for more details.
http://dlang.org/changelog/v2.076.1.html
- -Martin
On Saturday, 26 August 2017 at 09:03:03 UTC, Hasen Judy wrote:
What if I want to include a 3rd party library? Surely before
dub existed, people were incorporating other libraries in their
projects.
sometimes pragma("lib", ...) very usefull (if i understand you
correctly)
On Thursday, 24 August 2017 at 15:56:32 UTC, H. S. Teoh wrote:
Isn't this what rdmd already does?
This is my favorite rdmd feature.
But there is local import bug :(
https://issues.dlang.org/show_bug.cgi?id=15533
On Thursday, 24 August 2017 at 18:02:24 UTC, vino wrote:
Thanks for your support, was able to resolve this issue.
Hello.
IMHO, it will be better, if you will share your solution for
other peoples :)
https://dlang.org/changelog/2.075.0.html#split-std-datetime
On Sunday, 14 May 2017 at 21:22:20 UTC, Moritz Maxeiner wrote:
The full line is `alias Base64 = Base64Impl!('+', '/');`
Yes. When we use it like this:
const(char)[] encoded = Base64.encode(data);
then template instantiated and produce ... what?
I don't understand what you're trying to
I look to std.base64 module source.
And dont unerstand what is the "Base64" part in
"Base64.encode(data)" example.
I see std.base64 module use template Base64Impl.
I see alias Base64 = Base64Impl!...
But down understand.
Base64 not module, not structure, not class?
Template Base64Impl shoud
On Sunday, 26 March 2017 at 07:18:14 UTC, ketmar wrote:
i.e. what compiler does (roughly) is inserting anonymous fields
of the appropriate size *into* the container. for "inner"
aligning compiler inserts anonymous fields *between* other
fields. for "outer" aligning compiler just appends
On Sunday, 26 March 2017 at 06:45:13 UTC, ketmar wrote:
yes. you have a typo in second `writefln`: S1 instead of S2. ;-)
thank you.
another question, related to my first post:
why size of S2.b1 and S2.b2 still 3, not 4?
am i right: then align applied to members, compiler not change
size of
On Sunday, 26 March 2017 at 06:38:59 UTC, zabruk70 wrote:
oh sorry sorry - mistyping
ok. DMD use padding, so for real container.sizeof
i should use lastMemeber.offsetof+lastMemeber.sizeof
On Sunday, 26 March 2017 at 05:09:15 UTC, ketmar wrote:
most of the time either location or padding will work the same.
hmm.. you ruined my expirence..
i made another experiment.
whould you please explain me S2 size 6?
thank you for you time.
https://dpaste.dzfl.pl/9a31b6e370a0
struct S1
Thank you ag0aep6g and ketmar!!
I will use additional outside align.
I want packing inside, you are right.
But i check result size with assert() and failed.
But for clearness...
I was thinked, that align not changes SIZE, but changes LOCATION.
I was thinked, that "align(X) union Union1"
just
//DMD 2.073.1 and latest 2.075.0-master-972eaed
//Windows 7 32-bit
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import std.stdio: writefln;
writefln("Union1.sizeof=%d", Union1.sizeof); //prints 8, not 5
}
I
On Monday, 31 October 2016 at 16:06:48 UTC, Adam D. Ruppe wrote:
dmd yourfile.d winmm.lib
i personally like https://dlang.org/spec/pragma.html#lib
pragma(lib, "winmm.lib");
On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote:
thisExePath won't work.
won't? what this means?
this work on my windows
import std.file: thisExePath;
import std.stdio: writeln;
void main()
{
writeln(thisExePath());
}
On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote:
If you want to see template expansions you have to wait a
little longer.
Wow! Is this really possible?! So long time several peoples asked
this...
On Tuesday, 5 July 2016 at 10:52:10 UTC, zodd wrote:
Property functions are used wrong by a compiler when it needs
i am sorry for my dumbness, what wrong with this code?
import std.stdio;
struct A {
@property ref int value() {
return value_;
}
@property void value(int v)
On Wednesday, 15 June 2016 at 10:58:04 UTC, Martin Nowak wrote:
So I'm wondering if in 2016 someone really needs an offline
copy of a website shipped with a binary release?
i use chm doc - it easy integrates with ide
On Sunday, 15 May 2016 at 18:20:54 UTC, Andrei Alexandrescu wrote:
please take a look
can't get usage text when it very needed
https://issues.dlang.org/show_bug.cgi?id=14525
On Friday, 13 May 2016 at 06:33:40 UTC, Jacob Carlborg wrote:
Even better is to use "rdmd" which will automatically track and
compile dependencies.
but i should warn about annoing bug with local import
http://forum.dlang.org/post/mailman.1984.1373610213.13711.digitalmar...@puremagic.com
On Saturday, 9 April 2016 at 02:14:48 UTC, Jonathan M Davis wrote:
So, if anything, I'd open a bug report about how std.windows is
old bug
https://issues.dlang.org/show_bug.cgi?id=13516
print result as hex
try to xor result with 0x
On Friday, 12 July 2013 at 06:23:33 UTC, Timothee Cour wrote:
I wrote a recursive dependency analyzer and plugged it in a
modified rdmd, and it does indeed work in all cases I tried
Timothee, can you share your RDMD changes? This is annoing bug
still here.
Thank you.
Can anybody explain:
Is dependencies file produced from command:
dmd -deps=moduleA.deps moduleA.d
must contains mention of moduleC?
Is dependencies file produced reccursively?
Thanks.
Hello.
1st Novice question:
i want function, operates sometimes with char[], sometimes with
ubyte[].
internally it works with ubyte.
i can use overloading:
void myFunc(ubyte[] arg) {...};
void myFunc(char[] arg) { ubyte[] arg2 = cast(ubyte[]) arg; ...}
It is OK. But i want 2 params (arg1,
On Sunday, 10 January 2016 at 11:13:00 UTC, Tobi G. wrote:
ubyte[] myFunc(T1,T2)(T1[] a, T2[] b)
Tobi, big thanks!!!
I should learn templates...
On Sunday, 10 January 2016 at 14:17:28 UTC, Adam D. Ruppe wrote:
A `const(void)[]` type can accept any array as input. void[] is
Ah, how i can forget about void[] !
Thanks Adam!
On Friday, 8 January 2016 at 22:36:49 UTC, Tobi G. wrote:
On Saturday, 9 January 2016 at 01:43:57 UTC, Ivan Kazmenko wrote:
I get also a compilation error (with rdmd and -g).
Thanks Tobi and Ivan.
https://issues.dlang.org/show_bug.cgi?id=15533
On Thursday, 7 January 2016 at 23:15:41 UTC, Basile B. wrote:
Damn, I've been trapped, thread exhumated from 2014 ...
Yes, but my post was made yesterday.
I don't want create new post and found this.
Thank you for your time.
OS: Windows 7 (32 bit)
dmd: 2.069.2 and 2.070.0-b1
Then i used "-g" switch with RDMD, then i have OPTLINK error.
Reduced code, 3 modules, 2 of them in subdir:
moduleA.d
test\moduleB.d
test\moduleC.d
/
module moduleA;
public void funcA () {
import test.moduleB: funcB;
return;
}
Hello.
In modern phobos ver 2.069.1 exists template hexString
https://dlang.org/phobos/std_conv.html#.hexString
to convert hex string to bytes.
It works in compile time only.
But what if i need it in run time?
Is the answer in this topic still best way?
Or now we have some function/template in
34 matches
Mail list logo