#programming
1 messages Β· Page 21 of 1
want to add more stuff but idk what to add...
but... for what function 
u should link your hardware stuff to amazon partner links π
@shadow marsh @past shuttle a fake button named Team that change a dark theme into white theme π 
ouch
MP is an abbreviation of Multiplayer
some people are dumb and probably dont understand
it also stands for Military Police
your brain is damaged if you think that would stand for Military Polcie with "Truckers" infront of it :LUL:
(but CJ's point was that the official name of the project is "TruckersMP")
my nitr oran out?...
Noice :3
Thanks.
This is a bit of a shot in the dark but does anybody know if some kind of API or file or something exists for getting all the names of cities in game? Yes, I do mean all of them. Promods, DLC, base game, etc.
I'm too lazy to find them all myself
they're all in the save files (with promods used) but don't know of an online API
(as far as I know)
in traffic thingy yes
not in the cities API tho
Alrighty haha
Literally all I need is the cities and the country they're from π
trucky has so much stuff I might need to use xD
promods have a list in their changelog per country IIRC
This should be all cities and countries in ETS2 + DLCs + ProMods (w/ Middle East Addon)
@high sorrel exists but is undocumented :D cannot do now but today or tomorrow I will send you the endpoint
Ooo π
You want it?
@ember canyon Wow
Awesome work mateβ

Woowww
Really well done I have to say!
I just work wirth a program.
And I modify the arduino code for add few things like the capacitive button and led support.
Led is for blinkers.
@mossy cloud yeah I'll take a look if you're offering π
Sure, I'll DM you π
thanks β€
whos a fivem developer?
I've just spent 2 hours playing a BTEC Sims game with networks and security
It was awful
@mossy cloud why they seems Trucky data in some way? π
?
i mean, the locations list (a part the features columns) seems coming from Trucky Map
I'm going through it filling in the blanks for the promods ones, 12 down, 259 to go! 
at least 90% accurate π
I did the parser from scs files several years ago
Can't find it though π
I used to use it to fill up a base for RusConvoys website
nicee
Finally time for WebDeving! π
Jesus - my last time when I was on GitHub is 23 days ago... π
Im working today since 5 am - cuz RC is going today in private beta - and ive many to do
but its easy lol
I've needed to upgrade my phpMyAdmin, since package that Ubuntu 18.04 is outdated...
@shadow marsh I've done that manually :P
Not by sudo apt upgrade
ahh, okay 
This is pretty nice
https://golang.org/doc/go1.11#modules
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
The GOPATH and dependency management was one of Go's huge weak sides, and was generally awkward to work with
it's still somewhat awkward but a lot better
wooo updates
π
You can add a Twitch integration
So you can see the stream when you arrive in the website.
CSS is fun 
I need a better βAbout Meβ award winning description
notcied
New version of my dashboard.
I've added some hole if someone want to build something for it.
Corrected that thing.
That button is reversed
And it isn't normal.
Nice//
whats the best site to buy a domain? aswell as a website host?
It goes down to advertisement, so I don't think will be a proper discussion.
can't recommend namecheap... they escalated a bug I reported to their high priority queue and it sat there for 2 years before being closed without explanation or fix
oof
Get a domain from godaddy and then get a vps from a hosting company or get a deal from fast commet
OVH has their .ovh TLD for just a few pounds a year
and it's otherwise my choice for it too
I would not recommend godaddy at all. Just really bad experiences with their domains like putting up the price of their domains each year cause the website is receiving more traffic and just slow support
I use https://www.gandi.net/en for my domains, and I'm pretty happy with them π
Your web presence starts with a great domain name. Choose from over 750 different domain extensions at Gandi.net, one of the world's leading domain name registrars. Buy the perfect domain name for your website now!
as im a german, i use https://www.mc-host24.de/ π
MC-HOST24 bietet dir gΓΌnstige Minecraft Server auf Prepaid-Basis ohne Slotbegrenzung zu gΓΌnstigen Preisen an
its enough... and they have a webspace too π
For VPS - Hetzner. Cheap and awesome.
also Scaleway
for VPS i use Contabo (as i need to look for the price too :/ )
scaleway is definitely is "you get what you pay for"
i.e. not very good quality service
yeah, but get a vps for something like 10 euros month, with really few downtime is not so bad
You also got DigitalOcean, Vultr, Linode, etc for VPS'
had 2 servers with scaleway... took around 20 minutes to reboot a small linux instance
every time
never had these issues, more for downtimes
just because they use network drives for those instances
My 2.99 euro/mo VPS has never been down for 2 years
Ah yeah, the booting for my ARMv8 instance there is painfully slow
and fun fact: you can accidentally use iptables to lock the boot drive from the instance
And been down a couple of times, due to random failures
uptime was good, but occasionally you should reboot
Yeah
i have my dedicated in Kimsufi, a subsidiary of ovh
I have my dedi on SoYouStart, which is also part of OVH
AWS is too expensive
I don't pay for the instance there π
perks of the trade
one day i have to ask my CEO to put Trucky on our virtual infrastructure
unlimited powaaa
we just installed two DataCores, and they are great
$ uptime
22:53:12 up 1417 days

well uptime is not network downtime π
true, it's had 2 network downtimes
1 was brief and related to routing to the IP (the VMs on the server didn't lose connectivity)
the other was when one of their switches responsible for my server blew up
that took a bit longer for them to fix
but overall 2 short downtimes in 4 years is not bad
I use namecheap for domain, Cloudflare for DNS and never had an issue
I agree with the little nootin' waddlin' character there
@past shuttle Hetzner, yes
I use freenom. Because I'm poor and I can't buy domainname.
My website is 100% free
I mean it works, it's just not always the best choice depending on what you need
gonna try get a .gg domain
one of the more expensive ones
SSDNodes is a good provider for VPS'
what's fake about it?
Yay... I've sorted my English LP. π
Looks a lot better now.
Some pics.
Before (took from latest repo on GitHub, sorry for light theme
)
After (took from latest build from dev)
BTW - We started learning Python on our "Basics of IT" classes.
However...
We had a massive problem. xD
Our professor sent us the books for Python 3, meanwhile PCs at our department not only have WinXP, but also Python 2. π
Moreover - contact with him in Polish isn't great, because he is from Ukraine... π
He speaks Polish, but... not that good... Sometimes he uses some words from Ukrainian. π
Arghhh they keep adding new cities and DLCs and my list is never up to date π
if you use the Trucky API, yes :D @high sorrel
trucky api is nice, used it for my twitch chat location command
Haha yeah dow you never sent me that endpoint π
my 100% got ruined by OVH pressing the power button on my server and not telling me about it 
That's an oof
literally
sue for OCD issues 
"Oooh, 3v, screw that guy" 
this is a video game creation salon where for truckmp?
With my friends we will create a game a bit like Terraria
But we will change the characters to have no problem with developers terraria
I've never heard the phrase 'video game creation salon' before and I love it
xd
Sandboxie went all free!!! https://www.sandboxie.com/
Sandboxie - Sandbox security software for Windows. Install and run programs in a virtual sandbox environment without writing to the hard drive.
Ooooh nice
Oh yez very nice
@tardy smelt Bonsoir, vous parler franΓ§ais je suppose ?
I may be able to talk french but the rule state that we must talk in english unless we are in the #french channel @wise void
Oh, okay, could we chat in private message?
What do you need?
I would like to tell you about a platform I'm developing, so I'd like to collaborate with TruckersMP
Create a feedback ticket for project management:
https://truckersmp.com/feedback
https://r.3v.fi/tmp/tag-color.html to get that tag color just right
That's handy
@cinder spear gimme affiliate π
it's automatic
Huh?
oh scheisse.. wrong chat
xD
does anyone know how bootstrap modals are actually created?
tried creating open but it doesnt even pop up
<nav class="navbar sticky-top navbar-expand-sm bg-dark shadow">
<a class="navbar-brand" href="#">
<img src="img/favicon.png" alt="logo" style="width:30px;">
</a>
<form class="form-inline ">
<button class="btn btn-info mx-1 font-weight-bold text-uppercase" type="button"><i class="fa fa-truck"></i> TruckersMP Profile</button>
<button class="btn btn-success mx-1 font-weight-bold text-uppercase" type="button" data-toggle="modal" data-target="loginModal"><i class="fa fa-sign-in-alt"></i> Login</button>
<button class="btn btn-primary mx-1 font-weight-bold text-uppercase" type="button"><i class="fa fa-user"></i> Signup</button>
</form>
</nav>
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Login</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success">Login</button>
</div>
</div>
</div>
</div>
here is the code if you are interested
looking at the documentation, field data-target on your button needs a # in front of the target modal id, and the modal itself needs said id
That seems to make sense haha give it a shot
I am late as heck but yeah should work lol
How do you make a custom driver hub?
with a lot of work
^
A lot of work and dedication 
pls add a scania longline
omg krille can you not
Is it possible to post the feed of a Reddit user on your discord not a sub Reddit but the user
Quite possible yeah. Reddit has an api that can be used to retreive submissions and comments done by a user.
Do you need to host it ? Or can you use a webhook for it
Hey does anyone know how to make a application so i can change this to my vtc logo and my vtc name?
That uses Discord RPC (Rich Presense)
You'll need to see the Discord Developers documentation
@storm yarrow you would need to write your own implementation to query the Reddit api for new submissions which can then trigger either a discord webhook or make a bot send a message to the discord channel you want it at.
Personally I would write a discord bot to do it
I'm not aware of any pre-existing solutions to do this
@ember canyon take a look at VTRPC; https://github.com/VirtualTruckerRPC/Virtual-Trucker-Rich-Presence should be trivial to modify it to show custom vtc information
Someone already made it for me! Still thanks for your help β€οΈ
guys, someone know a good cloud storage with api possibly with some free space?
For simple object storage with solid APIs I'd look at S3 or compatible offerings from other providers... AWS has a free tier for a year (Azure and GCP probably do too). I'm biased towards AWS though
But fwiw I use AWS S3 (and pay for it) personally for my small video clips
I used to use AWS to push and store TMP evidences with ShareX
so far my bill is 10 cents a month, 12 with tax
Mine is 0 (it is empty
)
all of it is from bandwidth, not from storage itself
bandwidth... mmmm
i would to add a new feature to trucky but it's storage intensive
sincerely I wouldn't pay... or pay too much
what's the scale here? GBs? TBs? PBs?
My laptop takes about 400 kb for a 1080p screenshot of my desktop, so with a terrabyte we're talking 2 and a half million screenshots here?
in the few TBs range it's probably cheapest to get like a large storage server from OVH or something like that and handle the API yourself
more than you can stick on a single server probably becomes cheaper and easier with object storage again...
could of course look at something like Google Drive too, but the API isn't going to be super good for the use case
I'd personally start off by doing some number crunching to get an estimate of how much storage would acctually be needed, and the cost per image of the object storage vs a storage server. And then there's ofcourse the whole scalability to keep in mind if it turns out the feature blows up
honestly, object storage is probably the best option just because it's made for programmatic access to files
pricing comes out to be similar no matter what you do outside of free tier offerings or trial credits
and you can't really find completely free storage at that scale
Benefit of AWS S3 is that you only really pay for what you use (if I'm not mistaken)
yeah, with intelligent tiering even more so, as it moves infrequently accessed files to colder, cheaper storage
all good points
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
https://shodan.io/store/member
$1 lifetime membership for Shodan, expires later today.
Updated the link
neat!
Already got mine, thanks!
They seem only support void themes though, which is unfortunate 
π
Humble Bundle has some great deals again for e-books and video's for developers and other kinds of IT staff!
Just bought this, pretty good deal. https://www.humblebundle.com/books/cybersecurity-2019-packt-books?hmb_source=search_bar
So I've just found out about error 418 and it's brilliant π
PHP 7.4 has been released
https://www.php.net/archive/2019.php#2019-11-28-1

anyone knowing if it is necessary/good to git a .classpath and .project file for each github commit?
Hi
Super cool and light JS framework which is being worked on https://github.com/calebporzio/project-x
time to break encryption 
Quantum computing is going to change EVERYTHING.
How much faster is it than 01 again?
01010
u know
Depends what you'll be doing. Some operations will be better done with a quantum processors, others with a normal cpu.
it will and won't change everything both and neither at the same time with varying probabilities 
As much as quantum computers are good at things, scaling them is currently hard, and they come with some overhead
Firefox 71 released with subgrid support, which is quite useful https://www.youtube.com/watch?v=lLnFtK1LNu4
Card layouts are popular on the web, rows and columns of boxes with similar content. CSS grids can help align those cards, but it can still be hard to line-u...
...but sadly
Today in Spot The Bug we look at this function that should return the list of values for the given key.
Have you actually defined 'similarities'? You have it on your foreach and if, but it's not defined or referenced by global scope
adding an empty list to itself does nothing, and replacements is unused 
lol adding the list to itself
You better tell me what's wrong with this code 
that it's elixir 
Yep, it should be TMPAPI technically as they're both acronyms π
What ya'll think about zero trust?
Higher security means less usability. It should be a balance depends on how much of a security you need.
There's no reason high security can't also be convenient
Convenient security is the security when you do nothing additional than you want to do.
so never :D
In this point of view, passwords are inconvenient too.
passwords are inconvenient and not very seecure
Wazup
We don't allow users to pick passwords so that we don't store any of your sensitive information.
Instead, passwords are randomly generated by the system and they need to be stores in plaintext so that we can send you the reminder in case you forgot it.
We hope this makes...
242
430
I was hoping this is a joke but then I saw the tweet they retweeted...
mhm.. it vaguely makes sense
the issue is that people it still doesn't stop people from reusing passwords
they'll just memorize your generated one and reuse that elsewhere
We should do that, too 
and it does nothing against malicious inside actors who are able to just take the password and do things as another user
It's not worth the yearly cost imo D:
VSCode is free and works, just doesn't give you the advanced features that PHPStorm does, and those features doesn't justify a monthly cost of that amount :/
PHPStorm has a free EAP.
I am using it for years and didn't spend a single dollar on it.
I've used PhpStorm for over 2 years now (or maybe even more, I don't remember)
In the past I usually used the EAPs to code with, but a year ago I saw JetBrains where in the GitHub Education program so I got a license from there.
I am not a student anymore, so my Education subscription got revoked π¦
L
I'll have mine for the next 3 years π
I use the student deal
https://blog.meilisearch.com/meilisearch-beta-release/ looks neat :p
We are proud and thrilled to present our open-source search engine
[https://github.com/meilisearch/MeiliSearch]. After one year of hard work, we
are finally able to make our first official beta release.
We want to contribute to the open-source community by offering an ultra-...
Machine learning quiz.
A translator takes in nej., correctly detects it as Danish, and gives No. as English.
A translator takes in Nej., correctly detects it as Danish. What is the English output?
So it becomes the Churchill dog xD
I think he inadvertently used the "classic VPS" on OVH instead of setting up a public cloud instance for the same price
would have solved the root pass being emailed instead of setting an ssh key for example
otherwise seems accurate for the ones I've tried
Russian search engine Rambler.ru claims full ownership of NGINX code.
Yep, that happened.
@unkempt hamlet @opal arch Sorry for ping but I have a question. Is a way to be a game moderator? I'm mature, and active. Up to 10-11 hours/day
@ember canyon They're not looking for GMs at the moment, but the place to look is at: https://truckersmp.com/recruitment
They'll announce when they're looking for more, and you can then submit an application there π
np π

No harm in little mistakes like that, but just so y'all know, developer chat is not a chat to talk to THE developers, it's a chat for developers to talk to other developers :))
Going to Debian 10

Unpopular opinion: I prefer windows to linux
It's because I have used windows my whole life and whilst linux is great it doesn't support all the things that I am familiar with
What language are you using to develop?
I use windows cause I like it and I already have it lol
Also got it for free soo mmm
So you're probably not developing anything π
I use python and php
But I mean as in daily tasks etc
Like using TMP 
That's probs why I wouldn't switch, or id dual boot
I find Mac OS to be the best for development
mac, that's an interesting choice
Linux all teh way
Unless Iβm writing c#, then I tend to use windows. However, most of the time Iβm just using PHP and Laravel so having a unix system works best
I use PHP but I write to a linux server & source control so I do my work via FileZilla
If youβre using source control, what do you use FileZilla for? I canβt remember the last time I needed to use FTP
I can usually get away with ssh, git and auto deployment
Exactly. FTP seems kinda redundant.
I prefer Linux. It have less critical bug than Windows
Like, I had to go yesterday with my father to one of his customer, because he can't print anything.
After 3hours of verify and testing we saw that was an Windows issue.
Because the printer doesn't work on wifi but on Ethernet
I am using PhpStorm + Vagrant on Hyper-V for development. Works like a charm.
CJ which vagrant box you using?
Homestead (since Laravel)
Yeah I thought that might be the case π
But it is capable to hold any other frameworks and pure PHP as well
Yeah, I tend to use Valet being on Mac, but looking for a new solution for my PC, so might give it a go
There is a Valet-ish experience on WSL, but it is not that streamlined.
I tried it a while back but seemed a bit buggy
I've invested in WSL for PHP and it fails me. So now I am using WSL only for Node.js things.
Ah okay, that makes sense and like you said Homestead does the trick for most PHP applications
Used to use something called Denwer back in the days, but Homestead is a way to go in this decade.
WSL is a nice "sandbox playarea"... but nothing u could use as a developer π
I am using Redis off of it for Discord bots
ye i mean "bigger projects"... a discord bot is a small little "tool" i would say π
I figured, yeah
One of WSL cons is an absence of systemd
So you will need to explicitly wake your services up after WSL init
It is not that convenient.
thats the reason why i do some more work before and use own containers also for smaller services like this... docker ftw π or nano servers using WinSrv2019
Oh, I used to use Laradock before Homestead, even contributing in it.
But Windows 10 came in and Docker on Windows gets weird.
Docker is a dead horse imo... π
Kubernetes ftw
It's funny how Vagrant CLI hides passwords in console (vargant in my case)
I currently use Laragon on windows but not a massive fan of it
Homestead is more versatile and useful nowadays
Yeah definitely, I think I will give it a go later
SFTP. Use it to write directly to the server
I'm not a a developer I'm just trying to improve my general coding skills by making my website and I use SFTP to connect and transfer files across
I imagine for a big project there are much better ways
But personally for my it works well for what I need to do
I am using git for that. That way you learn Git very fast.
Ahh ok I'll have a look into that
@mossy cloud what are you writing directly to the server? Are you editing files which are in source control?
Writing into files directly on the server yes then uploding to git
So your not making the changes on your local machine, pushing to git and pulling to server?
I don't even remember how to use git, it's been so long π
Not at the moment Ratcho as the first release isnt live yet
So I'm using Git more of a backup at the moment
Working on the Bios.
I would recommend using it from the start, just makes your life easier π
First time I'm hearing this xD At this point you should just ssh into the server and vim to your file at this point 
At least with SSH you can use artisan command 
first time? π lol
I feel like I'm going back 10 years by hearing this now xD
i've seen this behaviour from professional developers on productio environment π
not so back in the time, less than 10
I rather use SSH than FTP for anything.
I write code local push it to git and than pull it on the server π
it's how things should work, or with another CI way
Also where I work now they setup their "dev" env on a server and use automatic upload for FTP. I hate it so much lol
we use local IIS configured with powershell and common dev SQL server
but in another place i worked, we had virtual machines on vmware cluster, not using local machine
and it's quite good, because devs have the same environment, instead of working on a client machine, you have the same OS of production env (windows server 2012 etc etc)
the whole machine is backed up and you can work remotely without your workstation
it's enough a RDP
me: merge to master
CI: runs integration tests -> deploys to canary -> waits an hour -> deploys to prod, cancels at any point if anything fails or metrics alarm

Thing is, it works for me xD And I'm the only dev on my project so I don't have to worry about doing things "the right way" so much π
It may be good practice but I'd like to get this code written π
Is it a hobby or something you would like todo as a job?
I'd like to make a job from it yes, but I wont earn enough money from Plasma to just do that
I'd have to go into proper PHP development work as well sadly
So in that case, I would recommend following the standards because you will probably use Plasma as an example of your work. If you can show that you are following the standards, youβre more likely to get a job. Youβll also find it easier going in to a job because youβll have been using those standards. Iβm not trying to have a dig, promise π just trying to give some helpful tips
No that's great, thanks :)
What's the best program to make an bootabke usb
?
Because, I've used Rufus for flash Debian into my USB.
I need to disable Windows to access to my USB.
(Bios)$
It is your BIOS problem
When I run the graphics installer nothing work. And on my VM everything is good.
My Bios run fine. Windows is the problem
My bios s made for Linux.
That the problem
Your Windows install is likely UEFI based, and your USB key is setup for a CSM install
hi my name is kayla and i coded dyno with no programming language-
I love that
Does anyone know anything that can learn me to do basic scripting for discord bots?
I canβt script well on bots
YouTube is your best friend
depends what scripting languages you know
creating a Discord bot is easy, you are just using an API of a library
"Developing" Discord Bots is more like creating Alexa Skills these days.... its a point&click adventure π
Um, I don't think so

Well there are many drag and drop editors available to reali(s|z)e simple Bots with some functions and also logic in them.
sure if you need something special u need to script it yourself
@teal cliff. There so many tutorial execpt "TheSourceCode" who give outdated code.
Highly depends on which language you wanna use tbh

Why not? I have learned it myself by watching other people.
https://discordjs.guide/ is your best friend
I learned it by someone gave me his bot and i expanded it and used this site
I dont like yt for coding tutorials xd sorryyy
Ye of course that is your best friend but you still need to know how to do stuff around that
Well, it doesn't help you if you don't know how to actually code.
Well
Ok
For JavaScript basics you can mayyyybeee watch a few videos
YouTube doesnt have videos for everything
Of course it doesn't but you can learn a lot from them. Once you have watched some you should be able to do it yourself with the docs.
It kinda did. Depends on what you're searching for.
learn to develop watching YouTube? oof...
Watching alongside coding. What's wrong?
Thatβs how I started with Laravel... some YouTube video all those years ago. I can be a great starting point to get the basics of something so you know where to go from there
Nothing inherently wrong with learning from youtube
Especially Laravel can be learnt from Laracasts
That how I started in python
Blink a led and now using python for start my JS bot.
π
I just need to push on a button
YouTube is useful to learn about starting something and stackoverflow to understand what's wrong with all errors that I've written in my part of code
π
For those of you who use the TruckersMP PHP API Client, a new major version was released today π https://forum.truckersmp.com/index.php?/topic/91673-truckersmp-api-client-for-php/
How do you get the data though? This is basically a wrapper for calling the API
...json is a data model, PHP is a scripting language... They're not interchangeable parts of a system, they do a different job
Xmas for developers π
ikr
about 800
90% all quick calls to other functions, is the background controller of the overlay
Ah
yeah, Xmas for developers 
CJ what language is that?
Ah

Huh?
Oh?
Waaaa?
noot?
Wrap it up.
@unkempt hamlet Using Elixir for TMP Helper? :p
Yeah, it would be Elixir (Phoenix) + Vue.js
Ah, neat π
Elixir is mind-blowing, honestly. In all ways.
I looked at it a while ago, but never got around to using it that much
Using a bunch of Python and some Kotlin nowadays though, along with Typescript and C# at work
Oh, I wish I can learn Kotlin. Web is in my brain cells nowadays, can't do nothing.
Have you done any Java? :p
Nope, and don't wanna.
Alright. If you had done, you'd have a decent foundation to just use it since it's based on the java ecosystem
But honestly, when you get started it's quite nice. It takes some concepts you'll be a bit used to from Elixir and functional languages too, like immutability
Non-nullable types are also nice :3
Another new thing is that you can make pretty good domain specific languages, but other than that, most of the concepts aren't that special :p
Ah, I am far away from making DSLs π
Exactly
Here's an example of a database query using a kotlin DSL :p
DBBid.find {
(DBBids.artpieceId eq artpiece.id) and
(DBBids.valid eq true)
}.maxBy { it.bid }
DBBid is a class for the bid, DBBids is the table definition
Or how you can just use get("path/here") { call.respond("Hello world" } to defined a route with ktor, a http server and client library :3
Btw, pattern matching is The concept. I like it so much.
It's nice, yeah :p
@doc """
Lookup player information
"""
@spec player(integer) :: TmpApi.Player.t()
def player(id) do
case makeRequest("player", id) do
{ :error, _error_code, message } -> raise message
response -> TmpApi.Player.new(response)
end
end
Another example. It was painful to develop in the brain. Go figure.
def makeRequest(url, params \\ nil) do
finalUrl = "#{url}"
finalParams = Keyword.merge([key: SteamApi.apiKey], params)
with { :commit, response } <- Cachex.fetch(
:cache,
finalUrl,
fn () ->
case get!(finalUrl, [], params: finalParams) do
{ :ok, response } -> response
end
end
) do
Cachex.expire(:cache, finalUrl, SteamApi.cacheTime)
response
else { :ok, response } -> response
end
end
I feel like in that specific case, an exception would have worked just as well π
Yeah, but it is +3 lines of code π
Define an TmpApiException, and throw it in makeRequest if there is an error :p
(You can also go full Rust, and not use exceptions, if you feel like it) π
I don't think so π€£
Or do like Go, and return a (error, result) tuple π
...and error checking becomes 60% of the LoC https://github.com/3ventic/twitch-avatar-redir/blob/master/main.go
Looks like we got some genies here ;))
Yep, that's my issue with Go
For every call that can fail, you'll need to add at least 2 lines to check for errors
Compiling to standalone binaries is nice, and their handling of goroutines and garbage collection is nice though
and it's super easy for anyone familiar with any language to read
since there's no complex constructs
I agree
unlike elixir.. I have no idea what those code snippets actually do (other than some caching and request/response)
Well, it's pretty much straightforward, just with some weird structure
yeah, it's just the syntax
So much smarties here oh my god
But back on topic, most people perceived as smart have just learned or done something different than you have π
We don't know everything, but we have our areas of interest we've learned a bunch about
And that we spend time going deeper into
to be honest, iβm really interested in coding or whatever you guys do, i donβt know much because iβm so new to it but yeye
there are so many resources to start from, just pick a language. take an idea you have and try to realize it.
Tbh I'm relatively new to coding so just trying to get a hang of it all e.g PHP SQL and Python so Im probably not doing things totally "correct" like using github but for the moment the way I do it works fine for me and I will of course make mistakes and hopefully learn from them
I just wonder how different it will be coding in a professional environment which is what I want to go into compared to home projects where I do things "my way"
It depends on actual environment in place
Wdym CJ, do you mean as in the professional environment and how different it is to a home project?
In home projects, you can do whatever you want to feel comfortable. In professional projects, you should adapt to standards and procedures.
Ahh ok
I'd recommend using GitLab anyway, as then you have an extra backup should things go wrong
Yeah, Gitlab is a place-to-go for personal projects
Ahh ok I'll have a look into that
Im guessing there's quite a lot of integration with IDEs
GitLab is so much better than GitHub imo. Can have unlimited private projects and for teams as well
So useful for Plasma
If you feeling out of knowledge of Git, you can start with just a folder in a cloud (i.e. OneDrive)
Yes, VSCode and PHPStorm have good integrations with Git
But learning Git is needed anyways.
I use PHP Storm fully now, used to use VSCode
Ok, that's something I definitely need to learn since I have never really used it
Yeah I use PHP storm since they do a good deal for students
Sublime Text 2/3 -> VSCode -> PhpStorm
Atom was the reason I didn't jump on VS Code early on
I have atom installed and use it for like config editing
It feels way more slower than native ST (ofc)
Like game configs etc
VSCode is good for that π
What games do you config @quartz moth ?
My main one is Minecraft as Plasma has about 6 MC servers on one network π
It's annoying when it comes to updating plugin time xD
CI ftw
Well I don't config games, I meant as in like editing simple values such as ETS2 config
But I recently got a Raspberry pi for discord bot hosting
Cause I thought it would be a good idea
Not sure if it has paid off yet tho
There are many other free places to host your bot - Heroku Personal, AWS EC2 free tier, Firebase, Glitch(?), etc.
If you feeling confident you can spend some money for cloud hosting. I am used to use Hetzner instance for my projects, 3 euros per month (incl. snapshots).
Oh that's interesting, they're cheaper than OVH
And Scaleway
Might look into that as one of our VPS's is a mail server, so the cheaper I can get that the better (while at least keeping 2GB RAM)
Well I guess I've already made the investment now and I way as well use it xD
Not bad with Scaleway there
I can't imagine needing much Bandwith for a mail server π
I am feeling more confident with Hetzner though
ouch
Well, that's obvious
Yeah, won't need it lol but just seeing how expensive it is lol
I tend to use digital ocean for ease. I use laravel forge to configure all my servers and it integrates with it perfectly
I need to write a bash script actually that updates all my MC plugins but the issue is they sometimes have version numbers in the JAR so I don't want to edit the bash script each time a new JAR comes out
You should look into gitlab CI/CD
Hmm, I will do thanks. I'll see if it affects plugin configs though (shouldn't do as it's normally just replacing a JAR file)
unless you're selling hosted/managed servers, you don't want to be automatically updating plugins, it breaks compatibility sometimes, especially with sponge
Well if there's something I can say to manually run the script its fine. Because I can do it manually on one server then if it works fine I can run the script on the rest of them
It just saves updating 6 servers manually
I'm also taking a look at Laracasts... and I'm kicking myself because its actually a LOT more simple than it looks
Github is better for public repo and gitlab for private repo I would say
Using a cheap VPS as a mail server can often land you with an IP address that has a reputation for spam
Landing a lot of your mail in spam or outright declined
Definitely, always spamhaus your assigned ip range
Depends,
Already had words with MS about getting de-listed as we were already listed. We're fine now
That's why I use Gmail Business thing for email. Otherwise I would always land in spam folder.
https://gsuite.google.com/intl/en_ca/pricing.html I have the Basic plan
And thats a great idea,
$7.80 per user compared to Β£3 for unlimited users , aliases etc
Yeah but than you get your email in the spam folder so what's the gain if your user doesn't receive the email?
It's not going into Spam though?
It did when we first got it, but it's fine now π Goes into normal inbox and everything
kinda weird not to check the spam folder either way ngl
Seeing as that stuff happens all the timel
I check my spam maybe once a month
I hardly check it unless I'm expecting an email and it doesn't arrive
Some bad email etiquette ngl
Yeah I never check Spam folder unless I've not receive an email I was supposed to receive. Outlook doesn't have good spam detection anyway. But I rather be safer than sorry since when I usually send email with that email they are pretty important and business related stuff π
Has anyone done much with serverless applications, something like AWS Lambda or Laravel Vapor?
I've done a few lambdas, but nothing I'd call advanced
Ah okay
Sorry, what?
I've never seen an admin login that requires Google+
Google+? People still use that?
No
I thought google+ shut down?... 0.o
Same tbh
and i oop-
http://jdebp.info./FGA/web-fully-qualified-domain-name.html
Yep, it interacts with ETS2, not TruckersMP so you're good π
Then it's good
Good
good
Iβve seen someone wire up an entire Scania dashboard here and use it with TMP :p
Wow 
Heya. I'm new to and learning Laravel and passing data from a news table to a view in my controller, but I've noticed I haven't made use of my Model. What is the 'best practice' for this as I understand that logic = Model but it seems to work in the Controller?
Check Eloquent in Laravel documentation
ty
In two hours: Setup NodeJS, Apache2, mysql, phpmyadmin.
And transfer my bot into the new host
Started it
Penguin you can check example here:
https://github.com/jean8mathieu/portfolio2.0
It uses Eloquent, Factory, Seeder and other thing. If someone want to improve it feel free π
Is there any particular reason you donβt use the API middleware for your βAPIβ routes? And use the api routes file?
API routes/middlewares are for stateless calls.
Yeah I get that, but surely these api routes have the web state?
I may be wrong π
Fair enough
If you want to make it Laravel-way, you can use Passport package with oAuth2
Yeah or API tokens
It the new Laravel update the API routes stopped working for auth user and you're forced to use Passport for authentication.
The way I did the application is the auth user send post, put or delete request to the API base on the auth middleware and this stop working in the newer version so I just moved it to web instead π
If you want to improve it feel free to contribute π
Ah okay, makes sense
For the auth were you using the Laravel built in one?
Using the laravel\ui package π
@tardy smelt In Laravel 6 the php artisan make:auth command has been removed so now the ui package is required
Doesn't help much as now I have a node_modules folder the size of St Paul's cathedral π
What about the node_modules folder?
I meant that folder
Yeah it's okay, but I'm the kind of person that wants to keep files and projects as light as possible
it's fine, my npm audit shows literally 1.2 million packages 
Stupid question but why wouldn't I push my node_modules if they're important to the project?
As they contain .JS files won't that cause things not to work? (in the auth views/routes)
you usually don't want node_modules in the git repo, but have a caching npm server in the internal network keeping the packages safe for CI/production
it bloats the git history just like it bloats the directory
the relevant diff is the one in package.lock
You do npm prod and it bundles the things
It's supposed to be reproducible based on package.json and package.lock/yarn.lock
and yeah, you should be building a prod bundle to run on prod, not npm running it
Alright, thanks π
and you use a caching npm of your own to avoid https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
xD
Im new to web development. Would people recommend I improve my skills with pure php such as making my own authentication systems or learn laravel as well?
Because at the moment Im just using PHP
As well as html, css, js of course
Well, to improve your skill you need to do a project.
Yeah Im working on my own website, Im thinking of a system for users to upload images
Ik it sounds kinda simple, however its something to aim to get working
Users can currently, sign up, login and change account settings e.g email password username
With Laravel, uploading images is not a hard thing.
So would you recommend that I try and learn laravel for my project or get used to using php?
Well, Laravel is written on PHP, so you will eventually learn both.
When you started developing CJ, did you start off with just PHP or learn Laravel?
Well, that way depends on the human itself. I can do pure PHP easily as well as learning new language.
It is personal. If you think that learning Laravel makes your skills build up faster, it is way to go. You will make to pure PHP part eventually.
Ok thank you CJ, it's something I'll start looking into more
It is not the right question.
Account creation is not a magic.
Start with the learning how PHP works.
e.e
i wish i could buuuuuuuut
i have no clue where to start
like ofc reading those docs
If you are trying to insert a user @last spindle here is also a good guide https://www.w3schools.com/php/php_mysql_insert.asp
Well, the point with programming languages IS that you don't need to do it by hand.
ik
So, maybe you have your question wrong.
@last spindle What you screenshotted there was MySQL, which is a database engine. PHP is not related to MySQL but they can be used together in what is called a 'stack'
So most websites use the LAMP stack, which is Linux, Apache, MySQL and PHP
Apache is the Web Server
My most helpful resource was W3Schools, as I found that to be more useful than the PHP Docs :)
Take a handwritten UI design and transform it into a valid HTML code
What is the best Language i should learn next?
How do I create a trailer skin in Mod Studios 2 because the walls, front, and doors are all separate files?
How do i get stream role
@ocean mural well what did you learn yet
And you actually donβt learn something you wonβt need
Because you wouldnβt be able to try what you learnt
There is NO best language.
True, it depends on what you've already learnt and what you plan to accomplish
Right
I need some help with skinning ATS and ETS2 Trailers
My website have finally a Discord Auth
Well, show us a pic
Hello, Developers
hi
Hey guys, I'm in the middle of doing a Java project parsing some Json into objects. I've got it working to an extent however, I have noticed that it's not coming in the same order as what the json file displays?
I should also mention that I'm relatively new to java!
try {
URL jsonUrl = new URL(url);
BufferedReader input = new BufferedReader(new InputStreamReader(jsonUrl.openStream()));
String inputLine;
JSONArray result = new JSONArray();
while ((inputLine = input.readLine()) != null) {
Object obj = parser.parse(inputLine);
JSONArray TrainList = (JSONArray) obj;
result.addAll(TrainList);
}
//Read JSON API
System.out.println(result);
//Iterate over trainlist array
result.forEach(stop -> parseNameObject( ( JSONObject) stop) );
} catch (Exception e) {
e.printStackTrace();
}
}
private static void parseNameObject(JSONObject Trains)
{
//Get Stop object within list
JSONArray stopObject = (JSONArray) Trains.get("stops");
JSONObject name = (JSONObject) stopObject.get(0);
if (name != null) {
System.out.println(name.toString());
}
I don't know where I'm going wrong!
he said Java
my bad
@worldly pine If it doesn't come in the order as in the json file, how does it appear? Is it sorted by name? is it in reversed order?
@floral mist the way the json file goes is... name, arrival, depart. For some reason unknown to me, my program outputs arrival, name, depart.
If you request JSON from multiple url. It will order base on the speed the server respond in. So some request the server might respond faster than the other one.
@worldly pine As per http://www.rfc-editor.org/rfc/rfc7159.txt only the orders of elements in a JSON array are ordered, whilst the orders of elements a JSON object has may or may not be preserved. That depends on the implementation.
And afaik, thats how the implementation in java goes too.
Also, order of elements in associative arrays doesn't matter since you're getting the value by the key.
reading a json file line-by-line almost certainly isn't what you want to do when using a json parser from a library, but idk java that well
So its not you doing something wrong, its simply working as intended! :)
But in your parseNameObject function I notice you are using an index to access the object's element. Because the order of elements in a JSON object is not preserved, thats a no-go. You should access it by its key.
Aaaah that makes much more sense, java is completely new to me so just using this as a learning curve! π
I do have to say the way you implented the "reading of the API" is a bit.. strange.. but it gets the job done! JSON is only represented as multi-line to make it easier on our human eyes, but to the computer its just one line. So having support for multiple lines isnt necesarry at all
Aaah okay, Just trying to self teach at the moment, but thanks for everyone's feedback, it's much appreciated!
there are some use-cases where line-by-line json appears (json-based log files for example)
prettyprint
breaks json to multiple lines yes, but it's not complete json per line
yeah, there's always a million ways to do and implement things xD
I mean, there's no wrong way of doing something, just a more efficient path.
oh there are wrong ways
I guess I didn't consider stuff like that haha
As an extreme example, allow me to introduce you to https://xkcd.com/221/
Java was notorious for memory leaks back in the day, but nowadays you kinda have to try (or not know what you are doing at all) to make it have one
But with the code you had there Fezz. Apart from the .get(0); theres nothing wrong about it! Quite fine for someone relatively new to java π
oh let's reinvent the wheel!
Aaah okay, It was the only way I could get a decent result
Like, its not wrong to use .get(0) at all, but because the order of elements in a JSONObject isnt preserved its kinda up to chance which element you get.
Aaaah I get what you're going with that
Spooky dev environment hack: add
127.0.0.1 xn--9q8h
to /etc/hosts and then all your dev servers can be accessed at http://π»
It's localghost!
709
1635
I believe Krashnz is @prisma robin
SHA-1 is dead
https://sha-mbles.github.io/


Oof
Perks of being a student
You gonna carry on paying @unkempt hamlet or look for another product?
I will wait for another EAP round.
Ahh ok
I'm okay for a while on PHPStorm xD
Im still a student :p
You can get PHP Storm for free then @quartz moth π
Just use your Educational email address
Yeah I use it xD
Ah nice π
π
:d
My PHPStorm edu license expires on the 5th of December 2020 so it's a bit left.
I still have a student license even tho I've not been in college for 4 years ish now xD 
What was updated just now?π₯³
Internal changes
Huh
I used to use Iosevka for that purpose, but this font seems more basic.
I just use phpstom's default 
It is a Consolas iirc (up to 2019.3.2)
Truck dashboard... My new PCB Version
firacode ftw
Hooray!!!
- My pcb was this. π
For everyone who want to have the schema. I can even send it.
You can show your progress in a forum post π
I'll make one since my first time.
With this one.
It was my first arduino project.
I have my Arduino too, can't decide what to do with it yet.
If you want, you can make a meteo satellite with a little receptor in 2.4ghz.
Nah
Ok , but I can't send it in space
It still need a USB to recharge the battery.
Does someone know good Solar Panel in 5v ?
Or a multimeter ?
yuh
Noice
Multimeter better than iPod 
Now installed, Server Management for Minecraft π
Each on it's own docker container π
But also allows us to manage stuff like discord bots and CSGO
Premade thing, self made, or combination? π
Guessing the first, really. I don't keep track of what minecraft server admin systems exist though :3
Yeah, using https://pterodactyl.io/ π
The open-source server management solution.
mine are just good old systemd units... UI looks neat
Well I normally use screen and just manage it in SSH but I'd rather not give team members SSH access xD
And it means I don't need to be bothered for so much if they can manage the servers themselves π
Because each server runs on it's own docker container it provides users with SFTP access to that server, so they can edit server files without destroying (or being able to access) anything else on that server
Useful feature really π
Ptero is great
Hi bois.
Woah... That is quite some time from my last message here. π
Idk why I can't use https://fb.me format instead of https://facebook.com while setting my profile on
's site.
It goes to same site, however it's a bit strange that I can't use the shortlink.
Translation from Polish "Adjust to format" which is the url you are posting below the text input.
You're welcome. π
Look at this amazingly responsive design 

π
π―


ye a really messy desk 
lol
@arctic mica. It isn't.
For me, the messy desk isnβt the problem. Itβs the messy desktop that is
I got an APU problem
So when I use my virtual engine to 100%. My lcd screen shutdown
Now it's good
But still not working how I want
But still. It isn't a mess. I make it clean before to take the pic
And here it's the new blinkers and Lights system
Bastiti what are you trying to do (just curios cant really offer any support :P)
Tinkerwell is kinda not logical.
You have so many choices, but you rather pay money for THAT? It doesn't even have a quote-on-quote environment, so it is just a dumb PHP shell
Oof
A true Redditor is their habitat, doesn't read much about it but it looks cool anyway 
TRUE
Um, you can say it's an ETS2 for dashboard 
made this public for anyone interested https://github.com/3ventic/verbose-redirect
In HTML?
<a href="#link">Text</a>
yes forgot it but thanks xd
π
How is your message connected with this channel at all?
That's, what I'm asking too.
Anyway, I want to begin with website designing/coding (HTML, PHP, etc.) - what can the Webdevs tell me :3 (What do I need, etc.) π
@shadow marsh Do you have a Windows or Mac PC?
Windows 
I'd recommend you download a program called Laragon. That will install Apache, MySQL and PHP
You can then use that to get started, as it creates a web server on your local PC
I already have a local webserver (debian 9 with MySQL, Apache & PHP ) π
Awesome!
thats the reqierements, I know - but - I wanted to know, what do I need as IDE ex. Eclipse π
I would recommend PHPStorm but if you can't afford that I'd recommend VS Code
Yeah, always go latest :)
If you're completely new I found w3schools to be more helpful than the php docs @shadow marsh
In most cases
yah, Im completely new - only know Java atm π
Then w3schools I found to be the most useful
But stackoverflow etc is a good place to start
okay, thanks ^^




xD