On Friday, 25 May 2018 at 01:42:48 UTC, Basile B. wrote:
On Friday, 25 May 2018 at 01:17:45 UTC, IntegratedDimensions
wrote:
On Friday, 25 May 2018 at 01:02:00 UTC, Basile B. wrote:
On Friday, 25 May 2018 at 00:15:39 UTC, IntegratedDimensions
wrote:
On Thursday, 24 May 2018 at 23:31:50 UTC, Al
On Friday, 25 May 2018 at 01:17:45 UTC, IntegratedDimensions
wrote:
On Friday, 25 May 2018 at 01:02:00 UTC, Basile B. wrote:
On Friday, 25 May 2018 at 00:15:39 UTC, IntegratedDimensions
wrote:
On Thursday, 24 May 2018 at 23:31:50 UTC, Alex wrote:
On Thursday, 24 May 2018 at 20:24:32 UTC,
Integ
On Friday, 25 May 2018 at 01:02:00 UTC, Basile B. wrote:
On Friday, 25 May 2018 at 00:15:39 UTC, IntegratedDimensions
wrote:
On Thursday, 24 May 2018 at 23:31:50 UTC, Alex wrote:
On Thursday, 24 May 2018 at 20:24:32 UTC,
IntegratedDimensions wrote:
class T;
class TT : T;
interface I
{
@pro
On Friday, 25 May 2018 at 00:15:39 UTC, IntegratedDimensions
wrote:
On Thursday, 24 May 2018 at 23:31:50 UTC, Alex wrote:
On Thursday, 24 May 2018 at 20:24:32 UTC, IntegratedDimensions
wrote:
class T;
class TT : T;
interface I
{
@property T t();
}
abstract class A
{
T _t;
@property T
On Thursday, 24 May 2018 at 23:31:50 UTC, Alex wrote:
On Thursday, 24 May 2018 at 20:24:32 UTC, IntegratedDimensions
wrote:
class T;
class TT : T;
interface I
{
@property T t();
}
abstract class A
{
T _t;
@property T t() { return _t; }
}
class C : A
{
// Stuff below uses t as TT
On Friday, May 25, 2018 00:09:28 SrMordred via Digitalmars-d-learn wrote:
> On Friday, 25 May 2018 at 00:04:10 UTC, Adam D. Ruppe wrote:
> > On Thursday, 24 May 2018 at 23:55:24 UTC, SrMordred wrote:
> >> //Error: @nogc delegate onlineapp.main.__lambda1 cannot call
> >> non-@nogc function std.range
Because arrays of char and wchar are treated as ranges of dchar.
That part that I didnt know, thanks! :)
On Friday, 25 May 2018 at 00:04:10 UTC, Adam D. Ruppe wrote:
On Thursday, 24 May 2018 at 23:55:24 UTC, SrMordred wrote:
//Error: @nogc delegate onlineapp.main.__lambda1 cannot call
non-@nogc function std.range.chain!(char[],
char[]).chain.Result.front
Why?
phobos automatically decodes utf8
On Thursday, May 24, 2018 23:55:24 SrMordred via Digitalmars-d-learn wrote:
> int[] a;
> int[] b;
>
> ()@nogc {
> foreach(v ; chain( a,b ) ) printf("%d\n", v);
> }();
>
> //Ok, everything fine;
>
> char[] a;
> char[] b;
>
> ()@nogc {
> foreach(v ; chain( a,b ) ) printf("%c\n", v);
> }();
>
On Thursday, 24 May 2018 at 23:55:24 UTC, SrMordred wrote:
//Error: @nogc delegate onlineapp.main.__lambda1 cannot call
non-@nogc function std.range.chain!(char[],
char[]).chain.Result.front
Why?
phobos automatically decodes utf8 into dchars. This can throw a
new utf exception.
int[] a;
int[] b;
()@nogc {
foreach(v ; chain( a,b ) ) printf("%d\n", v);
}();
//Ok, everything fine;
char[] a;
char[] b;
()@nogc {
foreach(v ; chain( a,b ) ) printf("%c\n", v);
}();
//Error: @nogc delegate onlineapp.main.__lambda1 cannot call
non-@nogc function std.range.chain!(char[]
On Thursday, 24 May 2018 at 20:24:32 UTC, IntegratedDimensions
wrote:
class T;
class TT : T;
interface I
{
@property T t();
}
abstract class A
{
T _t;
@property T t() { return _t; }
}
class C : A
{
// Stuff below uses t as TT but compiler, of course, treats
t as T
...
}
Th
On Thursday, 24 May 2018 at 23:08:29 UTC, Basile B. wrote:
On Thursday, 24 May 2018 at 23:03:21 UTC, aliak wrote:
Hi,
I was essentially trying to do this:
struct S {
void f() {}
}
auto f = S.f; // f becomes void function(S) ??
S s;
f(s);
Is something like that possible?
Cheers,
- Ali
Su
On Thursday, 24 May 2018 at 23:03:21 UTC, aliak wrote:
Hi,
I was essentially trying to do this:
struct S {
void f() {}
}
auto f = S.f; // f becomes void function(S) ??
S s;
f(s);
Is something like that possible?
Cheers,
- Ali
Sure:
```
import std.stdio;
void main(string[] args)
{
Hi,
I was essentially trying to do this:
struct S {
void f() {}
}
auto f = S.f; // f becomes void function(S) ??
S s;
f(s);
Is something like that possible?
Cheers,
- Ali
I want to call some of my D code from Python. I'm annotating the
pertinent functions with extern(C) export, as in
module foo;
extern(C) export int initialize() {
return 42;
}
I compile with:
dmd -fPIC -shared ./foo.d
From the Python end, I can load the library using ctypes and the
call w
On Thursday, 24 May 2018 at 22:03:38 UTC, aliak wrote:
It feels like the only difference between a no-arg function
that is @property and one that is not is that the former could
be invoked with optional parentheses and the latter should be
illegal with parentheses.
Edit: err... other way arou
On Tuesday, 22 May 2018 at 14:33:20 UTC, Jonathan M Davis wrote:
A free function with a single argument works just fine as a
setter property. e.g. you could do something like
void env(Tuple!(string, string)[] str)
{
// set environment variables
}
env = [tuple("foo", "bar")];
is perfectly
On Tuesday, 22 May 2018 at 13:59:16 UTC, Steven Schveighoffer
wrote:
The derailed plan was to leave alone the ability to call no-arg
functions without parentheses, but to REQUIRE @property to call
an argument-taking function with the assignment style.
See the DIP here: https://wiki.dlang.org/D
class T;
class TT : T;
interface I
{
@property T t();
}
abstract class A
{
T _t;
@property T t() { return _t; }
}
class C : A
{
// Stuff below uses t as TT but compiler, of course, treats t
as T
...
}
The issue is that I programmed the class C with a variable that
directly
On Thursday, May 24, 2018 19:39:07 Jacob Carlborg via Digitalmars-d-learn
wrote:
> On 2018-05-24 08:05, Robert M. Münch wrote:
> > Hi, great! Thanks for the examples... BTW: Is there a place where such
> > generic and fundamental examples are collected?
>
> Not as far as I know.
>
> >> void handle
On 5/24/18 2:51 PM, Mike Franklin wrote:
Given that the PR above is for object.d, I can't turn the entire
object.d source file into a string and conditionally mix that in. Does
anyone have a solution to this?
My recommendation would have been the last one, but if that doesn't
work, I don't
I'm trying to find a way to declare a block of code `nothrow:`
when compiling with -betterC, but not `nothrow` when not
compiling with -betterC.
The solution is needed for this PR:
https://github.com/dlang/druntime/pull/2184/files#r188627707
Attempt #1
--
void test() { }
version(D_
On 2018-05-24 11:10, biocyberman wrote:
Thanks for the hints. `Read` in C++ and D are both classes. And the
function is inside the class definition itself.
In that case specifying the type as `Read` is the correct thing to do.
Note that `new` always allocates on the heap and returns a pointer
On 2018-05-24 08:05, Robert M. Münch wrote:
Hi, great! Thanks for the examples... BTW: Is there a place where such
generic and fundamental examples are collected?
Not as far as I know.
void handleException1(alias dg)()
{
try dg();
catch (Exception e) { /* handle exception */ }
}
v
On Thursday, 24 May 2018 at 12:34:38 UTC, Steven Schveighoffer
wrote:
On 5/24/18 8:08 AM, rikki cattermole wrote:
On 25/05/2018 12:06 AM, biocyberman wrote:
I am testing with DMD 2.078.2 locally. This tiny snippet
works on dlang's online editor: https://run.dlang.io/is/nb4IV4
But it does not
On 5/24/18 8:08 AM, rikki cattermole wrote:
On 25/05/2018 12:06 AM, biocyberman wrote:
I am testing with DMD 2.078.2 locally. This tiny snippet works on
dlang's online editor: https://run.dlang.io/is/nb4IV4
But it does not work on my local dmd.
import std.algorithm.mutation;
import std.stdio;
I am testing with DMD 2.078.2 locally. This tiny snippet works on
dlang's online editor: https://run.dlang.io/is/nb4IV4
But it does not work on my local dmd.
import std.algorithm.mutation;
import std.stdio;
char[] arr = "hello\U00010143\u0100\U00010143".dup;
writeln(arr.reverse);
Error: templa
On 25/05/2018 12:06 AM, biocyberman wrote:
I am testing with DMD 2.078.2 locally. This tiny snippet works on
dlang's online editor: https://run.dlang.io/is/nb4IV4
But it does not work on my local dmd.
import std.algorithm.mutation;
import std.stdio;
char[] arr = "hello\U00010143\u0100\U0001014
On Thursday, 24 May 2018 at 06:59:47 UTC, Vino wrote:
Hi All,
Request your help on how to delete a file which has the
extension .fifo (.javast.fifo) in Windows.
From,
Vino.B
What exactly is your issue with it?
On Thursday, 24 May 2018 at 10:42:26 UTC, Andrea Fontana wrote:
On Thursday, 24 May 2018 at 10:23:41 UTC, Andrea Fontana wrote:
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana
wrote:
This line:
mixin("alias tmp = " ~ s ~ ";
On Thursday, 24 May 2018 at 10:23:41 UTC, Andrea Fontana wrote:
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to
this:
mixin("alias tmp = Symbol" ~ s ~ ";");
then sudden
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to
this:
mixin("alias tmp = Symbol" ~ s ~ ";");
then suddenly things work.
--
Simen
What?
a dot is missing,
On Thursday, 24 May 2018 at 08:58:02 UTC, Nicholas Wilson wrote:
On Thursday, 24 May 2018 at 08:16:30 UTC, biocyberman wrote:
[...]
it looks like Read is a D class? in which case it already
returns by reference.
If you make Read a struct then all you need do is change the
function signature
On Thursday, 24 May 2018 at 08:16:30 UTC, biocyberman wrote:
Some C and C++ projects I am working on use pointers and
references extensively: to pass as function arguments, and to
return from a function. For function argument I would use
`ref`, but for return types, I can't use `ref` and can't
On Wednesday, 23 May 2018 at 03:12:52 UTC, IntegratedDimensions
wrote:
On Wednesday, 23 May 2018 at 03:00:17 UTC, Nicholas Wilson
wrote:
[...]
I knew someone was going to say that and I forgot to say DON'T!
Saying to profile when I clearly said these ARE cases where
they are slow is just mor
On Thursday, 24 May 2018 at 07:59:08 UTC, Simen Kjærås wrote:
On Thursday, 24 May 2018 at 07:47:54 UTC, Andrea Fontana wrote:
Is this a bug or am I missing something?
https://run.dlang.io/is/OGHJYX
Andrea
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in th
Some C and C++ projects I am working on use pointers and
references extensively: to pass as function arguments, and to
return from a function. For function argument I would use `ref`,
but for return types, I can't use `ref` and can't return a
pointer. What should be the proper way to handle thi
On Thursday, 24 May 2018 at 07:47:54 UTC, Andrea Fontana wrote:
Is this a bug or am I missing something?
https://run.dlang.io/is/OGHJYX
Andrea
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to this:
mixin("alias tmp = Symbol
Is this a bug or am I missing something?
https://run.dlang.io/is/OGHJYX
Andrea
Hi All,
Request your help on how to delete a file which has the
extension .fifo (.javast.fifo) in Windows.
From,
Vino.B
42 matches
Mail list logo