Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
79 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 ...
Peter71's user avatar
  • 2,324
0 votes
0 answers
30 views

user-defined lazy mpmath constants

Can I define my own lazy mpmath constants, just like mpmath.pi and the others documented here? In other words, can I define a constant whose value is an mpf or mpc computed (or retrieved from memo ...
Don Hatch's user avatar
  • 5,601
0 votes
0 answers
33 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 ...
joseville's user avatar
  • 1,013
2 votes
1 answer
139 views

Lazily evaluating angular templates in primeng accordion tabs

I have a slightly expensive endpoint, which I want to get called only when it is actually required. For this question, I created a dummy service instead: import { Injectable, Signal, signal } from '@...
Michael Karcher's user avatar
0 votes
2 answers
248 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 ...
An5Drama's user avatar
  • 772
0 votes
3 answers
114 views

What is the difference between being "short-circuiting" and being "lazy on the its second argument" for a binary function?

In the Examples section of foldr's documentation, I read that Infinite structures ⚠️ Applying foldr to infinite structures usually doesn't terminate. It may still terminate under one of the following ...
Enlico's user avatar
  • 30.1k
3 votes
1 answer
84 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 ...
Enlico's user avatar
  • 30.1k
0 votes
0 answers
40 views

PySpark: `assert_unique` sometimes fails on first run, but passes on re-run without data changes

I'm using PySpark in a Jupyter Notebook and have a helper function that checks whether a column (or set of columns) has unique values: def assert_unique(df: DataFrame, column_names: str | list[str]) -&...
Michal Klimek's user avatar
3 votes
1 answer
98 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", '...
crestor's user avatar
  • 1,548
0 votes
1 answer
45 views

Why does Swift's lazy var solve the error: Cannot assign value of type '(HomeViewController) -> () -> HomeViewController' to type

Below code gives an error: class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { let tableView = { let t = UITableView(frame: .zero, style: .grouped)...
sudoExclamationExclamation's user avatar
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, &...
Андрей Щеглов's user avatar
4 votes
1 answer
101 views

Lazy evaluations for DataFrames

Let me provide quick demo which shows that second approach is 10x times slower than the first one. import pandas as pd from timeit import default_timer as timer r = range(1,int(1e7)) df = pd....
Slimboy Fat's user avatar
5 votes
1 answer
124 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<<...
rmoss3475's user avatar
0 votes
3 answers
110 views

Why does this haskell program have incorrect time complexity?

newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving (Show,Eq,Functor) flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = Prob $ concat $ map multAll xs where multAll (Prob innerxs,...
Ashok Kimmel's user avatar
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;...
RBF06's user avatar
  • 2,461

15 30 50 per page
1
2 3 4 5
176