Re: Want to start a graphical Hello world.
On Sunday, 21 January 2018 at 04:16:10 UTC, MHE wrote: [...] For this i have made a folder named GIT in the linux directory /usr/local/GIT And Gitcloned in the GIT folder : git clone https://github.com/nomad-software/x11 git clone https://github.com/nomad-software/tcltk.git The clones are now in /usr/local/GIT/ Hmm, but you are using GtkD in your example... It looks like you compiled the wrong code. What you actually want is GtkD from https://github.com/gtkd-developers/GtkD or installed from the Debian repositories (in case you want to use LDC) via `sudo apt install libgtkd-3-dev` When i start the upper code in a cmd the result is as follows : ___ $ dmd hw_graphical.d hw_graphical.d(1): Error: module MainWindow is in file 'gtk/MainWindow.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import What must be done that the code make a graphical window ? If you want to use GtkD and achieve a quick result, you might want to use the Dub package manager. GtkD also has a few demo applications that show you how to use it with dub, take a look at https://github.com/gtkd-developers/GtkD/tree/master/demos/gtk I want to make the D programming tkd module ready for GUI programming. Need a step by step advice for BEGINNERS in D programming. tkd is a project different from GtkD (which your example above is using). For "modern" UI that integrates well with GNOME, you will highly likely want to use GtkD. Tcl/Tk is of course an option as well, but the D bindings look less complete and well maintained. In case you want to use Tk, you will need to change your code to actually use it, instead of GTK+ though ;-) Any Internetlink for step by step instructions how to arrange D and TK would be helpful ! I can't help with Tk, but for GTK+ a quick Google search found https://sites.google.com/site/gtkdtutorial/ - this tutorial is rather old, but it might be useful as a reference. This experience report by Gerald Nunn might also be an interesting read for you: https://gexperts.com/wp/learning-d-and-gtk/ Cheers, Matthias
Re: LDC 1.7.0
On Sunday, 21 January 2018 at 04:45:49 UTC, Nicholas Wilson wrote: On Saturday, 20 January 2018 at 15:19:13 UTC, Johannes Loher wrote: On Saturday, 6 January 2018 at 01:19:14 UTC, kinke wrote: [...] Hey, thanks for your great work! Would it be possible to add a armhf build to the release? If you can not do it yourself, could you please point me to some resources where I can find out about how to create such a release build myself? Thank you! See https://wiki.dlang.org/Building_LDC_from_source You can also use the armhf build of ldc 1.6, even if just to build 1.7 yourself: https://github.com/ldc-developers/ldc/releases/tag/v1.6.0
Re: Want to start a graphical Hello world.
On Sunday, 21 January 2018 at 04:16:10 UTC, MHE wrote: $ dmd hw_graphical.d You need to link in and tell the compiler where to find the library. Tru dmd -I/usr/local/GIT/whatever hw_graphical.d -L-lgtk and whatever else the library does. I haven't used gtkd so I don't know the exact thing for it, but something like that.
Re: LDC 1.7.0
On Saturday, 20 January 2018 at 15:19:13 UTC, Johannes Loher wrote: On Saturday, 6 January 2018 at 01:19:14 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.7. The highlights of this version in a nutshell: * Based on D 2.077.1. * Catching C++ exceptions supported on Linux and Windows. * LLVM for prebuilt packages upgraded to v5.0.1. Full release log and downloads: https://github.com/ldc-developers/ldc/releases/tag/v1.7.0 Thanks to all contributors! Hey, thanks for your great work! Would it be possible to add a armhf build to the release? If you can not do it yourself, could you please point me to some resources where I can find out about how to create such a release build myself? Thank you! See https://wiki.dlang.org/Building_LDC_from_source
I have changed the code to a TK code. But the same error appears. D is looking in /usr/include/dmd/phobos/ for the files.
Here is the normal and original TK code for a testing GUI in D. The only case is that the TK bindings are not really done. All files and Repositories are on my HD. Need help to make the dependencies right to work. import tkd.tkdapplication; // Import Tkd. class Application : TkdApplication // Extend TkdApplication. { private void exitCommand(CommandArgs args) // Create a callback. { this.exit(); // Exit the application. } override protected void initInterface() // Initialise user interface. { auto frame = new Frame(2, ReliefStyle.groove)// Create a frame. .pack(10); // Place the frame. auto label = new Label(frame, "Hello World!")// Create a label. .pack(10); // Place the label. auto exitButton = new Button(frame, "Exit") // Create a button. .setCommand() // Use the callback. .pack(10); // Place the button. } } void main(string[] args) { auto app = new Application();// Create the application. app.run(); // Run the application. }
Want to start a graphical Hello world.
Hi there , i have this code : import gtk.MainWindow, gtk.Label, gtk.Main; class GoodbyeWorld : MainWindow { this() { super("GtkD"); add(new Label("Goodbye World")); showAll(); } } void main(string[] args) { Main.init(args); new GoodbyeWorld(); Main.run(); } For this i have made a folder named GIT in the linux directory /usr/local/GIT And Gitcloned in the GIT folder : git clone https://github.com/nomad-software/x11 git clone https://github.com/nomad-software/tcltk.git The clones are now in /usr/local/GIT/ When i start the upper code in a cmd the result is as follows : ___ $ dmd hw_graphical.d hw_graphical.d(1): Error: module MainWindow is in file 'gtk/MainWindow.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import What must be done that the code make a graphical window ? I want to make the D programming tkd module ready for GUI programming. Need a step by step advice for BEGINNERS in D programming. Any Internetlink for step by step instructions how to arrange D and TK would be helpful ! WBR MHE
Re: gRPC in D good idea for GSOC 2018?
On Friday, 19 January 2018 at 10:14:15 UTC, yawniek wrote: On Monday, 15 January 2018 at 19:28:08 UTC, Ali Çehreli wrote: I know a project where D could benefit from gRPC in D, which is not among the supported languages: https://grpc.io/docs/ Do you think gRPC support is worth adding to GSOC 2018 ideas? https://wiki.dlang.org/GSOC_2018_Ideas Ali Problem here is that D lacks a proper http/2 stack. unfortunately due to time constraints my libh2o binding project got stuck. Have you seen Etienne's libhttp2? http://code.dlang.org/packages/libhttp2
[Issue 17318] Delegates allow escaping reference to stack variable
https://issues.dlang.org/show_bug.cgi?id=17318 --- Comment #3 from hst...@quickfur.ath.cx --- P.S. On my computer, the value of z changes after the call to dg(), which is wrong because z is a local variable in smoke() that the delegate should not be able to access. --
[Issue 17318] Delegates allow escaping reference to stack variable
https://issues.dlang.org/show_bug.cgi?id=17318 --- Comment #2 from hst...@quickfur.ath.cx --- It could be because the compiler now is smarter about constructing return values in-place rather than moving the struct afterwards. Nevertheless, the actual problem still persists: the delegate is closing over a local variable that resides on the stack. This should have been prevented by -dip1000, but it doesn't. Here's slightly more elaborate example that exposes the bug on latest dmd git master: - import std.stdio; struct S { int x; void delegate() dg; this(int dummy) { dg = () { writefln(" = %#x", ); x++; }; } } auto makeS() { auto s = S(1); return s.dg; // <-- N.B. escaping reference to s } void smoke(void delegate() dg) { int z = 789; writeln(z); dg(); writeln(z); } void main() { auto dg = makeS(); smoke(dg); } - --
Re: gRPC in D good idea for GSOC 2018?
On Friday, 19 January 2018 at 18:34:31 UTC, Ali Çehreli wrote: On 01/19/2018 02:14 AM, yawniek wrote: Could you please summarize what needs to be done and in what order. I would be happy to take active part in this effort. well, my personal opinion this should be designed/decided on a green field and not again make the mistake to try to include too much that is just laying around. i think vibe.d's eventcore may (or may not) be too opinionated and providing too much: 1a. define an overal strategy how/where protocols should be implemented and whether to focus on speed or "elegant" implementations. 1b. define how high performance servers should ideally be implemented and how that works together with D's concurrency models. plus provide the necessary things such as streams/ranges. ideally endorse/include/create one primary eventloop implementation or interface. possibly rusts tokyo.rs could be an inspiration? https://tokio.rs/docs/getting-started/tls/ 2a. create reference implementations for a http parser or e.g. port something like picohttpparser https://github.com/h2o/picohttpparser but this should adhere to the approach defined in 1. 3. implement crypto functions. e.g. port picotls ( https://github.com/h2o/picotls ) but also provide/maintain proper openssl bindings. 4. implement http/2 grpc also, think about what happens when the world starts switching to quic, the ietf wg makes good progress from what i saw. a totally different approach/decision would be to say, that D is a glue language and one should use C libraries (libuv, openssl, picohttpparser). but then i think tooling for integrating those should be improved/standardized (e.g. package manager, binding automation).
Please provide a channel for D ecosystem ideas
Hi, the GSOC wiki page inspired me to write this request. If I have an idea how the improve the D ecosystem but cannot do it myself, there is at the moment no good channel to provide this idea to someone other in the D community. Maybe someone other is searching for an opportunity to help the D ecosystem but does not know how. - Implement support for D in another tool: E.g. it would be great if someone could create a Jenkins D plugin similar to https://wiki.jenkins.io/display/JENKINS/NodeJS+Plugin - Maybe you do not even have to develop something but convince other projects / companies to integrate D into their tools: Fortify, Sonatype OSS, Cloud Foundry, ... - Implement something in D It would be really great if there would be a place someone can easily put an idea and other can see the ideas and can pick one. The channel could be a new group "Ecosystem projects" in the forum, a Trello board, ... My preference would be a github repository with an issue per idea. What do you think? Kind regards André
[Issue 18271] `dmd -deps fun1.d fun2.d` produces very different results when order of source files changes
https://issues.dlang.org/show_bug.cgi?id=18271 Jonathan Marlerchanged: What|Removed |Added CC||johnnymar...@gmail.com --- Comment #3 from Jonathan Marler --- > Would be nice to have as orthogonal features as possible; > could we have: > -i mean recurse on imports (while respecting -i=pattern) > -deps mean output dependencies (on whatever's being analyzed) -i currently means, include imported modules into the compilation as if they were given on the command line. this is orthogonal to "recurse on imports", so I'm confused why you would want to combine these? --
Re: Filter a Range Based on a Passed In Variable
On Saturday, 20 January 2018 at 19:09:28 UTC, Adam D. Ruppe wrote: On Saturday, 20 January 2018 at 19:04:06 UTC, jsako wrote: I want to be able to filter a range based on a variable known at runtime. Something like this: [code] int id = getFilterID(); auto filteredRange = filter!(a => a.id == id)(rangeToBeFiltered); [/code] This doesn't seem to be possible, however as .filter only takes unary predicates. I tried: That should actually work. What exactly happened when you ran that literal code above? ... Huh. The code I posted was a simplified case of what I actually have and like a fool I didn't test it first. You're absolutely right, the above code does work. Color me embarrassed. In the actual code, I kept getting DMD saying "...does not match template declaration filter(alias predicate) if (is(typeof(unaryFun!predicate)))". I think it may be a scoping issue? I'll have to look closer at it. Thanks for the help! Sorry I wasted your time. At least this pointed me in the right direction to find out what is really going on.
Re: Filter a Range Based on a Passed In Variable
On Saturday, 20 January 2018 at 19:04:06 UTC, jsako wrote: I want to be able to filter a range based on a variable known at runtime. Something like this: [code] int id = getFilterID(); auto filteredRange = filter!(a => a.id == id)(rangeToBeFiltered); [/code] This doesn't seem to be possible, however as .filter only takes unary predicates. I tried: That should actually work. What exactly happened when you ran that literal code above?
Filter a Range Based on a Passed In Variable
I want to be able to filter a range based on a variable known at runtime. Something like this: [code] int id = getFilterID(); auto filteredRange = filter!(a => a.id == id)(rangeToBeFiltered); [/code] This doesn't seem to be possible, however as .filter only takes unary predicates. I tried: [code] filterString = "a.id == " ~ to!string(id); filter!filterString(rangeToBeFiltered); [/code] But that also doesn't work. Is there another range algorithm that should be used in this case? Do I roll my own?
Re: gRPC in D good idea for GSOC 2018?
On Friday, 19 January 2018 at 18:34:31 UTC, Ali Çehreli wrote: On 01/19/2018 02:14 AM, yawniek wrote: > Just look how > beautiful Golangs protocol implementations are and the whole ecosystem > that focused effort spawned. I have said this here before. I agree and do have first-hand experience with that but I'm not experienced enough in this field to come up with a modern solution. If it were left to me, I would start looking at Go and Python solutions but I fear I wouldn't see design decisions that could have been better. Could you please summarize what needs to be done and in what order. I would be happy to take active part in this effort. Thank you, Ali
Re: How to manage function's parameter storage class?
On Saturday, 20 January 2018 at 17:05:40 UTC, Simen Kjærås wrote: On Saturday, 20 January 2018 at 14:31:59 UTC, Sobaya wrote: How can I wrap function whose arguments contain both ref and normal like 'func' ? With normal 'Args', x is not increased because x is copied when passed to opDispatch. If I write 'ref Args' in opDispatch's argument, it fails because second parameter is not rvalue. https://dlang.org/spec/function.html#auto-ref-functions Simply put, instead of 'ref' use 'auto ref'. -- Simen Oh... I missed it... Thanks! !
Re: Cannot initialize associative array
On Friday, January 19, 2018 23:39:08 rumbu via Digitalmars-d-learn wrote: > Thank you Adam, just figured out myself the same solution, but I > didn't expect to have a static constructor in main.d. I thought > static constructors are meant to be used in imported modules. > Thanks again. There really isn't anything special about whatever module you have main in. It's just like any other module except that it has main in it. Technically, you could put main somewhere deep in your module hierarchy. It's just probably not the best idea from an organizational standpoint. - Jonathan M Davis
[Issue 17213] [REG2.072] take address of ref return value @safe
https://issues.dlang.org/show_bug.cgi?id=17213 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --- Comment #5 from Carsten Blüggel --- (In reply to Johan Engelen from comment #4) > So not a compiler bug then? My understanding is, that Walter Bright's comment is comprehensive, replying to the issue and (indirectly) to other points raised here, in my words: - The language doesn't allow to take the address of a 'ref' in @safe code, enforced since 2.072 (as always, manual safety check and @trusted is possible). - unrelated to DIP1000 Did I miss anything or why is this issue still an open regression? --
Re: Using Postgres connection functions
On Saturday, 20 January 2018 at 04:54:47 UTC, Adam D. Ruppe wrote: Same as above. The general pattern is: C_Type[] name = new C_Type[](requested_size); // pass as `name.ptr`. This becomes a C_Type* Thanks, Adam. Perhaps something like this ought to make its way into the "D for C Programmers" page.
Re: How to manage function's parameter storage class?
On Saturday, 20 January 2018 at 14:31:59 UTC, Sobaya wrote: How can I wrap function whose arguments contain both ref and normal like 'func' ? With normal 'Args', x is not increased because x is copied when passed to opDispatch. If I write 'ref Args' in opDispatch's argument, it fails because second parameter is not rvalue. https://dlang.org/spec/function.html#auto-ref-functions Simply put, instead of 'ref' use 'auto ref'. -- Simen
[Issue 17284] Template function attribute inference wrongly infers @safe for accessing overlapping pointer fields in unions
https://issues.dlang.org/show_bug.cgi?id=17284 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --
[Issue 17318] Delegates allow escaping reference to stack variable
https://issues.dlang.org/show_bug.cgi?id=17318 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --- Comment #1 from Carsten Blüggel --- DMD64 D Compiler v2.078.0 and LDC - the LLVM D compiler (1.7.0): based on DMD v2.077.1 and LLVM 5.0.1: I can't reproduce the issue reported; for me, Your code prints: = 0x7ffd86c2a118 = 0x7ffd86c2a118 Equal addresses, independent from with/without -dip1000, didn't need to comment out anything. --
Re: LDC 1.7.0
On Saturday, 6 January 2018 at 01:19:14 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.7. The highlights of this version in a nutshell: * Based on D 2.077.1. * Catching C++ exceptions supported on Linux and Windows. * LLVM for prebuilt packages upgraded to v5.0.1. Full release log and downloads: https://github.com/ldc-developers/ldc/releases/tag/v1.7.0 Thanks to all contributors! Hey, thanks for your great work! Would it be possible to add a armhf build to the release? If you can not do it yourself, could you please point me to some resources where I can find out about how to create such a release build myself? Thank you!
Re: Project Highlight: BSDScheme
On Saturday, 20 January 2018 at 14:02:24 UTC, Joakim wrote: Autocorrect? Andrew Appel's Probably muscle memory. Thanks. Nice writeup. I saw his blog post tweeted and was disappointed he didn't say anything about D, good you got that for this post. I was happy he agreed. Too bad the reddit thread's been nothing but snark so far.
How to manage function's parameter storage class?
I'm using opDispatch for wrapping a function like below. ``` import std.stdio; void func(ref int x, int y) { x++; } struct B { // wraps 'func'. I want to implement this function. template opDispatch(string fn) { void opDispatch(Args...)(Args args) { mixin(fn~"(args);"); // func(args); } } } void main() { { // This is good behavior. int x = 3; func(x, 1); writeln(x); // prints '4' } { // This is bad behavior. B b; int x = 3; b.func(x, 1); writeln(x); // prints '3' because x is copied when passed to opDispatch. } } ``` How can I wrap function whose arguments contain both ref and normal like 'func' ? With normal 'Args', x is not increased because x is copied when passed to opDispatch. If I write 'ref Args' in opDispatch's argument, it fails because second parameter is not rvalue.
Re: Project Highlight: BSDScheme
On Saturday, 20 January 2018 at 11:44:39 UTC, Mike Parker wrote: Not long ago, I stumbled upon a tweet by Phil Eaton about BSDScheme, his Scheme interpreter written in D. He agreed to do a Project Highlight and here we are! Blog https://dlang.org/blog/2018/01/20/project-highlight-bsdscheme/ Reddit https://www.reddit.com/r/programming/comments/7rpxah/bsdscheme_a_scheme_interpreter_implementation_in_d/ Autocorrect? Andrew Appel's check out his blog -> check out his blog post about designing his interpreter Nice writeup. I saw his blog post tweeted and was disappointed he didn't say anything about D, good you got that for this post.
Re: Struct initialization syntax
On Thursday, 18 January 2018 at 03:50:15 UTC, arturg wrote: On Wednesday, 17 January 2018 at 17:37:07 UTC, H. S. Teoh wrote: On Wed, Jan 17, 2018 at 05:31:03PM +, Azi Hassan via Digitalmars-d-learn wrote: The D tour for structs uses a syntax similar to that of C++ in order to initialize a Person struct : Person p(30, 180). Is this syntax supported in D ? Running that part of the code neither works on the playground nor on my machine (dmd v2.076.0). You're probably looking for this syntax: auto p = Person(30, 180); T looks like a bug in the 3rd example. That's what I was wondering about, thanks.
[Issue 18273] New: Better C: wrong exit code from main()
https://issues.dlang.org/show_bug.cgi?id=18273 Issue ID: 18273 Summary: Better C: wrong exit code from main() Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: mar...@oberhumer.com I've stumbled about this while trying Better C from https://dlang.org/spec/betterc.html extern(C) void main() { import core.stdc.stdio : printf; printf("Hello betterC\n"); // BUG: the exit code of this program is wrong (usually not 0) } Possible solutions: 1) the compiler should add an implicit "return 0" for "void main()"; or 2) require that main() returns "int" in extern C/C++ mode --
Re: Relocatable objects and internal pointers
On Saturday, 30 January 2016 at 03:13:59 UTC, Matt Elkins wrote: std.typecons.Unique seems to require heap allocation, which makes it a far cry from std::unique_ptr. isn't unique_ptr typically for heap allocation? eg: https://stackoverflow.com/questions/42910711/unique-ptr-heap-and-stack-allocation NOTE: calypso (ldc fork) should allow internal pointers now, see https://github.com/Syniurge/Calypso/issues/70 (cv::Mat.step.p is an internal pointer)
[Issue 18265] `scope` storage class w/ -dip1000 and `scope` type modifier behavior inconsistent
https://issues.dlang.org/show_bug.cgi?id=18265 Mike Franklinchanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #3 from Mike Franklin --- Closing as invalid for now until I sort this out further. --
Re: D client for ROS
On Wednesday, 17 January 2018 at 22:48:13 UTC, Johan Engelen wrote: This is not too late for a GSoC project. We can add it as an idea to the GSoC page, with a link to your summary (great, thanks!). Cheers, Johan Sure, why not. (You are welcome.) Cheers, Florian
Project Highlight: BSDScheme
Not long ago, I stumbled upon a tweet by Phil Eaton about BSDScheme, his Scheme interpreter written in D. He agreed to do a Project Highlight and here we are! Blog https://dlang.org/blog/2018/01/20/project-highlight-bsdscheme/ Reddit https://www.reddit.com/r/programming/comments/7rpxah/bsdscheme_a_scheme_interpreter_implementation_in_d/
[Issue 18272] New: missing changelog entry and no doc for -gf (besides cryptic emit debug info for all referenced types)
https://issues.dlang.org/show_bug.cgi?id=18272 Issue ID: 18272 Summary: missing changelog entry and no doc for -gf (besides cryptic emit debug info for all referenced types) Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: timothee.co...@gmail.com introduced in 2.076 but not mentioned in changelog IIRC; what does this flag mean? msg is not very informative at all. I'm apparently not the only one confused, see http://www.digitalmars.com/d/archives/digitalmars/D/learn/Debugging_shared_libs_on_windows_98436.html can we add it to a changelog (maybe a new point release or patch version for 2.076, or at lease in changelog of master ) --
[Issue 17362] Don't infer return attribute for explicit scope arguments
https://issues.dlang.org/show_bug.cgi?id=17362 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --
[Issue 17449] [DIP1000] crash due to covariant conversion of scope delegate to delegate
https://issues.dlang.org/show_bug.cgi?id=17449 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --
[Issue 18271] `dmd -deps fun1.d fun2.d` produces very different results when order of source files changes
https://issues.dlang.org/show_bug.cgi?id=18271 --- Comment #2 from Timothee Cour--- according to @marler8997 on https://github.com/dlang/tools/pull/291#issuecomment-359156301 > I think this may be by design. It only performs the full semantic analysis on > modules imported by the first module given on the command line. I remember > seeing the code do this and I thought it was odd but I assumed there was a > reason for this. > https://github.com/dlang/dmd/blob/f947c0881432988dcd8cd80d5abe71e4c0463867/src/dmd/mars.d#L822 > This is where the extra semantic analysis is done when the -deps flag is > used. As you can see, only module[0].aimports is being scanned. This is > either a bug or by design. If it's a bug, then the fix is likely to loop over > Modules.modules instead of modules[0].aimports. - * this is not documented in -deps (and also not in dmd changelog) * what's a use case for doing it only on the 1st module? here's a use case for doing it on all files passed on cmdline: ``` // main.d: extern(C) void fun(); import other1; void main(){fun();} // mylib.d: import other2; extern(C) void fun(){} // cmd line dmd -deps main.d mylib.d ``` Would be nice to have as orthogonal features as possible; could we have: -i mean recurse on imports (while respecting -i=pattern) -deps mean output dependencies (on whatever's being analyzed) --
Re: Proposed Phobos equivalent of wcswidth()
On Friday, 19 January 2018 at 19:33:28 UTC, H. S. Teoh wrote: On Thu, Jan 18, 2018 at 06:42:26PM +, Dmitry Olshansky via Digitalmars-d wrote: [...] Also forgot to mention that can pass BitPacked!(ubyte,2) to Trie template as value type to use 2 bit per value. Should reduce your width table 4-fold. Just saying;) Thanks for the tip! Indeed, the table size was reduced 4-fold. Awesome. However, now I'm finding that it no longer works properly when loaded from the precompiled data. It appears to have something to do with the default value for the width table being 1 rather than ubyte.init, and so far I couldn't figure out how to get the Trie ctor that takes .offsets, .sizes, .data to specify a default value. Why would you need a default in a low-level construction? I think it naturally takes the tables with whatever was stored in there. There is no processing. So the default has to be explicitly stored during building of trie. So now the trie is returning the wrong value for certain dchar ranges. :-(
[Issue 17512] [REG 2.073] [DIP1000] Error on bad interplay of "auto ref" and "return" attribute deduction.
https://issues.dlang.org/show_bug.cgi?id=17512 Carsten Blüggelchanged: What|Removed |Added CC||chi...@posteo.net --
[Issue 18271] New: `dmd -deps fun1.d fun2.d` produces very different results when order of source files changes
https://issues.dlang.org/show_bug.cgi?id=18271 Issue ID: 18271 Summary: `dmd -deps fun1.d fun2.d` produces very different results when order of source files changes Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: timothee.co...@gmail.com $ time ~/Downloads/dmd2_074/osx/bin/dmd -c -deps=/tmp/z02.txt fun2.d fun3.d && wc -l /tmp/z02.txt cpu 0.052 total 109 /tmp/z02.txt $ time ~/Downloads/dmd2_074/osx/bin/dmd -c -deps=/tmp/z02.txt fun3.d fun2.d && wc -l /tmp/z02.txt cpu 0.055 total 109 /tmp/z02.txt with dmd_075 up to today(v2.077.1) I get: $ time dmd -c -deps=/tmp/z02.txt fun3.d fun2.d && wc -l /tmp/z02.txt cpu 0.784 total 1137 /tmp/z02.txt $ time dmd -c -deps=/tmp/z02.txt fun2.d fun3.d && wc -l /tmp/z02.txt cpu 0.058 total 107 /tmp/z02.txt Note also that (depending on order), dmd produces much more output (and is slower) than before; I'm guessing (depending on order), it will do semantic analysis on function local imports; in any way, the order-dependency is a bug. ``` // fun2.d void test2(){ import fun3; test3; } // fun3.d void test3(){ import std.stdio; writeln(__FILE__); } ``` --
[Issue 18271] `dmd -deps fun1.d fun2.d` produces very different results when order of source files changes
https://issues.dlang.org/show_bug.cgi?id=18271 Timothee Courchanged: What|Removed |Added CC||timothee.co...@gmail.com --- Comment #1 from Timothee Cour --- likewise with -deps (instead of -deps=file) --