On Monday, 7 September 2015 at 19:30:44 UTC, drug wrote:
07.09.2015 21:37, Benjamin Thaut пишет:
snip
So far I haven't found a situation where I couldn't make it
work the way
I wanted. Its just some work to write the D headers for the
C++ classes
and vise versa, because you have to
On Tuesday, 8 September 2015 at 05:50:30 UTC, Russel Winder wrote:
void main() {
immutable imax = 10;
immutable jmax = 10;
float[imax][jmax] x;
foreach(int j; 1..jmax){
foreach(int i, ref item; parallel(x[j-1])){
x[j][i] = complicatedFunction(i,
On Friday, 4 September 2015 at 03:31:40 UTC, Adam D. Ruppe wrote:
On Friday, 4 September 2015 at 02:17:57 UTC, Joel wrote:
In Mac OS, when typing with readln etc. I can't use the cursor
keys. Works in Windows though.
That's normal, line editing on Unix terminals is a kinda
advanced library
On Tuesday, 8 September 2015 at 04:04:16 UTC, Sebastiaan Koppe
wrote:
Fixed it by changing into:
```
import std.conv : text;
string json =
File("../languages.json","r").byLineCopy().joiner.text;
auto ls = json.parseJSON();
```
Why would you read file by line and then merge
On 09/08/2015 12:00 AM, drug wrote:
import std.array : array;
import std.range : iota;
pragma(msg, typeof(iota(1f, 100f).array)); // why double[] not float[]?
void main()
{
}
It is probably because the type of floating point literals like 1.0 is
double. Probably there is a 1.0 in iota's
import std.array : array;
import std.range : iota;
pragma(msg, typeof(iota(1f, 100f).array)); // why double[] not float[]?
void main()
{
}
From what I can gather the output of `std.algorithm.iteration :
filter` is a `FilterResult` type.
I need a bit of help dealing with this type:
1. Why this type is there in the first place instead of simply
using the type of input range?
2. Where is the documentation for this type? The
On Tuesday, 8 September 2015 at 09:48:35 UTC, Bahman Movaqar
wrote:
From what I can gather the output of `std.algorithm.iteration :
filter` is a `FilterResult` type.
I need a bit of help dealing with this type:
1. Why this type is there in the first place instead of
simply using the type of
On Tuesday, 8 September 2015 at 11:08:59 UTC, Bahman Movaqar
wrote:
On Tuesday, 8 September 2015 at 10:08:03 UTC, cym13 wrote:
Filter is a template and returns a FilterResult range which is
used to lazily compute the result. This behaviour is the same
for map and the majority of functions in
On 08.09.2015 11:45, Benjamin Thaut wrote:
On Monday, 7 September 2015 at 19:30:44 UTC, drug wrote:
07.09.2015 21:37, Benjamin Thaut пишет:
snip
So far I haven't found a situation where I couldn't make it work the way
I wanted. Its just some work to write the D headers for the C++ classes
On Tuesday, 8 September 2015 at 10:08:03 UTC, cym13 wrote:
Filter is a template and returns a FilterResult range which is
used to lazily compute the result. This behaviour is the same
for map and the majority of functions in std.algorithm.
Ah...now it makes sense why use a proxy to the
On Tuesday, 8 September 2015 at 07:17:01 UTC, Ali Çehreli wrote:
https://github.com/D-Programming-Language/phobos/blob/master/std/range/package.d#L4630
auto iota(B, E)(B begin, E end)
if (isFloatingPoint!(CommonType!(B, E)))
{
return iota(begin, end, 1.0);
}
Such kind of stuff would
On Tuesday, September 08, 2015 07:12:50 FreeSlave via Digitalmars-d-learn wrote:
> On Tuesday, 8 September 2015 at 04:04:16 UTC, Sebastiaan Koppe
> wrote:
> > Fixed it by changing into:
> >
> > ```
> > import std.conv : text;
> > string json =
> >
On 9/8/15 2:54 PM, Prudence wrote:
I can't seem to receive certain messages, my code is very simple and it
all works except for receiving:
in one thread I do
locate("MyMonitor").send(cast(shared)pt);
You are casting to shared here.
which sends the message(pt is a windows POINT
On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote:
You have Object.factory for this. You can also use a custom
factory based on string comparison. (with some: static
if(condition) return new This; else static if(otherCondition)
return new That; etc).
I just had a look at
I made a mistake it's more like:
//Sample class
class CClass
{
this(string MyValue){...}
}
//Called function
void MyFunction(CClass MyClass){}
void main()
{
MyFunction("Hello World!"); //Failed : MyFunction not
callable...
}
On Tuesday, 8 September 2015 at 19:23:47 UTC, Pierre wrote:
Hi everybody,
I would like to use implicit conversion like this:
//Sample class
class MyClass
{
this(string MyValue){...}
}
//Called function
void MyFunction(Foo MyFoo){}
void main()
{
MyFunction("Hello World!"); //Failed :
OK that's very clear thank you for the answer.
On Tuesday, September 08, 2015 11:08:57 Bahman Movaqar via Digitalmars-d-learn
wrote:
> However, I have made this a strict practice of mine to specify
> the full signature of my public API.
If your API returns ranges, that's general not only bad practice but
arguably impossible. Most range-based
I can't seem to receive certain messages, my code is very simple
and it all works except for receiving:
in one thread I do
locate("MyMonitor").send(cast(shared)pt);
which sends the message(pt is a windows POINT structure).
In the MyMonitor spawned thread, I have
while
On Tuesday, 8 September 2015 at 11:08:59 UTC, Bahman Movaqar
wrote:
However, I have made this a strict practice of mine to specify
the full signature of my public API. I suppose, if I want to
be pedantic, I have to realise the lazy value first and pass
the resulting array out. Is this
Hi everybody,
I would like to use implicit conversion like this:
//Sample class
class MyClass
{
this(string MyValue){...}
}
//Called function
void MyFunction(Foo MyFoo){}
void main()
{
MyFunction("Hello World!"); //Failed : MyFunction not
callable...
}
I saw in forum this is OK
On Monday, 7 September 2015 at 07:57:07 UTC, Kagamin wrote:
On Sunday, 6 September 2015 at 15:15:03 UTC, chris stevens
wrote:
I guess you're right it wouldn't be too difficult to do it all
using strings. The code generation I'd done before in c# I'd
used some 3rd person library where you build
On Tuesday, 8 September 2015 at 19:30:16 UTC, chris stevens wrote:
On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote:
You have Object.factory for this. You can also use a custom
factory based on string comparison. (with some: static
if(condition) return new This; else static
On Tuesday, 8 September 2015 at 19:30:16 UTC, chris stevens wrote:
On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote:
You have Object.factory for this. You can also use a custom
factory based on string comparison. (with some: static
if(condition) return new This; else static
On Tuesday, 8 September 2015 at 12:56:00 UTC, Laeeth Isharc wrote:
How does it work when external APIs expect objects from the C++
standard library? strings, and so on? How about funny pointer
types? shared_ptr etc? std::vector, std::list?
No, in current state nothing smart is supported.
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
On Tuesday, 8 September 2015 at 12:28:07 UTC, Dominikus Dittes
Scherkl wrote:
On Tuesday, 8 September 2015 at 07:17:01 UTC, Ali Çehreli wrote:
https://github.com/D-Programming-Language/phobos/blob/master/std/range/package.d#L4630
auto iota(B, E)(B begin, E end)
if
On 9/8/15 9:20 AM, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim Grøstad wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My web search came up with
On 9/8/15 3:17 AM, Ali Çehreli wrote:
On 09/08/2015 12:00 AM, drug wrote:
import std.array : array;
import std.range : iota;
pragma(msg, typeof(iota(1f, 100f).array)); // why double[] not float[]?
void main()
{
}
It is probably because the type of floating point literals like 1.0 is
double.
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim Grøstad
wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My web search came up with
On Monday, 7 September 2015 at 18:37:49 UTC, Benjamin Thaut wrote:
On Friday, 4 September 2015 at 16:19:49 UTC, Laeeth Isharc
wrote:
Hi Benjamin
Would you be able to give a little more colour on what the
limits are of interoperability for C++ with DMD master or
release ? As I understand it
On Tuesday, 8 September 2015 at 13:02:35 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 06:24:12 UTC, Joel wrote:
arsd/terminal.d(1268): Error: undefined identifier 'SIGWINCH'
There's a missing value in the signal header for OSX !
Could you run this little C program for me on
On Sunday, 6 September 2015 at 10:12:58 UTC, ParticlePeter wrote:
In the end all that I want is "just" to disable access to
array.length through vector and alias this array.
struct Vec(T, size_t n = 3)
{
T[n] data;
alias data this;
@disable @property size_t length() const;
}
On Monday, 7 September 2015 at 15:48:56 UTC, BBasile wrote:
On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis
For example you can retieve the flags:
archive/readonly/hidden/system/indexable(?) and even if it
looks writable or readable, the file won't be open at all
because the ACL
I have
hook = SetWindowsHookEx(WH_MOUSE, , NULL, ThreadID);
Proc is the standard hook proc:
public extern (Windows) LRESULT Proc(int code, WPARAM wParam,
LPARAM lParam)
I get a type mismatch because Proc is a delegate and
SetWindowsHookEx expects a function. Making proc static works but
On Tuesday, 8 September 2015 at 13:20:20 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim
Grøstad wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My
On Wed, Sep 09, 2015 at 12:05:52AM +, Joel via Digitalmars-d-learn wrote:
> Now I get the error:
What is your code calling the function? The prompt might
just be too long.
On Wednesday, 9 September 2015 at 00:44:57 UTC, via
Digitalmars-d-learn wrote:
On Wed, Sep 09, 2015 at 12:05:52AM +, Joel via
Digitalmars-d-learn wrote:
Now I get the error:
What is your code calling the function? The prompt might just
be too long.
import terminal;
void main() {
On Tuesday, 8 September 2015 at 07:12:52 UTC, FreeSlave wrote:
On Tuesday, 8 September 2015 at 04:04:16 UTC, Sebastiaan Koppe
wrote:
Fixed it by changing into:
```
import std.conv : text;
string json =
File("../languages.json","r").byLineCopy().joiner.text;
auto ls =
On 09/09/15 12:18 PM, Prudence wrote:
I have
hook = SetWindowsHookEx(WH_MOUSE, , NULL, ThreadID);
Proc is the standard hook proc:
public extern (Windows) LRESULT Proc(int code, WPARAM wParam, LPARAM
lParam)
I get a type mismatch because Proc is a delegate and SetWindowsHookEx
expects a
On Monday, 7 September 2015 at 15:48:56 UTC, BBasile wrote:
On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis
wrote:
[...] which makes treating some of this stuff in a
cross-platform fashion quite difficult.
And even more with ACLs that it could be:
Not to mention, Windows locks
On Tuesday, 8 September 2015 at 06:24:12 UTC, Joel wrote:
arsd/terminal.d(1268): Error: undefined identifier 'SIGWINCH'
There's a missing value in the signal header for OSX !
Could you run this little C program for me on your Mac and let me
know the output?
---
#include
#include
int
On Sat, 05 Sep 2015 12:21:33 +0200, Robert M. Münch wrote:
> My "pieceOfWork" is not the same. So I don't have the case: Do 4 time
> this 1thing. Instead, do 1 time these 4 things.
Ah, so you want to receive one each of various types? Something like
this might work (untested):
//
On Tuesday, 8 September 2015 at 17:22:44 UTC, NX wrote:
I have figure out
typo:
...I had to figure out...
On Monday, 7 September 2015 at 19:06:48 UTC, Prudence wrote:
It's called encapsulation.
Do you have any idea how much I struggled when I try to use enums
in OpenTK library because they were "encapsulated" ?
Whenever I read OpenGL tutorials I have figure out which
enum-name they used as
On Tuesday, 8 September 2015 at 11:08:59 UTC, Bahman Movaqar
wrote:
However, I have made this a strict practice of mine to specify
the full signature of my public API. I suppose, if I want to
be pedantic, I have to realise the lazy value first and pass
the resulting array out. Is this
47 matches
Mail list logo