Kristian Larsson

Results 275 comments of Kristian Larsson

This is effectively a way for the developer that raises the exception to indicate some intent behind it, like this code should really never be hit. It is indicative of...

Does assignment vs inner mutability matter? I have a netconf client actor that keeps track of module capabilities for a device. This is stored in `Client.modules`. I think this data...

I modified the source slightly, adding a print statement to help me find the generated code: ``` class Foo(object): def __init__(self): pass proc def foo(self) -> int: return 42 def...

Here is a minimal reproduction: ```python actor Foo(): def f(cb): cb() actor main(env: Env): f1 = Foo() def do_stuff(): var1 = None var2 = None def my_callback(): print(type(var1)) print(type(var2)) print(var1)...

Getting the `$Box` type affects behavior. We pass these values on and ultimately end up in json.encode() which throws an error: ``` Unhandled exception in actor: sorespo.main[-12]: ValueError: jsonQ_encode_dict: for...

@sydow ah ok, maybe it was too sloppy of me - sorry about that. I assumed `$Box` was related to (un)boxing but yeah this `$Box` seems not, guess it goes...

@sydow can you comment on this? I think @ciaran2 proposal sounds reasonable but I really don't know this stuff very well. OK to switch to size_t or is there a...

@nordlander Right, so since `int` is of platform-dependent size as well, `size_t` is probably better than `int`... but you're saying that perhaps `uint64_t` is even better, right? Using `uint64_t` would...

@sydow I think this is for you! in u32 (and presumably other uX) we check size of the int, which I think is the number of limbs. ```c B_u32 B_u32G_new(B_atom...

I would like to suggest that we add assert statements to like all of these functions. I think we would catch a lot of these kind of things so much...