Recent submissions

Comment · 2 years ago
Comment · 10 years ago
Thanks for the example code.
Comment · 10 years ago
Thats also a Douglas Adams quote from HHGTTG.
Comment · 10 years ago
Comment · 10 years ago
I find C++ encourages more pointer use by default, which implies all things are in memory at all the time. C on the other hand has this less implicitly, so things such as handles, deferred messages vs straight method call, have less of a.. friction?

Now you can wrap them up in C++, but then making such things hidden I think defeats some of their usage.

A managed runtime should be handle this better, but I don't know of any Java or .NET runtime that is optimised for a small memory foot print, perhaps paging from a larger virtual space[1]. I'd be interested to hear of any really.

[1] I do know there have been versions of Smalltalk that did basically this, but nothing recently that I've heard of.

Comment · 11 years ago
Hi, Another Game dev here. Firstly, neat article, thanks for writing it.

I'm curious as to the problem you're exploring/solving here?

"Concatenated struct's in single chunk" is a neat trick. The use case seems a bit broken[1], but I'm assuming that it's from the original video, and your c++-ifying it? Or at least trying to find a nicer way to write this style of code?

If you'r going this route, I'd be tempted not to use pointers at all, and just use offsets and accessors.[2]

  * Lack of pointers means you can load in 1 read. (endian needs to be watched, and assumes you can get the entire size elsewhere)
  * You can also shuffle it around in memory should you be doing something fancy. (defragging heaps might be useful if doing a sandbox)
  * Better encapsulation? maybe..
But the basic point I'd like to make is, there is no nice way to write this type of code, because c and c++ gives us no nice[3] way of expressing it.

[1] Verts and Indices are generally uploaded to a GPU then discarded, but this has the counts, which is needed CPU side for draw calls, in the same chunk so would need to be copied before freeing.

[2]

  struct Mesh 
  {
  	int32_t num_indices, 
  		num_verts;

  	// inline to this struct.. 
  	// assumes Vector3 is aligned 4 bytes.
  	// and that Mesh has been alloced to same alignment.
  	//
  	// Vector3 positions[num_verts];
  	// int32_t indices[num_indices];
  	// Vector2 uvs[num_verts];
  
	inline const Vector3* PositionsBegin() const { return reinterpret_cast<const Vector3*>(this + 1); }
  	inline const Vector3* PositionsEnd() const { return PositionsBegin() + num_verts; }
  	inline const int32_t* IndicesBegin() const { return reinterpret_cast<const int32_t*>(PositionsEnd()); }
  	inline const int32_t* IndicesEnd() const { return IndicesBegin() + num_indices; }
  	// etc
  };
[3] Maintainable, fast at runtime, low mental friction to people other than the author, etc
Comment · 12 years ago
Some interesting rewards in the Kickstarter. https://www.kickstarter.com/projects/142464853/hendo-hoverbo...

I do like the White box idea. I wonder though at the price where they start and if thats going to eat the profit generated. (I don't know, they could be very cheap to produce at scale.)

Comment · 12 years ago
Thank you for the link. I wonder if Tinker Tots is now having a surge of traffic.
Comment · 13 years ago
Forgive my ignorance, but what does 'LTS' stand for?
Comment · 13 years ago
Wonderful links. Thankyou.
Comment · 14 years ago
What was the query? I'd really like to know if it used bullshit correctly?

Sure could/should/must not be used to advertise the tech, but If I had a pocket watson, I'd have no problems with it calling it like it parses it.

Comment · 14 years ago
Thankyou.
Comment · 14 years ago
I'm curious.

>9. Latest research proves that Flame is indeed linked to Stuxnet....

Whats the chance that this "Resource 207" is some 3rd party module that more than 1 developer had access to? I concede that placing the same resource in the same resource location in 2 different unrelated applications is a bit of a long shot, but I dont see it as a smoking gun either.

Comment · 14 years ago
I did really want it to be real, but I now wondering how long till it is. There were enough very clue-y people say "yeah, the physics might actually work". I'm sure it has inspired a lot of people, who will probably now work even harder if they know they can be the first for real.
Comment · 14 years ago
There is also the possibility of a Joker pushing somebody (possibly multiple to be sure) else onto the grenade, thus saving their life and causing destruction. Which has 2 possible out comes in itself:

1) Joker pushed another Joker or Cooperator. Which might be uncomfortable for a time, but would pass.

2) Joker pushed a Defectors, in which case some Defectors would want some form justice.

I have no numbers to prove this, just my feeling for the archetypes.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton