Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sparkie
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
121.
▲
by
sparkie
1y ago
They're the same in theory. The factor is the amount the original length is multiplied by (in place of *2 or *1.5 constants), and obviously x/√x = √x. length * (1 + 1/√(length)) = length + length/√(length) = length
122.
▲
by
sparkie
1y ago
Also depends what we're trying to optimize. If we're trying to optimize for space then using a constant is a bad idea: Consider if we have 2Gi elements in the array: We have to grow it to 3Gi, but we may only need to add a few add
123.
▲
by
sparkie
1y ago
They're both a form of structural typing - the static equivalent of duck typing. A difference with row types is that they don't have to be declared up front like an interface - they're basically anonymous types. You declare
124.
▲
by
sparkie
1y ago
That just gives power to whoever administers the civics exams - which would obviously be a government controlled body. Better idea should just be that you should be a taxpayer to vote. No tax = no vote. Why should people who aren't con
125.
▲
by
sparkie
1y ago
But 16 year olds are not mature enough to decide whether they want to drink or smoke. They also should look at least 25 for that. It's really not a great idea. Most 16 year olds know nothing about the world - they're impressiona
126.
▲
by
sparkie
1y ago
Interesting observation from the Jublains one: (2’,6); (10.5,17) The ratio of these two holes: 1.619, or 0.617. Strikingly close to the golden ratio. It's ~0.05mm out.
127.
▲
by
sparkie
1y ago
Not being standardized doesn't necessarily rule out being a measuring tool. They could've each been crafted for a specific purpose, but using the same technique for measuring. Would be nice if there were a database of precise meas
128.
▲
by
sparkie
1y ago
The switch misses the point. The compiler isn't smart enough to convert it to direct-threading, to the best of my knowledge. A switch only selects on one character. To continue lexing you need the switch inside a loop. The compiler mig
129.
▲
by
sparkie
1y ago
Not sure I like the `become` keyword. Seems bizarre - someone encountering this word in code for the first time would have no idea what it's doing. Why don't they just use `tailcall`? That would make it's obvious what it'
130.
▲
by
sparkie
1y ago
As an alternative to the computed gotos, you can use regular functions with the `[[musttail]]` attribute in Clang or GCC to achieve basically the same thing - the call in the tail position is replaced with a `jmp` instruction to the next fu
131.
▲
by
sparkie
1y ago
Can you explain why this is a valid mnemonic? bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon
132.
▲
by
sparkie
1y ago
Haskell can do the same kind of thing (local mutation), using the ST monad. It's usage is almost equivalent to using IORefs, except we can escape ST using runST to get back a pure value not in ST, which we cannot do for IO because ther
133.
▲
by
sparkie
1y ago
LN is an onion routed network, and has some privacy - notably, sender privacy, as the sender does not need to be known to the recipient. The recipient however is not private, but there have been proposals for rendevouz routing which could a
134.
▲
by
sparkie
1y ago
The GPL doesn't "infect" any code. You can write code which clearly calls GPL licensed code and license it under a MIT license. The GPL comes into play when you distribute. If you distribute your MIT licensed code alongside t
135.
▲
by
sparkie
1y ago
That's true for some projects, but there are others who have a sole maintainer, receiving no other contributions or donations, who are expected to continue maintaining the work for free. My advice is basically to not be that person.
136.
▲
by
sparkie
1y ago
> In very practical terms, what is the enforcement here? Who is gonna sue the end user? There's nothing to enforce because no license violation has occurred. The end user is allowed to use GPL licensed code alongside proprietary sof
137.
▲
by
sparkie
1y ago
I don't really care about "open source" (per OSI definition). I'm specifically proposing a new kind of license which does place a restriction on use - that of using it to train AI - and I'm suggesting that such lice
138.
▲
by
sparkie
1y ago
To retain referential transparency, we basically need to ensure that a function provided the same arguments always returns the same result. A simple way around this is to never give the same value to a function twice - ie, using uniqueness
139.
▲
by
sparkie
1y ago
You don't need a license to train AI, but that's not the point. The license is applying to using your work - a EULA if you like. If you provide a license which states that it cannot be used for training, then users of your work ar
140.
▲
by
sparkie
1y ago
The SSPL is free in spirit, but it doesn't fit the OSI definition of "Open Source" of the FSF's definition of "Free software" because it places restrictions on purpose of use. IMO we should have more license li
141.
▲
by
sparkie
1y ago
A clause in a license which states something like "You may not use this work for training an artificial neural network" should suffice. If the AI developer ignores the term and trains his AI with it anyway, they would clearly be i
142.
▲
by
sparkie
1y ago
There are alternatives. We can dual license software under a strong copyleft and a proprietary license, so that users (developers) who don't want their derived software to be copyleft can pay the proprietary license fee. IMO this is th
143.
▲
by
sparkie
1y ago
In long mode, compilers will typically emit `xor eax, eax`, as it only needs 2 bytes: The opcode and modrm byte. `xor ax, ax` takes 3 bytes due to the operand size override prefix (0x66), and `xor rax, rax` takes 3 bytes due to the REX.W pr
144.
▲
by
sparkie
1y ago
C offers a different solution to the problem in Annex K of the standard. It provides a type `rsize_t`, which like `size_t` is unsigned, and has the same bit width, but where `RSIZE_MAX` is recommended to be `SIZE_MAX >> 1` or smaller.
145.
▲
by
sparkie
1y ago
> Lisp is not, nor has it ever been, a functional programming language. It had lambda decades before other languages figured out it was a good idea, but it had set! for just as long. "Functional programming" used to just mean h
146.
▲
by
sparkie
1y ago
Kernel has first-class environments which aren't just lists, but can be constructed from lists. Environments are encapsulated, so we can't simply peek into them with car and cdr - we can only obtain the value associated with a giv
147.
▲
by
sparkie
1y ago
Scientists should be free to research what they want of course, provided that research does not cause harm to anyone. But, scientists should not have access taxpayer funding to conduct whatever little experiments they want. There's not
148.
▲
by
sparkie
1y ago
They can be useful in a tabbed interface. Since the width of a tab is limited, and may not be large enough to fit in the text, scrolling the text in the active tab title may be better than hovering to show a tooltip (Though we should use th
149.
▲
by
sparkie
1y ago
> Is my understanding correct that Lisp's powerful macro system stems from the ability to write the eval function in Lisp itself? I wouldn't say this is the case. Nearly any language could implement an `eval` for itself, but ob
150.
▲
by
sparkie
1y ago
That's a different meaning of first-class from Strachey's definition of a first-class citizen[1] - ie, one that can be passed as an argument, returned from a function, or assigned to a variable. Syntactic macros are still second
More ›