• 0 Posts
  • 1.57K Comments
Joined 3 years ago
cake
Cake day: June 21st, 2023

help-circle



  • Is a database handle you can write to not … basically mutable state, the arch-nemesis of functional languages?

    Access to an external database is a kind of effect. In functional terms, you’d use a monad to represent this, though in Koka you’d define an effect for it. In either case, it becomes part of the function signature.

    A “pure” function could instead work around it by returning (without executing) a query, accepting a state and returning a new, modified state, or otherwise returning some kind of commands to the caller without directly querying the database.


  • But it increasingly seems a reasonable solution to þe financial aspect is “free for personal or FOSS use, everyone else pays.” Which isn’t quite GPL, but I’m sure þere’s a license for it.

    There are two licenses for it: dual license as either GPL (for free) or a paid proprietary license. Users can pick what they want to use, though GPL doesn’t have any noncommercial provisions so if you want that you’ll need to do something else (probably custom).




  • This puts far too much control on the LLMs. A LLM can provide suggestions for a PR, but those suggestions are not a sufficient replacement for a real review.

    If the rate of PRs is too high to review, the solution isn’t to sacrifice the reviews. It’s to ensure that the PRs are of sufficiently high quality that the reviews are quick. Small PRs are faster to review, and readable code is easier to review. Tests can validate correctness to the reviewer. Make the review process as easy as possible for a proper code review.

    The hybrid approach seems to me like it’d be the most successful here. Generate your PR suggestions, and let the PR owner resolve them how they like. Then, do a proper review on the PR. Where I disagree with the author here is the reviewer shouldn’t review the suggestions and resolutions, but the final diff instead.



  • I took a peek out of curiosity and MoltHub… wow. Sorting is all done locally and only sorts skills that have been loaded onto the client, so scrolling down inserts skills into their sorted positions rather than at the bottom of the list. Scrolling down to the bottom of what’s been loaded (infinite scroll) can therefore insert stuff to the top of the list.

    Also, from what it looks like, skills just execute arbitrary code on your machine. While I’m not surprised, considering one of the most popular skills (from what I can tell) is a Polymarket trader, I’m gonna nope out of that one.



  • Or, hear me out, and I know this is crazy, but you buy a cheap, used TCL for a couple hundred pounds. Then, with the money you’re saving every month, you get a nice dinner with someone you’re close to, or even go see a local sports event in person.

    Ok, I don’t know what they cost in the UK, but they’re sub-$500 new here in the US for a decent size TV. You have to put up with the TCL bullshit, especially if it’s a Roku one, but you were probably getting a smart TV anyway, and they all have this bullshit.



  • This does seem like an issue with the library you’re using. Your second solution, using RawValue, is likely what I would have gone with, bundled with a self-referential type (wrapping the Pin in another nicer-looking type though). This is assuming I want to pass around a 'static type with the partially-deserialized data. In fact, I’ve done something like this in the past to pass around raw log data next to that same data in a parsed format (where the parsed data borrows from the raw logs).

    Alternatively, I’d have deferred the lifetime problem to someone else (library user for example) since the source data is probably provided at a higher level. This is how the libraries you’re using do it from what I can tell. They make the LT the user’s problem since the user will know what they want to do with the data.


  • MN Statutes §609.765:

    Defamatory matter is anything which exposes a person or a group, class or association to hatred, contempt, ridicule, degradation or disgrace in society, or injury to business or occupation.

    Whoever with knowledge of its false and defamatory character orally, in writing or by any other means, communicates any false and defamatory matter to a third person without the consent of the person defamed is guilty of criminal defamation and may be sentenced to imprisonment for not more than 364 days or to payment of a fine of not more than $3,000, or both.

    Exceptions are listed below that, but we know the statements are not true, clearly are not made in good faith, the communications are public, and they were not made with the intent to further any interest or duty shared between the parties who are communicating (I share no interests with these so-called “reporters” for example).

    So, uh, why do these cases never get taken?


  • If I had chosen to write this code in Go I never would have had to think about any of this and I expect it would have been fine.

    Well the article is about zero-copy deserialization in Rust. If you just slap #[derive(Deserialize)] on a bunch of 'static types and let it copy the strings, then you don’t have this issue in Rust either.

    Also, you’d be using Go, not Rust. That’s fine, but not really relevant when you want to do JSON deserialization in Rust, is it?

    What a wild conclusion to come to.


  • Do you want to? Go for it.

    Does your game crawl? Have you identified this code as the bottleneck? Are you certain that asm will give you a meaningful performance increase, and that your issue doesn’t lie with your approach to the problem? Sure, I guess. You said your game runs fine though, so this probably doesn’t apply.

    Is your game fast already? If you don’t want to do it, don’t.

    Writing asm by hand is almost always a waste of time. There are only a few times where it’s actually necessary, and unless you’re writing a bootloader and running your game on bare metal, I can’t imagine why it’d be necessary. But you know your code better than anyone else here, so you should know whether it’s needed or not more than any of us do.

    To begin with, you’re apparently targeting the Z80, which I haven’t seen used for games in the wild… probably in my entire life? Maybe an arcade machine I played on once used it, but I can’t think of any other times. If your targets need custom assembly, then you should already know that. We don’t know your targets.