On Sunday, 28 February 2021 at 13:15:47 UTC, Adam D. Ruppe wrote:
On Sunday, 28 February 2021 at 07:05:27 UTC, Jack wrote:
I'm using a windows callback function where the user-defined
value is passed thought a LPARAM argument type. I'd like to
pass my D array then access it from that callback
On Tuesday, 16 March 2021 at 03:33:55 UTC, Lasheen wrote:
Hello, I'm a C programmer, and now i want to migrate to D.
i work in AI field, so i have some questions about D language:
1- is D suitable for mission critical systems(such as avionics
systems) ?
if (true){
2- what about safety,
On 3/16/21 1:58 AM, David Skluzacek wrote:
>
> Error: template std.algorithm.iteration.splitter cannot deduce
function from argument types !()(GZippedFile, string), candidates are:
> /usr/include/dlang/dmd/std/algorithm/iteration.d(4678):
splitter(alias pred = "a == b", Range, Separator)(Range
I find myself writing
foreach (_; 0 .. n)
doSomething(); // no using the variable `_`
.
What about relaxing the syntax to allow
foreach (; 0 .. n)
and/or
foreach (0 .. n)
?
Thereby making the `ForeachTypeList` of `AggregateForeach` in the
grammar rule [1] optional.
[1]
On Tuesday, 16 March 2021 at 12:49:13 UTC, Per Nordlöw wrote:
I find myself writing
foreach (_; 0 .. n)
doSomething(); // no using the variable `_`
.
What about relaxing the syntax to allow
foreach (; 0 .. n)
and/or
foreach (0 .. n)
?
Thereby making the `ForeachTypeList` of
On Tuesday, 16 March 2021 at 13:52:29 UTC, Per Nordlöw wrote:
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
Then why not just do:
auto times(alias F, T)(T number)
{
return number.iota.each!(_ =>
On Sunday, 28 February 2021 at 13:15:47 UTC, Adam D. Ruppe wrote:
And it is the simplest thing, no missing length, no weird
property casting. The GC handled with two simple add/remove
calls.
Perfect example of teaching something. Thank you for this
knowledge. Even though, this was not my
On Monday, 15 March 2021 at 01:36:08 UTC, sharkloc wrote:
I want to read the content(file.gz) line by line,the following
code is not friendly to large files of hundreds of Gb, and the
memory overhead is also very large.
You can use the internal zlib instead of a shell. This example is
using
On Tuesday, 16 March 2021 at 16:02:14 UTC, Vinod K Chandran wrote:
On Sunday, 28 February 2021 at 13:15:47 UTC, Adam D. Ruppe
wrote:
And it is the simplest thing, no missing length, no weird
property casting. The GC handled with two simple add/remove
calls.
Perfect example of teaching
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
On 3/16/21 8:49 AM, Per Nordlöw wrote:
I find myself writing
foreach (_; 0 .. n)
doSomething(); // no using the variable `_`
.
What about relaxing the syntax to allow
foreach (; 0 .. n)
and/or
foreach (0 .. n)
?
Thereby making the `ForeachTypeList` of `AggregateForeach` in
On Tuesday, 16 March 2021 at 12:49:13 UTC, Per Nordlöw wrote:
I find myself writing
foreach (_; 0 .. n)
doSomething(); // no using the variable `_`
.
What about relaxing the syntax to allow
foreach (; 0 .. n)
and/or
foreach (0 .. n)
?
Thereby making the `ForeachTypeList` of
On Tuesday, 16 March 2021 at 15:02:54 UTC, Steven Schveighoffer
wrote:
On 3/16/21 8:49 AM, Per Nordlöw wrote:
I find myself writing
foreach (_; 0 .. n)
doSomething(); // no using the variable `_`
.
What about relaxing the syntax to allow
foreach (; 0 .. n)
and/or
foreach (0
On Tuesday, 16 March 2021 at 18:35:00 UTC, Imperatorn wrote:
I see
Do you get CLR_INVALID in return?
As far as i know this is the value of CLR_INVALID - 4294967295.
And these are the results i got from my function.
Set Text color result - 0
Set Text color result - 36962150
Set Text
On Tuesday, 16 March 2021 at 18:35:00 UTC, Imperatorn wrote:
I see
Do you get CLR_INVALID in return?
From that results, second one contains my color value.
Set Text color result - 0233FF66
RGB(102, 255, 51) is the color.
66 = 102
FF = 255
33 = 51
On Tuesday, 16 March 2021 at 18:35:00 UTC, Imperatorn wrote:
I see
Do you get CLR_INVALID in return?
That results might be wrong. So i printed them in hex. These are
the hex results.
Set Text color result -
Set Text color result - 0233FF66
Set Text color result -
Set
On Tuesday, 16 March 2021 at 19:15:02 UTC, Vinod K Chandran wrote:
On Tuesday, 16 March 2021 at 18:35:00 UTC, Imperatorn wrote:
I see
Do you get CLR_INVALID in return?
That results might be wrong. So i printed them in hex. These
are the hex results.
Set Text color result -
Set
On 3/14/21 9:36 PM, sharkloc wrote:
I want to read the content(file.gz) line by line,the following code is
not friendly to large files of hundreds of Gb, and the memory overhead
is also very large.
import std.stdio;
import std.process;
import std.string;
void main(string[] args){
On Tuesday, 16 March 2021 at 07:43:18 UTC, drug wrote:
That means that you GZippedRange should provide opSlice
operator and should be a narrow string (string of char or wchar)
Yes, I should have looked more carefully at the doc, I was
assuming splitter would accept a simple input range, but
Hi D
I've writing little test scripts using rdmd to understand what
various functions are really doing (ex: .take(5)). I'm up to the
point where I need to write sample code to understand
mir-algorithm a little better, but of course the library is not
installed on my system. So two related
On Wednesday, 17 March 2021 at 03:43:22 UTC, Chris Piker wrote:
Note: I'm aware of dub. This isn't a question about dub. I'm
making scripts for local use, not redistributable binaries, so
I would like to "install" mir-algorithm and similar libraries
for my rdmd scripts to use.
Sorry to
On Tuesday, 16 March 2021 at 18:27:54 UTC, Vinod K Chandran wrote:
On Tuesday, 16 March 2021 at 17:45:09 UTC, Imperatorn wrote:
Omg the pain. Are you forced to use raw win api for this?
Not at all. It's my hobby project. I choose raw win api. It's a
fun.
I see
Do you get CLR_INVALID
On Tuesday, 16 March 2021 at 17:26:01 UTC, Vinod K Chandran wrote:
Hi all,
I am creating a Button class with Win32 API functions. So far
so good. I am using NM_CUSTOMDRAW message to change the back
color of my buttons. It's really easy to change the back color
in this way. But I can't change
On Tuesday, 16 March 2021 at 16:29:45 UTC, Imperatorn wrote:
On Tuesday, 16 March 2021 at 13:52:29 UTC, Per Nordlöw wrote:
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
Then why not just do:
auto
Hi all,
I am creating a Button class with Win32 API functions. So far so
good. I am using NM_CUSTOMDRAW message to change the back color
of my buttons. It's really easy to change the back color in this
way. But I can't change the text color of my button. This is my
pseudo code.
```
uint
On Tuesday, 16 March 2021 at 17:26:01 UTC, Vinod K Chandran wrote:
Hi all,
I am creating a Button class with Win32 API functions. So far
so good. I am using NM_CUSTOMDRAW message to change the back
color of my buttons. It's really easy to change the back color
in this way. But I can't change
On Tuesday, 16 March 2021 at 17:45:09 UTC, Imperatorn wrote:
Omg the pain. Are you forced to use raw win api for this?
Not at all. It's my hobby project. I choose raw win api. It's a
fun.
On Sunday, 14 March 2021 at 16:30:47 UTC, Bastiaan Veelo wrote:
On Sunday, 14 March 2021 at 16:09:39 UTC, Imperatorn wrote:
On Sunday, 14 March 2021 at 10:42:17 UTC, wolframw wrote:
[...]
May be a regression?
https://issues.dlang.org/show_bug.cgi?id=16573
Indeed:
On Tuesday, 16 March 2021 at 19:42:26 UTC, Imperatorn wrote:
At last, i found the answer myself. There is a item called
dwDrawStage in NMCUSTOMDRAW structure. If value of dwDrawStage
is equal to CDDS_PREERASE, call SetBkMode with transparent and
call SetTextColor. Then draw text with
On Monday, 30 December 2013 at 08:13:30 UTC, bearophile wrote:
How to free memory to the system immediately?
What is your use case?
The use case is: we want deterministic memory management, (and
the application data is too big to fit into memory at once, so
have to be processed batch by
On Tue, Mar 16, 2021 at 11:28:00PM +, mw via Digitalmars-d-learn wrote:
[...]
> suppose:
>
> double[] data; // D type: dynamic array
>
> As of 2021 what's the correct way to allocate and deallocate (free
> memory to the system immediately) D's dynamic array?
[...]
Note that T[] is just a
31 matches
Mail list logo