@mort@fosstodon.org avatar

mort

@mort@fosstodon.org

Programmer, mostly writing C++, C and Go.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

mort, to Kotlin
@mort@fosstodon.org avatar

I really like 's (and others') approach to nullability, where nothing is nullable by default and you mark something as nullable by adding '?' to the type. And the '?.' syntax is nice too. 'foo: Foo? = ...; foo?.doThing()' is nicer than 'foo: Optional<Foo> = ...; foo.map(|it| it.doThing())', and both are miles better than "everything is always implicitly nullable unless annotated with '@NotNull'

mort, to debian
@mort@fosstodon.org avatar

The whole thing is kinda giving me second thoughts wrt. the whole distro and packaging thing in general. My understanding of the implied agreement between me as a dev and a distro's package maintainer is: the maintainer, to the best of their ability, tries to make my software work "as intended". In return, they get to publish it under my software's name.

That's clearly not how Debian views things. And I can't accept distros publishing broken sw w/ my name.

mort,
@mort@fosstodon.org avatar

Are there any license or additional legal document I can include in my / software to ensure that people can't redistribute modified versions under the same name? Sorta like what Firefox was doing which lead to the name IceWeasel for a time. I'd want forks to be okay and everything, just not unauthorized redistribution under the same name. Must I register a trade mark..?

Thanks for forcing me to think about this sort of stuff! Why can't we just not be assholes

mort,
@mort@fosstodon.org avatar

@deshipu I guess I'm writing a modified GPL with naming restrictions then, wish me luck

Really though, I think someone who knows the legal environment around FOSS should write variants of existing licenses with naming restrictions. In a world where Debian exists, not restricting the use of your software's name is clearly way too dangerous.

mort,
@mort@fosstodon.org avatar

@deshipu Yeah, I get that. But the "threat model" here isn't really "someone else writes different software and releases it under the same name as my software", but "Debian takes my source code, breaks it in key ways, and releases it under the same name"

mort, to Kotlin
@mort@fosstodon.org avatar

I can't deal with languages with optional semicolons! I like languages without semicolons, but when they're optional, especially if they feel "C-like", I always end up adding semicolons to some lines even when I try to write in a semicolon-less style. I'm writing some now and I decided to just use semicolons consistently because the alternative is seemingly to use them inconsistently.

Strangely, this isn't an issue I have in . I do have it in however.

mort,
@mort@fosstodon.org avatar

@Crell I should've clarified but I ran out of characters :p Semicolons after the last line in a block in Rust aren't optional, they do have semantic meaning, but they are optional in practice a lot of the time. For example, it usually makes no difference whether an if statement technically evaluates to a value or not, so in effect, the last semicolon in the body of an if statement is usually optional.

mort,
@mort@fosstodon.org avatar

@ekuber That's correct, and I would've added a caveat if I wasn't limited to 512 characters, but here we are

For a whole lot of blocks in rust (such as if statements and loops not used as expressions), it doesn't make a difference whether the block technically evaluates to something, so the last semicolon there is in practice optional, so I sometimes forget it

eniko, to random
@eniko@peoplemaking.games avatar

torn between making a sandboxy ultima 6 like game or making a sci-fi version of a sandboxy ultima 6 like game

not that i have the time or energy to make either but i like to daydream, its just im torn about which to daydream about

mort,
@mort@fosstodon.org avatar

@eniko Dammit you got me thinking about this

Is this mainly a technical challenge or a world design challenge? If it's just technical, you could totally make a 2D top down game where the world has a lot of height: tall buildings in the top-down Pokémon games have each floor as a separate room and stairs are "doors" between floors. Also instead of dirt paths surrounded by trees in the "overworld" you can have bridge networks surrounded by open air
I think it could totally work

mort,
@mort@fosstodon.org avatar

@eniko Manually! Have an overworld area for bridge network @ floor 1, floor 5 and floor 10, outside-facing doors in all skyscrapers on level 1 go to corresponding doors on overworld bridge network are @ floor 5, etc

The game engine wouldn't know about floors or height, but you design the connections between areas to give the illusion of height

drewdevault, to random
@drewdevault@fosstodon.org avatar

I needed a break from Real Work, so I'm speedrunning writing a Unix-ish operating system

Day 3

mort,
@mort@fosstodon.org avatar

@drewdevault Wait you implemented ext4? I assumed that for this kind of project you'd make a baby's first file system style thing like we did in OS class in uni...

mort,
@mort@fosstodon.org avatar

@drewdevault Aha! Reasonable.

mort,
@mort@fosstodon.org avatar

@drewdevault How do you intend on dealing with signals during a blocking syscall? EINTR? Automatic resuming?

mort,
@mort@fosstodon.org avatar

@drewdevault Blog post material driven development

mort,
@mort@fosstodon.org avatar

@drewdevault New project: userspace utilities collection a la GNU's, but written in Hare, primarily targeting Bunnix?

mort,
@mort@fosstodon.org avatar

@drewdevault Oh, awesome!

So you have your own kernel on bare metal running your own userspace written in your own programming language, that must be so satisfying. Impressive!

eniko, to gamedev
@eniko@peoplemaking.games avatar
mort,
@mort@fosstodon.org avatar

@eniko Yet you post a picture without sound T_T I wanna hear it

By the way, what's the process for music in your games generally? Do you personally make it or do you have music people on the team or contract it? And what software do you use?

mort, to random
@mort@fosstodon.org avatar

Hey y'all if you have an object notation you wanna call NBON, and it stands for Non-Binary Object Notation, is it fun and cute to make this the logo or is it disrespectful

I feel like if I was non-binary I wouldn't hesitate to make this the logo for something but since I'm not, I'm not sure it's right for me to appropriate it? Thoughts?

bagder, to random
@bagder@mastodon.social avatar

The #curl #git repository is cloned on average once every 6 seconds.

mort,
@mort@fosstodon.org avatar

@bagder Huh I would've expected some inefficient CI system to be cloning it a few times a day on average due to vendoring dependencies via git submodules

eniko, (edited ) to random
@eniko@peoplemaking.games avatar

i sure hope nobody figures out that kitsune tails save files are just a proprietary binary version of json thats fairly human readable and so easy to reverse engineer and hacks them for their own purposes 🥺

mort,
@mort@fosstodon.org avatar

@eniko I wanna read about your binary JSON!

.. my save games are also a binary JSON format, but I narrowly managed to accept the things I don't like about messagepack enough to use that instead of making my own

(on the other hand, I did not manage to accept the things I don't like about the C++ messagepack libraries so I made my own)

mort,
@mort@fosstodon.org avatar

@eniko I like the sound of that a lot I think. Interesting that you encode keys and strings differently, I guess that helps when inspecting the file manually; you can reset your mental parser at every "K<string>".

How do you encode keys/strings? Are they 0 terminated?

I would be tempted to use LEB128 for integers (https://en.wikipedia.org/wiki/LEB128),is that what you're doing or are they fixed width?

I wouldn't be surprised if I write up a proper spec based on these ideas some time in the future & use it

mort,
@mort@fosstodon.org avatar

@eniko I threw together a msgpack -> enikoJSON, but with 'p' for positive LEB128-encoded integer, 'm' for negative LEB128-encoded integer, 0 terminated keys/strings, 'f' for 32-bit float, 'd' for 64-bit float, plus a 'b' for length-prefixed arbitrary binary data and 'N' for null: https://p.mort.coffee/M9S.cc

Files are slightly smaller with msgpack than this format (5927B vs 6264B; 4951B vs 5043B gzipped). But it's sooo much simpler. Hm.

mort,
@mort@fosstodon.org avatar

@eniko I'm curious what you think of this? https://github.com/mortie/nbon

It's not the exact same as your thing (I removed the 'K' before object keys for example) but it's very much inspired by it

mort,
@mort@fosstodon.org avatar

@eniko Yeah, I get that. I guess I could define float -> double conversions and int -> double conversions to be semantics-preserving...

However I like ordered objects :( My parser is streaming and I sometimes need one key of an object before another key, so I just declared objects to be ordered

Reading the IETF spec (https://datatracker.ietf.org/doc/html/rfc8259#page-6), I don't think it's specifically wrong to treat JSON objects as ordered...

mort,
@mort@fosstodon.org avatar

@eniko That's definitely a solution, though I feel like it locks the format down a bit more; you can't just add more things to the header without breaking stuff. You also kinda lose the self-documenting property of having keys.

Another approach I've considered is to parse everything independently up-front, into some intermediate variables if necessary, and then fix up things afterward.

I guess I could add some weaselly language to the spec: implementations may treat order as significant 🤔

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • kavyap
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • InstantRegret
  • everett
  • Youngstown
  • ngwrru68w68
  • slotface
  • rosin
  • GTA5RPClips
  • tester
  • PowerRangers
  • anitta
  • thenastyranch
  • mdbf
  • ethstaker
  • cisconetworking
  • Durango
  • vwfavf
  • normalnudes
  • tacticalgear
  • khanakhh
  • modclub
  • cubers
  • Leos
  • megavids
  • All magazines