Search found 190 matches

by cyboryxmen
April 18th, 2019, 10:38 am
Forum: Everything
Topic: High IQ C code
Replies: 2
Views: 1643

High IQ C code

I'm just going to leave this brilliant piece of C code here for you to enjoy. You're welcome.
by cyboryxmen
March 11th, 2019, 4:01 am
Forum: Everything
Topic: Going Declarative with Functional programming
Replies: 10
Views: 8120

Re: Going Declarative with Functional programming

Essentially, yeah. When you put it all together, a simple console program would look like this: auto start() { return PrintJob{"Hello world!\n", printCallback}; } auto printCallback = [](ConsoleState console) { return GetInputJob<int>{getInputCallback}; } auto getInputCallback = [](ConsoleState cons...
by cyboryxmen
March 9th, 2019, 3:56 am
Forum: Everything
Topic: Going Declarative with Functional programming
Replies: 10
Views: 8120

Re: Going Declarative with Functional programming

If you've read my last post , you'll know that a player is never just a player. In a multiplayer game, you may start with 4 players receiving input from the network. Then, those players will get transformed into a generic physics object and be inserted into a list with all the other physics objects....
by cyboryxmen
March 5th, 2019, 1:45 pm
Forum: Everything
Topic: Going Declarative with Functional programming
Replies: 10
Views: 8120

Re: Going Declarative with Functional programming

If you want to learn more about this, you can go look up on lambda calculus
by cyboryxmen
March 5th, 2019, 1:28 pm
Forum: Everything
Topic: Android
Replies: 12
Views: 13010

Re: Android

If you're doing Android development, you might just prefer using Android Studio directly. It simply has more support for it.
by cyboryxmen
March 5th, 2019, 12:56 pm
Forum: Everything
Topic: Going Declarative with Functional programming
Replies: 10
Views: 8120

Re: Going Declarative with Functional programming

Functions are a bunch of steps that need to be executed. This is where your Imperative bias is clouding your judgement. If you've read up on the von Neumann machine(the model all modern computers base themselves off of), you'll know that a computer is just a programmable calculator. By that logic, ...
by cyboryxmen
March 5th, 2019, 7:53 am
Forum: Everything
Topic: Going Declarative with Functional programming
Replies: 10
Views: 8120

Going Declarative with Functional programming

You may have heard of this term floating around a lot but might not know entirely what it means. It's simple really. Normal(Imperative) code would do this: sort(array); while Functional code would do this: const auto sorted_array = sort(array); Or this const auto sorted_array = array.sorted(); In Fu...
by cyboryxmen
March 3rd, 2019, 8:51 am
Forum: Everything
Topic: Even more purity
Replies: 0
Views: 15654

Even more purity

auto quick_sort(List<int> list) { if(!list.empty()) { auto [middle, list_to_sort] = list.pop_front(); auto [lower, upper] = list_to_sort.split(Int < middle); return merge(quick_sort(lower), middle, quick_sort(upper)); } else { return list; } } https://cdn.discordapp.com/emojis/504924103564853260.pn...
by cyboryxmen
March 3rd, 2019, 8:48 am
Forum: Everything
Topic: Direct3D Tutorial 8 / has VS is
Replies: 13
Views: 12593

Re: Direct3D Tutorial 8 / has VS is

Just use Functional programming and avoid all of this bullshit Image