HNHacker News
TopNewBestAskShowJobs

Shadonototra

397 karma · joined September 14, 2021

submissionscomments
Shadonototra··on What Metric to Use When Benchmarking?
Watts
Shadonototra··on Modern cloud for multiplayer games
nodejs server for games = how to burn your money fast world record

the money people coming telling game devs how to make their servers to become inefficient

little do they know

Shadonototra··on Shrugs.app – A native Slack client for macOS
hopefully people at Slack are smart and they hire the dude

but since they spit buggy electron shit for decade already, i think you are right, they'll do everything possible to shut this down and keep with their inefficient and bloated electron way

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
i would have preferred:

    templ<thing>(a, b)

because with that:

    templ!thing(a, b)
is it a function?, or are you calling thing's function?

you can do:

    templ!(thing)(a, b)
but did you mean?:

    templ!(thing(a, b))()

i personally always use !(), no matter what, and it's annoying to type, i don't want to waste time constantly trying to figure out what is what, it's mentally draining
Shadonototra··on Xbox Series X|S Has Outsold PS5 in Japan Again
Something is not right indeed, either Sony is incompetent and can't manage crisis, wich i doubt considering they control the industry with Nintendo (they have no problems btw)

Or something bad happened in their supply chain, and there is nothing they can do, wich is super fishy since Xbox/Nintendo have no problems

Shadonototra··on Increased Subscription Pricing for IDEs, .NET Tools, and the All Products Pack
USD is becoming worthless, the fed kept printing infinite money and people are sick of receiving toilet paper

Also the fact that they had to fire their entire Russian R&D department, and instead rely on Westerners, they are more expensive, so they are forced to increase their price overall, that's my guess

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
https://forum.dlang.org/post/bkgvdewkjwthmlfemnjm@forum.dlan...

> The good news is, I have not put a lot of effort so far into micro-optimizing the compile-time performance of match, so there is almost certainly room for improvement.

it is shame that it ended up in the standard library

once Walter will be gone, i will have no faith in the language anymore

Shadonototra··on Whatever hit the Moon in March, it left a double crater
it doesn't make sense, no

and you justifying their racism is disgusting

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
I'd take a language that have built in support for tagged union over having to import a module and rely on templates

I know of sumtype, and i think it is a mistake for D to rely on this for such important language feature

I'm not a language dev, so i can't do much to help, using switch/union/enum is more natural, is cleaner, and is easier to add support for IDEs, everyone on the same page

That's in areas like this where the language falls short, and i can see people instead choosing alternatives

https://github.com/dlang/phobos/blob/master/std/sumtype.d

a mess of templates and imports to std.traits

using this will make your compile speed tank.. another reason to avoid

it's very sad that people recommend this instead of asking for built-in version, makes me sometimes reconsider my choice to use the language

if they expect language improvements to be templates, what atrocity will be added next?

this is on the same level as std::bool from C++

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
The plan is to finish https://dlang.org/phobos/std_experimental_allocator.html

Once finished, everything in the std will be able to make use of it

If you can't wait, you can use this package already with the allocators: https://github.com/dlang-community/containers

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
Interesting.. what is the layout of your keyboard?
Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
D has defer

    scope(exit):
    scope(failure):
    scope(success):
https://tour.dlang.org/tour/en/gems/scope-guards

You can do RAII with D too, it's your choice, based on your use case

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
I grew to agree, but that doesn't mean that's not annoying.. i'm nitpicking
Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
debugging has significantly improved, it works great for D types https://github.com/Pure-D/dlang-debug

kotlin became very useful for focusing on being able to consume Java code

it allowed them to have a huge presence on android, that's enabler

it profits Zig as well

not everything needs to be ranked #1 in TIOBE index

there is value in being the way it is, it's organic, and no companies get to control its faith

> the C interop is so good, that 1) most libraries provide a 1-1 translation of their C APIs, which ends up being ugly, non-idiomatic D that forces me to think in both C and D when coding;

what do you mean? it's the same, function and data

    struct Data {}

    do_this(&myData);

this is valid D, it's also valid C

the problem i think you have is you are abusing OOP and think it's the only way of doing things, which is wrong, and this explain the sad state of software nowadays ;)

but it's weird when you then say you decided to stick with C, you contradict with yourself

Shadonototra··on Whatever hit the Moon in March, it left a double crater
"chinese junk"?

why the racism in journalism?

did they call it the "american junk" for the Persererance's backshell and parachute?

https://www.space.com/mars-helicopter-ingenuity-perseverance...

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
While D is great, it also has some issues

- float default is NaN, why... just WHY!!!!!

- char default is 0xFF....

when you expect things to be just 0, it is a pain to deal with and to remember...

Also the standard library, while useful, i wish it would make use of allocators

They have ``std.experimental.allocator`` packages, for some reason it still is experimental..

There is no tagged union.. you have to import a package for it ``std.sumtype``.. wich is bad when all other languages have built in support for that

Walter if you read this, please! union are useful, but lack of tagged union mean potential bugs in your union when you pick the wrong value...

Proposal for you:

  enum MyTag { A, B, C}

  union MyTaggedUnion: MyTag
  {
      DataA A,
      DataB B,
      DataC C
  }

  struct DataA{}
  struct DataB{}
  struct DataC{}

  auto tgu = MyTaggedUnion.B;
  switch (tgu)
  {
   case A:
   tgu. /* implicit DataA */
   break;
   // need to implement every tags, or error
  }
Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
BetterC is not no GC mode, BetterC was made to make sharing D code easier with C

GC only exist if you call ``new MyThing``

Just use your allocators with malloc/free, that is what i do (you do the same in zig, allocators)

if you want to enforce no GC use in your APIs, there is the @nogc attribute you can use

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
Zig is still new, so it has room to improve

While i like Zig, it has many ergonomics issues that i just can't deal with.. and it has the tendency to make your code unnecessary verbose

- no operator overloading for your math type, you end up chaining methods..

- no function overloading, you have to do things like 'add(comptime T: type, x: antype, y: anytype)`

then: add(f32, myX, myY);

then be prepared with a shit ton of @floatCast(), it can't guess what type you use so you forced to be doubly explicit..

you end up with code that is barely readable

- unused as error, this one hurts a lot.. you can say goodbye to fast iteration time, if you make a game it'll be painful

Zig is still great, i plan to use it for some project, knowing how to use more language helps train your skills and understand pros/cons of features better

You can crosscompile with D too

    ldc2 -mtriple=x86_64-windows-msvc -c foo.d
Metaprogramming is great, you get more power with D, mixin, proper templates, type introspection

You can link without the runtime if size is a concern, i haven't had any issues with it

Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
Input system is still being worked on, i've been focusing on mouse/keyboard right now, i should treat touch the same way as mouse input, it basically act the same anyways
Shadonototra··on Adding Modules to C in 10 Lines of Code [pdf]
ImportC is shaping up to be one of the greatest feature of D

Being able to just import your C code, and call it from C, or when you need to go back to C and resume your work by just importing your D modules

I tried it, while it still need some finish, it worked very well! (you had to put your files through a preprocessor though, hopefully this step won't be needed in the future)

Every modern language should include a C compiler, it is stupid to give up the entire C ecosystem!

No wonder Walter's name is "Bright"!

To the people who still doubt about D "because of the GC", it doesn't exist for me, i am making an online 3D game targeting WASM without it, with all the language features!

For cases when you need one "if you use D as a scripting language", it will be very helpful to have!

https://www.kdom.xyz/

If you love C, but need something modern with more safeties, give D a try!

D is a pragmatic language, very powerful, covers everyone's needs!

If you tried it before, now is the time to give it another try!

Shadonototra··on Russia will soon exhaust its combat capabilities, Western assessments predict
I doubt it very much, the are probably saving the biggest/advanced ones for when things will heat up between USA/China

There is no reason to waste them on Ukraine, it'd be very dumb

Shadonototra··on We Halved Go Monorepo CI Build Time
Build time has always been essential, even more so important since the wide adoption of TDD

Picking a language that has fast build speed, allows you to be more flexible, and able to test and deploy quicker

They had Go, wich builds very fast, but they failed to educate their developers to maintain a healthy build pipeline to avoid things getting too slow

This kind of developer will cost your company millions, make sure to educate them properly ;)

I'd never work for a company with slow build speed, part of the reason why i refuse to touch languages like Rust and C++, due to their insanely slow build speed, i refuse to live in a world like that

Shadonototra··on I think the GNOME designers are incompetent
i gave up on linux UI decade ago already, mainly because of gnome

so i live in a terminal, and whenever i need some desktop UI, i boot my macOS VM (with GPU passthrough)

whenever i need gaming, i boot the windows VM

gnome and red hat want the death of linux desktop, they want everyone instead to become a tablet/smartphone user

they sabotage desktop and held for hostage the entire linux community

it's really a shame to see more and more desktop app with CSD and these giant headers that needs multiple clicks and scroll

a sad era for linux..

https://www.youtube.com/watch?v=_JTEsQufSx4

Shadonototra··on Build a PinePhone App with Zig and Zgt
it is a strength, and the reason why i picked Zig over Rust

i want to control lifetimes and memory management, so i can target the hardware i want, and i can play with memory the way i want to do tricks and optimizations that could not be possible with a rigid language like rust(that is very slow btw)

the day zig adds borrowchecker or some lifetime enforcment shenanigan will be the day i'll look for an alternative

Shadonototra··on Mattermost – open-source platform for secure collaboration
How can it be secure if they are able to track you this far?

https://news.ycombinator.com/item?id=31852914

Shadonototra··on Mattermost [update: isn't] suspending our licenses because of 'US sanctions'
The fact that they track your activity and customers should already give you proper hints that you should look for an alternative ASAP

Also you are in EU, they are American, i'm pretty sure what they are doing is illegal

I will investigate

Shadonototra··on Sleeping longer than 6.5 hours/day can help you lose weight: study
the only thing that works:

burn more calories than you take

don't eat transformed food

eat 1 cheat meal a week to wake up your metabolism, it can be anything, really, ice cream, pizza, burgers, anything

Shadonototra··on Ask HN: Trillions of new Dollars and Euros have been printed – where are they?
In the pocket of the same people who ruined the world in 2008

In an attempt to stop inflation, central banks, yet again, ruined their own people

The people with the money probably went investing in Asia instead

Shadonototra··on Coinbase Rival Cuts Bitcoin Trading Fees to Zero. A Price War Could Be Next
Why do they advertise Coinbase when talking about Binance? in the title, they don't even mention Binance, the main subject

Shady journalism

Shadonototra··on Lenovo ThinkPad X13s with Snapdragon ARM-CPUs Available
$1300 for a snapdragon laptop? and it is already 40% off, retail price is 2x the macbook air M2

and probably not even 10% the performance lol, i can't imagine people wanting to buy one

way too overpriced, even at $600 it should be 2x too expensive

← PreviousPage 4 of 30Next →