#programming
1 messages ยท Page 26 of 1
Thanks, I'd rather go Elixir/Erlang
That's exactly my progress with Elixir so far 
gonna install PhpStorm rn lol
I'm lucky, I get all the JetBrains IDEs for free with the GitHub Student Developer Pack
ikr, big deal
PhpStorm 
oh nice
righty then, what shall we start with? just an empty project?
does PHP have things like build tools?
It is a scripting language, it doesn't need to be built
oh, very similar to Kotlin, nice
do we have things like SOLID in PHP?
actually PHP is a scripting language and it's not object-oriented so the answer to that is likely no
Yes, you can use it
actually, DigitalOcean's examples for SOLID are in PHP, so maybe
is it basically the law like it mostly is in OOP?
or is PHP a bit more flexible than that
You can do whatever you want, like in every other language
also, is allman really PHP's recommended style?
In computer programming, an indentation style is a convention governing the indentation of blocks of code to convey program structure. This article largely addresses the free-form languages, such as C and its descendants, but can be (and often is) applied to most other programming languages (especially those in the curly bracket family), where w...
that disgusting crap 
Ah, that one
Well, it is all in PHP-FIG recommendations
"recommendations" is the keyword
does PHP have the concept of immutability btw?
e.g. Java has final, which means that a variable's value can't be changed
No, there is only constant variable which is immutable
Indeed
anyone else good with node.js
maybe
just curious lol
So beautiful ๐คฎ

I may will download this font and I may will give it a try ๐ seems to be pretty 
any discord.js developers here?
๐คข
I do a bit ye
i figured it out, thanks
Discord.js seems so difficult compared to Discord.py
I guess people are always going to find their most used language the easiest...
Never tried discord.py but I've done discord.js makes no sense
its the other way around for djs users
What bot is used in #scs-updates and how does it work?
Discord.RSS, https://github.com/synzen/MonitoRSS
Discord RSS bot (formerly known as Discord.RSS) with customizable feeds. https://monitorss.xyz - synzen/MonitoRSS
Does anyone know which developer codes the tmp bots?
Wdym "which"?
I meant who are the main people involved
I should have phrased the question better, presumably there's a lot of teamwork throughout tmp.
going to depend on the bot you're talking about too
and possibly the questions you have
Botdottir is developed by ShawnCZek, Krashnz, with contributions from me and other retired developers.
Botranktir is developed by these lovely people: https://github.com/TruckersMP/botranktir/graphs/contributors
3v wink-wink
Other bots are 3rd party
๐
OK! 
I hadn't heard of Typescript before, but apparently it's just a variant of JS so that makes sense...
typescript is awesome for medium-to-large projects
type safety avoids so many easy to miss bugs
So it checks all possible inputs? Or is it analysis of the code itself?
In computer science, type safety is the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing data types for the program's constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point nu...
nothing to do with inputs or analysis of the code: just labels and ensuring the labels match
Oh, ok
so you can say, for example, that the first parameter to a function is an object with the property name that is a string, and then you can just safely assume that in the implementation without checking your callers
function greet(person) {
if (!person || !person.name) {
throw new Error("invalid person");
}
console.log(`Hello, ${person.name}`);
}
vs.
type Person = {
name: string;
}
// no additional checking required as long as --strictNullChecks present
function greet(person: Person) {
console.log(`Hello, ${person.name}`);
}
So the main purpose of this is to reduce bugs and speed up development?
reduce possible bugs down the line, makes it easier for IDE to highlight and suggest, and makes your code somewhat self documenting
especially useful when writing code that might be consumed by other devs or even projects
the types and method names alone cover the usage most of the time without having to read through comments or documentation
referring back to the example above, using typescript you don't need to know or check what person is supposed to be (is it the name as a string, an object with separate first and last names, or an object with just a combined name field? what are the fields called, if they exist?). You just make sure you have a Person and you're good to go.
anyone here got any good c# learning resources?
what level?
beginner\
if you already know another language, https://learnxinyminutes.com/docs/csharp/ might be interesting
there's also links to other learning resources at the end of it
would you recomend jetbrains rider as an IDE
(i have the student license for every single jetbrains IDE)
always used visual studio community/professional for .net and haven't felt a need for anything else, but I've heard good things about jetbrains software
Jetbrains Rider is nice, and worth trying. I find it nicer than visual studio
using System;
namespace ConsoleApp1
{
class Program
{
public static void Main(string[] args)
{
Console.Write("First Number: ");
int NumberOne = Convert.ToInt32(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("Second NUmber:");
int NumberTwo = Convert.ToInt32(Console.ReadLine());
int FinalResult = NumberOne + NumberTwo;
Console.WriteLine($"{NumberOne} + {NumberTwo} = {FinalResult}");
}
}
}
yay i made a calculator
oof
Lol
fun main() {
val scanner = Scanner(System.`in`)
println("First Number: ")
if (scanner.hasNext()) {
val firstNumber = scanner.nextInt()
println("Second Number:")
if (scanner.hasNext()) {
val secondNumber = scanner.nextInt()
println("The sum of the two number is ${firstNumber + secondNumber}")
}
}
}
```ez Kotlin calculator
"First Bumber" 

you don't need a Main method in .net 5, can get rid of all that boilerplate and unnecessary indentation in program entrypoints
Never had a chance to check out .NET 5 yet

probably set to an older version of .net
the latest Rider supports top level programs
it's specifically mentioned in the "What's New" section
โ
Subscribe: https://www.youtube.com/channel/UCqKmSt2n5m0W-avhdq4n8QA?sub_confirmation=1
โ
Instagram: https://www.instagram.com/compilerstuck
Visualization of 20 different Sorts as a Christmas Tree with sound.
You can Donate, if you want to support me: https://streamelements.com/compilerstuck/tip
This is totally not necessary, but helps me giv...

ah, always gotta love the sound of sorting algorithms at work lol
Anyone good at Discord.py?
Why isn't snow falling in the game?
Not really related to development, is it?
i updated rider and .net and rider still yells at me

I'm not on my computer atm, but I'll get back to you with a question!
does someone now how do i execute js file AND passing a variable to that file? from .php file
either set an environment variable for it or pass it as an argument in exec or whatever you use to invoke it
Open js file with env from php file? Excuse me?
no, passing in variables
kind of curious what the purpose of executing a js file from php is in the first place
I mean, he hasn't mentioned any Node.js, so I assume he wants to pass variables to JS file in frontend
oh, I guess that's another way to look at it
Who even uses PHP and Node.js as a backend at the same project?
needs clarification
@orchid bolt please clarify
sometimes people want to use some js only library
i figured it out other way but i wanted to "inject" kode inside discord bot running on node.js
to add roles after verification
but figured it other way
you'd want to use proper IPC methods for that
what
In computer science, inter-process communication or interprocess communication (IPC) refers specifically to the mechanisms an operating system provides to allow the processes to manage shared data. Typically, applications can use IPC, categorized as clients and servers, where the client requests data and the server responds to client requests. M...
ooooh sweet
@slim pendant I'm not sure why this is happening
it was working correctly and now some standard syntax is causing issues
node version?
how do I check that?
node -v
why would you want his node version for a python project?
becasue I assume too much 
can you show me more of your code above
Next time give a context
syntax is correct, but i guess it comes from something above it
it's valid js syntax and a valid js error
Well, embed=embed kinda stinks as JS code
so is it for python and if somebody asks if somebody is good with discord.py i assume its python not js
fair point, but Discord doesn't have threads and the previous context from 2 days ago was lost on me
indeed
still, my bad to assume
We have Replies already, so use it 

I've just fixed it
turns out I forgot some () but the error was detected in the line below
Thank you everyone for your help
Heyho...
I want to try me in C#, it's basically Java, just from MS.
So far so good, which IDE is the best one for it?
visual studio community (or professional/enterprise depending on your needs) and jetbrains rider are the go-to ones for it
alright, will take a look onto it - and I just need a basic thing, don't want to do anything big 
alright, will take a look onto it - and I just need a basic thing, don't want to do anything big 
VS community is free so easy enough to get started with
okay ^^ will take a look onto VS Community later the day (it's 30 mins past midnight here) 
You can get a plugin for Discord Rich Presence too, which is pretty nice!
Well, it's indeed a nice-to-have but gladly not-a-need-to-have ๐
It does encourage you to name your projects properly though ๐
Hello, im looking for one or more contributor(s) for the project truckersmp.ts (https://github.com/iraizo/truckersmp.ts), due to my personal time i cannot work on it, the offical truckersmp API has already been implemented, only trucky's API is left.
I wonder what is the reason to merge TruckersMP and Trucky in one lib
You'll need to update it soon anyway 
New partners? 
You'll see soonโข๏ธ 

Useless PHPStorm plugins ๐
adding about 200 lines doesent make sense to make it into a second lib
is there going to be an ping or something where i can see when it updates?
It will be on our social media and official website
what will be changed? Because I will implement it soon into my bot
so I can know, if I should wait or not
You won't be able to add it to your bot right away. It will be at the end of January 
I meant the changes... not that I will add it in a few days and then I have to update it again
You know
I hate doublework somehow ๐
It's a new feature. The current thing won't change :p
All I can say is it will be a new feature on the website 

Phase 1 is the new feature and Phase 2 will be the feature connected to other system of our site 
I guess it's a VTC thing :p
Not at the base 

Would probably be a good thing to add to a bot on phase 2 

It's something for the community 
I will look forward to the new feature ^^
Not useless, it's the best
uhm, where can I find the API and their docs? because https://truckersmp.com/api doesn't work for me 
(TruckersMP Api obv)
Ahhh ^^ thanks 
interesting.
Hi all. Hope everyone is doing ok? Any web developers here? I'm coding a website, currently a location map showing where in the world my data centers are but I think I missed something and need help. I got the blue dots where I need them but there's a black dot next to them and I can't seem to get rid of the black dot. I've tried everything I can think of
What framework do you use for the map?
My main website is using bootstrap 4 ๐
Are those locations predefined or get requested via API?
I've had to manually enter them for the time being in HTML and some CSS
Can you show the code by any chance?
What's in map-dark.svg?
It's an empty map
So, it is a li standard formatting in Bootstrap, use div or span
Or that one, I just don't think it is a proper usage for lists
Ahh ok, thank you
it's not really a good usage for maps aswell
use leaflet + custom markers
and will be a lot better
I don't think it is meant to be interactive in the same way, so that's overkill
Ohh ok
dont need to be interactive, can block any interaction like dragging or panning
Stll, overkill. You can just get away with svg canvas.
only, leaflet with OSM + custom marker, 10 lines of code
i guess if that map is responsible with absolute position
i think not..
It definitely isn't.
so leaflet is :D
Nasty af
Sorry, didn't mean to cause an argument haha
That's not an argument.
Honestly, I'm open to ideas, be nice ๐ - I've never coded a mapped location thing before so this bit is new to me lol
imho, with a real map system like OSM and leaflet, position markers is really easy and looks better
What's OSM?
is responsive, markers could be added at runtime or with animations, can open tooltips and so on
Yeah, just +1 JS file
I mean, this exact integration won't benefit from that, so yeah ๐
Btw, cache partitioning will be among us pretty soon, so it might be worrying.
add also a css file :D
with gigabits connections now we are worried about some kb more to download
I've personally stopped to use cdnjs or similar, using webpack is all embedded in my js pack
and then there is Cloudflare and is cache
In a grand scheme of things, it is really beneficial to not bring unused or useless dependencies to frontend.
imo
I'm thinking of putting my website behind CloudFlare but not sure if the free plan includes DDoS protection which I need lol
google pagerank intensifies
it does. but not only
who says using another js more you are bringing to frontend something you don't need? if it's there, it's why you are using it
I mean, it is like using jQuery just for the simple selectors, when you can just use plain JavaScript.
Question for J-M: are there currently any plans to add custom roles to the TMP Events system similar to the current VTC system? Eg. The event organisers could be assigned an Event Organiser tag or something, so that people would know where to direct their questions to. Also, is there ever going to be a chat board , or is this already covered by the forum?
There are no plans for custom roles at the moment.
Yes, there are plans for some kind of communication on the page itself but this is still being planned.
https://tailwindcss.com/ is really awesome 
yeah, tailwind is honestly one of the best css frameworks i've used
yeah, my friend introduced it to me after i used bootstrap in 2020, now its probaly my favorite css framework, i can use it for anything, use postcss to strip any contents i dont need automatically and go ahead
it's something you really need to get used to, since there are no "ready to go" components compared to bootstrap e.g.
but when you get used to it, it's super nice
yeah, it takes a "little more skill" but also rewards you with an faster loading site and general better knowledge of css
If you want prebuilt Tailwind components then there is Tailwind UI, but it does cost a bit ๐
oh damn those look neat, but im pretty sure you can rebuild those in ~10 minutes if you want to
Some of them are free and open anyway like the buttons, but some are a bit more complex
Something like this requires a bit more work to build on your own because of the way it scrolls and also handling it on mobile (unfortunately you can't view the scrolling in the preview) https://tailwindui.com/components/application-ui/page-examples/detail-screens#component-ad515de6435ba177e823a5f823a44ff5
oh yeah
ye, i bought tailwind ui ~0.5 months ago
totally worth it imo, can save you a lot of time creating components
I want your salary ๐

i mean, if you think about the price, it's 209eur for a lifetime license
not that expensive
I am not used to see Ratcho as RTM - but what is Tailwind?
Has it something to do with Webdevelopment? 
It's a CSS framework
So Webdevelopment ๐ I am just too stupid for that lol
webdev is easy!
hm everyone has their own skills i guess, i never understood java lmao
Indeed - I never was able to do something with webdevelopment... Don't understand anything and I often tried it
once I knew how I list some entries from MariaDB with PHP
but nothing more 
ever tried something like codecademy? If you're interested in learning webdev, that's a pretty good starting point
I did ^^ and they really have good tutorials, indeed
but I can't work with that... is overcomplicated for me
so I stay with Java and everything'S fine
I will try out soon C# as this is Java but just from Microsoft basically
I'll just stay cozy with Laravel/PHP 
been using it for so many years now, never felt the need to learn anything new
Can say the same with Java ^^
Coding with it since 2017
oop... soon I am coding in it 4 years lol
nice, i've been using laravel since about 2016-2017ish as well if i remember correctly

scrolled through the code of my first project not too long ago 
it was bad
and it was even used on production for a irl event. my god.
Same for me ๐ I thought which Idiot did that ๐ then figured it out, the author was me
I never felt that sad xD
yeah i know that feeling
That look nice
I can feel that xD
This may or may not actually be me ๐
Happy New Major Release, fellow coders!
it will be me in 1h 55m 
I like the new developer roles. It's nice to have a better insight into who's primary involved in what.
On a side note, is there a way to use the tmp api in python?
Well, write your own wrapper or use a JSON lib to decode the endpoint responses.
Are there any resources you'd recommend for writing a wrapper in python?
I am a PHP/JS guy, so 
OK then, thanks for your help. I'll look into that tomorrow and ask for help here if I need it! ๐
Looking good ๐ ๐

Has anyone used https://github.com/shardick/etcars-node-client before? I'm able to capture the data via
etcars.on('data', function(data) {
console.log(data);
});
But I'm looking to capture a single job for the tracker, and I'm unsure of what to do
I can see JOB STARTED, but is there a way to 'listen' for that JSON via JS?
Well, you check the JSON for that data each time data is fired
@raw notch
it depends on what you want to achieve. ETCars is used from open source VTRPC, for example
but things like Trucky logit Trucksbook SpedV are based on telemetry plugins
i mean, a job logger should be a telemetry plugin. distribute nodejs is a pain
seems fair
then you can compile in an exe with nexe
I'll cross that bridge later lol
I would say the only thing with using this is that the data could also be easily faked
It's taking data directly from ETCars though?
Trucksbook uses memory mapped file and people cheat all the time :D
Guess we'll just have to make all tracker jobs manual approval then anyway
it's not so easy fake that data or do a "man in the middle" attack.. this need a certain type of knowledge
if you are doing a tracker for your vtc, this approach is good enough
It's more a learning experience anyway, it's teaching me a lot โค๏ธ
yea, i can imagined. don't worry about security at this point
I've used that node client for etcars for a logger before, it did the job and it's not absolutely awful but it's definitely not my favourite
Won't be using it for the next one, that's for sure haha
Finally got there โค๏ธ
lol at this point if it did the job thats what I wanna hear xD
yeah absolutely lol
Just noticed yall updated your api to send the group hex colour in the api for the https://api.truckersmp.com/v2/player/{id} thank you so much โค๏ธโค๏ธ
#programming message referencing a conversation from the beginning of last year
satisfying uh?
You should try using Typescript! ๐
Is there any command to type in the console to restart TruckersMP?
No
Alt-F4 should do the trick 
@mossy cloud how's it going with ETCars? 
Really well thanks ๐
Hard bits are done, it's logging to both discord and database correctly ๐
Just now looking at API Authentication with header keys to make sure users are only submitting jobs for themselves lol
Using https://lumen.laravel.com/ for a mini-framework as I don't want this to bloat the main web app ๐
Lumen - The Stunningly Fast PHP Micro-Framework By Laravel
Ah, that's nice yeah
I was looking into ETCars as well, so keep me up to date ๐
Interested in hearing if it's worth using
Will do mate
ETCars is great to use.
I've personally used ETCars since spring 2018.
@mossy cloud You made an excellent choice by using ETCars.
It's going very well, almost ready to release our first version ^-^
Nice
Mariadb as database ?
MySQL :)
For the new events system, I received a message that I was already attending an event at that time, however it didn't actually say which event was conflicting. Is this a bug or an upcoming feature or was it because I was on mobile?
This is not an appropriate chat for those things, you'd better ask on forum or in Support.
The real question is there or will there be a public api for the events system?
afaik yes
Does anyone know of any resources for getting a live map? I can save the live data to database without issue, but I'd like to get a live map of VTC drivers
What do you mean by "getting a live map"?
the real problem is not generate the live map but convert the map coordinates to in-game coordinates and viceversa
https://map.vivatrucks.com/ets2.html
https://map.primevtc.com/ets2
These two VTCs seem to share the same map software, not sure what it is ๐
Ah cheers
but it's not updated, missing latest dlc
Oh
to generate the live map, updated, look at ts-map on github
but it's "only" a tile generator
Wish I could make something like that but I just use VTRPC-CE from Trucky
for my VTC

forked the vtrpc?
I tried VTRPC i think but didn't work out
Well cloned it and made a lot of changes lol
vtrpc-ce is more straightforward
it's not a tracker, indeed
Yeah ik, just saying I got mine to work as one app which is what we want :P
Not really any tutorials on how to customize VTRPC so i can try it
If you just try to find tutorials on everything you won't get better, just try things out, see what works ^-^
What is VTRPC?
Discord Rich Presence system for ETS2 and TMP. You can find out more here: https://truckyapp.com/vtrpc-community-edition/
Thanks!
Im thinking about making a tracker for my own VTC but that will take some time since i dont have much experience with programming...
This isn't a tracker.
Yeah, Im aware of that
It only does the Discord Rich Presence, although you could combine it with VTLog if you wanted something like that.
I was just saying ๐
Vtlog + Trucky Overlay is the virtual trucking swiss knife everyone should have :D
No offence to you but I'd rather have something more complex, but custom :)
But yeah Trucky overlay is great :)
sure no offence. but not everyone could code. so we just build tools for them ;)
Fair point ^-^

c++ is a scary world
Haha
made a quick discord rss/atom feed "bot" controlled from a web ui 
Nice!
If I can give some small constructive feedback, maybe try to improve the web ui a bit more. Buttons don't have (or have very basic) styling currently, and the input fields look a little bit plain. Maybe try to add a small shadow e.g.
Simple things like that can make it look a whole lot better imo ๐
oooh finally after 3 days radio streaming in overlay is integrated with keyboard media controls and update the current song title directly from the Shoutcast metadata
Ooooo nicee
https://files.httpreq.club/TtTjnBT32f1BoASq got my workspace setup again, time to update the library
i will probaly remove the trucky client since its not really that useful
does anyone know how to get jnto property are thingy for wifi... so i can have access to almost anything and edit a lot of crap with my wifi?
Generally, the IP will be printed on the back or underside of the router, with the admin password (and potentially username).
You should just be able to log in with those details.
open command prompt and type in "ipconfig /all", now look for the gateway-address.
if you paste the gateway-address into your web browser, you will get to the router login screen
does anyone know what devops is?
kinda..
I was thinking developer of operations or something
is a mythological creature
no..
"operations" are intended in this case as deploy, continuos deployment, continuos integrations and so on
is not really a person in particular, is a technique
sounds logical
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary with Agile software development; several DevOps aspects came from Agile methodology.
I just realised how easy it is to make a live map foe my vtc website xD
i went to the github page and found out that all you need to do is put your VTC ID in the link
Is there any way to run ETS2/ATS in the background without muting the game and pausing all inputs?
apparently windowed mode works according to https://steamcommunity.com/app/227300/discussions/0/458607699616811201/
Nope.
without muting the game and pausing all inputs
@royal quiver I'd imagine he's talking about vtlog's online map. I dont know of any other map thats out there with the same functionality.
the only thing I could think of would be using a VM
if you passed through your gpu, performance wouldn't be too bad either
That's too much 
hey, does anyone got a discord bot that has working code to get all the information off the server info api and send it all in a message. I can get it to work and print out the stuff in the console, but it doesnt work when i want the bot to send it as a message
Do you mean such a message?
i mean on the TMP servers
In game? Doubt it.
You mean the TMP API and printing some Infos in such an Embed?
You can type /server in the in-game chat to identify the details about the server, and I'm sure there's probably a way to do it with the api.
TruckersMP has no in-game connections with Discord.
I think they want to pull info about the TMP servers off the API and post it in a message in their discord and not in-game

I am currently looking into Trucky API and also TMP API.... when doing a player lookup, both want the TMP ID... so far so good, but how can Trucky use a name to get player?
Like I want to do [p]truckersmp user Maurice Bailey and not [p]truckersmp user 2694641 
As both want an Integer and not a String
is there any possibility to do a workaround 
In TruckersMP, there is no public API to search by a player name.
@shadow marsh magic ๐

exactly, what you need?
well, I just want to put that in my bot so I also can search by names and not their ID - basically I just want a player and serverlookup
Anyone know how to get Atom to show in Discord activity? I've gone through the settings and tried installing an Atom extension for Discord but nothing I tried seems to work lol
do you mean a Discord Rich Presence or just a playing Atom?
This looks like a simple solution https://atom.io/packages/atom-discord
I just want it to be able to come up like it does when someones using phpstorm for example lol even just playing "Atom Editor".
I tried that extension buddy and it doesn't seem to work for me :/
Go to Settings / Game Activity and press add a game ๐
If you just want the "playing Atom Editor"
I tried that buddy but for some reason it's wanting me to show one file at a time i.e. I don't wanna show files, I just want Atom lol
Add Atom in Discord to your games, so it will show that you are in Atom but not, what you are doing currently
why even use atom
i mean if its all about a cleaner preference theres nvim, vsc
true, 300 database queries with 200 switch statements
oh welp.... that is much lol
overexaggeration much
Only 300 queries? Noob, i have at least 400 per page load 
@foggy osprey You dont need to store every character of the hashed password in a separate table ya know ๐ 
lol
We dont use passwords lol
Just use md5, what could go wrong 
Somewhere a developer is having a panic attack rn reading this haha
And then I'm just sitting here brain dead
Passwords? For the Phoenix admin panel, there just is a password
It's stored in the js
And being validated with an if input === password

hello i have using a lot of beacons but with out using a save edit did the game moderator has a reason to ban me
?
What has that to do with Development 
are you a developper ?
No? I am just a patron like you
but I don't get it what beacons from ETS2 has something to do with DEVELOPMENT....
so you are just a simple user like me i didnt talk to you

Yes I am "just" an user
But still, what has Beacons from the Game to do with programming?
sorry bro thats what you want
What does save editing beacons have to do with development? xD
it uses a text editor, so I guess that's cOdInG
xD
In just think the guy's desperate to get unbanned ๐คทโโ๏ธ
He just have to respect save editing rules ::
yep
I tried today to implement reaction roles by myself in my bot - so far, it's much work, but it's basically working on the first try
currently the addrole command is working and the reactadd and reactremove listeners - now I will implement the removerole and togglerole (so just add but not removeable)
Well done ๐
thanks 
I might give that a shot today aswell
For now I've done a command to give and remove a role
If I want to build a command in Python to check whether anyone from a list of tmpIDs is online how would I do that?
There is no public API on TruckersMP map
@royal quiver You can contact Krashnz on the forums for the map API data afaik ๐
Thanks for the suggestion! I've just sent them a message. ๐
Im gonna try to make a database with sqlite today
so i have a command which will allow me to input data
lets see how it goes
Use Trucky API
You're going to have that written on your gravestone ๐
so you wont have to worry about enormous API response from live map, caching and whatever ๐
with location resolution and server details: https://api.truckyapp.com/v2/map/onlineList?ids=3804964,3567535
i should write something else... but.. also that is not bad ๐
how do I use the trucky api in python?
hi to you say polish
polish
jestem sorry
English only please @winged snow
no wrapper made for python yet?
Getting into web development what would be the best framework to start with. I planning on creating APIโs later down the road so i want something that would work well
Laravel is a nice framework if you want to get into PHP
Alrighty will give that a look. Any good resources for learning php?
There's a lot of documentation here:
https://laravel.com/
The syntax it self isn't that hard in PHP. If you used other languages you'll get a hang of it pretty fast
Alrighty cool! I am familiar with node js. My main goal is the get my website and discord bot to be able to interact with eachother
I'm sure you can build an API in Node js. I've never used Node JS personally tho 
Like being able to type a message on the website then the message is sent via discord bot but yeah i will have to look into it
Thanks again
You should look into websocket
websockets with socket.io and discordbot with discordjs and commando.
or, you can integrate an express application to your nodejs bot and send API calls from the website directly from the bot.
I personally use websockets for TruckyBot and it's quite easy
@graceful belfry You can also have a look over at laracasts. There is a whole series. Called Laravel from scratch (Or fimiliar at least)
Thanks for all of the help guys!!
what would you recommend to learn python coding?
Having some issues installing laravel, Anytime i run php artisan serve it just tells me the Mcrypt extension is missing, I suspect that my versions of laravel and php are incompatible with each other. I am running the latest version of PHP, having a hard time trying to figure out what version of laravel i am running though
You need to install or activate phpXXX-mcrypt extension.
Latest Laravel version is 8.x
Youtube tutorials or just get an IDE and read the libraries. Having a clear end goal would really help to motivate you.
ive got help with python via visual studio code lemme send a pic
when i do a code and then press โrunโ
it shows those yellow wordings and useless white wording... in the terminal,..
how can this be fixed?
like i just want to see if the code worked
so i just needed to see โhelloโ and the 2nd line i only needed to see the code i ran and then โsyntaxerror etc etcโ
not the name of my files or anything...
guys?
@ember canyon quotation marks are different in the print
no no no
i mean like
wait lemme higlihht
it
this is what i dont need
the higlighted parts
part*
i just want the answer after running it, not what file it is in...
Good morning I have developed a UCP "User Control Panel" Is someone interested and would like to have it? Greetings Mo1993
https://easyupload.io/q2v4za README and LICENSE are included.
i need help with the following
I mean
cmon man... im only new at python... i strted it like 2 hours ago:..
oh did i just ping him?
oh crap
im hetting banned
I mean, you need to study in order to learn smth
... grok learning is what im using to study...
also that code kinda didnt work...
top one is mine
i copied the code from what he gave me
Change print() output to meet the requirements
this one
wait...
change what?
the ()?
pls dont judge...
like i only started like 2 hours ago
im still learning
i suggest you watch a tutorial to learn the basics first
omg lol
so grok learning is mainly for school
it is hoghly recommend
so just do all the tasks
and when i was at school i used it for a different language and i learnt it quick
yes sometimes u get stuck like i a@
but after spending a while mucking around with the code
you find what your problem was and say โahhh u idiot... thats my problem?? lolโ
sooo... i looked it up roght
this was the answer
wow
just wow
@ember canyon You are literally asking for the answers to an educational website. Thats not how you learn at all. If you followed all the steps before that task you would have learnt everything you needed to do that question on your own, thats how these learning sites work.
We in this channel are not teachers, thats why we tell you to go watch a video. None of us are here to teach, and some of us quite frankly get a lot of people asking similar questions and get a bit pissed of at it at times.
The best way to learn any kind of programming language on your own is to use a learning site like you are properly (by completing ALL the previous tasks) and find some educational videos that teach you the basics. If you need a person to actually teach you, then this is not the right place to ask for that. You would need to go to a service where you most likely have to pay for that. There might be some communities around where they do it for free, but thats not here.
We're not here to teach, we are here to chat/discuss programming
sorry ๐ฆ
i wont ask for anymore hwelp
You are not supposed to find it, you are supposed to create it yourself out of what you learnt in the previous steps
no i ment tried to find the previous step
Combining the different lessons of the steps into one solution that is the answer
allow me to explain it
just hang on for a moment
look at this
what cj showed was
yes it shows the answer however
this is the actual answer
bit different from the one cj sent
but its all g
i got it figured out
thx cj
It literally combines previous lessons together.
Ugh...
Tell you what
It's not the first time I've accidentally missed out two letters in my code
And it certainly won't be the last
๐ ๐
GG
May I suggest maybe putting TMP servers behind cloudflare or something? Would make is extremely difficult for the saddos DDoSing your servers
you cant. CF supports only http\https reverse proxy, so 80 and 443
They do support more than that. I've seen it done
you cannot proxy different protocols, such as simple TCP/IP, ssh or ftp
You can, i've seen numerous companies put game servers behind cloudflare
because probably they are reachable via port 80
Deffo not reachable with port 80, that's too easy for hackers
Big multi billion dollar game companies rely on cloudflare for their servers. You just need to contact them and work with them but it can be done
"multi bilion dollar" exactly ๐
Cloudflare has a service called Spectrum which might be what youโre suggesting, but itโs not for every day customers I believe https://www.cloudflare.com/products/cloudflare-spectrum
CF has many many many other paid services, some of them are very expensive, and you need CF Enterprise, and it's starting from 3k$-5k$ monthly, paid service billing apart
They also work with businesses and the the gaming community but I think for that you have to reach out to them and discuss it in more detail
I mean for spectrum you have to contact sales which automatically means youโll pay the big bucks ๐
Spectrum is EXTREMELY pricey
Yes but you have to admit it's worth it to hugely reduce the DDoS attacks
You can't expect them to run such a service for free. Obviously you gotta pay something, it costs them a ton of money and time to run such a service
Yeah, but where should TruckersMP take this money?
noone in the team has so much money to spend it on that, as they all are working voluntary... that's not a company in here AFAIK
and noone is shitting out money
$1 per gigabyte ๐ https://support.cloudflare.com/hc/en-us/articles/360041721872-Billing-for-Spectrum
Donations, increased patreon merch, website advert banners etc. People love TMP enough they'll be happy to help support
other companies, like Kaspersky, offer anti ddos tunnels but you have to control your IP subnet, have particular firewall configurations etc
and a part this, we are talking however about a monthly price of 3-5k$ per month
only to maintain this mechanism alive, then, there are bills during ddos for extra traffic and such
Welp.... how many GB/TB/PB went thru the servers in 2020? 
Well excuse me for trying to help and offer good practical solutions. Next time i'll stay quiet ๐
there are dreams and expectations, then there is reality

Listen man, it's good to discuss things, but clearly by trying to help i've triggered a nerve and now you're being all pissy with me
I'm gonna go. Too early for this. Next I won't bother trying to help
you are talking with someone has convinced some years ago his CTO to pay roughly 7k$ per month for two combined ddos protection while working at an ecommerce. After 2 weeks of continuos ddos putting offline the whole site and losing more than 7k$ money, it's easy to convince someone ๐
so simply running costs have to be considered in relation to another economic benefit. It's the old but fashoned cost\opportunity. If someone have to pay k$ to mantain a service alive, means he's getting more of those money from that service
I'm not trying to convince anyone. I'm trying to offer the best realistic and most practible solutions to help reduce the attacks.
All i'm trying to do here is help
ok.. but, it's not a realistic solution ๐
My company will be launching next month, one of my services is dedicated servers. I offer an enterprise DDoS solution for an extra ยฃ20 a month but that only covers up to 1Tbps DDoS protection

Basic protection is only 5Gbps so for a gaming server, i'm not sure if it'd be enough for TMP as I don't know how strong the DDoS atttacks have been as i'm not staff lol
Sorry I meant this month on 31st January. I'm still properly waking up lol
Just to give you a little idea about numbers, one of our game servers used around 50TB of bandwidth last month
that's the thing, TMP is not profit-oriented so at this rate the only ones losing money are the attackers.
I used to have a (small) TS3 server that would report to the server list and because of that alone was targeted for no specific reason. But my hoster has a free DDoS protection (they recently upgraded it to 2 Tbps, but it was lower back then) that starts rerouting traffic through their filter as soon as they notice the attack (which results in an actual downtime of 1 minute or so). I mean the attacks were probably insignificant compared to what TMP is getting because there was really no reason for the attacks, but nevertheless it was quite nice to see them fail again and again ๐
Dang that's a lot of bandwidth
My current servers offer the following bandwidth:
Outbound : 100TB
Inbound Unmetered (basically no bandwidth limits). I'm still in the process of developing the website and still adding the full range of servers to the website but I am more than happy to discuss this further if the TMP team are interested? I'd love to help any way I can.
I'm not trying to promote myself by the way, I'm just trying to help TMP ๐
It is traffic, not bandwidth
True but they are built for really high traffic websites
well I say websites could be anything really but mainly websites lol
Same as I say, there's still a lot to be added to the unfinished website yet but I'm more than happy to DM you with a link so you can get a rough idea
High traffic value doesn't mean you can actually process it
It is just a value
What will be capped first when DDoSed? CPU or network?
I totally hear you buddy but the servers are built for high traffic and high usage on day to day basis. They aren't built for every day things such as a basic website or reselling for example. The servers are monitored 24/7 with multiple systems in place but if the worst came to worst for example it would more likely be the CPU in all honesty but part of the DDoS mitigation we wouldn't let it get to that point, the minute it gets close to throttling, we'd already be in the process of migrating and mitigating the attack
Sorry I'm not great at explaining things, that's my fault but basically we have network hardware and cloud hypervisors with a rapid, pretty much instant failover so the traffic really wouldn't be an issue in all honesty
That's not an issues when you can pay for it 
As for TruckersMP, you cannot just migrate a gameserver to another instance, because we are working on a bare metal iirc.
Yeahh, that's understandable and I agree with you. I really do but you would have your own seperate dedicated server. The whole server would be 100% yours. There's no sharing or piggy backing off shared servers.
Yeah
Cloudflare whilst works well, doesn't always work successfully all the time 
Which language do you give priority to in web programming? (General)
I use Microsoft Small Basic for web programming 
Language priority is based on your skill and experience. These days, HTML and CSS are the only basic things in web. JS apps can be replaced by WebAssembly.
For a backend, you have +100500 various languages, frameworks and engines.
If TMP used spectrum, theyโd be looking at $50k a month just for one server ๐
Ouch
Yeah
tmp would need a lot more patrons
or just include shocking amounts of advertising and tracking
@wooden glade you could give a server for free to TruckersMP in exchange of advertising ๐
Who earns that much in a year 
Depends on the country you live in
Well hunny - my mom earns a bit more than that though - it'S quite average in AT ๐
i know someone..
Most people here afaik are in 30-40k 
The average salary in the UK is a little over ยฃ30k 
I would say classify as sector first
Some are at a average of 20k, whereas some jobs are at a average of 70k
the average of something is always related to similar ones :D
People who live in posh areas like Knightsbridge have money
Or anywhere south 
Houses are so much more expensive down here when compared to up north
So up north, a town with houses that are at a 300k average is good?
So a 700k detached house is good?
Let me go on Rightmove then
Permission ungranted because Iโm driving and texting in game
I would love to but unable to at this time, I'll be more than happy to once I've started pulling in really good profits ๐
[This post is a โbehind the scenesโ look at the tech that makes up the X-Plane massive multiplayer (MMO) server. Itโs only going to be of interest to programming nerdsโthere are no takeaways here for plugin devs or sim pilots.] In mid-2020, we launched massive multiplayer on X-Plane Mobile. This broke a lot of new [โฆ]
Time for a new TMP server in Elixir then, with their open source RakNet implementation? ๐
Can't say I haven't been wanting to make a better multithreaded/multi-node server implementation of the TMP server, both before and after I left the team.
It would certainly be an interesting challenge, though I don't think I'd pick Elixir for it
I'm still waiting for a MMO with a server with > 10.000 Slots
but that will probably and sadly never happen
10,000 slots sounds like hell. I remember once we tried 5,000 slots and that was an... interesting experience
Is there even a need for that many slots?
I think that with enough slots you can to a greater extent avoid hotspots over time, since people meet more people regardless where they go
I would also be interested in the challenge in general
And better thread usage could lower server costs since they wouldn't rely on single core performance to the same extent
Why does it sounds like hell? I mean, TMP is for sure capable of doing that, and the thing is, only drivers who are following every single rule (street rules and TMP rules of course), it would make fun then - so we aka "good drivers" have a dedicated server, because Sim1 is still EU#2 just with 110km/h Vmax and not 150km/h 
Overhauling the amount of slots, would also need an overhaul of Game Mods and a higher capacity for report demos to equate the rise in slot numbers
That explains why it would be like hell ^
Well, I can agree with you on that - imo they should try that
I don't think TMP is capable of running a 10k slot server, no. And making the server multithreaded would be a massive undertaking, and take a lot of time
Yeah, you may be right though ๐
And more people would go to already congested areas, causing more congestion an affect those who have lower end PCs
Also true 
I don't see a problem with the current capacity tbh, works for most
I am working on a one small project to get used to Elixir, maybe then we'll be able to figure it out.
Hey guys,
We'll be releasing the Event System API endpoint later today.
Once released, I'll be posting here endpoint example that you'll be able to use.
Have a great day!


it would be awesome if we could get the server id from the event request
Wait and see 
Pog
Pog x2
idk how else elastic saw that move going
can someone pin that?
starting date is UTC?
is correct dlc is always empty and vtc is always 0 and name null?
vtc id will be 0 and name to null when there's no VTC assigned to that event
I assume it's up to the person if they make it as a VTC event, or just an event
VTC have a separate page to create event now where they can assign permission and things like that
DLC is a new feature that was added today
Same for VTC
Correct
The changelog:
- Added VTC support to Event System
- Added API support to Event System (For Event and VTC Event)
- Added DLCs requirement for the Event System
ok thanks
The DLC contains 2 things.
DLC app_id and DLC name
If you have a VTC you can test it out ๐
I expect the VTC to start using the system soon. I've made them aware a week ago of the change
the whole list is featured + today + now + upcoming?
The main events endpoint should return the same events as you see here:
https://truckersmp.com/events
i mean, featured is present also in upcoming?
They are separate :
featured => array of events
today => array of events
now => array of events
upcoming => array of events
so all unique events not repeated
It could repeat
so "featured is present also in upcoming?" is "yes" ๐
Featured events and Events in next 24h or Now
Yea
Only events featured could be duplicated
the dlcs have a strange format... array of arrays?
I'll push a fix for it in a few hours.
The output should be the following when the fix is live:
"dlcs":{"463740":"Arizona","684630":"New Mexico","800370":"Oregon","1015160":"Washington","1104880":"Utah","1209470":"Idaho","1209471":"Colorado","1415692":"Wyoming"}
ok
the response contains 32 events (at least now) and only 12 upcoming
while there are 18 pages
How many events is on the homepage tho ๐
why not all?
Event API 
Because otherwise people could just build their own "events" system and list our event on their site
seriously? ๐
because i'm not interested in vtcs yet ๐
If you can show me what you want to do with it. I could decide if it's worth doing it or not
mmm... what do you think i should do with that data? ๐
Who knows 
this, but nevermind, nothing useful
If you want to use it on your app and behave the same way it is in your app. I could make something up. I'll output the basic information so you can listen them on your app if you wish.
But only if they get redirected to TMP
i never thought to steal events from TruckersMP, and yes, would linked directly to the source as always had been back to ets2c support, for example
Will the Event API be added to the API docs for future reference?
Yes, we will do it soonโข๏ธ Encrypted
The fix for the dlcs is live now Trucky
Also Trucky here is a VTC example with DLC:
https://truckersmp.com/events/482-pries-march-convoy
thanks
The VTC option for an event, where can we select that?
Also, is that something that can be added to existing events? Or only for new ones
Only for new. If you have a VTC you'll see a new button called "Event" bellow administration on the left side
Alright, thanks ^^
New API features look promising, looking forward to implementing that soon
As a suggestion, the "edit event" VTC permission description could use some rewording imo ๐
What would you suggest? The permission give the person who created the event only be able to edit that event
I think you shouldnโt use the word he, you should use they/them.
"Can edit self-created events" 
How do I link an existing event to show as the VTC please?
Hello, I was wondering if someone might be able to help? I'm currently trying to get Atom to show up in my Discord activity. I've tried installing the Atom Discord plugin but I cannot seem to get it to work properly/show up
I asked the same, can only be on new events sadly
Would've been nice to have tho
This plugin? https://atom.io/packages/atom-discord
@mossy cloud add me on discord
Sent :)
Does Your Code Pass The Turkey Test? (JS Edition) The credit for the title goes to Jeff Moserware and his excellent post which he authored in 2008. He basically discussed the dangers of improper localization and took a clever approach, stating ยซโThe Turkey Test.โ Itโs very simple: will your code work properly on a personโs machine in or around t...
yes
reads through article, logs onto Cloudflare and geoblocks the country instead ๐
Got our tracker finally working ๐
nice one! did you make everything from scratch or is it based on VTLog or something?
Well not everything, so it's using ETCars as a base, then uses NodeJS client which has been then developed/modified extensively
Then I custom made an API server-side so that it sends data from the tracker to the API
Then there's an MySQL Event that removes any drivers from the map/live data where data hasn't been received in over 30 seconds
niceeee
@mossy cloud Why not use websockets?
are the structures documented?
Not yet
as usual, frontend looks great, backend is spaghetti, API is presentable and documentation is just tumbleweeds 
Krash is the one who is doing the API documentation since it's hosted on his thing
Generate OpenAPI specification for Laravel Applications
php tho
You mean, TMP PHP API?

yes that one
Well, there was nothing added to our API lately.
but.. 4 endpoints just got added
Several days ago
yes?
It's also open source so anyone is free to open a PR ๐
we all know how relying on anyone being free to open PRs works out 

PHP isn't bad to use. Just because it's not the 'new flashiest thing' doesn't matter, it works
thats.. not what i said
I use PHP 16h a day 
Wrong channel 
Woah, that looks interesting
Would you think of trying that out for https://truckersmpstatus.com/ ?
We need an incident system though
an RSS feed for incidents would be awesome
We do have one
I must have missed that, is there a place I can subscribe?
Thanks ๐
except when it's ctrl+shift+c

in Windows Terminal
Windows Terminal can do Ctrl+C already 
But yeah, you can copy in Terminal once only lol
but I get paranoid about it
The ironic thing about that tweet is sometimes you do actually have to do that. There's been so many instances where I've hit Ctrl+C and it hasn't copied what I wanted it to, same thing with the right click context menu and clicking Copy. No idea why
Operating systems and applications aren't perfect. I've found that in Ps particularly I had issues copying an object as it just kept pasting the previous one. Clearing my clipboard in the Windows settings helped though 
thats because in old operation systems / applications ctrl + c would be a SIG_KILL thats why the shift bind was invented
SIGINT*
I do this everytime.
https://status.truckyapp.com/ works for you?
yes ^^
@raw notch I think you spelt your API backend URL incorrectly on the status page
Yep
trucy 

Stonks 
it's correct ๐
the URL is wrong
btw, CF Workers ftw
the funny thing is have fixed it, pushed.. and wrong again ๐
so re-pushed ๐
yesterday lost 1 hours and at the end resolved there was a missing "d" in a css class
Thatโs also me all the time
i think everyone will agree:
- Can't fix this
- Crisis of confidence
- Questions career
- Questions life
- Oh it was a typo, cool

Lua has a concrete purpose
Lol
Anybody willing to help me make my game a little bit better ? If so, Iโll pay you once the group gets more funds.
one of those nights 
After debugging my code now for over 4 hours I managed to get it running now. My bot can do reaction roles now ๐ the functions in commands are per se adding roles, removing roles, toggle them to singleuse/reverting it and listing all roles by channel and message-id ๐ Gladly I've done this 
What language?
Java
Nice
Heya currently using plesk on my VPS having lots of annoying issues with it. Is there anything better than plesk?
Here: #programming message








