archived stringclasses 2 values | author stringlengths 3 20 | author_fullname stringlengths 4 12 ⌀ | body stringlengths 0 22.5k | comment_type stringclasses 1 value | controversiality stringclasses 2 values | created_utc stringlengths 10 10 | edited stringlengths 4 12 | gilded stringclasses 7 values | id stringlengths 1 7 | link_id stringlengths 7 10 | locked stringclasses 2 values | name stringlengths 4 10 ⌀ | parent_id stringlengths 5 10 | permalink stringlengths 41 91 ⌀ | retrieved_on stringlengths 10 10 ⌀ | score stringlengths 1 4 | subreddit_id stringclasses 1 value | subreddit_name_prefixed stringclasses 1 value | subreddit_type stringclasses 1 value | total_awards_received stringclasses 19 values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
null | blackenswans | null | Same here. I actually came here to say, " you made your nephew to program in (S)ML? You monster!" | null | 0 | 1491170408 | False | 0 | dfqsc1s | t3_62zx67 | null | null | t1_dfqd91l | null | 1493737799 | 19 | t5_2fwo | null | null | null |
null | gingerbill | null | The current metaprogramming feature is introspection. Compile time execution (CTE) (the ability to run any code at compile time) is in the works right now. I am working on the new backend for the compiler (that may be release as a separate project too, not yet decided) which the CTE will use.
The plans for the metaprogramming have changed since the original
| null | 0 | 1491170461 | False | 0 | dfqsdm2 | t3_631p99 | null | null | t1_dfqs1kg | null | 1493737820 | 1 | t5_2fwo | null | null | null |
null | WellAdjustedOutlaw | null | I have inside information about the components they use, as well as their platform. My opinion comes from the perspective of a principal systems engineer/ Sr network architect/ Sr. Developer. Not that titles should really mean too much, but I've certainly seen these issues from all sides.
My judgement of this architecture comes from reading the whole post, knowing what they were attempting to solve, and knowing the DNS and it's quirks. | null | 0 | 1491170522 | False | 0 | dfqsf9u | t3_62vx64 | null | null | t1_dfqd9e6 | null | 1493737843 | 1 | t5_2fwo | null | null | null |
null | LtAramaki | null | > Okay. So... what about the program
> int main(void) {
> int i;
> i;
> i;
> i;
> i;
> i;
> }
> I don't see any state being changed here, so I guess this isn't imperative?
Suddenly talking to you feels like arguing with a 4 year old, who believes they're much smarter than me.
Yeah, you've shown me up there. My argument is totally ruined. Good job. | null | 0 | 1491170548 | False | 0 | dfqsg0t | t3_62yl50 | null | null | t1_dfqs9d9 | null | 1493737852 | -5 | t5_2fwo | null | null | null |
null | bzbzzz | null | At first I've stopped reading the article after "I'm not an expert". And as not being an expert is not a problem, but if someone thinks, that his dilettantism is an advantage, then it's just a stupidity or inferiority complex (or both).
But then I decided to read it again and even take a look inside source code. So I went straight to tutorials/1_basic_concepts.md
A Bool can only be tru or fls. If you think it should be true and false instead, you can email your complaints to williamwold@idontgiveafuck.com.
Ok. | null | 0 | 1491170601 | False | 0 | dfqshjz | t3_62ixbc | null | null | t3_62ixbc | null | 1493737874 | 2 | t5_2fwo | null | null | null |
null | das7002 | null | Luckily IPv6 makes all of those technologies obsolete.
STUN, TURN, ICE, etc are not needed as ipv6 let's you address individual devices end to end. | null | 0 | 1491170699 | False | 0 | dfqskg2 | t3_62yl50 | null | null | t1_dfqet9r | null | 1493737913 | 5 | t5_2fwo | null | null | null |
null | LtAramaki | null | Considering I was never making a point about how code "looks", because that's irrelevant, you're suggesting the other side is arguing with a straw man. | null | 0 | 1491170852 | False | 0 | dfqsoxp | t3_62yl50 | null | null | t1_dfqoaap | null | 1493737972 | -3 | t5_2fwo | null | null | null |
null | combinatorylogic | null | Yes, regarding your concerns about pointer validity after a compile time execution - ideally you're only interested in an AST (or IR) produced by this code, and it's not going to survive further compilation anyway. Since you're doing a separate compilation, not an image-based, you cannot leave any precompiled data anyway - you have to produce array/structure/whatever initialiser code anyway, and it's an AST. | null | 0 | 1491170854 | False | 0 | dfqsozl | t3_631p99 | null | null | t1_dfqsdm2 | null | 1493737973 | 2 | t5_2fwo | null | null | null |
null | das7002 | null | And that's necessary due to it being one server no matter where you are on the planet. Everyone is all together, and a higher tick rate would unfairly favor people closer. The difference between a 15ms ping and a 500ms ping on a 1Hz tick rate is practically indistinguishable. | null | 0 | 1491170900 | False | 0 | dfqsqcf | t3_62yl50 | null | null | t1_dfq6j34 | null | 1493737991 | 2 | t5_2fwo | null | null | null |
null | OneWingedShark | null | > It isn't even that much of an issue, just turn it off and on again every now and then.
This attitude is *why* the industry is in the state it is in with respect to software quality: instead of rightly correcting the problem, your/their solution is to manually force a stateful change, hoping that the problem will be abated whilst the program is being used. | null | 1 | 1491170902 | False | 0 | dfqsqe9 | t3_62wye0 | null | null | t1_dfq3ruz | null | 1493737992 | -1 | t5_2fwo | null | null | null |
null | gingerbill | null | I started it about a week or two before that but didn't actually use any version control as it was my "drunk project". It's evolved a lot by then and it's already very usable.
I cannot believe it's been 9 months since I started this project. | null | 0 | 1491170925 | False | 0 | dfqsr1z | t3_631p99 | null | null | t1_dfqmxdz | null | 1493738000 | 1 | t5_2fwo | null | null | null |
null | ryandiy | null | I'm referring to the lyrics of "Thou shalt not kill" | null | 0 | 1491170980 | False | 0 | dfqsskj | t3_62n15u | null | null | t1_dfqks5k | null | 1493738021 | 2 | t5_2fwo | null | null | null |
null | fly-hard | null | I didn't see any crazy in that thread. What I saw was someone getting sick of having to defend himself from coders who seem to think how code is written is more important than whether the code does the job.
There seems to be this pervasive attitude among some programmers where, if something isn't written how they would write it, it must be inferior and the author must be corrected.
| null | 0 | 1491171030 | False | 0 | dfqstxj | t3_62z7p7 | null | null | t1_dfqaa69 | null | 1493738040 | 7 | t5_2fwo | null | null | null |
null | flukus | null | You think async is unique to node? | null | 0 | 1491171069 | False | 0 | dfqsv2s | t3_612n3s | null | null | t1_dfpln0l | null | 1493738055 | 1 | t5_2fwo | null | null | null |
null | OneWingedShark | null | > Well, to be fair, if all the energy that went to rust went to ada instead, it would have been wonderful.
Heck, if even *half* of it went into creating a new open-source implementation we'd have another freely available compiler and be well on our way to a portable distribution/package utility. (Ada is *really* good at dependency management because it's required for any compiler; therefore it'd be reasonable to think that a non- AdaCore/FSF compiler/toolchain would get a package-manager "in short order" after completion.) | null | 0 | 1491171147 | False | 0 | dfqsxey | t3_62wye0 | null | null | t1_dfq4q7n | null | 1493738088 | 3 | t5_2fwo | null | null | null |
null | combinatorylogic | null | > I have been heavily researching the available languages that could replace my need for C and C++.
Did you try looking at mbeddr? http://mbeddr.com/ | null | 0 | 1491171151 | False | 0 | dfqsxir | t3_631p99 | null | null | t1_dfqs63n | null | 1493738089 | 2 | t5_2fwo | null | null | null |
null | gingerbill | null | I've figured out how I'm going to do the CTE stage now without much trouble. That metaprogramming problem was written a long while ago. One of the big problems is making the execution sandbox "safe" and preventing the use from passing procedures around with the wrong calling convention (which is handled okay now). | null | 0 | 1491171168 | 1491175900 | 0 | dfqsy1f | t3_631p99 | null | null | t1_dfqsozl | null | 1493738096 | 2 | t5_2fwo | null | null | null |
null | oridb | null | Often, it's a bone thrown to new graduates, since these are questions you can probably answer with a bit of thought if you were paying attention during algorithms classes.
There are lots of things that I wouldn't expect them to have too much experience with, and asking them to find a race condition betwen nodes of a distributed system in some hairy production code (for example) would just kind of lead to nobody getting hired. For more experienced hires, the questions at many companies do tend to focus more on system design and practical applications of theory. | null | 0 | 1491171232 | False | 0 | dfqszv0 | t3_62xwba | null | null | t1_dfpwveu | null | 1493738120 | 1 | t5_2fwo | null | null | null |
null | combinatorylogic | null | And how are you going to handle a cross-compilation (especially between platforms with different word size/endianness/alignment requirements)? | null | 0 | 1491171265 | False | 0 | dfqt0su | t3_631p99 | null | null | t1_dfqsy1f | null | 1493738133 | 2 | t5_2fwo | null | null | null |
null | irqlnotdispatchlevel | null | Here I am, trying to make sense of an April Fools post...
Correct me if I'm wrong, but doesn't rust already offer some sort of polymporphism? Why would one need unions then? | null | 1 | 1491171318 | False | 0 | dfqt2hy | t3_62wye0 | null | null | t3_62wye0 | null | 1493738155 | 1 | t5_2fwo | null | null | null |
null | irqlnotdispatchlevel | null | That would have been a more entertaining story. Not that this one isn't, but, you know... | null | 0 | 1491171369 | False | 0 | dfqt433 | t3_62zx67 | null | null | t1_dfqd91l | null | 1493738176 | 6 | t5_2fwo | null | null | null |
null | gingerbill | null | I have not and thank you for the link.
From a quick glance, it does not seem that is what I need/want. But it's a good material for more research. | null | 0 | 1491171478 | False | 0 | dfqt7ck | t3_631p99 | null | null | t1_dfqsxir | null | 1493738220 | 1 | t5_2fwo | null | null | null |
null | irqlnotdispatchlevel | null | > A user interface is like a joke. If you have to explain it, it’s not that good.
An article that explains jokes tries to explain this joke. That's the spirit!
I really enjoy this site though. | null | 0 | 1491171511 | False | 0 | dfqt8be | t3_62szbn | null | null | t3_62szbn | null | 1493738232 | 2 | t5_2fwo | null | null | null |
null | josefx | null | > This attitude
I should have added a sarcasm tag.
> instead of rightly correcting the problem
I wont pretend that I have any insight into the way airlines work. However it wouldn't be surprising if they choose this workaround to a known problem over fixing and updating all planes in the wild because it is such a simple solution. Now if the software used in new planes still had the same issues, that would be bad.
> hoping that the problem will be abated whilst the program is being used.
"hoping" implies that they don't know what causes the problem. This isn't the case. They know exactly what it is and have a suitable workaround that can be applied during maintenance without affecting its use. | null | 0 | 1491171561 | False | 0 | dfqt9xf | t3_62wye0 | null | null | t1_dfqsqe9 | null | 1493738254 | 0 | t5_2fwo | null | null | null |
null | combinatorylogic | null | It's C with a rich metaprogramming. Caveat - it's based on JetBrains MPS, so it's an AST editor. Anyway, there is a lot of very good ideas there to steal. | null | 0 | 1491171569 | False | 0 | dfqta7c | t3_631p99 | null | null | t1_dfqt7ck | null | 1493738258 | 3 | t5_2fwo | null | null | null |
null | OneWingedShark | null | The [Wikibook](https://en.wikibooks.org/wiki/Ada_Programming) is decent, there's a few books available as PDFs like [Ada for Software Engineers](http://ace.cs.ohiou.edu/~razvan/courses/cs3200/ase.pdf) [Ada-95], [Ada as a Second Language](http://acpmy.us/ajwa/ada-as-a-second-language.pdf) [Ada-95], and [Ada Distilled](http://www.adaic.org/wp-content/uploads/2010/05/Ada-Distilled-24-January-2011-Ada-2005-Version.pdf) [Ada-95; w/ updates for Ada-2012, IIRC]; there's also the links at [AdaIC.org](http://www.adaic.org/learn/materials/#ada_2012_books), [comp.lang.ada](https://groups.google.com/forum/#!forum/comp.lang.ada) and the #Ada IRC-channel on freenode.net. | null | 0 | 1491171616 | False | 0 | dfqtbt3 | t3_62wye0 | null | null | t1_dfqevnr | null | 1493738278 | 2 | t5_2fwo | null | null | null |
null | gingerbill | null | The CTE stage will run as a similar architecture to the compiler's machine but the calculated results will match the resulting architecture.
The CTE will be used as a sort of `constexpr` (but written in the exact same language)
```
x := #run some_function(1, 2, "hellope");
```
And a tool to actually set the compilation settings for the program. e.g.
```
build_settings.mode = Build_Mode.RELEASE;
build_settings.optimization_level = 3;
build_settings.flags = ...;
``` | null | 0 | 1491171703 | False | 0 | dfqteiu | t3_631p99 | null | null | t1_dfqt0su | null | 1493738315 | 1 | t5_2fwo | null | null | null |
null | william01110111 | null | Ever heard of [Design by committee](https://en.wikipedia.org/wiki/Design_by_committee)? I'm basically doing the extreme opposite of that. If this comes off as unprofessional instead of refreshing, then Pinecone may not be for you. | null | 0 | 1491171795 | False | 0 | dfqth75 | t3_62ixbc | null | null | t1_dfqshjz | null | 1493738350 | 0 | t5_2fwo | null | null | null |
null | salgat | null | There is no library for what I do either, but I still often find myself finding better implementations that I can copy from for sections of what I write on stack overflow. And all tests do is ensure it works, not that it's the best implementation. | null | 0 | 1491171893 | False | 0 | dfqtk3p | t3_62xwba | null | null | t1_dfqs2d4 | null | 1493738391 | 3 | t5_2fwo | null | null | null |
null | combinatorylogic | null | Ok, makes sense, so your CTE interpreter must simulate the target, not the host. | null | 0 | 1491172032 | False | 0 | dfqto2s | t3_631p99 | null | null | t1_dfqteiu | null | 1493738447 | 1 | t5_2fwo | null | null | null |
null | Daenyth | null | Considering how old it is I imagine that was a requirement in development | null | 0 | 1491172461 | False | 0 | dfqu0jp | t3_62yl50 | null | null | t1_dfqgduw | null | 1493738614 | 14 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 1 | 1491172463 | 1491172870 | 0 | dfqu0n9 | t3_631p99 | null | null | t3_631p99 | null | 1493738615 | -3 | t5_2fwo | null | null | null |
null | irqlnotdispatchlevel | null | > Whats the object-oriented way to become wealthy? Inheritance
While this explains what objects are, it does not explain what inheritance is. | null | 0 | 1491172563 | False | 0 | dfqu3kj | t3_62szbn | null | null | t3_62szbn | null | 1493738655 | 1 | t5_2fwo | null | null | null |
null | imhotap | null | What? It took me all of a minute to explain basic Makefile syntax to a colleague many years ago. | null | 0 | 1491172629 | False | 0 | dfqu5ic | t3_62zk1i | null | null | t1_dfq6j6k | null | 1493738680 | 2 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1491172633 | False | 0 | dfqu5l9 | t3_631p99 | null | null | t1_dfqu0n9 | null | 1493738681 | -1 | t5_2fwo | null | null | null |
null | flukus | null | One cost I never see talked about but have been dealing with lately is "how long does it take a new Dev on the project to become productive". It's been a year so far for me on the current main project I work on and I'm not much more productive yet than when I started, that's an incredibly expensive training program, especially considering the turnover in our industry. | null | 0 | 1491172664 | False | 0 | dfqu6hc | t3_62yxur | null | null | t3_62yxur | null | 1493738694 | 1 | t5_2fwo | null | null | null |
null | holygoat | null | > Algorithm and datastructure mastery is the difference between $80k and $350k software jobs.
Not in my experience. _Some_ engineers end up well-compensated by virtue of deep domain knowledge. _Some_, probably fewer, by deep field-independent knowledge of algorithms and data structures. _Some_ by having significant experience in an industry. _Most_, in my experience, by having a proven record of delivering working software on time that meets business needs — a record that comes from being good with people, good at triage, and good at estimating risk. Most 200K+ software engineering jobs are not solo programming gigs.
I've correctly implemented tries and other well-known datastructures myself when necessary, but that's never been a reason for a promotion.
I've never met a distinguished engineer or principal engineer who was in that role because they could crank out A* on a whiteboard. | null | 0 | 1491172811 | False | 0 | dfquaok | t3_62xwba | null | null | t1_dfqf0c7 | null | 1493738749 | 3 | t5_2fwo | null | null | null |
null | gingerbill | null | I'll see what I can do. I think a general overview (an xinyminutes-style thing) would be a good thing too.
n.b. I wouldn't call an OpenGL program non-trivial. That's more a library level problem rather than language level. | null | 0 | 1491172818 | False | 0 | dfquawa | t3_631p99 | null | null | t1_dfqnbuv | null | 1493738752 | 4 | t5_2fwo | null | null | null |
null | holygoat | null | Aren't you essentially arguing that spending lots of time on a collection of algorithms and data structures is optimizing yourself for — indeed, placing _bets_ on preparation for — 5-15% of your job?
I'd much rather hire someone who was curious, tenacious, and aware. That person would spot that 5-15%, investigate, and go find a better solution. Debugging and diagnosis are two key skills in software engineering. | null | 0 | 1491173000 | False | 0 | dfqufxw | t3_62xwba | null | null | t1_dfq9ffs | null | 1493738820 | 3 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 1 | 1491173065 | False | 0 | dfquhso | t3_631p99 | null | null | t3_631p99 | null | 1493738845 | -2 | t5_2fwo | null | null | null |
null | flukus | null | You don't keep a backup anyway? | null | 0 | 1491173090 | False | 0 | dfquigq | t3_62n5mx | null | null | t1_dfoz27f | null | 1493738853 | 1 | t5_2fwo | null | null | null |
null | flukus | null | I'm still using it daily, haven't found a good alternative yet. | null | 0 | 1491173151 | False | 0 | dfquk6x | t3_62n5mx | null | null | t1_dfos5zz | null | 1493738877 | 2 | t5_2fwo | null | null | null |
null | pheonixblade9 | null | gotcha :) | null | 0 | 1491173577 | False | 0 | dfquwnc | t3_62n15u | null | null | t1_dfqsskj | null | 1493739043 | 1 | t5_2fwo | null | null | null |
null | gingerbill | null | On most international keyboards, doesn't `^` just require two "strokes" e.g. ^ then space? But if it's really that much of problem I'll reconsider changing it.
With regards to the backtick, I understand that problem too but raw strings are not that common of an operation. But again, it's just minor detail which is easy enough to change.
With regards to the aesthetics of the language, apart from the declarations, it's not much different from C. Declarations have this format:
// Variable declarations
name : type; // zero value
name : type = assignment;
name := assignment; // inferred type
// Constant declarations
name : type : assignment;
name :: assignment; // inferred type
Example code:
foo := 123;
// foo: int = 123;
bar :: proc(a: f32, b: int) -> (int, f32) {return b, a;}
My_Int :: int;
My_Struct :: struct{x: int};
CONSTANT :: "Hellope";
But if you don't like the syntax, that's fine, you don't have to use it :D | null | 0 | 1491173600 | False | 0 | dfquxc2 | t3_631p99 | null | null | t1_dfqu0n9 | null | 1493739052 | 2 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1491173680 | False | 0 | dfquzm9 | t3_631p99 | null | null | t1_dfquxc2 | null | 1493739083 | 0 | t5_2fwo | null | null | null |
null | HotlLava | null | > ... You know, the way every other field does things.
In how many other fields did you apply for a job?
Musicians and actors have to do auditions, manual labourers will often have a test day, consultants and managers usually go to assessment centers where they have to prepare business plans or do role playing, politicians have to actually run a campaign and get elected, from a quick search lawyer's are also not that different (https://www.wikijob.co.uk/content/industry/law/list-law-firm-interview-questions). | null | 0 | 1491173749 | False | 0 | dfqv1kx | t3_62xwba | null | null | t1_dfqang2 | null | 1493739109 | 4 | t5_2fwo | null | null | null |
null | ThisIs_MyName | null | If you can't change 1 line of code, don't patch away the safeties :) | null | 0 | 1491173820 | False | 0 | dfqv3lm | t3_62ul90 | null | null | t1_dfq8i14 | null | 1493739136 | 0 | t5_2fwo | null | null | null |
null | gingerbill | null | Error handling is handled with multiple return values.
x, err1 := foo();
if err1 != ERROR_NONE {
// Simple error code
}
y, err2 := bar();
match e in err2 { // match statement on (tagged) union
case Error.Malformed_Data:
handle(e);
case Error.Wrong_Argument:
handle(e);
case Error.Buffer_Overflow:
handle(e);
default:
// No error
}
The `Error.` prefix could simplified with the `using` statement which brings that namespace into this one (it works for types, import names, and even live variables). | null | 1 | 1491173852 | False | 0 | dfqv4jn | t3_631p99 | null | null | t1_dfquhso | null | 1493739156 | -2 | t5_2fwo | null | null | null |
null | gingerbill | null | I could remove the `:` in the signature but it would not be syntactically consistent. This is the minimal amount of syntax that is needed that does not require more than 1 token lookahead. | null | 0 | 1491173935 | False | 0 | dfqv6xy | t3_631p99 | null | null | t1_dfquzm9 | null | 1493739193 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1491174029 | False | 0 | dfqv9kb | t3_631p99 | null | null | t1_dfqv4jn | null | 1493739228 | 16 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1491174059 | False | 0 | dfqvadk | t3_631p99 | null | null | t1_dfqv6xy | null | 1493739239 | 2 | t5_2fwo | null | null | null |
null | Phase_Prgm | null | It's a _very_ work in progress. A simple add example doesn't generate anything.
public class Main {
public int add(int a, int b) {
return a + b + 2;
}
}
This generates the following:
class Main {
func add(a: , b: ) -> {
}
}
| null | 0 | 1491174118 | False | 0 | dfqvc1f | t3_62zdw7 | null | null | t3_62zdw7 | null | 1493739263 | 2 | t5_2fwo | null | null | null |
null | HotlLava | null | > This doesn't filter for programming qualifications, but rather tests to see if someone remembers all of the irrelevant shit they had to memorise for a compsci class.
Nobody expects that people remember this from university. The idea is usually to filter for people who are motivated enough to put in the necessary practice for an interview. | null | 0 | 1491174126 | False | 0 | dfqvcbc | t3_62xwba | null | null | t1_dfq33ky | null | 1493739266 | 1 | t5_2fwo | null | null | null |
null | hagbaff | null | Go-style error handling is **aweful**
At least Go has panic, poor mans exceptions. | null | 0 | 1491174140 | False | 0 | dfqvcpj | t3_631p99 | null | null | t1_dfqv4jn | null | 1493739271 | 12 | t5_2fwo | null | null | null |
null | [deleted] | null | [deleted] | null | 0 | 1491174218 | False | 0 | dfqvez4 | t3_631p99 | null | null | t1_dfquxc2 | null | 1493739303 | 2 | t5_2fwo | null | null | null |
null | MaMainManMelo | null | I think a lot of people felt that the title might be a bit buzz-feedish.
The content although not groundbreaking, I found very enjoyable. | null | 0 | 1491174247 | False | 0 | dfqvfu3 | t3_62ul90 | null | null | t1_dfqkhal | null | 1493739315 | 2 | t5_2fwo | null | null | null |
null | Derpscientist | null | I'm completely on-board. It is ridiculous to ask advanced algorithms in an interview. I do expect simpler challenges though. Binary search, determine if a string is an anagram, sum up the left nodes in a tree, invert a binary tree, design a parking lot, impl a queue using stacks, etc. I give plenty of hints. | null | 0 | 1491174262 | False | 0 | dfqvg8k | t3_62xwba | null | null | t1_dfquaok | null | 1493739320 | 2 | t5_2fwo | null | null | null |
null | Phase_Prgm | null | Hello World, Factoral, etc. | null | 0 | 1491174328 | False | 0 | dfqvi22 | t3_631p99 | null | null | t1_dfqn7pf | null | 1493739345 | 10 | t5_2fwo | null | null | null |
null | Tipaa | null | D already has nearly all of these, does it not?
>Full UTF-8 Support
Yep
>Custom allocations that are simple to use
>Memory arenas/regions, pools, stacks, etc. which can be easily added
>Context system for allocations and thread data
`std.experimental.allocators` matches this, with allocator combinators to create strongly-typed allocators. Example code:
//Use context allocator
SomeType* st = theAllocator.make!SomeType(args);
theAllocator.dispose(st);
//Use custom allocator
auto regionAlloc = FallbackAllocator!(InSituRegion!4096, Region!Mallocator(8192));
st = regionAlloc.make!SomeType(args);
regionAlloc.dispose(st);
iirc, syntactic sugar/redirecting `new T` to `make!T` may happen once `allocators` is no longer `experimental`
>Built in types and functions that take advantage over the context system for allocations
This will come once `allocators` leaves `experimental`, iirc. I've already seen/got code that takes the allocator as a template parameter, so extending existing code isn't hard (e.g. `struct Unique(T)` -> `struct Unique(T, Alloc = Mallocator)`)
>new(Type) uses the context's allocator
There was talk a while back of using `theAllocator` (context allocator) as standard for all `new` calls, but I don't know if/when that'll happen
>Dynamic arrays and Hash Tables
auto a = [1,2,3];
a ~= 4;
assertEqual(a, [1,2,3,4]);
auto b = ['c':4,'b':5,'a':6];
pragma(msg, typeof(b)); //int[char]
>Vector types to reflect vector instructions
>[vector 4]f32
`core.simd` has you covered (although it's still a bit bare last time I checked, rather XMM-intrinsic-y). LDC also auto-vectorises now, as used in [mir.glas](http://blog.mir.dlang.io/ndslice/algorithm/optimization/2016/12/12/writing-efficient-numerical-code.html)
>Function overloading
Yep
>Introspection on all types
[Builtin traits](https://dlang.org/spec/traits.html) and the [helper library](https://dlang.org/phobos/std_traits.html) are amazing for this. [Cerealed](https://github.com/atilaneves/cerealed) is a great public example of their use. I've written JSON/CSV parsers before that required no meta-tags or attributes - it just took compiler-known type field names and types and wrote itself with CTFE during compilation.
//Example of easiness - top-level pretty printer for any type
auto prettyPrint(T)(T t)
{
foreach(field; FieldNameTuple!T) writeln(field, " = ", __traits(getMember, t, field));
}
>High control over memory layout of records
Yep - D has the `align` attribute for this
>Decent "modules" and file/library handling
>No bad preprocessor
>Type inference
Yep
>using
D has [`alias this`](https://dlang.org/spec/class.html#AliasThis)
>making everything a namespace and removing the need for constructors and weird inheritance (idea borrowed from Jai)
Not sure what 'making everything a namespace' means, but D has strong scoping rules, such as scoped imports and [related magic](https://dlang.org/blog/2017/02/13/a-new-import-idiom/)
>Multiple return types
D's `std.typecons.tuple` falls a bit short, as it lacks proper tuple unpacking without using other unpacking idioms like `let`/`tie`
>Clean, consistent, and fast to parse syntax
>No need for function prototypes
>defer
>defer a statement until the end of scope (akin to D's scope(exit))
>Nested functions and types
Yep
>Tagged unions and untagged unions
`union` acts like C and `std.algebraic!(T...)` is a tagged union (complete with type-safe `visit`)
>Ranged for loops
>Labelled branches
>break label_name;
>break by default in match statements
>Explicit fallthrough
Yep
>"Raw" strings
Backtick/`r"str"` strings do this
>compile time when statements
`static if` inside blocks and `if` on function declarations, e.g.
auto numericFunction(N)(N num) if(isNumeric!N) {...}
>Bounds checking which is togglable at the statement level
>\#no_bounds_check \#bounds_check
I think D lacks this on a per-statement level, although I don't know about compiler-specifics (e.g. if LLVM can, then LDC can with `pragma`) | null | 0 | 1491174360 | False | 0 | dfqvizh | t3_631p99 | null | null | t1_dfqs63n | null | 1493739358 | 4 | t5_2fwo | null | null | null |
null | Phase_Prgm | null | Do you have to explicitly use `:=` for type inference? | null | 0 | 1491174404 | False | 0 | dfqvk6l | t3_631p99 | null | null | t1_dfqs63n | null | 1493739374 | 1 | t5_2fwo | null | null | null |
null | gingerbill | null | I dislike _software_ exceptions for handling "errors". I prefer to handle errors like any other piece of code. "If this then, then that, else whatever".
This is more of a philosophical debate and is completely dependent on the programmer's view.
_Hardware_ exceptions are a different thing which I do like. | null | 1 | 1491174528 | 1491175711 | 0 | dfqvnnb | t3_631p99 | null | null | t1_dfqvcpj | null | 1493739420 | 3 | t5_2fwo | null | null | null |
null | burntsushi | null | Unions and polymorphism are orthogonal. You can have one without the other. :-) | null | 0 | 1491174537 | False | 0 | dfqvnwd | t3_62wye0 | null | null | t1_dfqt2hy | null | 1493739423 | 2 | t5_2fwo | null | null | null |
null | gingerbill | null | `x := foo;` is "kind of" shorthand for `x: the_type = foo;`.
"Untyped" constants in the language will automatically get the correct type when needed. | null | 0 | 1491174621 | 1491175855 | 0 | dfqvqe4 | t3_631p99 | null | null | t1_dfqvk6l | null | 1493739457 | 3 | t5_2fwo | null | null | null |
null | Phase_Prgm | null | What on earth does "[designed for good programmers](https://youtu.be/CkHVwT1Qk-g?t=53s)" mean? Are you saying languages like C are designed for bad programmers? | null | 0 | 1491174708 | False | 0 | dfqvsqr | t3_631p99 | null | null | t3_631p99 | null | 1493739488 | 9 | t5_2fwo | null | null | null |
null | gingerbill | null | I have numerous other problems with D but if D was the only option over C or C++, I could use it.
The allocation system is a context based one. Which means you can "push" a context/allocator for that scope and then all operations (unless they have a custom one already) can use that allocator. This means that `new(Type)` actually uses that custom allocator. It's the best solution I've found that for the problems I have.
Vectors are not just limited to be certain sizes. You could have `[vector REALLY_BIG_SIZE]f32` and the compiler will convert the operations for the specific platform. If you want higher control, you can do so.
`using` a cool feature to have. This demo video explains it some what https://www.youtube.com/watch?v=n1wemZfcbXM (albeit with old syntax). It allows for crazy things such as `using` live variables members. This is just a small example of what it can do:
Vec3 :: struct{x, y, z:f32};
using v: Vec3;
x = 123; // v.x = 123;
Entity :: struct {
using position: Vec3,
scale: Vec3,
}
e: Entity;
e.x = 123;
foo :: proc(using this: ^Vec3) {
x = 123; // using a live pointer!!!
}
| null | 0 | 1491174726 | 1491175624 | 0 | dfqvt9c | t3_631p99 | null | null | t1_dfqvizh | null | 1493739495 | 7 | t5_2fwo | null | null | null |
null | hekdev | null | There's a lot of things that Flash and friends had nailed down years ago that the HTML5 crew only recently is catching up to.
Don't misunderstand me those proprietary technologies had to die, but it would be nice if we had got replacements earlier. | null | 0 | 1491175124 | False | 0 | dfqw4e7 | t3_62z7p7 | null | null | t1_dfqgsa1 | null | 1493739646 | 1 | t5_2fwo | null | null | null |
null | ioquatix | null | And then you get people who actively refuse to implement secure by default: https://github.com/jc00ke/guard-puma/issues/23 :( | null | 0 | 1491175352 | False | 0 | dfqwao9 | t3_62ul90 | null | null | t1_dfpnt0l | null | 1493739732 | 4 | t5_2fwo | null | null | null |
null | avarus | null | basic makefiles are very simple but can become horrible as well :). | null | 0 | 1491175541 | False | 0 | dfqwfv2 | t3_62zk1i | null | null | t1_dfqu5ic | null | 1493739804 | 4 | t5_2fwo | null | null | null |
null | MadDoctor5813 | null | I mean, you could have just said naive. Every English speaker alive would have understood you without the accent. | null | 0 | 1491175587 | False | 0 | dfqwh4w | t3_62ls64 | null | null | t1_dfnzt1w | null | 1493739820 | 2 | t5_2fwo | null | null | null |
null | ioquatix | null | Utopia (web framework) does this - it generates a key in dev mode but doesn't save it: https://github.com/ioquatix/utopia/blob/f3a20844fe16efb030ef3b3354ebc4b782c11707/setup/site/tasks/environment.rake#L10-L16
In production it automatically generates a key when you set up the server, and saves it in a config file that's excluded from git: https://github.com/ioquatix/utopia/blob/f3a20844fe16efb030ef3b3354ebc4b782c11707/lib/utopia/command/setup.rb#L68-L74
Shipping a default configuration like `config.secure_key = 'super secure'` is just bad design. | null | 0 | 1491175732 | False | 0 | dfqwl2k | t3_62ul90 | null | null | t1_dfpwf3w | null | 1493739873 | 1 | t5_2fwo | null | null | null |
null | [deleted] | null | Ugh, needs body margin | null | 0 | 1491175831 | False | 0 | dfqwnui | t3_630cgb | null | null | t3_630cgb | null | 1493739911 | 12 | t5_2fwo | null | null | null |
null | MadDoctor5813 | null | I've always felt that languages like Chinese were unsuited for computing. Everything you need for English can exist in ~8 bits. Unicode has a whole plane dedicated to CJK characters, plus a portion of the Basic Multilingual Plane. | null | 0 | 1491175839 | False | 0 | dfqwo21 | t3_62ls64 | null | null | t3_62ls64 | null | 1493739914 | 2 | t5_2fwo | null | null | null |
null | misterbinny | null | Write your own browser that can send UDP packets.. | null | 0 | 1491175865 | False | 0 | dfqwote | t3_62z7p7 | null | null | t3_62z7p7 | null | 1493739924 | -3 | t5_2fwo | null | null | null |
null | arbitrarycivilian | null | It's not philosophical - resorting to that argument is just an escape attempt. The correct way to handle errors is with unions. | null | 1 | 1491175869 | False | 0 | dfqwoxi | t3_631p99 | null | null | t1_dfqvnnb | null | 1493739925 | -3 | t5_2fwo | null | null | null |
null | arbitrarycivilian | null | It's weird that this language is receiving so much hate. I'm not defending it; it just seems like it's a coin flip whether r/programming will adore a new language or take it to task. | null | 1 | 1491175955 | False | 0 | dfqwrbz | t3_631p99 | null | null | t3_631p99 | null | 1493739958 | 2 | t5_2fwo | null | null | null |
null | goddamnrito | null | getting a degree isn't that hard | null | 0 | 1491176050 | False | 0 | dfqwu3v | t3_62xwba | null | null | t1_dfq3r2e | null | 1493739995 | 3 | t5_2fwo | null | null | null |
null | gingerbill | null | It is completely an opinion; not a fact. Also, the second example above is handling errors with a (tagged) union. | null | 0 | 1491176105 | False | 0 | dfqwvuy | t3_631p99 | null | null | t1_dfqwoxi | null | 1493740018 | 6 | t5_2fwo | null | null | null |
null | codebje | null | Never trust the client. Ever.
You'd have to do a lot of work to detect falsified data sent from one client to another, else someone out there would fake prediction info to gain an edge over their opponents. | null | 0 | 1491176135 | False | 0 | dfqwwpj | t3_62yl50 | null | null | t1_dfq6sve | null | 1493740030 | 7 | t5_2fwo | null | null | null |
null | ioquatix | null | Utopia implements 2 for development and can also implement it for production, although as you say, 3 is a bit annoying.
Generate an ephemeral key for development: https://github.com/ioquatix/utopia/blob/f3a20844fe16efb030ef3b3354ebc4b782c11707/setup/site/tasks/environment.rake#L10-L16
Deploy a fixed key for production: https://github.com/ioquatix/utopia/blob/f3a20844fe16efb030ef3b3354ebc4b782c11707/lib/utopia/command/setup.rb#L68-L74
Just thought you might be interested :) | null | 0 | 1491176180 | False | 0 | dfqwxyu | t3_62ul90 | null | null | t1_dfpqx9y | null | 1493740046 | 1 | t5_2fwo | null | null | null |
null | ellicottvilleny | null | 1. Pharo is open source. Cincom etc are not open source. That is what is a proprietary stack. And yet you're saying that Pharo isn't useful.
2. GNU Smalltalk is utterly useless. You talk about the productivity benefits of a Smalltalk environment? Well then, Gnu smalltalk is useless, a destroyed ruined and useless thing.
Smalltalk is not your stack. your stack is your entire set of tools. The binary blobs you don't have source to are the things that limit you. A modern stack like Python, Ruby, and Java is fully opensource and no amount of corporate stupidity (the kind that killed smalltalk) can hurt you. If you're still using a commercial smalltalk, you're stuck in the 1960s mentally. | null | 0 | 1491176423 | False | 0 | dfqx4u2 | t3_62sm8g | null | null | t1_dfqftfo | null | 1493740139 | 1 | t5_2fwo | null | null | null |
null | sacundim | null | But why have a long-term key at all, instead of ephemeral ones that get routinely discarded? | null | 0 | 1491176441 | False | 0 | dfqx5cz | t3_62ul90 | null | null | t1_dfqwl2k | null | 1493740146 | 1 | t5_2fwo | null | null | null |
null | codebje | null | IPv6 has enough addresses for individual devices end to end.
However, IPv6 isn't dominant, carrier-grade NAT IPv4 is. Current architectures for networked systems must accommodate this, which means current architectures are not trying to use e2e, which means providers of service and equipment are not facing pressure to deliver e2e.
I predict that e2e is more or less over, and IPv6 CPEs will come with restrictive firewalls factory configured to protect the network providers, because everyone will be so used to working around CGN already that no-one will really miss it. | null | 0 | 1491176468 | False | 0 | dfqx6aj | t3_62yl50 | null | null | t1_dfqskg2 | null | 1493740158 | 7 | t5_2fwo | null | null | null |
null | avarus | null | that's odd indeed :). | null | 0 | 1491176568 | False | 0 | dfqx9jf | t3_631p99 | null | null | t1_dfqvsqr | null | 1493740202 | 2 | t5_2fwo | null | null | null |
null | dangerbird2 | null | Also larger compilation units mean faster production build-time. | null | 0 | 1491176729 | False | 0 | dfqxeel | t3_62z7p7 | null | null | t1_dfqp8tl | null | 1493740267 | 3 | t5_2fwo | null | null | null |
null | gingerbill | null | Luck of the draw, I guess ¯\\\_(ツ)\_/¯ | null | 0 | 1491176757 | False | 0 | dfqxf97 | t3_631p99 | null | null | t1_dfqwrbz | null | 1493740278 | 2 | t5_2fwo | null | null | null |
null | arbitrarycivilian | null | Not correctly though. You're pattern-matching on the error. You should be pattern-matching on the return value. | null | 0 | 1491176910 | False | 0 | dfqxjjs | t3_631p99 | null | null | t1_dfqwvuy | null | 1493740337 | 5 | t5_2fwo | null | null | null |
null | lusion | null | I don't get that. I've used : a lot for type annotations and I quite like it. Don't see the problem. Makes sense to reuse it, since it is becoming a well established convention.
The key thing is that you want types AFTER the variable name. I think it is useful with a separator. I find that Go code can get a big confusing sometimes to read since it lacks these. | null | 0 | 1491176934 | False | 0 | dfqxk8n | t3_631p99 | null | null | t1_dfquzm9 | null | 1493740347 | 2 | t5_2fwo | null | null | null |
null | flukus | null | Sometimes, if it's something like a common variable it should be defined in one place. For more general code I'd prefer more repetitiveness than more layers of abstraction that make the code harder to follow. | null | 0 | 1491177071 | False | 0 | dfqxo56 | t3_62ji76 | null | null | t1_dfnl25c | null | 1493740401 | 1 | t5_2fwo | null | null | null |
null | lusion | null | Why would you use an international keyboard while typing code? Don't know about you, but my Norwegian keyboard layout is total shit when it comes to coding, so I just got used to english keyboard layout and I can't be happier. Anyway maybe I am luck since I can easily get my æøå characters on a mac keyboard with the option key, so I don't miss Norwegian keyboard layout at all. No idea how english keyboard layout is for other languages. | null | 0 | 1491177092 | False | 0 | dfqxor0 | t3_631p99 | null | null | t1_dfqu0n9 | null | 1493740408 | 5 | t5_2fwo | null | null | null |
null | Nimitz14 | null | how is that a palindrome? the `n` destroys the symmetry | null | 0 | 1491177112 | False | 0 | dfqxp9r | t3_62xwba | null | null | t1_dfq4ttb | null | 1493740415 | 1 | t5_2fwo | null | null | null |
null | orangecodeLol | null | Would encryption not work in this instance? or is it impractical. | null | 0 | 1491177148 | False | 0 | dfqxq97 | t3_62yl50 | null | null | t1_dfqwwpj | null | 1493740429 | 1 | t5_2fwo | null | null | null |
null | seventeenletters | null | under the hood "persistent data structures" aren't much different from getting CoW - which is another optimzation, more than you'd get if you had to defensively copy | null | 0 | 1491177151 | False | 0 | dfqxqby | t3_62yl50 | null | null | t1_dfq5t3b | null | 1493740430 | 5 | t5_2fwo | null | null | null |
null | jackssingleton | null | > I think a lot of people felt that the title might be a bit buzz-feedish.
that's fair
> The content although not groundbreaking, I found very enjoyable.
thanks. agreed, there is nothing that new in this section nor the forthcoming installments, but I've tried to lay it out in a way that's clear and interesting... perhaps even fun. | null | 0 | 1491177170 | False | 0 | dfqxqtk | t3_62ul90 | null | null | t1_dfqvfu3 | null | 1493740436 | 2 | t5_2fwo | null | null | null |
null | codebje | null | Nearly all of it, unless you're basically doing transaction scripts. | null | 0 | 1491177393 | False | 0 | dfqxwv2 | t3_62xwba | null | null | t1_dfpwveu | null | 1493740518 | 2 | t5_2fwo | null | null | null |
null | bigmell | null | stop being passive aggressive, reinventing the wheel is fun to you so enjoy it and ignore this comment. | null | 0 | 1491177441 | False | 0 | dfqxy7c | t3_62ixbc | null | null | t1_dfprp5l | null | 1493740535 | 1 | t5_2fwo | null | null | null |
null | lusion | null | Given a lot of negative comments about rather irrelevant stuff, I think you deserve a kudos for doing stuff, rather than bitching on reddit. I think making a nice alternative to C/C++ is a laudable goal as I've also often wanted something like that but never quite found anything quite suited.
Now for me I am thinking Swift or Rust is that alternative. I did think perhaps it could have been Go, but with garbage collection it isn't quite the same.
So out of curiosity what was your motivation for going with Odin rather than say Rust? If I was to speculate it would be complexity. Rust looks neat but also a bit time consuming to get into, unlike something like Go which is super quick.
How about Swift? Too high level? | null | 1 | 1491177553 | False | 0 | dfqy17t | t3_631p99 | null | null | t3_631p99 | null | 1493740575 | 2 | t5_2fwo | null | null | null |
null | avarus | null | I'll give it a try; I'm currently using courier and I like it. | null | 0 | 1491177589 | False | 0 | dfqy269 | t3_62qrve | null | null | t3_62qrve | null | 1493740588 | 1 | t5_2fwo | null | null | null |
null | gingerbill | null | Complexity is mainly it. I want a language that is simple and I, a mere mortal could keep the spec in their head. I bet there are only 3 people in the world who know the C++ spec.
Swift looked interesting but it is too high level. Rust is good but the complexity, compile times, the mental overhead of the ownership semantics is a bit too much for me.
I want a language that can program things from games to drivers to real time applications whilst keeping my sanity. | null | 0 | 1491177781 | False | 0 | dfqy7bw | t3_631p99 | null | null | t1_dfqy17t | null | 1493740657 | 2 | t5_2fwo | null | null | null |
null | John_Earnest | null | While category theory offers one way to interpret and explore point-free programming, I challenge the assertion that it's the most fundamental or valid one. I'd encourage looking into concatenative programming languages, particularly Joy:
http://tunes.org/~iepos/joy.html
We might also look to the APL family, particularly J, where "tacit programming" is often idiomatic:
http://www.jsoftware.com/help/jforc/tacit_programs.htm
| null | 0 | 1491177945 | False | 0 | dfqybs5 | t3_632jqy | null | null | t3_632jqy | null | 1493740717 | 5 | t5_2fwo | null | null | null |
null | codebje | null | If the interviewer is going to pose problems like "how would you find the number of tosses needed to win Snakes & Ladders" it's handy to be able to figure out that you can express that as a graph problem and throw a standard solution at it.
This sort of thing comes up in software development all the time. Sometimes, we don't recognise the problem, and we write an inefficient (or sometimes even incorrect!) solution, sad. It might not matter, if the input size is small and timing isn't critical. Sometimes, we recognise the problem.
Then we reach for an existing implementation.
But you have to have recognised the problem to know which implementation to reach for, and sometimes you need to know when you should be tailoring a solution to a specific context. | null | 0 | 1491178022 | False | 0 | dfqydu5 | t3_62xwba | null | null | t1_dfqqbav | null | 1493740744 | 4 | t5_2fwo | null | null | null |
Subsets and Splits
Filtered Reddit Uplifting News
The query retrieves specific news articles by their link IDs, providing a basic overview of those particular entries without deeper analysis or insights.
Recent Programming Comments
Returns a limited set of programming records from 2020 to 2023, providing basic filtering with minimal analytical value.