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

If I was being paranoid, Id say this is ground softening/ giving cover for, the councils to sell off allotment land, to make up for shortfalls in their budgets.

Allotments are chunks of land set aside for housholds to grow their own fruit and veg. Its generally an older gen (plus some younger woke) that use them, so nobody who the telegraph readers will care about. The councils have had a very hard time of it from the party in power due to many factors, and some are on the verge of bankruptcy. [1]

So being able to sell land that is genrally in walking distance to other residental zones to devlopers would be a welcome shot of cash. With the thin justification of "Its better for the enviroment" to keep most the would be defenders busy arguing if it is, or isnt, untill the deals are done, and they are lost.

It almost funny when the UK also has a general, saying that "Britain must train citizen army" [2], and allotments were promoted so the UK could feed itself when being blockaded. [3]

[1] https://www.theguardian.com/society/2023/dec/06/english-town... [2] https://www.bbc.co.uk/news/uk-68086188 [3] https://www.telegraph.co.uk/news/earth/environment/9996180/H...


> Its generally an older gen... that use them, so nobody who the telegraph readers will care about

Wat? The average age of a Telegraph reader is 61 [1] (at least as of a decade ago).

[1] https://www.telegraph.co.uk/multimedia/archive/01863/Digital...


Telegraph readers skew wealthy so probably own a private vegetable patch.


Thanks for the example code.


Thats also a Douglas Adams quote from HHGTTG.


Spyro: Year of the Dragon also tried the game glitch copy protection route. http://www.gamasutra.com/view/feature/131439/keeping_the_pir...


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.


Honestly, I remember making less than a 100k binaries playing c64 sid and doing a whole bunch of other stuff about 15 years ago(I would have said 16kb, but I don't really remember the numbers). I believe I mostly disabled RTTI, but I wasn't very good at reading manuals and understanding C++ back then, so I ended up patching the compiler instead.

You could argue that if you end up disabling all the fancy stuff from C++ why use C++ at all. But anyway, you can definitely use C++ in low memory environments if you really want to.


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


Hi, thanks yassim. Yes, the use case is from the original article. Yes, that is certainly another way to go, you could just provide the unique_ptr and a bunch of integer offsets. In this post, my data structure is trying to balance performance and code cleanliness, it's advantageous to provide standalone ArrayView which can't just be two integers. In the follow up post I'll be trying to make the data structure itself generic, so it will more easily allow for space optimizations.

I guess we'll agree to disagree, I think that C++ gives us some nice ways of writing it, I think that's what the post shows :-)


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.)


Thank you for the link. I wonder if Tinker Tots is now having a surge of traffic.


Forgive my ignorance, but what does 'LTS' stand for?


LTS: Long Term Support, it is a version that the editor/community will support for a long time. Here you find the policy for Ubuntu: https://wiki.ubuntu.com/LTS .


Long Term Support


Wonderful links. Thankyou.


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

Search: