On Saturday, 19 March 2022 at 16:54:03 UTC, Anonymouse wrote:
Does anyone have an example snippet code connecting to, reading
from and writing to a server using SSL under Windows with
Secure Channel? Something in a personal project you wouldn't
mind sharing a part of to let me dissect?
On Sunday, 31 January 2021 at 16:50:15 UTC, methonash wrote:
What confuses me, at this point, is this: I originally wrote
the D code using foreach in this style:
foreach( i, ref parentString; strings )
foreach( j, ref childString; strings[ i + 1 .. $ ] )
Essentially, the value of j
On Sunday, 31 May 2020 at 16:57:06 UTC, Steven Schveighoffer
wrote:
I can't imagine much of druntime working at all without TLS.
Indeed, it is a requirement these days.
TLS is evil for async/await when any thread can execute any fiber
(case where fiber tied to thread is wrong/dead version
On Wednesday, 2 October 2019 at 06:41:28 UTC, Rainer Schuetze
wrote:
thanks for the detailed answer
On Tuesday, 1 October 2019 at 16:12:18 UTC, a11e99z wrote:
does anybody some kind of benchmark to test conservative and
precise GC?
precise GC is better or not? is STW improving?
and another question about GC and app parameters:
program.exe “–DRT-gcopt=gc:precise parallel:4”
does anybody some kind of benchmark to test conservative and
precise GC?
precise GC is better or not? is STW improving?
On Wednesday, 25 September 2019 at 12:04:16 UTC, Ron Tarrant
wrote:
On Wednesday, 25 September 2019 at 11:50:58 UTC, a11e99z wrote:
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant
wrote:
Hi y'all,
What I'm looking for is a system for bundling dlang apps and
their dependencies
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant
wrote:
Hi y'all,
I've been Googling how to do this, but coming up with nothing
definitive. Are there any articles for how to do this for:
Windows?
Linux?
other UNIX-alike OSs?
UPX?
https://en.wikipedia.org/wiki/UPX
On Thursday, 12 September 2019 at 07:04:19 UTC, Max Samukha wrote:
How to achieve the same for an array literal? The closest I
could come:
enum immutable(int[3]) _tmp = [1, 2, 3];
__gshared a = _tmp.ptr;
Is it possible to force the array into rodata?
On Tuesday, 10 September 2019 at 06:18:05 UTC, Newbie2019 wrote:
I want to translate this c code into d (build with ldc), so I
can use -flto and inline with other code.
uint64_t _wymum(uint64_t A, uint64_t B){
__uint128_t r = A ;
r *= B;
return (r>>64)^r;
}
Do i need
On Monday, 9 September 2019 at 19:08:17 UTC, WhatMeWorry wrote:
struct FoundationPile {
Card[] up;// all cards are face up on the Foundation
}
FoundationPile[4] foundations;
static if(true) {
int r = 2;
int c = 40;
static foreach(i ; foundations) {
immutable string
On Monday, 9 September 2019 at 09:14:08 UTC, Andre Pany wrote:
I noticed, that I cannot throw from the lambda expression:
Error: expression expected, not throw
but have to use the longer syntax () {throw new Exception();}
---
void foo(void function() e){}
void main()
{
foo(
() =>
On Friday, 6 September 2019 at 09:14:31 UTC, Andrew Edwards wrote:
C++ allows the for following:
struct Demo
{
float a, b, c, d;
Demo() { a = b = c = d = 0.0f; }
Demo(float _a, float _b, float _c, float _d) {
a = _a;
b = _b;
On Tuesday, 3 September 2019 at 13:25:30 UTC, lili wrote:
On Tuesday, 3 September 2019 at 13:21:16 UTC, a11e99z wrote:
On Tuesday, 3 September 2019 at 12:55:29 UTC, lili wrote:
string d = "3.43.3 ";
double a;
double b;
//formattedRead(d,"%f %f", , );
On Tuesday, 3 September 2019 at 12:55:29 UTC, lili wrote:
Hi guys:
input is two line, first line is a number n and second line
is n float point number,
e.g. 3
1.1 2.2 3.3
how use stdin.readf get all number.
u can read array this way too
auto darr = readln.split.map!(x
On Tuesday, 3 September 2019 at 12:55:29 UTC, lili wrote:
Hi guys:
input is two line, first line is a number n and second line
is n float point number,
e.g. 3
1.1 2.2 3.3
how use stdin.readf get all number.
https://dlang.org/library/std/stdio/readf.html
see example
On Wednesday, 28 August 2019 at 12:19:54 UTC, Andre Pany wrote:
Hi,
I call another process using function pipeShell and
Redirect.all.
import std;
void main()
{
auto p = pipeShell("a.exe", Redirect.all);
p.stdin.writeln("e1");
p.stdin.writeln("10");
p.stdin.writeln("e2");
On Wednesday, 28 August 2019 at 12:19:54 UTC, Andre Pany wrote:
and try to use
https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode
SEM_FAILCRITICALERRORS
for mother process and child process will inherit it
On Wednesday, 28 August 2019 at 12:19:54 UTC, Andre Pany wrote:
Hi,
I call another process using function pipeShell and
Redirect.all.
In case the child process(also D application) throws an
exception (str to int conversion exception), the child process
shows a message box on windows.
On Tuesday, 27 August 2019 at 20:35:16 UTC, bachmeier wrote:
On Tuesday, 27 August 2019 at 20:14:21 UTC, Machine Code wrote:
It isn't really hard:
It really is hard. foo.byPair.array.sort!((a, b) => a.key <
b.key).map!(a => a.value); is a lot to digest for someone
learning the language.
On Wednesday, 28 August 2019 at 05:17:28 UTC, Jabari Zakiya wrote:
On Wednesday, 28 August 2019 at 04:39:23 UTC, Mike Parker wrote:
On Wednesday, 28 August 2019 at 04:19:49 UTC, Jabari Zakiya
wrote:
I have a function (say func1) that takes 1 input value (an
integer number) and outputs 4 values
On Tuesday, 27 August 2019 at 21:01:58 UTC, Andre Pany wrote:
On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote:
On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:
"b" should send data in loop too, then "a" will work ok.
do u still hack CodinGame? :)
On Tuesday, 27 August 2019 at 21:28:05 UTC, a11e99z wrote:
On Tuesday, 27 August 2019 at 21:01:58 UTC, Andre Pany wrote:
On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote:
On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:
what result u expecting?
then u send from "b"
On Tuesday, 27 August 2019 at 21:01:58 UTC, Andre Pany wrote:
On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote:
On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:
what result u expecting?
u send from "b": e1 10 e2 9
"a" read it. 1st loop finished.
then u send from "b"
On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:
This applications will be called by a second application:
import std;
void main() {
auto p = pipeShell("a", Redirect.all);
p.stdin.writeln("e1");
p.stdin.writeln("10");
p.stdin.writeln("e2");
p.stdin.writeln("9");
On Monday, 26 August 2019 at 09:58:30 UTC, Per Nordlöw wrote:
On Monday, 26 August 2019 at 09:54:30 UTC, Per Nordlöw wrote:
I have made some significant optimizations with regards to
compilation performance at
https://github.com/nordlow/phobos-next/blob/master/src/soa.d
What is the
On Monday, 26 August 2019 at 09:14:23 UTC, Jonathan M Davis wrote:
On Sunday, August 25, 2019 11:59:08 PM MDT berni via
- Jonathan M Davis
OFFTOPIC:
(dont have ur email. dont like emails cuz too officially and too
long)
(and dont want create new topic. this one probably
solved/finished
On Sunday, 25 August 2019 at 16:54:33 UTC, Samir wrote:
Is there a way to output the values of an associative array
based on the lexicographic order of the keys?
For example, if foo = ["VXE":8, "BZP":5, "JLC":2], I'd like to
output something like:
5
2
8
auto foo = ["VXE":8, "BZP":5,
On Sunday, 25 August 2019 at 13:43:42 UTC, a11e99z wrote:
On Sunday, 25 August 2019 at 13:24:57 UTC, lili wrote:
On Saturday, 24 August 2019 at 12:55:57 UTC, a11e99z wrote:
and try to use any compiler DMD/LDC/GDC.
maybe result will be that u want.
On Sunday, 25 August 2019 at 13:24:57 UTC, lili wrote:
On Saturday, 24 August 2019 at 12:55:57 UTC, a11e99z wrote:
On Saturday, 24 August 2019 at 12:16:34 UTC, lili wrote:
On Saturday, 24 August 2019 at 12:09:19 UTC, a11e99z wrote:
On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote:
On Saturday, 24 August 2019 at 19:35:25 UTC, berni wrote:
I've got two associative arrays and want to get a new one,
which is created out of both of them:
This works:
string[int] a = [1:"one", 7:"seven"];
string[int] b = [5:"five", 9:"nine"];
string[int] tmp = a.dup;
foreach (k,v;b) tmp[k] =
On Saturday, 24 August 2019 at 12:16:34 UTC, lili wrote:
On Saturday, 24 August 2019 at 12:09:19 UTC, a11e99z wrote:
On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote:
[...]
resb 8
just reserving 8 bytes not initializing it.
probably u compare some garbage. sometimes it equals,
On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote:
Hi:
definition _vga_x and _vga_y symbol in asm, compile use nasm
-f elf64 -o boot.o boot.asm
[section .bss]
...
[global _vga_x]
_vga_x:
resb 8
[global _vga_y]
_vga_y:
resb 8
and nm boot.o show
On Friday, 23 August 2019 at 17:50:52 UTC, jicman wrote:
On Friday, 23 August 2019 at 17:18:55 UTC, a11e99z wrote:
On Friday, 23 August 2019 at 17:03:24 UTC, jicman wrote:
On Friday, 23 August 2019 at 16:49:07 UTC, a11e99z wrote:
right now problem exists with linker/libs only, compiler see
On Friday, 23 August 2019 at 17:03:24 UTC, jicman wrote:
On Friday, 23 August 2019 at 16:49:07 UTC, a11e99z wrote:
right now problem exists with linker/libs only, compiler see
all used VarXXX
First of all, thanks for your patient support.
to the above program, and still fails with the same
On Friday, 23 August 2019 at 16:09:16 UTC, jicman wrote:
On Friday, 23 August 2019 at 16:02:38 UTC, a11e99z wrote:
On Friday, 23 August 2019 at 16:00:00 UTC, a11e99z wrote:
On Friday, 23 August 2019 at 14:02:36 UTC, jicman wrote:
On Thursday, 22 August 2019 at 19:59:55 UTC, jicman wrote:
On Friday, 23 August 2019 at 16:00:00 UTC, a11e99z wrote:
On Friday, 23 August 2019 at 14:02:36 UTC, jicman wrote:
On Thursday, 22 August 2019 at 19:59:55 UTC, jicman wrote:
cuz I tried compile app
void main() { VARIANT a, b; VarCmp( , , 0, 0).writeln; }
with DMD for x86/m32 & x64/m64 and I
On Friday, 23 August 2019 at 14:02:36 UTC, jicman wrote:
On Thursday, 22 August 2019 at 19:59:55 UTC, jicman wrote:
I think I have figured out what is going on. I will comeback,
if I need more help, but I have to rewrite a few more
functions. But, thanks for pointing out the pragma. That
On Thursday, 22 August 2019 at 16:59:03 UTC, jicman wrote:
On Thursday, 22 August 2019 at 16:36:45 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:34:52 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:07:00 UTC, jicman
On Thursday, 22 August 2019 at 16:34:52 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote:
On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote:
case of string doesn't matter for Windows.
I mean
On Thursday, 22 August 2019 at 16:34:06 UTC, a11e99z wrote:
On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote:
On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote:
case of string doesn't matter for Windows.
I mean for command lines (not in D code)
On Thursday, 22 August 2019 at 16:07:00 UTC, jicman wrote:
On Thursday, 22 August 2019 at 15:58:56 UTC, a11e99z wrote:
try to add
pragma( lib, "OleAut32.lib" )
Thanks for the support, a11e99z. :-)
I have,
pragma(lib, "ole32.lib");
pragma(lib, "oleaut32.lib");
on that file. But I did go
On Thursday, 22 August 2019 at 15:55:48 UTC, jicman wrote:
Greetings!
I have been working on Juno for a long time with D1 version
1.046, and love it. But now, I want to update it to 1.076, the
latest and greatest D1. I have fixed, what I think, were all of
the problems. However, when I
On Tuesday, 20 August 2019 at 12:52:31 UTC, BoQsc wrote:
Hello everyone, again,
I had an idea that I want some colors in the output of Command
Line (For Windows) and the Terminal (For Linux)
yesterday was talks about terminal colors in IRC-channel:
u can use VT-codes for changing colors:
On Tuesday, 20 August 2019 at 09:49:21 UTC, Daniel Kozak wrote:
On Tue, Aug 20, 2019 at 11:30 AM ads via Digitalmars-d-learn
wrote:
you do not allow a person to think about a problem (and it’s easy
here).
you carried him through a puddle now, but when he dives into Sea
D, you will not be
On Tuesday, 20 August 2019 at 09:27:36 UTC, ads wrote:
import std.stdio;
ubyte[] extend(in uint[] arr)
{
ubyte[] result;
foreach (n; arr)
{
if (n < 10)
result ~= n;
else
{
On Tuesday, 13 August 2019 at 06:39:24 UTC, a11e99z wrote:
On Tuesday, 13 August 2019 at 05:57:23 UTC, Mike Parker wrote:
On Tuesday, 13 August 2019 at 04:40:53 UTC, Chris Katko wrote:
OT:
and again how to easy to google info about error/warning just
with one word "CS0108"
D can use attrs
On Tuesday, 13 August 2019 at 05:57:23 UTC, Mike Parker wrote:
On Tuesday, 13 August 2019 at 04:40:53 UTC, Chris Katko wrote:
I don't know if I'd call that shadowing. This is how it works
in Java, too. There's no such thing as a vtable for member
variables -- each class gets its own set and
On Monday, 12 August 2019 at 13:08:17 UTC, Bert wrote:
One of the biggest issues I have with D is properly gui
development. It's just a real pain in the ass compared to wpf
and C#.
maybe it is better to use WinRT instead of C#/WPF?
- can be used for desktop apps too
- same XAML
- WinRT based
On Monday, 12 August 2019 at 09:16:19 UTC, Alex wrote:
On Monday, 12 August 2019 at 08:54:56 UTC, lili wrote:
Hi:
Why need defined an abstract final class?
see
https://github.com/Rikarin/Trinix/blob/master/Kernel/arch/amd64/gdt.d
From what I saw, all members are static. So, this is
On Thursday, 8 August 2019 at 14:55:37 UTC, Andrey Zherikov wrote:
I have the following code:
// main.d
int main()
{
import std.stdio;
writeln("hello");
return 0;
}
But if I create library from lib.d first and then link it with
main.d then ctor/dtor are not called:
$ dmd.exe -lib
On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
Hi everyone,
I would like an honest opinion.
I have a beginner level (able to do very small programs) in a
few languages such as python, go, C, guile(scheme) and common
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
Hi everyone,
I would like an honest opinion.
I have a beginner level (able to do very small programs) in a
few languages such as python, go, C, guile(scheme) and common
lisp. I want to pick a language and go deep with it and focus
On Wednesday, 24 July 2019 at 16:16:15 UTC, Greatsam4sure wrote:
On Wednesday, 24 July 2019 at 15:57:06 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:56:13 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure
The result is always to six significant figure. I
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure wrote:
int main(){
double mum = 0;
Write("enter a number: ")
readf(" %s\n",);
Writeln(num);
}
How do I return the complete number the user enter since I
don't since the user can enter numbers of various length with
dmd
On Wednesday, 24 July 2019 at 15:56:13 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure wrote:
int main(){
double mum = 0;
Write("enter a number: ")
readf(" %s\n",);
Writeln(num);
}
How do I return the complete number the user enter since I
don't since the
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure wrote:
int main(){
double mum = 0;
Write("enter a number: ")
readf(" %s\n",);
Writeln(num);
}
How do I return the complete number the user enter since I
don't since the user can enter numbers of various length with
dmd
On Saturday, 13 July 2019 at 06:25:37 UTC, Andrey wrote:
On Tuesday, 9 July 2019 at 19:04:53 UTC, Max Haughton wrote:
Is this a 64 or 32 bit compiler? Also could you post the
source code if possible?
You could try "--DRT-gcopt=profile:1" druntime flag to see if
the compiler is running out of
On Tuesday, 9 July 2019 at 12:14:38 UTC, BoQsc wrote:
On Tuesday, 9 July 2019 at 11:11:53 UTC, Dejan Lekic wrote:
auto result = SendMessageTimeoutW(
HWND_BROADCAST,
WM_SETTINGCHANGE,
0,
envi.toUTF16z,
SMTO_ABORTIFHUNG,
timeout,
null
On Sunday, 7 July 2019 at 17:07:59 UTC, a11e99z wrote:
On Sunday, 7 July 2019 at 16:51:57 UTC, 0xEAB wrote:
Why does this `static foreach` lead to hidden usage of
operator `~=` calls in some cases?
probably same
oops! this one
On Sunday, 7 July 2019 at 16:51:57 UTC, 0xEAB wrote:
Why does this `static foreach` lead to hidden usage of operator
`~=` calls in some cases?
probably same
https://forum.dlang.org/post/qd9ee0$2eud$1...@digitalmars.com
On Saturday, 6 July 2019 at 12:10:13 UTC, berni wrote:
On Saturday, 6 July 2019 at 11:48:51 UTC, a11e99z wrote:
Maybe I need to explain, what I dislike with this approach:
take() calls popFront n times and drop() calls popFront another
n times giving a total of 2n times (depending on the
On Saturday, 6 July 2019 at 11:48:42 UTC, berni wrote:
On Thursday, 4 July 2019 at 17:00:33 UTC, Q. Schroll wrote:
The prime example is printing the comma when printing a list:
There is one between any two elements, but neither is one at
front or behind the last one.
If it is just for
On Saturday, 6 July 2019 at 11:20:50 UTC, berni wrote:
I want to copy the first n items of a range to an array, I came
up with this now:
data = r.take(n).array;
This works partly, because the values of r are not consumed. So
I have to call afterwards:
r = r.drop(n);
Now I wonder, if it is
On Thursday, 4 July 2019 at 10:56:50 UTC, Nick Treleaven wrote:
immutable(int[]) f() @nogc {
return [1,2];
}
onlineapp.d(2): Error: array literal in `@nogc` function
`onlineapp.f` may cause a GC allocation
specify the size of the static array:
immutable(int[ 2 /*HERE*/ ]) f() @nogc {
On Sunday, 30 June 2019 at 17:24:03 UTC, Robert M. Münch wrote:
I have a case, with templates, where an assert in a unittest
can access a private memember and I don't know how this can
happen.
Before trying to creat an equivalent case, I want to
cross-check, if assert has special semantics
On Sunday, 30 June 2019 at 15:22:42 UTC, Samir wrote:
How come this works:
int[4][2] ta = [[2, 1, 4, 3], [3, 10, 2, 5]];
writeln(ta[1].maxElement); // get error on this line
try to take slice from static arrays
writeln(ta[1][].maxElement);
or use dynamic arrays (slices)
int[][] ta = [[2, 1,
On Thursday, 27 June 2019 at 13:52:43 UTC, a11e99z wrote:
On Thursday, 27 June 2019 at 13:31:23 UTC, Tabamon wrote:
1) try to google "dlang read text file", most probably 1,2,3
link will help to u.
2) https://dlang.org/library/std/file/read_text.html
string content = readText( fileName );
On Thursday, 27 June 2019 at 13:31:23 UTC, Tabamon wrote:
I am new at D, I'm making a sudoku solver in D, I wanted to add
the option to read sudoku from a .txt file.
1) try to google "dlang read text file", most probably 1,2,3 link
will help to u.
2)
69 matches
Mail list logo