Re: performance cost of sample conversion

2017-09-06 Thread Ali Çehreli via Digitalmars-d-learn
On 09/06/2017 07:06 PM, Psychological Cleanup wrote: if I have a non-double buffer and temporarily convert to double then convert back, do I save many cycles rather than just using a double buffer? I know it will bea lot more memory, but I'm specifically talking about the cycles in converting to

performance cost of sample conversion

2017-09-06 Thread Psychological Cleanup via Digitalmars-d-learn
if I have a non-double buffer and temporarily convert to double then convert back, do I save many cycles rather than just using a double buffer? I know it will bea lot more memory, but I'm specifically talking about the cycles in converting to and from vs no conversion. Using a double for

Re: New programming paradigm

2017-09-06 Thread EntangledQuanta via Digitalmars-d-learn
So, no body thinks this is a useful idea or is it that no one understands what I'm talking about?

Re: SIMD under LDC

2017-09-06 Thread Igor via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 09:01:18 UTC, Igor wrote: On Tuesday, 5 September 2017 at 18:50:34 UTC, Johan Engelen wrote: On Monday, 4 September 2017 at 20:39:11 UTC, Igor wrote: I found that I can't use __simd function from core.simd under LDC and that it has ldc.simd but I couldn't find

Re: I need library for QR codes generation.

2017-09-06 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:30:24 UTC, MGW wrote: I need library for generation of QR codes. Who knows, give the link. It seems google has an api to create QR codes: https://developers.google.com/chart/infographics/docs/qr_codes Kind regards André

Re: dispatcher

2017-09-06 Thread Psychological Cleanup via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 09:47:34 UTC, user1234 wrote: On Wednesday, 6 September 2017 at 05:57:18 UTC, Psychological Cleanup wrote: I have a C callback that must call some functions declared in D. I can't call them off the C thread because it will result in a violation. What is a good

Re: Is compiling for Android/iOS possible?

2017-09-06 Thread Ali Çehreli via Digitalmars-d-learn
On 09/06/2017 11:34 AM, Timothy Foster wrote: I'm just wondering if I made an application for Windows/Mac/Linux if I could get it to also work on mobile devices, or would I have to rewrite the application in another language to get it to work? If it's possible, what should I be looking at to get

How Appender calculate cash size?

2017-09-06 Thread Suliman via Digitalmars-d-learn
If I right understand Appender and ~ have buffers to minimize allocations. "Appender's local capacity storage will give you a pretty big boost" (с) Adam "Appender maintains its own array metadata locally, so it can avoid global locking for each append where capacity is non-zero." (с) Docs

Re: Performance Issue

2017-09-06 Thread Azi Hassan via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 18:21:44 UTC, Azi Hassan wrote: I tried to create a similar file structure on my Linux machine. Here's the result of ls -R TEST1: TEST1: BACKUP ... Upon further inspection it looks like I messed up the output. [31460] - Array 1 for folder 1(all files in

Is compiling for Android/iOS possible?

2017-09-06 Thread Timothy Foster via Digitalmars-d-learn
I'm just wondering if I made an application for Windows/Mac/Linux if I could get it to also work on mobile devices, or would I have to rewrite the application in another language to get it to work? If it's possible, what should I be looking at to get something like a "Hello World" example to

Re: Performance Issue

2017-09-06 Thread Azi Hassan via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 15:11:57 UTC, Vino.B wrote: On Wednesday, 6 September 2017 at 14:38:39 UTC, Vino.B wrote: Hi Azi, The required out is like below [31460] - Array 1 for folder 1(all files in Folder 1) of the FS C:\\Temp\\TEST1\\BACKUP [138] - Array 2 for folder 2(all

Re: DLang IDE [RU]

2017-09-06 Thread TM via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:33:18 UTC, Vadim Lopatin wrote: On Wednesday, 6 September 2017 at 14:06:56 UTC, TM wrote: On Wednesday, 6 September 2017 at 13:07:04 UTC, Vadim Lopatin wrote: File / new для добавления пакетов/модулей не пойдет? Удалять также можно. Перемещать - нельзя.

_GLOBAL_OFFSET_TABLE_ in dmd

2017-09-06 Thread Dmitriy via Digitalmars-d-learn
Hi! Help me please. How can i get the address of a _GLOBAL_OFFSET_TABLE_? Sorry for my bad English

Container Array

2017-09-06 Thread Vino.B via Digitalmars-d-learn
HI All, Can some one provide me a example of how to use the std.container.array for the below code. import std.algorithm: filter, map; import std.file: SpanMode, dirEntries, isDir; import std.stdio: writeln; import std.typecons: tuple; import std.array: array; void main () { string[]

Re: Address of data that is static, be it shared or tls or __gshared or immutable on o/s

2017-09-06 Thread Ali Çehreli via Digitalmars-d-learn
On 09/06/2017 08:27 AM, Cecil Ward wrote: > If someone has some static data somewhere, be it in tls or marked shared > __gshared or immutable or combinations (whatever), and someone takes the > address of it and pass that address to some other routine of mine that > does not have access to the

Re: I need library for QR codes generation.

2017-09-06 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:30:24 UTC, MGW wrote: I need library for generation of QR codes. Who knows, give the link. You can try to bind a c library like [1] using dstep. It should be easy. Andrea [1] https://github.com/fukuchi/libqrencode

Address of data that is static, be it shared or tls or __gshared or immutable on o/s

2017-09-06 Thread Cecil Ward via Digitalmars-d-learn
If someone has some static data somewhere, be it in tls or marked shared __gshared or immutable or combinations (whatever), and someone takes the address of it and pass that address to some other routine of mine that does not have access to the source code of the original definition of the

Re: Performance Issue

2017-09-06 Thread Vino.B via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:38:39 UTC, Vino.B wrote: On Wednesday, 6 September 2017 at 10:58:25 UTC, Azi Hassan wrote: [...] Hi Azi, Your are correct, i tried to implement the fold in a separate small program as below, but not able to get the the required output, when you

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:33:18 UTC, Vadim Lopatin wrote: On Wednesday, 6 September 2017 at 14:06:56 UTC, TM wrote: On Wednesday, 6 September 2017 at 13:07:04 UTC, Vadim Lopatin wrote: File / new для добавления пакетов/модулей не пойдет? Удалять также можно. Перемещать - нельзя.

Re: Performance Issue

2017-09-06 Thread Vino.B via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 10:58:25 UTC, Azi Hassan wrote: On Wednesday, 6 September 2017 at 08:10:35 UTC, Vino.B wrote: in the next line of the code i say to list only folders that are greater than 10 Mb but this now is listing all folder (folder whose size is less than 10 MB are

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:06:56 UTC, TM wrote: On Wednesday, 6 September 2017 at 13:07:04 UTC, Vadim Lopatin wrote: File / new для добавления пакетов/модулей не пойдет? Удалять также можно. Перемещать - нельзя. File / new создает модуль. А как создавать пакет? New Source File ->

Re: DLang IDE [RU]

2017-09-06 Thread TM via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 13:52:35 UTC, Vadim Lopatin wrote: On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 1. Невозможно собрать как IDE, так и любой пример из DlangUI, если в профиле пользователя windows используются символы кириллицы. Компиляция через DMD/LDC падает на

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 14:06:56 UTC, TM wrote: On Wednesday, 6 September 2017 at 13:07:04 UTC, Vadim Lopatin wrote: File / new для добавления пакетов/модулей не пойдет? Удалять также можно. Перемещать - нельзя. File / new создает модуль. А как создавать пакет? New Source File ->

I need library for QR codes generation.

2017-09-06 Thread MGW via Digitalmars-d-learn
I need library for generation of QR codes. Who knows, give the link.

Re: DLang IDE [RU]

2017-09-06 Thread TM via Digitalmars-d-learn
Наверное, после недавних изменений с compile time reflection для поиска property в виджетах стало есть больше памяти при компиляции. Какой размер RAM? В Releases я в последнее время выкладываю win32 binary. https://github.com/buggins/dlangide/releases Да, бинарными релизами теперь и

Re: DLang IDE [RU]

2017-09-06 Thread TM via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 13:07:04 UTC, Vadim Lopatin wrote: File / new для добавления пакетов/модулей не пойдет? Удалять также можно. Перемещать - нельзя. File / new создает модуль. А как создавать пакет? New Source File -> Location -> Bew Folder ? Удалять возможности не нашел

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 1. Невозможно собрать как IDE, так и любой пример из DlangUI, если в профиле пользователя windows используются символы кириллицы. Компиляция через DMD/LDC падает на DlangUI с: module exception is in file

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 2. Под англоязычной учетной записью windows последняя удачная сборка IDE была 0.7.45 или 0.7.46, дальше DMD начал падать с "Out of memory", LDC также начал выдавать ошибку. Проблема также похоже во "внутренностях" DlangUi, так как примеры

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 3. Очень непривычное поведение редактора при копипасте строки. Обычная комбинация: Home, Shift+End (выделяется вся строка), Ctrl+C, End (для снятия выделения), Enter (для перехода на другую строку), Ctrl+V оканчивается тем, что End после

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 2. В области Workspace Explorer на одном уровне иерархии модули и пакеты сортируются по алфавиту, но "вперемешку" с друг другом, в отличие от того же Notepad++, где сначала по алфавиту сортируются пакеты, а потом модули. Понимая, что

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:40:06 UTC, TM wrote: 1. Добавить возможность выбора размера шрифта для области редактирования. Я крайне редко меняю подобные настройки в IDE, но в данном случае дефолтный шрифт оказался откровенно мелковат (возможно под Linux ситуация несколько иная),

Re: DLang IDE [RU]

2017-09-06 Thread Vadim Lopatin via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 16:18:25 UTC, TM wrote: Из более серьезных улучшений, я бы предложил возможность в Workspace Explorer добавлять пакеты, переименовывать пакеты / модули, перемещать пакеты / модули и удалять пакеты / модули. Но это, очевидно уже будет требовать некоторых усилий

Re: Performance Issue

2017-09-06 Thread Azi Hassan via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 08:10:35 UTC, Vino.B wrote: in the next line of the code i say to list only folders that are greater than 10 Mb but this now is listing all folder (folder whose size is less than 10 MB are getting listed, not sure why. Is the size in GB ? If so, then

Re: Performance Issue

2017-09-06 Thread user1234 via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 09:44:09 UTC, Vino.B wrote: Hi, The below code is consume more memory and slower can you provide your suggestion on how to over come these issues. string[][] csizeDirList (string FFs, int SizeDir) { ulong subdirTotal = 0; ulong subdirTotalGB;

Re: dispatcher

2017-09-06 Thread user1234 via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 05:57:18 UTC, Psychological Cleanup wrote: I have a C callback that must call some functions declared in D. I can't call them off the C thread because it will result in a violation. What is a good way to dispatch the call to the main D program? I'm thinking

Re: D scripting

2017-09-06 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 21:41:35 UTC, EntangledQuanta wrote: On Tuesday, 5 September 2017 at 19:59:27 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 19:44:40 UTC, EntangledQuanta wrote: Just an idea for you: in delphi you can set the properties of a component (a class with

Re: SIMD under LDC

2017-09-06 Thread Igor via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 18:50:34 UTC, Johan Engelen wrote: On Monday, 4 September 2017 at 20:39:11 UTC, Igor wrote: I found that I can't use __simd function from core.simd under LDC and that it has ldc.simd but I couldn't find how to implement equivalent to this with it: ubyte16*

Re: dispatcher

2017-09-06 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 05:57:18 UTC, Psychological Cleanup wrote: I'm thinking that I might have to create an extra thread that monitors for when a call needs to occur and does so. Would work. If your code doesn't conflict with GC, it's fine to work in an unregistered thread.

Re: Performance Issue

2017-09-06 Thread Vino.B via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 10:28:28 UTC, Stefan Koch wrote: On Tuesday, 5 September 2017 at 09:44:09 UTC, Vino.B wrote: Hi, The below code is consume more memory and slower can you provide your suggestion on how to over come these issues. [...] Much slower then ? Hi, This code

Re: pure void* memset(return void* s, int c, size_t n)?

2017-09-06 Thread Uknown via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 06:09:46 UTC, Psychological Cleanup wrote: What is the return doing there? The return implies that the function will return the parameter `s` after it has done whatever it needs to. It is useful for the compiler to do escape analysis or So memset would be

pure void* memset(return void* s, int c, size_t n)?

2017-09-06 Thread Psychological Cleanup via Digitalmars-d-learn
What is the return doing there?

dispatcher

2017-09-06 Thread Psychological Cleanup via Digitalmars-d-learn
I have a C callback that must call some functions declared in D. I can't call them off the C thread because it will result in a violation. What is a good way to dispatch the call to the main D program? I'm thinking that I might have to create an extra thread that monitors for when a call