Re: SIGUSR1, SIGUSR2

2020-12-11 Thread Panke via Digitalmars-d-learn
On Friday, 11 December 2020 at 17:32:54 UTC, Adam D. Ruppe wrote: On Friday, 11 December 2020 at 17:29:12 UTC, Panke wrote: But somehow my process gets signalled with USR1 and USR2 all the time. If I do The garbage collector uses sig usr1/2 to pause threads so it can do its collection work.

Re: SIGUSR1, SIGUSR2

2020-12-11 Thread Panke via Digitalmars-d-learn
On Friday, 11 December 2020 at 17:32:54 UTC, Adam D. Ruppe wrote: On Friday, 11 December 2020 at 17:29:12 UTC, Panke wrote: But somehow my process gets signalled with USR1 and USR2 all the time. If I do The garbage collector uses sig usr1/2 to pause threads so it can do its collection work.

SIGUSR1, SIGUSR2

2020-12-11 Thread Panke via Digitalmars-d-learn
I have as vibe.d application that opens some websockets, reads messages and does something with them (currently mostly writing them to disk). The processing happens in background threads started with runWorkerTask, the websocket code runs as a normal task (runTask), everything is

Re: Using Vibe.d for not HTTP

2020-05-25 Thread Panke via Digitalmars-d-learn
On Monday, 25 May 2020 at 12:04:12 UTC, Russel Winder wrote: Now I need to find out how to spawn a task that can send out data even when the connection handler is blocked awaiting something to read. https://vibed.org/api/vibe.core.core/runTask ?

Re: Using Vibe.d for not HTTP

2020-05-24 Thread Panke via Digitalmars-d-learn
On Sunday, 24 May 2020 at 16:14:58 UTC, Russel Winder wrote: On Sun, 2020-05-24 at 17:01 +0100, Russel Winder wrote: […] connection.read(buffer, IOMode.once); What an idiot I am, this call returns the read count, which makes it fine. Progress now being made. I had a look. Documentation

Re: Spawn a Command Line application Window and output log information

2020-05-18 Thread Panke via Digitalmars-d-learn
On Monday, 18 May 2020 at 16:36:11 UTC, BoQsc wrote: I'd like to have application as small as possible with a simple Command Line Window. I'd use that Window to output notices, log information and the like. Would this require GUI library and how can this be achieved? If you do not want to

Does anyone have gdb pretty printers for buildin types like associative arrays?

2020-03-15 Thread Panke via Digitalmars-d-learn
At least on my installation they are printed as just a pointer. Should this just work and by box is not correctly configured or do I need some pretty printers? If so, has someone already made them?

Re: Typescript with vibe.d

2020-03-09 Thread Panke via Digitalmars-d-learn
On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote: I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possible What do you want to do?

best practices for a new project

2020-02-17 Thread Panke via Digitalmars-d-learn
When I start a new project is there anything that I should get right from the start? Like using a specific set of compiler flags (e.g. -dip1000)? Is there an overview over the status of upcoming language changes (-preview=?), e.g. what about -preview=rvaluerefparam? Should I use it?

Re: std.variant.Algebraic, self referential types and delegate members

2015-11-08 Thread Panke via Digitalmars-d-learn
On Sunday, 8 November 2015 at 11:28:05 UTC, Jonathan M Davis wrote: On Sunday, November 08, 2015 10:31:11 Panke via Digitalmars-d-learn wrote: import std.variant, std.stdio; --- struct NodeTypeA(T) { T[] children; } struct NodeTypeB(T) { Tree children; } struct Leaf(T) { T delegate() dg

std.variant.Algebraic, self referential types and delegate members

2015-11-08 Thread Panke via Digitalmars-d-learn
import std.variant, std.stdio; --- struct NodeTypeA(T) { T[] children; } struct NodeTypeB(T) { Tree children; } struct Leaf(T) { T delegate() dg; } alias Tree = Algebraic!(Leaf, NodeTypeA!This, NodeTypeB!This); void main() { Tree t; } --- yields tmp.d(6): Error: functions cannot return

dbgVerifySorted is not nothrow

2015-11-08 Thread Panke via Digitalmars-d-learn
I've updated my compiler and ran into this regression: https://issues.dlang.org/show_bug.cgi?id=14981 Code: --- import std.algorithm, std.container; void main() { static bool compare(P a, P b) { return a.curColumn < b.curColumn; } Array!P a =

Re: How to use std.experimental.logger?

2015-10-01 Thread Panke via Digitalmars-d-learn
Ah, I tried to format a custom struct that has a non-pure toString, because std.conv.to isn't pure either, sigh :(

How to use std.experimental.logger?

2015-10-01 Thread Panke via Digitalmars-d-learn
I tried it on Windows today using the latest DMD installer, all default logger and settings. I get: safe function [...].logImplf cannot call system function 'std.format.formattedWrite!(MsgRange, char, Result!()).formattedWrite' How do I make formatted logging work?

Re: Printing an std.container.Array

2015-04-16 Thread Panke via Digitalmars-d-learn
On Thursday, 16 April 2015 at 19:55:53 UTC, Bayan Rafeh wrote: How am I supposed to interpret this? The array contains two elements. The first equals one and the second equals two. What happens under the hood is that Array does no provide a toString method, instead a default is used. This

Re: Printing an std.container.Array

2015-04-16 Thread Panke via Digitalmars-d-learn
Yep, but problem is almost no one expect this, or know this. We definitely should do better. How?

Re: How to generate a random string ...

2015-03-17 Thread Panke via Digitalmars-d-learn
On Monday, 16 March 2015 at 13:33:55 UTC, Robert burner Schadek wrote: ... from all Unicode characters in an idiomatic D way? (std.interal.unicode_*) ``` T genUnicodeString(T)(size_t minChars, size_t maxChars) if(isSomeString!T) { ... } ``` You'll need two things. A uniform