HunterRobot's recent activity

  1. Comment on What do you think the top three most used apps on your phone for the past week are? in ~tech

    HunterRobot
    Link
    I expected Firefox, Spotify and K-9 mail, but it was actually Firefox, Google Maps and Soundcorset. Definitely used Spotify more than Google Maps (had music on while navigating), but apparently it...

    I expected Firefox, Spotify and K-9 mail, but it was actually Firefox, Google Maps and Soundcorset. Definitely used Spotify more than Google Maps (had music on while navigating), but apparently it doesn't count in te background. Forgot I drove a lot this week.

    I suppose I mostly thought of the apps I waste time with, didn't really think of the more actually useful apps.

    1 vote
  2. Comment on Does anyone use self-hosted recipe server/software like Mealie? in ~food

    HunterRobot
    Link
    I've been using the NextCloud addon Cookbook. It suffices for me, with a simple searchable recipe library with tagging and the possibility to scale up or down ingrediënts. But I'm sure some of the...

    I've been using the NextCloud addon Cookbook. It suffices for me, with a simple searchable recipe library with tagging and the possibility to scale up or down ingrediënts. But I'm sure some of the other solutions listed here provide more functionality. I just happened to have NextCloud running already.

    1 vote
  3. Comment on Day 2: Gift Shop in ~comp.advent_of_code

    HunterRobot
    Link
    Trying to get a little bit of Kotlin experience in. Nice little indentation pyramid of doom in part 2, not exactly proud but it works. Part 1 data class Range(val start: Long, val end: Long) fun...

    Trying to get a little bit of Kotlin experience in. Nice little indentation pyramid of doom in part 2, not exactly proud but it works.

    Part 1
    data class Range(val start: Long, val end: Long)
    
    fun main() {
        val input = Files.readString(Path("src/main/resources/day2/input"))
    
        val ranges = input.split(',')
                .map { it.split('-') }
                .map { Range(it[0].toLong(), it[1].toLong()) }
        var invalidIdSum = 0L
    
        ranges.forEach { range ->
            for (id in range.start..range.end) {
                val number = id.toString()
                val midpoint = number.length / 2
                if (number.length % 2 == 0 && number.take(midpoint).toInt() == number.substring(midpoint).toInt()) {
                    invalidIdSum += id
                }
            }
        }
        println("Sum: $invalidIdSum")
    }
    
    Part 2
    data class Range(val start: Long, val end: Long)
    
    fun main() {
        val input = Files.readString(Path("src/main/resources/day2/input"))
    
        val ranges = input.split(',')
                .map { it.split('-') }
                .map { Range(it[0].toLong(), it[1].toLong()) }
        var invalidIdSum = 0L
    
        ranges.forEach { range ->
            rangeLoop@ for (id in range.start..range.end) {
                val idString = id.toString()
                for (patternSize in 1 .. idString.length / 2) {
                    if (idString.length % patternSize == 0) {
                        val chunked = idString.chunked(patternSize)
                        if (chunked.all { it == chunked[0] }) {
                            println("Found invalid id $id for pattern size $patternSize")
                            invalidIdSum += id
                            continue@rangeLoop
                        }
                    }
                }
            }
        }
        println("Sum: $invalidIdSum")
    }
    
    1 vote
  4. Comment on Is there a postman alternative without the bloat? in ~tech

    HunterRobot
    Link
    Personally I have been using Bruno, which is almost exactly Postman without al the collaboration or cloud stuff. If you want to share with your team the collection files can simply be shared.

    Personally I have been using Bruno, which is almost exactly Postman without al the collaboration or cloud stuff. If you want to share with your team the collection files can simply be shared.

    22 votes
  5. Comment on The great Tildes Archipelago multiworld randomizer! Interest thread! in ~games

    HunterRobot
    Link
    This sounds like a great way to experiment with randomised games, I'm very interested! Currently thinking maybe Pokemon, but I'll have another look at the list.

    This sounds like a great way to experiment with randomised games, I'm very interested! Currently thinking maybe Pokemon, but I'll have another look at the list.

    3 votes
  6. Comment on Thor Bjørklund's ostehøvel, a popular cheese slicer which developed into an important Norwegian export, celebrates 100 this year in ~engineering

    HunterRobot
    Link Parent
    I've always used this wired design cheese slicer growing up in the Netherlands, but I have yet to encounter someone who's heard of them before. I like them more for the typically softer Dutch...

    I've always used this wired design cheese slicer growing up in the Netherlands, but I have yet to encounter someone who's heard of them before. I like them more for the typically softer Dutch cheeses, although the wires do break from time to time.
    http://osti.dk/en/products/

    3 votes