Hacker Newsnew | past | comments | ask | show | jobs | submit | more sidpatil's commentslogin


I was hoping someone would post that (^_^)


> There was a proposed standard for this but its name escapes me for the moment.

XLink? It supports a feature known as extended links, which seems similar to what you're describing.

https://en.wikipedia.org/wiki/XLink


What are some examples of these C++ features you've missed in other languages?


Zig not having operator overloading makes it suck horribly for writing any kind of vector code. If everyone had to write int a = int_add(int_mul(3, 7), 2) etc there would rightly be a riot, but since they're not 3D coders they just don't give a shit. Too bad, Zig looks great.


Sorry, one more thing to add to this: Andrew Kelley is obviously a genius, and his talk introducing Zig[0] is in my top 10 of all time technical presentations, for many reasons. But I really do wish someone close to him with a passion for how coding is in many ways applied mathematics, would ask him to please have broader algebraic support for basic operations like +, -, * and maybe divide, with their basic dataflow characteristics. Optimal speed for complex numbers vs std::complex out of the box would be attractive.

I understand his point about not wanting to allow every random C++ feature, but in these cases, it isn't a C++ feature, it's language-level basic algebra.

In C++ land, ISPC[1] is often what you use when you want top speed rendering perf on SIMD CPUs, e.g. Moonray project[2]

Please, just go ahead and define a nice clean API for vectors and scalars like OpenCL provides on its beautiful reference cards: https://www.khronos.org/files/opencl-1-2-quick-reference-car...

[0] https://www.youtube.com/watch?v=Gv2I7qTux7g

[1] https://ispc.github.io/

[2] https://openmoonray.org/

Final edit sorry: in the end I love C++ and have been learning Rust mainly out of curiosity. Avoiding C++ quirks one can have few problems and a great time.


Once, I wanted to write a C# function roughly like this:

  (T1, ..., Tn) Apply<T1, ..., Tn>((Func<P, T1>, ..., Func<P, Tn>) args)
This is not possible in C# because the language doesn't have variadic generics. Instead, I used runtime reflection and wrote something like this:

  object[] Apply(Func<P, object>[] args)
Although it worked, the downside is that the types T1, ..., Tn are no longer statically known, which means that the function's contract has to be written in comments and the caller has to check them manually. In contrast, C++ has variadic templates, which would allow the compiler to check the types automatically.


What if a is negative?


Same. Unless you want to differentiate -0 and +0 (which make it more complicated), you can not distinguish infinity from negative infinity.


IEEE floating point representation does both


John Conway can


Which career path did you choose instead?


> Dettol has pine oil mainly for the scent; its main active ingredient is Chloroxylenol which is toxic to cats in addition to being disastrous for marine life.

In fact, chloroxylenol is the precursor to the proposed safer alternative, according to the article.


Ah, that's too bad. I only just found out about this project a few weeks ago, on this site.


> There is commuting to and from work - but we can't optimise that one out ...

Remote work, building housing that's closer to the office, high-speed public transit, etc.


Interesting that they avoided mentioning the term "spreadsheet" entirely.


yeah, i'd think the way to write this page would be to lead off with how exactly it's similar to and different from libreoffice calc or some other spreadsheet people are familiar with. instead they explain the similarities as if it's 01977 and the audience has never used a spreadsheet. if there are differences, i gave up on reading before i got to them


I’m glad you posted this because I assumed they were using Excel or LibreOffice. Because of the way they’d written that article, it hadn’t even occurred to me they weren’t using a spreadsheet.


i think they are, it's just that the spreadsheet they're using is one they wrote themselves


It's not about the values, but the units of measurement. g is in units of meter/second^2. The article discusses the dependency of the meter's original definition on the value of pi.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: