Re: How to interact with fortran code

2014-07-11 Thread bachmeier via Digitalmars-d-learn
On Thursday, 10 July 2014 at 12:12:20 UTC, Marc Schütz wrote: On Wednesday, 9 July 2014 at 15:09:08 UTC, Chris wrote: On Wednesday, 9 July 2014 at 15:00:25 UTC, seany wrote: I apologize many times for this question, may be this had already been answered somewhere, but considering today the

Re: Extended math library

2014-07-16 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 19:43:26 UTC, Martijn Pot wrote: On Tuesday, 15 July 2014 at 22:09:43 UTC, ponce wrote: On Tuesday, 15 July 2014 at 20:46:32 UTC, Martijn Pot wrote: To make a long story short: Is there any math library with e.g. mean, std, polynomial fitting, ...?

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread bachmeier via Digitalmars-d-learn
On Monday, 18 August 2014 at 23:12:28 UTC, Laeeth Isharc wrote: For me, NumPy has some serious problems despite being the accepted norm for computational work. If not too offtopic, do you have a link describing, or would you briefly summarize these problems? I am intrigued. And what would

Re: literate programming in D

2014-08-26 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 14:55:08 UTC, nikki wrote: I've been googling without luck, is there a way to do literate programming in D?, similar to how it's done in Coffeescript ? http://www.coffeescriptlove.com/2013/02/literate-coffeescript.html basically me writing comments around code

Re: Novice web developer trying to learn D

2014-09-08 Thread bachmeier via Digitalmars-d-learn
On Monday, 8 September 2014 at 20:58:20 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 08 Sep 2014 20:47:19 + AsmMan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Before go to D I recomend you to take a look at the C programming language (as Gary Willoughby already

Re: compile automation, makefile, or whatever?

2014-09-16 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 16 September 2014 at 20:31:33 UTC, Cliff wrote: On Tuesday, 16 September 2014 at 20:29:12 UTC, K.K. wrote: On Tuesday, 16 September 2014 at 19:26:29 UTC, Cliff wrote: I want to say somewhere on the forums are some descriptions of using CMake for this. Might try searching for that.

Re: coding practices: include whole module or only the needed function

2014-10-07 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 7 October 2014 at 08:37:59 UTC, monarch_dodra wrote: As a general rule, avoid imports in global scope anyways. Can you expand or provide a link to the issue?

Re: Initializing D in C to use?

2014-10-17 Thread bachmeier via Digitalmars-d-learn
On Friday, 17 October 2014 at 17:18:34 UTC, Adam D. Ruppe wrote: On Friday, 17 October 2014 at 16:35:46 UTC, Jeremy DeHaan wrote: I remember reading something(but my googlefu is weak today) about having to initialize the runtime if you are using D inside another language. Can anyone confirm

Re: Dynamically Loading a D DLL From a C Program in Linux

2014-10-24 Thread bachmeier via Digitalmars-d-learn
I can't answer the first question, but for the second, I've given an example here: http://forum.dlang.org/post/zfdvrwvgavykauczb...@forum.dlang.org I've done that many, many times and do not see any problems related to the runtime. On Friday, 24 October 2014 at 20:59:20 UTC, John McFarlane

Re: Still not D standard yet ?

2014-11-29 Thread bachmeier via Digitalmars-d-learn
On Saturday, 29 November 2014 at 09:03:13 UTC, Ledd wrote: Do you really think that a system language, or just a language that aims to be popular, can possibly discard the idea of getting into an international standard ? I still can't recall any major language that doesn't have a standard,

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-22 Thread bachmeier via Digitalmars-d-learn
On Monday, 22 December 2014 at 10:12:52 UTC, Iov Gherman wrote: Now, can anyone explain why this program ran faster in Java? I ran both programs multiple times and the results were always close to this execution times. Can the implementation of log() function be the reason for a slower

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-22 Thread bachmeier via Digitalmars-d-learn
On Monday, 22 December 2014 at 17:05:19 UTC, Iov Gherman wrote: Hi Guys, First of all, thank you all for responding so quick, it is so nice to see D having such an active community. As I said in my first post, I used no other parameters to dmd when compiling because I don't know too much

Re: Do you have a better way to remove element from a array?

2015-02-05 Thread bachmeier via Digitalmars-d-learn
On Thursday, 5 February 2015 at 14:09:10 UTC, bearophile wrote: Tobias Pankrath: Works as designed: http://dlang.org/phobos/std_algorithm.html#.remove Unfortunately it's one of the worst designed functions of Phobos: https://issues.dlang.org/show_bug.cgi?id=10959 Bye, bearophile It

Re: fromStringz problem with gdc

2015-04-06 Thread bachmeier via Digitalmars-d-learn
On Monday, 6 April 2015 at 18:31:13 UTC, chardetm wrote: On Monday, 6 April 2015 at 17:55:42 UTC, Iain Buclaw wrote: On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote: Hello everyone, I have a problem with the fromStringz function (std.string.fromStringz) when I try to compile with the

Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 18:29:23 UTC, Ali Çehreli wrote: D has the pragma(lib) feature where you can tell the compiler to link with a specific library as well. For example: pragma(lib, curl); You would probably use sndfile in your case (not sure): pragma(lib, sndfile); This is

Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 19:54:34 UTC, Ali Çehreli wrote: They are all here: http://dlang.org/pragma.html pragma(inline) is the latest, which will be available in 2.068. Ali I meant on this page: http://dlang.org/dmd-linux.html Someone starting out with D might not look at the

Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 19:54:40 UTC, Steven Schveighoffer wrote: http://dlang.org/pragma.html#lib It's got some problems though. Not everyone's system is the same. -Steve Okay. Then I guess it should not be pushed.

Re: Linear algebra library with no dependency Why every linear algebra library has LAPACK dependency

2015-07-03 Thread bachmeier via Digitalmars-d-learn
On Friday, 3 July 2015 at 23:51:30 UTC, kerdemdemir wrote: This question is not only about D linear algebra libraries but also for other linear algebra libraries in other languages. I am working with some scientific developers in my current project. When we were talking I said I know a

Re: extern(C) with function returning user type

2015-07-30 Thread bachmeier via Digitalmars-d-learn
On Thursday, 30 July 2015 at 01:14:06 UTC, Mike Parker wrote: On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P Really? I see it as

Re: Array start index

2015-08-01 Thread bachmeier via Digitalmars-d-learn
On Saturday, 1 August 2015 at 09:35:53 UTC, DLearner wrote: Does the D language set in stone that the first element of an array _has_ to be index zero? Wouldn't starting array elements at one avoid the common 'off-by-one' logic error, it does seem more natural to begin a count at 1. Actually,

Re: Array start index

2015-08-01 Thread bachmeier via Digitalmars-d-learn
On Saturday, 1 August 2015 at 19:04:10 UTC, Andrej Mitrovic wrote: On 8/1/15, DLearner via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: D is a C derivative, so it seems a shame not to identify causes of bugs in C, and design them out in D. This has already been done! D defines

Re: extern(C) with function returning user type

2015-07-31 Thread bachmeier via Digitalmars-d-learn
On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have D not able to natively use C libraries. Are we just gonna have to write D bindings to every notable library out there? Also I don't see how it'd be problematic, if you don't want a

Re: Array start index

2015-08-03 Thread bachmeier via Digitalmars-d-learn
On Sunday, 2 August 2015 at 21:58:48 UTC, QAston wrote: Adding 1-indexed arrays to the language fixes nothing. Just write your 1-indexed array type and if you enjoy using it, publish it as a library. Who knows, if demand is high it may even end up in phobos. Oh, I don't think that's a good

Re: lambda syntax with curly braces

2015-08-10 Thread bachmeier via Digitalmars-d-learn
On Monday, 10 August 2015 at 15:05:55 UTC, sigod wrote: I see. But it's really counter intuitive after working with C#. Probably documentation should stress out the difference. Thanks, Adam. I assume you mean this page: http://dlang.org/expression.html There's an Improve this page button

Re: lambda syntax with curly braces

2015-08-10 Thread bachmeier via Digitalmars-d-learn
On Monday, 10 August 2015 at 16:15:40 UTC, sigod wrote: Good point. But I seldom do this because English isn't my native language. Your English looks fine to me. Close enough to native that I can't tell the difference.

Re: website update

2015-08-10 Thread bachmeier via Digitalmars-d-learn
On Monday, 10 August 2015 at 11:20:32 UTC, tcak wrote: On Monday, 10 August 2015 at 10:34:56 UTC, Tony wrote: It looks like this page: http://dlang.org/hash-map.html Should have the override keyword added the the member functions in Foo: class Foo { int a, b; size_t toHash() {

Re: Getting Nth Row and Column from MatrixView, Scid library

2015-07-17 Thread bachmeier via Digitalmars-d-learn
On Friday, 17 July 2015 at 22:05:45 UTC, kerdemdemir wrote: Sad times with linear algebra libraries for me, Since I can't get rows and columns easily with Scid, It seems not flexible for me. And also there are other issues for example I can't set matrix to row or column major. I begin to

Re: Looking for a language to hang my hat on.

2015-11-17 Thread bachmeier via Digitalmars-d-learn
On Monday, 16 November 2015 at 22:39:17 UTC, Dan wrote: I have been lurking on this site over the past few weeks trying to decide when (and if) to make the transition. Can anyone here who has already made that transition tell me how smoothly it went? Any major unexpected problems? Advice?

Re: Looking for a language to hang my hat on.

2015-11-17 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 00:33:44 UTC, Chris Wright wrote: This might change, but that's a gamble, and not one I'd take. For projects where you need specific libraries to exist already, D probably won't serve your needs. (It's definitely easier with C++ interop, but you'd still have to

Re: Looking for a language to hang my hat on.

2015-11-17 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 14:21:27 UTC, Dan wrote: Personally, I don't think there is a reason to transition. Instead, you should learn D and then use it when you are ready. That is troubling, but reasons to transition must exist or the language would not exist, right? I find that if I

Re: I'm getting NAN out of nowhere

2015-07-09 Thread bachmeier via Digitalmars-d-learn
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote: On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote: float prom; You didn't initialize this variable. Set it to 0.0 and it will work. Like how pointers are initialized to null automatically in D, floats are

Re: observation: D getting a bit complex

2015-08-30 Thread bachmeier via Digitalmars-d-learn
On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: The following reminds me of the good old C++ template errors the C++ compiler spits out. Whilst D has fixed that problem, some things have gotten more complex. I just wanted to find a replacement for D1 path join, and found

Re: Dub package with C code

2015-09-25 Thread bachmeier via Digitalmars-d-learn
On Friday, 25 September 2015 at 14:24:36 UTC, Adam D. Ruppe wrote: FYI, if you guys want to set something up for multiple contributors like a traditional blog, I'm willing to move TWID do it. I've been kinda wanting to do a blog thing but I just haven't brought myself to set anything up.

Re: Dub package with C code

2015-09-25 Thread bachmeier via Digitalmars-d-learn
On Friday, 25 September 2015 at 15:06:41 UTC, bachmeier wrote: First issue would be getting approval from Walter and Andrei. Second would be finding someone that knows how to do it. Should I create a new thread to open discussion on the topic?

Re: Building basic gtkd,opengl application

2015-09-21 Thread bachmeier via Digitalmars-d-learn
On Monday, 21 September 2015 at 17:59:17 UTC, Michał wrote: So no idea how to make basic gtk/opengl application working? The project has its own forum if you haven't already posted there: http://forum.gtkd.org/

Re: Dub package with C code

2015-09-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 24 September 2015 at 18:19:49 UTC, Laeeth Isharc wrote: On Thursday, 24 September 2015 at 02:43:20 UTC, Sebastiaan Koppe wrote: I have just created bindings for libxlsxwriter, an c library for creating excel files. Used the htod tool to do most of the work, and only had to

Re: Dub package with C code

2015-09-25 Thread bachmeier via Digitalmars-d-learn
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote: I meant if there is already a place where I can upload my post to. Something like blog.dlang.org OT: Once again, I'm absolutely sure tha D should have an official blog! Forums can't replace blogs, forums are for discussions, not

Re: I Did It! Calling D Library from Objective C in XCode on OSX

2015-12-14 Thread bachmeier via Digitalmars-d-learn
On Monday, 14 December 2015 at 19:15:22 UTC, Mike McKee wrote: On Monday, 14 December 2015 at 19:13:20 UTC, bachmeier wrote: Is it okay if I copy your post to the wiki at this link? http://wiki.dlang.org/Cookbook Sure! :) Feel free to fix grammar or anything out of sorts (or could be

Re: I Did It! Calling D Library from Objective C in XCode on OSX

2015-12-14 Thread bachmeier via Digitalmars-d-learn
Is it okay if I copy your post to the wiki at this link? http://wiki.dlang.org/Cookbook

Re: I Did It! Calling D Library from Objective C in XCode on OSX

2015-12-15 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 15 December 2015 at 07:57:56 UTC, Jacob Carlborg wrote: On 2015-12-14 20:13, bachmeier wrote: Is it okay if I copy your post to the wiki at this link? http://wiki.dlang.org/Cookbook Please don't. There's a lot of errors and weird things in the post. It doesn't really do what the

Re: Why does this not work?

2016-01-01 Thread bachmeier via Digitalmars-d-learn
On Friday, 1 January 2016 at 14:47:20 UTC, TheDGuy wrote: On Friday, 1 January 2016 at 14:29:34 UTC, Tobi G. wrote: On Friday, 1 January 2016 at 14:20:26 UTC, Tobi G. wrote: The solution is that readln() returns a string that also contains the newline this can be solved by easily stripping

Re: Why does this not work?

2016-01-01 Thread bachmeier via Digitalmars-d-learn
On Friday, 1 January 2016 at 15:16:36 UTC, Adam D. Ruppe wrote: On Friday, 1 January 2016 at 15:06:53 UTC, bachmeier wrote: I've battled with a few times, not having any idea what was going on. I now almost automatically use strip when it's not working. This is one of the most frequently

Re: How is D doing?

2015-12-22 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 22 December 2015 at 03:30:32 UTC, ShinraTensei wrote: I recently noticed massive increase in new languages for a person to jump into(Nim, Rust, Go...etc) but my question is weather the D is actually used anywhere or are there chances of it dying anytime soon. So far I've tried a

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:53:41 UTC, Chris Wright wrote: Duration is defined in core.time: https://dlang.org/phobos/ core_time.html#Duration Unfortunately, ddoc doesn't automatically cross-reference these for you, which results in confusion. (As if it weren't confusing enough to

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:52:05 UTC, anonymous wrote: You can add a Duration to a DateTime, giving you a new DateTime. And you can subtract a DateTime from another, giving you the Duration between them. Example: import std.datetime, std.stdio; void main() { DateTime oldYear =

DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
I was just reading through the documentation for std.datetime. DateTime.opBinary looks pretty interesting: http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary Does anyone know how to use it? You certainly can't learn anything from the documentation, because duration is a mystery. If

Re: Building the Docs with checked out code downoads old dmd

2015-11-23 Thread bachmeier via Digitalmars-d-learn
On Saturday, 21 November 2015 at 21:04:26 UTC, H. S. Teoh wrote: To prevent downloading / building old versions of dmd, when running make in the dlang.org repo, specify the 'html' target: make -f posix.mak html This will also skip the Kindle builds and various other things that may

Re: Can anybody install DDT on Eclipse Neon or Mars?

2016-06-19 Thread bachmeier via Digitalmars-d-learn
On Saturday, 18 June 2016 at 16:46:26 UTC, Mark wrote: I've spent may hours trying to do this in OSX. Everything goes fine from the marketplace window...until I restart Eclipse and find no files have been added? Any words of consolation or advice will be greatly appreciated. Desperately,

Re: Linux and htod

2016-06-16 Thread bachmeier via Digitalmars-d-learn
On Thursday, 16 June 2016 at 12:23:09 UTC, fbmac wrote: How people use it on Linux, if htod is required to import C libraries and windows only?f Just to clarify, so as to prevent confusion by someone that randomly stumbles across this post, you do not need htod, dstep, or any other tool to

Re: DUB - link error on Windows 10 64-bit

2016-01-17 Thread bachmeier via Digitalmars-d-learn
On Sunday, 17 January 2016 at 02:48:47 UTC, Mike Parker wrote: On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar wrote: I have installed DMD by unzipping the DMD archive (The installer does not work correctly on Windows 10). DUB installed as normal. What problem did you

Re: print function

2016-02-04 Thread bachmeier via Digitalmars-d-learn
On Thursday, 4 February 2016 at 11:04:15 UTC, Ola Fosheim Grøstad wrote: On Thursday, 4 February 2016 at 10:59:50 UTC, Mike Parker wrote: IMO, while giving beginner's a helping hand is a great thing, I don't think it's a good basis to use as a design for a standard library. Yes, better to

Re: print function

2016-02-04 Thread bachmeier via Digitalmars-d-learn
On Thursday, 4 February 2016 at 15:10:18 UTC, Kagamin wrote: On Thursday, 4 February 2016 at 14:25:21 UTC, bachmeier wrote: Unfortunately there is no such thing and it is unlikely to exist in the next decade. There is http://forum.dlang.org/post/mtsd38$16ub$1...@digitalmars.com The

Re: Proper Use of Assert and Enforce

2016-02-05 Thread bachmeier via Digitalmars-d-learn
On Friday, 5 February 2016 at 09:50:43 UTC, Suliman wrote: Will asserts stay after compilation in release mode? No. The only assert that remains in release mode is assert(false) or assert(0) as a way to identify that you've reached a piece of code that shouldn't be executed.

Re: Simple performance question from a newcomer

2016-02-23 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 23 February 2016 at 11:10:40 UTC, ixid wrote: On Monday, 22 February 2016 at 15:43:23 UTC, dextorious wrote: I do have to wonder, however, about the default settings of dub in this case. Having gone through its documentation, I might still not have guessed to try the compiler

Re: Speed of csvReader

2016-01-21 Thread bachmeier via Digitalmars-d-learn
On Thursday, 21 January 2016 at 11:08:18 UTC, Ali Çehreli wrote: We should understand why D is slow in this case. :) Ali fread source is here: https://github.com/Rdatatable/data.table/blob/master/src/fread.c Good luck trying to work through that (which explains why I'm using D). I don't

Re: Speed of csvReader

2016-01-21 Thread bachmeier via Digitalmars-d-learn
On Thursday, 21 January 2016 at 10:48:15 UTC, data pulverizer wrote: Running Ubuntu 14.04 LTS In that case, have you looked at http://lancebachmeier.com/rdlang/ If this is a serious bottleneck you can solve it with two lines evalRQ(`x <- fread("Acquisition_2009Q2.txt", sep = "|",

Re: Linking C libraries with DMD

2016-01-21 Thread bachmeier via Digitalmars-d-learn
On Friday, 22 January 2016 at 02:39:33 UTC, jmh530 wrote: I tried to create an example that more closely resembles what is in LearningD (see https://github.com/aldacron/LearningD/tree/master/Chapter09_Connecting%20D%20with%20C/clib). I created two files clib.c #include int

Re: Linking C libraries with DMD

2016-01-21 Thread bachmeier via Digitalmars-d-learn
On Thursday, 21 January 2016 at 23:07:06 UTC, jmh530 wrote: I ran dmd -m64 .d -L/LIBPATH: -L and got : fatal error LNK1136: invalid or corrupt file --- errorlevel 1136 At least that's progress. LNK1136 is for a corrupt or abnormally small file. I did notice that the original dll was 82kb

Re: Improving CSV parsing performance, Episode 2 (Was: Re: Speed of csvReader)

2016-01-26 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 26 January 2016 at 06:27:49 UTC, H. S. Teoh wrote: My thought is to integrate the fastcsv code into std.csv, such that the current std.csv code will serve as fallback in the cases where fastcsv's limitations would prevent it from being used, with fastcsv being chosen where

Re: Scala Spark-like RDD for D?

2016-02-16 Thread bachmeier via Digitalmars-d-learn
On Monday, 15 February 2016 at 11:09:10 UTC, data pulverizer wrote: As an alternative are there plans for parallel/cluster computing frameworks for D? You can use MPI: https://github.com/DlangScience/OpenMPI

Re: Scala Spark-like RDD for D?

2016-02-16 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 17 February 2016 at 02:03:40 UTC, Jon D wrote: On Tuesday, 16 February 2016 at 16:27:27 UTC, bachmeier wrote: On Monday, 15 February 2016 at 11:09:10 UTC, data pulverizer wrote: As an alternative are there plans for parallel/cluster computing frameworks for D? You can use

Re: Simple performance question from a newcomer

2016-02-21 Thread bachmeier via Digitalmars-d-learn
On Sunday, 21 February 2016 at 14:32:15 UTC, dextorious wrote: I had heard while reading up on the language that in D explicit loops are generally frowned upon and not necessary for the usual performance reasons. First, a minor point, the D community is usually pretty careful not to frown on

Re: Why D isn't the next "big thing" already

2016-07-30 Thread bachmeier via Digitalmars-d-learn
On Saturday, 30 July 2016 at 12:30:55 UTC, LaTeigne wrote: On Saturday, 30 July 2016 at 12:24:55 UTC, ketmar wrote: On Saturday, 30 July 2016 at 12:18:08 UTC, LaTeigne wrote: it you think that you know the things better than somebody who actually *lived* there in those times... well, keep

Re: [OT] Re: Why D isn't the next "big thing" already

2016-07-30 Thread bachmeier via Digitalmars-d-learn
On Saturday, 30 July 2016 at 23:43:33 UTC, Seb wrote: In any case I was trying to say that we could use reddit more actively, we have our own subreddit (https://www.reddit.com/r/d_language), but it's not used for discussions. So maybe killing the bot & actively encouraging a discussion to

Re: Why D isn't the next "big thing" already

2016-07-30 Thread bachmeier via Digitalmars-d-learn
On Saturday, 30 July 2016 at 22:58:31 UTC, LaTeigne wrote: On Saturday, 30 July 2016 at 22:52:23 UTC, bachmeier wrote: On Saturday, 30 July 2016 at 12:30:55 UTC, LaTeigne wrote: On Saturday, 30 July 2016 at 12:24:55 UTC, ketmar wrote: On Saturday, 30 July 2016 at 12:18:08 UTC, LaTeigne wrote:

Re: [OT] Re: Why D isn't the next "big thing" already

2016-07-30 Thread bachmeier via Digitalmars-d-learn
On Sunday, 31 July 2016 at 00:04:41 UTC, Adam D. Ruppe wrote: I have a strong dislike of reddit (and thus rarely post there), it is really hard to use and the voting system is petty. But this would be our own subreddit. I don't disagree if you're talking about r/programming.

Re: Why D isn't the next "big thing" already

2016-07-27 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 26 July 2016 at 15:11:00 UTC, llaine wrote: Hi guys, I'm using D since a few month now and I was wondering why people don't jump onto it that much and why it isn't the "big thing" already. Because languages don't become big things. Good solutions to particular problems become

Re: C binding with D function

2016-08-03 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 3 August 2016 at 15:56:34 UTC, llaine wrote: Okay on stack overflow, they are not using ffi but dl. I tried changing ffi to dl, it's the same don't work unfortunatly. That's about as far as I can go without having it set up on my machine. The procedure should be the same as I

Re: C binding with D function

2016-08-03 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 3 August 2016 at 15:24:56 UTC, llaine wrote: On Wednesday, 3 August 2016 at 15:14:24 UTC, Kagamin wrote: On Wednesday, 3 August 2016 at 15:08:51 UTC, llaine wrote: So basically I have to create wrapper.c ? Yes, but you should write it in D. Runtime initialization is at

Re: C binding with D function

2016-08-03 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 3 August 2016 at 14:01:34 UTC, llaine wrote: On Wednesday, 3 August 2016 at 13:49:36 UTC, bachmeier wrote: Probably because you need the D runtime. One way is to import core.runtime and call Runtime.initialize(). Where should I call this Runtime.initialize() ? Does the

Re: C binding with D function

2016-08-03 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 3 August 2016 at 15:56:34 UTC, llaine wrote: Okay on stack overflow, they are not using ffi but dl. I tried changing ffi to dl, it's the same don't work unfortunatly. This FFI example calls an init function from a library:

Re: C binding with D function

2016-08-04 Thread bachmeier via Digitalmars-d-learn
On Thursday, 4 August 2016 at 12:14:48 UTC, Adam D. Ruppe wrote: On Thursday, 4 August 2016 at 10:36:05 UTC, llaine wrote: Any idea how can I call them ? Just like any other function. Consider this: I'd like to put this example on the wiki unless you think there is a reason to not do so.

Re: How to use std. packages in so files written in dlang

2016-08-11 Thread bachmeier via Digitalmars-d-learn
On Friday, 12 August 2016 at 03:31:37 UTC, ketmar wrote: On Friday, 12 August 2016 at 03:20:59 UTC, grampus wrote: Didn't realise the D community is such active. yes, we are. while we may be not very huge in number, we are very passionate about our language of choice. ;-) Currently there

Re: C binding with D function

2016-08-04 Thread bachmeier via Digitalmars-d-learn
On Thursday, 4 August 2016 at 17:11:04 UTC, Adam D. Ruppe wrote: On Thursday, 4 August 2016 at 14:46:33 UTC, bachmeier wrote: I'd like to put this example on the wiki unless you think there is a reason to not do so. cool. I'll prolly slap it in this week in D soon too (I've been kinda short

Re: C binding with D function

2016-08-03 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 3 August 2016 at 13:44:46 UTC, llaine wrote: Hi guys, I'm trying to make a bridge between D and ruby with a gem called ffi. It's basically a loading/binding library that grab C function and make them callable from Ruby code. As you might already understand, i'm trying to

Re: Array start index

2017-02-06 Thread bachmeier via Digitalmars-d-learn
On Monday, 6 February 2017 at 18:55:19 UTC, pineapple wrote: One reason for zero-based indexes that isn't "it's what we're all used to" is that if you used one-based indexes, you would be able to represent one fewer index than zero-based, since one of the representable values - zero - could no

Re: Learning resources

2017-01-24 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 20:15:38 UTC, Dlearner wrote: Hey all! I'm learning programming through D and having a really good time (much better than with C++ or Python). I'm aiming to make little games with it as a hobby so I've learned some OpenGL stuff. But, I feel like I'm learning

Re: Hello, folks! Newbie to D, have some questions!

2017-02-19 Thread bachmeier via Digitalmars-d-learn
On Saturday, 18 February 2017 at 20:15:55 UTC, timmyjose wrote: 4. I have heard good reports of D's metaprogramming capabilities (ironically enough, primarily from a thread on the Rust user group), and coming from a Common Lisp (and some Racket) background, I am deeply interested in this

Re: foreach for string[string]AA

2017-02-28 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 15:33:46 UTC, ikod wrote: AA implemented as hash table, so it doesn't preserve insertion order. You have to sort keys when you need: import std.algorithm; import std.stdio; void main() { auto aa = ["one":1, "two":2

Re: Keen to learn D

2016-09-04 Thread bachmeier via Digitalmars-d-learn
On Sunday, 4 September 2016 at 20:12:09 UTC, Abhishek Mishra wrote: Hi! I am a newbie and I would like to know more about D language. I have prior knowledge of C++(12th Grade/ Pre-University College Level). How should I start? What more do I need to learn. Thanks in advance. :) Ali's book

Re: Templates problem

2016-09-07 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 7 September 2016 at 19:19:23 UTC, data pulverizer wrote: On Wednesday, 7 September 2016 at 15:04:38 UTC, jmh530 wrote: On Wednesday, 7 September 2016 at 11:37:44 UTC, Russel Winder wrote: I really don't see what's not working in this. Trying to get new D users from Python

Re: Templates problem

2016-09-07 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 7 September 2016 at 22:11:05 UTC, data pulverizer wrote: On Wednesday, 7 September 2016 at 20:57:15 UTC, bachmeier wrote: I too come from the R world and I have been playing the game of flitting between R and C++; using C++ (through RCpp) to speed up slow things in R for some

Re: D to C++

2016-08-31 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 31 August 2016 at 12:13:38 UTC, Michael wrote: I can't imagine that's been done, and I'm not sure it will be high on anybody's list of priorities I'm afraid. A lot of work was done on automating C++ -> D, but converting D, a language intended to replace C++, to C++ itself seems a

Iterate over two arguments at once

2016-09-19 Thread bachmeier via Digitalmars-d-learn
Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it.

Re: Iterate over two arguments at once

2016-09-19 Thread bachmeier via Digitalmars-d-learn
On Monday, 19 September 2016 at 18:10:22 UTC, bachmeier wrote: Suppose I want to iterate over two arrays at once: foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) { ... } I have seen a way to do this but cannot remember what it is and cannot find it. Thanks for the replies. This is what

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote: On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local alias like alias compose = std.functional.compose; as part

Re: Learning ddoc

2016-09-29 Thread bachmeier via Digitalmars-d-learn
On Thursday, 29 September 2016 at 09:35:56 UTC, Antonio Corbi wrote: Hi, I'm in the process of learning how ddoc works. I've successfully created docs for my code and recently learned how to generate it using dub. Related to this and after seeing the announcement of the new release of the

Re: how to debug memory errors

2016-11-08 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 8 November 2016 at 14:55:53 UTC, Steven Schveighoffer wrote: Indeed, you should not. I'm saying this type of error can explain the observed behavior. The original post I responded to said "I don't know if the double free problem is related to this." -Steve Okay. I thought

Re: how to debug memory errors

2016-11-08 Thread bachmeier via Digitalmars-d-learn
On Monday, 7 November 2016 at 02:22:35 UTC, Steven Schveighoffer wrote: Imagine a resource wrapper like so: class Foo { int *mem; this() { mem = cast(int *)malloc(int.sizeof); } ~this() { .free(mem); } } Now, you have a problem if you do something like this: class Bar { Foo foo;

Re: how to debug memory errors

2016-11-08 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 8 November 2016 at 11:53:37 UTC, Era Scarecrow wrote: On Tuesday, 8 November 2016 at 11:26:55 UTC, bachmeier wrote: Is there a valid use case for something like this? Why would you want to do anything inside ~this with GC memory? If we assume it's a C++

Re: From Python to Dlang

2016-10-18 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 18 October 2016 at 12:03:54 UTC, Alfred Newman wrote: Hello and greetings, I'm a brand new D developer coming from Python. I decided to move to D, mainly because it's a compiled language and has a great runtime speed (and I don't feel confortable at Cython environment at all).

Re: Neural Networks / ML Libraries for D

2016-10-25 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 25 October 2016 at 13:58:33 UTC, Saurabh Das wrote: Oh that sounds pretty cool. While I probably won't use it right now, embedding R inside D would be a good learning opportunity. Is it available on code.dlang.org or on GitHub? Thanks Saurabh Installation amounts to

Re: Neural Networks / ML Libraries for D

2016-10-25 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 25 October 2016 at 11:17:29 UTC, Saurabh Das wrote: Hello, Are there any good ML libraries for D? In particular, looking for a neural network library currently. Any leads would be appreciated. Thanks, Saurabh I have written a project to embed R inside D and vice versa for my

Re: SQLite

2016-10-19 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 19 October 2016 at 16:01:37 UTC, Alfred Newman wrote: Hello, I am trying to handle a SQLite3 table with D. During my researchs, I discovered the lib https://dlang.org/phobos/etc_c_sqlite3.html. [...] I've never used SQLite from D, but Adam Ruppe has an interface with an

Re: strange -fPIC compilation error

2016-11-01 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 17:23:54 UTC, Charles Hixson wrote: On 11/01/2016 12:52 AM, Nordlöw via Digitalmars-d-learn wrote: On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote: but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default

Re: [Semi-OT] I don't want to leave this language!

2016-12-07 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 7 December 2016 at 16:15:32 UTC, Chris wrote: I don't understand this discussion at all. Why not have both? I don't need bare metal stuff at the moment but I might one day, and I perfectly understand that people may need it. At the same time, there are people who are happy with

arsd.cgi - maximum length of form post

2016-12-12 Thread bachmeier via Digitalmars-d-learn
I'm using arsd.cgi, and have a form set up to take input. I get a range violation error core.exception.RangeError@test.d(109): Range violation when using the embedded server. It appears to be because the input is too large (about 3900 characters). When I cut the input to 3000 characters, there

Re: arsd.cgi - maximum length of form post

2016-12-13 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 13 December 2016 at 00:54:43 UTC, Adam D. Ruppe wrote: On Tuesday, 13 December 2016 at 00:48:44 UTC, bachmeier wrote: a range violation error core.exception.RangeError@test.d(109): Range violation What's that line of your code too? Here is a minimal program that can replicate

Re: arsd.cgi - maximum length of form post

2016-12-15 Thread bachmeier via Digitalmars-d-learn
On Thursday, 15 December 2016 at 16:52:54 UTC, Adam D. Ruppe wrote: On Tuesday, 13 December 2016 at 22:55:55 UTC, bachmeier wrote: Here is a minimal program that can replicate the problem. Compiled and run with OK, try the new git cgi.d version, looks like my popFront was buggy and some data

  1   2   3   >