On Friday, 13 January 2017 at 06:32:02 UTC, aberba wrote:
Unlike array1 + array2, how can i merge arrays such that:
[a1, a1, a2, a1, a1, a2, a1] //uniform order
where a1 = child of array1,
a2 = child of array2
using a built-in function/algorithm (is/are there anything(s)
in Phobos for this?).
On Tuesday, 3 January 2017 at 11:51:56 UTC, Alexandru Ermicioi
wrote:
Hi all.
How it is possible to show readme.md from github repository in
code.dlang.org for a particular project?
Thanks.
Yes, code.dlang.org will display the readme file of the package
if and only if it is named "README.m
On Monday, 21 November 2016 at 12:08:30 UTC, Patric Dexheimer
wrote:
On Saturday, 19 November 2016 at 00:47:00 UTC, ketmar wrote:
On Saturday, 19 November 2016 at 00:28:36 UTC, Stefan Koch
wrote:
Please don't post non-d.
it slipped accidentally, sorry. ;-)
for OP: `uint[2] a = [42, 69];` is t
On Thursday, 20 October 2016 at 12:38:40 UTC, Nordlöw wrote:
On Wednesday, 19 October 2016 at 19:39:46 UTC, Nordlöw wrote:
On Wednesday, 19 October 2016 at 19:01:50 UTC, Meta wrote:
https://goo.gl/t9m3YK
I'm actually pretty impressed that this kind of code can be
written in D.
Thanks! Add a
On Thursday, 20 October 2016 at 16:25:53 UTC, Meta wrote:
On Thursday, 20 October 2016 at 13:05:05 UTC, Nordlöw wrote:
On Thursday, 20 October 2016 at 12:38:40 UTC, Nordlöw wrote:
ElementType!R[n] arrayN(size_t n, R)(R r)
{
assert(r.length == n);
typeof(return) dst;
import std.algor
On Sunday, 25 September 2016 at 04:54:31 UTC, grampus wrote:
Dear all
For example, I have a struct
struct point{int x;int y}
point a;
Is there an easy way to access x and y by using a["x"] and
a["y"]
I guess I need to overload [], but can't figure out how.
Someone can help? Thank you very m
On Thursday, 22 September 2016 at 12:38:57 UTC, Nordlöw wrote:
Is ndslice' Slice() prepared for integration with containers
with reference counting semantics?
I wonder because according to the docs they internally store a
pointer and an offset. What is that pointer supposed to point
to except
On Sunday, 4 September 2016 at 09:55:53 UTC, data pulverizer
wrote:
I am trying to build a data table object with unrestricted
column types. The approach I am taking is to build a generic
interface BaseVector class and then a subtype GenericVector(T)
which inherits from the BaseVector. I then t
On Thursday, 25 August 2016 at 21:01:29 UTC, Antonio Corbi wrote:
On Thursday, 25 August 2016 at 14:30:00 UTC, Meta wrote:
On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi
wrote:
Hello,
Trying to compile this example from Chuck Allison:
---
imp
On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
Does D have any such thing? I'm having to recreate the wheel
here and it isn't fun ;/ Getting in the way of real work ;/
Surely you would think that with the power D has such things
would exist by now?
Here's two popular libraries
On Saturday, 6 August 2016 at 17:18:51 UTC, Andre Pany wrote:
Hi,
I play around with the new windows 10 feature to run a linux
sub system on windows.
-> Installing dmd is working fine with the command
curl -fsS https://dlang.org/install.sh | bash -s dmd
-> Activating dmd is also working
source
On Thursday, 28 July 2016 at 21:49:00 UTC, pineapple wrote:
On Thursday, 28 July 2016 at 20:28:39 UTC, jdfgjdf wrote:
"Parameters!dgref.init" does not yield a reference. The real
error is not displayed. In a normal context it would be "stuff
is not callable with"
What would be a better wa
On Tuesday, 19 July 2016 at 20:19:53 UTC, WhatMeWorry wrote:
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote:
I don't suppose there's a way to "see" source code generated
by templates after a compile but before execution? Or does
the compiler generate it to a lower level on the f
On Friday, 8 July 2016 at 06:17:43 UTC, Nicholas Wilson wrote:
On Friday, 8 July 2016 at 05:53:21 UTC, Nicholas Wilson wrote:
So as part of my effort to get D running on GPUs I need to
make a "second class" pointer type that I can alter in the
backend of LDC to the correct address space. to tha
On Monday, 4 July 2016 at 14:31:41 UTC, Johannes Loher wrote:
In a project I am currently working on, I have lot's of code of
the following form:
static immutable ubyte[4] sigma0 = [101, 120, 112, 97]; static
immutable ubyte[4] sigma1 = [110, 100, 32, 51]; static
immutable ubyte[4] sigma2
On Sunday, 3 July 2016 at 22:00:39 UTC, MMJones wrote:
I like the term var better than auto. Is there a way to alias
auto?
If you really want to have Javascript-like semantics in D, you
try this:
https://github.com/adamdruppe/arsd/blob/master/jsvar.d
On Sunday, 12 June 2016 at 14:49:18 UTC, Gary Willoughby wrote:
On Sunday, 12 June 2016 at 14:45:12 UTC, ketmar wrote:
ahem... wut?! we have one copy of our struct freed half the
way, and another copy has refcount of 2, so it won't be freed
at all. it doesn't so innocent as it looks: we may try
On Saturday, 28 May 2016 at 08:10:50 UTC, Era Scarecrow wrote:
On Friday, 27 May 2016 at 09:22:49 UTC, Guillaume Piolat wrote:
You have to write your code three times, one for
version(D_InlineAsm_X86)
version (D_InlineAsm_X86_64)
and a version without assembly.
Rather than make a new thread
On Tuesday, 24 May 2016 at 18:42:41 UTC, Gary Willoughby wrote:
I have a T* pointer to the start of a malloc'd chunk of memory,
the type T and the number of T's stored in the chunk.
Is there an efficient way of converting this information to a D
array of type T[] or even T[n]?
BTW, the simpl
On Tuesday, 24 May 2016 at 15:27:45 UTC, llaine wrote:
Hi everybody,
As written in the description I'm really new to D, I discovered
it a few weeks ago thanks to the D Conf in Berlin.
After playing around for couple of days with it, I wanted to
share my journey with you guys on several point
On Tuesday, 10 May 2016 at 10:21:30 UTC, ZombineDev wrote:
On Monday, 9 May 2016 at 18:50:32 UTC, Jay Norwood wrote:
I noticed some discussion of Cartesian indexes in Julia, where
the index is a tuple, along with some discussion of optimizing
the index created for cache efficiency. I could fin
On Tuesday, 10 May 2016 at 13:52:27 UTC, ag0aep6g wrote:
Am 10.05.2016 um 12:21 schrieb ZombineDev:
auto indexed_range = lockstep(
Tiny nitpick: lockstep doesn't return a range. It uses opApply
to support foreach.
Yes I know and I chose it in purpose, because it allows ref
access to indivi
On Monday, 9 May 2016 at 18:50:32 UTC, Jay Norwood wrote:
I noticed some discussion of Cartesian indexes in Julia, where
the index is a tuple, along with some discussion of optimizing
the index created for cache efficiency. I could find
foreach(ref val, m.byElement()), but didn't find an examp
On Tuesday, 10 May 2016 at 09:58:38 UTC, ZombineDev wrote:
On Monday, 9 May 2016 at 09:14:31 UTC, chmike wrote:
[...]
Have you looked at http://vibed.org? It is the most successful
D library for async IO and it has several backends (some C and
some D). It also provides a high-level web frame
On Monday, 9 May 2016 at 09:14:31 UTC, chmike wrote:
It seam that the scope of the event loop we are talking should
be clarified to avoid confusions.
There is the GUI event loop which is generally single threaded
for efficient access to the data structure representing the GUI
content. Single
On Thursday, 5 May 2016 at 07:49:46 UTC, aki wrote:
Hello,
When I need to call C function, often need to
have char* pointer from string.
"Interfacing to C++" page:
https://dlang.org/spec/cpp_interface.html
have following example.
extern (C) int strcmp(char* string1, char* string2);
import std.
On Tuesday, 19 April 2016 at 20:19:37 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 20:18:07 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaind
On Tuesday, 19 April 2016 at 20:18:07 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is ther
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a
nested structure
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a nested
structure
but something to just add an additional name, maybe something
like
struct a{
struct{
int x;
int y;
On Saturday, 2 April 2016 at 09:28:58 UTC, ZombineDev wrote:
On Wednesday, 23 March 2016 at 19:39:49 UTC, kinke wrote:
On Tuesday, 22 March 2016 at 07:35:49 UTC, ZombineDev wrote:
If the object is larger than the size of a register on the
target machine, it is implicitly passed by ref
That's
On Wednesday, 23 March 2016 at 19:39:49 UTC, kinke wrote:
On Tuesday, 22 March 2016 at 07:35:49 UTC, ZombineDev wrote:
If the object is larger than the size of a register on the
target machine, it is implicitly passed by ref
That's incorrect. As Johan pointed out, this is somewhat true
for th
On Friday, 1 April 2016 at 00:34:49 UTC, learner wrote:
Hi,
I have the following code in C++.
rectangles.erase(rectangles.begin() + index);
where rectangles is:
std::vector rectangles;
how can I do something similar in D.
Learner.
Also, if you are using std.container.array (which similar t
On Friday, 1 April 2016 at 01:21:32 UTC, Walter Bright wrote:
On 3/16/2016 4:18 AM, Johan Engelen wrote:
I've found discussions, but not an actual "recommended"
solution for the
problem of "statement is not reachable" warnings in templates
with early
returns, e.g.:
```
bool nobool(T...)() {
On Saturday, 26 March 2016 at 17:43:48 UTC, maik klein wrote:
On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote:
On 26.03.2016 18:04, ag0aep6g wrote:
https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions
PS: Those enforces are for a size of 100_000 not 1_000_000,
because I
On Thursday, 24 March 2016 at 11:18:06 UTC, Nordlöw wrote:
Could somebody briefly outline how the thread-locality
(non-GC-locked) of allocators relates to the purity of the
containers using them?
This because I want to move forward with optimizations in my
knowledge graph that requires GC-fr
On Thursday, 24 March 2016 at 11:18:06 UTC, Nordlöw wrote:
Could somebody briefly outline how the thread-locality
(non-GC-locked) of allocators relates to the purity of the
containers using them?
This because I want to move forward with optimizations in my
knowledge graph that requires GC-fr
On Monday, 21 March 2016 at 23:31:06 UTC, ref2401 wrote:
I have got a plenty of structs in my project. Their size varies
from 12 bytes to 128 bytes.
Is there a rule of thumb that states which structs I pass by
value and which I should pass by reference due to their size?
Thanks.
If the objec
On Monday, 21 March 2016 at 10:46:27 UTC, ag0aep6g wrote:
On 21.03.2016 11:19, ZombineDev wrote:
DFLAGS=-I~/dev/repos/dlang/druntime/import
-I~/dev/repos/dlang/phobos
-L-L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64
[...]
Linking...
...
/usr/bin/ld {other stuff...}
-L/home/
On Monday, 21 March 2016 at 10:29:36 UTC, Nordlöw wrote:
I want to enable unittests only at the top-level of a module
compilation.
If I have a module
top.d
that imports
dep1.d
dep2.d
...
which all contain unittests, how do I compile top.d with only
the unittests for top.d e
I'm manually building dmd, druntime and phobos like so:
$ cd ~/dev/repos/dlang
$ git clone https://github.com/D-Programming-Language/dmd
$ git clone https://github.com/D-Programming-Language/druntime
$ git clone https://github.com/D-Programming-Language/phobos
$ cd dmd && make -f make -f posix.m
On Sunday, 6 March 2016 at 09:54:49 UTC, Dsby wrote:
I want to use the filelogger to my application.
is the sharedLog() global and thread-safe.
Yes, `FileLogger` internally uses `lockingTextWriter`, so it
should be safe to call from multiple threads. Furthermore, the
`sharedLog` property u
On Monday, 29 February 2016 at 12:43:39 UTC, Chris wrote:
What's the best way to make an assoc array fit for
multi-threading? If this is not possible what would be the best
alternative?
Say, for example, `data` is used by a class that is globally
accessible to all threads. E.g. like this:
s
On Sunday, 21 February 2016 at 16:36:22 UTC, ZombineDev wrote:
On Sunday, 21 February 2016 at 16:29:26 UTC, ZombineDev wrote:
...
And if I use the Kahan algorithm:
106 ms
36 ms
31 ms
The second two results are probably larger due to noise.
I did some more testing and clearly the larger times f
On Sunday, 21 February 2016 at 16:29:26 UTC, ZombineDev wrote:
...
And if I use the Kahan algorithm:
106 ms
36 ms
31 ms
The second two results are probably larger due to noise.
I did some more testing and clearly the larger times for N=1000
were just noise:
[LDC Kahan N=1000]
106 ms
36 ms
31
On Sunday, 21 February 2016 at 14:32:15 UTC, dextorious wrote:
I've been vaguely aware of D for many years, but the recent
addition of std.experimental.ndslice finally inspired me to
give it a try, since my main expertise lies in the domain of
scientific computing and I primarily use Python/Jul
On Sunday, 21 February 2016 at 12:52:33 UTC, Nicholas Wilson
wrote:
So I was going through the vulcan spec to try to create a
better D bindings for it. (pointer /len pairs to arrays
adhering to D naming conventions and prettying up the *Create
functions functions like vkResult *Create( arg ,&ar
On Thursday, 18 February 2016 at 01:19:16 UTC, Ali Çehreli wrote:
On 02/17/2016 05:14 PM, ZombineDev wrote:
> The "Invalid memory operation" error is thrown only by the GC
(AFAIK)
> when the user tries something unsupported like allocating or
freeing in
> a destructor, while a GC collection is b
On Thursday, 18 February 2016 at 00:25:09 UTC, Zz wrote:
Hi,
I'm trying to generate the following sequences with ndslice.
0 0 0
1 1 1
1 1 1
0 0 0
0 1 2
0 1 2
2 1 0
2 1 0
It's okay with loops but was checking to see if it's possible
with ndslice.
Zz
Here's my solution:
http://dpaste.dzf
On Wednesday, 17 February 2016 at 22:20:00 UTC, Matt Elkins wrote:
So in a different thread someone mentioned that when arrays are
grown an implicit copy could be called on all the elements, as
they might need to be copied over to a new, larger block of
memory. This makes sense, and is expected
On Wednesday, 17 February 2016 at 16:36:35 UTC, Matt Elkins wrote:
On Wednesday, 17 February 2016 at 07:10:15 UTC, ZombineDev
wrote:
The downside is that it really indicates that I didn't reduce
my buggy program properly. I'll hold out for the
live-object-destructor-call fix to see whether that
On Wednesday, 17 February 2016 at 02:44:04 UTC, Matt Elkins wrote:
On Wednesday, 17 February 2016 at 02:23:52 UTC, Ali Çehreli
wrote:
[...]
Oof. This strikes me as a "gotcha", that this happens even with
@disable this() as opposed to a compiler error. Is this only
for static arrays, or are t
On Saturday, 13 February 2016 at 11:28:40 UTC, tcak wrote:
Maybe I am missing, but I do not see any index file when html
files are generated by ddoc. Is there any way to generate index
file automatically, so, a tree like links will be listed all
created documentation files?
If the problem is
On Saturday, 13 February 2016 at 10:22:36 UTC, Marc Schütz wrote:
On Friday, 12 February 2016 at 21:56:09 UTC, Steven
Schveighoffer wrote:
That's odd. I think anonymous probably has the answer (they
are context pointers), but I'm also surprised they are null,
they shouldn't be.
In this exampl
On Wednesday, 10 February 2016 at 10:31:34 UTC, Voitech wrote:
Hi, why this is not working ?
class Base{
int a;
}
class BaseTemplate(E):Base{
E value;
this(E value){
this.value=value;
}
}
class Concrete:BaseTemplate!int{
this(int value){
On Saturday, 6 February 2016 at 15:14:06 UTC, Kagamin wrote:
On Saturday, 6 February 2016 at 08:07:42 UTC, NX wrote:
What language semantics prevent precise
Lack of resources. Precise GC needs to know which fields are
pointers. Somebody must generate that map. AFAIK there was an
experiment o
On Saturday, 6 February 2016 at 15:02:16 UTC, H. S. Teoh wrote:
On Sat, Feb 06, 2016 at 02:43:52PM +, Tofu Ninja via
Digitalmars-d-learn wrote:
Foreach seems to work if there is an opIndex() with no
arguments that returns a range interface, is this documented?
I can't seem to find anything
On Wednesday, 3 February 2016 at 18:03:24 UTC, ZombineDev wrote:
C++11 allows you to capture a local variable explicitly by
value.
What is the simplest way to make code below print "0 1 .. 9",
like the C++ version does?
D version:
```
import std.stdio;
void main()
{
alias F = void deleg
C++11 allows you to capture a local variable explicitly by value.
What is the simplest way to make code below print "0 1 .. 9",
like the C++ version does?
D version:
```
import std.stdio;
void main()
{
alias F = void delegate();
F[] arr;
foreach (i; 0 .. 10)
On Friday, 29 January 2016 at 12:00:25 UTC, Pavel wrote:
Hello!
Is there any debuging support for Intelij Idea's D plugin?
Thanks!
Currently only XamarinStudio/MonoDevelop and DlangIDE allow
debugging on Linux through GDB.
On Windows VisaulD provides debugging support for Visual Studio.
On Saturday, 30 January 2016 at 05:50:33 UTC, Dsby wrote:
Ok.Thank you.
and i want to know how to know when the GC start runing?
See also http://dlang.org/phobos/core_memory
On Tuesday, 26 January 2016 at 03:03:40 UTC, Igor wrote:
Is there a GC-less array that we can use out of the box or do I
have to create my own?
If you want containers, use:
http://code.dlang.org/packages/emsi_containers
If you just need an array, use:
http://dlang.org/phobos/std_experimental_
On Tuesday, 26 January 2016 at 21:23:28 UTC, Igor wrote:
On Tuesday, 26 January 2016 at 20:17:20 UTC, Steven
Schveighoffer wrote:
On 1/26/16 9:20 AM, Igor wrote:
[...]
Don't do it in the destructor.
I can only imagine that you are triggering the destructor with
destroy? In this case, destro
On Tuesday, 26 January 2016 at 21:23:28 UTC, Igor wrote:
On Tuesday, 26 January 2016 at 20:17:20 UTC, Steven
Schveighoffer wrote:
On 1/26/16 9:20 AM, Igor wrote:
I have successfully malloc'ed an object but when I go to free
it in the
destructor I get an exception. The destructor simply has
~t
On Tuesday, 26 January 2016 at 14:55:53 UTC, Wilson wrote:
Just wondering how to create a dense multidimensional array
with the GC free array container? I don't want to use an array
of arrays but I do want the array[0][0] notation.
I suggest using std.experimental.ndslice [1] for multidimensio
On Thursday, 6 February 2014 at 23:06:03 UTC, QAston wrote:
How do i get aliases to overloads of a template method like
Class A
{
int a(T)(T tq,T tw);
int a(T)(T tq);
}
__traits(getOverloads, A, "a(int)")doesnt work
Bump. I also have a similar problem. I have a module with two
functio
On Tuesday, 5 January 2016 at 18:10:28 UTC, Bauss wrote:
Oh yeah I forgot to notice that by name would be preferred. Not
title, but name.
I have adapted the answer on Stackoverflow [1] for D:
// These Windows headers require DMD >= v2.070
import core.sys.windows.winnt : PROCESS_QUERY_INFORMATI
On Monday, 28 December 2015 at 04:52:44 UTC, FrankLike wrote:
Now I build a project for ARM linux on ubuntu 15.04 ,but build
error.
I download the 'wiringPi' from http://wiringPi.com,convert the
*.h to *.d.then build the 'aa.so' file:
#! /bin/sh
dfiles="max31855.d max5322.d mcp23008.d mcp23016.
On Wednesday, 23 December 2015 at 19:27:31 UTC, earthfront wrote:
On Wednesday, 23 December 2015 at 11:12:22 UTC, ZombineDev
wrote:
Actually array() is from sts.array and correct way to use
selective imports is:
import std.exception : enforce;
import std.array : array;
import std.algorithm.iter
On Wednesday, 23 December 2015 at 10:51:52 UTC, earthfront wrote:
I'm using hackerpilot's excellent textadept plugin + DCD, Dfmt,
and Dscanner.
Upon saving files, it produces suggestions, much like warnings
from the compiler.
One suggestion is to use selective imports in local scopes. OK,
I'l
On Tuesday, 22 December 2015 at 17:49:34 UTC, Jakob Jenkov wrote:
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 a
On Saturday, 12 December 2015 at 12:43:36 UTC, SimonN wrote:
DMD v2.069.2-b1 on Linux.
import std.algorithm;
int a = max(5, 6);// works, a == 6
int b = max!(int, int)(5, 6); // works, manual instantiation
int c = 5.max(6); // works, UFCS call
I would lik
On Friday, 4 December 2015 at 19:15:57 UTC, ZombineDev wrote:
The myproj/dub.json file contains:
{
"name": "myproj",
"description": "A minimal D application.",
"copyright": "Copyright © 2015, ubuntu",
"authors": ["ubuntu"],
"dependencies": {
"derelict-sdl2": "1.9.7"
On Friday, 4 December 2015 at 18:15:47 UTC, Neomex wrote:
How do I add third party libraries to the project? I am using
Xamarin. I have built Derelict-SDL2 with dub and got the lib
file but I don't know what to do with it.
In xamarins references folder theres only option to refresh not
to add
On Thursday, 19 November 2015 at 06:33:06 UTC, Jay Norwood wrote:
On Wednesday, 18 November 2015 at 22:46:01 UTC, jmh530 wrote:
My sense is that any data frame implementation should try to
build on the work that's being done with n-dimensional slices.
I've been watching that development, but I
On Friday, 13 November 2015 at 15:35:11 UTC, Ish wrote:
I was directed here from General list, so be patient with me. I
am looking for syntax for creating a detached-state thread in
the spirit of POSIX thread attribute PTHREAD_CREATE_DETACHED
(the thread resources are released on termination an
On Monday, 9 November 2015 at 05:49:25 UTC, tcak wrote:
I checked for a flag in this page
http://dlang.org/dmd-linux.html , but couldn't have found any
for this purpose.
Is there a way to parse a d source file so it generates a tree
in JSON, XML, or something-that-can-be-processed-easily file
On Thursday, 24 September 2015 at 13:18:58 UTC, David Nadlinger
wrote:
Hi all,
I'm having a look at ORM libraries in D right now. So far, I've
come across hibernated and dvorm.
Are there any other libraries that I should have a look at,
particularly actively maintained ones? dvorm and hibern
On Wednesday, 26 August 2015 at 01:18:43 UTC, ZombineDev wrote:
On Wednesday, 26 August 2015 at 01:09:15 UTC, ZombineDev wrote:
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote:
Although C++ can be ugly, one reason I keep going back to it
rather then commit more time to reference-bas
On Wednesday, 26 August 2015 at 01:09:15 UTC, ZombineDev wrote:
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote:
Although C++ can be ugly, one reason I keep going back to it
rather then commit more time to reference-based languages like
C# is because I like deterministic destruction
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote:
Although C++ can be ugly, one reason I keep going back to it
rather then commit more time to reference-based languages like
C# is because I like deterministic destruction so much. My
question is whether D can REALLY handle this or not
On Sunday, 23 August 2015 at 17:58:44 UTC, Doolan wrote:
...
Ali's book has a very nice chapter about ranges:
http://ddili.org/ders/d.en/ranges.html
On Monday, 20 July 2015 at 03:33:08 UTC, Timothee Cour wrote:
I've attached a reduced use case showing that the solutions
proposed in this thread do not work, and wrote a local
modification to dmd to allow a flag -exclude_cwd_from_imports
that does work. Would that be acceptable to have this in
On Monday, 13 July 2015 at 09:46:26 UTC, Minas Mina wrote:
I have written a script that visits all directories in the
current directory and executes a command. In my case, "git
pull".
When running the script serially, everything is fine. All git
repositories are pulled.
But I'd like to pull
On Friday, 17 July 2015 at 23:15:31 UTC, ZombineDev wrote:
On Friday, 17 July 2015 at 21:20:41 UTC, Tamas wrote:
Is there a solution that results the same static
optimizations, but has no runtime penalty, i.e. the functions
just operates with ints? (At least when compiled)
Did you try looking
On Friday, 17 July 2015 at 21:20:41 UTC, Tamas wrote:
Is there a solution that results the same static optimizations,
but has no runtime penalty, i.e. the functions just operates
with ints? (At least when compiled)
Did you try looking at assembly generated by GDC or LDC with full
optimization
On Friday, 17 July 2015 at 17:56:51 UTC, sigod wrote:
On Friday, 17 July 2015 at 15:41:22 UTC, ZombineDev wrote:
eager approach, since it's more straightforward.
What makes you think it's always more straightforward?
Sometimes (like in this case with MongoDB) you cannot write
eager approach
On Friday, 17 July 2015 at 15:41:22 UTC, ZombineDev wrote:
I'm almost certain that the D database driver returns eagerly
all the results that you've requested. The lazy stuff should
happen when you start doing range operations after the results
are returned from the database. It's not impossibl
On Friday, 17 July 2015 at 09:07:29 UTC, Jarl André Hübenthal
wrote:
Thanks. Its a lot more cleaner and syntactically readable
having .array at the end. But about laziness the same applies
to clojure and scala. In clojure you must force evaluate the
list, in scala you must to mostly the same as
On Thursday, 16 July 2015 at 20:17:54 UTC, Jarl André Hübenthal
wrote:
On Thursday, 16 July 2015 at 20:00:38 UTC, Ali Çehreli wrote:
On 07/16/2015 12:35 PM, "Jarl
=?UTF-8?B?QW5kcsOpIEjDvGJlbnRoYWwi?= "
wrote:
Hi
using mongo with vibe.d is easy. But I would like to skip the
foreach on
MongoC
On Friday, 19 June 2015 at 14:13:46 UTC, Quentin Ladeveze wrote:
[..]
These are interesting and can be useful, but allMembers returns
strings and not functions, so I can't apply ReturnType.
Here's my solution:
http://dpaste.dzfl.pl/c69de3c16d75
On Thursday, 11 June 2015 at 00:32:45 UTC, ZombineDev wrote:
Environment exceptions are stuff like user input and network
and file access. This are problems that you generally want to
... These* are ...
handle and that's why they're considered recoverable.
So 'Exception's propagate through fun
On Thursday, 11 June 2015 at 00:06:24 UTC, Yuxuan Shui wrote:
I want to know exactly what is considered to be 'throw'.
I'm able to use dynamic arrays (which can throw 'Range
violation') and asserts in a nothrow function. Shouldn't those
be considered 'throw'?
In D there are two types of exce
On Wednesday, 10 June 2015 at 20:18:06 UTC, Laeeth Isharc wrote:
On Wednesday, 10 June 2015 at 18:55:27 UTC, Adam D. Ruppe wrote:
I'm still tempted to grab a used Mac so I can port my display
stuff to Cocoa and test it, but Macs are outrageously
expensive and I hate them, so want to spend as li
On Thursday, 28 May 2015 at 15:57:42 UTC, Olivier Prince wrote:
[snip]
There isn't yet a polished alternative to MS VS Windows Store
toolchain, but probably you don't need most of it (e.g. you can
have a C++/XAML app that calls you D code).
I noticed that Vibe.d has some WinRT support. Here's
On Monday, 25 May 2015 at 07:57:49 UTC, ketmar wrote:
i don't know why you want that, but something like this may do:
auto callBaseMethod(string MTN, C, Args...) (inout C self, Args
args) {
alias FSC = BaseClassesTuple!(C)[0];
return mixin(`self.`~FSC.stringof~`.`~MTN~"(args)");
}
writeln
On Sunday, 24 May 2015 at 23:32:52 UTC, ZombineDev wrote:
...
Small correction for clarity:
void main()
{
Derived d = new Derived();
d.x = 13;
d.y = 15;
// 1) writeln(callMethod!(Derived, Derived.toString)(d)); <-
Should print 15
// 2) writeln(callBaseMethod!(Derived, Deri
import std.stdio, std.conv, std.traits;
class Base
{
int x;
override string toString() const
{
return x.to!string;
}
}
class Derived : Base
{
int y;
override string toString() const
{
return y.to!string;
}
}
void callMethod(T, alias Method)(const
On Sunday, 24 May 2015 at 14:46:52 UTC, ZombineDev wrote:
[snip]
Correction: not exactly the same, because isScalar also allows
wchar, dchar and const and immutable versions of those 'scalar'
types.
On Saturday, 23 May 2015 at 04:40:28 UTC, tcak wrote:
[snip]
Yup, you need to use == to match the exact type.
Btw, you can use enum templates from std.traits, to accomplish
the same with less code:
public void setMarker(M)( size_t markerIndex, M markerValue )
if(isScalarType!M)
{
1 - 100 of 101 matches
Mail list logo