On 1/7/22 5:04 PM, eugene wrote:
On Friday, 7 January 2022 at 21:17:33 UTC, Steven Schveighoffer wrote:
In C you have one choice (printf), but that choice may not fit your
needs.
There are 2 buffers (RX one and TX one, both of 'reasonable' size)
(it's the effing echo-server, nothing more)
Ir
On Friday, 7 January 2022 at 22:04:28 UTC, eugene wrote:
There are 2 buffers (RX one and TX one, both of 'reasonable'
size)
(it's the effing echo-server, nothing more)
* print content of RX-buffer, ommiting terminating '\n' ('\n'
is the 'end of request') to (log/journal file)/stdout/
* oupt
On Thursday, 30 December 2021 at 09:34:27 UTC, eugene wrote:
```d
char[] s = cast(char[])ioCtx.buf[0 ..
strlen(cast(char*)ioCtx.buf.ptr) - 1];
// -1 is to eliminate terminating '\n'
writefln("got '%s' from '%s:%d'", s, client.addr, client.port);
```
Is there some more concise/elegant way to d
On Friday, 7 January 2022 at 20:48:17 UTC, mesni wrote:
Windows: when creating dll file, ClassInfo and ModuleInfo are
not exported? The linker swears specifically at *__Class or
*__ModuleInfo symbols.
nothing is exported unless you use the export keyword or a module
definition file.
but the
On Friday, 7 January 2022 at 21:17:33 UTC, Steven Schveighoffer
wrote:
In C you have one choice (printf), but that choice may not fit
your needs.
There are 2 buffers (RX one and TX one, both of 'reasonable' size)
(it's the effing echo-server, nothing more)
* print content of RX-buffer, ommitin
On Friday, 7 January 2022 at 20:40:02 UTC, Adam D Ruppe wrote:
On Friday, 7 January 2022 at 20:33:05 UTC, eugene wrote:
* python guys have memory leaks
* js guys have memory leaks
GC isn't actually there to prevent memory leaks.
Aha, unless you'll build GC into OS core :)
Its main job is to
On 1/7/22 2:54 PM, eugene wrote:
A couple of impressions...
* Does .until() make a copy of original string? And GC then will take
care of it?
No, `until` will iterate the string one character at a time until it
sees that character (excluding it). It doesn't make a copy of the data.
In eff
On Friday, 7 January 2022 at 20:48:17 UTC, mesni wrote:
Windows: when creating dll file, ClassInfo and ModuleInfo are
not exported? The linker swears specifically at *__Class or
*__ModuleInfo symbols.
DMD 2.98
Windows: when creating dll file, ClassInfo and ModuleInfo are not
exported? The linker swears specifically at *__Class or
*__ModuleInfo symbols.
On Friday, 7 January 2022 at 20:33:05 UTC, eugene wrote:
* python guys have memory leaks
* js guys have memory leaks
GC isn't actually there to prevent memory leaks. Its main job is
to guard against use-after-free memory corruption bugs.
Actually, technically, the paradigm is "infinite lifet
On Friday, 7 January 2022 at 20:08:00 UTC, H. S. Teoh wrote:
So it should be good even for GC-phobic code.
Nice term - "GC-phobic" :)
But looking from my cave - it's not a phobia, it's an
observation.
We've got a huge and complex project at my job, and...
* python guys have memory leaks
*
On Friday, 7 January 2022 at 20:08:00 UTC, H. S. Teoh wrote:
The simplest way to handle a C string from D is just to use
.fromStringz:
yes, this approach was used in some my previous traival
On Sunday, 2 January 2022 at 15:13:06 UTC, Paul Backus wrote:
On Sunday, 2 January 2022 at 09:15:32 UTC, eugene wrote:
```
p1.d(9): Error: cannot cast expression `until(b[], '\x0a',
Flag.yes)` of type `Until!("a == b", ubyte[], char)` to
`char[]`
```
Here's a working version:
```d
import
On Fri, Jan 07, 2022 at 07:54:28PM +, eugene via Digitalmars-d-learn wrote:
[...]
> * Does .until() make a copy of original string? And GC then will take
> care of it?
No, it's one of the lazy range functions that lazily evaluates the
string and does not allocate.
> * So many ways to do sim
On Monday, 3 January 2022 at 02:50:46 UTC, Steven Schveighoffer
wrote:
On 1/2/22 4:15 AM, eugene wrote:
On Sunday, 2 January 2022 at 08:39:57 UTC, eugene wrote:
```d
writefln("'%s, world'", cast(char[])b[].until('\n'));
}
```
You missed a set of parentheses.
That was lack of attention
On Tuesday, 4 January 2022 at 22:17:38 UTC, kdevel wrote:
Is there any chance to rephrase fsobjects.d such that it
becomes a "header only"/"compile only" file of which no object
file must be presented to the linker?
https://wiki.dlang.org/LDC-specific_language_changes#LDC_no_moduleinfo
-Joh
On 1/6/22 6:06 PM, kdevel wrote:
When you import this file, the compiler sees that it has imports, and
assumes you must have built the `ModuleInfo` in some object somewhere,
so it outputs a reference for the import graph.
Makes sense. It seems that if there are just type definitions with enum
On Thursday, 6 January 2022 at 22:54:59 UTC, kdevel wrote:
In my setup make decides which file to (re)compile. Just found
that dmd has the option -makedeps which resembles gcc's -M but
theres no -MM to excluded dependencies from system files. Also
gcc -M/-MM does not compile while dmd always g
18 matches
Mail list logo