Re: How to convert PDF to PNG using DMagick?

2021-09-25 Thread tastyminerals via Digitalmars-d-learn
On Saturday, 25 September 2021 at 16:27:35 UTC, Tejas wrote: On Saturday, 25 September 2021 at 15:14:50 UTC, Mike Wey wrote: On 25-09-2021 15:21, tastyminerals wrote: [...] It's been awhile since i used it myself, but if imagemagick supports reading PDF's this might work: ``` Image pdf = n

Re: LDC 1.28.0-beta1

2021-09-25 Thread kinke via Digitalmars-d-learn
Argh, wrong forum section, proper (identical) post: https://forum.dlang.org/thread/hcwukzoamezbpzrbk...@forum.dlang.org

LDC 1.28.0-beta1

2021-09-25 Thread kinke via Digitalmars-d-learn
Glad to announce the first beta for LDC 1.28 - some highlights: * Based on D 2.098.0-beta.2+ (today's stable). * Dynamic casts across binary boundaries (DLLs etc.) now work. * Windows: `-dllimport=defaultLibsOnly` doesn't require `-linkonce-templates` anymore. Full release log and downloads:

Re: bindbc-lua :: Return tables from D

2021-09-25 Thread russhy via Digitalmars-d-learn
bindbc-lua expect the function to be nothrow This should work: ```D import std.stdio : writeln; import std.conv : to; import bindbc.lua; void main() { lua_State* L = luaL_newstate(); luaL_openlibs(L); lua_register(L, "funcD", &test); string str = "x = funcD()";

Re: How to convert PDF to PNG using DMagick?

2021-09-25 Thread Tejas via Digitalmars-d-learn
On Saturday, 25 September 2021 at 15:14:50 UTC, Mike Wey wrote: On 25-09-2021 15:21, tastyminerals wrote: When I need to convert a PDF image in console, I use ImageMagick: `convert doc.pdf doc.png` command. Today I found ImageMagick D bindings -- DMagick https://github.com/MikeWey/DMagick. I w

bindbc-lua :: Return tables from D

2021-09-25 Thread luaaaa via Digitalmars-d-learn
Hi. I got a problem when I used bindbc-lua. I wanna return Lua table by D function like this: **Simple example (Working)** ``` import std.stdio:writeln; import std.conv:to; import bindbc.lua; void main() { // dmd 2.097.2 x64 on Mac & LUA_51, static lua_State *L = luaL_newstate(); lu

Re: How to convert PDF to PNG using DMagick?

2021-09-25 Thread Mike Wey via Digitalmars-d-learn
On 25-09-2021 15:21, tastyminerals wrote: When I need to convert a PDF image in console, I use ImageMagick: `convert doc.pdf doc.png` command. Today I found ImageMagick D bindings -- DMagick https://github.com/MikeWey/DMagick. I would like to script this operation using DMagick. However, I coul

How to convert PDF to PNG using DMagick?

2021-09-25 Thread tastyminerals via Digitalmars-d-learn
When I need to convert a PDF image in console, I use ImageMagick: `convert doc.pdf doc.png` command. Today I found ImageMagick D bindings -- DMagick https://github.com/MikeWey/DMagick. I would like to script this operation using DMagick. However, I couldn't find any code samples and was not abl

Re: automatic NaN propogation detection?

2021-09-25 Thread Tejas via Digitalmars-d-learn
On Saturday, 25 September 2021 at 08:18:49 UTC, Elronnd wrote: (Not saying @live isn't useless, just that this doesn't indicate that.) Must we continue hurting Walter's feelings :(

Re: automatic NaN propogation detection?

2021-09-25 Thread Elronnd via Digitalmars-d-learn
On Saturday, 25 September 2021 at 07:53:11 UTC, Chris Katko wrote: Is that some sort of "NP complete" can't-fix issue or something? The general case is obviously unsolvable. Trivial proof: float x = nan; if (undecidable) use x. I'm sure your imagination can supply more realistic cases (but

automatic NaN propogation detection?

2021-09-25 Thread Chris Katko via Digitalmars-d-learn
Is there any automatic compiler-based or library methods for detecting NaNs? I mean, if the compiler is outputting code that it knows is going to be set in memory to NaN, why isn't it giving me at least a compiler warning? Is that some sort of "NP complete" can't-fix issue or something? I mea