#code-talk
2 messages ยท Page 24 of 1
but you know matlab
at what cost
pain
vectorizing is hard - Illustrator can do up to 20 different colors with it's image trace functionality, but it's kind of fucky. If the contour map created a ton of separate layers I could grab, that might work though.
my idea was to create a vector contour map with a script that doesnt countour the borders of the image so that when putting all vector contour maps together the borders are all the same
its probably not complicated linear algebra
would have to cut all the images to the hexagon shape
i think derp got the correct offset and stuff figured out already, right?
if you can center all maps to their correct position and crop them to hexagon shapes you can write a script that doesn't contour the borders of the hexagon
but you will get slopes at the borders because the regions are not the same height scaling
so youll be adding topography that doesnt exist
oof i could use lower quality
epic embed fail oof
in summary, if you sample a point in the middle of each border, that point multiplied by some factor (for each region) and a constant should equal the point on the adjacent region's border, with it's own factor and offset
here is an example of what i mean: with border of image contour
put it into a big system and solve for the offsets and scale for each region...
without
i didn't use a contour script but hopefully you get the idea of what i mean
make a vector contour but dont draw the edges
right but ... the heights will be different on adjacent regions
is versace still gone? like he has the math skills to do this and also it would benefit his arti calculator
he probably wouldnt share with us the solution ... hes all closed source and whatnot
If the maps are individually authored, do we have a guarantee it's even possible to line the borders up without distortions? Eg is it necesarily true that in your image (see below)
adjusting gamma works
SOrry, wrong formula above; meant A4-A3 + C2-C1 = B5-B6; or the weaker statement, if A4>A3 and C2>C1 then B5 must be > B6 otherwise the "correct" scaling would be negative
@long raft have you got the tiles masked to hex individually to share?
nah theyre done dynamically in the code
i suppose i could set up a batch...
woudl take a while
never mind
let me make slight adjustment and see
yes I can do it
i can put the hex on it, but they are not cropped to size
they should be center cropped to 2194x1900
not gonna lie they seem off a bit tho...
i wonder if 45% is really the magic number
nope. definitely not.
look how close this one is when cropped to 2150x1862
doesnt seem to be any gaps which is good
a few slim ones
maybe its still off by 2 pixels
im starting to think each pixel represents 1 meter
maybe its half a meter...
oh i thought this was for intel lol
@fringe night
@pure sierra is foxhole stats down? Timing out for me
Lmc
Ah rip
over the week, my apache servers seems to be capping out at about 450 instead of the limit i think is set of 1000
made some changes to hopefully stop this happening again.
Is there anything you can't do with WarAPI? I was wondering if we could store the data from it, then do some analysis on like "the person who holds this hex after 5 days wins 75% of the time" or smth like that
But idk if that goes against the spirit of it ๐
The game balance drastically changes every 2 months
Yeah, it would obviously only work current update
maybe after 1.0 when balance is more "stable"
that sort of thing though maybe questionable in accuracy would totally be in spirit of api, not that im saying you should bother doing it ๐
Thanks, that's good to know ^^
Yeah I think we would have to hope the Devs released something extra at the end of the war for it to be any use
Like a set of data not exposed in the API
yeah it had always been hoped thhey would release more sensitive stats post war but they neven have
@pure sierra considered using Nginx rather than Apache? Unless there is something specific within Apache that your system is relying upon?
From experience, Nginx is better at handling higher volumes of requests per second. From a basic low level VPS, I've seen Nginx handle 250K requests per second, vs 500-600/RPS with Apache2.
yeah ive run nginx b4 when i had a very small vps and it did make a difference, currently on apache as thats the default with virtualmin and is best supported easiest to use and find help for
Fair enough
resources arent maxed out so far, it was mainly a bug i believe with apache threads getting stuck during restart after x serves, so i changed it to not kill them after x servers as not needed unless you have memory leak problems which i dont believe i do
ive also been putting some of my backend data processes on nice to give priority to front end
and just working on some more munin plugins to help me monitor and diagnose what my usage is doing
I could imagine splitting the backend (API requests, pre-processing, database) on a separate VPS, and front-end on another, both within the same VLAN. Easier said than done though!
sure, or just upgrade the vps or look at optimizing
or offload some parts to aws or whatever
Anyway - love the site. Great use of the Foxhole API. Good luck with it.
thansks
I do a lot of work with server architecture so if you need a hand or whatever give me a shout.
good, im not thaat experienced so can always use some help
I'm always up for a project but i'll leave it in your hands. If you fancy having a chat about upgrading/optimizing just drop me a DM. Could get my guys to spin up a few throwaway VPS to play with.
im just installing https://gallery.munin-monitoring.org/plugins/munin-contrib/cpu-usage-by-process/ so i can zero in on what my biggest hogs are
(you can see my apache processors werent being released and dwindling)
php mainly, with mysql storage, than node for sse live updates and python for voronoi control map generation
thats just the backend
im only on a 2 core system
What's your mpm_prefork_module look like? MaxRequestsPerChild mainly.
i did just recently (1-2 months) switch to mpm from fcgi on @long raft suggestion and that helped alot
Gut feeling it's down to PHP and it's memory management.
<IfModule mpm_worker_module>
ServerLimit 700
StartServers 10
MinSpareThreads 50
MaxSpareThreads 100
ThreadLimit 64
ThreadsPerChild 64
MaxRequestWorkers 700
MaxConnectionsPerChild 0
</IfModule>
linux debian of course 
np
What version of php, @pure sierra
@long raft 7.0.33
have you dont a profile on a standard page request? i feel like its a database throttle
its always the database
or some analysis from the access log of which requests took longest?
so yeah i would look into this if/when i do a look at optimization,
i got these 2 plugins going
derp time: i start typing my response in ssh
the first one states
# It's not obvious what the graph heights actually mean, even to me.
# Each counter is a DERIVE (difference since the last counter reading)
# of the CPU time usage (in seconds) accounted to each process, summed
# by the process name, so all Apache and all MySQL processes are grouped
# together. Processes with no CPU usage at all are ignored. Processes
# that die may not appear on the graph, and anyway their last chunk of
# CPU usage before they died is lost. You could modify this plugin to
# read SAR/psacct records if you care about that.
I want to throw a brick at that formatting
the thing to do would be profile the website measuring time between all the different steps of it
perl
took me a moment to realize it was one sentence not bullet points
ive had to delete git stash save from discord so many times
yea hayden i mean ... a line-by-line profile of your code, not the processes, thats too granular
actully the top one and even munin are kind of useless to me in my needs, as munin only runs every 5? minutes, and my backend processes only run for a minute or two and finish go away
i would assume php-fpm would be your #1 process or your database
but then inside the php code to find where it spends the most time, even if its not churning CPU, its occupying a worker, and thus killing availability
yes ive done that b4
i have done profiling with xdebug before, and it was very useful
but you may find the #1 longest line in your code is a database query, and that'd help you narrow down the real bottleneck
yes, some day ill go through it, but im currently not at my resource limit so wont bother, and as soon as shard2 hurry up and dies ill have half the backend processing to do
lol
also those php versions jump in performance a lot even with minor versions
like 7.4 should have significant gains over 7.0, but maybe php aint your bottleneck
one of my biggest spike in load as i watch top is actually my python script to generate the voronoi control map
it uses 100% cpu for about 10 seconds every minute
maybe 5 sec
its not just voronoi calc though, its query db, process data, calc voronoi, output images
im outputting at 1200x1300
now could possibly half that and stretch and not have any issue due to not much detail
i find myself wondering would generating the voronoi as vectors into svg directly, and using that, would it be faster and maybe even smaller
once again, i would need to profile that script to see what steps are taking up what time
Expect shard 2 to be a thing that doesn't go away.
i know
is there any way in the api to enumerate the shards?
or do you just have to know and guess?
I think it's going to be war-service-live
and war-service-live-3
so I guess you could just put a code string in to check every once and a while if one of those is live? Or just do it manually when they announce something?
It'd be cool if there was like a meta endpoint that they sent stuff like that out on though
i want to avoid like 3 separate hard coded queries
Actually Its dually Java and c++
we don't talk about bedrock edition
I mean java edition
Its both java and c++
Why do you think its so ""easy"" to make a server compatible between java and bedrock editions?
As far as I know Java edition is written in Java and uses LWJGL for graphics
Including the server code.
As far as I know, they also theoretically used C++ on the game
I'm not 100% sure since I do not own nor see the Src Code tho
Bedrock edition, which has a version for xbox, windows, and a bunch of other things, is written in C++
For java edition it's literally in the name
where are you getting this?
Not because something is made on a language Its only made on that language
You can see any GitHub project
Not because my web is done on php doesn't mean I cant use js, XML or html
Not because Minecraft is "java edition" means they only used java when with using a simple plugin you can translate the entire Game to c++ and make servers compatible between editions
(that's my point of view)
it's called java edition because it's completely written in java, including a java graphics library
I mean... java isnt trash but it isnt the best
Its kind of chaotic
C++ is way better imo specially for games
As well as C#
why would you convert java to c++
Because java isnt good enough? ๐
Thats why they made bedrock edition in c++ instead of java afaik
but they had to rewrite it from scratch not just convert it
C++ just rans faster and consumes way less resources
oh god another one of these
Why do you think bedrock users can play the same game even on a smartphone?
I actually prefer java
We're just talking about the technical part
i mean ... people who just think java is inherently slower and uses more resources
not because it was ...rewritten
and because the c++ is doing a lot less work
I'm a SysAdmin, I can assure you Java consumes a lot of RAM and generates a lot of fragmented trash
Just by trash you can be losing entire GB of ram
But anyways, Minecraft java edition as a Game is for me Better than bedrock edition
I'm just honest in whats more optimized
Wild Allen? Has entered the room... ๐
My understanding was it was written in Java initially as it was a entry level project and that's what the guy knew...
definitely not performance minded programmers, but i hate the idea that c++ is inherently faster when its just not doing any of the modern security and stability work that modern languages are
I always have to consider the context of the project requirements in terms of the x language is better than y argument. On their own each are a solid language, but one could be more desirable for the needed solution.
Especially if we start throwing in business / project management requirements lmao
I've avoided java like the plague, haven't really found much that needs a language other than json/xml/sql, python or powershell. Only exception is game specific languages like sqf for Arma 3. I'm no code pro, but more or less seems to me it's just a matter of use what you know unless theres a specific use case
Honestly I just hate java because of how worse It is to Code with and how many resources It eat by doing virtually nothing
Python > Java
+1
Also got to consider that bad C++ can also be slower than good python
And taken purely at face value, python is slow, about as slow as it gets
But not all code needs to be fast either
Python on paper is slower even than java which itself on paper is slower than C++, and has a huge hampering for high performance computing from the GIL preventing true multithreading (even if using the thread module in python, all your code is running single threaded). But many times python will both be fast enough and also quicker/easier to write and debug
The dev cycle can be shorter, which itself can be hugely important
if I just want a quick thing to copy files from a build output folder to an artifacts server, sure, I can write it in C++ and it might shave a few milliseconds off of the execution time, but also probably take a lot longer to write than just a shell script that also gets the job done more than satisfactorily
genuinely has nothing to do with the programming language in use as all multiplayer games will usually serialise game state over the network in an agnostic manner
Multiprocessing library exists
I have used multiprocess libraries for Python?
I am familiar with it, it's not a multithreading library though. It cheats and makes new sub processes
Processes are not threads
welp
tbh, anything I use python for runs so fast that the split second I win using C++ is not worth the effort lol
Threads importantly share memory space
processes are discrete applications and get their own memory space
In a threaded environment, I can essentially share variables/state between threads (there are some things to keep in mind while doing so). Processes can not
There have been many attempts over the years to remove the global interpreter lock from python though, which in turn will actually allow true threading in python. Also some non standard python implementations like IronPython do not suffer from the GIL in the first place
I think thats something crucial to always keep in mind. What is satisfactory. And someone else above mentioned that there can be other business decisions impacting selection of a technology.
In notches case. Minecraft was made in java because it was a hobby project and he wanted to screw around with java. That it exploded in popularity? Win win for him. That minecraft is so dog slow in java? A lot of that isnt actually javas fault, a lot of it is plain bad code
Mojang have put in a lot of effort to getting it in a better state. Bedrock being so much faster? Thats mostly what happens when you get professional software engineers to do a clean room implementation, they just happened to choose C (not C++ initially)
Their reason for using C wasnt even a performance thing but portability. Java is not available on mobile platforms (contrary to popular belief, android is not using a java runtime and has never been a java compiler or runtime). Initially they needed to support both android and iOS. The only technical solution that met that requirement at the time was to put all game logic into a C library, then have android/iOS apps wrap that library (and at that time, you could not use C++ in iOS, hence the choice of C - which was allowed)
Well yeah I am aware of advantages of C-languages. But the fact is, is that code I make are often for table operations or file conversions, so they take less than a second in python. I bet they are faster in C++, but why bother?
As an engineer, you always have to make a choice between optimizing and resources available
regardless if that is computer, mechanical, electrical, industrial, or anything else for that matter
And for me, it has always proven to be the most effective to work in python, since I do not have to make complex (realtime running) programs or code that is solid enough for potential years of repeated use
Anything more complex than what can efficiently be done in python, I have another program for already ๐
For us it's python for prototyping/proof-of-concept, but commercial product gets written in C or C++ depending on the use-case. We general develop embedded devices in the cybersec industry, so writing our own drivers and minimizing 3rd party library dependencies is key.
But that's mainly driven by engaging with some super low-level layers - serial, ttl, CANBus - heavily bridging the gap between hardware and OS
Dayjob for me is C# with a C++ DSP helper library and also a driver for a USB device which of course is C++ also.
I get the fun task of a lot of the build infrastructure maintenance too, thats mostly just powershell and bash scripts (both are in there depending on whether the script relates to the windows, linux or mac builds, though I would like to move everything into powershell-core if just for consistency)
i mean each language has a use case, and you pick what language you need for what use case
(obv rust > c++ any day ๐ )
but its not like really smart people just couldnt make these languages as fast. they are doing more work than c++ programs, necessary work
well yeah most abstract above c++/c/asm/whatever to handle stuff like memory management, inference ect.
idk about necessary, c++ can do anything any other language can do
again its about use case
but it doesnt... and neither do the coders
and we have to just hope theyre all kernel programmers who dont make mistakes
thats the point of c++... its a low level programming language that trusts the programmer to not make mistakes
ya know like ... good luck doing buffer overrun checks on everything, or building async code
again bro use case, sure c++ is a pain in the ass but the usacase is for low level programs that need to be fast
I write PHP because I hate myself
imagine not using rust for backed in 2021 smh smh /s
people are using rust for web backend?
I know of a firm that ported their entire blockchain engine from C++ over to golang simply because it was the hot new language. Burned through almost 7 months of two senior dev time and they shaved something like 2.7% off the time taken to do an initial blockchain sync.
That whole sector just chases buzzwords for the sake of buzzwords
its a lot easier to maintain go than c++ tho
i would not have expected any performance boost
Is it possible to have a discord bot that announces when a dev talks in #foxhole-discussion, maybe rebroadcast anything said?
Or would that require the bot to live on FOD?
someone at fod would have to give you permissions to load a bot, unlikely
or you could run a client-side bot which is against discord TOS
and moderation would probably ban it if they saw it
Could you call the GET /api/channel/messages endpoint and provide the auth header of your account, or does that fall under a client-side bot, pretty sure it would?
yes you could run a scraper bot as i have and they would never notice
Going back to my previous statement, the API endpoint used to "search channel from user" from the search bar would probably be your best bet since it does the filtering of messages for you
is there a foxhole api
If you are doing anything with API endpoints through a non-bot marked account you are breaking TOS
"non-bot marked account" i don't see any authorization/authentication in war API, nor is any link to TOS provided in repository.
he's talking about discord
discord staff will tear off your ballsack if you use user discord token for running scripts
hey im researching something about design, master software eng here ๐
anyone has any experience with Bidirectionality aka making the UI go from right to left (arabic, hebrew speaking countries)
ive asked a few ppl from those countries they said the apps they use are all standard left to right
i have done some of that before
was pretty straight forward, left align switched to right align, and the fonts themselves already render in reverse
did it to practice, but like it might be straight forward in a small product where in a bigger one it might take resources away (time, manpower, money)
not sure how common it is still trying to ask ppl that live there. I guess if you are a small company and your userbase is mostly from there then it would be justified, or if you big *khmm google
so i just had this exact thing happen to me, wanted to recursively get video codec for files
started off with bash find and xargs example which worked by itself
but then when i start to expand it, like i wanted it to echo the file/path name as well as the output from mediainfo command
well
after about an hour or 2 of googling and trying different ideas gave up, install python on the nas wrote the script from scratch in about 10 mins and its running
this has happened b4 , but i thought its so close, im committed just try a few more variants of bash scripts but poo
mmm bash scripting ... yes... hmm ...
always unpleasant
i feel like ive been through the crucible on it tho now, i feel like i can do almost anything in bash now
Today I picked up a desktop computer while running and put it back down and it broke it
Just beeps no post
Tried unplugging everything including hdd, still nothing, turned out ram in out fixed it
Must have been the flex in the case
Wtf did you do
sloppy ram
is the MB giving you a post code?
@barren quarry i was just comparing your site as i something is up with victory towns either on my site or the api. but i noticed you show ownership of the rocket sites. afaik this is not accurate as it only applies to the original team that claims it, if another team comes along and does the rocket thing stuff there the ownership in api doesnt change unless they fixed it.
What ingame event corresponds to team id change?
You haven't answered the question
you mean for a rocket site ?
Yes
im not sure, maybe the initial start of construction, best ask someone else, but all i know is it never changes if another team takes over, now also not sure if they can inherit a partially constructed rocket, or have to destroy it and start again, but the teamid does not change
Interesting
maybe im wrong and misinterpretted
more investigation is needed some day
ive never done anything rocket related so ....
all i remember is this screenshot i took, and thinking it couldnt be right that a blue warden rocket is just left alone deep in enemy territory
still getting all the junk
Does anyone have a list of the Map Icon numbers that match up with the names of the icons in warapi/Images/MapIcons?
https://github.com/clapfoot/warapi#map-icons
https://github.com/clapfoot/warapi/tree/master/Images/MapIcons
JavaScript is not a programming language, itโs a troubleshooting simulator
32 victory points (all them) required to win, has this been done before ? (all required) nukes the enemy back line would be the only way i could see the ability to do this, but how to pull this off when its their back line....
4th graders have better math skills
whats 10 + 27?
thats if you meant that there are 32 vps on the map in total
if you meant something else then nvm
you dont need all VPs to win, only a subset of them
so i assume there are 37 total and you need 32 to win
๐
Help, I found out the company I work for codes in JavaScript on Note++
I do all my coding in notepad 2
What do we do with reporting foxhole official website bugs? The OGP embed for https://www.foxholegame.com/ is out of date ๐
Perhaps here? https://www.foxholegame.com/feedback
Ah great thanks!
...you know we do some weird things just to get around the fact that there's no way to get reserve stockpile contents from the api
the number one thing i want for foxhole is just a way to be able to generate a key for each of my reserve stockpiles and then be able to get data from the API about those stockpiles
preferably before i'm forced to have to make a program to scan through a screenshot of someone's mouse hovering over a stockpile on the map
or find someone else's
because that kind of thing is just cursed
I really doubt that type of data will be exposed
I actually think it could work like you say where there are extra data available with key access.
But the small scale application of it makes me think it's unlikely to be done
I would like the API to give us information about the player (name, level, commends received, rank, time in war, faction, regiement, ...). Is it possible?
Currently possible, no. Technically possible, sure, but very unlikely to ever happen. API is very low on Devs priority list, dont expect too much
Is there any way to show the death counts for entire the war, on the entire map?
Like on the player screen.
you'd be surprised - i know a lot of people (and, in fact, regiments) who really want to be able to view all of their stockpiles and filter them and use the info to plan out factory orders and what to push to forward stockpiles - and the effort they've gone to do that anyways, even without being able to get it easily from the api
I mean in theory, you just add them all together right?
also https://foxholestats.com/ shows all the death information, it's near the top
and they also split it up by map
Sure, that's pretty easy. Hoping I wouldn't have to do that though.
i'm also pretty sure it's made by the guy i was just talking too
You mean the guy with "foxholestats.com" in his name? ๐
What gave it away
idk
something about his voice
there's also a couple other things that do the same thing, for example https://sigilhq.com/stats/ is a very similar thing made as part of the colonial website sigilhq, but it's public
Web site created using create-react-app
that's another one I don't really expect to happen - because it would allow you to tell who was playing on what side etc. That was previously an issue with Rich Presence, and is why the game has all the files and code needed to turn it on, but it isn't.
I have an idea for a tool, but for that I need to have the regiment and the faction of the player ๐
If it's really something you want, maybe make a request on github. I'm just a discord mod, it's not something I have control over.
What a github ?

it's in the top pinned message of the channel
I was hoping yall could help me with a question about siegecampd policy on 3rd party apps thay serms relavent to some of the recent convos in here. I would like to start work on an image recognition stockpile project. But i don't want to start gathering all the images I'd need and everything just to have the program get blacklisted or something, are they generally pretty friendly with this kind of thing?
What do you intend to make? @cedar patrol
I want to make a program that essentially totals stockpile counts and exports that data to a viewable database. I want it to be something you run in the background while you play and when you open a stockpile you press a button and using image recognition it will log where and what is in that stockpile and in the future update a website or spreadsheet with that info for clans. Ideally you wouldn't even need to press a button but idk how resource intensive that would be yet. I don't want it to control anything in the game, (except maybe to auto scroll the window to see everything but I'd like to avoid that as automatic movements in a game of any type are suspect). The main goal is to alleviate part of the burden put upon logi players to keep inventory and ideally down the line incorporate things like stockpile totals and suggestions for what to produce and where to put it.
End goal is have multiple logi people running said program in your clan, and hopefully have an accurate and up to date count on almost all of your clans stockpiles at all times as long someone has been to it recently.
Other features could include stockpile timers etc though I imagine just getting the program to recognize all the individual items will be a bulk of the workload.
Thats kinda why I figured it'd be ok, i could do it manually by taking screenshots and what not already, just wanted to eliminate time sync that already exists for logi
Just do it, but only make a yeah demo
Pretty nuch the plan, just don't wanna get banned for testing
oof already running into problems I hadn't considered, might be a bit of work to get it to recognize where the stockpiles are located, I had assumed it was in the inventory window somewhere for some reason
i was wondering that yesterday, but thought you might just use it for a single stockpile
Eh I'm using a single stockpile for the coding infrastructure and a proof of concept so to speak, but I was sure it would say like "Therizo Seaport" at the top for some reason, I should be able to use an image of the townhall as a marker for location but tying that to the stockpile itself might get tricky when the map shows multiple town halls
I wasn't aware you could use tab to switch between private stockpiles on the map until this morning so I've since switched to trying to use that instead of the actual stockpile inventory
to hopefully allow you to quickly update all stockpiles from the map
Looks like I might be able to hopefully check the closest townhall to the cursor and gather it that way
not that I know of? Only talked about this here and with a couple regiment guys, just looking for a useful project
idk what to tell ya, I'll have to see if maybe we could help eachother if true
;=;
error: expected unqualified-id before โ=โ token
1 | ;=;
| ^
lmao
so shard 1 war 83 now longest, war 33 days so far
What was the previous record?
about 30
Oh sorry I meant what war ๐
75 21 Apr 2021 31.2
still got apache problems with workers hanging
@orchid nexus
Is it all running off one piece of hardware?
Hrm. They all seem to be hanging on gracefully finishing, does that include log writing as part of that? Could be disk contention
not sure
What processor and disk? Spinny disk?
Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2 cores
Ah you don't have a CDN in front of it?
Considered cloudflare?
not realy
Their free plan would probably cut your traffic by a noticeable chunk ๐
could try it, but not really having bandwidth problem,
i believe it may be an apache bug
It would cut down on traffic tho, so you'd have less requests for apache to handle
So the problem would be less noticebale
my problem seems to be workers getting stuck in G state
indefinately though ?
There might genuinely just be that much of a backlog with that many workers
Looks like they patched it tho
my apache log is full of
[Tue Oct 26 09:45:08.583993 2021] [mpm_worker:error] [pid 13593:tid 140601294725184] AH00288: scoreboard is full, not at MaxRequestWorkers
im still on Apache version 2.4.25
Ah well that would do it lol
have to go from debian 9 to 10
would be good if it works ๐งโ๐ง
i see there is stretch-backports-sloppy
apache2 (2.4.46-1~bpo9+1)
You should defo consider a CDN tho. A single load of the website makes 276 requests, I reckon at least 150 of them are to your server
i will when i do a review of my site performance some time, its pending as my loads are a bit on the high side
i will make a tiket to find out, it could be ssd. some of the plans are, but ive had mine for so long maybe not
Yeah, obviously also disk I/O uses up CPU power too, so the longer the disk takes to read and write
You can also find out yourself if you have SSH access
yeah, ive had it where processes are like 3% cpu usage but loads through the rooof, was hdd activity
i made a ticket
hdparm -I /dev/sda
Assuming you only have one disk
That should give you the model number of the disk
even on vps ?
Depends on the host
it would be virtualised
python has too many libraries me no likey
Thats the nice thing bout it
I just don't like having 10 windows open trying to look through the documentation of the various ones i'm using
<@&440174949647515652> Hi can I contribute the the api? I donโt play the game, but my friend reached out to me since Iโm a software developer. I would like to build out an endpoint to retrieve data about resources at locations for my friend.
This is the data he is looking for, I donโt see that exposed in the current api
iirc
there are reasons they don't do this
also i think the api is like
bottom of the list if there is a TO-DO list
Could end up being an expensive query, makes sense.
From what theyโve said in the past I donโt expect them to add anything faction based to the API
The foremost reason I think was that its faction specefic info which could influence the war
ah yes, let me have full total knowledge of enemy stockpiles. That is fun
Hmmm so my code is doing what I want it to so far, but it kinda skipped a step on me and Idk how
@pure sierra could rebuild the site on a cheeky Vultr instance for $5/month to confirm if it's an issue with your current VPS, or something else.
@long raft @barren quarry anybody what is 1 map width in meters ?
thanks
length of a region is 1.89 km
width of a region is 2.184 km
there we go added a basic measurer
This little manouver is gonna cost us 8 years!
ty
? What?
@pure sierra your map for shard one has been fucked for quite some time
whats wrong ?? @barren quarry
does it look like this for you?
yes
well this voronoi is like more than a day old
ok, let me check
ah db pass change not updated everywhere
ok i think its all fixed now
yeah that is funny bug sometimes, hyper foxhole
What is this
magic words that do things channel
So is the number/hr how many troops there are per hour? I actually really want to know how this works
Oh its casualty per hour
What's with the greyed out sections in shard 2?
inactive maps
Ok
What do they colored circle icons on foxholestats mean?
How to extract the configuration files to know the costs of crafting, armor, life, etc.?
i found this https://docs.google.com/spreadsheets/d/1BiIihxOSoeQYrFIMSygxRkYj29VSLrRT/edit#gid=1977084440 but does not have all that craft
The wiki has all costs
This doesn't have everything. But it does have a lot of data associated with items that are crafted in a factory / MPF and is current with Update 46. Might be a good start for you ๐
https://github.com/joshuaHallee/foxhole-item-api/blob/master/setup/foxhole-db.json
thx
oh cmon this is our bot/spam sanctuary bruh
nobody in here is stupid enough to click that
lol
@hexed tinselcasualty rate as color
@pure sierra foxholestats seems to be a bit broken, reporting 1 more VP needed while in-game is 3
loading in one sec
thanks
trusting FOD may have been a bad idea, we'll see
nah could be, ive had that count and display got out b4 after reset
ah FOD is just being shitters
sorry for ping in that case
np
war over
hey guys, the region zones are just made of voronoi things right?
@barren quarry gotcha, ty
cringe arch user
i want to make a crypto that half is mined as collie coin and the other half warden bucks and it uses the api so when one side wins a certain percentage of the opposite coin are decimated
or maybe if that worked on top of etherium
is there already a crypto that works this way?
i can imagine the memes
colonials lost
how will this affect colliecoin economy?
how would you link a price to the outcomes?
Is there an API for foxhole?
yea google warapi
how do you link them
in markets you dont set prices. you set supply and demand
price is determined by those
like say you set the price for collie coin too high, nobody buys it
even when they pin a currency to another, they have to print or destroy money to keep the price the same
or offer exchange value at a guaranteed rate...
Thanks a lot
the problem with my method of decimation, people could predict which coins had more risk, and individual coins would have different value, and it wouldnt be fungible
or maybe the randomization seed could be the length of the war
then it wouldnt be predictable
oh its like virtual gambling
i think theres just enough data in the warapi to make a crypto work
good god why hasnt somebody done this for like football teams
oh maybe because you can buy actual teams huh
well its ... zero sum, so nobody makes money
i shouldnt say that.
its not creating wealth, its basically gambling on price like ... any crypto
the only people doing work and being paid for it in such a system are the miners
and you have to have miners because they process the transactions
really really want to make this
Will they ever expose metrics for faction industrial output like resources collected/refined/items produced?


If you want to go crazy, before a war starts let miners speculate on the time a town will switch hands. The more miners speculating on a town the greater the value goes (up to some cap) and the longer into the war that the switch happens, the greater the value. The town must be held after the switch for some number of IRL hours before the coin is distributed. The miner with the closest guess is awarded the coin. Each town on the map can only be mined once per war. If there are many guesses with the same time, the created "coin" is split amongst them.
All of this can already be done with just the faction info for bases/th using the api.
The api doesn't say when something switched though
api tells you if it goes from collie->neutral->warden right?
We'd have to record changes and analyze the data. It would be nicer if it did output a timestamp.
Do we have any idea what bAllowTickOnDedicatedServer:1 would be
The way Hayden tracks switches is just to see if something changed between his API calls
code the new warden tank so it has less range
welcome to code talk, the place where the devs don't take balancing ideas from!
yeah i doubt its mine, alr checked the pihole i didnt block any of your domains
something on my server got broke
looks like it did ngl
yeah my mysql server not accepting logins
got some weird password corruption, and had to change it, now seems ok
@flint basin thanks for the heads up
np, thanks for fixing
any way before i got interrupted by that
@long raft
dude, i already have had thoughts of this (betting) ---> LETS GO ! ๐

Oh boy, intentional throwing of wars to take over the market of an in game casino? My favorite!
What is the blue and green flashing dots?
@cinder dome relative rate of deaths
Hmm ok ty
19293974830202847820102028372716182020202388291287383030192729181891010102288373737377748595948372639494636383737525141352820292629283639320023636375224141517192003377292910110928727273773903037161627393039271716163733902917366365119192833638292982637338929192836363637382solve my code
@pure sierra suggestion: make the Town Base icons a bit bigger, imo its pretty hard to determine if they are green or blue
Just the town halls?
yes
make them relic size and it'll be much better
just my opinion ofc, but as a developer myself i find it important to give feedback
oof i thought maybe i just had not updated this road
Can't really see
different road types wrongly layered?
road abruptly changing tier
yeah all rules/bets are off on reality outside of map hexes
I present the border between Fishermans Row and Origin:
road transitions for no reason at border
Build the wall
is there any way to tell if something (like a town hall) has actually just been destroyed or if the server's just restarted
maintain a database of state and check for differences
that's uh
not gonna help
...in fact considering sigil stats and foxhole stats both seem to suffer from this problem
that is literally the only way
well, ok we could keep a record of when something was lost and then check if it's been retaken again without going through the under construction phase
and if that happens remove both the previous records
it's my fault for not wording it correctly but I meant is there a way to check before you log either, and i'm guessing the answer is no
Honestly, we should bug Phil/Casey or whoever to give us timestamps when bases fall/change hands. I don't see a downside to that information.
they will suggest you add an issue on the github
is this supposed to be a DN reference?
Got a question for my green frenemies who are on SIGIL
Does sigil have a bot that shares the roles assigned on sigil to other colonial aligned discords?
i guess your shoulders are the roll bar?
The chassis flexes so much that its impossible to roll it, genius design actually
I'm struggling a lot with dates and stuff while creating a booking app. Any thoughts? Literally an event may have 3 people as host but I have to check for availability for them so if the 3 of them have 1pm occupied then it has to be shown as disabled lol
specifically what is the problem? seems like you have it figured out
I mean, lets say you have a table/model called Closer that is part of a table called Booking in which you can have as many Closers as you want but lets say that you have 3 Closers and all of them are scheduled at 3pm, I know that I could check that but in the DB will I store each occupied hour/date and then query them to check if they match? I mean in terms of for example if I have a Booking that can be scheduled 3 months ahead from now, I'll have a looooooot of dates in my DB for each Closer.
I know i'm not explaining it too well but its because I cannot visualize it as a solution because I dont have any structure on mind lol
I guess so...
select distinct a.* from [closer] a inner join [closer] b on a.date=b.date and a.id < b.id;
it shouldnt a particularly slow query, theres a lot of records filtered out
if you index the date column it should be very fast. testing for time overlap is similar
there are faster ways to do it but probably not worth the effort
Just finished up a Rust wrapper for the foxhole war API. Feel free to open issues and berate me endlessly: https://github.com/bahildebrand/foxhole-api
It's just the map info, which is the only api exposed I'm aware of. I'd be willing to add anything else that is available
<@&448665379196108815> <@&440174949647515652>
<@&448665379196108815> <@&440174949647515652>
rofl
back at it again https://github.com/jonahsnider/foxhole-client.js
it also exports complete typings for the API
import type { Api } from 'foxhole-client';
const warState: Api.War.State = /* ... */;
Any potential for player info via API? Perhaps SSO to allow for groups to vet players? Perhaps just war history for players to start
I think that might really promote group recruitment as well as promote trust within each side
obviously this limits per steam account, but it would be a good place to start for groups to recruit. Use EVE online as a standard
even if you used their old API standard, that would be fine. allow developers to pull info, if player requests it. Basically allow for an API that the player can request and get a key. That key could be used to pull individual player war history. I understand that recording and allowing API pulls would be a lot, but that's the one thing that's currently missing for the community to move forward.
In a sandbox game, that allows limited greifing and minimal dev / admin oversight, it requires players to organize and police themselves. a player specific API would move things forward significantly
literally a wet dream of everyone in here plus the staff of sigil/wuh
Obviously having a fully open api would have problems, need to figure out a way to implement SSO, then the player would give API info to said group. Its the only secure way from both a player and dev perspective
Then that API given by the player would allow certain info, such as private stockpiles they have the key for , etc
i strongly doubt the devs will go that path
foxhole is old news
lol
Is modding allowed in Foxhole? I wanna make a mod to bring back the chat sound
De-facto yes
What's included in this API? And do you have an example to show of it's application and what info you can get from the game?
it's just a wrapper for the war api
ok, will dive into it a bit
there are examples of each method here on the docs https://foxhole-client.js.org/classes/mapclient
Documentation for foxhole-client.js
import Foxhole from 'foxhole-client';
const foxhole = new Foxhole();
const dynamicPublicMapData = await foxhole.map.fetchDynamicPublicData('StonecradleHex');
there might be
you could try generating one with openapi & https://github.com/jonahsnider/foxhole-oas
alright, new project here we go
I'm trying to work out some of the physics of the game as well, it seems quite inconsistent
vc
not going to find anything about that in the api
Some of the links in the pins seem to be broken?
just say which ones you want we can see if we can help
mainly the local javascript psycho repos that were linked
did we ever get the 4 missing island maps for topography?
Hey guys ! Is there something for getting the data out of foxhole ? For creating a bot that gives you live stats about current war
or even past wars
np ^^
and thx for the link tho x)
new search
^ I like that update!
A+ on that change
Mhm is nice
ahk script to toggle clicklock in windows with ctrl alt c
Also I hate DLL function stuff now
took me 30 minutes to get the signature working
because microsoft documentation ๐คฎ
1
auto hot key
ah
scripting app
If you're writing an AHK script.. why not just make it hold down your mouse key rather than call click lock?
yea i have often wanted to make a vbs script that would enable it, but its tricky to enable click lock in any automated way
i suspect mouse keys might be easier. and again - its better than click lock
just set up macro, pressing toggle would make it infinite clicks, pressing again would turn it off
Folks from the Warden Unity Hub and The Colonial Sigil; would you be interested in setting up a community IdP? Something that would provide SSO with a faction claim powered by your respective verification processes on the respective discord servers?
@neat fossil @cerulean shuttle
Could you elaborate on the concept a bit? I'm unfamiliar with the term ):
Sure; an identity provider (IdP) is a service for sharing user information with other services by allowing single-sign-on (SSO, in particular the protocol is called OAuth2). Basically you can log into other services or websites using your Discord account; you don't ever share any details with the service directly, instead they redirect you to Discord where you give your consent for Discord to share details with them directly.
When the external service gets the details, they are getting them directly from the IdP (in this case Discord), which means that information can be trusted to a degree. If Discord says the user's username is EternalDeiwos#9344 then that can be trusted because its coming directly from Discord and you're not having to take the user's word for it.
So on to my idea; I'd like to set up an IdP, which users register with using their Discord accounts, and then use a bot to record which roles those users have been granted in WUH/Sigil. Then, anyone else can register a client application with the IdP and use that to authenticate users for any other purpose including any website, possible mobile apps, or anything else really. Basically something like this would allow the community to build more than just read-only websites and information outside of the game.
As for the user's information, it would be kept on the IdP with only specific information shared on a per-service basis only after the user has explicitly consented to sharing that information with a specific service. The most interesting piece of information would be a field that describes which faction a user is a part of (possible per-shard, although I am not precisely sure what the processes are for WUH/Sigil yet).
tl;dr: A service like "Log in with Steam" or "Log in with Discord" that will tell the service which faction a user is a part of based on what roles they have been assigned in WUH/Sigil on Discord.
Hmm, that sounds very interesting
I'll have a word with the other admins about this, thanks
just use macros bro..
because I wanted to do magic
same answer to you
@HudsonC#0485 @pliant lantern
how?
The two discord servers are already verifying users belonging to a particular faction. I'd just read their Discord role assignments to determine which faction a user is a part of.
im afraid neither is very reliable
theres no guaranteed way to determine a player's screen shots match their steam id which match their discord
definitely no automated way that is secure
Short of the devs exposing some API that lets you query faction status of a player - which is unlikely to happen.
I have to agree with Derp, it won't always be reliable, especially when you're pulling the data from the community hubs that require a screenshot verification to enter as it can easily be manipulated by people
*likely
But not before 1.0
i imagine if there were a reliable automated way to oath both sigil and wuh would jump on it (and every other discord)
Really? Whereโd you get that?
Past convos with Phil, he said he loves the idea of having more API tools in the future but not any time before 1.0
Ah
I still kinda think they wonโt expose specific player stuff - last time that happened with rich presence it was interesting
It doesnโt have to be perfect, only good enough. And the process is currently good enough for WUH/Sigil. Users would need to accept the risk that it can be manipulated and be careful what assumptions are made, but that is still better than nothing.
Wouldnโt it be better to an API backed by some level of scrutiny that is already being done than nothing at all?
You could maintain a manual database of known players
How to generate the tiles for leaflet ?
download exe, drag and drop image on it
or whichever binary for your OS
this
ahh leaflet, I remember using it years ago for a student project
its pretty nice for creating interactive maps
yeah its easy
yeap
I've had some thoughts about creating a GPS overlay for foxhole...
wondering how I could get the location of the player from the application
how would you get the players location
one way would be to use opencv in combination to capture the location from the map displayed on the bottom left corner.. but that would be overkill I guess
i doubt there would be enough detail to work that out from just that map
There would be but there are hundreds of unique locations. No fun
GoldenArrow_97#3136 has been warned. || Spam. Read the pins.
Can you add an option to organize in folders or customize the name ? Example: %z%/%z%_%x%_%y% .png -> 0/0_0_0.png
eh...
i see the use of it, i just write a command line for something like that
i think most users of it use windows and just drop files on it - thats my guess
ill write it down
for f in $(ls *.png); do newname=$(echo "$f" | sed 's/\([0-9]\+\)_\([0-9]\+\)_\([0-9]\+\)\.png/\1\/\1_\2_\3.png/'); mv "$f" "$newname"; done
totally unreadable, im glad command line stuff is short
f not found
hmm
@echo off
set list=acrithia allodsbight ashfields basinsionnach callahanspassage clansheadvalley deadlands drownedvale endlessshore farranaccoast fishermansrow godcrofts greatmarch heartlands howlcounty kalokailinnMercy lochMor nevishline marbanhollow morgenscrossing mooringcounty oarbreaker origin reachingtrail redriver shackledchasm speakingwoods stonecradle tempestisland terminus thefingers umbralwildwood viperpit weatheredexpanse westgate homeregionc homeregionw
for %%v in (%list%) do (
:: clasic haxa map
%cd%\libs\tiler\binaries\Tiler-Windows-x64.exe -zoom 7 -input %cd%\dist\maps\clasic\%%v.png -output %cd%\tmp\maps\clasic\%%v
for f in $(ls %cd%\tmp\maps\clasic\%%v\*.png); newname=$(echo "$f" | sed 's/\([0-9]+\)_\([0-9]+\)_\([0-9]+\)\.png/\1\/\1_\2_\3.png/'); mv "$f" "$newname"; done
)
I did this @long raft
is that powershell?
Console V2 and powershell yes
i forgot "do" keyword for bash script
probably forgot \ in front of all the + too doh
writing regex in linux command line is ugly
very tired
I've released Stockpiler, my app for transcribing stockpiles. Hope this is the right place to put it in case someone finds it useful. Please keep in mind I am not a professional coder. :)
Looks interesting
Dozens of people have had this idea but it's the first time I see someone actually do it
woaw ... does it work?
submit to disks machine, kastow he needs more colonials
Well I tried it and it works exactly as advertised
took my computer less than 3 secs to scan & output a fairly full depot
@raven hornet so what do you need to fix your missing items list ?
Phew!
Was it a named stockpile?
I'm compiling a new version now that lets you choose which of the 3 (current) exports you actually want, so you can turn off CSV for instance. It remembers between launches.
So that spreadsheet has two columns after the item number I assigned. If there's an X in the second column, it means I have the icon for that individual item. If there's an X in the third column it means I have the icon for a crate of that item. If they're both blank I have neither.
The easiest way to help is find a stockpile with one of those items and send me the saved image of the stockpile. Feel free to crop everything else if you'd prefer to do that. My icons are 34x34, so just make sure if you crop other stuff out you leave me a good buffer around the item itself. My 34x34 icon starts 11 pixels to the left of the grey amount box next to each item.
when a program can identify which gun is what better than you can
Here's an example of what another user sent me to help. He zipped them rather than send them over Discord since Discord compresses the images and messes them up.
I'm genuinely surprised (and glad) that the program can actually tell the difference between the new ones, because I sure as hell can't for some of them.
tells you how well all the captchas the internet has done have taught CV
Template matching is really pretty spectacular for this, luckily. I know some other programmers have tried to use machine learning to do this thing, but from what I understand they haven't had much luck.
I have yet to have a false positive or misread with my testing, so why complicate things? I guess thats another way to say I don't think I am smart enough to make that route work, haha
ok so if I go looking for icons do I have to be in 1920x1080 ? I usually run a higher resolution@raven hornet
Yes, sorry. To get it to work with other resolutions it would need a whole new icon set for each one.
ok np
I know a lot of people use those colored icon mods, so there will probably be at least one more set coming for that.
But likely still 1920x1080 for that one too
ok also why did a dev post a picture of a cool Highlander model but linked to your post on reddit
wierd but hey free publicity
What are you talking about, I didn't see that.
?
I can only assume it was an accident, but hey, I'll take it!
happy little accidents, just like how trees are painted
Does anyone know what "totalEnlistments" means in the https://github.com/clapfoot/warapi ?
number of unique steam ids that logged into the region server during the war
It must reset at some point. It is only showing ~250 players on each side who have "enlisted" in the home region on shard1. Every player has to enlist to the home region to play, right?
Home region resets enlistments every day
Thanks. That makes sense. Do you know what time they reset? Is that server aligned to UTC time or something?
green - colonial home region
blue - warden home region
black - steam game pop
very cool. thanks
@haughty quartz this data is useless for anything other than evaluating game population
Like yeah we can say 4800 people joined shard 1, but it doesn't correlate with balance
Hi guys,what computer does it take to play foxhole?
my thought was it would give a general idea of how many people were playing on either side and if there was a time when one side had more people logging on than the other
hello i am a new code man with no experience. i try to find foxhole api but the link returns 404. what do
Do you mean just https://war-service-live.foxholeservices.com/api? If so yes it doesn't have a root, you need to supply a request as listed here under "API Endpoints" - https://github.com/clapfoot/warapi/blob/master/README.md
For example: https://war-service-live.foxholeservices.com/api/worldconquest/war
ok thanks that works
omg it works
its the forst time ever working with an api
nice
Foxhole coders! I am back appealing for your help again with the Foxhole Conquest Mod, (a mod to put Foxhole into HoI:IV). You don't need to know the programming languages as it's all fairly simple to pick up although previous programming experience will help you to understand how things flow. All I need is volunteers that can spare a few hours a week. Please message me with applications, links to the server can be found here: #community-resources message
I made the changes you wanted
binary files are now in official releases github thing
๐ ๐
Foxhole wiki thanks you for your efforts
Have the devs specified if storm canons/Inteligence will be in the API too, now that they are public?
it looks like this has been added recently.
That might be for Anvil
red river
Out of curiosity: What is the codebase for foxhole. It looks like LUA?
Unreal Engine 4 and C++ I believe
Lua is a scripting language often used in conjunction with C++.
Wesnoth, for example, uses Lua to script it's campaigns, but the game itself runs in C++.
i love wesnoth modding
LUA is fun to work with
i believe Starbound is also c++ with Lua scripts
is wesnoth still alive? ๐ฎ
Yep
The ladder is too
Tournement going on right now for folks who are into that
lol of course it is
1.16.1 and going
@stable sleet let me know if any problems still
@zealous sonnet why did you put in warapi updates 0.48 ?? is the update not 0.47 ?
@tawny acorn is the current devbranch version not 0.47 ??
oh just a typo, don't worry about it
also you don't need to ping multiple people for that
i didnt, two different mistakes
i thought they did talk about a new api for player stats at the last devtalk ... any infos about that or did i missunderstood that ...
from devbranch blog
Player Activity Logs
โ By interacting with players through the player list or by alt clicking on them an activity log report may be viewed. The information provided will be based on that players contribution for the current war and includes the following statistics.
โ Enemy and friendly player damage.
โ Enemy and friendly structure and vehicle damage.
โ Construction total.
โ Repair total.
โ Healing total.
โ Revival total.
โ Number of your faction variant vehicles captured by the enemy.
โ Materials gathered.
โ Materials refined.
โ Supplies delivered.
seems like a big tool to find out what alts are up too and if you can trust someone
@worthy sorrel
I want an api endpoint for this pretty please
Plus checking if a user is locked to a faction
how much money do we need to raise to make this happen?
please also current location
i swear it will only be used for good
Add additional api endpoint to get the faction of a user. Providing a steam user (maybe id) retrieve the faction the user currently belongs to. Use case: Automatic verification of users for Discord...
look the date xD
2020 xD

https://www.reddit.com/r/foxholegame/comments/r4uelp/captured_gunboats_captured_vehicles_texture_pack/?utm_medium=android_app&utm_source=share
I saw this post on redit and the guy said he was unable to make both textures for 1 thing be in game is it possable to treat the captured texture like tank armor where you can change it if you use instant repair in the garage? (It alreadt changes the texture on the armor so it may be possable)
65 votes and 4 comments so far on Reddit
I think the armour wear is a texture on top of the regular texture. But ye I think it is not possible to have two base textures on the same vehicle considering there is no such vehicle in game that does.
But besides all that, do gunboats even have armourwear?
I don't think they have armor at alll
@ebon ermine Are you the one doing that?
yes
share code ?
@ebon ermine why ? (look old message)
oh boy. abandonment issues
Seems like this is another Collie-only project
What framework used ?
@neat fossil link for that or is that for personal use? Either way nice job on that excel work.
because wardens simply have an issue of skill
๐
*cause wardens are so much better that they dont need it
Cos there's already a Warden one that's been available for ages lol
Just gotta be in the loop with the right people init ๐
how hard would it be to make a mod that changes the order of the buttons in a right-click menu? asking for a friend that keeps unpacking reservable material crates
@turbid mountain tricky
aww
its most likely going to be hard coded in the exe and not in some external file, and so then the only other way would be identify and prevent a click on said menu item and redirect it else where if that is even possible
I think VAC would eat your soul if you tried that, unless you managed to not touch the game at all
thus my second suggestion
A bunker health calculator? We've had that for a while now.
Where ?
ayo anyone wanna join me in hating on directX
anything after dx9 is horrendous
I pray for the day we can run linux as compatible with games as windows, pretty sure that os will die at that point
dx11 is pretty much mandatory in my education
you dont sound like you got your microsoft 5g vaccine
Is that bunker maker thing currently at โsoonTMโ for release?
Yes. I'm working on the stuff needed to get the authentication working, and then it'll be ready for first release
Chill
Beep boop bronto
. . _. _,. . . .. ... . _ _
Alpha Charlie Sugma
oracle one ๐
E=m.cยฒ
E=m.c but are still all squares
Does USA has Goggle/Applee provider alternative for 5G vaccine?
Given that variables C, i and j are 32 bit integers, simplify this pointer statement into more readable code: *(*(*(C+i)+j)+k)
the answer will be C[i][j][k]
what.
you said they were 32 bit integers, not pointers
so that... wouldnt work. that wouldnt even compile
i assumed C was a pointer and i, j, and k were the integers you meant
so (&(&C[i])[j])[k] would work
but thats hardly simplified
well I'm not going to argue, but it's covered in a course and yes it does compile, and pointers have a data type (char, int, void, etc)
`
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char **argv, char **envp)
{
int C[3][2][2], i = 1, j = 2, k = 3;
C[i][j][k] = 88;
printf("%d\n", ((*(C+i)+j)+k) );
return 0;
}
// Output
allan@telephony:~/pointers $ make
gcc multidp_c.c -o multidp_c
g++ multidp_cpp.cpp -o multidp_cpp
allan@telephony:~/pointers $ ./multidp_c
88
allan@telephony:~/pointers $ ./multidp_cpp
88
`
So C is a pointer to a 3d array? You could have included that
you could already infer that it is a 3D array with the expression given
No it suggested it was an array but not 3d
If it were in fact a 1d array it wouldn't compile
I can assure you if you try to compile it with the appropriate compiler, it will compile .. maybe not with microsoft compilers that are CIL-based
well there is a general rule, any time you see *(C+i) you can directly equate that to C[i] and similarly, *C is equivalent to C[]
sure, i just didnt know C was int ***
Multidimensional arrays
More like
Several one dimensional arrays in a bug trench coat
comparison of speed between comparable programs in C and python on a raspberry Pi model 2B (1.2Ghz 4 core/4 thread arm7 v71 rev4) ... all it does is count to 10 million
it's significantly better to compare on a regular x86 or x64 system because of the math coprocessor, but python can't take advantage of the math coprocessor, so python programs will not be as disadvantaged while running on an rpi compared to a regular PC
math coprocessor for integers? 
ok so you assumed it could only work on floats, but the FPU can work on any binary value
there is no such thing as float at the CPU level, it's all stored as bits
i suppose you are talking about some specific CPU?
because the floating point unit is integrated in most modern computers
it would perform worse on integers than a cpu (old style)
i should say a CPU without an integrated FPU
as referenced in the x64 and x86 architecture manual
you assumed that floating point unit implied that you can only use floating point numbers in it, but that is false, it will perform calculations with any number
the advantage in using the FPU is that it's significantly faster than the general multipurpose CPU registers
all modern AMD and Intel processors have x87 FPU math coprocessors built in them
afaik, most ARM does not have a math coprocessor to speed up calculations, so everything runs like a potato
on the other hand, python does not use the full instruction set, because it's a simple language, so it cannot take advantage of the full speed offered by the FPU (what's more, these bad interpreted or CIL-based languages have no support for inline assembly)
it's interesting that python takes 170 times longer than C to perform the same calculation with nearly identical source code (and nearly identical amount of source code typed, meaning no advantage in amount of code typed)
