#💻︱programming
1 messages · Page 10 of 1
intreresting way to declare var in C++.
Replace that:
auto str = "Hello World!";
to:
auto str {"Hello World"};
btw, u can use auto to automatically set data-type for var
Using auto is generally not recommended due to readability
"Why isn't it working?" - me for the past hour 😭
Bottom one was the one my program was trying to do
Does anyone know how to fix a custom persona skin pack being empty im trying to make a custom geometry skin
hey :3
remove .png from custom and 1Mil
1Mil? You mean bionic bens capes
Cuz im not using his capes im using the create your own 4d skins by bionic ben on block bench
then idk
Ok
Ily
fyi, it's useless in most servers because they do not accept self made skins, including cubecraft
fr
what?
patat
who here doing advent of code 
I am, though I am not doing it daily since I don't really have the energy rn
I'm using it as an opportuntiy to do C++
Cool cool, I did the first two in go. But was planning to switch to C++, had like one class in school and want to use it a bit more :v
Oooh that looks fun imma join tomorrow
Are you running anything?
No
Today it did not appear despite opening 3 applications simultaneously
However yesterday I didn't open anything yet I was spammed by it
since it mentions realtek it is likely an issue with one of your audio drivers
no longer happens (for some reason). In case it does what should I do?
probably can ignore it
LOL
Ditch the windows, embrace the penguin. The time to convert is now, you can still save yourself from the clutches of bloated software and constant security concerns.
Bid farewell to the constraints of closed-source systems, and let the penguin guide you towards a computing experience that prioritizes efficiency, privacy, and a sense of community. The future of computing is open, and it's time to be part of the revolution.
Moral of the story: convert to Linux?
If you want to spend half an hour on downloading an app and then 4 days on debugging these kinds of dialogs: yes!
How much is the app big?
The size?
I was kidding; Linux is quite hard to use in comparison to Windows or macos
Meh, it's really not that hard
Fesa will throw me in an endless loop of confusion
🤭
The user-friendlyness depends on the distro you choose
There is a lot of documentation around common issues though
If you use mint, ubuntu or similar you'll even get a nice GUI installer and probably have no issues
Only issue I had with ubuntu was installing dotnet versios- lol
I messed up my nvidia drivers once and had to reinstall ubuntu
But that is pretty much it
Best thing about Linux imo is installing stuff
It takes a fraction of the time and stuff is actually installed to a reasonable location
but I do hate penguins so I had to neutralise them
I too, started in Roblox Studio. Its one of the best place to start in my opinion ( for game development of course ). When I became good at it I started learning C# ( Unity and Visual Studio )
What did penguins do to you
Me when sudo pacman -Syu has 20 update every day 
It is 0 effort tho
Scratch 
Was the first one I used. Then the Python IDE included in the installer, which is not an IDE at all but hey, then vs code; now nvim or IntelliJ for Java
at school we used this online python runner that was actually the slowest thing on earth
and it was always python 2 instead of 3 because that was premium or something
My condolences
I actually code java on NetBeans IDE and on paper
before I knew what I was doing I was looking for an ide to use at home
and I fr installed eclipse 💀
and of course eclipse is a buggy mess
I could have chosen anything else and had a better time
eclipse is on the same level as xcode
java on paper is a mental illness
do you write boiler plate when you are doing it on paper too? 💀
I'd rather do Java on paper than python where whitespace matters and I have to go align stuff
Which was an exam I had, not fun ..
there will be a day where i will be able to draw curly braces succesfully.
I don't mind indentation requirements in programming due to readability but to make you do that in a written exam is absurd
The extent of "programming" I did in written exams before university was psudeocode only
Ye...
i just dont get why you would take a computer science exam on paper at all
like okay, when its only theory, but why are you tested on writing code on paper
No it makes sense. But writing actual code from a real program language makes no sense
It's semantics anyway. They all do the same in the end
but why not in a text editor??
Now I am wishing to have anything on paper. Everything is on laptops and I hate it
first, you need to fix the spelling of the word "successfully" and then you can draw you curly braces
typing is hard enough
i think im mature enough to not fix your typo in that sentence
im sorry 😦
this might be the stupidest thing to ask but
how can I run a c++ code in vscode
I'm about to go insane
I already downloaded required compiler
but I still cannot
because apparently the directory can't be found and well, I can't find it either
I've been searching youtube but I can't find anything
I think I did it..?
You have to compile it, I'd recommend just learning to do it via the command line. Can be the one integrated in vscode
It'll be something like <your compiler> file.cpp -o out if you're not using any 3rd party libs at least
I have to add which version I use, cause it defaults to a super old one with -std=c++<version>
Fix your servers please
What compiler did you download?
Did you try if they're correctly installed?
it doesn't, but it has some issues with dir
Does it throw any error messages?
cc1plus no such file or directory
by not using vscode, get vs 2022 smh
Did you use msys64?
ja
I did, but I got confused and deleted it
it literally took me 3 hours and multiple attempts to get gcc to work
its not that hard lmao, just follow a tutorial
you feel like a peasant trying to do any kind of debugging on vscode
people hate WordPress because they don't understand wordpress
it takes years to build a relationship with it
a mutual tolerance like no other
I LITERALLY UNDERSTAND IT
give it 5 years
😭😭
my colleague has been doing it for 8 years and he likes WordPress
that's proof for you bro
Gecondoleerd
Hello who can give the computer language cubecraft use
Java
☕

the scilence is too loud (joke)
Dear Cubecraft staff,
Is there any way you guys would be willing to share with me data regarding the probability distributions of the various lucky blocks in bedrock lucky islands? This would save me a ton of time from conducting trials on my own. I plan on using this data to help document the game, create feedback, and develop other projects about lucky islands. I completely understand if this is something wanted to be kept secret or is very infeasible to share. Thank you for considering my request.
how much java would you like in your tea?
I'd like 50 grams of java in my tea
I think it works with weights, so there isn't really a % for something to drop
If you could tell me how each drop is weighted, I should be able to figure out the probability. For example, if a specific drop has a weight of 2 and the sum of all the weights is 5, its drop rate would be 2/5, right? BTW, thank you for being awesome with reviewing all my bug reports 🙂
I'm not entirely sure that's how weighted systems works. Would need an actual dev to respond for that one, but I don't think it's that simple.
We probably also aren't able to give a full list, it's not stored in an easily shareable format (I think these are hardcoded 🤭)
And no worries! That's what the QA team is here for
Are you from Foxrock?
No
oh
Does anyone here know anything about q# ?
q# 🤔
I've only ever used python and lisp when going to talks about it
That's about everything I knew about it haha
Oh ok lol I have been reaching out to professors and people I know but I want to gather as much info as I can. If you could put me in contact with anyone you know who might be of use that would be great!
playSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3" || ("Solar-Eclipses-ft.-Dr.-Awkward.mp3" || "Water-Resistant.mp3"), true);
});
onEvent("stop", "click", function( ) {
stopSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3");
stopSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3");
stopSound("Water-Resistant.mp3");
});
(ignore the sooper long names of stuff)
im tryin to figure out how to make the code stuff choose one of the 3 songs (FAR OUT, Solar Eclipses, or Water Resistant) at random but i cant seem to get it to work
only thing it plays is FAR OUT
*btw this is javascript
nvm i found a workaround
var songName = getText("songSelector");
reset();
//Play Music
onEvent("start", "click", function( ) {
if (songName == "FAR OUT - Tokyo Machine") {
playSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3", true);
} else {
if (songName == "Solar Eclipses - Hollywood Principle") {
playSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3", true);
} else {
if (songName == "Water Resistant - Anamanaguchi") {
playSound("Water-Resistant.mp3", true);
}
}
}
if (songName == "Choose a Song") {
playSound("erro.mp3", false);
}
});
//Stop Music
onEvent("stop", "click", function( ) {
stopSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3");
stopSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3");
stopSound("Water-Resistant.mp3");
onEvent("songSelector", "change", function( ) {
stopSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3");
stopSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3");
stopSound("Water-Resistant.mp3");
});
});
//Variable Reset Function
function reset() {
onEvent("songSelector", "change", function( ) {
songName = getText("songSelector");
});
}
(added comments for no reason)
but it doesnt choose random songs (needs to select) but it works at least
try playSound(["Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3" , "Solar-Eclipses-ft.-Dr.-Awkward.mp3","Water-Resistant.mp3"][Math.floor(Math.random()*3)], true);
Alr ill try that next time
Does js not have this?
if () {
} else if () {
} else if () {
} else {
}
You'll probably also want to track which song is playing instead of stopping all songs you have all the time :)
it does
fieuw
gotta make those song names variables bro
Should put them into a map or something
songs = for file in folder if file ends with mp3
I recommend using a switch case due to its performance than if-else
Replace this,
onEvent("start", "click", function( ) {
if (songName == "FAR OUT - Tokyo Machine") {
playSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3", true);
} else {
if (songName == "Solar Eclipses - Hollywood Principle") {
playSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3", true);
} else {
if (songName == "Water Resistant - Anamanaguchi") {
playSound("Water-Resistant.mp3", true);
}
}
}
if (songName == "Choose a Song") {
playSound("erro.mp3", false);
}
});
with this,
onEvent("start", "click", () => {
switch (songName) {
case "FAR OUT - Tokyo Machine":
playSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3", true);
break;
case "Solar Eclipses - Hollywood Principle":
playSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3", true);
break;
case "Water Resistant - Anamanaguchi":
playSound("Water-Resistant.mp3", true);
break;
case "Choose a Song":
playSound("erro.mp3", false);
break;
default:
// something else
break;
}
});
The performance gain is very minimal with so few items
If you rename the mp3 files to the exact song name, you don't need to check for the name at all
If you need that performance difference, you're better off switching to a different language 😝
yeah just helping out @wise hound because his nesting is weird
Right about the song name
I am a Minecraft Thumbnail Maker DM me if You Want One
Not likely
Copilot 💪
thats what i experience every day with copilot
It's so helpful
can't wait for AI to kill computer science!
My biggest nitpick with it, is that it stops lsp suggestions from displaying
Why are y’all so smart 😭
public class Program {
public static void main(String[] args) {
double PI = Math.PI; // 3.14
double square = Math.sqrt(25); // 5
System.out.println(PI + "\n" + square);
}
}
ñ?
what
Do people actually use \n instead of just using a new println?
Yes, a lot of languages also don't have automatic new lines in printf (or similar)
I can understand if the language doesnt have it built in. But in Java?
It saves an extra statement
ig
.
Y’all way to talented
Helloooooo :>
var songName = getText("songSelector");
reset();
//Play Music
onEvent("start", "click", function( ) {
if (songName == "FAR OUT - Tokyo Machine") {
playSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3", true);
} else {
if (songName == "Solar Eclipses - Hollywood Principle") {
playSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3", true);
} else {
if (songName == "Water Resistant - Anamanaguchi") {
playSound("Water-Resistant.mp3", true);
}
}
}
if (songName == "Choose a Song") {
playSound("erro.mp3", false);
}
});
//Stop Music
onEvent("stop", "click", function( ) {
stopSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3");
stopSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3");
stopSound("Water-Resistant.mp3");
onEvent("songSelector", "change", function( ) {
stopSound("Tokyo-Machine---FAR-OUT-(VIP)--Monstercat-Release-.mp3");
stopSound("Solar-Eclipses-ft.-Dr.-Awkward.mp3");
stopSound("Water-Resistant.mp3");
});
});
//Variable Reset Function
function reset() {
onEvent("songSelector", "change", function( ) {
songName = getText("songSelector");
});
}
why is bro pasting that code again
to look smart 🤓
im dumb
@wise hound what js app are u building actually
for(int year=0;year<mylife.length;i++){
if(mylife[year] instance of IsMiserable)
break;
}
BUILD STOPPED SUCCESFFULY ! (19 years)
Hey at least it doesn't include your current age
There is probably a mod incompatible with optifabric
Fabric should give quite detailed crash reports
In their own window
It does
that depends massively on what you want it to do
MERRY CHRISTMAS 🎄🎄🎄
idk either
MERRY CHRISTMAS 🎄🎄🎄
Yeah merry Christmas
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class ScriptEngineExample {
public static void main(String[] args) {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("python");
try {
engine.eval("print('Hello, Python!(From java, naturally ;))')");
} catch (ScriptException e) {
e.printStackTrace();
}
}
}
bruh moment
Java is universal language
That can execute javascript, python, ruby and php code with ScriptEngine
That sounds like a nightmare
Probably ought to use Graal instead of jython, if that's what you're using
Hello
Heya!
Looks confusing
Hello guys
are there getters and setters in c++ just like java?
Getters and setters are just particular types of method that belong to a class. Any language that supports object oriented programming (C++ does) will have the means to let you create getters and setters (among other methods) for a given class
Can I report a person named kgizzle for saying bad stuff in the skywars game mode
go to reports website for that
Hi
Thanks
😎👍
use discord_db;
SELECT password FROM users;
(its a joke naturally)
How to create Database-Logger in SQL:
CREATE DATABASE logger_db;
CREATE TABLE logger (id INTEGER PRIMARY KEY AUTO_INCREMENT, time DATETIME, log TEXT);
# insert data
INSERT INTO logger (time, log) VALUES ('2023-12-30 00:00:00', 'example log');
# select logs
SELECT time, log FROM logger;
# delete logs
DELETE FROM logger;
# drop table
DROP TABLE logger;
# drop database
DROP DATABASE logger_db;
for sure
@terse slate thanks for sharing your code here
Its just example codes lol
Wow
Use wormgpt for coding
Not the dark web version tho
be careful
There's always someone watching
I hope its a cool ass dragon

What does pointers do
Like okay, they point to an adress, they change the value stored in that adress etc but
What are they ultimately used on
Cpp, also
I have been having trouble understanding pointers and strings, for some reason
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
int x = time(0);
srand(x);
int count[6] = {0}; // Initialize an array to count occurrences of each number
for (int i = 0; i < 1000; i++) {
int result = rand() % 6 + 1; // Generate a random number between 1 and 6
count[result - 1]++; // Increment the count for the corresponding number
}
// Print the counts for each number
for (int i = 0; i < 6; i++) {
cout << "Number " << i + 1 << ": " << count[i] << " times" << endl;
}
return 0;
}
My latest code was this, a simple dice roller
Got help from chatgpt sure, but for the last part(printing the amount)
Cuz I wasn’t sure how to 
i do not C#
You are not using pointers in that snippet?
Oh haha looks good!
Strings are just arrays of characters, but since arrays are a bit tricky to work with sometimes in cpp, they build a non-primitive type around it. For example, you can easily pass a string to another function, while with arrays, you need to pass a pointer and the length of the array.
Pointers are a bit trickier. They are basically variables that hold an address in memory, not a value. If you increase a pointer by 1, it shifts 1 element the right, and to the left if you decrease it.
How many bytes it shift depends on what type the pointer is. If it's an int*, it will shift 4 bytes, since an int contains 4 bytes.
If you have an array of integers, you can go to the next element by adding 1 to the pointer. This is possible, because the elements in an array are stored next to each other.
You can convert a variable to a pointer and vice versa like this:
int var = 10;
int* pointer = &var; //an * behind a variable indicates that its a pointer, and the & operator returns the address of a var
int sameVar = *pointer; // the * operator converts an address back to a value
If you have a pointer ptr that points to the first element of an array, writing this:
array[4]
Is the same as:
*(ptr + 4)
Because ptr == &array[0]
@ivory flume ^^
Am I dumb or is it just confusing 😭
You use pointers because you don't want to pass an entire object through a function each time you call it. That's slow, and memory heavy
You also want to mutate stuff
myMassiveObject o = ...
doCoolStuff(o)
printf(o)
You'll probably want the o that you're printing to contain the changes from your function. Which doesn't happen if you pass by value, but does if you pass by pointer
Also yes, pointers may be confusing 😝
We had to make a bunch of questions where you mis match pass by pointer, reference and value in functions. And then print stuff. Makes it very clear what's happening
They're confusing when you first start learning them. They make sense as you play around with them
Yeah. I would very recommend just playing around with them! Doing is (one of) the best learning exercises for stuff like this
An important detail to add is that there is a difference in passing variables by value, reference and pointer.
Passing by **value **is very easy: You just copy the value of a var to another one and give that to a function. Whatever the function does with their variable, will not affect the original i.
int i = 10;
doSomething(i);
// i is still 10;
[...]
void doSomething(int j) {
j += 10;
}```
If you pass by reference (indicated by the symbol `&`, you pass the same variable to the function (so same value and same address), but it is not a pointer variable. The following code example **will **affect `i`:
```c++
int i = 10;
addTen(i);
// i is now 20
[...]
void addTen(int& j) { // the & makes sure we get the address as well
j += 10;
}
Lastly, passing by pointer passes only the address (so it is a pointer variable. You will have to dereference it in order to get the value:
int i = 10;
addTen(&i); // the & will make sure we are sending the address, not the value
// i is now 20
[...]
void addTen(int* j) { // parameter is a pointer, indicated by int*)
int value = *j; // dereferencing ( = converting to a normal variable again), j is the same as i now
value += 10;
}
I'll spend a few days understanding these topic, thank you all!
requires some low level knowledge of computers but should not be as complicated
try wathcing this https://www.youtube.com/watch?v=2ybLD6_2gKM
One of the hardest things for new programmers to learn is pointers. Whether its single use pointers, pointers to other pointers, pointers to structures, something about the concept drives new programmers crazy. The C programming languages is recognized as one of the most difficult programming languages to learn. The reason for this is the limitl...
Let us know when you don't understand anything
ohh interesant
Question
I'm so confused
i really need help
issues:
while(pirState==LOW){
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
lcd.clear();
noTone(buzzer);
delay(200);
}
sometimes happen sometimes don't
and when printSmokePercentage();
activates, the whole program stops working
@mellow glen people
I'm so stupid I can't figure this out 🙂
I'm only a Web developer so I know nothing :(
It's OK everyone has their strength
It might be useful to explain what you are trying to do, what happens and what not happens. This also seems more like an arduino (?) question than a programming question.
yeah arduino
Kinda am too tired of it now so I might explain tomorrow
If the loop is looping, I'd assume it doesn't like the while loop as it'll start several of these while loops after each other
@quasi oasis palombo give me rank
I cannot do that good sir
ask @cerulean oracle
Ok
or @honest heath
@cerulean oracle give me protocol
Youni wouldn’t know how to give a rank if you called him a stone
TRUE
You could call him a Falcon he still wouldn’t know
Or a multicraft
He’s just as expensive as a multicraft
good point
ok 😊
now youre on it, me too please.
sure thing 😊
You have famous rank now
<@&1101600672987754596>
Don't you mean <@&1101600672987754596> ?
ohhhhh my bad yeah i meant <@&1101600672987754596>
can't be <@&1101600672987754596> if you're offline
i know
<@&1101600672987754596>
😭
OMG famous
least famous gamer:
.
why you not dev anymore
i should be famous fr
ill let you know that i have 0 followers on twitter or x whatever its called
It's called twix now
😲 what a great name
totally not the name of some candy bar
None that I've ever heard of
exactly
xxxxx
twix is so yummy
yes twitter x x is yummy
What the hell is the <@&1101600672987754596> role
its for people that are <@&1101600672987754596>
Isn't that for partners😭
it's for people that are <@&1101600672987754596>
^^
Facts
My fame is fake
undercover mrbeast?!?!?
im the real mr beast 💪
nah bro ur the real mr bast
try doing the same thing when u have a higher rank
LMAOOOOO
hey, sorry I got banned for a macro in battle arena
F
Hamburger
The applications are closed, so you can't do anything about it.
there you go
lol
I use vim btw
tijme wat doe jij hier
Niks
hz speel je nog altijd mc
Nee
meme
There ya go @final bone
ummm, what does this channel have to do with cubecraft?
code and stuff
Just a fun little subcommunity! :)
cubecraft was programmed Mr duck
no way its andy
No way is it the #1 blockwars player? omg
can i get a signature
Ikr I have beautiful handwriting
yee
what do u do now bro
like in life or? 😂
yea bro! 💪
i spend most of my freetime at work
and i recently bought a scooter 🛵
been working on this for the past few weeks
atm only 50km/h
pop in a nitro boost rq
gonna try to bring it up to 70km/h soon 😂
Ill try
I remember my Mormon friend in school always used to roll up with a scooter
idk about there but here I think you can drive a scooter under 40mph at 16 and other things at 17
here only 45km/h is allowed
so he was first one to have a sick ride
and you can only drive them if you’re 16+ and got a scooter license
they are super strict here
yea I can imagine
police sometimes even puts your scooter on like a testing machine to test how fast it goes
ohhh really so it's not even just how fast you go it's the max speed
after 50+ they will take your scooter and you wont get it back
ye
some people build limiters in their scooters which they can turn off and on with their phone
well here you have to have a driving license to drive one
no matter the speed
quick make this conversation about programming
really neat stuff tho I've not learnt to drive yet because I just haven't had the need xd
well i always had
can't beat walking to work bro
i hate cycling to school at 7am
my school is 15km away from my house
ohh damn
😭
15km sounds rough on bike
in the summer we always take an extra shirt with us
when we arrive at school we swap t-shirts on the toilet
ye but normally i put my bag on the back of the bike
cuz steering with a full schoolbag at the front is quite heavy
ohh true yea
especially today with the snow its dangerous to do
i wish bikes were more common here they just seem so much better
when i arrived at school i was literally a snowman
there's literally only one person that I see using a bike when I'm going to work xd
here we have more bikes than people
no snow here :(
😂
I've never even had a bike lmao
what
here its a tradition to get a bike on your 4th birthday 😂
haha
Hi, question for all of you:
Singular or plural names for sql tables?
I don't believe that there is a standard convention
But I like plural as it sounds more natural in queries
Plural. A rule of thumb I was given in school was when it comes to naming things, make it as close to regular English as you reasonably can
plural for main tables and singular for pivots :)
hello
can i pls get tiktok rank tiktok name aagringe
applications are closed atm
Helper when?!!?!?!?!
30 february
W
that exists???
...
@shadow orbit
ip
Is this the chat to talk about one of the cubecraft marketplace items
Nah, talking about coding silly 😜
Damn I am banned there
how did you managed to do that
I wrote Norwegian
Russian version
Mod somehow thought it was bad word
Does cubecraft have the option to turn the msg from the server of in an other langues (i mean not english)cause its hard to understand every thing so fast on english
We currently don't support any other languages sorry
we are looking into solution for this in the future however
i have a gambling addiction 💀
🎰
There might be a mod or behavior pack that will do that, maybe I'll make one lol
Not sure if it's possible tho
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
for (int i = 0; i < argc; i++) {
cout << argv[i] << "\n";
}
}
argv - args array
argc - args count
Arrays is **** cuz needed int with value of args count
vectors better 🙂
Also i mean on the minecraft server(bedrock)
what even is this for
C++
This code mean how to use argc and argv
🙂
Guys, don't use std libraries:
#include <iostream>
#include <string>
and more, cuz you can include all this with only:
#include <bits/stdc++.h>
You cant use your own behaviour packs on a server
That is literally the std library
But if you want to create everything from scratch, I won't stop you
That's fine for learning and teaching, but a bad practice in real industry code.
If you only need iostream and string, you should include them individually instead of including the entire standard library.
However its comfortable 🙂
You use the namespace anyways in bigger programs, so you might as well use it for the standard lib
Sure and that's fine if you want to do it that way for learning.
I'm just saying, as somebody who writes code for a living, it is a bad practice to import more than you need.
ye I agree
cuz they just will don't know
which libraries needed to import
to use somewhat
hm
but for experienced coders
I think that isn't bad idea
An experienced programmer would not import bits/stdc++.h
They probably wouldn't even have using namespace std
int main(int argc, char* argv[]) {
for (int i = 0; i < argc; i++) {
std::cout << argv[i] << '\n';
}
return 0;
}
it’s comfortable for you, some connect std, some don’t
Not sure why the formatting is weird on mobile, but this is the industry equivalent of what you had
what
What I'm saying is that when it comes to performance, industry-level code doesn't take shortcuts.
"using namespace std" is a shortcut.
" #include <bits/stdc.h>" is a shortcut.
It's perfectly fine to use shortcuts when you're just learning code. But these things impact performance and compilation time. I understand that it's more convenient to use shortcuts and it's totally fine to do that when you're just learning and practicing.
Just friendly advice for if you get a job in the industry. Don't use shortcuts
It is also just to make it more obvious that you are using a function from the standard library, not one that you have implemented yourself.
Lvl 1. Ruby
puts "Hello World!"
Lvl. 5. Python
print("Hello World!")
Lvl. 100. C++
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
cout << "Hello World!\n";
}
Lvl. 100.000. Assembly
section .data
message db "Hello World!", 0x0a
len equ $ - msg
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, message
mov edx, len
int 0x80
mov eax, 1
xor ebx, ebx
int 0x80
Lvl. 1.000.000. Brain***k
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<+
+.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-
]<+.
Lvl. 1.000.000.000.000.000. Malbolge. Most hard programming language 👺💀☠️
=`#9]~67Y32Vx/4Rs+0No-&Jk"Fh}|Bcy?
`=*2]Kw9ooG4UUSO/@-ejc(:'8dc
I'd say that bf is actually easier that assembly
Ok
Morse code?
no, its not Morse code
its a hard programming language
Brain***k
Because it ****s the brain?
its really crazy programming language
that created for fun
lmao
my fav
💀
Do you use the lady one
*resource
U can use recourse packs, but not behaviour as it changes the game.
In case that wasn't already obvious
You suggested it yourself
@dusky fern can you run several minecraft accounts at the same time with the library you use? And does it require a GUI?
Like, several on the same PC at the same time
Yes, I can, and it doesnt req gui, but you can make one
I hope it wont get taken down by microsoft 🗿
Ah cool. I might look into it cause I need a bunch og accounts for testing something and you can only have one client open on the same pc lol
There is a way to duplicate mc and have diff accounts but its hard to control
There is "go" alternative witch is gophertunnel if you dont like js :p
Yeah idk. Just using the lib probably easier for me. They just need to join a server haha
Js one is bedrock-protocol
HAHAHA, yes I would very much rather use the go one
Js one might be easier because it has client implemented while gophertunnel doesnt but you can borrow code from bedrock tool it has all that :p
Oki I hope you will finish it 😋✅
c
import random
puan = 0
kackere = int(input("How many times should we do this?"))
for i in range(kackere):
x = random.randint(1,100)
y = random.randint(1,100)
xy = x + y
print(x , "+" , y)
cevap = int(input())
if cevap == xy:
print("Correct!")
puan = puan + 1
else:
print(xy)
print("The correct answer is count:" , puan)
Orginal is Turkish, but i translate for you.
Example, "puan" is "point" meaning in English.
And my English is a little bit bad
Even though i dont get it. Its impressive unlike my brain.
Why do you always talk about your brain being bad?
Who told you this lie?
idk isnt it normal?
It's not normal to insult yourself, no
yes its becuase if you use a questionare against me there is a high chance of a question about "do you hate urself?"
Do you?
yep
kk not in this chat
What this stuff looks like to me... Kuxckutticlfjfctjmkchkuctrckurckxrj
since when???
I'd be concerned if someone didn't ever insult themselves
but fr don't hate yourself
everyone is just as flawed but you don't see it that way
its being honest to yourself and not lying that you are better than you actually are
That is not at all the same thing
The code can a calcuation.
What is the problem?
But thanks for your answer.
This is a Python code
are you asking for help with it?
can some one tell me what the best tutorial is to learn programming or whatever you guys used
What is your goal? Do you want to make websites, little scripts, Minecraft mods or addons, ...?
Game developer
Then i'd recommend looking into Unity. It has a pretty steep learning curve, but there are endless possibilities
If you're going to go that hard into learning, it's better to learn unreal engine instead of unity
I don't think its wise to jump straight into C++ if you're starting to learn programming... But like u said, if he's going that hard into learning, it's worth a shot right?
C++ is a great first language imo. It makes all the other languages seem easier lmao
And C++ lets you have much more fine-tuned control than C# does so if they really want to get into optimizations, they have those options
Java is not a standard language for game development
I just installed UE5 with the intention of learning C++ today...
It greatly upsets me.
Oh I really wouldn't recommend learning both at the same time
Learn the basics of C++ first, then go use it to learn UE5
I'm already fairly familiar with UE4, so 5 looks familiar enough, made quite a few blueprint projects with it. I just wanted to see what C++ was like as I've never coded in it before.
It makes me feel the bad.
It gets a lot easier
UE5 code is very intricate compared to beginner tutorials. You'll get there, it just takes time
Well it doesn't help that the editor isn't picking up my changes from Visual Studio.
Spent all day trying to tweak one of the template games, but Unreal was not detecting any modified code files...
good luck i am writing my C++ exam tommorow
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<+
+.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-
]<+.
section .data
message db "Hello World!", 0x0a
len equ $ - msg
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, message
mov edx, len
int 0x80
mov eax, 1
xor ebx, ebx
int 0x80
Better than C++
malbolge is goated
It is an extension of javascript, so yes, it is bettr
Sheesh welp someone can program. Are you programming the discord or is it an app?
That is a program that just says Hello World
on Assembler 🙂
Assembler is a programming app?
Assembler is command language -_-
For CPU
For you but not for me
fun main() {
println("I used in android development");
}
package org.example;
public class Main {
public static void main(String[] args) {
System.out.println("I used in backend and bank systems");
}
}
I want to tell you, owner of Cube Craft, to bring back games like before 1.12
How do you these codes? They are intresting i wanna learn.
Its kotlin
I suggest starting with Python ->https://www.w3schools.com/python/python_intro.asp
cool!!!
I think go is better for start
Python: bots, neural networks, back-end
Golang: back-end, desktop
C++: desktop, gamedev
Java: back-end, android
C#: desktop, gamedev, back-end
Kotlin: android
Swift: ios
Hmmm
Python and C++
A beginner does not really care what it is used for. Python is easier to learn, and it can be used for a lot of tasks, even though it might not be the industries standard.
Besides, programming is a skill, so if you learn to think like a programmer, language differences will not be a problem
But transition from Python to C++ or Java 💀
Not bad at all, if you compare it with starting with c++
I started with Java
Me too, but i don't recommend that
Functional programming is a lot easier for beginners
And C++ isnt difficult for me
The thing with c++ is that it is difficult for everyone, since it has so many layers
But C++ does not have as many built-in capabilities as, for example, Java or Python :/
That's what generally makes it hard
Yeah
But it also provides the ability to customize your program to your needs
And he not have build tools with easier library connection
And memory control is also a new thing if you come from java
And all of these are a big pain
I think python is the best beginner language because the syntax is easiest to pick up for new coders. Then they can just focus more on learning the concepts that they can use in any other language they go on to learn
you think?
ok i will start from tommorow
welp i need to have a brain because you have all the knowledge
Hi I was starting to learn Java and I wanted to know if any1 would recommend me new Programs to try on Eclipse and Bluej
And I would also like to learn Minecraft Modding on both Java 'n' Bedrock
Eclipse for sure.
:v
Hii, i wanna learn about advanced commands in minecraft bedrock, can someone help me with that?
Needing a pro montage editor dm me
true
i know bit of python and arduino ide and java
No it expensive and hart
Like I'm not old enough to study 650606006050650 programming languages
Im just 13 lol
But I like robotics and programming
yeah
Like 50$
It's 7500000 iraqi dinars
Iraq doesn't have many robotics products
for example arduino nano: ~400 RUB (not expensive)
Yeah I bought it 2 days ago like 11000 dinars
15000 is not expensive
But...
raspberry Pi: ~5 000 RUB (expensive)
what is cc?
oh
Oh ok👍
I my English is good I just mispel stuff
lmao
Yes
oh my
???
I'm arabic
Bye
Me too
cool
yes
hi guys
minecraft is getting killed by an force
virus
DM me for more info we need help we need to do something
Bet
yoo
Nobody asked
nooo! not minecraft :(
hey there is a problem on cubecraft skyblock with crafting tables
dont spam ping
there's a bug and they're working to fix it rn
@minor roost Please do not spamtag other users :)
sorry
Bruh, I've only just noticed the description of this channel....
Its been there for ages 😅
Goes to show I've been getting bullied for so long
||
||
Wtf
apparently it's been there since the channel was made
3 years ago
lmao
Werent you a brons non?
technically i'm still bronze yes but i can't hide in the member roles anymore 😢
Is there a CubeCraft API?
No, there isn't @jolly palm
Will there ever be one? 👀
We don't have the developer resources to put towards implementing one, so there are no plans
Sad but understandable
They're also not public afaik :')
Mine is, and I think FreezeEngine's is as well
I tryed yours it doesn't seen to work for me
But looking at your profile, you'll probably want Freeze's as you're a Bedrock player - https://api.cc-data.ru/
c
Unfortunately it can only search for players in leaderboard.
You have your own website ooo
Interesting
In simple terms whats an API @spring tiger
"like a menu in a restaurant"
I love this ^
Oh ok XD
pro developer?
I'd like to order 1 Lyra
cubecraft I have an idea why you don't put survival mode like lifeboat but cube craft doesn't have a script and it's very good so you can put a survival mode
Riddled with hackers, hard to moderate, potentially dangerous to the servers as someone could find a glitch and crash it, go play on a private world instead
They left already
Damn
^^
^^
print(eval(input("enter example: ")))
ok where do i start if i wanna program ?
I'd recommend trying python
it's a good, not to complicated language
go on youtube and find a good tutorial
there are lots
or chose any language... it depends on what you want to do with programming
ok thanks
ty
depends on what u wanna make using the code
s-tier sign
"how "
fun hi(helo)
?
how to center a div
center it inside the body or inside another div?
though question
lmao
guys did u check mojang's new lib https://react-facet.mojang.com/ and is there any people dived into it
with css obviously.
Every programmer can relate...
im just wondering how the original post has 1 down vote, and the top reply 18k up votes
idk...
Hey @quiet arrow, I was wondering is it possible to add Cubepanion on to a modpack?
It requires LabyMod
So without it. It is not possible?
LabyMod does support the Fabric Mod Loader, so you can do it that way
Yes, it's written around the Laby Addon API. Not fabric
Can you elaborate? If I do it with the fabric mod loader it is possible?
If the mod pack you want to use, is all far Fabric, you can most likely load them along side LabyMod by using their Fabric Loader Addon
So basically I would bring the modpack to laby, right?
Ah, I see now thank you Fesa. 😊
I started with html, css and javascript.
My condolences
I started with paper🥺
How to make a stick in minecraft that summons lightning when right clicked?
I need help
What version are you on @lilac tundra
Hey can anyone help me?
I m 19yr old college student and wants to join cubecraft in near future as developer so how should i start to work on it.. like which skills i must have?
good luck and i think someone said something about needing to know actionscript
idk tho
me is noob
Me too
Make your own minigames
Yes?
My what and why?
theyre asking for your username in game
That doesn't really make sense because I've never played with them and they don't even know me
🤷♂️ theyre asking so idk why either
hello
there's a name tag stuck in the air after install health indecator plugin
how can i fix that
@magic rapids
That does not look like Cube
wut
huh
int palindrome = 12321;
String original = String.valueOf(palindrome);
String reverse = new StringBuilder(original).reverse().toString();
boolean isPalindrome = original.equals(reverse);
hmm
hi guys
i am really sad
i was like flying with elaytra in my survival world. i litrally beated minecraft got elaytra i had nethrite armour of full protection and just one mistake killed me. i just hate it... i was flying and i had to go to wc and so i gone and left my Minecraft open and when i came i was dead like i crashed to a mountain and falled from hiegth
mohjang plsss add an feauture that if the person is not near pc then pause game
by using camera sensing and ai and a lot tools
It seems you have encountered an ID 10 T error. Unfortunately, such errors can never be completely prevented. (You're on your own)
that seems like a very slow way to do it
hmm I agree
public static boolean isPalindrome(int i) {
return new StringBuilder(String.valueOf(i)).reverse().toString().equals(String.valueOf(i);
}
hmmm
in 1 line

Just putting the same code on one line won't change much of the speed :v
Unimer?
Converting to strings is really unnecessary, although it seems like the easiest solution.
I made this O(logN) solution for a problem the other day
int n = number;
int rev = 0;
while (n) {
rev = rev * 10 + n%10;
n /= 10;
}
return number == rev;
Excuse the poor readability; it was for a contest
'string'.toString().toString().toString()
String s ="string".repeat(5);
System.out.println(s);
stringstringstringstringstring
wow
piano man
status
i like it
And I respect you for that
hi
I smell div users in the chat
Does anyone know the value for the size of an enitiy in minecraft bedrock?
What do you mean with "the size of an entity"
Their hit box?
I mean the size of the appearance/ model of the enitiy
One block is one meter, so every pixel (in a normal sized texture pack) is 6.25 cm. You can just count pixels to get their heights.
Okay, thanks
Hello!
I was wondering, if player laggs and gets delayed hits, might their reach exceed 3.0 server side sometimes?
it definitely seems like it sometimes
cc @sweet barn
increased ping naturally gives you more reach in most situations yes
its most noticeable when the the laggy player is chasing someone
however the inverse can be true for other situations where that works in the other player's favour
While yes, I would like to know how it looks for the server, because there are "3 sides of the story" ie 3 povs
Server, player1, player2
you can't block all attacks that are >3 hits in distance because there needs to be some leeway accounting for ping
yea the impact of it still reaches the server
if you want to make some sort of anticheat you'll have to account in movement to determine whether that hit can make sense
so because of the ping and some desyncing for server some hits will look more than 3 blocks?
yes very often
of you blocked all those attacks, it would be technically "correct" but leads to a frustrating experience where players feel like their hits are not registering when they should be
I quess its hard to calculate reach even for low ping because some sort of mismatch might happen too + real reach is a vector from your camera to point on a hitbox of other player you look at and server cant calculate that perfectly due to innacurate and delayed head rot info
Yee
I think there should be a balance
I'd only block attacks that are at an unreasonable distance and log suspicious reach in some sort of reporting tools
I don't actually know how much ability there is to actually block attacks tho xD
I've seen pvp servers that kick you if your ping is too high
cheat codes? lol
thats why its easier to combo lock when ur in slightly higher ping (100ms~300ms) in games like ffa
Minecraft Java and Bedrock use a light based pvp system. The more direct contact your players POV has with a entity model, the more sufficient your pvp will be.
Essentially your player outputs 300+ lines pointing towards every direction, the more these lines connect with an entity, the more calculations that will happen, middle waring these calculations and setting a variable for accuracy or kb, can allow anticheat developers to do some seriously cool stuff. Take hypixel for example.
Simplest and most effect way to do these is with a private static variable in java.
hi
How to make a stick in minecraft so when I right click it summons a lightning on me
Are you playing on java or bedrock?
what is the equapurim triangle size of a piece of snow?
oh and can someone send me a diagram of a snowball?
Equapurim..?
What does equapurim mean?
i think its the volume of a entity
I have no clue what you are talking about :)
Oh, the dimensions of the bounding box of the snowball entity?
The collision box is 0.25 x 0 .25
What do you mean with diagram :p
like the specific colour codes and pixels in the entity (In this case a snowbal
Oh the texture
That one might be compromised
Your terminology was a bit odd, yes
But thanks for wasting my time
lol
😬
🥶
I mean, that's what discord is all about, right?
😭
i need assistance where it should redirect back to my homepage immediately after the marquee function finishes instead of being in a timer
so that it'll be compatible with most screen resolutions
actually using a marquee, so based :0
not sure why you have random p tags that don't do anything, you should be able to use gap, margin or padding
marquee is dead tho, you probably can't do it
look at mdn Web docs for marquee they have js alternatives u can copy
question
What was the font command that made very characters?
That continously change
Formatting codes (also known as color codes) add color and modifications to text in-game.
Text in Minecraft can be formatted with the section sign (§). In Bedrock Edition, the section sign can be used in signs, world names, book and quills, anvils and cartography tables (to rename items and maps), and in the chat input field (including in comman...
That's a helpful article, and yes it was the k thing
Thank you!
§k
does the change to a lot of command sntax in a recent snapshot have a big impact on the server?
The server is not written with commands, so no
is there a lower level api for example giving a player an item than the command syntax?
I always thought what you can do is limited by what commands are available, it's not like a minecraft server can edit client memory on a whim
@brisk badge
The server is built with plugins, written in Java. Commands are really the highest level of programming you can do within minecraft.
forgive my ignorance, but how would you achieve the above example without using the command api?
I've never done minecraft server stuff lol
I don't have much experience with plugins either 😄
You can look into scripting if you want to do some lower level programming for Minecraft Bedrock, with more possibilties
mfw the scripting is in typescript
that's actually insane
// Spawns a bunch of item stacks
import { ItemComponentTypes, ItemStack, Player } from '@minecraft/server';
import { MinecraftItemTypes, MinecraftEnchantmentTypes } from '@minecraft/vanilla-data';
function giveFireSword(player: Player) {
const ironFireSword = new ItemStack(MinecraftItemTypes.DiamondSword, 1);
const enchantments = ironFireSword?.getComponent(ItemComponentTypes.Enchantable);
if (enchantments) {
enchantments.addEnchantment({ type: MinecraftEnchantmentTypes.FireAspect, level: 1 });
}
const inventory = player.getComponent('minecraft:inventory');
if (inventory === undefined || inventory.container === undefined) {
return;
}
inventory.container.setItem(0, ironFireSword);
}
well I found it
Yeah, it's very powerful. Keep in mind that this not what the server development team uses, though.
Cubecraft definitely has the most insane system
thanks
I was looking at that bedrock dev wiki but I'm unlikely to get into that
it's interesting how much work goes into the apis and commands but the game gets hardly any survival features
fn main() {
println!("Hello World");
}
based
Paper isn't developed my Mojang
Arc<Box<Mutex<>>>
The Marketplace (and thus the creator features) is a big part of their income, so it makes sense


