Better HN
topnewbestaskshowjobs
Log inSign up

he_the_great

39 karma · joined Jun 17, 2009 (17y ago) · 61 submissions

Submissions

comment 4y ago · link · parent

auto alist = [1, 3, 2];

alist .sort .map!(x => x * x) .map!(x => x - x/2) .map!(x => x + 1);

This seems like what you're asking. Each of those is a template. And while this is all logic code, D has inferred the type aka: SortedRange!Map!Map!Map

With some details removed.

comment 4y ago · link · parent

Those don't matter, because while you can't build your own in Go, the built in types provide the same functionality.

comment 4y ago · link · parent

Yeah I do much in C# and almost never use generics. And when I do it is almost always not what I want.

D has me fooled and I can't imagine Go choosing to go further in D's direction over C#. I feel sorry for them.

comment 6y ago · link · parent

Well learning D or Rust likely will not help you get a job writing Javascript. My C# style is heavily influenced by D, for the better IMO.

I have some potential coming up to do some Typescript, it will be interesting to find out how to transfer my experience into this language.

comment 6y ago · link · parent

D implementation of algebraic type is in the library. https://dlang.org/phobos/std_variant.html#.Algebraic

I have not utilized tagged unions outside this type so I'm not one to comment on any deficiency.

comment 7y ago · link · parent

I tried to make libre contribution, but I prefer the concept of granted power and that was not their direction.

https://github.com/liberland/constitution

comment 7y ago · link · parent

At this point yes. But that is for historical in accuracy, like the 12 amendment being added twice.

Restructuring and formatting can come in as post edits.

There is currently a rewrite in the works.

comment 7y ago · link · parent

It is also important to note that the firearm, while not as powerful, could be just as deadly with the limited medical knowledge, speed of transportation. It would be a little hard to identify a good parallel.

comment 7y ago · link · parent

The repo does edit the original document. The original amendment text is included in a separate file, but is not the purpose of the commit.

comment 7y ago · link · parent

Nope, a rewrite branch is in the works (to many glaring issues to start with.)

comment 7y ago · link · parent

It is fine, this isn't a legal platform, the issues are being labeled and later closed.

comment 7y ago · link · parent

No tools, just manual lookup. There is now a history rewrite based on the feedback happening.

comment 7y ago · link · parent

That is why you have merge request approvers and the merger. The work can be authored by many because each makes small contributions.

You can even have multiple protected branches where "policy makers" merge the work from their lawyer.

comment 7y ago · link · parent

The Bill of Rights is more additional than modification.

The president is the commander an chief of the military, it seems reasonable he would not be allowed to quarter his troops in peoples homes.

Take a look at this one

https://github.com/JesseKPhillips/USA-Constitution/commit/0c...

comment 7y ago · link · parent

No the dates are wrong, and the conversation used is stupid.

comment 7y ago · link · parent

Git does not store commit dates pre 1971. The commit message has the correct date because it is just text.

comment 7y ago · link · parent

Not only has that been happening for years, Google will match D when you search for dlang, wouldn't be surprised if the reverse is true. Google has figured this out for you.

comment 7y ago · link · parent

While not a targeted answer to why not go/rust, this is my case

https://dev.to/jessekphillips/my-case-for-d-444p

comment 7y ago · link · parent

I think D is still working through lack of support for dynamic libs (lots of headway was made so I may be wrong)

It is funny how Go sold it as a feature, but it was always a deficiency in D (and yes, it just happened out of the box.)

That isn't to say C dynamic libraries didn't work, that is a linker thing, but it would be the same in Go.

comment 7y ago · link · parent

Because Walter wrote a native compiler. I could see the same fate for nim, Walter writing a native compiler for fun that is.

comment 7y ago · link · parent

It is less about how it feels and more about how it looks.

And appearance really only changes when you hit templates. And with D you can't tell (as an outsider) so it just looks like the non templated C++.

comment 7y ago · link · parent

It is the first thing I added to my articles when I introduced range based operations :

https://dev.to/jessekphillips/count-of-a-list-in-d-49k4

comment 7y ago · link · parent

SQL gets rather mistifying when you move towards some complex joins and data mapping. PSQL can also feel Sadly out of place.

But their is real nice clarit in what you want at its foundation.

comment 8y ago · link · parent

Seriously though, not being thrown into a program editor at boot is not what prevents getting started with programming. It probably is the fact that you can do non-programming on the computer. I mean, anyone using a computer would then know programming by definition.

On another note

[Flashing Block here]

comment 9y ago · link · parent

It still does, but that doesn't mean you aren't able to create garbage. There is effort to both improve the GC and to make it easier to avoid allocating GC managed memory.

comment 9y ago · link · parent

Rust just needs to add extern(C++) like D has and then they can communicate.

comment 9y ago · link · parent

There has been work done to improve the collector but nothing has made it into mainline. For example one implementation was missing parts for Windows but worked in Linux thus it couldn't be pulled in and used.

comment 11y ago · link · parent

Seems to me the replies made to the "fake" problems are very telling about what is a problem.

For example, Go is praised for being a simple language that everyone can learn quickly, yet when someone shows what they picked up "that isn't how you do it."

I get that it is one thing to get something done, and another to learn an idiomatic approach. But when the sort package is hailed as the example for both why Go doesn't need generics and Go does need generics, I think it is safe to say that even the language creators don't know how to use Go.

comment 11y ago · link · parent

What happens when copy fails? Don't worry I already know.

comment 11y ago · link · parent

I see you've grabbed some examples to show the simplicity. Having to write the insertion sort algorithm to sort your basic types is not simple.

Having to tell the standard library how to swap data in a slice and to obtain a slices length is simple... why doesn't the standard library know how to work with basic types? This way I don't end up writing by accident:

    func (a ByAge) Swap(i, j int)      { a[i], a[j] = a[j], a[j] }
123