On Sunday, 14 June 2015 at 01:31:25 UTC, Adam D. Ruppe wrote:
On Sunday, 14 June 2015 at 00:52:20 UTC, FujiBar wrote:
I have read that in D structs are always allocated on the
stack while classes are always allocated on the heap.
That's not true; it is a really common misconception.
Putting a
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 2:18 p.m., bitwise wrote:
On Tue, 16 Jun 2015 18:47:03 -0400, DlangLearner
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
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 Tue, 16 Jun 2015 18:47:03 -0400, DlangLearner
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 you can call them the
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 exi
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 string
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
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 te
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 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
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 i
Err...vectors not matrices.
Did somebody managed to do this or something similar?
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, so
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: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
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 ?
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?
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
wrote:
I just want to import individual features of these modules.
mixin template include(w
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 us
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 us
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
wrote:
I just want to import individual features of these modules.
mixin template include(w...)
{
mixin _include!(w.length - 1, w);
}
mixin template _i
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 a
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 dynamical
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, immutable(cha
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 d
On Tue, 16 Jun 2015 13:01:09 +
via Digitalmars-d-learn 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 = SHGetFolderPath(null, 0x23, nul
On Tue, 16 Jun 2015 12:26:45 +
C2D via Digitalmars-d-learn 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, typ
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 fast
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, nul
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 sa
On Tue, 16 Jun 2015 11:45:22 +
Dennis Ritchie via Digitalmars-d-learn
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 std.math,
> std.conv,
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);
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 std
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,
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 new
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;
imp
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 pr
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
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
43 matches
Mail list logo