Re: DMD Linker Issue on Windows

2018-10-17 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 17 October 2018 at 17:37:37 UTC, Kai wrote: I just ran into this linker issue (see answer below that I grabbed from the vibe.d forum) as well - where can I ask/track about the progress on this issue? Do you have the new dmd installed? Using the x86_64 should work now if all goes

Re: LDC2 compiling executable requiring elevated privileges?

2018-10-15 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 15 October 2018 at 07:23:07 UTC, Laurent Tréguier wrote: If it's about old programs, then Windows should apply their hacks only for old executables. It kinda does - this only applies to 32 bit exes without a manifest resource. If you compile with -m64, it will go away, or if you ad

Re: LDC2 compiling executable requiring elevated privileges?

2018-10-14 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 14 October 2018 at 15:46:57 UTC, Laurent Tréguier wrote: Why should an OS decide whether an executable should be run with admin privileges ? If it has to, then it's up to the developer to explicitly ask for it... Windows supports programs written as much as 30 years ago. The develo

Re: LDC2 compiling executable requiring elevated privileges?

2018-10-14 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 14 October 2018 at 12:16:28 UTC, spikespaz wrote: I'm compiling an executable that does not need administrator privileges. For some reason though, LDC thinks it does and marks it as elevated. This has nothing to do with ldc. It is just any 32 bit program called setup.exe or install

Re: DIP 1014

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 October 2018 at 22:30:38 UTC, Jonathan M Davis wrote: Yeah. IIRC, it was supposed to be _guaranteed_ that the compiler moved structs in a number of situations - e.g. when the return value was an rvalue. Something like Eh, I don't think that moves it, but rather just constructs it

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 October 2018 at 14:49:31 UTC, bachmeier wrote: I believe it would be a mistake to drop DConf. What about we design a DConf that focuses on interactive collaboration instead of sitting passively in a room watching someone talk over a slideshow? When Joakim talked about this t

Re: Quick C bindings

2018-09-28 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. I just write bindings by hand as I need them, in the file where I want to use them. It isn't really that hard to do

Re: Updating D beyond Unicode 2.0

2018-09-26 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 26 September 2018 at 20:43:47 UTC, Walter Bright wrote: I don't see a scenario where someone would be learning D and not know English. Non-English D instructional material is nearly non-existent. http://ddili.org/ders/d/

Re: Updating D beyond Unicode 2.0

2018-09-24 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 24 September 2018 at 10:36:50 UTC, Jonathan M Davis wrote: Given that the typical keyboard has none of those characters, maintaining code that used any of them would be a royal pain. It is pretty easy to type them with a little keyboard config change, and like vim can pick those up

Re: Updating D beyond Unicode 2.0

2018-09-24 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 24 September 2018 at 13:26:14 UTC, Steven Schveighoffer wrote: Part of the reason, which I haven't read here yet, is that all the keywords are in English. Eh, those are kinda opaque sequences anyway, since the meanings aren't quite what the normal dictionary definition is anyway. L

Re: Updating D beyond Unicode 2.0

2018-09-22 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 22 September 2018 at 19:59:42 UTC, Erik van Velzen wrote: Nobody in this thread so far has said they are programming in non-ASCII. This is the obvious observation bias I alluded to before: of course people who don't read and write English aren't in this thread, since they cannot

Re: Rather D1 then D2

2018-09-22 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 22 September 2018 at 20:53:02 UTC, krzaq wrote: C++ added contextual keywords, like `override` and `final`. If this can be done in C++, surely D is easier to parse? If D did more stuff like that, it would start to be harder to parse.

Re: Updating D beyond Unicode 2.0

2018-09-21 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 21 September 2018 at 20:25:54 UTC, Walter Bright wrote: But identifiers? I haven't seen hardly any use of non-ascii identifiers in C, C++, or D. In fact, I've seen zero use of it outside of test cases. Do you look at Japanese D code much? Or Turkish? Or Chinese? I know there are de

Re: Jai compiles 80,000 lines of code in under a second

2018-09-21 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 21 September 2018 at 13:37:58 UTC, aliak wrote: Si si, but i believe the loadExecutableIcon actually calls windows APIs to set an icon on an executable, and they'd probably @system which means I don't think that could be done in D. You don't need an API call to do that. You just pr

Re: Jai compiles 80,000 lines of code in under a second

2018-09-20 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 20 September 2018 at 23:13:38 UTC, aliak wrote: he can now compile an 80,000 line game in about 1.5 seconds on a laptop D can compile similar amounts of code in half the time. For example, the entire D1 runtime and standard library can be built (compiled and linked!) in 0.6 secon

Re: Truly @nogc Exceptions?

2018-09-20 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 20 September 2018 at 17:14:12 UTC, Steven Schveighoffer wrote: I don't know how a performance problem can occur on an error being thrown anyway -- the process is about to end. Walter's objection was code size - it would throw stuff out of cache lines, even if it doesn't need to ac

Re: Truly @nogc Exceptions?

2018-09-20 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 20 September 2018 at 15:52:03 UTC, Steven Schveighoffer wrote: I needed to know what the slice parameters that were failing were. Aye. Note that RangeError is called by the compiler though, so you gotta patch dmd to make it pass the arguments to it for index. Ugh. I did a PR for

Re: Truly @nogc Exceptions?

2018-09-20 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 19 September 2018 at 21:16:00 UTC, Steven Schveighoffer wrote: As Andrei says -- Destroy! Nah, I agree. Actually, I'm of the opinion that string error messages in exceptions ought to be considered harmful: you shouldn't be doing strings at all. All the useful information should

Re: Proposal: __not(keyword)

2018-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner wrote: Makes the code unreadable. It is the foo: that causes this, not the __not... For @nogc, pure and so forth there were imho a better proposal with a boolean value: @gc(true), @gc(false), pure(true), pure(false) etc. It is also

Re: phobo's std.file is completely broke!

2018-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 15 September 2018 at 10:57:56 UTC, Josphe Brigmo wrote: Phobos *NEEDS* to be modified to work with these newer OS's. You need to look at the source code before posting. The code for remove is literally DeleteFileW(name); it is a one-line wrapper, and obviously uses the unicode

Proposal: __not(keyword)

2018-09-14 Thread Adam D. Ruppe via Digitalmars-d
Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. __not(final) void foo() {} // turns off the final flag (if it is set) __not(@nogc) void foo() {} // turns off the @nogc flag (if it is set) __not(const)(int) a; // not const All it does is inver

Re: Proposal to make "shared" (more) useful

2018-09-13 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 13 September 2018 at 14:43:51 UTC, Arafel wrote: Why must __gshared be static?? (BTW, thanks a lot, you have just saved me a lot of debugging!!). The memory location differences of shared doesn't apply to class members. All members are stored with the instance, and shared only c

Re: Proposal to make "shared" (more) useful

2018-09-13 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 13 September 2018 at 13:53:49 UTC, Arafel wrote: * Make all _private non-reference fields_ of shared, synchronized classes __gshared. so __gshared implies static. Are you sure that's what you want?

Re: This is why I don't use D.

2018-09-10 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 9 September 2018 at 14:28:11 UTC, Guillaume Piolat wrote: I don't manage to find x-module search again, perhaps disabled. Yeah, there's a memory leak in it so leaving it up would kill the box to build actual docs. And the last couple months have been crazy IRL, but I scheduled some

Re: Source changes should include date of change

2018-09-08 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 8 September 2018 at 07:08:46 UTC, Colin wrote: Some ad hoc comment system in source code to point out changes will never be as good. Just Use Git! I'd agree for implementation changes, but *interface* changes should be not just in the comment, but in a doc comment. Ddoc specifi

Re: Messing with betterC and string type.

2018-09-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 7 September 2018 at 15:48:39 UTC, SrMordred wrote: Yes, but you don't really need this function. Whoa, when was that added?! I don't remember ctors via ufcs being there but indeed, it works on newest dmd.

Re: Messing with betterC and string type.

2018-09-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 7 September 2018 at 13:58:41 UTC, Jonathan M Davis wrote: If we had implicit construction in D but only allowed one level of conversion (e.g. String could be implicitly constructed from a const(char)[], but a type that implicitly converted to const(char)[] couldn't be used to constru

Re: What changes to D would you like to pay for?

2018-09-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 7 September 2018 at 11:48:47 UTC, RhyS wrote: ... Sorry Adam but if you consider a collection of lose code production ready for D, then we have different ideas. ;) All libraries are collections of loose code, except the bad ones, which are tightly coupled collections of code that br

Re: What changes to D would you like to pay for?

2018-09-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 7 September 2018 at 10:51:28 UTC, RhyS wrote: ** 750$ ** For a build in working high performance documented http server ( with all the basic necessities needed for web development ). cha-ching https://github.com/adamdruppe/arsd just copy/paste code out of there, it works and has

Re: Messing with betterC and string type.

2018-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 6 September 2018 at 17:09:34 UTC, SrMordred wrote: Yes, the true problem arrives on the operations like concat "~" that call some internal function to do that with strings. Only if it is string ~ string. If it is your type, that's where opBinary and opBinaryRight come in. YourSt

Re: Messing with betterC and string type.

2018-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 6 September 2018 at 16:24:12 UTC, SrMordred wrote: alias string = String; For the rest of this module, any time you write `string`, the compiler sees `String`. But inside the compiler, it still thinks of its own string, hence the confusing looking error messages. struct String

Re: D's policy on hidden memory allocations and nothrow @nogc

2018-09-05 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 5 September 2018 at 20:53:41 UTC, Per Nordlöw wrote: Is the praxis that _all_ containers and GC-allocations should throw a yeah, but do so via the onOutOfMemoryError function instead of "throw new" http://dpldocs.info/experimental-docs/core.exception.onOutOfMemoryError.html w

Re: Engine of forum

2018-09-01 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 1 September 2018 at 22:10:27 UTC, Nick Sabalausky wrote: I've used StackOverflow. It's NOT a place for asking and answering questions. I generally agree, but the D tag on it isn't so bad since most the annoying regulars keep away. It is more the domain of me and a handful of oth

Re: DMD installation prompts "Windows protected your PC"

2018-08-06 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 6 August 2018 at 14:19:47 UTC, rikki cattermole wrote: (e.g. require code signing). Why don't we just sign the code anyway? This shouldn't be a big deal and it has been a problem for many people for many years.

Re: Is it possible to deinitialize the class without calling the gc?

2018-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 4 August 2018 at 02:21:48 UTC, 12345swordy wrote: Which is converted to void type when passing the object to rt_finalize, which causes to lost all type information. It still has run-time type information, but indeed, the compile time info is lost. Child classes have independent

Re: Is it possible to deinitialize the class without calling the gc?

2018-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 3 August 2018 at 20:40:31 UTC, 12345swordy wrote: Did you even bother reading the links that I posted? I did. Did you? The wikipedia page speaks at length to the ambiguity of the terms, including that the language construct can be called a destructor while the implementation method

Re: Is it possible to deinitialize the class without calling the gc?

2018-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 3 August 2018 at 17:50:10 UTC, 12345swordy wrote: rt_finalize is not the GC. Yes it is. That why is called finalize. OK, so you don't like it... because of its name? It doesn't actually call any GC functions, it just loops through destructors and calls them all.

Re: Is it possible to deinitialize the class without calling the gc?

2018-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 3 August 2018 at 16:24:33 UTC, 12345swordy wrote: Your calling the gc if you call the destroy function for classes as it calls the rt_finalize function. rt_finalize is not the GC. It just calls destructors in order for each base class. Regardless you didn't answer the question tha

Re: Is it possible to deinitialize the class without calling the gc?

2018-08-03 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 3 August 2018 at 15:32:54 UTC, 12345swordy wrote: Is there RecusiveDestruct function that can be called that is attribute friendly? No, the destructor definition in the language is not attribute friendly. Best you can do is `.destroy(obj)` and it can't see all the @nogc stuff (beca

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote: This error handling policy makes D not applicable for creating WEB applications and generally long-running services. You use process isolation so it is easy to restart part of it without disrupting others. Then it can crash without b

Re: Guido van Rossum has resigned

2018-07-12 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 12 July 2018 at 22:28:00 UTC, Walter Bright wrote: I have no plans to resign until they carry me out in a box. That can be arranged. (lol you guys we should carry walter out of to the stage of the next dconf in a box)

Re: local enum

2018-07-07 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 7 July 2018 at 18:48:35 UTC, Mr.Bingo wrote: The enums are local in nature and are used to store intermediate results but the looping tries to redefine them, which gives an error. Have you tried putting a second set of {} around it? static foreach(...) {{ // 2 intentional enum

Re: Is package.d a good idea?

2018-07-04 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 4 July 2018 at 14:54:41 UTC, Steven Schveighoffer wrote: How would this affect the package attribute? Nothing should change, since packages are determined from the D module declaration, not the filename or directory layout. This is even true with package.d itself, but it is a w

Re: Is package.d a good idea?

2018-07-01 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 1 July 2018 at 14:23:36 UTC, Yuxuan Shui wrote: I was suggesting we do what Rust did. i.e. 'import foo', imports foo.d, which can in turn do 'import foo.bar', which will import foo/bar.d. Yeah, that's the way it should have been done in the first place. Nowhere else in D does it re

Re: Is it possible to set up DConf Asia?

2018-06-29 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 30 June 2018 at 02:23:57 UTC, Jonathan M Davis wrote: Honestly, this is this first time that I've ever seen anyone try to argue that conferences like this are a bad idea. I argued it (though I don't remember how vigorously) back when the kickstarter was done. I still think there's

Re: Phobos begat madness

2018-06-22 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 22 June 2018 at 22:28:17 UTC, Walter Bright wrote: That would help, do you want to implement it? I can't for at last two weeks, I'm about to fly tomorrow... and I'm getting married in August too so my life is kinda hectic. But I might look at it around July 4 if I get a chance and

Re: Phobos begat madness

2018-06-22 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 22 June 2018 at 22:25:35 UTC, Steven Schveighoffer wrote: I've gone through the "annotate this and continue" exercise, and it is not fun. Especially when the template is used in many places, you have to make a copy of the template to play with. Aye. I think that's the most straightf

Re: Phobos begat madness

2018-06-22 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 22 June 2018 at 21:37:07 UTC, Walter Bright wrote: I decided to accept the Mission Impossible of figuring out why it was inferred as @system. This would be trivial if the compiler had decent error messages. https://issues.dlang.org/show_bug.cgi?id=17374 It could just tell us the b

Re: allMembers broke for __

2018-06-16 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 17 June 2018 at 01:02:17 UTC, DigitalDesigns wrote: If this was a sane language constraint then any identifiers starting with __ that were not reserved would at least give a warning but particularly give an error! Not fail silently and break code in ways that cannot be determined oth

Re: Replacing C's memcpy with a D implementation

2018-06-10 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 10 June 2018 at 12:49:31 UTC, Mike Franklin wrote: D utilizes from the C library with D implementations. There are many reasons to do this, one of which is to leverage information available at compile-time and in D's type system (type sizes, alignment, etc...) in order to optimize t

Re: What's happening with the `in` storage class

2018-06-08 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 9 June 2018 at 02:13:00 UTC, Walter Bright wrote: But it was never enforced, meaning that suddenly enforcing it is just going to break code left and right. It isn't going to break anything. It is going to *correctly diagnose already broken code*. That's a significant difference

Re: Interaction of inheritance with property functions

2018-06-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 8 June 2018 at 01:07:17 UTC, Luís Marques wrote: Shouldn't the property functions' resolution logic take into account the inherited functions? I had assumed that was the case (and I was confused by misleading error messages), and that seems like the more intuitive semantics to me.

Re: stride in slices

2018-06-05 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 5 June 2018 at 19:05:27 UTC, DigitalDesigns wrote: For loops HAVE a direct cpu semantic! Do you doubt this? What are they? And for bonus points, are they actually used by compilers? Then the final question: is the generated code any different than inlined ranges?

Re: Mixin templates are a pain at best, useless at worst for any non-trivial use case

2018-06-05 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 5 June 2018 at 10:11:49 UTC, Ethan wrote: As soon as you have an overload of a function declared in the base object you're mixing in to, any other overload mixed in will not resolve correctly. Great. Yes, it is great, since this lets you selectively override behavior from a generi

Re: core.stdc and betterC

2018-04-29 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 29 April 2018 at 15:52:11 UTC, dd86k wrote: It's all fine now. I'll type away my own bindings in a separate source file (stdc.d). You can also just do it in the usage module, for the individual functions you need. I do this a lot for various C libraries (and used to for the Win32 f

Re: Favorite GUI library?

2018-04-24 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 24 April 2018 at 10:30:21 UTC, Chris wrote: - cross platform: no need to deploy libs (e.g. Gtk on Mac and Windows) Well... that depends. If you can just use the browser already installed, yeah, but then you have to deal with cross-browser (which is still a thing, like I did a wysi

Re: Usage of memory by arrays

2018-04-05 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 5 April 2018 at 20:58:32 UTC, unDEFER wrote: 100K * float[3] = 2356 Kbytes Why not 1200 Kbytes? My guess is the reallocation triggered by ~= just passed the double threshold there. When the runtime appends, it usually reserves (about) 2x of what it actually needs. This is a pe

Re: Am I reading this wrong, or is std.getopt *really* this stupid?

2018-03-26 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 25 March 2018 at 06:58:50 UTC, Seb wrote: Yeah I have "dumb XYZ, roll my own" experience often too. As there are already many big libraries like `arsd` or `ae` out there, I don't think I'm the only one with these feeling. In my case, there's very little overlap with what Phobos offe

Re: Am I reading this wrong, or is std.getopt *really* this stupid?

2018-03-26 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 25 March 2018 at 14:25:49 UTC, Andrei Alexandrescu wrote: I don't want. I think others will, once their programs depending on the current semantics will have trouble. The current semantics are not documented, so any program that relies on them is foolish anyway. Like I said in my

Re: alias this constructor

2018-03-24 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 25 March 2018 at 00:47:20 UTC, Dave Jones wrote: struct Foo { int x; alias x this; } Foo f = 12; // error You just need to define a constructor that takes an int. alias this is all about taking an existing object and substituting a member for it - emphasis on *existing* ob

Re: Am I reading this wrong, or is std.getopt *really* this stupid?

2018-03-24 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 23 March 2018 at 23:29:48 UTC, H. S. Teoh wrote: I just ran into this seemingly small problem: The way I'd do this is to only use getopt to build the lists, then actually process them externally. (lol adding another loop) string[] searchPaths; string[] files; getopt(args, "l",

Re: #dbugfix 17592

2018-03-22 Thread Adam D Ruppe via Digitalmars-d
On Thursday, 22 March 2018 at 19:20:14 UTC, 12345swordy wrote: "C++ classes and COM classes will still work" Because they have external runtimes that get used. I can tell that you're being snarky at me. If you change .destroy without changing the destructor rule, the type system has been B

Re: #dbugfix 17592

2018-03-22 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 22 March 2018 at 14:48:04 UTC, 12345swordy wrote: That is not a runtime version of system/user attributes! That is custom checking for destructor! Hardly the same. How would your idea work? Again I do not see it anywhere in the specification that support your claim that all class

Re: #dbugfix 17592

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 22 March 2018 at 01:55:48 UTC, 12345swordy wrote: Are you suggesting that we need runtime version of system/user attributes? We already have that in a sense - InvalidMemoryOperationError is thrown if you try to GC allocate from inside a GC destructor. The attributes are supposed

Re: #dbugfix 17592

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 22 March 2018 at 02:16:56 UTC, SimonN wrote: Does the compiler infer nogc-ness of `emplace` at instantiation? Yes, it does with all templates, actually. Since their nogcness (and other attributes like nothrow, pure, etc) frequently depend on what arguments they are passed, the co

Re: #dbugfix 17592

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 March 2018 at 19:21:15 UTC, 12345swordy wrote: That seems to be it's own separate problem, as it involves generating dynamic types at run-time, which it needs run-time equivalent of attribute checking. But @nogc is a compile time thing, meaning it cannot work here. My example

Re: pow

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 March 2018 at 16:29:26 UTC, aerto wrote: thanks, a last question in a diffrent function i use use BigInt i = "105312291668557186697918027683670432318895095400549111254310977536"; and it should work. Note the quotation marks - it reads it as a string because a long number l

Re: pow

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 March 2018 at 15:56:00 UTC, aerto wrote: why pow(256, 27) gives 0, instead of 105312291668557186697918027683670432318895095400549111254310977536L that result is simply too big to fit in the result. Try using a bigint instead: import std.bigint, std.stdio; void main() {

Re: #dbugfix 17592

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 March 2018 at 13:39:28 UTC, 12345swordy wrote: You can simply check the .dtor symbols at compile time to see if every .dtor symbol from child to root have a .dtor that have the @nogc attribute In Simen's example, the child information is not available at compile time. This li

Re: #dbugfix 17592

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 March 2018 at 08:49:11 UTC, Mike Franklin wrote: Step 1. Make `emplace` @nogc So we need to attribute `std.conv.emplace` as @nogc. No, do not do that! `emplace` is ALREADY `@nogc` when given appropriate arguments. Adding the explicit annotation will limit its flexibility wit

Re: This week in D

2018-03-19 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 19 March 2018 at 10:04:15 UTC, bauss wrote: Has it stopped completely or is it just temporary? I want to restart it with a 2.0 thing probably monthly instead of weekly (well I might generate the link list automatically each week, but commit to doing a feature once a month) as part

Re: Disallowing the creation of objects using new should have default object functions and parent functions be @nogc by definition.

2018-03-17 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 17 March 2018 at 13:30:25 UTC, 12345swordy wrote: Does anyone dispute this? I don't really see how this would help anything.

Re: Linux signal handling - notifying a condition variable

2018-03-15 Thread Adam D. Ruppe via Digitalmars-d
Alternatively btw you can use the pthreads C functions import core.sys.posix.pthread; which shuld also be nogc right now. The condition class wraps those on Linux fairly thinly; using the C functions should be little more trouble.

Re: Linux signal handling - notifying a condition variable

2018-03-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 March 2018 at 17:30:50 UTC, Jim King wrote: The problem with that is that it requires a busy loop to detect it. well, what's your thread doing? In the case I used this pattern, it was blocking on a call to select() anyway, so when it returned with EINTR, that was a good opport

Re: Linux signal handling - notifying a condition variable

2018-03-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 March 2018 at 16:51:59 UTC, Jim King wrote: In going through the signal documentation it looks like the signal handler must be a "nothrow @nogc" variety. Looks like notify actually can throw an exception... the way I usually do signal handlers is just set a global variable: _

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: would a PR for `dmd -unittest= (same syntax as -i)` be welcome? so when this came up on irc earlier (was that you?) this was the first thought that came to my mind. I'd support it, tho I'm no decision maker.

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 March 2018 at 13:21:10 UTC, Seb wrote: BTW since a few months you can directly build everything by just running `make -f posix.mak` in the Phobos repository. see i'm trying to build dmd not phobos so you can understand i wouldn't try to make phobos It actually concerns me that

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 March 2018 at 13:14:08 UTC, Seb wrote: Out of interest: Why would you compile the compiler from the release sources? Why are there releases at all? Because the release is (in theory) tested and working and installed and I want to do a minor tweak to it, not go all-in to the str

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 March 2018 at 12:50:14 UTC, Daniel Kozak wrote: obviosly it is unlikely place to download the dlang compiler sources these days :D See, I just want to do a small tweak on the installation I have working. Since druntime, phobos, and dmd are so ridiculously tightly coupled, you n

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 March 2018 at 12:27:42 UTC, Adam D. Ruppe wrote: https://dlang.org/download.html specifically I grab the linux tarballs http://downloads.dlang.org/releases/2.x/2.079.0/dmd.2.079.0.linux.tar.xz and just cd dmd2/src/dmd and make -f posix.mak this always worked perfectly a year or

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 12 March 2018 at 12:24:54 UTC, Seb wrote: Where did you grab the source ball? an extremely unlikely place to download the dlang compiler. https://dlang.org/download.html

Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread Adam D. Ruppe via Digitalmars-d
I do. It was a long, long time ago, but it was a glorious age when you could hack on dmd with ease. Just download the zip, cd dmd/src/dmd and make. Seconds later, you'd have a new dmd binary. But then the dark times came. dmd/globals.d(362): Error: file "VERSION" cannot be found or not in a p

Re: Inline Module / Namespace

2018-03-09 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 9 March 2018 at 18:51:50 UTC, Manu wrote: If you tried to `import modulename;` from some other module... how would the compiler know where to find it? The compiler has to parse the module to find them correctly already. When you do foo.bar into foo/bar.d, it is just the first guess

Re: Fact check: when did D add static if?

2018-03-07 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 March 2018 at 04:09:17 UTC, Meta wrote: Has D had static if since its inception, or was it added somewhere along the way? https://digitalmars.com/d/1.0/changelog1.html What's New for D 0.124 May 19, 2005 New/Changed Features *snip* Added static if. That's before my tim

Re: Advent of D

2018-03-06 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote: I did post it to Lobsters, though: This is random but I have been thinking about asking for a lobsters invite... can you hook me up?

Re: Classinfo and @nogc conflict

2018-03-06 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 6 March 2018 at 03:07:49 UTC, solidstate1991 wrote: I use classinfo for detecting the type of bitmaps, and while I probably will have a workaround for the associative array stuff Have you tried `item.classinfo is typeid(xxx)` so `is` instead of `==`? That... might not work across s

Re: help me with dpldocs - how to filter 3rd party libs

2018-03-05 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 5 March 2018 at 01:02:52 UTC, Norm wrote: Might not help much though, I imagine these third-party sources are built as source only libraries, so they probably appear as source files anyway. Yeah, in the case I'm looking at now, they aren't listed as dub packages at all, just files

Re: help me with dpldocs - how to filter 3rd party libs

2018-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 4 March 2018 at 23:18:25 UTC, Norm wrote: Can you run dub describe and parse the output, which is JSON I think. It used to indicate a role for each source file under each configuration, one of which is "unusedSource". I don't see any info like that when I run it here... :( Alternat

help me with dpldocs - how to filter 3rd party libs

2018-03-04 Thread Adam D. Ruppe via Digitalmars-d
So the dpldocs scraper right now pulls all the .d files out of a repo and tries to build docs for them. But in some cases, there's a lot of added dependencies in there that can cause the built to time out. For example, take a look at dlangui: http://dlangui.dpldocs.info/dlangui.html Notice t

Re: C++ launched its community survey, too

2018-02-27 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 27 February 2018 at 17:41:07 UTC, H. S. Teoh wrote: And just about every new dmd release, people fume on this forum about regressions and gratuitous code breakages. Not all deprecations/code breakages are *regressions* and *gratuitous*. You just need to do a cost/benefit look at

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 16:42:26 UTC, Adam D. Ruppe wrote: source viewer This now works: http://dpq.dpldocs.info/source/dpq.query.d.html#L29 the "see implementation" links lead to pages like that. You'll notice in the source view that many names are links. You can click on them to g

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 05:33:56 UTC, Joe wrote: The main issue is that, other than derelict-pq, using any of these libraries involves reading the library code and understanding the sui generis interfaces implemented by each. So often in threads like this I chime in to point out my li

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 16:41:09 UTC, Martin Tschierschke wrote: Please make a post to announce and place the direct link to it inside code.dlang.org :-) Well, I forgot to log errors on the server so I see a few generation failures and I'm not sure if it is because the code is missin

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 15:44:49 UTC, Paolo Invernizzi wrote: :-O Adam, you are the man! worship me! So I'm gonna tell you guys a dirty little secret: I intend to take the documentation throne by means of subterfuge. I've been generating docs for popular packages already but it ha

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 14:13:18 UTC, Joe wrote: Again, coming from Python, I'm familiar with RTD So I actually just made this extension to my dpldocs website: http://ddb.dpldocs.info/ddb.postgres.html You can try going to http://any-dub-package.dpldocs.info and it will try to bui

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-23 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 23 February 2018 at 13:47:16 UTC, biocyberman wrote: So, even though I wanted to get away with using stackoverflow.com A bunch of us are on stackoverflow too, and it could use some more stuff. I like SO for archiving too, even if you get an answer here, SO is a lot easier to search

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-23 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 23 February 2018 at 13:55:44 UTC, Jonathan M Davis wrote: And none of the features that you're talking about really make sense when you're dealing with NNTP or a mailing list. It's all just plain text. Well, nntp actually supports basically all that stuff: you can do multipart/alte

Re: any svg d-man art out there?

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 22 February 2018 at 23:54:48 UTC, Adam D. Ruppe wrote: any of those in svg format? There is an svg one in here!! https://github.com/dlang-community/d-mans

any svg d-man art out there?

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d
You know, D-man, like https://dlang.org/images/d5.gif any of those in svg format?

Re: Annotation of functions

2018-02-20 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 20 February 2018 at 13:27:08 UTC, psychoticRabbit wrote: so.. in that case..another idea...how about a compiler option to output a list of functions. (I don't really expect many will warm to that idea.) Does anyone know of any tool that could do such a thing? I just want of a list

  1   2   3   4   5   6   7   8   9   10   >