On Tue, 16 Jun 2015 11:45:22 +
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Maybe not everyone needs these features. But, unfortunately, I
often use a lot of imported modules. And use every time the word
`import` very bad.
version (none) {
import
On Tue, 16 Jun 2015 13:01:09 +
via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Tuesday, 16 June 2015 at 12:42:16 UTC, C2D wrote:
On Tuesday, 16 June 2015 at 12:31:23 UTC, John Chapman wrote:
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result =
On Tuesday, 16 June 2015 at 13:06:58 UTC, jmh530 wrote:
On Monday, 15 June 2015 at 22:40:31 UTC, Baz wrote:
Right, my bad. This one whould work:
---
float[] test(float[] x) {
auto result = x.dup;
result.each!((ref a) = (a = exp(a)));
return result;
}
---
That works. Thanks.
I
On Tuesday, 16 June 2015 at 12:42:16 UTC, C2D wrote:
On Tuesday, 16 June 2015 at 12:31:23 UTC, John Chapman wrote:
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, cache.ptr);
That should be:
BOOL result = SHGetFolderPath(null, 0x23,
On Monday, 15 June 2015 at 22:40:31 UTC, Baz wrote:
Right, my bad. This one whould work:
---
float[] test(float[] x) {
auto result = x.dup;
result.each!((ref a) = (a = exp(a)));
return result;
}
---
That works. Thanks.
I did some benchmarking and found that map tended to be
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, cache.ptr);
That should be:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, buf.ptr);
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
Hi,
I encountered the following error:
Error: function files.SHGetFolderPath (void* hwndOwner, int
nFolder, void* hToken, uint dwFlags, char* pszPath) is not
callable using argument types (typeof(null), int, typeof(null),
int,
On Tue, 16 Jun 2015 12:26:45 +
C2D via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
Hi,
I encountered the following error:
Error: function files.SHGetFolderPath (void* hwndOwner, int
nFolder, void* hToken, uint dwFlags, char* pszPath) is not
callable using argument
On Tuesday, 16 June 2015 at 12:31:23 UTC, John Chapman wrote:
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, cache.ptr);
That should be:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, buf.ptr);
Thanks, but I'm still getting the
On Tuesday, 16 June 2015 at 13:31:47 UTC, FreeSlave wrote:
Also you may want to take a look at my library [1] where I use
SHGetSpecialFolderPath (I know, it's deprecated, but it still
works, so why not. I don't really need to bother with access
tokens here).
Note that I load shell32
Hi,
I encountered the following error:
Error: function files.SHGetFolderPath (void* hwndOwner, int
nFolder, void* hToken, uint dwFlags, char* pszPath) is not
callable using argument types (typeof(null), int, typeof(null),
int, immutable(char)*)
When I'm try to run this code:
...
{
import
On Tuesday, 16 June 2015 at 13:15:05 UTC, John Colvin wrote:
*consistent as in different implementations performing very
similarly instead of seeing big differences like you have here.
That's a good point. I tried numpy's exp (which uses C at a low
level, I think) and found it takes about
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote:
On Tue, 16 Jun 2015 11:45:22 +
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I just want to import individual features of these modules.
mixin template include(w...)
{
mixin
On Tuesday, 16 June 2015 at 16:57:52 UTC, John Colvin wrote:
On Tuesday, 16 June 2015 at 16:42:31 UTC, CallToDuty wrote:
Is it possible to embed a dll file within dub project? and if
yes, how?
Have you tried just putting it in the root directory of the
project and adding the relevant name to
Is it possible to embed a dll file within dub project? and if
yes, how?
On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote:
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote:
On Tue, 16 Jun 2015 11:45:22 +
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I just want to import individual features of these
On Tuesday, 16 June 2015 at 14:43:17 UTC, jmh530 wrote:
On Tuesday, 16 June 2015 at 13:15:05 UTC, John Colvin wrote:
*consistent as in different implementations performing very
similarly instead of seeing big differences like you have here.
That's a good point. I tried numpy's exp (which
On Tuesday, 16 June 2015 at 14:43:17 UTC, jmh530 wrote:
On Tuesday, 16 June 2015 at 13:15:05 UTC, John Colvin wrote:
*consistent as in different implementations performing very
similarly instead of seeing big differences like you have here.
That's a good point. I tried numpy's exp (which
On Sunday, 14 June 2015 at 15:54:30 UTC, Etienne Cimon wrote:
On 2015-06-14 08:35, Robert M. Münch wrote:
Hi, just to x-check if I have the correct understanding:
fibers = look parallel, are sequential = use 1 CPU
core
threads = look parallel, are parallel = use several
CPU
On Tuesday, 16 June 2015 at 16:42:31 UTC, CallToDuty wrote:
Is it possible to embed a dll file within dub project? and if
yes, how?
Do you want to write the DLL in D or another language?
On Tuesday, 16 June 2015 at 16:42:31 UTC, CallToDuty wrote:
Is it possible to embed a dll file within dub project? and if
yes, how?
Have you tried just putting it in the root directory of the
project and adding the relevant name to the libs setting in
your dub.json ?
As far as I known, when I define a string with enum and it is
used at different parts of code, that string is repeated again
and again in executable file instead of passing a pointer to
string. So, using enum with string doesn't seem like a good idea.
Hence, I defined string as const to make
On Tuesday, 16 June 2015 at 21:17:37 UTC, tcak wrote:
As far as I known, when I define a string with enum and it is
used at different parts of code, that string is repeated again
and again in executable file instead of passing a pointer to
string. So, using enum with string doesn't seem like a
On Tuesday, 16 June 2015 at 21:17:37 UTC, tcak wrote:
As far as I known, when I define a string with enum and it is
used at different parts of code, that string is repeated again
and again in executable file instead of passing a pointer to
string. So, using enum with string doesn't seem like a
On Tuesday, 16 June 2015 at 21:38:22 UTC, jklp wrote:
On Tuesday, 16 June 2015 at 21:17:37 UTC, tcak wrote:
[...]
Do i miss a detail in your requirement ?
---
struct TableSchema{
const string TABLE = users;
struct FieldTypes{
static const string ID = BIGINT;
On Tuesday, 16 June 2015 at 16:38:55 UTC, John Colvin wrote:
What OS are you on? See http://wiki.dlang.org/Compilers
I'm on Windows 7 at work, and I have both Win7 and linux at home.
I figure I can try it on linux at home. Sometimes the work
computer is a bit funky with installing things,
Did somebody managed to do this or something similar?
Err...vectors not matrices.
I'd like to know if it is possible to call an DLL coded in D from
Java? I don't have any knowledge on DLL calling mechanism, so I
am wondering if this is possible or any special procedure should
be followed.
I indeed tried a small example but didn't succeed. First I
created an DLL from the
On Tuesday, 16 June 2015 at 21:17:37 UTC, tcak wrote:
As far as I known, when I define a string with enum and it is
used at different parts of code, that string is repeated again
and again in executable file instead of passing a pointer to
string. So, using enum with string doesn't seem like a
On 6/17/2015 6:17 AM, tcak wrote:
As far as I known, when I define a string with enum and it is used at
different parts of code, that string is repeated again and again in
executable file instead of passing a pointer to string. So, using enum
with string doesn't seem like a good idea.
The
On 17/06/2015 2:18 p.m., bitwise wrote:
On Tue, 16 Jun 2015 18:47:03 -0400, DlangLearner bystan...@gmail.com
wrote:
I'd like to know if it is possible to call an DLL coded in D from Java?
What you're looking for is JNI (Java Native Interface).
If you export your D functions correctly, as
On Wednesday, 17 June 2015 at 01:56:45 UTC, flamencofantasy wrote:
On Tuesday, 16 June 2015 at 16:40:39 UTC, tired_eyes wrote:
On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote:
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote:
[...]
Thanks. Maybe I'll use this code
On 17/06/2015 7:49 a.m., lzed wrote:
Did somebody managed to do this or something similar?
Like this?
https://github.com/rikkimax/skeleton/blob/master/source/skeleton/syntax/luasyn.d
On Tuesday, 16 June 2015 at 16:40:39 UTC, tired_eyes wrote:
On Tuesday, 16 June 2015 at 15:42:02 UTC, Dennis Ritchie wrote:
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote:
[...]
Thanks. Maybe I'll use this code in your own programs.
I still believe that this design deserves
On Tue, 16 Jun 2015 18:47:03 -0400, DlangLearner bystan...@gmail.com
wrote:
I'd like to know if it is possible to call an DLL coded in D from Java?
What you're looking for is JNI (Java Native Interface).
If you export your D functions correctly, as you have done(extern(C)
export) then
On Sunday, 14 June 2015 at 06:12:30 UTC, Ozan wrote:
Is it possible to create arrays which has more then one type,
f. ex. array[0] = 1; array[1] = z; array[2] = new clazz(),
Probably tuples are what you really need here.
http://dlang.org/phobos/std_typecons.html#.Tuple
On Tuesday, 16 June 2015 at 01:18:29 UTC, Vladimir Panteleev
wrote:
Not using Arch Linux, but just from your post it looks like
it's not finding the libphobos.a from HEAD and using the system
one instead.
You may want to check the dmd.conf file for your HEAD D
install: make sure DMD is using
Hi,
I can write this:
import std.range : chain, split;
But I can not write this:
import std.range : chain, split, std.algorithm : map, each;
We have several times to write the word `import`:
import std.range : chain, split;
import std.algorithm : map, each;
Does D something to solve this
On Tuesday, 16 June 2015 at 09:33:22 UTC, Dennis Ritchie wrote:
Hi,
I can write this:
import std.range : chain, split;
But I can not write this:
import std.range : chain, split, std.algorithm : map, each;
We have several times to write the word `import`:
import std.range : chain, split;
On Tuesday, 16 June 2015 at 11:16:32 UTC, Idan Arye wrote:
There is no problem to be solved here. Having to type `import`
for each imported module is not big enough a burden to justify
this additional syntax.
No, I think it is a holdover from C++-times — to write `import`
for each
Maybe not everyone needs these features. But, unfortunately, I
often use a lot of imported modules. And use every time the word
`import` very bad.
version (none) {
import std.math,
std.conv,
std.stdio,
std.ascii,
std.range,
std.array,
std.regex,
42 matches
Mail list logo