#development
1 messages · Page 57 of 1
that's neat
itll notify if it is not fixed
Its very useful, because you get all this context information
and dont rely on customer stories to fix it
So you can resolve issues before customer even calls up and complains
Very useful for rapidly developing prototypes
Sentry.init(properties.getSentryDsn() +
"?node" + node +
"&api" + API_VERSION +
"&core" + getDescription().getVersion()
);
I mean, I use it to track bugs in minecraft lmfao
It hooks into the logger
i play most of my games through WINE
<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
on Pop OS! 20.04
i play AAA titles on windows
really?
really
last time I helped someone on Pop!
spawned new terminal, entered command
didnt ask for pw
it has a session password thing
but all distros do that
so like every terminal session only asks once
i think it times out after like 5 minutes
I have on that on my ubuntu install
but debian does nothing of the sort.
it doesnt even have sudo
sudo is bad practice anyways
any user account = root
debian just demands you logout and do stuff as root
or only do cool stuff with the root account
now developers of games
think it is acceptable to ship a kernel level driver
for "anticheat"
idiotic.
i might look at this sentry thing for cool web app thingies
oh heres that picture from sentry ^
if you have >10k/month
i run a datacenter in my closet
you have shitty code.
maybe
or a big env
i just want to spin up like 500 VMs
and monitor them all at the same time
or like 100,000 containers
it can group, based on those breadcrumbs
so you can ask more specific questions to isolate the issue
the breadcrumbs are amazing
allows you to see a brief history
game studios can't hire good developers
@nocturne crypt cause they pay terribly
Plus most of the kernel mode anticheats are a joke
Most cheats currently use Easy Anti Cheat itself to inject cuz its riddled with vulnerabilities
i agree with both of you
where would the best place to learn codeing other then school
The internet

think it is acceptable to ship a kernel level driver
@warm sleet Is this related to Valorant?
a lot of AAA studios are doing it now
it's not just the studio behind valorant
it's becoming a theme
It's nothing new
The only difference with valorant is it runs even when you're not playing
You're now at the mercy of riot developers
Can't even run valorant on a VM (not simple to setup), lel the guys with unraid
Hope you can play

@pliant siren among others yeah
League of Legends is getting this now too
no user level program runs in kernel space, its just bad practice
esp if it can be patched 'just like that'
bruh devs nowshipping games with kernel level drivers?
@aarav2you#6823 what the
okay, so, I am making a minecraft mod and am following a tutorial, but I ran into a issue with gradle https://pastebin.com/auH3Mjx3
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
@lost obsidian Caused by: java.io.FileNotFoundException: C:\Users\tyler\.gradle\caches\journal-1\journal-1.lock (Access is denied)
clear caches
?
I'm not too familair with gradle
but seems to be unable to get a lock on the file
because another process is probably using it.
Are you using forge?
Yes
wdym cache tho what cache
or WITCH cache
wait
there is no cache
this is path im in C:\Users\tyler\Desktop\MC MODDING\BoatsDocks+.gradle
ohh
i understand
thnks
You should be able to just extract the contents out of the zip file into a folder and then open the build.gradle with IntelliJ
I did all of what the page said to do and It still gets same error
You downloaded the jdk put the contents into a folder and with IntelliJ you click new project from existing sources and selected the build.gradle?
whenever i do gradlew genIntellijRuns it does not work
Are you connected to the internet?
i already have intellij running and yes im connected to internet
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
thats the output
Do you have an example mod and can you run it
soo the straight exmod file from forge?
Yes mdk
k
But do you have it open in IntelliJ
Can you open the example mod class in IntelliJ
yes
Can you run it?
how...
Is there a runClient button in the gradle stuff on the right hand side
no but i gtg do something else
It might be in like a folder type thing you have to expand to see it
@hollow basalt my influence is spreading
I couldn't agree with that image more.
I only own a small handful of programming books, and one of them is Stroustrup, so... 😄
C++20 > python
C++20 + python = ❤️
It has, but embedded python would help you retain sanity
@hollow basalt im back
import requests
import datetime
from proxy_requests import ProxyRequests
url = "https://github.com"
available = "available.txt"
users = "usernames.txt"
now = datetime.datetime.now()
def check():
with open(users, "r+") as fp:
line = fp.readline()
checked = 0
f= open(available,"a+")
f.write("\n----> Checking started! <---- \n")
while line:
name = line.strip()
r = ProxyRequests(url + name)
r.get()
status = r.get_status_code()
print(r.get_status_code())
print(r.get_url())
if status == 404:
print(f"{name} [AVAILABLE]")
else:
print(f"{name} [TAKEN]")
f.write(f"{name}\n")
line = fp.readline()
if not line.strip():
print("")
print("Finished checking... Availalbe usernames in available.txt")
f.write(f"----> Checking finished -")
f.write(now.strftime('%l:%M:%S%p %A %b-%d-%Y'))
f.write("<----\n")
f.close()
quit()
check()
``` nothing happens when I run
Not even the file writing so im guessing check function isn't getting reached but theres no errors in console
lol can't you have having fun yet

@nocturne galleon strong recommendation, just check the application one bit of functionality at a time
your function is to long
break it up into initialization, making the request
then using the information from that request
you'll spend pointless hours just looking at your code if you don't know which portion isn't actually running. As for error logs
URL timeouts aren't considered an error in python requests
lol, what??
Looks like I'm gonna have to start breaking out the Arduino gear again for some prototyping, hmm.
try the new PlatformIO stuff with vscode
That reminds me: Why have I not found a simple arduino-like device that it's only purpose is to detect circuit closures/pulses on the configured GPIO pins, and, connected to a configured WiFi network, send a REST call any time those pins give an input.
why not do it yourself
👀
sounds like something you can DIY
optocoupler & GPIO
Put your GPIO on 3 and 4
1 and 2 are whatever you want to measure
though this only does binary on/off
@nocturne crypt vscode with platformio is nice
I'm planning on making a project where an arduino would poll information and then send it to a server via http
@midnight wind codewise, its easier to do it the other way around
or tbh, doesnt really matter
I've implemented both client & server on an arduino before
I've done a webserver before on arduino
Is there a way to get just the row from sheet.find in python and gspread? i just need the row and not the column?
@vague narwhal not sure how gdocs API does this
Rows[Cells]
is typical for tabular datastructures
you can get the column from the cell
i found out how to do it
you just do:
find = sheet.find(Enum, in_column=2)
row = find.row```
ok i have another problem
I created a VS Code Community server / website with Discord/React -> https://vscodecommunity.now.sh/
The unoffical VS Code community
you just do:
find = sheet.find(Enum, in_column=2) row = find.row```
@vague narwhal how am i supposed to do this thing
like this?
> find = sheet.find(Enum, in_column=2)
> row = find.row```
oh i see
py
' ' ' py >this is cool
' ' ' py > i hope this works
i need help with something to do with coding something which can someone scan a channel on discord until a certain format of code (184-1246-13-535 for example) is typed and then type it into a different game, dm me if you know anything about coding :)
@vague narwhal how am i supposed to do this thing
@nocturne galleon yes that is how i am doing this
@nocturne galleon wat
... nothing happens when I run
@nocturne galleon you never callcheck()(it is inside itself). Also, I rewrote your code and ProxyRequests seems to do too much for so little need. Just use requests. And for the rest, just divide it up to make it simpler. How large is the file or how little memory you have that you need to read and make the request before going to the next line?
so, is icue modular, where if someone knew how to, could link other hardware not currently supported with it?
ok so here is my code
def Fil():
sheet.update('F' + str(row), 'TRUE')
def OS():
sheet.update('G' + str(row), 'TRUE')
def DOW():
sheet.update('H' + str(row), 'TRUE')
def EDI():
sheet.update('I' + str(row), 'TRUE')
def OS2():
sheet.update('J' + str(row), 'TRUE')
def OY():
sheet.update('K' + str(row), 'TRUE')
#### Buttons
filmbutt = tk.Button(Episode, text='Filmed', padx=100, pady=50, command=Fil)
onserverbutt = tk.Button(Episode, text='on server', padx=100, pady=50)
downloadedbutt = tk.Button(Episode, text='Downloaded', padx=100, pady=50)
editedbutt = tk.Button(Episode, text='Edited', padx=100, pady=50)
uploaded_to_stjarnor_server = tk.Button(Episode, text='On stjarnor server', padx=100, pady=50)
uploaded_to_yt = tk.Button(Episode, text='Uploaded to youtube', padx=100, pady=50)
configured_on_yt = tk.Button(Episode, text='Ready to publish', padx=100, pady=50)
when i press the button it makes this happen
so it dosen't tick the box
is there any way to fix this
Probably.
I made a custom version of win 10 debloat
Anyone wanna take a look at it
I'm terrible with bash, what's the correct syntax for
if [ -z "$VARA" && -z "$VARB" ]
then
fi ?
nm, it's
if [[ -z "$VARA" || -z $VARB ]]
@pliant siren what do you mean by "this"
I mean that's the correct answer to the problem I was trying to solve.
you're right

test is that actual program
that does that bash expression evaluation with [[]]
test just returns true or false
neat
Meat
@hollow basalt inlining expressions: $()
Beat
things like: apt install linux-source-$(uname -r)
crystal@watomat:~$ uname -r
4.4.233
ancient kernel :p
So I was making a discord bot for my discord server and I was watching this YouTube tutorial: https://www.youtube.com/watch?v=j_sD9udZnCk
At 13:21 he tells you to type in "node ." when i ...
can someone tell me how to fix this
@celest egret what does your file structure look like
and did you do yarn/npm init
Discord had an API change so that’s unfortunate timing
@celest egret you have a typo in your package.json
the loader is looking for a main,js
that's supposed to be a . not a ,

why coma(,) :/
bruh
i need some help with java Graphics renderer, im trying to make a simple game, i added a laser but every time it move to the left this happens
btw it extends till the function for removing it is called
and this is the code i use to render objects -
public void render(Graphics g){
for (int i = 0; i < objects.size(); i++){
GameObject tempObject = objects.get(i);
tempObject.render(g);
}
}
this is going to sound stupid... but I'm losing my mind a bit at this point. I'm trying to set up a local wordpress site to later export, currently using AMPPS I got it at least to work with wordpress but it refuses to install a free theme, only a couple select paid themes. Is this just something they limit you to and should I choose a different method, or is there something I missed?
Hi,
So I'm trying to create a docker image based on alpine to host a csgo server and steamcmd needs the glibc in 32 bits but I cannot manage to make it work (even though I think I've installed the necessary packages but there aren't any doc for alpine). So here's the Dockerfile:
FROM alpine
WORKDIR /usr/src/steam
RUN echo "x86" > /etc/apk/arch
RUN apk add bash libc-utils libc-dev
RUN wget -O - https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xvz
RUN ./steamcmd.sh +login anonymous +force_install ./cs_go/ +app_update 740 validate +quit
And the repo is here: https://www.github.com/DevCycom/csgo-docker if you want to have a look
Ping me if you answer me
@amber phoenix try taking a look at https://hub.docker.com/r/frolvlad/alpine-glibc/dockerfile
for how to use glibc in an alpine container
though you might find debian easier, alpine would be more lightweight for sure
Yeah I'm definitely using alpine for it being lightweight, Thanks I'm taking a look at it
I see that it is in 64 bits though and steamcmd definitely needs 32 bits so if you may know how to get a 32 bits version
what was the most helpful tool for people to learn various languages? (I'm using w3 schools and codeacademy, not sure if there are more effective resources as well, just wondering what others have found helpful)
Would this
[a-zA-Z0-9-_]{3,16}
be a correct regex expression if I want to check if it matches:
Each Online ID must contain between 3 and 16 characters, and can consist of letters, numbers, hyphens (-) and underscores (_).
This is the first time I ever looked at regex and it's confusing af.
^[a-zA-Z0-9-_]{3,16}$
This one should work.
your regex was pretty close but i added some start and end of line characters
hey i need help lol
any of you lot know anything about Cocoa API?
I'm looking for a function which works like <stealth> like on windows.h
Thanks @spring pond. Turns out it's more complicated than that. (Sony and Playstation making my life difficult). Would you be up for helping me figure it out some more?
what are you looking to do?
it can only start with a letter.
^[A-Za-z][A-Za-z0-9-_]{3,16}$
does this make sense or am I missing something obvious?
also, what's the difference between using ( brackets ) and not using them?
^[a-zA-Z0-9-_]{3,16}$
and
^([A-Za-z0-9-_]{3,16})$
``` ?
https://regex101.com/r/srkwi7/7 seems to pass all my tests
Regex101 allows you to create, debug, test and have your expressions explained for PHP, PCRE, Python, Golang and JavaScript. The website also features a community where you can share useful expressions.
here is the regex i came up with: ^[A-Za-z][A-Za-z0-9-_]{2,15}$
since you need 3-16 chars and you already capture one with the first set i subtracted the end numbers by one
your regex listed above allows 4-17 characters
to answer your question im not an expert on regex but i do think that the two regexes youre comparing will produce the same output
the parenthesis act as an OR
they do, I'm just trying to understand what the "()" does
you could use the pipe (|) to add other groups for the regex to search
right now there is only one group so the parenthesis do nothing
okay, thank you very much. Now gonna try actually using it in code and praying it properly works
gl
It doesn't.
If you're familiar with PHP, how would you "format" the expression to work with the preg_match() function?
i havent used php but looking at the function documentation it looks like you just put it as the first argument
yeah well that doesn't work ˆ^ Thanks for the help though, the major hurdle is done
this works @gusty girder
preg_match('/^[A-Za-z][A-Za-z0-9-_]{2,15}$/', 'test');
used this, may have some helpful info if you run into issues https://stackoverflow.com/questions/4634993/php-regular-expressions-no-ending-delimiter-found-in
Thanks!
It doesn't.
If you're familiar with PHP, how would you "format" the expression to work with the preg_match() function?
@gusty girder this is completely unrelated but something to look out for if you’re new to PHP. a lot of the core functions built in do not share any consistency between the order of haystack and needle. So make sure you like always have docs open.
Eg:
in_array($needle, $haystack)
str_pos($haystack, $needle)
It’s just something I wish I would have known before starting PHP, provided of course you are just starting this
@nocturne crypt one of the rare blogs on the internet that is actually interesting to read
Been following this guy for many years now
or girl
idk
the anecdote is my favorite lol
Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.
That’s what’s wrong with PHP.
He also has another article
strong critique on javascript
because websites need javascript now, for the most mundane of features
@hollow basalt I need to make a small html demo for a blog today
as proof of concept
I got the template engine all working yesterday
remember to use a frontend framework
if you aren't transpiling typescript for your frontend framework, you're not doing it right in 2020
its just simple site features
there's no frontend
its just html rendered by the server
again
I'm not a webdesigner
I build frameworks.
I cant be asked to know all the specifics with css and html
its just too much of a pain
I ain't either
@nocturne crypt I'm a big fan of MvvM
in context of MVC based applications
ViewModels are composites of Models
Views compile against ViewModels, and not models
easier decoupling
and nice to manage business models seperately
@nocturne crypt in this context, MVC is used to set up the page
any interactive elements are implemented as SPA components
with mithril.js
@nocturne crypt its a javascript framework for SPAs
but it also supports serverside prerendering
important for things like SEO, crawlers only read HTML
This might be the answer to my problems
cause most frontend frameworks are bloated
with all of this webpacks and babel crap
I just want frontend that makes sense
@nocturne crypt ^
@hollow basalt the company I work for uses it mostly to develop re-useable application components
like small interactive applications
@nocturne crypt I am dying
Automate CSS?
mithril allows you to modify the DOM with code
in fact, the whole DOM is built up with code
The idea with mithril prerender
is that you do the initial HTML on the server
the client receives html document, and then starts mithril
this is useful for sites, where you have a big product catalog
and you scroll down
it has to load more content
the initial view is prerendered
using the same code
that the client would use
Isn't that what frontend frameworks is all about
Well
removing the hardships in all this dynamic content crap
that's what i've been looking for
I want to try out a framework but all these node craps
that requires several step just to print hello world
it's time to migrate regular html/js to mithril now
@nocturne crypt its like react yeah
I am not an expert on this
but this is what they say ^
Need some solution if someone can help ?
Need some problem if someone want solutions
I had a scenario where my client has a website on one server and the his blog site on another server , for some reason he want to connect his One domain to both of the server but the problem is that the hosting are different but he wants same domain to connect both the server, so is there are workaround or loop hole by which i can achieve
that is kinda weird and vague, you could be more technical
i know, let me clear out more , I want to use one domain for two different hosting servers so that i can use single domain but have two websites on different server connected to same.
You could use subdomains for the easiest solution
blog.website.com -> server1
app.website.com -> server2
so 2 dns records
Will it be good for SEO ?
That's kind of another vague question
which part are you using for SEO
essentially since you are using 2 subdomains and 2 servers, you might want to consider it (yourself) that you have 2 websites
oh, I misunderstood
having duplicate content will hurt you but it’s clear that you have two separate websites
@worldly cargo content is different one has main website with other type of content but he already has blog on different but he doesn't want his website on same server's , Weird Clients 😕
it makes no difference
Yea, just consider it you have 2 websites
Most companies use this format
example.com -> real app/website
blog.example.com -> blog site
@gaunt folio keep this in mind
you should always try to expose the most important part at root level
or make it more accessible
Ok fair enough, thanks guys for helping out ✌️
that's weird, wdym affect
SEO is still weird lel
does it matter if you do blog.domain.com over /blog
I wouldn’t put the same content on both obviously
I don’t think it matters but I guess for clarity’s sake
For such purposes you could check
https://www.searchenginejournal.com/subdomains-vs-subfolders-seo/239795/
https://moz.com/learn/seo/domain
@worldly cargo TLDR: search engines consider subdomains as different entity
I see
and I guess a link to the blog on the main page will tell google where it is
unless you deliberately submit a site map
since websites still use the "www" subdomain, it pretty much doesn't matter
most websites just redirect www -> @ or the other way around
Yes, that's why for SEO. you are essentially maintaining numerous websites
since they may be ranked differently
though take this as grain of salt, I'm not much experienced in SEO

@gaunt folio I forgot to ping you about the article I linked above
I just pray that my website appears on google
@worldly cargo spam it in websites

@gaunt folio TLDR:
Search engines keep different metrics for domains than they do for subdomains, so even though Google itself has stated that — from a ranking perspective — content in subdomains and subdirectories is treated roughly equally, it's still recommended that webmasters place link-worthy content like blogs in subfolders rather than subdomains (i.e. www.example.com/blog/ rather than blog.example.com).
It's still your decision if you want subfolder or subdomain
@hollow basalt I don’t want to be that kind of person lol
@worldly cargo I know lel
sad moments
I guess that’s one way to market their store
spam it eveeerrrywheeeere
they don’t sell hydroflasks which blows
unless you consider their insulated bottle
insulated underwears from lttstore.com
they finally sold out of their velcro haha
@hollow basalt the www era is long since done
I CNAME www to the full hostname
used to be the oether way around
it truly is, but if the client wants it then be it
you just have to make sure you register both in your webserver
so SSL can properly verify
As long as it's center text
should be fine
I like json responses 😄
all it does is
router.get("article", (req: Request, res: Response, m: Umbraco<Article>) => {
res.json({title: m.title, body: m.mainBody})
})
I just pray that my website appears on google
@worldly cargo Google search console. Lifesaver for me. I know exactly where and how my sites appear in searches.
I
CNAMEwww to the full hostname
@warm sleet thats usually fine but a more stable way if you really don’t like the www is to setup a HTTP 301 status pointing to the domain without www
Usually more important for old programs or specific use case but it’s usually best practice
What's a good home project to focus on to learn php/sql?
Like something to build?
dont learn php
PHP still has its advantages
I'm forced to, to get my minor in cois lol
@mellow prawn like?
Mainly ease of use and testing
Yea, I guess something to build, I'm uncertain what to do with it, really
ease of use, not really, its flaky
php is very straight forward for quick projects
I was much better with sql than I am with php
there's no built in debugger.
sql is another thing entirely
I understand
sql is just a database standard
hence my problem with php
php is a full fledged programming language
There is no built in debugging granted but still error messages that are comprehensive
Approached it from the wrong mentality and f'd myself quick lol
my only frame of reference learning php is some c#
I’d recommend a simple blog
I usually write a blog for proof of concepts
like I did today :)
to test my new web framework for a headless CMS
PHP to access the db and process the basic html and MySQL to obviously store it
I can run something like that locally, right?
Yeah
solid, thank you
I usually write a blog for proof of concepts
@warm sleet what’s it in
typescript/node
what is the common utilization of php in the industry?
just web framework?
or rather, html
@lone cairn to build simple web applications with
To be honest a lot of legacy systems
but its being phased out
Yeah
unsecure piece of shit
@warm sleet unsecure if you’re a dumbass
what's better to learn moving forward?
python, node, or if you need rich applications, .NET ASP
Roger
If you’re starting I’d recommend DJango
I’ve never seen that as a website type thing but yeah that could work too
I’ve always seen that as an API
But then again it does have HTML template rendering built in
Alright, so starting with php moving into python, django, flask, node, .net as a solid baseline for moving into more advanced items? Php is all they're asking now, but I'd like to work, not just do research, after my grad lol
Flask then DJango
Friend of mine recommended doing a bunch of red hat courses as well, any experience there?
In my opinion flask is easier than Django for a web framework
Understood, I'll re-organize, ty
Yeah
the less magic, the better
express is very simple in that regard
for java, there's sparkjava
I mean if you wanna go ultra simple PHP is undoubtably the way to go when first learning
yeah but PHP teaches you the wrong way
If you go too in-depth yes
What text editor do you guys use? I've got sublime text and visual(t.t) on my computer and atom I think
IDEA
But as long as you use it for the key understanding like arrays, variables, if statements etc you’ll be fine
I use sublime
IDEA works on pretty much all languages
but its a full fledge IDE
not as quick and snappy as a pure text editor
visual studio code is very user friendly
especially for webdevelopment
in node/ts
Idk why but I’ve never used an IDE
I enjoyed it for the very specific error notes in c# practice
@mellow prawn for java its wanted, because maven complicates things a bit
I’ve always just been an editor then run in a shell kinda guy but an IDE would be a lot easier
Yeah
but the thing i like about maven
is that you can run it from commandline without an IDE
so it works side-by-side
the same cannot be said for Visual Studio
C# in visual studio feels like I am coding with my arm in plaster
Lol
In all fairness I haven’t had many issues with sublime yet
router.get("home", async (req: Request, res: Response, m: Umbraco<Home>) => {
const articles = await client.getArticles()
res.render("home/home", {home: m, articles: articles.items})
})
<body>
<div class="header">
<h2>{{home.pageTitle}}</h2>
</div>
<div class="body">
<p>{{home.body}}</p>
<ul>{{#each articles}}
<li><a href='{{this._url}}'>{{this.title}}</a></li>
{{/each}}</ul>
</div>
</body>
Oh
working on a radically different concept here
the first parameter of get which is "home"
isnt actually a path
I may be ******** but I didn’t remember mode was asynchronous
Wait that sounds cool but seems like you’re needlessly overcomplicating it
@mellow prawn not really
Why not just JSON
the paths are not decided by my framework
thats what the CMS does
I'm writing a frontend framework for a headless CMS
Ohhhhh
so the url, is passed to the CMS
the CMS returns content at that url
then, it decides which controller it needs
based on the datatype of the content
so "home" is a datatype
and so is "article"
Yeah
so for example
the first article I have in the cms right now
is located at /home/article-1
the customer, can manage content on the site, in the backoffice
they can change the urls
to whatever they want
it just makes sure the right controller is called, for a given page
Is it scalable
Oh wait yeah I’m a mong
Yeah
thats how my code gets the bindings
and why I use typescript :)
my framework downloads these definitions
generates a schema
and produces a project that you can use to develop views for that CMS
Smh just slap flask backend and PHP embedded HTML for a frontend and call it a job done
Lol
well
the CMS they use also has a nonheadless variant
but that is running ontop of ASP.NET
and very fat
Yikes
The simple, flexible and friendly ASP.NET CMS used by more than 500.000 websites - umbraco/Umbraco-CMS
they offer this as a SaaS solution called "Umbraco Heartcore"
and thats what i am developing for
its relatively new
@mellow prawn main reason why I also use typescript for this
is that the whole frontend development team, currently writes most of their sites with Mithril.js
and they embed this into a .NET controller
kinda messy, don't need 99% of the stuff in .NET
so node is easier to use, and...
we're no longer platform dependent
@mellow prawn thank fuck I dont have to pay for licensing
cus i would never use this privately
I'm using a professional instance right now
So we just gonna ignore the fact that Laravel exists?
Should I make my BST nodes for a chess engine out of structs or classes?
@mellow prawn this is for an internship
so its provided to me
@nocturne galleon what lang?
@nocturne galleon the difference with a struct and a class
is where its located in memory
then I could create deconstructors for them
structs can sit on the stack
structs can do just fine I think, but you need a class that contains the struct
so your BST is a class, but the nodes themselves are structs
or at least, thats how I would go about it in C#
not sure if C++ structs are any different
yeah I was just thinking it would be simpler to operator overloading for nodes that are in the form of a class because then I could just do node 1 = node 2 and then all the data would be easily transfered that way?
If I have a shitton of objects laying around with classes filled with data and I am constantly creating new ones. Will it matter memory wise since the deconstructor will be called in the end releasing all the data or should I release it when it's not used anymore?
:!!!!!!!
@nocturne galleon structs are value types
not objects
you have one BST objects
that contains all the struct instances
structs can sit on the stack
@warm sleet I'm pretty sure you can put classes on the stack and structs on the heap?
each node is a struct, that points to one or more children
@vital blaze class instances are objects, and any variables are merely pointers to a location in the heap
yeah but I could use classes aswell for nodes and then I could do something like node1 = node2 to copy the data and so on'
there's two kinds of types
value types
like integers
and characters
boolean
and such
and then there's reference types
these are complex objects, that you create with new
I'm drawing from my C knowledge here
but this pretty much applies to all OO languages with similair memory model
C doesnt have objects
it only has structs
you have to allocate memory on the heap manually
and use pointers and such
In c++ if you do not use the new keyword it get's put on the stack. If you use the new keyword you get a pointer to the object/value in the heap.
isnt there' scoping in C++ ?
if you add this code to class methods
and you'd have to allocate this on the heap anyways
@vital blaze you can pass a struct as a value type
if you put it into a parameter, it doesnt use a reference
I've only really programmed little C++ for an arm microcontroller
but most of that stuff was just plain C
I'm pretty sure it's the same with objects. Which is why you use the & in the method declaration to pass by reference.
typedef struct circular_buf_t {
uint8_t * buffer;
size_t head;
size_t tail;
size_t size;
} circular_buf_t;
int circular_buf_reset(circular_buf_t * cbuf);
int circular_buf_put(circular_buf_t * cbuf, uint8_t data);
int circular_buf_get(circular_buf_t * cbuf, uint8_t * data);
boolean circular_buf_empty(circular_buf_t cbuf);
boolean circular_buf_full(circular_buf_t cbuf);
this is how I did it in C
ages ago
This is passing the matrices in by reference because of the &
void render(const glm::mat4 &world, const glm::mat4 &view, const glm::mat4 &proj);
This would be by value
void render(const glm::mat4 world, const glm::mat4 view, const glm::mat4 proj);
yes
but if you get the value of a refence
its just memory address
where in the heap it is
I'm glad linux is C lol
at least I can fix things when they break
C++ too complicated for me
Just did a test
#include <iostream>
using namespace std;
class MyClass{
public:
int i1 =1;
int i2 =2;
};
int main(){
int stackInt = 0;
MyClass onStack = MyClass();
cout << "int on stack " << &stackInt << "\n";
cout << "onstack " << &onStack<< "\n";
cout << "onstack.i1 " << &(onStack.i1) << "\n";
cout << "onstack.i2 " << &(onStack.i2) << "\n";
MyClass* inHeap = new MyClass();
cout << "inHeap " << inHeap << "\n";
cout << "inHeap->i1 " << &(inHeap->i1) << "\n";
cout << "inHeap->i2 " << &(inHeap->i2) << "\n";
}
output
int on stack 0x7ffd908bdae4
onstack 0x7ffd908bdaf0
onstack.i1 0x7ffd908bdaf0
onstack.i2 0x7ffd908bdaf4
inHeap 0x5653bcd642c0
inHeap->i1 0x5653bcd642c0
inHeap->i2 0x5653bcd642c4
Crystal was saying otherwise.
That's where I learnt to so I don't blame him/her.
I was also just checking for my own sanity as well
@nocturne crypt I come from the world of java, and went onto C after that
but going to C++ from my C & Java knowledge, brain hurts too much
Only reason why C is dear to me is JNI
for when java sucks at this one operation
dont need that
not for the kind of compute I was doing with it
and tbf, I would just put a little json facade in front of it, and call it from shell
@nocturne crypt I wish java had operator overloading
and an object indexer would be nice too
java or python
Yeah I don't think I will be pulling any of those tricks any time soon.
C# has it
@nocturne crypt I've found this dodgy library in java that I've done it with :D
I've tried it
lemme find the code lol
@nocturne crypt I'm a master in classloading
written software that can be updated while running
ez
java can already dynamically update classlibraries
the new looks at type definitions from the local classloader
you can get the one from your current thread by reference
I've done aspect oriented programming in java too
its also quite nasty
its bytecode weaving
after compilation
you can add code blobs by annotation
or method signature
and have before(): after():
Its nice for big applications that have a lot of cross cutting concerns
things that need to be logged
in different places
because its for govt
and it keeps your codebase simple
you can just attach method calls by annotation
yeah but by default nothing happens
package com.knockturnmc.core.database;
import com.knockturnmc.api.database.BlockingCodeException;
import org.bukkit.Bukkit;
public interface PreventBlockingCode {
/**
* Ensures that the current method stack is executed from any thread but the servers primary thread.
* This is validated through {@link Bukkit#isPrimaryThread()}.
*
* @throws BlockingCodeException if the method stack that executes this method is run from the primary server
* thread.
*/
static void ensureAsync() throws BlockingCodeException {
if (Bukkit.isPrimaryThread()) throw new BlockingCodeException(Thread.currentThread());
}
}
mh
ok nvm
wait
this is old!
it got removed in new version lmao
look, other people maintain this project for me now
I've written the first 30k lines
lemme checkout older version ffs
friend of mine reworked the API
removed the weaving
ok so
forget what you saw above
you have this annotation:
package com.knockturnmc.core.database;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface PreventBlockingCode {
}
this is an annotation
@PreventBlockingCode
@Override
protected OfflineMagicUser _getOfflinePlayer(UUID uuid) throws NoSuchPlayerException {
OfflineMagicUser magicUser = ProceduresImpl.getOfflinePlayer(uuid);
if (magicUser == null)
throw new NoSuchPlayerException(uuid);
return magicUser;
}
this is part of the public API
and these calls, do a direct sync call to the database
and these programmers, are idiots
so they use main game thread
to call this in an eventhandler
this is to make sure, that doesnt happen
because my plugin will start throwing errors and stuff, and they blame me
package com.knockturnmc.core.database;
import com.knockturnmc.api.database.BlockingCodeException;
import org.bukkit.Bukkit;
public aspect BlockingCode {
pointcut preventBlocking(): execution(@PreventBlockingCode * *(..));
before(): preventBlocking() {
if (Bukkit.isPrimaryThread())
throw new BlockingCodeException(Thread.currentThread());
}
}
now this, should be weird
ok no markdown support for aspectj
@nocturne crypt https://i.imgur.com/YFag5rR.png
you can also pass parameters, but I don't need any in this case
oh yeah here. I found the other operator overloading example
public static void main(String[] args) {
MyObject obj1 = new MyObject(10);
MyObject obj2 = new MyObject(5);
MyObject objTotal = obj1 + obj2;
System.out.print("Total value: ");
//Prints 15
System.out.println(objTotal.getValue());
}
class MyObject implements Add<MyObject> {
private final int value;
MyObject(int value) {
this.value = value;
}
int getValue() {
return value;
}
public MyObject add(MyObject object) {
return new MyObject(value + object.getValue());
}
}
<dependency>
<groupId>java-oo</groupId>
<artifactId>javac8-oo-plugin</artifactId>
<version>0.5</version>
<scope>provided</scope>
</dependency>
and a ghetto compiler plugin
you still need to delete smart pointers right if they are not used?
how smart do they need to be
@nocturne galleon you're right
that means that I would have to customize it right?
@nocturne crypt
ik
But it still doesn't delete itself after not being used anymore
I'd have to delete it myself
no
yeah but they just go out of scope if the function ends or the program reaches return 0 in main right?
so if I create a bunch of smart pointers through a class function and then I destroy that object. Would all the pointers go out of scope that were made through that specific object?
__constructor()
no but if I make a binary search tree
then it's dumb to
just delete each node for node
like I dont have to basically reverse the process of building the binary search tree. I can only delete my BST object
only thing I know from lua, is setmetatable()
yeah
just read through operator overloading. And smart pointers came up there for like 2 pages. Gonna continue reading about templates in the next chapter
but yeah I was thinking I'd have to reverse the whole process of building up my BST
like delete node for every node
nah
C++ in one hour a day by Siddharta Rao
It does contain C++ 17
but not C++ 20
complete enough for me
Im gonna read through this one kinda and then I'm gonna continue with some data structure book and then I guess I'll read about C++ 20
now I'm just tryign to build my chess engine
wait
what do you use a b tree for in chess?
to chain movesets?
chess is two dimensional array
of pieces
and rules you check
each piece can only set amount of moves
I need it for my AI
and those are simple methods
bruh
well idk what you call it but its a tree with nodes

@nocturne galleon there is data, and then there's algorithms, that use that data
a chessboard is a table
you can just do ChessPiece[][]
@nocturne crypt yeah just have a big caselist
and every state
executes, and can change the state
and you can also do logic like interrupts and timers
idk what terminology you are using but for the simplest and advanced chess engines you use the minimax algorithm
and alpha beta pruning
🤣
huh I've looked at some open source engines and they all use a tree
Minimax uses a tree structure but it's not a binary tree.
A TREE WHATEVER
IDC what you call it but it has nodes and look kinda like a binary search tree
@nocturne crypt I dont think you've seen a woman ever
wat
@nocturne galleon why do you ask us, and then argue with us
Both of us have years of experience
yeah, but we're saying that the aproach you are taking, will not work
how wont it work if literally seen videos of people creating a tree searching for moves and then evaluating it
wat
I literally saw a lecture made by MIT on the subject
you learn how to code on your own
you dont need some weird tutorial
once you know the basics, experiment, try things yourself
don't look at some video online
that is kinda whaty im doing
and think you can learn anything
but you are
doing some research on the subject
it is done my lord
lol I dont understand why u are so triggered or if your just joking around
just looked up decision tree and it looks exactly as the thing I was trying to describe
@warm sleet
and the things you are describing is some alpha go advanced algorihtm that I wouldnt be able to implement on my own since I dont even know scoping well enough
and last time I checked I think they were using a desicion tree with several optimizations
like some monte carlo stuff
with a neural net
@nocturne crypt
and Im not trying to make a chess engine that will contend with alpha zero
@nocturne galleon If you want to try learning the techniques required for making an AI to play chess. I'd suggest to learn the basic concepts with less "complicated" games. If you use minimax for chess you need to do optimazations such as alpha-beta pruning and others since there are so many game states. But if you try to learn minimax with a game like tic tac toe you can apply the vanilla algorithm.
Also I'd recommend getting a good understanding of programming first. But you don't need to be up to date with all the fancy new language features like some people here are saying.
Running a python program in terminal. It errors and says global name ‘b_chunk’ is not defined.
What can I do to fix this
Oh ok. I’ll have to look into the code. It’s not my program.
is it open source?
Yes
if you find the error and fix it, then submit a pull request(with the new code), if not submit an issue
I prolly won’t. It hasn’t been updated in about 5 years. A pr won’t do much.
oh, then yeah, however I submitted a pull request to our school's gpa calulator and someone actually merged it
Oh really wow.
Is there anywhere specific I should look for b_chunk. Or am I going to have to look through everything.
I would just CTRL + F
Ok. There’s several different .py files. I meant will there be a certain one I’m looking for.
I belive there is a tool to find a specific phrase between different files
It’s on macOS btw.
I’ll look it up.
@nocturne crypt so what should I run. Grep b_chunk
Never mind. I found the creators discord and dm’ed him. He made a commit and is testing.
Just for reference grep -r 'b_chunk' . from the project directory is the command.
Would that tell me which file it is in
Yeah
Ok thanks
Sample output
The changed code in the commit worked. But thank you guys for what you taught me.
I have not been following the history of C++
I'm too used to people just saying too use the new thing since it's fancy.
I assumed wrong then.
C++20 templates```cpp
auto function(auto&& parameter)
{...}
You just have to love it
when you compile code for atmel chips and run out of static ram
instead, you put your constants into program memory :3
Skip compiling and just write it in AVR assembly instead 😛
the more the better
webstorm refuses to start
Okay guys, want to expand past what I already know. Thinking about this website that will benefit me mainly. But my question is, do you all have recommendations for frameworks to use for it? I use NodeJS/TypeScript for most all, but I'm not opposed to branching out. It will require OAuth as well. Thinking about making a separate React or VueJS frontend for it and then having another backend for handling all the other stuff. Will probably need to do some cron tasks/scheduling as well...doesn't have to be directly integrated...but I know I'm used to Laravel's scheduler for a lot of that stuff. Just looking for recommendations to expand my knowledgebase.
im using django for my website. it can handle a lot and is very easy to expand with modules. it also comes with all of the benefits of using python
I've honestly never used Python in my life
its very easy to pick up especially since you already have familiarity with other languages
Hmm, how's it with OAuth? Or maybe I should just ditch OAuth and do my own login. Jut Django have scaffolding for that? Especially for integration with a React based front end?
django-oauth-toolkit
its an addon that i use for oauth
it does everything for you
honestly, the future of web development is based on native technologies like Golang, Rust, and C++. If you want to expand your knowledge that's where you'd do it
imo native languages are a hassle (I tried making a web server on C++, big mistake and cost me a month of time) and the performance gains are negligible for a non-massive website
well ill admit ive only worked with c++17 but when i looked at the 20 spec i didnt see any massive changes
the import stuff changed and thats about all i got from it
ohhhhh are they like protocols/generic constraints in swift
thats cool if they are
huh
well thats definitely a cool feature
And it'll disappear just like PHP
that's my point
well, it is used in some very old and trusted software, like wordpress. So that seems like a good reason to keep it alive to me, if you didn't want to re-invent wordpress
every programming language is a security risk.
I am happy that I don't have such an elitist world view^^
^
i somewhat disagree with the "real talent is supporting other languages", i think that php is just not built or maintained very well
but every other point is good
no, just learn OAuth
@nocturne crypt to be clear, I know OAuth...it's more of do I want to limit myself to supporting only one service/platform for the sake of simplicity by just implementing OAuth or do I want it to be more flexible by allowing people to just register themselves. That was really my entire point.
Because it's related to gaming shit
Because it's related to gaming shit
if you are doing anything related to gaming you need to use a native language
(as in something akin to a csgo server)
You can do that with OAuth . . .
I know that, I'm just debating between making essentially just making my own for the React frontend vs using generic 3rd parties since things like "Sony" don't have a public OAuth that I could find. Although I may just be overthinking it because the reality is, most people who it would target and would care already have BNet anywayit's probably me trying to plan for a problem that doesn't exist and may not exist.
if you are doing anything related to gaming you need to use a native language
@spring pond not like that, it's just to track numbers and generate graphs and basically do some automation. I do it locally with my spreadsheets, but manually updating it takes time and some people I know expressed wanting to be able to do it themselves and there not being a system for it. Honestly, I could just straight up make a completely downloadable version and say "fuck automation" but then again...that's the point. so I can kind of do it and forget about it. hahaha
well then i go back to my django recommendation
yeah, which is what I've been looking at.
my oauth implementation using django-oauth-toolkit allows for my users to either create an account with my service or use something like google or apple
django's orm is also very nice which will be good if you want to do advanced relations
I guess really it will only handle a few tasks
- Login/Registration
- Adding accounts to track
- Generating graphs (can be done client side though)
- and automated task to scrape the data...
Really that's it. 
well django can do all of that
Whatcha mean?
Phoenix is right
@nocturne crypt my friend is learning php, I tried telling him to not
I've done my own OAuth-esque token store before
accept credentials, return token that's valid for a given time
the token then also has a token you can use to renew a token
hurr
OAuth is just a reference implementation
guaranteed to work with many other services
but the concept is the same with all of these
never use userpasswords in regular appplication flow.
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
Is it possible to cout to a second terminal window? So that when the program starts Ill have to terminal windows open
?
you're probably gonna have to look into os-specific libraries for spawning and talking to different processes
On Windows it's impossible
You need to spawn another process and use pipe to send data to that process
Don't know about linux
So I cant like have like a live report of everything happening in the program, I have to write it to a file to check later or?
like a log
couldnt you just print it to the same window
yeah but problem is my program is inside the terminal window making it much neater having 2 terminal windows
This is the only solution
#include<iostream>
using namespace std;
class B
{
public:
int d=3;
void setd(int a) { d = a; }
void printd() { cout << d << endl;}
void operator=(A* ptr)
{
this->d = ptr->d;
}
};
class A : public B
{
public:
};
int main()
{
B BObject1;
A AObject1;
BObject1.setd(11);
BObject1 = &AObject1;
BObject1.printd();
return 0;
}```
Why does this not work and how do I make it work
Basically wondering how to do operator overloading between two different objects which are someway connected through inheritance/polymorphism I guess?
Because A is not declared
You need to forward declare A, forward declare this function, and define A fully, then define this function
thx
You should know the compiler generate a default operator= most of the time, but they are references not pointers
Instead of b_obj = &a_obj; you just b_obj = a_obj;
I made a wrapper for all these shit so that all you need to understand is ```cpp
std::cout << "On window 1\n";
Console console2;
console2 << "On window 2\n";
How does this compares to boost::Process
Are you saying web dev isnt programmig
Im saying that web dev is a lot of markup languages
And also the worst ever language js

jesus christ didn't know you could be that butthurt over a joke
When you kept insisting on some weird name and I constantly said "some kind of tree" not caring about the exact specific terminology. So I though you were just kidding around trying to play an irritating person like that guy in the class that says to the teacher you didnt give us any homework. And thats why I asked you jokingly have you ever seen a woman. And then later I replied to your thing about the alpha go stuff but you never replied to that so...
sorry if you misunderstood me
Well I guess it doesn't matter since PhoenixFlower blocked me so
some people are just wired differently
There is no such person as PhoenixFlower on this server
there was
why did he leave

