Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
frou_dh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
331.
▲
by
frou_dh
3y ago
I enjoy writing statically type-checked Python (previously with Mypy, now Pyright) but it's always in my mind that in absolute terms this is an absurd situation that the language has worked itself into. Namely that all the effort you p
332.
▲
by
frou_dh
3y ago
The following already worked in Ruby for single-line method definitions: def foo(s) s.upcase * 3 end foo "Hey" # => "HEYHEYHEY" No ; and no =
333.
▲
by
frou_dh
3y ago
Also the 'continue' statement in most programming languages does the opposite.
334.
▲
by
frou_dh
3y ago
> I'd also really like a version of `jq` that's easy to understand without having to learn a whole new syntax. Since JSON is JavaScript Object Notation, then an obvious non-special-snowflake language for such expressions on the
335.
▲
by
frou_dh
3y ago
Something that seems to permeate keyboard vs mouse debates is an unsaid assumption that some kind of robotic consistency/purity is the goal. I don't buy that at all when a human being is involved. There are tons of actions I know
336.
▲
by
frou_dh
3y ago
Reminds me of trying Scala and a library where not only were paths a type rather than primitive strings (good, like pathlib in Python), but absolute and relative paths were actually different types. I think this was it: https://g
337.
▲
by
frou_dh
3y ago
That doesn't make much sense because of course day to day operations are going to be different from subsequent exceptional circumstances, by definition.
338.
▲
by
frou_dh
3y ago
> I'm the rare person who like to work from the office (some of the time). It's not rare, that's just what shouty people on tech social media want you to think.
339.
▲
by
frou_dh
3y ago
Makes me think of GitHub's totally custom tribute in the UI on Jim Weirich's last commit: https://github.com/jimweirich/wyriki/commit/d28fac7f18aeacb0...
340.
▲
by
frou_dh
3y ago
Maybe for web games that's the dream. But for user interfaces that will mean dodgy homegrown text rendering, text selection, caret movement, etc on a site-by-site (or at least framework-by-framework) basis.
341.
▲
by
frou_dh
3y ago
Yep I can appreciate the misunderstanding. For completeness of the discussion, I think where sgarland mentioned a sub-shell, he was possibly referencing the Bashism `$(<` detailed on this page https://www.gnu.org/software
342.
▲
by
frou_dh
3y ago
My interpretation of sgarland's question was that he meant `<file` being the entirety of the statement, i.e. typing only that at a shell prompt and pressing return.
343.
▲
by
frou_dh
3y ago
Not sure what's surprising you in those snippets. `:` itself is a command and it does nothing with its arguments or stdin. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
344.
▲
by
frou_dh
3y ago
I guess it's equivalent to `: <file` i.e. hooking up the stdin of the no-op command.
345.
▲
by
frou_dh
3y ago
Talking of shell, the preference for left-to-right is often used to justify "useless use of cat", i.e. `cat file | command` instead of `command <file`, but it can just be written `<file command` instead.
346.
▲
by
frou_dh
3y ago
The projection onto the hand is just straight up neat. I'm not going to buy this device, but do look forward to using that paradigm at some point in the future.
347.
▲
by
frou_dh
3y ago
Seems kinda like "kids eat free" at restaurants... fake-spotters eat free at eBay.
348.
▲
by
frou_dh
3y ago
> If they get sold I do not know You can change the eBay search criteria to show either previous listings or previous listings that sold.
349.
▲
by
frou_dh
3y ago
Maybe adapting the existing js_of_ocaml project is comparatively easier so they might as well try it.
350.
▲
by
frou_dh
3y ago
I thought Raku can/could run on the JVM, but presumably the number of people actually doing so is very low so maybe it's fallen into disrepair.
351.
▲
by
frou_dh
3y ago
OCaml has not one but two WASM/WasmGC targeting efforts in development: https://discuss.ocaml.org/t/announcing-the-ocaml-wasm-organi... https://discuss.ocaml.org/t/an-update-from-the-ocaml-was
352.
▲
by
frou_dh
3y ago
It was introduced at a Raku Conf presentation. I remember watching it. https://conf.raku.org/talk/174 https://dev.to/lizmat/its-time-to-rak-part-1-30ji
353.
▲
by
frou_dh
3y ago
Isn't it like a bit like in clothing asking "Who can pull off this outfit?". Someone can pull off an N page resume if they can actually write well and present relevant information in an engaging way. Someone else with the sam
354.
▲
by
frou_dh
3y ago
Fair enough but I'd say this thread can only be considered such where it veered into "Go error handling". My data comment if cheeky was relevant to the quote.
355.
▲
by
frou_dh
3y ago
Programmers are in the business of understanding well-defined concepts like this, so we will cope. > Sometimes this makes things better. Sometimes it doesn't. Exactly, and that's why you want to have both techniques available,
356.
▲
by
frou_dh
3y ago
I said functions that error. If it has 'error' in its return type then it's such a function, e.g. (string, error)
357.
▲
by
frou_dh
3y ago
If it's considered advanced, that's only because it's been left out of many languages and so people have unfamiliarity. It's the dual of product types, the other side of the same coin .
358.
▲
by
frou_dh
3y ago
Specific functions where returning a tuple of error and something else makes sense are always free to do so. Why does their existence mean that the other 95% of functions that can error need be given the wrong return type and pretend to ret
359.
▲
by
frou_dh
3y ago
Then when he designed Go he made the act of data modelling akin to having one hand tied behind your back, because it supports only product types and not sum types too.
360.
▲
by
frou_dh
3y ago
Not very convincing because all your examples are nouns, when OP was taking issue with an adjective.
More ›