Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
blixt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
blixt
9y ago
There's a lot of conjecture in this article. While I'm sure most voice assistant makers would love to be able to tag multiple voices simultaneously in realtime and perhaps even in the background, it's simply not there in toda
242.
▲
by
blixt
9y ago
Looping back to why sum doesn't work with strings, it looks like they implemented it like this: >>> def sum(it): ... return reduce(operator.add, it, 0) Basically the first value is always added to 0. This has on
243.
▲
by
blixt
9y ago
I guess sum was only implemented to support numeric values. However you can easily roll your own: >>> def add(it): ... return reduce(lambda x, y: x + y, it) ... >>> add(['hello ', 'world&
244.
▲
by
blixt
9y ago
Cool, this is another valid way of doing it and I suppose it comes down to preference. A few notes I'd like to mention though, that are not relevant to our toy examples, but may have implications in a production environment: 1. Unless
245.
▲
by
blixt
9y ago
I would say my solution is borderline. It requires maybe one or two extra reads to grok in its entirety due to multiple conditionals, one of which is in a loop and the other outside. Here's a more readable version for someone looking a
246.
▲
by
blixt
9y ago
Sorry it wasn't meant very seriously, just me expressing a caricature of idiomatic Python :) So disclaimer: good old `for` loops are often a better choice unless you're doing a simple modification or filtering of another sequence.
247.
▲
by
blixt
9y ago
Hold up, "idiomatic Python" and no generator comprehensions?! def fizzbuzz(i): outputs = [(3, 'Fizz'), (5, 'Buzz'), (7, 'Bar')] return ''.join(word for x, word in outputs i
248.
▲
by
blixt
9y ago
This code was not made for bug fixing though, it’s just a prototype - the expression of an idea. The accompanying text even says as much - of course the final game couldn’t possibly have a single sim’s mood in a global variable.
249.
▲
by
blixt
9y ago
Most likely you can infer a really complex set of events from this logic. For example, perform a "dice roll" while at a certain level of hunger (similar to how there's two dice rolls in the linked code that can cause the sim
250.
▲
by
blixt
9y ago
I wanted to get a feel for the logic so I made a quick carbon copy in JavaScript with a simple UI to play with: https://codepen.io/blixt/pen/ayyjpZ
251.
▲
by
blixt
9y ago
Very cool! Looks great for people who want to or are getting started with ML and want to visualize what's going on in the training process.
252.
▲
by
blixt
9y ago
I was hoping for something more ambitious like "once you can detect the full electromagnetic spectrum hitting your phone from any angle, you won't need a lens to reconstruct a focused picture." The proposed idea is very tedio
253.
▲
by
blixt
10y ago
I just tried it at home and it works great with a distance of just 10 feet or so between two locations. My laptop can see 26 unique wifi hotspots (other people in the building, cafe across the street, etc), which is the number the author wa
254.
▲
by
blixt
10y ago
I wonder if there's enough signal to detect if someone enters the room, which could be another cool trigger (e.g., turn on lights).
255.
▲
by
blixt
10y ago
Spotify mostly uses independent repos for all code, but some configurations (e.g., DNS) are contained within a single repo. Some big companies do successfully use Git for monorepos though (e.g., Microsoft – search for "GVFS"). Not
256.
▲
by
blixt
10y ago
I've used App Engine a decent amount the past 8 years and I would say it's great for prototyping and quickly creating CRUD tools or simple services. But stop there, don't build a whole API that powers your app / service
257.
▲
by
blixt
10y ago
If you consider every identifying piece of information as a bit in a fingerprint, it makes more than a significant difference; it makes an exponential difference. Consider the difference between 7 bits (128 uniques) and 8 bits (256 uniques)
258.
▲
by
blixt
10y ago
That's just evading my point. Go doesn't dial up its cleanliness, it's just clean. And it already does cause a compiler failure if you have unused imports or variables.
259.
▲
by
blixt
10y ago
These are fair points and I must've missed the elaboration on them when I looked at the proposal for aliases, as I was left with the feeling they were being pushed forward mainly to solve the gradual repair issue. I guess I have two po
260.
▲
by
blixt
10y ago
Certainly, and I can also type my JavaScript. But it doesn't happen more than maybe 1% of the time because optional good practices usually fall by the wayside. This is why Go's simple but strict rules are so key to keeping it clea
261.
▲
by
blixt
10y ago
I don't think realiasing exported signatures is a good idea, in any language. However, doing what you do in your package as a private function is perfectly fine, that is for your own convenience. Regardless, I don't think the argu
262.
▲
by
blixt
10y ago
I think the proposed alias has true merit in Go as has been shown by Russ Cox and in other places. What I'm a bit confused about is why it's sold as a transitionary tool but implemented as a feature. If it's so easy and clean
263.
▲
by
blixt
10y ago
The client can still ask the Apple server for the metadata, since Apple already knows your IP from the push notification channel anyway. Ideally Apple would ensure that this lookup is not logged or stored in any way so there's no repos
264.
▲
by
blixt
10y ago
Terrible if true. Is there a source for this claim?
265.
▲
by
blixt
10y ago
Apparently it's because it's approximately in the middle between Cambridge (where the team is located) and Stockholm (where Minecraft was made).
266.
▲
by
blixt
10y ago
Me too, so I actually asked them and apparently it's because it's approximately in the middle between Cambridge (where the team is located) and Stockholm (where Minecraft was made).
267.
▲
by
blixt
11y ago
By the time we have generative neural networks capable of replicating human voice with emotion and nuance (way more difficult than neutrally reading a text on Wikipedia), I think it's fair to assume we'll also have decent "th
268.
▲
by
blixt
11y ago
I think this is really cool, and really appreciate what you guys are doing. I have a particular passion for game creation tools as that is how I started down the path of becoming a developer over 20 years ago. To show my appreciation, I
269.
▲
by
blixt
11y ago
For people concerned with cross-browser reproducibility as well as resuming a PRNG between sessions (e.g., to reproduce random sequences in replays or multiplayer), check out arbit, an NPM package I made. It performs close to Math.random an
270.
▲
We should talk more often
(medium.com)
9 points
by
blixt
11y ago
|
0 comments
More ›