Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gilch
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
gilch
4y ago
And that's... bad? Culture shock, sure, but this looks like fairly clean APL-style C to me. I would have wrapped some of those lines though.
32.
▲
by
gilch
4y ago
At least for the contrived example from the article, the solution isn't to break up the code, but to use denser code. Use a regex. Does anybody really think that e.g. sregex[1] is better than just learning and using the regex language
33.
▲
by
gilch
4y ago
Python's lambdas can have as many lines as you want. Just wrap parens around it. Hissp uses this form as a compilation target. Its REPL shows the Python compilation. Play around with it til you get it: https://github.com
34.
▲
by
gilch
4y ago
Idiomatic Python wouldn't use a map here, but a generator expression: (x.split('=')[1] for x in s.split('?')[1].split('&')[-3:]) Removing the lambda cuts down on the noise considerably. And ho
35.
▲
by
gilch
4y ago
The article starts with some reasonable premises, but the conclusion does not follow. I think most APL programmers would disagree with this take. Dense code has real advantages, and naming everything has real costs that are hard to see. The
36.
▲
by
gilch
4y ago
I think a trust can also buy $10,000. You can also gift I-bonds (say to family). I think they can only receive up to the $10k worth of gifts per year, less what they've bought themselves, but (and this is important) the bond itself sta
37.
▲
by
gilch
4y ago
How close is Hissp? https://github.com/gilch/hissp
38.
▲
by
gilch
4y ago
That's really only a concern for the first $10k in the first year. After that, everything (but your most recent year) is at least a year old and you can exit early if you have to.
39.
▲
by
gilch
4y ago
> And while the yield is great on paper, it merely lets you keep up with inflation in practice. True in the normal case, when inflation changes slowly, but because the I-Bond rate is computed retroactively, it's a better deal than n
40.
▲
by
gilch
4y ago
[Not investment advice.] I'm maxed out, and maxed out last year too. If ones investments are in leveraged instruments like calls and futures, then after levering up to sensible levels of volatility (the Kelly Criterion implies there is
41.
▲
by
gilch
4y ago
Something like Hebigo? https://github.com/gilch/hebigo#examples
42.
▲
by
gilch
4y ago
Hissp might be easier to get started with. It's much less complex as a whole and has pretty thorough introductory docs.
43.
▲
by
gilch
4y ago
Hardly a unique idea. J also does this in explicit function definitions, but with `)`. https://code.jsoftware.com/wiki/JPhrases/ExplicitDef
44.
▲
by
gilch
4y ago
> "full" dependent types From the quotation marks, I surmise that you're wondering what a non-full dependent type system could possibly mean. I added that qualifier because Python, in fact, had one, last I checked, with it
45.
▲
by
gilch
4y ago
I haven't worked with Haskell enough to fully object to this, so any complaints I could come up with would be second hand, so I'll abstain. I don't feel fluent in Haskell yet, but my impressions so far were mostly not negativ
46.
▲
by
gilch
4y ago
I found Scala horribly overwrought compared to either Java or Haskell. It's like it tried to mush together two different type systems and got the worst of both worlds. Languages do not need to be that complex. My next JVM language was
47.
▲
by
gilch
4y ago
Anecdote, but I like the Python community's emphasis on "readability counts". I did not get that from e.g. Ruby. Python's internals are also relatively accessible and easy to work with, so it's smooth sailing once y
48.
▲
by
gilch
4y ago
Numpy uses magic methods (Python's version of operator overloading). Django uses metaclasses. Pytest dynamically rewrites assert statements using AST. I'd say it's pretty common, at least in libraries. I certainly depend on P
49.
▲
by
gilch
4y ago
Even with strict static typing, it's possible to have errors. Mypy is static typing.
50.
▲
by
gilch
4y ago
I do think that's helpful compared to the strict alternative, but much of the up-front cost is still there. You still write most things twice, and the static type checker still slows you down when prototyping. You'd still be tempt
51.
▲
by
gilch
4y ago
Python's popularity has grown pretty steadily over decades. It retains users because of its merits and became popular in multiple niches more or less independently.
52.
▲
by
gilch
4y ago
Mypy still couldn't handle recursive types, last I checked. Pyright can do it, but seems to have trouble with even basic type inference. The annotation syntax is working OK, although it tends a bit verbose, but the type checkers are st
53.
▲
by
gilch
4y ago
You do know you can statically type Python, right?
54.
▲
by
gilch
4y ago
And static languages introduce a whole class of issues that dynamic languages don't have to deal with. You have to learn a separate metalanguage just for the types that isn't expressive enough to do things that are easy in a dynam
55.
▲
by
gilch
4y ago
Python is statically typed though. [1][2][3][4] These aren't just some third-party tools bolted on. The type annotation syntax is built into the language[5] and standard library[6][7]. I personally find static typing to be more trouble
56.
▲
by
gilch
4y ago
No shortage of options, e.g. Dg, Mochi, Coconut, and Hebigo (based on Hissp[1]). [1]: https://github.com/gilch/hissp
57.
▲
by
gilch
4y ago
Haskell can use brackets, people just don't.
58.
▲
by
gilch
4y ago
Don't forget Hissp!
59.
▲
by
gilch
4y ago
See https://www.reddit.com/r/whitespaceLisp/ for more examples.
60.
▲
by
gilch
4y ago
Or go full circle: Whitespace to Lisp to Python. https://github.com/gilch/hebigo
More ›