I need windowsx.d but for I don't know the reason is not in dmd.
Someone that have it can send to me? I don't know convert
windowsx.h to windowsx.d
On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin
wrote:
On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
I need windowsx.d but for I don't know the reason is not in
dmd. Someone that have it can send to me? I don't know convert
windowsx.h to windowsx.d
Try to
Look this video https://www.youtube.com/watch?v=Es9Qs9_1ipk
Because when the main thread is completed the worker thread
continues to run.
I want to use isDaemon to automatic stop worker thread if ownner
thread is finished
On Tuesday, 27 October 2020 at 12:16:01 UTC, Rene Zwanenburg
wrote:
On Tuesday, 27 October 2020 at 11:36:42 UTC, Marcone wrote:
I want to use isDaemon to automatic stop worker thread if
ownner thread is finished
Terminating threads without properly unwinding the stack is
generally a very bad
Becouse my program use plink.exe running with spawnShell or
executeShell.
But when my program finish with some crash, or killed with
windows task manager by user, Plink still running. How can I stop
all process initialized with spawnShell or executeShell when
program finish? I another works,
How Install and Configure DCD (D Completion Daemon) on Sublime
Text?
I need auto complete for the Dlang in Sublime Text.
On Sunday, 19 July 2020 at 23:05:45 UTC, Marcone wrote:
How spand array for use with functions arguments like tuple?
expand*
How can I make DMD stop on the first fatal error like
-Wfatal-errors on C++?
On Monday, 13 July 2020 at 12:28:24 UTC, aberba wrote:
On Monday, 13 July 2020 at 00:57:02 UTC, Marcone wrote:
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
alias runas
import std: isUpper, writeln;
void main(){
writeln(isUpper('A'));
}
Why I get this error? How can I use isUpper()?
I don't want start program with admin elevation, but ask user for
admin permission when some function is called.
On Sunday, 12 July 2020 at 12:31:17 UTC, Kagamin wrote:
You call ShellExecute with "runas" verb:
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
Please give me a litle simple example ruining this command:
"netsh winhttp set proxy 127.0.0.1:"
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
How can I get return code ans stdout of this code:
ShellExecute(null, "runas", "cmd", "/c netsh winhttp set proxy
On Sunday, 12 July 2020 at 12:31:17 UTC, Kagamin wrote:
You call ShellExecute with "runas" verb:
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
I need return code and stdout.
On Sunday, 12 July 2020 at 17:28:01 UTC, Kagamin wrote:
I mean runas your own program.
I need a function that ask for admin at runtime only for one
function
On Sunday, 12 July 2020 at 17:19:08 UTC, Kagamin wrote:
Well, you can elevate your own program and tell it to run that
command, collect the result and send it back through e.g.
shared memory.
I don't want start with elevation, becouse program must be
avaliable even user is not admin. Only
On Sunday, 12 July 2020 at 02:10:11 UTC, Marcone wrote:
I don't want start program with admin elevation, but ask user
for admin permission when some function is called.
alias runas = compose!(x => to!bool((cast(int) x) > 32), x =>
ShellExecute(null, "runas", "cmd", cast(wchar*) "/c \"cd /d %s
On Sunday, 12 July 2020 at 21:50:06 UTC, Ali Çehreli wrote:
On 7/11/20 7:10 PM, Marcone wrote:
[...]
Here is a hacky solution that attempts the command and fails
back to asking the password. It should work on POSIX systems.
(Tested on Linux.)
[...]
I need for Windows, it not work on
I just want import in file and run with dmd.
I need full Phobos Runtime Library docummentation in only one PDF
file.
How spand array for use with functions arguments like tuple?
On Thursday, 16 July 2020 at 11:52:39 UTC, Andre Pany wrote:
On Thursday, 16 July 2020 at 11:06:01 UTC, Marcone wrote:
I just want import in file and run with dmd.
Execute dub build with verbose output. You will find the info
how dub is calling dmd.
Kind regards
Andre
dub is calling dmd
Hi, I study Dlang for one year, and I can't understand alias
this. I need an Easy example to understand Alias This.
On Tuesday, 7 July 2020 at 00:42:40 UTC, Ali Çehreli wrote:
On 7/6/20 5:35 PM, Marcone wrote:
Hi, I study Dlang for one year, and I can't understand alias
this. I need an Easy example to understand Alias This.
Is the following example useful?
http://ddili.org/ders/d.en/alias_this.html
Ali
I want use file direct from resource .res without copy it to hard
disc. How can I make it?
I want to create a function that receive a tuple (need be a
tuple) with indetermined length and indetermined elements type
without template. The argument need be a tuple, but length and
elements types indetermineds. How can I make it?
I am using it:
// Tipo Nulo.
class None {}
// Função slice()
auto slice(T1, T2, T3 = None)(T1 conteudo, T2 inicio, T3 fim =
T3.init) {
int start, end, startlen;
static if (is(T2 == int)) {inicio = inicio < 0 ? conteudo.length
+ inicio : inicio;}
static if (is(T3 == int)) {fim =
I can reffer length of literal string using $.
"Hello World"[0..$]
But I want make like it witout use variable name.
"Hello World"[0..?.indexOf("o")]
On Monday, 11 January 2021 at 16:41:03 UTC, oddp wrote:
On 11.01.21 16:45, Marcone via Digitalmars-d-learn wrote:
"Hello World"[0..?.indexOf("o")]
Does until [1] do the trick?
"Hello World".until("o") // => "Hell"
[1] https://dlang.or
On Monday, 11 January 2021 at 21:01:57 UTC, Paul Backus wrote:
On Monday, 11 January 2021 at 15:45:51 UTC, Marcone wrote:
I can reffer length of literal string using $.
"Hello World"[0..$]
But I want make like it witout use variable name.
"Hello World"[0..?.indexOf("o")]
The exact syntax
Hi, Someone can Help me build exe dcd server and client on
WIndows? Step by step? Becouse the informations disponible is
very hard to undestand.
I get this eror:
Example:
alias a = compose!(x,y => x*y);
writeln(a(2,5));
// Error: onlineapp.d(4): Error: undefined identifier x
My mistake:
alias a = compose!((x,y) => x*y);
On Thursday, 3 December 2020 at 02:44:40 UTC, Ali Çehreli wrote:
On 12/2/20 5:46 PM, Marcone wrote:
Hello, my name is Marcone, I live in Brazil, and I have been
studying Dlang for a year. I finished my first application in
Dlang with a graphical interface in Win32api and made it
available on
Hello, my name is Marcone, I live in Brazil, and I have been
studying Dlang for a year. I finished my first application in
Dlang with a graphical interface in Win32api and made it
available on the internet for anyone who wants to download it.
Here is the program link. As a beginner in the D
// Função hex2rgb()
uint hex2rgb(string hexcolor) nothrow {
try {
uint value;
hexcolor.stripLeft("#").formattedRead!"%x"(value);
return value;
} catch(Throwable){return 0;}
}
// Função rgb2hex()
string rgb2hex(uint rgbcolor)
On Sunday, 29 November 2020 at 02:55:02 UTC, Ali Çehreli wrote:
On 11/28/20 6:40 PM, Marcone wrote:
void a(T1, T2)(T1 b, T2 c){
// I need parameter "c" optional, but only (String or
int). How can I make it without overload function?
}
Since it's optional, T2 must have a default type. I
void a(T1, T2)(T1 b, T2 c){
// I need parameter "c" optional, but only (String or int). How
can I make it without overload function?
}
Now my slice works fine.
// Tipo Nulo.
class None {}
// Função slice()
auto slice(T1, T2, T3 = None)(T1 conteudo, T2 inicio, T3 fim =
T3.init) {
int start, end, startlen;
static if (is(T2 == int)) {inicio = inicio < 0 ? conteudo.length
+ inicio : inicio;}
static if (is(T3 == int))
In this very generic example && not work to finalize the instruct
and start a new instruct. Yes, I know dmd can build and run
without it, but this is only a example.
execute(["cmd", "/c", "dmd test.d", "&&", "start test.exe"]);
How can I substitute && ?
Two differents types; Foo type and pointer type. Need function
overload foe each or just use ref and avoid pointer.
How can I wrap SSL on Dlang Socket like I wrap in Python?
My simple example code:
import std;
struct Fruit {
string name;
this(string name){
this.name = name;
}
void printmyname(){
writeln(this.name);
}
void showname(){
task!this.printmyname().executeInNewThread(); //
On Sunday, 15 November 2020 at 03:15:29 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 03:08:48 UTC, Marcone wrote:
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
On Sunday, 15 November 2020 at 03:15:29 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 03:08:48 UTC, Marcone wrote:
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
auto mytime = Clock.currTime;
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
auto mytime = Clock.currTime;
Some operations in finally block may throw and can not be used
inside nothrow functon. Why can not use tray/catch inside finally
block?
I will wait with this code.
WaitForSingleObject(threading, INFINITE);
// Função receive()
char[] receive(Socket socket, int size = 8192) nothrow {
try {
char[] buffer;
buffer.length = size;
int rq = socket.receive(buffer);
return buffer[0..rq];
} catch(Throwable){return null;}
}
s =
// Function threadingw()
void threadingw(HWND hwn, void delegate() fun) nothrow {
try {
// Function _fun()
extern(Windows)
uint _fun(void * arg){
(*(cast(void delegate()*) arg))(); // Do not show "Hello
World!" :(
Solved replacing this line:
CreateThread(null, 0, &_fun, , 0, null);
to this code:
task!({CreateThread(null, 0, &_fun, , 0,
null);}).executeInNewThread();
On Thursday, 19 November 2020 at 15:51:09 UTC, Kagamin wrote:
The delegate is stored on the stack of the calling thread, the
created thread loads it from there, but the calling thread
doesn't wait for that and clobbers the stack right away. If you
were lucky your code would crash.
The thread
I need a most simple and easy example to understand UDA.
How add class or struct member after construction? Is it possible
in D? How?
Bye bye nothrow functions in Dlang.
For example, I want my function template to only accept integer
or string;
How can I create a Standalone Bundle Portable file application
using Dlang?
On Tuesday, 19 January 2021 at 14:20:06 UTC, Imperatorn wrote:
On Tuesday, 19 January 2021 at 11:10:25 UTC, Marcone wrote:
On Tuesday, 19 January 2021 at 06:25:31 UTC, Imperatorn wrote:
On Monday, 18 January 2021 at 19:42:22 UTC, Marcone wrote:
How can I create a Standalone Bundle Portable
On Tuesday, 19 January 2021 at 06:25:31 UTC, Imperatorn wrote:
On Monday, 18 January 2021 at 19:42:22 UTC, Marcone wrote:
How can I create a Standalone Bundle Portable file application
using Dlang?
Could you describe what you mean with "Bundle portable file
application"?
All dependencies
import std;
void a(int b){
}
void main()
{
Variant c = 10;
a(c); // Error
}
Need more sugar.
I've always heard programmers complain about Garbage Collector
GC. But I never understood why they complain. What's bad about GC?
On Sunday, 24 January 2021 at 02:34:15 UTC, Jack wrote:
On Monday, 18 January 2021 at 19:42:22 UTC, Marcone wrote:
How can I create a Standalone Bundle Portable file application
using Dlang?
What are the dependencies that you would like to merge into
executable? dlls? resources?
Qt5 Dll's
On Saturday, 23 January 2021 at 21:26:28 UTC, James Blachly wrote:
On 1/20/21 6:50 AM, Marcone wrote:
On Tuesday, 19 January 2021 at 14:20:06 UTC, Imperatorn wrote:
On Tuesday, 19 January 2021 at 11:10:25 UTC, Marcone wrote:
On Tuesday, 19 January 2021 at 06:25:31 UTC, Imperatorn
wrote:
On
Why "lazy delegate()" need two parentheses to execute function?
I have a GUI created using Qt Creator and save it to .ui file. I
can convert .ui file to .cpp or .py (C++ or Python), but I can
not convert .ui to .d for use with Dlang and QtE5.
I study Dlang for just over a year only and have already risked
creating a program even with a graphical interface and distribute
it on the internet. Here is a part of that program, just the code
without a graphical interface. It is a program for modifying http
headers. You connect your
Becouse I can not find it.
Thank you very much guys.
std.file.append(file, "\nApple");
std.file.append(file, "\nBanana");
Result:
AppleBanana
std.file.append("file; \nApple");
std.file.append("file; \nBanana");
Result:
AppleBanana
std.file.append(file; "\nApple");
std.file.append(file; "\nBanana");
Result:
AppleBanana
I want add Yes.keepTerminator flag on lineSplitter.
import std;
template foo(alias pred = "a*b"){
void foo(int x, int y){
writeln(x.unaryFun!pred);
}
}
void main(){
foo(5, 4);
}
"a" works, but "b" not work.
I get this error: Error: undefined identifier `b`
On Thursday, 13 May 2021 at 21:38:25 UTC, Adam D. Ruppe wrote:
On Thursday, 13 May 2021 at 21:30:43 UTC, Marcone wrote:
template foo(alias pred = "a*b"){
void foo(int x, int y){
writeln(x.unaryFun!pred);
First, you really shouldn't use these at all. instead of a
On Thursday, 13 May 2021 at 21:38:25 UTC, Adam D. Ruppe wrote:
On Thursday, 13 May 2021 at 21:30:43 UTC, Marcone wrote:
template foo(alias pred = "a*b"){
void foo(int x, int y){
writeln(x.unaryFun!pred);
First, you really shouldn't use these at all. instead of a
On Sunday, 16 May 2021 at 15:43:51 UTC, Adam D. Ruppe wrote:
On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote:
Error: undefined identifier 'SetDCBrushColor'
Did you include gdi32.lib on the command line?
I got this error:
C:\Users\Usuario\Arquivos\dm\lib\gdi32.lib
Error 43: Not a
dmc Programa.cpp && Programa.exe
is showing this, but I want show only "Hello World!"
C:\Users\Usuario\Arquivos\Estudando\C\Programa.cpp: <--- I don't
want DMC show this.
Hello World!
[Finished in 0.2s]
On Thursday, 6 May 2021 at 16:00:03 UTC, Paul Backus wrote:
On Thursday, 6 May 2021 at 15:55:07 UTC, Marcone wrote:
dmc Programa.cpp && Programa.exe
is showing this, but I want show only "Hello World!"
C:\Users\Usuario\Arquivos\Estudando\C\Programa.cpp: <--- I
don't want DMC show this.
Well, I am writing a C++ program and compiling with DMC Digital
Mars, and the program is running normally. Can the DMC completely
replace the C or C ++ compiler?
Why gdi32.lib in dmc is not a Valid Library File?
On Sunday, 16 May 2021 at 15:43:51 UTC, Adam D. Ruppe wrote:
On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote:
Error: undefined identifier 'SetDCBrushColor'
Did you include gdi32.lib on the command line?
Yes, I did it. But not work. I get this error:
Error: undefined identifier
On Sunday, 16 May 2021 at 18:06:40 UTC, Jack wrote:
On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote:
Well, I program in D as a hobby for just over a year, and I
like to learn and explore this wonderful programming language.
Now I found the DMC compiler that compiles C ++ code. So I
Well, I program in D as a hobby for just over a year, and I like
to learn and explore this wonderful programming language. Now I
found the DMC compiler that compiles C ++ code. So I decided to
test it. Creating a program with a win32api graphical interface I
run into this error:
Error:
On Thursday, 6 May 2021 at 20:10:29 UTC, Adam D. Ruppe wrote:
On Thursday, 6 May 2021 at 19:59:01 UTC, Marcone wrote:
Well, I am writing a C++ program and compiling with DMC
Digital Mars, and the program is running normally. Can the DMC
completely replace the C or C ++ compiler?
It IS a C
On Thursday, 27 May 2021 at 01:17:44 UTC, someone wrote:
Yes, I know this is a question lacking a straightforward answer.
Requirements:
[...]
Win32Api. You can use resEdit to create your resource GUI. Work
only for Windows. Here is my program created with Dlang and
Win32Api GUI:
On Friday, 28 May 2021 at 17:04:15 UTC, Vinod K Chandran wrote:
On Thursday, 27 May 2021 at 01:17:44 UTC, someone wrote:
I am learning D by writing a Windows only GUI library. It is
taking too much time for me since, I am writing some stuff and
then happen to learn some new things about it
Example:
// --args "C:\Users\Usuario\Downloads\dist\Programa.exe"
import modulo;
void main(string[] args){
if (args.length >= 2)
{
string exePrincipal = args[1];
chdir(exePrincipal.dirName);
foreach(n, i;
On Wednesday, 27 January 2021 at 09:35:21 UTC, Anthony wrote:
I'm trying to read the timed output of a pipeShell command but
it only results in empty output.
Does anyone know why this is?
```
auto p = pipeShell("time ls");
foreach(str; p.stdout.byLine) {
There is a way for create modern windows GUI with WinUI and Dlang?
Why can't I just use: import vibe.vibe; for import packages like
Nim or Python? Why I still use DUB?
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
Why can't I just use: import vibe.vibe; for import packages
like Nim or Python? Why I still use DUB?
In python you also have pip.
It is possible to use vibe.d (any dub
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
Why can't I just use: import vibe.vibe; for import packages
like Nim or Python? Why I still use DUB?
In python you also have pip.
It is possible to use vibe.d (any dub
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
Why can't I just use: import vibe.vibe; for import packages
like Nim or Python? Why I still use DUB?
In python you also have pip.
It is possible to use vibe.d (any dub
When I import modules from dub im my SublimeText, D Linter show
as errors.
Example:
7:8 error dmd:Error module `core` is in file
'vibe\core\core.d' which cannot be read
How solve it?
How make dub import local D modules (mymodule.d) dependencies?
101 - 200 of 267 matches
Mail list logo