You can find useful information in
\phobos\std\c\windows\winsock.d
Dňa 17. 3. 2013 9:27 Jeremiah James wrote / napísal(a):
Hello, all! I'm really starting to get into D and am enjoying it. I come
from a C# background, so the transition is pretty nice; just the right
mix of things I'm familiar w
Thank you all. Now I believe I will be able to solve this.
Dňa 28. 2. 2013 5:25 Era Scarecrow wrote / napísal(a):
On Wednesday, 27 February 2013 at 10:56:16 UTC, Lubos Pintes wrote:
Hi,
I would like to transparently convert from ANSI to UTF-8 when dealing
with text files. For example here in
Which JSON is better? I already saw Vibe's JSON, but don't know where is
that new std.json.
Dňa 27. 2. 2013 22:36 Dicebot wrote / napísal(a):
I use this simple snippet to get quick and dirty key-value config:
---
string[string] data;
foreach( line; readText(filename).splitLines() )
{
auto
And what about the opposite way? I like how Python is representing
strings. Good when you want to partially inspect something binary.
Dňa 27. 2. 2013 19:39 monarch_dodra wrote / napísal(a):
I have a text file, that contains text with escaped characters, eg:
//
hello\tworld.
this line\ncont
I don't understand the CTFE usage in this context. I thought about
something like
dchar[] windows_1250=[...];
Isn't this enough?
Thank
Dňa 27. 2. 2013 18:32 Dmitry Olshansky wrote / napísal(a):
27-Feb-2013 16:20, monarch_dodra пишет:
On Wednesday, 27 February 2013 at 10:56:16
Hi,
I would like to transparently convert from ANSI to UTF-8 when dealing
with text files. For example here in Slovakia, virtually every text file
is in Windows-1250.
If someone opens a text file, he or she expects that it will work
properly. So I suppose, that it is not feasible to tell someon
Hi,
Some time ago I asked how to efficiently parse a space delimited list of
ints to array. Ireceived a good answer, but recently I discovered this:
auto a=" 1 2 3 4 5 "
.split(" ")
.filter!"!a.empty"
.map!"to!int(a)";
writeln(a);
//writes [1, 2, 3, 4, 5] as expected.
But:
writeln(t
Maybe I don't understand this example fully, but where is a "try" statement?
The to!int may throw...
Dňa 29. 1. 2013 22:53 Ali Çehreli wrote / napísal(a):
On 01/29/2013 12:32 PM, Vladimir Panteleev wrote:
> I would like to add some information to any exceptions thrown inside the
> loop's body
Hi,
Can someone tell me an algorithm which determines if a file specified by
its name was modified today?
I suspect that I will need a std.datetime module to work with dates, and
something from somewhere that would tell me the modification date and
then convert and compare.
But std.datetime is
Ok thank you. I see now.
One unrelated question: Why the safe attribute has the at-sign, while
nothrow doesn't?
Dňa 20. 2. 2013 11:19 monarch_dodra wrote / napísal(a):
On Wednesday, 20 February 2013 at 08:03:48 UTC, Lubos Pintes wrote:
Hi,
I want to allocate a buffer which I use
Hi,
I want to allocate a buffer which I use in a function which reads data
from socket.
So I did as a first line in that function:
static char[] buffer=new char[4096];
The compiler (2.062) complained that it cannot evaluate new char[] at
compile time.
I Then tried to move the declaration befor
Ahh. I fixed the project dependencies and this probably fixed linker
errors...
Dňa 18. 2. 2013 18:51 Lubos Pintes wrote / napísal(a):
you compiled(bild) the dgui lib yourself with 2.062?
i will not work if you use the prebuild ones
Yes. And as I said in some previous post, everything worked
you compiled(bild) the dgui lib yourself with 2.062?
i will not work if you use the prebuild ones
Yes. And as I said in some previous post, everything worked with 2.060.
Quite confused.
te / napísal(a):
On Monday, 18 February 2013 at 16:47:00 UTC, Lubos Pintes wrote:
I am playing with library dgui.
In 2.060, everything built fine.
One of library samples imports std.string. Perhaps the VisualD doesn't
include necessary library?
I updated the DMD as follows: I deleted the
Thank for explanation. I supposed that the enum constant is fixed and
that it is also true for AA.
I will convert my code before I forget. :-).
Dňa 18. 2. 2013 18:22 Ali Çehreli wrote / napísal(a):
On 02/18/2013 08:59 AM, Lubos Pintes wrote:
> Yesterday I solved similar problem by using e
Yesterday I solved similar problem by using enum.
enum GameInfo[string] games=[
...
];
Dňa 8. 2. 2013 21:21 anonymous wrote / napísal(a):
On Friday, 8 February 2013 at 20:12:41 UTC, Dan wrote:
This constant in a module causes a compilation error of the
"non-constant expression" variety.
DEFINI
this nonstandard in
some way? I randomly tested/wrote short programs and they worked.
I also issued the clean solution, but that didn't help.
Dňa 18. 2. 2013 17:12 jerro wrote / napísal(a):
On Monday, 18 February 2013 at 12:55:13 UTC, Lubos Pintes wrote:
Hi,
I just updated to DMD 2.062. I the
Hi,
I just updated to DMD 2.062. I then tried to recompile somewhat bigger
project. After fixing some errors, I received dozens of errors like this:
Error 42: Symbol Undefined _D3std6string6formatFYAya (immutable(char)[]
std.string.format(, ...))
I didn't see them when compiled with DMD 2.060. I
I am writing little program which downloads simple data file from server
through HTTP.
The file is static, but updated regularly, so I am using "Range: bytes"
header to optimize the traffic a bit.
After I analyzed HTTP status line and headers, I started to read the raw
data through SocketStream.
Hi,
I am reading std.regex. I found the following code on line 671:
else if('A' <= current && current <= 'Z')
val = val * 16 + current - 'A' + 10;
Hex digits are parsed there. So unles this is something special, this is
a bug. Because for example what 'J' would mean in this c
Hi,
I saw one ListBox class implementation.
As we all know, ListBox class collects and displays strings. Author
decided that he encapsulate the Object as item, and uses its toString()
method when string is needed for display.
For cases when string is added, he defined this small class, internal
Hi,
Do I correctly suppose this is not possible? Because I don't understand
fully the compiler error.
import std.stdio;
void main() {
int[] a;
stdin.readf(" %s",&a);
writeln(a);
}
Sorry maybe I am stupid but where is the value of concrete T?
Or perhaps I completely misunderstood this?
Dňa 5. 12. 2012 4:59 Ali Çehreli wrote / napísal(a):
On 12/04/2012 06:42 PM, js.mdnq wrote:
> One thing I've always struggled with in oop is how to deal with
> storing generic types.
>
>
Not sure if I understand what you ask here, but you probably need to add
all files you want to compile to the project. Thus not only the main.d,
but all modules.
Dňa 2. 12. 2012 11:56 Zhenya wrote / napísal(a):
Hi!
I'm sorry,maybe it is a little bit stupid question,but how to configure
VisualD
Hi,
Some time ago I reported on D.Anounce, that Vibe apps are not working on
my system, they failed with an exception. So I diagnosed a bit and found
the following:
There is a folder on my system
C:\Users\pintes\AppData\Local\Temp\.rdmd\source
which contains some DLLs needed for successful run.
Hi,
Of course I can. But I "evaluated" this as my failure coming from fact
that D is new to me. So I was not sure if this is a bug in Pegged. So I
wrote here.
Dňa 15. 10. 2012 14:01 Philippe Sigaud wrote / napísal(a):
On Mon, Oct 15, 2012 at 12:24 PM, Lubos Pintes wrote:
Hi,
I wanted to write very simple Markup lexer, that would recognize
HTML/XML tags, not structurally, only lexically.
DMD generates some error which I don't understand, either there is a
problem in my grammar, or possibly a bug in Pegged:
import pegged.grammar;
import pegged.peg;
enum mp=`
Mar
So this means there is no chance to obtain the TDPL legally in some
accessible format? I mean similar to chapter 1, which is released on
dlang.org. For blind, PDF or even paper makes no sense...
Well, PDF sometimes, but rarely.
Dňa 13. 10. 2012 11:40 Jonathan M Davis wrote / napísal(a):
On Sa
SOME_WINDOWS_API_VALUE unchanged. But it may be possible to do
this with some script, I certainly check the notepad2.
Dňa 12. 10. 2012 22:36 Nick Sabalausky wrote / napísal(a):
On Fri, 12 Oct 2012 19:51:02 +0200
Lubos Pintes wrote:
Hi,
I am still playing with DGUI library. Besides other things, I would
like to
Although I thought about refactoring, which I know is not available yet,
this was very interesting example (for me as newbye).
Dňa 12. 10. 2012 21:43 Andrej Mitrovic wrote / napísal(a):
On 10/12/12, Lubos Pintes wrote:
Hi,
I am still playing with DGUI library. Besides other things, I would
Hi,
I am still playing with DGUI library. Besides other things, I would like
to convert enum names from
"THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE" to "thisGoodOne".
Obviously I could do this by hand but it is a bit time consuming. Any
tool / hack to help me with this?
Thank
Hi,
Can someone point me to some source with information about name
demangling when compiling some D program and the famous linker error 42
appears?
Thank
thing worked except this TreeView
weirdness...
Dňa 10. 10. 2012 17:51 bearophile wrote / napísal(a):
Lubos Pintes:
I see no "void" there, except that foo has a return type of void.
Minimized:
enum Foo : void* {
a = null
}
void main() {
auto f = Foo.a;
}
enums are good f
Hi,
I discovered this while playing with DGUI's treeview module. Here is a
program that generates exactly the same error that looks weird to me:
module a;
import std.stdio;
alias void* pvoid;
enum E : pvoid {
a=cast(pvoid)-1,
b=cast(pvoid)-2,
}
void foo(E e=E.a) {
writeln("Hello from fo
Hi,
I installed VisualD, together with VS Shell, because I have only express
versions of VS 2008 on my system, win 7 64 bit.
As a screen reader user, I heavily depend on keyboard. I successfully
set up a testing project, dependend on windows api bindings.
I needed to set a version identifier, so
Hi,
I am playing with samples from Petzold's Programming Windows converted
by Andrej Mitrovic. Many thanks, Andrej. :-)
My question is about string conversion. There is a function in virtually
every sample named "toUTF16z", which if I understand properly, converts
string to UTF-16, so that they
re
not so fine. :-))
Dňa 7. 10. 2012 22:47 Mike James wrote / napísal(a):
"Lubos Pintes" wrote in message news:k4skro$n6q$1...@digitalmars.com...
Hi,
There are at least two interesting GUI libraries for Windows: DGUI
and DFL. But there seems to be no sample code for DFL. Does someone
have any
Thank you.
Dňa 7. 10. 2012 21:26 Andrej Mitrovic wrote / napísal(a):
On 10/7/12, Lubos Pintes wrote:
Hi,
There are at least two interesting GUI libraries for Windows: DGUI and
DFL. But there seems to be no sample code for DFL. Does someone have any
samples for DFL?
And yes, I know about DWT
No, win32 only. It didn't seem relevant in first post, but I am screen
reader user and GTK is totally inaccessible / unusable on Windows.
Dňa 7. 10. 2012 21:18 Michael wrote / napísal(a):
gtkD ?
Hi,
There are at least two interesting GUI libraries for Windows: DGUI and
DFL. But there seems to be no sample code for DFL. Does someone have any
samples for DFL?
And yes, I know about DWT, but it is a bit heavy-weight.
Hi,
Just downloaded a snapshot of WindowsAPI bindings from dsource.org.
How can I generate .LIBs like gdi32.lib, for successful linking?
Thanks
41 matches
Mail list logo