April 27, 2022

On Wednesday, 27 April 2022 at 07:42:31 UTC, Alexander Zhirov wrote:

>

On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote:

>

Sample code would be:

My inattention, it was necessary to write like this:

dmd app.d -i arsd/image.d

Now everything is compiled and really the way I need it! Thank you very much!

There are two more questions left:

  1. How to write to jpeg correctly?
  2. How can I reduce the size of the executable file? And then 3 megabytes is too much for such a utility.
April 27, 2022

On Wednesday, 27 April 2022 at 08:29:27 UTC, Alexander Zhirov wrote:

>

On Wednesday, 27 April 2022 at 07:42:31 UTC, Alexander Zhirov wrote:

>

On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote:

>

Sample code would be:

  1. How to write to jpeg correctly?

That's how I managed to write to jpeg:

writeJpeg("dst.jpg", tci);

Now I would like to reduce the size of the executable file and it would be great at all!

April 27, 2022

On Wednesday, 27 April 2022 at 09:27:24 UTC, Alexander Zhirov wrote:

>

Now I would like to reduce the size of the executable file and it would be great at all!

Try the -release option to dmd. Or use LDC.

-- Bastiaan.

April 27, 2022

On Wednesday, 27 April 2022 at 11:59:20 UTC, Bastiaan Veelo wrote:

>

Or use LDC.

Gorgeous! LDC has compressed my code at times! Thanks again to everyone for help! Special thanks to Adam Ruppe

April 27, 2022
On Wednesday, 27 April 2022 at 14:40:59 UTC, Alexander Zhirov wrote:
> Gorgeous! LDC has compressed my code at times!

How small did it get?

And with my libs if you import the other ones like `arsd.png` or `arsd.jpeg` directly instead of `arsd.image` that MIGHT help trim it down by removing support for other formats.  I'm not sure though, none of them are especially big but it might add up.
April 27, 2022

On Wednesday, 27 April 2022 at 16:07:53 UTC, Adam D Ruppe wrote:

>

How small did it get?

dmd: 3136896 byte
ldc:  223952 byte
>

And with my libs if you import the other ones like arsd.png or arsd.jpeg directly instead of arsd.image that MIGHT help trim it down by removing support for other formats. I'm not sure though, none of them are especially big but it might add up.

Yes, just now, on your advice, I did so. The size has become a little smaller! 😌

April 27, 2022

On Wednesday, 27 April 2022 at 16:37:21 UTC, Alexander Zhirov wrote:

>

On Wednesday, 27 April 2022 at 16:07:53 UTC, Adam D Ruppe wrote:

>

How small did it get?

dmd: 3136896 byte
ldc:  223952 byte

but uses libraries ldc-shared.so

linux-vdso.so.1 (0x00007ffef5d2d000)
        libphobos2-ldc-shared.so.99 => /usr/lib64/libphobos2-ldc-shared.so.99 (0x00007f667e9ee000)
        libdruntime-ldc-shared.so.99 => /usr/lib64/libdruntime-ldc-shared.so.99 (0x00007f667e8ac000)
        libm.so.6 => /usr/lib64/libm.so.6 (0x00007f667e7c5000)
        libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f667e7a9000)
        libc.so.6 => /usr/lib64/libc.so.6 (0x00007f667e589000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f667eebe000)

And if without using dynamic libraries, it weighs 1219776 bytes

linux-vdso.so.1 (0x00007ffca9ad0000)
	librt.so.1 => /lib/librt.so.1 (0x00007f6240fc4000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007f6240fbe000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x00007f6240f9d000)
	libm.so.6 => /lib/libm.so.6 (0x00007f6240e58000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6240e3e000)
	libc.so.6 => /lib/libc.so.6 (0x00007f6240c74000)
	/lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x00007f6240ff7000)
April 27, 2022
On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote:
> ...

I know about Adam Ruppe's work, I already used his terminal.d, but I think that unfortunately most people don't and I think it should be announced more in these parts. For me arsd is for D what stb is for C.

I think in the first time running any D compiler, it should blink in the terminal in Yellow/Pink or whatever color you like, and show some info like: Are you starting a new project any need some libs? Do you know about arsd? If not then go to: https://github.com/adamdruppe/arsd. :)

matheus.
April 27, 2022

On Wednesday, 27 April 2022 at 17:07:54 UTC, matheus wrote:

>

I think in the first time running any D compiler, it should blink in the terminal in Yellow/Pink or whatever color you like, and show some info like: Are you starting a new project any need some libs? Do you know about arsd? If not then go to: https://github.com/adamdruppe/arsd. :)

Hahaha 😄 This is the truth! I totally agree!

April 27, 2022
On Wednesday, 27 April 2022 at 17:07:54 UTC, matheus wrote:
> I know about Adam Ruppe's work, I already used his terminal.d, but I think that unfortunately most people don't and I think it should be announced more in these parts.

tbh sometimes i just don't feel like answering messages. even this one, i was like "i can do that easily, but do i want to support another user?"

but meh i had a few mins to kill anyway

> For me arsd is for D what stb is for C.

Note that a few of those modules are stb ports over to D.

I wrote the png and bmp modules myself, for example, but the jpeg is a port from C (that port done by ketmar on irc) and the ttf one is stb_ttf ported to D then with a little wrapper struct pasted on top.

One thing I'm kinda proud of though is my OperatingSystemFont class in simpledisplay which can load a font and then pass it into the ttf thing and/or the nanovega module for all kinds of custom effects. You don't necessarily have to package your own ttf files!
1 2 3
Next ›   Last »