Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
631.
▲
by
pansa2
5y ago
> Code reuse is in fact a prime example of a misuse of inheritance Does that depend on how inheritance works in a particular language? For example, in Python it’s widely believed that inheritance is simply “a tool for code reuse” [0].
632.
▲
by
pansa2
6y ago
I wish there were a language that I could use for both prototyping and production, but Go isn't it. Although I have been considering using it for production, it's not what I need in a prototyping language at all.
633.
▲
by
pansa2
6y ago
> I cannot relate to people who make prototypes to throw away, I've never done it, and I don't know why I'd do it. When I'm at the prototyping stage, I don't yet know how to solve the problem. That means I need
634.
▲
by
pansa2
6y ago
Usually, because you already have a lot of Python code and it's easier to write more of that, than to try and figure out Python <=> Java interop.
635.
▲
by
pansa2
6y ago
But Swift for Tensorflow had been doomed for over a year before it was cancelled - from when Chris Lattner left Google in January 2020.
636.
▲
by
pansa2
6y ago
Reminds me of this cheat sheet [0] for slices in Go, which includes a snippet to delete an element from a slice: a = append(a[:i], a[i+1:]...) [0] https://github.com/golang/go/wiki/SliceTricks
637.
▲
by
pansa2
6y ago
> in any language Is anyone using a language other than C, C++ or Rust to target Wasm? Many other languages seem to have experimental support - but are any of them ready for production, or even making significant progress towards being
638.
▲
by
pansa2
6y ago
> assembly language must have an unambiguous bidirectional mapping between the target binary code and the assembly language. This isn’t true for many CPU assembly languages, though. For example, the x86 instruction `add eax, ecx` can b
639.
▲
by
pansa2
6y ago
See “What were the motivations behind creating GDScript?”: https://docs.godotengine.org/en/stable/about/faq.html#what-w...
640.
▲
by
pansa2
6y ago
Reminds me of Pyright - a static type checker for Python, written in TypeScript. https://github.com/microsoft/pyright
641.
▲
by
pansa2
6y ago
Thanks - Alpine.js looks like an appropriate choice in general, but unfortunately it’s not supported by these particular components. However, the announcement does say “we're looking forward to exploring other frameworks in the future
642.
▲
by
pansa2
6y ago
I'm currently using Tailwind CSS to style a fairly simple static website that's being generated using Hugo. I've been considering using some Tailwind UI components, e.g. modals (in particular, lightboxes to show zoomed-in ver
643.
▲
by
pansa2
6y ago
The other issue with using PyInstaller to build a program into a single binary is that every time the program runs, it needs to extract its own contents to a temporary directory. This causes slow start-up and, if the program exits abnormall
644.
▲
by
pansa2
6y ago
It’s unfortunate that Go’s standard package `flag` doesn’t follow the standard either, given the language is otherwise a good fit for command-line tools.
645.
▲
by
pansa2
6y ago
GopherLua [0] is a Lua implementation written in Go, not just a wrapper around the reference implementation (written in C). The main alternative seems to be Shopify’s go-lua [1], given that Microsoft’s golua [2] is no longer being developed
646.
▲
PyPy v7.3.4: release of Python 2.7 and 3.7
(pypy.org)
9 points
by
pansa2
6y ago
|
1 comments
647.
▲
by
pansa2
6y ago
> I'm not sure if there are any ~20 hours a week dev jobs These definitely exist, at least in some companies. One of my former employers had several developers who worked 3 days (i.e. 22.5 hours) per week.
648.
▲
by
pansa2
6y ago
Given their limited shelf-life, I’d have thought this would be less of an issue for games than for other software? Many games rely on Lua, for example, which is maintained by a team of just 3 people, and it seems only one of them writes mos
649.
▲
by
pansa2
6y ago
It doesn’t use the standard Ruby interpreter (MRI), but a custom implementation that includes a compiler. I don’t know if it’s AOT compilation or JIT.
650.
▲
by
pansa2
6y ago
It seems to be a custom implementation based on mruby and LLVM. See “What is DragonRuby?” at http://docs.dragonruby.org/ .
651.
▲
How Python Dictionaries Work
(tenthousandmeters.com)
3 points
by
pansa2
6y ago
|
1 comments
652.
▲
by
pansa2
6y ago
In Rust, some expressions (e.g. `while`) always evaluate to `()`. What’s the benefit of that compared to making `while` a statement?
653.
▲
by
pansa2
6y ago
> My main beef with Lua is the absence of ‘null’ Lua’s equivalent is `nil` - I assume that doesn’t do what you need? How would the behaviour of `null` differ from Lua’s `nil`?
654.
▲
by
pansa2
6y ago
There’s only 1 month left before the 3.10 feature freeze. I’d be surprised if the `match` statement gets anything more than minor tweaks before it’s released.
655.
▲
by
pansa2
6y ago
An example of core language complexity: if asked, could you explain what all of these do? https://twitter.com/raymondh/status/1280988785841278976
656.
▲
by
pansa2
6y ago
Variables in Python are generally function-scoped instead of block-scoped, because the latter doesn’t work well with implicit variable declarations. However, there are some special cases where variable scope is smaller than a whole function
657.
▲
by
pansa2
6y ago
> I want to be able to define `plus` on my datatypes and I want to be able to define `+` on my datatypes. The problem with this approach is that, just as defining `plus(int)` on a class `C` allows you to call `c.plus(1)`, defining `+(i
658.
▲
by
pansa2
6y ago
> full of these sorts of interesting behavior I don’t think that applies to Python - it’s quite strongly (although not statically) typed. I agree that it does apply to JavaScript and PHP.
659.
▲
by
pansa2
6y ago
Is there a benefit to using a hash table instead of just a linear array of all 3^9 possible positions?
660.
▲
by
pansa2
6y ago
HPy was recently discussed here: https://news.ycombinator.com/item?id=26625398
More ›