Cuberite Forum
Random Chitchat 2017 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Off Topic (https://forum.cuberite.org/forum-9.html)
+--- Forum: Off Topic Discussion (https://forum.cuberite.org/forum-10.html)
+--- Thread: Random Chitchat 2017 (/thread-2727.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


RE: Random Chitchat 2017 - ShadowCone - 08-25-2017

I wonder if the "conversions" are actually right, cause if so it's awesome to have a larger audience but unfortunately no more downloads (or did they happen via github)


RE: Random Chitchat 2017 - sphinxc0re - 08-25-2017

On Aug 22. there were over 3000 people on the website. You are right, it seems like the downloads didn't go up.


RE: Random Chitchat 2017 - sphinxc0re - 08-25-2017

:D Big Grin Big Grin  2000 Stars!!!!


RE: Random Chitchat 2017 - NiLSPACE - 08-25-2017

NiceBig Grin


RE: Random Chitchat 2017 - Seadragon91 - 08-28-2017

"Can you trust your CPU?" Big Grin

Quote:The sandsifter audits x86 processors for hidden instructions and hardware bugs, by systematically generating machine code to search through a processor's instruction set, and monitoring execution for anomalies. Sandsifter has uncovered secret processor instructions from every major vendor; ubiquitous software bugs in disassemblers, assemblers, and emulators; flaws in enterprise hypervisors; and both benign and security-critical hardware bugs in x86 chips.

Source: https://github.com/xoreaxeaxeax/sandsifter


RE: Random Chitchat 2017 - Seadragon91 - 08-29-2017

The rank command doesn't work if authentication mode is off. I always get "tried to execute forbidden command" Trying to find the cause...


RE: Random Chitchat 2017 - Seadragon91 - 08-29-2017

Has been broken by the cUUID implementation.

Edit: Created an issue

Edit 2: A fix has been merged. Thanks to peterbell10


RE: Random Chitchat 2017 - xoft - 08-30-2017

I've finally brought my new API idea from #252 ( https://forum.cuberite.org/thread-2727-post-28462.html#pid28462 ) to a fully compilable and runnable life. It seems it's actually working, and additionally has a nice bonus of being ~7 % faster than the old style (tested with a single-signature API function). Adding and actually using an overload signature is a bit difficult to measure, but I assume it would perform even better than an equivalent old-style code; the old style performs unneeded double-checks which the new code doesn't do.
As for some real data:
Old style interface with only single signature: 3.012 seconds per 1000 000 API calls
New style interface, first signature used: 2.803 seconds per 1 000 000 API calls
New style interface, second signature used: 3.766 seconds per 1 000 000 API calls
I didn't test an old-style interface with multiple signatures. Anyway, the times show how unimportant the cost is - about 3 microseconds per call.

Because the cLuaState class is already quite large, I decided to put the new coed into a separate namespace-like class, cLuaStateParams. So this is an example code that actually works with the new style:
static int tolua_cServer_RegisterForgeMod(lua_State * a_LuaState)
{
	cLuaState L(a_LuaState);
	cServer * Server;
	AString Name, Version;
	UInt32 Protocol;
	switch (cLuaStateParams::Read(L,
		std::tie(cLuaStateParams::self(Server), Name, Version, Protocol),
		std::tie(cLuaStateParams::staticSelf<cServer>(), Name, Version, Protocol)
	))
	{
		case 0:
		{
			Server->RegisterForgeMod(Name, Version, Protocol);
			break;
		}
		case 1:
		{
			cServer::Get()->RegisterForgeMod(Name, Version, Protocol);
			break;
		}
	}
	return 0;
}

Now to see if the whole thing compiles under clang / gccTongue


RE: Random Chitchat 2017 - xoft - 08-30-2017

Yeah, and gcc / clang totally have to break things, because they don't allow a reference to be bound to a temporary object:
std::tie(someFunctionReturningObject(), ...)
fails to compile because std::tie expects a reference and gcc / clang won't auto convert Sad


RE: Random Chitchat 2017 - xoft - 08-30-2017

Baaaah, why do the Linux tools always have to totally break my stuff Sad(((
The code compiles and works great in MSVC, it doesn't use anything else than a bit of template magic, but no, gcc won't compile it, because reasons.
I'm afraid I'm at my wits' ends, I need help from someone who knows some advanced template-fu.
https://github.com/cuberite/cuberite/pull/3981