On Friday, 29 January 2016 at 07:17:04 UTC, glathoud wrote:
I have the impression that function implementations are not
merged:
return fun0(fun1(a));
For example, fun1(a) outputs a temporary array, which is then
used as input for fun0. Merging the implementations of fun0 and
fun1 would e
Hello,
I am a D beginner, please excuse me if these questions are
irrelevant.
I had a look at this post:
http://forum.dlang.org/post/aarldotsgluwdgtee...@forum.dlang.org
Looking at the source code of compose!:
https://github.com/D-Programming-Language/phobos/blob/v2.070.0/std/functional.d#L88
On Thursday, 28 January 2016 at 19:31:39 UTC, Marc Schütz wrote:
On Thursday, 28 January 2016 at 07:45:01 UTC, Robert M. Münch
wrote:
Just compiled the latest release with digger. Everything works
without any problems, but the resulting binary shows the
following version:
mac-pro:Digger robby
On Thursday, 28 January 2016 at 15:10:38 UTC, Adam D. Ruppe wrote:
But for just both string and char[], yeah, const is the way to
do it.
[...]
Thanks for the clear explaination. So `in char[]` is stricter
(and safer) than `const(char)[]`. I will stick to that.
On Thursday, 28 January 2016 at 15:03:38 UTC, sigod wrote:
On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote:
[...]
`in char[]` is short for `scope const char[]` or `scope
const(char[])`.
See http://dlang.org/spec/function.html#parameters
It depends on the situation. If possible I
On Thursday, 28 January 2016 at 19:49:22 UTC, Taylor Hillegeist
wrote:
On Thursday, 28 January 2016 at 19:33:22 UTC, bearophile wrote:
FreeSlave:
On Thursday, 28 January 2016 at 08:15:38 UTC, FreeSlave wrote:
Not directly. You can declare cdecl function on Free Pascal
side and call it as exter
On Wednesday, 27 January 2016 at 22:39:54 UTC, Igor wrote:
But doesn't this ultimately defeat the purpose of having manual
memory management if one has to add it to the GC to be scanned?
You can make the LOC related to the GC optional with an
additional bool template parameter and a static if,
On Thursday, 28 January 2016 at 17:32:31 UTC, Gary Willoughby
wrote:
On Thursday, 28 January 2016 at 15:10:38 UTC, Adam D. Ruppe
wrote:
On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote:
I searched the forum and found that people use
`const(char)[]` or `in char[]` to accept both string
On Thursday, 28 January 2016 at 19:33:22 UTC, bearophile wrote:
FreeSlave:
On Thursday, 28 January 2016 at 08:15:38 UTC, FreeSlave wrote:
Not directly. You can declare cdecl function on Free Pascal
side and call it as extern(C).
What about extern(Pascal)?
https://dlang.org/spec/attribute.html
On Thursday, 28 January 2016 at 07:45:01 UTC, Robert M. Münch
wrote:
Just compiled the latest release with digger. Everything works
without any problems, but the resulting binary shows the
following version:
mac-pro:Digger robby$ ./result/bin/dmd --version
DMD64 D Compiler v2.069-devel-682687b
FreeSlave:
On Thursday, 28 January 2016 at 08:15:38 UTC, FreeSlave wrote:
Not directly. You can declare cdecl function on Free Pascal
side and call it as extern(C).
What about extern(Pascal)?
https://dlang.org/spec/attribute.html#linkage
Bye,
bearophile
On Thursday, 28 January 2016 at 18:13:59 UTC, Vladimir Panteleev
wrote:
You can use Digger to find the exact compiler change that
caused this assert to manifest, and Dustmite to find the
minimal program which behaves differently in two compiler
versions.
Thanks, I'm aware of these tools.
But
On Thursday, 28 January 2016 at 18:13:59 UTC, Vladimir Panteleev
wrote:
On Thursday, 28 January 2016 at 18:01:09 UTC, Nordlöw wrote:
After upgrading to 2.070.0 I get an assert failure in my
application that wasn't there before:
core.exception.AssertError@knet/linking.d(235): Assertion
failure
On Thursday, 28 January 2016 at 18:01:09 UTC, Nordlöw wrote:
After upgrading to 2.070.0 I get an assert failure in my
application that wasn't there before:
core.exception.AssertError@knet/linking.d(235): Assertion
failure
Why isn't there any stacktrace? I thought has been fixed.
Please help
After upgrading to 2.070.0 I get an assert failure in my
application that wasn't there before:
core.exception.AssertError@knet/linking.d(235): Assertion failure
Why isn't there any stacktrace? I thought has been fixed.
Please help.
On Thursday, 28 January 2016 at 15:10:38 UTC, Adam D. Ruppe wrote:
On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote:
I searched the forum and found that people use `const(char)[]`
or `in char[]` to accept both string and char[] arguments.
There's also the hyper-generic signatures Pho
On Wednesday, 27 January 2016 at 23:42:54 UTC, brian wrote:
Anyone able to shed some light on what the structure of the
response is, and how I can read/output it all?
Regards
Brian
its unlikely that vibe client misses something.
for debugging i would try to go trough all requests with curl on
On Thursday, 28 January 2016 at 16:22:23 UTC, Ali Çehreli wrote:
There is assumeWontThrow which terminates if an exception is
indeed thrown:
http://dlang.org/library/std/exception/assume_wont_throw.html
Ali
nice one, thx
I have a super simple D file that looks like this:
unittest{
import std.stdio;
writeln("hello");
}
On OSX Mavericks I run "rdmd --main -unittest test.d" and I get a
nice "hello" and everything is well.
On Win7 64-bit I run "> rdmd --main -unittest test.d" and rdmd
seems to hang. It n
On 01/28/2016 08:05 AM, ref2401 wrote:
There are functions in Phobos that do not throw but they are not marked
as `nothrow`.
When I need to call them from my `nothrow` code I do this:
void foo() { /* I won't throw, honestly. */ }
void bar() nothrow {
scope(failure) assert(false);
foo(
On Thursday, 28 January 2016 at 15:38:20 UTC, Ali Çehreli wrote:
On 01/28/2016 05:33 AM, ixid wrote:
> This is an idle thought hence putting it on the Learn-level
forum. An
> idea struck me for foreach to make working with more
complicated data
> types or heavily nested data easier.
>
>
> ui
There are functions in Phobos that do not throw but they are not
marked as `nothrow`.
When I need to call them from my `nothrow` code I do this:
void foo() { /* I won't throw, honestly. */ }
void bar() nothrow {
scope(failure) assert(false);
foo();
}
The question is: Is it ok t
On 01/28/2016 05:33 AM, ixid wrote:
> This is an idle thought hence putting it on the Learn-level forum. An
> idea struck me for foreach to make working with more complicated data
> types or heavily nested data easier.
>
>
> uint[][] a = [[1,2,3],[4,5,6]];
[...]
> It would be nice if you co
On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote:
I searched the forum and found that people use `const(char)[]`
or `in char[]` to accept both string and char[] arguments.
There's also the hyper-generic signatures Phobos uses like
void foo(S)(S s) if(isSomeString!S)
and the input ra
On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote:
I have a function that reads a line of string and do some
computation.
I searched the forum and found that people use `const(char)[]`
or `in char[]` to accept both string and char[] arguments.
What's the difference between `const(c
On Thursday, 28 January 2016 at 14:39:46 UTC, sigod wrote:
I tried to compile your code on dpaste (2.070.0) and got this:
dpaste has an input mangling bug with some characters as a result
of the form submission over the web.
On Thursday, 28 January 2016 at 13:26:27 UTC, Andrea Fontana
wrote:
On Thursday, 28 January 2016 at 13:18:55 UTC, pineapple wrote:
I experimented with using the character 'ħ' in a variable
name, and wasn't terribly surprised when the compiler didn't
like it. What did surprise me is that I still
I have a function that reads a line of string and do some
computation.
I searched the forum and found that people use `const(char)[]` or
`in char[]` to accept both string and char[] arguments.
What's the difference between `const(char)[]` and `in char[]`?
If they are not the same, then whic
This is an idle thought hence putting it on the Learn-level
forum. An idea struck me for foreach to make working with more
complicated data types or heavily nested data easier.
uint[][] a = [[1,2,3],[4,5,6]];
foreach(uint[] b; a)
b.writeln;
At present
On Thursday, 28 January 2016 at 13:18:55 UTC, pineapple wrote:
I experimented with using the character 'ħ' in a variable name,
and wasn't terribly surprised when the compiler didn't like it.
What did surprise me is that I still got a compile error even
when the character was in a comment. Is th
On Thursday, 28 January 2016 at 13:18:55 UTC, pineapple wrote:
I experimented with using the character 'ħ' in a variable name,
and wasn't terribly surprised when the compiler didn't like it.
What did surprise me is that I still got a compile error even
when the character was in a comment. Is th
I experimented with using the character 'ħ' in a variable name,
and wasn't terribly surprised when the compiler didn't like it.
What did surprise me is that I still got a compile error even
when the character was in a comment. Is there any way to make dmd
not get fussy about unicode?
On Wednesday, 27 January 2016 at 22:39:54 UTC, Igor wrote:
Ultimately I want no GC dependency. Is there an article that
shows how this can be done?
You can link with gcstub
https://github.com/D-Programming-Language/druntime/blob/master/src/gcstub/gc.d it will replace GC completely.
On Thursday, 28 January 2016 at 04:26:26 UTC, Taylor Hillegeist
wrote:
Just curious... I had a thought that perhaps since Objective C
was a replacement for Pascal on the mac. that they might have
the same interface. but I'm not savvy enough with fpc to figure
out how to try it.
Not directly.
On Thursday, 28 January 2016 at 06:15:54 UTC, sanjayss wrote:
So I got round to doing this --
https://github.com/D-Programming-Language/druntime/pull/1485 --
it's not clear what happens now -- is there a set of people
that reviews pull requests and comment on it or is it open to
all?
I shoul
35 matches
Mail list logo