#code-talk

2 messages · Page 9 of 1

static shuttle
#

well uhhh to change sound files you would have to unpack the pak file wouldnt you

sharp breach
#

Any modification at all would not be allowed regardless of what it is.

granite mica
#

I heard something about vhdl

#

May god have mercy

chilly marlin
#

Anyone know how to define the gravitational constant in C. I’m stuck on the power portion of it.

summer bobcat
chilly marlin
#

Looks like blade is offering a cookie for it!

coral sundial
#

@chilly marlin drop a weight from a meter snd time it

chilly marlin
#

No I know the equation i need to use I just need to define it in C

chilly marlin
#

As a constant

barren quarry
#

@chilly marlin just put it as 9.8

chilly marlin
#

I can’t it has to be the equation for the gravitational constant (9.8 is only on earth) I have the equation but it is 10 to the -11 and I’m stuck on writing that portion in code

#

I’m gonna start working on it again in a half an hour. Fingers crossed on figuring out what is wrong with my syntax

coral sundial
#

Just put it as 10 with-11 zeroes

chilly marlin
#

Lol I just might at this point

long raft
#

const double G = 9.8E-11;

#

take off the const if you need to change the variable

chilly marlin
#

huh ok thanks, not they way we were taught but should work

long raft
#

thats scientific notation in c/c++/c#/java

#

what did they teach you?

chilly marlin
#

I misread the problem, it needs to be a #define but I should be able to do it.

long raft
#

oh right, const is c++ huh.

#

i meant to point out how to do the scientific notation, i guess

timber onyx
#

hey, out of curiosity, does anyone know if the in game chat filter is made by the devs or do they use other software

chilly marlin
#

text chat is devs voice chat is vivox

long raft
#

the vulgarity filter i think he means

#

i think its 3rd party...

timber onyx
#

it's aweful

#

i legitimately believe the people who made it did a terrible job

long raft
#

i suspect by the words that are flagged it was for a different purpose, like to prevent sexual solicitation of minors

timber onyx
#

damn i didnt even think of that

#

probably explains the old escort ban

chilly marlin
#
printf("enter a character.\n");
    //prompts user for a character. I personally prefer dwight from the office but T works as well.
    scanf("%c%d", &PlainTextChar, &offset1);
    // records the previous user pressing a button. Yay buttons!
    EncodedChar = offset1 + (PlainTextChar - 'a') + 'A';
    // basic math done by the computer while refering to the ascii table. 
    //acsii's included, table sold as downloadable content.
    printf("Encoded Character: %c\n", EncodedChar);
    // show the user the new character that has been encoded. Can it pass the turning test however?
``` anyone know what is wrong with this bit of C? i'm attempting for it to throw out a Character but it give the same Char every time then crashes the rest of my code after
timber onyx
#

@chilly marlin might be easier to debug if you remove all the commentary in it first

chilly marlin
#

@timber onyx ended up figuring it out. Combination of a missing & and a missing _ on the mod C, Underscores prevents enter as being used for the character. Learn something new everyday.

timber onyx
#

Honestly i dont use pure C enough to have been much help anyways lol

#

Also im on mobile so the commentary looks all bunched up to me

woven plover
#

Does anyone know what code is Foxhole written in?

timber onyx
#

It’s in the C family, don’t remember which one specifically though @woven plover

woven plover
#

Ok, thanks

long raft
#

c++ pretty sure

#

unreal engine

chilly marlin
#

It’s a combo of cpp and java iirc

#

@woven plover don’t quote me on it though.

woven plover
#

Yup, do not worry. I won't.

long raft
#

and java? jeez where does that venn diagram intersect!

chilly marlin
#

the engine is cpp, but foxhole itself is java? it was on some devstream at some point dont remrber when. been around a while ya know?

#

it might be javascript

long raft
#

javascript more plausible

chilly marlin
#

I know that there are two coding languages at least. One is in the c category and one is in the java category. After that 🤷‍♂️

#

Pretty sure it’s cpp and JavaScript

granite mica
#

I desperately hope this wasn’t made with JavaScript

summer bobcat
chilly marlin
#

It might not be I don’t remember

static shuttle
#

if it was java the game would have to ship with jre which i dont see that happening and if it was js then it would have to ship with nodejs which would be a complete nightmare to implement with a game engine

barren quarry
#

pretty confident its cpp

static shuttle
#

c++ is for the engine yes

#

they were talking about the actual code of the game

#

and java and javascript would make no sense

#

now they might use js as the server back end

#

thats probably where you heard that

long raft
#

theres other ways to handle js besides nodejs

#

for example, unity is c# and javascript

static shuttle
#

actually unity uses c++ as runtime and c# as scripting language they use to have unityscript but it was based off the boo language as a implantation of java script

#

also unreal engine had unrealscript which was similar to java but was taken out in in ue4 in favor for c++ and visual scripting

timber onyx
#

C stronk

#

@long raft

long raft
#

sounds legit

timber onyx
#

derp i want to hear you nerdgasm over code @long raft

#

are you one of those old coders that's too salty about new languages to say anything good about them

long raft
#

no, i like some languages, hate others

#

i tend to hate the old ones

timber onyx
#

what language you like the most

long raft
#

c#

timber onyx
#

nice

long raft
#

ive been doing it for almost 20 years

#

jeez i guess its old now

timber onyx
#

sometimes i really wish i had high level programming classes

static shuttle
#

what about clojure

barren quarry
#

derp how old are you

timber onyx
#

right now i'm learning about registers and how to use them

long raft
#

36

timber onyx
#

hell i use the arduino API for most my programming classes

static shuttle
#

python is the best language change my mind

long raft
#

python is basically everything i hate combined into a single language

timber onyx
#

how do you hate simplicity

long raft
#

i dont hate simplicity

static shuttle
#

python is quite high level and such makes it very easy to understand

#

why do you hate python

long raft
#

oh man off the top of my head, holy shit python has no engineering to it. just the transition from 2.7 to 3 is busted

#

type safety issues, performance, capability, i dont particularly love white space scope (even tho i come from BASIC), case sensitivity, the absolutely horrible dependency hell ecosystem

static shuttle
#

well ya there is major changes you cant simply translate it from 2.7 to 3

long raft
#

php is the language i hate most, tho

static shuttle
#

i like whitespace as it makes sense and forces the dev to make indents

#

meaning it actually looks good

long raft
#

yah but tab vs space

barren quarry
#

i used to write delphi, then some pascal, then c++, then c#, and now javascript

static shuttle
#

and makes it easy to understand

barren quarry
#

java and assembly can die in hellfire thank you very much

long raft
#

delphi was really fantastic

timber onyx
#

wait derp if you're so code wizer how have you never heard of verilog and VHDL

long raft
#

as many problems as i have with java, would much rather work in java than c++ or C

static shuttle
#

assembly is for chumps you gotta write in machine code

long raft
#

im a software guy, disk, not hardware

#

most of my background is in database and graphics programming, i dont do a lot of low-level stuff

timber onyx
#

i honestly though most code wizards could handle low level in a heartbeat

long raft
#

experience is very valuable

static shuttle
#

the more low level the less it makes sense

long raft
#

coding is like math, yes you can learn the rules, but the tricks are what make you good at it

timber onyx
#

i find it's the opposite

long raft
#

i have a lot of background in assembly tho

timber onyx
#

the more directly i speak to the hardware the more i feel in control

static shuttle
#

and the less that can go wrong

timber onyx
#

exactly

static shuttle
#

or more depending on experience

#

imagine writing a game in machine code

timber onyx
#

damn

long raft
#

roller coaster tycoon

static shuttle
#

lol

timber onyx
#

even pong would take at least a year lol

long raft
#

nah

static shuttle
#

you would be looking at opcodes the entire time

long raft
#

well you use an assembler...

static shuttle
#

no if you wrote directly in machine code you dont need a assembler

long raft
#

frankly even assembly had become rather high level by the time i was using it, it was closer to C

#

and you begin to laugh at the idea that C was considered high level

timber onyx
#

jeez

static shuttle
#

c is probably the lowest level you can run in windows

long raft
#

delphi was just as capable as C in low level stuff

timber onyx
#

i touched C for the first time last session after a year of C++ and i felt like i had safety harnesses removed

long raft
#

people are using rust now in lieu of C

#

oh man i learned C after i learned c++ and it was a wakeup that i had been doing c++ wrong for several years

timber onyx
#

my god i know the feeling

#

now i declare my constants correctly instead of int or float everything

long raft
#

using the right kind of casts, throwing exceptions, templates, so many c++ programmers are just C programmers and dont know it

coral sundial
#

C master race

long raft
#

i made this awful test pattern. thought id share my pain. does anyone else get macular degeneration from this?

languid harness
#

Why

#

Does it have squares

#

It hurts my brain

#

@long raft but since you sre working with colour, this might be interesting to watch 😉

coral sundial
#

You mean dark orange

languid harness
#

watch the video then

#

Its the whole gis of it, and more

coral sundial
#

I did xD

long raft
#

i suppose i knew these things about color, but its an interesting presentation

#

im dealing mostly in YUV colorspace tho, not rgb

#

i must admit i dont find brown to be that weird

static shuttle
#

so really our shit is just a dark orange

long raft
#

We can dark orange brown though

#

Like we can light red pink

thorn depot
#

J o i n. C4. Today. Check cult listings for more info

chilly marlin
#

Just read what derp said. Glad I’m starting with C now.

timber onyx
#

When your computer hogs the serial port you’re using for something

long raft
#

oof imagining using a serial port in 2020

languid harness
#

damned blue-billed rebels!

timber onyx
#

derp my school still teaches us with stuff made in 2011

#

one of the boards i have to use isn't even supported by its manufacturer anymore

#

hell the same board im using is using an arduino mega 1280 as an interface

#

you can't even buy those anymore

pale mural
#

I don't think you can ever except any computer/electronic education to be up to date. And even if it is up to date then it'll probably be obsolete in a few years

static shuttle
#

not true as a lot of networking stuff has been set in stone since 1990

#

ip tcp udp subnets nat dns

#

all still relevant today

long raft
#

a lot of that stuff has changed

#

dns insecure, people switching to dnssec, ftp dead, http dead, http2 is replacing https (assuming 1.0), is RIP still a thing? tls version 1.3 now? ipv6 never really happened... isdn wololo, 802.11 wireless stuff has changed

static shuttle
#

i use ftp all the time as well as any game hosts

#

in europe they have no more ipv4 addresses left so they must switch to ipv6

#

dns is far far from going away as most cooperate use dns to control the sites people visit and dnssec is encrypted so they cannot control that anymore

#

http is used by all routers for local connections as well as most internal networked servers

#

http2 is an extension to https so most the knowledge for https applies to http2

long raft
#

you really use ftp all the time? im surprised by that. and skeptical.
we supposedly hit ipv4 exhaustion years ago, and yet we havent really, and neither has europe.
my router uses https
http2 is not an extension to https, its a new version, just pointing out these are not static technologies, http2 is very different than 1.1

long raft
#

ftp is ... really awful, it just has such trouble with routers and NAT and in general the modern internet

#

i have been seeing we are about to run out of IP addresses for over 10 years, thecuz1

#

its like running out of oil. it will never happen

static shuttle
#

but now they have actually run out

long raft
#

theyll just get more expensive

#

frankly they may run into the exact same problems with ipv6 as they did with ipv4

static shuttle
#

"Any of the IPv4 addresses that are recovered by RIPE NCC after this point will be allocated via a waiting list. However, this is expected to be only a few hundred thousand per year and nowhere near the many millions of addresses required by networks today."

long raft
#

they tout it as if there are hundreds of addresses for every square meter of earth but thats not how theyve created the routing tables

#

they will just employ NAT more, and re-use more addresses

static shuttle
#

hell no ipv6 is a 64 bit address

long raft
#

its 128

static shuttle
#

how would nat help

long raft
#

well very few internet connections need a dedicated IP address for listening

#

theyll just stuff most traffic behind shared addresses as theyve been doing for decades

static shuttle
#

nat is mainly used for translating public addresses to private ones

long raft
#

no nat has nothign to do with public or private

static shuttle
#

yes everything to do with it

long raft
#

i shouldnt say nothing. little to do with public and private

#

you can use nat with all private or all public addresses

#

NAT simply records which outgoing connections can be used to receive and how to route to them

static shuttle
#

"The majority of NATs map multiple private hosts to one publicly exposed IP address."

long raft
#

The majority of NATs map multiple [private] hosts to one [publicly exposed] IP address.

static shuttle
#

private refers to 192.168, 172, 10

long raft
#

10 is not private

#

not all...

#

i mean theres exceptions to some of this stuff

static shuttle
long raft
#

class A does not mean private

static shuttle
#

yes it does

#

class a means that the subnet is 255.0.0.0

long raft
#

then why is there class A B and C in the private networks?

static shuttle
#

because classes are a letter way of representing subnets

long raft
#

a class A network can have different sized subnets. they are not all /8

#

they can be 8 to 32 bit masks

static shuttle
#

point is 10.x.x.x is private

long raft
#

its class A

static shuttle
long raft
#

theres nothing magical that makes an address public. all that matters is if there are routes to it

static shuttle
#

these are all special addresses

#

10.0.0.0/8 10.0.0.0–10.255.255.255 16777216 Private network Used for local communications within a private network.[4]

#

hence /8 so class a

#

from the chart above

long raft
#

class a does not mean only /8

#

it means thats the minimum

#

point being, NAT has slowed down ipv4 address exhaustion. it will continue to

#

none of the damn ISPs are implenting ipv6, they probably never will, nor all the government agencies that promised to do it by 2012

static shuttle
#

yes that means that you can do anywhere from /8 to /32 on 10.x.x.x

long raft
#

and ipv6, just because it has a lot of addresses does not mean it has a lot in the places where they are needed

#

it will likely run into the same problems, and people have been relying on NAT as their firewall for decades now

static shuttle
#

3.4×10^38

#

thats how many ipv6

long raft
#

i dont know about all the protocols you listed that you said are static, but the ones i do know about have pretty much all changed or become defunct

#

it doesnt matter how many ip addresses it has if you only route 10 addresses to china. theyre gonna run out. distribution is the problem, and the routing tables are complicated for the hardware

static shuttle
#

4,294,967,296 thats how many ipv4

#

thats a bit of a difference dont you say

long raft
#

but thats not how many there are for ipv4 because of the reservations

#

ive pointed out like 3 times, the number of available addresses is not the problem

static shuttle
#

so it took use about 30 years to fill up 4,294,967,296

long raft
#

its the distribution and routing

#

no there are way less than 4 billion ipv4 [allocated] addresses

static shuttle
#

that how many that are mathematically possible to distribute

#

According to Reserved IP addresses there are 588,514,304 reserved addresses and since there are 4,294,967,296 (2^32) IPv4 addressess in total, there are 3,706,452,992 public addresses.

long raft
#

youre forgetting all the reservations, special addresses, and gateways/broadcast addresses

static shuttle
#

there 3,706,452,992

long raft
#

no, still not

#

you cant use the broadcast address...

static shuttle
#

thats accounts for that

long raft
#

and heres another fundamental problem - fragmentation of IP blocks. for every block of ip addresses you have to have a gateway and a router

#

so if you were to give 1 address to each individual it woudl take up 2x as many

static shuttle
#

that accounts for everything on here

long raft
#

but it only works if 1 ISP gives out all the addresses and everything goes through 1 router

#

which is ...impractical

static shuttle
long raft
#

possible IPs doesnt mean useable IPs

static shuttle
#

how this 3,706,452,992 is how many all the isps of the world have to distribute

#

that how many that are mathematically possible to distribute

#

there are organizations that hand out these addresses to isps

long raft
#

youre forgetting all the reservations, special addresses, and gateways/broadcast addresses

static shuttle
#

i just said 3,706,452,992 is the true number after those special addresses are taken into account

long raft
#

Oof discord

#

you cant use the broadcast address...

#

Oof discord

static shuttle
#

thats 588,514,304

#

that accounts for everything on here

long raft
#

and heres another fundamental problem - fragmentation of IP blocks. for every block of ip addresses you have to have a gateway and a router

#

no, still not

static shuttle
#

thats 588,514,304

#

thats 588,514,304

long raft
#

that sounds more plausible, is it accounting for usable? you know what i mean by usable, not just possible?

static shuttle
#

588,514,304 thats how many special addresses that ipv4 has so you subtract that from how many ipv4 can mathematically have 4,294,967,296 - 588,514,304 = 3,706,452,992 that can be used as public addresses and that handed out by the corporations to isps to distribute through out their network

#

nat is pretty must only used to go to/from public to/from private

#

isps can use nat for internal networking to cut down on the amount used but that fact is the corporations that hand out these ips are out of addresses and can no longer supply the amount of ipv4 that isps as for every year meaning they are forced to switch to ipv6

long raft
#

well you can hold your breath for ipv6 then

static shuttle
#

at least in europe

long raft
#

its only widely being used in cases where ipv4 with NAT could be used

static shuttle
#

ipv4 is 32 bit and ipv6 is 64 bit

long raft
#

ipv6 is 128 bit

static shuttle
#

no ipv6 is a 64 bit address

long raft
#

ok whatever lol

static shuttle
#

nvm The main advantage of IPv6 over IPv4 is its larger address space. The length of an IPv6 address is 128 bits, compared with 32 bits in IPv4.[2] The address space therefore has 2128 or approximately 3.4×1038 addresses (340,282,366,920,938,463,463,374,607,431,768,211,456, which is approximately 340 undecillion, or 340 billion billion billion billion, addresses). As with IPv4, some of these addresses are reserved for special uses.

#

the subnet is 64 bit thats where i got that from

#

if it takes us 30 years to use 3,706,452,992 how long will it take us to use 340,282,366,920,938,463,463,374,607,431,768,211,456

timber onyx
#

@long raft i thought the internet had exceded its maximum physical mass for a second there earlier

long raft
#

thats false thinking, as i explained earlier

#

thats naive

static shuttle
#

yes of course that includes special addresses but still look at the difference

long raft
#

thats not what im referring to

static shuttle
#

then what are you referring to

long raft
#

its a distribution problem

#

and its a routing table problem

static shuttle
#

wfym

long raft
#

you can just say everybody gets 10 ip addresses. you cant say each country gets X addresses. you cant say each meter of ground gets N addresses

#

because the routing tables would be too large to fit in a non-super computer router

static shuttle
#

but thats only 128 bits

#

to store a ipv6 address you can use as little as 1 bit or up to 128

#

a 128 bit number can produce 340,282,366,920,938,463,463,374,607,431,768,211,456

long raft
#

well you have to use 128 bits per address. so thats 64 bytes per address

static shuttle
#

on the computer side they dont even know the number all they see is a 128 bit long number

long raft
#

oops, i must have done my math wrong

#

16 bytes per address.

static shuttle
#

16 bytes *

long raft
#

per address/route

static shuttle
#

compared to 4 bytes

long raft
#

yeah thats a huge difference

#

because its exponential

static shuttle
#

computers can easily handle that

long raft
#

well they cant, actually.

static shuttle
#

no it isnt

#

just x4

long raft
#

x4 x the number of routers x the number of routes

static shuttle
#

you got to realize its not one computer running this

long raft
#

you should read up on the problems with ipv6

static shuttle
#

that would be distributed through out so many different routers and computers

long raft
#

you need to read it for yourself because you just take the opposite of whatever i say

#

im afraid ill never be able to convince you, but perhaps someone else could

static shuttle
#

can you link me to something that explains this

#

because i dont see it

#

IPv6 addresses are assigned to organizations in much larger blocks as compared to IPv4 address assignments—the recommended allocation is a /48 block which contains 280 addresses, being 248 or about 2.8×1014 times larger than the entire IPv4 address space of 232 addresses and about 7.2×1016 times larger than the /8 blocks of IPv4 addresses, which are the largest allocations of IPv4 addresses. The total pool, however, is sufficient for the foreseeable future, because there are 2128 (exactly 340,282,366,920,938,463,463,374,607,431,768,211,456) or about 3.4×1038 (340 trillion trillion trillion) unique IPv6 addresses.

#

they assign ipv6 is must must larger chunks to cut down on routing tables

long raft
#

nah, i suppose its irresponsible for claiming something without offering specific proof, but these are just speculation because its not a problem yet. anything i will find and post you will pick out something about it to argue

#

and im just not interested in arguing it. ill even concede because i just dont care strongly

static shuttle
#

but ipv6 will not be switched over to just allocated when necessary meaning more efficient forms of tables can be developed and more powerful computers will continue to expand meaning that we can handle ipv6 efficiently

#

you say that ipv6 grown exponentially but technology grows way way faster

long raft
#

we can, if we treat it like ipv4

static shuttle
#

how so

long raft
#

probably just going to skip over ipv6 anyway...

#

it was a giant disappointment that discarded some of the best features that existed in the draft

static shuttle
#

how would we skip it

long raft
#

just make a new better ip standard...

static shuttle
#

that would literally require new hardware all over the world

long raft
#

i switched to ipv6 15 years ago but it went nowhere and now im just back to ipv4

static shuttle
#

you realize how catastrophic that would be to any economy

long raft
#

catastrophic? to spend money to improve infrastructure?

#

unlikely

static shuttle
#

but ALL computers would not work

#

routers

#

switches

long raft
#

thats not what happened with ipv6...

static shuttle
#

because ipv6 was developed a long long time ago and mostly is supported by all hardware now a days

long raft
#

it didnt break the internet before it was commonplace on hardware

static shuttle
#

because ipv4 and ipv6 can work together

long raft
#

how?

static shuttle
#

meaning when ipv6 was rolling out on hardware they also support ipv4

long raft
#

you can tunnel ipv6 over ipv4...but they dont interact

static shuttle
#

well what i mean is they are both supported by the hardware

#

if you want to make a new standard then you would need new hardware that supports the standard

#

and why would we need a new one

#

also There are ways that a company can work with the two protocols. It's possible to use 'dual stack' devices – routers programmed to work with both protocols – and use 'translation' in which the device the accepts requests from a host on IPv6, converts it to an IPv4 datagram (a self-contained packet of data) and sends it to an IPv4 destination, or vice versa.

#

dual stack can translate ipv6 to/from ipv4

long raft
#

like teredo?

#

its a tunnel...

static shuttle
#

no Dual-stack IP implementations provide complete IPv4 and IPv6 protocol stacks in the operating system of a computer or network device on top of the common physical layer implementation, such as Ethernet. This permits dual-stack hosts to participate in IPv6 and IPv4 networks simultaneously. The method is defined in RFC 4213.[50]

#

no tunneling

#

literally both on the same pc

long raft
#

well then, there should be no problem with a new protocol

static shuttle
#

there would be plenty of a problem just because the software supports both doesnt mean the hardware does

#

dual stack only works if you actually have a ipv6 connection and ipv4

long raft
#

no its rabbit season!

#

duck season

static shuttle
#

so if you want a new standard all hardware in the chain must support it or at least translate it to ipv4

#

but if translation occurs you wouldnt get the benefit of the protocol

#

so making a new protocol is pointless

#

when ipv6 which can virtually never run out of addresses is already supported by most hardware

#

and also looks like teredo isnt even used The Teredo relay is an IPv6 router that mediates between a Teredo server and the native IPv6 network. It was expected that 6to4 and Teredo would be widely deployed until ISP networks would switch to native IPv6, but by 2014 Google Statistics showed that the use of both mechanisms had dropped to almost 0.

long raft
#

yah people have given up on ipv6, the only place ive seen it widely used in the US is on mobile networks, and they are for sure using some sort of 6to4 protocol

static shuttle
#

`A significant percentage of ISPs in all regional Internet registry (RIR) zones have obtained IPv6 address space. This includes many of the world's major ISPs and mobile network operators, such as Verizon Wireless, StarHub Cable, Chubu Telecommunications, Kabel Deutschland, Swisscom, T-Mobile, Internode and Telefonica.[53]

While some ISPs still allocate customers only IPv4 addresses, many ISPs allocate their customers only an IPv6 or dual stack IPv4 and IPv6. ISPs report the share of IPv6 traffic from customers over their network to be anything between 20% and 40%, but by mid-2017 IPv6 traffic still only accounted for a fraction of total traffic at several large Internet exchange points (IXPs).`

#

yes of course its not used because there is no need but thats going to change in europe

#

for sure

long raft
#

set yourself a reminder for a couple years in the future, compare reality to your prediction.

static shuttle
#

in greece its pretty high

long raft
#

im skeptical about all of it

#

few to nobody would ever use ipv6 only for hosting a public IP address, as a server

#

and thats the only case where ipv4 exhaustion matters

static shuttle
#

thats why they use dual stack

#

so they can host in ipv6 and ipv4

long raft
#

yes but for what benefit. everybody on ipv6 can reach ipv4

#

so servers have to be on ipv4

static shuttle
#

not if you are given an ipv6 address exclusively

long raft
#

that would cut out 80% of the traffic of the world or more

#

i suspect what you are seeing with greece is high ipv6 in mobile phones

#

nobody on a mobile phone cares about having a public IP address

static shuttle
#

APNIC places India at more than 50% preferring IPv6

#

OOF

long raft
#

yes but not servers.

static shuttle
#

they can scam you on ipv6 now

long raft
#

so it doesnt matter if they use ipv4, they could all be behind a NAT without a problem

static shuttle
#

what does a nat have to do with it

long raft
#

there is no benefit for 95% of ipv6 users to use ipv6 instead of ipv4

#

because they could just use an ipv4 NAT instead...

#

this is why ipv4 wont run out

static shuttle
#

ok so lets say you are a customer of a isp in europe and they do not have a ipv4 address to hand out what do they do now just deny service

long raft
#

They just buy addresses from another isp

static shuttle
#

no addresses are handed out by the rir A regional Internet registry (RIR) is an organization that manages the allocation and registration of Internet number resources within a region of the world. Internet number resources include IP addresses and autonomous system (AS) numbers.

long raft
#

I know for a fact Singapore buys addresses from other countries

static shuttle
#

actually for europe its The Réseaux IP Européens Network Coordination Centre (RIPE NCC) serves Europe

timber onyx
#

Holy shit you guys are still talking about this

long raft
#

its better than which languages we like or dislike

static shuttle
#

this is a map the the rir's of the world

#

basically isps get their addresses from them

#

if they are out then how could you get a ipv4

long raft
#

watch and find out

#

im willing to bet ipv4 wont drop off a cliff in the next year in europe

static shuttle
#

but they cannot assign any more ipv4 addresses

#

interesting looks like in turkey everyone has ipv6 native support with very few having ipv4

timber onyx
#

@long raft i legitimately take offense to that response

long raft
#

? Which

timber onyx
#

its better than which languages we like or dislike
@long raft

long raft
#

I can't imagine how that's offensive

timber onyx
#

i dont know shit about this, i actually find it useful to know which program is what

long raft
#

ah but opinions on languages are so ... religious. ive been in a thousand discussions about why languages are better or worse and it kind of gets old and leads nobody to any different conclusions

#

everybody sticks with what they know already

timber onyx
#

well in case i havent told you all i know is C++ and barely at that

long raft
#

every programmer has a golden hammer

timber onyx
#

well if you hadnt told me that visual basic was old i would still be trying to learn it

#

i legit learn stuff from this

long raft
#

i didnt mean dont learn visual basic. it has changed a lot since its inception. c++ is ...older

#

c++ is 1983?

#

maybe its not older, im not sure. 🤔

timber onyx
#

now im extrenmely confused

long raft
#

all i mean was visual basic is not a good language, but visual basic.net is, which is totally different

#

i think visual basic 1.0 is some time in the 90s, so c++ is older

timber onyx
#

also today i talked to somebody in an computing related program and they told me that they're learning more and more java instead of python which is what the course used to be mainly about

long raft
#

but frankly knowing c++ makes learning all these other imperative languages easy. because c++ is probably one of the biggest languages of all time

timber onyx
#

i thought python was new

long raft
#

yea i ... want to say python is like the 90s

#

im not sure the age of a language means its good or bad tho

timber onyx
#

yes but why learn java

#

why would you ever do that intentionally

long raft
#

you learn the language for the projects youre gonna work on shrug

static shuttle
#

age doesnt tell you how good the language is

timber onyx
#

what about pascal

long raft
#

pascal is 5 star language. but dead

static shuttle
#

different languages can work better or worse for a project

timber onyx
#

that's pretty much why im trying to not be a one trick pony

#

C has been really useful for hardware stuff but im scared that if i need to learn something else in the future i'll be shit out of luck

static shuttle
#

like realistically if you are just handling http requests you dont need c

#

no need

long raft
#

cant really go wrong with java or javascript or (eww) python

static shuttle
#

python is great

#

whats bad about it

long raft
#

if your metric for measuring python is "do i already like python?", and you do, then yes its great

#

realistically i think people learn python solely for the libraries. and here we are arguing about the merits of a language again

static shuttle
#

well its a easy high level language with massive community support

long raft
#

so is java and c#

static shuttle
#

java has one of the largest communities tho

long raft
#

i think python is more welcoming to non-computer science majors

#

but ya know R has a big community and its awful

#

php has a big community, also awful

static shuttle
#

well when you go to a lower level language people expect you know more

#

due to the more complex nature

long raft
#

ironically C is less complex than python

static shuttle
#

how so

long raft
#

much smaller language, easier to learn

static shuttle
#

ha last time i delt with c i had to manage memory crap

long raft
#

you have to pay attention to memory in every language, really

timber onyx
#

Hey im figuring out memory crap right now at school

static shuttle
#

never had to in python

long raft
#

if thats true, then youve never built a big enough program in python

#

garbage collected languages are implicit memory management, and C is more explicit

static shuttle
#

well yes i am sure you have to at some point but if you do then it wont be as in depth as c

timber onyx
#

Is python a heavy program. How small of a ram does a device need to use it

long raft
#

memory management is sometimes more complex with garbage collection

static shuttle
#

python isnt really heavy

long raft
#

the language definition for python is more complicated than C, like the actual BNF

timber onyx
#

Yes but is it “i need every single octet i can use” light

long raft
#

so much of C is done with the external libraries

timber onyx
#

I legitimately have no idea what i would do if i used C before the internet

long raft
#

books

timber onyx
#

Heresy

long raft
#

Linux man program

#

Manuals were a way of life

static shuttle
#

they still are

long raft
#

Stack overflow is the new world order

static shuttle
#

a lot of times stack overflow people will not give you the direct answer without you putting in some work

long raft
#

Pretty amazing to get free answers tho at all

timber onyx
#

I do take for granted how easy it is for me to look up a specific chip im using and know everything about it from the plastic it’s made of to how well it can handle heat

static shuttle
#

you can get anything from online

long raft
#

Not the vivox api documentation... oof 💢

static shuttle
#

i bet they dont even give it to their own customers and they just have to guess the api

#

thats why it breaks all the time

long raft
#

i suspect everything about it is licensed, including the instruction manual

static shuttle
#

imagine licensing a manual

long raft
#

it sounds plausible to do, especially if they had proprietary info in there they wanted to keep secret

barren quarry
timber onyx
#

licensing a manual sounds like something google would do for its magical algorithms that keep fucking up

frozen talon
#

@barren quarry thats #off-topic

lusty fable
#

@strong pawn sure m8

strong pawn
#

what

lusty fable
#

I am welkitends

strong pawn
#

added

viral terrace
sharp breach
#

@viral terrace One of my bots. Uses Eris (JS). Listens for reactions and then assigns appropriate role based on the reaction. ReactionRoles or Zira would be a similar bot.

viral terrace
#

thanks

#

its just in this server i only see 2 bots

#

2 Dyno bots

languid harness
#

Its hidden between the few hundred thousands of people KFClol

wise burrow
languid harness
#

no need

#

Python is smort

#

we need no semicolons, just use break

kind glacier
#

Don't hate on Python

#

while on the topic

languid harness
chilly marlin
#

12 hours of code, 12 more to go

hard ivy
#

Hi guys can anybody fill me in on why they still havent added clan tags am I underestimating the effort involved (seems like a simple String concatenation)

coral sundial
#

Other priorities

pure sierra
#

@hard ivy devs have said that its because currently the game runs of steam name so making it run of custom names will take some work, but your right you would think they could add a simple option in the settings the prefix your steam name with something

exotic steppe
#

add in them then having to do customer service type tasks when someone uses anything they consider forbidden for a name

meager rampart
#

Imagine the dozens of customer service requests they would receive!

barren quarry
#

yahtzee's dev diary series is a godsend

fickle aurora
#

to be fair the only 4 things we ever needed (and still need) were transistor logic, assembly, C and C++

#

all the other stuff relies on runtimes because people don't want to actually learn how electronics work and care about stuff like memory management

#

that's why so many games can barely host 20 players, while EVE can have 4000 player battles all in one screenshot... and it's not a problem with graphics, since you know, EVE has some of the best graphics, in fact it comes down to how well you optimize things like data storage and transmission ... 1 kilobyte multiplied by 20 players is 20kilobytes, and of course transmitting that data, it now becomes 20KB*8 bits per byte = 160 kilobits, and if you need to transfer that in one second, all your players must be able to download at a constant rate of at least 160kbps each and your server must be able to send data at at least 20 players x 160kbps= 3.2mbps constantly

static shuttle
#

that has no baring on runtimes

fickle aurora
#

I can tell you right now voice chat uses 30-100kbps, you're better off allowing people to just disable it completely if they want to use an external voice chat

static shuttle
#

and just because the server needs to handle that much doesnt mean the clients need to

#

ya if i sent that much data on a server i would not be able to host it

fickle aurora
#

with a program like murmur, I can configure it to use high definition audio which is better quality but perhaps more bandwidth, or telephone quality which is very low bandwidth, but in foxhole for example, there's one hard coded setting and it's not possible to make that more efficient or sound better

static shuttle
#

i have 5 down .4 up and can host a gmod server fine with 6 people

#

also in discord i can change the bitrate

#

discord can do 8kbps

fickle aurora
#

yes bitrate affects quality but you can turn it down if someone like me for example, who has a throttled internet connection wants something low profile

#

and yes in fact it is a numbers game, servers have to relay data to every client, that's why like I said, your servers are taking a huge performance drain on every bit of data you need to relay to the clients

#

it's why voxel games were fail right from the start

#

not everyone has massive data limits; if you're in canada, most of the country has 20-100GB data limits and if you love voxel games, well you're going to blow that limit in a week or less

static shuttle
#

i live in canada and have unlimited

fickle aurora
#

well you are probably in a city I guess

#

small towns or more isolated areas have some pretty strict data limits

static shuttle
#

very small town with 0 competition

#

running on good old dsl

#

amazing isnt it

fickle aurora
#

it's great to run a small IRC network if you want to test how data relaying and traffic works, it's actually a great way to learn

static shuttle
#

i mean i have worked with the rcon protocol

#

and sniffed the packets being sent and how everything works

fickle aurora
#

there are so many things involved, like for example, how to relay data to clients - you can use the dev/poll, kqueue, select

static shuttle
#

sockets

#

just push data that way

#

ez

fickle aurora
#

some servers like the dovecot mail server uses time based data, so if your server time changes, the server literally cannot work and it core dumps lol

#

that is a massive pain in the rear, that's why most people don't put mailservers on a box with other services

static shuttle
#

are you confusing this for https?

#

as with https if you change the time everything get screwed up

fickle aurora
#

it's a mail service not webserver

static shuttle
#

does it use encryption

fickle aurora
#

usually does, yeah

static shuttle
#

well then its probably the encryptions fault

#

as the certificate would be invalid if time is messed with

fickle aurora
#

it's literally just a few minutes off that can cause dovecot to core dump

#

if the new time is in the future, it's ok but if set to the past, it thinks all the mail already in the box is there at the wrong time and then can't work

static shuttle
#

that seems like a limitation of just how the software marks time on the emails

fickle aurora
#

yeah there has not been a lot of better ways to synchronize servers other than time based synchronization

static shuttle
#

what do you mean by synchronize servers

fickle aurora
#

well dovecot works with a different service, like courier-mail for example, which is the underlying mail client that handles the socket and all that, whereas dovecot is the mailbox front end of the server

#

so in courier for example you can set up imap or pop mail

static shuttle
#

just apply a unix time stamp to the email

#

that way it wouldnt matter on the time of the server

#

it would read exactly how it is

fickle aurora
#

the alternative is just to use microsoft exchange server if you want everyone (well, everyone as in whoever buys data from microsoft) to read all your mail

static shuttle
#

well all your emails are stored unencrypted anyways so anyone can read them if they knew where to look

#

like google

#

same goes with anything with google or any other service

#

they can see it all

fickle aurora
#

the point is when you run your own mailserver, unless you give people access to the unix server, those mails are not accessible by google or anyone else

static shuttle
#

only service that i know of that encrypts is protonmail

fickle aurora
#

unless of course it's a microsoft server, lol

static shuttle
#

ez just do drive level encryption

#

or just encrypt all emails coming in

#

microsoft cant read it then

fickle aurora
#

all mailservers pretty much these days have encryption on the connection, but on a windows server the problem is backdoors

static shuttle
#

that why you dont use windows

#

linux is way better

#

for server stuff

#

and way more secure

fickle aurora
#

the great thing is you can use self signed certificates, since it's literally just encryption and no authentication part is needed

static shuttle
#

well yes you can

fickle aurora
#

using encryption for authentication was the worst idea of the 20th century, but that's my opinion

static shuttle
#

certificates are generally for connections where mitm can happen

fickle aurora
#

the problem is you really can't trust CAs even though they pay lots in donations to mozilla and others to have their root certificates trusted by browsers

static shuttle
#

for just data encryption there is no need for a certificate

fickle aurora
#

the public key is essentially a certificate

#

the only real difference is some extra attributes are added and there's a format done to it

#

of course it also holds the signature

static shuttle
#

public and private keys are used to verify the message

fickle aurora
#

you still have to use the private key to make a signature and the public key to make the certificate, but openssl (assume you are using this) just does some of the functions automatically

static shuttle
#

you encrypt a message with someones public key and only their private key canm see it

fickle aurora
#

yeah that's essentially how openssl functions

static shuttle
#

veracrypt i dont think uses any form of keys just encrypts and decrypts data using the password

fickle aurora
#

the certificates are really just used for authentication (the signature and fingerprint), but since they contain the public key inside them, you can use them to encrypt as well

static shuttle
#

but certificates are only used to very the source

fickle aurora
#

it's essentially that part that to me is basically the most insecure part of PKI

static shuttle
#

why is it insecure?

fickle aurora
#

the only way you can actually trust a certificate is if it's signed by a root CA which costs a lot of money generally, and a lot of root authorities have allowed hackers access to make certificates and they abused it a lot

static shuttle
#

certificates verify the source while the encryption is different

fickle aurora
#

the google CA is the worst one, unfortunately everyone uses it now because it's free

static shuttle
#

you do know that you can add your own certificates to anything right

fickle aurora
#

I have a big book on it so yes

static shuttle
#

i mean i wouldnt say its that bad

fickle aurora
#

one of the best resources that explains exactly how it works and why authentication with openssl is really bad

static shuttle
#

The root certificate is usually made trustworthy by some mechanism other than a certificate, such as by secure physical distribution. For example, some of the most well-known root certificates are distributed in operating systems by their manufacturers. Microsoft distributes root certificates belonging to members of the Microsoft Root Certificate Program to Windows desktops and Windows Phone 8.[2] Apple distributes root certificates belonging to members of its own root program.

#

so root certificates are distributed at a operating system level

fickle aurora
#

it's kind of misleading as an explanation, because it's basically a group of companies that paid to have their root CA added to each OS and each web browser so that any certificate signed by them is trusted

#

it's kind of like allowing mcdonald's to run canada because they have a lot of money

static shuttle
#

but they should have been tested by the companies that add them

#

as long as root has not been compromised there is no way a hacker can any foot hold

fickle aurora
#

there used to be a nonprofit org called StartCom based out of Israel that offered cheap signatures for like 60 bucks a year to have your certificate signed and backed by your passport and driver's license... unfortunately, the bigger companies didn't like it and made sure they were taken off the root CA list of everything, and then they sold their operation off to chinese

#

these days if you want a good trusted signed certificate I think the last price I saw was about $200

#

and that company did not even ask for your passport or anything

static shuttle
#

how is googles bad tho

#

what makes it so insecure

fickle aurora
#

google's CA is bad because they don't require any of your personal information

#

the whole idea behind a trusted CA is that every certificate they sign is trusted, especially if it's going to be used to authenticate something like your bank account

#

at least with StartCom, any hacker who tried to do anything bad, since they have your passport and driver's license they can track you down quite easily if you try to use their root CA to sign a bad certificate

static shuttle
#

but that cant effect you google signed per certificate meaning only that certificate is to 1 server or company

#

meaning that you cant just spoof it

fickle aurora
#

google practically opened the door to a millennia of hackers to sign bad certificates and try to break into banks

#

there is still a way to protect yourself, you can check the certificate signer and make sure it's a good one like verisign

static shuttle
#

how would a certificate allow you to break into a bank?

#

and if thats the case why havent i seen any reports of it

fickle aurora
#

the way it works, first they have to poison your DNS server or whatever DNS server you are using

static shuttle
#

right so now they see the bank site

fickle aurora
#

the way DNS works is when you go to something like foxholegame.com, whatever DNS server you are set to use is contacted, and that DNS server tells your computer what IP address to connect to in order to visit foxholegame.com

static shuttle
#

yes this is what encrypted dns is supposed to fix but that only allows them to change where you go but to do that they need their own certificate that is signed by the bank

fickle aurora
#

if you wanted to direct someone to a bad website, you would break into that person's router, because every computer now references the router's DNS cache, then they would put in code into the router's firmware that would make foxholegame.com for example resolve to a bad IP address

static shuttle
#

breaking into a router isnt as easy as it sounds

fickle aurora
#

routers are not perfect, they are very vulnerable and most people have no idea what DNS is in the first place

static shuttle
#

you would have to have a 0 day

fickle aurora
#

lol

#

well I am a hardware guy thats why I put together these cool projects from aliexpress

static shuttle
#

well i am sorry to say but you cant just break into someones router without a known exploit that would be patched or a 0 day

fickle aurora
static shuttle
#

looks more like you would have physical access to the router with that

fickle aurora
#

it doesn't have to be physical access to be able to upload firmware

static shuttle
#

but you need to break into the router using a exploit

fickle aurora
#

and that's precisely the thing

#

they are all exploitable unless you made your own system with a raspberry pi cluster and configured it all yourself

#

as in, instead of using a router, you use raspberry pi with several RJ45's to connect your network

static shuttle
#

so you are saying every router in the world has a exploit

fickle aurora
#

quite literally, unless you're updating it yourself all the time

static shuttle
#

and no a raspberry pi would not change anything

fickle aurora
#

oh, you mean, self-updating, that's even easier for attackers

static shuttle
#

at this point you might as well say anything has a exploit

#

even a raspberry pi

fickle aurora
#

yes theoretically

#

but making your own system, there's no mass produced system that a hacker can figure out and reproduce his exploit on it

static shuttle
#

so your logic is flawed to give up a router designed for network communications for a general purpose computer that would also be exploitable

#

ok but what software would you run

fickle aurora
#

the way they do it is they buy the same hardware everyone else buys off the walmart shelf, and they look for how it works (sort of like what I do) and figure out how to break into it, then they develop a plan to break into others based on that

static shuttle
#

you need a firewall

#

nat

#

dhcp

fickle aurora
#

now the way this ties into root CA's is that the certificate authenticates the domain name to the IP address

#

so if the IP is a bad server, the certificate should point that out

#

however, if the hacker can use the root CA to sign his certificate, he can just use your domain for his IP on his certificate

#

and now your browser trusts it

static shuttle
#

a certificate proves that the holder uses that domain and if the ip changes as long as the domain is the exact same it doesnt do anything

fickle aurora
#

the only way he could get you to use his bad IP is through DNS poisoning but that is not a difficult process these days

static shuttle
#

that would mean you would have to click on a bad link in the first place

#

or the bank has a intrusion

fickle aurora
#

doesnt have to be a bad link

#

if the DNS is poisoned, you are redirected to the bad IP no matter what

static shuttle
#

most people get to the ban using google meaning the chances of getting a bad link are basically none

fickle aurora
#

any link you click on will refer to whatever DNS server you're using

static shuttle
#

but again you are not just changing dns records that easy

#

routers dont even expose anything to the internet

fickle aurora
#

by default when you connect to a router, your computer automatically sets DNS to the router

#

every router (there's no router that does not do this) uses DNS caching

static shuttle
#

yes now how are you going to get into a firewalled router that does not open anything on it wan port to new connections

fickle aurora
#

the modem sends the ISP's DNS info to the router, then the router forwards you to the DNS servers of your ISP and internally has a DNS cache which is like a history list of previous domains you tried to resolve and it gives you an offline sort of resolution

#

by poisoning the router's DNS you need to store a domain with a bad IP in that cache

static shuttle
#

your pc has a dns cache as well

#

that it pulls from first

fickle aurora
#

yes the hosts file

static shuttle
#

no thats static ips

fickle aurora
#

it's not technically DNS but I know what you mean

static shuttle
#

i am talking dynamic

fickle aurora
#

ah yes, windows 10 stuff

#

most OS don't cache DNS but modern windows versions probably do

#

extremely old routers from the early 90s also did not have DNS, you had to manually set DNS servers in your connection

static shuttle
#

actually you can run that on windows 7 as well

fickle aurora
#

the one point that bugs me is I can't force windows 10 to stick to my custom DNS servers, it always ends up changing back to default, even if I change it in the registry

static shuttle
#

i can just change the adaptor settings

#

not like it matters tho as again nobody is going to get into your router

fickle aurora
#

windows 10 will keep changing it back to default though no matter how many times you change it

#

that's a real bad way to look at security, because it does happen a lot

static shuttle
#

i havent had any issues

#

i had it set to 1.1.1.1 for the longest of times

#

never changed

fickle aurora
#

well I guess if you have enough money in the bank that someone wants, it becomes a bigger issue lol

static shuttle
#

till i set it back to automatic

fickle aurora
#

these days the bad guys buy your data and they know you're wealthy or not and they target the people with money

static shuttle
#

thats a targeted attack and would require a exploit

#

also Many cache poisoning attacks against DNS servers can be prevented by being less trusting of the information passed to them by other DNS servers, and ignoring any DNS records passed back which are not directly relevant to the query. For example, versions of BIND 9.5.0-P1[2] and above perform these checks.[3] Source port randomization for DNS requests, combined with the use of cryptographically secure random numbers for selecting both the source port and the 16-bit cryptographic nonce, can greatly reduce the probability of successful DNS race attacks.

#

also there is dnssec and dns over https

fickle aurora
#

there's a lot of fancy words behind tech that never really worked or never really did anything

#

dnssec is a great idea to prevent spoofing of a DNS server, but how many computers have a built in system to check if a DNS server is legitimate or not

static shuttle
#

so are you telling me the specifications behid dnssec are useless

fickle aurora
#

you'd need a DNS trusted list like the CA root list but there is no DNS trusted list anywhere

static shuttle
#

also dns over https doesnt work

#

DNSSEC works by digitally signing records for DNS lookup using public-key cryptography. The correct DNSKEY record is authenticated via a chain of trust, starting with a set of verified public keys for the DNS root zone which is the trusted third party. Domain owners generate their own keys, and upload them using their DNS control panel at their domain-name registrar, which in turn pushes the keys via secDNS to the zone operator (e.g., Verisign for .com) who signs and publishes them in DNS.

fickle aurora
#

yeah DNS still uses the old port 53 unencrypted, but from one DNS server to a master DNS server you can have an encrypted link

#

so there's a whole other topic of DNS servers connecting to each other rather than the issue of DNS clients trying to resolve names

#

so when you buy a domain name, your ISP asks you for your nameservers, generally like for me, I use one nameserver instead of two, just because

static shuttle
#

well if not directly a client issue then something is fucked with dns servers and at that point might as well go back to the old days of typing in the ip

fickle aurora
#

I got a letter from circa about my use of only a single DNS server, apparently I was not conforming to the specification, but what do you know, they have little control of what I can do lol

static shuttle
#

well ya its a specification to have a backup

fickle aurora
#

anyway, so you tell the registrar which IP address you want to list as a nameserver, usually the IP of your server that you will run bind on

static shuttle
#

its recommended

fickle aurora
#

in my case it was for both ipv4 and ipv6 and I had to explain to them how it works because another client was interested in ipv6 routing and nobody there had a clue how to do it

#

the registrar's nameserver will point to your server when a query goes out for your domain name or its subdomains

static shuttle
#

what does that have to do with having one dns server

fickle aurora
#

bind, if it's running (hopefully it's running) should have a master DNS record in it for your domain name, something you must create, which is a zone file and it lists the time to live, who to email if they dont like your domain, and all the cool record lists including your reverse DNS because who does not love the idea of resolving your IP to your fancy new domain name

static shuttle
#

when you create a sub domain off of your domain it will push the ip to the root servers if someone asks for that domain it first goes to a non authoritative dns server and if no cached then goes to the root

fickle aurora
#

well, generally, you should have two or more, and it's kind of pointless these days because servers are never down except when a tornado hits the datacenter

#

long ago when the specification was created, it was common for servers to be down for 8 hours up to a week

#

now people panic if the server restarts on its own or makes a funny noise

static shuttle
#

thats like saying you shouldnt have a safety net when going on a rope across a cliff

#

because most people dont fall off

fickle aurora
#

the time to live tells cache servers how long to store the record in cache before deleting it and retrieving it again

#

well, mostly slave servers but that's kind of a politically incorrect word these days

#

usually your data center is the slave server, because you want to host the records on your own server and the main data center will have its own server dedicated to providing slave DNS for secondary nameservers

#

to me it was just extra hassle, I went with single nameserver

static shuttle
#

secondary name servers are just another dns server that usually runs on a separate server or in a separate datacenter so if the first one goes down then the secondary is used

#

it has no ties to the primary server

fickle aurora
#

well there can only be one master zone file

#

the rest are slave zone files and they bascally just contain basic stuff and then a key that is exchanged with the master to authenticate

#

but the primary nameserver contains the master zone file and the secondary server has to basically copy the records from the primary server, and when the primary server goes down, the secondary one carries on providing the records when someone wants to resolve a domain

static shuttle
#

zone files just transfer data between the 2 dns servers

#

but also has its own connection to a root name server to resolve new requests

#

or expired requests

fickle aurora
#

you can do a sort of round robin but that is a bad idea, where you use multiple master zone files... your registrar will complain about it eventually

#

if you don't follow spec, they can tell you to fix it or cut off the service, which of course if you make mistakes like I did learned the hard way a lot

#

as for more than 1 nameserver it's not something most providers care about anymore really

#

with dnssec, the idea is your connection between the master and slave servers is protected from spoofing

static shuttle
#

well they are protected yes

fickle aurora
#

it does not protect the end user really, just on the server level

static shuttle
#

well it kind of does

fickle aurora
#

routers are not really slave servers since they dont store zone files, they just basically keep a history of sites you browse basically, it's a great way for cops to see what you do on your computer

#

hence why when they raid people one of the things they take for forensics (hardware guys) is the router of course

static shuttle
#

but that cache isnt permanent

#

it expires and is lost when power is cut

fickle aurora
#

it's really easy to get the data off those, it's not stored with a password protection, there's no encryption, and it's not mixed with much other data

static shuttle
#

but you need physical access

fickle aurora
#

you'd be surprised what you see under the plastic case

#

some have a 2302 battery

static shuttle
#

thats for date time and settings

#

not for dns cache

fickle aurora
#

and for keeping memory alive

#

it doesnt take much power to do so

static shuttle
#

so does your pc keep memory alive when you restart?

#

same thing

fickle aurora
#

if you notice on a PC, your bios/uefi data is basically stored like that

#

remove the battery even for a second and that data is back to default

static shuttle
#

but not memory

#

memory is lost on no power

#

the battery does not supply memory

fickle aurora
#

it can cause some really bad troubleshooting problems if you are trying to install a new hard drive or something on an older machine with a dead battery

static shuttle
#

no it would just cause you to reselect the defaul boot device

fickle aurora
#

volatile memory can be saved with a battery if it's wired for that

static shuttle
#

but its no there is no need to

#

thats wasted battery life

fickle aurora
#

so if you remember nintendo, the first one, a battery was used to keep your save game files active on volatile memory

static shuttle
#

on non essential data

summer bobcat
#

I have a hosting on Namecheap now, and all these options are confusing me

#

Should I turn on DNSSEC?

cunning forge
#

Anyone here a Java nerd?

long raft
#

i know some java

cunning forge
#

So I've been trying to make a program using switch case.

#

However, for some reason, it's not allowing me to scan inside a case.

#
import java.util.Scanner;

public class Trabalho {

    public static void main(String[] args) {
        System.out.println("1 para CD, 2 para livro, 3 para software: ");
        Scanner leia = new Scanner(System.in);
        int valor = leia.nextInt();
        double frete;
        String nomeb;
        frete = 6.50;
        switch(valor) {
        
        case 1:
            System.out.println("Digite o nome da banda: ");
            nomeb = leia.nextLine();
            System.out.println("Seu CD da banda "+nomeb+", está no valor de: "+frete);
            break;
            
        default:
            System.out.println("Número inválido.");
        }
        
    }

}
#

When the console reaches case 1, it doesn't allow me to type the band's name. Due to this, it leaves a blank space where "nomeb" is supposed to be.

#

Is that a syntax error from me or a "switch case" limitation?

coral sundial
#

I dont know java, but I am pretty sure a switch can handle that, since its just an efficient way of making if statements

long raft
#

it all looks correct to me...

#

does it work if you remove the printlns? i cant really imagine any reason for this

#

i guess you wont know if it worked lol. well maybe if you remove the println right after case 1:

#

ooooh i see why

#

nextInt doesnt read the endline character

#

you just need to slap in another nextLine() or instead do int valor = Integer.Parse(leia.nextLine());

cunning forge
#

I'm still a beginner. Could you explain with details what I did wrong in the code?

long raft
#

imagine you read from a text file instead of the console
now you are reading the numbers, but not the endline marker (or enter key)
when you try to read a string, it's already at the end of the last line, it's blank
so after reading the number you need to read/consume the endline. in unix its just character #13 and in windows its character #10 (line feed) and #13 (carriage return)

barren quarry
#

/n

long raft
#

or \r\n on windows

#

the code is fine, but nextInt() does not work how you expect

cunning forge
#

Oh. It's like the scanner already had a value to it and couldn't read the string.

#

So I needed to either create another scanner or "jump to the next line".

#

So a scanner has 2 informations:
The value for the switch
The string put in the cases.

#

So in the last suggestion you put, the code is reading the string and wrapping it in the int variable. Essentially creating 2 lines.

#

Correct?

long raft
#

uhm like this, input page looks like:

1
test string

after nextInt() the scanner is here:

1|
test string

but you expected it to be here:

1
|test string
cunning forge
#

Oh okay I get it.

oblique hare
#

ok can anyone give me a quick run down on ajax?

#

just trying to touch up my skills and realized that I dont remember much about that

long raft
#

ajax is just a call from the browser to your web server requesting specific data (not a whole page) in json or xml format, and then javascript using that data on the client side

#

could be done with websockets too

pure sierra
#

use jquery for you ajax

hard ivy
#

or just use fetch.

barren quarry
#

xmlhttp works as well

#

its useful especially when it comes to requesting api data because i request it very often and need to check etags

#

i dont think fetch has etags

#

but ive seen that fetch is really simple to use

fluid stream
#

Charlie Omega Omega Malibu

umbral mulch
#

lmao

#

the fool

#

you cant beat dyno

#

lmao automute inbound

#

gg

coral sundial
#

anyone familiar with openCV?

coral sundial
#
    int index = GetRandomValue(1, 9);
    int card = cards[index];
    cards[index] = 0;
    
    if(card == 0) card = Dealer(0);
    return card; ```
#

I am having an isuse with my dealer

#

how do I fill the array back in to its starting position?

#

cards[] = {5, 4, 4, 3, 3, 3, 2, 2, 1, 6}; isnt valid code

#

a for loop seems too complicated

barren quarry
#

@coral sundial why is your array in curly braces

coral sundial
#

because I have no clue how to fill that array with a for loop

#

in that order

timber onyx
#

@coral sundial did you try specifying the number of cases in your array

timber onyx
#

@coral sundial also arrays start with 0, not 1

long raft
#

make a copy with the starting deck, and then just copy it over...

for (int i=0;i<10;i++)
  cards[i] = starting_deck[i];
#

what language is this even.

coral sundial
#

C

#

With raylib as framework

#

@timber onyx oh shit, good observation

#

Didnt catch that

rain gazelle
#

altho ıt might just be a compiler thing I just took a quick peek at the code u share but I haven't seen any problems

#

and @timber onyx array starts with 0 but as far as I recall I don't remember anything about values needing to be starting with zero

hoary dune
#

he was talking about this Spartan

#

int index = GetRandomValue(1, 9);

#

that would cause the cards[index] to never be able to get the first array position

#

since it could not be 0

coral sundial
#

and if it where nine, it wouldnt be inside the array

hoary dune
#

^

coral sundial
#

this actually caused my program to crash looking back on it

#

it would return some memory value I think.

long raft
#

im ignoring everything rem says because i learned programming on BASIC

#

only other BASIC programmers will laugh at that

languid harness
#

I always think I am having a stroke reading C because it is like Python but its Not™️

orchid needle
#

In python.... no strong types, python is interpreted bytecode (not cpu instructions), no concept of a pointer, designed to facilitate OOP. Keywords are largely different other than basic control flow if/else

#

I guess if you code a lot you become language agnostic except to stuff like clojure/lisp or asm

#

also whoever said that code was C is wrong, it's C++, which you can tell because there's an object being constructed (Dealer)

coral sundial
#

no its c

#

the dealer is a function

#

that returns a card

#

I guess you could call it object orientated programming in the literal sense of the word lol

#

but its using a framework that also accepts c++. I have used structs to define the position of the cards on the screen

orchid needle
#

@coral sundial did you end up figuring it out? Also interesting aside: in C++ you can overload typecasts such that if you declare 'operator int() const { return foo(); }' in a hypothetical dealer class then Dealer(0) would have a conversion to int to make that code correct in C++, if it were a class and not a function where foo() is a callable function.

orchid needle
#

A better alternative is to use memcpy(void *, void *, size_t).

E.g.: memcpy(cards, starting_deck, sizeof(cards));

coral sundial
#

I did

#

with that information I constructed

{
    static int cards[] = {5, 4, 4, 3, 3, 3, 2, 2, 1, 6};
    
    int index = GetRandomValue(0, 9);
    int card = cards[index];
    cards[index] = 0;
    
    if (init == 1)
    {
        int startingcards[]  = {5, 4, 4, 3, 3, 3, 2, 2, 1, 6};
        for (int i=0;i <= 9;i++) cards[i] = startingcards[i];
        return 0;
    }
    
    if(card == 0) card = Dealer(0);
    return card;
}```
#

I could use sizeof to determine the max random value but I havent been bothered yet

orchid needle
#

I'd make startingcards static as well, otherwise its provisioned on the stack each time dealer is called unless the compiler optimizes it

coral sundial
#

I mean I could, but its not that big of an issue since the only time I need to regenerate the deck is if the round ends

orchid needle
#

oh of course, but it's good to develop good habits/insights ^^

coral sundial
#

to be honest, I want to move all integers to the main, so I can work more with pass by reference stuff

orchid needle
#

I see code all the time where people say they'll refactor it later but it goes into production even though it was meant as band-aid fixes

coral sundial
#

hey if it works ¯_(ツ)_/¯

#

xD

orchid needle
#

wheezes XD

coral sundial
#

I mean my previous dealer worked as well

#

but it was hell to adjust the cards

#

I had 7 integers, 1 to 5 + bomb, an integer tracking the total amount of cards

#

and then a switch case selecting a random card

#

and subtracting that

#

that was fun

#

not

#

but I dont really see why I should refactor this again. its somewhat done as a personal project and I want to move on to 3d vectors

orchid needle
#

I'd also look into implementing a state machine in C

#

seems like it'd lend itself well to a dealer-esque thing like what you've got going on

coral sundial
#

LOL

#

Thats upsetting

#

my graphic plotter didnt save

#

oh there we go its back

#

how do 3d math functions work anyway

#

also how does the scope of a structure work

#

I declared one but I can acces it from literally anywhere. dont have to pass it through functions

hoary dune
#

you guys all work in programming field or just a hobby?

tidal granite
#

I thought the scope of a variable, function, method, or object was determined by where it was declared. If it was declared within a method or function, then only accessible within those braces. If defined within a Class, then any object of that class should be able to access it?

#

If you declare the struct as global in the main function, it should be accessible anywhere.

#

@hoary dune I just started reading the last bits here. I used to 'code' as a hobby.

#

I miss-read Rem's previous post.

#

I declared one but I can acces it from literally anywhere. dont have to pass it through functions
@coral sundial I read 'can' as 'can't'.

orchid needle
#

@coral sundial can you show an example of how you're using the struct, such that you can 'access it'?

#

I presume you don't mean it's members, but rather you're able to make a declaration using its type?

#

@hoary dune Yup, though currently unemployed ;p

hoary dune
#

should say 'freelance'

#

:^)

orchid needle
#

ahaha, yes of course

coral sundial
#

I am going to study mechatronics

#

I actually already did but dropped out due to math

#

doing a math course and making silly things with C right now

#
{
    int width;
    int height;
    int x;
    int y;
    int card;
} dealer, deck;

void InitDealerCard(card)
{
    dealer.width = 160;
    dealer.height = 160;
    dealer.x = DscreenWidth/2;
    dealer.y = DscreenHeight/2;
    dealer.card = 0;
}

void InitDeckCard(card)
{
    deck.width = 160;
    deck.height = 160;
    deck.x = deck.width;
    deck.y = DscreenHeight-deck.height;
    deck.card = 1;
}```
#
    InitDealerCard();
    InitDeckCard();```
#

calling them from the main with that

orchid needle
#

@gritty nexus You're right, it's about where you declare it. If it's declared on the stack, the intuition behind scope is pretty clear - a stack frame is created and then subsequent required data is put on the registers as needed etc etc) if it's static and declared it gets put in the .data segment where it can be accessed from anywhere, heap = dynamically allocated and doesn't get freed despite losing scope (resulting in memory leaks) which is something to be careful about, etc etc

tidal granite
#

looks like in your functions, you would need to use card, in place of dealer and deck usage.

#

because dealer and deck are both 'card' it doesn't throw any errors, assuming it compiles.

coral sundial
#

it works perfect

#

the only thing is I can call it from anywhere. as if card is a global variable

tidal granite
#

good, then when you declare struct card in the main, it is basically global, as far as I can understand.

orchid needle
#

line 8: } dealer, deck;

^ this line is a declaration, the variables are global (.data segment) and can be accessed anywhere, independent of the stack (and related scoping)

#

they are zero-initialized

tidal granite
#

ah, this must be C, then.

#

Been about a dozen years since I had to program in C.

orchid needle
#

I love C as a concept

#

but only as a concept

tidal granite
#

in-line declaration of variables.

#

streamlined, but not 'beginner friendly

coral sundial
#

Ya'll dont realize C is practically the same as C++. but C++ is well. C but ++

tidal granite
#

C++ is object oriented, where as C functions more or less without that specific support for 'classes'

#

procedural.

orchid needle
#

All C is C++ code, not all C++ is C code. Lots of abstractions and new concepts to learn in C++

#

It's certainly much safer to use

coral sundial
#

thats why C is a good languange to start with, has all the basics. but its just a pain sometimes

tidal granite
#

the constructors, casting, abstract inheritance, and compiler specific 'catches' is nice.

orchid needle
#

destructors, move semantics, lambda expressions, templating

tidal granite
#

^, those too.

coral sundial
#

that moment when you realize you havent ever needed those

tidal granite
#

Sorry guys, I need to go move the Squad storage items. See you around next time. Good luck with the dealer.

orchid needle
#

variadic arguments, parameter packing...

coral sundial
#

anyway back to structs. line 8: } dealer, deck;
this is the line that makes dealer.stuff and deck.stuff global? how would I not make those global?

orchid needle
#

ciao ciao ^^

#

remove "dealer, deck;"

#

then declare them in the scope you want

#

struct card dealer;

coral sundial
#

huh

tidal granite
#

right, ignore mine

coral sundial
#

interesting

orchid needle
#

typedef struct card card;
card dealer;

#

you'll see stuff like that a lot if you keep dabbling

coral sundial
#

I took a look at the engine code and I see alot of stuff I dont understand LOL

#

like this.

    float x;
    float y;
    float z;
} Vector3;```
#

what is happening here? is vector3 global?

orchid needle
#

Vector3 is a type, it's not a variable

#

in your example, it's a zero-initialized variable because it doesn't have the typedef keyword

coral sundial
#

and how do i acces x, y and z

orchid needle
#

you need to make an instance of it on the stack, heap or w/e

#

Vector3 exampleVector;

#

if you didn't have type def and removed the Vector3 at the end, you'd have to do

struct Vector3 exampleVector;

coral sundial
#

and that creates a new vector3 with that name?

orchid needle
#

yup

coral sundial
#

and then I can acces it with name.x etc.?

orchid needle
#

yes

coral sundial
#

can I do the same with my card struct?

orchid needle
#

you sure can

coral sundial
#

and it just creates a whole bunch of new variables automatically?

orchid needle
#

communication error what do you mean xD

coral sundial
#

like, I dont get what its doing adres wise

#

if I declare an integer. it reserves a bit of memory with an adress

#

what the fuck does a struct do

tidal granite
#

reserves more memory

coral sundial
#

it feels like handholding

orchid needle
#

well... first off... it depends on where you're allocating that integer lol

tidal granite
#

hides

orchid needle
#

I mean... a struct is just a compound type

tidal granite
#

it may have different types of data in it's allocation.

#

similar to an Object

#

you might want a Phone book struct, for example, that has String,String,Int, etc.

orchid needle
#

you don't care about addresses unless it's on the heap, generally

tidal granite
#

so you might pass a Phonebook to a method to create a record of a person's Name, Number, and Street address, or some other data.

orchid needle
#

in c, you'll want char *'s instead of strings ahaha

coral sundial
#

oh so its like a friend book. and you pass it to your friends to write in?

orchid needle
#

it's like a printing press, and you give it blank paper

#

and you tell them what words you want on it, and they give it back to you, and you can be confident the pages you didn't tell them to print text on will be blank

coral sundial
#

so to speak in code. they declare their struct friend name. and they get to fill out all the funny variables you put in that struct?

tidal granite
#

struct myBook { float weight; float height; bool isMyFriend;}

coral sundial
#

and whenever they declare their struct version. the compiler reserves some memory for all the integers and strings you make them fill out. for every friend filling out their own struct

tidal granite
#

myBook.weight = 125

#

myBook.height = 1.2 (meters)

#

myBook.isMyFriend = true

#

something like that would be initialized

#

where as a function might look like this

orchid needle
#

uhhh

tidal granite
#

I might be way off

orchid needle
#

it would if it declared a variable called myBook

tidal granite
#

right, I forgot the in-line declaration earlier

orchid needle
#

and Rem, I think your understanding of it is correct

#

if I'm not mistaken by your word choice XD

coral sundial
#

yeah me things its correct too xD

orchid needle
#

yes

#

except of course you can tear out pages

coral sundial
#

do you perhaps also now how to enable serial communication between your computer and an arduino?

orchid needle
#

have you checked the arduino's datasheet?

coral sundial
#

I got a book for this dont worry

orchid needle
#

I haven't worked with microcontrollers in a hot minute

coral sundial
#

but that runs through the console as far as I am aware

#

it would be cool if I could make the framework I use communicate with the arduino

#

I find it a bit odd, as serial communication is listed as a beginner topic

#

but hot damn I havent wrapped my mind behind it yet