X39.io
A fancy world of magic, unicorns and a raging lazy dev

HTTPS enabled again
by X39


Implementing LUA 5.3 with custom C functions
by X39


I recently had to implement a script language to make developing new "features" for my lil IRC bot more simple.

turned out this was more complicated then i initially thought ... the different stackoverflow pages and tutorials for the various things required all talk about different versions which differ highly as mostly deprecated functions have been used ... sooo lets start telling you how you also can use LUA :)

Preparations

As with pretty much everything, you have to prepare your LUA object before you actually can use it. Preparing means in this context:

  • create the LUA Virtual Machine
  • load the different libraries

should not be that hard right? well ... you are right :)

first of all, you have to include the lua headers

#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>

when this is done, you have to create your LUA-VM and save it to a variable by using lua_State *LUAVM = luaL_newstate()

Now that you finally got your LUA object initialized, open the libraries you want to use. The default ones can be loaded via luaL_openlibs(LUAVM)

and thats it :)

Your very own C-Functions in LUA

Now this topic ... this was really a hard one ...

the documentation is kinda good but also a gigantic beast ... hard to google, harder to understand properly unless you read everything ...

soooooooo ... lets get trhough it quickly :)

first of all, let me introduce you to the LUA-Function callback int lh_your_fnc(lua_State *L). This little function head will be your best friend for all theese nasty C functions you want to create. The return value will tell lua if there is a return value on the stack (1) or not (0) and the lua_State variable will contain the VM that is calling that specific function.

Lets write a little test function that does nothing but printing something to stdout :)

int lh_hello_world(lua_State *L)
{
    printf("hello world\n");
}

the question now is: how to call this function from within lua? well: you either have to put theese into a separated library and use require to load them or you have to load them manually

but how does that work? that is where the different versions will fuck around with your google searches and where i will help you :)

First you will need to create a new lua function int lh_my_lib(lua_State *L) in which you create a new luaL_Reg structure. That luaL_Reg structure will contain your different functions and has to end with a { NULL, NULL } entry. When created, you have to pass it to the luaL_newlib function to create the table for your library and then return a 1 as result for that function as you left something on the stack. Now lets throw this together for our hello_world function:

int lh_my_lib(lua_State *L)
{
    static const struct luaL_Reg my_lib[] = {
        { "helloworld", lh_hello_world },
        { NULL, NULL }
    };
    luaL_newlib(L, my_lib);
    return 1;
}

but hold on! we are not yet done! To now get it into your VM, you have to "assign" it a global variable ^^

this is done by calling luaL_requiref(LUAVM, "testlib", lh_my_lib, 1) which is basically the C variant of the require function in LUA.

After all this, you finally can call the helloworld function by using testlib.helloworld() in lua :)

Moved Server
by X39


You might have noticed a few changes on the webpage (eg. HTTPS currently is no longer working .... gahhahah :3)

those changes come due to a server change

i threw away that crap which is no longer needed (eg. the WIKI) and just kept the "important" stuff also now using nginx ... but thats not interesting for this specific webpage :P (but thats the reason why there is no HTTPS yet ^^')

everything else should work like usual however, if you expecience any error, please e-mail me or write me a PN on the usual sources

Redesign
by X39


Hello there

as you, the visitor, might have noticed, i changed a "few" things on my webpage in regards of the design

first of all: this wont be the last change loads of back-end code is getting rewritten ... but well ... for now, try hovering the bar at the top :)

X39

The way Todays news are created during "emergency" situations ...
by X39


So ... it happened "again" something "bad"

this time: Munich, Germany

One News-Magazine reports Alluah Akbar got shouted some other reports 100% Evidence not related to islam ... most likely some other reported IT WAS A PIG! SENT BY ALIENS!! ...

The Problem

Every news magazine today reports instantly as soon as any pictures are available, not as soon as a news is available! This is especially visible when such events occur ... Do we yet know anything? Yes:

  • The Police came with heavy equipment (SEK, GSG9, BePo)

Aaaaaand ... thats it

Everything else from shooting to whatever actually is currently not official

But what do we know from non-official sources with proper evidence (eg. from a video like this) ...

  • Shots got fired
  • Somebody had an argument with somebody else

Cool ... so ... what is the first thing which comes into your mind now?

Wait until you got some proper informations? XD nonono! Go Live NOW!!!! Just grab some random people who seemed to be close from ... i dont know ... twitter? Just get some images & feelings onto TV and social networks!

Ohhhhhhh ... wait ...

So ... what can we conclude out of that bullshit happening currently all over the world in the news?

BINGO!

News agencies today do not want to deliver news to you ... they want to deliver content. Content that feels like news but actually is just garbage and speculation.

There are multiple cases where the speculations are complete garbage ... but some people got that garbage and take it as fact and use it in further discussions etc. that bullshit spreas out further and further ... and in the end ... you get some idiots who think they are right as it was in the news! They even can show you some evidence by some random youtube video that recorded that news snippet ... what they most of the time do not get is the correction of that news agency ...

Conclusion

  • News Agencies do not take their job serious anymore
  • Due to the ASAP feelings & pictures content delivery system they evolved to now people get informed wrong
  • Bullshit spreads all over the place
  • People get evidence by false reports which ghost somewhere in the internet without correction

This ... is not good! Most people just believe what they read and thus do not ask any questions when they spot something in the news. They do not further inform themself or reflect about that content they just consumed ... they just consume ... Due to that, false facts further spread and get evidence without ever being true ...

Good job news agencies ... spread further stupidity & ignorance ... and please ... never stop doing it ...

Evolve Stage 2 - F2P to revive a dead game ... some big concern
by X39


I recently noticed that Evolve now is Free2Play.

I did bought the title and had a lot of fun and seeing the playerbase dying was ... well ... hard ... I played it when it was released and had heavy technical problems

A year later i gave it another try (player count was ~600 around that time) and noticed that the problems are gone. So i had a new game to play regulary ...

sadly ... the playerbase dropped quite fast to 100-200 players and finding a game took longer and longer ... when it regulary started to take at least 15 minutes i stoped playing again ...

But what does all this has to do with the game now going F2P? Well ... lets make it quick: The F2P is a try to survive the game ... i feel rly happy about it as i appreciate that step of the devs ... however ... i also got some big concerns which are not yet clear for me ...

How do they want to make money now?

That is by far the most important question for me ... F2P is nice for the players ... but developement is not paid by fun ... it is paid by coin ...

Currently, there is no way to buy anything in the game with real world money ... which worries me ...

The game getting F2P should not mean that people now can play a year and then the game wont be supported anymore ... that would neither be good for Turtle Rock Studios reputation nor it would be good for the game ... so PLEASE @DEVs ... do not fuck this up by forgetting that you need to make money too or by making it Pay2Win ... the cosmetics way can be good for you ... but being able to buy those things with the so callen "Silver keys" is simply garbage at its current gain rate ... i mean ... i played 3 matches and already got 4k silver keys ... (to note ... i also won all those 3 matches as monster at stage 2 ... but i am also a vet in regards of monster playing ^^')

Take DotA 2 as example for good F2P gaming, or Team Fortress 2 and do not try to just get some sort of money grabber in ... people (like me for example) will pay thousands of EUR if you allow them to do it properly

TL;DR:

Do not fuck your F2P model up by forgetting the money at all or by just pressing it in somehow. If you follow that simple rule, the games revive will be a success!

Ohh ... and .. do not forget that people want new content ... so you might want to add some modding support (which then can be transfered into the game again by eg. new characters/monsters/maps etc.)

How to annoy your coworkers using Jira
by X39


Step 1

Take any ticket link you are supposed to send to a coworker

Step 2

Attach a , onto the link

Step 3

Watch your coworkers rage