#code-talk
2 messages · Page 26 of 1
Almost as if null terminated strings are a problem
And as if intel provide instructions for prefixed strings for a valid reason
yes it is a problem only if you don't know what you are doing
same problem even with length prefix, but maybe less likely
yea allan this is ridiculous, youre basically giving a skill issue git gud argument to programming
Typically can test beforehand with a prefixed string
derp is talking about one single value, which isn't a problem because it will only access the maximum number of memory locations for whatever data type it is
why have safety features on a car if you can just drive better
you were suggesting one single value could overwrite your bootloader. im suggesting a single mathematical operation thats done incorrectly is a big deal
I never missed the point, adding 1 to 255 in a single byte won't cause an issue
Are you sure? It's not a memory violation sure
is the difference of looping 256 times and 0
But it could still be a nasty bug to your programs logic
it's not a memory violation because a byte declaration will limit the CPU to only read one byte of memory
yea this isnt mangling a string, this is causing logic errors
I said it wasn't a memory violation
and buffer overrun testing is comparable to integer overflows was my point
You don't need to explain why it wasn't a memory violation
logic errors aren't even an issue because it will just set some flags in the flags register, and most people never even check eflags
You've just been fired
..
Logic errors can and have been life or death
i do not believe allan is trolling
you are confusing a data type with an array of data types
No
I'm not
So if I am writing safety critical code
And a 255 incorrectly becomes a 0
arithmetic errors are very grievous
And results in some other safety critical code not running as the condition is now wrong
That's not a problem?
they are easier to debug than a buffer overrun tho, oof
just step through a scenario that fails
how is buffer overflow not easy to debug?
if there was some easy way to say why, then it would be easy
I'm guessing you don't believe in unit testing either
i would say the biggest reason is because you cant easily visualize the data youre reading, its not like a string. you can hex edit it, but encoded things are difficult to analyze
oh shit test driven development is 21st century, just git gud
we didnt need tests in the 20th century
there was literally never a problem until it rolled over into the 21st century, very first day even
err first day of 21st century is 2001 huh
I'm pretty sure people were better at debugging in the 90s than now
hah.
I can use star citizen as an example of a project where code is pumped out with not even one glance at bugs
That doesn't answer the question
its probably 5 orders of magnitude more complex
you already know your answer six
he doesnt approve of buffer overrun testing
you think he wants unit tests?
in the 90's, if your program was bugged out, people didn't buy it because you couldn't just automatically patch it by connecting to the internet
unit tests would just be admitting youre fallible
Clearly has no experience in embedded design then
oh well i dont either
Or even touched basics of safety critical programming
well for one, no one uses C# in embedded
...
Because that cavalier attitude has literally resulted in deaths in medical and industrial sectors
no one?
is it rare?
it is non existent if you are referring to microcontrollers
So you're saying I don't have an esp32 this minute running c#
esp32 is a microprocessor, not a microcontroller
It is categorised by it's own vendor as a microcontroller
I also have stm32's running it
Which you yourself already referred to as a microcontroller
yes they like to say it's that, but it's Tensilica Xtensa LX6 microprocessor @ 160 or 240 MHz
It has no mmu
i feel like if i came in here as an alt talking about how great C is allan would find a reason C sucks
microcontrollers don't run at high clock speeds like that either
especially if i had a blue name...
You've clearly not touched any microcontroller in the last decade then
We even have 1ghz microcontrollers today
i guess every programmer needs a creed, i dunno i guess allans is that things peaked in 1970
Mmu-less as that seems to result in the common modern distinction
Even atmel avr32's are clocked that fast (hundreds of megs not gig)
imagine doing async in C
it's hardly believable that anyone has used C# for a microcontroller
C# can run on an arm cortex m0 mcu
There's been several ways to do so over the years
Starting with the .net compact framework
.net microframework
Nanoframework
i wonder what advantage there could be to doing that even
And also meadow
arm is a microprocessor.. again, not a microcontroller
Cortex M ksnt
all i can think of is like ... if you need a fast web server? i dunno
Not cortex A, cortex M
if you just really only know 1 language i guess
Cortex M is the microcontroller variant
To compete with avr and pic offerings
They lack MMUs, microprocessors have MMUs
uwu?
Or is the humble stm32 not a microcontroller now
yes I am sure someone managed to fit the .net framework into it, but it's not mainstream and it's not the intended method of programming a microcontroller
Change in tune from earlier where you claimed it couldn't happen
here is a good reference to your question/suggestion https://electronics.stackexchange.com/questions/284715/write-program-for-atmega-microcontroller-with-c
What question or suggestion
I made no question or suggestion
I just made the objective statement that c# can run on several mcus
well, the answer is there is a project called netduino for getting .net into microcontrollers
oh netduino is old - even ive heard of that
Replaced with nanoframework and meadow
i didnt know an arduino counted as a microwhatever
Still never answered my actual question
well you guys keep trolling with obvious stuff, like with buffer overflows going on about storing value 256 in a one byte memory location, which wouldn't do anything of course because you can only fit 8 bits in one address, and of course the real issue with buffer overrun is quite clearly a problem with pointers to arrays
No, that was you missing the point
at first I couldn't tell if you really didn't understand but I kind of figured it out by now
Nor was it trolling
If anyone doesn't understand, it's you. You don't understand that storing 256 in a 1 byte address is a logical error
Which may set a flag. If you bother to read that flag
What if you dont
What if that logical error results in other safety critical code failing
it isn't even an error, it may be a design problem but it isn't a security violation
Didn't say it was
pointers to arrays are an actual issue
So a logical error in a safety critical system like I don't know, a pacemaker, that isn't a problem
A bug in an insulin pump firmware from someone not checking integer overflow, not unheard of
what is the difference of a buffer overrun and a [bad] pointer? its the same thing in reverse. its a buffer underrun or a combination of both
And your attitude seems to be that it's not important. And seemingly that unit tests to verify this kind of thing are also not important
And that tools that exist today for reducing errors as simple as integer under/overflow or out of bounds memory issues are also pointless?
AllanOS would release 1.0 on schedule, and never need another update again
it's a design problem, you can sort it out by reading the eflags register, it's not a problem that could cause havoc on a computer system
And that attitude just got you fired again from a place I previously worked
It might not cause havoc as far as the computer itself cares. But if that bug results in your ABS system not responding correctly?
You still seem allergic to even mentioning the words unit test
hasnt got to that chapter in the old book on C
its probably ... past the index
maybe an addendum...
Eh, it's a principle that existed as far back as the 80s
yes i think in the modern day, we dont expect programmers to be perfect, we know things are complicated, so we pay some CPU time to double check their work, and its worth it because we have CPU time in spades
And tooling did exist back that far
it existed in manufacturing, not in computers software
cmon, 700 line programs dont need unit testing. they are the unit test
Nah, it just wasn't dubbed unit testing til the late 90s
But testing code via execution in smaller chunks was performed even in early 80s
yea, and the code bases were small
Even 8bit avr code can be unit tested. Assembly is harder to unit test, it's one of the major reasons you see less of it around
But it can be done, and it is actively done
eh its easy you just step through it, and then never ever ever change it again
you cant refactor assembly. all you can do is rewrite it, if its been more than like 2 days
since when was assembly harder to test?
can't refactor? since when?
so you're saying once I write a program in assembly, it's not possible to modify the program?
unit test. And note I said it can and is done
jeez I must be doing things the wrong way, because I have no problem changing or updating assembly
i mean you cant make it more readable because its ...inherently unreadable
Eh, I've seen some clean ASM, I've seen obscure ASM, I've seen dirty ASM
It can be read
it's not unreadable if you learn it
3 comments for each line?
Don't need that usually
But typically assembly isn't as broken down into smaller discrete units
Can't unit test something that isn't a unit
patterns are harder to recognize
But it can 100% be done
you absolutely can break it down into smaller sections
Where did I say it couldn't be
yea i guess my point was its easier to rewrite it all than refactor it
you can include other files, libraries, execute functions written in other languages
I can't say I actually agree on that one. Really does come down to having learned the bastard thing properly
There will be obscurities in any language. Comment lines exist for that
There are, some are simple and some are almost galaxy brain
Everyone knows about the subtle shift by 1 space instead of mul/div by 2
errr i ... know of that myth yes
Or testing for odds/evens by testing the LSB
you only need to learn the 20 most commonly used instructions for x64 to make basic functions
and the calling conventions are important
the conventions are very simple compared to any other language
GCC ignores some of the calling conventions though
It's not a myth but it isn't as big as impact today as it used to be as modern mul/div is significantly faster than it was and most compilers are smart enough to make the same optimisation
GCC won't add 32 bytes of reserved stack space for each function call as directed by Microsoft, but it's not critical
yes these days its not faster for left shift, and right shift means you wont also have a remainder to use
Muls in particular are very fast on modern CPUs yes
yea those ... microoptimizations, like xor to zero a register, i never considered those galaxy brain, those are just architecture quirks, reference things
I think single cycle now in some arm core designs
the biggest advantage is being able to write a program in as few instructions as possible
even just a hello world program you can cut the bloatware by at least 50% by writing the assembly yourself instead of using GCC
Div is still slower. And on mcu's you're less likely to find cutting edge stuff like a single cycle mul instruction
i have a big hard drive and lots of ram, why do i care about that
Now go and cram some code in literally 32 bytes of ram
if you ran concurrent servers with millions of connections you might care about it
its not an issue
Humble Arduino Uno uses an atmega 328p
8bit avr chipset at 16mhz
Like 2kb of ram iirc
hmm not an issue for me
There's the sort of place it might legitimately make a difference
also i still think a C/c++ compiler would do a better job optimizing size than i could do, or anyone else i know
Wouldn't want to go and write an entire computer game on a modern pc in it, and most game engines today don't have any assembly at all anymore
Not even 1 little sub routine called from c
Yes, C
Not assembly
I didn't say nothing was written in C
Albeit checked, it was C++
And still uses a lot of lua
derp, a 1 hour MIT free open courseware (University of Massachusetts) will teach you how to make assembly more optimized than a C/C++ compiler
all the courses are available if you want to learn
of course, if you don't want to become better, that is also an option
i uhh ... i reject the notion that its possible
its sheer arrogance to think youre better than a compiler
its like a fundamental basis for my whole way of thinking. also there is no such thing as a free lunch
It's actually been regularly proven wrong too that the compiler is slower than a human. You absolutely can cherry pick examples like hello world
But real code isn't always hello world
i also cannot beat a computer at chess
Human written assembly is usually terrible for cache alignment, compilers generate for cache alignment, can be hugely important on hot paths
yea cache ... ffs... cache.
been doing a lot of GPU programming lately, omg nothing from the CPU world works
all that stuff you thought you learned was fast its not
Does it mean there are humans that can't write good code with excellent caching performance, no, of course some can
with tons and tons of testing
and deep understanding of the particular hardware architecture
which will be useless in 3 years
Fewer instructions doesn't always mean faster either as not all instructions are single cycle. Particularly in x86
Many arent
Throw in a bit of branch prediction and out of order execution to keep you on your toes - and compiler on its toes tbf
you have to think more stochastically at these complexity levels now
Arm typically has much lower cycle counts
how is RISC pushing so hard now? like 15 years ago they were totally hobbled by heat
they werent seeing the performance gains of cisc
The only interest was more in how can we make tiny chip power tiny device rather than pushing the envelope of what 100W can do
apple abandoned the architecture at least in part because of heat issues for higher speeds and mobile devices was a no go
intel was even killing it on the low power stuff
now arm processors are so stupidly good, and m1
i think only one of them will survive into the future, i guess risc?
PowerPC was pretty fast. But it was partly business decisions, apple small customer and IBM not catering their lines to apple
Less a fundamental issue
really?
that seems like a petty reason to change your architecture every decade
its quite disruptive
They sold more 360's than apple sold PowerPC macs in total
360, GameCube, Wii, Wii u and PS3 all featured powerpc
Yep and it's a risc design
rrodisc
Yeah but remember the first revision units, the coolers aren't torqued to the right spec
that console lasted like 5 years and was still relevant ... damn that was good hardware
So were usually making poor die contact
yea mine melted
Mine came to life in an oven
i had mine serviced, they extended the warranty an extra year and mine melted in that window
i still have it lol
But yeah basically, IBM weren't releasing new chips suitable as upgrades to what apple were selling
so i dunno yes the power was there, but also the heat was. because yes even when they replaced the cooling unit i could use that thing as a house heater
Like sure, they had a Mac on sale, but next gen has to be faster right? Part didn't exist in the catalogue
https://www.youtube.com/watch?v=wt7a5BOztuM at 2:40 you can see where one of the examples of why you would want to learn assembly is due to compiler inefficiencies and problems
MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Tao B. Schardl
View the complete course: https://ocw.mit.edu/6-172F18
YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63VIBQVWguXxZZi0566y7Wf
This lecture focuses on how C code is implemented in x86-64 assembly. Dr. Schardl reasons through the mappin...
with apple? nah it doesnt have to be faster
Apple were less dickish back then
the only people that course should be relevant to are compiler designers
People were legitimately using macs for good editing performance back then
no, it's for general programmers
i remember macs were stable for video editing, never performance, but you could not get stability for video in a windows program
video is ... so intense. good god is it intense.
When the first PowerPC macs came out. You were literally looking at gains over competition that make the M1 today look like a slouch versus it's rivals
And the crazy thing with PowerPC macs. Idle power draw. Full load they pulled many watts sure.
oh they can clock them way down for idle huh
But they had CPUs in 2000 with 1W idle powers
definitely not my xbox 360 lol
My complete Mac MDD with dual powerpc's idles at 20W from wall. Less than my lattepanda delta pulls at idle
And that's a modern atom (branded as celeron)
atoms were disappointingly weak IMO
Modern atom isn't as bad tbf
its like the price you pay for x86
But the lattepanda is bad
It's just taken a long time for companies to pour the money into another personal computer take on risc unfortunately
And even that I think is just side effect of the rampant consumerism in modern flagship smartphones having to be more powerful than units a year prior
And finally just realising we can take that one extra step. And apples closed wall ecosystem giving them the weight to take that risk
Now I'm hoping the windows 10/Qualcomm exclusivity deal ends (meant to this coming spring) and that M1 lights a fire under competitors butts
wait what about windows 10 and qualcomm?
was there a windows 10 for ...snapdragons or something?
Windows 10 for arm
Only contains Snapdragon drivers
And the only windows 10 arm devices released are all Snapdragon
I had no idea they were exclusive
Even the surface pro X and it's "SQ1"/SQ2
Those are Qualcomm Snapdragon 8cx's with a neutral net co processor and a slight overclock
And the 8cx is just an 855 from phones with more cache, an overclock and some extra I/O
And then the original windows 10 arm devices are literally Snapdragon 835. Then some used the 845
Have a surface pro X at work, it's interesting
Nowhere near same performance League as m1
Episode 01: Retired Microsoft engineer Dave Plummer takes you on a guided tour of 45 different computer languages and drag races each against one another using a prime sieve benchmark. From Ada to Zig and everything in between, find out which is fastest and which is slowest.
Languages tested in the series include ARM ASM, X86 ASM, Ada, BASIC, ...
"warId" : "4d5467c6-3ac9-433e-ba0c-c95fd73916e9",
"warNumber" : 86,
"winner" : "NONE",
"conquestStartTime" : 1639507210409,
"conquestEndTime" : null,
"resistanceStartTime" : null,
"requiredVictoryTowns" : 32
}```
When a faction wins/loses the war, does the "warNumber" changes, or it stays the same until next war starts?
Believe same until next war
I reckon so too, but I'm only recently started this kind of coding.
I reckon it stays that way until Resistance Phase ends.
correct, resistance phase keeps same war number
https://pastebin.com/5GCkTDsR good simple example for managing custom memory blocks ... so instead of reallocating with realloc which could be inefficient, you could reserve a big block for your program and just re-write over all the memory locations however you like
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
what advantage is there to reinventing the OSs memory management?
its just another layer
if you want to avoid alloc calls then you would typically just use a memory pool, much easier to allocate smaller pieces than a big block
I'm offering examples for those who like to learn more about it
and it seems you don't know what you are talking about, like yesterday when you mentioned doing Byte 255;, in C, there is no Byte, but you can use char.. except you can't store 255 in a char as the max is 127, now unsigned char can store up to 255 .. and the reason for this is that the most significant bit is reserved for the sign flag
who said that was C code?
it was just an illustration
typedef unsigned char byte;
now its C compatible
Why do you need to typedef defined types?
its a C tradition to make your code as unreadable as possible
has anyone stitched the newest map?
what maps
i know there are some road changes but im not seeing any updates...
i think i forgot
i forgor too
thanks for reminding me
but i see nothing has updated in the warapi so i dunno if anyone has stitched it from the assets yet
storm cannons should be coming online soon so thatll be in the warapi to finally test
id like a new map tho and i havent kept my code up to date for stitching it, and i dont have the assets from the game directly
the maps did update for last update in warapi
28 days ago?
well that had the update for the sc
Hmm OK I'll use that one
@long raft you and my c teacher would go along wel
Great march and heartlands
I think
I updated the tiles
storm cannons are alive
thanks, I think I'm gonna switch to your sat maps, they are hot and they show errors for roads easily.
sat maps were not updated
they are fucked
😦
damn they look good tho
damn i thought it was gonna be amazing for finding missed roads
height maps ?
holy shit
is it possible only those regions are ok and the old ones can be used for the rest?
hmm i think you could be right
@pure sierra you need to specify which number belongs to which faction
if you hover it tells you, how else would you indicate without taking up extra width ?
thats extra width i dont have
unless i make it a really small font
yes reload worked
Color it to the factions
Why have total cadualties that prominent anyhow? It's not that critical
You could have them as a hover over hourly cssualty rates for ecample
i was about to say change the color of the font to be the color of the faction but icanari already said it
tried that but green text against green bg not great, you can get the team by hover
@vague otter ive been seriously considering this too
Iive moved the rocket back up for now
Just out of curiosity, what was the reason to include it as it is?
Just to show it?
@barren quarry do you have a zip of the new unprocessed map images and/or the old ones?
I will have to check if I have the old ones because I was cleaning my hard drive recently
New ones yes
But I'm not at my pc right now
ok np
@long raft
om nom nom ty
reaching trail is just a black image in that
correct
hmm
good god this file is so big i cant even open it. the webp is 47mb
where do i download more ram?
where ?
Go to that one really sketchy site and click on every link then bam! You get like 75 viruses and maybe one of them will give you more ram
If a virus infects your OS to the point that it no longer works then it technically gives you more RAM by freeing up the RAM your system is using
Dont the virussus(virussi) use ram
just delete system32
wow deleting system32 gave me a 10x speedup
nice
Is there a way to find out the number of resources in a building?
I looked a bit but couldn't find it
You mean via API?
There is already an API, but there is no endpoint showing the number of BMATs in city x
I know there is an api
What I asked if your question relates to the api or in game
And no, there is no end point in the api because its faction specific data
sadge
And the api contains no data that only one faction can see
well the number of ranges is getting a bit out of hand
https://www.reddit.com/r/foxholegame/comments/rp3nub/anyone_worked_out_a_way_to_change_mouse_cursor/
0 votes and 0 comments so far on Reddit
Yep, the mod should he somewhere in the FMN discord
Barely readable at this point goddamn
hover is your saviour
display range on hover only, and optional toggle to display all ranges
i didnt realize the intel stations were part of the api too... not sure how to make use of those 
might have to
so we talk in code here?
azetc bqeqf wqgpw qdolz qczis mgeow xrgup snujq ffnob ezzbp sekbh ivfr
Beezlebup
Bah weep granah weep nini bong
Well, if it makes it any easier, I didn't use a plugboard
Programming code
discount codes 🙂
ISBNs and only ISBNs
Apha Mike foxtrot
Is there a comprehensive list of all the API calls that one can make documented anywhere?
on the github warapi
Is there any additional api queries that can be made such as unique spawns in a region etc?
yes, enlistments
its a value in one of the queries somewhere, you can find unique enlistments in a region since the war started (home regions are exceptional)
GET /worldconquest/warReport/:mapName
{
"totalEnlistments" : 148,
"colonialCasualties" : 202,
"wardenCasualties" : 222,
"dayOfWar" : 2
}
See the first pin
@past crag just in case its not clear, it is only unique per region not across maps
thanks!
well that escalated quickly
12 days left 😮
is it SSD?
no
RAID 10 ?
19120 hours on spinning disk
how does SMART think it knows a magnetic drive has ... time left
magnetic drives are binary, they go from working to not working
prediction. Its taken 19120 hours for x sectors out of y to go bad, and minimum operating number of sectors is z, assume linear progression and z achieved in 12 days
Accuracy? minimal. But there'll be method in the madness
i know but why would you assume linear progression with a spinning disk
maybe too much shadowplay recording on that drive
Eh, they may try curve fitting or something
you know whats nuts about a drive? after they reach like 5 years their likelihood of death in a given year begins to drop
then again those are ~2010-2013 drives
tbf with consumer drives too. Even the orientation its mounted in makes a massive different to MTBF
ive never lost a single one of those 4T HGST drives before and ive had like ... 30-40 of them
flat as in a typical drive cage in a desktop tends to be fine
the seagates of this error seem to die quick
seagates of that era were awful
on side as in some SFF PC's and caddies, tends to murder consumer hard disks quickly
I'm yet to own a hitachi drive for more than 6 months at a time, stopped buying them entirely
at least its not 420 bad sectors
hitachi is mediocre
and also stopped warranty claiming on the machine I had that came with one from factory after the 3rd drive
purchased a WD drive for that machine instead
seagate once again seems like the best drives now for the large 12T+ stuff
yes i have 2 seagotes of same era and age in similar condition now, my mate stopped buying them after than era
ordinarily not knowing the level of activity on the drive, I wouldnt really expect a failure at that age. But its definitely possible
thats a lot less than 8 years 😛
hmm
2 and a bit
for a 2TB drive?
maybe 2nd hand drive
those times are taken from the drives controller
so run time, but not age
so would count the time in previous owners possession
not sure about that
Thats also fair, dunno if it counts up when head is parked
this is my other one
Likewise
oh so thats bad
i dunno. maybe my tolerance is low
Generally drives tend to be 0 failed sectors, then death
well that other one had 320 !
yeah, likely all in a short time frame
its in a windows raid
i dunno if thats data stored on the disk or the OS reporting bad sectors
because a bad sata cable will give you tons of bad sector reads
If its from SMART, it'll be controller side
havent touched that box for a number of days
if its SMART then id replace ... probably both drives
i wont trust them for anything but temp disposable storage
so long as you have backups of anything important
this reminds me to check my zpools lol
dont backup , live dangerously
i was running as raid for this reason.
raid isnt a backup
Barely. Raid gives you a chance of keeping the working copy only. But should never be trusted as a backup strategy
i used to have this NAS with an annoying red hard drive light and i electrical taped over it to sleep, and one day i realized both disks have failed and i lost everything for years
I do intend on building a NAS soon
my current backup strategy is frankly disorganised and poor XD
oof, yeah, that caught me too , windows raid does not give you any notifications if the raid is not working,
so what i did is put computer management in the startup, so each boot i check it manually
better than hardware raid
best part with hardware raid is what happened at work recently - thankfully in a scenario that had full backup&recovery plans so was mitigated quickly
Losing the raid controller itself
thats the #1 reason it sucks
yes that what scares me of hardware raid, not being able to buy another card
Spare cards were kept on hand for that very reason
there are other annoying parts of hardware raid. batteries.
it offers little performance benefit if any at all
all so you can have some outdated disk mirroring scheme
Many modern machines indeed hit disk bottleneck before CPU bottleneck if running as a dedicated storage server
even on quite puny CPUs
decryption, decompression, and reading the disk basically never saturate the cpu
you are very likely to be throttled by your 1gbps network if anything
start trying to push 10gb/s+ through tiered storage solutions with full encryption then you can start to make it sweat, but you arent gonna bust its balls
nah i cant.
and by it, I mean an intel atom XD
my server has an i3 i cant choke it with cpu stuff
But more seriously. Even the raspberry pi 4 chokes on I/O way before CPU
And realistically, that'll probably always be the case
my write speed is 400MB/s because the drives cant go faster, thats with encryption and compression
i promise the chokepoint will be the network if youre able to use ssd/nvme
the PCI bus basically. yea i guess thats I/O
10gb is finally affordable, and also becoming necessary
And my desktop, thats on wifi at the moment
my wifi is > 1gbps, my internet provider will sell me 2gbps if i want, so ... itd all be wasted on a 1gb network
I have benched it at over 700mb/s throughput with my old card+access point setup
yea thats network throttle
well i dunno thats also similar to the speed of a magnetic disk, so...
100MB/s is like where i think of a 7200rpm drive on a 1gb network
Have since switched from ISP provided modem/router/AP combo to standalone modem+switch+router+access point
Access point is now wifi 6 2x2. But desktop is still on wifi 5 2x2
While I could swap its card out, I'd sooner just drill a hole in the ceiling and get it on ethernet
10gb on RJ45 is possible with short runs
totally, 30m, but it gets hot
and tbf, I am talking almost literally just straight down through the floor
so, about 1 storey's height worth of cable and maybe an extra meter at either end
the fiber cables are cool tho, and much cheaper if you go SFP+ ports
a 10gb run would be possible, but I don't currently have 10gb equipment
mikrotik sells a 4 port 10gb router/switch for like $110 but you have to buy the ports (or direct cable) additionally
and its unmanaged I think
nah its managed i thought
theyre pretty good
but again, hot
if i were wiring my place fresh, i would be thinking about twinax cable
Rental here
hmm
and not one I want to stay in for much longer
like if i was just drilling a hole and doing 1 cable, id be thinking twinax instead of cat7
Thing is in terms of drilling a hole and doing 1 cable. I already own a second managed switch
i just assumed 10gb was centered around cat7 and rj45 but found that wasnt as good, and was more expensive
oh
also the network adapters for rj45 are kind of expensive
So right now we're talking sub 10m of RJ45 in a gigabit network on RJ45 equipment, its pretty plug and play
i just found sfp+ more versatile, i reused my existing cat5e in the walls with a rj45 port, but if i had like a 15 foot run id prefer to use twinax
and i just use twinax to the router because its next to the server, saved $100 and a lot of heat
Adding a proper NAS is when I'll want to go multigigabit, and I may just have to pull tricks off like giving the NAS 2 interfaces, 1 gigabit onto the switch and the other a 10gb static IP'ed point to point run
and then save obtaining a proper 10gb switch and doing proper runs for when I have my own place
well i dig that mikrotik router, very versatile, you can make it 1000gbps with $20 ports
interesting that it has dual redundant power input
i found network cards (that dont work on windows) for SFP+ i put on my linux server that were $25 for 4 of them
twinax cable is like 10-15 dollars
SFP cabling I'll probably just use the tooling at work
for 35 bucks i got my server connected to the router for 10gbps
so long as we don't take the piss, that generally flies
Currently got an ubiquiti edge router running OpenWRT, that again is fixed with just gigabit interfaces
though tbf, to get 10gb through to the NAS, not like my router needs to be gigabit
All the ubiquiti gear tends to get openwrt rapidly
i hate that router
and tbf, theyve been "kind enough" to not pull a cisco and done nothing to block it
Albeit my modem is cisco
but I am on vdsl, so, not like I need gigabit throughput from the router
totally, just about NAS, and if its just multimedia 1gb is more than enough
my desktop doesnt have local storage
tbf if I roll my own NAS on linux, depending on the hardware in use and whether I put it upstairs or downstairs
I may even just use USB
RNDIS atop the gadget stack
Or, I've already had some experience with setting up mtp over USB on linux but mtp tends to be slow and the daemon for linux has quite a few bugs
USB device mode isnt typically available on your average intel box 😉
even many machines with a USB C port routed to the native type C interface of some newer intel chipsets tend to have BIOSes locking that interface into host only
though some machines have patches to switch it to device and/or DRP
On a pi compute module the usb interface can do device mode and therefore I could have the Nas direct usb plugged to my main machine for local access but that usb interface is only usb 2, so it would be pointless to do so
Realistically I'm probably best off just sticking a multi gigabit nic inboth desktop and Nas, just run a point to point link between Nas and desktop and the gigabit runs to the switch
or just go wireless
hdd update, i removed it from the mirror and put a blank partition on it and ran scandisk on it looking for bad sectors and now the health is 100% again. seems to have been a glitch
maybe bad controller or cable then
could have been a sleep/restore glitch
can it be resilvered?
?
re mirrored
dont see why not, but not sure if i want to bothher
@zealous sonnet the assets google drive has been made private apparently
(it says "no access")
pretty much the only thing i was looking for there was the color palette file
are you just looking for collie/warden colors?
its in the api readme but i believe its wrong
but i wasnt sure if theyre correct
They're also in a pinned message in this channel
The WorldExtent values, are they per hex, or the whole map?
I want to say the former, as I don't think these values changed when the 14 new hexes were added...?
WorldExtent.Minimum = (-109199.999997, -94499.99999580906968410989) WorldExtent.Maximum = (109199.999997, 94499.99999580906968410989)
Also I find the flags section utterly confusing, e.g. for MorCrossing all bases are 8 but the VP is 41 but this doesn't seem to match their README at all:
I know the numbers in the README are hex (1, 2, 4, 16, 32) but don't understand how they map to 8 and 41.
@hollow gyro, you need to learn bit masking and shifting, google it
you take the hex value for the flag given in the readme and use it as mask on the api flag value to get the result
basically the api flag value is actually bits, which each bit assigned to different flags, not decimal as you would see it normally
So the value from the API is hexidicimal? (So 65 in dec)
if its 65 in dec, in binary its 0b1000001
each 1 or 0 relates to a flag
yes or no
the map flags section of the readme tells you whhat position relates to what
I have a degree in ComSci but never did masking, but I know about the different base numbers.
If I wanted I can count to 31 on 1 hand 🙃
so 0x01 (isvictory) means the very far right digit
you can use masking to get that value computationally
I see you've explained this before 🤦
so 0x01 & (and) 65 (0b1000001) = 1
so in this case is victory is true
if it was 0b1000000 is would be false
So...basically turn the hex to decinal, that identifies which bit in the binary of the hex from the API means that it is that value.
So it's a cheeky way of returning multiple true/false values, but as a single hex number.
yes it called bit packing, and is a way to save data
Alrighty I ubderstand that now, thanks fkr the explanation 👍
What about WorldExtent?
They refer to a Hex, or the whole World Conquest Map?
number* any number format works
im not really up on that, you dont really need it, i dont use it, but someone else can explain it
its for the whole world though i believe
im going to bed, bye
Well yes.
I was just referring to their particular implementation; which is Hex.
New question, is there a space for detailing these kinds of dicussions, e.g. a wiki that already exists?
I suspect not as it'd probably have been pinned.
Is there any restrictions on what mods are allowed? I'm thinking of a mod that will make a 3rd party API call. It won't have an impact on gameplay, only visuals.
Why you making an api call if its only visuals?
just here
That kinda sucks
Its not a big demand topic and theres not a lot to it
im guessing anything that cold be regarded as cheating or bot like
Player uploaded skins visible to everyone who has the mod. You upload your avatar, mod fetches skins based on steam ID from the API. Not sure how easy it is to implement on the client side yet, that's the next investigation task 😄
You cannot pull IDs from the client afaik
Anything that isnt known by both factions via in game channels is not available in API
You'd have to use some sort of scraping system, which is illegal
Sorry when I meant "from the API" I meant the custom one designed to power this mod
Yeah that's what I was worried about, thanks for confirming though

boogaloo
What kind of coder takes a photo of their screen, instead of a screenshot?
There a security reason? 😀
drip
heh?
@hollow gyro being lazy
Also i found the problem out
Its displaying hsv values as rgb
Which is interesting because you can clearly see the luminance mapped in green channel
Or saturation rather
Fair 😄

butt we but q be can u cc but box d cc ct xxx wvtctx cc cc,, AA as well wearing how BB cc h
what a day to be a college student. you can just ... download your textbooks from iran. could have got through school for half the price...
Nah they're still full price because all the homework is online locked behind single use keys or time based subscriptions @long raft
hah figures theyd find a way
so many perverse incentives behind text books
thats amazing, there was nothing like that when i was studying
just for this quarter I spent.. ~150 on online access codes
Just for homework
That's not even including the online textbooks, which are another like 90 or so
thats ... not too bad
i used to spend 300-400 per semester on books
with inflation is sounds like your costs are going down for textbooks
even without inflation, youre talking like $1000 a year for books, i spent at least 50% more than that, and they were used
and it was 1864 so a dollar was worth more
Spent 300 last quarter, but some of the books can be used across multiple classes which brought my price down this quarter
Well, I will say this. Eversus would be easy to take. There is one person building.
@oblique bane wrong channel ?
how ?
I dont understand the code channel.
🙂
I thought we were supposed to talk about plans here. ._.
like radio codes and discussions. My apologies.
oh, then my apologies.
not sure if there is faction/team specific channels here ?
There are not.
no, but you can find tech support for foxholestats.com in #foxhole-discussion ;p
The main Warden-only discord can be found in #community-resources. As can the Colonial one.
Thank you ❤️
id never thought about it, but why dont that have faction chat here ?
i guess not secure
Because we have no way of guaranteeing that someone in one of those channels is supposed to be in that channel
True, like how I was lied to. Someone told me this was all Warden so I'm over here spilling the beans.
they might be implying mostly wardens in here, but its not the case
sorry again, you guys have a good night.
If we had faction channels here, it would be like the old days of global cross-faction chat lol
mud slinging
why there is no ETag for
https://war-service-live.foxholeservices.com/api/worldconquest/war ?
Because it only changes twice a war.
When it starts.
And when it ends.
So you need only request it twice-ish
Hi guys, I'm a geologist and I'm interested in making a pseudo-geological map of the Foxhole game map. I'd like to get hold of height data to create a DEM (Digital Elevation Model). I want to get this data into some GIS software then populate the map with beaches, outcrops etc. that are in game. Does anyone know if it would be possible to extract height data from the WAR API? I'm not a coder so wouldn't know how to go about this. Also - I'd like to get hold of the game hex maps to import into GIS software as a basemap image. Any help or advice would be greatly appreciate. Feel free to DM me. Cheers!
wasnt the whole point of ETags to reduce bandwidth, aka nobody knows when war is gonna end, so we have to keep calling that endpoint until something changes
Well anyone can call any of the endpoints as much as they like.
However you should call them as often as is reasonable, e.g. every 10mins.
As for this /war one there's really no need for you to call it maybe more than once every hour; since it would only change on war-end.
There's some height maps that got posted at some point in this channel, but they're difficult to deal with because every map has a different baseline and scalar. So the heightmap for one map will have the same colors as another but at different elevations.
@spark surgestarts around here #code-talk message
i would have done the work to unify the height maps probably, but we are missing the 4 islands i think, so its not worth attempting
rust posted them, i havent seen them post the rest
i think we need the procedure to do it from rust, rather than the maps themselves
otherwise we'll never get updates
manual is probably ok, i imagine it requires using unreal
i just dont want to try to find the mathematical solution for a one time thing, its gonna be a lot of work
no, there is standalone app for unpacking the pak file
i know but it wasnt just a simple asset stored inside
then just a matter of tilng them
let me try something else
"Extracted 'raw' tiles with vector info from game's files using UEViewer and then wrote a lil python script to 'stitch' them together..."
that python script would be handy
i bet its easy to rewrite
more concerned about the bug that prevents the islands from exporting
ok
would /is FH UE4 ?
yes
im unpacking now
ok, so unpacking is one thing, but looks like still need ue asset viewer
yes
UModel exports those images FYI
thats what im using
ah cool
@long raft
he said raw files
that would be them no ?
nah, literal raw files
there are no raw files
these are TGA... theyre just textures
but they have the data
i doubt you want to flatten the alpha out of them
ok png
i think they are a combination of light normals or bump maps and also height values
like maybe the alpha channel is the height
gimp
it cant open tga?
yes, but easier to flick through in windows i thought
hmm
and get thumbnails
UModel can also export as .png
oh neat
hopefully its just in column major order or something
how ? what is command
can tga hold a higher bit depth than 8?
nope.
itd be interesting if height turned out to be 2 of the components instead of 1, for more depth
but rust said he extracted raw files, and there is of course actual raw format that is often used for height maps and images
ive seen all these files before, i dont know how they tile together
youll find they arent even all the same size
so far all 64x64
yep
which ones do you think have the height data
this appears to be lighting to me
here is the alpha channel
from that same bit above ?
yes
still kind of looks like lighting to me...
wut.
red
green
wow it hates blue
it wont let me post it. also blue looks like height lol
i cant tell tho
clyde thinks the blue channel is explicit content
yea i think we have the ... right ones i dont know which channel is the height tho
i think its the B or A
A makes the most sense but when i see it visually im not convinced
might be best to start with deadlands
yea unprocessed
in a folder called textures/ui/hexmaps
yea
those are what im using for logiwaze now
i think some are ... outdated. i need to update fisherman's row
i think the file naming and output is generated by umodel/ueviewer, this is the output of list rather than just export
meaning?
maybe theres more data in the umap file than just tgas,
rust said he used those images, the purple hue ones
maybe some clues here https://github.com/cgcostume/pubg-maps
PlayerUnknown's Battlegrounds
looks the same
is it 2 of the components that are height? maybe alpha and blue combined?
or likely just alpha
so my thinking is visually select all the maps like that, figure out how they line up, stich them, then extract the proper channel or channels for height
@long raft , @lunar cobalt, @pure sierra - thanks for the responses guys. Looks like a complex problem. I know a few professional GIS guys that may have solutions to this, though I'm not 100% sure. I've read through from the older post by Rust and gathered that the maps are at different heights and scales for each hex, so stitching them together is an issue. I can throw out a message to the GIS guys for some help if you think it would be worth it?
sure. seems like a linear algebra problem to me
sample a pixel at each border, then solve the coefficients so they line up
i dont ... know if GIS guys would be able to help unless theyre good at math
step 1 is gonna be stitching the map, hayden. then it should be easy to extract the height from the combined version, and im pretty sure its in there if rust said it was
itd be funny if he was just using a normal vector component for height and didnt know better
I think he converted the normals into height maps somehow
from the light angle?
dunno
I tried running one of the heightmaps to create a 3d model in blender and blender was very unhappy with me
they only need 3 for the normal, 2 in reality
did you extract a channel?
oh you used an actual provided height map
they sure looked like height maps to me
Tried it on each channel separately, none gave me something that looked right
Then grabbed a grayscale to heightmap conversion plugin and it just got mad
no i think the heights are also scaled non linearly
Yeah agreed
that would sure make the math hard ... oof
i hope theyre all scaled the same way at least

My assumption is that this task is going to be as painful as possible, so they're probably not scaled the same
we will need surveyors 
still got a problem with stuck G threads in apache
even after adding timeout to backend
whats strange is the pid listed dont seem to exist in linux
its as if apache thinks its finishing but in fact it already has
What we need is an in game "survey" kit, to give height values - the only reason I'm asking in here (and I'm super happy I did because it's promising if you can extract height maps) is because of a silly idea to RP as military scientists/geologists analysing beaches and rock outcrops xD
any slow queries?
we all have different reasons for wanting height map data. artillery. roads. bunker construction
dont think so
Well, I'll try to explain what I did
So, each tile has 4 channels
Alpha and blue channels contain normal data. Red and green is height data
To get normal is easy. You just grab those 2 vectors and fill blue channel with value of 1 (since blue channel in normal maps doesn't really matter)
But to get the height was a more pickle thing to do. Since I couldn't figure out what to do with the green channel
So I googled and found the pubg-maps GitHub that Hayden already posted here. https://github.com/cgcostume/pubg-maps
And I used the formula from there for the height calculating
Now the stitching process. Which is the main headache.
Last time I forgot to mention that I used Fmodel to get data for stitching (Since UEViewer can't do it)
So, using Fmodel I extracted data from .umap file as a .json file
And from that .json file I used the coordinates for each 64x64 tile
And by stitching them you get this
But then there's tiles that arent 64x64 scale for which you should make an exception and process them a bit differently
And then you will get this
But then there's another issue with the ocean area
Basically all those tiles are a baked texture of a landscape mesh. And in some regions the landscape mesh doesn't extend to the ocean areas
Thus some regions don't have tiles for the ocean area (In my script I filled such areas with the tiles of a value that I sampled from nearby tiles)
And as a result I finally got this
And speaking of the landscape meshes it's time for the problem with the island regions.
Basically most foxhole regions consist of just one landscape mesh and UEViewer exports them correctly
But there's a couple regions that consist of 2 landscape meshes: Westgate (1st Landscape Mesh is the Sanctuary area and 2nd Landscape Mesh is the rest of the region) and Shackled chasm (1st LM is the Simo's Run area and 2nd LM is everything else)
And if .umap file contains of more than one Landscape Mesh UEViewer exports tiles incorrectly
Basically some tiles of the LMs can have same name and when UEViewer exports them, they get overwritten
There's a simple way to get around this stupid bug but it works only in the case when there's only 2 LMs
And the reason I couldn't get the height maps for the island regions because they have way more than just 2 LMs. Fisherman's for example consists of 10 LMs. And Oarbreaker (if I remember correctly) consists of 16 (lol) LMs
Heres Fishermans LMs
Any idea why they did that?
It's easier to edit them I guess. Or maybe Matt is just a lazy person to make everything into one LM
But actually there's a dumb solution for this dumb problem I found (I can describe it later). It requires some manual labor but it's possible to get islands height maps (I did for fisherman's and it somewhat worked). The only downside is the water area (which doesn't really matter), gets a little scuffed in some places because of the same normalization problem
Here's the fisherman's region heightmap. I tried to "smooth" problematic areas in Photoshop but you still can see the obvious issue it has between the intersections of the LMs
I didn't do the other 3 island regions cause I don't have much enthusiasm left for it 😔
Thanks this is a ton of info. I had no idea it was so involved, but yea that answers some big questions!
From a production standpoint, there's literally no reason to make it one Landscape. That's just a massive, stupid waste of time.
Also, please refrain from the "Lazy Dev" rhetoric, it just makes you look like an asshole.
Sorry Matt, I probably phrased it weird, I didn't mean to offend you (English isn't my native language). But yeah I agree, from the dev POV it's useless to wasting production time trying to combine them into one mesh.
Dont think Matt got offended, its just every dev sees this "lazy devs" from people who know nothing of how complex everything is, and it eventually gets annoying. Tho i stopped caring.
What people fail to see is a difference in knowledge.
Developers tend to know more than us, and the development process; what might seem lazy is actually genius because of something you just don't know.
The same observation could be made as a question and could have gotten an insightful answer.
There are many areas when it comes to Game Development. At the end of the day, its the players and the subjective interpretation of what is considered fun is what drives success/failures in a game. There's alot of topic on Game Design that can be interesting to see.
Thank you!
this topic is dense

01000110 01010101 01000011 01001011 01011001 01001111 01010101 00100001
@lunar cobalt do you happen to have the last known good version of the reaching trail unprocessed map?
likely from september
Uhm I’ll get back to you in the morning
ok
Well done 👍
sus
Thanks, i cant unsee it now
as far as I can tell my copies are all broken
nice
oh it would have gotten so salty
evidently looking sad is their only outlet
War API - Wiki
Some additional writings, information, and neuances with the API are available here:
https://foxhole.wiki.gg/wiki/War_API
⬆️
Maybe someone could pin this?
I'll remove the embed soon
I assume <@&213133977681264640> can pin things; feel free to copy the content and then pin if preferred.
@hollow gyrothanks, ill see if i can add anything
NP, it was enjoyable to write my learnings up 😄
I didn't overly see it as a major problem myself, that's why I didn't include that one.
I have been getting a lot of complaints about it while i was using it, i recently switched to not use it, calculating it a different way.
maybe put it in the known issue bit at bottom than, as you have
If anywhere that'd be the best place.
I just didn't see the need for knowing in-game days; it's an artificial construct that's not normally of a care to people; I'd assume.
as there are "improvement issues" and then theres the ones where the data is just wrong
Bingo
I know, I actually just tried not showing it at all, as easier, but some users wanted it back so i hhad to correct it
I would also mention enlistments is only unique per region, we get plenty of confusion about that here
Ah true
just 'found' another issue https://github.com/clapfoot/warapi/issues/99
but unix timestamp is in seconds, yet the api reports time in milliseconds.
"Combining this with World Extents will allow you to position structures onto a visual hex of a region if desired."
World extents is not used/needed at all for item placement
how ?
i dont believe it has any relevance unless you want to represent a mapped distance in real world measuremnt ?
Another big issue people get stuck on you missed is the correlation between dynamic items and static labels, that you must find the closest one to know which belongs to which
' princpiples '
Actually this is quite true, except that the extents gives you the dimensions so you can make the hexagon accuratly sized; without it you might make a one with equal height and width.
That's true, that could go in the heading of 'Map Related Data' which precedes both 🤔
we just use the pixel sizes from the images as its more relevant
I'll update the section to state it can help with accuracy and distances, but is not a blocker.
@pure sierra I haven't checked, do the static and dynamic instances of the same thing share the same x/y or are they slightly different?
they are different (i think)
Cool 👍

