Re: question about keeeping reference to toStringz()

2018-05-31 Thread bauss via Digitalmars-d-learn
On Thursday, 31 May 2018 at 02:10:53 UTC, Mike Parker wrote: On Thursday, 31 May 2018 at 01:12:34 UTC, Dr.No wrote: is foo() is being called from a thread, how I am supposed to keep cstring "alive"? As Jonathan explained, you don't have to worry about it if foo() itself doesn't assign the

Stack traces with DMD on OSX

2018-05-31 Thread pineapple via Digitalmars-d-learn
When I run code on OSX and it produces a stack trace, the output uses mangled symbols and is missing line numbers, like so - how can I change these stack traces to be more readable? 0 objectpool 0x000104e9a3bc

Re: Stack traces with DMD on OSX

2018-05-31 Thread Basile B. via Digitalmars-d-learn
On Thursday, 31 May 2018 at 09:11:41 UTC, pineapple wrote: When I run code on OSX and it produces a stack trace, the output uses mangled symbols and is missing line numbers, like so - how can I change these stack traces to be more readable? 0 objectpool

Re: Stack traces with DMD on OSX

2018-05-31 Thread Seb via Digitalmars-d-learn
On Thursday, 31 May 2018 at 09:11:41 UTC, pineapple wrote: When I run code on OSX and it produces a stack trace, the output uses mangled symbols and is missing line numbers, like so - how can I change these stack traces to be more readable? [...] Use DMD master - support for line numbers in

How do I make this function thread safe?

2018-05-31 Thread Dr.No via Digitalmars-d-learn
My application create some HTML which is then converted to PDF by wkhtmltopdf library. I'm trying to figure out how make the PDF generation run parallel, currently, it's running linearly. My guess is wkhtmltopdf internal variables is preventing parallelization. But I'm new to parallization and

Re: Constructing text with astericks

2018-05-31 Thread aberba via Digitalmars-d-learn
On Wednesday, 30 May 2018 at 23:11:06 UTC, Adam D. Ruppe wrote: On Wednesday, 30 May 2018 at 22:57:06 UTC, aberba wrote: How will you approach this problem in D idiomatically? Well, I never bother with "idiomatically", so I can't speak to that, but a simple solution that would work is to

Re: OT: Parsing object files for fun and profit

2018-05-31 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 31 May 2018 at 18:33:37 UTC, Ali Çehreli wrote: On 05/31/2018 09:49 AM, Adam D. Ruppe wrote: > Should be fairly simple to follow, just realize that the image is a 2d > block for each char and that's why there's all those multiplies and > divides. I remember doing similar things

spawn, send, and receive

2018-05-31 Thread Russel Winder via Digitalmars-d-learn
I am fiddling again with writing a D version of Me TV to compare with the C++ (already declared dead), and the Rust version (currently the 'real' version). From the main thread (which eventually becomes the GTK+3 event loop thread) I spawn three threads to create "actors" that pass messages.

Re: Constructing text with astericks

2018-05-31 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 31 May 2018 at 16:05:40 UTC, aberba wrote: That doesn't sound like a trivial thing to do. Ha ha Oh, it isn't that bad if you can get a font as an image file (and have the code to load such image files... but I do!) Take a look at my little answer (SPOILERS THOUGH! Maybe skip to

OT: Parsing object files for fun and profit

2018-05-31 Thread Ali Çehreli via Digitalmars-d-learn
On 05/31/2018 09:49 AM, Adam D. Ruppe wrote: > Should be fairly simple to follow, just realize that the image is a 2d > block for each char and that's why there's all those multiplies and > divides. I remember doing similar things with fonts to add Turkish characters to Digital Research and

Re: Deleting a file with extsion *.FIFO in Windows

2018-05-31 Thread vino.B via Digitalmars-d-learn
On Thursday, 24 May 2018 at 11:31:15 UTC, bauss wrote: On Thursday, 24 May 2018 at 06:59:47 UTC, Vino wrote: Hi All, Request your help on how to delete a file which has the extension .fifo (.javast.fifo) in Windows. From, Vino.B What exactly is your issue with it? Hi Bauss, We have

Re: How do I make this function thread safe?

2018-05-31 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 31 May 2018 at 19:26:12 UTC, Dr.No wrote: My application create some HTML which is then converted to PDF by wkhtmltopdf library. I'm trying to figure out how make the PDF generation run parallel, currently, it's running linearly. It looks like wkhtmltopdf does not support

Re: no [] operator overload for type Chunks!(char[])

2018-05-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/30/18 5:41 PM, Malte wrote: On Wednesday, 30 May 2018 at 21:27:44 UTC, Ali Çehreli wrote: On 05/30/2018 02:19 PM, Malte wrote: Why does this code complain at the last line about a missing [] operator overload? auto buffer = new char[6]; auto chunked = buffer.chunks(3); chunked[1][2] =