Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

My career solely exist because of foss. My salary level is only that high because of foss. I don't feel like I've been in a bad position.


> My career solely exist because of foss.

You are likely an excellent software engineer. Why would a company not have hired you to work on non-foss software?


They did. But how do you think I got interested in software in the first place? How do you think I practiced my skills ? How do you think I created my toolbox, met my peers, solved problems beyond my reach, and eventually created a company, while feeling good about it?


A lot of us did all that before FOSS was a big thing. Yes I did have to get my wallet out to buy a copy of Turbo C but it wasn't much of a barrier (at least compared to the hardware costs).


I guarantee that when I was an intern making 40% of minimum wage, it made all the difference.

Plus, let's not pretend most of us were not pirating all the paid stuff. Is that what we want our industry to be based on?

What's more, FOSS is so much more collaborative the docs, tutorial and communities made me grow so much faster than anything else professionally.


What's cosine similarity, what do you use it for and why is it good to have it into your db instead of somewhere else (like a lib)?


Euclidean distance stops "making sense" as the number of dimensions goes up: https://stats.stackexchange.com/questions/99171/why-is-eucli...

Cosine similarity measures the angle between two vectors instead, and doesn't suffer from the curse of dimensionality.

I guess it's important to have this in your DB, so you make "nearby" queries (give me text that's similar to this other text) in an efficient way.


Cosine similarity suffers from a curse of dimensionality, just as distance does (it’s just one dimension less). The angle between two random vectors in N dimensions approaches zero with a power of N. The main reason this metric is useful in practice is because it better relates to how certain neural networks use/train their embeddings internally.


Oh yeah, dimensionality curse wasn't the reason for cosine, it was the NN output.


Exactly. Some other context implied here, these vectors were ML embeddings. In that case, like 100 dimensions that vaguely represented our input data in compact form. There was probably a better solution out there, this was just the most readily available for us.


Because if you write the best scify ebook of the decade, why not also write your own time handling convention?


It's all cycle. Remember when XML was the future ?

Money quote from https://www.bitecode.dev/p/hype-cycles:

> geeks think they are rational beings, while they are completely influenced by buzz, marketing, and their emotions. Even more so than the average person, because they believe they are less susceptible to it than normies, so they have a blind spot.


Here I am seated in meetings discussing MACH architectures and serverless, while thinking about "The Network is the Computer" in Sun's manuals.


First time I hear about MACH. Is the name because of the Mach OS?

(The top reference I get for it is a spam-site that is trying to hype the name and sell a domain.)


Microservices, API-first, Cloud-native, and Headless.

https://machalliance.org/

Yet another trend in our fashion driven industry.


Oh, thanks, it's a completely unrelated acronym.

I guess I liked the other Mach better, but I expect neither to go anywhere.


This made me remember the amazing “parable of the languages” that had XML as the main antagonist of the story. We need an AI update for this one.

https://burningbird.net/the-parable-of-the-languages/


I like my prompt being a separator between the output of the previous cmd and the next cmd I type.


Now that it's FOSS, you can fork it.


The polite thing to do if you have a feature you think would make a FOSS project better is to submit a feature request first. If the maintainers decide they won’t support your feature quickly enough or at all, then fork it. GP did the right thing here


You think it would be a big fork you?


Forking is not the issue, it’s maintaining the fork after that’s the burden.


Just noticed that pydantic made their doc executable (https://docs.pydantic.dev/latest/).

Following the JS, I was expecting pyodide to be used, and it was: view-source: https://samuelcolvin.github.io/mkdocs-run-code/run_code_main...

But on top of it, it's wrapped in this project specially made for mkdocs (an alternative to sphinx).

Very cool.


"only"

If it's to dev a game with your kid, that pricey. Pricier than the console itself.

Pricier than to dev for android or iphone, or any laptop. Or the steam deck for that matter.

Expensive dev kits made sense for devs 20 years ago, but today they are just a way to lock the ecosystem.


You’re kidding right?

$450 for a dev kit is a steal compared to older console generations, which were thousands of dollars per device.

Also, I think it is completely fair for Nintendo to think: If you won’t spare even $450 for a dev kit, there’s no way we want your game.

By the way, consider what a Switch regularly costs: $299. You are paying Nintendo only $150 for the privilege of sending you a custom, low-run, modified device that is different in both software and hardware, combined with (likely) an account representative for business and technical questions. That’s kind of cheap.


Won't anyone think of the giant multinational corporations instead of the kids learning to program for once.


No kid is going to learn how to program in Assembly and C++, when interfacing with a custom microkernel, custom graphics API, and all of the technical requirements Nintendo demands (i.e. you must have a launch screen, loading times cannot be longer than X, read speeds cannot peak higher than Y), while cross-compiling your game and all dependencies to ARM, and precompiling all shaders ahead of time, for the Tegra X1, into your game. That's what developing for the Switch literally entails. Develop your game first and then you might get there.

This is a game console, not a PC. Developing games, for better or worse, whether it should be this way or not, is an extreme privilege. Sony basically never allows individual developers to register in any capacity. Xbox does, but if you want to actually publish a game, you're going to be in for a hard time.


It has around a 1Ghz cpu, you have no idea if their little homebrew games will stress that or need all the assembly tuning.

Kids have programmed games for their calculators. This is like “throw it together to show off your friends,” it doesn’t need to meet Nintendo’s UI standards.


> This is like “throw it together to show off your friends,” it doesn’t need to meet Nintendo’s UI standards.

In that case, unless it goes on the eShop (thus meeting Nintendo's standards), every single one of her friends will also need a devkit to be able to run it; as retail units can't decrypt devkit-encrypted games, nor vice versa.

Might as well get a Steam Deck before convincing Nintendo to send over 10 devkits for children.


> This is a game console, not a PC.

Game consoles are arbitrarily restricted PCs.


> Won't anyone think of the giant multinational corporations instead of the kids learning to program for once.

It's not a binary choice. Kids can learn to program in 1000 different ways. Getting social Brownie points for pointing out someone else isn't being incredibly generous is pretty poor behaviour, I think.


Kids can learn to program in 1000 different ways, but will they?

The biggest motivation is to show-off your creation and if all your friends play on the Switch and your game isn't there, it might as well not exist at all.

I learned programming on a Commodore 64, because I wanted to make my own games. Back at that time the playing field was fairly level as evidenced by the fact that a couple of the prominent game developers were almost kids themselves.


you dont need any of that shite to run your own game on the Steam deck


> My 12 year old and I made a little game in Godot and it turned out pretty playable.

> I think in her peer group the second most popular device after the iPhone is the Switch. It would be incredibly cool if we could get our game to run there.

I don’t think buying her friends Steam Decks is a very scalable solution for this sort of thing.


You're comparing apples to oranges.

The Steam Deck is, fundamentally, a PC. PC software is written to run using "some" of a PC's resources, because PCs have a bunch of extra resource "headroom" for running userland software plus a bunch of other junk on them at the same time. You can run a game in debug mode, within an IDE, within Windows, on a Steam Deck. And maybe also OBS to stream yourself doing that!

The Switch — and all other game consoles ever made thusfar — are embedded systems: systems designed to run software in such a way that the software can make use of 99% or more of the system's hardware resources (because, per the unit economics of such systems, that's the only way to make the system's low per-unit BOM, translate to good perf for the software.)

Also, unlike with PCs, embedded systems can give a developer performance guarantees — a number of CPU cores, amount of RAM, etc. that will always be 100% dedicated to running your software, with even hardware interrupts being offloaded somewhere else. And the platform will be extremely uniform, with all retail units having (at least) those same numbers. (Though there may eventually be a revision of the hardware that bumps the guaranteed resources up for software that opts into that — see e.g. how the Gameboy Color runs Gameboy games, or the "New" 3DS, etc.) So, unlike with a PC, when writing embedded software, you can and should write it to use "all the resources" — to "wastefully" spend memory caching whatever you can, run background logic to pre-compute things, etc., so that your software can get the best realtime runtime perf. It's not like anything else is running. Take the Unix idea of a process being nice(1), and invert it.

This means two things:

1. when a game is running on a retail device — if you've developed it following best practices — then there's no extra room for anything else to be running. Your software, by design, hogs everything. The OS shrinks down to just running on one e-core of one accessory CPU (and on older consoles, gets terminated altogether, with the user software instead being expected to keep the hardware going using an exokernel library provided as part of the SDK.) There's no room to run an IDE or debugger. So retail devices fundamentally can't be used to develop games in such a way that they "mirror production" — to have the room to develop your game on such a device, you'd have to somehow build your game to use half the RAM and CPU it usually uses — but only sometimes. Which is likely impossible, for most software architectures; but even if it were possible, you'd no longer be mirroring production.

2. even with a devkit — essentially these days just the same hardware but with double the RAM to fit a debug build of the game (both for the debug symbols, and so that it doesn't need to take two hours to LTO the executable each time you rebuild like it does for building retail) — you still need a host PC, because you want development to mirror production at least somewhat closely, and that means that you can't be spending half the CPU budget on a userland debugger + telemetry. Instead, devkit hardware has a hardware debugger + telemetry, that feed one side of a USB-serial connection to a host PC, where the other side is a special IDE that knows how to talk to such a setup.

None of this is unique to game consoles, mind you. You do the same thing to develop for an Arduino, or a wireless router, or a smart watch, or your car's infotainment system. "Tethered hardware devkits that externalize the development environment so the embedded software can expand to fill the device" are just how embedded systems engineering works.

---

And yes, embedded-systems hardware ecosystems also often involve "QA" or "tester" units, that are basically retail units that either allow you to run [the ecosystem's specific, often proprietary] media containing unsigned code; or at least, allow you to install a specific signing key and then run media containing code signed by that key.

So you could, in theory, do your development by building for QA units.

(That is, you could, if you thought that printf debugging with two-hour iterations is the be-all and end-all of development cadence.)

Homebrew embedded-systems tinkering communities tend to ignore such systems, though, mostly due to the requirement of burning the media. Even when the media isn't proprietary, it's still often something like a surface-mount eMMC flash chip, where the embedded-systems vendor expects you to be able to program that and put it on your QA board (and will, of course, point you to their hardware support partner who will sell you a programmer for it.) While there are many hardware hackers among Homebrew people doing fun reverse-engineering attacks, there are few true Electronics Engineers in the homebrew scene who have these sorts of Shenzhen-parts-store-looking industrial test-equipment labs in their basements. The average homebrewer doesn't even own an oscilloscope. :)

It's just easier to either work with true dev kits (where all you need is to "convince" the thing that you're authorized to feed it software over the serial tether); and/or to reverse-engineer and exploit your way into a retail unit, such that you can then feed it software through some channel that is attainable for the average dev (usually, these days, that means getting the system to launch software from an SD card that was supposed to just be there to store state data.)


> You are paying Nintendo only $150 for the privilege of sending you a custom, low-run, modified device that is different in both software and hardware, combined with (likely) an account representative for business and technical questions.

A distinction that _they_ created to begin with.


"Expensive dev kits made sense for devs 20 years ago, but today they are just a way to lock the ecosystem. "


Mostly agreed, but it could also easily be $10k.


Nintendo doesn't owe you a cheap way to deploy your custom binaries to devices.

Buy a Steam Deck if you want that. Build it for Web GL or Android. Plenty of options exist.

I'm not sure what OP actually wants here. Even if you can get your game running on your own Switch, it's not easy to get it up on the store.


What they actually want is a cheap way to develop games with their kid and possibly share them over sneakernet with her friends.

Nintendo obviously doesn’t owe them that, and it doesn’t seem to be supported. But, this is a good place to cast around for ideas.


A Switch is simply not the right device.

You can punish a Web GL build of the game to Itch.io and everyone could try it straight from their phones.


> Nintendo doesn't owe you a cheap way to deploy your custom binaries to devices.

Why not? Why should I not be allowed to run whatever I want on a device I supposedly own?


We don't owe Nintendo to let them sell their junk.


Then buy a different product.

It's well known game consoles aren't the place to run custom code. If you can figure it out, power to you, but it's simply not a supported use case of the product.


Make the game available on the Switch store for like $5. 450/5 ~= 100, so after 100 purchases you've made back the money.

Sure, you'd have to spend extra time to polish stuff, and that would probably not be super easy, but afterwards you have a fully published game the daughter and all her friends could install.


This might not be feasible. If you are making a game for yourself and your kid, you might not be using assets (art, sound, etc.) that you could distribute/sell in your game.

I made a game for my daughters 3rd birthday, recorded some Blipi and Coco Melon songs off youtube that I put in the game. I would not have the right to sell the game without securing rights to the songs (unless I want a lawsuit on my hands).


How would you distribute that over the Switch in the first place to the daughter and/or friends if you don't have the licenses to the assets you're using?


>How would you distribute that over the Switch

I wouldn't, I don't. The game is a PC game.


I'm a big fan of Python as configuration for my own projects, but:

- It requires discipline for devs to keep the conf declarative. Discipline is not automatically enforceable, so it's prone to failure.

- No guarantee of reproducibility.

- You need a Python VM (or a starlark interpreter if that's what you like). It's a big constrain.

- If you are a Saas provider, accepting Python as input is really hard to secure.


a Dhall configuration file will never:

- throw an exception

- crash or segfault

- accept malformed input

- produce malformed output

- hang or time out

in https://docs.dhall-lang.org/discussions/Safety-guarantees.ht...

Still a fan of Python for configuration?


Yes, because engineering is about context.


This is where I usually pitch in with "Have your heard of CUELang, our lord and savior?": https://cuelang.org/

- Not turing complete yet sufficiently expressive to DRY

- Define schema and data with the same language, in a separate or same file. With union types.

- Generate YAML or JSON. Can validate itself, or a YAML or JSON file.

The biggest drawback being the only implementation is currently in go, meaning you may have to subprocess of ffi.


we have a pipeline that ingest very concise cuelang files.

then it generates json files for each application for a tool that will create xml definitions which then are applied to a xls which the architects own, to spit out a yaml that we use to apply our helm charts. the charts deploy a k8s client which then interact with the main cluster via json using the api.

took a while, but we are using the best tool for each job.


just throw in a kafka cluster so you can pipe each step through an event bus and you'll have an enterprise-grade deployment setup


You used JSON twice, how casual.

Your API should clearly be using protobuf.


How does it compare to dhall?


Dhall's lack of any form of type inference makes it very verbose and difficult to refactor in my opinion. (I'm the author of dhall-kubernetes and never ended up using it in production; funnily enough). Dhall is also extremely slow. We had kubernetes manifests that took _minutes_ to type-check. Cue is basically instant. This matters a lot to me.

I find cue very ergonomic. Also it treating both types and values as values is very neat. You write your types and your values in the same syntax and everything unifies neatly. but I sometimes miss its lack of functions.

Cue also being to ingest protobuf definitions and openapi schemas makes it very quick and easy to integrate with your project. Have a new Kubernetes CRD you want to have type-checked in cue? No problem just run `cue get go k8s.io/api/myapi/v1alpha1` and off you go you have all your type definitions imported from Go to Cue!

Especially for k8s this makes for very fast development and iteration cycle.

I've wanted to take a look at https://nickel-lang.org/ which is a "what if cue had functions" language. but to be honest Cue kind of serves my needs.


Speaking of Nickel, they've got a great document detailing the reasons for their design (for example why they chose not embed in a general-purpose language like Pulumi) and how Nickel compares to other config languages like Dhall and CUE: https://github.com/tweag/nickel/blob/master/RATIONALE.md


> Dhall is also extremely slow. We had kubernetes manifests that took _minutes_ to type-check. Cue is basically instant.

Everyone wants type-safety, but no one wants to wait for the type-checker :)

Maybe in this case dhall with type checks equivalent to dhall would be slower, but I notice in many places people say "strong type-checking is valuable" while still expecting similar compile times as languages with weaker type systems.


People always undervalue the beauty of a short feedback loop until it's taken away from them.

And even then, they won't exactly pin point the problem, rather express their general frustration, without realizing that the dynamic system they used had indeed some great properties and were not popular for no reason.


I don't disagree with that either :)

I'm conflicted honestly. I find with dynamic languages it's easier to just spin your wheels and move quickly in the hole you are in.

With typed languages its easy to feel you are making less progress because the feedback loop can be longer, but generally the pieces you build are more likely to work correctly.

For me Haskell and ghci repl gives good properties from both areas, especially with something like Rapid for keeping state over repl reloads.


Functions are a nice to have, but:

- It tends to make things less declarative.

- You lose locality of behavior, which is very useful in configuration.

Also, nickel doesn't support injecting data into the nickel file, so external program can't set variables, query a database and pass the result to the conf file, etc.


Cue was designed very much with k8s in mind and developed tutorials and integrations for it early on. Dhall was designed pre-k8s. Dhall had to introduce a defaults feature: before that it was completely unusable for k8s. Dhall has functions, which are natural to programmers- particularly from an FP background, Dhall would be trivial to start using. Whereas it takes some getting used to cue's unifications- but there is enough documentation and integration for getting going with k8s to make up for it. Dhall has unique features for stably importing configurations from remote locations.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: