x.RC.__postblit () is not callable using argument types () const

2013-02-04 Thread Dan
ntroduction of opEquals on a struct History with no relationship to RC causes an error to show for RC. Thanks Dan

Re: x.RC.__postblit () is not callable using argument types () const

2013-02-04 Thread Dan
ng it took me cull the code to the offending and I still don't understand the error. Thanks Dan

Re: x.RC.__postblit () is not callable using argument types () const

2013-02-05 Thread Dan
d? Well, the only relation is their aggregation in BSItem. Baffling. Any suggestions appreciated. Thanks Dan

Re: x.RC.__postblit () is not callable using argument types () const

2013-02-05 Thread Dan
ics coupled with copy on write semantics where needed. That approach, just does not seem worth it without more systematic support for COW. Assuming postblits are the issue, I don't understand why they are so hard to get right. Thanks Dan

Re: x.RC.__postblit () is not callable using argument types () const

2013-02-05 Thread Dan
TDPL, or newsgroup) led you to this solution and for how long will it be valid? Where can I read more on it? Thanks Dan

best idiom for insert if not present; else use value in assoc array

2013-02-07 Thread Dan
welcome. Also, an FYI to dpaste maintainer that the compiler service has been unavailable for a while. Thanks Dan

Re: best idiom for insert if not present; else use value in assoc array

2013-02-07 Thread Dan
hen on the first insert for a given key the hash is computed just once. I believe this would have to be done at the level of AssociativeArray and can not be done as a helper function, since this set helper is still doing 3 hashes/lookups. Thanks Dan

what is special about unittest constants

2013-02-08 Thread Dan
hat is the reason for the difference between unittest constants and module constants? Thanks, Dan

Re: best idiom for insert if not present; else use value in assoc array

2013-02-09 Thread Dan
On Saturday, 9 February 2013 at 00:54:58 UTC, Andrej Mitrovic wrote: Feel free to file an enhancement request. http://d.puremagic.com/issues/show_bug.cgi?id=9491 Hopefully that is clear.

rdmd hung?

2013-02-15 Thread Dan
? - on linux is there a way, once in this state to provide any information that would be helpful. strace during on a complete run could help - but it is too late for that. Thanks Dan

Re: std.container.RedBlackTree versus C++ std::set

2013-02-15 Thread Dan
specially with structs. For structs we could use compile time reflection to provide automatic efficient opCmp behavior. Section 3.1 here outlines a way: https://github.com/patefacio/d-help/blob/master/doc/canonical.pdf Any comments appreciated. Thanks Dan HOWEVER, when you get to th

Re: std.container.RedBlackTree versus C++ std::set

2013-02-15 Thread Dan
ed a transitive copy. Thanks Dan

Re: std.container.RedBlackTree versus C++ std::set

2013-02-15 Thread Dan
n not know the cost of postblit - or copy construction if that were a future solution for structs. Granted the no rvalue passing is a pain - but is it a big deal in library/generic code? Thanks, Dan

Re: std.container.RedBlackTree versus C++ std::set

2013-02-15 Thread Dan
{ if ( sMy point was, you can use compile time reflection to generate a suitable opCmp that uses s.opCmp if it exists or does the long version of two comparisons if not. Thanks Dan

Re: std.container.RedBlackTree versus C++ std::set

2013-02-16 Thread Dan
ase them out 1 or more years after successful implementation of copy constructors - Often the only purpose of the copy constructor is to do a deep copy. This could easily be provided by the compiler or phobos. Further, consider standardizing on the ".dup" and ".idup" conventions for this purpose. Thanks Dan

initializing const(Date)

2013-03-19 Thread Dan
: /opt/compilers/dmd2/include/std/datetime.d(13542): Error: Internal Compiler Error: CTFE literal cast(short)1 dmd: ctfeexpr.c:353: Expression* copyLiteral(Expression*): Assertion `0' failed. Thanks Dan

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
b.com/patefacio/d-help/blob/master/d-help/opmix/mix.d Thanks Dan

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
On Tuesday, 19 March 2013 at 20:28:09 UTC, Jonathan M Davis wrote: Those are what opEquals, opCmp, and toHash are for. It might make sense to define mixins which implement them for you (dealing with whatever recursive semantics are necessary), but using external functions for those just isn't

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
matter how clever your external functions for comparing objects or generating hashes are, they're not going to work with the built-in AAs. Any type which is going to work with the built-in AAs must define opEquals and toHash. The above works with the built-in AAs. Please offer an example. Thanks Dan

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
On Tuesday, 19 March 2013 at 23:13:19 UTC, Jonathan M Davis wrote: On Tuesday, March 19, 2013 22:43:10 Dan wrote: The above works with the built-in AAs. Please offer an example. It works because the outer type defines toHash. Without toHash, the built-in AAs won't work. If you'

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
On Wednesday, 20 March 2013 at 02:03:31 UTC, Jonathan M Davis wrote: We already get this. That's what == does by default. It's just that it uses == on each member, so if == doesn't work for a particular member variable and the semantics you want for == on the type it's in, you need to override

Re: recursive equal, and firstDifference functions

2013-03-19 Thread Dan
On Wednesday, 20 March 2013 at 02:54:23 UTC, Jonathan M Davis wrote: On Wednesday, March 20, 2013 03:48:38 Dan wrote: On Wednesday, 20 March 2013 at 02:03:31 UTC, Jonathan M Davis wrote: > We already get this. That's what == does by default. It's > just > that it uses == &

Re: recursive equal, and firstDifference functions

2013-03-20 Thread Dan
. Semantically deep equality is comfortable to me, but I would imagine by now there is a fair amount of code that might rely on a false result from opEquals if the members (slices, associative arrays) are not bitwise the same. Thanks Dan

looking for V[string] workarounds

2013-03-20 Thread Dan
ed by the asset name. Thanks, Dan import std.stdio; struct Series { // REQUIRED - need to have no aliasing this(this) { data = data.dup; } private double[] data; } struct Assets { this(this) { itemToSeries.dup; } // REQUIRED - want ctor to dup arg to ensure no aliasing this(const(S

Re: looking for V[string] workarounds

2013-03-20 Thread Dan
passed in, due to const transitivity. So that requirement would ripple a change to all already const correct instances to now need to flip to non-const. I'm looking for a const correct solution. It should be doable ... I just have had no luck with it. Thanks Dan

initializing const maps with value types having aliasing

2013-03-20 Thread Dan
The following works and is the only way I have found to initialize m. Unfortunately it requires the cast. Is this safe to do? Is there a better way? Is this a bug or are future features coming to clean it up? Thanks Dan -- import std.stdio; struct S { this

Re: initializing const maps with value types having aliasing

2013-03-20 Thread Dan
work for associative arrays? -- import std.exception; struct S { this(this) { x = x.dup; } char[] x; } immutable S[string] aa; static this() { // now what } Thakns Dan

Re: looking for V[string] workarounds

2013-03-20 Thread Dan
On Wednesday, 20 March 2013 at 17:44:16 UTC, Ali Çehreli wrote: In that case, brute force to the rescue (nc stands for non-const): :) this(const(Series[string]) source) { auto nc_source = cast(Series[string])source; itemToSeries = nc_source.dup; } Wow - that worked. Thanks! I h

static functions associated with enums

2013-03-21 Thread Dan
)) ) Thanks Dan --- static void fromJson(ref AssetCategory assetType, Json src) { string value = cast(string)src; writeln("value is ",value); final switch(value) { case "Investment": { assetType = AssetCategory.Investment; break; } case "Prima

Orange lib help

2013-03-26 Thread Dan
.__aggr2839 inout variables can only be declared inside inout functions I can't seem to find any answers in the documentation. Anybody could help me out? thanks dan

Re: Orange lib help

2013-03-27 Thread Dan
On Tuesday, 26 March 2013 at 19:35:51 UTC, Jacob Carlborg wrote: I'll take a look. Which compiler and version are you using? DMD64 D Compiler v2.062 ubuntu 64 bit thanks!

Re: debugging on Mac OSX

2013-04-29 Thread Dan
On Monday, 29 April 2013 at 16:48:27 UTC, Jacob Carlborg wrote: On 2013-04-29 14:45, Daniel Davidson wrote: Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? This thread seems to bring up the issue I am

in / out for C++ programmers

2012-03-23 Thread Dan
When would you use in / out parameters instead of ref & const keywords? Thanks.

Comparing D structs

2009-05-17 Thread Dan
Structs can't easily be compared in C because of potential 'padding' inside the struct which may (or may not) exist. I was jut wondering if D somehow gets round this, and allows something like memcmp to easily compare two structs.

Re: Comparing D structs

2009-05-17 Thread Dan
array) may have padding while others don't, or perhaps they have different size paddings. Dan Jarrett Billingsley Wrote: > On Sun, May 17, 2009 at 3:55 PM, Dan wrote: > > Structs can't easily be compared in C because of potential 'padding' inside > > the

Re: Comparing D structs

2009-05-17 Thread Dan
Jarrett Billingsley Wrote: > On Sun, May 17, 2009 at 5:00 PM, Dan wrote: > > That sounds great, and seems like yet another reason for me to switch to D > > (other than the removal of header files which always seemed like a kludge). > > > > Just for the record though,

Export static data

2009-08-21 Thread Dan
Is there a way to export static data from a DLL written in D? I'd like to write some extension DLLs for a program, but they need to have certain static data exports to be recognized. I've been able to export functions, but no data appears in the export table of the DLL. In MSVC 6 I can do it as

Operators overloading in D2

2010-04-24 Thread Dan
r compiles both the functions, even considering this I assume it's not safe to use the old D1 way, right? Oh, and I've found the documentation really confusing on this metter. Thanks, Dan

Re: Operators overloading in D2

2010-04-26 Thread Dan
eally hope this language will have a bright future. Dan

Re: Operators overloading in D2

2010-05-01 Thread Dan
That would be great. Thanks again

Operators overloading in D2 again

2010-05-01 Thread Dan
assert (t3.x = 3.0); return 0; } Thanks, Dan

Re: Operators overloading in D2 again

2010-05-03 Thread Dan
Hi, it certainly helps. However I can't help myself, I still thinking that this is the most complicated, hard read and to understand way to overload operators. Maybe there is something I'm missing but I can't really see the reason of all that. Other languages adopts a much easier approach, for e

Re: Operators overloading in D2 again

2010-05-03 Thread Dan
or pretty much everything, I'm just having hard time with this operators overloading... Thanks for you help guys, Dan

Memory mapped IO

2011-01-09 Thread Dan Olson
I'm exploring D for embedded work as a nice alternative to C/C++ for the 32-bitters and am finding it has a nice set of features. But, what is the best way handle memory mapped IO? I don't see volatile like in C. Is writing asm {} the best way to ensure memory access? Thanks, Dan Olson

Re: Memory mapped IO

2011-01-10 Thread Dan Olson
"Lars T. Kyllingstad" writes: > On Sun, 09 Jan 2011 22:44:44 -0800, Dan Olson wrote: > >> I'm exploring D for embedded work as a nice alternative to C/C++ for the >> 32-bitters and am finding it has a nice set of features. But, what is >> the best wa

Re: How to wrap SDL?

2011-01-23 Thread Dan Olson
lure > > But these can't be passed to functions either, meaning I can't pass a Screen, > Text, or Font wrapper around, all of which I use in my project! It should be ok to pass A to a function for temporary use. { auto a1 = scoped!A(); dostuff(a1); } void dostuff(A a) { // .. but don't hang on to 'a' because dtor will be eventually called } Dan

Re: Structs with pointers?

2011-01-23 Thread Dan Olson
bearophile writes: >> Is this another compiler bug? > > The situation is nice: > > struct Foo1 {} > struct Foo2 { int x; } > const struct Foo3 { int* p; } > struct Foo4 { int* p; } > void bar1(Foo1 f) {} > void bar2(Foo2 f) {} > void bar3(Foo3 f) {} > void bar4(Foo4 f) {} > void main() { > co

Re: Nested function declarations

2011-01-30 Thread Dan Olson
dennis luehring writes: >> They're useful for testing: >> >> unittest { >> int foo(); >> static assert (is(ReturnType!foo == int)); >> } > > and else? is it worth? Don't class function declarations have the same issue? You can declare but all you'll get is a link error. Unless there

Re: Are function pointers compile time constants?

2011-02-26 Thread Dan Olson
al function reference through the pointer. Dan

Re: Multiple assignment

2011-02-26 Thread Dan Olson
given is: i = i++; None of this is stuff you'd normally want to write unless entering an obfuscated programming contest, but Java's rules say if i = 42, 'i' will end up still being 42. Dan

Win7 64-bit

2011-03-01 Thread Dan McLeran
I am running the dmd2 compiler on my Win7 64 bit machine and everything appears to work except the -cov switch. i cannot seem to generate a .lst file. any ideas? thanks dan mcleran

Re: Win7 64-bit

2011-03-01 Thread Dan McLeran
never mind, i got it. i had to pass the switches: -D -unittest -cov life is hard. it's even harder when you're dumb.

Re: How do I iterate over enum members at runtime?

2011-04-10 Thread Dan Olson
> foreach (m; __traits(allMembers, Metrics)) > { > foo(mixin("Metrics." ~ m)); > } > } I'm exploring more and found there is also std.traits.EnumMembers. It's a little simpler: foreach (m; EnumMembers!Metrics)) { foo(m); } And for number of members in enum Metrics EnumMembers!Metrics.length -- Dan

Re: Not true for Java about Function Hijacking.

2011-05-26 Thread Dan Olson
s flags this case, but I think it will go unnoticed if your builds are done with something like ant and javac. -- Dan Olson

Re: DMD Backend: Deciding instructions to use/avoid?

2011-06-05 Thread Dan Olson
on linux and don't know how it passes options to ld. You can use objdump to show if a .gnu.hash section is being used. And on older systems, the man page for ld won't list --hash-style. -- Dan

Re: const main args?

2011-08-20 Thread Dan Olson
mimocrocodil <4deni...@gmail.com> writes: > I seen what sendmail actually changes they arguments of command line for nice > output of "ps ax" command. > > May be it changes his argc/argv for this? Yes. Some unix C programs, daemons usually, modify argv to change what ps shows. It works with D

clear bug?

2011-09-04 Thread Dan Olson
r the deprecated delete. Dan =-=-= Sample: import std.stdio; class A { string name = "none"; void print() {writeln(name);} } void main() { A a = new A; a.print(); // none a.name = "xyzzy"; a.print(); // xyzzy

Re: clear bug?

2011-09-05 Thread Dan Olson
) was to clean up but leave the thing in an initialized state. And because clear() on dynamic arrays and other types seems to be be intended to leave you with a valid and initialized object. Or is that not true? Dan

Debug on OSX?

2011-09-05 Thread Dan Olson
I tried dmd -gc like on linux but gdb on OSX doesn't seem happy. Is there a way to get the debuger to work with dmd on OSX? Thanks, Dan

Re: Can D still compile html files? Seems not.

2013-02-26 Thread Dan Olson
Maybe you want Knuth's Literate Programming. http://en.wikipedia.org/wiki/Literate_programming Long ago it was only for pascal and C (web and cweb), but now I see there is noweb that works with any programming language. -- Dan

Re: Tricky code with exceptions

2013-05-09 Thread Dan Olson
"evilrat" writes: > On Thursday, 9 May 2013 at 20:33:17 UTC, bearophile wrote: >> Brad Anderson: >> >>> a 64-bit Windows dmd build did not crash and here is the output. >> >> Thank you for the data point. So maybe the problem is only on 32 bit >> Windows. >> >> Bye, >> bearophile > > win8 dmd 2.0

sending an Exception and print it

2013-12-21 Thread Dan Killebrew
I'm sending an exception from a worker thread to the owner thread to be logged/printed. Using DMD64 D Compiler v2.064 http://dpaste.dzfl.pl/7c8b68bd Using std.concurrency prevents me from passing a naked Exception. So the owner receives either a shared or immutable Exception. I can't format a sh

Re: sending an Exception and print it

2013-12-21 Thread Dan Killebrew
I just wanted to add that the "can't format immutable Exception" also prevents me from doing this: auto exception = receiveOnly!(immutable Exception)(); because receiveOnly creates a tuple which implements a toString that uses indirectly uses formatObject. So I'm forced to use the slightly mo

Re: Idiomatic way to share mutable data?

2013-12-23 Thread Dan Killebrew
On Sunday, 22 December 2013 at 21:07:11 UTC, Charles McAnany wrote: Friends, I'm writing a little molecular simulator. Without boring you with the details, here's the gist of it: struct Atom{ double x, vx; double interaction(Atom a2){ return (a2.x-this.x)^^2; //more complicated

mixin template

2014-01-27 Thread Dan Killebrew
What is the difference between: A --- template Foo() { int x = 5; } B - mixin template Foo() { int x = 5; } The full example is from the first code sample on http://dlang.org/template-mixin.html Both A and B compile and when run, have the exact same output. So how is '

Re: std.json tree navigation help

2014-01-27 Thread Dan Killebrew
Check out the json module in vibe.d. Maybe copy it into your own application (since it can't be used as a library, yet). http://vibed.org/api/vibe.data.json/ https://github.com/rejectedsoftware/vibe.d

Re: mixin template

2014-01-27 Thread Dan Killebrew
Found this: http://forum.dlang.org/thread/ntuysfcivhbphnhnn...@forum.dlang.org#post-mailman.1409.1339356130.24740.digitalmars-d-learn:40puremagic.com If what Jonathan says is true, then http://dlang.org/template-mixin.html should be updated: s/mixin template/template/

Re: mixin template

2014-01-30 Thread Dan Killebrew
mixin template Foo(alias a){ alias Foo=a; } pragma(msg, Foo!2); // error template Bar(alias a){ alias Bar=a; } pragma(msg, Bar!2); // ok Perhaps I was unclear. What I meant: What does 'mixin template' do that 'template' does not? Where would I use 'mixin template'? As far as I can tell, 'mixin

Re: mixin template

2014-01-30 Thread Dan Killebrew
On Friday, 31 January 2014 at 06:24:27 UTC, Dan Killebrew wrote: mixin template Foo(alias a){ alias Foo=a; } pragma(msg, Foo!2); // error template Bar(alias a){ alias Bar=a; } pragma(msg, Bar!2); // ok As far as I can tell, 'mixin template' does nothing new; (besides fail to

Re: std.parallelism: How to wait all tasks finished?

2014-02-02 Thread Dan Killebrew
// Next line will block execution until all tasks already in queue finished. // Almost all what I need, but new tasks will not be started. taskPool.finish(true); } Are you sure TaskPool.finish isn't what you're looking for? "Signals worker threads to terminate when the queue becomes emp

Re: std.parallelism: How to wait all tasks finished?

2014-02-03 Thread Dan Killebrew
It seems to me that worker threads will continue as long as the queue isn't empty. So if a task adds another task to the pool, some worker will process the newly enqueued task. No. After taskPool.finish() no way to add new tasks to the queue. taskPool.put will not add new tasks. Then perhaps

Freeing of memory (garbage collection)

2008-12-08 Thread Dan W
A couple of questions: 1: Even though D has an automatic garbage collector, is one still allowed to free the memory of a malloced array manually (using free () ), to avoid pauses in the program? 2: One justification on the website for using automatic garbage collection is how "allocated memory wi

Function which returns a sorted array without duplicates

2023-01-21 Thread dan via Digitalmars-d-learn
). Here's the usage: ```d void main( ) { uint[] nums = [1, 3, 2, 5, 1, 4, 2, 8]; auto sorted = _sort_array( nums ); import std.stdio; writeln( "Input: ", nums ); writeln( "Output: ", sorted ); } ``` Thanks in advance for any info! dan

Re: Function which returns a sorted array without duplicates

2023-01-22 Thread dan via Digitalmars-d-learn
On Sunday, 22 January 2023 at 07:33:01 UTC, evilrat wrote: On Sunday, 22 January 2023 at 04:42:09 UTC, dan wrote: I would like to write a function which takes an array as input, and returns a sorted array without duplicates. ```d private S[] _sort_array( S )( S[] x ) { import

Want a function that determines a double or float given its 80-bit IEEE 754 SANE (big endian) representation

2023-08-22 Thread dan via Digitalmars-d-learn
t the remaining 8 bytes to a fractional part, perhaps ignoring the last 2 or 3 as not being significant. But --- it seems like this kind of task may be something that d already does, maybe with some constructor of a double or something. Thanks in advance for any suggestions. dan

Re: Want a function that determines a double or float given its 80-bit IEEE 754 SANE (big endian) representation

2023-08-23 Thread dan via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 03:24:49 UTC, z wrote: On Tuesday, 22 August 2023 at 22:38:23 UTC, dan wrote: Hi, I'm parsing some files, each containing (among other things) 10 bytes said to represent an IEEE 754 extended floating point number, in SANE (Standard Apple Numerical Enviro

Forcing my module to be initialized first

2023-10-15 Thread dan via Digitalmars-d-learn
runtime starts?) Although i would prefer to code in d, it would be ok to do it in c. This is on MacOS (Catalina) in case that makes a difference, and i'm using dmd v2.104.0. Thanks in advance for any clues. dan

Re: Forcing my module to be initialized first

2023-10-15 Thread dan via Digitalmars-d-learn
On Monday, 16 October 2023 at 03:33:55 UTC, Richard (Rikki) Andrew Cattermole wrote: On 16/10/2023 4:31 PM, dan wrote: I suppose if i could figure out a way to make all other modules depend on my module this would happen, but the module which uses the variable i want to set is in some already

Re: Forcing my module to be initialized first

2023-10-15 Thread dan via Digitalmars-d-learn
On Monday, 16 October 2023 at 04:26:32 UTC, Paul Backus wrote: On Monday, 16 October 2023 at 03:31:13 UTC, dan wrote: I have some code that i would like executed before anything else is. The code is to set an environment variable which is used by a library. I'm trying to find some w

Re: Forcing my module to be initialized first

2023-10-16 Thread dan via Digitalmars-d-learn
constructor pragma. (Now, i still think that when module initialization order is not forced, it should be something a programmer or systems integrator can choose, but i don't want to be too greedy.) Thanks again for your help!! dan

Re: Setting GTK_BASEPATH for gtkd

2023-10-16 Thread dan via Digitalmars-d-learn
On Monday, 16 October 2023 at 18:57:45 UTC, bachmeier wrote: On Monday, 16 October 2023 at 18:28:52 UTC, dan wrote: (Now, i still think that when module initialization order is not forced, it should be something a programmer or systems integrator can choose, but i don't want to be too g

formatting a float or double in a string with all significant digits kept

2019-10-08 Thread dan via Digitalmars-d-learn
But i would like to be able to do this without knowing the expansion of pi, or writing too much code, especially if there's some d function like writeAllDigits or something similar. Thanks in advance for any pointers! dan

Re: formatting a float or double in a string with all significant digits kept

2019-10-10 Thread dan via Digitalmars-d-learn
On Wednesday, 9 October 2019 at 10:54:49 UTC, David Briant wrote: On Tuesday, 8 October 2019 at 20:37:03 UTC, dan wrote: I have a double precision number that i would like to print all significant digits of, but no more than what are actually present in the number. Or more exactly, i want to

Re: formatting a float or double in a string with all significant digits kept

2019-10-10 Thread dan via Digitalmars-d-learn
On Thursday, 10 October 2019 at 22:44:05 UTC, H. S. Teoh wrote: On Thu, Oct 10, 2019 at 09:13:05PM +, Jon Degenhardt via Digitalmars-d-learn wrote: On Thursday, 10 October 2019 at 17:12:25 UTC, dan wrote: > Thanks also berni44 for the information about the dig > attribute, Jon >

a function like writeln that returns a string rather than writes to a file

2020-05-01 Thread dan via Digitalmars-d-learn
te/writeln apparatus? My only real requirement is that it be something really easy to do. Thanks in advance for any pointers. dan

Re: a function like writeln that returns a string rather than writes to a file

2020-05-01 Thread dan via Digitalmars-d-learn
On Saturday, 2 May 2020 at 02:29:43 UTC, H. S. Teoh wrote: On Sat, May 02, 2020 at 02:22:42AM +, dan via Digitalmars-d-learn wrote: I'm looking for a function something like writeln or write, but instead of writing to stdout, it writes to a string and returns the s

Re: a function like writeln that returns a string rather than writes to a file

2020-05-01 Thread dan via Digitalmars-d-learn
On Saturday, 2 May 2020 at 02:49:04 UTC, Steven Schveighoffer wrote: On 5/1/20 10:40 PM, dan wrote: On Saturday, 2 May 2020 at 02:29:43 UTC, H. S. Teoh wrote: On Sat, May 02, 2020 at 02:22:42AM +, dan via Digitalmars-d-learn wrote: [...] [...] import std.format : format; string

Re: a function like writeln that returns a string rather than writes to a file

2020-05-02 Thread dan via Digitalmars-d-learn
On Saturday, 2 May 2020 at 10:36:47 UTC, Ali Çehreli wrote: On 5/1/20 7:40 PM, dan wrote:> On Saturday, 2 May 2020 at 02:29:43 UTC, H. S. Teoh wrote: >> On Sat, May 02, 2020 at 02:22:42AM +, dan via Digitalmars-d-learn >> wrote: >>> I'm looking for a function so

which free operating systems have a gtkd package?

2021-01-22 Thread dan via Digitalmars-d-learn
ge for it, but man i could sure be wrong.) Thanks in advance for any info! dan

running a d compiler on the Mac Mini with an M1 chip

2021-03-26 Thread dan via Digitalmars-d-learn
Are there any d compilers that run natively on the Mac Mini with an M1 chip? If so, does anybody here have any experience with them that can be shared? If not, and your machine is a mac mini, how would you go about programming in d on it? TIA for any info!

Re: running a d compiler on the Mac Mini with an M1 chip

2021-03-26 Thread dan via Digitalmars-d-learn
On Friday, 26 March 2021 at 21:54:20 UTC, rikki cattermole wrote: On 27/03/2021 10:51 AM, dan wrote: Are there any d compilers that run natively on the Mac Mini with an M1 chip? If so, does anybody here have any experience with them that can be shared? If not, and your machine is a mac

How do i find a list of the methods Object implements, or maybe just locate the 'write' method?

2017-11-07 Thread dan via Digitalmars-d-learn
just what methods Object implements, and what those methods do. Thanks in advance for any clues, or a pointer to page 1 of the manual if it's there and i'm just being dense. dan

Re: How do i find a list of the methods Object implements, or maybe just locate the 'write' method?

2017-11-07 Thread dan via Digitalmars-d-learn
On Tuesday, 7 November 2017 at 21:32:26 UTC, Adam D. Ruppe wrote: On Tuesday, 7 November 2017 at 21:25:00 UTC, dan wrote: I looked in my distribution's object.d (debian stretch, gdc, in Did you import std.stdio in the file? If so, it is calling the std.stdio.write on the object (th

Looking for a language to hang my hat on.

2015-11-16 Thread Dan via Digitalmars-d-learn
the transition. Can anyone here who has already made that transition tell me how smoothly it went? Any major unexpected problems? Advice? thanks! Dan

Re: Looking for a language to hang my hat on.

2015-11-17 Thread Dan via Digitalmars-d-learn
Thanks everyone for taking the time to respond! @Lobo, Start using D now. It's not all or nothing so you don't have to give up on C++. I have several projects that contain both C++ and D intermixed. Using both does seem like a good way to transition. I could combine the strengths of D with

Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread dan via Digitalmars-d-learn
"no" (the only relevant type qualifiers are private, package, protected, public, and export, and none seem appropriate). (This effect could be simulated by making my_var into a function, but i don't want to do that.) TIA for any info! dan

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-21 Thread dan via Digitalmars-d-learn
Thanks Vit, Meta, and Yuxuan for your speedy help! So 3 pieces to put together, function, const, and @property (and i guess final for protection against subclasses).

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-23 Thread dan via Digitalmars-d-learn
On Monday, 23 May 2016 at 07:03:08 UTC, chmike wrote: On Saturday, 21 May 2016 at 17:32:47 UTC, dan wrote: (This effect could be simulated by making my_var into a function, but i don't want to do that.) May I ask why you don't want to do that ? In D you can call a function wi

standard alias for a class name inside the class code?

2016-05-28 Thread dan via Digitalmars-d-learn
piled language wouldn't want to provide this feature. (But the php interpreter, whatever else is good or bad about it, does let you write 'new self(...)' and does the right thing with it.) TIA for any clues. dan

Re: standard alias for a class name inside the class code?

2016-05-28 Thread dan via Digitalmars-d-learn
On Sunday, 29 May 2016 at 00:28:13 UTC, Mithun Hunsur wrote: On Sunday, 29 May 2016 at 00:14:17 UTC, dan wrote: Is there a standard alias for a class name inside class code? Something like 'this' referring to a class instance, but referring instead to the class itself? [...] t

<    1   2   3   >