On Friday, 4 May 2018 at 13:27:03 UTC, NewUser wrote:
Hi Timoses,
The structure is being returned from c and I'd like use it from
d.
What you have work perfectly when assigning from d.
Regards,
NewUser
Then you probably need some `extern(C)` statement introducing the
C function and the
On Friday, 4 May 2018 at 15:16:23 UTC, wjoe wrote:
On Friday, 4 May 2018 at 14:24:36 UTC, Vino wrote:
On Friday, 4 May 2018 at 14:02:24 UTC, Jonathan M Davis wrote:
On Friday, May 04, 2018 13:17:36 Vino via Digitalmars-d-learn
wrote:
[...]
Linux does not keep track of the creation time of a
On Thursday, 3 May 2018 at 13:30:03 UTC, bauss wrote:
On Thursday, 3 May 2018 at 02:51:18 UTC, Meta wrote:
If you want that, you might be able to do `int val = val` on
the inner function, though I'm not sure that'll work.
It does not work and will do nothing.
Below compiles, but my guess
On Friday, 4 May 2018 at 15:36:29 UTC, wjoe wrote:
I have a class that I want to be able to register callbacks and
I'd like to be able to register any callable - functions,
delegates, lambdas, anything.
Is there another way to do it besides converting those
toDelegate, which states a bug
On Friday, 4 May 2018 at 14:55:18 UTC, Timoses wrote:
On Friday, 4 May 2018 at 13:27:03 UTC, NewUser wrote:
Hi Timoses,
The structure is being returned from c and I'd like use it
from d.
What you have work perfectly when assigning from d.
Regards,
NewUser
Then you probably need some
On Friday, 4 May 2018 at 15:37:28 UTC, ag0aep6g wrote:
On Friday, 4 May 2018 at 13:02:08 UTC, NewUser wrote:
How can I use the following c structure from d.
struct Item
{
int id;
};
struct Group
{
int i;
int item_count;
struct Item items[];
};
tried defining items[] as both "Item[]
On Friday, 4 May 2018 at 13:02:08 UTC, NewUser wrote:
How can I use the following c structure from d.
struct Item
{
int id;
};
struct Group
{
int i;
int item_count;
struct Item items[];
};
tried defining items[] as both "Item[] items" and "Item* items"
in d, it compiles okay but
I have a class that I want to be able to register callbacks and
I'd like to be able to register any callable - functions,
delegates, lambdas, anything.
Is there another way to do it besides converting those
toDelegate, which states a bug with @safe functions?
Or better store each type in
On Friday, 4 May 2018 at 15:30:26 UTC, Vino wrote:
On Friday, 4 May 2018 at 15:16:23 UTC, wjoe wrote:
[...]
Hi Wjoe,
Thank you very much, but what i am expecting is something
like OS switch, based of OS type switch the funciton eg:
If OS is windows use the funciton timeCreated else if
On Friday, 4 May 2018 at 14:24:36 UTC, Vino wrote:
On Friday, 4 May 2018 at 14:02:24 UTC, Jonathan M Davis wrote:
On Friday, May 04, 2018 13:17:36 Vino via Digitalmars-d-learn
wrote:
On Friday, 4 May 2018 at 12:38:07 UTC, Adam D. Ruppe wrote:
> What are you actually trying to do with it? These
Hi
I just installed D on my windows 10 and want to try to compile a
hello world. My source is a classical
import std.stdio;
void main() {
writeln("Hello, World!");
}
And I try to compile and get
C:\D>dmd hello.d
Error: module `hello` is in file 'hello.d' which cannot be read
import path[0]
On Fri, May 04, 2018 at 11:29:12PM +, Alex via Digitalmars-d-learn wrote:
> Hi
>
> I just installed D on my windows 10 and want to try to compile a hello
> world. My source is a classical
>
> import std.stdio;
> void main() {
> writeln("Hello, World!");
> }
>
> And I try to compile and get
On Friday, 4 May 2018 at 19:12:16 UTC, ag0aep6g wrote:
If toDelegate isn't (always) @safe, how can you be sure that
your wrapper is?
If it were @safe, the compiler would accept it.
Looking at the code, I believe there are several casts that the
compiler can't verify but are used safely.
If you just want to clean logs, then use modification time on all
oses:
auto clogClean (string LogDir ) {
Array!(Tuple!(string, SysTime)) dFiles;
dFiles.insert(dirEntries(LogDir, SpanMode.shallow).filter!(a =>
a.isFile).map!(a => tuple(a.name, a.timeLastModified)));
return dFiles;
}
I've written an email to Vadim, maybe we get a reply on the
status of both projects.
On Friday, 4 May 2018 at 07:18:09 UTC, bauss wrote:
[...]
Would it maybe be easier for you to base on ddbc[1] or another
existing abstraction layer for database abstraction?
Ddbc is pretty neat, and even has
On Thursday, 3 May 2018 at 19:30:48 UTC, Mike Parker wrote:
On Thursday, 3 May 2018 at 18:36:04 UTC, RegeleIONESCU wrote:
[...]
So your app is compiling and executing. This is a runtime
error. The SymbolLoadException means the SDL library was
loaded, but a function Derelict expected to
On 05/04/2018 06:33 PM, Neia Neutuladh wrote:
auto asDelegate(TFunc)(TFunc func) @trusted
{
import std.functional : toDelegate;
return toDelegate(func);
}
The "@trusted" means that you promise this thing is safe, even if the
compiler can't be certain.
If toDelegate isn't (always)
On Friday, 4 May 2018 at 07:43:39 UTC, Russel Winder wrote:
On Fri, 2018-05-04 at 03:30 +, Vino via Digitalmars-d-learn
wrote:
[...]
`./nasconfig.txt`
perhaps: Linux uses / (as does Windows in fact) for directory
separator.
[...]
Hi Russel,
Was able to resolve the issue, the
On Fri, 2018-05-04 at 08:47 +, Vino via Digitalmars-d-learn wrote:
>
[…]
> Was able to resolve the issue, the issue was the letter "L" in
> version (Linux) where is should be version (linux).
It would have helped if I had read the code first rather than jumped to a
conclusion.
:-)
--
On Friday, 4 May 2018 at 07:49:02 UTC, Robert M. Münch wrote:
I have a static C++ and can't make it to get a correct binding
for one function:
DMD: public: unsigned int __cdecl b2d::Context2D::_begin(class
b2d::Image & __ptr64,class b2d::Context2D::InitParams const *
__ptr64 const) __ptr64
I port nanogui, but besides porting I'd like to improve it using great
capabilities of D language provides. One of them is utf support, so I
added support for Asian languages to nanogui.TextBox. But I'm not sure
I've did it well and so I'd like to ask someone to test it using the
following:
On Friday, 4 May 2018 at 09:25:28 UTC, Russel Winder wrote:
On Fri, 2018-05-04 at 08:47 +, Vino via Digitalmars-d-learn
wrote:
[…]
Was able to resolve the issue, the issue was the letter "L"
in
version (Linux) where is should be version (linux).
It would have helped if I had read
Hi All,
Request your help, I have a D program written on Windows
platform and the program is working as expected, now i am trying
to port the same program to Linux, my program use the function
"timeCreated" from std.file for Windows hugely where as in Linux
we do not have the same function
On Thursday, 3 May 2018 at 23:58:24 UTC, Enjoys Math wrote:
Error
-
[...]
Haven't run it, but two things to try...
On D side try adding listen after bind.
On python side. Don't think you need to call bind the client
socket ( this may cause problems).
Cheers,
A.
On Friday, May 04, 2018 13:17:36 Vino via Digitalmars-d-learn wrote:
> On Friday, 4 May 2018 at 12:38:07 UTC, Adam D. Ruppe wrote:
> > What are you actually trying to do with it? These functions are
> > probably the wholly wrong approach.
>
> Hi Adam,
>
> The existing program in Windows do few
On Thursday, 3 May 2018 at 23:47:40 UTC, IntegratedDimensions
wrote:
trying to compile a simple program in x86. Compiles fine in dmd
and ldcx64.
Seems like ldc is using the wrong lib for some reason?
phobos2-ldc.lib(json.obj) : fatal error LNK1112: module machine
type 'x64' conflicts with
On Fri, 2018-05-04 at 03:30 +, Vino via Digitalmars-d-learn wrote:
> Hi All,
>
>Request you help on the below code, the below code always state
> the file does not exist even if the file do exist.
>
> Code:
>
> import core.stdc.stdlib: exit;
> import std.stdio;
> import std.file;
>
What are you actually trying to do with it? These functions are
probably the wholly wrong approach.
Hi,
How can I use the following c structure from d.
struct Item
{
int id;
};
struct Group
{
int i;
int item_count;
struct Item items[];
};
tried defining items[] as both "Item[] items" and "Item* items"
in d, it compiles okay but gives an error when trying to access
it.
Here is
On Friday, 4 May 2018 at 12:38:07 UTC, Adam D. Ruppe wrote:
What are you actually trying to do with it? These functions are
probably the wholly wrong approach.
Hi Adam,
The existing program in Windows do few task's eg: Delete files
older that certain days, and now we are trying to port to
On Friday, 4 May 2018 at 13:02:08 UTC, NewUser wrote:
How can I use the following c structure from d.
struct Item
{
int id;
};
struct Group
{
int i;
int item_count;
struct Item items[];
};
tried defining items[] as both "Item[] items" and "Item* items"
in d, it compiles okay but
On Friday, 4 May 2018 at 13:21:53 UTC, Timoses wrote:
On Friday, 4 May 2018 at 13:02:08 UTC, NewUser wrote:
tried defining items[] as both "Item[] items" and "Item*
items" in d, it compiles okay but gives an error when trying
to access it.
You were on the right track. D array notation is:
On Friday, May 04, 2018 10:25:28 Russel Winder via Digitalmars-d-learn
wrote:
> On Fri, 2018-05-04 at 08:47 +, Vino via Digitalmars-d-learn wrote:
>
> […]
>
> > Was able to resolve the issue, the issue was the letter "L" in
> >
> > version (Linux) where is should be version (linux).
>
> It
On Friday, 4 May 2018 at 13:02:08 UTC, NewUser wrote:
tried defining items[] as both "Item[] items" and "Item* items"
in d, it compiles okay but gives an error when trying to access
it.
You were on the right track. D array notation is:
[] ;
For me this works:
```
struct Item
{
int id;
};
On Monday, 30 April 2018 at 18:47:21 UTC, biocyberman wrote:
I am attending Dconf 2018 and giving a talk there on May 4.
Link: https://dconf.org/2018/talks/le.html. It will be very
interesting to talk about the outcome of the following
challenges. If we can't have at least 3 solutions by three
On Friday, 4 May 2018 at 14:02:24 UTC, Jonathan M Davis wrote:
On Friday, May 04, 2018 13:17:36 Vino via Digitalmars-d-learn
wrote:
On Friday, 4 May 2018 at 12:38:07 UTC, Adam D. Ruppe wrote:
> What are you actually trying to do with it? These functions
> are probably the wholly wrong
On Friday, 4 May 2018 at 14:13:19 UTC, Luís Marques wrote:
On Monday, 30 April 2018 at 18:47:21 UTC, biocyberman wrote:
I am attending Dconf 2018 and giving a talk there on May 4.
Link: https://dconf.org/2018/talks/le.html. It will be very
interesting to talk about the outcome of the following
On Thursday, 3 May 2018 at 11:29:59 UTC, Robert M. Münch wrote:
Not sure I understand this too. This is now what I get:
DMD: public: unsigned int __cdecl b2d::Context2D::_begin(class
b2d::Image & __ptr64,class b2d::Context2D::InitParams const *
__ptr64 const) __ptr64
LIB: public: unsigned int
On Thursday, 3 May 2018 at 23:47:40 UTC, IntegratedDimensions
wrote:
Maybe this is a cross compilation issue?
Looks like you simply didn't download the LDC multilib package.
On Thursday, 3 May 2018 at 23:05:02 UTC, Matthias Klumpp wrote:
On Thursday, 3 May 2018 at 21:28:18 UTC, bauss wrote:
On Thursday, 3 May 2018 at 18:01:07 UTC, Matthias Klumpp wrote:
DiamondMVC looks nice, but I would need PostgreSQL support
for sure.
Therefore, I think there are three
I have a static C++ and can't make it to get a correct binding for one
function:
DMD: public: unsigned int __cdecl b2d::Context2D::_begin(class
b2d::Image & __ptr64,class b2d::Context2D::InitParams const * __ptr64
const) __ptr64
LIB: public: unsigned int __cdecl b2d::Context2D::_begin(class
41 matches
Mail list logo