Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xmcqdpt2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
151.
▲
by
xmcqdpt2
2y ago
Having to do this by reflection is a problem in principle solvable by types. Here is a function of type (A, B, C) => R, and here is a tuple of arguments of type (A, B, C), go call this function with those arguments. Most programming lang
152.
▲
by
xmcqdpt2
2y ago
Scala does it by pulling out the keyword arguments to variables so that your example would become { val x$1 = B() val x$2 = A() A(.one = x$2, .two = x$1) } This maintains left-to-right evaluation order while allowing you to pass argum
153.
▲
by
xmcqdpt2
2y ago
I don't know, maybe I review code that uses arrays more?
154.
▲
by
xmcqdpt2
2y ago
The correct way to test that code is to write a version that doesn't take an actual array but an index -> int function, then you wouldn't need to instantiate the array at all.
155.
▲
by
xmcqdpt2
2y ago
Also, I didn't know about this specific bug but I spotted it almost immediately while reading the code. This is not because I'm some kind of 10x programmer but because Integer.MAX_VALUE bugs while processing arrays are actually fa
156.
▲
by
xmcqdpt2
2y ago
I was pointing out that Debian can't distribute software that is licensed "for non-commercial use only" because Debian doesn't have use restrictions, and so their users might be engaged in commercial use. This is the poi
157.
▲
by
xmcqdpt2
2y ago
Right yes, provide their code licensed under AGPL, it's an important distinction, thanks. What it doesn't ban people from doing is selling a service, which is different from their license that allows only non-commercial uses.
158.
▲
by
xmcqdpt2
2y ago
AGPL would still allow a third party to fork their code and create a commercial product out of it, which is what they are opposed to. The AGPL only requires that the host also provides their code.
159.
▲
by
xmcqdpt2
2y ago
You can take a copy of Debian and resell it or put it in a product and sell that. That’s a pretty important freedom of free software.
160.
▲
by
xmcqdpt2
2y ago
Not a fan of the framing of the article. Firstly, there are millions of Mayans alive today, https://en.wikipedia.org/wiki/Maya_peoples and secondly, the reason why the pre-Colombian cultural texts and script are not in
161.
▲
by
xmcqdpt2
2y ago
Some software is engineered but not all of it by a long shot, IMO. I'm not an engineer, I'm a programmer. Engineering is all about certifications and contracts and laws and codes of conducts. Engineers don't build the bridges
162.
▲
by
xmcqdpt2
2y ago
Those are not CAS though, they are numerical software. Maxima main features are based on symbolic transformations.
163.
▲
by
xmcqdpt2
2y ago
Global mutable state is to be avoided at all costs of course, but IMO global immutable state is to be avoided... at some costs. The main issue comes in when you change (in the code! not as mutation!) the global immutable state and now you h
164.
▲
by
xmcqdpt2
2y ago
That’s not that great of an example because you can do much the same with closures, which are seamless in some languages. In Scala for example, def cond[T](p: Boolean, a: => T, b: => T): T = if (p) a else b will only evaluate
165.
▲
by
xmcqdpt2
2y ago
Neat! I have to deal with splunk at work and every time I do I'm annoyed that they decided to create their own query language.
166.
▲
by
xmcqdpt2
2y ago
You mean an admin panel on a server application, right? At my current job, I'm on a platform team that supports hundreds of applications. Each of them have their own admin panels. However, there are settings that apply to all of them i
167.
▲
by
xmcqdpt2
2y ago
We have those, with two recognition systems. The system the article describes is for the low count, disposable fares (a few tickets or a 3 day pass). Most people in Montreal have a chip card (the OPUS) which is reusable (and 5$ to buy). The
168.
▲
by
xmcqdpt2
2y ago
It is possible to have a memory model that blocks word tearing without full logical data race prevention. Java does it, although it benefits from not having to deal with packed types etc.
169.
▲
by
xmcqdpt2
2y ago
The problem with testing is that you need a very large number of tests to cover a moderately complex piece of software: you need to test most branches obviously, but often you need to test combinations of behaviours such that 100% line test
170.
▲
by
xmcqdpt2
2y ago
In languages without infix function calls, that should be possible, but I'm not sure how readable it would be. var initial factory = abstract configuration factory factory. configure new factory()
171.
▲
by
xmcqdpt2
2y ago
I would have preferred if the article did the same without using yield at all, because frankly that's where I feel the real magic is. See here for a much more in-depth description of coroutines in python, https://aosabook.or
172.
▲
by
xmcqdpt2
2y ago
I think the type signature and example makes the parent's point, frankly. It has three types, on of which is contravariant, two different usage of the yield keyword, and two exit points. Now granted most uses of generators are simpler
173.
▲
by
xmcqdpt2
2y ago
I work on a library used by millions of LOC in a monorepo. For some changes, it is literally impossible to know all the places that could break, so we rely heavily on types and testing to know if a change is safe. I think it's a shared
174.
▲
by
xmcqdpt2
2y ago
I don't think the examples you provided differ all that much. Someone might add a new constructor that no longer sets the string fields correctly, or your function might get modified so that it can be passed a mutable structure. Type s
175.
▲
by
xmcqdpt2
3y ago
For libraries, the article shows most of the time being spent in "front end" phases. Isn't that a bit misleading, as the library will eventually have to be included in the final program's binary? The code generation phas
176.
▲
by
xmcqdpt2
3y ago
The idea with these isn't that you can trick chat gpt into giving you bad descriptions of how to do crimes, but that when someone decides to wire it up to something with real world impact, you'll be able to push it towards somethi
177.
▲
by
xmcqdpt2
3y ago
That's because you aren't using Modern C++. You can write Modern C++ safely, you just need to use the right set of features and not the other ones. Here is a short read on this topic, https://www.amazon.ca/Embracin
178.
▲
by
xmcqdpt2
3y ago
Anything is possible if you extrapolate wildly enough.
179.
▲
by
xmcqdpt2
3y ago
If anything it's frustrating that there aren't monopoles, because if there were, we could make the E and B equations symmetrical under interchange of the fields. It would be a lot prettier, and I think it would be easier to teach
180.
▲
by
xmcqdpt2
3y ago
I feel like this article suffers a bit from a lack of perspective. The way DevRel works is nearly identical to marketing in other sectors where the consumer is sophisticated and technical. For example, scientific instruments companies also
More ›