Re: Simple GEdit .lang github color scheme

2012-09-22 Thread F i L
deadalnix wrote: Sound nice. How can I use that on my computer ? What do I do with the files ? You need to move the files into their 'gtksourceview-3.0' folders. On Linux (and other OS's should be similar), do: 1. find or create the following user directories:

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Nick Sabalausky
Stepping back for a moment, I think we're facing two key issues here: The first key issue is that the docs for std.benchmark don't adequately explain Andre's intended charter/scope for it, it's methodology or the rationale for its methodology. So people see benchmark and they think oh, ok, for

Re: [OT] Was: totally satisfied :D

2012-09-22 Thread Paulo Pinto
On Friday, 21 September 2012 at 21:37:23 UTC, Nick Sabalausky wrote: On Fri, 21 Sep 2012 22:13:22 +0200 Paulo Pinto pj...@progtools.org wrote: On Friday, 21 September 2012 at 19:09:48 UTC, H. S. Teoh wrote: The saddest thing is that people are paying big bucks for this kind of enterprise

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Simen Kjaeraas
On 2012-21-09 22:58:36, Andrei Alexandrescu wrote: On 9/21/12 5:39 AM, Jacob Carlborg wrote: After your replay to one of Manu's post, I think I misunderstood the std.benchmark module. I was thinking more of profiling. But are these quite similar tasks, couldn't std.benchmark work for both?

Re: Infer function template parameters

2012-09-22 Thread Simen Kjaeraas
On 2012-09-21, 21:29, Jonas Drewsen wrote: A mentioned in the proposal (albeit not very clear) it requires non-templated function definitions to include both type and param names. If only one name is provided in a definition is always a param name. Unfortunately this is a breaking change

Re: [OT] Was: totally satisfied :D

2012-09-22 Thread Nick Sabalausky
On Fri, 21 Sep 2012 15:37:46 -0700 H. S. Teoh hst...@quickfur.ath.cx wrote: The sad part is that so many of the commenters have no idea that adjacent C literals are concatenated at compile-time. It's a very nice way to put long strings in code and have it nicely indented, something that is

Re: Extending unittests [proposal] [Proof Of Concept]

2012-09-22 Thread Johannes Pfau
Am Fri, 21 Sep 2012 23:15:33 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: I like the BOOST unit test library's approach, which has two types of assert: BOOST_CHECK and BOOST_REQUIRE. After a BOOST_CHECK fails, the test keeps running, but BOOST_REQUIRE throws an exception to stop the

It's always something

2012-09-22 Thread Walter Bright
I just spent about 3 hours tracking down the strangest problem. Win64 exception handling would work fine, but when I'd turn on -g, it would crash. At first I thought I'm generating a bad object file with -g. But since dmd isn't emitting any Win64 symbolic debug info, a check shows the object

Re: LDC blacklisted in Ubuntu

2012-09-22 Thread Russel Winder
On Fri, 2012-09-21 at 21:00 +0100, Joseph Rushton Wakeling wrote: […] Isn't it worth someone from the LDC team discussing with the Ubuntu people concerned (e.g. the person who decided to blacklist the package) and try and get their feedback and advice on packaging? My experience is that

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Jacob Carlborg
On 2012-09-21 21:59, Andrei Alexandrescu wrote: I think you have discovered a major issue. Ideas on how to attack this? The standard way to solve this would be to move the initialization code from a static constructor to a function what will be called and do the initialization lazy. But

Re: Extending unittests [proposal] [Proof Of Concept]

2012-09-22 Thread Jacob Carlborg
On 2012-09-21 22:57, Jens Mueller wrote: Test::Unit, the default testing framework for Ruby on Rails prints a dot for each successful test. That is fine. But you don't need the name of the unittest then. I'm just saying that different testing library to things differently. There are

Re: Extending unittests [proposal] [Proof Of Concept]

2012-09-22 Thread Jacob Carlborg
On 2012-09-21 23:11, Jens Mueller wrote: But if you have an assert in some algorithm to ensure some invariant or in a contract it will be handled by myUnitTestSpecificAssertHandler. But I think that is not a drawback. Don't you want to no whenever an assert is violated? Oh, you mean like

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Øivind
On Friday, 21 September 2012 at 20:43:13 UTC, Jonathan M Davis wrote: On Friday, September 21, 2012 15:59:31 Andrei Alexandrescu wrote: On 9/19/12 4:11 PM, Øivind wrote: New question for you :) To register benchmarks, the 'scheduleForBenchmarking' mixin inserts a shared static

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Andrei Alexandrescu
On 9/22/12 8:28 AM, Øivind wrote: Is there a way to solve the dependency issue without forbidding static constructors in modules with cyclic dependencies? I think an idea just occurred to me. The rules for static ctors and dtors were invented before import was allowed inside a scope. We could

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Øivind
On Saturday, 22 September 2012 at 13:03:06 UTC, Andrei Alexandrescu wrote: On 9/22/12 8:28 AM, Øivind wrote: Is there a way to solve the dependency issue without forbidding static constructors in modules with cyclic dependencies? I think an idea just occurred to me. The rules for static

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Øivind
On Saturday, 22 September 2012 at 13:25:47 UTC, Øivind wrote: On Saturday, 22 September 2012 at 13:03:06 UTC, Andrei Alexandrescu wrote: On 9/22/12 8:28 AM, Øivind wrote: Is there a way to solve the dependency issue without forbidding static constructors in modules with cyclic dependencies?

Re: Counter-Proposal: restrict tagged functions

2012-09-22 Thread Simen Kjaeraas
On 2012-09-01, 18:20, Dmitry Olshansky wrote: The idea in a nutshell: - specify a way attach tags to function declarations (to paint functions) - allow specifying is-a relation between tags (supertags and subtags). - add restrict specification that allows user to enforce on a block of

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Simen Kjaeraas
On 2012-09-22, 15:28, Øivind wrote: It gets a bit ugly maybe, but we could do a mix of the proposals that have come before and this one, e.g. add a @nocycliccheck (or similar) to the static constructor, and in that case only allow access to current module and those imorted inside the ctor

Re: It's always something

2012-09-22 Thread Michel Fortin
On 2012-09-22 09:19:33 +, Walter Bright newshou...@digitalmars.com said: I just spent about 3 hours tracking down the strangest problem. Win64 exception handling would work fine, but when I'd turn on -g, it would crash. At first I thought I'm generating a bad object file with -g. But

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Simen Kjaeraas
On 2012-09-22, 15:04, Andrei Alexandrescu wrote: On 9/22/12 8:28 AM, Øivind wrote: Is there a way to solve the dependency issue without forbidding static constructors in modules with cyclic dependencies? I think an idea just occurred to me. The rules for static ctors and dtors were

Re: reference to 'self' inside a function

2012-09-22 Thread Ben Davis
On 19/09/2012 08:24, Jacob Carlborg wrote: On 2012-09-19 01:21, Rob T wrote: Actually I find the __traits system a bit convoluted and inconsistent with other similar features. There seems to be a real need to unify the different methods of reflection in D. For example, I can do this without

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Andrei Alexandrescu
On 9/19/12 3:13 AM, Jacob Carlborg wrote: On 2012-09-17 23:13, Jens Mueller wrote: Post all feedback to this thread. Constructive feedback is very much appreciated. To conclude in more Andrei like words: Happy destruction! * Why is scheduleForBenchmarking a string? Can't it be a template

Re: It's always something

2012-09-22 Thread Sandeep Datta
You should keep a record of those anomalies somewhere, it might prove useful as a starting point to investigating problems future problems that might arise. You are right. I think it is a good thing Walter took the time out to write about this. In the absence of better documentation this

Re: Review of Andrei's std.benchmark

2012-09-22 Thread David Piepgrass
- It is very strange that the documentation of printBenchmarks uses neither of the words average or minimum, and doesn't say how many trials are done I suppose the obvious interpretation is that it only does one trial, but then we wouldn't be having this discussion about averages and

Re: reference to 'self' inside a function

2012-09-22 Thread Nick Treleaven
On 18/09/2012 22:21, Rob T wrote: On Tuesday, 18 September 2012 at 19:57:05 UTC, Ben Davis wrote: Wild stab in the dark, but would something like this work: void myfunction() { int dummy; auto self = __traits(parent, dummy); } though it would be better if something like

Re: Review of Andrei's std.benchmark

2012-09-22 Thread Jonathan M Davis
On Saturday, September 22, 2012 09:04:09 Andrei Alexandrescu wrote: On 9/22/12 8:28 AM, Øivind wrote: Is there a way to solve the dependency issue without forbidding static constructors in modules with cyclic dependencies? I think an idea just occurred to me. The rules for static ctors and

Re: Extending unittests [proposal] [Proof Of Concept]

2012-09-22 Thread Jens Mueller
Jacob Carlborg wrote: On 2012-09-21 23:11, Jens Mueller wrote: But if you have an assert in some algorithm to ensure some invariant or in a contract it will be handled by myUnitTestSpecificAssertHandler. But I think that is not a drawback. Don't you want to no whenever an assert is

Re: Extending unittests [proposal] [Proof Of Concept]

2012-09-22 Thread Jens Mueller
Johannes Pfau wrote: Am Fri, 21 Sep 2012 23:15:33 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: I like the BOOST unit test library's approach, which has two types of assert: BOOST_CHECK and BOOST_REQUIRE. After a BOOST_CHECK fails, the test keeps running, but BOOST_REQUIRE throws

Re: It's always something

2012-09-22 Thread Walter Bright
On 9/22/2012 6:37 AM, Michel Fortin wrote: But there should be a reason why there's a jump there. Have you found it? If you're just bypassing the jump you might be breaking something else. For instance, this jump table might have been a mean to allow the debugger to more easily break on

Re: Reference semantic ranges and algorithms (and std.random)

2012-09-22 Thread jerro
On Friday, 21 September 2012 at 19:47:16 UTC, Jonathan M Davis wrote: On Friday, September 21, 2012 15:20:49 monarch_dodra wrote: #3 The only thing I'm having an issue with is save. IMO, it is exceptionally dangerous to have a PRNG be a ForwardRange: It should only be saved if you have a damn

2.060 deb package on Linux Mint 13

2012-09-22 Thread Jason Spencer
Though Mint 13 is very similar to ubuntu 12, I cannot seem to get the deb package to install. I get dependency errors on gcc, gcc-mulitlib, and xdg-utils. apt-get assures me these are all the latest version. Still, dpkg won't install dmd2. I understand the wisdom seems to be to just use

how is this considered hiding methods?

2012-09-22 Thread Gor Gyolchanyan
Can someone please tell me why the following code gives these errors? Error: class main.BirdZoo use of main.VertebrateZoo.take(Animal animal_) hidden by BirdZoo is deprecated Error: class main.ParrotZoo use of main.VertebrateZoo.take(Animal animal_) hidden by ParrotZoo is deprecated ///

Re: how is this considered hiding methods?

2012-09-22 Thread Gor Gyolchanyan
On Saturday, 22 September 2012 at 07:48:02 UTC, Gor Gyolchanyan wrote: Can someone please tell me why the following code gives these errors? Error: class main.BirdZoo use of main.VertebrateZoo.take(Animal animal_) hidden by BirdZoo is deprecated Error: class main.ParrotZoo use of

Re: how is this considered hiding methods?

2012-09-22 Thread Andrej Mitrovic
On 9/22/12, Jonathan M Davis jmdavisp...@gmx.com wrote: But why the compiler would now require that you do that, I don't know. If that's the way that thnigs currently are, it starts to become a bit odd that the base class functions aren't automatically available. http://dlang.org/hijack.html

Re: how is this considered hiding methods?

2012-09-22 Thread Andrej Mitrovic
On 9/22/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: using the alias But I do think this can be further improved in the language. Take this for example: import std.stdio; class Foo { void meth(double) { writeln(Foo.meth); } } class Bar : Foo { alias super.meth meth; void

Re: how is this considered hiding methods?

2012-09-22 Thread Andrej Mitrovic
On 9/22/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Now let's say the Doo clas removes the meth overload and the alias: Sorry that should be the Bar class.

Re: how is this considered hiding methods?

2012-09-22 Thread Andrej Mitrovic
On 9/22/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I would prefer if super.alias meant to take overloads of all base classes into account. Although this would be kind of counter-intuitive since 'super' already means the direct base class.

Re: Passing associative array to another thread

2012-09-22 Thread Martin Drasar
On 21.9.2012 19:01, Jacob Carlborg wrote: Perhaps declaring the associative array as shared. An alternative would be to serialize the aa, pass it to another thread, and deserialize it. That would though create a copy. Hi Jacob, thanks for the hint. Making it shared sounds a bit fishy to me.

Re: Passing associative array to another thread

2012-09-22 Thread Jacob Carlborg
On 2012-09-22 11:24, Martin Drasar wrote: thanks for the hint. Making it shared sounds a bit fishy to me. My intention is to pass some read only data, that are in fact thread local and there is no real need to make them shared. The whole point of thread local data is that it's only accessible

Re: Passing associative array to another thread

2012-09-22 Thread Jonathan M Davis
On Saturday, September 22, 2012 12:30:30 Jacob Carlborg wrote: Looking at your original example I don't understand why the immutable aa won't work. That's the whole point of immutable, it's safe to share among threads. It's probably a bug somewhere. I think someone else can answer these

Re: Passing associative array to another thread

2012-09-22 Thread Martin Drasar
On 22.9.2012 13:19, Jonathan M Davis wrote: The problem with immutable is probably due to this bug: http://d.puremagic.com/issues/show_bug.cgi?id=5538 And casting to shared probably won't work due to this bug: http://d.puremagic.com/issues/show_bug.cgi?id=6585 std.variant needs quite

Re: Passing associative array to another thread

2012-09-22 Thread Johannes Pfau
Am Sat, 22 Sep 2012 12:30:30 +0200 schrieb Jacob Carlborg d...@me.com: On 2012-09-22 11:24, Martin Drasar wrote: thanks for the hint. Making it shared sounds a bit fishy to me. My intention is to pass some read only data, that are in fact thread local and there is no real need to make

Re: Passing associative array to another thread

2012-09-22 Thread Martin Drasar
On 22.9.2012 13:50, Johannes Pfau wrote: 1. Declare it as shared There's also __gshared. Yup, that works. Thanks

object.error: Privileged Instruction

2012-09-22 Thread simendsjo
What does the message in the subject mean? Here's a testcase (tested on dmd 2.060 on win7 32-bit): import core.exception; import core.runtime; // comment out this, and no stacktrace is printed void myAssertHandler(string file, size_t line, string msg = null) { } static this() {

Re: object.error: Privileged Instruction

2012-09-22 Thread Maxim Fomin
Privilege instruction is an assembly instruction which can be executed only at a certain executive process context, typically os kernel. AFAIK assert(false) was claimed to be implemented by dmd as a halt instruction, which is privileged one. However, compiled code shows that dmd generates int

Re: object.error: Privileged Instruction

2012-09-22 Thread Jonathan M Davis
On Saturday, September 22, 2012 21:19:27 Maxim Fomin wrote: Privilege instruction is an assembly instruction which can be executed only at a certain executive process context, typically os kernel. AFAIK assert(false) was claimed to be implemented by dmd as a halt instruction, which is

system vs. execvp ?

2012-09-22 Thread Peter Sommerfeld
Hi! This works as expected: string cmd = dmd src/xyz.d; int i = system(cmd); But this not: string[] cmd; cmd ~= src/xyz.d; int i = execvp(dmd,cmd); Of course, dmd is in PATH (Win7). What is wrong here? tia Peter

Re: system vs. execvp ?

2012-09-22 Thread Jonathan M Davis
On Sunday, September 23, 2012 00:53:48 Peter Sommerfeld wrote: Hi! This works as expected: string cmd = dmd src/xyz.d; int i = system(cmd); But this not: string[] cmd; cmd ~= src/xyz.d; int i = execvp(dmd,cmd); Of course, dmd is in PATH (Win7). What is wrong

Re: system vs. execvp ?

2012-09-22 Thread Andrej Mitrovic
On 9/23/12, Peter Sommerfeld nore...@rubrica.at wrote: What is wrong here? string[] cmd; cmd ~= dmd; cmd ~= src/xyz.d; int i = execvp(dmd,cmd); 1st arg should always be the app name, even though apps typically ignore/skip the first arg.

Re: system vs. execvp ?

2012-09-22 Thread Jonathan M Davis
On Sunday, September 23, 2012 01:12:34 Andrej Mitrovic wrote: On 9/23/12, Peter Sommerfeld nore...@rubrica.at wrote: What is wrong here? string[] cmd; cmd ~= dmd; cmd ~= src/xyz.d; int i = execvp(dmd,cmd); 1st arg should always be the app name, even though apps typically

Re: system vs. execvp ?

2012-09-22 Thread Jonathan M Davis
On Saturday, September 22, 2012 16:10:11 Jonathan M Davis wrote: Now, looking at the docs for std.process.execvp, they seem to think that the exec functions are going to return, but that's not what the man pages for the C functions (which they're calling) say, nor is it how they behave. The

Re: system vs. execvp ?

2012-09-22 Thread Andrej Mitrovic
On 9/23/12, Jonathan M Davis jmdavisp...@gmx.com wrote: I'd be very surprised if you were correct about this. I was wrong, it's for a different reason: http://stackoverflow.com/questions/3027320/why-first-arg-to-execve-must-be-path-to-executable

Re: system vs. execvp ?

2012-09-22 Thread Peter Sommerfeld
Jonathan M Davis wrote: Peter Sommerfeld wrote: This works as expected: string cmd = dmd src/xyz.d; int i = system(cmd); But this not: string[] cmd; cmd ~= src/xyz.d; int i = execvp(dmd,cmd); Of course, dmd is in PATH (Win7). What is wrong here? Please elaborate on what

Testing for template argument being result of takeExactly

2012-09-22 Thread Jonathan M Davis
I'm trying to test whether a template argument is the type returned by takeExactly, and I haven't been able to sort out the template voodoo required yet. It would be a lot easier if I had a variable to work with, but I just have the type, and the fancy is expression required to pull it off is

Re: Testing for template argument being result of takeExactly

2012-09-22 Thread bearophile
Jonathan M Davis: So, clearly I don't have the is expression right, and this is seriously pushing the edge of my knowledge of is expressions. So, any help would be appreciated. Thanks. I have done some tries, but I have failed, I am sorry :-) The is() syntax is a part of D good to burn on a

Re: Testing for template argument being result of takeExactly

2012-09-22 Thread Jonathan M Davis
On Sunday, September 23, 2012 02:57:36 bearophile wrote: Jonathan M Davis: So, clearly I don't have the is expression right, and this is seriously pushing the edge of my knowledge of is expressions. So, any help would be appreciated. Thanks. I have done some tries, but I have failed, I

How to Instantiate struct defined in template

2012-09-22 Thread Craig Dillabaugh
Hello, I am trying to figure out how templates work and tried to define the following template to define vertices of any dimension and operations on them. import std.stdio; import std.random; import std.range; import std.conv; import std.math; /* * T must be one of the floating point types

Re: How to Instantiate struct defined in template

2012-09-22 Thread Craig Dillabaugh
On Sunday, 23 September 2012 at 04:03:28 UTC, Jonathan M Davis wrote: On Sunday, September 23, 2012 05:49:06 Craig Dillabaugh wrote: Hello, clip Before anything, I'd question why you declared vt at all. If all you're putting in it is a single struct, then just templatize the struct

Re: How to Instantiate struct defined in template

2012-09-22 Thread Craig Dillabaugh
On Sunday, 23 September 2012 at 04:51:31 UTC, Jonathan M Davis wrote: On Sunday, September 23, 2012 06:37:30 Craig Dillabaugh wrote: One question. Is there any way to get the function template to deduce the type of T from the vertices I pass, so that I can call: euclid_dist(v1, v2) ) instead

[Issue 8706] New: Tool reference page

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8706 Summary: Tool reference page Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites

[Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8496 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Summary|(Regression 2.060) |Assignment of function

[Issue 8387] Semantic errors in opDispatch body are not reported

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8387 --- Comment #1 from Daniel Cousens daniel...@bigpond.com 2012-09-22 03:24:53 PDT --- *** Issue 8547 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You

[Issue 8547] Pure Functions Compilation - Not consistent errors

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8547 Daniel Cousens daniel...@bigpond.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8496 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-09-22 03:26:34 PDT --- I'd like to update sample code. alias extern (C) void function() FP; void main() { FP fp = (){}; fp = (){}; } The fp declaration and assignment should

[Issue 8680] SpanMode.breadth is incorrectly named and implementation fails in Linux

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8680 --- Comment #10 from ent...@cantab.net 2012-09-22 07:09:23 PDT --- (In reply to comment #9) listdir was deprecated for a very good reason. Would you now kindly consider the steps to fold this into a Range. Oh wow, I didn't realise dirEntries

[Issue 8496] Assignment of function literal to function pointer variable with non-D linkage broken

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8496 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #3

[Issue 8686] Tuple cannot define with type that has only mutable opEquals

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8686 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8707] New: Internal error: ../ztc/cod1.c 1689

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8707 Summary: Internal error: ../ztc/cod1.c 1689 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD

[Issue 8708] New: Documentation for std.process.exec family is inaccurate

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8708 Summary: Documentation for std.process.exec family is inaccurate Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity:

[Issue 8475] postblits fails attributes qualifying when in a template.

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8475 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, rejects-valid

[Issue 8150] Throwing nothrow struct constructor?

2012-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8150 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1