Skip to content

Instantly share code, notes, and snippets.

View VideoCarp's full-sized avatar
🅱️
no status.

VideoCarp VideoCarp

🅱️
no status.
View GitHub Profile
@VideoCarp
VideoCarp / mcfunction-docs.md
Last active July 7, 2023 22:57
Useful guide for Minecraft Bedrock Commands and MCFunction

What is this?

readtime
This is a documentation for Bedrock Minecraft commands, which is unofficial, written by VideoCarp.
Visit Navigate for easy navigation between commands.
Are you a beginner?
If you've not been redirected from my other guide, click here for my beginner's guide.
To show your appreciation, you can star this gist, or comment with feedback.
Hate? Give me feedback in the comments, or by contacting me through my server (check below headline)

Can I distribute this guide?

Please don't. Always put the link to this direct gist, otherwise contact me on discord, at my server.

@VideoCarp
VideoCarp / uncopy.md
Last active January 31, 2024 20:27
Making Code Uncopyable

Usage:

This is when you want to create an open-source project in which you may not want the people to be
able to just copy it, in that case you can make it uncopyable.

How do I do it?

Finding the Character

You will use a special unicode character. No, it will not make your code look any different, however,
it'll raise syntax errors. There are multiple characters, so to be PERFECTLY safe, use as many as possible.
Below, is a table for them

@VideoCarp
VideoCarp / beginner-mcfunction.md
Last active December 8, 2022 11:44
Beginner’s Guide for Commands
@VideoCarp
VideoCarp / tutorial.md
Last active September 11, 2020 07:10
How to move a world from a device to another tutorial.

Exporting your Map

Follow the process below.

Finding your Directory

Click the > like thing to expand.

Windows 10 Open up the "Run" app, (shortcut Win+R) and insert this.
%LocalAppData%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds
This will find the Minecraft Windows 10 Edition directory and you will see some folders here.
@VideoCarp
VideoCarp / lexer.ex
Last active April 11, 2022 00:43
A tiny lexer in Elixir.
# A small, unoptimized lexer in the Elixir programming language.
# No mutable values are used.
# This lexer was much, much easier for me to write and debug than when I had done it
# using imperative programming concepts such as loops and mutable values.
# This can be optimized by consuming the input string, instead of indexing.
defmodule Lexer do
# char info
def numeric(char) do
char >= "0" and char <= "9"
@VideoCarp
VideoCarp / lexing.md
Last active May 3, 2024 13:43
Basics of lexing

Lexing for beginners

This is a guide that should teach you how to perform basic lexing in a functional programing language.
Everything was written in Elixir, but you should be able to follow it if you are using any functional programming language.
Or even an imperative programming language like Python, C or Java.\

What is lexing?

The first question you should ask yourself is, what is lexing? It's the same as tokenising, scanning or lexical analysis.
That might not help you if you haven't heard of these either. Put simply, lexing is the process of breaking down a string
into meaningful units, indepdendent of context.
What a lexer will do is make the following happen:

@VideoCarp
VideoCarp / Review of FP.md
Created April 19, 2022 10:04
Reviewing functional programming

Reviewing functional programming

Here, I'll cover review functional programming according to my experience when I tried it. I'll cover what advantages there are and what disadvantages there are. My struggles, and what I found easier, and finally a conclusion. This is not a scientific paper, and is based solely on developer experience, it's more useful if you're trying to understand developer experience. Hopefully, this will help you decide whether or not to try functional programming.
So, I originally started programming in general procedurally, with Python. It's important to note that functional programming and object oriented programming are not the only two paradigms -- contrary to popular belief. Procedural programming is largely very different to functional programming, so do keep that in mind.

When I started functional programming, I started with F#. I was careful to avoid imperative structures like control flow. And when I began, it was

@VideoCarp
VideoCarp / MCFunction editor images.md
Last active April 23, 2022 14:24
Images for MCFunction Editor's latest version (or maybe not the latest version)

Default theme
image

Light theme
image

Message box
image

@VideoCarp
VideoCarp / ConciseLexer.fsx
Last active May 8, 2022 03:33
A lexer for the English language written in F#.
open System
open System.Text
// Helper functions (SEE End of file for details)
let numeric c = (c >= '0' && c <= '9')
let ofword c =
(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c = '\'')
let str c = (c = '"') // fix highlighting syntax "
let notstr c = (c <> '"') // "

GUI in Rust

The Rust programming language seems like a good fit for GUI programming. C++ developers have access to Qt, wxWidgets and many more. It's considered that GUI is just not there yet in Rust. I tried using Iced, it seemed like a good option. But Iced's examples were not working. I didn't bother with other libraries, they were mostly GTK and webview. I gave it another try. And at least two options did work! egui and Tauri. You've probably heard of both of them.

Tauri

You might criticize Tauri for its performance. But you'd be wrong.