Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
patrec
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
51 ms
·
511.
▲
by
patrec
6y ago
Can you show some concrete examples? Non-idiotimatic Common Lisp compiled with SBCL can certainly come within a single digit integer factor of C, but your claim is much stronger. As for Chez, I have yet to see some code that compares favora
512.
▲
by
patrec
6y ago
Unless you have an encyclopedic memory and copious leisure time, you'd probably be much better off writing perl scripts instead if you care about portability. There is an enormous amount of sometimes subtle divergence between behavio
513.
▲
by
patrec
6y ago
So for technical interviews, yes you should absolutely grind algorithms, and not just any algorithms, but exclusively the stuff that comes up in leetcode, and yes you should do weeks of daily practice at leetcode or hackerrank if you want t
514.
▲
by
patrec
6y ago
I agree with the sibling comment that trying to implement a limited version of git (but that can work on a real git repo) would almost certainly a great way to learn git (there are multiple "implement git yourself in X" projects f
515.
▲
by
patrec
6y ago
How is this better than just avoiding the problem in the first place?
516.
▲
by
patrec
6y ago
I don't think your statement is unreasonable at all coming from the common perspective that it is part of the natural order of things that opening a text document would expose your computer to a non-negligible risk of hostile takeover.
517.
▲
by
patrec
6y ago
I think his argument is fairly simple: 1. Learning (fundamental) stuff deeply is the way to become great. 2. But knowing how stuff works fundamentally at an abstract level (e.g. being able to write your own toy OS) is not directly economica
518.
▲
by
patrec
6y ago
> My point is that SQLite is very unlikely to be the most vulnerable piece of software in your stack. Sqlite is very high quality, but I am rather doubtful this is true if you actually care about having a secure system to start with. I c
519.
▲
by
patrec
6y ago
Have you used it? When I last tried Cling not that long ago, it wasn't even alpha quality software and given that it has been around for a while, my default assumption would be that this hasn't suddenly improved.
520.
▲
by
patrec
6y ago
Arrays in shells generally suck (and behave quite different between different shells, e.g. zsh arrays are nothing like bash arrays), so I hope they don't make it into posix. OTOH, process substitution is a perfectly elegant and nice fe
521.
▲
by
patrec
6y ago
Nope, INT is (generally) too specific :) Sometimes of course, you just want to run something on SIGINT and not on normal exit, SIGHUP or whatever. But maybe the main use case for trap is implementing try/finally logic and you really wa
522.
▲
by
patrec
6y ago
> Using `shellcheck --shell sh` is a good start :) > If adhering to POSIX it should run the same in bash, ash and dash. Not so. Shellcheck will tell you about syntactically invalid bashisms, but will not warn you about the zillions of
523.
▲
by
patrec
6y ago
It would be nice if bash were not a moving target. I have run into several bash incompatibilities in real life. Bash on macOS differs substantially from bash on Linux because it's much older. But bash is also generally somewhat poorly
524.
▲
by
patrec
6y ago
> The Bashism is seldom needed I wish that were true. But posix shell lacks two fairly vital features: sane trap and process redirection. In an ideal world the posix comittee would just fix that, but I won't hold my breath.
525.
▲
by
patrec
6y ago
Ugh, should of course have been git status -s | awk 'gsub(/^ D /,"")' | tr \\n \\0 | ...
526.
▲
by
patrec
6y ago
The most convenient way is to probably to use a compiler builtin https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins... , if you want to be portable the next easiest way is to use a wide enough type (e.g.
527.
▲
by
patrec
6y ago
It'll work with more than gawk (e.g. mawk as well) but yeah, it will not work with busybox awk. In the context of an interactive shell command I doubt many people care much about posix; indeed I struggle to recall any context in which
528.
▲
by
patrec
6y ago
Yeah, it's annoying that unix filenames and shell quoting are both fundamentally broken and that (as above) people would generally (knowingly) write a a broken-for-spaces-in-filenames version by default because it's easier (and th
529.
▲
by
patrec
6y ago
I'm writing this on a system with an FP package manager and anyone programming in any popular language these days will be exposed to a heavy dose of FP constructs and concepts, and as far as Knuth is concerned McIllroy famously burried
530.
▲
by
patrec
6y ago
Right, so let's say Congress passes a bill that requires cloud providers to enable hard spending limits by start of February 2021, and eat any extra usage costs that exceeded a set limit. What is your educated guess by when this featur
531.
▲
by
patrec
6y ago
> They require a special license to use, What on earth? Because of the transmission spectrum they use?
532.
▲
by
patrec
6y ago
Someone really ought to do a lisp where code actually is data and amongst other things save people from having to write articles arguing about where to semi-manually put their invisible-to-the-language-artisanal-whitespace and how attempt
533.
▲
by
patrec
6y ago
UTIs are nicer than mime types in that they allow a simple way to make up a unique name you control (java style com.myurl.myformat) and in that there is an inheritance mechanism (you can say com.myurl.myformat also is a sqlite database, for
534.
▲
by
patrec
6y ago
> That said very few operating systems actually store MIME types, [...] MIME types are almost always derived from file extensions or magic numbers. OpenDocument is generally a horrible format, but there is one clever aspect about it whic
535.
▲
by
patrec
6y ago
No this is a special hack in bash itself, not one of the dumbed-down-plan-9 style abstractions in the linux filesystem.
536.
▲
by
patrec
6y ago
Well, I have a cynical take about the unique appeal of Common Lisp, but even cynicism aside Common Lisp is not going to lose to Racket in the "interesting companies" department, I think. Google Flights is still powered by Common L
537.
▲
by
patrec
6y ago
> Block compilation or whole program compilation are used for delivery of applications. Mostly, sure just like LTO in C/C++. But if I were doing any scientific programming with common lisp I'd try to use block compilation in a
538.
▲
by
patrec
6y ago
Yes, the standard allows this, but that doesn't mean inlining is straightforward, in the sense that the compiler can't just magically figure out unaided whether to inline stuff or not and all is well as the GP wanted. Whether two
539.
▲
by
patrec
6y ago
I think you overlook that inlining in common lisp is a lot less trivial than in very static languages like C++, because it is perfectly valid to redefine functions at runtime. This does obviously not play well with the compiler randomly inl
540.
▲
by
patrec
6y ago
Yes, Common Lisp does this right, see: http://clhs.lisp.se/Body/d_inline.htm
More ›