Re: Challenge Tuples

2024-04-27 Thread Sergey via Digitalmars-d-learn
On Friday, 26 April 2024 at 13:25:34 UTC, Salih Dincer wrote: You have a 5-item data tuples as Tuple(1, 2, 3, [1, 3], 5) and implement the sum (total = 15) with the least codes using the sum() function of the language you are coding... Let's start with D: ```d import std.typecons : tuple;

Re: Recommendations on porting Python to D

2024-04-25 Thread Sergey via Digitalmars-d-learn
On Wednesday, 24 April 2024 at 22:07:41 UTC, Chris Piker wrote: Python-AST to D source converter may already exist? Another possible way maybe is using C :) Python -> C -> D https://wiki.python.org/moin/PythonImplementations#Compilers

Re: Recommendations on porting Python to D

2024-04-24 Thread Sergey via Digitalmars-d-learn
On Wednesday, 24 April 2024 at 19:50:45 UTC, Chris Piker wrote: Hi D I have a somewhat extensive CGI based web service written in There is also https://code.dlang.org/packages/arsd-official%3Acgi

Re: Why is this code slow?

2024-03-28 Thread Sergey via Digitalmars-d-learn
On Thursday, 28 March 2024 at 20:18:10 UTC, rkompass wrote: D advantage is gone here, I would say. It's hard to compare actually. Std.parallelism has a bit different mechanics, and I think easier to use. The syntax is nicer. OpenMP is an well-known and highly adopted tool, which is also

Re: Why is this code slow?

2024-03-24 Thread Sergey via Digitalmars-d-learn
On Sunday, 24 March 2024 at 22:16:06 UTC, rkompass wrote: Are there some simple switches / settings to get a smaller binary? 1) If possible you can use "betterC" - to disable runtime 2) otherwise ```bash --release --O3 --flto=full -fvisibility=hidden

Re: Why is this code slow?

2024-03-24 Thread Sergey via Digitalmars-d-learn
On Sunday, 24 March 2024 at 19:31:19 UTC, Csaba wrote: As you can see the function that does the job is exactly the same in C and D. Not really.. The speed of Leibniz algo is mostly the same. You can check the code in this benchmark for example:

Re: The std.file rename method fails in the docker environment.

2024-03-13 Thread Sergey via Digitalmars-d-learn
On Wednesday, 13 March 2024 at 21:49:55 UTC, zoujiaqing wrote: this is bug in D. It seems like a bug in Hunt-framework. And Hunt - is an abandoned project.

Re: Recommendation about templating engine library

2024-03-11 Thread Sergey via Digitalmars-d-learn
On Monday, 11 March 2024 at 15:34:11 UTC, Andrea wrote: There is also diet : https://code.dlang.org/packages/diet-ng Is'nt `diet` specific for HTML / XML structured text ? right. Just mentioned Go library also mostly for HTML generation.

Re: Recommendation about templating engine library

2024-03-11 Thread Sergey via Digitalmars-d-learn
On Monday, 11 March 2024 at 14:26:01 UTC, Andrea wrote: Opinions ? Many thanks There is also diet : https://code.dlang.org/packages/diet-ng

Re: vibe.d still does not work on FreeBSD.

2024-02-18 Thread Sergey via Digitalmars-d-learn
On Sunday, 18 February 2024 at 13:23:53 UTC, Alain De Vos wrote: DEFAULT_VERSIONS+= ssl=openssl111 Maybe also could be helpful to share your dub.json, compiler version and OS version as well.

Re: length's type.

2024-02-09 Thread Sergey via Digitalmars-d-learn
On Friday, 9 February 2024 at 08:04:56 UTC, Danilo wrote: Rust, Nim, Zig, Odin…? Here is the Forum for D(lang). ;) But it is fine to see what others have.. Teach on their experience is useful This is how research is going

Re: How to unpack a tuple into multiple variables?

2024-02-05 Thread Sergey via Digitalmars-d-learn
On Monday, 5 February 2024 at 21:12:58 UTC, Gary Chike wrote: I hope all is well with everyone. I have come to an impasse. What is the best way to unpack a tuple into multiple variables in D similar to this Python code? Thank you! ### TL;DR The direct implementation still not presented. But

Re: Accessing array elements with a pointer-to-array

2024-01-26 Thread Sergey via Digitalmars-d-learn
On Friday, 26 January 2024 at 11:38:39 UTC, Stephen Tashiro wrote: On Thursday, 25 January 2024 at 20:36:49 UTC, Kagamin wrote: On Thursday, 25 January 2024 at 20:11:05 UTC, Stephen Tashiro wrote: void main() { ulong [3][2] static_array = [ [0,1,2],[3,4,5] ];

Re: Accessing array elements with a pointer-to-array

2024-01-25 Thread Sergey via Digitalmars-d-learn
On Thursday, 25 January 2024 at 20:11:05 UTC, Stephen Tashiro wrote: Can the elements of an array be accessed with a pointer using the usual indexing notation (e.g."[2][0]") for array elements? - or must we treat the elements associated with the pointer as 1-dimensional list and use pointer

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-14 Thread Sergey via Digitalmars-d-learn
On Sunday, 14 January 2024 at 17:11:27 UTC, Renato wrote: If anyone can find any flaw in my methodology or optmise my code so that it can still get a couple of times faster, approaching Rust's performance, I would greatly appreciate that! But for now, my understanding is that the most

Re: The One Billion Row Challenge

2024-01-13 Thread Sergey via Digitalmars-d-learn
On Saturday, 13 January 2024 at 23:25:07 UTC, monkyyy wrote: On Thursday, 11 January 2024 at 11:21:39 UTC, Sergey wrote: On Thursday, 11 January 2024 at 08:57:43 UTC, Christian Köstlin wrote: Did someone already try to do this in dlang? I guess it will be very hard to beat the java solutions

Re: Help optimize D solution to phone encoding problem: extremely slow performace.

2024-01-13 Thread Sergey via Digitalmars-d-learn
On Saturday, 13 January 2024 at 19:35:57 UTC, Renato wrote: On Saturday, 13 January 2024 at 17:00:58 UTC, Anonymouse wrote: On Saturday, 13 January 2024 at 12:55:27 UTC, Renato wrote: [...] I will have to try it... I thought that `BigInt` was to blame for the slowness (from what I could read

Re: How to use ImportC to import WebGPU header

2024-01-12 Thread Sergey via Digitalmars-d-learn
On Friday, 12 January 2024 at 11:06:39 UTC, Bkoie wrote: On Thursday, 11 January 2024 at 15:18:08 UTC, Sergey wrote: On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote: I would like to use ImportC to automatically import a C header into my D project. It was already done. Use it

Re: How to use ImportC to import WebGPU header

2024-01-11 Thread Sergey via Digitalmars-d-learn
On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote: I would like to use ImportC to automatically import a C header into my D project. It was already done. Use it https://code.dlang.org/packages/wgpu-d Don't reinvent the wheel :)

Re: The One Billion Row Challenge

2024-01-11 Thread Sergey via Digitalmars-d-learn
On Thursday, 11 January 2024 at 08:57:43 UTC, Christian Köstlin wrote: Did someone already try to do this in dlang? I guess it will be very hard to beat the java solutions running with graalvm! https://news.ycombinator.com/item?id=38851337 Kind regards, Christian I think C++ people already

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 13:58:54 UTC, tony wrote: On Tuesday, 26 December 2023 at 11:19:29 UTC, Sergey wrote: Use typeid, instead of typeof Thanks! Got quite a type but I will worry about that later: std.range.SortedRange!(Result, "a < b").SortedRange Yes, because sort is

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 10:53:10 UTC, Tony wrote: I just typed in the program that is on the first page of Learn. It has this line: sort(chain(arr1, arr2, arr3)); I assigned that to a variable: arr4 = sort(chain(arr1, arr2, arr3)); then printed it out writefln("%s",arr4); //

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Sergey via Digitalmars-d-learn
On Friday, 22 December 2023 at 17:45:27 UTC, Renato wrote: I'm afraid I've lost interest to make it work at this point :( Did you add "-L-ld_classic"?

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Sergey via Digitalmars-d-learn
On Thursday, 14 December 2023 at 13:27:29 UTC, Renato wrote: On Thursday, 14 December 2023 at 13:12:06 UTC, Richard (Rikki) My build options are currently: ``` "dflags-dmd": [ "-v"], "lflags": ["-ld_classic"] ``` I tried some variations but nothing worked. Previously for macOS it

Re: How to hash SHA256 from string?

2023-12-02 Thread Sergey via Digitalmars-d-learn
On Saturday, 2 December 2023 at 15:30:39 UTC, zoujiaqing wrote: SHA Sorry for OT, but don’t know different place to reach you out. What is the status of Archttp? Is it discontinued/abandoned?

Re: Advent of Code 2023

2023-12-02 Thread Sergey via Digitalmars-d-learn
On Saturday, 2 December 2023 at 13:33:33 UTC, Johannes Miesenhardt wrote: Day 1 solution here, since I swap them out based on a runtime argument. In the Discord server we also have a topic about AoC2023. So feel free to join it as well. Some other solutions that could be worth to check:

Re: Advent of Code 2023

2023-12-01 Thread Sergey via Digitalmars-d-learn
On Friday, 1 December 2023 at 01:01:31 UTC, Siarhei Siamashka wrote: Advent of Code 2023 starts in a few hours from now. I suggest to discuss D language solutions here. But to avoid spoilers, it's best to do this with a 24h delay after each puzzle is published. Hi Siarhei. Nice to see that

Re: How do I install a package globally?

2023-11-11 Thread Sergey via Digitalmars-d-learn
On Saturday, 11 November 2023 at 01:50:54 UTC, Trevor wrote: I'm just getting in to D , coming from a C and Python background. I've had a play with DUB and adding packages to my project, but it seems like there should be a way to install packages so they can be used in any D program I compile

Re: performance issues with SIMD function

2023-11-03 Thread Sergey via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little

Re: What are the best available D (not C) File input/output options?

2023-11-02 Thread Sergey via Digitalmars-d-learn
On Thursday, 2 November 2023 at 15:46:23 UTC, confuzzled wrote: I've ported a small script from C to D. The original C version takes roughly 6.5 minutes to parse a 12G file while the port originally took about 48 minutes. In my experience I/O in D is quite slow. But you can try to improve it:

Re: Question regarding mir.csv.

2023-11-01 Thread Sergey via Digitalmars-d-learn
On Wednesday, 1 November 2023 at 20:49:16 UTC, Zz wrote: Hi, Currently using std.csv and would like to do the following using mir.csv. auto data = std.csv.csvReader!Layout(input).array; Are there any examples out there on using mir.csv? Regards, Zz you can find some examples in source

Re: Symbolic computations in D

2023-10-30 Thread Sergey via Digitalmars-d-learn
On Monday, 30 October 2023 at 13:13:47 UTC, jmh530 wrote: On Sunday, 29 October 2023 at 10:44:03 UTC, ryuukk_ wrote: Julia is more an alternative to R, Matlab, Python than C++. Not really. Many especially popular and widely used (NumPy, PyTorch, data.table) libraries for R and Python

Re: how to assign multiple variables at once by unpacking array?

2023-10-07 Thread Sergey via Digitalmars-d-learn
On Saturday, 7 October 2023 at 16:12:47 UTC, mw wrote: Interesting: in terms of easy of coding, clarity and future maintenance, which one is superior? There is no superior languages. They can successfully co-exist and play in different areas. The one liner in Python, or your "solution" with

Re: D web browser?

2023-09-08 Thread Sergey via Digitalmars-d-learn
On Friday, 8 September 2023 at 06:42:13 UTC, Joe wrote: Is there a D library that lets one access the web through a browser like interface? I need to access some URLS as if I was browsing them(it needs to run scripts in the page). E.g., C# has WebBrowser that lets one programmatically control

Re: aarch64 plans for D lang ?

2023-08-28 Thread Sergey via Digitalmars-d-learn
On Monday, 28 August 2023 at 15:14:52 UTC, BrianLinuxing wrote: On Monday, 28 August 2023 at 15:04:25 UTC, Sergey wrote: On Monday, 28 August 2023 at 14:38:36 UTC, BrianLinuxing wrote: Afternoon all, I think D Lang has such potential :) Both GDC and LDC should support Linux aarch64. LDC

Re: aarch64 plans for D lang ?

2023-08-28 Thread Sergey via Digitalmars-d-learn
On Monday, 28 August 2023 at 14:38:36 UTC, BrianLinuxing wrote: Afternoon all, I think D Lang has such potential :) Both GDC and LDC should support Linux aarch64. LDC even has file in Releases https://github.com/ldc-developers/ldc/releases/tag/v1.34.0

Re: parallel threads stalls until all thread batches are finished.

2023-08-23 Thread Sergey via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote: I use foreach(s; taskPool.parallel(files, numParallel)) { L(s); } // L(s) represents the work to be done. If you make for example that L function return “ok” in case file successfully downloaded, you can try to use TaskPool.amap. The

Mach status support

2023-08-21 Thread Sergey via Digitalmars-d-learn
When I worked with one C code translation, I found that command clock_gettime, that available in POSIX systems is not implemented in MacOS. This SO thread https://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x suggested some workaround implementations, which using

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Sergey via Digitalmars-d-learn
On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS and DMD? Probably DMD is broken for macOS - could you try to use LDC? Maybe this thread is relative to the problem:

Re: How can I execute C++ functions from Dlang?

2023-08-14 Thread Sergey via Digitalmars-d-learn
On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar este codigo de c++ Error: linker exited with status 1 Hola. On the page https://dlang.org/spec/cpp_interface.html commands to run also have different flags. Did you try them? g++ -c foo.cpp dmd bar.d

Re: Garbage Collectors

2023-07-19 Thread Sergey via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 07:24:06 UTC, IchorDev wrote: So, D’s default garbage collector is the one named “conservative” in DRuntime… I see there’s also “manual” which doesn’t actually function as a GC, which is interesting. Nothing says what ProtoGC is… so I guess it’s useless. Has

Re: Installing GDC / Linux / x86-64 when apt-get doesn’t work

2023-07-10 Thread Sergey via Digitalmars-d-learn
On Tuesday, 11 July 2023 at 04:11:38 UTC, Cecil Ward wrote: I’m trying to install GDC on a new Linux box and I don’t know what I’m doing. Background: I have installed LDC successfully and have installed GDC on a Raspberry Pi using 32-bit ARM. For some reason the apt-get command doesn’t work

Re: Options for Cross-Platform 3D Game Development

2023-07-06 Thread Sergey via Digitalmars-d-learn
On Wednesday, 5 July 2023 at 22:27:46 UTC, Andrew wrote: So, I've gotten the itch to have a go at game development in D, after doing a bit of it in Java last year. I've previously used LWJGL, which is a java wrapper for OpenGL, OpenAL, GLFW, and some other useful libs. Are there any other

Re: Graphing

2023-07-01 Thread Sergey via Digitalmars-d-learn
On Saturday, 1 July 2023 at 01:00:46 UTC, anonymouse wrote: How would I go about graphing time series data (specifically, candles, moving averages, etc) in D and dynamically updating such charts? Thanks, --anonymouse For TS you can use http://mir-algorithm.libmir.org/mir_series.html For

Re: Lockstep iteration in parallel: Error: cannot have parameter of type `void`

2023-05-20 Thread Sergey via Digitalmars-d-learn
On Saturday, 20 May 2023 at 18:27:47 UTC, Ali Çehreli wrote: On 5/20/23 04:21, kdevel wrote: And I've just discovered something. Which one of the following is the expected documentation? https://dlang.org/library/std/parallelism.html https://dlang.org/phobos/std_parallelism.html What

Re: How does the function 'iota' get its name?

2023-02-12 Thread Sergey via Digitalmars-d-learn
On Sunday, 12 February 2023 at 19:39:49 UTC, Steven Schveighoffer wrote: On 2/12/23 2:17 PM, ccmywish wrote: Hi, everyone! I'm very new to D. I see a function called [iota](https://dlang.org/library/std/range/iota.html) `Iota` seems a [Greek letter](https://en.wikipedia.org/wiki/Iota). Why

Re: Tab completion using neovim

2023-01-21 Thread Sergey via Digitalmars-d-learn
On Saturday, 21 January 2023 at 13:17:44 UTC, Alain De Vos wrote: Let's say i write "write" press tab in neovim i want it to guess "writeln". How to configure neovim for this. [ Note "ncm2" lets my neovim crash. But maybe there are alternatives ] [ vscode is not an option as compiling

Re: Pyd examples or resources for Python 3.x

2023-01-19 Thread Sergey via Digitalmars-d-learn
On Friday, 20 January 2023 at 00:39:47 UTC, Seamus wrote: Howdy folks Honestly in my opinion PyD looks kinda abounded. I don’t know how much effort you need to spend to run spaCy. Just to be sure that you’ve seen this documentation https://pyd.readthedocs.io/en/latest/index.html Also

Re: Solving optimization problems with D

2023-01-03 Thread Sergey via Digitalmars-d-learn
On Sunday, 1 January 2023 at 21:11:06 UTC, Ogi wrote: I’ve read this [series if articles](https://www.gamedeveloper.com/design/decision-modeling-and-optimization-in-game-design-part-1-introduction) about using Excel Solver for all kinds of optimization problems. This is very neat, but of course,

Re: Float rounding (in JSON)

2022-12-30 Thread Sergey via Digitalmars-d-learn
On Thursday, 13 October 2022 at 19:00:30 UTC, Sergey wrote: I'm not a professional of IEEE 754, but just found this behavior at rounding in comparison with other languages. I supose it happened because in D float numbers parsed as double and have a full length of double while rounding. But

Re: How to create a API server?

2022-12-18 Thread Sergey via Digitalmars-d-learn
On Friday, 16 December 2022 at 20:57:30 UTC, Dariu Drew wrote: Hi! i need help in can i create a serve API, what library i should use? what documentation i should read? Check the bench: https://github.com/tchaloupka/httpbench there are a lot of web servers in D. You can find one that fits

Re: How to compiler dlang code on Apple M1?

2022-12-14 Thread Sergey via Digitalmars-d-learn
On Tuesday, 13 December 2022 at 15:21:41 UTC, Steven Schveighoffer wrote: On 12/13/22 10:20 AM, Steven Schveighoffer wrote: Yeah, that's a known issue: https://github.com/ldc-developers/ldc/issues/3864 Try building with `-b plain` to avoid the debug build Oh, also, I have

Re: unique_ptr | Unique for autoclose handle

2022-12-14 Thread Sergey via Digitalmars-d-learn
On Wednesday, 14 December 2022 at 11:30:07 UTC, Vitaliy Fadeev wrote: Teach me the most beautiful way. How to make beautiful? Thanks! Just for information there is a library that also could be helpful https://code.dlang.org/packages/autoptr

Re: Advent of Code 2022

2022-12-10 Thread Sergey via Digitalmars-d-learn
On Saturday, 10 December 2022 at 20:49:03 UTC, Christian Köstlin wrote: Is anybody participating with dlang in the advent of code 22? It would be interesting to discuss dlang specific things from the puzzles. Kind regards, Christian

Re: Idiomatic D using GC as a library writer

2022-12-04 Thread Sergey via Digitalmars-d-learn
On Sunday, 4 December 2022 at 12:37:08 UTC, Adam D Ruppe wrote: All of the top 5 most popular libraries on code.dlang.org embrace the GC. Interesting. It seems that most of the community suppose that “library” should be used from D :-) But in my opinion - “foreign library experience” is much

Re: Is defining get/set methods for every field overkill?

2022-11-22 Thread Sergey via Digitalmars-d-learn
On Tuesday, 22 November 2022 at 03:04:03 UTC, []() {}() wrote: On Tuesday, 22 November 2022 at 02:16:16 UTC, []() {}() wrote: nevermind ;-) .. seems clear nobody wants something like this in D. https://forum.dlang.org/post/kbl20f$2np9$1...@digitalmars.com and... 20 years later ...

Re: Is defining get/set methods for every field overkill?

2022-11-19 Thread Sergey via Digitalmars-d-learn
On Saturday, 19 November 2022 at 04:27:14 UTC, []() {}() wrote: By making your class member variables public, it is not clear whether you forgot that you needed to validate incoming and outgoing values, or whether you don't need to do this (not ever). If you did it because of the former,

Re: Unit testing a function returning void

2022-11-03 Thread Sergey via Digitalmars-d-learn
On Thursday, 3 November 2022 at 10:00:27 UTC, Bruno Pagis wrote: Good morning, I would like to unit test the print function (yes, I know, not very useful on the above example since print is merely a duplicate of writeln...). Is there a way to use assert to test the output of the print

Re: dmd for Haiku OS

2022-10-31 Thread Sergey via Digitalmars-d-learn
On Thursday, 28 February 2019 at 13:17:44 UTC, MGW wrote: Sorry for Zombie-thread. Just saw the news that wayland was ported to Haiku and was curious if somebody using D in it (https://discuss.haiku-os.org/t/my-progress-in-wayland-compatibility-layer/12373). I have recently looked through

Re: dub ldc2 static linking

2022-10-28 Thread Sergey via Digitalmars-d-learn
On Friday, 28 October 2022 at 04:02:15 UTC, ryuukk_ wrote: On Friday, 28 October 2022 at 02:46:42 UTC, ryuukk_ wrote: On Friday, 28 October 2022 at 01:35:04 UTC, kinke wrote: For fully static linking on Linux, you'll need to move away from glibc to e.g. the musl C runtime, as used by the

Re: Design question regarding saving changes in the original array and/or returning a new set

2022-10-23 Thread Sergey via Digitalmars-d-learn
On Sunday, 23 October 2022 at 15:47:27 UTC, matheus wrote: Hi H. S. Teoh, I think you misunderstood my question, since English is not my first language maybe this was a problem from my part, but anyway, I'm not talking about "sort" from main library. This example was if I had designed my

Re: Find in assoc array then iterate

2022-10-21 Thread Sergey via Digitalmars-d-learn
On Friday, 21 October 2022 at 22:03:53 UTC, Kevin Bailey wrote: I'm trying to do this equivalent C++: unordered_map map; for (auto i = map.find(something); i != map.end(); ++i) ...do something with i... in D, but obviously with an associative array. It seems that it's quite

Alpine: static compilation

2022-10-21 Thread Sergey via Digitalmars-d-learn
Hi D-community. I try to build and run very simple code on Alpine docker image - but have no luck with static builds and LTO. The desired aim is to be able build it similar to C code compilation: ```c gcc leibniz.c -o leibniz -O3 -s -static -flto -march=native -mtune=native

Re: Catching C errors

2022-10-20 Thread Sergey via Digitalmars-d-learn
On Thursday, 20 October 2022 at 09:52:05 UTC, data pulverizer wrote: I'm currently writing a D interop with R, the dynamic statistical programming language. There's a function called How is your project related to EmbedR? The description of the project could be found here:

Re: Hipreme's #1 Tip of the day

2022-10-20 Thread Sergey via Digitalmars-d-learn
On Wednesday, 19 October 2022 at 23:28:46 UTC, Hipreme wrote: Hey guys, I'm going to start making a tip of the day (although I'm pretty sure I won't be able to give every day a tip), but those things are really interesting to newcomers to know and may be obvious to some of the old schoolers

Re: library to solve the system of linear equations

2022-10-15 Thread Sergey via Digitalmars-d-learn
On Friday, 14 October 2022 at 21:38:45 UTC, Yura wrote: On Friday, 14 October 2022 at 18:37:00 UTC, Sergey wrote: however, when I try to compile it (gdc el.d) it gives me the following error message: el.d:11:8: error: module ndslice is in file 'mir/ndslice.d' which cannot be read import

Re: library to solve the system of linear equations

2022-10-14 Thread Sergey via Digitalmars-d-learn
On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote: Dear All, I am very new to D, and it has been a while since I coded in anything than Python. I am using just notepad along with the gdc compiler. At the moment I need to solve the system of liner equations: A00*q0 + A01*q1 + A02*q2

Re: Float rounding (in JSON)

2022-10-13 Thread Sergey via Digitalmars-d-learn
On Thursday, 13 October 2022 at 19:27:22 UTC, Steven Schveighoffer wrote: Thank you Steven, for your very detailed answer. It doesn't look really that far off. You can't expect floating point parsing to be exact, as floating point does not perfectly represent decimal numbers, especially when

Float rounding (in JSON)

2022-10-13 Thread Sergey via Digitalmars-d-learn
I'm not a professional of IEEE 754, but just found this behavior at rounding in comparison with other languages. I supose it happened because in D float numbers parsed as double and have a full length of double while rounding. But this is just doesn't match with behavior in other languages.

Re: cannot gdb LDC build binary: Segmentation fault

2022-10-08 Thread Sergey via Digitalmars-d-learn
On Friday, 7 October 2022 at 04:40:34 UTC, mw wrote: Hi, I have a LDC (1.30.0) built binary on Ubuntu 18.04.5 LTS x86_64, the program core dumps somewhere, so I want to debug Did you try to use GDC? As gdb more gcc tool And for llvm should be lldb..

Re: Replacing tango.text.Ascii.isearch

2022-10-06 Thread Sergey via Digitalmars-d-learn
On Thursday, 6 October 2022 at 08:15:10 UTC, Siarhei Siamashka wrote: On Wednesday, 5 October 2022 at 21:50:32 UTC, torhu wrote: Please don’t tell us that D will be slower than Python again?)

Re: Visual D doesn't work, now Visual Studio Code / D doesn't work!!!! ....

2022-10-02 Thread Sergey via Digitalmars-d-learn
On Sunday, 2 October 2022 at 11:00:06 UTC, Daniel Donnell, Jr wrote: I thought I set everything up correctly, and now: ``` Exception thrown at 0x7FF7D6E2E230 in metamath-d.exe: 0xC096: Privileged instruction. Unable to open natvis file

Re: Can you access the same classes from C++ and D and vise versa, or do the classes have to not form dependency cycle?

2022-09-12 Thread Sergey via Digitalmars-d-learn
Pretty new video from ContextFreeCode covers interop with C++ D also mentioned there :) https://youtu.be/RdypYCxhWtw

Re: OpenXR library bindings etc

2022-09-10 Thread Sergey via Digitalmars-d-learn
On Friday, 9 September 2022 at 06:13:07 UTC, brian wrote: I'd like to use D for some visualisation in XR, but without OpenXR, I'm stuck before I even start. I have tried before to write the library bindings (https://github.com/infinityplusb/OpenXR-D), but got stuck and honestly don't know

Re: Supporting Arabic in GUI

2022-08-08 Thread Sergey via Digitalmars-d-learn
On Sunday, 7 August 2022 at 23:48:22 UTC, pascal111 wrote: I have no idea about GUI or Rad programming in D; it's not its time, but I'm curious to know if D is fine supporting for Arabic language in the GUI applications or we will have some issues like I met - in my experience - in Free

Re: Arbitrary precision decimal numbers

2022-08-06 Thread Sergey via Digitalmars-d-learn
On Thursday, 4 August 2022 at 13:01:30 UTC, Ruby The Roobster wrote: Is there any implementation in phobos of something similar to BigInt but for non-integers as well? If there isn't is there a dub package that does this, and if so, which one? Also you could find usefull such projects:

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-30 Thread Sergey via Digitalmars-d-learn
On Tuesday, 28 June 2022 at 18:42:11 UTC, Marcone wrote: Beloved, I love programming in D. D is my favorite programming language. I'm not a professional programmer, but I love to program. I would like to learn D deeply. Most programming languages have a PDF/CHM/MOBI/ePub version of the

Re: Reading parquet files from D

2022-06-23 Thread Sergey via Digitalmars-d-learn
On Thursday, 23 June 2022 at 12:48:20 UTC, test123 wrote: https://forum.dlang.org/post/mkgelbxeqvhbdsukg...@forum.dlang.org On Monday, 14 October 2019 at 20:13:43 UTC, jmh530 wrote: On Monday, 14 October 2019 at 19:27:04 UTC, Andre Pany wrote: [snip] I found this tool

Re: D for data science and statistics

2022-06-04 Thread Sergey via Digitalmars-d-learn
On Saturday, 4 June 2022 at 20:26:54 UTC, Nicolas wrote: Hi all! Pleased to meet you. I am currently deep-diving into data analysis and statistics with R and SQL. I got mid-level programming experience, focusing on algorithms and innovation instead of sticking to one programming language.

Re: UI Library

2022-05-28 Thread Sergey via Digitalmars-d-learn
On Saturday, 28 May 2022 at 02:39:41 UTC, Jack wrote: On Friday, 20 May 2022 at 12:32:37 UTC, ryuukk_ wrote: Avoid GTK, it's bloated, GTK4 looks like a toolkit to design mobile apps, and you need runtime dependencies on windows adam's gui library is very nice, 0 dependencies I personally

Re: D WebAssembly working differently than C++, Zig

2022-05-17 Thread Sergey via Digitalmars-d-learn
On Monday, 16 May 2022 at 17:32:20 UTC, Allen Garvey wrote: I'm working on a comparison of WebAssembly performance for error propagation dithering using D, C++ and Zig. So far C++ and Zig work as expected, but for D, despite using the same algorithm and similar code the output is different.

Re: How to work with hashmap from memutils properly?

2022-03-04 Thread Sergey via Digitalmars-d-learn
On Wednesday, 16 February 2022 at 13:37:28 UTC, ikod wrote: On Wednesday, 16 February 2022 at 10:31:38 UTC, Siarhei Siamashka wrote: On Friday, 11 February 2022 at 19:04:41 UTC, Sergey wrote: Is this an attempt to implement a high performance solution for the Benchmarks Game's LRU problem in D

Re: How to work with hashmap from memutils properly?

2022-02-11 Thread Sergey via Digitalmars-d-learn
On Friday, 11 February 2022 at 02:43:24 UTC, Siarhei Siamashka wrote: On Thursday, 10 February 2022 at 20:39:45 UTC, Sergey wrote: Code could be found here: https://github.com/cyrusmsk/lang_benchmark/tree/main/lru/source/d_comparison/mem Is this an attempt to implement a high performance

How to work with hashmap from memutils properly?

2022-02-10 Thread Sergey via Digitalmars-d-learn
Could someone help with memutils library? It seems (based on some posts in 2018) that memutils is one of the fastest hashmap in Dlang world (if you know it is not - please help me find the fastest hashmap realisation). I've made some benchmarks with the same code for regular AA,

Re: Meaning of in, out and inout

2022-01-20 Thread Sergey via Digitalmars-d-learn
On Thursday, 20 January 2022 at 13:28:54 UTC, Paul Backus wrote: On Thursday, 20 January 2022 at 13:19:06 UTC, Sergey wrote: [...] The explanation you quoted is from 2005, and `inout` does not mean the same thing in 2022 as it did in 2005. The current meaning of inout is explained in the D

Meaning of in, out and inout

2022-01-20 Thread Sergey via Digitalmars-d-learn
https://forum.dlang.org/post/17nwtnp4are5q$.1ddtvmj4e23iy@40tude.net On Tuesday, 10 May 2005 at 01:06:14 UTC, Derek Parnell wrote: On Tue, 10 May 2005 00:30:57 + (UTC), Oliver wrote: Hello D-ers The documentation is very short on the keywords in, out and inout. Is is inout sth like

Check an entire XML document for well-formedness in KXML

2015-07-08 Thread Sergey via Digitalmars-d-learn
Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance.

Re: kxml help.

2015-07-08 Thread Sergey via Digitalmars-d-learn
Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance.

Re: Check an entire XML document for well-formedness in KXML

2015-07-08 Thread Sergey via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 12:18:46 UTC, Gary Willoughby wrote: On Wednesday, 8 July 2015 at 07:30:51 UTC, Sergey wrote: Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance. Maybe use the command