return0e_ has quit [Remote host closed the connection]
return0e_ has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
ofelas has joined #zig
mahmudov has joined #zig
return0__ has joined #zig
return0e has quit [Ping timeout: 260 seconds]
ofelas has quit [Ping timeout: 245 seconds]
ofelas has joined #zig
BitPuffin has quit [Quit: killed]
dtz has quit [Quit: killed]
AlexMax has quit [Quit: killed]
D3zmodos has quit [Quit: killed]
Demos[m] has quit [Quit: killed]
aperezdc has quit [Quit: killed]
mattmurr has quit [Quit: killed]
Snektron has quit [Quit: killed]
fengb has quit [Quit: killed]
vegai has quit [Quit: killed]
<jicksaw>
anyone else feel that the allocation and initialization of TailQueue is a bit weird?
<jicksaw>
for example, if you want to make a TailQueue on the heap, you cannot call its init() function, leaving its fields undefined
<jicksaw>
to create nodes for it you call createNode with an allocator, so if you wanted to deallocate those later you would have to keep track which allocator you used
_whitelogger has joined #zig
dtz has joined #zig
BitPuffin has joined #zig
Demos[m] has joined #zig
mattmurr has joined #zig
hryx has joined #zig
AlexMax has joined #zig
Snektron has joined #zig
fengb has joined #zig
D3zmodos has joined #zig
vegai has joined #zig
frmdstryr has quit [Ping timeout: 258 seconds]
benjif has quit [Remote host closed the connection]
frmdstryr has joined #zig
benjif has joined #zig
mahmudov has quit [Ping timeout: 260 seconds]
doublex has quit [Ping timeout: 260 seconds]
doublex has joined #zig
mahmudov has joined #zig
dddddd has joined #zig
mahmudov has quit [Ping timeout: 258 seconds]
mahmudov has joined #zig
_whitelogger has joined #zig
lygaret has joined #zig
lygaret has quit [Client Quit]
waleee-cl has joined #zig
lygaret has joined #zig
return0e_ has quit []
lupine has quit [Ping timeout: 245 seconds]
marmotini_ has joined #zig
lygaret has quit [Quit: Leaving.]
ofelas has quit [Ping timeout: 248 seconds]
ofelas has joined #zig
frmdstryr has quit [Remote host closed the connection]
lupine has joined #zig
lupine has quit [Client Quit]
lupine has joined #zig
THFKA4 has joined #zig
lupine has quit [Client Quit]
teatec has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
doublex_ has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex has joined #zig
doublex_ has quit [Ping timeout: 240 seconds]
kirke67 has joined #zig
doublex_ has joined #zig
doublex has quit [Ping timeout: 265 seconds]
marmotini_ has quit [Remote host closed the connection]
return0e has joined #zig
return0__ has quit [Ping timeout: 268 seconds]
darithorn has joined #zig
doublex_ has quit [Ping timeout: 260 seconds]
lupine has joined #zig
doublex has joined #zig
<pixelherodev>
mq32, I've read that one, but isn't that really just saying we should use GPUs as CPUs?
<mq32>
pixelherodev: no, it sais programming languages should respekt modern CPU archs
<kirke67>
Hey guys, question -
<kirke67>
Say I define a generic type, fn Vector( comptime T : type, comptime dimensions : usize ),
<kirke67>
Is there a handy way to accept a Vector( T, dimensions ) type, but only this type as a method parameter?
<kirke67>
Couple things I've tried - have the method as a member function, which takes a Self/@This() first parameter, that works but I don't necessarily want to enforce the method behavior within the struct.
<kirke67>
Next, define the method as fn doSomething( comptime T : type, comptime dimensions : usize, vector : Vector( T, dimensions ) ) void {}
<kirke67>
Another thought that I haven't tried, might work, but not sure exactly what to do is define the method as fn doSomething( vector : var ) void {} and then inside the method body do some comptime type inspection to ensure that it's a Vector( T, dimensions ) type
lupine has joined #zig
ofelas has quit [Ping timeout: 245 seconds]
ofelas has joined #zig
lunamn_ has joined #zig
<kirke67>
I think this is a bit tricky because technically Vector is just a fn, its return value is the type and that type is unique for each T, dimensions combination. What I really want is a way to express "types that were returned by a particular function" as a parameter type.
lunamn has quit [Ping timeout: 265 seconds]
<Aransentin>
`fn doSomething( comptime T : type, vector : T )` ?
<Aransentin>
You're allowed to pass anything to it at first glance though, so not exactly beautiful
frmdstryr has joined #zig
schme245 has joined #zig
<pixelherodev>
mq32, yes, but by "modern CPU archs" it explicitly states parallelism
<mq32>
i think the point is more to use something like SSA instead of enforced "sequentialism"
* pixelherodev
shrugs
doublex has quit [Ping timeout: 260 seconds]
ofelas has quit [Ping timeout: 248 seconds]
ofelas has joined #zig
doublex has joined #zig
doublex has quit [Ping timeout: 260 seconds]
doublex has joined #zig
ofelas has quit [Ping timeout: 248 seconds]
doublex_ has joined #zig
doublex has quit [Ping timeout: 268 seconds]
doublex has joined #zig
doublex_ has quit [Read error: Connection reset by peer]
ofelas has joined #zig
ofelas has quit [Ping timeout: 248 seconds]
ofelas has joined #zig
ofelas has quit [Ping timeout: 245 seconds]
doublex has quit [Ping timeout: 268 seconds]
<kirke67>
pixelherodev - yes that does work, and that's the format that's used for the std methods - I suppose it's good enough for me :) .. It would be super nice though to have built-in type safety for generic types and the easy syntax of fn doSomething( vector : Vector ) void {} and Vector would represent any Vector( T, dim ).