2,627 questions
0
votes
1
answer
83
views
Get duration of a video by swift API in macOS
I'm working for weeks to get the duration of a video file. I want to use direct api calls. I know, that I can use external command line tools to get it. But I want to avoid the dependencies with these ...
0
votes
0
answers
36
views
Does kusto support lazy-evaluation? Strategies to find an object that satisfies conditions across tables? (tables of different Kusto clusters)
(thanks in advance for any info 🙏)
I'm trying to find an objectId that satisfies 3 conditions across 3 different tables. These tables are in different Kusto clusters (if that matters). There are many ...
0
votes
2
answers
249
views
Why does `foldl'` have the implicit reversal?
Recently to better understand the advantages and disadvantages of lazy evaluation, I check for some details of Haskell. I did that to do exercise 5.9 in SDF (Software Design for Flexibility)
More ...
3
votes
1
answer
86
views
How do let and case differ in terms of lazyness?
How do let and case differ in terms of lazyness? Where do I find the information myself? And how do I experiment with it in ghci?
Some context
This incomplete piece of code is an excerpt from
Parallel ...
4
votes
1
answer
102
views
force order of evaluation inside a tidypolars call
Is it possible in some way to force the evaluation order in a {tidypolars} pipe?
For example:
install.packages("tidypolars", repos = c("https://community.r-multiverse.org", '...
2
votes
0
answers
53
views
Lazy de-serialization of a JSON array as a Stream<T> [duplicate]
Consider I have a large (potentially infinite) array of JSON objects:
[
{
"id": 41,
"name": "foo"
},
{
"id": 42,
&...
5
votes
1
answer
135
views
Trouble with understanding std::views::filter -> Lazy Evaluation
auto ResultView
{
std::views::iota(1,30)
| std::views::take(20)
| std::views::filter([](int x){ return x%2!=0; })
};
std::cout<<...
1
vote
2
answers
1k
views
How should one migrate from lazy_static to std LazyLock/LazyCell
I created a library that uses lazy_static to create a static HashMap that other parts of the code can reference to look up values like this:
use lazy_static::lazy_static;
use std::collections::HashMap;...
1
vote
1
answer
91
views
Using lazy-seq with Datomic Query Results: Is this the right approach?
I'm working with Datomic and need to process a large result set from a query. I want to make the processing lazy to handle the large output efficiently. Here's my current approach:
(let [normalized-...
0
votes
1
answer
621
views
ETL slow after Databricks Runtime upgrade
We are in process of upgrading Databricks platform.
Couple of weeks ago we setup Unity Catalog.
Now we are trying to go from Databricks Runtime 13.3 LTS to 15.4 LTS.
Two notebooks that we running (out ...
2
votes
2
answers
81
views
(Android) Kotlin Lazy init
Problem:
Kotlin by lazy throws unexpected NullPointerException when reached. Through debugger, when reached, this is properly evaluated and findViewById<ShapeableImageView>(R.id.image_view_icon) ...
1
vote
2
answers
599
views
iOS SwiftUI List is not lazy
I read everywhere that List is supposed to be Lazy on iOS but following snippet seems to contradict it
import SwiftUI
struct Item {
var id: Int
}
let items = (1...30000)
.map { v in
...
2
votes
1
answer
103
views
R - The for loop may have bug while the acc it work with is a function. But why?
The issue
There is a case such as this,
acc = \ (a) \ (b) base::list(a = a, b = b)
for (x in c("A","B")) {acc = acc(x)}
acc
It returns:
$a
[1] "B"
$b
[1] "B"
...
0
votes
1
answer
129
views
Is Python's map function evaluation lazy?
I've been solving LeetCode's 1331. Rank Transform of an Array challenge and came up with this one-line solution:
class Solution:
def arrayRankTransform(self):
return map({e: i for i, e in ...
2
votes
1
answer
94
views
BloomFilter mergeInPlace() producing unexpected behavior
The Spark Scala code snippet below reproduces the behavior I'm trying to understand. At a high level, we construct two tuples each containing a DF and a Bloom filter of the id column of the respective ...
2
votes
2
answers
192
views
Dataframes with Common Lazy Ancestor Means Repeated Computation?
Dependency DAG
Description
Pretty straight forward, basically, I am reading some parquet files from disk using polars which are the source of data. Doing some moderately heavy duty processing (a few ...
3
votes
1
answer
2k
views
Neovim config lazy.lua file error on moving the file to its parent's directory
I had my lazy.lua file in .config/nvim/lua/{name}/ directory and then to structure my config I moved it to .config/nvim/lua. After that I got some errors basically about nil values in some lazy files.
...
0
votes
1
answer
92
views
Rails Internationalization – Lazy Lookup with a Presenter class
4.1.4 of the Rails Guide explains "Lazy" Lookup for the Internationalization gem.
As an example:
en.yml
en:
clients:
show:
good_client: 5 Star Client
app/views clients/show....
0
votes
1
answer
96
views
Divide by the total dataframe row count in PySpark efficiently
let's assume I have an expensive PySpark query that results in a large dataframe sdf_input. I now want to add a column to this dataframe that requires the count of the total number of rows in ...
3
votes
2
answers
124
views
When forcing of strict evoluation is required with monads?
Considering the Haskell code:
do -- it's IO !!!
...
!x <- someFunction
... usage of x
how useful is ! here? It's a result of monadic (it's IO !) evaluation, so my questions are:
if x is a ...
0
votes
1
answer
81
views
why are the results of the 2 streams different? [duplicate]
The Stream API supports lazy operations, so I understand that it calculates vertically.
However, the results are different depending on the location of the limit method. Why does the operation ...
3
votes
1
answer
141
views
Why pruning of game tree needed in lazy language
So I was reading the book Programming in Haskell by Graham Hutton. In chapter 11, the game tic-tac-toe is implemented. My question is about the AI part of the game, where minimax is used. I was a ...
0
votes
1
answer
352
views
Using Lazy<T> to store token value in a scoped service in .NET 6
If i have a service that stores a token as a lazy object, and the token is fetched inside a value factory, is that value persisted across multiple requests, or since the underlying service is scoped, ...
0
votes
1
answer
24
views
jsTree - gembird's approach of lazy loading jsTree
There is implicitly typped array to be send to jsTree:
var first = new[]
{
new
{
id = "Root " + i.ToString(),
text = "Root Node " + i.ToString(),
state = new
{
...
0
votes
1
answer
83
views
Eigen: evaluate operations from constant matrix to a new matrix/array
Let's say I have a function templated according to Eigen's documentation, in order to use it both from C++ and Python using pybind11.
The main goal of that function if to perform a cartesian -> ...