On Thursday, 21 December 2017 at 18:20:19 UTC, H. S. Teoh wrote:
Even calling GC.collect directly did not guarantee the DB
handle was closed at the right time. This may have been a bug
in my code that left dangling references to it, or perhaps the
array of Database handles was still scanned th
On Thursday, 21 December 2017 at 19:43:16 UTC, Steven
Schveighoffer wrote:
On 12/20/17 9:57 PM, Mike Franklin wrote:
[...]
It's implementation defined :)
The gist is, you cannot expect that destructors will be run in
a timely manner, or at all.
They may be called, and most of the time they
On Thursday, 21 December 2017 at 18:41:28 UTC, greatsam4sure
wrote:
I am having problem with running the examples of libuid on
Windows and how to use libuid on a project without errors. I am
using dmd version 2.076
Okay, but how are we supposed to help if you don't show us what
errors you get
On 21/12/2017 4:22 PM, Anonymouse wrote:
Cygwin is a reserved version[1], alongside Windows and linux and the
like. However it doesn't seem to be automatically recognised.
import std.stdio;
void main()
{
version(Cygwin) writeln("Cygwin");
}
Compiled from a Cygwin prompt this prints noth
On Friday, 22 December 2017 at 00:18:40 UTC, Seb wrote:
On Friday, 22 December 2017 at 00:12:45 UTC, Vino wrote:
On Thursday, 21 December 2017 at 06:31:52 UTC, Ali Çehreli
wrote:
[...]
Hi Ali,
Thank you very much, the pull request is in open state, so can
you please let me know when can we
On Friday, 22 December 2017 at 00:09:31 UTC, Mike Franklin wrote:
What condition(s) would cause a destructor for an object that
is managed by the GC to potentially not be called?
Here:
===
import std.stdio;
class Clazz {
~this() {
writeln("Class dest");
}
}
void
On Friday, 22 December 2017 at 00:12:45 UTC, Vino wrote:
On Thursday, 21 December 2017 at 06:31:52 UTC, Ali Çehreli
wrote:
On 12/19/2017 02:32 AM, Vino wrote:
> even though it is a simple code copy+paste
The change was a little more complicated than my naive
adaptation from std.algorithm.fold
On Thursday, 21 December 2017 at 06:31:52 UTC, Ali Çehreli wrote:
On 12/19/2017 02:32 AM, Vino wrote:
> even though it is a simple code copy+paste
The change was a little more complicated than my naive
adaptation from std.algorithm.fold. Here is the pull request:
https://github.com/dlang/p
On Thursday, 21 December 2017 at 19:43:16 UTC, Steven
Schveighoffer wrote:
The gist is, you cannot expect that destructors will be run in
a timely manner, or at all.
They may be called, and most of the time they are. But the
language nor the current implementation makes a guarantee that
the
On Thursday, 21 December 2017 at 00:32:50 UTC, codephantom wrote:
On Wednesday, 20 December 2017 at 13:41:06 UTC, Vino wrote:
Hi Ali,
Thank you very much, below are the observations, our program
is used to calculate the size of the folders, and we don't see
any improvements in the execution
On Wednesday, 20 December 2017 at 17:31:20 UTC, Ali Çehreli wrote:
On 12/20/2017 05:41 AM, Vino wrote:
> auto TL = dFiles.length;
> auto TP = new TaskPool(TL);
I assume dFiles is large. So, that's a lot of threads there.
> foreach (d; TP.parallel(dFiles[],1))
You tried with larger work unit s
On Thursday, 21 December 2017 at 18:48:38 UTC, H. S. Teoh wrote:
Alas, RefCounted doesn't work well with inheritance...
Oh? What's the issue?
Implicit casts don't work so you can't pass a RefCounted!Class as
RefCounted!Interface except in simple cases using alias this
tricks.
On 12/21/17 4:00 PM, kerdemdemir wrote:
I have a case like :
http://rextester.com/NFS28102
I have a factory method, I am creating some instances given some enums.
My question is about :
void PushIntoVector( BaseEnum[] baseEnumList )
{
Base[] baseList;
foreach ( tempEnum; baseEnumLis
I have a case like :
http://rextester.com/NFS28102
I have a factory method, I am creating some instances given some
enums.
My question is about :
void PushIntoVector( BaseEnum[] baseEnumList )
{
Base[] baseList;
foreach ( tempEnum; baseEnumList )
{
baseList ~= Factory(temp
On 12/20/17 9:57 PM, Mike Franklin wrote:
"Don't expect class destructors to be called at all by the GC"
I was a bit shocked to read that here:
https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors
The document tries to clarify with:
"The garbage collector is not guaranteed to
On Thu, Dec 21, 2017 at 06:45:27PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Thursday, 21 December 2017 at 18:20:19 UTC, H. S. Teoh wrote:
> > When the scoped destruction of structs isn't an option, RefCounted!T
> > seems to be a less evil alternative than an unreliable class dtor.
On Thursday, 21 December 2017 at 18:20:19 UTC, H. S. Teoh wrote:
When the scoped destruction of structs isn't an option,
RefCounted!T seems to be a less evil alternative than an
unreliable class dtor. :-/
Alas, RefCounted doesn't work well with inheritance...
Though, what you could do is make
I am having problem with running the examples of libuid on
Windows and how to use libuid on a project without errors. I am
using dmd version 2.076
On Thu, Dec 21, 2017 at 06:50:44AM +, Mike Parker via Digitalmars-d-learn
wrote:
[...]
> I just don't even bother with class destructors. Without a guarantee
> that they can run and without any sort of deterministic behavior, it's
> really not appropriate to refer to them as destructors and th
On Thursday, 21 December 2017 at 15:45:32 UTC, Adam D. Ruppe
wrote:
oh sorry i forgot to post this sooner here's my code so far.
when i'm reasonably happy with it, it will be part of my
simpledisplay.d. I might leave it undocumented, but if you
wanted to dive into my source the final version w
On Thursday, 21 December 2017 at 16:38:36 UTC, Anonymouse wrote:
On Thursday, 21 December 2017 at 16:25:00 UTC, Marc wrote:
For example, I'd like to declare a variable inside a static
foreach like in below code, just for better organization,
otherwise, I have to use the value directly instead o
On Thursday, 21 December 2017 at 16:25:00 UTC, Marc wrote:
For example, I'd like to declare a variable inside a static
foreach like in below code, just for better organization,
otherwise, I have to use the value directly instead of the
variable. If the value is used more than once, it might be
For example, I'd like to declare a variable inside a static
foreach like in below code, just for better organization,
otherwise, I have to use the value directly instead of the
variable. If the value is used more than once, it might be
inviable.
enum allMembers = __traits(derivedMemb
Cygwin is a reserved version[1], alongside Windows and linux and
the like. However it doesn't seem to be automatically recognised.
import std.stdio;
void main()
{
version(Cygwin) writeln("Cygwin");
}
Compiled from a Cygwin prompt this prints nothing. So I thought
to add versions: [ "Cyg
On Thursday, 21 December 2017 at 06:50:44 UTC, Mike Parker wrote:
On Thursday, 21 December 2017 at 04:10:56 UTC, user1234 wrote:
[...]
[...]
[...]
The root of the problem is that in D, class destruction and
finalization are conflated. It would be much more accurate to
refer to ~this in
On 12/20/17 7:52 PM, Nicholas Wilson wrote:
On Thursday, 21 December 2017 at 00:23:08 UTC, Steven Schveighoffer wrote:
On 12/20/17 6:01 PM, aliak wrote:
Hi, is there a way to remove a number of elements from an array by a
range of indices in the standard library somewhere?
I wrote one (code b
On Thursday, 14 December 2017 at 19:10:26 UTC, mrphobby wrote:
This looks pretty awesome and very much like something I was
looking for. Would really appreciate if you could share your
work. Otherwise I'll have to roll up my sleeves and try hacking
it on my own :)
oh sorry i forgot to post th
On Monday, 18 December 2017 at 07:55:25 UTC, Andrey wrote:
Hello!
I have a question about creating native GUI applications for
Windows 7 or/and Windows 10.
Hi,here is a very good native d gui lib,it's name is "dgui":
https://github.com/FrankLIKE/DguiT/
I fork and modify ,let it work on DM
On Thursday, 14 December 2017 at 19:10:26 UTC, mrphobby wrote:
On Thursday, 14 December 2017 at 14:07:25 UTC, Adam D. Ruppe
wrote:
I was playing with this myself based on Jacob's code and made
it look like this:
extern (Objective-C) interface ViewController :
NSViewController {
exter
On Thursday, 21 December 2017 at 14:26:55 UTC, Guillaume Piolat
wrote:
On Thursday, 21 December 2017 at 06:50:44 UTC, Mike Parker
wrote:
That's what I've taken to doing manually, by implementing a
`terminate` function in my classes that I either call directly
or via a ref-counted templated stru
On Thursday, 21 December 2017 at 06:50:44 UTC, Mike Parker wrote:
That's what I've taken to doing manually, by implementing a
`terminate` function in my classes that I either call directly
or via a ref-counted templated struct called Terminator.
I feel like I'm rambling but..
The problem with
On Thursday, 21 December 2017 at 00:52:29 UTC, Nicholas Wilson
wrote:
On Thursday, 21 December 2017 at 00:23:08 UTC, Steven
Schveighoffer wrote:
I'm assuming here indices is sorted? Because it appears you
expect that in your code. However, I'm going to assume it
isn't sorted at first.
auto
hi Davis,
Thanks for your great help to me!
Yeah, the library may had a design principle when it was
designed, as you can see the buffer appender is not that suitable
for an application-defined structured data packing.
And after I turn to the bitfield, I then got another trouble:
The bitfie
On 2017-12-21 05:12, Venkat wrote:
I did a fresh clone of dmd and added that as a dependency. That fixed
it. Should've thought of it !! Thankyou.
Great that it works :)
--
/Jacob Carlborg
On Monday, December 18, 2017 08:45:32 Binghoo Dang via Digitalmars-d-learn
wrote:
> hi Davis,
>
> I read the std.bitmanip, and I tried to test the code like below:
>
> ```
> import std.stdio;
> import std.array;
> import std.bitmanip;
> void main(string[] args)
> {
> align(1) struct c {
>
On Monday, December 18, 2017 05:32:02 Binghoo Dang via Digitalmars-d-learn
wrote:
> Thanks for your idea.
>
> On Monday, 18 December 2017 at 05:08:24 UTC, Jonathan M Davis
>
> wrote:
> >> ubyte[] makeCMDPacket(RCPCmd cmd, in ubyte[] data)
> >> {
> >>
> >> this.preamb
On Thursday, 21 December 2017 at 10:49:46 UTC, Dan Partelly wrote:
I started to look into D very recently. I would like to know
the following, if you guys are so nice to help me:
1. What is the performance of D's GC, what trade-offs where
done in design , and if a in-deep primer on efficient
On Thursday, 21 December 2017 at 10:49:46 UTC, Dan Partelly wrote:
I started to look into D very recently. I would like to know
the following, if you guys are so nice to help me:
1. What is the performance of D's GC, what trade-offs where
done in design , and if a in-deep primer on efficient
On 21/12/2017 10:49 AM, Dan Partelly wrote:
I started to look into D very recently. I would like to know the
following, if you guys are so nice to help me:
1. What is the performance of D's GC, what trade-offs where done in
design , and if a in-deep primer on efficient usage and gotchas of t
I started to look into D very recently. I would like to know the
following, if you guys are so nice to help me:
1. What is the performance of D's GC, what trade-offs where done
in design , and if a in-deep primer on efficient usage and
gotchas of the current implementation exists.
2. GC is
On Thursday, 21 December 2017 at 06:47:25 UTC, Ali Çehreli wrote:
On 12/20/2017 10:36 PM, Chris Katko wrote:
Is there any way to get a warning anytime an implicit super
constructor is called in a sub-class/child-class?
There can be a number of solutions but can you please
demonstrate the issu
On Wed, 2017-12-20 at 22:31 -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 12/19/2017 02:32 AM, Vino wrote:
>
> > even though it is a simple code copy+paste
>
> The change was a little more complicated than my naive adaptation
> from
> std.algorithm.fold. Here is the pull request:
>
>
On 21.12.17 08:41, Jonathan M Davis wrote:
> I would think that it would make a lot more sense to simply put the whole
> thing in an array than to use memoize. e.g.
>
> auto arr = iota(1, 5).map!parse().array();
thats also possible, but i wanted to make use of the laziness ... e.g.
if i then searc
43 matches
Mail list logo