Re: My Meeting C++ Keynote video is now available
On Wednesday, 16 January 2019 at 05:32:51 UTC, Walter Bright wrote: On 1/15/2019 10:39 AM, Jacob Carlborg wrote: Perhaps we shouldn't support user defined types or functions either ;) You deliberately wrote that, and I'm confident you'd never try to pass that off as good work. With macros, however, programmers are convinced they are creating models of clarity. I've seen programmers truly believe: #define BEGIN { #define END } improves their C code. Fortunately, that was ridiculed out of existence in the 1980s, but the more subtle abuses persist with their ardent defenders. I used to use a lot of macros in my C code, and a few years back made an effort to remove them all from the dmd source code. The result was very satisfactory. I've seen entire code bases abandoned because of macros after the original developer left. I'm pretty sure Jacob is talking about a completely different type of macro (i.e. not textual substitution), AST macros. I'd be interested to see how close we could get if we allowed mixin template to contain expression as well as declarations (obviously these could only be instantiated in function contexts). Anyway something to play around with at DConf.
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 16:25:04 UTC, WebFreak001 wrote: On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: A refined core library for D programming language. Core modules: [...] nice! Always cool seeing new frameworks for existing stuff. How does this compare to vibe.d? We need to compare this with other popular programming languages, examples are rust and golang. There is no comparison with vibed, which is popluar in D. In other tests, we found that the performance of vibed was not as good as that of other programming languages.
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 16:12:24 UTC, Aldo wrote: On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: A refined core library for D programming language. Core modules: [...] Hello Brian, thats a good lib, thanks for the work. Thank you for supported :)
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 18:57:55 UTC, Johannes Loher wrote: On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: [...] Thanks for the great work! I had already been planning on playing around with hunt for a bit. What has been holding me back until now is the fact that part of the documentation still is only available in Chinese, which I unfortunately am not able to read. Are there any plans on translating the remaining parts of the documentation? We will write the documenation for hunt library :) Please look forward to it!
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 18:57:55 UTC, Johannes Loher wrote: On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: [...] Thanks for the great work! I had already been planning on playing around with hunt for a bit. What has been holding me back until now is the fact that part of the documentation still is only available in Chinese, which I unfortunately am not able to read. Are there any plans on translating the remaining parts of the documentation? We are writting the documents for Hunt in English.
Re: My Meeting C++ Keynote video is now available
On 1/15/2019 10:39 AM, Jacob Carlborg wrote: Perhaps we shouldn't support user defined types or functions either ;) You deliberately wrote that, and I'm confident you'd never try to pass that off as good work. With macros, however, programmers are convinced they are creating models of clarity. I've seen programmers truly believe: #define BEGIN { #define END } improves their C code. Fortunately, that was ridiculed out of existence in the 1980s, but the more subtle abuses persist with their ardent defenders. I used to use a lot of macros in my C code, and a few years back made an effort to remove them all from the dmd source code. The result was very satisfactory. I've seen entire code bases abandoned because of macros after the original developer left.
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 16:25:04 UTC, WebFreak001 wrote: On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: A refined core library for D programming language. Core modules: [...] nice! Always cool seeing new frameworks for existing stuff. How does this compare to vibe.d? Here are some web frameworks including vibe.d, fasthttp, etc. : https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=plaintext It's so regretful that the Hunt has not been listed on it yet. The hunt just a core library for web development. We are activly developping the Hunt-Framework lib (https://github.com/huntlabs/hunt-framework), which is a full-stack web framework, and based on the Hunt.
Re: My Meeting C++ Keynote video is now available
On Tuesday, 15 January 2019 at 17:29:12 UTC, welkam wrote: On Tuesday, 15 January 2019 at 11:59:58 UTC, Atila Neves wrote: He's not saying "kill classes in D", he's saying an OOP system in D could be implemented from primitives and classes don't need to be a language feature, similar to CLOS in Common Lisp. For some people writing OOP means writing keyword class. I am not interested in OOP as a library feature rather then a built in feature. Let not repeat the same mistakes as c++. If there were a dip that involves deprecating class, expect me to be very vocal in regards to opposing it.
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: [...] Thanks for the great work! I had already been planning on playing around with hunt for a bit. What has been holding me back until now is the fact that part of the documentation still is only available in Chinese, which I unfortunately am not able to read. Are there any plans on translating the remaining parts of the documentation?
Re: My Meeting C++ Keynote video is now available
On 2019-01-15 12:53, Walter Bright wrote: Template expressions can't, either, but what they do is hijack the syntax for completely different purposes. The poor reader will be looking at code, and it will behave nothing like the syntax suggests. Ah, you mean like this: struct MyInt { private int value; MyInt add(MyInt other) { return MyInt(value - other.value); } } Perhaps we shouldn't support user defined types or functions either ;) -- /Jacob Carlborg
Re: My Meeting C++ Keynote video is now available
On Tuesday, 15 January 2019 at 11:59:58 UTC, Atila Neves wrote: He's not saying "kill classes in D", he's saying an OOP system in D could be implemented from primitives and classes don't need to be a language feature, similar to CLOS in Common Lisp. For some people writing OOP means writing keyword class.
Re: My Meeting C++ Keynote video is now available
On Tue, 15 Jan 2019 11:59:58 +, Atila Neves wrote: > He's not saying "kill classes in D", he's saying an OOP system in D > could be implemented from primitives and classes don't need to be a > language feature, similar to CLOS in Common Lisp. As long as the syntax and behavior don't change, the error messages are good, and the compile-time overhead is similar, I won't complain.
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: A refined core library for D programming language. Core modules: [...] nice! Always cool seeing new frameworks for existing stuff. How does this compare to vibe.d?
Re: hunt library 1.0.0 released!
On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: A refined core library for D programming language. Core modules: [...] Hello Brian, thats a good lib, thanks for the work.
hunt library 1.0.0 released!
A refined core library for D programming language. Core modules: hunt.concurrency hunt.collection hunt.event hunt.io hunt.logging hunt.text hunt.util Supported platforms: FreeBSD Windows macOS Linux Example for hunt.io echo server: ```D void main() { auto loop = new EventLoop(); auto listener = new TcpListener(loop, AddressFamily.INET, 512); listener.bind(8080).listen(1024).onConnectionAccepted((TcpListener sender, TcpStream client) { client.onDataReceived((in ubyte[] data) { const(ubyte)[] sentData = data; client.write(sentData, (in ubyte[] wdata, size_t nBytes) { debug writefln("thread: %s, sent bytes: %d", getTid(), nBytes); if (sentData.length > nBytes) writefln("remaining bytes: ", sentData.length - nBytes); }); }); }).start(); writeln("Listening on: ", listener.bindingAddress.toString()); loop.run(); } ``` sample code link: https://github.com/huntlabs/hunt/blob/master/examples/TcpDemo/source/server.d Example for HashMap: ```D void main() { HashMap!(string, string) hm = new HashMap!(string, string)(); //add key-value pair to hashmap hm.put("first", "FIRST INSERTED"); hm.put("second", "SECOND INSERTED"); hm.put("third","THIRD INSERTED"); writeln(hm); } ``` About for performance VS rust / golang you can look this pictrue, have benchmark result: https://raw.githubusercontent.com/huntlabs/hunt/master/docs/images/benchmark.png You can find more information in github repo: https://github.com/huntlabs/hunt
Re: My Meeting C++ Keynote video is now available
On Monday, 14 January 2019 at 14:59:03 UTC, 12345swordy wrote: On Monday, 14 January 2019 at 10:06:48 UTC, Mike Franklin wrote: On Monday, 14 January 2019 at 05:31:27 UTC, Paul Backus wrote: [...] I think D's structs are a sufficient object system for such a focal point. With design by introspection, `alias`, templates, `alias this`, `static if`, CTFE, mixins, and a few new D features, classes would be unnecessary. Rust and Zig are pretty good examples of this. D's implementation could even be improved to keep its runtime, yet still allow D to be used as I'm suggesting, without introducing any breakage for anyone. I made some significant progress in that direction when I was working on the compiler in the 2017~2018 timeframe, but my abilities ultimately fell short, and I couldn't see a way forward without support. Mike Killing classes will kill my interest and investment in D. Alex. He's not saying "kill classes in D", he's saying an OOP system in D could be implemented from primitives and classes don't need to be a language feature, similar to CLOS in Common Lisp.
Re: My Meeting C++ Keynote video is now available
On 1/15/2019 1:10 AM, Jacob Carlborg wrote: The AST macros I've been talking about have never been able to create new syntax. Template expressions can't, either, but what they do is hijack the syntax for completely different purposes. The poor reader will be looking at code, and it will behave nothing like the syntax suggests.
Re: My Meeting C++ Keynote video is now available
On Monday, 14 January 2019 at 18:52:02 UTC, Jacob Carlborg wrote: On 2019-01-14 15:42, Steven Schveighoffer wrote: That's a bad example :) The clear answer is mysql-native, which is what vibe.d recommends. Exactly, and I don't need five minutes for that. Five seconds is enough :) Ok, bad example, but let's say you want ORM mapping, too and to have the ability to switch to Postgres later? So what would you recommend?
Re: My Meeting C++ Keynote video is now available
On 2019-01-14 23:52, Walter Bright wrote: On 1/14/2019 10:49 AM, Jacob Carlborg wrote: But Ddoc has macros ;) Indeed it does. But the macros cannot be used to create syntax, and there is no token concatenation. Macros cannot define other macros. The AST macros I've been talking about have never been able to create new syntax. -- /Jacob Carlborg
DIP 1017--Add Bottom Type--Final Review Begins
The last chance for community feedback on DIP 1017, "Add Bottom Type", is now underway. Please do not leave any feedback in this thread, but rather in the review thread in the General forum: https://forum.dlang.org/post/qnrkfiqmtqzpyocxx...@forum.dlang.org