Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
CornCobs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
CornCobs
5y ago
That doesn't really allow for type checking which is a major purpose of types. It's more of just some nice sugar for runtime assertions
32.
▲
by
CornCobs
5y ago
Maybe something interactive with d3? Trying to visualize your codebase with a format that is even more static and less navigable (a static image) feels a little contradictory imo
33.
▲
by
CornCobs
5y ago
I think that copying an entire array just to modify one bit doesn't really demonstrate the flaw of FP as much as it is just bad programming. The problem isn't really with the paradigm, per se, rather it is the understanding of eac
34.
▲
by
CornCobs
5y ago
Come on, if you never looked at any of the social stuff in Github I bet any new recommendation system isn't going to bother you either. Unless they actively undermine their code/repo search functionality to push social stuff, let
35.
▲
by
CornCobs
5y ago
TIL about being able to hack the diagrams from console. Thank you very much! I've been using diagrams.net recently and have had some frustrations with the graphical editor that I almost wished I were using plantuml
36.
▲
by
CornCobs
5y ago
Sorry for getting back to you so late; I'd rather not link my github here as I'd rather remain as anonymous as possible on public forums
37.
▲
by
CornCobs
5y ago
I've written an interpreter for R (a subset; it was for school and I left out some features like S4 and the condition system) so I have done some pretty deep dive into the language reference and GNU R source. I agree with the author&#x
38.
▲
by
CornCobs
5y ago
In my limited experience, problems that cannot be vectorized really shouldn't be written in python either (assuming you mean python loops). But indeed the edge that Python has is the ease of use of drop-in solutions like Numba allowing
39.
▲
by
CornCobs
5y ago
I've been forced to use visual studio for c++ with cmake integration and I must say no matter how lacking VSC is, I don't think visual studio does much better. Refactoring capabilities are woefully inadequate or just don't wo
40.
▲
by
CornCobs
5y ago
Multiplexing in the ssh shell is way more convenient than opening a new ssh connection every time you need a new terminal. If vim is occupying your shell you definitely want a multiplexer instead of Ctrl+Z every time you need to do somethin
41.
▲
by
CornCobs
5y ago
I think the old adage about math applies to theoretical physics as well - you never understand it; you only get used to it
42.
▲
by
CornCobs
5y ago
No one seems to be answering the second question, so I'll take a crack at it: When something just isn't clicking in my brain I move on from it! Then some time later (not a fixed time) I happen across it and read through it again w
43.
▲
by
CornCobs
5y ago
I find visual studio to be absolutely horrendous for C++. Refactoring doesn't work (even a simple rename symbol!) The errors aren't accurate, autocomplete seems to suggest every symbol from the stdlib before the class defined in t
44.
▲
by
CornCobs
5y ago
I assume the parent comment was talking about the context of computations where numba is supposed to be a drop-in for wherever numpy is used. And I agree that it's not actually usable everywhere, since the support for numpy's feat
45.
▲
by
CornCobs
5y ago
I agree. I think Rust (or at least many tutorials of Rust) paper over ownership as something the compiler deals with for you but I think that's false. You have to think about memory and ownership. Only when I started using C++ where yo
46.
▲
by
CornCobs
5y ago
Is it actually completely painless? YMMV, but for me I found that there were many unsupported parts of Numpy I had to work around which meant I was effectively doing a full rewrite. Especially assignments using boolean masks and working wit
47.
▲
by
CornCobs
5y ago
The dos2unix tool is purpose-built for this!
48.
▲
by
CornCobs
5y ago
Seconded. I was taught ggplot by a great stats professor and the framing of visualizations as a language (gg actually stands for the grammar of graphics!) describing the relation between data and visual elements (layers in the graph) really
49.
▲
by
CornCobs
5y ago
Honestly indices starting from 1 fits really nicely in most situations. 1-based indexing together with ranges and inclusive range-based indexing makes loops and subsetting code really readable IMO
50.
▲
What Happened to Translation in Android?
1 points
by
CornCobs
5y ago
|
0 comments
51.
▲
by
CornCobs
5y ago
Nice! It just so happens that %% is used to denote infix operators in R (which can have arbitrary names). Like the %in% operator in base, or the famous pipe operator %>% from magrittr
52.
▲
by
CornCobs
5y ago
OHHH. Looking at the Infix class carefully I realize it's not actually |add| as a single operator but using the right or __ror__ to partially apply the function, then using the left or __or__ to fully apply it. Wrapping it up in a deco
53.
▲
by
CornCobs
5y ago
I've never seen this name-in-operator syntax before. Does this work with all 2-character operators? Where is this documented and what are the usecases?
54.
▲
by
CornCobs
5y ago
One thing I think is really nice about excalidraw is that the excalidraw file format is simply json - this makes my notes/drawings/diagrams greppable!
55.
▲
by
CornCobs
5y ago
There is an option to always open task manager on top. Open task manager and open the options menu. (This was mentioned in the feature reddit thread)
56.
▲
by
CornCobs
5y ago
It depends on your domain. Some functions are effectively entire programs which can have huge amounts of configuration required. Many R packages expose a single function that can easily take that number of arguments
57.
▲
by
CornCobs
5y ago
TIL you can pipe into files in awk. I've never come across this feature somehow. Is it commonly used?
58.
▲
by
CornCobs
5y ago
What are the benefits of these monadic builder interfaces instead of simply pure functions? One can imagine a simple Html type with html tag functions e.g. `div :: [Attributes] -> [Html] -> Html` Instead of using do notation to build
59.
▲
by
CornCobs
5y ago
Are you sure? At that scale there are so many second order and third order effects that scaling production is likely very nontrivial
60.
▲
by
CornCobs
5y ago
I first read your example as a snarky one, but on reading it again its implications are rather profound. I wonder how much of our problems arise because our intuitions and assumptions on the small scale simply fail on the macro scale
More ›