Re: 200-600x slower Dlang performance with nested foreach loop

2021-01-30 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 26 January 2021 at 23:57:43 UTC, methonash wrote: clip That nested loop is an O(n^2) algorithm. Meaning it will slow down *very* quickly as the size of the array n increases. You might want to think about how to improve this algorithm. Nice observation, and yes, this would

Re: Reflection on the book D web development.

2020-11-20 Thread CraigDillabaugh via Digitalmars-d-learn
On Friday, 20 November 2020 at 19:12:38 UTC, Alaindevos wrote: I bought the book "D Web Development". I understand only 20% of the book,the other 80% is way above my head. Compare, I own a book on flask development, and I understand 100% of it. Which means I can use dlang for anything except

What is up with Vibe-d

2020-07-09 Thread CraigDillabaugh via Digitalmars-d-learn
So is Vibe-d still being actively maintained? I noticed there have been no new releases in a while, and the forums are a bit of a disaster (unless you love porn I suppose): https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/

Re: Looking for a Code Review of a Bioinformatics POC

2020-06-11 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 11 June 2020 at 16:13:34 UTC, duck_tape wrote: Hi! I'm new to dlang but loving it so far! One of my favorite first things to implement in a new language is an interval library. In this case I want to submit to a benchmark repo: https://github.com/lh3/biofast I also think there

Re: Bug in std.json or my problem

2020-04-22 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 22 April 2020 at 18:23:48 UTC, Anonymouse wrote: On Wednesday, 22 April 2020 at 17:48:18 UTC, Craig Dillabaugh wrote: The crash is caused because the 'income' field with value 0.0 is output as 0 (rather than 0.0) and when it is read this is interpreted as an integer. Shouldn't

Re: benchmark on binary trees

2015-12-04 Thread CraigDillabaugh via Digitalmars-d-learn
On Friday, 4 December 2015 at 14:06:26 UTC, Alex wrote: Hi everybody, this is going to be a learning by doing a benchmark test - post. clip 3. The compilation was done by: dmd -O -release -boundscheck=off [filename.d] Is there anything else to improve performance significantly? If you

Re: looking for sdl2 based application skeleton

2015-11-05 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 5 November 2015 at 07:26:08 UTC, drug wrote: It seems to me I saw somewhere the project like this. I don't want to make another one if there is something like that. Where you thinking of Derelict? https://github.com/DerelictOrg/DerelictSDL2 or perhaps Dgame:

Re: Speeding up text file parser (BLAST tabular format)

2015-09-14 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 14 September 2015 at 12:30:21 UTC, Fredrik Boulund wrote: Hi, This is my first post on Dlang forums and I don't have a lot of experience with D (yet). I mainly code bioinformatics-stuff in Python on my day-to-day job, but I've been toying with D for a couple of years now. I had

Re: Dynamic memory

2015-07-28 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 28 July 2015 at 17:26:39 UTC, Binarydepth wrote: On Tuesday, 28 July 2015 at 17:07:47 UTC, Steven Schveighoffer wrote: On 7/28/15 12:59 PM, Binarydepth wrote: When indexing, it always goes out to in. So nam[0] is the first element of type int[2], and nam[0][0] is the first

Re: Dynamic memory

2015-07-28 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 28 July 2015 at 20:07:12 UTC, Steven Schveighoffer wrote: On 7/28/15 3:33 PM, CraigDillabaugh wrote: 6. (IMHO) Code is actually more readable. But then I find lots of brackets confusing ... so maybe its just me. Have you considered a wrapper that uses multi-dimensional access?

Re: Yes or No Options

2015-07-27 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 27 July 2015 at 17:21:33 UTC, Anonymous wrote: On Monday, 27 July 2015 at 16:48:00 UTC, Alex wrote: Okay. By pure trying I found out what I did wrong: Apparently by typing Y I entered the shift key. Could that have been the problem? I changed it to a small y and it at least jumped

Re: Accessing x86 Performance Counters

2015-05-13 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 13 May 2015 at 09:26:40 UTC, Benjamin Thaut wrote: On Wednesday, 13 May 2015 at 08:53:10 UTC, Kagamin wrote: There was no word about windows, but process explorer shows page faults and cycles per process from unprivileged account, so I guess, this information is available through

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: On 4/15/15 12:47 AM, Daniel Kozak wrote: On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák wrote: On Wed, 15 Apr 2015 04:24:20 + Craig Dillabaugh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: clip Depends on what GByte is. If it doesn't contain pointers (I'm assuming its probably ubyte?), then it won't be scanned. clip -Steve Yes, GByte is an alias for ubyte.

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 14:02:38 UTC, Steven Schveighoffer wrote: On 4/15/15 8:35 AM, CraigDillabaugh wrote: On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: immutable blocksize = GByte.sizeof * x_block_size * y_block_size; auto buffer =

Re: Using C++ libraries in D

2015-03-17 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 17 March 2015 at 13:22:13 UTC, kishore wrote: Hi, I'm new to D language, I'm from Java, Scala family. D is interesting and better than C++ from my point of view. Can we able to use C++ external libraries in D language ? For example I would like to use

Re: Will D have a standard cross platform GUI toolkit?

2015-02-26 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 26 February 2015 at 18:20:12 UTC, Rinzler wrote: Hello, I was wondering if D will have a standard cross platform GUI toolkit. I think that any modern language should provide a cross-platform GUI toolkit. I know that there are some GUI toolkits, but are there cross-platform?

Re: Will D have a standard cross platform GUI toolkit?

2015-02-26 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 26 February 2015 at 18:49:39 UTC, Rinzler wrote: By the way, which, in your opinion, is the most performant and more stable? I personally can't help you there, as I've never done any GUI programming in D. Maybe you can test a few of them out and write a report :o)

Re: curl password issue

2015-02-23 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 23 February 2015 at 17:47:54 UTC, Andre wrote: Until now I didn't found out how to solve the issue excepting changing the password;) In case I find the solution I will make a pull request. Kind regards André On Monday, 23 February 2015 at 16:58:16 UTC, Marc Schütz wrote: On

Re: Learning to XML with D

2015-02-06 Thread CraigDillabaugh via Digitalmars-d-learn
On Friday, 6 February 2015 at 11:39:32 UTC, Chris wrote: On Friday, 6 February 2015 at 09:15:54 UTC, Derix wrote: So, I set sails to transform a bunch of HTML files with D. This, of course, will happen with the std.xml library. There is this nice example :

Re: Learning to XML with D

2015-02-06 Thread CraigDillabaugh via Digitalmars-d-learn
On Friday, 6 February 2015 at 14:09:51 UTC, CraigDillabaugh wrote: On Friday, 6 February 2015 at 11:39:32 UTC, Chris wrote: On Friday, 6 February 2015 at 09:15:54 UTC, Derix wrote: clip Thxxx The documentation says: Warning: This module is considered out-dated and not up to Phobos'

Re: Learning to XML with D

2015-02-06 Thread CraigDillabaugh via Digitalmars-d-learn
On Friday, 6 February 2015 at 14:15:44 UTC, Chris wrote: On Friday, 6 February 2015 at 14:11:19 UTC, CraigDillabaugh wrote: On Friday, 6 February 2015 at 14:09:51 UTC, CraigDillabaugh wrote: On Friday, 6 February 2015 at 11:39:32 UTC, Chris wrote: On Friday, 6 February 2015 at 09:15:54 UTC,

Re: Odd Error Message

2014-12-16 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 15 December 2014 at 22:20:53 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 15 Dec 2014 22:09:28 + CraigDillabaugh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Given the following program: import std.string; import std.stdio; void main

Odd Error Message

2014-12-15 Thread CraigDillabaugh via Digitalmars-d-learn
Given the following program: import std.string; import std.stdio; void main() { File file = File(blah.txt, r); while( !(file.eof()) count 10 ) { //line 8 // } } I get the error message: line(8): Error: void has no value If I comment

Re: Learning D for a non computer science background person : pre-requisite knowledge?

2014-12-02 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 2 December 2014 at 16:38:34 UTC, Mayuresh Kathe wrote: While I have been a programmer for close to 23 years, it's been mostly API level code cobbling work. Would like to learn D, but am a bit intimidated by the fact that I don't have much of a grasp over the foundational stuff

Re: Learning D for a non computer science background person : pre-requisite knowledge?

2014-12-02 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 2 December 2014 at 17:04:57 UTC, Mayuresh Kathe wrote: On Tuesday, 2 December 2014 at 16:54:50 UTC, CraigDillabaugh wrote: On Tuesday, 2 December 2014 at 16:38:34 UTC, Mayuresh Kathe wrote: clip Thanks for the welcome. :) I think I'll just work through Discrete Mathematics and

Re: [dub] Size of executable

2014-11-27 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 27 November 2014 at 13:56:19 UTC, Chris wrote: On Thursday, 27 November 2014 at 12:29:03 UTC, Gary Willoughby wrote: On Thursday, 27 November 2014 at 09:33:49 UTC, Chris wrote: I usually use dub to create and build projects. I built one of the projects with dub and then by hand

Re: [dub] Size of executable

2014-11-27 Thread CraigDillabaugh via Digitalmars-d-learn
On Thursday, 27 November 2014 at 14:14:50 UTC, Chris wrote: On Thursday, 27 November 2014 at 13:59:23 UTC, CraigDillabaugh wrote: On Thursday, 27 November 2014 at 13:56:19 UTC, Chris wrote: On Thursday, 27 November 2014 at 12:29:03 UTC, Gary Willoughby wrote: On Thursday, 27 November 2014 at

Re: vibe.d problem

2014-11-18 Thread CraigDillabaugh via Digitalmars-d-learn
On Tuesday, 18 November 2014 at 17:16:33 UTC, CraigDillabaugh wrote: On Monday, 17 November 2014 at 22:02:13 UTC, låzaro via Digitalmars-d-learn wrote: Error executing command run: dmd failed with exit code 1. Not sure exactly what your issue is, and am a bit rusty on Vibe/dub, but you may

Re: vibe.d problem

2014-11-18 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 17 November 2014 at 22:02:13 UTC, låzaro via Digitalmars-d-learn wrote: Hi there folks, let me the fact talk for me lazaro@leviatan:~$ dub init aplicacion vibe.d Successfully created an empty project in '/home/lazaro/aplicacion'. lazaro@leviatan:~$ cd aplicacion/