Lukas Hermann

Results 30 comments of Lukas Hermann

Development of a WebGL renderer extension is now taking place at [https://github.com/vega/vega-renderer-webgl](https://github.com/vega/vega-renderer-webgl).

Here are a few other notes I think we should add to this list: * Make sure you are logged into `npm` via the cli in order to run `yarn...

@StandinKP right now tuples holding variadic types aren't particularly useful when trying to work in a generic way. Suppose you have this: ```mojo @value struct MyStruct[*Ts: CollectionElement]: var tup: Tuple[ts]...

> But encoding in python is usually used as string to bytes encoding, such as utf-8, [GB 2312](https://en.wikipedia.org/wiki/GB_2312), [Big5](https://en.wikipedia.org/wiki/Big5) etc. I'm not sure this a particularly compelling argument. Python also...

More minimal version: ```mojo from utils.variant import Variant from memory.unsafe import Pointer @value struct Value(CollectionElement): alias Variant = Variant[Float64, Pointer[Self]] var _variant: Self.Variant fn main(): pass ``` outputs ``` [69714:5614294:20240406,122210.916482:WARNING...

@StandinKP didn't mean to step on any toes. This is a feature I wanted for a project, and I knew roughly how to wire up all the lifetimes and mutability...

The issue here is that `DeviceContext.enqueue_create_buffer()` stores a reference to memory on the GPU, but you are trying to dereference that memory on the CPU. The pointer address isn't valid...

I think this might want a return type of `Optional[T]` rather than just `T`, because of the case where the `List` is empty. See also Swift's [`Array.popLast`](https://developer.apple.com/documentation/swift/array/poplast\(\)) and Rust's [`Vec::pop`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.pop)

Another point is to maybe return `None` if the `index` is out of bounds.

I think if you want to use this type with methods like `removeprefix`, then the representation might be better suited as a copy on write data structure like: ```mojo struct...