Exporting C APIs from Zig, D, and Nim (seen on youtube)
Hi all, Don't know if this[1] has been posted before, I've just seen it and seemed interesting. Hope you also like it. Antonio [1] https://www.youtube.com/watch?v=4o_tmccinds=youtu.be
Re: D vs nim
On Monday, 14 May 2018 at 06:14:02 UTC, Rel wrote: On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. So what's a big deal in having 'static if' construct? Most of the new programming languages that compiles to native code like Nim, Crystal, Rust, Red and etc have good enough meta-programming support anyways. I recommend this talk to show what static if (among other static introspection tools) enables. https://www.youtube.com/watch?v=29h6jGtZD-U Cheers
Re: D vs nim
On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. So what's a big deal in having 'static if' construct? Most of the new programming languages that compiles to native code like Nim, Crystal, Rust, Red and etc have good enough meta-programming support anyways.
Re: D vs nim
On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: On Wednesday, 25 April 2018 at 14:18:07 UTC, Rel wrote: In case you guys like to take a quick look at new emerging, but somewhat unknown systems programming languages: * https://www.red-lang.org/ (own handwritten backend) * https://crystal-lang.org/ (llvm-based backend) * https://ziglang.org/ (llvm-based backend) * http://nitlanguage.org/ (c-based backend?) * https://www.xojo.com/ (llvm-based backend) Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. Zig has implicit static if: test "static if" { if (false) { @compileError("this is never analyzed"); } } $ zig test test.zig Test 1/1 static if...OK test "static if" { if (true) { @compileError("this is analyzed"); } } $ zig test test.zig test.zig:3:9: error: this is analyzed @compileError("this is analyzed"); ^
Re: D vs nim
i think the explanation in https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement is pretty clear. In any case you can see for yourself: nim c -r main.nim ```nim proc fun(a:int):auto=a*a static: # makes sure block evaluated at CT when fun(1)==1: echo "ok1" when fun(2)==2: echo "ok2" ``` prints ok1 On Fri, May 4, 2018 at 9:40 AM Mark via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 3 May 2018 at 23:09:34 UTC, Timothee Cour wrote: > > nim supports static if (`when`) + CTFE. A simple google search > > or searching > > would've revealed that. > > > > On Thu, May 3, 2018 at 3:20 PM Mark via Digitalmars-d < > > digitalmars-d@puremagic.com> wrote: > > > >> On Thursday, 3 May 2018 at 20:57:16 UTC, Dennis wrote: > >> > On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: > >> >> Funnily, none of these languages have a "static if" > >> >> construct, nor do Rust, Swift and Nim. Not one that I could > >> >> find, anyway. > >> > > >> > What qualifies under "static if"? Because Rust, Swift and > >> > Nim do have conditional compilation. > >> > > > https://doc.rust-lang.org/book/first-edition/conditional-compilation.html > >> > > > https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html (conditional compilation blocks) > >> > > > https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement > > > >> Fair enough. I should have written "static if + CTFE". > The little information on the official site describes `when` more > like #ifdef in C than an actual static if. I also went over a few > dozens of modules in the standard library and the statement seems > to be rarely used, and when it does it's usually in an #ifdef-ish > context (like platform specific code). > Perhaps Nim's support for conditional compilation is as powerful > as D's is, but you can see why my impression is currently to the > contrary.
Re: D vs nim
On Thursday, 3 May 2018 at 23:09:34 UTC, Timothee Cour wrote: nim supports static if (`when`) + CTFE. A simple google search or searching would've revealed that. On Thu, May 3, 2018 at 3:20 PM Mark via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Thursday, 3 May 2018 at 20:57:16 UTC, Dennis wrote: > On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: >> Funnily, none of these languages have a "static if" >> construct, nor do Rust, Swift and Nim. Not one that I could >> find, anyway. > > What qualifies under "static if"? Because Rust, Swift and > Nim do have conditional compilation. > https://doc.rust-lang.org/book/first-edition/conditional-compilation.html > https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html (conditional compilation blocks) > https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement Fair enough. I should have written "static if + CTFE". The little information on the official site describes `when` more like #ifdef in C than an actual static if. I also went over a few dozens of modules in the standard library and the statement seems to be rarely used, and when it does it's usually in an #ifdef-ish context (like platform specific code). Perhaps Nim's support for conditional compilation is as powerful as D's is, but you can see why my impression is currently to the contrary.
Re: D vs nim
nim supports static if (`when`) + CTFE. A simple google search or searching would've revealed that. On Thu, May 3, 2018 at 3:20 PM Mark via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 3 May 2018 at 20:57:16 UTC, Dennis wrote: > > On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: > >> Funnily, none of these languages have a "static if" construct, > >> nor do Rust, Swift and Nim. Not one that I could find, anyway. > > > > What qualifies under "static if"? Because Rust, Swift and Nim > > do have conditional compilation. > > https://doc.rust-lang.org/book/first-edition/conditional-compilation.html > > https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html (conditional compilation blocks) > > https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement > Fair enough. I should have written "static if + CTFE".
Re: D vs nim
On Thursday, 3 May 2018 at 20:57:16 UTC, Dennis wrote: On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. What qualifies under "static if"? Because Rust, Swift and Nim do have conditional compilation. https://doc.rust-lang.org/book/first-edition/conditional-compilation.html https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html (conditional compilation blocks) https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement Fair enough. I should have written "static if + CTFE".
Re: D vs nim
On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. What qualifies under "static if"? Because Rust, Swift and Nim do have conditional compilation. https://doc.rust-lang.org/book/first-edition/conditional-compilation.html https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html (conditional compilation blocks) https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
Re: D vs nim
On Wednesday, 25 April 2018 at 14:18:07 UTC, Rel wrote: In case you guys like to take a quick look at new emerging, but somewhat unknown systems programming languages: * https://www.red-lang.org/ (own handwritten backend) * https://crystal-lang.org/ (llvm-based backend) * https://ziglang.org/ (llvm-based backend) * http://nitlanguage.org/ (c-based backend?) * https://www.xojo.com/ (llvm-based backend) Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway.
Re: D vs nim
On Friday, 10 April 2015 at 21:26:35 UTC, bachmeier wrote: On Friday, 10 April 2015 at 18:52:24 UTC, weaselcat wrote: The only things I've read about nim have been on the D forums - it seems the wikipedia article is even being considered for deletion due to not being noteworthy. So I think you might have trouble finding any comparisons. Read the comments sections on other languages on Reddit programming and you'll see their spam all over the place. I've never used Nim (and don't plan to because I've been turned off by their constant spamming of comment threads on Reddit) but the numerous comments I've seen repeatedly indicate that Nim is not yet ready for real use. This is a fair set of critiques as far as the spamming goes. The NIM project founder is sort of a one person show in development and promotion. I wouldn't say it is not ready for real (commercial) use without being objective, as you have to really characterize what those requirements are. If one considers commercial criteria to be something like: toolchain quality, IDE support, documentation, platform support, sustainable community, fair licensing terms, significant technical merits, actual adoption in the enterprise or research community, and commercial support available. I'd agree that if your graded NIM across these criteria, it doesn't score high. What impresses me about it are the technical merits, platform support, and its toolchain. Disclosure, I did actually use NIM before posting. I wrote a module called huenim which handles basic Philips HUE communication. I found the experience to be a mixed bag. I was impressed that the project lead of NIM was available to help me in my struggles around UPnP. But there just is not enough great documentation with sample code, at the level I like when I am picking up a new language. The syntax bothers me, but that's just my own issue with too many years of Java and C. Another thing that really impressed me was how easy it was to bootstrap the language on an ARM device, particularly AARCH64. The total runtime size is small as well. Would I use it for my company? Yes. Is there risk in doing this? Yes. Hard to recruit NIM coders. Hard to know what is the long term sustainability of the NIM community and project as a whole. I still would say that on the ready for "real" commercial use, D would get a much higher grade on more categories.
Re: D vs nim
In case you guys like to take a quick look at new emerging, but somewhat unknown systems programming languages: * https://www.red-lang.org/ (own handwritten backend) * https://crystal-lang.org/ (llvm-based backend) * https://ziglang.org/ (llvm-based backend) * http://nitlanguage.org/ (c-based backend?) * https://www.xojo.com/ (llvm-based backend)
Re: D vs nim
As for me, I find the Nim programming language interesting. However I dislike syntax a bit, in some cases Python+Pascal syntax style of Nim looks very ugly in my opinion. Also I strongly against relying on C compiler for code generation, knowing how slow it can be. Obviously it was easy for them to use C as a pure-text backend, but I think these days LLVM should be used instead.
Re: D vs nim
On Friday, 20 April 2018 at 11:07:30 UTC, Russel Winder wrote: Has anyone got Pony on their list of interesting languages? I had spent some time looking over the reference capabilities [1], but I'm not sure I have the time to actually program in the language. The isolated type seemed like the most interesting take-away. I think someone on the D forums had been trying to get something similar. [1] https://tutorial.ponylang.org/capabilities/reference-capabilities.html
Re: D vs nim
On Friday, 20 April 2018 at 11:07:30 UTC, Russel Winder wrote: On Thu, 2018-04-19 at 16:50 +, Per Nordlöw via Digitalmars-d wrote: On Friday, 10 April 2015 at 18:52:24 UTC, weaselcat wrote: > P.S., the example on the language's frontpage is cool! > > http://nim-lang.org/ > > Why should I be excited? > Nim is the only language that leverages automated proof > technology to perform a disjoint check for your parallel > code. > Working on disjoint data means no locking is required and yet > data races are impossible: I believe Rust's rayon [1] can do this too... [1] https://github.com/rayon-rs/rayon Has anyone got Pony on their list of interesting languages? Yep, I have. To bad about no curly braces, though.
Re: D vs nim
On Thu, 2018-04-19 at 16:50 +, Per Nordlöw via Digitalmars-d wrote: > On Friday, 10 April 2015 at 18:52:24 UTC, weaselcat wrote: > > P.S., the example on the language's frontpage is cool! > > > > http://nim-lang.org/ > > > > Why should I be excited? > > Nim is the only language that leverages automated proof > > technology to perform a disjoint check for your parallel code. > > Working on disjoint data means no locking is required and yet > > data races are impossible: > > I believe Rust's rayon [1] can do this too... > > [1] https://github.com/rayon-rs/rayon Has anyone got Pony on their list of interesting languages? -- Russel. == Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Roadm: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk signature.asc Description: This is a digitally signed message part
Re: D vs nim
On Friday, 10 April 2015 at 18:52:24 UTC, weaselcat wrote: P.S., the example on the language's frontpage is cool! http://nim-lang.org/ Why should I be excited? Nim is the only language that leverages automated proof technology to perform a disjoint check for your parallel code. Working on disjoint data means no locking is required and yet data races are impossible: I believe Rust's rayon [1] can do this too... [1] https://github.com/rayon-rs/rayon
Re: D vs nim
On Tuesday, 27 March 2018 at 01:19:44 UTC, timotheecour wrote: I've created a git repo https://github.com/timotheecour/D_vs_nim/ with the goal: up to date and objective comparison of features between D and nim, and 1:1 map of features, tools, idioms and libraries to help D users learn nim and vice versa. I just recently came across Andrei's comparison of D, Rust, and Go [1]. I'd love to see that updated and hear his take on Nim. I don't have experience with Nim yet, but from what I've read it seems to match D's 10x "easier to interface with C and C++". Other possible 10x items are the GC, macro system, and the development community being able to focus their resources at a higher level (no linker, competing compilers, headaches targeting arm64, etc. etc.). [1] https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why
Re: D vs nim
@helxi I invite you to contribute PR's to https://github.com/timotheecour/D_vs_nim/ where I discuss feature parity and how to translate concepts from D to nim wherever it makes sense On Fri, Apr 13, 2018 at 4:12 PM, helxi via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Friday, 10 April 2015 at 18:42:20 UTC, Timothee Cour wrote: >> >> Nim looks very promising. >> Is there any comprehensive comparison against D somewhere (if possible >> recent) ? > > > Nim is way more expressive than D afaik. Consider the following imaginary > function: > > proc fn[A : int | float; N; B : seq[A] | DoublyLinkedList[A] | array[N, A] | > set[A]](x: B) : int = > return x.len() + 10 > > This function takes an argument of type B, which is can be either a vector > or forward-list or array of (array's length is N, which can be of any > numeric type) or a set of A. A can be either int or float only. > > Emulating those inline constraints in D would be cumbersome.
Re: D vs nim
On Friday, 10 April 2015 at 18:42:20 UTC, Timothee Cour wrote: Nim looks very promising. Is there any comprehensive comparison against D somewhere (if possible recent) ? Nim is way more expressive than D afaik. Consider the following imaginary function: proc fn[A : int | float; N; B : seq[A] | DoublyLinkedList[A] | array[N, A] | set[A]](x: B) : int = return x.len() + 10 This function takes an argument of type B, which is can be either a vector or forward-list or array of (array's length is N, which can be of any numeric type) or a set of A. A can be either int or float only. Emulating those inline constraints in D would be cumbersome.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On 2018-03-30 08:53, Dmitry Olshansky wrote: With the frame of mind prevalent in our Industry I really want to have compiler includibg codegen as a bunch of library components. Then there is no problem innovating while people argue over things “allowed” for a compiler, or a linker, or a build tool. None of these actually have to be apps talking via files. If I look closely every program I see is a graph database, with nodes sometimes being code, types, sometimes data, other meta-data such as ABI attributes or conditional compilation flags, documentation, external tools, specs and databases are also part of this. Code that produces code is also part of such graph, and CTFE/macroses would just be finer grained approach. Why process graphs piece-wise in a frentic dance of command-line tools that try to fit all to a tree of files (multiple ones, in many location, and part in some CMS) and then have editors/IDEs integrate? Was easier I believe + inertia, easy != simple though. I completely agree. I was quite surprised when I started to use libclang and the only way to pass options to the library (which are usually command line flags) was to pass it as an array of command line options. This is the C API, the C++ API is more advanced. -- /Jacob Carlborg
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast My only question would be if you think what is currently posted is objective.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Wednesday, 28 March 2018 at 23:25:09 UTC, Walter Bright wrote: On 3/28/2018 1:27 PM, Jacob Carlborg wrote: There's usually nothing that prevents the build tool to write files at build time. Dub can do this. It's expected with a build tool. Not a compiler. With the frame of mind prevalent in our Industry I really want to have compiler includibg codegen as a bunch of library components. Then there is no problem innovating while people argue over things “allowed” for a compiler, or a linker, or a build tool. None of these actually have to be apps talking via files. If I look closely every program I see is a graph database, with nodes sometimes being code, types, sometimes data, other meta-data such as ABI attributes or conditional compilation flags, documentation, external tools, specs and databases are also part of this. Code that produces code is also part of such graph, and CTFE/macroses would just be finer grained approach. Why process graphs piece-wise in a frentic dance of command-line tools that try to fit all to a tree of files (multiple ones, in many location, and part in some CMS) and then have editors/IDEs integrate? Was easier I believe + inertia, easy != simple though.
Re: D vs nim
On Thursday, 29 March 2018 at 03:57:05 UTC, Arun Chandrasekaran wrote: On Tuesday, 27 March 2018 at 23:23:10 UTC, Timothee Cour wrote: This is deterministic destruction and not RAII. Resource is never *acquired* here. Lack of default constructors for struct in D makes it impossible to achieve the RAII as in C++. So what else is missing for D to achieve RAII as in C++ ? And is deterministic destruction only available for structs, what about classes
Re: D vs nim
On 29/03/18 14:03, Maksim Fomin wrote: On Thursday, 29 March 2018 at 09:45:04 UTC, Shachar Shemesh wrote: Not so long as destructors don't reliably run. $ rdmd test.d A(1) constructed A(2) constructed A(1) destructed Caught: Constructor failed https://issues.dlang.org/show_bug.cgi?id=14246 Good catch. This is a variant of bug reported 5 years ago. The funny part of this bug is that the fix was reverted ... because of excessive code breakage. I like D pretty much and wish to use it in serious code, but I cannot tolerate such sort of things. I don't think the fix was reverted because fixing the bug breaks code. I think the fix was reverted because *it* broke code. The fix made way too many assumptions that were simply not universally true. For example, it would not work with structs with @disable init or @disable this(). So, yes, the way D is built it is not easy to properly fix it. That does not mean it shouldn't be fixed. Shachar
Re: D vs nim
On Thursday, 29 March 2018 at 09:45:04 UTC, Shachar Shemesh wrote: Not so long as destructors don't reliably run. $ rdmd test.d A(1) constructed A(2) constructed A(1) destructed Caught: Constructor failed https://issues.dlang.org/show_bug.cgi?id=14246 Good catch. This is a variant of bug reported 5 years ago. The funny part of this bug is that the fix was reverted ... because of excessive code breakage. I like D pretty much and wish to use it in serious code, but I cannot tolerate such sort of things.
Re: D vs nim
On 28/03/18 02:23, Timothee Cour wrote: that comment was regarding -betterC RAII (with structs) has been available in D for a while, eg: ```d struct A{ ~this(){...} } void fun(){ A a; // when a goes out of scope, will call dtor deterministically } ``` Not so long as destructors don't reliably run. $ dmd --version DMD64 D Compiler v2.079.0 Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved written by Walter Bright $ cat test.d import std.stdio; struct A { int a; this(int a) { this.a = a; writefln("A(%s) constructed", a); } ~this() { writefln("A(%s) destructed", a); } } struct B { A a; this(int val) { a = A(val); throw new Exception("Constructor failed"); } } void main() { try { auto a = A(1); auto b = B(2); } catch(Exception ex) { writefln("Caught: %s", ex.msg); } } $ rdmd test.d A(1) constructed A(2) constructed A(1) destructed Caught: Constructor failed https://issues.dlang.org/show_bug.cgi?id=14246
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Wednesday, 28 March 2018 at 23:25:09 UTC, Walter Bright wrote: It's expected with a build tool. Not a compiler. It depends. The compilers are doing more and more work these days. Initially, DMD could not build libraries, now it can. DMD does not output assembly files and runs an assembler to produce object files, some compilers do. Clang can do this but is moving the same direction as DMD: having the complier do it. It think they're looking into having the compiler do the linking as well. So what's expected is subjective. -- /Jacob Carlborg
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Wednesday, 28 March 2018 at 23:29:28 UTC, Walter Bright wrote: On 3/28/2018 1:50 PM, Dmitry Olshansky wrote: Safety - not so much. I remember back in the olden dayz when Microsoft was pushing ActiveX controls hard. ActiveX controls were blobs of code automatically downloaded from the internet that were embedded in your spreadsheet, word document, etc. What could possibly go wrong? :-) I remember it... I even used some :) And it was efficient! But look at it today - many websites are basically a huge program running in a sandbox. And with more APIs they don’t need a particular page open to run in background and many other limitations are lifted. Still don’t understand why code signing became required on desktop, but not in the web.
Re: D vs nim
On Tuesday, 27 March 2018 at 23:23:10 UTC, Timothee Cour wrote: that comment was regarding -betterC RAII (with structs) has been available in D for a while, eg: ```d struct A{ ~this(){...} } void fun(){ A a; // when a goes out of scope, will call dtor deterministically } ``` On Tue, Mar 27, 2018 at 4:15 PM, Ali via Digitalmars-dwrote: On Tuesday, 27 March 2018 at 01:19:44 UTC, timotheecour wrote: [...] How is RAII available in D? I did a quick search on this forum but didnt exactly find what I want I found a comment for Walter (saying it was recently added https://forum.dlang.org/post/p1pa01$kc8$1...@digitalmars.com) What was the added feature that now enables RAII in D This is deterministic destruction and not RAII. Resource is never *acquired* here. Lack of default constructors for struct in D makes it impossible to achieve the RAII as in C++.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Wed, Mar 28, 2018 at 04:29:28PM -0700, Walter Bright via Digitalmars-d-announce wrote: > On 3/28/2018 1:50 PM, Dmitry Olshansky wrote: > > Safety - not so much. > > I remember back in the olden dayz when Microsoft was pushing ActiveX > controls hard. ActiveX controls were blobs of code automatically > downloaded from the internet that were embedded in your spreadsheet, > word document, etc. > > What could possibly go wrong? :-) +1. And today, even after Javascript-delivered Meltdown, people still don't get it. *shrug* T -- MASM = Mana Ada Sistem, Man!
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On 3/28/2018 1:50 PM, Dmitry Olshansky wrote: Safety - not so much. I remember back in the olden dayz when Microsoft was pushing ActiveX controls hard. ActiveX controls were blobs of code automatically downloaded from the internet that were embedded in your spreadsheet, word document, etc. What could possibly go wrong? :-)
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On 3/28/2018 1:27 PM, Jacob Carlborg wrote: There's usually nothing that prevents the build tool to write files at build time. Dub can do this. It's expected with a build tool. Not a compiler.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Wednesday, 28 March 2018 at 20:50:51 UTC, Dmitry Olshansky wrote: On Tuesday, 27 March 2018 at 21:49:16 UTC, Walter Bright wrote: On 3/27/2018 5:11 AM, Guillaume Piolat wrote: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. The act of compiling a buggy program not influence the global state of the computer. It should not be necessary to vet code downloaded from the internet before even compiling it to ensure it doesn't mess up the system. The moment there is make or other build tool this is all futile. CTFE should run in a sandbox. It must be safe to compile code. I agree but mostly on the grounds of purity and reproducibility. It also enables caching and incremental builds. Safety - not so much. Indeed, even without such high level tools using the linker is dangerous due to issues that nobody wants to consider vulnerabilities. For demo: $ mkdir test ; cd test $ echo 'import std.stdio; void main(){ writeln("test"); }' > test.d $ ln -s shouldntexist test $ dmd test.d $ ls -l total 760K -rw-r--r-- 1 cym13 cym13 90 Mar 29 00:28 test.d lrwxrwxrwx 1 cym13 cym13 13 Mar 29 00:33 test -> shouldntexist* -rw-r--r-- 1 cym13 cym13 14K Mar 29 00:33 test.o -rwxr-xr-x 1 cym13 cym13 740K Mar 29 00:33 shouldntexist* This can easily lead to privilege escalation by creating sensitive files in specific locations with arbitrary content (~/.ssh/authorized_keys comes to mind). Ok, this needs a specially crafted symlink, but it's one more thing to check before compiling anything... Compiling just can't reasonably be assumed to be secure (although I'd very much like it to be).
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 21:49:16 UTC, Walter Bright wrote: On 3/27/2018 5:11 AM, Guillaume Piolat wrote: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. The act of compiling a buggy program not influence the global state of the computer. It should not be necessary to vet code downloaded from the internet before even compiling it to ensure it doesn't mess up the system. The moment there is make or other build tool this is all futile. CTFE should run in a sandbox. It must be safe to compile code. I agree but mostly on the grounds of purity and reproducibility. It also enables caching and incremental builds. Safety - not so much.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On 2018-03-27 23:49, Walter Bright wrote: The act of compiling a buggy program not influence the global state of the computer. It should not be necessary to vet code downloaded from the internet before even compiling it to ensure it doesn't mess up the system. There's usually nothing that prevents the build tool to write files at build time. Dub can do this. -- /Jacob Carlborg
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
Did they figure out how to pass data between threads?
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 04:46:21 UTC, meppl wrote: On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: ... Sometimes I want to use a debugger like gdc. If it works, it can be really useful. I skipped trying out Nim, because debugging was not really supported. I wonder, if this is fixed now I wanted to write "gdb" of course. There is an article about debugging nim: https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb
Re: D vs nim
On Tuesday, 27 March 2018 at 12:02:37 UTC, jmh530 wrote: On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: [snip] I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. In the comparison you made https://github.com/timotheecour/D_vs_nim/ you say the CTFE engine for nim is a register VM. Stefan Koch's new CTFE is a bytecode interpreter. Is there an advantage of one over the other? newCTFE can have different backends, tough the current default is a register based vm with a limited number of regs (16384).
Re: D vs nim
that comment was regarding -betterC RAII (with structs) has been available in D for a while, eg: ```d struct A{ ~this(){...} } void fun(){ A a; // when a goes out of scope, will call dtor deterministically } ``` On Tue, Mar 27, 2018 at 4:15 PM, Ali via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Tuesday, 27 March 2018 at 01:19:44 UTC, timotheecour wrote: >> >> On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: >>> >>> On Mon, Apr 13, 2015 at 10:28 AM, Timothee Cour >>> <thelastmamm...@gmail.com> wrote: >>> >>> >>> I would like to refocus this thread on feature set and how it compares to >>> D, not on flame wars about brackets or language marketing issues. >> >> >> >> I've created a git repo https://github.com/timotheecour/D_vs_nim/ with the >> goal: up to date and objective comparison of features between D and nim, and >> 1:1 map of features, tools, idioms and libraries to help D users learn nim >> and vice versa. > > > How is RAII available in D? I did a quick search on this forum but didnt > exactly find what I want > > I found a comment for Walter (saying it was recently added > https://forum.dlang.org/post/p1pa01$kc8$1...@digitalmars.com) > > What was the added feature that now enables RAII in D
Re: D vs nim
On Tuesday, 27 March 2018 at 01:19:44 UTC, timotheecour wrote: On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: On Mon, Apr 13, 2015 at 10:28 AM, Timothee Cour <thelastmamm...@gmail.com> wrote: I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. I've created a git repo https://github.com/timotheecour/D_vs_nim/ with the goal: up to date and objective comparison of features between D and nim, and 1:1 map of features, tools, idioms and libraries to help D users learn nim and vice versa. How is RAII available in D? I did a quick search on this forum but didnt exactly find what I want I found a comment for Walter (saying it was recently added https://forum.dlang.org/post/p1pa01$kc8$1...@digitalmars.com) What was the added feature that now enables RAII in D
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On 3/27/2018 5:11 AM, Guillaume Piolat wrote: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. The act of compiling a buggy program not influence the global state of the computer. It should not be necessary to vet code downloaded from the internet before even compiling it to ensure it doesn't mess up the system. CTFE should run in a sandbox. It must be safe to compile code.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 14:51:30 UTC, bachmeier wrote: On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast Named parameter arguments is an advantage? I would not consider using a language with named parameter arguments. At best, claiming it's an advantage is arbitrary. You might have better luck comparing the languages if you got rid of the +1/-1 thing. I agree with you. A lot of the parameters selected seem arbitrary. A lot of the advantages and disadvantages aren't absolute, but rather things that depend on the exact situation at hand
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast Named parameter arguments is an advantage? I would not consider using a language with named parameter arguments. At best, claiming it's an advantage is arbitrary. You might have better luck comparing the languages if you got rid of the +1/-1 thing.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 12:11:58 UTC, Guillaume Piolat wrote: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. Only thing I can think of is that 3rd party modules can end up writing to your file-system during compilation and could potentially access data etc. they're not allowed to. That is because you may invoke your compiler with the highest permissions possible, but not necessarily the compiled binary file. Which means that the compile-time may not have any restrictions at all and thus potentially security holes are open. Whereas the run-time will be limited and restricted. However by allowing writes etc. at compile-time then the restriction at run-time suddenly doesn't matter, because libraries can just do what they want during compile-time and you don't really want to limit the compiler's permissions etc. because some things may be needed at compile-time that aren't necessarily things you want your run-time to access. I don't know if that makes sense though, but I tried to explain my reasoning as much as I could. In my eyes, it's definitely a no-go to allow writes at compile-time, especially without restrictions. (I don't know if Nim has any restrictions, but doesn't sound like it.) - AST macros are not necessarily easier or more tractable, which have been argued repeatedly by Walter in these forums. The avoidance of AST macros is a plus, not a minus. Sometimes it's much simpler to use mixins, mixin templates etc. than constructing AST nodes. I think this really comes down to taste. However AST nodes seem to be more flexible to manage, but they also open up a lot of complexity. I guess there is no real answer to that, as it'll always be a biased answer.
Re: D vs nim
On 28/03/2018 1:02 AM, jmh530 wrote: On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: [snip] I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. In the comparison you made https://github.com/timotheecour/D_vs_nim/ you say the CTFE engine for nim is a register VM. Stefan Koch's new CTFE is a bytecode interpreter. Is there an advantage of one over the other? All application VM's use bytecode interpreters at some point in its layers. Register versus stack VM's don't make too much of a difference. newCTFE appears to be stack, just like .net CLR, JVM and Lua.
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast It seems you made up your mind, but some of your points are definately up to debate: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. - Nim doesn't lose points for not being able to use heap objects in CTFE. - the ability to generate C breaks type system guarantees like memory safety. It's like how inline assembly breaks optimizers and type system, and is annoying to implement. It makes the language more "powerful" hence less easy to reason about. - Some of use prefer DDoc to Markdown, which is a language where everything always parses. - AST macros are not necessarily easier or more tractable, which have been argued repeatedly by Walter in these forums. The avoidance of AST macros is a plus, not a minus. - Likewise, distinction between traced and untraced pointers is exactly what D designers didn't want. Last time I tried Nim, the Javascript generation didn't preserve semantics. You would write "a.member = 2" and it would generate "a.member = 2", without consideration of memory model. It seems Nim's memory model depend on whatever language it generates.
Re: D vs nim
On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: [snip] I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. In the comparison you made https://github.com/timotheecour/D_vs_nim/ you say the CTFE engine for nim is a register VM. Stefan Koch's new CTFE is a bytecode interpreter. Is there an advantage of one over the other?
Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast Sometimes I want to use a debugger like gdc. If it works, it can be really useful. I skipped trying out Nim, because debugging was not really supported. I wonder, if this is fixed now
D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome
D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use), and 1:1 map of features and libraries to help D users learn nim and vice versa. PRs are welcome and merged fast
Re: D vs nim
On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: On Mon, Apr 13, 2015 at 10:28 AM, Timothee Cour <thelastmamm...@gmail.com> wrote: I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. I've created a git repo https://github.com/timotheecour/D_vs_nim/ with the goal: up to date and objective comparison of features between D and nim, and 1:1 map of features, tools, idioms and libraries to help D users learn nim and vice versa.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Tuesday, 16 June 2015 at 08:54:01 UTC, Chris wrote: So the implication that use of the nonstandard form would lead to confusion is pure pedantry. Yes, indeed. Much of the difficulty with discussions of language in the modern world comes from not making a distinction between its denotative and connotative aspects. The former relates to what is actually being said, and the latter to all the other thoughts and impressions that are evoked by saying it in that way. Modern people emphasize excessively the denotative aspects, whereas connotations do matter since - as the neuroscience tells us - there are subtle priming effects and there are consequences from shifting the brain into different modes. That's perhaps also in part why people do care about syntax in computer languages, even though at one level anything precise might be felt to do the job. Back to your point, many non-Western cultures have different kinds of speech according to the social context. That's because wanting to do so is a human group thing, not a DWEM thing. Of course in the past years there was a relaxation of standards of formality due to concerns over it creating a noxious and unwarranted exclusivity. That may have been a good thing in some ways. But I think every human group will ultimately need to retain distinctions between different registers of speaking and writing...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Tuesday, 16 June 2015 at 16:34:59 UTC, Laeeth Isharc wrote: On Tuesday, 16 June 2015 at 08:54:01 UTC, Chris wrote: So the implication that use of the nonstandard form would lead to confusion is pure pedantry. Yes, indeed. Much of the difficulty with discussions of language in the modern world comes from not making a distinction between its denotative and connotative aspects. The former relates to what is actually being said, and the latter to all the other thoughts and impressions that are evoked by saying it in that way. Modern people emphasize excessively the denotative aspects, whereas connotations do matter since - as the neuroscience tells us - there are subtle priming effects and there are consequences from shifting the brain into different modes. That's perhaps also in part why people do care about syntax in computer languages, even though at one level anything precise might be felt to do the job. Back to your point, many non-Western cultures have different kinds of speech according to the social context. That's because wanting to do so is a human group thing, not a DWEM thing. Of course in the past years there was a relaxation of standards of formality due to concerns over it creating a noxious and unwarranted exclusivity. That may have been a good thing in some ways. But I think every human group will ultimately need to retain distinctions between different registers of speaking and writing... My point was not so much formal vs non-formal speech but the fact that a lot of these decisions are linguistically (not socially) arbitrary, often counter intuitive, and made by people who want to draw a line between their own (privileged) group and others they do not deem worthy of the same privileges. Again in the words of Pinker: Perhaps most importantly, since prepscriptive rules are so psychologically unnatural that only those with access to the right schooling can abide by them, they serve as shibboleths, differentiating the elite from the rabble. I couldn't put it better myself. There's no linguistic reason why double negatives shouldn't be in the standard varieties of English. (Greek logic != linguistic logic)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Sunday, 14 June 2015 at 09:38:02 UTC, Alix Pexton wrote: On 12/06/2015 12:48 PM, Chris wrote: man is still used as a gender neutral pronoun in German, however, for some reason it's frowned upon these days, just like one in English. It's considered arrogant and old fashioned, but it's effin useful and solves a lot of problems. Mind you, decisions made by those who compile dictionaries and standards are not at all based on the reality of a given language. Double negation exists in English (and many other languages), but it's stigmati(s|z)ed as being incorrect. The vote was 5 to 4 when this decision was made in England. The official reasoning behind it was that minus + minus = plus, i.e. I don't have no money would mean I do have money, which is complete horsesh*t. Of course it means I don't have money. The real reason, of course, was class snobbery and elitism: double negation was and still is commonly used in working class English in England (and the US, I think). Ironically enough, double negation is obligatory in standard French, while it is not used in colloquial French. This shows you how arbitrary these standards are. Don't take them too seriously, and don't start religious wars about some eggheads' decisions ;) The same goes for ain't. There's no reason why ain't should be bad English. I ain't got no money is perfectly fine, although it might make the odd Oxbridge fellow cringe and spill his tea. But what the Dickens, old chap! I must be rare, cos I ain't posh n' well educated but I deplore the use of double negatives in English. I might be heard t'say I ain't got n' money (cos it be true) but in that case the n' is the local dialect contraction of any. Other areas of the UK can't use the same excuse, maybe they got it from us but didn't understand what we were say'n, which is very common, but am more inclined to blame ignorance. Don't know anything about double negative usage in French, but I do know that they are a way making super polite requests in Japanese. Lets all not not stop arguing the minutia. A... Then generations of music fans were baffled by lyrics like I ain't got no money to show (Double trouble), I can't get no satisfaction. To use any ain't no better, because it still is a double negative. I'll give you Pinker's explanation: At this point, defenders of the standard are likely to pull out the notorious double negative, as in I can't get no satisfaction. Logically speaking, the two negatives cancel each other out, they teach; Mr. Jagger is actually saying that he is satisfied. The song should be entitled I Can't Get Any Satisfaction. But this reasoning is not satisfactory. Hundreds of languages require their speakers to use a negative element somewhere within the scope, as linguists call it, of a negated verb. The so-called double negative, far from being a corruption, was the norm in Chaucer's Middle English, and negation in standard French—as in Je ne sais pas, where ne and pas are both negative—is a familiar contemporary example. Come to think of it, Standard English is really no different. What do any, even, and at all mean in the following sentences? I didn't buy any lottery tickets. I didn't eat even a single French fry. I didn't eat fried food at all today. Clearly, not much: you can't use them alone, as the following strange sentences show: I bought any lottery tickets. I ate even a single French fry. I ate fried food at all today. What these words are doing is exactly what no is doing in nonstandard American English, such as in the equivalent I didn't buy no lottery tickets—agreeing with the negated verb. The slim difference is that nonstandard English co-opted the word no as the agreement element, whereas Standard English co-opted the word any ; aside from that, they are pretty much translations. And one more point has to be made. In the grammar of standard English, a double negative does not assert the corresponding affirmative. No one would dream of saying I can't get no satisfaction out of the blue to boast that he easily attains contentment. There are circumstances in which one might use the construction to deny a preceding negation in the discourse, but denying a negation is not the same as asserting an affirmative, and even then one could probably only use it by putting heavy stress on the negative element, as in the following contrived example: As hard as I try not to be smug about the misfortunes of my adversaries, I must admit that I can't get no satisfaction out of his tenure denial. So the implication that use of the nonstandard form would lead to confusion is pure pedantry. http://www.sp.uconn.edu/~sih01001/english/fall2007/TheLanguageMavens.pdf
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 12:48 PM, Chris wrote: man is still used as a gender neutral pronoun in German, however, for some reason it's frowned upon these days, just like one in English. It's considered arrogant and old fashioned, but it's effin useful and solves a lot of problems. Mind you, decisions made by those who compile dictionaries and standards are not at all based on the reality of a given language. Double negation exists in English (and many other languages), but it's stigmati(s|z)ed as being incorrect. The vote was 5 to 4 when this decision was made in England. The official reasoning behind it was that minus + minus = plus, i.e. I don't have no money would mean I do have money, which is complete horsesh*t. Of course it means I don't have money. The real reason, of course, was class snobbery and elitism: double negation was and still is commonly used in working class English in England (and the US, I think). Ironically enough, double negation is obligatory in standard French, while it is not used in colloquial French. This shows you how arbitrary these standards are. Don't take them too seriously, and don't start religious wars about some eggheads' decisions ;) The same goes for ain't. There's no reason why ain't should be bad English. I ain't got no money is perfectly fine, although it might make the odd Oxbridge fellow cringe and spill his tea. But what the Dickens, old chap! I must be rare, cos I ain't posh n' well educated but I deplore the use of double negatives in English. I might be heard t'say I ain't got n' money (cos it be true) but in that case the n' is the local dialect contraction of any. Other areas of the UK can't use the same excuse, maybe they got it from us but didn't understand what we were say'n, which is very common, but am more inclined to blame ignorance. Don't know anything about double negative usage in French, but I do know that they are a way making super polite requests in Japanese. Lets all not not stop arguing the minutia. A...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 10:37 PM, Nick Sabalausky wrote: Yea, I'm fine with ain't being considered an actual word. Years ago, I used to hear a lot of 'Ain't' isn't a real word, but meh, it's used as a word, even the people who don't like it still know full-well exactly what it means, so...I ain't got a big problem with it :) But there was one particular argument in favor of ain't that I never liked: It's a contraction for 'are not'. Well, no, it isn't a contraction for are not (maybe it originally was, I dunno). Because I ain't going vs I are not going. So no, it may be a word, but it ain't a contraction for are not. It is a contraction of are not because it originates from a time/dialect where the verb to-be was conjugated differently than today's English. Many of the irregularities of to-be are ignored in international English which gives rise to dialects among ESL speakers that sound wrong but endearing (at least to my ears). A...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 6/13/2015 10:26 AM, Tofu Ninja wrote: Actually I think it matters more if the person you are talking to knows the gender of the person you are talking about, in the shop sentence the gender of the friend is unknown to the person you are talking to so they still works. So then, use the gender-specific pronoun and the listener is no longer in the dark! What the listener knows or doesn't know doesn't play into it in this case. 'My friend' is a specific person, and specific people have a gender. Someone, anyone, a person, a human, etc... are all generic, so the gender is always unknown to the speaker.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 2:53 AM, Walter Bright wrote: On 6/10/2015 12:56 PM, Russel Winder via Digitalmars-d wrote: Please note, OED (which is the definition of the English language whatever any USA upstarts may try to pretend) is gearing up to define they as both singular and plural, thus at a stroke solving all the he/she, she/he, (s)he, it faffing. Hmm, so instead of the documenting the language now the OED is trying to invent it? Such cheek! :-) Nope, singular they has existed since at least the 1600s. It was an act of prejudice in the 1920s[1] that began its decline in usage. The current move by the OED is to reverse that act of invention and document actual use. A... [1] See Modern English Usage (3rd edition or later) [ISBN: 0-19-860263-4]
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 11/06/2015 2:30 AM, weaselcat wrote: On Thursday, 11 June 2015 at 00:57:34 UTC, Tofu Ninja wrote: On Wednesday, 10 June 2015 at 20:14:10 UTC, Nick Sabalausky wrote: Contrary to technical official definition, in REAL WORLD usage, he is BOTH a masuline AND a gender-neutral pronoun. A few occasional nutbags who deliberately ignore the gender-neutral possibility in order to promote their you are all sexists agenda is NO excuse for bowing to thier pressure. Personally I don't perceive he as ever being gender neutral(us native speaker). If I am trying to be gender neutral then I will use they or that person or one. If some one did try to use he in a gender neutral context then I think it would sound weird to me. 'he' has been a gender neutral pronoun for centuries, and as far as I'm aware this has its roots in latin using 'man'(vir?) as a gender neutral pronoun. As far as I know, he was not historically gender neutral, but man used to be. In Old English, man was simply the suffix that meant person (person being a newer loan word), hence words like chairman and foreman are gender neutral (The rise of chairperson is feminism gone mad (or ignorant) -- she said). The Old English word for man was weiman (or werman), literally a male-person and was probably dropped as in some dialects it would likely be pronounced to similarly to woman. A...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 02:12:39 UTC, Brian Rogoff wrote: On Wednesday, 10 June 2015 at 19:57:15 UTC, Russel Winder wrote: Please note, OED (which is the definition of the English language whatever any USA upstarts may try to pretend) Glad to hear it. Please tell your countrymen to prefer the '-ize' suffix, as we colonials do, to the '-ise' one, which is a French affectation. http://en.wikipedia.org/wiki/Oxford_spelling Funny how people argue about English spelling, because English has no spelling at all. It's irrational, inconsistent and part of the English class system. Why is it that English has the highest rate of dyslexics while Spanish has a very low rate of dyslexics? Because Spanish spelling is much more consistent and phonetic than English spelling. Gosh, you dare not say this! Apart from that, spelling is merely a convention you get used to. People oppose to -ize because they were brought up with -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 11:13:08 UTC, Chris wrote: -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this. I have to admit I use -ize over -ise because I think it visually looks cooler. I always felt I did something wrong by mixing colour and -ize, but this thread has finally lifted this guilt off my shoulders! They as singular feels weird tho, but maybe it is related to the archaic thou and thee? We had the same in norwegian ~60 years ago. De (they) was used as singular towards strangers and du (you) was used with people you were familiar with. Then you could claim to be dus (friendly) with people you knew (referring to the fact that you use du when adressing them). Kinda like german Sie.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 2015-06-12 01:52, Walter Bright wrote: I'm in the compiler business: https://www.youtube.com/watch?v=DwIyClDuBgo You're in the Empire business as well ;) Or was. -- /Jacob Carlborg
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 11:35:30 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 11:13:08 UTC, Chris wrote: -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this. I have to admit I use -ize over -ise because I think it visually looks cooler. I always felt I did something wrong by mixing colour and -ize, but this thread has finally lifted this guilt off my shoulders! They as singular feels weird tho, but maybe it is related to the archaic thou and thee? We had the same in norwegian ~60 years ago. De (they) was used as singular towards strangers and du (you) was used with people you were familiar with. Then you could claim to be dus (friendly) with people you knew (referring to the fact that you use du when adressing them). Kinda like german Sie. Do you speak Bokmål or Nynorsk? Here's a nice piece about Language Mavens. They are quite common in every country, and invariably they don't have a clue about how languages and the human mind work: http://www.sp.uconn.edu/~sih01001/english/fall2007/TheLanguageMavens.pdf
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/11/2015 06:35 PM, deadalnix wrote: On Thursday, 11 June 2015 at 20:44:52 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 June 2015 at 20:14:24 UTC, Kagamin wrote: https://youtu.be/VjNVPO8ff84 :3 https://youtu.be/bJDY5zTiWUk maybe this too(?) Never heard those before, those are really good! Some of my favorite 80's-ish sounding Japanese stuff: https://youtu.be/WL2hBFhyo6Q (Anzen Chitai: Jirettai) https://youtu.be/ZY_h_bW8CK0 (Anzen Chitai: Suki Sa) http://www.dailymotion.com/video/x2pz4h_ai-yori-aoshi-enishi-ending-1_news (The Indigo - I Do!) https://youtu.be/p6Q9gtBmZK8 (Yume no Nake e) https://youtu.be/y0N3w90Hmh0#t=3m10s (TM Revolution: Light My Fire) Some other J favorites, but these aren't 80's-ish: https://youtu.be/7E9ycq5ZXD0 (Kotoko: Meconopsis) https://youtu.be/bimJUWROSIk (Kotoko: Uzu-Maki) https://youtu.be/POQVWetuNv8#t=16m35s (TM Revolution: Timeless Mobius Rover) https://youtu.be/0Nd5Ce_RXbI (Namie Amuro: Come My Way) https://youtu.be/xFqhyUHicQU (Yoko Kanno Origa: Inner Universe) https://youtu.be/baUY9LFlYh0 (-- It's like audio/visual crack, can't turn away...) https://youtu.be/OjkvQzWBpsA (Blood+ OP1) https://youtu.be/5hkA2ivm4wU (Madoka Magica ED2) https://vimeo.com/67644299 (Aira Yuhki: Blue sky, True sky) 'Course with this stuff, I could keep listing awesome ones all day, like just about every opening/closing for Noein, Inuyasha, Scientific Railgun, K-On, Nadia, Nana and Shinichirou Watanabe's shows, every opening for Pani Poni Dash, xxxHolic, Luck Star OP, damn near everything in Project Diva (both F and F2 are like digital crack), anything off Kotoko's Glass no Kaze and Epsilon no Fune albums, and a whole ton of others. Nono, the 80's was more like this: https://youtu.be/Az_GCJnXAI0 https://youtu.be/PN7dd2fW3OQ https://youtu.be/Ug8WeZyTxXg https://youtu.be/drGeLouMm6s Banned in the US: Public Image Limited - This Is Not A Love Song and SABRINA - Boys (Video Original) - HD. Those other two are absolutely wild though. Hilarious. :) Here is a nice documentary about the 80s : https://www.youtube.com/watch?v=bS5P_LAqiVg Wow, just watched the first minute, that's freaking sweet! Definitely gonna watch the rest of that later.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 18:32:22 UTC, Tofu Ninja wrote: On Friday, 12 June 2015 at 15:19:40 UTC, Ola Fosheim Grøstad wrote: My friend came in to the shop today and the entire time they just kept asking for corks... For me that sounds 100% fine... Ah, ok. I found this link interesting: http://blog.dictionary.com/oldenglishgender/ Apparently Old English may have lost its gendered nouns when it was melted with Old Norse due to conflicting genders on same noun. And it is rather obvious that english they have common root with norwegian de from Old Norse þeir: https://en.wiktionary.org/wiki/þeir So I'd find it an odd coincidence if norwegian singular De was not related to english singular they… but it could also come from Sie through the trade German influence in Bergen around 1300… Wikipedia has no real answer I think except that the first written occurrence of singular they was early 1300. https://en.wikipedia.org/wiki/Singular_they
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:16:39 UTC, Nick Sabalausky wrote: Banned in the US: Public Image Limited - This Is Not A Love Song and SABRINA - Boys (Video Original) - HD. Banned? Oh well, Lydon of Sex Pistols is an anarchist and Sabrina shows of her tits with a wardrobe malfunction. I guess that explains it well enough.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
Dave whate...@whatever.com wrote: On Thursday, 11 June 2015 at 20:06:45 UTC, Kagamin wrote: On Thursday, 11 June 2015 at 18:17:01 UTC, Dave wrote: Disagree. Traditionally also handled by throwing exceptions. C# throws a Format exception if a parse fails. https://msdn.microsoft.com/en-us/library/f02979c7%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/bb299639%28v=vs.110%29.aspx Forgot the one named Parse... https://msdn.microsoft.com/en-us/library/b3h1hf19(v=vs.110).aspx Microsoft does lets you opt out (as I suggested). The default function, the one actually named Parse (Int32.Parse), throws an exception by default. Originally (.Net 1) there was only 'Parse', 'TryParse' came in .Net 2, I guess they had to admit that exceptions are not always practical.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:52:56 UTC, Ola Fosheim Grøstad wrote: was not related to english singular they… but it could also come from Sie through the trade German influence in Bergen around 1300… Or more likely Danish… I think they have same polite singular form De. It makes sense that one might pick up polite forms through trading. Oh well.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
Originally (.Net 1) there was only 'Parse', 'TryParse' came in .Net 2, I guess they had to admit that exceptions are not always practical. I think TryParse (and anything marked prefixed with Try) is meant for quick stuff. It doesn't return any error. Just a boolean indicating that it failed. The entire function seems to be a wrapper around the actual try mechanism. So Parse will give you an error, TryParse will just tell you it failed.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:16:39 UTC, Nick Sabalausky wrote: Here is a nice documentary about the 80s : https://www.youtube.com/watch?v=bS5P_LAqiVg Wow, just watched the first minute, that's freaking sweet! Definitely gonna watch the rest of that later. The historical accuracy is indeed striking :)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/12/2015 03:58 PM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Friday, 12 June 2015 at 19:16:39 UTC, Nick Sabalausky wrote: Banned in the US: Public Image Limited - This Is Not A Love Song and SABRINA - Boys (Video Original) - HD. Banned? Oh well, Lydon of Sex Pistols is an anarchist and Sabrina shows of her tits with a wardrobe malfunction. I guess that explains it well enough. Well, banned, blocked by youtube for copyright reasons, whatever ;)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/12/2015 07:48 AM, Chris wrote: The same goes for ain't. There's no reason why ain't should be bad English. I ain't got no money is perfectly fine, although it might make the odd Oxbridge fellow cringe and spill his tea. But what the Dickens, old chap! Yea, I'm fine with ain't being considered an actual word. Years ago, I used to hear a lot of 'Ain't' isn't a real word, but meh, it's used as a word, even the people who don't like it still know full-well exactly what it means, so...I ain't got a big problem with it :) But there was one particular argument in favor of ain't that I never liked: It's a contraction for 'are not'. Well, no, it isn't a contraction for are not (maybe it originally was, I dunno). Because I ain't going vs I are not going. So no, it may be a word, but it ain't a contraction for are not.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 6/13/2015 3:32 AM, Tofu Ninja wrote: My friend came in to the shop today and the entire time they just kept asking for corks... For me that sounds 100% fine... Not to me. Gender-neutrality is for the cases when the gender is unknown or the subject is generic, e.g. A person. I would assume that you are likely to know the gender of a friend, in which case 'they' makes no sense here. When I used to play Dark Age of Camelot, there was one line of text that annoyed me to no end. Anytime someone summoned their horse, you would see a message like this: Dougal mounts their horse. Wrong, wrong, wrong!
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Saturday, 13 June 2015 at 01:09:48 UTC, Mike Parker wrote: On 6/13/2015 3:32 AM, Tofu Ninja wrote: Not to me. Gender-neutrality is for the cases when the gender is unknown or the subject is generic, e.g. A person. I would assume that you are likely to know the gender of a friend, in which case 'they' makes no sense here. When I used to play Dark Age of Camelot, there was one line of text that annoyed me to no end. Anytime someone summoned their horse, you would see a message like this: Dougal mounts their horse. Wrong, wrong, wrong! Actually I think it matters more if the person you are talking to knows the gender of the person you are talking about, in the shop sentence the gender of the friend is unknown to the person you are talking to so they still works. I suppose the Dark Age of Camelot line doesn't make sense because you as the listener know the gender of Dougal, though honestly it still sounds fine to me because I am not really sure if Dougal is supposed to be male or female.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 13:05:36 UTC, Chris wrote: Do you speak Bokmål or Nynorsk? Bokmål, but neither Bokmål or Nynorsk are naturally spoken languages, they are written languages. Nobody actually speaks Nynorsk (only in poetry, drama and movies where it is read in a rather literal way), it is a synthetic language, but it is quite close to some dialects (and I sometimes flip over when talking to people who are close to it). Nynorsk came about as part of the national romantic movement, an attempt to find the true norwegian language. Then again Bokmål (which I do speak) is also a synthetic language that came about as mispronounced Danish (which was the formal official language for a long time). Kind of like Danish spoken letter-by-letter thus getting more clear consonants than in a natural language. Some decades ago they decided to create a new united languages that basically was a new synthetic bastardized language that nobody wanted to speak, and they gave up on it. In the districts Bokmål is more natural and rounded than here in Oslo though and some dialects sounds like a natural mix and it wouldn't make much sense to say they speak Bokmål or Nynorsk. I believe pure Bokmål as a spoken language was more of an upper class thing and is called Riksmål (Bokmål that tends towards archaic forms) The funny thing is that Danish and Bokmål almost reads the same, but sounds completely different and some words even have opposite meanings (grine means to laugh in Danish, but to cry in Norwegian). Norwegians sometimes joke that in order to get a Dane to understand what you are saying you have get really drunk and mumble, then they will understand you perfectly! Or maybe it is just factual and based on experience? Alcohol is cheaper in Denmark… Here's a nice piece about Language Mavens. They are quite common in every country, and invariably they don't have a clue about how languages and the human mind work: http://www.sp.uconn.edu/~sih01001/english/fall2007/TheLanguageMavens.pdf Looks very interesting, I have to give that a closer look later.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 13:51:55 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 13:05:36 UTC, Chris wrote: Do you speak Bokmål or Nynorsk? Bokmål, but neither Bokmål or Nynorsk are naturally spoken languages, they are written languages. Nobody actually speaks Nynorsk (only in poetry, drama and movies where it is read in a rather literal way), it is a synthetic language, but it is quite close to some dialects (and I sometimes flip over when talking to people who are close to it). Nynorsk came about as part of the national romantic movement, an attempt to find the true norwegian language. Then again Bokmål (which I do speak) is also a synthetic language that came about as mispronounced Danish (which was the formal official language for a long time). Kind of like Danish spoken letter-by-letter thus getting more clear consonants than in a natural language. Some decades ago they decided to create a new united languages that basically was a new synthetic bastardized language that nobody wanted to speak, and they gave up on it. In the districts Bokmål is more natural and rounded than here in Oslo though and some dialects sounds like a natural mix and it wouldn't make much sense to say they speak Bokmål or Nynorsk. I believe pure Bokmål as a spoken language was more of an upper class thing and is called Riksmål (Bokmål that tends towards archaic forms) The funny thing is that Danish and Bokmål almost reads the same, but sounds completely different and some words even have opposite meanings (grine means to laugh in Danish, but to cry in Norwegian). Norwegians sometimes joke that in order to get a Dane to understand what you are saying you have get really drunk and mumble, then they will understand you perfectly! Or maybe it is just factual and based on experience? Alcohol is cheaper in Denmark… Very interesting. I wish I could speak all languages on the planet! Here's a nice piece about Language Mavens. They are quite common in every country, and invariably they don't have a clue about how languages and the human mind work: http://www.sp.uconn.edu/~sih01001/english/fall2007/TheLanguageMavens.pdf Looks very interesting, I have to give that a closer look later. Yes, it's a nice read. I've had my fair share of language mavens, they really don't know nothing, oops, anything about natural languages. They're just opinionated pricks that are full of themselves.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 09:26:29 UTC, Alix Pexton wrote: On 11/06/2015 2:30 AM, weaselcat wrote: On Thursday, 11 June 2015 at 00:57:34 UTC, Tofu Ninja wrote: On Wednesday, 10 June 2015 at 20:14:10 UTC, Nick Sabalausky wrote: Contrary to technical official definition, in REAL WORLD usage, he is BOTH a masuline AND a gender-neutral pronoun. A few occasional nutbags who deliberately ignore the gender-neutral possibility in order to promote their you are all sexists agenda is NO excuse for bowing to thier pressure. Personally I don't perceive he as ever being gender neutral(us native speaker). If I am trying to be gender neutral then I will use they or that person or one. If some one did try to use he in a gender neutral context then I think it would sound weird to me. 'he' has been a gender neutral pronoun for centuries, and as far as I'm aware this has its roots in latin using 'man'(vir?) as a gender neutral pronoun. As far as I know, he was not historically gender neutral, but man used to be. In Old English, man was simply the suffix that meant person (person being a newer loan word), hence words like chairman and foreman are gender neutral (The rise of chairperson is feminism gone mad (or ignorant) -- she said). The Old English word for man was weiman (or werman), literally a male-person and was probably dropped as in some dialects it would likely be pronounced to similarly to woman. A... man is still used as a gender neutral pronoun in German, however, for some reason it's frowned upon these days, just like one in English. It's considered arrogant and old fashioned, but it's effin useful and solves a lot of problems. Mind you, decisions made by those who compile dictionaries and standards are not at all based on the reality of a given language. Double negation exists in English (and many other languages), but it's stigmati(s|z)ed as being incorrect. The vote was 5 to 4 when this decision was made in England. The official reasoning behind it was that minus + minus = plus, i.e. I don't have no money would mean I do have money, which is complete horsesh*t. Of course it means I don't have money. The real reason, of course, was class snobbery and elitism: double negation was and still is commonly used in working class English in England (and the US, I think). Ironically enough, double negation is obligatory in standard French, while it is not used in colloquial French. This shows you how arbitrary these standards are. Don't take them too seriously, and don't start religious wars about some eggheads' decisions ;) The same goes for ain't. There's no reason why ain't should be bad English. I ain't got no money is perfectly fine, although it might make the odd Oxbridge fellow cringe and spill his tea. But what the Dickens, old chap!
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 15:02:35 UTC, Tofu Ninja wrote: Hey, you see that person over there? What are they doing? Is that their big red stuffed dinosaur? A person came in to the shop today and the entire time they just keept asking for corks, we sell paint... I am going to wear this big pink sombrero and if anyone has a problem with it, well they can just suckit Just as a few examples of gender neutral singular they/their. But I am thinking more of the origin, that plural form perhaps signifies distance? Is the following wrong? (I wouldn't know, but it looks wrong to me.) My friend came in to the shop today and the entire time they just kept asking for corks...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 11:35:30 UTC, Ola Fosheim Grøstad wrote: They as singular feels weird tho, but maybe it is related to the archaic thou and thee? We had the same in norwegian ~60 years ago. De (they) was used as singular towards strangers and du (you) was used with people you were familiar with. Then you could claim to be dus (friendly) with people you knew (referring to the fact that you use du when adressing them). Kinda like german Sie. Hey, you see that person over there? What are they doing? Is that their big red stuffed dinosaur? A person came in to the shop today and the entire time they just keept asking for corks, we sell paint... I am going to wear this big pink sombrero and if anyone has a problem with it, well they can just suckit Just as a few examples of gender neutral singular they/their.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 15:19:40 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 15:02:35 UTC, Tofu Ninja wrote: Hey, you see that person over there? What are they doing? Is that their big red stuffed dinosaur? A person came in to the shop today and the entire time they just keept asking for corks, we sell paint... I am going to wear this big pink sombrero and if anyone has a problem with it, well they can just suckit Just as a few examples of gender neutral singular they/their. But I am thinking more of the origin, that plural form perhaps signifies distance? Is the following wrong? (I wouldn't know, but it looks wrong to me.) My friend came in to the shop today and the entire time they just kept asking for corks... For me that sounds 100% fine...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 10:17:26 UTC, Ola Fosheim Grøstad wrote: People here often request features you can only ask for after years of programming experience. This shows that there is a lot of experience in the D community. Without experience D wouldn't be where it is, having only limited resources. Language designers that design more than one language tend to make smaller and tighter languages as they gain design experience and get better at delegating nice-to-have-but-not-essential-features to libraries. Then brainfuck wins.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 07:08:02 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 June 2015 at 03:04:50 UTC, Rikki Cattermole wrote: The biggest difference between the D community in general and other communities is actually quite simple. Experience. Indeed! The world has never seen a more experienced collection of freshmen language designers. Theory does not apply. Rust and Go are doomed. Now, now. It is true that bad and frustrating experience with other languages drove me (and probably others) to D. D is open to suggestions, while other languages still live by the one size fits all mentality. std.allocator is a good example of trying to offer a variety of different memory models. What's wrong with that? People here often request features you can only ask for after years of programming experience. This shows that there is a lot of experience in the D community. Without experience D wouldn't be where it is, having only limited resources. That's right. As mentioned we accept bugs, we accept issues. Submit and accept, no regrets. Discuss them at length and fix them when a good solution is found. A ground breaking GC will emerge from the synthesis of the unsurpassable number of endless GC debates. That is the sanctimony of meritocracy. A non-breaking solution will eventually be found. Time is no issue in such an important matter. We just wait and a solution will emerge, through discussions based on pure experience. Not only that but we look for problems to fix. This is the mentality of a good software engineer. One who doesn't care about their own pride or ego but genuinely wants to make good code. This community is the UNICEF of programming. We are all meek and humble individuals, divine servants of humanity. Just trying to create the best tool possible for our own daily tasks. People in these forums all express gratitude when they are on the loosing end of a technical debate. Nobody go silent or resort to rhetorical excesses. Ever. We are all grateful for being proven wrong, because that is how we become better programmers. But we keep coming back. So it cannot be that bad ;) In a lot of ways this makes us the best developers on the planet. It would explain a lot, including how other language communities snob us yet we look at them for ideas. Indeed, we never snob anyone, and they all snob us. Especially the ignorant C++ community that never mentions us. Because this hurts some people. The D crowd doesn't snob other languages, in fact, people here often point at features of other languages saying Da', can I have this, pleze?. All most of us do is to point out the strengths of D when ever the occasion arises, trying to convince people to at least give it a try. Of course it can be annoying when D is snobbed at while its features are being ripped. Talking about UNICEF, feel free to be a humble servant of humani-D. The more the merrier!
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 09:14:00 UTC, Chris wrote: Now, now. It is true that bad and frustrating experience with other languages drove me (and probably others) to D. Suggesting that a language like D is based on experience in comparison to Go is... not right... given the experienced language designers behind Go. If experience is key, then Go wins. People here often request features you can only ask for after years of programming experience. This shows that there is a lot of experience in the D community. Without experience D wouldn't be where it is, having only limited resources. Language designers that design more than one language tend to make smaller and tighter languages as they gain design experience and get better at delegating nice-to-have-but-not-essential-features to libraries. Features have a higher cost than initial implementation. Walter has been more open to feature suggestions than many other designers, and implemented them in a timely fashion, that is true. And that can be both a good thing and a bad thing, but obviously engaging and fun from a community point of view. The process around Go is very closed. So not fun. Rust is inbetween. Just trying to create the best tool possible for our own daily tasks. Just like everybody else? But we keep coming back. So it cannot be that bad ;) ;o) Indeed, we never snob anyone, and they all snob us. Especially the ignorant C++ community that never mentions us. Because this hurts some people. The D crowd doesn't snob other languages, in fact, people here often point at features of I see jabs at other languages, especially the ones that is stealing attention from D: Rust, Go, C++… I guess it is all natural, but it can be perceived as envy by outsiders, and there is no advantage to it. I really wish people would stop complaining about other languages having the same features as D without giving credit. It is impossible to figure out exactly where ideas from features come from, but most features predate even C++ if being first is the main point. The hard part about designing an imperative language is not the individual features, the palette is given. The hard part is turning it into beautiful whole that is greater than the sum of the parts. And that is important, but difficult (or impossible) to achieve. It is kinda like music, I sometimes create a melody that I feel I have heard something similar to, but I cannot pin it down to anything specific. So phrases of the melody might be things I have picked up. However, if we go for novelty the roots for musical elements might go 300 years back or more. Far beyond my knowledge horizon. A month ago I made a poptune-sketch I kinda find catchy, but familiar. But which tune is it familiar to? Who should I credit? Maybe you can help me out? https://soundcloud.com/bambinella/anad-dreamer-sketch
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 07:11:33 UTC, rsw0x wrote: actually making a good GC for D is difficult because the only type of barrier you can use it hardware protection faults. The performance dropoff isn't _that_ bad from what I've read in various papers. I should have an article up in a few weeks detailing my summer research project on this. That sounds like an interesting project! I think it is possible to modify the language slightly and make (to me) acceptable restrictions on where GC is allowed to get better performance. Still, I am sure you will be able to find some new opportunities in your research project. I am looking forward to see what you come up with.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 10:52:08 UTC, weaselcat wrote: heavily disagree honestly. Ken Thompson - B? Rob Pike - Limbo? Joking? Not your kind of experience? But still experience... So there is a limit to how far experience can take you. Anyway, language designers that do multiple languages on their own accord appears to stay within the same paradigm. Kind of like an artist trying to perfect the aesthetics of their original piece. So if you don't like the original, you'll probably not like the sequel either...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 10:17:26 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 June 2015 at 09:14:00 UTC, Chris wrote: Now, now. It is true that bad and frustrating experience with other languages drove me (and probably others) to D. Suggesting that a language like D is based on experience in comparison to Go is... not right... given the experienced language designers behind Go. If experience is key, then Go wins. People here often request features you can only ask for after years of programming experience. This shows that there is a lot of experience in the D community. Without experience D wouldn't be where it is, having only limited resources. Language designers that design more than one language tend to make smaller and tighter languages as they gain design experience and get better at delegating nice-to-have-but-not-essential-features to libraries. Features have a higher cost than initial implementation. Walter has been more open to feature suggestions than many other designers, and implemented them in a timely fashion, that is true. And that can be both a good thing and a bad thing, but obviously engaging and fun from a community point of view. The process around Go is very closed. So not fun. Rust is inbetween. Just trying to create the best tool possible for our own daily tasks. Just like everybody else? But we keep coming back. So it cannot be that bad ;) ;o) Indeed, we never snob anyone, and they all snob us. Especially the ignorant C++ community that never mentions us. Because this hurts some people. The D crowd doesn't snob other languages, in fact, people here often point at features of I see jabs at other languages, especially the ones that is stealing attention from D: Rust, Go, C++… I guess it is all natural, but it can be perceived as envy by outsiders, and there is no advantage to it. I really wish people would stop complaining about other languages having the same features as D without giving credit. It is impossible to figure out exactly where ideas from features come from, but most features predate even C++ if being first is the main point. The hard part about designing an imperative language is not the individual features, the palette is given. The hard part is turning it into beautiful whole that is greater than the sum of the parts. And that is important, but difficult (or impossible) to achieve. It is kinda like music, I sometimes create a melody that I feel I have heard something similar to, but I cannot pin it down to anything specific. So phrases of the melody might be things I have picked up. However, if we go for novelty the roots for musical elements might go 300 years back or more. Far beyond my knowledge horizon. A month ago I made a poptune-sketch I kinda find catchy, but familiar. But which tune is it familiar to? Who should I credit? Maybe you can help me out? https://soundcloud.com/bambinella/anad-dreamer-sketch I have the same problem when composing. Some things sound vaguely familiar but I cannot put my finger on it. Usually I don't follow an idea that somehow sounds familiar. In your case, the song reminds me of: Wouldn't It Be Good - Nik Kershaw https://www.youtube.com/watch?v=AYMAtbq0bjY (God, I'm so old!) :-)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 10:52:06 UTC, Chris wrote: vaguely familiar but I cannot put my finger on it. Usually I don't follow an idea that somehow sounds familiar. Well, in this case it might sound familiar to me because it is based manipulated sample of another tune I made... But I cannot know for sure ;) In your case, the song reminds me of: Wouldn't It Be Good - Nik Kershaw https://www.youtube.com/watch?v=AYMAtbq0bjY (God, I'm so old!) :-) That's not all that old... (hrmph!) But I don't see the resemblance so it's not from there, if it is from anywhere outside my own head.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
I really wish people would stop complaining about other languages having the same features as D without giving credit. It is impossible to figure out exactly where ideas from features come from, but most features predate even C++ if being first is the main point. Hear, hear, is it so unlikely that one footstep should fall in the footprint of another? The hard part about designing an imperative language is not the individual features, the palette is given. The hard part is turning it into beautiful whole that is greater than the sum of the parts. And that is important, but difficult (or impossible) to achieve. This is it. Great languages (IMO) have condensed their features down to the smallest set of orthogonal features that they could manage. This makes the language easier to reason about, to share code, to maintain code, to learn, to read code, even writing it is often easier! Right now I feel that D is growing in 'features' and corner cases beyond the point where I want to explore it's depths. It's gone from a swim in the bay into crossing the Channel. I always think about Herb Sutters Guru of the Week column and how it made me think ugh - too many oddities to learn. I could be wrong and I hope I am. It's quite a nice twist that the thread discussing which language is better branched into what version of English is the right one - as if such a thing is meaningful. Arguing about definitions and terminology is surely such a useless diversion.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Wednesday, 10 June 2015 at 19:57:15 UTC, Russel Winder wrote: Please note, OED (which is the definition of the English language As Tofu Ninja said, a dictionary only (partly) reflects the current usage of a language. Look up the word sophisticated and you'll find out that it had a different meaning in the 1920s. In fact, dictionaries invariably lag behind and as soon as a new version is published it's already out of date. Also, do not forget that those who create and revise dictionaries are not representative of all speakers. They will typically be part of an elite that defines the language in terms of their own belief system. Most certainly so in Great Britain. whatever any USA upstarts may try to pretend) I shouldn't really comment on this cultural snobbery. However, different linguistic communities have different linguistic realities. The English spoken in the US, Ireland or Scotland is not the same as in England. The linguistic reality for a speaker in Liverpool is not the same as for a speaker in London. But who cares, English is beyond the grasp of Oxford now. You only have yourselves to blame, nobody asked you to go and spread the language all over the globe. is gearing up to define they as both singular and plural, thus at a stroke solving all the he/she, she/he, (s)he, it faffing. On Wed, 2015-06-10 at 19:05 +, via Digitalmars-d wrote: On Wednesday, 10 June 2015 at 18:41:56 UTC, Adam D. Ruppe wrote: That's actually a good idea, you might not have noticed it, but I rarely use he alone as a general term and I notice it when other people do. Little things like this in language can make a difference in people's feelings and cause discomfort in the environment. Sure, follow your own ethics, but that won't work in an international environment as a rule without coming off as censorship. You cannot force people globally to follow a local culture. I also try to cut down on the term you as a general term since people might think I mean them personally. At some point you just have question intent if there is a misunderstanding, rather than control every expression or else everything becomes it: A bad programmer create bugs when it edits its files And if people force you to write it, it is quite reasonable to wonder what else they strongly object to so you better just stay silent. I really do try to cut down on the term you?
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 10:17:26 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 June 2015 at 09:14:00 UTC, Chris wrote: Now, now. It is true that bad and frustrating experience with other languages drove me (and probably others) to D. Suggesting that a language like D is based on experience in comparison to Go is... not right... given the experienced language designers behind Go. If experience is key, then Go wins. heavily disagree honestly. Ken Thompson - B? Rob Pike - Limbo? Joking?
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 11:20:12 UTC, Kagamin wrote: Then brainfuck wins. Always.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Wednesday, 10 June 2015 at 18:13:53 UTC, Dave wrote: Another backwards annotation is nothrow. I don't really care if something doesn't throw, I care when it throws, because then I have to do something (or my program may crash unexpectedly). I recently debugged such no crash bug: the code decided that the program shouldn't crash and caught exception and silenced it, the program indeed didn't crash, but misbehaved. It was a critical bug, which blew into the face of the customer, there was nothing in the log, we had to connect to the customer's database and debugged with catching first chance exceptions. What we should do if we had no access to the customer's database? If the code wouldn't catch the exception, the application would crash and we would have an entry in the log and debugged it quickly. That's how nothrow works in practice.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 10/06/2015 12:38, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: I think Rust has an advantage over Go in the name Mozilla alone, they are more idealistic than Google. Agreed. In concrete terms, Mozilla is a non-profit, whereas Google is not. Google can easily drop (or reduce) support for Go if it doesn't serve whatever business goal they want. Or alternatively they might not be interested in evolving Go (or Go's toolchain) in directions that are useful for other people, but have little value for their business or technical goals. Mozilla may see in their heart the will to develop a language such as Rust in part for the benefit of the programming community in general. Even if they don't, and they remain mainly concerned with Servo/browser development, if Rust's core goals are of developing large-scale programs, with strong static checking / verification (safeness), and being able to write highly optimized/fast programs - then that is already a project vision that can make the language highly successful. -- Bruno Medeiros https://twitter.com/brunodomedeiros
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 09:14:00 UTC, Chris wrote: Because this hurts some people. The D crowd doesn't snob other languages, in fact, people here often point at features of other languages saying Da', can I have this, pleze?. http://forum.dlang.org/thread/mki78k$6k5$1...@digitalmars.com?page=8#post-cnprllcbxwinzclvwtib:40forum.dlang.org
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 6/10/15 6:43 PM, Tofu Ninja wrote: On Thursday, 11 June 2015 at 01:30:08 UTC, weaselcat wrote: 'he' has been a gender neutral pronoun for centuries, and as far as I'm aware this has its roots in latin using 'man'(vir?) as a gender neutral pronoun. I am just saying that personally it sounds odd to me to use it that way and I don't hear people use it that way either. In gender neutral contexts where you don't know the gender I almost always say/hear they/their. Maybe he losing its gender neutrality is a recent thing, I don't know. Maybe its just a thing with mid-westerners? It does appear to be a recent thing, if you trust Wikipedia: http://en.wikipedia.org/wiki/Gender-specific_and_gender-neutral_pronouns#Generic_he Also the earlier section on Historical and dialectal gender-neutral pronouns is interesting: maybe we can start using a or yo as pronouns.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/11/2015 06:52 AM, Chris wrote: In your case, the song reminds me of: Wouldn't It Be Good - Nik Kershaw https://www.youtube.com/watch?v=AYMAtbq0bjY (God, I'm so old!) :-) Oh man, that takes me back. 80's had the best pop music, IMHO. Miss that stuff. Although, I still have trouble accepting anything from that decade as old, but maybe that just dates me too ;)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/11/2015 07:31 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Thursday, 11 June 2015 at 11:20:12 UTC, Kagamin wrote: Then brainfuck wins. Always. It *is* very fun to implement. I'm more partial to this one though: https://esolangs.org/wiki/Fuckfuck And then there's http://compsoc.dur.ac.uk/whitespace/
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/11/2015 07:37 AM, Bruno Medeiros wrote: On 10/06/2015 12:38, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: I think Rust has an advantage over Go in the name Mozilla alone, they are more idealistic than Google. Agreed. In concrete terms, Mozilla is a non-profit, whereas Google is not. Google can easily drop (or reduce) support for Go if it doesn't serve whatever business goal they want. Or alternatively they might not be interested in evolving Go (or Go's toolchain) in directions that are useful for other people, but have little value for their business or technical goals. Well, Mozilla's really a for-profit owned by a non-profit, which is a little weird. In any case, Mozilla's demonstrated enough times in their history that they're not particularly worried about alienating and ignoring big groups of users. (Heck, they don't even try to promote their products as customizable anymore.) Of course, whether this will actually translate into similar issues with Rust remains to be seen. Hopefully they'll be more reasonable with Rust.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 13:21:27 UTC, Dave wrote: Exceptions are not meant to force handling errors at he source. This attitude is why so many exceptions go unhandled at the upper layers. When you have a top level that calls a function that calls 50 other functions, each that throw a handful or more different exceptions, it's unreasonable to expect the upper layer coder to account for all of them. In fact, in practice they usually don't until bugs arise. This is provably bad practice. I'd rather have an exception unhandled at the top level than discarded at a middle level. Much easier to debug when you get a proper stack trace. Also, the top level handling can be very generic if it's purpose is not to solve the problem but to log it and to allow to use to continue using the other parts of the program as much as possible. If you want to force handling errors at the source they should be part of the return type. Again what errors are worth throwing as exceptions in your paradigm? Which ones are worth returning? This separation is very arbitrary for my taste. Exceptions are for when something went wrong. Returned errors are for when the function can't do what you asked it to do, but that doesn't mean that something went wrong. For example, if you try to write to a file and fail that's an exception, because something went wrong(e.g. - not enough disk space, or a permissions problem). But if you have a function that parses a string to a number and you call it with a non-numeric string - that doesn't necessarily mean that something went wrong. Maybe I don't expect all strings to be convertible to numbers, and instead of parsing each string twice(once for validation and once for the actual conversion) I prefer to just convert and rely on the conversion function to tell me if it's not a number? Note that doesn't mean that every time a function returns an error it's not a problem - they can indicate problems, the point is that it's not up to the callee to decide, it's up to the caller. The conversion function doesn't know if I'm parsing a YAML file and if field value is not a number that just means it's a string, or if I'm parsing my own custom file format and if something specific is not a number that means the file is corrupted. In the latter case, I can convert the returned error to exception(the returned error's type should have a method that returns the underlying result if it's OK and if there was an error raises an exception), but it's the caller's decision, not the callee. Exceptions are not hard fails. They can be if they go unaccounted for (depending on the language/environment). Java has the infamous, NullPointerException that plagues Java applications. C# has the NullReferenceException. Even if they go unaccounted for, you still get a nice stack trace that helps you debug them. Maybe we have different definitions for hard fail... It doesn't really guarantee the functions not annotated as throwing won't crash Combined with other guarantees (such as immutability, thread local storage, safe memory management, side-effect free code, no recursion, etc), you can make a reasonable guarantee about the safety of your code. And a superhero cape, combined with an airplane, airplane fuel and flight school, allow you to fly in the air. Not really sure how to parse this...Doesn't seem like you have any good argument against what I said. Again I said you can make a *reasonable* guarantee. And I am not alone here. If you look at Rust, it really does illustrate a trend that functional programming has been pushing for a long time. Provable guarantees. Problems are very rarely unique. There are a core set of things that happen frequently that cause problems. And these things are easily recognizable by compilers. You can't prevent everything, but you can prevent a good deal of the obvious stuff. This is just an extension of that mindset. So it is not really that outlandish. It is the other restrictions(without getting into a discussion about each and every restriction in the list) that make the code safer - nothrow doesn't really contribute IMO. Without the nothrow, you cannot guarantee it won't cause problems with unhandled errors ;) Seems like a nice guarantee to me. I would at least like this option, because library writers often try to write in an idiomatic way (and I tend to use the most reputable libraries I can find), which gives you some guarantees. The guarantee would be better served by default IMHO though. Even with no throw you can't guarantee a function won't cause problems with unhandled errors - unless you use a very strict definition of handling errors, that include discarding them or crashing the program. nothrow can only guarantee the function won't expose any problems you can use the exceptions mechanism to debug or deal with - not very useful, considering how easy it is to convert an error
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Thursday, 11 June 2015 at 16:49:15 UTC, Nick Sabalausky wrote: On 06/11/2015 07:31 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Thursday, 11 June 2015 at 11:20:12 UTC, Kagamin wrote: Then brainfuck wins. Always. It *is* very fun to implement. I'm more partial to this one though: https://esolangs.org/wiki/Fuckfuck And then there's http://compsoc.dur.ac.uk/whitespace/ https://esolangs.org/wiki/Emoticon I think it would be nice to have a language that used smileys for exceptions. if error then :-D