Thanks. The bug is created.
https://issues.dlang.org/show_bug.cgi?id=14469
On Saturday, 18 April 2015 at 21:11:28 UTC, HaraldZealot wrote:
On Saturday, 18 April 2015 at 20:42:09 UTC, Ali Çehreli wrote:
On 04/18/2015 01:30 PM, HaraldZealot wrote:
Is it possible iterate over enum (preferable in compile time)
or at
least check that particular value belong to enum?
Enu
On Sun, 19 Apr 2015 23:38:47 +, Freddy wrote:
> C libraries have a pattern of
> HiddenType* getObj();
> void freeObj(HiddenType*);
>
> Is there any way I can make the GC search for a "HiddenType*" and run
> "freeObj" when the pointer is not found.
wrap it in class/struct and run `fr
On 04/19/2015 04:38 PM, Freddy wrote:
C libraries have a pattern of
HiddenType* getObj();
void freeObj(HiddenType*);
Is there any way I can make the GC search for a "HiddenType*" and run
"freeObj" when the pointer is not found.
Not automatically. Check out addRange and addRoot:
htt
On 20/04/2015 7:06 a.m., Kenny wrote:
This function works fine for large text files like 100Mb or 1Gb but
failed when I tried to read 6Gb file. This happens on Windows x64.
The possible reason that it uses read(in char[], size_t) function and on
windows it calls GetFileSize. This function return
On Sunday, 19 April 2015 at 21:42:23 UTC, Ulrich Küttler wrote:
groupBy is a nice example as it laboriously adds reference
semantics to forward ranges but assumes input ranges to posses
reference semantics by themselves.
All ranges are input ranges, though. Input ranges are the least
speciali
C libraries have a pattern of
HiddenType* getObj();
void freeObj(HiddenType*);
Is there any way I can make the GC search for a "HiddenType*" and
run "freeObj" when the pointer is not found.
It seems that D has currently no direct support to reuse object
memory.
D should add a new-placement syntax:
Foo f = new Foo(42);
new (f) Foo(23);
and/or should add an emplace overload which takes an object:
T emplace(T, Args...)(ref T obj, auto ref Args args) if (is(T ==
class))
On Sunday, 19 April 2015 at 11:33:26 UTC, anonymous wrote:
I guess the problem is the mix of value and reference
semantics. ByRecord's `current` is a value, but its `file` has
reference semantics. So, a copy of a ByRecord affects one part
of the original but not the other.
I agree. Yet I am c
And if I have an already instantiated object?
Foo f = new Foo();
// reuse f's memory
Is there an nicer way to override the memory instead of:
void[] buf = (cast(void*) f)[0 .. __traits(classInstanceSize,
Foo)];
buf = typeid(Foo).init[]; // or: buf = f.classinfo.init[];
?
The
On Sunday, 19 April 2015 at 16:20:23 UTC, Gary Willoughby wrote:
If i pass the correct information on the command line it gets
past the library errors but now shows linker errors.
I'm not seeing the compilation errors when building on the
staging server, so not sure why you're getting them. I
On 04/19/2015 09:04 AM, Namespace wrote:
> Is it somehow possible to reuse the memory of an object?
Yes, when you cast a class variable to void*, you get the address of the
object.
> @nogc
> T emplace(T, Args...)(ref T obj, auto ref Args args) nothrow if (is(T ==
> class)) {
There is already
On Sunday, 19 April 2015 at 16:21:45 UTC, Jacob Carlborg wrote:
Do you have libcurl installed?
Yeah and i've looked at the build scripts etc, and can't see
anything obviously wrong.
This function works fine for large text files like 100Mb or 1Gb
but failed when I tried to read 6Gb file. This happens on Windows
x64.
The possible reason that it uses read(in char[], size_t) function
and on windows it calls GetFileSize. This function returns file
size as 32 bit value. If you
On Sunday, 19 April 2015 at 09:06:58 UTC, Jacob Carlborg wrote:
On 2015-04-19 10:56, Jacob Carlborg wrote:
The makefile isn't updated, see [1]. Trying adding
"STABLE_DMD_VER=2.067.0" to the command you're running.
Pull request:
https://github.com/D-Programming-Language/dlang.org/pull/968
I
On 2015-04-19 18:20, Gary Willoughby wrote:
Here are the errors:
...
touch ../dub-0.9.23/.cloned
mkdir -p /tmp/.stable_dmd-2.067.0
TMPFILE=$(mktemp deleteme.) && curl -fsSL
http://downloads.dlang.org/releases/2.x/2.067.0/dmd.2.067.0.linux.zip >
${TMPFILE}.zip && \
unzip -qd /tm
Is it somehow possible to reuse the memory of an object?
My current idea is:
@nogc
T emplace(T, Args...)(ref T obj, auto ref Args args) nothrow if
(is(T == class)) {
if (obj is null)
return null;
enum size_t SIZE = __traits(classInstanceSize, T);
void[] buf = (cast(vo
On Saturday, 18 April 2015 at 22:01:56 UTC, Ulrich Küttler wrote:
Input ranges from std.stdio are used for reading files. So
assuming we create a file
auto f = File("test.txt", "w");
f.writeln(iota(5).map!(a => repeat(to!string(a),
4)).joiner.joiner("\n"));
f.close();
We should be
On Saturday, 18 April 2015 at 17:15:40 UTC, Gary Willoughby wrote:
Any ideas why i'm getting these linker errors?
This seems to be because i wasn't correctly specifying the newly
generated phobos lib in the dmd.conf.
On 2015-04-18 20:20, Darrell Gallion wrote:
Thought there were other complications on Windows for 64bit?
I don't know, I never used it.
--
/Jacob Carlborg
On 2015-04-19 10:56, Jacob Carlborg wrote:
The makefile isn't updated, see [1]. Trying adding
"STABLE_DMD_VER=2.067.0" to the command you're running.
Pull request: https://github.com/D-Programming-Language/dlang.org/pull/968
--
/Jacob Carlborg
On 2015-04-19 10:56, Jacob Carlborg wrote:
The makefile isn't updated, see [1]. Trying adding
"STABLE_DMD_VER=2.067.0" to the command you're running.
That won't work because someone thought it was a good idea to split the
download site per year :( . Try overriding "STABLE_DMD_URL" [1] instead
On 2015-04-18 20:52, Gary Willoughby wrote:
I'm trying to build the website from git master and i'm getting some
errors. Here is the last part of the output:
Any ideas what the issue is here?
The makefile isn't updated, see [1]. Trying adding
"STABLE_DMD_VER=2.067.0" to the command you're run
23 matches
Mail list logo