Re: How to initialize a associative array?

2016-12-24 Thread Carl Vogel via Digitalmars-d-learn
On Saturday, 24 December 2016 at 11:21:11 UTC, Stefan Koch wrote: You cannot initialize an AA at compile-time. Because AA's are provided by druntime and the ABI is not stable. This bit me when I was first starting out as well. I feel like there's really very little documentation on this, and

Re: Our docs should be more beautiful

2016-07-18 Thread Carl Vogel via Digitalmars-d
On Monday, 18 July 2016 at 15:56:29 UTC, Andrei Alexandrescu wrote: I was proofreading http://dtest.thecybershadow.net/artifact/website-f26d7179b8449e89e1961391fde9f221813c707c-04d0496c2d8cecedc4d75c919646d564/web/phobos-prerelease/std_experimental_checkedint.html and there are a few ways in

Re: Using information from the dlang sit

2016-07-08 Thread Carl Vogel via Digitalmars-d
On Friday, 8 July 2016 at 07:32:30 UTC, celavek wrote: On Thursday, 7 July 2016 at 14:14:01 UTC, Seb wrote: Your project (an open source platform for programming exercises) looks very nice. I don't see any problem in using information from dlang.org - especially for teaching D to newcomers.

Re: Vision document for H2 2016

2016-07-08 Thread Carl Vogel via Digitalmars-d-announce
On Thursday, 7 July 2016 at 19:56:29 UTC, Andrei Alexandrescu wrote: On 07/07/2016 03:55 PM, Andrei Alexandrescu wrote: https://wiki.dlang.org/Vision/2016H2 -- Andrei Please provide feedback. We'll make a couple more passes before this is complete. Thanks! -- Andrei This list is full of

Re: Accessing types by context

2016-06-28 Thread Carl Vogel via Digitalmars-d
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker wrote: Suppose one has void test(myEnum e) enum myEnum { A,B,C } [...] Doesn't the with statement solve your problem here? with (myEnum) { test(A); test(B); test(C); }

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 19:24:49 UTC, Seb wrote: Let me start with the good news: since the DLang Tour was launched by André last month, we had about 3K unique visitors and continuously have between 100-200 visitors per day. However here are the bad news: We loose about 40% of all

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 20:25:17 UTC, Carl Vogel wrote: The main one is no visible TOC. The only way to move around the tour is to go forward or backward one by one---making it hard to skip around, or understand what topics are coming up. A div on the side with all the section links

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 19:24:49 UTC, Seb wrote: Let me start with the good news: since the DLang Tour was launched by André last month, we had about 3K unique visitors and continuously have between 100-200 visitors per day. However here are the bad news: We loose about 40% of all

Re: Constraining template with function signature

2016-06-12 Thread Carl Vogel via Digitalmars-d-learn
On Thursday, 9 June 2016 at 19:08:52 UTC, cy wrote: But it's probably clearer to use that is(typeof({ how this function will be called })) trick. A very delayed thanks to both of you. It does seem like it would be useful to have something like a hasSignature!(Fun, Ret, Args...) defined in

Constraining template with function signature

2016-06-07 Thread Carl Vogel via Digitalmars-d-learn
Hi, What's the best way, when using a Callable as a template parameter, to constrain it by signature? For example, if you have a function that sorts an array like so: T[] sortArray(alias less, T)(T[] arr) { ... } Then you know that you'd want `less` to have signature (T, T) -> bool. Now,

Re: Andrei's list of barriers to D adoption

2016-06-06 Thread Carl Vogel via Digitalmars-d
On Monday, 6 June 2016 at 20:28:47 UTC, poliklosio wrote: On Monday, 6 June 2016 at 15:06:49 UTC, Carl Vogel wrote: (...) Also, the idea that more people will adopt D if you just "get rid of the GC" ignores the fact that you don't just "get rid of the GC," you replace it with another memory

Re: Andrei's list of barriers to D adoption

2016-06-06 Thread Carl Vogel via Digitalmars-d
On Monday, 6 June 2016 at 09:16:45 UTC, Walter Bright wrote: On 6/6/2016 1:15 AM, Russel Winder via Digitalmars-d wrote: * Safety has holes and bugs. Then so does C, C++ and Rust, so this is just a comment made because it can be made and sounds bad. Bad enough to salve the conscience of the

Re: [OT] Things I like about Andrei

2016-06-03 Thread Carl Vogel via Digitalmars-d
On Friday, 3 June 2016 at 02:17:51 UTC, Adam D. Ruppe wrote: A lot of us, myself included, have been very critical of Andrei lately but I want to list of the excellent work he has done over the years: First, early D was very different to D of today. Andrei changed that, for the better. He's

Runtime.loadLibrary linker errors

2016-05-26 Thread Carl Vogel via Digitalmars-d-learn
Hi, Whenever I try to compile code that relies on Runtime.loadLibrary, I get a linker error during compilation. ``` Undefined symbols for architecture x86_64: "_rt_loadLibrary", referenced from: _D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv in ll_test.o ld:

Re: Does D supports REPL

2016-05-25 Thread Carl Vogel via Digitalmars-d
On Wednesday, 25 May 2016 at 19:38:42 UTC, jmh530 wrote: On Wednesday, 25 May 2016 at 00:55:52 UTC, Carl wrote: It's worth noting that some of those Jupyter kernels are pretty quirky/limited. For example in the C kernel, every cell is an isolated program with a main function. Which is not

Re: Does D supports REPL

2016-05-25 Thread Carl Vogel via Digitalmars-d
On Wednesday, 25 May 2016 at 00:12:24 UTC, Seb wrote: On Tuesday, 24 May 2016 at 23:26:27 UTC, jmh530 wrote: On Tuesday, 24 May 2016 at 20:44:57 UTC, Seb wrote: Maybe we just need to move it to the dlang github namespace, s.t. it gets properly maintained and maybe even released with dmd/dub?

Re: matrix library

2016-05-23 Thread Carl Vogel via Digitalmars-d-announce
On Monday, 23 May 2016 at 07:28:20 UTC, Vlad Levenfeld wrote: https://github.com/evenex/linalg I've some heard people (including me) asking about matrix libraries for D, and while there is gl3n it only goes to 4x4 matrices and was written before all the multidimensional indexing stuff. So

D performance in Julia microbenchmarks

2016-05-18 Thread Carl Vogel via Digitalmars-d
Hi -- first-time poster, long-time lurker... On its homepage, the Julia langauge (http://julialang.org) advertises some microbenchmark results to show how competitive it is with C, along with a number of other languages (go, python, JS, R, etc.). These should of course be taken with a big