mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.1K
active users

#array

0 posts0 participants0 posts today

#array : the whole body of persons thus placed in order

- French: variété

- German: die Anordnung, der Bereich

- Italian: varietà

- Portuguese: arranjo

- Spanish: variedad

------------

Join our new subreddit for language learners @ reddit.com/r/LearnANewLanguage

reddit.comCrowdsourcing Languages • r/LearnANewLanguageWe are in the process of revitalizing this subreddit to help language learners. Thank you for being a part of our community!
Continued thread

I started implementing some explorations in #Haskell but I had to ditch `data-memocombinators` because #MicroHs doesn't properly support #RankNTypes yet. Instead I'm doing manual #memoization with #array :

```
import Data.Array

-- memoized function, looks up in array
f :: Int -> Int -> Int -> Int
f = \x y z -> if inRange fBounds (x, y, z) then fArray ! (x, y, z) else 0

-- real algorithm, recursive calls use memoized function
f' :: Int -> Int -> Int -> Int
f' 1 1 1 = 1
f' a b c = sum [ f (a - 1) b c, f a (b - 1), f a b (c - 1) ]

-- array, generated with real algorithm
fArray :: Array (Int, Int, Int) [Bool]
fArray = array fBounds [ (i, f' x y z) | i@(x, y, z)<- range fBounds ]

-- array bounds
fBounds :: ((Int, Int, Int), (Int, Int, Int))
fBounds = ((1, 1, 1), (limit, limit, limit))

-- can be as large as necessary for the real problem,
-- but going too big consumes too much memory
limit :: Int
limit = 45
```

DB2 JSON Array Extraction: Solving JSON_TABLE Challenges in DB2 v11.5
Master DB2 JSON Array Extraction using efficient techniques like recursive common table expressions (RCTEs)! Learn to handle complex JSON structures &amp; avoid common pitfalls. #DB2 #JSON #Array #Extraction #SQL #RCTE
tech-champion.com/database/db2
Learn how to efficiently extract array data from JSON stored in DB2 v11.5 using JSON_TABLE and workar...

TECH CHAMPION · DB2 JSON Array Extraction: Solving JSON_TABLE Challenges in DB2 v11.5Efficiently extract array data from JSON in DB2 v11.5. Solve JSON_TABLE challenges and improve SQL queries with this guide. DB2 JSON Array Extraction.

☑️ Day 32/100: #Leetcode daily question

🟨 Question: 1671. Minimum Number of Removals to Make Mountain Array

This is a very good difficult question, and I obviously need to look a solution. This was solved using the lowest increasing decreasing subarray method.

🐈‍⬛ Check out my #GitHub where I post all the daily streak 🔥 questions and #LeetcodeContest 🏆 solutions

🔗 Solution Link: github.com/akshatsingh1718/lee

🔗 My Leetcode Github: github.com/akshatsingh1718/lee

In my pet project dregen, I iterate an array in Javascript to get pixels from weather data. It felt slow, I measured and got confused. I searched and found several statements supporting my measurements: the historic loop construct

for(let i=0; i<array.length; i++) {
//do stuff with array[i]
}

is faster than the modern constructs
- for(element of array)
- array.forEach(...).

One benchmark: stackoverflow.com/a/74674738/2

#javascript #performance #array #dregen

codeberg.org/harald/dregen

Stack OverflowWhat's the fastest way to loop through an array in JavaScript?I learned from books that you should write for loop like this: for(var i=0, len=arr.length; i < len; i++){ // blah blah } so the arr.length will not be calculated each time. Others say ...

In #PHP, it is annoying when you try to add an #array to a #multidimensional array and it does not work as expected. It turns out that in PHP you must first create each array within the multidimensional array before populating the specific array with items.

You first must do this
$arr = Array();
$arr[1] = Array();
$arr[1][2] = Array();

So that you can then do this
array_push( $arr[1][2], "item" );

PHP should detect all the arrays in your multidimensional array and create them automatically.

Continued thread

I am still pissed off about this from last night.
The array[x][y] syntax for indexing an array inside another array, which is standard in Lua, does not appear to besupported by Pico-8 :neobot_scream_angry:

I had to make a dummy variable for some

foo=array[x]
bar=foo[y]

nonsense.

Also, if I used for all i in array, I could not use i to actually index the array. But for i=1,#array do worked fine even though it should be the exact same thing. And it's only as I write this that I realize that it was probably putting each value of the array into i and not the index. But that's fine, there's no method to sort values and I needed to step through them in a specific order, so it's really easiest to just use the numerical index and manually ensure they stay sorted.

And none of this is for any gameplay logic, this is all just the nominally simple code for scrolling that fucking cloud. :neobot_laugh_tears:

I'm obsessed. 50% memory savings with PHP arrays have driven me crazy 🤪

For the past few weeks, my after-work research on PHP arrays has dominated my free time. The 'Never* use arrays' talk by @Crell at PHPKonf 2021 and a misinterpreted statement that you can save ~50% memory with PHP arrays have triggered intensive research on the topic.

[1/2]

#php #php_src #web_development #development #C #array #php_array

lukasrotermund.de/posts/php-ar

lukasrotermund.de · PHP arrays have driven me madLarry Garfield's 'Never* use arrays' talk really confused me. How can it be that objects in PHP save 50% memory? How can every PHP developer not be excited about this? And why don't you hear about it anywhere?

Fiber-Optic Seismic Sensing Of Vadose Zone Soil Moisture Dynamics
--
doi.org/10.1038/s41467-024-506 <-- shared paper
--
[broadly, a 'seismic' listening technique could help researchers map water movement, moisture levels in soil, with these researchers at Caltech have figured out a way to use vibrations from passing cars to see how much water sits directly beneath the ground’s surface…]
#GIS #spatial #mapping #remotesensing #array #survey #soil #regolith #seismic #water #hydrology #waterresources #watersecurity #subsurface #vadose #vadosezone #soilmoisture #moisture #weather #precipitation #rainfall #surfacewater #groundwater #ecology #agriculture #ecosystems #spatiotemporal #model #modeling #spatialanalysis #fiberoptics #fibreoptics #evapotranspiration #insitu #climatechange #drought #extremeweather #watermanagement #semiarid #geophysics

Recently Completed Geophysical Survey Will Help Protect Critical Infrastructure From Geomagnetic Storms And Space Weather
--
usgs.gov/news/national-news-re <-- shared technical article
--
[my other ½ is a space weather scientist, until I knew her I was not fully aware of all the risks and associated hazards associated with space weather]
#GIS #spatial #mapping #spaceweather #power #telecom #critical #infrastructure #risk #hazard #geomagnetic #geomagneticstorm #geomagnetism #minerals #geothermal #mining #earth #electricpower #powergrid #impacts #conductivity #USMTArray #magnetotellurics #geology #rocks #geophysics #spatialanalysis #spatiotemporal #array #USA #hazardanalysis #powersystems #transformers #powerfailures #lossofpower #blackouts #overloads
@USGS @NSF @nasa @EarthScope @NOAA