Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
junke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
68 ms
·
661.
▲
by
junke
11y ago
Compile-time monomorphization happens only when you request it from the compiler, because it relies on the unsafe assumption that your code won't be redefined. Common Lisp is designed to be dynamic and the code that is produced should
662.
▲
by
junke
11y ago
In order to do that with CLOS, we have to add an explicit "inline" directive (as shown by lispm in another comment), because methods can be redefined anytime. Taking a shortcut to an effective method could break the code.
663.
▲
by
junke
11y ago
Yes. http://www.sbcl.org/manual/#Declarations-as-Assertions
664.
▲
by
junke
11y ago
If I understand correctly, functions are inlined[0] (not saying this is bad, just different). If you declare functions as inline then you can get rid of the dispatching code in contexts where the type is known in advance. [0] https:/&
665.
▲
by
junke
11y ago
Julia is general-purpose, but there is a deliberate orientation towards scientific computing. That's a partly non-technical choice about what is going to be optimized in priority. https://stackoverflow.com/questions
666.
▲
by
junke
11y ago
Do you see a contradiction between having a good design and having a specific purpose?
667.
▲
by
junke
11y ago
Julia stands definitely on firm foundations, has a solid design and is strongly-typed too.
668.
▲
by
junke
11y ago
Just to nitpick, that is 4 lines because you add a type too. Also, I noticed this in controller.go: // Unreachable based on the rules of there not being duplicate // environments of the same name for the same
669.
▲
by
junke
11y ago
Not all duplication is bad in all cases. It is more a factor of quality, not a direct, causal relationship. See for example this review of publications about code duplication: http://eprints.eemcs.utwente.nl/15314/01&#x
670.
▲
by
junke
11y ago
The problem with code duplication is not about being lazy, or having to type. I love typing. When you dive into a codebase full of vaguely similar yet different blocks, it starts being more than mildly annoying to understand the intent of t
671.
▲
by
junke
11y ago
Thanks a lot for your example. I would certainly take this approach and I am happy that you took the time to write it. I feel a little sorry for you because I put a trap for the parent poster in the original code. I wrote "a[j] < a[
672.
▲
by
junke
11y ago
The thread was more about mattlondon's problem with sorting according to the same key in different structs. I used of modified version of this example[0] to illustrate what I think is his problem[1]: you can sort circles and planet by
673.
▲
by
junke
11y ago
You might be right, this is the best solution in Go at this moment, but that's a local optimum. You don't have to solve this kind of problems in many other languages. The generator given as an example in the official blog [0] is c
674.
▲
by
junke
11y ago
And that's exactly why I am not convinced that Go is as maintainable as often claimed. 30 seconds for you, but how many hours for the poor souls who will come after you and ask: should I change this copy too or is it a separate case? I
675.
▲
Queens and Knights
(archive.vector.org.uk)
1 points
by
junke
11y ago
|
0 comments
676.
▲
by
junke
11y ago
If you want a fine challenge, try "Queens and Knights" ( http://archive.vector.org.uk/art10003900 ). It has some interesting corner cases to consider.
677.
▲
by
junke
11y ago
What about "your legislator". It is what matters, after all.
678.
▲
by
junke
11y ago
That's why you can "skip" a commit during git-bisect[0]. I had to find when a bug was introduced, and guess what? it was inside a single massive commit touching hundreds of files. I prefer atomic commits with good messages, t
679.
▲
by
junke
11y ago
I swear someday someone will write a blog post titled: "Controlled mutation of state variables in a purely functional paradigm: a syntactic approach." And just after that we will rediscover GOTO.
680.
▲
by
junke
11y ago
While I agree with the content, I dislike the straw-man pattern that is so commonly found: "you can use method A stupidly or method B (my favorite) intelligently. Hence method B is the best." Take for example: > Developers work
681.
▲
by
junke
11y ago
"Tuurnn arround"
682.
▲
by
junke
11y ago
There is no proof it was actually her: https://en.wikipedia.org/wiki/Let_them_eat_cake
683.
▲
by
junke
11y ago
Amplifying C https://news.ycombinator.com/item?id=11054089
684.
▲
by
junke
11y ago
Thanks a lot, those are nice pointers.
685.
▲
by
junke
11y ago
Out of curiosity, do you have an idea of the typical delay before saturating the filter? Do you have some pointer to space suits specification or something like this that I could read to have more information?
686.
▲
by
junke
11y ago
"Miaou" is the french word for "Meow", and "chat" in french means "cat". (Not a big surprise, the developer is from Lyon, France)
687.
▲
by
junke
11y ago
I don't know Swift, but it seems[0] that it is not possible to apply this with multiple arguments, like in the original example (e.g. (and a b c d)). [0] https://stackoverflow.com/questions/29750244/variadic-a
688.
▲
by
junke
11y ago
Context: Special Forms in Lisp [0] by Kent Pitman (1980) is about FEXRs vs. MACRO: > It is widely held among members of the MIT Lisp community that FEXPR, NLAMBDA, and related concepts could be omitted from the Lisp language with no loss
689.
▲
by
junke
11y ago
There are declared types and derived types, which are obtained by type inference and propagation. As much as possible, those types are used by the compiler, at compile-time, to signal type errors that are bound to happen at runtime, given t
690.
▲
by
junke
11y ago
Well, I understand what you mean with void* but as a type, void* is not a supertype of all other types.
More ›