←back to thread

1246 points adrianh | 1 comments | | HN request time: 0.207s | source
Show context
chaboud ◴[] No.44492383[source]
I had a smaller version of this when coding on a flight (with no WiFi! The horror!) over the Pacific. Llama hallucinated array-element operations and list-comprehension in C#. I liked the shape of the code otherwise, so, since I was using custom classes, I just went ahead and implemented both features.

I also went back to just sleeping on those flights and using connected models for most of my code generation needs.

replies(1): >>44493204 #
andybak ◴[] No.44493204[source]
Curious to see the syntax and how it compares to Linq
replies(1): >>44495027 #
1. chaboud ◴[] No.44495027[source]
I ended up closer to python, but not totally delighted with it (still need to pass in a descriminator function/lambda, so it's more structurally verbose). I'd just recommend Linq, but I was writing for an old version of Unity coerced through IL2CPP (where Linq wasn't great). It was also a chunk of semi-hot code (if it was really hot, it wouldn't be sitting in C# in Unity), so some of the allocation behaviors of Linq behind the scenes wouldn't have been optimal.

What surprised me initially was just how confidently wrong Llama was... Now I'm used to confident wrongness from smaller models. It's almost like working with real people...