# arrays

Published articles for arrays.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How fast is C++23's std::flat\_map?

DevFeed: [How fast is C++23's std::flat\_map?](<https://devfeed.tech/articles/how-fast-is-c-23-s-std-flat-map-31465.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/09/16/how-fast-is-c23s-stdflat_map/>)

Author: Daniel Lemire

Published: 2026-09-16T20:26:36Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Library](<https://devfeed.tech/topics/library.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [clang](<https://devfeed.tech/topics/clang.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [clang](<https://devfeed.tech/tags/clang.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [overhead](<https://devfeed.tech/tags/overhead.md>), [speed](<https://devfeed.tech/tags/speed.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

This article benchmarks C++23's std::flat_map, a sorted container backed by parallel arrays of keys and values. It explains serialization and loading considerations, then compares insertion and lookup performance with std::map. Random-order insertion becomes quadratic as the container grows, while increasing-order or bulk insertion is much faster; random lookups can also be faster for large maps because std::flat_map uses less memory.

### Source excerpt

C++23 added a new type to the standard library: std::flat_map. There is also a std::flat_set and other variants, but let me focus on std::flat_map. A flat map is a sorted vector of keys next to a vector of values. A query is a binary search over the sorted keys. You need a recent standard library: ... Continue reading How fast is C++23's std::flat_map?

## Keleusma Research Spike: What It Costs to Compile a Data Structure Whose Shape Is Already Decided

DevFeed: [Keleusma Research Spike: What It Costs to Compile a Data Structure Whose Shape Is Already Decided](<https://devfeed.tech/articles/keleusma-research-spike-what-it-costs-to-compile-a-data-structure-whose-shape-is-already-decided-39755.md>)

Original publisher: [Read original article](<https://sgeos.github.io/engineering/compilers/verification/2026/08/09/cost_of_compiling_aggregates.html>)

Author: Brendan Sechter

Published: 2026-08-09T09:00:00Z

Content type: article

Language: en

Sources: [Brendan A R Sechter's Development Blog](<https://devfeed.tech/sources/brendan-a-r-sechter-s-development-blog.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [case-study](<https://devfeed.tech/tags/case-study.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [research](<https://devfeed.tech/tags/research.md>), [verification](<https://devfeed.tech/tags/verification.md>)

### AI overview

This case study examines the cost of compiling aggregate data types in the Keleusma compiler backend. Measurements of 331 aggregate operations found that most reduce to constant offsets and typed loads, challenging an estimate based on the feature's general name rather than its actual instances.

### Source excerpt

The largest remaining item in a compiler backend was estimated at a quarter's work. Measured, it is pointer arithmetic over compile-time constants, and two of the three representation forms it was supposed to need account for two operations in the entire corpus. The item is aggregate data types, meaning structs, tuples, arrays and enumerations. It blocks 34.5 percent of the corpus, more than every other unimplemented feature combined, and it had never been scoped because everyone knew it was large. Everyone was reasoning from the wrong artefact. Aggregates are large in a compiler that must decide their layout. This compiler decided it already, in an earlier pass, and bakes the answer into the instruction stream. What reaches the backend is not a type system. It is a byte offset and a scalar kind. The measurement that establishes this took twenty minutes to write and two and a half seconds to run. It reports that of 331 aggregate operations in the corpus, 300 are a constant offset and a typed load, 2 need anything resembling a value representation, and 0 use the general mechanism the instruction set still carries. This article reports that, and reports why the author's own recommendation to run it deserves more scepticism than the result. What this is a case study of The setting is compiler backend scoping and the project is Keleusma, whose backend is described in the first, second and third articles of this series. No compiler background is required. The general shape is estimating the cost of a feature from its name rather than from its instances. "Aggregate data types" names something with a large literature, a hard general case, and a well-known set of representation decisions. None of that is evidence about the work in front of you, and the gap between the category and the instance is where the estimate went wrong. The transferable question is what remains once a decision has already been made upstream. The answer is often mechanical, and the mechanical residue

## Using Dot Notation to Query Nested Fields in MongoDB

DevFeed: [Using Dot Notation to Query Nested Fields in MongoDB](<https://devfeed.tech/articles/using-dot-notation-to-query-nested-fields-in-mongodb-21840.md>)

Original publisher: [Read original article](<https://www.thepolyglotdeveloper.com/blog/2026/04/using-dot-notation-to-query-nested-fields-in-mongodb/>)

Author: Nic Raboy

Published: 2026-04-28T20:29:24Z

Content type: tutorial

Language: en

Sources: [Nic Raboy](<https://devfeed.tech/sources/nic-raboy.md>)

Topics: [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [collection](<https://devfeed.tech/tags/collection.md>), [database](<https://devfeed.tech/tags/database.md>), [filter](<https://devfeed.tech/tags/filter.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [object](<https://devfeed.tech/tags/object.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how to use MongoDB dot notation to query and filter nested fields in documents, including fields within nested objects and arrays.

### Source excerpt

If you're just starting to dabble with MongoDB, you've probably come to a point where your documents are looking a little complex. These documents might have gone from flat, relational-looking pieces ... The post Using Dot Notation to Query Nested Fields in MongoDB appeared first on DataCamp.

## CPU Caches and Spatial Locality: Why an Array is 3x Faster Than a Linked List for the Exact Same Big-O Complexity

DevFeed: [CPU Caches and Spatial Locality: Why an Array is 3x Faster Than a Linked List for the Exact Same Big-O Complexity](<https://devfeed.tech/articles/cpu-caches-and-spatial-locality-why-an-array-is-3x-faster-than-a-linked-list-for-the-exact-same-big-o-complexity-39570.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/18-cpu-caches-spatial-locality/>)

Author: hello@ankit-rana.com

Published: 2026-03-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [cpu](<https://devfeed.tech/topics/cpu.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpu-caches](<https://devfeed.tech/tags/cpu-caches.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [memory-hierarchy](<https://devfeed.tech/tags/memory-hierarchy.md>), [performance](<https://devfeed.tech/tags/performance.md>), [spatial-locality](<https://devfeed.tech/tags/spatial-locality.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

This article explains why arrays can outperform linked lists despite both having O(N) traversal complexity. Sequential array access benefits from cache lines, spatial locality, and hardware prefetching, while scattered linked-list nodes cause pointer chasing and more cache misses. The supplied summary reports an approximate threefold performance difference.

### Source excerpt

Arrays and linked lists are both O(N) to traverse, but an array can run about three times faster because CPUs fetch 64-byte cache lines, not individual values. Sequential array access turns the next several iterations into cache hits at roughly 1 ns and lets the hardware prefetcher work ahead. Linked list nodes scattered across the heap defeat the prefetcher, so each dereference risks a 100 ns trip to RAM.

## Changing Immutable Collections

DevFeed: [Changing Immutable Collections](<https://devfeed.tech/articles/changing-immutable-collections-30704.md>)

Original publisher: [Read original article](<https://codeblog.jonskeet.uk/2025/12/31/changing-immutable-collections/>)

Author: jonskeet

Published: 2025-12-31T10:32:45Z

Content type: article

Language: en

Sources: [Jon Skeet](<https://devfeed.tech/sources/jon-skeet.md>)

Topics: [C#](<https://devfeed.tech/topics/csharp.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [collection](<https://devfeed.tech/tags/collection.md>), [election-2029](<https://devfeed.tech/tags/election-2029.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [linq](<https://devfeed.tech/tags/linq.md>), [migration](<https://devfeed.tech/tags/migration.md>), [properties](<https://devfeed.tech/tags/properties.md>)

### AI overview

The article explains a migration from ImmutableList<T> and ImmutableDictionary<TKey, TValue> to immutable collection types better suited to code that creates collections and then leaves them unchanged. It describes the migration steps and related helper-method and property-type changes.

### Source excerpt

As I've written before, I'm leaning heavily into immutability in the election site code. Until September 2025 (it's taken a long time to get round to writing this blog post) that meant a combination of records, ImmutableList<T> and ImmutableDictionary<TKey, TValue>. In an ECMA C# standards meeting, however, Joseph Musser passed on some really valuable feedback ... Continue reading Changing Immutable Collections ->

## CPU Performance Optimization notes

DevFeed: [CPU Performance Optimization notes](<https://devfeed.tech/articles/cpu-performance-optimization-notes-35385.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/cpu-optimization-notes/>)

Author: Graham King

Published: 2025-03-29T16:15:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [cpu](<https://devfeed.tech/topics/cpu.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Code](<https://devfeed.tech/topics/code.md>), [data](<https://devfeed.tech/topics/data.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpu-optimization](<https://devfeed.tech/tags/cpu-optimization.md>), [data](<https://devfeed.tech/tags/data.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [loops](<https://devfeed.tech/tags/loops.md>), [memory](<https://devfeed.tech/tags/memory.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-optimization](<https://devfeed.tech/tags/performance-optimization.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

Raw notes on CPU performance optimization covering data locality, cache behavior, memory alignment, data layout, prefetching, integer and floating-point types, powers of two, vectorization, and predictable branching.

### Source excerpt

Raw notes on CPU optimization

## When SQL Meets Lambda Expressions

DevFeed: [When SQL Meets Lambda Expressions](<https://devfeed.tech/articles/when-sql-meets-lambda-expressions-28971.md>)

Original publisher: [Read original article](<https://blog.jooq.org/when-sql-meets-lambda-expressions/>)

Author: lukaseder

Published: 2025-03-27T13:04:44Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [databricks](<https://devfeed.tech/topics/databricks.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [apply](<https://devfeed.tech/tags/apply.md>), [array](<https://devfeed.tech/tags/array.md>), [array-types](<https://devfeed.tech/tags/array-types.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [concatenation](<https://devfeed.tech/tags/concatenation.md>), [databricks](<https://devfeed.tech/tags/databricks.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [filter](<https://devfeed.tech/tags/filter.md>), [function](<https://devfeed.tech/tags/function.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [scala](<https://devfeed.tech/tags/scala.md>), [snowflake](<https://devfeed.tech/tags/snowflake.md>), [sql](<https://devfeed.tech/tags/sql.md>), [trino](<https://devfeed.tech/tags/trino.md>)

### AI overview

This article explains how SQL ARRAY types and lambda expressions are supported across several modern SQL dialects. It shows how jOOQ maps Java, Kotlin, and Scala lambda expressions to SQL expressions, including filtering arrays, and describes emulation with subqueries for dialects without lambda syntax.

### Source excerpt

ARRAY types are a part of the ISO/IEC 9075 SQL standard. The standard specifies how to: But it is very unopinionated when it comes to function support. The ISO/IEC 9075-2:2023(E) 6.47 <array value expression> specifies concatenation of arrays, whereas the 6.48 <array value function> section lists a not extremely useful TRIM_ARRAY function, exclusively (using which ... Continue reading When SQL Meets Lambda Expressions ->

## Write Barriers

DevFeed: [Write Barriers](<https://devfeed.tech/articles/write-barriers-31811.md>)

Original publisher: [Read original article](<https://patshaughnessy.net/2025/2/18/write-barriers>)

Author: Pat Shaughnessy

Published: 2025-02-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Pat Shaughnessy](<https://devfeed.tech/sources/pat-shaughnessy.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Code](<https://devfeed.tech/topics/code.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [beautiful](<https://devfeed.tech/tags/beautiful.md>), [code](<https://devfeed.tech/tags/code.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [updating-ruby-under-a-microscope](<https://devfeed.tech/tags/updating-ruby-under-a-microscope.md>)

### AI overview

This tutorial explains Ruby write barriers in incremental and generational garbage collection. Write barriers detect writes to arrays, hashes, and other data structures that may add objects requiring marking; when triggered, Ruby moves the modified object back onto the mark stack for processing during a later garbage-collection step.

### Source excerpt

I've started working on a new edition of Ruby Under a Microscope that covers Ruby 3.x. I'm working on this in my spare time, so it will take a while. Leave a comment or drop me a line and I'll email you when it's finished. Ruby's garbage col

## 11 Data Structures Every Developer Should Know

DevFeed: [11 Data Structures Every Developer Should Know](<https://devfeed.tech/articles/11-data-structures-every-developer-should-know-17733.md>)

Original publisher: [Read original article](<https://blog.amigoscode.com/p/11-data-structures-every-developer>)

Author: Nelson Djalo

Published: 2024-10-24T16:06:22Z

Content type: tutorial

Language: en

Sources: [Amigoscode Newsletter](<https://devfeed.tech/sources/amigoscode-newsletter.md>)

Topics: [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [developer](<https://devfeed.tech/tags/developer.md>), [fifo](<https://devfeed.tech/tags/fifo.md>), [graph](<https://devfeed.tech/tags/graph.md>), [programming](<https://devfeed.tech/tags/programming.md>), [queue](<https://devfeed.tech/tags/queue.md>)

### AI overview

A tutorial introducing 11 data structures relevant to software development, coding interviews, algorithm efficiency, and system design. It explains arrays, 2D arrays, queues, stacks, and graphs, including their properties and practical use cases.

### Source excerpt

Master These 11 Data Structures to Excel in Programming and System Design

## Optimising Stripped Locks using Golang arrays

DevFeed: [Optimising Stripped Locks using Golang arrays](<https://devfeed.tech/articles/optimising-stripped-locks-using-golang-arrays-39628.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2024-08-14_Optimising-Stripped-Locks-using-Golang-arrays-34b45ef4e975>)

Published: 2024-08-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [hashing](<https://devfeed.tech/topics/hashing.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [golang](<https://devfeed.tech/tags/golang.md>)

### AI overview

This tutorial explains replacing a global datastore lock with striped locks mapped to buckets by hashing keys. It outlines the bucket and locking approach and begins a benchmark comparing Go maps and arrays for key-fetch performance at different sizes.

### Source excerpt

. [Optimising Striped Locks with Go Arrays](optimising-stripped-locks-using-golang-arrays-cover...

## A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling

DevFeed: [A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling](<https://devfeed.tech/articles/a-bash-script-to-read-all-command-line-arguments-into-an-array-simplify-argument-handling-41963.md>)

Original publisher: [Read original article](<https://www.cyberciti.biz/tips/a-bash-script-to-read-all-command-line-arguments-into-an-array.html>)

Author: Vivek Gite

Published: 2024-05-07T10:40:08Z

Content type: tutorial

Language: en

Sources: [nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED)](<https://devfeed.tech/sources/nixcraft-linux-tips-hacks-tutorials-and-ideas-in-blog-format-rss-feed.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Parameter](<https://devfeed.tech/topics/parameter.md>), [Streams](<https://devfeed.tech/topics/streams.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [bash](<https://devfeed.tech/tags/bash.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [printing](<https://devfeed.tech/tags/printing.md>), [process](<https://devfeed.tech/tags/process.md>), [script](<https://devfeed.tech/tags/script.md>), [shell-script](<https://devfeed.tech/tags/shell-script.md>), [shell-scripting](<https://devfeed.tech/tags/shell-scripting.md>), [sys-admin](<https://devfeed.tech/tags/sys-admin.md>), [tips](<https://devfeed.tech/tags/tips.md>)

### AI overview

A tutorial on using Bash's mapfile or readarray built-in to read command-line arguments into an indexed array. It explains how arrays can handle a variable number of arguments and preserve spaces for later processing.

### Source excerpt

If you are writing a Bash shell script, you should read command-line arguments into an array for some time. This allows us to process any number of arguments provided when the script is run. This makes the script adaptable to different use cases. Instead of dealing with fixed variables like $1, $2, $3, etc., you can work with any number of arguments more dynamically using bash for loop or bash while loop, depending upon your needs. Arrays make it simple to loop through each argument and perform operations on them, whether basic printing or complex processing. Bash provides a mapfile (readarray command) internal built-in command to read lines from a file into an array variable. Let us see how to use mapfile to read all command line arguments into an array. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling appeared first on nixCraft.

## Data Structures Explained: Arrays vs. Linked Lists for Efficient Coding

DevFeed: [Data Structures Explained: Arrays vs. Linked Lists for Efficient Coding](<https://devfeed.tech/articles/data-structures-explained-arrays-vs-linked-lists-for-efficient-coding-28415.md>)

Original publisher: [Read original article](<https://banes.dev/data-structures-explained-arrays-vs-linked-lists-for-efficient-coding/>)

Author: admin

Published: 2024-05-04T09:06:06Z

Content type: tutorial

Language: en

Sources: [Posts on Chris Banes](<https://devfeed.tech/sources/posts-on-chris-banes.md>)

Topics: [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [coding](<https://devfeed.tech/tags/coding.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [vs](<https://devfeed.tech/tags/vs.md>)

### AI overview

This tutorial explains arrays and linked lists as fundamental data structures. It compares their organization, access speed, size flexibility, and suitability for adding or removing items, with a Python code example for linked lists.

### Source excerpt

Storing data is more than just putting things in boxes. Are you ready to learn the secrets of super-efficient data organization? Data structures and algorithms are like the superpowers of programming. They help computers store, find, and change information in the smartest ways possible. If you're new to coding, learning about basic data structures is [...]

## God writes Haskell

DevFeed: [God writes Haskell](<https://devfeed.tech/articles/god-writes-haskell-30817.md>)

Original publisher: [Read original article](<https://hookrace.net/blog/god-writes-haskell/>)

Published: 2023-06-02T22:00:00Z

Content type: opinion

Language: en

Sources: [Dennis Felsing](<https://devfeed.tech/sources/dennis-felsing.md>)

Topics: [Haskell](<https://devfeed.tech/topics/haskell.md>), [quantum mechanics](<https://devfeed.tech/topics/quantum-mechanics.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [programming](<https://devfeed.tech/tags/programming.md>), [quantum](<https://devfeed.tech/tags/quantum.md>), [quantum-mechanics](<https://devfeed.tech/tags/quantum-mechanics.md>), [type-system](<https://devfeed.tech/tags/type-system.md>)

### AI overview

A humorous commentary compares Haskell concepts--including lazy evaluation, immutability, linked lists, type checking, and memory retention--to ideas from quantum mechanics and the physical universe.

### Source excerpt

God famously does not play dice with the universe, but he seems to enjoy writing Haskell: Consider the wave-particle duality in quantum mechanics. Every particle behaves as a wave, as long as you haven't interacted with it. Thanks to Haskell's lazy evaluation values are also only evaluated once they are accessed (interacted with particles), and stay unevaluated thunks (waves) in the meantime. Two particles can be Quantum-entangled, so that their states depend on each other, even though the particles are seperated by any distance. In Haskell a value, whether it's evaluated yet or not, can also be shared and then used in a totally different location in the program without having to copy it. The value is even immutable, so that you can't change it from one location and thus influence the other. Similarly for entangled particles you can't manipulate one to change the state of the other particle, which might be far away and thus break the maximum speed of information. Since values are immutable they have to be cleaned up more often in Haskell than typically in imperative languages. GHC, the most commonly used Haskell compiler, allocates new data in a special area. Only after a supernova will the still-relevant data be ejected into the larger universe. Haskell beginners often use lists instead of arrays. You can't do random access in a linked list, but only access the first element and then the rest of the list. The real world also doesn't allow you random access, you are limited by the speed of light and have to go from one location to the next. Time also seems to be a linked list, not even doubly linked, since you can't go back after accessing the current element. Seems like an awkward bug. Since the Haskell type system is so good at catching bugs, you often feel like you don't even need to write tests. This is unfortunately untrue, as the strange physical bugs of our universe demonstrate: The speed of light happens to stay the same, no matter what speed you move at. Th

## Polynomial Multiplication Using the FFT

DevFeed: [Polynomial Multiplication Using the FFT](<https://devfeed.tech/articles/polynomial-multiplication-using-the-fft-40459.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2022/11/16/polynomial-multiplication-using-the-fft/>)

Published: 2022-11-16T08:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [polynomials](<https://devfeed.tech/topics/polynomials.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [NumPy](<https://devfeed.tech/topics/numpy.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [efficiently](<https://devfeed.tech/tags/efficiently.md>), [fft](<https://devfeed.tech/tags/fft.md>), [fourier-transform](<https://devfeed.tech/tags/fourier-transform.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [polynomial-interpolation](<https://devfeed.tech/tags/polynomial-interpolation.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This tutorial explains how to multiply two polynomials efficiently using the Fast Fourier Transform. It contrasts the naive O(n^2) approach with polynomial interpolation, pointwise multiplication, and carefully chosen roots of unity that enable reusable computations.

### Source excerpt

Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1).

## Represent data with generic data structures

DevFeed: [Represent data with generic data structures](<https://devfeed.tech/articles/represent-data-with-generic-data-structures-37567.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/generic-data-structures.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:33:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Code](<https://devfeed.tech/topics/code.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [dop](<https://devfeed.tech/tags/dop.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [oop](<https://devfeed.tech/tags/oop.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explores the second principle of Data-Oriented Programming: representing application data with generic data structures such as maps and arrays instead of specific classes. It also discusses other structures, including sets, trees, and queues, and describes benefits such as reusable generic functions and a flexible data model.

### Source excerpt

When adhering to Principle #1 of DOP, code is separated from data. DOP is not opinionated about the programming constructs to use for organizing the code, but it has a lot to say about how the data should be represented. This is the theme of Principle #2.

## Effective Kotlin Item 47: Avoid unnecessary object creation

DevFeed: [Effective Kotlin Item 47: Avoid unnecessary object creation](<https://devfeed.tech/articles/effective-kotlin-item-47-avoid-unnecessary-object-creation-39293.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-unnecessary-objects>)

Published: 2021-08-22T00:00:00Z

Content type: article

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [object](<https://devfeed.tech/topics/object.md>), [Code](<https://devfeed.tech/topics/code.md>), [Cache](<https://devfeed.tech/topics/cache.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [code](<https://devfeed.tech/tags/code.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory](<https://devfeed.tech/tags/memory.md>), [object](<https://devfeed.tech/tags/object.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-optimization](<https://devfeed.tech/tags/performance-optimization.md>), [virtual-machine](<https://devfeed.tech/tags/virtual-machine.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Effective Kotlin item explains why unnecessary object creation can hurt performance on the JVM. It covers object reuse, boxing of primitives, memory overhead, references, and the additional access cost of encapsulated elements, especially for large collections and performance-critical processing.

### Source excerpt

About the most essential rule of performance optimization.

## The case for a learned sorting algorithm

DevFeed: [The case for a learned sorting algorithm](<https://devfeed.tech/articles/the-case-for-a-learned-sorting-algorithm-28587.md>)

Original publisher: [Read original article](<https://blog.acolyer.org/2020/10/19/the-case-for-a-learned-sorting-algorithm/>)

Author: adriancolyer

Published: 2020-10-19T19:11:00Z

Content type: article

Language: en

Sources: [Adrian Colyer](<https://devfeed.tech/sources/adrian-colyer.md>)

Topics: [Sorting](<https://devfeed.tech/topics/sorting.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [ml](<https://devfeed.tech/tags/ml.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [systems](<https://devfeed.tech/tags/systems.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

### AI overview

This article discusses Learned Sort, a sorting method that uses a model to approximate the cumulative distribution function and place items near their sorted positions before finishing with Insertion Sort. On a 1 billion item dataset, it reportedly outperformed RadixSort by a factor of 1.49x, including model-training time.

### Source excerpt

The case for a learned sorting algorithm, Kristo, Vaidya, et al., SIGMOD'20 We've watched machine learning thoroughly pervade the web giants, make serious headway in large consumer companies, and begin its push into the traditional enterprise. ML, then, is rapidly becoming an integral part of how we build applications of all shapes and sizes. But what about systems ... Continue reading The case for a learned sorting algorithm

## Red/System: New Features

DevFeed: [Red/System: New Features](<https://devfeed.tech/articles/red-system-new-features-22378.md>)

Original publisher: [Read original article](<https://www.red-lang.org/2020/08/redsystem-new-features.html>)

Author: Nenad Rakocevic (noreply@blogger.com)

Published: 2020-08-20T10:54:00Z

Content type: release

Language: en

Sources: [Red](<https://devfeed.tech/sources/red.md>)

Topics: [Red](<https://devfeed.tech/topics/red.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [bugfixes](<https://devfeed.tech/tags/bugfixes.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [features](<https://devfeed.tech/tags/features.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [fpu](<https://devfeed.tech/tags/fpu.md>), [ia-32](<https://devfeed.tech/tags/ia-32.md>), [literal-arrays](<https://devfeed.tech/tags/literal-arrays.md>), [math](<https://devfeed.tech/tags/math.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [red-system](<https://devfeed.tech/tags/red-system.md>), [runtime-errors](<https://devfeed.tech/tags/runtime-errors.md>), [vfp](<https://devfeed.tech/tags/vfp.md>)

### AI overview

An overview of recent Red/System features, including subroutines, atomic and stack intrinsics, FPU status access, and changes to literal arrays.

### Source excerpt

In the past months, many new features were added to Red/System, the low-level dialect embedded in Red. Here is a sum up if you missed them. Subroutines During the work on the low-level parts of the new Red lexer, the need arised for intra-function factorization abilities to keep the lexer code as DRY as possible. Subroutines were introduced to solve that. They act as the GOSUB directive from Basic language. They are defined as a separate block of code inside a function's body and are called like regular functions (but without any arguments). So they are much lighter and faster than real function calls and require just one slot of stack space to store the return address. The declaration syntax is straightforward: <name>: [<body>] <name> : subroutine's name (local variable). <body> : subroutine's code (regular R/S code). To define a subroutine, you need to declare a local variable with the subroutine! datatype, then set that variable to a block of code. You can then invoke the subroutine by calling its name from anywhere in the function body (but after the subroutine own definition). Here is a first example of a fictive function processing I/O events: process: func [buf [byte-ptr!] event [integer!] return: [integer!] /local log do-error [subroutine!] ][ log: [print-line [">>" tab e "<<"]] do-error: [print-line ["** Error:" e] return 1] switch event [ EVT_OPEN [e: "OPEN" log unless connect buf [do-error]] EVT_READ [e: "READ" log unless receive buf [do-error]] EVT_WRITE [e: "WRITE" log unless send buf [do-error]] EVT_CLOSE [e: "CLOSE" log unless close buf [do-error]] default [e: "<unknown>" do-error] ] 0 ] This second example is more complete. It shows how subroutines can be combined and how values can be returned from a subroutine: #enum modes! [ CONV_UPPER CONV_LOWER CONV_INVERT ] convert: func [mode [modes!] text [c-string!] return: [c-string!] /local lower? upper? alpha? do-conv [subroutine!] delta [integer!] s [c-string!] c [byte!] ][ lower?: [all [#"a" <= c c <= #

## Kotlin Hyderabad: Introduction to Kotlin

DevFeed: [Kotlin Hyderabad: Introduction to Kotlin](<https://devfeed.tech/articles/kotlin-hyderabad-introduction-to-kotlin-28393.md>)

Original publisher: [Read original article](<https://siddroid.com/post/talk-introduction-to-kotlin-siddhesh-patil-kotlin-hyderabad/>)

Author: Siddhesh Patil

Published: 2020-08-01T10:47:09Z

Content type: article

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Android](<https://devfeed.tech/topics/android.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [beginner](<https://devfeed.tech/tags/beginner.md>), [classes](<https://devfeed.tech/tags/classes.md>), [event](<https://devfeed.tech/tags/event.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [introduction-to-kotlin](<https://devfeed.tech/tags/introduction-to-kotlin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-basics](<https://devfeed.tech/tags/kotlin-basics.md>), [kotlin-hyderabad-user-group](<https://devfeed.tech/tags/kotlin-hyderabad-user-group.md>), [kug-hyderabad](<https://devfeed.tech/tags/kug-hyderabad.md>), [language](<https://devfeed.tech/tags/language.md>), [learn](<https://devfeed.tech/tags/learn.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [patil](<https://devfeed.tech/tags/patil.md>), [siddhesh](<https://devfeed.tech/tags/siddhesh.md>), [siddhesh-patil](<https://devfeed.tech/tags/siddhesh-patil.md>), [siddhesh-patil-talks](<https://devfeed.tech/tags/siddhesh-patil-talks.md>), [talk](<https://devfeed.tech/tags/talk.md>), [talks-on-kotlin](<https://devfeed.tech/tags/talks-on-kotlin.md>), [tech-talks-in-hyderabad](<https://devfeed.tech/tags/tech-talks-in-hyderabad.md>), [tools](<https://devfeed.tech/tags/tools.md>), [val](<https://devfeed.tech/tags/val.md>)

### AI overview

A Kotlin User Group Hyderabad event page describing Siddhesh Patil's beginner-level introduction to Kotlin talk. The session covers Kotlin fundamentals, Android development, interoperability, tools, types, null-safety, functions, data classes, collections, control flow, classes, and interfaces.

### Source excerpt

At their monthly event, Siddhesh Patil gives a talk on introduction to Kotlin at Kotlin User Group Hyderabad

## What's coming in TypeScript 4?

DevFeed: [What's coming in TypeScript 4?](<https://devfeed.tech/articles/what-s-coming-in-typescript-4-19103.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/whats-coming-in-typescript-4/>)

Author: HTTP Toolkit; Tim Perry

Published: 2020-06-22T16:00:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

An overview of planned TypeScript 4 additions, focusing on variadic tuple types. The article explains how these types can preserve more precise information when typing functions that accept and combine tuple arguments, including concatenation and flexible rest parameters.

### Source excerpt

TypeScript 4 is coming up fast: a first beta release is planned for this week (June 25th), with the final release aiming for mid-August. It's important to note that TypeScript does not follow semver, so 4.0 is not as big a deal as it sounds! There can be (and often are) breaking changes between any minor TypeScript versions, and major version bumps like this happen primarily for marketing reasons, not technical ones. This bump to 4.0 doesn't suggest that everything is going to break, and this won't be a huge world-changing release, but it does bring some nice additions, particularly on the typing side. For projects like HTTP Toolkit (written entirely in TypeScript) that means faster development & fewer bugs! Let's dive into the details: Variadic tuple types Also known as 'variadic kinds', this is a complex but substantial new feature for TypeScript's type system. ~~It's not 100% confirmed yet (the PR remains unmerged!), but it's explicitly in the 4.0 roadmap, and Anders Hejlsberg himself has called it out as planned for the coming release.~~ Update: PR now merged, looks like this is happening! Explaining this is complicated if you don't have an strong existing grasp of type theory, but it's easy to demo. Let's try to type a concat function with tuple arguments: function concat( nums: number[], strs: string[] ): (string | number)[] { return [...nums, ...strs]; } let vals = concat([1, 2], ["hi"]); let val = vals[1]; // infers string | number, but we *know* it's a number (2) // TS does support accurate types for these values though: let typedVals = concat([1, 2], ["hi"]) as [number, number, string]; let typedVal = typedVals[1] // => infers number, correctly This is valid TypeScript code today, but it's suboptimal. Here, concat works OK, but we're losing information in the types and we have to manually fix that later if we want to get accurate values elsewhere. Right now it's impossible to fully type such a function to avoid this. With variadic types though, we can: fun

## Simple Multiplatform RPC with Kotlin Serialization

DevFeed: [Simple Multiplatform RPC with Kotlin Serialization](<https://devfeed.tech/articles/simple-multiplatform-rpc-with-kotlin-serialization-20970.md>)

Original publisher: [Read original article](<https://jakewharton.com/simple-multiplatform-rpc-with-kotlin-serialization/>)

Published: 2020-04-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [JSON](<https://devfeed.tech/topics/json.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Android](<https://devfeed.tech/topics/android.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [events](<https://devfeed.tech/tags/events.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [json](<https://devfeed.tech/tags/json.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [model](<https://devfeed.tech/tags/model.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This article explains replacing Moshi-based JSON exchange with kotlinx.serialization for a Kotlin multiplatform Android and Cast application. It shows how shared models can be serialized and deserialized across Kotlin and JavaScript, including parsing JavaScript objects, using custom serializers, and sending typed events to drive Cast display animations. It also introduces the problem of identifying polymorphic event types when the serialized JSON lacks type information.

### Source excerpt

I recently played a minor role in helping add Cast support to an Android app. Both the Android app and Cast display are written in Kotlin. The Android Cast SDK relays JSON strings to the JavaScript SDK which invokes your callback with the deserialized equivalent as a JS object. A multiplatform library holds the model objects so that they can be shared between Android and JS. class Game( val players: Array<Player> ) class Player( val name: String, val color: String, val scores: Array<Int> ) Moshi serializes the models to JSON in the Android app. val game = Game(arrayOf( Player("Jesse", "#ff0000", arrayOf(1, 2, 3)), Player("Matt", "#ff00ff", arrayOf(3, 0, 2)) )) val gameAdapter = moshi.adapter(Game::class.java) val gameJson = gameAdapter.toJson(game) // {"players":[{"name":"Jesse",...},{"name":"Matt",...}]} castSdk.send(gameJson) The Cast app receives the deserialized JS object and interprets it as being of the same type. castSdk.addCustomMessageListener { message -> val game = message.data.unsafeCast<Game>() ui.render(game) } This works but imposes some severe limitations. The model objects can only use collections available natively to JS which means Arrays instead of Lists. Custom serialization is also not supported because the JSON to JS object conversion was happening outside the library. It was clear this setup wasn't going to work long-term. Kotlin Serialization kotlinx.serialization is Kotlin's multiplatform, reflection-free, format-agnostic serialization library. Its compiler plugin generates code for types which are annotated as @Serializable. +@Serializable class Game( val players: Array<Player> ) +@Serializable class Player( val name: String, Updating the Android app requires specifying that we're using the JSON format and supplying a reference to the generated serializer. -val gameAdapter = moshi.adapter(Game::class.java) -val gameJson = gameAdapter.toJson(game) +val gameJson = Json.stringify(Game.serializer(), game) // {"players":[{"name":"Jesse",...},{"

## A New Functional Approach to Complex Types in Apache Hive

DevFeed: [A New Functional Approach to Complex Types in Apache Hive](<https://devfeed.tech/articles/a-new-functional-approach-to-complex-types-in-apache-hive-27969.md>)

Original publisher: [Read original article](<https://tech.trivago.com/post/2019-01-30-functional-approach-complex-types-apache-hive/>)

Author: Jan Filipiak Software programmer; Constantly Surprised By How Stupid Computers Are Still Knows Where His Towel Is

Published: 2019-01-30T00:00:00Z

Content type: article

Language: en

Sources: [Trivago](<https://devfeed.tech/sources/trivago.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [NoSQL](<https://devfeed.tech/topics/nosql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Apache Spark](<https://devfeed.tech/topics/spark.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [maps](<https://devfeed.tech/tags/maps.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [sql](<https://devfeed.tech/tags/sql.md>), [structure](<https://devfeed.tech/tags/structure.md>), [table](<https://devfeed.tech/tags/table.md>)

### AI overview

This article examines how Apache Hive handles complex data types such as maps, arrays, and structs. It explains how Hive can process these types through SQL, custom programs, JVM-based user-defined functions, and table-generating functions such as explode() and inline().

### Source excerpt

When faced with the challenge to store, retrieve and process small or large amounts of data, structured query languages are typically not far away. These languages serve as a nice abstraction be...

## Cloud Firestore adds array queries and set-like element updates

DevFeed: [Cloud Firestore adds array queries and set-like element updates](<https://devfeed.tech/articles/better-arrays-in-cloud-firestore-16277.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2018/08/better-arrays-in-cloud-firestore>)

Author: Todd Kerpelman

Published: 2018-08-09T00:00:00Z

Content type: release

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Firestore](<https://devfeed.tech/topics/firestore.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [firestore](<https://devfeed.tech/tags/firestore.md>), [launch](<https://devfeed.tech/tags/launch.md>), [new-feature](<https://devfeed.tech/tags/new-feature.md>), [sdks](<https://devfeed.tech/tags/sdks.md>), [security-rules](<https://devfeed.tech/tags/security-rules.md>), [updates](<https://devfeed.tech/tags/updates.md>)

### AI overview

Cloud Firestore now supports querying array elements, adding or removing elements with set-like behavior, and security rules based on whether an element exists in an array. The changes are available with the latest client SDKs.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Top 10 Kotlin Stack Overflow questions, pt 1 - decisions, decisions

DevFeed: [Top 10 Kotlin Stack Overflow questions, pt 1 - decisions, decisions](<https://devfeed.tech/articles/top-10-kotlin-stack-overflow-questions-pt-1-decisions-decisions-27089.md>)

Original publisher: [Read original article](<https://zsmb.co/top-10-kotlin-stack-overflow-questions-1/>)

Author: Márton Braun

Published: 2018-04-24T08:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Stack Overflow](<https://devfeed.tech/topics/stackoverflow.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [collections](<https://devfeed.tech/tags/collections.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [list](<https://devfeed.tech/tags/list.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [stack-overflow](<https://devfeed.tech/tags/stack-overflow.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

### AI overview

This first article in a three-part series examines frequently asked Kotlin questions from Stack Overflow, focusing on choices involving arrays and collections. It explains differences between generic and primitive arrays and between eager collection operations and sequences, including guidance on when to use each option.

### Source excerpt

I've been hanging out around the Kotlin tag on Stack Overflow a lot this last year or so. This is the first part of a series covering the most frequently asked questions there. For a start, we'll be taking a look at various decisions around using collections in Kotlin. I'm hoping there's something new for everyone in here.

[Next page](<https://devfeed.tech/tags/arrays.md?cursor=WyIyMDE4LTA0LTI0VDA4OjAwOjAwKzAwOjAwIiwgIjU5NGUwYWY1LWI0OTktNDhhOC04YTcwLTA4NTA4M2NjY2E4YyJd>)