#code-talk
2 messages · Page 8 of 1
Can you post the whole code here? It is difficult to help you when I cannot see the whole line
Yeah holdup
I am working around it with a for loop and a switch lol
{
for(int i = 0; i < 5; i++)
{
switch(i)
case 1:
ArrayStudent1[i] = cijfer1;
break;
case 2:
}
}
int main()
{
int cijfer1 = 100;
int cijfer2 = 200;
int cijfer3 = 300;
int cijfer4 = 1;
int cijfer5 = 22;
int ArrayStudent1[5];
plaatsCijfer( ArrayStudent1[5], cijfer1, cijfer2, cijfer3, cijfer4, cijfer5);
return 0;
}
Why the switch case stuff?
because the previous code wouldnt let me place a number series directly into the array
Give me a few minutes to finish something and I’ll try to understand your problem
lel its still not working
first thing I noticed is
Here you have an error.
It should be:
plaatsCijfer( ArrayStudent1, cijfer1, cijfer2, cijfer3, cijfer4, cijfer5);
You shouldn't specify the number of elements in the array since you already did.
okay
but then it gives me the following error
|8|error: subscripted value is neither array nor pointer nor vector||
let's take step back and can you please explain exactly what are you trying to achieve?
are you simply trying to put elements into an array?
I need to make a function that places 5 numbers into an array
for that I need to carry the array over from the main and the 5 numbers
oh okay i see
but I dont get it. the array never works when I try to place something in it in a function
honestly i'm not sure how to do it since you already set the 5 number independently of each other.
let me construct smth
well I have a solution but it is not a good solution at all
it uses switch case like you did and 1 function to push the values
:/
I am having the same issue
{
for(int i = lengte; i < 0; i--)
{
printf("%d", array[i]);
}
}
int main()
{
int lengte = 6;
int array[lengte] = {7, 3, 6, 6, 2, 1};
keerom(array, lengte);
return 0;
} ```
|7|error: subscripted value is neither array nor pointer nor vector|
where printf is located
I dont understand arrays
void keerom(int array[], int lengte)
{
for(int i = lengte; i > 0; i--)
{
printf("%d\n", array[i]);
}
}
int main()
{
int lengte = 7;
int array[6] = {7, 3, 6, 6, 2, 1};
keerom(array, lengte);
return 0;
}```
okay this works
except that it either prints a number to few or too many
and for some reason I can no longer define the lenght of my array with a constant
i thought you couldnt do this that way lol
i thought you wanted to create an empty array and then push values into it through a function
I moved to the next exercise lol
you don't have to set the number of elements when initiating an array when you specify the elements in it
so array[] = { 7, 3, 6, 6, 2, 1}
oh aight
on the 5 number exercise stuff, are the 5 numbers known or the user can input them?
like if you can use scanf()
void pushValue(int arrayNumber[], int index, int value)
{
arrayNumber[index] = value;
}
int main()
{
int ArrayNumbers[5];
int i, input;
for(i = 0; i < 5; i++) {
scanf("%d", &input);
pushValue(ArrayNumbers, i, input);
}
printf("%d", ArrayNumbers[0]);
}```
well if you allow user input then it is a lot easier
owo
{
int lengte = 99;
char getal[99];
for(int i = 0; i < lengte; i++)
{
scanf("%c\n", &getal[i]);
if(getal[i] == '.')
{
lengte = i;
printf("%d", i);
break;
}
}
for(int i = 0; i <= lengte; i++)
{
printf("%c", getal[i]);
}
return 0;
}```
why does the break only work if I enter a double dot
because you have a new line in your scanf
scanf can only have the type
scanf("%c", &getal[i])
ohk
also what was that about not having to define the lenght of an array? because I have to define it when I compile
int arr[5]; (here the length must be defined)
WRONG: int arr[];
So ,basically, if you specify the elements you don't need to define the length.
not sure why the compiler would return an error tho
Aaah
But how can I define the length of an array then? Can I I just scanf a word and put it into am array and the define the length?
not sure 100% if i understand
but yeah you can scanf to a variable and use that variable as the length
at least I think it should work
For example if I write a word. I want to define how long it is
what do you mean by word?
oh you are going into strings now
lol man dont stress or it is going to be worse
i would recommend to first understand pointers before diving into strings
but well if you are short in time.
you need to use a library called
<string.h>
#include <string.h>
int main()
{
char word[80] = "monkey";
printf("%d", strlen(word));
}```
here is a basic code that returns the length of the string
use this website to understand the other functions in the library
@coral sundial you idiot XD
XD
strings are week 6
this exercise got scrapped like 2 days ago
I didnt notice
lol
mmmh
having trouble getting the sum of a float array
{
SumCards = SumCards + DealtCards[i];```
it works if sumcards is an integer
but not when its a float
@coral sundial have you declared sumcards as an integer?
right now yes
thats when it works
if I declare it as a float', it wont work
okay so now it works lol
no wait nevermind
{
static float DealtCards[5];
float SumCards = 0;
DealtCards[i] = kaart;
printf("speler kaart is %f\n", kaart);
if(i == 4)
{
for(int b = 0; b < 5; b++)
{
printf("kaarten voor speler1 zijn %f\n", DealtCards[b] );
}
for(int i = 0; i < 5; i++)
{
SumCards += DealtCards[i];
printf("%d\n",SumCards);
}
}```
why does sumcard return me 0 when its a float
Maybe because sumcards is a float yet at the end you print it as int?
yeah that might be it
weeeeird
I thought I fixed that but copied an older code
it works now lol
I wanted to work around it but lol
I wanted to copy my code but its probably too long for discord
@coral sundial pastebin
@sharp elm Do u guys use AI ,as Gradient descent to apply on any of your games ,because if not why not use a compression algorithm to optimize,as to improve foxhole player capacity and to prevent the bottle necks for server side and client side
@lone solstice sounds like someone who doesnt know how to do it; do it anyway, but if you understand it, make it more complicated and harder for yourself as a challenge
quiet bot i know how to do it it's just time consuming
and hell no im not doing that
it's 2:06 am and it's due tomorrow
looks like someone has made a planning mistake 
You can't make a homework assignment more complicated @languid harness
The rubric is specific
Then you go to a dumb school with stupid rules
@torn pasture I could change what I wanted to code if I asked premission
How can you change the implementation if the learning outcome is specific?
I understand some modifications to demonstrate your understanding but changing the outcome seems unlikely. In addition computer science isnt about mastery of a software tool but understanding the algorithms.
@languid harness planning whats that
Just reading your initial statement the main premise is flawed. The engineering principle is simplification not complication.
Also I did my homework in this channel the last 2 days
Hence @languid harness I'm sure your "school" has the big retard if you think like that.
classic
Anyhow, I am going to define the gods and go straight into the API of discord because discord.py is A. a succer, B. ugly and C. unusable if you want use it properly on a Raspberry
@summer bobcat hahaha
arrays start at 1 
see if you can figure out whats wrong here
so that would be...
14 town halls in abandoned ward
districts warfare
Haha.
i knew it. AW is already half of what it takes to win the war
holy moly, peeps come out of the wood work for an update.... 1k players
can anyone tell me what the go is with 3 different relic base types in api ? @zealous sonnet maybe ? are they just tiers like th ?
they're different types, but they're all considered the same tier
one's huge, the other 2 are medium sized
we use the same icon in game for them, but if you want to differentiate between the 3, you have the option to do so
ok
yeah i know that
eg load the url in your browser or by some other method
shit
they just not repeating the common base domain
i just realized that I wrote a doble slash
im stupid xdf
its all fine now, thanks
@pure sierra is https://foxholestats.com/ yours? Looks awesome!
yeah thanks !
Good time of day. Working on UE4 and Maya 3d 1-2 years. Searching for job. Can make animations and models, also BP programming.
You can apply for a job in clapfoot if you live in toronto
@barren quarry Living in Ukraine, ready for relocation
Да ладно
Dedication right there :)
you need to be canada resident i think to work for clapfoot
anyone here ?
do you know what the maximum production rate of shirts or for a factory ?
no
@pure sierra Just looked at foxholestats.com. Nice work! So the game has an api?
Cool, i'll have a look 😉
Tango Hotel India Sierra (space) India Sierra (space) Charlie Oscar Delta Echo
wrong type of code
Sierra Hotel India Tango (space) Whisky Alpha Romeo Delta Echo November (Space) India Foxtrot Alpha November Tango Romeo Yankee.
open sesame ?
open says I
"Shit Warden ifantry"? 🤔
its coded. obviously.
Such skillful code
@prisma forge yes
Does anybody know how the next technology gets decided?
@vagrant saffron i sent you a private message
Thanks
I have no idea what on earth this is supposed to mean, but I know it isn't code talk.
how dare you heathens come into this sanctuary and desecrate it
????????/
I did not do this.
I’m gonna be creating a discord bot soon and I want to use the warapi what do I need to do to make that happen?
@static palm depends on what you want to do
Most of the stuff you can do with warapi has already been done
I’m still learning about api’s. My understanding is, I can call for certain information about, in this case foxhole then it’ll return that information to me from the source. Right?
Yes
So I’m gonna use this playlist to make a discord bot https://www.youtube.com/playlist?list=PLbbLC0BLaGjoYVIoS6rms3aKtDtBJ4HtM
How do I implement the api into the bot? Or is that not how it works?
To implement the api into the bot you choose which endpoints to request
Then you write xmlhttp requests to pull data from those endpoints
And process it
I can give you some code examples if you want
Then again, depends on what you really need
Anything helps. I’m a little confused but I think I’m on the right track.
Maybe this isn’t what I need.
Give me a few minutes, i'll give you some code
@static palm so first question, what kind of data do you want to pull from api
You can request map objects
Casualties
Map list
War meta info
Everything is listed on the github page
@static palm https://pastebin.com/bSF2z5p3
here is an example
its not self sufficient code (it requires a bit of other stuff to work cause its just 1 module) but you should be able to get something useful out of it
Well i messaged hayden foxholestats.com so he could use my webhook to setup his dynamic region update messages. I also just setup a dynamic map for one of my channels. Those were honestly what i wanted so i guess i really don't need anything else. But i do wanna learn more about the api.
here is what my code does:
- it gets the list of currently active maps and updates it every minute
- While it does that, it also pulls the dynamic and static data
- Dynamic and static data is represented by 46 endpoints, 1 dynamic and 1 static for each of the 23 regions.
- These endpoints have a thing called an etag. Etag is a small number that doesn't mean anything by itself, but if it changes, it means something changed in the endpoint data.
- Thus, when we load the endpoints, we can first compare the etags, and if they match, we dont load the new data. This saves us a lot of resources and also allows us to check the data every 3 seconds.
- The rest is just putting the data in a mongo database
@static palm
I can guarantee that this piece of code is the most efficient way to handle the warapi data today
Thank you man
why stalin
Hotel Alfa Victor Echo Alfa November India Charlie Echo Delta Alfa Yankee

1
10111101 |= (1<<5)


Sierra Indiana Echo Golf Hotel Echo Indiana Lima
@fluid stream it's Sierra, Echo, India, Golf, Hotel
let's steer away from that shall we? @fluid stream
whats the matter man
let's
Whiskey Alpha Romeo Delta Echo November Sierra (space) Alpha Romeo Echo (space) Tango Hotel Echo (space) Bravo Echo Sierra Tango
Doubt
Negative Anvil callout is Fubar over
Hey which sorting method is best
you cannot ask a question without giving more context; sorting methods greatly vary in efficiency regarding sample sizes
the one where you get an overview of the different kind of things you sorted.
gdang it remlly
@summer bobcat it is always a topic of discussion, but there are many videos on it
https://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_of_algorithms has a good overview and comparison between different common sorting methods
In computer science, a sorting algorithm is an algorithm that puts elements of a list in a certain order. The most frequently used orders are numerical order and lexicographical order. Efficient sorting is important for optimizing the efficiency of other algorithms (such as s...
is there an api endpoint to view ingame tech?
quicksort is best, bladerikwr
@echo wolf no
@barren quarry do you know if tech is a standard rate now?
ive seen the foxhole tech bot
but im more interested in how it functions
have any insight you can share?
its dark magic
but basically it takes the start war timestamp from the api
and calculates the tech times from there
based on 1440 tech per day and costs of each tech?
@barren quarry do you know the cost of the tech?
cost of tech?
cost of unlocking each tech in the tech tree
Bogosort can sort in constant time any sample
Stalinsort is linear, so that's pretty good too
@honest mantle this is the tech tree from September 2019, prior to it going automated: https://gamepedia.cursecdn.com/foxhole_gamepedia_en/archive/9/96/20191212121259!Tech_Tree.png
things cost anywhere from 50 to 5,000 tech parts to unlock, with the costs increasing as you progress
huh thanks! dunno how i didn't find this earlier!
Bring back the told tech tree 😔
Technically this is relevant
Thoughts, comments, suggestions? http://foxholetech.live/
@echo wolf looks cool but i dont recommend displaying the time in hours only
i like the simplicity, tho the reading order is confusing @echo wolf
Alisa and Dmitry, uncle is have bought spagetti, pls go eat
thanks for the spaget
@barren quarry @chilly burrow Thanks guys ill work you're feedback in
can you use UE viewer on this game to retexture skins?
@neat fossil
Ye. Care to elaborate?
you cannot view the unreal engine assets from game folder so UE viewer lets you see them basically @dawn panther
I know this.
I just want to know why you ask if it works with Foxhole.
@dawn panther retexturing would be against the rules regardless if it's possible
@neat fossil I mean
Yo nerds.
How do I make values in C++ approximate? More specifically a limit of 2 decimal numbers.
When displaying? Or internally too?
@echo wolf part of me is always glad to see Foxhole getting more 3rd party support and there can never be too many support sites for a game like Foxhole
Part of me wants to destroy you for being a competitor to my site

when you do your comparison you round them, or test the difference, @cunning forge
if ( abs(a-b) < .01 ) ...
abs = absolute value
same thing applies to most languages
That said. I wish I could work in c++
But with the shaking on the horizon that is webassembly, I'm going to have to learn c or c# and I feel dread
c++ sucks
i like coding
weirdo
C++ is supreme, you wot m8
#include <avr/interrupt.h>
ISR(TIMER0_OVF_VECT)
{
GlobalTimer0++
}
void InitInterrupt()
{
TIFR0 |= (1 << TOV0); // In Timer Interrupt Flag Register set Timer overflow flag to 1 to clear it.
TIMSK0 |= (1 << TOIE0); // In Timer Interrupt Mask Register set Timer Overflow Interrupt Enable to 1.
sei();
}
void InitTimer()
{
TCCR0B |= (1 << CS01); //In Timer Control Register B set CS01 to 1 (8 prescaler)
}
/* global variables */
int globalTimer0 = 0;
/*global variables end*/
int main(void)
{
InitInterrupt()
InitTimer()
while(1)
;
return 0;
}
so I was wondering if the C arduino experts here approve of the way I have enabled the timer0 overflow interrupt
Or if I have written total BS
I think I still have to enable the timer oops
edited
why does it seem like theres a lot of missing semi colons
Because i am missing three lol
i mainly program arduino with ide @coral sundial
DOPE
It works
but I dont like the use of global variables. is there any way I can make the ISR change something outside its scope?
@pure sierra maybe you know this? ^
you can pass variables by pointer (or reference if c++)
and you can use static variables, but theyre basically just global
yeah, I guess. but I havent been able to understand that part of pointers yet 😅
Tbh I would recommend to use define instead of making a global variable
Don’t ask me why to do it, I just remember being told it was better
And answering your question. Derps answer is the way to do it imo
so you make a variable, int x; and you set it x=0; and you can get a pointer to it int * pointer = &x;. And you can pass that pointer to a function, and then change the value it points at like *pointer = 10; or pointer[0] = 10;
He wants to modify the variable, so a define won't work.
I don't know Arduino but i don't think you can pass arguments to the ISR, so pointers wouldn't cut it either.
In XC8 i used global variables but there may be a better way.
The only way I see is to make the timer a function that the isr edits and the loop reads
But that kind of defeats the function of a hardware timer
is this related to millis overflow ?
Lololol. I passed my exam.
I had code that didnt work on 1 function
And the time elapsed
But the teacher was slow to come and check of code. So i changed it really quickly
my teachers used to give me unique tests because the other students would copy my work
lol me too derp
Yellowbird#2557 has been warned., let's not post rickrolls here thanks
getting muted for rick rolls, oef
oeuf
@fervent spear Pass-by-reference pointer into a function
allows you to modify the value inside and return it outside.
&pass_reference_to_variable
C++ has 3 different ways to pass a value to a function
Global variables are discouraged
Feel the dread from learning a new language why?
@hybrid mason
Because it’s one more thing to have to keep up to speed on
It doesn't change that much.
I work in web dev. Theres a hot new framework with a stupid fucking name every month
Most programming languages will have a set of features mainly.
Datatypes (Reference and primitive)
Control Structures (For,while,if etc)
Functions
Sometimes Objects
Interfaces (Sometimes)
Find one thats updated regularly, maintainable and evolving.
There is only a few "real major" players.
When you signed up for coding / web dev, expect a life long learning experience you've got no choice.
C# isn't that hard.
Shares a lot of characteristics with Java.
Only a few major dev systems, containerisation platforms, deployment architectures, front end frameworks, back end frameworks, DAL’s, transpilation systems, testinf franeworks
shrug I just learn whatever comes my way.
I've got 2 CCNA books currently, Java Programming, Python book too.
Why?
Language style feels restrictive, clunky
Life is too short to spend your life casting a var on init, and I/O
Eh. don't do that.
Throwing yourself at a problem all day doesn't work
If you can handle OOP fine you'll be able to learn C# easily.
It’s going to be a few years regardless
It does not take a few years...
You just need to understand how the laydown the foundations of a project with the "toolbox" you have even at the most basic language level C# is similar to C\
C# is probably less likely to segfault your application though
C is just very type unsafe and you have to keep track of everything.
But if you master C / C++ you can master pretty much any language
No I mean I’ve got a few years until needing to know a web assembly language becomes a thing
Pass by reference doesn't help either, the problem is that the function calls itself, and you can't pass it arguments
Why can't you pass args?
i hate java too, but at least its modern.
I don't hate any language.
c# is bae
bad?
nah java is a lot more overbearing
java isnt as capable as c# either, also not as universal, projects are much harder to setup
Why isn't it as capable?
i would still rather work in java than C or c++...
well it just doesnt carry the performance c# does, and the frameworks are old and dusty
That's because C and C++ are unforgiving of mistakes.
...
Java 8 recently added a bunch of features.
yah but isnt the java version much newer?
i can tolerate java 9+
well java requires a lot more boilerplate code, it has less features like unsafe for performance and interop, it used to be missing things c# had before it like generics or "streams"
i dont mean like input/output streams, i meant the equivilent of LINQ
c# is just full of short cuts that make code clean and readable and faster to program, and we know developers write about the same number of lines of code per day regardless of language
Java has database access capabilities as well.
async, LINQ, iterators, stuff c# has that is a godsend
To me a language is a language knowing more than one language is a benefit not a drawback.
Java does Async too... has iterators as well.
java iterators... are not the same
As I said a language is a tool more tools on my belt the better.
i agree with the sentiment with the tool analogy, but you dont have to remember how to use a hammer
you dont become out of date with how hammers work in a year
hammers dont have licensing issues...
which is inferior to the oracle jdk
In what way?
Nope from what I just read Java is faster
hah
i dont really like to get into debates over which language is faster, which is generally irrelevant
but i dont think it can really be argued that c# has the ability to be faster with unsafe code, perhaps comparable to C speed
speed is not everything, i think development time is more valuable than running speed
ive been programming 20 years, heard plenty of "C is the fastest, blah blah" nonsense
use case is very important
Java C gcc - Which programs are fastest?
but i would suggest to you if your benchmark shows java being the fastest at something, oof its probably not a great benchmark
same with like ... python
No I was wrong. Java is slower
but C++ / G++ is definitely faster than C# in most cases
but programming in java is faster than programming in C, you will get a lot more work done, and thats more important
you have to manage memory in programming no matter what
In C# and Java you only have to deal with object retirement ah yes I remember C# has Destructors as a good feature
no you have to manage memory in java and c# both
Yes but not "directly"
memory leaks look different, they arent lost pointers, theyre just held references
You don't deal with setting up a pointer to a null pointer block of memory then add the data to that block
you will still kill your performance if youre abusing memory allocations or not releasing references
But in general "Managed" languages are easier to deallocate
meh.
im not sure if i believe that. i find garbage collected languages to be more efficient in memory management, if youre careful
you have to use malloc to physically allocate memory.
c++ does the same memory management as C, what do you mean? its just new/delete instead of malloc/free
For whatever data-structure you want to use.
I remember reading it's not the same.
its the same.
in c++ there is a push to stop allocating memory on the heap, and use the stack instead. which avoids having to use delete
but its more of a convention than a language rule
Heap is the dynamic memory allocation space. The stack is limited to CPU specifications.
i find most c++ programmers tho are really just c+ programmers. theyre mostly using C with a few c++ additions
the stack can also be dynamic
but stack space is limited so it can lead to stack overflows
Thats what I mean. Stack is limited. Heap is correlated with the size of memory available.
i mean if you think about it the heap is limited too but much larger
Whats more you have to deal with memory fragmentation in the heap.
yah thats why memory allocation is slower in C/c++ than in java/.net
when i was young the culture of c++ was trying to push smart pointers, which were basically just garbage collection without defragmentation
My reason for learning C is hacking.
well some stuff you can only do in C or ... rust
you just cant program drivers in c# or something
but imagine how much time youd burn making a web page in C
A lot.
But it is already C / C++
The JS engines are using C / C++
SpiderMonkey, V8 etc.
my god the greatest thing c# has lately than java does not, anonymous value type variables
so i can make a variable
(int IntValue, float floatValue)
and I can return that type from a method/function if I want
(int V1, int V2) foo() => (0, 0);
You mean lamdas?
so like ... methods can have multiple returned values
Anonymous "method calls"
Yeah Lamdas do exactly that.
ya know, C/c++/java can only return 1 value from a method, so you often have to define some class to package all the data you want to return
1 method?
1 return value
Try passing an entire object in then return the object.
Access the method data via getters / setters in that object.
yes i know, but you have to define an object. that takes time
this is something Go also features nicely
Passing an object is pretty clean as it is
not passing in, passing out
Both.
the best you can do in java quickly is with ref
c# has out, which makes a 1 directional variable, but its totally outdated now with this new style
Pass an object return an object or just pass an array which is an object then pass the entries out of that object.
right so you need to define an object class, if its public youve gotta put it in its own file, then you need to define the accessors and the constructor, then when its used itll make a heap allocation, more churn, more grind, just to return 2 values from your method
or we could shortcut it with an anonymous value type
its so great, really it is.
not anymore. dotnet core is apache/MIT licensed open source works on linux and windows (and kind of freebsd), oh and also os X
and android and ios ...
Interesting.
c# itself is like ... public domain or something
interfaces are weird to me.
i do like 20% of my work in java and maybe 65% in c#
Creation of a data contract just to ensure those data components are enforced.
yea its necessary in these languages because classes can only inherit 1 sub-class
so if you want to also give it other behaviors you use the interface, which you are not limited on
Yes but a class still needs to "implement" the interface.
yah its like an abstract class
It's unusable as a "API" without the implementation.
without an inheritance heirarchy
All the interfaces defined if you define an implements you have to implement each single method.
right, like abstract methods
nah thats virtual methods. abstract methods have to be defined by anything inheriting them
uhh i guess theyre called pure virtual maybe?
But the main difference is abstract methods don't have to be defined.
They can choose whether or not.
no they have to be defined
Hm Java doesn't do this with abstract methods.
🤔 maybe java calls them something else then
No Java In a NutShell 7e
if you inherit an abstract class you dont have to implement every method, unless its abstract
Mentioned that Abstract classes don't necessarily need to implement the methods
they can also have default methods
which have a method body.
Rules of Abstract Method
- Abstract methods don’t have body, they just have method signature as shown above.
- If a class has an abstract method it should be declared abstract, the vice versa is not true, which means an abstract class doesn’t need to have an abstract method compulsory.
3. If a regular class extends an abstract class, then the class must have to implement all the abstract methods of abstract parent class or it has to be declared abstract as well.
youve got to implement all the abstract methods in a class, but you dont have to implement all the methods of an abstract class (unless those methods are abstract)
yah for ...multiple APIs
but you cant have multiple inheritance in java or c#, thats ... old c++ crazy shit
nobody does multiple inheritance anymore because its such a confusing mess
Yeah I've seen some crazy nested stuff...
Ah yeah structs
I love structs.
Don't exist in Java
Hm Humble bundle's rotating AI books again
Tasty.
yep, another advantage c# has, structs are stack allocated by default, easy to deal with, good performance
but they add language complexity, some things structs cant do, some ways their performance is bad (when they get copied)
What do you expect there non-homogenous data types.
yah c# bridged the gap with nullable value types, like
int ? x = null;
Each datatype is going to be different and therefore each size of datatype is going to be differnt.
OOoo humble bundle has Cybernetics book.
@long raft C# also has delegates
ah yea those are old
theyre nice but theyre not ... very elegant actually, in terms of code readability. i could see improvement there
I'm personally not into "production level code"
its just the same as regular code but with a unit test
java is a grind maaaan 😓
No it wasn't that, he said it was the old systems they were using.
Crappy boring maintained systems.
yah legacy code is awful - but it also pays the highest
you should see how much COBOL programmers get paid
you are blessed if you like maintaining legacy code
I'm more into the "cutting edge" I definitely don't want to work at Facebook I despise facebook and google in more ways than one. I don't care if I get paid big $$$
yah i agree. but im no so cutting edge i want to do games ever again
I don't even use social media. Hate it even...
yah same. facebook also famously a php company
like bruh imagine running fortune 500 shit on php
whats SDN?
Software Defined networking
what is that?
Instead of everything in a router being handled by a set of hardware
A Software layer for abstraction then generalised hardware placed over the top
There is even SDR (Software defined radio)
So routers are actually just software modules.
It gives you far more flexibility
who are the big players in that field?
what kind of hardware do you use for it?
Well an example would be virtualised hardware
Containers can even be used for SDN
Like Docker Swarm or Docker or K8s
ok
if you dont already know about a CS topic, it can be difficult to gather any understanding from the buzzwords they use to describe it 
SDR takes radio technology modulators, filters, signal processors and defines them at the software layer.
yea i think i understood your description, you werent using buzzwords like their web pages
like ... reading a microsoft product description - is unintelligible
Just keep a computer dictionary handy.
English is like a OOP
but has multiple inheritance.
i know but their stuff was ridiculous
Agreed.
always makes me think of https://www.youtube.com/watch?v=J-GVd_HLlps
it's called technical language or field-specific technical language.
which is fine for people who do it, but for the marketing description its funky
Marketing heh marketing is exactly that. It's like this huge "rage about AI"
AI is dumber than a dog.
A dog has more brains than "AI"
ah man AI is taking over computer science
Yes and you know the "top" AI conference said stop it...
hard to make an algorithm? we'll just run it through the GPU until it burps the alphabet
We don't know what makes our intelligence how are we supposed to create something similar fi you don't know how it works...
AI has been herald as the "next big thing"
Companies are putting "AI" in everything.
Microwaves, Toasters, Fridges.
Laptops...
Do I really need an AI that tells me you are out of milk.... wtf.
its almost a classic cycle, AI was big in the 70s, then big again in the 80s with the introduction of neural nets, now big again with the back propogating neural nets, and now with the GANs
I mean AI has a perfectly valid use. Machine Learning used to analyse cancer slides and determine things but this is just Machine vision + a bit of image recognition.
China has gone insanity level with "AI"
well its the GANs
Even though the system is so dangerously insecure.
its more than just recognition now...
yah for those GPUs
it is really nice to crunch numbers on the gpu, im sure thats why research departments are looking into AI. its kind of like how they used to call the pocket calculator AI
So GANs are just a bruteforcing technique basically
yah all neural net stuff is brute force
but instead of a back propogating net, which is just a recognizer, this is 2 parts, a generator and a recognizer, and they both train each other
its actually pretty damn cool, but its still not magic, youve got to adjust tolerances until you get the results you want
This is the best description of SDN
Think about how you could manage an entire data center from Powershell
Thats basically how SDN works
I can issue a firewall rule from CLI and update multiple devices at once
or I could push new firewall rules from CLI to specific devices on the network.
Over the past few years, Software Defined Networking (SDN) has been a key buzz in the computer networking/IT industry. Today, more and more companie...
That makes more sense.
its virtualizing a network kind of? how far up the osi layers does it take it?
that damn OSI model is hella out of date huh
Application layer
which half the routers now are working at the 7th layer lol
Everything below that.
Handles SDN
Nope just 3 layers
In our previous article, we had a good overview of SDN as a technology, why it’s needed, and how IT industry is adopting it. Now, let’s get a laye...
But I believe there is another part of SDN that also deals with lower.
yeah Southbound interfaace
not the northbound interface
Application Layer
/\ North /\
Lower protocols / functions
\/ South \/
im gonna miss my hardware router 😦
ah ive got one of those. i think i prefer my mikrotik tho
i just got one of the small 5 SFP+ port ones so i can switch to 10gb
sure has a lot of features, although power doesnt seem to be one of them
what a pain in the ass to configure tho, right?
microtik is dense I've seen the GUI
I watch a guy called Lawerence systems
the gui is like everything you can do in the console. ubiquiti has a simpler GUI that does less
CLI does everything
yea but the GUI is limited/simple
On the EdgeMAX units yes on the Unif-Controller stuff no.
oh
you have to know networking well to use a microtik, at least the edgemaxs could be used by someone less tech savvy
thats who you would expect to be using the GUI
EdgeSwitch here I'll show you the CLI manual
EdgeSwitch has a good selection of flexibility however.
Microtik has more routing features
I'll probably go with a RouterBoard and keep the EdgeSwitch
they both seem to get exploited a lot
i mean if security was a deep concern could you trust either brand?
CISCO isn't much better...
wtf that manual is over 400 pages
@long raft Didn't you know that?
EdgeSwitches are definitely far more sophisticated in terms of functionality
Ubiquiti is mostly based on Vyatta or VyOS
The EdgeRouter EdgeOS is 104 pages
Kind of sad most of UBNT lacks MVRP yeah lacks MVRP but not GVRP
MVRP is much newer
{
*nine = 15;
}
int main()
{
int array[10];
int* nine = &array[9];
for(int x = 0; x < 10; x++)
{
array[x] = x * x;
printf("array %d is %d\n", x, array[x]);
}
Arraychange(&nine);
printf("array for 9 is %d\n", *nine);
return 0;
}
I am trying to wrap my head around pointers
but my program crashes when I try to print past when I call my function
ohokay
Iguess I can print without the dereferencing operator
no theres nothing wrong with your code that i see.
I wanted to get the adress of 9 into pointer ""nine" then change that in the function
except it crashes when I print *nine
printing just nine works
also whats the difference between *nine and nine then?
*nine is the value stored in the adress that its pointed to. and nine is?
nine is the pointer, its like a 32 bit number, and *nine is the value it points to
but yah nine is the actual address
but why does nine print 15 in my function?
but the actual array is left unchanged then?
the address doesnt change. you set the value because you did *nine = ...
thats the same as doing nine[0] = 15;
so you have an array of 10 size, and you have the address of the first value in it, thats the pointer
didnt I make the pointer to point to the adress of array[9]?
but then you made a new pointer called nine, that is 9 elements deep into the array

yeah I get that
so setting *nine is like doing array[9+0] = 15;
yes
and then you read it back ... so its still 15
and in the actual array, its 15 too then?
yes, setting *nine is the same as nine[0]. it should make more sense
so youre setting the value in the array
alright, thats what I set out to do xD
not a copy of the array, but the actual array, because youre using a pointer
but then I dont get it why it crashes when I want to print *nine
i thought you said it was printing 15
I want to print the value the adress pointed to, that I changed in the function to 15
if I did that
also I can navigate through an array by incrementing my pointer too?
yes
or just adding to it, like +5
that will move it by 5 * size of integer (4 bytes)
you cannot increment a void * because there is no size to void
so if I do *(nine+ 1) = 4; sets 10 to 4?
yes, but 10 is the 11th index in the array, and the array is only size 10 so that would be a problem
yeah, I realized that xD
(nine +1)[0] = 4; also works
yah itll really be a trip when you have pointer arrays of pointers
uhh i do know why youre getting an error, can you set a breakpoint and see if you can read the array? maybe the problem is printf
what is a breakpoint?
ah so if youre using a decent development environment you can run the program in debug mode, stop it at any point, and read the values of the variables while it is paused
printf works if youre not there yet, but i just dont see anything wrong wiht your code when i stare at it
maybe i can try running it...
oh i see
Arraychange(&nine); this line is getting a pointer to a pointer. because nine is already a pointer type, you dont need to get it's address
it should be Arraychange(nine);
it runs for me
array 1 is 1
array 2 is 4
array 3 is 9
array 4 is 16
array 5 is 25
array 6 is 36
array 7 is 49
array 8 is 64
array 9 is 81
array for 9 is 15```
noice
upvotes please: https://www.reddit.com/r/foxholegame/comments/esz32a/the_border_checkpoint_aka_border_bridge_a/
I didnt know that this channel was literally about anything coding related
Now you know
💢
Derp you dont hold a monopoly on coding
i hold the simpleton singleton
But i do would like to know if anybody has ever used visual basic before
i have used vb for more than half of my life
How old are you 
💢
Derp is an ancient elder being.
They are called "Programmer"
We should leave their temple
i have used every version of visual basic. including 1.0. yes. its hard to find.
Well i got this book on visual basic and i’d like to know if it’s even worth learning the language
no
old vb? no. vba - bleh. visual basic.net is very good, but probably its better to just learn c#
basic is a great language tho, popularity is waning
I know C but would like to expand my horizons a bit
Still havent even touched javascript which is next on my list
better to learn javascript then
its probably way out of date anyway
this is my impression of disk
🤔 should i learn turbo pascal?
📆
man im probably the only BASIC b here
dying breed
lul basic in 2k20
its better than java 😦
python is prob one of the most versatile popular langs at the moment
Definitely
Just saying, labview is great for learning
By the by, anyone know any good C+ programmer that can be used to create discord bots?
Do you mean a person who can do it for you, or an interface to program in?
@timber onyx i wrote a discord bot on js
i used to code on c# and i was unhappy
i switched to js and now i am a happy person
c# = :(
js = :)
C#, C++, js, java, python = :(
Mindfuck = 🙂
is this where we learn to talk in code so that colonials don't undertand us
No joke that’s what i thought this channel was for for a long while
<script>(function(){var ctx=[];google.jsc.x(ctx);})();</script>
You have libraries in a lot of languages for discord, including C# and python^^ (C# is love)
c# clearly the most powerful modern language. js is for kids (gifted kids)
also i thought that joke language was brainfuck
unless you just mean like ... haskel
@neat fossil is that supposed to be some sort of weird convoluted fork bomb?
JS is for special kids, I'd say
@long raft brainfuck is fun! I once saw a video of a guy programming a checkers playing robot
please vote
Mulon#5667 has been warned., Stop posting your poll in random irrelevant channels
ouch
yah loxen warned not to post individual devstream screen shots in channel today, its clearly inspection week.
ascii is not unicode, nobody uses ascii anymore. because it only has like a hundred something letters
hanzi is maybe a higher number in the unicode set, nothing makes it "special"
But how come ascii charts give the correct character
I use ascii charts when i need to parse shit
some of the characters in ascii are the same definitions as unicode. some
Alright thanks
ascii is old...
So are you 
Hey did you guys ever finish the gps map for foxhole that you were working a while back?
not sure if you mean the routing or the aerial photography mulon worked on
I think he means the google roads one
i think we lost interest, but it was working, it just needed cleanup. the roads were close but not connected on the region borders, so the pathing wouldn't always choose the shortest route
but otherwise it worked... hayden said hed recruit people to fix those nodes by snapping them together but yah ... morale is low re: foxhole
yea derp did some great work getting it to going, anyone welcome to work on it
problem is that maps keep changing, even little roads adjustments make this feature obsolete quite soon
Guess we'll have to wait until 1.0 
oh i see, and yeah i would want to see it implemented i want to see how much time im using driving logi up lol
anyway i can get a link to its github?
this is my fork of it: https://github.com/NoUDerp/foxhole-router
Frowned upon by whom? Do they also have a bayonet? 
youre just being critical for the sake of it
im not arguing that its clean code. i just dont care
its mostly there so i can post the binaries
speed is not effected by namespaces unless youre using reflection
yah you also called me a bad programmer because i didnt simplify namespaces
yah but it doesnt matter
also ill point out rectanglef is a struct type, so ... i dunno why your panties are in a wad over new allocations
its a struct!!
who cares about hte name space
its such a small concern
yes it would improve readability
yes i know
but i didnt
did you comment and document it?
did you build unit tests?
excuses...
nobody but you will be reading my code tho
for the binary files
sounds like you have it all figured out
github hosts it for free, id rather not host files out of my closet
well then how can anyone else get to it?
this way i can share the binaries, but i dont really expect anyone to read the code, and if so, well they better figure out how to read complicated redundant namespaces
there is some c# specific graphics stuff in there
and extension methods?
no.
and you also didnt know there was no performance problem with allocation struct. i only point it out because you said "fully" understand. im sure you understand enough to modify stuff
extension methods are how the ".SelectMany" and other methods work
its largely the stuff in the System.Linq namespace
books are pretty bad, in my opinion
i kind of live and die by the official documentation
oh well its at least c# 7
i mean thats my biggest 2 problems with books - out of date, and loaded with way too many words that convey no information
8 is not that significant compared to 7
just pointing out a couple things that dont exist in java
when i learned java (after c#) i spent a lot of time like what are all these final statements everywhere!!
well i know how it works now but it was quite a change, and the final keyword means many different things in other languages
most languages would have referred to it as readonly
eh... have you ever used templates? they are not much like generics
i think that programming books are mostly obsolete
most importantly because the classes in c++ do not all inherit some base object class
standards change too often
you just google a documentation for an api and start coding
i havent come across an architecture book that would capture my attention
i remember i used to buy $65 programming books that really were crap
even knew some people who wrote some
thats when i really lost faith in them
but different people learn differently, im sure books are the best for some people
i dont mean this as a slight, but to me it feels like java changes slower than other languages
can you please recommend me any books that are not tied directly to any specific language
js on the other hand is the embodiment of the term "technological singularity" lul
you dont need to write anything yourself anymore cause there are a billion js packages on each topic
yah js moves fast, c# moves fast, the new languages move fast too like Go and Rust
jeez even c++ moves fast these days. like wtf
it has changed incredibly since i learned it like 15 years ago
i havent written c++ since 2013
it changed a lot in 2011, but it doesnt mean everyone just suddenly upgraded to c++11
we had java in uni but it was so incredibly boring
yah old java and old c# were very clunky and boring languages
i dont know
our teacher was a chick from an outsource company who was sipping coffee all the time
he is a javascript programmer, fire 😉 you imagine what kind of torrid stuff hes into
i have
no safety nets in javascript...
i have taught myself javascript and got myself a job
i tried learning coding since 2012 but it was so fucking boring until i stumbled upon React a year ago
wdym js specific features
no not really
but its always fun when someone tells me a feature is displayed incorrectly in safari
and i physically cannot get safari because im on windows
eh... you kind of can, depending on how much you care about breaking the law and how badly you want to test safari
osx86 live boot...
it runs in a VM
i always wanted to make killer robots
website building always seemed extremely boring to me
so i had major trouble motivating myself to do anything until i started writing websites for foxhole
unfortunately the country does not have much of an industry for killer robots and the closest major to it i picked in university turned out to be designing robotic arms for factories
if its a gun factory then theyre killer robots
lul
safari, particularly, is the new IE 6
i have found edge to be very good about standards
i have found firefox to be lacking.
some things have improved since i discarded it but they used to be way behind on standards (or maybe just not ahead)
@barren quarry take a look at Game Engine Architecture Vol 3 (vol 1 and 2 are great reads as well). I don't recall it being extremely heavy in terms of c++/code in general
im currently rereading Ethical Hacking and Countermeasures to focus on the countermeasures part; haven't looked at code in years
How many players does Foxhole support per region?
learned about verilog and VHDL today
i have never even heard of these. i googled it expecting it to be something new but it wasnt
thank god. i left flip flops in my past and never looked back
listen buddy
i work with robots
i dont have time for you fancy shmancy architectures
i thought people used high level languages for robots. hm
frankly i thought most of the integrated circuits work had gone to china
guess who makes the designs for china
i also assumed china
What are sound attenuation settings of this game? For example I was trying to add more explosion sfx for the FieldGun.I recreated the filepaths correctly but in game sounds didn't play :(((
replacing the sound files? 🤔 theres only a couple people who know anything about that i think
also wouldnt that trigger some sort of anti cheat?
Nope, the method I use doesn't trigger steamDRM
I just want to know your attenuation settings so I could continue modding, I just want to give my sound mod to Freerk please devs, please whoever sound designer is please :'((((
@neat fossil Game modifications are not allowed unfortunately.
I leave any map changes to you guys, since its stored in the fellowship of the warAPI repo
@sharp breach why isn’t nodding sound files allowed
I'm assuming because it might give an unfair advantage?
100% speaking out of my ass here rn
I.E. if I make certain things transparent, or amplify sounds to know where people are better.
