Strange to me that this compiles, since I would expect there to
be some C-like limitation on the position of the unspecified
dimension. Is allowing this somehow useful?
int[1][][1] ub;
writeln("ub",ub);
I'm trying to write a function that will adjust the parameters of
a function pointer.
In the code below, my goal is to call the function qux with a
variety of different function pointers (in the actual
application, I don't have the ability to modify qux). I created a
function foo that I thoug
On Friday, 19 February 2016 at 04:21:43 UTC, Zekereth wrote:
On Friday, 19 February 2016 at 04:16:23 UTC, Adam D. Ruppe
wrote:
On Friday, 19 February 2016 at 04:08:02 UTC, Zekereth wrote:
How is seconds able to be read at compile time but unitType
cannot?
"seconds" is a literal value that the
On Friday, 19 February 2016 at 04:16:23 UTC, Adam D. Ruppe wrote:
On Friday, 19 February 2016 at 04:08:02 UTC, Zekereth wrote:
How is seconds able to be read at compile time but unitType
cannot?
"seconds" is a literal value that the compiler knows about.
unitType is a variable that might chan
On Friday, 19 February 2016 at 04:08:02 UTC, Zekereth wrote:
How is seconds able to be read at compile time but unitType
cannot?
"seconds" is a literal value that the compiler knows about.
unitType is a variable that might change between its declaration
and use (it doesn't here, but the compi
I'm confused by the following:
import std.stdio;
import std.datetime;
void main()
{
string unitType = "seconds";
auto seconds = 1;
// auto myDur = dur!(unitType)(seconds); // Error unitType can't
be read at compile time.
auto myDur = dur!("seconds")(seconds); // Compile
On Thu, Feb 18, 2016 at 05:18:33PM -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 02/18/2016 12:12 PM, Ali Çehreli wrote:
>
> > > Hmm, why does the destructor of object 60 run in the middle of
> > > nowhere?
> >
> > It so happens that the GC decides to collect when moving the array
> >
On 02/18/2016 12:12 PM, Ali Çehreli wrote:
> > Hmm, why does the destructor of object 60 run in the middle of
nowhere?
>
> It so happens that the GC decides to collect when moving the array to a
> new location at that point. If you add the following to the beginning of
> main, you will see tha
On Thursday, 18 February 2016 at 16:33:51 UTC, John Colvin wrote:
On Thursday, 18 February 2016 at 07:52:11 UTC, Joel wrote:
On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo
dub' to run it. I've tried to fix the problem, bu
On 02/18/2016 05:04 AM, Seb wrote:
> However on the other side we learn the stack syntax with return at
> university
You must have seen it in the context of reference types, no? There is no
problem in languages that don't have value types. The problem is with
the final copying of the value to
On 02/17/2016 07:00 PM, ZombineDev wrote:
> 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
On 2016-02-18 10:55, Edwin van Leeuwen wrote:
sudo cp dub /usr/bin/
It should say in /usr/local/bin. Because users don't have write access
to /usr/bin on OS X 10.11, even with sudo.
--
/Jacob Carlborg
On Thursday, 18 February 2016 at 02:24:20 UTC, ZombineDev wrote:
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 po
On Thursday, 18 February 2016 at 07:52:11 UTC, Joel wrote:
On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo
dub' to run it. I've tried to fix the problem, but where do
you put it (also I tried one place, but couldn't put it
On Thursday, 18 February 2016 at 13:04:09 UTC, Seb wrote:
Anyways I will try my best to submit a PR and we can continue
to discuss pros/cons there - imho it's an excellent learning
task :)
Update: Yeah I submitted my first PR to phobos:
https://github.com/D-Programming-Language/phobos/pull/40
On Wednesday, 17 February 2016 at 11:30:40 UTC, Jonathan M Davis
wrote:
Feel free to create a pull request to add next. I don't know if
it would be accepted or not. I suspect that it mainly comes
down to whether such a simple function would be deemed worth
adding. On some level, it is a usabili
On Thursday, 18 February 2016 at 07:21:05 UTC, Chris Katko wrote:
Hello. I'm almost brand-new to the D language and still
absorbing things.
I'm wondering if it's possible to fire off a compile-time (or
worst case, a run-time) warning or error if a function is
called, but the return value is n
On Thursday, 18 February 2016 at 07:21:05 UTC, Chris Katko wrote:
Hello. I'm almost brand-new to the D language and still
absorbing things.
I'm wondering if it's possible to fire off a compile-time (or
worst case, a run-time) warning or error if a function is
called, but the return value is n
On Thursday, February 18, 2016 07:21:05 Chris Katko via Digitalmars-d-learn
wrote:
> Hello. I'm almost brand-new to the D language and still absorbing
> things.
>
> I'm wondering if it's possible to fire off a compile-time (or
> worst case, a run-time) warning or error if a function is called,
> b
On Thursday, 18 February 2016 at 09:25:00 UTC, Joel wrote:
On Thursday, 18 February 2016 at 08:24:34 UTC, Jacob Carlborg
wrote:
On 2016-02-18 08:11, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo
dub' to
run it. I've tried to fix the problem, but where do you put
it
On Thursday, 18 February 2016 at 08:24:34 UTC, Jacob Carlborg
wrote:
On 2016-02-18 08:11, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo
dub' to
run it. I've tried to fix the problem, but where do you put it
(also I
tried one place, but couldn't put it in that folder
On 2016-02-18 08:11, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo dub' to
run it. I've tried to fix the problem, but where do you put it (also I
tried one place, but couldn't put it in that folder)?
You usually have read access to most paths. That means you should b
On Thursday, 18 February 2016 at 07:52:11 UTC, Joel wrote:
On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote:
I had dub installed in a folder that meant I had to put 'sudo
dub' to run it. I've tried to fix the problem, but where do
you put it (also I tried one place, but couldn't put it
23 matches
Mail list logo