Author Topic: Simon blogs  (Read 132244 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Simon blogs
« on: October 18, 2015, 06:05:44 AM »
Hi,

some loose rambling.

Basic tenet in open source: People are interested in how other people solve problems. You share source code obviously, but you also love to talk about what it does, and are honest about its shortcomings. You can show proudness of your project, provided you're not hiding the problems.

I'm sure the IRC regulars have grown used to "Lix does it like this, the reasons for it are A, B, C, and the source is ugly." The ugly parts ("// 9 indentation levels is way too much") come to mind much more frequently than the nice parts. Good parts don't come to mind all the time; they're simple and to-the-point.

You value public bug reports, and you value source patches even higher. Likewise, users are happy to make bug reports. (Treat users as co-developers.)

Level design shares some qualities with such development, but is different.

People don't play a pack several times. Given the abundance of great and intriguing levels today, people play your pack once if you're lucky, and zero times if you're not. Useful software is run again and again, individual levels are not.

As a pack developer, you want your users to play thoroughly tested levels. There are several approaches. You can make a closed beta. You can release on Lemmini first, where you have fewer users. Or, what I'd do -- release normally, be honest that it's not playtested, and have good faith that people won't play all at once.

I believe I'm unconventional: I cherry-pick single levels. I wait until other people praise certain levels, or, as with Icho's pack, entire level packs. Only then I invest a serious amount of time. As a result, my level diet consists of heavily playtested levels. Maybe others are like me; probably many are to a lesser extent.

Even if you choose "release publicly, and hope that some will wait anyway", you probably don't want unspoilered solutions in public posts. Most authors like feedback in a spoiler tag, or as a replay file. This way, the solutions are public, but you have to explicitly want to see them. This is exactly what spoiler tags are designed for: They don't put the solution out of reach, but only out of accidental reach.

I don't care if people post unspoilered solutions publicly for my little handful of levels. With time limits and hidden traps, I'm happy that most contemporary level designers share my views. But I won't shape discussion culture for level designers. If many like the spoiler-tagging and don't want solutions bantered in logged IRC, then following suit is the way to go.

Bonus rambling, apropos diet: The guinea pig diet consists of eating lots and lots of cucumber. A guinea pig would do the same, and they are extremely cute and obviously extremely smart, because they eat cucumber, which is tasty. Aim for at least half a cucumber per day, maybe even one per day. And cut way back on sugar drinks. Magic will happen!



<SimonN> I have bought 2 cucumbers earlier today, 1 is already eaten. Love love love
<geoo> me too :D :D :D


-- Simon
« Last Edit: September 19, 2016, 06:10:31 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #1 on: January 04, 2016, 01:04:44 PM »
More loose rambling. Some of these ideas, I've presented them on IRC over the past months.

namida was sad on how bugs crept up in NL1. But finding many more bugs was expected: 2015 has been a super-active year for NL level development. 2015 was also a comparatively busy year for NL playing; I played at Ichotolot's without making my own levels. And more users find more bugs (obligatory link to Cathedral and the Bazaar).

namida likes NX as the abbreviation for NeoLemmix, presumably like Fx for Firefox, or because the X is cool. NX feels unnatural when you use PascalCase for the long name. The obvious abbreviation is exactly the capitalized letters.

If you get feedback, react to it in some way. Maybe you don't want to fix issues right away, then at least list them publicly. You won't get school grades for your hobby project, so don't try to hide flaws from other people. Icho is in his 5th or 6th iteration of backroute-fixing his large NL pack. This is splendid support. namida improved on tracking NL issues by encouraging separate topics for each, even though he'd like to fix only serious bugs right now. Also great.

Porting Lix's C++ code to D, I've noticed bugs in the physics from mere reading of code. Every program is full of bugs, this is also normal. You write software, you have bugs. (You make levels, you have backroutes.) I won't replicate C++ physics exactly, only wherever they feel important and easy-to-describe. geoo proposed to reorder some physics code anyway in the most recent C++ release 2015-09-02, and there are bugs to be fixed.

Example of why replicating physics would suck: The tumbler and flingploder are horrible to replicate exactly. The tumbler (= lix that is flung) had a bug in C++ where some terrain checks were off by 1 pixel, it got stuck inside 1-pixel-high horizontal lines. This is fixed, I hope, in D. Since the flingploder produces tumblers, it can't be ported accurately, unless I wanted to keep the other bug in. And the old exploder masks aren't symmetric. And the fling speed computation is crazily complicated. Yuck yuck yuck.

On the other hand, walker, faller, and ascender physics are ported with 100 % accuracy. They are much more a part of how the game feels. Also, sometimes we run into things we'd rather preserve as they are, come hell or high water:

    // Horrible function. Copied out of C++ Lix almost unaltered.
    // The problem is that this function's semantics have already been
    // debugged to no end, C++ Lix had lots of bugs with tumblers over
    // the years. We'd have to be really smart to make this simpler.

    final Collision collision()
    {
        ...


This got way too technical and low-level again. Rambling is best at high level.

The more features your game has, the harder and longer any porting attempt will be, and the more features can come out wrong/buggy/strange.

When you rewrite, which is crazy from the get-go, continue to support the old version until the new one is done. Seen from the outside, NL does this well. Lix, seen from inside, not so much I believe >_> But other people could tell better. I've had 2 large releases in the middle of 2015, while the D port has been underway since 2015-02. I haven't included Raymanni's sets.

Over the past 4 months, I lost 9 kilograms with the guinea pig diet! (= 20 pounds in archaic units) Happy happy happy.

-- Simon
« Last Edit: February 12, 2016, 02:40:23 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #2 on: January 17, 2016, 01:06:50 PM »
I was fun-browsing Wikipedia about the Euler-Mascheroni constant, read one of the linked papers, and found a lovely qoute inside: How Euler, Johann Bernoulli and Jacob Bernoulli stayed motivated and productive. (source info)
  • Always attack a special problem. If possible solve the special problem in a way that leads to a general method.
  • Read and digest every earlier attempt at a theory of the phenomenon in question.
  • Let a key problem solved be a father to a key problem posed. The new problem finds its place on the structure provided by the solution of the old; its solution in turn will provide further structure.
  • If two special problems solved seem cognate, try to unite them in a general scheme. To do so, set aside the differences, and try to build a structure on the common features.
  • Never rest content with an imperfect or incomplete argument. If you cannot complete and perfect it yourself, lay bare its flaws for others to see.
  • Never abandon a problem you have solved. There are always better ways. Keep searching for them, for they lead to a fuller understanding. While broadening, deepen and simplify.
-- Simon

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Open source != Level design
« Reply #3 on: January 17, 2016, 06:35:18 PM »
these sounds like the "Oblique strategies" I mentioned yesterday. Speaking of which; you can buy Oblique Strategies on places like ebay... except it costs 500$ :lem-shocked:??? because it's a very rare thing supposedly.

Can you recommend some similar books and things but at a reasonable price? Or maybe website that has these things?
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #4 on: January 18, 2016, 06:25:02 AM »
No, don't know any books on aphorisms to boost motivation. My bedtime literature tends to be technical books, flower math, and books on games. >_>

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #5 on: January 23, 2016, 07:16:16 AM »
Problem that has come up occasionally: New forum users send a private message, instead of asking publicly for help on tech or levels. Don't send a private message. Find/make a topic, and ask in public.

Tech: Ask publicly! Level editors, handling files, Python scripting, programming, ... if you try new technology, don't have fear of looking stupid. We're extremely happy that somebody is diving into something new and exciting for them. Other people might run into the same problem later. If you ask publicly, they benefit, too.

Level solutions: Ask publicly! You will get the answer publicly, in a spoiler tag. Both level authors and level players like to share their solutions with people who're ready to read the spoiler. Don't have fear of looking stupid! Authors are happy that somebody is showing interest in their work!

Split off the new postings to a fresh thread: Object-oriented design with Simon.

-- Simon
« Last Edit: January 27, 2016, 08:38:24 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #6 on: February 13, 2016, 04:20:51 AM »
Users never read manuals. [...] We cannot allow engineers to build products for an idealized rational user when real humans are irrational: we must design for the way users actually behave.
-- paradox of the active user

From 1998, the article is pretty old. But it even shuns "learning packages" along with manuals or anything that doesn't smell like getting things done.

I have wondered about Lix's tutorial pack. Every other option seemed worse. :> Large level packs are encouraged to start with flower levels, but they should not all shove full-blown tutorials down players' throats. Anyway, it's common with nonprofessional games to think endlessely about what new users would do, and then never watch new users. >_>

<SimonN> I have one person who has looked for the singleplayer browser's play-button at the bottom, not at the top
<SimonN> no way this is a technical bug, but it suggests further studies with new users, and maybe it's a design bug


-- Simon

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Open source != Level design
« Reply #7 on: February 13, 2016, 06:40:38 AM »
From 1998, the article is pretty old. But it even shuns "learning packages" along with manuals or anything that doesn't smell like getting things done.

(Disclaimer: haven't read the article yet)  Well, do remember we're designing a game in this case, not a tool.  I feel like there's a bit of a fundamental difference here since a tool is usually just a means to an end (so one can argue the less time user spent on learning about the tool, the more efficiently they actually reach their goal), but here the interaction with the game is the fundamental experience.  The tutorial levels could still count meaningfully as "getting things done" for a new player in this context, I think, as long as they still provide positive experience for new players to complete them.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #8 on: February 13, 2016, 01:09:45 PM »
Yeah, that's a good view. If you don't know Lemmings, maybe you expect light hand-holding. The tutorials start with the skills and end with advanced techniques and control features.

If you know Lemmings, the game should shout "I'm mostly like that" and keep all non-L1 features discoverable. That's why I introduced tooltips in the C++ version last year. They obscure the panel text but seem acceptable aside from that bug.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #9 on: February 15, 2016, 02:52:32 AM »
IchoTolot will take a course on C at our university in a few weeks.

Everybody loves ghost stories before going to bed, so let's spook Icho with Simon's quirks of the C language. Nothing is new, but everything is written down by me. :-]

<namida42> the function examples with passing arrays, i think i get it
<namida42> but the stuff about function pointers... tehfuqq
<SimonN> hehe
<SimonN> yeah, it's meant to be scary


-- Simon
« Last Edit: February 15, 2016, 07:35:09 AM by Simon »

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: Open source != Level design
« Reply #10 on: February 15, 2016, 03:18:37 PM »
Seems like I've got some reading to do over the next days ;)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Open source != Level design
« Reply #11 on: February 16, 2016, 12:43:49 AM »
Everybody loves ghost stories before going to bed, so let's spook Icho with Simon's quirks of the C language.

For "Examples of function pointer signatures", typedef can be used to slightly improve readability of those complex type declarations.  I suppose it's true that if C's syntax didn't have some elements (eg. pointer dereference, return type) on the left and others on the right (eg. parameter list), the syntax would probably be a little less convoluted and more naturally readable even for complex type declarations.

Regarding static:  it's still a quirk in that if you're not aware of the semantics, the syntax is definitely misleading, looking like the variable is initialized on each entry of the block rather than just once.  But it's not too strange if you keep in mind that when you use static in block scope, you are basically really trying to declare a global variable without actually making it visible anywhere else except within the block.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #12 on: June 07, 2016, 12:36:23 AM »
Bug reporting sucks, and how to fix it

Lovely rant!

Tolerating the flaws in the software because it’s better than filing bugs about them (time frame: 2 weeks to a lifetime)
[..]
Sometimes, the subtle conditions that lead to the exposure of a bug are so difficult to describe that you end up with bloated sentences in which you’re mostly trying to convey something visual or with a far too complex linguistic parse tree.
[...]
What you find yourself wanting to do is take a video of the problem occurring, but that would require subjecting yourself to the hell that is desktop video recording software for Linux.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #13 on: July 02, 2016, 06:33:31 PM »
Controlling your technology

What's a single, concise word for this phenomenon? It's a strong desire to control your technology, even if you never invoke any of your rights.

Example 1. I have a Kinesis computer keyboard. This keyboard beeps on every keydown. When I got the keyboard 3 years ago, the beep annoyed me. I looked through the manual until I found how to disable the beep. But I didn't disable it. From then on, I didn't care about the beep anymore. It was okay.

Example 2. When Proxima assigns during pause, he likes the game to unpause. He doesn't like how Lix advances only by 1 frame. Advancing by 1 frame may be enough feedback, but Proxima wants to play on. Last week, I put a user option into D Lix: You can choose whether the game unpauses on assignment, or advances by 1 frame only. Proxima knows this, and that's okay. He didn't rush to update the game at once.

I told my Kinesis story to a handful of programmers at the D conference in May, and their eyes lit up. This sounded so familiar to them. Proxima and I are in good company when we feel like this!

In open source, you have the right to fork software, but you never exercise your right. Forking is an emergency break for ships careening entirely in the wrong direction, when you can't save anything with diplomacy. Because you're allowed to fork, you risk less by getting used to that software.

The Kinesis beep and Proxima's unpausing are different from open-source forking. I found the beep annoying after buying the keyboard, and didn't know it beforehand. Proxima lost his unpausing because I implemented the one-step advancement. He was already involved with Lix.

It's strange. Dangle the carrot in front of me!

-- Simon
« Last Edit: July 02, 2016, 06:41:42 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #14 on: August 03, 2016, 06:36:59 PM »
I would like to criticize level repeats in Lemmings games. A level repeat is a level that copies another level's terrain verbatim, but allots different level constants and skills. I don't like repeats, but others like repeats. This is good thread material, I should make a fresh thread.

Level repeats violate the principle of low coupling. I find this easiest to explain with programming code. Maybe you can already guess how the corresponding level design argument would look like.



For horizontal alignment, do you ignore neighboring lines, and align each line by itself?

    x = 20;
    width = 10;

Or do align horizontally according to neighboring lines?

    x     = 20;
    width = 10;

The horizontal alignment brings a maintenance problem. What happens when we insert a third line, or modify the name of an existing variable?

    x     = 20;
    width = 10;
    height = 30;

If you require horizontal alignment, you have to edit 3 lines now instead of 1 line. You have created an unnecessary dependency between all 3 lines. This is Christmas light code: One line goes out, they all go out.

Christmas lights are lovely metaphor for many things, and I should compare more things to christmas lights.

When you work on this code with several people, and several people change unrelated lines, the non-aligned code will still merge automatically. The Christmas light code, however, will give merge conflicts, and needs manual resolution.

These whitespace issues are the least problematic types of coupling in code, but the easiest to reason about.

More severe is semantic coupling in code: Module X depends on module Y, and module Y depends on module X. When one changes, the other may have to change. Can you cut the dependency in one direction at least? Can you make a new module Z with the common functionality, then have X depend on Z only, and Y depend on Z only? This way, because Z will often be small and require fewer changes, you can change X or Y each to your heart's delight.

Keep coupling to a minimum.

-- Simon

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Open source != Level design
« Reply #15 on: August 03, 2016, 07:52:43 PM »
NeoLemmix previously (in fact, the current stable version still supports it, but experimental does not and there are no plans to restore this support) supported a feature where a level could define a unique skillset / stats, while referring to another level for the layout.

I'm pretty sure my packs are the only ones that ever actually used it, rather than just having hard copies of the levels. Since it's not widely used, and complicated the code, that's why it isn't being supported anymore. Instead, the editor now has a feature that serves much the same purpose - it loads a layout from another LVL file, without loading the stats from that level, into the currently loaded level. I don't know if this is being used either; at least one person has indicated that they prefer to (upon modifying the source level) simply Save As the level and re-do the different stats / etc.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #16 on: August 19, 2016, 09:18:47 AM »
Rant topics that I never got around to rant about

Repeats: Levels with the same terrain as another level. There is lots of fire here. I have several arguments flying around and never wrote them down.

<geoo> SimonNa: where's your rant topic about repeats? :P
<SimonNa> I wrote about one issue, the need to keep otherwise unrelated data in sync manually. That didn't ring with anyone
<geoo> I actually agree with most of your points, I just reject your conclusion


Drawing alongside writing: I am writing a post, and I want to explain something visual. Ideally, I'd sketch with my hand right inside the post. The cumbersome solution is to open a painting program, draw a picture, then upload or attach. Way too cumbersome, and fragile. The image should be data right in the code text, and I should be able to draw on the screen somehow. Technology sucks here.

Generate subforum from topic: I have a topic to split up, but I don't want to generate multiple topics on the existing board. I want these to belong together clearly. Instead of forum topics, I want directories. A directory contains either exactly one linear discussion (screw tree discussions, they suck, everybody replies wrong) or more directories.

Everybody should split and merge: When you have >= 100 posts, you can move and split and merge forum topics to your heart's delight. Like Stackoverflow. The forum software should version everything, which it doesn't right now.

Coins should be square: Then they don't roll under the sofa. And you don't need a 20-cent piece when there exists a 10-cent piece. You learn that from every site that teaches choosing poker chip denominations. There should be a 1-unit piece, this is the smallest unit that you can trade with cash. Then a 4-unit piece, a 16-unit piece, a 64-unit piece, and so on.

Functions compose from left to right: Instead of y = f(x), write y = xf. Then h(g(f(x))) becomes xfgh. Vectors are row-vectors by default, then vM makes sense for a matrix M. Matrix multiplication can stay like it is. Everything becomes a Unix pipe! Stuff gets processed in reading order!

You can treat a piece of data, x in the above examples, as a function from the one-point set into your data domain. Then everything is a function. Everything is a set, everything is an object, everything is a file, everything is a function.

-- Simon
« Last Edit: August 19, 2016, 09:55:43 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #17 on: August 19, 2016, 04:37:03 PM »
My favorite writer on the net is still cbloom.
  • Nowadays, the good things land on cbloom rambles: When I go to my editor and click on the "X" button, you don't pop up "this file has changed on disk do you want to reload it?". You just fucking close.
  • His classic rant that I've linked before, Fucking fuck the fucking web: Managers are hesitant to ever admit a mistake or cut a huge feature or redo work, because it reflects badly on them. That's terrible. It means that broken awful shit gets shipped just because they politically have to keep insisting "we did a great job".
But I've found Bob Nystrom's StuffWithStuff. This focuses purely on software design and language features. Some gems:
  • Higher-Order Macros in C++, let a macro write a list of code-generating macro calls.
  • The Impoliteness of Overriding Methods: To guarantee that overridden methods work well with your base class, you can mark the base method final, provide a second virtual method to override, and call the virtual method within the final method. This doesn't scale well with deeper inheritance. BETA was a niche language that made this pattern a core language feature: The base methods provided extension points within themselves, or were final.
  • What color is your function? This article made it to reddit/programming and hackernews last year. Languages lack abstractions over mixing sync and async function calls. If you don't want your application to wait on costly I/O, you must jump through too many hoops.

-- Simon
« Last Edit: August 19, 2016, 05:14:39 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Open source != Level design
« Reply #18 on: August 19, 2016, 05:50:47 PM »
Wasn't it Simon who once complained about bad topic titles?  I think it's time we change "open source != level design" to something more accurately reflecting the current trends of this thread. ;P

==============

I'll see if I have time to actually and carefully read through Bob's gems.  My gut reaction though is:  "really? advocating for C++ macros?  um..." (then again, it's possible the article is more just technical showoff of the crazy things you could do with macros in C++, not necessarily that you want to use them widely).  I totally get where he's coming from with the sync/async thing, but can't help but suspect that there may be an unintended side benefit of not having completely identical syntax, in that it makes one more aware of a function being async, which I suspect can be a good awareness to have when you need to reason over code.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Open source != Level design
« Reply #19 on: August 19, 2016, 10:51:04 PM »
Topic name: Yeah, hm.

It's a blog, except that it's on Lemmings Forums and not on its own site. The benefit is that interesting people will read it here. A more permanent solution depends on how I handle asdf-down.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs (was: Open source != Level design)
« Reply #20 on: August 30, 2016, 10:59:50 AM »
Board games with edge cases: I googled for stalemates in Shogi. Stalemates never happen in normal play, but they're a lovely edge case. Game rules should not have holes. The intuitive result is that the stalemated player loses, and I'm happy that it's the customary result, too.

I found a forum discussion on stalemates in Shogi on Little Golem, a turn-based server. The discussion produced the answers I had been looking for. But I was even more happy about this quote:

Anyone who sees the world in terms of clean logic has to be mystified and bewildered by many of the rules in popular board games. Especially ancient board games, like Go, that have suffered thousands of years of pollution from meddling humans... :-/ -- Darse Billings

Yes! When you have surprising edge cases in games, try to make rules as simple as possible while trying to fix them. Can you make the corner case part of the normal cases?

Empathy: Little Golem runs a daily game, Empathy, which is similar to our Quizmaster's Family Feud.
  • The master presents a single word, today's expression.
  • Every player private-messages the master with 10 different words. These 10 words should be in close association with today's expression, but players are free to send anything.
  • All answers are revealed. For every word you send in, you get 1 point per player who sent in that same word. Singulars and plurals of the same word count as a same word.
-- Simon
« Last Edit: August 30, 2016, 11:08:13 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs (was: Open source != Level design)
« Reply #21 on: August 30, 2016, 07:28:51 PM »
Anyone who sees the world in terms of clean logic has to be mystified and bewildered by many of the rules in popular board games. Especially ancient board games, like Go, that have suffered thousands of years of pollution from meddling humans... :-/ -- Darse Billings

Too bad I don't know the exact rules of Go to really understand this.  I was always under the impression that Go has simpler rules given the much lower number of different types of pieces with different move mechanics.  Chess even has its share of special moves like castling, pawn promotion and en passant etc. that are just part of the game, you can't blame them on edge cases.  Sounds like maybe Go is more prone to stalement-like conditions that require layers of special rules to deal with?

"Pollution from meddling humans" isn't necessarily a bad thing, or at least it can often be a necessary tradeoff.  One thing that came to mind are the mechanics we introduced to lix to make the miner more resilient to canceling.  From the rules perspective, those tweaks are not very clean at all, but it seems the "meddling" is called for based on issues encountered in the actual gameplay experience.  In many ways it's like patching a level to prevent backroutes:  it keeps the level more interesting by eliminating otherwise legal but trivial solutions, but often at the cost of complicating the level with unsightly traps and other such elements.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs (was: Open source != Level design)
« Reply #22 on: August 30, 2016, 08:05:56 PM »
mechanics we introduced to lix to make the miner more resilient to canceling.  From the rules perspective, those tweaks are not very clean at all, but it seems the "meddling" is called for based on issues encountered in the actual gameplay experience.

Yes, miner-anti-shock fixes single-cancelling: If you have a working miner, there are lems in her tunnel, you could have canceled the working miner by assigning miner to a backwards walker in the tunnel tip. We believe that miner-anti-shock is free of unwelcome side effects. So far, it turned out okay.

Miner-anti-shock has complicated the code. We have spent our one chance to introduce a complicated fix: If we ever have to fix another miner behavior, we must check the two complicated fixes for a ton of interactions, or find a complicated fix that covers both cases.

Quote
In many ways it's like patching a level to prevent backroutes:  it keeps the level more interesting by eliminating otherwise legal but trivial solutions, but often at the cost of complicating the level with unsightly traps and other such elements.

Yes, extra rules to patch holes are like unsightly traps and steel.

Extra game rules can be more severe, because unlike traps and steel, you must memorize them. Learning the game becomes more expensive. Some extra rules distract from beautiful pattern finding, because they introduce exceptions that feel arbitrary.

Quote
Too bad I don't know the exact rules of Go to really understand this.  I was always under the impression that Go has simpler rules given the much lower number of different types of pieces with different move mechanics.

Go can be scored in different ways: Area scoring and territory scoring.

Area scoring is simpler, more beginner-friendly, and almost every computer program uses it. You get 1 point for each living stone, and 1 point for each node of territory. If you play unnecessary moves within your own territory, you don't lose anything: You have 1 more living stone and 1 fewer territory.

To resolve difficult positions, near the end of the game, you can play them out at no cost. Normally, players agree what is alive and dead. Playing out everything is rare, that's to settle disagreements. You may resume play and capture every dead stone.

Territory scoring gives 1 point for each stone you have captured, and 1 point for each node of territory. If you now play in your own territory, you lose a point.

If both players agree what stones are dead, they are removed after play at no cost. But if the players don't agree, you can't capture for free, because playing in your territory costs 1 point. You would really like to declare stones dead that you could capture unconditionally.

This demands that the rules have an understanding of life and death -- the property of stones to be immune to capture against best play. Japanese territory rules demand that you copy the local position to a second board, analyze it there, and use the result to declare stones alive or dead on the first board.

Here's the next can of worms: What is local? The rules must define that. Local positions play out differently than their inclusion in global positions if there is a ko.

The alternative, requiring all dead stones to be captured on the original board, would make plays into the other guy's territory attractive: You play one stone, but it takes 4 moves to capture it, so this play is worth +3 for you. This is unwanted, and thus has lead to such complicated rules for agreement. The obvious solution would have been area scoring. On most positions, they produce the same winner anyway.

-- Simon
« Last Edit: August 30, 2016, 08:12:25 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs (was: Open source != Level design)
« Reply #23 on: September 15, 2016, 08:28:34 AM »
I was bored this morning and looked for bugs in the NL assignment.

I didn't want to program, because that's hard, and didn't want to work on math, because that's hard, and I didn't want to play or design levels, because that's abstrusely hard. Yet I needed intellectual stimulation, and assignment bugs were it. Level backrouting and bug hunting scratch the exact same itch -- finding assumptions that clash with the real world, and building a better mental model from black-box testing.

It's not super useful to debug the assignment: I fished for bugs in code that will be redesigned anyway within the next weeks. Maybe others read the bug reports and treat it as warnings. But the highly artificial ways to trigger a bug make the bug unlikely in the wild. I found Desync on same-frame RR & assignment purely for my personal enjoyment.

The point is not to boast Lix over NL. If I had that goal, I would go develop and showcase my own results, not stir action on the NL board.

Zendo should be similar, but it's not like level backrouting, rather like level solving. In Zendo, I'm trying to discover the designed rule, and fight my own assumptions. But even higher than the beautiful, I value the strange. In backrouting and bug hunting, I find places that still need a design.

-- Simon
« Last Edit: September 15, 2016, 08:49:30 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #24 on: September 17, 2016, 04:53:19 AM »
The level is the unit of culture

In singleplayer Lemmings, the level is the most important piece of culture. Everything else must support that, or it has a problem.

Packs and ranks are sets of levels, plus flowery extras: A meaningful order of levels, or cute rank names. Everybody is busy worrying about rank names, or sorting their levels. Icho worries even about a balanced distribution of graphic sets among the ranks.

That's okay, designers can worry about that, and strive for these extra goals. Still, I get a set of levels. I can enjoy the flowery extras, but aren't forced to pay attention to them.

Locked levels or hidden levels get in the way. They remove my random access of levels. It's a designed experience, sure, but doesn't allow the operations that I routinely invoke on a set of levels. I'm happy that the culture has moved away from locked levels.

Beware the bookkeeping

Menu screens, bookkeeping features, etc., all these are okay if they don't get in the way of level playing. Lemmini took notoriously long to restart a level, you had to go through 2 screens. If restart is at least moderately common, design out of existence these screens.

I tried to go too far with Lix, I tried to remove the end-of-game dialog altogether. Instead, the level went into a special kind of pause at end of game, didn't display any message, and didn't pop in any extra UI. The best approach is to pop in UI that's not modal, i.e., that doesn't take away control from the normal game UI. I have settled on keeping all game hotkeys alive in the end-of-game dialog, that's at least an intermediate step towards non-modality.

It's all about how to maximize time designing and playing levels, and to minimize bureaucracy outside of levels.

-- Simon
« Last Edit: September 21, 2016, 09:32:22 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #25 on: October 08, 2016, 09:26:40 AM »
Interesting voicechat with geoo yesterday.

Definition (topographic prominence). Let M be a manifold and f a real-valued continuous function on M. Let x be a point of M that is a local maximum, but not a global maximum. Consider the set of all paths w on M that start at x and end at any higher maximum of f than x. For each such path w, we're interested in the minimum value of f along it, min(w) := inf { f(y) : y is in the image of w }. We define the topographic prominence of x as
inf { f(x) - min(w) : w is a path from x to a higher summit }.

Equivalent definition on wikipedia: The topographic prominence of a summit x is the height of the summit at x above x's lowest encircling contour line that doesn't encircle a higher summit than x.

Example 1. Consider the height f of a mountain range on a one-dimensional planet surface M.



The highest peak is special, we don't consider it. Every other peak has a vertical arrow below it that describes its topographic prominence.

Example 2. Consider a little spike on Mount Everest, 10 meters away from the highest summit. Even though this spike is very high absolutely, it has low topographic prominence. There is a path from the spike to the summit that goes down just a little, across 10 meters, and up to the highest summit. The "down just a little" gives the spike low topographic prominence.

Trivia question. We drain the earth of all water, making the mountains under the ocean visible. Our two-dimensional manifold M is the surface of the drained earth. The function f on M measures the height of the mountains.

The highest summit is Mount Everest. Not considering Mount Everest because it's the global maximum, what are the two points on the drained earth with highest topographic prominence?

Solution (click to show/hide)

-- Simon
« Last Edit: October 10, 2016, 10:29:32 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #26 on: October 10, 2016, 11:17:18 PM »
The previous post left a trivia question about topographic prominence. I have added the solution to that post.

Simon rants about all the engines

Lemmini ate your files. Superlemmini (SL), because it's more super, creates files instead: SL generates lots of empty directories. Nepster is going to file an issue tomorrow. There is never a reason to create empty directories if you won't put anything inside. When you create a file in a nonexistant dir, create all parent directories along with the file.

NL and SL fade between screens, but don't load anything during this time. Bad, remove the fading. Fading is for music that runs alongside, not for the main content which should pop in ASAP. I wrote about this in a post above already.

Depends on the JVM.

NL has the disarmer that is full of corner cases and makes traps depend on the terrain. The disarmer is a boring key skill: Like a key for a door, it allows access to an area for you, and alters the landscape without flexibility in application. It's not an exciting swiss-army knife, like builders that can fulfil 3 objectives at once. Unlike most key skills such as the floater, the disarmer brings inconsistency and lots of arbitrary design decisions. The worst of all worlds.

The obvious cure is to cull the disarmer, then bomb or bash underneath the trap. Awesome disabled trap, and the idea fits 100 % into what the game is about: Alter the terrain to do things.

Spoiler (click to show/hide)

The NL editor doesn't fetch Lemmini styles and doesn't open Arty's levels. Arty is confused and "Nothing's working and I have to meet with my lab partner now" even when Nepster was there all the time for tech support. Good luck convincing Prince Jamie to develop for NL with this user experience.

Arty should put his levels under version control. Everybody should put their levels under version control! If it's creative work, version-control.

Here is my problem: teaching regular people to use version control is impossible. It just can’t be done in this universe. There is just no possible way a regular Joe can be convinced to start using Git. You know how I know? Because it is fucking near impossible to teach programmers to use it. -- Terminally Incoherent

Lix has too many skills and is intimidating. The imploder is boring, but seems necessary, it's exciting to sacrifice lems in a level design. Too many movement skills. Singleplayer shouldn't have runner, walker, or floater. Multiplayer needs the walker and jumper, but the only reason is "I tried both and this is more fun." I would still remove the runner and the floater, if people let me. :> mobius likes the runner, he likes the movement skills in general, but I don't.

Maybe the blocker should only block your own lems, and we remove the walker. Blocking other people's lems is annoying and not exciting. But we get an inconsistency: Blockers ignore enemy lems, batters bat enemy lems.

Walker skill assignments turn, or don't turn, depends on the previous activity. Bad! Skills should do similar things all the time! I want to cull the walker skill. Help me support this idea and barge forward into the sky of prisine design! L3's direct control sucks when your game isn't about skill pickups.

I haven't worked on D Lix in two weeks, I've been a lazy bum. The necessary work until the first networking tests is forseeable. Now that it's obvious how to do it, I don't need to do it, everybody could do it. >_>

Levels should be small. Or the interface should allow replay rebasing, where you insert skills into a running replay and modify the replay's tail accordingly, without cutting off the tail. Probably both, small levels and rebasing. Rebasing for replays is dangerous, the computer could easily try to be smarter than the user. And the UI that this needs. X-(

Nuke in singleplayer should not be part of the puzzle. The planned multiplayer concede-nuke closes exits in multiplayer when overtime runs out, then everybody explodes. Singleplayer nuke, therefore, should close exits, then everybody explodes. We can consider this to be a single rule for the nuke, because all singleplayer levels and selected multiplayer levels have no overtime.

Screw the 3rd-person-singular-s, it be obvious what the verb belong to, it introduce maintenance in part of the sentence that didn't change.

-- Simon
« Last Edit: October 11, 2016, 01:41:26 AM by Simon »

Offline NaOH

  • Posts: 191
    • View Profile
Re: Open source != Level design
« Reply #27 on: October 15, 2016, 06:39:01 PM »
Functions compose from left to right: Instead of y = f(x), write y = xf. Then h(g(f(x))) becomes xfgh. Vectors are row-vectors by default, then vM makes sense for a matrix M. Matrix multiplication can stay like it is. Everything becomes a Unix pipe! Stuff gets processed in reading order!

You can treat a piece of data, x in the above examples, as a function from the one-point set into your data domain. Then everything is a function. Everything is a set, everything is an object, everything is a file, everything is a function.
-- Simon

This has been bugging me since you posted it. If you put a transpose sign after everything, then you can solve a lot of problems, while not breaking any conventions:

  • All vectors are column vectors by default
  • Matrices now index correctly, with x and y not being flipped weirdly. A^T_{x,y} = X_{y,x}
  • Matrices operate on vectors in front of them, left-to-right. x^TA^T = (Ax)^T

Offline NaOH

  • Posts: 191
    • View Profile
Re: Simon blogs
« Reply #28 on: October 16, 2016, 02:29:41 AM »
About your solution:

Spoiler (click to show/hide)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #29 on: October 16, 2016, 02:46:16 AM »
About your solution:

How do you define protrusion of a peak? Height difference of the peak and the surrounding ocean floor? What's the exact height of the floor then?

Spoiler (click to show/hide)

-- Simon

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #30 on: October 16, 2016, 04:18:29 AM »
As I've mentioned before, walker is one of my favourite new skills, because of its multiple uses -- freeing a blocker, interrupting another skill use, turning a lix around -- and you don't know in advance which use will be part of the (intended) solution to a level. This can lead to very interesting resource management decisions.

Very few of my levels use runners, and on the ones that do, they could easily be replaced. Path of Wickedness uses a runner-jumper to clear a wide gap, but I could make the gap smaller instead.

However, at this point it's silly to talk of culling individual skills. The argument that seeing many unfamiliar buttons is intimidating is just as true with twelve as with fourteen. Lemmings had a nice friendly number, eight. But overall, the interesting puzzle potential of the extra skills in Lix vastly outweighs the initial intimidation factor.

DROD has a ton of different elements (roughly 90 in the latest game, which includes all elements from previous games). When the third game came out, I felt there were too many new elements at once and I couldn't get used to them, and soon architects were routinely incorporating the new elements into their puzzles and I felt left behind. I stopped playing DROD for years. What helped me get back into it was the main hold of the fourth game, Gunthro and the Epic Blunder, which is easier than the other main holds and deliberately restricts itself to a subset of elements, and Dan's Dungeon, a well-designed usermade hold that introduces the elements one at a time. Good introduction is much more important than number of elements. (This is the philosophy behind Entry Point, the ongoing project to make a similar introduction hold for all elements in the latest game.)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #31 on: October 16, 2016, 04:37:07 PM »
Hmm, thanks.

I'm okay with walkers turning, and I'm okay with walkers cancelling. My gripe comes from putting these two entirely orthogonal functions into the same skill.

But it's hard to take them out now: I scanned the community pack for walker usage, many levels have them. I haven't checked for how often they are mere panel decoration, or how often walkers occur in solutions. In any case, the walker is popular with lemforum levels.

The lemforum pack shall replace the skill tutorials, maybe we should improve the pack's walker introduction. The walker is special because it does two different things, and, as a second specialty, blockers can be assigned walker.

-- Simon

Offline NaOH

  • Posts: 191
    • View Profile
Re: Simon blogs
« Reply #32 on: October 16, 2016, 07:44:54 PM »
Spoiler (click to show/hide)

Very cool problem though, thanks!

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #33 on: October 25, 2016, 11:06:23 AM »
Most graphical user interfaces are (1. select object), (2. invoke method on object). Level editors are the best example.

Playing Lemmings is a glaring exception: We click the skill first, then the lemmings. When you have a dense bunch in a pit, it's important that someone bash to the right, we don't care what lem in particular bashes to the right. But is this good enough of a reason? At least it feels right -- geoo and I wanted click-skill-first in Clones when that had click-clone-first-then-skill. I hope it wasn't only out of habit.

The forum has become quiet this week. A nice change of pace. I should focus on real-life work and the occasional Lix work. Then everything will turn out okay in time.

-- Simon

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #34 on: October 25, 2016, 07:04:32 PM »
One important case to consider especially in multiplayer is to rapidly assign the same skill to multiple rodents.  I guess this actually can still work in the object-then-verb interaction model but requires the ability to select multiple objects first before selecting the verb, which IIRC is absent in Clones.  As a result, the Clones interaction model has a glaring shortcoming compared to the verb-then-object model.

I think you are correct to observe that the verb-then-object model typically can be "dangerous" in other contexts, since object selection immediately commits the specified verb, and thus relies on the object selection process being usually error-free on the part of the user--which it tends to be in the game as the rodents are often idempotent in many situations.

The level editor provides an interesting and very different use case to compare the two models.  For example, consider the classical case of selecting multiple level elements in the editor to move them as a single unit via drag-and-drop.  One can imagine how in a verb-first model, you could perhaps start by dragging one of the elements to the destination, and then while holding some hotkey, just click on the other elements one by one to apply the same movements to them.  You do actually get the same final outcome, and I have to say I'm not entirely sure how best to argue for the object-first model being better for this use case, beyond being widely used in other programs.  (One thing that does come to mind is, if the destination of the movement is too far away from the source, the verb-first method would require an extra scrolling of the screen, as you had to scroll back to the source location in order to apply the movement verb to the remaining elements.)

Perhaps the verb-first model is mostly habitual when it comes to the game, and that there might actually be a object-first model that do not have any shortcomings.  But habit is a mighty powerful thing, and many players have probably already been habituated from playing Lemmings.  It also helps that there are a large class of games where the interaction model is basically "verb only", because the "object selection" is implicitly fixed to the one single character that you have "full" control over.  So arguably the concept of specifying the verb first is not so foreign at all to many gamers.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #35 on: October 25, 2016, 08:01:41 PM »
One important case to consider especially in multiplayer is to rapidly assign the same skill to multiple rodents.

Just occurred to me that the inverse case of the hero lemming, where you want to assign a sequence of different skills to the same rodent, is one case where "object first" is a little more optimal, as you're not forced to re-click the same rodent multiple times for each skill of the assignment sequence.  Granted, this is probably somewhat less common in multiplayer, where you often still have to react to things happening elsewhere in the level.

This also brings up another point, that it's not strictly an either-or situation.  You can design exceptions to the interaction model to optimize for these various use cases where the predominant model may fall short.  For example, while I don't remember if this is specifically added per Simon's feedback, I believe Clones handled the spam-assignment case by implementing a special case of verb-first, where you hold down the hotkey for the skill, then click on multiple clones to assign that skill to each.  Conversely, some console versions of Lemmings 2 provided the ability to do a "sticky" selection on a lemming, during which clicking on a skill automatically assigns it to the selected lemming--essentially an object-first method special-cased for the hero lemming.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #36 on: October 26, 2016, 04:30:43 AM »
Quote
level editor
move them as a single unit via drag-and-drop
how best to argue for the object-first model

The movement target can be complex, e.g., place a cluster of pieces as a unit into a given gap, such that the cluster is centered within the gap. You don't know where any single block will end up before you have moved the entire cluster. Object-first allows for WYSIWYG here.

We can abstract over such clusters in the data model: Create group, add each piece of the cluster to this group, move group. This works in both the object-first or the verb-first world. Maybe this abstraction in the data model is better because it captures our intention: We wanted to move the group as a unit, with requirements for the unit rather than for loose pieces. The downside is that the data model becomes more complex. You're forced to define the map layout in a high-level language.

Quote
rapidly assign the same skill to multiple rodents

Good reason. You need more speed when you assign the same skill to n rodents, compared to the speed where 1 rodent accomplishes several skills, necessarily one after another.

Even for a single assignment, verb-first is fast. While I'm still aiming and clicking with the mouse on the rodent, I have already hit the skill hotkey with the other hand.

Quote
"sticky" selection on a lemming, during which clicking on a skill automatically assigns it to the selected lemming--essentially an object-first method special-cased for the hero lemming.

IMO, this points at a fixable shortcoming of the normal assignment. With directional select and priority inversion, I haven't seen the need for object-first. Long levels with lots of assignments to a hero maybe.

With object-first, but without directional select or priority inversion, you must select the object far ahead of time, before the rodent gets clustered. That should be unnecessary: Assignments happen at a single time, but its input must now span over a long time interval.

Quote
But habit is a mighty powerful thing

Yes! :lix-evil:

-- Simon
« Last Edit: October 26, 2016, 04:51:25 AM by Simon »

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Simon blogs
« Reply #37 on: October 26, 2016, 06:20:00 PM »
Here are a few more issues to consider when comparing verb-first and object-first:

1) During the first few seconds, clicking on some skill buttons currently does something, i.e. the game responds to player action. With object-first there are (apart from raising RR) nothing the player can act on until the first lemming spawns, even though skill buttons are displayed. This is bad.
So we would have to gray out the skill buttons whenever no lemming is selected. Certainly a possible work-around, but always clickable skill buttons look nicer to me.

2) Changing skills (especially via hotkeys) is much faster than homing in on a lemming and clicking on it (even for a single worker lemming). With verb-first I can simply the order of hitting the hotkey and clicking on the lemming coincides with the order in which my hands finish their work. On the other hand with object-first, my left hand would have to interrupt its action and hover over the hotkey until I manage to click on the desired lemming.
Note that in editors and other applications this is the other way around (at least most of the time). Objects are large and easily clickable, but then I want to apply multiple actions, or a complicated one, or one requiring precision, which usually takes more time.

3) Assume we have objects-first and assume the selected lemming wanders out of the screen. Should we automatically scroll to keep him inside the screen or should we stay at the current position? Automatically scrolling will be annoying, because it takes control away from the player (at least partially) regarding an action that used quite often (namely looking at other places or lemmings in the level). Not scrolling is bad as well, because then it becomes very easy to forget that a lemming is selected which may easily lead to mis-assignments of skills to that lemming.
Again there are work-arounds, e.g. not scrolling and disabling skill assignments to lemmings outside the screen or alternatively splitting the screen and keeping track of the selected lemming in one of the parts.

Of couse I might be heavily influenced by habit, but I feel that verb-first allows for a cleaner workflow.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #38 on: October 31, 2016, 04:44:42 AM »
Quote
1) During the first few seconds, clicking on some skill buttons currently does something
gray out the skill buttons whenever no lemming is selected. Certainly a possible work-around, but always clickable skill buttons look nicer to me.

Awesome domain-specific reason. Greyed-out buttons have a meaning already in the verb-first design: This skill won't be available throughout the entire level.



I spent the entire Sunday on a loose DVI cable.

My Linux machine decided to boot only into 640x480 text mode. Neither X nor the desktop environment wanted to start. I still had the command-line shell, so I checked all drivers, kernel messages, X log files, ..., and everything seemed perfect, only that the gfx card found no monitor. Edited several config files and rebooted 20 times. If I get 640x480 text mode, it can't be a loose cable, right?

When your monitor plugs into your graphics card via DVI, information flows in both directions:
The gfx card sends the image to the monitor. This is the obvious direction.
The gfx card reads from the monitor certain device info, e.g., max resolution.



DVI connectors come with two screws. I found these screws annoying for years, and only fixed one screw at best. But this allows your DVI cable to jiggle ever so slightly. When your DVI cable isn't 100 % perfectly plugged in, it can prevent the gfx card from reading the monitor values. Apparently, there is this emergency fallback that I landed in: The gfx card still sent 640x480 text mode to a monitor it doesn't even know.

Post on Debian User Forums with detailed symptoms. I love how the author wrote about his solution even though nobody else had experienced the error.



Everyday design

When the designer of USB dies, his coffin will be lowered into the grave... and be pulled back up, rotated half a turn, and lowered into the grave again. Then it'll be pulled up one more time, rotated back to its original position, and buried for good.

baddesigns.com, an old site with lovely everyday examples. When simple things have signs, especially homemade signs, it is usually a signal that they aren't well-designed.

-- Simon
« Last Edit: October 31, 2016, 06:16:41 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #39 on: October 31, 2016, 07:31:08 PM »
I do believe all of the more recent monitor cable types (eg. HDMI, DisplayPort, etc.) no longer have this particular problem of partial looseness.

I also wonder if there may be conflicting designs at work.  Could it be possible that the DVI cable plug's pin layout is designed so that the ones least likely to affect display output (such as reporting back the monitor's data) are placed in the positions more proned to partial looseness?  Whereas Linux decides in the potential absence of monitor, the best fallback is to text mode (since command line is king) and avoid graphics mode altogether?  Granted, perhaps it would have been more desirable anyway for the DVI pin design to actually be more fail-fast, so that almost any looseness would immediately affect the display output in very noticeable ways.

With regards to USB, they did finally fix the reversibility issue with USB-C connectors.  Of course, it'll take a long time before everything switches over to the new connector type, so the issue will still linger around for now.

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #40 on: November 01, 2016, 09:07:59 PM »
I like idea of having buttons greyed out for a lemming which cannot be assigned said skill or if the skill is at zero. Why not both? I'd prefer either having skills always greyed and only light up when selecting a lemming than be assigned such a skill or they are lit up always (except if zero) then dim if the moused over lemming is not able to be assigned.


UWXBill warns against over-tightening the screws on your monitor cables. They only need to be tightened enough that the pins can't be effected if the cord would get yanked on.
Tightening one side and not the other sounds like a bad idea too; one side could pull out further than the other making some pins loose contact or disrupting the connection of all of them.

https://www.youtube.com/user/uxwbill/videos

Last year I had a monitor cable go bad and the result was my whole screen took on a piss yellow color for a while, then the color went away but the screen was left with blurry lines. Eventually it stopped working altogether.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #41 on: November 03, 2016, 07:40:07 AM »
Hnn, I don't like to tighten screws either, very hard to unscrew. There will always be the next time when you must unscrew something again.

If your monitor shows a weird tint, that's a good pointer to a cable problem. 640x480 text mode was not a good pointer -- maybe I would have found the cable problem faster had the monitor not shown a picture at all.



This machine has an Intel i5-6600 quad-core at 3.3-3.9 GHz. The D compiler parallelizes well over the 4 cores, and I enjoy blazingly fast compilation for Lix's 22,000 lines of D. :lix-evil: Lix itself runs only single-core, even when it verifies replays without displaying any graphics. Still, I get a nice performance boost here over the 10-year-old laptop:

i510-year old laptop
Lix debug build3 sec18 sec
Lix release build17 sec     1 min 40 sec
Verify 600 replays     23 secover 2 min
= replays/second265

-- Simon
« Last Edit: November 03, 2016, 09:07:06 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #42 on: December 30, 2016, 07:02:43 PM »
I'm back at my university town, the apartment is cold as fuck. I raised heating and shields to maximum power, but it'll take a while. How to stay warm? Good old UI rant!

Still a favorite example of bad interface design: Python shell.

$ python
Python 3.5.2 (default, Nov  7 2016, 11:31:36)
[GCC 6.2.1 20160830] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
$


We know exactly that the user wishes to quit. It's unambiguous, there is no room for error. Every other shell in existence quits on quit. Thus, do we quit?

No, we tell the user to do it another way.

Lasse (reallife friend from university) compared speedrunning to playing the piano. The comparison is great, but it wasn't my first idea. I have compared speedrunning to a relationship. The moment you begin, all bugs turn into features.

-- Simon

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #43 on: December 31, 2016, 01:39:36 AM »
Still a favorite example of bad interface design: Python shell.

I'm surprised the introductory text doesn't end with "Type "help()", "copyright()", "credits()" or "license()" for more information." ;P  I suppose because all four are considered nouns and not verbs?

Lasse (reallife friend from university) compared speedrunning to playing the piano. The comparison is great, but it wasn't my first idea. I have compared speedrunning to a relationship. The moment you begin, all bugs turn into features.

Yeah, definitely like the relationship analogy more for this; the glitch-exploiting aspect doesn't really seem to have an analog in piano-playing. ;) The piano aspect I guess referring to practicing certain difficult parts over and over until it fully and flawlessly commits to muscle memory, which I guess in a relationship might be loosely like knowing the person so well that you can finish each other's sentences.

So maybe it's like a pianist having a relationship while also rehearsing for an upcoming concert? ;P

Offline NaOH

  • Posts: 191
    • View Profile
Re: Simon blogs
« Reply #44 on: December 31, 2016, 05:59:33 AM »
Lasse (reallife friend from university) compared speedrunning to playing the piano.

I was just thinking this, too! When playing a very long and complicated piece, it's a game of "try to get to the end without messing up too badly," lasting several minutes without the ability to save state. Feels just like playing IWBTG.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #45 on: February 24, 2017, 12:48:08 PM »
Thanks for the responses. I haven't rambled in a while.

Banana trick: Another Simon trick to lose weight. Carry a banana with you, everywhere. Have normal meals as planned. Whenever you get the urge to buy bratwurst, fast food, sweets, or anything else extra -- consider to eat the banana instead. Happily, you will recognize that you aren't as hungry as you thought you were. Often, you won't even eat the banana immediately. It becomes an element of reusable object-oriented diets.

The banana should be greener than brown. Thorsten (reallife friend from the math department) suggests that the banana should not be perfectly yellow, unlike the pure sun. If the banana is yellow, you'll want to eat it!

The banana trick is a variant of the guinea-pig diet. Recall: For the guinea-pig diet, you eat lots of cucumber with everything, because cucumber stuffs well. It tastes good in small amounts; by force of nature, you don't want to over-eat cucumber -- perfect. And cut back on sugary drinks. Occasionally exercise. Imagine you're a guinea pig, everything will follow trivially.

-- Simon
« Last Edit: February 24, 2017, 04:11:46 PM by Simon »

Offline Ramon

  • Posts: 118
    • View Profile
    • JRK Studios
Re: Simon blogs
« Reply #46 on: February 24, 2017, 08:59:11 PM »
It doesn't happen to be the Thorsten Hohage does it :3

I don't know why Simon needs to lose weight. A Simon without his weight in my opinion is not the Simon. But I see where you're coming from. I was also about to ask whether you'd come to Vienna again this year, since you said in 2 years... 2 years ago.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #47 on: February 25, 2017, 04:35:44 PM »
It doesn't happen to be the Thorsten Hohage does it :3

Someone else. :-)

Quote
Simon without his weight in my opinion is not the Simon.

I went from 95 kg in summer 2015 to under 80 kg in spring 2016, and right now I'm around 82-83 kg. The secret is routine. Building routine requires overcoming laziness; afterwards, it's easier.

The banana trick is still recent routing, I haven't used it for long yet, and I haven't compared against old strats.

Quote
I was also about to ask whether you'd come to Vienna again this year, since you said in 2 years... 2 years ago.

Still hoping to finish the PhD this year in late summer or fall. >_>

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #48 on: March 17, 2017, 07:44:44 AM »
I overrode Lemmingsforum's 78 % font with the 100 % font by custom client-side CSS, like I did 5 years ago when the youtube embeds annoyed me.

userContent.css (click to show/hide)

Arch updated fonts, now everything looks narrow. The forum font dropped under a personal threshold. Other sites are mostly OK, nonetheless wtf at sudden change in shipped fonts. I even rebooted the machine and cleared some caches to see whether I was insane. Maybe the change wasn't that harsh, but it was a change, and it triggered personal re-evaluation of the forum fonts. They seemed far too small.

A 78% default font size is ludicrous in the first place, that's 1990's web design. Modern style uses large, legible fonts, and prunes prunes prunes prunes prunes the writing instead of cramming small text. Prunes!

I'm admin now, but even though I found the 78 % value in LF's served CSSs, I kept that. This is partly carrot-dangling -- I wrote about carrots earlier in this thread: You're happy once you can turn off annoyances, even if you leave them on. And it feels partly like this ADmiral quote: The greatest masters know when to not execute their power. The best state leader is who could, but never needs to, punish citizens. Likewise, the best object-oriented designers know when object-oriententation is inappropriate.

6 hours later: Now Firefox shows the wider font again. I didn't revert the update, no idea what I missed earlier. Oh well, now the font is both wide and large. <3



-- Simon
« Last Edit: April 03, 2017, 09:27:31 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #49 on: March 17, 2017, 11:01:19 PM »
All I can say is that I didn't notice any recent changes, but I'm not using Simon's custom CSS nor Firefox (nor Linux).  I may well be mistaken but I thought this forum had just been using the SMF defaults?  Changing the forums fonts without even so much as a poll would be very bad form indeed.

If there's concern about user's inability to customize things like font sizes on browsers not supporting custom client-side CSS, perhaps there's a forum mod out there that can provide a similar feature?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #50 on: March 18, 2017, 08:06:17 AM »
Lemmingsforums has been the same style since 2015, yes. :D

What I think happened: Archlinux updated a font package, and something in some font cache mismatched. This is normal and happened before. Apparently, waiting a few hours invalidates whatever cache I missed.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #51 on: March 27, 2017, 03:04:44 PM »
Just

Standard situation: You are working within environment E and are trying to do X. You google or ask people. Person A tells you: "Just do Y." This "just" means many things at once:
  • E is horribly broken and overdesigned.
  • X is a natural problem to solve, but has no adequate natural solution within E.
  • Y is a terribly brittle, but standard workaround. Use it, then mindlessly learn it.
Why does A write "just"? If Y were that simple and natural, they could merely state Y. No, they forcefully dressed up Y as simple, for fear that we might not consider it simple otherwise. Does A want to hide from themself their own double standard?

This pattern is absurdly prevalent with any typesetting problem in Latex. It sucks, it sucks, it sucks. You google for a seemingly straightforward X, land on Latex stackexchange, and someone tells you "just include 2 packages and copy 10 lines of crap into your header." Bon appetit. You can never guess the pattern behind anything. Unless you want to do exactly Y, and not a minor variant of Y, you're terribly stuck.

Mathematicians shouldn't have to put up with this, but it's standard, live with it. You're already the golden hero if you can git commit -am, and don't have 100 commented-out lines in your header that someone-else copied from someone-else-2's bachelor thesis.

Simple stands out by itself.

The principle extends to anything, not only simplicity. When people insist that X has a property, it doesn't have that property at all. There was this meme image: Genders are a social construct, but if you're fat, then it's a genetic thing. I should go home and insert that here.

When I wrote my PhD thesis, I made sure that I spent at least as much time on the research as I spent on typesetting. -- Scott Meyers

The actual simplicity of software is not proportional to the lines of code, or the number of actions or command line arguments or anything like that. It's proprtional to the number of questions about that software on stack exchange, or the number of pages in the book about how to administer it. -- cbloom, on how git is not simple

-- Simon
« Last Edit: March 28, 2017, 05:48:53 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #52 on: March 27, 2017, 09:03:58 PM »
Person A tells you: "Just do Y."

I think part of the problem is that most people Googling for answers tend to just want something they can quickly copy-and-paste into their own work.  Often they don't actually want to take the time to really understand how it works or if it even really works correctly all the time.  So answers of unknown quality and lacking detailed explanations become the kind that gets passed around a lot, not necessarily because they are good as that they are expedient for all (typical) parties involved.

And honestly, with today's technologies, you would think one should be able to just write out an equation with a stylus or finger and have it automatically converted to the relevant representation in code, be it Latex or whatever else is used.  Even if the conversion isn't perfect I'd think that should save some time overall.  Granted, you can argue that it encourages people not to understand the code layer, which does make things more difficult when they do have to manually fix-up code from a suboptimal conversion.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #53 on: April 05, 2017, 01:36:39 PM »
Wurst cutting game

Two players. Each player gets a nice, tasty sausage of equal weight. The game is played in rounds until one player has reached a goal score of N points, agreed before the game.

Each round, cut off from your wurst a piece sized as big as you like, and submit that piece for scoring. Neither player can see how much the opponent submits before both pieces are submitted. If you submit more than the opponent, you score 1 point, the opponent scores 0. Submitted pieces are removed from the game, and the next round starts with your remaining wursts. That's all the rules.

You can discretify the game like this: Each wurst weighs 1,000 grams, you may only cut off integer amounts of grams. Guarantee somehow that the game ends in finite time.

For this discrete game, you could rewrite the multi-round strategy tree as a single, huge matrix, then use Nash's theorem to show that there is a Nash equilibrium: There's an optimal probability distribution of how much wurst you should cut. I've never worked out the details of this equilibrium; at least it seems managable for a target score of 2.

I don't watch TV, but friends told me this. Schlag den Raab is a German game show. The host played the Wurst cutting game against another celebrity. You needed 5 points to win. The celebrity had 3 points already. The next round, the celebrity submitted his entire remaining wurst.

-- Simon
« Last Edit: April 05, 2017, 01:47:24 PM by Simon »

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #54 on: April 05, 2017, 03:12:27 PM »
That reminds me a little of Gops, which I played with my friend Laura in high school.

How to play Gops: Take a normal pack of cards (no jokers), and separate the suits. One player has the clubs, the other the spades. Shuffle the diamonds and place them in a face-down pile. The hearts are left out.

Turn over the diamonds one by one. For each one, after it's been revealed, both players bid for it by placing one of their cards face down, then both show their bids. The player making the higher bid (Ace is low) takes that diamond, but the bid cards can't be reused (so you have to use all 13 cards once each). If both players make the same bid, the diamond goes to the winner of the next bidding round.

At the end, add up the value of the diamonds you've won (A = 1, 2 = 2 etc up to K = 13) and the player with the higher total wins.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #55 on: April 09, 2017, 02:51:05 AM »
I've played Gops! We discarded tied diamonds instead of accumulating them. Either rule works and makes for an excellent, simple game. Very straightforward, can't prune anything from the design, and playable with a standard deck of 52 cards. Seal of rodent quality.

There is a variant of Gops sold as a commercial gard game, it gives tied prizes to the highest bid that doesn't tie, which may well be the lowest. I don't like that rule, it's too volatile.

ALSA black magic

ALSA, the Linux sound system, is trial-and-error. Discord didn't want to pick up my default sound input device. Yet every other program worked perfectly. I'm hesitant to assume bugs in widespread software, but this was so lopsided, I gave this a 50-50 shot to be a Discord bug, and that my config was as good as it could be.

.asoundrc (click to show/hide)

This solution was obviously nowhere documented, I had to hunt around the web for random things to try. But there it is. I'm dumping it here partly to rage, partly to help future me and others.

Maybe Discord or Electron call ALSA somehow differently library than my remaining programs call ALSA? Who knows. Discord is closed-source bloatware that does too much. :lix-tongue: I still recommend the open-source Mumble for Lix. Mumble does one thing, and one thing well. But Arty would have been readily voicechattable only in Discord today, and the Jazz community uses Discord. Thus, happy that this works again.

Simon: The worst thing about Discord are the cutesy help pages
Simon: I want hard-ass debugging tips with pruned writing
Arty: Oh, Simon is still ranting about Discord. I guess I have to upload this video in the uncolored channel.
(= not suitable for American children for profanity? profannyty? <_<;;)

-- Simon
« Last Edit: April 09, 2017, 10:56:40 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #56 on: April 13, 2017, 05:32:02 AM »
Plans

Finish oriental tileset, merge physics changes from the git backburner. Release this before the now-unreleased physics changes turn 1 year old. <_<;;

Have a speedsolving competition, like Rubix hosted in 2014. The host prepares several puzzles, no contestant can see them in advance. Ideally, everybody sits in IRC. Time starts when the host shares the download link; time ends when you link to your zip file with proofs.

Maintain a normal sleeping pattern. Nepster leaves IRC every day at 0 German time, very consistent. Hats off. Night cap on. But how can you sleep easily when there might be exciting bugs discussed in IRC? :lix-scared:

Find answers to the deep problems in life. When you update your physics, who is responsible to keep level packs up-to-date? What happens if maintainers leave after some years? Our culture with replay coverage is still young, we haven't ever faced this. Probably someone must step up and become maintainer of the orphaned pack. Should they force themselves to look at all solutions?

Make the eggplant-sucuc dish with Icho again. Last time we had that, I was a fat Leekdiana Jones. I used Gimp to manipulate a photo and put mustaches and pipes on everybody. I think the photo is gone by now, it was hosted on asdfasdf. Maybe it's on the old laptop, but I doubt it.

-- Simon
« Last Edit: April 13, 2017, 05:38:56 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #57 on: April 17, 2017, 04:27:02 AM »
Youtube rage

I maintain videos on youtube, such as my 5-week-old Jazz Jackrabbit in 28:09 world record (youtube vid).

A happy viewer wrote a comment. A happy Simon replied. But my reply wouldn't show! I saw only the original comment, even hours after. This can't be related to browser cache.

I google for the problem. Search result: Youtube videos.

This is understandable. The problem is with youtube, therefore it will strike youtubers, therefore youtubers react how it feels natural for them: By creating a video. Eeeargh, sooooo. Today I'm going to show you how to view your comments on youtube. As you may or may not have seen, youtube doesn't show... eaahh, comments. Please like and subscribe. Have you checked your video settings? You will now be able to see your comments. If you like this video, please like and subscribe!

These have abysmal information density. And miserable hit rate. I skimmed through one or two of these -- every suggestion was either unrelated, or obvious and I've already checked for it before even googling. I did not subscribe.

Use the correct technology for discussing problems: Text! Maybe even an article with images. Good writing is random-access: You can skip over what you already know. Videos make that hard. If you think an un-postprocessed 2-minute screencast is best for your 2-paragraph, 10-second payload, you show technical incompetency. Good that it's sensable already from the form, not only from the content.

I found the answer only in later search results, IIRC in a reddit thread. Solution: My reply indeed got through, I can see it in a private-mode browser. It's a bug in the youtube page, not in the database. I like this, my data is OK.

Technical issue videos have one massive, good use: Record a bug live, then send the video to the developers. This is perfect. The screencast informs devs about a hundred things that you wouldn't have mentioned in a written bug report. Lix #159 happened when Flopsy plays Lix (youtube vid). I could see Flopsy use savestates and restart before the bug manifested, that was super helpful.

Similar phenomenon: Discord bot development. Bot writers use discord, therefore some require bug reports on discord, not on github. This is like one long forum thread with bugs burying other bugs, complete with off-topic banter.

-- Simon
« Last Edit: April 17, 2017, 04:49:44 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #58 on: April 17, 2017, 11:47:43 AM »
I guess technical issues videos might also be occasionally useful for providing exact step-by-step to a complete novice, when you can't be there either in-person or via remote assistance software to do it for them (eg. the dreaded phone call assistance :-\), but maybe you can email them a link to the video and hope they can follow it better than you trying to describe what to do purely verbally over the phone.  For the likes of us, video help are problematic for the reasons you listed, and tends to be more likely of a miss the more technical or non-obvious the problems/solutions are.  To be honest, to someone like me who never livestreamed anything or produced much on youtube in general, it almost seems like more work to make a video than just make a post about a solution, but I guess like you said, for seasoned youtubers, making videos must be more second-nature compared with old-fashioned text. :-\

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #59 on: April 25, 2017, 10:17:27 AM »
Yeah, videos for technical newbs are probably OK. I hope that my issue was not newb-level, but I'm never sure. >_>; The video results aren't completely bad, they had basic advice. I'm merely irritated how prominently this appears in search results.



Broccoli (inverted carrot)

I wrote about carrots earlier in this blog: A carrot is a feature that you want in a given program, maybe you push very hard for the feature. But once the feature is in, you don't use it, you're perfectly happy that you could access its power at any time. You believe that you'd be annoyed were the feature removed, even though maybe you wouldn't notice at all.

Carrots are orange, their interesting part is the bottom half. The top half is a boring bush.

Broccoli is green, and the interesting part of broccoli is the fractal twigs at the top. The bottom is a boring stem that tastes like wood. Children don't like broccoli, but it is excellent. It's the main ingredient in the awesome ham-broccoli-creme-fraiche sauce for noodles. Therefore:

A broccoli is a feature you haven't wished for, but once it's there, you clearly see its usefulness and grow accustomed to it. Were it removed, you'd notice its lack. Maybe you even push for it in related applications, but find it hard to justify. The feature looks too expensive for unclear benefit.

Performance is broccoli. Open source is broccoli. D templates are broccoli.

Staircase blueprints (a.k.a. shadows) before a builder assignment sound like broccoli, but I'm not sure. You can explain the idea to anybody on this forum in 5 seconds, and they realize why it's useful. It has minimal interaction with UI, will not break workflows. A good feature that I want in Lix, but not perfect broccoli. I've merely pushed it too far behind in the priority queue, that's the only broccoli potential of blueprints.

Re performance. I've changed a part of the Lix physics from garbage collection to reference counting. Now the automatic replay verifier is 3 % slower. :lix-suspicious: But that should become an entire post with design ideas and tradeoffs.

-- Simon
« Last Edit: April 25, 2017, 11:14:54 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #60 on: April 25, 2017, 06:39:46 PM »
The bottom is a boring stem that tastes like wood.

Perhaps you need better recipes. :P To be fair it does take a little bit of work to get around the woodiness.  You typically need to peel off a bit of the tough outer parts then slice it fairly thinly.  Then you can use it kind of like a carrot in say an Asian-style stir fry or something.

Anyway, broccoli isn't exactly my favorite vegetable regardless of which part.  It's for the most part not too terrible but typically I feel like in most cases you can substitute a better vegetable.  I especially hate eating it raw.

Performance is broccoli. Open source is broccoli. D templates are broccoli.

Not disputing the spirit of the blog post, but if broccoli is a feature, seems like we are stretching the word "feature" a bit to cover something like "performance" or even "open source".

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #61 on: April 27, 2017, 06:38:01 AM »
Yeah, "feature" is stretched by what I wrote. What's a better word? :lix-grin: I already like how "issue" matches the reporter's point of view, where "bug" carries a judgement by the dev. I still use "bug" because the word feels so appropriate.



Calendar

I wrote a PM on how I'll stream the Lix multiplayer on Saturday, April 29, 16:00 UTC. In the PM, I wrote "Saturday, April 30", which is rubbish. I had to send a second PM to fix the date.

I was in a meeting yesterday, they discussed a schedule printed on paper. The schedule designer got a date wrong, but the weekday correct. The meeting spent two minutes agreeing on the right date, fixing it on everybody's printouts.

This happens all around the globe and costs billions of dollars. The poor dinosaurs died so that we can waste energy on the same pattern every time: Relating to the day of the week is easy. Day of the months have no meaning. Months by themselves feel interesting.

The solution is to adopt hexadecimal, then number the days from the beginning of the year. // TODO: is year still a reasonable outermost cycle? Doesn't align with the days

One week doubleweek heek is 0x10 days. The last digit of the date is the day of the heek. You can have 5 or 6 free days in a heek, which is a higher ratio than 2/7. Fix this ratio by removing Easter and other UI sins. Dates go from 0x000 to 0x16E, the first two digits of a date feel month-like. The revolting French didn't get their metric calendar past the church, but this is better anyway. :>

This is not new, I'm sure others have had the exact same idea.



Good image viewers for the command line: They must be dependency-lightweight and cycle between files in the selected dir. Eye of Gnome was good back on Debian 6 when I used the Gnome desktop. Here, on Arch with the xfce4 desktop, I don't want to install half of Gnome merely for an image viewer. Image viewer is now feh. :lix-evil:

DESCRIPTION
     feh
is a mode-based image viewer.  It is especially aimed at command line
     users who need a fast image viewer without huge GUI dependencies, though
     it can also be started by (graphical) file managers to view an image.
:lix-grin:

-- Simon
« Last Edit: April 27, 2017, 09:42:54 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #62 on: April 27, 2017, 10:27:46 AM »
Hmm, so if the calendar entry is serious and I read it correctly, the heekly cycle abruptly resets at the end of the year going into a new year?  I guess I could live with that (well, as long as it translates to a built-in shortened work week and not an extra-long one).  It is kind of unfortunate that it currently takes approximately 365 days for the earth to revolve around the sun, and 365 only factorizes into 5 x 73, making some sort of irregularity kind of inevitable (even ignoring the need for leap days).

How does one screw up the date anyway nowadays, when even your phone probably has a calendar to check with? ;)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #63 on: April 27, 2017, 10:40:26 AM »
Come to think of it, the 7-day week basically comes out of the Bible.  Kind of makes me wonder how other calendar systems with no biblical influences do weeks.  I'd guess there are probably some (maybe even most?) that only have months with the occasional scattering of holidays here and there? :scared:

This really makes one appreciate the phrase "thank god it's Friday".  Without the week based on Genesis with a church-mandated day of rest, we could well have ended up with a lot less free days.  You can indeed thank (Judeo-Christian) god and religion for having the tradition of weekends.

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #64 on: April 27, 2017, 01:49:30 PM »
Good luck implementing this change Simon. Also, you can't just get rid of Easter; no Christian is going to accept that. ;P
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Simon blogs
« Reply #65 on: April 27, 2017, 04:30:47 PM »
Sorry, but I feel that a lot of the latest arguments are not quite thought through:

Also, you can't just get rid of Easter; no Christian is going to accept that. ;P
And what about Jews, Muslims, Hindi, Buddhists, ... who get useless work-free days, but have to work on their own religious fests? A much better suggestion is to remove all religious holidays, but give employees some more vacation days. This of course creates other problems of its own, but at least it respects all religions.

Come to think of it, the 7-day week basically comes out of the Bible.  Kind of makes me wonder how other calendar systems with no biblical influences do weeks. 
And as current dicture says that the bible are not the words of God directly, this should make you wonder how the 7-day week got to make its appearance in the bible in the first place... I believe the answer lies in the lunar cycle of 28 days. This is a very convenient time measure between single days and years, that can be checked almost every night, and where you can even measure ratios by the moon's appearance. So it makes sense to define weeks as quarters of the lunar cycle.

This really makes one appreciate the phrase "thank god it's Friday".  Without the week based on Genesis with a church-mandated day of rest, we could well have ended up with a lot less free days.  You can indeed thank (Judeo-Christian) god and religion for having the tradition of weekends.
I highly doubt your last sentence. If I remember correctly, in Germany we switched from the 6-day work-week to the 5-day one in the 1950s. While Germany was a lot more religious at that time than it is now, barely any change in legislature or every-day life was dictated by religious concerns. Actually I cannot even think of any religious reason for this change, especially as the bible seem to suggest working on 6 days a week. Therefore I conjecture that for any community, there is an inverse relationship between the average working hours and the technical/social development, regardless of any religious concerns.

The solution is to adopt hexadecimal, then number the days from the beginning of the year.

One week doubleweek heek is 0x10 days. The last digit of the date is the day of the heek. You can have 5 or 6 free days in a heek, which is a higher ratio than 2/7. Fix this ratio by removing Easter and other UI sins. Dates go from 0x000 to 0x16E, the first two digits of a date feel month-like. The revolting French didn't get their metric calendar past the church, but this is better anyway. :>
You completely failed to demonstrate why this change would solve any problem at all!
1) You mistakenly wrote "Saturday, April 30", but with your change you would have written "Saturday, 0x78", which is equally wrong. Sure, it is easier to see that the 8th day of the heek is not a Saturday, but what does that help? Did you intend to write "Octaday, 0x78" or perhaps "Saturday, 0x76"? And if you would just have written "0x78" without the day of the week, but meant "0x76", then noone would have realized that something is wrong here.
Note that you got the day of the week correctly, but messed up the date. So adding the day of the week (which is more or less independant of the date) adds a way to check the correctness, similar to checksums of bank accounts IDs.
2) Assume you want to compute the date of 20 days in the future, starting with May 21 or 0x8D. Do you really think that computing this is hex is less error-prone than in the current way? Sure, now you have to know how many days the month May has, but I would say this is pretty common knowledge ;). In any case the errors comes from the change of the month resp. heek.
3) Finally your choice of hex is completely arbitrary: Why not use the base 7 which ties nicely to the current week scheme? Then each day of the year has a 3-digit number, and we only have to take the last three weeks of every year as vacation, because we cannot express the date any more ;P

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #66 on: April 27, 2017, 05:18:16 PM »
you can't just get rid of Easter; no Christian is going to accept that. ;P

Christians can celebrate that, I don't mind. But mandatory work-free days are not good, especially when they're as irregular as Easter. I am arguing from the standpoint of simplicity, but Nepster's secular argument is equally important.

Quote
1) You mistakenly wrote "Saturday, April 30", but with your change you would have written "Saturday, 0x78", which is equally wrong. Sure, it is easier to see that the 8th day of the heek is not a Saturday, but what does that help? Did you intend to write "Octaday, 0x78" or perhaps "Saturday, 0x76"? And if you would just have written "0x78" without the day of the week, but meant "0x76", then noone would have realized that something is wrong here.
Note that you got the day of the week correctly, but messed up the date. So adding the day of the week (which is more or less independant of the date) adds a way to check the correctness, similar to checksums of bank accounts IDs.

I would have written 0x76. The last digit of the date carries all the emotional meaning that "Saturday" carries today. There is no need to annotate the 6 à la "day 6 of the heek, 0x76".

In hex calendar, the mistake would happen so rarely that we don't need the checksum anymore. The mistake happens today because the day of the month carries almost no feelings. I don't care whether it's the 29th or 30th, but I certainly care whether it's Saturday or Sunday. In the hex calendar, we imbue this care into the date.

This is really the heart of the argument. I want to design the error out of existence, not find ways to fix it after it happens.

Quote
2) Assume you want to compute the date of 20 days in the future, starting with May 21 or 0x8D. Do you really think that computing this is hex is less error-prone than in the current way? Sure, now you have to know how many days the month May has, but I would say this is pretty common knowledge ;). In any case the errors comes from the change of the month resp. heek.

0x8D + 0x14 = 0xA1. This is straightforward.

May 20 + 20 days = May 31 + 9 days = June 0 + 9 days = June 9. This requires an extra step without any gain. Even though everybody knows that May ends after 31 days, it's a mental dependency. Whenever you can remove the need to think during a computation, you have more time to focus on more interesting things.

Quote
3) Finally your choice of hex is completely arbitrary: Why not use the base 7 which ties nicely to the current week scheme? Then each day of the year has a 3-digit number, and we only have to take the last three weeks of every year as vacation, because we cannot express the date any more ;P

Hex has lots of powers of 2 in the base. You rarely want to divide by anything else. The usual counterargument I get here is "But what if you have one cake and 3 children?", to which the answer is "But what if you have one cake and 11 children? Why shouldn't the base be 1*2*3*...*19*20?"

Hex has an integral square root, 4, of the base 16. This makes it much easier to learn by heart the multiplication tables: In base 10, you must memorize everything. But in hex, you can learn the multiplication table for base 4, then split each hex digit into first and second nibblet, and do four multiplications in base 4. After you did this often enough, you'll see the emerging patterns. You'll grow accustomed to multiplication in base-16 in one go, and don't have to split into nibblets anymore.

Base 4 has both properties, too, but it's low. Base 64 is too high. Hex is the perfect base.

-- Simon
« Last Edit: April 27, 2017, 05:35:00 PM by Simon »

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Simon blogs
« Reply #67 on: April 27, 2017, 05:32:01 PM »
I would have written 0x76. The last digit of the date carries all the emotional meaning that "Saturday" carries today. There is no need to annotate the 6 à la "day 6 of the heek, 0x76".

In hex calendar, the mistake would happen so rarely that we don't need the checksum anymore. The mistake happens today because the day of the month carries almost no feelings. I don't care whether it's the 29th or 30th, but I certainly care whether it's Saturday or Sunday. In the hex calendar, we imbue this care into the date.
The question is: Is it more important that the person writing the date can check whether the date confirms with the intended day of the week, or is it more important the the audience can check this? As I don't have faith in general people to actually check whether the date they arrive at makes any sense at all, I very much like the ability to make a sensibility-check myself.

0x8D + 0x14 = 0xA1. This is straightforward.
Go out on the streets and ask the first passer-by to compute that...

Hex has lots of powers of 2 in the base. You rarely want to divide by anything else. [...]
Hex has an integral square root, 4, of the base 16. This makes it much easier to learn by heart the multiplication tables: [..]
When was the last time you wanted to divide or multiply the current date?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #68 on: April 27, 2017, 05:46:58 PM »
The question is: Is it more important that the person writing the date can check whether the date confirms with the intended day of the week, or is it more important the the audience can check this? As I don't have faith in general people to actually check whether the date they arrive at makes any sense at all, I very much like the ability to make a sensibility-check myself.

You propose that everybody deliver the checksum with the date -- not only when it's super important, but almost every time a date appears. Why do you like this only for dates? Are dates so much more important than anything else?

Would you like it for phone numbers, too? A culturally-encouraged hash whenever you write a reallife address or email address? Do you want the checksums for money, with the bank transferring lottery winnings saying "+1,000,000, one million euros, 11333311 in base-7"?

In the month-week system, you cannot get away from checksumming, and the system is complicated enough that it requires checksumming in the first place. Do you really see no complexity problem in the two misfitting bases running alongside each other, with the month base even changing between months, and the weeks not resetting between years?

Quote
Go out on the streets and ask the first passer-by to compute that...
When was the last time you wanted to divide or multiply the current date?

The assumption is that hex should be used not only for the calendar, but for everything, abolishing decimal. <_< You can certainly use decimal to count days from the beginning of the year, but then you'll have to fix the calendar again two years later when I push for hex-for-everything.

-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #69 on: April 27, 2017, 05:49:10 PM »
This is a very interesting topic. While hexadecimal is very useful, your average joe has never even heard of it, meaning changing it will be very difficult.

Also, I guess I misunderstood your point about Easter; my bad. The problem with adding more vacation days and removing mandatory holidays is that you could run into a situation where your department is so busy at Eastertime, taking Easter off isn't really an option. My solution is just give everyone their religious holidays off, but they don't have to take days off for religious holidays that they don't celebrate.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #70 on: April 27, 2017, 06:00:16 PM »
Hnn, thanks. :lix-grin:

Most likely, in 50 years, we'll still use the old calendar and teach decimal in elementary school.

I merely got bitten by the same problem with dates twice in succession. I still believe that counting from beginning of year, merging the principles behind weeks and months, reduces 90 % of mistakes. I may have presented the design slightly too provocatively; I've tried to match this topic's tone.

-- Simon

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Simon blogs
« Reply #71 on: April 27, 2017, 06:05:18 PM »
You propose that everybody deliver the checksum with the date -- not only when it's super important, but almost every time a date appears. Why do you like this only for dates? Are dates so much more important than anything else?

Would you like it for phone numbers, too? A culturally-encouraged hash whenever you write a reallife address or email address? Do you want the checksums for money, with the bank transferring lottery winnings saying "+1,000,000, one million euros, 11333311 in base-7"?

In the month-week system, you cannot get away from checksumming, and the system is complicated enough that it requires checksumming in the first place. Do you really see no complexity problem in the two misfitting bases running alongside each other, with the month base even changing between months, and the weeks not resetting between years?
Average Joe does mathy computations with dates, but rarely does computations with email addresses or lottery winnings. And if my supermarket cashier regularly gets the return money wrong, I doubt you can make the date system so easy, that our Average Joe reliably gets it right.
Of course, the current system is complex and could be easier. But I still prefer it with its checksum property over a slightly easier system without checksum.

The problem with adding more vacation days and removing mandatory holidays is that you could run into a situation where your department is so busy at Eastertime, taking Easter off isn't really an option. My solution is just give everyone their religious holidays off, but they don't have to take days off for religious holidays that they don't celebrate.
Only slightly exaggerating: Your system basically amounts to giving all people off the whole year and tell them to report when they want to work. That's basically the inverted version of my own suggestion.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #72 on: April 27, 2017, 08:11:59 PM »
This really makes one appreciate the phrase "thank god it's Friday".<snip>
I highly doubt your last sentence.<snip>

Sorry, I really should clarify.  In terms of religious influences I'm primarily thinking specifically of Sundays only.  I'm aware that how Saturdays are handled wrt work week differs a little from place to place and time to time.  As such maybe it is a bad choice to talk about TGIF which most definitely references a 2-day weekend starting on Saturday.

My main point is more about the possibility that there could've been no weekends at all.  Certainly from point of view of a pre-industrial, primarily agrarian society, it's not like you would stop feeding your chickens and do whatever daily tasks a farmer/rancher needs to do just because it happens to be a certain day of the week.

It is interesting though that you point out the 28-day lunar cycle could form an alternate basis for a 7-day week, I haven't considered that. 8-)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #73 on: May 30, 2017, 11:15:54 AM »
Root partition

Tips around the internet suggest about 20 GB for the root partition on a typical Linux home system. The root partition hosts the operating system, programs installed for all users, libraries, temporary files, ... almost anything except for your personal data.

20 GB is too little in 2017. Anything with multimedia is fat, even when it doesn't yet output files. A workable system is already 5 GB. The video codec suite ffmpeg together with CUDA and other dependencies easily eats 5 GB. Maybe the OS wants to store old packages for emergency downgrades, etc., another few GB. Latex with common packages is over 1 GB. Interested in programming projects in different languages? Several hundred MB for each environment with libraries and toolchain.

40 GB seems much more adequate. When you can fit a walrus on the root partition, it's adequately sized. I conjecture we need 80 GB in 2030, 160 GB in 2040, doubling every 10 years. When I'll be 85 years old, in 2070, let's check how accurate this guess was.



-- Simon
« Last Edit: May 30, 2017, 11:30:32 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #74 on: May 30, 2017, 06:37:37 PM »
Not much familiarity with Linux, but the fact that apparently installed programs and libraries has to go to the root partition too sounds like it could be tricky to keep it lean.

Out of curiosity, what are the advantages to separating personal data into its own partition?  It seems quite annoying being forced to make a choice in the allocation of storage for root versus non-root.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #75 on: June 02, 2017, 02:10:52 PM »
Main reason is slight ease to keep data when replacing the system. With SSDs, we don't have to put the system or the most interesting files on the fastest disk area anymore, because everything is fast.

Indeed, I have reinstalled Arch several times in the first week because I trashed the system. But the reason remains weak. Maybe I should have put everything on one partition for simplicity.



Games that I invented 5-10 years go

I have a scrap heap of tabletop game ideas, sometimes entire games with full rule text files. Here are some of these games that weren't entirely terrible.

A two-player strategic game with secret information. You have a map with territories. New military units spawn regularly in your home territory. There is only one type of unit, like in Risk. Units take several turns to move between adjacient territories. You announce that your units move from a territory, but don't announce where they move; instead you place them on a face-down card that names the target territory. A die goes on the card along with the units, this die counts time. You can time your attacks such that units from different territories arrive at a target territory at the same time. The game is feels very slow and bureaucratic.

A solitaire with 52 face-up cards dealt to 10 tableau piles spread downwards. You can move single cards to build downwards regardless of suit (e.g., place a frontmost 8 on a frontmost 9). You can also build upwards in suit. Upwards builds (e.g. 5-6-7-8 in spades, with the 5 buried deepest) can be moved as a unit (the example 5-6-7-8 in spades can be be built on the 4 of spades, or on a 6 of any suit). Free spaces can accept any single card or upwards built. You win if you assemble all four suits in four long upwards builds.

Cluedo (a.k.a. Clue) without a board or dice, only with the cards. It's perfectly possible to play with three suits of varying length from a standard deck. Every turn, you suspect a triplet or make an accusation. It feels like this must be a very smart game, but I'm sure there are better deduction games.

A multiplayer trick-taking card game with more than 4 suits, but it works in a pinch with 4 suits. Card ranks are ordered, like in most trick-taking games, but suits are ordered too. In the 1st, 3rd, 5th, ... trick, you must follow suit. If you can't follow suit, you may trump with the lowest-ordered suit. In the 2nd, 4th, 6th, ..., trick, you must follow rank. If you don't have a card of the given rank, you may trump with the lowest-ordered rank. With 3 or more players, this game is really chaotic and we didn't see much strategy in it. But it's not a good beer-and-pretzels game either because the rules are so unintuitive.

A game where every player puts some cards from his hand face-down onto one shared pile, then everybody guesses or bets on the entire pile's content. This should be interesting because everybody knows other things about the pile. But I didn't find a good ruleset around this idea, it felt like a lottery. In hindsight, if you can somehow react to other players' guesses by adjusting your guess, we get close to Liar's Dice, a good game.

-- Simon
« Last Edit: June 02, 2017, 03:38:10 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #76 on: June 15, 2017, 11:15:37 PM »

I've never took computer science classes, therefore I never had to write this lovely toy program. I did it for fun tonight. The math isn't hard, the programming isn't hard, but the images are as awesome and intriguing as ever.

<SimonN> the standard mandelbrot belongs to f(z) = z^2 + c, this weird insect-like set is f(z) = z^2.1 + c
<mobius`> that's flippin' crazy man
<SimonN> I wouldn't want this to crawl into my bed at night >_>


Also attached is a bonus image that I generated on the next day, from the Burning Ship.

-- Simon
« Last Edit: June 17, 2017, 12:07:58 AM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #77 on: June 18, 2017, 06:20:38 PM »
what is the equation for the last (new) one?
and why is it cutoff at the bottom or is this normal? Is that the limits of the program?
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #78 on: June 18, 2017, 06:28:39 PM »
Iterate f(z) = (|Re z| + i |Im z|)^2 + c.

Burning Ship fractal on Wikipedia. I plotted one of the small ships at the left side. Nice zoom anim on youtube.

My image is cut off because I zoomed in on a part. The entire fractal has a unique shape, but I like these towers even better.

-- Simon
« Last Edit: June 18, 2017, 09:50:18 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #79 on: June 19, 2017, 01:17:00 AM »

Games that I invented 5-10 years go

I have a scrap heap of tabletop game ideas, sometimes entire games with full rule text files. Here are some of these games that weren't entirely terrible.


I'd like to see more of those if you're willing to share. The clue one sounded like a good idea I want to try that out, and maybe the others too. I used to play lots of cards years ago but haven't for a long time. Recently I've started getting back into it.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #80 on: June 20, 2017, 04:28:36 AM »
More renderings of the Burning Ship. This is the most beautiful math I've ever done. :lix-blush:

The color scheme is discontinuous. I defined an arbitrary cutoff: How many iterations are still dark blue air, and how many iterations are the fiery-orange towers or sails? I chose 20 for the first and 23 for the second image. The more iterations a point takes to escape, the lighter the sails become.

(Re more games: I plowed through my collection, but no more sprung forward as worthwhile. Maybe one-card poker? Impose a linear order on all cards, i.e, order by suit whenever rank is equal, deal a card to each player. Start player posts a blind, then you have one street of betting. Highest card wins among the non-folders.)

Bonus image for Icho:
Armada to the left of the main fractal in 6240x1560.
Armada with transparent bg
Armada, only the background in blue

-- Simon
« Last Edit: August 08, 2017, 09:15:33 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #81 on: August 16, 2017, 06:39:12 AM »
So Long Sucker

Found a strange 4-player tabletop game, So Long Sucker, invented by John Nash and others. If the linked rules on Wikipedia aren't clear -- the game appears subtle on first read -- consider the rules PDF linked on Wikipedia, and read that too. I believe I have fully understood the rules.

The driving mechanic: On your turn, you must make a play, thereby diminishing your stash of chips. You lose if it's your turn and you're out of chips. But having the move can be very good also, because you can capture chips under special conditions. You must decide whose chips to remove from the game, and you must decide who gets the next turn.

Coalitions, or agreements to cooperate, are permitted, and may take any form. No penalty for failure to live up to an agreement.

I don't dare to suggest play-by-forum. :lix-evil: In the negotiation games, you make and break your alliances as you see fit. That can leave even seasoned gamers with a sour aftertaste for weeks. To compare, the Lemmings Mafia went well, nobody got sour from Mafia -- but the teams were determined by the game. You don't backstab in standard Mafia.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #82 on: September 17, 2017, 04:16:48 AM »
#ifdef __cplusplus extern "C" { #endif __attribute__((__deprecated__))

Allegro 5 on Arch lacks .xm/.mod/.it support: A5 doesen't support the newest version of the DUMB library that interprets the music files. What to do? Dive into the internals of both libaries and connect wires yourself.

First, we ask around what people know, or have already tried. I'm lucky: I'm not the first to have run into this problem, 1-2 others have investigated already. Soak up all wisdom of the ancients.

C and git are the building blocks of culture, and you can safely assume that everybody in the world knows them well. Whoever doesn't know either one won't be able to help you in this quest anyway. :lix-evil:

Build debugging versions of both libraries. Maybe script around the build systems if they need arcane flags. Finally, instead of opaque crashes, we get nice assertion failures.

We find a segfault in DUMB from null function pointer where A5 is expected to pass a function, but doesn't pass anything because the old DUMB version didn't have that pointer. What function should we pass? DUMB doesn't tell us because the docs are work-in-progress, therefore research and submit documentation yourself.

Realize that, by here, we already know more than whoever has tried this before. Even though we haven't contributed code to either library before, we're getting knowledge of the domain. If we get stuck, we can make educated decisions on what expert to ask.

Rage about C error reporting culture. Functions that produce data can often fail, and they return null pointer on failure. No exceptions, not even error codes. Want want want the program to blow up with a nice informative error message, but we don't get that in C land. The moment a function doesn't behave 100 % as expected, we must dive further into internals.

The biggest C hack is to return negative values to signal errors, and 0 or positive values as good results.
Zig gets that right: You have your function return exactly either a good result or an error, then the compiler checks that you handle that properly. Product types (structs) are popular, but most languages sorely lack sum types (= either-or-types).

Accept that you might get stuck halfway. Make the changes as readable as possible, preparing to publish them however far we get. Somebody else on the internet might be crazy enough to work on the same problem.

Edit: Pull request against A5!

-- Simon
« Last Edit: September 17, 2017, 10:23:32 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #83 on: September 17, 2017, 04:38:55 PM »
'Culture' is not your friend: ;)
https://www.youtube.com/watch?v=OdUCa5TrC9Q

thanks for liking our music so much :D I wasn't so sure about the titles I picked but I closed my eyes and named them for what I saw in my head when listening.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #84 on: September 22, 2017, 03:23:12 AM »
How often does ccexplore have to post on Lemmingsforums until all the displayed hamsters match the rotational energy of the earth?

The earth weighs 6 × 1024 kg, has a radius of 6.4 × 106 m and spins at 7.3 × 10−5 radians per second. The rotational energy of solid spheres is 0.2 × mass × radius2 × (angular speed)2. A gold hamster weighs 0.12 kg. Measure the rotational speed of ccxeplore's avatar yourself -- rotational speed speed in radians is 6.24 / (time for one revolution). Assume the hamster is very fat is a sphere of radius 0.07 m for distribution of mass.



Points A and B are 1 km apart. A river flows from A to B with constant speed. We travel between these points on a motorboat that has constant speed relative to the water. From A to B, we take 2 minutes riding with the current. From B to A, we take 4 minutes against the current. How long would we take to travel 1 km with this boat in a lake without any water current?

-- Simon
« Last Edit: September 22, 2017, 04:12:42 AM by Simon »

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #85 on: September 22, 2017, 07:03:08 PM »
Problem 1 is a trick question because you said "displayed hamsters" and I can't fit enough hamsters on the screen at once to get that high of a value. My computer would probably crash from trying to display too many at once.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #86 on: September 27, 2017, 12:23:28 PM »
Quote from: nin10doadict
Problem 1 is a trick question because you said "displayed hamsters"

Hehe, this sort of answer classifies you as a good mathematician or computer scientist: Edge cases matter. Also good backroute.

Design of a search feature: Hide your complexity

tl;dr: Use fibers for expensive work.

Lix 0.9 will have a level search. Type a query into a search box, and the game presents you a list of levels that match your query. I'm proud of this feature because I thought of it first: No other Lemmings engine has it, nobody has requested it before, but I'm already using it in my regular level-maintaining workflow. Good stuff. Good broccoli.

I want to be Google! What are the hallmarks of Google search?
  • One good search box, no distracting options.
  • Searches in everything you might want to. In our case, filenames and level titles.
  • While you're typing, you're already seeing first hits on the screen.
  • As you type more characters, earlier hits vanish as they become irrelevant.
  • Hits appear and vanish in realtime. Very handy: You can stop typing when you've narrowed down to 1 hit.
  • All this good stuff happens magically in the background, it doesn't freeze the app.
Now, I said that the search matches both filenames and level titles. The operating system can quickly produce a list of files in levels/, but to filter for level titles, I have to open each file and read the first couple lines. Opening a file is crucially slow: With 1,100 files in levels/, if I open them all in one loop, Lix freezes for a second -- despite my decent CPU, RAM, and SSD.

I could read and index all levels when the program loads, but that goes against the general laziness of the design. I load resources only when I need them; in exceptional cases, I load them when I'll probably need them. Also, if I loaded everything at start of program, Lix would ignore when you move files externally while Lix is still open. And I'd have to hard-wire indexing of new files that you generate with the editor... Blergh, this is asking for bugs from outdated caches. No no no. :lix-scared:

Instead, I index afresh every time I open the search dialog, but hide the work. Getting the tree of filenames from the operating system is fast, I do that immediately, eagerly. Then, Lix begins indexing the levels by opening the level files one after another, caching the level title. After a bunch of files, there comes the time to paint to the screen, read hardware input again, etc.; then we interrupt the caching and work with the half-done index. When the main loop hits the search dialog for the next time, again we work on opening some remaining files, improving the index. Eventually, 1 to 2 seconds into the dialog, the index is complete.

Even if this takes a couple seconds, we can already start typing into the search box, with good performance. We don't get 100 % perfect preview hits, but they will become better in the blink of an eye. On my fast machine, I don't even notice anything off, it looks instant. I'm sure it feels reasonably good on slower machines, too.

Most importantly, The game doesn't freeze during the indexing by definition. :lix-grin: We index while the game would wait on the next frame anyway, then we paint.

The general concept behind this is a fiber. It's not a full thread or process, but it's an expensive function in the main thread that you can pause and resume. You don't get the result ASAP, but you get it reasonably early, and you don't have to freeze your program meanwhile.

I have only this one fiber, and I even rolled my own code here. I simply let the fiber run until I would draw. This approach obviously doesn't generalize to having more fibers. If you want many fibers producing all sorts of good work for you, look into your language's standard library. :8():

-- Simon
« Last Edit: September 27, 2017, 01:41:48 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #87 on: September 29, 2017, 01:45:36 AM »
Quote from: nin10doadict
Problem 1 is a trick question because you said "displayed hamsters"

Hehe, this sort of answer classifies you as a good mathematician or computer scientist: Edge cases matter. Also good backroute.

Design of a search feature: Hide your complexity

tl;dr: Use fibers for expensive work.

Lix 0.9 will have a level search. Type a query into a search box, and the game presents you a list of levels that match your query. I'm proud of this feature because I thought of it first: No other Lemmings engine has it, nobody has requested it before, but I'm already using it in my regular level-maintaining workflow. Good stuff. Good broccoli.

I want to be Google! What are the hallmarks of Google search?
  • One good search box, no distracting options.
  • Searches in everything you might want to. In our case, filenames and level titles.
  • While you're typing, you're already seeing first hits on the screen.
  • As you type more characters, earlier hits vanish as they become irrelevant.
  • Hits appear and vanish in realtime. Very handy: You can stop typing when you've narrowed down to 1 hit.
  • All this good stuff happens magically in the background, it doesn't freeze the app.

in my experience since they started the "While you're typing, you're already seeing first hits on the screen." feature; it definitely does freeze/slow down. It actually kind of annoys me. I see why it's nice; but I don't think I've ever needed this. I always know what I need to or can type in. I can wait (what; 0.X seconds?) to type and press enter again and again a couple of times.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #88 on: September 29, 2017, 06:46:29 AM »
since they started the "While you're typing, you're already seeing first hits on the screen." feature; it definitely does freeze/slow down. It actually kind of annoys me.

I felt the same with the Google page 5 years ago, it slowed my 11-year-old laptop. I've resorted to typing in the browser's own bars, they call Google when you press Enter.

Searching from the browser bar is better anyway: We save one page load, the search engine's homepage.

Quote
I can wait (what; 0.X seconds?) to type and press enter again and again a couple of times.

I can understand this if you don't trust the computer during the fast operation, or the fast operation has an issue (like Google freezing, as you reported).

But in general, modern UI design suggests that we behave differently when a wait is 0.3 seconds than when it is 0.1 seconds. Even when we don't notice it, small waits break flow.



My pull request for tracked music in Allegro 5 on Linux got merged. The next A5 release won't crash anymore on module files. :lix-tongue: This lifts a roadblock on Lix music. Of course, it takes time before such a change sinks into culture. The library has to release, then distributions have to update their packages, then users have to update their system, ...

-- Simon
« Last Edit: September 29, 2017, 07:04:18 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #89 on: November 30, 2017, 07:16:26 AM »
Google's evil UI

Google search offers several tabs: [all] [images] [videos] [shopping] ...
But sometimes, it switches around: [all] [shopping] [images] [videos] ...

Because the first sequence is so common, lazy Simon is conditioned that Google's image search is on the second button from the left, and always clicks that second button without reading. Occasionally, that lands me on the shopping page. A nasty way to peddle stuff. :lix-glare:

Overhead around video game rules

We have the core game rules of Lix, of NeoLemmix, of Nepster's BoxPuzzle, ..., and all these core rules are different.

Then we write applications around these rules, and the nice applications load level files, offer undo and framestepping, save and load replays, maintain backwards compatibilty. The programs must be documented and bugfixed. All this is far more elaborate than the implementation of the core rules.

But it's the only way, sadly. If you merge any two of these programs, the result would be an unmaintainable mess. The rules and physics differ in enough details to warrant separate programs with separate algorithms.

Their ecosystems are complex enough to always have bugs. You stop fixing bugs only when there is no more interest in a program, after many years. And every couple of years, a new idea pops into existence, warranting another large ecosystem to be developed around it.

It's the circle of life. Can you feel the bloat tonight?

Small level packs

I agreed with mobius how the recent small level packs are refreshing, with around 10 levels per pack. Culture handles them like it handles large packs: Replays get posted, maintainer checks whether they're intended, and fixes backroutes.

My view is that packs and ranks are arbitrary in the first place: Ranks are sets of levels, and packs are sets of levels, or of ranks. Others' feelings go deeper with ranks. That's fine, from the standpoint of distribution, we'll arrive at the same result with either feeling.

git

I still want a children's cartoon with a catchy singalong song that teaches people how to use git. I'm sure it would be a massive hit. After all, these things exist for other basic things in life. :lix-unsure:

-- Simon

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #90 on: November 30, 2017, 09:10:16 AM »
Google search offers several tabs: [all] [images] [videos] [shopping] ...
But sometimes, it switches around: [all] [shopping] [images] [videos] ...

Because the first sequence is so common, lazy Simon is conditioned that Google's image search is on the second button from the left, and always clicks that second button without reading. Occasionally, that lands me on the shopping page. A nasty way to peddle stuff. :lix-glare:

Hmm, I guess it could also be A/B testing (Amazon e.g. does tons of these on its websites for obvious reasons), though with the first sequence being so common already it doesn't seem like ideal conditions for setting up such an experiment. 

Also, any chance it's just a bug that repros on certain specific conditions?

All that said, I do like the idea that it could be an intentional clickbaiting technique.  If that's the case then I expect the "video" position to be even more prone to the switcheroo, under the assumption that video searches may be more popular (granted, I have no data to back that up).

To be somewhat fair, I suspect Google has monetization affordances built into all 3 places anyway.  Shopping may be most obvious and direct, but then considering that the other areas may enjoy greater volume of views and clickthroughs, which actually winds up generating the most revenue may well defy expectations.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #91 on: December 01, 2017, 04:41:32 AM »
Also, any chance it's just a bug that repros on certain specific conditions?
All that said, I do like the idea that it could be an intentional clickbaiting technique.

I tested some more, and it seems to depend on the search term. The first slot is always [all], but the second slot depends on what Google thinks is most helpful.

If I search for "concrete" or "brick pillar", I get [images] in the 2nd slot. "music" gives [videos] in the 2nd slot, makes a lot of sense. "linux", "microsoft", "apple", I get [news] in the 2nd slot.

I guess that I never use Google for anything than the [all] and [images] tabs, and therefore only want to switch tabs when I want to image-search. But when I image-search, my search term is designed to give specific results on the [images] tab. Apparently, Google agrees that my image-searching terms are very often good image-searching terms. Only sometimes, it disagrees, and that leads to the switcheroo of the 1-2 posts above.

Undo

Quick-and-dirty undo by savestates is not that bad. It's fine if undo is moderately expensive.

I haven't written undo yet, even though the D Lix editor is approaching two years of age. I want the noble Command OO pattern, but that needs changes in the editor code everywhere. The result is that Lix has not even the quick-and-dirty undo.

I should advertize the issue tracker more and have others sort the issues by urgency.

-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #92 on: December 01, 2017, 02:02:30 PM »
Which is better through: code that may take a lot of resources (not very spacially efficient) that is fast, or slower code that makes the code as a whole look sloppier? It's one of those compromises a programmer must take.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #93 on: December 01, 2017, 04:44:40 PM »
I'd like a catchy sing along that teaches people proper garbage etiquette, such as how to use a compactor properly. We can't have everything we want, though...

Please don't throw chairs in the compactor, guys.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #94 on: December 02, 2017, 06:04:39 AM »
(not very spacially efficient) that is fast,
or slower code

The fast code, almost always.

On modern machines, CPU power is cheap, RAM is plentiful, but RAM access is slow. When the code is fast, you're often efficent enough in space already.

I bought 2 GB of RAM when the old laptop's 1 GB was not enough to build Lix anymore in late 2015. The reference D compiler never frees any memory until the entire project is built. That's fine, quick build times are paramount.

The tumbler activity is slow in Lix because it checks so many pixels during flight, hitting a ton of RAM. I have a rewrite on the backburner that is much faster, but doesn't preserve the exact physics. Hard decision whether/when to merge that.

I've never taken computer science classes, the typical examples there are probably merge sort versus quicksort? Merge sort is always N log(N), quicksort can be N^2 in worst case. But quicksort is often N log(N) on average and doens't have to allocate heap memory (the recursion goes on the stack, which is fast), therefore it's very good already.

-- Simon

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Simon blogs
« Reply #95 on: December 02, 2017, 12:11:55 PM »
I've never taken computer science classes, the typical examples there are probably merge sort versus quicksort? Merge sort is always N log(N), quicksort can be N^2 in worst case. But quicksort is often N log(N) on average and doens't have to allocate heap memory (the recursion goes on the stack, which is fast), therefore it's very good already.
Don't forget one more consideration: How does the algorithm perform in some of the most common cases in practical applications? In this example, this means to consider also the case: How does the algorithm perform for (almost) sorted lists?
For example a quicksort algorithm that always chooses the first (or last) element as a pivot element would be terrible, because that would mean a runtime of O(N^2) for already sorted lists, while ideally it would be close to O(N).

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #96 on: December 09, 2017, 05:07:46 AM »
Thanks for mentioning the pivot element choice. Since I always call standard libraries and have never written quicksort, I didn't know how difficult pivot element choice could be. Nice evening with googling.

The only sort I've ever hand-written was selection sort. That seemed necessary when I wanted to print a list of L++ players ordered by score after a networking game, in 2009. Back then, I didn't feel that standard libraries should have something for such a problem. :lix-tongue:

Lemmings Heaven

This was a website around 2007 to 2013 at lemmingsheaven.info, but the domain is dead nowadays. They focussed on level design with vanilla Lemmini. Lacktardo and Dodo built many levels and released on Lemmingsheaven, but I haven't seen them anywhere. Pieuw and Prince Jamie were active, too, and have registered on Lemmingsforums since.

The Lemmingsheaven work is important history: Icho got into level design by finding youtube videos of Pimolems and Dovelems. He values these packs so much that he has converted them entirely to NL and maintains them to this day.

Lemmingsheaven had an IRC channel that is also dead today. I joined a few times around 2010, but I forgot any names of active IRCers there. I merely remember this conversation:

Simon: Have you looked at Lemmingsforums?
Person: No. They don't seem to focus on level design as much as Lemmingsheaven does. Lemmingsforums focuses far more on fan-art.


Well, this is certainly not true anymore. Today, Lemmingsforums focuses on software development. :lix-evil:

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #97 on: January 08, 2018, 09:33:14 AM »
How to prevent bugs by design

When you write a Lemmings-like game and you need replay functionality, do not let assignment clicks issue both a replay action and affect the lemmings directly. Instead, issue only replay actions. Then, for the next physics update, fetch these new assignments from the replay and apply them. If you design like this, you will kill an entire class of replay-desyncing bugs outright. This is good design.

The replay collection on github is not only a check that I ship 100 % solvable levels. It has massive value as an integration test. When the replays pass and not fail, I know that the physics, the tile-loading code, the replay code, etc.,  all behave well together.

D has built-in coverage analysis via optional compiler switch, and I gave that a go: Lix's unittests and the replay verification together cover about 40 % of the entire codebase. Compared with professional software development, 40 % is lousy coverage, you would rather aim at 90 % to 100 %. But most of the uncovered code is editor, GUI, networking, and similar areas that were not written with unittesting in mind. Considering that I haven't written those areas with tests in mind at all, 40 % coverage is surprisingly high.

For the networking, I wrote a separate small command-line tool that connects to the server and can chat, which was useful during the network development. But this is not automated testing.

When you have a complex program that depends both on some abstract model and on outside dependencies like images or networking, don't let the model depend on the outside dependencies. Ideally, make the model self-contained, therefore easy to test, and merely feed the outside dependency into the model as a very last step. Example: In Lix, multiplayer replays can play from a replay file, you don't need networking to watch that. The replay can play back locally with all of the physics and different player colors. The networking would merely supply inputs for the physics during a match.

-- Simon

Offline Forestidia86

  • Posts: 723
  • inactive
    • View Profile
Re: Simon blogs
« Reply #98 on: January 08, 2018, 01:39:53 PM »
I'm not sure if that's off to what you've said but there is a possibility that a replay desynches but nevertheless passes. But that's more a "problem" for single replays than for the huge replay base you have since for the latter it's unlikely that most of them are such corner cases.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #99 on: January 08, 2018, 11:54:52 PM »
Yes, it's always possible that tests pass despite a bug. But that's in the nature of such tests.

To mitigate, we can make more tests, or more precise tests that examine more corner cases.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #100 on: January 22, 2018, 02:12:06 PM »
D class references may be null

D still is the langauge that produces the fewest Simon rants. Many common problems have great, short solutions in D. But, as with anything worthwhile, it has its corners to point and and rant. What everybody loves most!

Class objects live on the garbage-collected heap. The basics of OO of D are similar to OO in Java and work great. Your class variables are references (pointers, names). If you want polymorphism in any language, you need reference semantics, therefore all this is consistent, good design.

The initial value of any class reference is null. That is also a good choice.



class Color { /* ... */ }
class Porcupine {
    Color color;
// implicitly null
}

But D has no way to statically enforce that a reference cannot be null in a given context. You may assert a reference's non-null-ness, but that happens at runtime. I want nice check at compiletime. Also, it feels slightly dumb to assert for non-null because your operating system already asserts this for you on every usage: The OS will print "segmentation fault" and you run your debugger. :P

I like to write several short methods, and naturally, some of them take class arguments. I really don't want to assert that my parameters aren't null every time over and over.

Structs in D are value types, they have no such issues. If I define Point to be a struct with two ints, x and y, then Point will occupy as much memory as two ints would, and its default value is x = 0, y = 0, because 0 happens to be the default value for int. (Everything in D is default-initialized, which kills a massive class of bugs from C++. If you're absolutely sure that the default initialization kills your performance, you can explicitly write Point p = void;)

Problem statement: I wish for a class reference that is guaranteed to be non-null. Assigning null to this reference is a compile-time error, no matter how indirect the assignment was. It's an acceptable hack to have it null by default, as long as nobody can ever read/dereference it before it's overwritten with non-null for the first time.

Let's attempt a solution: I could wrap all my nullable D class references in a templated struct, such as the following, where C is the template parameter.

NotNull!C (click to show/hide)

Then I can ask for a NotNull!C everywhere I'd normally ask for a C. This has 3 downsides:
  • It's a nonstandard hack. This problem is really really common in OO and it's worth a language feature, or at least a library solution. The D standard library has Nullable!S for structs, but no NotNull!C for classes.
  • It doesn't statically prevent me from instantiating the thing with null, e.g., auto x = NotNull!C(null);. It still passes compilation and only asserts at runtime. The benefit over normal class references is that it explodes already when we create the null reference, not merely when we dereference later, as a normal segfault would.
  • It's an abstraction inversion. The non-nullable type is type with simpler behavior, I can call all methods without segfault. The nullable type is the more complex type, I can either call methods on it or must check first for non-nullness. My NotNull implements a simple type in terms of a more complex type. This is bad design.
Who does it better? In Zig, your types cannot be null, not even pointers, unless you add ?, the nullable type modifier. You may not use a nullable type freely unless you specify what happens in the null case. The language has special, short constructs for exactly this problem.

In general, Zig is designed around easy passing of error conditions because it avoids exceptions and garbage collection. % is another type modifier, it means "either your type or an error code".

C# gets a mention here for its null-conditional dereferencing operator ?. that calls a method only if the reference is not null. This cures the symptom of having many ugly null checks throughout the codebase, but the original issue still stands -- it's not a compile-time prevention of assigning null to class variables.

-- Simon
« Last Edit: January 22, 2018, 04:17:03 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #101 on: January 23, 2018, 08:32:36 AM »
I have to imagine that this is probably a relatively well-studied problem in computer science, and the literature probably has much more in-depth information on this topic.  Very generally speaking, static verifications by the compiler can often either mean many false positives (so you end up not really paying attention to them), or else only work in limited cases (so you still have much code where the compiler can't help you, especially the "hard" cases where it would've mattered the most).  I wonder if maybe this is difficult enough to do well (in one or both of the ways enumerated above) that for most languages (or even compiler writers, since it's probably possible to embed custom static asserts into existing language syntax like comments), it had been deemed not worth the effort?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #102 on: January 23, 2018, 01:26:32 PM »
I'm not well-versed in the academics of software engineering, but yeah, I assume there should be something. And I expect other modern languages (newer than both C++ or D) to have something in this direction.

C++ would have initializer list, that would be the obvious place to assign to the non-null-ref from a guaranteed-non-null-source like new expression, other non-null-ref, STL pointer with similar guarantee.

D has no initializer lists, but the D compiler analyzes program flow in constructors, it will already error if you assign a value to const/immutable field more than once. I believe the infrastructure for non-null is similar to such const-enforcing infrastructure.

I'd be okay if you could forcefully cast from nullable reference to non-null-reference. You can already cast away D's immutable and thereby assume responsibility for any undefined behavior. Memory-safe example: Allocate memory, do something complex in it, then assign that chunk to a pointer-to-immutable. This promises that the chunk will never change, not even through other references to the same chunk. If no mutable references to this chunk escape the scope, there will be no undefined behavior, everything is perfectly fine. For this hack, there is even a standard library function, assumeUnique, which merely wraps the cast to immutable under a descriptive name. I guess offering similar hacks for subverting null would be fine.

From the linked page:
The downside of using assumeUnique's convention-based usage is that at this time there is no formal checking of the correctness of the assumption; on the upside, the idiomatic use of assumeUnique is simple and rare enough to be tolerable.

I believe D offers only nullable references out of tradition, and it would be a massive breaking change. As I said before, the non-nullable class reference to a C should be C, whereas the nullable reference is the oddity that deserves the stigmatic name C? or Nullable!C or similar.

I would love to see such a massively breaking change, yes yes, I have no qualms smashing porcelain for a small extra gain. But I'm not everybody. >_>;; And when your language is used in the industry, this might well be infeasible.

-- Simon
« Last Edit: January 23, 2018, 02:12:11 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #103 on: February 12, 2018, 05:55:55 PM »
Lix 1v1

I want to play Lix 1v1 on highly swingy maps, where a few mistakes lose a game in one shot and then you immediately play the same map again. The games are so rapid that even though you care about winning, the actual outcome never sticks in mind for long afterwards.

geoo has always loved to play in this style, but anybody is welcome as a 1v1 opponent. I merely know that geoo shares this taste in maps. I've shied away from heavyweight multitasking maps like Chasing Upwards, but I miss that also.

Maybe the nuke-exploders should be instant for an even more rapid series of games?

Discord

Closed-source, invasive privacy policy, bloated, and slow. Use IRC for chat, public logs and a forum for archiving, and Mumble for voicechat. There is vector.im as an open-source Discord alternative but I haven't ever heard about it outside of very narrow search queries for Discord alternatives.

The massive downside of forums is that you must register for every single one separately. Sadly, github issues is not a good forum. :lix-evil:

Type popcorn

Rant from 2012, before Python got optional type annotations: Abscissa's Why I Hate Python (Or Any Dynamic Language, Really) -- A stab at type errors and missing-variable errors that a compiler would catch. The rant generated 74 comments, it's a phenomenal popcorn thread (= you can read it like you would watch an exciting action movie, munching popcorn along the way).

I still miss the non-null class refs in D. Good thing I occasionally re-read my own posts here, very instructive because the reasoning and implementation pitfalls aren't easy to keep in mind completely. >_>

-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #104 on: February 12, 2018, 07:01:18 PM »
I'd take Python Type Errors over C/C++ Segmentation faults ANY DAY. At least the Type Error tells you WHERE it happened for a quick and easy fix.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #105 on: February 19, 2018, 11:29:17 AM »
Python Type Errors over C/C++ Segmentation faults

In a good system, the segfaulting/type-mismatching code doesn't even compile in the first place. See earlier posts. :lix-glare:



Order

To compose a piece of email,

1. attach file.
2. Write body.
3. Write subject. If subject is hard to write, prune the body and it will become clearer.
4. Pull in the recipients and send.

To reply to email,

1. attach file.
2. Prune prune prune the other person's bloat.
3. Reply to pruned quotation.

The human mind is exceptionally good at detecting patterns, but has a terribly hard time formulating rules to explain patterns.

E.g., email composed in a different order than I presented. You type the prose that nobody cares about, then fail to attach the file because it's 100 % clear what you have to do and it's boring to do it. The human mind skips over this step because there is a glaring pattern here: We always attach the file that we made earlier.

E.g., copypasta of code, leading to long functions. The function has conceptual segments that aren't abstracted away. Even if it's clear to the writer because they know about the segments, it's not clear to the first-time reader; the first-time reader must assume that everything depends on everything. The cure here is to forcefully refactor anything that gets too long.

E.g., procrastination of dull work. If thesis is roughly finished and only debugging, writing introduction, proofreading etc. is to be done, the work is no fun. We don't want to do it. The pattern here is: Do random things until you have enough for the thesis, then add chrome and turn it in. The chrome is considered standard, but this time, there is no shortcut/catch-all solution, unlike with the earlier examples. Thus, procrastinate.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #106 on: February 19, 2018, 12:46:52 PM »
Mouse cable









-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #107 on: February 19, 2018, 03:24:54 PM »
Or alternatively, you could just get a wireless mouse. ;)
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #108 on: February 19, 2018, 04:04:02 PM »
I use the mouse only occasionally, every 10 minutes for a couple seconds. Wireless mice love to sleep whenever I'm not mousing and then take time (0.2 seconds or longer?) on the first input because they must reconnect. This means that most of my wireless mouse inputs have massive lag.

I switched back to cable mice to end this madness. Maybe wireless mice for over 100 euros do better, I haven't tried any of those.

-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #109 on: February 19, 2018, 07:04:55 PM »
That's fair. My problem is that I lost the USB connector for my wireless mouse, but since I use a laptop, wired mice are quite nice for me.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #110 on: February 19, 2018, 07:25:23 PM »
I've been using pic #3 for a long time now and haven't had any problems with the extra cord pushing; maybe it depends on type of cord or mouse. Also I wrap my cord around the legs of the keyboard. I guess that's more like a loop.

I used to use wireless mouse but occasionally I'd knock it off the table. Now if it falls the cord keeps it from hitting the floor and breaking. :D
« Last Edit: February 19, 2018, 07:56:56 PM by mobius »
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Ryemanni

  • Posts: 328
  • Indeed.
    • View Profile
Re: Simon blogs
« Reply #111 on: February 20, 2018, 09:19:06 AM »
Finally someone mentions this problem, I've been struggling with this forever. I used to work with pic 3, but the cable kept pushing my mouse forward, so I ended up with pic 4. It's the most acceptable solution for now, but still feels a bit hack-ish. ???

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #112 on: February 20, 2018, 12:38:18 PM »
A while back a couple of years ago I used to have the old mouse with the ball in it where you had to sort of give it a clean to get the gunk out of it so it moves a lot better. It actually worked quite well for myself but a lot of people or family members were complaining and wanting me to get a wireless mouse.

The tape idea with the loop seems to do the trick. At the moment I've got a wireless mouse where you have to change the batteries or recharge the batteries when the batteries run out.  The USB mouse is a good way to get round the battery issue.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #113 on: March 03, 2018, 04:13:59 PM »
Quote from: Raymanni
pic 4. It's the most acceptable solution for now, but still feels a bit hack-ish. ???

Hah, yeah. It's still a hack. It's merely the least-worst option that I found.



Shift + RMB = cmd here!

On Windows, in the file browser, you can right-click to create directory, create new file, etc., but a super-important command has always been missing: Open shell in this directory. The answer is to hold Shift while right-clicking. This gives many more options in the context menu, and one of them is to open a shell with that directory as the working directory.

<SimonN> optimally, you could right-click into any directory in the Windows file browser, and select a context menu option that opens a shell in this directory
<SimonN> it's probably possible to make this, but Windows doesn't offer it by default, which makes me sad
<Forestidia> SimonN, I've looked shortly through the web and there is a way to open cmd prompt in a folder: shift+right-click and then you have the option. Never thought of this possibility I have to admit.
<Forestidia> shift+right-click generally seems to give you more options like copy path if you have a file selected.
<kieranmillar> Wow, all these useful right-click options, hidden behind an unnecessary extra step
<kieranmillar> My life has been changed forever


Thanks for pulling this gem from the net! This is super useful to remote-troubleshoot people's problems -- omits the need to explain working directories, cd directory, and cd...



Type popcorn where it belongs

Around 5-10 posts earlier in here, I've ranted about D's lack of a non-null class reference. This bugged me enough to write my own post on the D forums.

That's a much better use of the fiery passion than a mere rant-post on Lemmings Forums. :lix-grin: It generated some nice discussion, with adequate popcorn for a language feature discussion. Even more importantly, I got a lot of answers from smart people, and some have attacked related issues with their own small libraries. I'll look into these solutions!

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #114 on: March 05, 2018, 01:21:28 PM »


Shoelace bowknot into firm knot

I tie my shoelaces with the standard bowknot that most people use, and that the image shows. This holds well for me. To open this bowknot, you pull either loose end, e.g., the yellow loose end. This will pull the yellow loop through the knot and thus the knot falls apart.

Now, the mystery: When pulling on the loose end to remove the loop, there is a 10 % chance that the knot will not easily open, but instead transform into a very tight knot that is painful to open. This happened to me on two days in succession, and that's last straw. I will search the web about this problem.

Surprisingly, it's hard to find. Lots of sites describe how to tie shoelaces, but opening them seems to be no issue for anyone. I assume that in those 10 % of cases, I had already tied the bowknot wrongly in the first place by mistake, which will then lead to the firm knot problem on opening much later.

<geoo> I encounter this issue more frequently than 10%. I believe what happens is that the loose end you pull on went through one of the loops
<geoo> or maybe both of them must have gone through the respective loops of the other color


-- Simon
« Last Edit: March 05, 2018, 02:04:12 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #115 on: March 05, 2018, 09:50:41 PM »
Interesting, I had long kinda sidestepped all this by basically never untying shoe knots:  either the shoe doesn't use laces to begin with, or I tied them just loose enough that I can take the shoe on and off w/o retying/untying.  Granted, I'm a bit of a couch potato, I imagine if I'm more athletic I probably can't get away with loose lacing quite as easily.

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #116 on: March 06, 2018, 01:22:05 AM »
I have encountered this shoelace problem too, but never really gave it much thought... I just kinda accepted it as one of those annoying facts of life, like how most people only have one hand that works well and the other just kinda... :-\
"Oh, one hand's all that works good? Ok! If you bought your body at Sears, you'd take it back and complain. 'Look, this hand throws the ball way out there, this one throws it way over there. Why?'" -Gallagher

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #117 on: March 11, 2018, 02:54:04 AM »
I believe geoo is correct: The bowknot transforms into a nasty knot because the pulled loose end is entangled with a loop. This tangle happened over the many hours during which we haven't paid any attention to the shoe. Sadly, if this theory is correct, we cannot fix the initial knotting in any way -- it would have been nice to learn another way to tie shoes and thus prevent the problem altogether.



Eiderdaus Patience

Around 2009 to 2013, I was interested in card solitaire a.k.a. patience games.

Several games have a tableau to untangle sequences of cards; a common type of tableau move is moving available cards to build descending sequences. These games then have a separate foundation area where cards eventually must be played in strict ascending sequence.

In early 2011, I invented my own game to ditch separate foundations; instead, every single card acts like a foundation pile. I toyed with the number of tableau columns and different allowed cards to fill empty columns, and I was very satisfied with the results: The game seems to have reasonable depth, and the rules are simple enough that I still know them perfectly after all these years.

I was lousy in naming; eventually the name Eiderdaus Patience stuck, but I'm not happy with this name.

Rules of Eiderdaus Patience (click to show/hide)
Remarks and Hints (click to show/hide)

-- Simon
« Last Edit: March 28, 2018, 09:36:59 AM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #118 on: March 11, 2018, 03:53:40 AM »


Shoelace bowknot into firm knot

I tie my shoelaces with the standard bowknot that most people use, and that the image shows. This holds well for me. To open this bowknot, you pull either loose end, e.g., the yellow loose end. This will pull the yellow loop through the knot and thus the knot falls apart.

Now, the mystery: When pulling on the loose end to remove the loop, there is a 10 % chance that the knot will not easily open, but instead transform into a very tight knot that is painful to open. This happened to me on two days in succession, and that's last straw. I will search the web about this problem.

Surprisingly, it's hard to find. Lots of sites describe how to tie shoelaces, but opening them seems to be no issue for anyone. I assume that in those 10 % of cases, I had already tied the bowknot wrongly in the first place by mistake, which will then lead to the firm knot problem on opening much later.

<geoo> I encounter this issue more frequently than 10%. I believe what happens is that the loose end you pull on went through one of the loops
<geoo> or maybe both of them must have gone through the respective loops of the other color


-- Simon

I tie different kind of knots at my job and encounter pretty much the exact same phenomenon I would say about 10-20% of the time. I encounter it with shoes too but not often. It only happens when I'm rushing.

Either it gets looped or you've simply crossed over another string you didn't think would cause an issue. Although a different theory I have is that;
-You turned the knot around. It seems like this shouldn't matter for a shoelace knot; yet it happens in the same way. It's definitely applicable to say; the slip knot. You can tie it (but don't pull tight yet), now turn around so you face the knot from the opposite side, if you try to tie it or pull it tight quickly chances are you'll mess it up because you're pulling the wrong string or in the wrong direction.

In any case, I've found the solution (works 100% of the time for me): patience. Never rush to tie or undo the knot. I've never had it happen when I'm taking my time and following each step correctly.

I always try to avoid tangles; it can take you an extra 5 minutes to tie it slower; but it can take you 20+ minutes to fix a tangle.

thanks for the cool knot website :thumbsup:
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #119 on: March 13, 2018, 01:10:30 AM »
(works 100% of the time for me): patience. Never rush to tie or undo the knot. I've never had it happen when I'm taking my time and following each step correctly.

I like this very much. This extends to general guidelines for proficiency. When you first learn a system, you toy around and make mistakes, sometimes even mistakes on purpose, to learn how the system reacts.

Then you focus on avoiding mistakes, even if it is expensive and takes a lot of time. Only over many repetitions, speed will come as a side effect while you focus on avoiding mistakes. You might not even notice the gradual improvements.





When you stream on twitch, you can set your streamed game to Lix. :lix-evil:

twitch only allows games registered in the Giantbomb wiki, and I've applied for a page there, it got approved. The Lix page on Giantbomb is still empty and I should fill it eventually.





Split off from this thread: Lemmings 3D block structure.

-- Simon
« Last Edit: March 21, 2018, 01:35:49 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #120 on: March 28, 2018, 10:13:55 AM »
Tank Chess

mobius likes when I write game rules, here's a game from my teenage. I invented this with a friend when I was 13 or 14 years old, and we played it between classes in school.

American readers: In German schools, you don't walk to teachers' classes; instead, your class always consists of the same players students in the same room and the various teachers walk to your class. With the reduced walking overhead, you can play little games during breaks.



Setup. Each player starts with 5 pieces: 4 tanks (with wheels and turrets) and 1 square block on their home row. Piece order is not fixed: Secretly choose an order for your own pieces, reveal when both players have chosen.

Objective. Kill the opponent's pieces. Usually, the next class starts before you've killed all. :lix-winktongue:

Play. Players alternate taking turns. On your turn, you must make exactly one of these moves:
  • Move one of your tanks forward by 1 space. The target space must be empty. "Forward" is always defined as the direction away from the wheels. At the start of the game, any forward move therefore gets you closer to the opponent.
  • Rotate one of your tanks by 90 degrees. This changes where "forward" is for that tank, and where its turrets point. (The turrets cannot rotate independently; only the entire tank can turn as a unit. It's legal to rotate tanks such that "forward" means "back towards the player"; you'd need two rotations in two different turns to get this orientation from the starting position.)
  • Shoot at an opponent's piece. You can only shoot at pieces that are in range of at least one of your tanks' turrets. Orthogonally-pointing turrents all have a range of 2 spaces, diagonally-pointing turrets have a range of only 1 space. When you shoot at opponent's pieces 2 spaces away, the intermediate space must be empty. If the piece shot is a tank, it's removed from the board. If the piece shot is the opponent's block, flip the block over, it says "1 life" on the back, and remove it only when it's later shot a second time.
  • Move your block by 1 space orthogonally. The target space must be either empty or be occupied by an opponent's piece. The block doesn't have an orientation, it can always move into all four directions. If the block moves onto an opponent's piece, that piece is removed from the board.
Hindsight.
  • I believe killing all 5 pieces takes too long, maybe killing 3 or 4 should be the victory condition.
  • Giving the block 2 lifes was excellent balancing rule. The block must move through dangerous territory to even threaten an opponent's piece. And when you successfully kill a piece with the block, the block will be in a lousy position despite its excellent maneuverability.
  • The backwards-shooting tank is weak. Maybe it should be replaced with a tank that shoots diagonally backwards. Maybe it should even get all 3 turrets that point backwards and diagonally-backwards.
  • I've extended this game to 7x7 and played it with my brother. I believe 7x7 is boring because it takes a long time to reach the opponent at all. With 7 pieces, you need 2 extra pieces to fill your home row. I remember we designed a vacuum-cleaner piece that sucked pieces from its side and spit it out at the other side. That piece was a gimmick, it was weak, and I'd cut it from the design immediately today.
  • When a block moves onto the opponent's block that has 2 lives, I believe the opponent's block should be killed for simplicity. I don't remember what rules we had for this 18 years ago. Blocks moving onto blocks won't comes up in practical play because the other block can escape easily.
-- Simon
« Last Edit: March 28, 2018, 11:55:31 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #121 on: March 29, 2018, 05:29:23 AM »
First Phobos PR

I've opened my first pull request against Phobos, the D standard library. 75 % of the change is the unittest. :lix-evil: That bug had caught me several times over the years, and the fix looked obvious to me.

I've always wanted to contribute to a large, prestigeful project, and I'm happy to present something as polished as I could make it. Now awaiting feedback, then possibly polishing the fix further.



UI design

I've noticed a pitfall when programmers present information in a user interface. Programmers instinctively focus on the abstract even when the user expects focus on the concrete. Example from a Discord bot that announces twitch streams:



Here's the slightly better way, from Lix:



The difference is that Lix emphasizes the concrete values with the strongest color, white. Insane Steve, he designed the level. 1/10, that's the goal. 4 lix saved, that's your best score.

This is reasonable. Often, you can already guess what the values mean without reading the abstract description. Any Way You Want, that's the level title even though I haven't printed "Level title:" next to that. Insane Steve, because it's a person's name, would probably be recognizable as the author even without annotation, but a short "By:" doesn't distract much. English readers habitually glance over such short words; they focus on the nouns and verbs.

By comparison, the Discord bot emphasizes the abstract categories with the strongest color, white. The stream is about a game, it happens that the game is Jazz 2. The stream has a title, by the way, the title is bla bla bla. With the white color, the bot draws your attention to the filler text -- the most uninteresting text in the entire announcement! You could even leave away "Stream title" entirely and the concrete title would keep enough information scent to keep it clear how that's the title.

-- Simon

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #122 on: March 30, 2018, 05:01:51 AM »
By the logic presented for giving the strongest color to the concrete topics, might I suggest making the level titles also white? (It doesn't really matter that much; the contrast in the Lix example is much more subtle than the contrast in the bot example, so it's not terribly distracting)

The bot example is REALLY badly designed. The least important information stands out with so much contrast that it actually makes the darker text feel a lot darker (and therefore harder to make out) than it would be by itself.

One key factor, however, is the length of the text involved. If the text portions were large and took a bit to thoroughly read, having the headings stand out would help the reader identify which part of the text is most likely relevant to the information they're looking for. However, because this example is so short, giving the sections bright, easily noticed headings actually makes it harder, rather than easier, to find the information you're looking for.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #123 on: April 02, 2018, 03:10:47 AM »
Title should be in white instead of light blue: I agree. It's merely not white due to tradition; it was the first label in that section that I implemented and I didn't print anything in white back then. :lix-ashamed:

The title appears twice in the dialog: Once in the list of levels on the left that I didn't screenshot, and once in the info section in the screenshot. Still, it's still very important and should be white. It's more important than author and own score. Only the save requirement is possibly more important.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #124 on: April 28, 2018, 12:43:33 PM »
I'm back at the guinea pig diet: Whenever you eat bread, e.g., with cheese or salami, always add lots of cucumber on top. Peppers on top of that are a welcome extra, but peppers aren't declared absoluely necessary by guinea pig diet experts, you're okay to omit them.

This works because you will naturally eat more cucumber and less of anything else. Preparing meals takes longer and you will not prepare excess food. In general, keep a rough total of how much you eat, and cut sugary drinks and sweet/salty snacks nearly entirely. Reserve such snacks for social gatherings.

Reasons for diet: Guinea pigs love cucumber, and I want to reach my lowest point of 78 kg again from 2016; I'm 1.92 m tall and 85 kg with many quills few muscles.

I made a bet with a friend to reach 78 kg by mid-November 2018. He's slightly taller than I am, but he's overweight at 147 kg. He wants to be at 135 kg by mid-November. That's a reasonable speed for both. The heavier you are, the easier it is to lose fat.



Gifs (click to show/hide)

-- Simon
« Last Edit: April 28, 2018, 01:06:15 PM by Simon »

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #125 on: April 29, 2018, 03:30:22 PM »
Is that Simon trying to tell us something maybe it might be his birthday, I think I see birthday material there behind the two guinea pigs.

My brothers getting right into the cooking and preparing meals, He's been getting into indian food. He's been trying keema the other day which he enjoyed, I'm not big myself on keema myself but I gave it a try yesterday and it was hot or spicy, I tend to get those two mixed up. He's been experimenting with different foods lately.

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #126 on: April 30, 2018, 10:05:08 PM »
sounds very healthy.
Fyi: in your latest picture with Icho and Proxima you didn't look the slightest bit overweight to me. (nor in any other picture)

my cat likes being combed like that; but doesn't often stay still long enough to get the whole body. :D
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #127 on: May 24, 2018, 04:59:07 PM »
Hah, no, I didn't have any birthdays recently. And yes, Indian food sounds nice, very spicy.

Wok

When I ever move out of this apartment, a long-term plan is to get a wok and learn to use that. Even today, most of my dishes work similar to wok dishes: Get vegetables, maybe get meat too, then cut everything to pieces. Fry everything together. Then make noodles/rice/couscous/... and serve both.

IchoTolot jokes that I say "When I ever move out of this apartment" far too often and I should finish on getting the thesis done for good. I believe I've already fixed all nasty bugs in the thesis.



The

Consider the following sentence from a logical point-of-view: The pope is male. Since first-order logic has no "the", only "for all" and "there exists", we have to agree on how to translate the sentence into first-order logic. Commonly accepted, and suggested by, e.g., Russell's On Denoting and by Frege, is:

1. There exists an X such that X is a pope. (At least one pope exists.)
2. For all X and Y, if both X and Y are popes, then X = Y. (At most one pope exists.)
3. For all X such that X is a pope, X is male.

Then, "The pope is male." is equivalent to (1 and 2 and 3).

What happens when "the" refers to a plural? Consider: The frogs are green. Which of these rewrites to first-order logic are equivalent to "The frogs are green."?

Rewrite A.
1. For all X, if X is a frog, then X is green.
(No claim of existence.)

Rewrite B.
1. For all X, if X is a frog, then X is green.
2. There exists an X such that X is a frog. (At least 1 frog exists.)

Rewrite C.
1. For all X, if X is a frog, then X is green.
2. There exist X and Y such that X is a frog, Y is a frog, and X ≠ Y. (At least 2 frogs exist.)

I have a strong preference (which I will keep secret temporarily, to not bias anybody) but I doubt there is a universally accepted rewrite. Forestidia disagrees with my choice here and has a strong background in philosophical logic. The classical examples on the internet don't help either, Russell's essay is purely about the singular "the".

-- Simon
« Last Edit: May 24, 2018, 05:13:54 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #128 on: May 24, 2018, 08:55:03 PM »
I feel like there is an implied context of some sort when you say "the frogs".  That is, from some previous communication (maybe a previous sentence, maybe something you said in IRC yesterday, whatever), a specific set of frogs had been specified, and then this sentence is referring to all members of that specific set.

Without the context I'd argue the sentence is ambiguous and poorly written.  It would be better to just say "Frogs are...", or perhaps "All frogs are..." or "Some frogs are..." depending on the exact semantics desired.

Indeed, the same can be argued for singular "the".  The interpretation given by Simon only works because in our world there is exactly one pope*.  If the sentence had been something like "The man is tall", it would not be implying at most one man exists.  It would be referring to a specific man via an implied context established in past communications.

*More precisely, exactly one person being the pope at any time.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #129 on: May 25, 2018, 11:05:56 AM »
While we're on this topic, what are your thoughts on the difference (if any) between

A dog is a mammal.

and

Dogs are mammals.

Is the usage of singular versus plural meaningful?

Offline Forestidia86

  • Posts: 723
  • inactive
    • View Profile
Re: Simon blogs
« Reply #130 on: May 26, 2018, 02:40:51 PM »
While we're on this topic, what are your thoughts on the difference (if any) between

A dog is a mammal.

and

Dogs are mammals.

Is the usage of singular versus plural meaningful?

My feeling says no concerning logical analysis.

I would formalize both as: For all x: if x is a dog then x is a mammal

Edit: I assumed for the first sentence that you want to make a general statement about dogs and not to say that some dog happens to be a mammal.
« Last Edit: May 26, 2018, 03:24:48 PM by Forestidia86 »

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #131 on: June 04, 2018, 05:41:02 AM »
Consider: The frogs are green. Which of these rewrites to first-order logic are equivalent to "The frogs are green."?

Rewrite A.
1. For all X, if X is a frog, then X is green.
(No claim of existence.)

Rewrite B.
1. For all X, if X is a frog, then X is green.
2. There exists an X such that X is a frog. (At least 1 frog exists.)

Rewrite C.
1. For all X, if X is a frog, then X is green.
2. There exist X and Y such that X is a frog, Y is a frog, and X ≠ Y. (At least 2 frogs exist.)

I have a strong preference (which I will keep secret temporarily, to not bias anybody) but I doubt there is a universally accepted rewrite. Forestidia disagrees with my choice here and has a strong background in philosophical logic. The classical examples on the internet don't help either, Russell's essay is purely about the singular "the".

-- Simon

I don't have any background in formal logic, but I will make an attempt at this, as I don't really have anything better to do right now and I find this to be an interesting thought exercise.

It seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset "the frogs."

"The frogs are green" can be true or false depending on what "the frogs" refers to. We need context to determine that. Suppose there is a box containing frogs. I point to it and say, "The frogs are green." This extra context removes the ambiguity as to which frogs we are referring to - now it's the frogs that are in the hypothetical box, rather than an unspecified group subset of frogs. But now we must check to see if the statement is actually correct. It is possible for all the frogs in the box to be green[1][2]. However, it is also possible that at least one of the frogs in the box is NOT green[3][4]. For this reason, I can create a set of frogs for which the statement "The frogs are green" is false.

This is where I can no longer really work with the given information without more background knowledge. I am unsure of the exact meaning of "For all X, if X is a frog, then X is green." Is this statement defining the object selection, to state that all the frogs under consideration are green (i.e. if an object is a frog, and it is not green, it is not X)? Or is it a statement that, for any given object X, if X is a frog, it is green (i.e. stating that all frogs are green)?

Based on these two interpretations, I'd say the following:

If "For all X, if X is a frog, then X is green" is equivalent to the statement "If an object is a frog, and it is not green, it is not X" then I'd say that Rewrite C is best, simply because it clarifies that there is more than one frog, which is implied in the plain language "The frogs are green." Rewrite B also allows for the possibility that there is one frog, which is NOT a possibility implied by the plain language, and Rewrite A does not specify that any frogs exist.

If "For all X, if X is a frog, then X is green" is equivalent to the statement "All frogs are green," then, due to the pictures shown in [3] and [4], then Rewrites A, B, and C are all demonstrably false.

---
Regardless of the proper formalization of "The frogs are green," if we make the assumption that the statement is true, then the following items must be accounted for to avoid anything being lost in translation:

1) "The frogs" refers to at least 2 frogs, all of which are green.
2) The statement becomes false if "the frogs" is changed to "all frogs."
3) It is not possible to fully ascertain what frogs are being referred to by "the frogs" without additional context.

Offline Forestidia86

  • Posts: 723
  • inactive
    • View Profile
Re: Simon blogs
« Reply #132 on: June 04, 2018, 08:43:27 AM »
It seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset "the frogs."

"The frogs are green" can be true or false depending on what "the frogs" refers to. We need context to determine that. Suppose there is a box containing frogs. I point to it and say, "The frogs are green." This extra context removes the ambiguity as to which frogs we are referring to - now it's the frogs that are in the hypothetical box, rather than an unspecified group subset of frogs. But now we must check to see if the statement is actually correct. It is possible for all the frogs in the box to be green[1][2]. However, it is also possible that at least one of the frogs in the box is NOT green[3][4]. For this reason, I can create a set of frogs for which the statement "The frogs are green" is false.

That's a very good point. Yeah, the statement is dangling without context. So formalization is probably not complete without catching somehow the context or that there is further context.

This is where I can no longer really work with the given information without more background knowledge. I am unsure of the exact meaning of "For all X, if X is a frog, then X is green." Is this statement defining the object selection, to state that all the frogs under consideration are green (i.e. if an object is a frog, and it is not green, it is not X)? Or is it a statement that, for any given object X, if X is a frog, it is green (i.e. stating that all frogs are green)?

I'm not fully sure if I can pinpoint what you say there.

Generally "For all X, if X is a frog, then X is green." is an universal statement and is meant to formalize "All frogs are green.". One remark: This statement is equivalent to "For all x it is not the case that x is a frog and x is not green." Another remark: "For all X, if X is a frog, then X is green." doesn't imply in modern formal logic that there are frogs.

One point is that if one talks about all objects still the question remains for truth or falsehood what is the set of objects and how are expression like "frogs" and "green" defined or what objects are assigned to them.

In formal logics you have model-theoretic semantics, where a model has a set of objects as a domain and an interpretion function that e.g. assigns subsets of the domain to the one-place predicates (like "frogs" and "green"). Depending on the model the sentence is true or false in that model unless it's a logical truth, which the given sentence is not.

But in general if you formalize a sentence of natural language one has the model that fits to our understanding of the world in the back of their minds I would say since that's the background people are formulating these sentences.

I think generally formalization mainly tries to catch the logical structure of the sentence, is on the syntactical side and most of such sentences will be logically indetermined.
« Last Edit: June 04, 2018, 09:26:00 AM by Forestidia86 »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #133 on: June 06, 2018, 10:14:39 AM »
Thanks everybody for the exciting responses!

Quote from: ccx
Without the context I'd argue the sentence is ambiguous and poorly written.
Quote from: Dullstar
It seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset
Quote from: Forestidia
Yeah, the statement is dangling without context.

I have to agree. This problem draws more attention than what I wanted to discuss.

For my original interest, better would have been: I put a box in front of us all, point to the box, and say: The frogs in the box are green. Is this sentence then equivalent to All frogs in the box are green. or is it only equivalent once we, in addition, establish that there are at least 1 or 2 frogs in the box?

Quote
1) "The frogs" refers to at least 2 frogs, all of which are green.

This answers my original question: You prefer that, as long as the set is determined, that "The frogs in that set are green." require at least 2 frogs in the set to have any chance to be true.

Forestidia prefers also at least 2 frogs if the sentence comes from natural language. If it's clear that the sentence comes from a logical discussion, 1 frog may be enough for her, but never 0 frogs.

My preference is that "The frogs in the set are green." is equivalent to "All frogs in the set are green." Still, I would ask for clarification if this arose in natural language and the set turns out to contain 0 frogs.

Quote
A dog is a mammal.
Dogs are mammals.

My feeling says no concerning logical analysis.
I would formalize both as: For all x: if x is a dog then x is a mammal

I agree that both sentences mean "For all X: If X is a dog, then X is a mammal."

In natural language, there are disguised universal statements, such as: "The dog is a mammal.", still meaning "All dogs are mammals." This feels like abuse of language but it's still okay as long as we haven't specified any single dog before.

Quote from: Forestidia
if you formalize a sentence of natural language one has the model that fits to our understanding of the world in the back of their minds

Yeah, natural language has many implicit dependencies. The model is a common understanding of the real world unless I override that explicitly. I didn't override anything in my examples to keep them simple; I even made the examples too simple/undefined.

-- Simon
« Last Edit: June 06, 2018, 12:28:15 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #134 on: June 07, 2018, 07:04:18 AM »
We've certainly been conditioned to expect 2 or more frogs.  I could imagine though the case where everyone including the speaker did expect there were at least 2 frogs in the box, but then after speaking the sentence, someone open the box and somehow, the frogs weren't there anymore (maybe there's a hole somewhere in the box we all overlooked, whatever).  Everyone would be surprised, but I think you could convince at least some people that the sentence is still true.

In contrast, if the box is transparent and has been in full view of everyone for a long time and there were never any frogs seen inside, you would probably have a much harder time convincing a layman that the same sentence being uttered would be true.  It would "feel" wrong in this case and make people feel you are kind of being misleading.

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #135 on: June 07, 2018, 07:08:59 PM »
I mean, if there aren't any frogs in the box (whether they were there to begin with or not) then that's a null reference, right? It feels to me kind of like trying to divide by 0; it's something that just doesn't work. Yeah, all frogs in the box are green, but if there aren't any frogs, then how do we know that there isn't some non-existent purple frog? I feel that the sentence loses meaning if it references something that doesn't exist.

So is it automatically implied that "If the box contains a frog, then all frogs in the box are green?" More importantly, if there are no frogs, does that make the statement "All frogs in the box are green" true or false? It appears to have entered a third state, one of "irrelevance."

Offline Forestidia86

  • Posts: 723
  • inactive
    • View Profile
Re: Simon blogs
« Reply #136 on: June 07, 2018, 07:47:41 PM »
I mean, if there aren't any frogs in the box (whether they were there to begin with or not) then that's a null reference, right? It feels to me kind of like trying to divide by 0; it's something that just doesn't work. Yeah, all frogs in the box are green, but if there aren't any frogs, then how do we know that there isn't some non-existent purple frog? I feel that the sentence loses meaning if it references something that doesn't exist.

So is it automatically implied that "If the box contains a frog, then all frogs in the box are green?" More importantly, if there are no frogs, does that make the statement "All frogs in the box are green" true or false? It appears to have entered a third state, one of "irrelevance."

So you see a presupposition of existence of frogs in the box in a statement like "All frogs in the box are green" (like the ancients)?
For reference in classical modern formal logic:
If there exist no frogs in the box then sentences of this form are always true: For all x (x is a frog in the box then A), whereby A is some other formula, e.g. For all x (x is a frog in the box then x is green) but as well For all x (x is a frog in the box then x is purple). This results roughly from following principle: non-P then (P then A) or as a rule of inference: You deduce (P then A) from non-P.
This principle/rule is sometimes critizised by non-classical logicians as unintuitive.

What do you mean with third state of irrelevance? Is it a real third value or gap beyond true and false or are we only not interested in the truth value of such statements? In other ways: Can't an irrelevant statement be still true or false?
It seems actually to be kind of a corner case.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #137 on: June 08, 2018, 09:59:01 AM »
Maybe a way to illuminate the situation is to consider a third logical value of "don't know" or "not sure", and also think about how people tend to arrive at rules like "A implies B" through an iterative process of evidence gathering.

In other words, there are 3 cases concerning a statement of the form "A implies B":

1) A is true and B is true.  This is an instance of evidence supporting the statement as true.  The more examples of this case someone experiences, the more the person will become convinced that the statement is true.

2) A is true and B is false.  This is an instance of counter-evidence disproving the statement.  A single counterexample is sufficient to demonstrate the falseness of the statement.

3) A is false. B may be true or false.  This is neither evidence for nor against the statement.  These irrelevant cases have no bearing on someone's confidence on the truthfulness of the statement.

The extreme is if A is always false, like talking about a purple frog in the box when no frogs are in the box.  Then by definition, there can never be any evidence supporting the statement, but also no evidence ever to disprove it.  In classical logic we still consider the statement true.  In most people's mind though, they intuitively want truth to correspond to a preponderance of evidence, and so when no evidence exists at all, they can't be comfortable considering it true.

Offline Forestidia86

  • Posts: 723
  • inactive
    • View Profile
Re: Simon blogs
« Reply #138 on: June 08, 2018, 12:25:20 PM »
3) A is false. B may be true or false.  This is neither evidence for nor against the statement.  These irrelevant cases have no bearing on someone's confidence on the truthfulness of the statement.

It's an interesting point to see conditionals in a way of verification or falsification. The classical logical principle follows then the rule that if it can't be falsified it's true. Whereas intuition from your view (as I understand it) says that only what can be verified (or falsified) can be true. This is a very demanding view of truth which combines truth with the possibility of determining it.
It could be seen as problematic to mix up the logical conditional with natural language intuitions of "if-then" but since it's about formalization of natural language it's a valid point to question those formalizations. (The same applies maybe to the concept of truth.)

If you take the empty set that contains no elements: The fact that it contains no elements can be used with the logical principle discussed here:
E.g. You get to the conclusion that the empty set is a subset (or identical) of every other set.
This is because subset is defined in the following way:
Be x,y sets:
x is a subset (or identical) of y iff For all z (z € x then z € y). ('€' means "is element of")
Since z € empty set is always false, the whole universal sentence is (for x = the empty set) always true no matter which set y is.
Insofar I have a problem in calling such things irrelevant.

That leads to the question what is the consequence of the intuition that there is a "not sure"-value. Do we introduce this third value and how does our logic then look like? Does it have consequences for mathematics (in a very wide sense) as well or only for natural language?
« Last Edit: June 08, 2018, 05:50:57 PM by Forestidia86 »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #139 on: June 08, 2018, 09:39:00 PM »
If you take the empty set that contains no elements: The fact that it contains no elements can be used with the logical principle discussed here:
E.g. You get to the conclusion that the empty set is a subset (or identical) of every other set.
<snip>

Yes, that may well feel very natural in the context of mathematics and logic, you're used to this kind of thing.  But if you try to express this in natural language without making use of the word "set", I think you may find it a little tricky to come up with such a statement that sounds natural.  Like, I don't know, "nothing is always part of any group of things"?

I feel like the only natural way to talk about the conclusion to a layman is to maybe re-state in the negative form, ie., you can never find something in an empty set that doesn't belong to any set.  Even in this form it will feel a little strange, because the precise reason it is true is that nothing whatsoever ever can be found in the empty set anyway!  Like you said earlier, it is a corner case.

I'm certainly not advocating that there is any inherent weakness or flaw in how classical logic is formulated.  It has definitely served its domain (eg. mathematics) very well.  I'm just pointing out that the human mind seems not wired exactly like classical logic, and it's this mismatch between how our brains are wired vs how classical logic works, that I theorize is at the heart of the conflicting views here.

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #140 on: June 08, 2018, 10:11:58 PM »
I think you may find it a little tricky to come up with such a statement that sounds natural.  Like, I don't know, "nothing is always part of any group of things"?

"If you have some things to choose from and may take any number of them you wish, taking nothing is one of your options."

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #141 on: July 20, 2018, 06:27:09 AM »
Thesis grind

I want to submit the PhD thesis by end of July, ideally by Friday, 27th. Every day is thesis day. Icho will be happy. Still must find extra profs for the defense comitee, time is running, I'm sending emails like a madman.

Until thesis submission, I'm supressing the urge to write colorful rants here (even the juiciest entertainment doesn't help finish thesis). Suppressing the urge to kill bugs in Lix, to improve level search or replay management in Lix, and even supressing urge to refactor. Supressing the implementation of girlfriend mode a.k.a. networked singleplayer.

Nap time now.

-- Simon

Offline Ryemanni

  • Posts: 328
  • Indeed.
    • View Profile
Re: Simon blogs
« Reply #142 on: July 20, 2018, 09:51:07 AM »
(•_•)
( •_•)>⌐■-■
(⌐■_■)

Every day is thesis day.


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #143 on: July 27, 2018, 09:17:53 PM »


This is how it looks in my room. I've handed in the thesis.

I've slept for 9 hours afterwards. I'm not in the mood to celebrate after the grind this week: It's still hard to realize that there is no immediate university work.

Defense is on September 10th. I have slides for a 30-minute talk from July 2017 in Stockholm, that gives me a head start to prepare the defense. Will take a few weeks of break.

-- Simon
« Last Edit: July 27, 2018, 09:40:31 PM by Simon »

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #144 on: July 27, 2018, 10:01:26 PM »
Congrats on finishing the thesis, Simon! :tal-gold:
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Akseli

  • Posts: 372
    • View Profile
Re: Simon blogs
« Reply #145 on: July 28, 2018, 06:48:01 PM »
Breathtakingly splendid, Simon! :thumbsup:

This makes me very happy for you. :lix-laugh: :laugh: :lix-laugh: :laugh:

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #146 on: August 01, 2018, 10:57:34 AM »
Thanks for the kind words!

Heat

It's 30 degrees C in Germany and the sun shines all day.

Consequences
  • Headaches, tiredness, dehydration
  • Eyes hurt from bright environment (sunglasses as extra bloat to carry/wear/forget)
  • Everybody becomes aggressive and unproductive
Benefits
  • Simon rants more?
Solutions
  • Freeze medical compresses, then wear one on the head. Buy 2-3 of these compresses to alternate: Whenever the current one thaws, re-freeze it and switch to a cold one. This works with headphones: Bend the phones' headband to the front and stick the compress behind the headphones, on the top of the head.
  • Siesta. Take at least one longer nap during the day. Or work entirely at night, should that fit into your social life.
  • Cover the outside of the windows with aluminum foil, or get proper window shades that block sunlight. Keep room dark at all times.
  • Swim in a lake.
  • Live in the US? Allegedly, more private houses in the US than here have air conditioning. Germans sure love their central heating.
  • Fans? Noisy and they produce more heat, but you be the judge.
-- Simon

Offline Ryemanni

  • Posts: 328
  • Indeed.
    • View Profile
Re: Simon blogs
« Reply #147 on: August 01, 2018, 11:13:59 AM »
Most of the houses in Finland are not prepared for the heat either, only for the cold. My only tips are to not go outside, drink a lot, and invest on an ASHP. 8-)

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #148 on: August 02, 2018, 06:41:57 AM »
So I'm not the only one who's sick of the summer heat.
Seriously, I really don't like the heat. Some people get seasonal depression in winter. I get it in summer. :lix-sad:

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Simon blogs
« Reply #149 on: August 02, 2018, 10:24:34 PM »
I never, EVER complain about summer heat. I'd take heat over cold any day, partially because my skin shrivels up in the winter. >:(
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #150 on: August 10, 2018, 12:32:20 PM »
The weather has become cooler again, that is very nice. It's still deep in the shorts-and-T-shirt weather. I wear sandals whenever possible, that's good for the environment because I don't have to launder any socks.

There will be a Family Feud round (forum game) by Forestidia and me, we'll think of the questions within a week.



Comma, more base-16

Germans use decimal commas and thousands-separating points: 1.234,5. That is weird and should be abolished in favor of the decimal point, 1,234.5, which seems to be more common around the world than any other separator. It's extremely confusing to read any kind of number in German when you're exposed to the decimal comma 80 % of the time.

Decimal is bad anyway and should be swapped for hexadecimal (not for base-12 even though many anti-decimal people want base-12). Powers of 2 are so useful that any other prime merely bloats the base, and 16 has an integer root (4) to generate patterns in the base-16 multiplication table that help memorizing the table.

■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■

The human brain is good at pattern recognition. It's also excellent at halving a visually presented quantity. Base-16 exploits that. A square tiled into 4x4 small squares is easier to grasp than a rectangle tiled 5x2 because of the 4x4's regularity and smaller max side length. Thus, let's design our numbers for humans, not for traditionalists.

Base-16 coins should be square (maybe some should be triangular?). They won't roll under the sofa, and they should get little tongues and grooves along their sides, then you can stick together 4 one-euro pieces to from a single 4-euro piece. The smallest coin available should be a 16th of a euro, anything smaller is unnecessary. In 30 years, even the 1/16-euro coin will be phased out, and the 1/4-euro will be the smallest.

No coin should be twice the value of another; coins should be a factor of 4 apart (maybe even 16 if coins can form a 4-times-larger coin by sticking them together). There should be as few different coins as possible and they should be easy to tell apart both by feeling and by looking.

There is no compelling reason to use base-10 other than tradition. The 10 fingers on our two hands seem like an after-the-fact rationalization of the bad choice that is base-10. Really, we don't have 5 similarly-shaped fingers on a hand; rather, we have 4 fingers and an opposing thumb. With 4 = 2^2 fingers and 1 = 2^0 thumb, we have 2 = 2^1 kinds of different stuff on each of our 2 = 2^1 hands. See, even nature ditches anything but powers of 2!

-- Simon
« Last Edit: August 10, 2018, 06:40:34 PM by Simon »

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #151 on: September 05, 2018, 06:44:44 AM »
While the main reason to use base-10 is tradition as you've said, I think that in this particular case, the tradition argument carries a lot more weight than it normally would.

If you were designing everything from scratch, it *may* make sense to use base-16 from the start, rather than base-10. But we can't ignore the fact that base-10 is deeply ingrained, because this imposes a series of problems we would have to deal with in order to switch. In this sense, I think it would be a very, very, very long time (probably at a minimum several generations' worth of time) before any possible advantages of base-16 would make up for the costs (financial or otherwise) of the transition process.

Disadvantages of switching from base-10 to base-16:
 - Most people have to learn a new number system (most people probably don't even know what base-16 is, let alone how to use it)
 - Confusion regarding values represented by numbers in works prior to transition
 - Ambiguity regarding values represented by numbers in works during transition (if you have the number 52, did the author mean that in base-10 or base-16? Most likely, not everyone will switch right away)
 - SI system prefixes become harder to work with unless they are changed, in which case the world has to redo the transition to SI.
 - Thought the fact that the US culturally refuses to use SI is confusing enough? Wait until any country decides they just don't feel like transitioning to base-16. Now, in order to understand any numerical values containing only the digits 0-9, we must know if it was produced in a country that used base-10 or base-16 at the time of production. At least with units, they have to be labelled, so there's no ambiguity regarding whether a paper intends a length to be interpreted in feet or meters.
 - To eliminate any confusion, we'd have to start clarifying bases by some way, either by inventing new symbols for 0-9 in the base-16 system, or by giving a base label of some sort to every number. This will be much less convenient than the current system where we are almost always safe to assume a value is in base-10 if no base is specified.
 - New number words would need to be created, at least in English, for numbers such as 2A (how would you even pronounce that? twenty-A?). New ones would also be needed in order to eliminate the ambiguity discussed earlier.

I'd say that in a realistic best case scenario, this change would create a situation where instead of just worrying about whether 1,234 is between 1000 and 2000 or 1 and 2, now we have to worry about whether 1,234 is 1,234 or 4,660.

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #152 on: September 05, 2018, 07:41:12 AM »
As a follow up to the 'pronouncing hexidecimal numbers' thing... Consider the number AD. How to say that? "Ay-dee" sounds much like eighty. "Ay-dee-dee?" How do we know that doesn't mean 8D? Would it be better to just read off every number one digit at a time? Perhaps add pauses in fixed locations for long numbers.

Anyone who's studied computer science should have an understanding of hexidecimal, but having it replace base 10 entirely would be a lengthy process that would encounter much resistance.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #153 on: September 05, 2018, 09:22:02 PM »
Dullstar and nin10doadict, thanks for the wise responses! Yeah, the tradition argument weighs heavily for base-10. I don't expect a serious real-world move away from base-10 in my lifetime.

In the dark corners of my mind, I want to see the world struggle, in all gruesome details, for the better future. :lix-evil: The switch to base-16 would be our generation's gift for the children in 20 to 50 years.

Designing new words for numbers: Yes. We must distribute 16 unique digit names in the space of all short, nice words/sounds such that no two of them are too close to each other.

Even today, eighteen and eighty sound far too similar. I want to call 18 ten-eight.

-- Simon

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #154 on: September 06, 2018, 12:07:59 AM »
we could use a smaller number of symbols then alter them (like rotating 90 degrees for example) to represent higher or other numbers.

I always loved the fictional 'D'ni' number system from the Myst series;

it's a base 25 system, except there are actually only 4 symbols. Number 5 is 1 rotated, then 6 is 5 combined with (or superimposed with) 1. 7 is 5 with 2 etc. Then 25 and onward work similar to our 10, 11, etc.
Though I don't know if I'd describe this as 'better' compared to our system ;P

http://dni.wikia.com/wiki/D%27ni_Numerals
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #155 on: September 06, 2018, 04:29:29 AM »
I always loved the fictional 'D'ni' number system from the Myst series;

Ah yes, I remember playing that game back in my teen days, fun times.  I was able to work out the number system on my own, but kind of wonder how many people might have gotten stumped by it?

While base 25 is a reasonable description for the system, considering that the in-game mythology actually holds the number 5 as special, it is equivalent but perhaps somewhat more fitting to say it's a base-5 system with a unusual writing system for the "digits", where effectively you group them into pairs and rotate one of the two but otherwise write them out both overlapping in the same space.  Basically imagine if instead of writing "13" for thirteen, you are to rotate the 1 ninety degrees so it becomes more like -, then you write both digits overlapping each other so you end up with something like a 3 with a - going through it.  It's equivalent to think of such a system as both "base 100" as well as "base 10 with an unusual system of writing out the digits".

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #156 on: September 10, 2018, 02:53:23 PM »
PhD

I defended my doctorate thesis today. It's a magna cum laude, 2nd best of 4 possible passing degrees. It's an excellent result, I didn't expect it this good at all. The thesis itself didn't get such a good grade, but the presentation and public quiz convinced the committee.

Forestidia said: The Jazz speedruns and the streaming helped me for sure with presenting, I talked loud and clear. Icho was there, too, and congratulated. This was even a spontaneous 3-person forum user meeting. :lix-grin:

Technically, I'm not allowed yet to call myself doctor or PhD; that has to wait until October.

The next days, it's all chilling and getting up to speed with friends. Then, job hunting!

-- Simon

Offline Ryemanni

  • Posts: 328
  • Indeed.
    • View Profile
Re: Simon blogs
« Reply #157 on: September 10, 2018, 03:28:59 PM »
That's worth a good ol' warm Congratulations! :thumbsup:

:party:

Offline Akseli

  • Posts: 372
    • View Profile
Re: Simon blogs
« Reply #158 on: September 10, 2018, 04:51:30 PM »
#neolemmix IRC channel logs Monday the 30th of July 2018:

[02:27:17]    <SimonN> Han nan nan nan, Akseli, I still have to defend to get the degree, and the degree is in maths, not in busting quacks
[02:27:31]    <SimonN> busting quacks, one learns that on the internet better than at any uni
[02:29:18]    <Akseli> are you saying your field is more hardcore than other fields? : P
[02:30:04]    <Akseli> just kidding, good luck for the defending : D I've been in three different defending events, they're fun at least here in Finland
[02:30:07]    <SimonN> no, merely that my field is unrelated, anybody can compute acceleration : )
[02:30:23]    <SimonN> heh yeah, it should go well
[02:30:39]    <Akseli> people are just laughing and telling jokes
[02:30:47]    <Akseli> the audience goes wild
[02:30:56]    <Akseli> everyone has a festive feeling
[02:31:00]    <SimonN> hoh, nah, we take it slightly more seriously
[02:31:06]    <Akseli> : D : D : D : D
[02:31:13]    <SimonN> it's mostly about the math still
[02:31:31]    <SimonN> the audience that is not well-versed in the field has a hard time following
[02:32:36]    <Nessy> : D
[02:34:45]    <Nessy> Yeah good luck Simon!
[02:36:23]    <SimonN> thanks!
[02:41:24]    <Akseli> yeah Simon, overwhelm the counter argument guy !
[02:42:23]    <SimonN> "why did you spend years on this trivial stuff?" -- "if it's trivial, why has nobody else done it yet?"
[02:42:42]    <Nessy> > ; P
[02:45:59]    <Akseli> yes, and the audience enjoys their life
[02:46:15]    <Akseli> "ha ha ha" echoes in the room
[02:46:23]    <Akseli> the counter argument guy blushes
[02:46:34]    <Akseli> Simon flashes his overly charismatic smile
[02:46:41]    <Akseli> people go wild yet again
[02:47:28]    <Akseli> after 2 hours and 7 minutes the event is over, and people gather outside the room to chat in joyful manner


____________________

Congratulations, Simon! :thumbsup: :thumbsup: :thumbsup:

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: Simon blogs
« Reply #159 on: September 10, 2018, 05:53:17 PM »
Congratulations here as well. ;)

I even understood some single things during the defense and the buffet afterwards was splendid! :thumbsup:

Offline Nessy

  • Posts: 579
    • View Profile
Re: Simon blogs
« Reply #160 on: September 10, 2018, 06:25:06 PM »
:thumbsup: Another BIG congratulations Simon! :thumbsup:

You worked very hard on this and you should be proud of your accomplishments!

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #161 on: September 10, 2018, 08:47:15 PM »
Sounds like you'll be getting more out of your degree than I've been getting out of mine. Best wishes :)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #162 on: September 12, 2018, 08:59:56 AM »
Congratulations!  Looking forward soon to reading "Dr. Simon blogs". :P :thumbsup: :tal-silver:

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #163 on: September 12, 2018, 09:36:34 AM »
That must of been tough going, well done Simon. All the studying has been worth it. :thumbsup::thumbsup:

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #164 on: September 13, 2018, 04:55:50 PM »
Thanks everybody for the kind words! :lix-grin:

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #165 on: September 18, 2018, 12:02:05 PM »
Looking forward soon to reading "Dr. Simon blogs". :P :thumbsup: :tal-silver:

I remember my first rant after passing: When you hand-write the digit 5 on paper, then move the hand to write another digit, but during the move, either you don't lift the pen properly or have the paper stick to the pen, you will draw a line through your 5 and make the 5 look like an 8. Digits should be designed more robust than this. :lix-evil:

Weight bet

In April 2018, I weighed 86 kg at 1.92 m and made a bet to lose 8 kg of weight to 78 kg over 7 months. This week, 5 months into the bet, the scale shows 77.7 kg and I merely have to maintain this weight for 2 months to win. :lix-grin: When I picked a new suit for the defense, the clerk even said: Skinny tall guy, it'll be easy to find something fitting.

During the bet, I still played only my feeble amount of sports. Instead, I ate in moderation and cut off-the-shelf snacks and sugary drinks. One idea behind the guinea pig diet (put cucumber on every bread in addition to your usual salami/cheese/...) is to make the food more elaborate to prepare, and you will stop easily when satisfied.

Occasionally, I still indulged in snack feasts with friends. That's fine: By then, one is accustomed to a moderated diet and will adapt to such extra intake, eating less the day after.

Mafia replacements

Mafia (social game, we played by forum) has downsides: Early and frequent player elimination, and a moderator who can't play themself. I preferred lean Mafia rules with few roles, but then you must debunk liers by pure face-by-face observation, very hard in a forum game. Others like many extra roles to give the community more substance for clues and discussion.

But whenever you're stuck with questionable design, plastering extra rules on top is rarely correct. You should instead attack the root problems. Secret Hitler (2016) and The Resistance (2010) fix both the early player elimination and obviate a moderator. Were I to play a hidden-role party game, I'd probably propose one of these over Mafia to the game group. Secret Hitler seems to have a large growing fanbase.

Still, I believe that Mafia will be played for many years to come, because it's the simplest. It captures the game idea and isn't obviously broken.

-- Simon
« Last Edit: September 18, 2018, 12:11:30 PM by Simon »

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #166 on: September 18, 2018, 04:30:45 PM »
Hi Simon

It used to be a nightmare trying to get trousers to fit myself, it was the ones you would tend to wear for funerals and job interviews, weddings maybe. I'm around the 19 stone mark, I've been looking to trying to get back into the basketball as that was something I was quite good at back in the school and college days. My brother and I played a few one on one football games with a basketball. I ordered a basketball earlier this year and it has gotten my brother and myself out running a bit more. I can run at a fast pace but you do notice when you are at the 19 stone mark you do get out of breath a bit more. Still thinking about joining a basketball league in the future. :)

That's an interesting idea about making the food more elaborate when it comes to preparing that way you do tend to take steady approach to what you are eating. Do you play a little sports yourself, what's your favorite sport if you had to choose Simon?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #167 on: September 19, 2018, 11:26:11 AM »
Yeah, 19 stones (120 kg) sounds like the high end. Way to go with the basketball! :thumbsup:

Weight loss, slowly over time, happens via diet: Look up your daily food energy requirement and actual intake. But merely dieting loses both fat and muscle. The sports counterbalance that, and keep you fit and happy.

My sporting -- I rode the bike each day to the math department and back. Now, Tim (reallife friend) has taken up Disc Golf, occasionally I join him on his weekly round: I get to spend time outside, and throwing those discs feels like starting lawn mowers.

I haven't considered joining a sports club. But even at home, I should practice pushups again, just a few.

-- Simon
« Last Edit: September 19, 2018, 11:34:09 AM by Simon »

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #168 on: September 19, 2018, 11:46:10 AM »
I've noticed lately that most of my trousers no longer fit me, and I think the reason is that my warehouse job, where I was for nine months, added up to a lot more physical activity than I realised. I haven't checked my actual weight any time over the last year, though.

When I visited Japan in 2013, I was there for three weeks and lost about 5kg very quickly. I guess that was a combination of visiting so many places, and Japanese food being so much healthier. I would love to go there again 8-)

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #169 on: September 19, 2018, 04:45:40 PM »
I've been at around 57 kg for at least 6 years now. At 1.8 m tall, this means it's also difficult to find pants that fit.
If I exercised more than what I get at my job then I might not have this problem...

Still, I'll take that over being too far in the other direction. :D

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #170 on: September 30, 2018, 02:02:34 AM »
Quote collections
  • random3.txt: My personal list of collected quotes. Most of them are about design, psychology, games, software. I don't remember why the file is called random3.txt anymore, I don't have any such files with numbers 1 or 2, but the name sticks. Random quotations.
  • Akin's Laws of Spacecraft Design: Classic list about physical engineering. Most of it is applicable to software engineering, even though my instinct would tell that it is not. E.g., in software, the extreme solution is often the cleanest, and cleanliness has great value, but it pales against backwards compatibility.
  • Dutch Quotes: Collected by somebody unknown, but most likely by a Dutch. I'm rehosting this because the original disappeared from the net 10 years ago.
-- Simon
« Last Edit: September 30, 2018, 02:35:40 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #171 on: October 10, 2018, 10:12:20 PM »
Aaaaaaa

I want to go to bed early, to fix sleep schedule by force. No computer time past 00:00 UTC+2 for next >= 1 week.

I sent email with missed attachment. Again because I didn't follow my own advice to always add attachment first, then write body, then write subject, then add recipients.

Had to resend, and now rant, and now it's 00:12. Good night.

-- Simon
« Last Edit: October 11, 2018, 05:08:24 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #172 on: October 12, 2018, 07:10:41 AM »
I sent email with missed attachment. Again because I didn't follow my own advice to always add attachment first, then write body, then write subject, then add recipients.

Do you use GMail? If so, GMail has an "Unsend" feature that can be very handy - you need to enable it though, it's not enabled by default.

This isn't a true unsend, of course - that'd be pretty much impossible (and even if possible, there are possible moral issues with such a feature). Rather, it delays sending the email for a time period of your choosing - the maximum I believe being 30 seconds - during which you can cancel the send. Very useful for those cases where you click Send then immediately realise you forgot something.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #173 on: October 16, 2018, 10:39:32 PM »
Right, I've used Gmail.

Undo-sent-email is available for a few seconds, it wouldn't have helped me that time. Interesting that one configure its duration, I've set it to 30 secs, the max.

I remember how they were annoyed about their internal delay on sending email, and turned it into a user feature. Very nice hack!

-- Simon
« Last Edit: October 16, 2018, 11:08:07 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #174 on: October 17, 2018, 06:52:43 PM »
Text-based configuration formats

All text-based configuration formats suck. (They're still the best. Binary sucks more. Databases are overkill for configuration.)

I'm considering to write Lix's trophies and options in a different place, and add trophy fields (author of level, title of level). I'm considering to write the trophies in SDLang, but there are many competing text file standards and they all have problems.

Why not use X, where X = JSON, Ini files, SDLang, TOML, YAML, XML, etc., for at least 10 formats, by the StrictYAML authors.
JSON as configuration files: please don't
YAML: probably not so great after all

Downsides of Lix's config file format: Hardly extensible. Even though the parser ignores lines beginning with unknown keywords, but the attributes after the keyword have no names, have a fixed order, and fixed types. Can't define nested structures. Tile groups in Lix levels already need a hack with an open-section-tag and a close-section-tag. (I will keep the level format and not change that anytime soon! This is only for options.)

Downsides of SDLang: Almost nobody uses it, few existing parsers for other languages besides D, complicated (does the application expect a tag with many values, or a tag with attributes, or a tag with child tags?)

-- Simon
« Last Edit: October 29, 2018, 11:59:09 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #175 on: October 26, 2018, 11:24:40 AM »
Pure

It is nice if your function is weakly pure (doesn't read or write to global mutable state) or strongly pure (as weakly pure, and additionally doesn't dereference any of its argument pointers to mutable state) because the same inputs will then always yield the same outputs. The compiler can assume things about your function, replace function calls with cached results, or constant-fold everything.

It is nice if your function doesn't allocate memory, guaranteed. That's faster, that's compatible with more algorithms (leaves your callers in control about how to allocate), and makes your function simpler.

It is nice if your function cannot throw exceptions. Need fewer things in the mind before the code is complete and handles all conditions. Thus, it's simpler.

It is nice if your method promises to not modify the object. Your readers can reason about the system's state more easily, and focus on the real problems.

It is nice if your function, if it promises to return a class object by reference, guarantees that the reference is not null (we had this rant).

It is nice if ...

It is terrible if everything in your code is annotated with @property @safe const pure nothrow @nogc:

It looks ugly and complex.

It's brittle because simple changes produce nasty, cascading errors.

It's unworkable if only 98 % of your language's standard library follows the principle, you call into the standard library everywhere, and even if you file bugs or send patches to the library, it will take months before the changes have propagated to your self-building users.

It tempts to cheat the system. Surely, to round() a floating-point number should be pure? What if, in general, yes, it is pure, but only on one particular architecture, the library writes custom float-handling flags to the CPU, then rounds, then restores the old flags? Such assembler calls are the most impure building blocks of any function. Let us consider this hack to cast between pure and impure... Oh, some well-optimizing compiler doesn't like the hack 3 years down the road, and you get segfaults in unrelated-looking parts of the source.

It runs into rarely-used parts of your language. These parts tend to be particularly buggy and lack the necessary manpower. These parts are notoriously incompatible anytime you want to mix two features of the language.

Likely, at least one of these features was designed 15 years ago, and then software engineering theory has advanced, but the language is encrusted enough to stick with the old design.

Arg arg arg. This must be why people write their own toy languages all the time. :lix-tongue:



Crane: In your purity proposal, can you allow pointer dereferences to immutable external memory? Can Pascal guarantee that some object will never mutate? Typically, immutability and purity go hand-in-hand to make strong purity more usable.

-- Simon
« Last Edit: October 26, 2018, 01:16:25 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #176 on: October 30, 2018, 04:47:24 PM »
Graphics card henchmen

The CPU is the criminal mastermind, capable of anything. But he must carefully delegate tasks that would take too long for him alone.

The graphics card is the mastermind's army of muscular thugs. If you can explain a task in simple terms, they're highly efficient at getting things done. These henchmen don't like drawing individual pixels on textures. But they can draw readily-prepared bitmaps with transparency, hundreds of them, in the blink of an eye.

Lemmings programming is special: Pixel-precise drawing on the graphics card's bitmaps is necessary, but, naively implemented, would be slow. Kitchen-sink libraries such as SDL2 or Allegro 5 have a hard time offering suitable abstractions for this. I'm already calling more specialized Allegro 5 routines for the graphics card's batch-processing of many small drawing operations. I can't shake the feeling that learning hands-on graphics card programming would immensely help my cause. But the Allegro 5 functions hit a sweet spot: It's fast enough and doesn't leave their abstractions (good because I rely on Allegro 5 bitmaps throughout).



Interface segregation

The interactive game has an effect manager: What sound effects should be played, what sound effects should not be played because they're merely from a recalculation of physics, what skill-highlighting arrows should pop up, etc.

The lixes need to know the effect manager to queue their sounds: Only the digger hitting steel can tell that a steel-hitting sound should be played. But lixes and physics should also run without interaction. Why should they depend on a class like EffectManager that is 95 % user interface bells and whistles? EffectManager doesn't affect physics at all.

Game with EffectManager----depends-on---->Physics
Physics----depends-on---->Game's EffectManager

The answer is to define the EffectManager's queuing interface, EffectSink, separately from its implementation. EffectSink is a part of the physics, and lixes know how to queue effects.

Game----depends-on---->EffectManager, Physics
EffectManager----implements---->EffectSink
Physics----depends-on---->EffectSink

This way, you have no circular dependencies in your program. Bonus points is that, now, you can define a NullEffectSink that auto-implements all EffectSink methods as empty methods -- a one-liner definition with the D standard library's BlackHole. Then, noninteractive replay verification gets passed a NullEffectSink and can unconditionally call its EffectSink instead of my old way of checking whether an optional EffectManager is really there (even with a special Optional library type, this was a nonzero effort at the call site). It's always nice whenever there is no need for null references. :lix-grin:

Finding these abstractions is utmost joy. :lix-blush:

This should really go into OO-with-Simon instead. Perhaps clarify the relation between Game and EffectManager, so it's clearer how either depends on physics.

-- Simon
« Last Edit: October 30, 2018, 05:02:50 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #177 on: October 31, 2018, 06:29:01 AM »
It tempts to cheat the system. Surely, to round() a floating-point number should be pure? What if, in general, yes, it is pure, but only on one particular architecture, the library writes custom float-handling flags to the CPU, then rounds, then restores the old flags? Such assembler calls are the most impure building blocks of any function.<snip>

In Crane's purity proposal that you link to, the focus there seems to be specifically about the function being deterministic such that same inputs always produce same outputs (and also that it's either side-effects free, or no one will take dependency on the side effect), so that for example you can precompute at compile time in some cases.  It seems like you can assert something being deterministic separately from a definition of purity that is based on a function's implementation with respect to interactions with global states.  So you could assert that round() is deterministic even if it might not be pure in some corner case, and may still reap a good portion of the benefits of doing so.  Purity would imply deterministic, but you can assert something to be deterministic without being pure.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #178 on: November 08, 2018, 12:06:30 PM »
Purity would imply deterministic, but you can assert something to be deterministic without being pure.

Right.

This is the idea behind compile-time function execution in D: You can execute nearly everything at compile time, even if it's not marked pure. The compiler will complain e.g. about I/O, but happily execute whatever it can, allocate memory for temporaries etc.

I'm not sure what the selling point behind D's pure keyword is then -- I presume it's some hint for the compiler that it should consider more ruthless optimization here.

C++ has constexpr to enable compile-time function execution. A very long keyword to type, very verbose if the headers are full of that. :lix-tongue: I still believe that compilers should infer constexpr/const/immutable/pure/nothrow/@nogc etc., wherever they can. After all, they can check whether a keyword is allowed on a function. Only if we annotate the function explicitly, then the compiler should enforce the property.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #179 on: November 14, 2018, 05:08:31 PM »
Save-money coupons

The devil's contraption to waste everybody's time and money.

I was shopping at the supermarket. At another cashier, I observed two Asian students trying to redeem a voucher to save 1 Euro on toothpaste. This failed for some hard-to-understand reason. The students weren't 100 % up-to-speed with German either. Two extra clerks were called, and the customers behind waited for 4 minutes. That was longer than my entire wait and cash-out.

Let's summarize the disaster:
5 customers had to wait for 4 minutes = 20 minutes.
3 clerks busy for 4 minutes = 12 minutes.
2 other clerks interrupted from other work = 30 extra minutes to regain flow.
Already over an hour of lost time.
An hour is worth far more than the 1 Euro the coupon would have saved.

Cashback programs are similarly insidious: The clerk will ask everybody for their cashback card, that loses 3 seconds per customer even when no customer participates. The supermarket exchanges marketing data with the cashback firm. Nothing is free, the cashback customers are paying with their time and lost privacy.

For humanity's sake (the people around you), never participate in coupon programs or cashback programs that have even the slightest risk of slowing down public infrastructure. Coupons are less intrusive in online sales, but really, who cares about saving 1 Euro. Buy few things, but if you buy, buy high quality and don't mind small price differences.

-- Simon

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #180 on: November 14, 2018, 07:00:33 PM »
Quote
Nothing is free, the cashback customers are paying with their time and lost privacy.

I would question this in two ways - firstly, whether the sale will really be private in this day and age even without a loyalty / cashback card; and secondly, whether it's really that big a deal that some giant marketing firm who's never heard of you beyond as "customer #410757864530" knows which brand of toothpaste you buy.

I do however see the point in regards to it slowing down transactions. Stores here often handle this by allowing the customer to swipe their loyalty card while the cashier is ringing up their items, thus, no additional time is lost. Also, in my experience here from working in said stores in the past (which may not be the same in Europe), the majority of customers do tend to have these cards, although it's questionable how many ever bother to get the rewards (most customers are likely more interested in the additional, on-the-spot discounts - which can actually be quite significant, sometimes as much as $15 - $20 off a $100 order).
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #181 on: November 14, 2018, 10:37:48 PM »
Sometimes I go shopping with coupons in my pocket, forget they're there, and don't use them. The savings are nice but really not enough to merit me seeking them out; I just try to be frugal in other ways, such as keeping track of the prices of certain items and only buying them when the price drops. There are some cases where this is useful, because these items will always be marked as 'on sale' even when the price is high, so mentally tracking the price helps me determine when the so-called sale is actually real.

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #182 on: November 15, 2018, 01:16:42 AM »
if you go out of your way to get or use a coupon (buying something you wouldn't have bought otherwise) then you're not saving anything. On the other hand if you use one that happens to fall into your lap (as sometimes happens) on something you were planning on buying anyway; it does save money, though a small amount. Over time it adds up if you're diligent with this method.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #183 on: November 15, 2018, 04:55:26 AM »
I sort of get what Simon's saying, but maybe it's a little disingenuous to pick the worst case example where the coupon isn't working; far fewer people would bother with coupons if they actually frequently break down like your example.  It'll be kind of like applying a worst case example where the computer system has bad price information so barcode scanning an item simply on sale (ie. no coupon involved) did not result in the correct price, and then the junior clerk has to go get a more experienced clerk to sort out the mess.  You can't exactly use that example to say the barcode scanning system is bad, unless it happens frequently.

I also always thought coupons are more the store's sneaky way to try to have their cake and eat it too.  If they just simply put the item on sale for everyone, then everyone pays the same lower price (but yes, maybe it'll attract more people to buy in their store as opposed to some other place).  But if they force you to cut out a coupon in order to get the lower price, at least some portion of people might not bother but still want to buy, and can then pay the higher price, while the truly price-conscious/obsessed people will take the extra time and feel good about getting the discount, and the store at least gets them to buy here as opposed to some other place.  Yes, you lose a few people who'd reject both the higher price and the work needed to cut out the coupon, but maybe despite that, it still balances out in favor for the store?

Offline Minim

  • Posts: 1724
    • View Profile
Re: Simon blogs
« Reply #184 on: November 15, 2018, 08:53:49 AM »
This is right up my alley as I work as a cashier in my local supermarket. I feel your pain too as most of my regular customers suffer similar agonising waits as well.

Sometimes I have to ask a young-looking customer for their ID for any purchase of cigarettes or alcohol. 18 is the golden age for this, but annoyingly I have to follow the same rule for 16 year-olds buying Red Bull cans. On another day I sometimes need to ask for the same customer's ID presentation. It can infuriate them, particularly if they know me so well, so I only do this if managers are walking around, just in case they wag their finger at me.

Most customers buy fruit, vegetables and fresh bread without sticking a barcode sticker on them. The hard work has to be done by me to find the correct item on the system. The breads are most difficult because the pictures look so similar, especially the sourdoughs; And I can never tell a loaf from a crusty bread either. Anyway, afterwards, I sometimes have to weigh the product instead of add the quantity. (Sometimes the check weigh doesn't work, which consumes even more time)

As well as this, the system tells me to ask each customer for:
  • Their loyalty card. The main advantage for our shop is a free newspaper for £10 spent, including the paper. Some of our customers do, but some of them present me coupons before they show their loyalty card. If I try put coupons through the system before the loyalty card I get in trouble and need to ask a manager.
  • Cashback. This only comes up when customers place their debit card into the machine, instead of the simple contactless process. Some of our customers are fussy about how they would like their cashback, e.g. in coins.
  • Swipe their card: Some customers' cards don't work on our card machines. >:( Sometimes this can be circumvented by me holding the card in, but after three failed attempts I swipe their card if there is a signature on the back of it. If there isn't then I have to ask the customer to pay with another card, or cash. (Sometime I ask them to use the cashpoint if they don't have cash, which fortunately isn't too fay away, but it's still an unnecessary waste of their time)

At the end of each transaction the receipt comes out, but occasionally another coupon comes out. Rather than feel guilty about not giving the customer the extra offer I always wait a few more seconds after the receipt prints off just to see if the additional offer will come out as well.

And that's all I can think of for now. Hope it's not too off-topic but it certainly feels like we're damaging our reputation with all these delays for these poor customers. :(
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #185 on: November 15, 2018, 10:34:37 AM »
Interesting that in the UK you do barcodes for fresh produce.  In the US I've never seen this so far, for fresh produce you (or more likely, the cashier) always have to do manual entry.  On the other hand for things like meats and seafood, the butcher/fishmonger does apply the label with barcode as part of the process of weighing, cutting and packaging of the meat/seafood, so all you or the cashier has to do afterwards at checkout is to scan it.

In the US at least for the large corporate supermarkets, it seems there usually is a separate place in the store where you buy alcohols and cigarettes, you wouldn't even be dealing with those items in the regular checkout lines.  [edit: actually now I think of it, that only applies to cigarettes and other tobacco products, not alcohol.  I guess cashier would ask for ID on alcohol purchases.  Kind of curious now what would happen with alcohol in the self checkout lanes.]  Of course I imagine for smaller supermarkets the same cashier would handle regular and restricted items.  Why does Red Bull require IDs in the UK?  It isn't alcoholic AFAIK.  In the US there is no legal regulation on caffeine AFAIK (certainly no federal regulations; state and local laws can in theory do this but I've never heard of it).
« Last Edit: November 15, 2018, 10:47:12 AM by ccexplore »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #186 on: November 15, 2018, 04:55:14 PM »
Quote from: namida
firstly, whether the sale will really be private in this day and age

Mostly yes, I pay cash for 90 % of my purchases.

Sweden: Customary to take bank cards for any bill, and people happily pay everything with that. Germany: Most places don't accept it unless the bill is 5 Euros. Thus cash is still popular.

Online purchases are a pain. The super-high-secure checkout sends unencrypted email afterwards.

Quote
whether it's really that big a deal that some giant marketing firm who's never heard of you beyond as "customer #410757864530" knows which brand of toothpaste you buy.

I thought cashback programs had you register with name? At least banks do. They'll keep this data in their super-high-secure datacenter, which falls prey to social engineering 3 years down the road. Or to an overworked maintenance programmer.

The main problem is that other people use cashback. That is the real time drain.

At my store, the cashback ad says:
Exchange your cashback points for vouchers!
200 points = voucher worth 2 Euros
500 points = voucher worth 5 Euros
1000 points = voucher worth 10 Euros
2000 points = voucher worth 20 Euros

Makes one wonder at how low a social level this list is aimed.

Also, calling the cashback point a "point" instead of 0.01 Euros. Who would swipe their card for 3 cents? Being unbothered must be worth more to even those people. But 3 points, sure, that's worth it! Numbers go up! Fun!

Quote from: nin10doadict
items will always be marked as 'on sale' even when the price is high

Hah, such simple technique, and I'm sure it works more often than it should. I haven't seen it conciously, but still sound advice.

Quote from: mobius
(most customers are likely more interested in the additional, on-the-spot discounts - which can actually be quite significant, sometimes as much as $15 - $20 off a $100 order).

Yes, I agree that this is a lot, and I would even let myself be bothered to get an extra 10 to 20 Euros. Saving 10 % is nice.

Quote from: mobius
on something you were planning on buying anyway; it does save money, though a small amount. Over time it adds up if you're diligent with this method.

I accept this. I'd say it costs too much time for the effort, and you risk end costing other people's time. If your experience is less annoying than mine, that's fine.

Quote from: ccexplore
it's a little disingenuous to pick the worst case example where the coupon isn't working;

It may be slightly over-the-top, but it's still representative, sadly. There are many other ways that produce excessive waits:
  • Old lady must be told several times that now is voucher/cashback time, then she digs in wallet for cashback card.
  • Person (even smart ones) forget to put vouchers on the counter until after the system seemingly-randomly expects vouchers to be entered. Transaction rollback is problematic, sometimes needing special keys or privileged members. (Also see Minim's post.)
  • Person wants to mix two types of voucher/cashback. How does it go? Ask the cashier risk other people's time? Memories of clashing features in computer programs come up. Even more memories of house rules in games come up that hook into the same event of the basic game and their interaction/timing is ill-defined.
  • The cashpack program has an annoying mascot that looks like on drugs, and it stares into your eye everywhere in the supermarket. By checkout time, I want to bite somebody's head off. I accept that this maybe doesn't apply to everybody. >_>;;
Every voucher/cashback program is one extra way how designers, over the years, manage to screw up every simple idea (buying at a physical store). The nastiness of these programs grows at O(n^2).

Quote from: ccexplore
You can't exactly use that example to say the barcode scanning system is bad, unless it happens frequently.

Barcode scanning is one alternative out of many mutually exclusive ways to register prices. It is far less error-prone. It's also ubiquitous and has grown bug-free. It doesn't collide with other cash-out-time stuff.

Coupons fail far more often. Certainly I accept that my specific failure is rare, but they can fail in many more ways, even if less time-consuming.

Quote from: Minim
Some of our customers do, but some of them present me coupons before they show their loyalty card. If I try put coupons through the system before the loyalty card I get in trouble and need to ask a manager.

This is beautiful.

I feel like all clerks should fail this step on purpose, every single time this ordering matters. The manager should be called every time. That is how nasty it is.

This really should have come up in user testing: Supermarket-manufacturing firms probably test their checkout processes on real clerks, providing fake customers with random such problematic cases.

The many kinds of different vouchers/cashback can't possibly be known at design time (when the supermarket-cashier-lane-manufacturer designs his cashier user interface), and no single voucher/cashback firm should be responsible to define all interactions with all other voucher/cashback firms. This is the main reason why vouchers/cashback are fundamentally flawed from a systems design point-of-view. Nobody can be made responsible for the mess. My hunch is then to cut such mess immediately from the design. (Of course my hunch won't make the marketers any money.)

Quote from: ccexplore
Why does Red Bull require IDs in the UK?

At least in Germany, there is only one age check for alcohol and tobacco at age 16. Hard liquor is locked behind glass doors and customers must ask a clerk to unlock.

Interesting that the UK introduces so many more more special rules.

-- Simon
« Last Edit: November 15, 2018, 05:37:25 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #187 on: November 15, 2018, 07:23:48 PM »
Quote
Mostly yes, I pay cash for 90 % of my purchases.

Sweden: Customary to take bank cards for any bill, and people happily pay everything with that. Germany: Most places don't accept it unless the bill is 5 Euros. Thus cash is still popular.

Interesting. It's quite different here; while credit cards sometimes do have a minimum spend (often in the region of $10 or so), debit cards generally do not, and many shops encourage customers to use debit cards rather than cash. Even without that encouragement, the general trend seems to be to prefer card here. I worked in supermarkets for a while in the past, and while cash was far from unheard of, card was definitely the more popular option - and I've heard this has only become even more the case since then.

It probably helps that fees are very minimal here. If you're happy to settle for a card that can only be used in NZ (or at certain international ATMs for a fee), it is possible to literally pay no fees - none on transactions, no monthly/yearly fees, I literally mean nothing at all. If you need online / international use of your card, you'll need a higher-tier card, but this still only costs in the region of $5 per year - and you can still avoid all the other fees.

Quote
I thought cashback programs had you register with name? At least banks do. They'll keep this data in their super-high-secure datacenter, which falls prey to social engineering 3 years down the road. Or to an overworked maintenance programmer.

Sure, but to them, "John Smith" is as meaningless as "customer #410757864530". They don't know who John Smith is, as such, just that a guy called John Smith (maybe "who lives at 123 Fake Street") buys lots of chocolate, or whatever. The worst they can do with this is send aforementioned John Smith advertisements for more chocolate. A minor annoyance, but I guess I kinda got over seeing it as being a huge deal. I guess after dealing with internet spam about "enlarge your penis!" and "buy [obscure prescription drug] cheap!", I'm not so bothered by offline ads that are at least somewhat relevant.

Now of course, there may be cases where anonymity is preferable. If you're buying, say, ingredients / equipment to grow / produce drugs, you probably don't want a record of that. But if you're simply buying bread, pasta and toothpaste, I really don't see how this is a big deal anymore.

My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #188 on: November 16, 2018, 11:01:31 AM »
One more thing I want to add, in the same vain as my earlier point how all this probably benefits the store more than the customers:

Yes, those things you mentioned waste everyone's time, but I think the store has much more capacity to absorb the extra times spent compared to individual customers, even when it comes to major issues like the example you cited.  Because the store is pretty much never equally busy at all hours of day, extra time spent here and there will usually be balanced out by lulls elsewhere during the day.  Also, it's probably comparatively rare that a customer who's already in line ready to pay will decide to give up the purchases altogether due to issues with someone in front of the line; in almost all cases they'll simply wait the extra time, very annoyed for sure, but ultimately the store does not lose the transaction from the customer.

Now yes, on a longer term basis, if a store consistently and frequently runs into these kinds of issues, some customers will definitely stop going to the store in preference for another place without such frequent issues, so it is still in the store's interest to minimize these kinds of issues.  But beyond a certain threshold of "it doesn't happen often enough, or take up too much time or otherwise impact customers negatively", the store basically can absorb the occasional extra major time spent (and the more frequent little extra seconds here and there) with minimal risk of loss purchases or loss customer retention.  And so there's no incentive from the store's perspective to get rid of the coupons or loyal programs or whatever, despite the inefficiencies they can introduce to the checkout process.

To put it differently:  yes, what happened sucked for Simon.  But will that rather unfortunate incident be enough to get even Simon to permanently boycott the store and shop elsewhere?  I'm guessing no?

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #189 on: November 16, 2018, 01:15:46 PM »
We should perhaps also consider the collective time cost of the incident causing everyone to make all these posts about it :P

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #190 on: November 27, 2018, 04:54:43 PM »
Right, I wouldn't boycott the store because of this one incident. Even though the store and the cashback program make money from this at the expense of customers' time, it's better for me to stay with this store than to walk anywhere further.

I enjoy the time spent ranting. :lix-grin: It may have been longer than the wait in the shop, but rants free the mind.





Let's all be merry and cheerful and in holiday mood! Cookies and tea for everybody's enjoyment. Cinnamon odor in the air. Red and golden ornaments. And animated tree gifs for everybody's homely nostalgic 90's website feelings.

How shall we be merry today? No focused rant about a single topic, but some small thoughts instead.

There is no widespread good Windows package manager. Most widespread is Steam, but that's closed-source malware and hard to get your software accepted. NuGet is promising, but who has heard of it? I bet that, were I to ship Lix with NuGet, everybody on the forum would still download Lix manually. You wouldn't want to install a package manager for one single application.

Chess world championship, they drew 12 games out of 12. I've only watched the 12th game on livestream. I didn't even pay attention to the scheduling; instead, I was hacking on my Lix release scripts to auto-build Win32, Win64, and Linux 64-bit. Still, the game commentary was exciting enough that I ditched my planned nap and drank 4 liters of tea instead.

Shogi (Japanese chess with flowery-named pieces such as odor cart) looks like a nice game, favoring romantic attacks even more. No more woodpushing to draw 12 out of 12, instead happy tactical king hunting every time!



Of course one would have to learn the kanji first, but let us assume that everybody can read the kanji easily. Even then, Shogi has massive UI problems.

Pieces should be colored by type. Piece ownership is indicated by pointing direction, but for this, the pieces should look much more triangular. Their existing obstuse arrow shape is almost rectangular. Some people have invented pieces that you can more easily recognize.



A possible approach, but these should be colored by type, and they should be much pointier.

But now, the roadblock is that this would never last beyond practice games. Even westerners easily memorize the kanji after a few games. Any tournaments would be played with the traditional pieces anyway. If one were to learn Shogi, one should use kanji pieces as early as possible, to reduce friction.



Compare the Shogi situation with Skat, a popular card game in Germany that is also played on a high level at tournaments. Here, the 4-color deck ("Turnierbild") has become tournament standard. It shows that some excellent UI improvements can overcome the hump of other people's accustomization to inferior standards.

40 years ago, in West Germany, 2-color French decks were standard, and in East Germany, the German deck with 4 completely different suits in 4 colors was standard. I believe that the Turnierbild has only gained enough traction because there was a need for a universal deck, and the Eastern Germans were already accustomed to 4-color decks. But anyway, the standard improved across Germany, which is what counts in the end.

Sadly, Turnierbild isn't used in Doppelkopf tournaments. At least my peer group at university played Doppelkopf exclusively with the 4-color Turnierbild.

In online gaming, you can choose your deck/pieces independently from what the opponents see on their machines. That's helpful to give less popular standards an opportunity to rise. All my UI considerations today are about offline games where everybody sees the same standardized playing material.

Ah, the some small thoughts became a UI rant again. :lix-evil:

-- Simon
« Last Edit: November 27, 2018, 05:04:59 PM by Simon »

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #191 on: November 27, 2018, 05:14:00 PM »
You gave up your nap? Clearly you don't have enough pets. I have discovered that keeping the heat turned down low not only saves on the heating bill but encourages the pets to come and nap with me. Had an hour long nap yesterday because I had lost sleep Sunday night. Big Nubs actually crawled under the blankets with me, which he hardly ever does. Getting up from that nap was one of the hardest things I've ever had to do. :lix-smile:

12/12 games drawn? I wonder how many of the 'draw game' rules they obey in the chess tournament. I would assume all of them, even the obscure ones like 'game is drawn if 50 turns pass with no captures or pawn movement' or 'game is drawn if the layout of the pieces is the exact same three separate times.' Keeping track of those without some sort of computer would be rather difficult, I think.

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #192 on: November 27, 2018, 05:58:02 PM »
12/12 games drawn? I wonder how many of the 'draw game' rules they obey in the chess tournament. I would assume all of them, even the obscure ones like 'game is drawn if 50 turns pass with no captures or pawn movement' or 'game is drawn if the layout of the pieces is the exact same three separate times.' Keeping track of those without some sort of computer would be rather difficult, I think.

The rules are actually: a draw may be claimed if 50 turns pass with no captures or pawn moves, or if the same position repeats three times. It's not automatic. Both are very rare in actual play; nearly all draws are by agreement. But these rules are part of the laws of chess, so they always apply.

Serious players are required to write down their moves, so it's easy to see when a 50-move situation is coming up, and for threefold repetition, the most likely situation is moving back and forth, not repeating a position from earlier in the game; captures would tend to prevent that.

(Although hilariously, there was a game where nothing was captured, and both sides' pawns got into a deadlock that prevented any progress. One player was stubborn and wouldn't agree a draw, and was confounded when his opponent successfully claimed one under the 50-move rule. I don't know who the players were; I found this game on Tim Krabbé's website that collects unusual games.)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #193 on: November 27, 2018, 06:20:32 PM »
I have mixed feelings about package managers. I've experimented with Linux in the past (though not so much recently), and one of the common frustrations I had was that the packages in the repositories were frequently out of date. But it's convenient for browsing for available software, and also convenient for automatic updates. One of my constant frustrations with NeoLemmix and Lix is updates.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #194 on: November 27, 2018, 11:37:49 PM »
Shogi (Japanese chess with flowery-named pieces such as odor cart)

"odor cart":  sounds like a bad translation perhaps?  I believe with languages like Japanese if you attempt to only translate individual Kanji characters in isolation and ignoring contexts, you can sometimes end up with results that have almost nothing to do with the actual words or phrase in question.  Also, doesn't some Kanji characters have multiple very different meanings (almost like homophones but actually written exactly the same way as well?).  Do we know if "odor cart" isn't just creative cherry-picking on a particular reading of the Kanji in question, even though it isn't actually the intended/correct reading being used wrt the name of that particular Shogi piece?

Quote
Pieces should be colored by type. Piece ownership is indicated by pointing direction, but for this, the pieces should look much more triangular. Their existing obstuse arrow shape is almost rectangular. Some people have invented pieces that you can more easily recognize.

I went to wikipedia article for Shogi, and within the first sentence where it also mentions other chess-like variants in Asia with links to respective articles, I clicked through all of them and they all do use different colors to denote sides.  Japanese Shogi seems unique in not using colors to differentiate sides.

That being said, if you can actually read Kanji, I think perhaps it's sufficient to tell that some piece's Kanji are upside down from your POV, and therefore not your side?  I do agree though, a more prominent visual way to denote sides would seem preferable, especially for spectators.

On the other hand, none of the variants used different colors for different types (if by "type" you mean like pawns vs kings or whatever their equivalents are in Shogi).  Then again, neither does Western chess, although in that case the types differ by shape.  It seems for the Asian variants listed in Wikipedia, they either use different shapes for types, or else I guess the difference in Kanji is sufficient for the variants where Kanji are used on the pieces to denote types.

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #195 on: November 28, 2018, 12:29:49 AM »
"odor cart":  sounds like a bad translation perhaps?  I believe with languages like Japanese if you attempt to only translate individual Kanji characters in isolation and ignoring contexts, you can sometimes end up with results that have almost nothing to do with the actual words or phrase in question.  Also, doesn't some Kanji characters have multiple very different meanings (almost like homophones but actually written exactly the same way as well?).  Do we know if "odor cart" isn't just creative cherry-picking on a particular reading of the Kanji in question, even though it isn't actually the intended/correct reading being used wrt the name of that particular Shogi piece?

It's just Simon poking fun at the weird way the Japanese language works. 香車 means "incense chariot", but 香 by itself can mean "smell".

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #196 on: November 28, 2018, 12:57:41 AM »
Ah okay, so cherry-picking it is. :P Unclear from OP whether it was tongue-in-cheek vs serious.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #197 on: November 28, 2018, 05:29:28 AM »
Quote
Pieces should be colored by type.

I'm actually a little surprised by this.  Wouldn't having actually different shapes like Western chess pieces do, be even clearer for telling apart piece types?

Is the color by type idea mainly to compensate for having to recognize Kanjis?  The pictorial approach seems mostly sufficient to me without also having different colors, though maybe the pictures used could be slightly better in some cases.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #198 on: November 29, 2018, 05:26:38 PM »
Quote
You gave up your nap? Clearly you don't have enough pets.

Yeah, I should not sacrifice naps. Watching the chess championship was a rare exception. In general, I shun television and try to avoid whatever imposes similar artifical schedules on my life.

Pets cost a lot of time. >_>;; I have too many hobbies already and pets are like an extra hobby.

I admit that I have gedankenexperimented with an African porcupine as a pet. Must build lots of mutual trust before you can safely cuddle.

Quote from: Dullstar
frustrations I had was that the packages in the repositories were frequently out of date.

Yes, I had the same frustration in Debian. It's slightly better in Ubuntu. But for two years now, I've been very happy with Arch's rolling releases to stay cutting-edge.

Quote from: Dullstar
constant frustrations with NeoLemmix and Lix is updates.

Right, this is the main problem.

Probably, many Windows people shun updates because they're so hard unless automated.

I shun installing new software that I don't clearly need, but I want to update the software that I decide to install.

"odor cart":  sounds like a bad translation perhaps?
attempt to only translate individual Kanji characters in isolation
results that have almost nothing to do with the actual words
It's just Simon poking fun at the weird way the Japanese language works. 香車 means "incense chariot", but 香 by itself can mean "smell".

Right. "Odor cart" came from a friend, he translated the kanjis separately. Even with the correct translation "incense chariot", it's still a flowery name for my taste -- incense has little to do with war, the theme of chess-likes.

Well, same criticism applies to bishop from chess.

Both stabs were intended: The floweriness of the name, and how Japanese connects unrelated kanji to give every single one a different meaning.

Quote
Pieces should be colored by type.
Wouldn't having actually different shapes like Western chess pieces do, be even clearer for telling apart piece types?

Two Shogi rules:
  • When you capture a piece, the captured piece goes to your personal reserve. You may drop these pieces under your control back onto the board.
  • When your piece moves far enough ahead, you may promote the piece, i.e., replace it with a more powerful piece after its move. Already-promoted pieces cannot promote again. Promotion is permanent until the piece is captured; then, its unpromoted type goes to the opponent's reserve.
This restricts the physical design. Standard design here is two-faced pieces with a pointy side. To show control, orient the piece to point away from its controller. To show promotion, flip the piece bottom-side-up, revealing the kanjis for the promoted type on the original piece's bottom side.

Color-coding by player is not feasible with two-faced pieces because color cannot change during capture.

Shape-coding by type is hard because the piece must rest physically stable on the game board when flipped. Maybe design 3-D shapes that are merely ((2-D shape per type) x unit interval).

Or design a four-faced piece (e.g., some variant of a cube) to have symbols for all four states: player A or B, unpromoted or promoted. But hm, that object will probably show too many faces on its left/right outer sides by accident when it's not meticulously aligned straight...

Quote from: ccexplore
Is the color by type idea mainly to compensate for having to recognize Kanjis?  The pictorial approach seems mostly sufficient to me without also having different colors, though maybe the pictures used could be slightly better in some cases.

I'm concerned about understanding the board at a glance. Chess, Shogi, Go, ..., they're all about pattern recognition. Anything that makes glancing hard strikes me as contrary to the game design.

Letters, and thus kanji, are harder to recognize than symbols or shapes.

Colors alone can already be problematic (color blindness, weak conventions for the meanings). Colors are best to further differentiate shapes. It's best when there is only a handful of different types to distinguish:



-- Simon
« Last Edit: November 29, 2018, 05:33:06 PM by Simon »

Offline nin10doadict

  • Posts: 330
  • Guy who constantly misses the obvious
    • View Profile
Re: Simon blogs
« Reply #199 on: November 29, 2018, 08:42:45 PM »
Pets are expensive and time consuming, yes. They are nice but they are a big commitment.

As an avid Tetris Attack player, I will say that color is the main way you will differentiate the blocks in your mind when you get good at the game. The fact that there are only 4 different shades of gray in the GameBoy version makes it much harder to play, as they had to try to differentiate the blocks more by redesigning the patterns on them.
I do wonder if play would suffer if we had different color blocks but they were all the same shape? Without any way to test it myself I can't say for sure, but I think it might.

I was unaware that captured pieces could be used by the player that took them in Shogi. Neat idea, but indeed restrictive to the piece design.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #200 on: November 30, 2018, 12:51:38 AM »
Even with the correct translation "incense chariot", it's still a flowery name for my taste -- incense has little to do with war, the theme of chess-likes.

Yeah, that was curious enough for me also, that I had to check out what Wikipedia has to say.  Turns out the "incense" part apparently originated from Buddhism at some point in the history of the game in Japan (emphasis below added by me):

Quote
According to Kōji Shimizu, chief researcher at the Archaeological Institute of Kashihara, Nara Prefecture, the names of the Heian shogi pieces keep those of chaturanga (general, elephant, horse, chariot and soldier), and add to them the five treasures of Buddhism (jade, gold, silver, katsura tree, and incense).

So I guess it was a historical/cultural artifact that we wound up with incense chariot. :-\ Gold, silver and jade are also used in some of the other Shogi pieces' Kanji names, but I guess at least we westerners would be more used to also reading them in some contexts more as rankings rather than the literal metals/minerals, due to our tradition of gold/silver/bronze representing #1-3.

---------

Also thanks for clarifying with those Shogi rules, that explains a lot and indeed makes it sensible to complement Shogi piece types with color in addition to the traditional Kanji.  I'll assume that traditionally the native Japanese figured if you are educated enough in Japan to know how to play Shogi, you are expected/assumed to have no problem proficiently recognize the comparatively few Kanjis used on the pieces (given IIRC from somewhere I read or heard, Japanese adults are expected to know something like some hundreds or thousands [!] of Kanji characters for proficiency in general reading comprehension).  Not saying this justifies not having better/additional means of differentiating types, merely that the natives probably didn't even think it was an issue.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #201 on: December 04, 2018, 07:08:55 PM »
Quote
(given IIRC from somewhere I read or heard, Japanese adults are expected to know something like some hundreds or thousands [!] of Kanji characters for proficiency in general reading comprehension)

Knowledge of around 2000 kanji would be needed for a "normal" adult level of proficiency, I believe. Far more than that exist, but the obscure ones are generally written with furigana (ie: the reading of the kanji written above / alongside it in hiragana, which is another Japanese script that's more comparable to the English alphabet than it is to Chinese characters).

I've probably gotten a bit rusty nowdays, but at one point I was able to read about 400 and write about 150. Even that point was hard enough to read; although I'd guess it's probably not so bad when you're reading and writing them on a daily basis as a normal part of life.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #202 on: January 09, 2019, 02:41:49 PM »
Start by feature-bloating

The quote by Antoine de Saint-Exupery: Perfection [in design] is achieved not when there is nothing more to add, but when there is nothing left to take away.

The corollary is: To make a new program, system, game, programming language, ..., you must bloat the project with features first. Not merely brainstorm to think about features. You must implement the features at the cost of your time and resources, and then experience the features during normal use.

And then be courageous to remove some features again, and convince the userbase that the resulting project is better. Or start a project from scratch if the previous design is good enough to hold on its own. The decision to adapt or start from scratch is hard.



I've been far too hesitant applying this wisdom (bloat to try) to my own projects.

I'm not busy with Lix these weeks, pursuing life & other interests. But certainly, I will return, as I always have for ~13 years. I should work on the Lix physics changes that have been on the backburner for 1.5 years. Either 0.10 or 0.11 should be an unstable version where we test a ton, and where we change physics even with patch releases (0.10.5 -> 0.10.6). Then 0.12 will be the next stable that should ideally hold for at least 1 year, my rough expectation for stable physics.

Any details are best left for a strategic post in Lix in the future. :lix-grin: The current physics, i.e., the 0.9 physics, will remain stable for several months.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #203 on: January 21, 2019, 12:41:39 PM »
Orange juice

Hotels serve breakfast, and in Germany, they offer a lovely variety of Brötchen (bread rolls), Aufschnitt (slices of cheese, salami, ham, ...), many cereals, coffee, tea, ... and juice. Nearly every time, there are two choices of juice.



One of the two juices is always orange juice. Everybody wants orange juice. It's pure sugar, some vitamins, fresh, pure in taste, kickstarts your economy circulatory system, goes with everything, it's perfect. It's exactly what you want in the morning to be fit for a taxing day.

The other juice option varies between hotels. Sometimes, it's apple juice. Sometimes, it's multivitamin juice. Apple juice tastes pale in comparison, and multivitamin juice is weird. People rarely want either such juice on its own. They accept it grudgingly when the dispenser for orange juice is already empty. It's the consolation prize for when you're too late at the breakfast and the clerk hasn't yet refilled the orange juice.

Now assume you're a hotel administrator. Your job is to order food and goods to keep the place running. Each noon, you observe how much orange juice and how much apple juice has been consumed that morning. You see that they're about 50:50. Will you conclude that they're equally wanted? Or will you conclude that your clerks are too lazy to check and refill the orange juice dispenser frequently enough?

Nice psychological fallacy. I'm not sure if this already has a name: To wrongly deduce from demand of the second-best good that the second-best good is worth more.



Writing prompts

There are these fancy forum games or level review threads: You pick a topic, say something nice about it, and say something bad about it. I feel like such a writing prompt has a chance to, either on the nice section or on the bad section, generate reviews that are too short and obvious. That's not what the prompt's designer intended; they intended neutral reviews.

The prompt should rather be to pick something you love, and write a one-sided negative review on it, review all its terrible features, wrong design choices, ... With lots of detail. Or pick something you don't like or don't care for, and praise its strong points. (If the topic is prefixed, such as the next level to be reviewed, you must honestly decide whether you like that level or not, and skew your review the opposite direction.)

For clarity, because such a writing prompt is uncommon, the first sentence should explain that the review is deliberately skewed against the writer's overall opinion. It's also good to have several people write on the same prompt, to produce at least one review of each skew.

Maybe I should review some computer/board games like this. Or write nice things about some rant topic? Look how convenient all the white webpages are: I can install a single browser plugin that inverts all colors, and it'll turn every website black. Were many websites nastily dark already and easy on the eyes, then I'd have far more hassle adjusting the plugin to each site. And if web designers decide to decorate their website with token smiling people that do nothing related at all, the color inverter will give them cyan skin, they'll look like Frankenstein's monster. Allows me to focus on the facts in the text.

Very hard to not fall into irony. <_< Irony shouldn't be the point of the prompt.

-- Simon
« Last Edit: January 21, 2019, 01:06:16 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #204 on: March 01, 2019, 01:48:58 PM »
Game mechanic ideas

These are very loose ideas.

Three piles. The game consists only of playing cards. Each player has their cards distributed among 3 personal face-down piles. Each turn, you may pick up exactly one of your piles, and do something with the cards: Maybe they're action cards, maybe they're worth points only in certain combinations, maybe you can redistribute them among the piles, ...

The catch is that you cannot pick the same pile twice in a row. If you put all your good cards in one pile, you can only use them in even-numbered turns, and your opponents will know exactly that you can't do anything at all in odd-numbered turns. If you distribute your good cards only among two of three piles, you can play good stuff every turn, but your opponents will know exactly when the stuff is coming. To keep your options open, you'd have to use all three piles.



Neighbors in a circle. This needs at least 5 people, and ideally, exactly 5. They're sitting in a circle. You're in a weak alliance with your immediate neighbors: Maybe for each pair (one pair is you + left neighbor, another is you + right neighbor), each member of the pair scores based on something that the pair constructed during the game. Thus, you'll be happy if your neighbor does well, but you won't help them unconditionally.

The catch is that you can attack opponents who sit exactly 2 seats away from you. If you're player C during player order ...-A-B-C-D-E-F..., then players A and E aren't your neighbors, therefore you have an honest interest in harming them.

Assume you (C) want to attack A. B will discourage you from attacking A because B is A's neighbor and has a moderate interest in A doing well. B will suggest that you attack E instead. Then D will be unhappy and encourage you in your original plan to attack A. Then B and D will get into an argument. When D's turn comes, he will be happy to attack B, which makes E and F very happy, etc.

It is desirable to have an odd number of people in the circle: Otherwise, there are two disjoint sets of people who get into arguments only with other members of the same set.

-- Simon
« Last Edit: March 01, 2019, 02:54:46 PM by Simon »

Offline kieranmillar

  • Posts: 286
    • View Profile
Re: Simon blogs
« Reply #205 on: March 01, 2019, 05:42:20 PM »
Three piles. The game consists only of playing cards. Each player has their cards distributed among 3 personal face-down piles. Each turn, you may pick up exactly one of your piles, and do something with the cards: Maybe they're action cards, maybe they're worth points only in certain combinations, maybe you can redistribute them among the piles, ...

The catch is that you cannot pick the same pile twice in a row. If you put all your good cards in one pile, you can only use them in even-numbered turns, and your opponents will know exactly that you can't do anything at all in odd-numbered turns. If you distribute your good cards only among two of three piles, you can play good stuff every turn, but your opponents will know exactly when the stuff is coming. To keep your options open, you'd have to use all three piles.

If you ever get the chance, try the board game Mombasa, which uses this. You pick 3 cards from your hand to make up your resources to use that turn, and at the end of the turn, each one goes into a separate discard pile, you may then pick up only one of these discard piles to replenish your hand. So as turns progress the piles grow by necessity and the resources you want are split out between them.

Neighbors in a circle. This needs at least 5 people, and ideally, exactly 5. They're sitting in a circle. You're in a weak alliance with your immediate neighbors: Maybe for each pair (one pair is you + left neighbor, another is you + right neighbor), each member of the pair scores based on something that the pair constructed during the game. Thus, you'll be happy if your neighbor does well, but you won't help them unconditionally.

The catch is that you can attack opponents who sit exactly 2 seats away from you. If you're player C during player order ...-A-B-C-D-E-F..., then players A and E aren't your neighbors, therefore you have an honest interest in harming them.

Assume you (C) want to attack A. B will discourage you from attacking A because B is A's neighbor and has a moderate interest in A doing well. B will suggest that you attack E instead. Then D will be unhappy and encourage you in your original plan to attack A. Then B and D will get into an argument. When D's turn comes, he will be happy to attack B, which makes E and F very happy, etc.

It is desirable to have an odd number of people in the circle: Otherwise, there are two disjoint sets of people who get into arguments only with other members of the same set.
This mechanic of working with your direct neighbours appears in two board games I know of. The most well known is 7 Wonders, which is a card drafting game, everyone gets 7 cards, picks one, passes the hand clockwise, and keeps going until no cards remain, and you try to build the best results out of this. You can buy resources from your direct neighbours if you didn't get the ones you need, and there are some other things too that care only about your direct neighbours. Its well known because it scales from 3 - 7 players effortlessly without extending the length of the game.

Perhaps closer to your idea is a board game called Between Two Cities. Each player builds two cities, each in combination with a different neighbour. Each turn you pick two tiles and add one to one city and the other to the other city, and these tiles score under various rules. When all the tiles are placed, each city is scored and each player counts the worst scoring of their two cities they helped to build.

Neither of these games involve political attacks in the way your idea does, but the remaining mechanics might give good ideas for how to go about the rest of the game.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #206 on: March 06, 2019, 12:27:48 PM »
Thanks for the game recommendations!

I have played 7 Wonders, albeit only with 6 or more people. With so many people, somebody on the other side of the table will win seemingly at random because their neighbor screwed up. It'll be a better competitive game with 3 people. Even then it's still too little direct control for my taste, but that's personal.

Mombasa sounds like I'd like it casually.

Yeah, Between Two Cities comes closest, lacking the diplomacy of attacking distant players. I'm hesitant to play heavy diplomatic games anyway. As soon as games rely on diplomacy foremost, the exact rules of the core game are secondary. But I'm interested in game design by itself, I want a-ha moments from juicy rules and the resulting challenges.

Scoring games feel weird: You do many things that feel unrelated. I always feel like designers implement scoring and victory points when they're lazy and can't think of a coherent goal that's supported by the rest of the game. :lix-tongue:

-- Simon

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #207 on: March 06, 2019, 10:48:03 PM »
here's an interesting puzzle which is clearly inspired by the game Mombasa. The goal is to get all seeds into the big bowl; you can watch and see how the rules work. See if you can solve it for yourself. :D

the game is "Jewels of the Oracle" and old PC point and click game. This particular puzzle was always one of my favorites from the game because it's fairly unique and somewhat challenging but pretty easy once you figure out all the rules.

https://youtu.be/Usz4PgEuwhA?t=91
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #208 on: March 07, 2019, 12:48:22 AM »
Mombasa is not Mancala. :P

I remember seeing this singleplayer puzzle before, didn't remember the solution anymore and found it again. Very nice puzzle, thanks! Here is the raw description of the puzzle.

Singleplayer Mancala with 4x2 seeds.
  • There are 5 bowls arranged in a circle. 4 bowls contain 2 seeds each. The 5th bowl is empty, it is the goal.
  • You win once all 8 seeds are in the goal. Play consists of a series of moves until you either win or lose.
  • A move consists of taking into hand all seeds from a non-empty non-goal bowl and sowing one of the taken seeds into each subsequent bowl (irrelevant whether or not it is the goal), going around the circle counterclockwise, until the hand is empty.
  • You lose if the last seed of any move falls into an empty non-goal bowl.
  • If the last seed of a move falls into the goal, you have free choice for the next move; otherwise, you must make the next move from the bowl that received the last seed.
-- Simon
« Last Edit: March 07, 2019, 12:19:40 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #209 on: March 10, 2019, 02:54:36 PM »
Mombasa is not Mancala. :P

oops! :D

Come to think of it; I had thought Mombassa was a dance!

The description of Mombassa reminds me of a card game called Pit. Which is a turnless game that sort of resembles stock market transactions. THere are different types of cards; "wheat, gold, oil, sugar, etc." The goal is to trade cards until you're entire hand is composed of just one type.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #210 on: March 12, 2019, 04:00:20 PM »
Mancala is a really good game. I first came across this game in hoyle board games but it got removed from the hoyle games in future series. There's a game called rummy squares in hoyle games which is probably technically rummikub an interesting little game. You have to get rid of all your tiles to win this one.

Rummikub itself actually brings up a certain debate, now the debate is how long can you have for your turn. Only reason it brings up this is because the longer you have for your turn you have a better chance of clearing your tiles I feel.

Have you tried Rummikub yourself Simon? It's a great game I feel.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #211 on: March 17, 2019, 01:41:28 PM »
Quote from: mobius
Pit. Which is a turnless game that sort of resembles stock market transactions. THere are different types of cards; "wheat, gold, oil, sugar, etc." The goal is to trade cards until you're entire hand is composed of just one type.

Again vastly different from Mombasa in design, the only common feature seems to be that both games have cards.

But yes, Pit is excellent. Near-perfect simplicity, and it takes cunning to track dangerous trades. I lack a dedicated Pit deck, but I've played Pit several times with two bridge decks: Use all 8 tens, all 8 nines, all 8 eights, ..., until you have one octet per player. No wild cards. The winner scores as many points as printed on his octet.

Quote from: grams88
Have you tried Rummikub yourself Simon? It's a great game I feel.

I remember reading the rules of Rummikub, it's a rummy variant where everybody can rearrange any meld.

I enjoy Japanese Mahjong, it's the closest rummy-like that I play. Sadly, rules are so fiddly that it makes no sense to learn Japanese Mahjong unless one will play semi-frequently. Some interesting decisions, most importantly in the balance of offense and defense: You must discard one tile at end of turn, and if your discard completes somebody's hand, you pay the hand with your own points. Each player's discards remain open information. Still considerable luck.



Some hard problems in game design.

Starting positions/order. Lix has no randomness except for the shuffling of player positions at the beginning of a match. The server shuffles and transmits the shuffle in the start-game packet.

Chess colors are distributed at random, too, but at least tournament organizers will balance the number of times you get white or black throughout the tournament. Same for Go tournaments, and, in addition, the second player gets a compensation score bonus. Even Caylus, a boardgame for 2-5 players, shuffles the player order, pays compensation money to the later-positioned players, and has no other randomness.

In Bowling, every player plays 10 frames, and players alternate between frames. First player is typically random. You cannot affect the ball or pins of other players. Nonetheless, it is advantageous to go last: In the final frame, the last player may choose to throw straight to guarantee hitting some pins, or he may choose a more techniqueful, but riskier curveball to strike and get bonus throws.

Hmm, I said that you cannot affect other players in Bowling. Well. We were bowling recently with IchoTolot. Simon's ball knocks a pin backwards on the lane. On Forestidia's turn, this stray pin deflects her good ball into the gutter, then flies itself into the opposite gutter. On Simon's next turn, the stray pin in the gutter kicks his gutterball back on the lane, leading to some pins getting knocked over.

Some games have simultaneous play, starting position doesn't matter then. Those games quickly become physical and have other cans of worms that require de-worming.

Resigning with ≥ 3 players. With many players, if you leave mid-game, it will affect the other players' relative positional values and winning chances. Few games handle this gracefully. If allowed at all -- and computer games must allow for ragequits and network failure -- it's usually implemented as if the resigner defaulted on every decision. E.g., resigner's units sit around in real-time strategy games, resigner always discards the recently drawn tile in Mahjong.

Two-player games are not affected, the opponent wins immediately (Chess, Go, two-player Magic). Two-team games are also not affected: If all information is open anyway, the teammates may control the resigner's pieces (Axis & Allies, Scotland Yard); if some information is hidden, the resigner's opponents win immediately.

-- Simon
« Last Edit: March 17, 2019, 08:28:04 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #212 on: March 29, 2019, 03:10:59 AM »
Backwards for scrutiny

If you want to copy a drawing, there is the upside-down method: Turn the source image upside down, then copy it, then turn both source and copy right side up.

The idea is that the upside-down source prevents your brain from interpreting what it sees. Thus you will copy all lines and details verbatim. You don't want to interpret, e.g., parts of a face in the source as a nose, then draw a nose guided by your reallife experience about noses, then realize that source nose and copied nose differ considerably in the details.

The same idea works for proofreading text. Read your paragraphs in reverse order. (Within each paragraph, read the words in normal order.) No earlier paragraphs will ever be in your short-term memory, therefore you aren't biased or expecting certain content, thus will stumble over even the subtle mistakes.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #213 on: April 30, 2019, 05:43:51 PM »


Scotland Yard

A board game for 2 teams from 1983, I have the re-release from 1988. I've played it last week several times: 1v1 with Forestidia, and 2v1 with her and IchoTolot.

One player is Mister X and moves invisibly. Only every 5 turns, he must reveal himself.

All other players form a team of detectives and must catch Mister X by moving one of their 5 pawns on the node where Mister X is currently hidden. You can travel by taxi to the next node, by bus between green nodes, or quickly by underground between red nodes.

Rule clarifications. The rules aren't 100 % clear and differ from edition to edition, thus here are our
rule clarifications. (click to show/hide)

House rule. Mr. X draws 3 starting locations, not 1. He secretly picks one of the 3 and returns the remaining 2. Then he plays his first move. Reason: To have a reasonable chance against 5 detectives, Mr. X needs a good starting location.

We had quality fun. We denoted by "wühlen" (burrowing, digging around, uprooting the ground with your nose to find food) Mister X's tendency to hide in a nest of yellow taxi-only nodes (away from green/red bus/underground nodes). Wühlen forces the detectives to either get stuck here, too, or loosely surround the nest, delaying capture attempts.

Some detectives would deliberately "counter-wühl", even speculatively, when they had no good nodes.

When IchoTolot deduced that I, as Mister X, would eventually have to come by a certain path, he quoted Schiller's William Tell: Durch diese hohle Gasse muss er kommen...

Detectives' strategy seems to be to force Mister X to use a double move. Then, detectives can retreat to fast-moving nodes (underground nodes, good bus nodes) and wait for Mister X's next revealing. Your chance to capture Mister X increases dramatically after he runs out of double moves.

Lucki, our Lix package maintainer for Arch Linux, likes Scotland Yard too. :lix-cool:

<Lucki> great game
<SimonN> Hnn
<Lucki> londonlaw is the game in python, sadly abandoned: https://github.com/anyc/londonlaw
<SimonN> Hah. The screenshot even shows no taxi connection between 132 and 126. The out-of-box map is not perfectly clear and we ruled that there is no connection here, glad that the app agrees. And 5 detectives.


-- Simon
« Last Edit: October 09, 2020, 08:49:34 AM by Simon »

Offline 607

  • Posts: 468
    • View Profile
Re: Simon blogs
« Reply #214 on: May 21, 2019, 07:33:30 PM »
I'm pretty sure we've got Scotland Yard, but haven't actually ever played it since we got it. I should remember to try in Summer, using your rule clarifications.

Offline 607

  • Posts: 468
    • View Profile
Re: Simon blogs
« Reply #215 on: May 26, 2019, 09:42:45 AM »
We played it yesterday, following our edition's rules (from 1996, Ravensburger). We did a 2v1, and yeah, it would have probably been more fun with 5 detectives, although it might have been very hard for me in the beginning. What I don't like is that as the game progresses, the chance of Mr. X being caught decreases instead of increasing, which would seem more fun. At some point we decided that I would drop the 2x cards, as if I'd use them the detectives would have no chance to win. Without those, it eventually boiled down to a turn with a 50% chance of being caught, and of winning (because the detectives were running out of tickets).

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #216 on: May 26, 2019, 11:54:53 AM »
We played it yesterday, following our edition's rules (from 1996, Ravensburger). We did a 2v1, and yeah, it would have probably been more fun with 5 detectives, although it might have been very hard for me in the beginning.

Yeah, 5 detectives feels best. Then you can cast a loose net and tighten it slowly, and this feels most rewarding.

With 5 detectives, there is a small chance that Mister X draws a terrible starting position that forces him to double-move before even the first reveal. It's okay to scrap such a game and reshuffle with the same player as Mister X. Or maybe let Mister X choose from 2 or 3 starting tiles after he sees where the detectives start?

Quote
I would drop the 2x cards, as if I'd use them the detectives would have no chance to win. Without those, it eventually boiled down to a turn with a 50% chance of being caught, and of winning (because the detectives were running out of tickets).

With 4 detectives, I felt the same: The detectives will prefer 50:50 gambles to capture instead of netting Mister X.

Quote
What I don't like is that as the game progresses, the chance of Mr. X being caught decreases instead of increasing, which would seem more fun.

Right, this is a problem. Especially with 4 detectives, breaking through the net mid-game is an instant winning position, and detectives should then resign. Games really should start with tight, interesting options (Scotland Yard has this at least), and become even more interesting during play, not less interesting.

It's less prevalent with 5 detectives, where Mister X needs the double moves merely to stay even.

Glad to see your insights!

-- Simon
« Last Edit: May 26, 2019, 12:00:25 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #217 on: June 02, 2019, 04:09:10 PM »
Icho's dice tray

In April, I introduced IchoTolot to the Axis & Allies boardgames. The spark lit immediately, and Icho bought Axis & Allies Anniversary for himself. Excellent choice.

Game tl;dr: Exactly two teams. No hidden information. Strategic piece movement on a map, combat resolution by dice. Lasts from 4 hours to over 12 hours. Heavy compared to most board games, light compared to wargames.



IchoTolot is about to punch cardboard counters from his freshly purchased game



Setup finished, happy Simon (right) looking forward to play



Uwe (reallife friend) and IchoTolot rolling a naval battle

The round wooden dice tray in the pictures is my own acquisition, it doesn't ship with any A&A. But it's a great accessory. You can roll over 10 dice at the same time, and they won't spill on the map or the floor.

Icho wanted a nice tray for himself, too, but there were no good ones at our local game store, and Icho didn't want to pay 30 euros for a nice tray online. I suggested: "A dice tray might be a good do-it-yourself project.", but Icho said: "Sorry, I've got two left hands."

Well, Icho's birthday is coming up in the next months, and occasionally I get an itch for woodworking. In secret, I drove to the hardware store, retracted into my creative cave, and gave him this at yesterday's game night:



Icho's early birthday gift in action



Happy Icho (right) showing the tray's back

The tray is the green area. The black area is a holding pit for unused dice that aren't thrown in the current battle. Reason: It's standard in A&A to provide players with many extra dice, then, even in large battles, you can roll for all firing units at the same time and needn't track hits in your head.

In my round dice tray (see photo with Uwe), we would shove unused dice to the walls of the tray. But that's far from perfect, rolled dice would still get confused with unused dice in the round tray.

As a bonus, Icho's tray fits exactly into a hollow area in his game box. From our first game night, I remembered that his box had some spare capacity, and looked up the exact dimensions of the box online before making the tray.

Icho really liked his new tray, that was highly satisfying to see.

Quote Icho: It's late at night and game may be decided already, but continuing is too much fun...

-- Simon
« Last Edit: June 02, 2019, 10:03:36 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #218 on: June 11, 2019, 11:54:22 AM »
Before teaching boardgames

Situation: You schedule a game night, and decide in advance which boardgame to play. Some invitees already know how to play. Other invitees don't know any rules, but would like to learn and participate.

The problem: How to teach rules to the newcomers, such that
a) any lecturing is short enough so newbs remember everything important,
b) any lecturing is short enough so that regulars will not be bored
c) newbs with a thirst for knowing every corner-case resolution are nonetheless satisfied.

Current approach. In the invitational email,
  • I announce that I will explain most of the rules at the start,
  • I announce that I will explain corner cases during play before they become strategically relevant,
  • I link to the full rulebook (many publishers offer rulebooks as PDF for free) and tutorial videos on Youtube (even tolerable videos may have minor issues), but make clear that studying these materials is optional.
When I'm invited to play other people's games that I don't know, I like very much to study the rules in advance. I like to get a detailed feel for the mechanics. It's only courteous to give everybody else the same chance.

Most players won't read anything ahead of time, it's still normal to introduce comprehensively at game night. Teaching rules live to the interested complete newbie is thus very important, and a separate problem.

-- Simon
« Last Edit: June 11, 2019, 05:10:14 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #219 on: June 23, 2019, 11:54:39 PM »
g++ warnings in C++ Lix

(Long and technical, feel free to pass on this one, future posts will be about games again.)

C++ Lix is obsolete since 2015 or 2016. I dug out and built C++ Lix with g++ 9.1: Install Allegro 4 and enet 1.3, run make, everything will still build smoothly without errors, like 2015 when I obsoleted C++ Lix in favor of D Lix 0.2.

Between 2015 and 2019, the g++ compiler found many new places for warnings though. I like warnings, it's good to compile with most warnings enabled. Example warnings:



Code: [Select]
std::ostream& operator << (std::ostream& o, const Date& d)
{
    if (d.year == 0) o << "000";
                                 o << d.year   << '-';
    if (d.month  < 10) o << '0'; o << d.month  << '-';
    if (d.day    < 10) o << '0'; o << d.day    << ' ';
    if (d.hour   < 10) o << '0'; o << d.hour   << ':';
    if (d.minute < 10) o << '0'; o << d.minute << ':';
    if (d.second < 10) o << '0'; o << d.second;
    return o;
}

Compiler complains about bad coding style, each rightmost statement looks like it's dependant on the if, even though it's unconditional. Only the middle statement is dependant on the if. There is no bug here, but the compiler is right, this is problematic code.

As a kid Five years ago, I liked these nice horizontal alignments with lots of space characters. But horizontal alignment is rubbish, it's bad for version control because of christmas-light-style dependencies, one line goes out, everything goes out and has to be re-spaced. Don't do it.

The function should be rewritten anyway, this is typical newbie code when one doesn't understand formatted output of the language. I accept though that there is a decision of taste/coding convention left behind because it's C++: The ostream formatting flags affect global state and some shun that. Thus we reach for good old printf:

Code: [Select]
std::ostream& operator << (std::ostream& o, const Date& d)
{
    char buf[20];
    snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d",
        d.year, d.month, d.day, d.hour, d.minute, d.second);
    o << buf;
    return o;
}

Shorter, and no branching. I'm merely unhappy about hardcoding the length of the buffer somewhere. This should really be left to metaprogramming: Figure out how long the buffer buf must be from the format string, but I don't know how one would do that.



In C++03, you had the rule of three: When you have a custom copy constructor, a nontrivial destructor, or a custom assignment operator, you probably need all three.

Sometimes, I have assignment operators that immediately exit in case of self-assignment a = a, and perform the default member-wise assignment when &a != &b in a = b;. Since copy construction can't happen as a self-assignment (you can't write A a(a);), I thought that I wouldn't need a copy constructor.

g++ 9.1 now warns that, when I define an assignment operator, the lack of a copy constructor is deprecated. Not even a courtesy compiler warning, but deprecated in the language.

The warning points us to a design mistake elsewhere in C++ Lix: If my fear of self-assignment is really justified, it must be because one member field needs the guarding. That class needs to be examined for rule of three then.

-- Simon
« Last Edit: June 24, 2019, 12:20:21 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #220 on: June 27, 2019, 09:28:51 AM »
Video examination

I need a precise video viewer: Must allow frame-by-frame jumps. Must always display at least (speed of video in frames per second, and the number of the current frame) or (position in milliseconds). Would be nice if it always shows the previous/next frame too.

Use case is speedrun video analysis and exact retiming of recordings.

I know these tools exist, but I haven't found one yet. All you ever find is extravagant video editing suites that crash, consume RAM, or aren't free-and-open-source. I don't want to edit the video; if I ever want to cut video, then ffmpeg on the command line suffices and won't crash.

Amazing how such a seemingly-simple tool (the only hard requirement: it gives me precise numbers) is so hard to find.



Instructions, easier, simpler, ...

We have this topic: How to run Lemmings 3 in Dosbox. Post 1 is the instructions. Post 2 is "Here are easier instructions".

That's terrible. If stuff is introduced with "this is easier", then it's not easy, but it's complicated. If it were easy, the matter would speak for its own easiness, you wouldn't have to say that it's easy.

The topic should explain only one of the two approaches, either L3 CD and L3 hdd directory merged, or separate. With example paths instead of the-full-path-of-your-dosgamesdir. The instructions are for newbs, newbs fear mentally substituting variables in instructions. "Or" is the enemy of simplicity. Examples examples examples!

Another example of complexity that is described as simple: The Murmur (Mumble server) guide to set ACLs (access control lists). This is a massive section for a single, clear task: Make a channel that only certain people can get in. There are two long itemized lists, with several explanations of the non-self-explaining Mumble ACL UI. This long list must be this long (it's is a walkthrough and must be complete because the UI on its own won't help you), but it's riddled with these quotes:
  • "you must have Advanced config checked at Configure -> Settings in order to see the ACL tab for a channel."
  • "Many people have complained about the complexity of ACLs - that they are complicated, hard, and cumbersome. They are none of these if used correctly."
  • "But now you want to make a channel that only certain people can get in. Very simple."
  • "Here is where it appears to become complicated, when in fact it is not at all."
  • "Just click "Add [...]"
No, if it were simple and easy, the instructions would be shorter. Beautiful cognitive dissonance of the writer.

Apart from this writing style, these instructions are very good, complete, and get the task done.

-- Simon
« Last Edit: June 28, 2019, 11:14:16 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #221 on: June 30, 2019, 10:10:28 AM »
I need a precise video viewer: <snip>

All you ever find is extravagant video editing suites that crash, consume RAM, or aren't free-and-open-source. I don't want to edit the video; if I ever want to cut video, then ffmpeg on the command line suffices and won't crash.

Amazing how such a seemingly-simple tool (the only hard requirement: it gives me precise numbers) is so hard to find.

Hmm, wonder if VLC has this kind of feature.  Have you asked around speedrunning communities to see what kind of tools they've been using for this?

I can imagine this being a little hard to search for actually, it's not really the kind of feature you'd typically highlight on a product description page, more like a buried setting in options maybe.

I actually wonder if maybe you can just slap together something quick(ish) using HTML5 video element and JavaScript, and end up being able to achieve what you need inside a web browser.  I'm pretty sure you can get at least millisecond-precision playback position with HTML5 video?  Along that line of thinking, you could also try modifying an open-source media player that you are able to compile yourself as-is.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #222 on: June 30, 2019, 09:48:34 PM »
wonder if VLC has this kind of feature.

VLC shows only seconds, and can only framestep forward. With the plugin "Jump to Time Previous Frame", you get better control and milliseconds, but still no hotkey to framestep backwards, and the plugin often fails after VLC updates.

I'll try Avidemux next. I got this idea after searching in particular for methods to retime speedrunning videos (thus, thanks to ccexplore for the hint), not merely for precise video tools. Haven't tried Avidemux yet, but it's free software, and readily buildable from the Arch user repository.



Heat

It's too hot again, it's too hot all the way, oh what fun it is to rant in a one-man oven sleigh.

Buy a plastic tub, roughly 40 x 40 x 60 cm. I got mine at the hardware store for 8 euros. Fill tub with cold water, place under desk, then rest both feet in the tub. Ideally, your ankles are sunken for optimal circulation of the water's cooling through your entire body. If the tub is too shallow, lay your feet at an angle to sink your ankles.

The tub should have solid plastic walls, no air holes. The tub's handle holes are a necessary evil, but that's okay, the tub will hold a reasonable amount of water still.



-- Simon
« Last Edit: June 30, 2019, 09:58:58 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #223 on: July 01, 2019, 08:08:19 AM »
Heat really bugs me. It's winter now here, so not a problem at the moment, but I'll definitely try that out come summer.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #224 on: July 03, 2019, 11:45:28 PM »
VLC shows only seconds, and can only framestep forward.

Well as you can imagine, framestepping for most lossy video compression algorithms is a lot like managing game physics in Lemmings or Lix.  Advancing from current frame forward to next frame is of course totally supported because that's the normal flow of things anyway.  Whereas stepping backwards actually implies first stepping back a larger amount of time backwards, then advance forward one-by-one until reaching the target time; it's not otherwise possible to get back the previous frame from the current frame.  In Lemmings/Lix the backward jump would be to a previous internal checkpoint; the equivalent in video is called a "key frame", a frame which can be decompressed on its own without relying on data from previous frames.  Similarly, a seek to any position requires similar handling, first going to a key frame, then advance forward to the actual desired point.

With that in mind, it's not surprising that oftentimes seek is implemented in a less precise fashion, that merely jumps to the nearest key frame (even though it's technically not the right time you want to seek to), then just stalls (no display of new frames) until the playback time reaches the next key frame (so now what's displayed is finally back in sync with the playback time), at which point normal flow resumes thereafter.  For the kind of uses "your grandma" needs (eg. seek forward past some commercials, or seek backward to get back to something missed due to distractions), such an imprecise seek is nonetheless usually good enough.  So yeah, it might be harder to find support for backward framestepping.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #225 on: July 31, 2019, 12:14:48 PM »


Christmas tree problem

You have a fir tree and want to decorate it with christmas lights.



The fir tree's green bushy "surface" is cone-shaped, with a circular boundary at the bottom.



You also have n candles. These are about to be placed on the fir tree.

In reality, the candles would be connected by electrical cable, which would restrict the candles' distribution on the tree. Assume that the candles need no electricity, or that the cable between any two candles is arbitrarily long.



Task. Distribute the n candles on the fir tree such that the candles are nicely spaced apart from all other candles. You may place candles on the boundary.

Precisely: Given a distribution D of the candles, compute the minimum of all distances d(k, k') between all candles kk' of D. We call this minimum f(D). We want to maximize f. Thus, denote by M the supremum of the minimum distances of all distributions, M = sup { f(D) : D is a distribution }. Finally, find an arrangement of the candles D that attains f(D) = M. If no such arrangement exist, instead find a sequence (Di) of arrangements such that the sequence of minimums f(Di) converges to M.

In a variations of the christmas tree problem, you're encouraged to avoid the boundary, too. Then, for each distribution, don't merely compute the minimum of all candle-to-candle distances, but also the minimum of all candle-to-boundary distances, and use the minimum of these two minimums. Across all distributions, maximize this value.

Example. Given only one candle, put it anywhere you like. If you'd like to avoid the boundary, too, then put the lone candle at the top of the tree.

Example. Given two candles, even if distance to the boundary doesn't matter, the best distribution depends on the shape of the cone. If the cone is very tall and thin, put one candle at the top and one on the circular boundary at the bottom. Otherwise, if the cone is squat and low-risen, put both candles on opposite points of the boundary.

Example. If your christmas tree is not a tree at all, but rather the unbounded real line, you can space the candles arbitrarily far from each other. This is very nice.



Application. If your christmas tree is instead the space of all colors, and you have 8 Lix player colors, find a distribution of 8 colors such that no two colors look more similar than necessary. This is hard, especially if you, in addition, want to avoid black because black lixes looks too much like the boundary level background.

End. The christmas tree problem is really about abstract metric spaces, not christmas trees, but christmas trees inspired me to first think about this problem in detail. I don't know whether this problem is known by other names in mathematics. I don't know whether it's more common to avoid the boundary or not.

-- Simon
« Last Edit: July 31, 2019, 02:22:18 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #226 on: July 31, 2019, 07:06:39 PM »
With regard to Lix specifically, which color tends to be the most visible? Perhaps every player should see their own lixes in that color?
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #227 on: July 31, 2019, 09:39:14 PM »
I really don't think that's a good idea. Players tend to get attached to their favourite colours and want to keep playing as them :)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #228 on: July 31, 2019, 10:08:57 PM »
To be clear, this is mostly a solved problem for Lix, correct?  Hard to imagine how you'd do better for 8 with rainbow + black & white.  Basically the 8 corners of the RGB-space cube.  Though I suppose it is interesting to wonder for the case where black is also treated as boundary to avoid, whether there may be other winning configurations not using the remaining corners of the cube.

Obviously, you can also consider making lixes look different by other attributes besides color, but given how small the sprites are, I suspect it'd be tricky to create other visual differentiators as clear as color would be.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #229 on: August 06, 2019, 04:50:46 AM »
With regard to Lix specifically, which color tends to be the most visible? Perhaps every player should see their own lixes in that color?

Lovely idea for future projects. It would also obviate GUI to pick color. Fewer choices. I took (Player A's color on A's machine is same as player A's color on B's machine) unquestioned from physical board games.

I draw local player's lixes on top of everybody else's. Often, that's exactly want we want. Downside: Lone enemy attackers are invisible in an own dense crowd. Although (automatic color choices, local player gets best color) would have same problem.

I really don't think that's a good idea. Players tend to get attached to their favourite colours and want to keep playing as them :)

Yeah, I believe I don't want (fixed color that each local player uses for themself) in Lix.

#1 reason: people really care about the color. Raymanni even wants extra colors (8 -> 12) and would be happy to keep the player limit at 8; then, extra colors would be completely irrelevant to physics.

#2 reason: People in voicechat refer to other players by color. Opponents' colors must be clearly visible.

#3 reason: The replay format identifies teams by color.

#2 and #3 would work with server-side (for each team, fix a color across all machines). But since some color has to be picked and transmitted anyway, we can let the people pick it, they love it.

To be clear, this is mostly a solved problem for Lix, correct?

Right, unless Raymanni wants extra colors. Mainly, I wanted to write about the abstract problem, less about Lix.

Quote
Hard to imagine how you'd do better for 8 with rainbow + black & white. Basically the 8 corners of the RGB-space cube.

Neither the 1-metric nor the 2-metric in the RGB cube agree with the human visibility metric. Red (255, 0, 0) and black (0, 0, 0) are 255 apart and are clearly distinguishable. Bright green (0, 255, 0) and bright cyan (0, 255, 255) are also 255 apart, but far less disginguishable than red and black.

Sorry for late answers! More on ccx's ideas later.

-- Simon
« Last Edit: August 06, 2019, 05:00:36 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #230 on: September 08, 2019, 09:39:56 PM »
Quote from: ccx
given how small the sprites are, I suspect it'd be tricky to create other visual differentiators as clear as color would be.

Right. Glaring colors with different lightness are good and easy to implement. The main point of the post was to explain my reluctance to implement Raymanni's desire for more than 8 colors, because 12 colors are harder to christmas-tree-distribute than 8 colors are.



Many news

I'm a software engineer by profession now.

The project is firmware maintenance and development in C++ on Linux. The firmware runs on electrical rectifiers attached to solar panels. My team is 7 people, I get along really well, and occasionally troubleshoot their problems with git.

The job interview was more about Lix than about my formal studies.

After I defended the PhD thesis in September 2018, I spent until April 2019 bugfixing the thesis based on both professor's thorough findings. This was a tricky decision, I could have published immediately without penalty, but I wanted the thesis to be solid. I didn't look for a job much while debugging the thesis. That's why it took 10 months from defense to job. But it's all good now.

Akseli: I solved the Lasertank level 40, Down the Drain. It's really a Sokoban level. Years ago, I solved levels 1-39 and many past 40, but always got stuck on level Down the Drain.

-- Simon

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #231 on: September 08, 2019, 10:42:11 PM »
Lix has opened many avenues for you, welldone on getting the job Simon. :thumbsup: I'm glad you are settling into the job well.

I remember in my younger days those (Lasertank) levels were quite difficult and I don't think I got too far but I must give it a try in the future as I'm getting quite good at those Sokoban games in my present days. I enjoyed making my own levels and having my brother try to complete them, it's a good little game which I recommend to any sokoban fans.

There was game I completed recently which was the (Lmarbles) game which is based on a game made a long time ago where you had to copy the order of the molecules to complete the level. In Lmarbles you just have to get the order of the colors by moving them around until you get the right design or order so to say.

(Chuck's challenge) was a really good game I thought and there was a lot of levels where you had to move boxes around like the Sokoban type levels and some of them would drive you crazy.

In regards to the color's in Lix, I would try to avoid any color that looks similar to any of the other colors that have been implemented. Maybe this could be an issue if you were to implement more colors. I remember in worms Armageddon the colors Cyan and green felt as if they were too similar but I wonder if that is more a isolated problem with myself rather than with others. Anyway your lix color looks more like blue so no worries in that regard. :)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #232 on: September 09, 2019, 02:12:33 PM »
Right. Glaring colors with different lightness are good and easy to implement. The main point of the post was to explain my reluctance to implement Raymanni's desire for more than 8 colors, because 12 colors are harder to christmas-tree-distribute than 8 colors are.

This is a stab at what one might do for 12 colors, excluding black as a color:


Some colors are not quite so distinct compared to the current 8, but I think above might still be manageable for most people?

That being said, how likely anyway are we to ever get a game using all 12 at once? :-\

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #233 on: September 09, 2019, 06:14:14 PM »
My concerns there would be brown vs orange, purple vs pink, and white vs grey. Those easily could look like different shades of each other, especially in a situation where there aren't lixes of both colors near each other. I think the rest are distinct enough that they'd be recognizable as outright different colors even when not right next to each other. A darker shade of grey would probably resolve the issue in that case, though I think the other two pairs would likely be hard to redeem without instead making them too close to a different color. This still adds two more colors, though.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #234 on: September 11, 2019, 11:08:52 PM »
Would 12 players not make the game a bit crazy and very hard to organise but if it is something you want to do go for gold. :)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #235 on: March 31, 2020, 08:13:01 PM »
Thanks for the replies! :lix-blush: Yes, Lix has brought me far. Still, there won't be 12 colors in Lix. :lix-grin:



Magic Cave
(hobbies, time management)

I miss the magic cave from doctoral studies where you would work on a creative project for days, then on the thesis for days, then again on hobbies. Lots of Lix bugs got fixed in the magic cave, many posts were written here on the forums.

The downside of that magic cave is that you naturally let the thesis slip. Any time spent on hobbies could be spent on thesis, thus, even in the magic cave, one will never feel truly free. Likely, that feeling is impossible to re-attain after the age of 5. Still, it's the guiding light to what you should do with your time.

I still want to write a paper with my professor, now that math feels much more like a neglected hobby. Already behind schedule, but it's fine since prof isn't rushing either. It's a side project for both of us.

I have spent time on other hobbies, thus I shouldn't feel like having wasted all too much time.

I have loose ideas for a tile-grid-based Lemmings-inspired puzzle game with many different gadgets, to let my inner five-year-old bloat features. Rules must be really sharply defined, turn order and tile-based movement must be clearly specified. Proxima would be delighted. :lix-grin: No time these days, though. :lix-winktongue:

When you don’t create things, you become defined by your tastes rather than ability. Your tastes only narrow and exclude people. So create. -- Jonathan Gillette



OO
(software engineering)

We had a three-day seminar on Clean Code, the classic object-oriented guidelines à la Uncle Bob. I've always enjoyed OO and soaked much of this wisdom already in the years past, during magic cave. Thus, the co-workers might have gotten more out of it than I did. Nonetheless, good rehearsal.

According to the seminar, I should make more interfaces and fewer abstract base classes. This seems hard to follow when you roll your own GUI as in Lix: We have GUI Element, an abstract base class that already has important behavior, e.g., decision whether the Element should be redrawn. Then class Button inherits from Element, then TextButton and BitmapButton inherit from Button. How to avoid inheriting from classes here, and instead only inherit from interfaces? Even if TextButton and BitmapButton became decorators, Button would still inherit from Element. Anybody want to give it a shot?

I've ordered a book on UML, Kecher's UML 2.5, a German classic. Allegedly, UML is the driest thing in the software engineering universe. Doesn't matter, it's handy in real life and will fix a sizable knowledge gap.



Error Handling
(software engineering)

I'm interested in error handling strategies. Reason: In C++, everything sucks or is nonstandard. :devil:

Ye olde C errore propagation is by return values: Everything returns int, negative values mean errors, zero or positive are good results. Functions return the error code and write other useful output into a buffer that you pass to the function by reference.

int foo(int x, int y, unsigned char* outBuf, size_t outBufLen)

This permeates the codebase at work. Call sites then look like: Make buffer, call the function, if the function returns an error, print something to the global log stream, and abort, or maybe continue if you don't deem the error that bad. The downside is the ton of checking boilerplate around every call. And you can't declare the output const because you have to declare its variable first, then fill it in the call. (Also some people don't like to return early and write 10 nested ifs, but that wouldn't be contemporary C anyway.)

Well, we have C++ exceptions, but they aren't part of the type system. noexcept is a feeble attempt to fix that, it's nowhere used in legacy code. For every method, you must remember whether it throws, and what it throws, to decide whether you want to handle the error. You must read the API docs or hope that it doesn't throw.

As long as you call even one maybe-throwing method, the compiler must generate exception handling around your call. I haven't studied compiled binaries to how fast or slow it is. Even if this were no speed problem -- I don't like exceptions, they feel wrong, it can't be good design that the easiest thing to write is to let the program crash by unhandled exception.

Really the most fitting for the work codebase would be Zig-style error handling: Your functions return either an error code or a useful value, and there are special language features to abort execution and propagate the error. With such features, you may write the call site as if the callee returned no error; on error, it behaves like an exception that is baked into the return type. Or you can explicitly handle the error, again with syntactic sugar because handling is common.

Now, Java had checked exceptions that sound like much the same, baking the possible error into the method signature. But modern Java is moving away from them. Shall we heed this as a warning? Hmm, Zig has no virtual dispatch, not even type inheritance. And Java had some unchecked exceptions from the beginning by design: Nullpointer dereference, or out of memory. While I still firmly believe that nullpointer exception is a glaring misdesign -- the type system should handle whether your pointer may be null or not, and force you to check if applicable -- I have no strong opinion against the out-of-memory Java exception.

In C++, you can define your own error-handling type: A tagged union of error code and useful result. Then all your functions return this tagged union. You can call methods on the tagged union and the call only goes to the useful value if there hasn't been an error yet.

template <typename T>
struct OrError {
    int error;
    T value;
// use only if no error
   
/* ... maybe methods to chain calls on these as long as no error ... */
};

The downside of the tagged union is that this is impossible to retrofit over the C-style error handling: You'd have to write a wrapper for every int-returning buffer-filling method -- there is no way to generate all the wrappers with a template because the out-buffer parameter is in a different location for each C function. Also, the entire codebase would have to agree on one such error union type, otherwise it would split into worlds that can't call each other's functions without wrapping.

If the wrappers could be autogenerated by the language, we would have a full-fledged error monad. :lix-grin:

You could write code in the reactive paradigm where your method call gets you a value stream and a separate error stream. Again, massive boilerplate in languages that don't support it easily.

Thus, there is no clear winner. Every time, it itches enough to find a good solution, but in the end, it's least painful to stick to the convention.

The easiest code to call is still code that cannot fail. :lix-mystery:

-- Simon
« Last Edit: April 01, 2020, 05:00:31 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #236 on: May 13, 2020, 07:34:53 PM »
Commercial software

I updated my router's (Fritz Box 7490) firmware from its 2017 version to 2020.

Now the router's webpage config menu takes 4 seconds to load every page. The old version took maybe 0.5 seconds. Eight times the overhead! In commercial software that I pay good money for by buying the router in the first place.

In 4 seconds, there is a serious chance that I'll already have forgotten what I wanted to do once the menu finally opens. Usability 101, don't take 1 second or the user will lose mental focus.

How can one screw up this badly?

Reason 1. The software is way past its heyday, and they've assigned cheap maintenance programmers to that project while the gurus work elsewhere on more fun projects. Surely it must be fine, the customer had already paid.

Reason 2. Some awkward security bug was found and they had to hoist the crufty app onto some new low-level infrastructure. The overhead thus comes from the many adapter layers. With age come all these barnacles that hang off the ship.

Reason 3. It's a boiling frog: The page loads got slower by a tad in every version, and thus it slipped past the testers for 3 years with each of the many updates.

Reason 4. Users should be glad that stuff is working at all despite a firmware update, and it even loaded the old configuration. Maybe the loads come from persistent rubbish from the ancient version, which was either never found in testing, was deemed acceptable after they got the firmware to finally update seamlessly. This kind of updating an entire device is really, really hard after all, especially since they allow me to update after 3 years, likely skipping many intermediate versions.

This mess is one of the reasons why I still have no smartphone. It's way too easy for commercial projects to go down the drain within years. :lix-glare:

-- Simon
« Last Edit: May 13, 2020, 07:47:02 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #237 on: June 08, 2020, 12:26:42 PM »
is something that

If you're a person who doesn't like X, try Y.
If you don't like X, try Y.

This is something that I like.
I like this.
This, I like.

Try and see if you can jump over the gap.
Try to jump over the gap.
Jump over the gap.
Jump the gap.

Remember to go to bed by midnight.
I want to add that
It should be noted that

If it is isomething that can be cut, then cut, cut, cut.



Forewarning

If you don't know what X is, X is a platforming game.
X is a platforming game.

If you don't know X and X is a platforming game, then, very likely, X is also a platforming game when you already know X. The reader is smart enough to understand sentences that he already considers true.

You might believe that you're helpful with such forewarning ("If you don't know X") about introductions ("X is a platforming game") that a knowlegdeable reader may skip. But you don't achieve that unless you clearly mark where the introduction starts and stops. Few do that in English, sadly. Because so few writers do, the reader must still read everything, lest he skip important non-introduction.

For programmers:
  • Write for humans exactly like you're supposed to write high-level computer programs. There, we shall hide the repetitive bookkeeping, not bloat the call site. E.g., we prefer
        Optional<X> x = ...
        x.foo()

    to
        X* x = ...
        if x:
            x->foo()

And then here continue the essay with whatever remainder written for both for programmer and non-programmer.

-- Simon
« Last Edit: June 08, 2020, 04:26:06 PM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #238 on: June 09, 2020, 01:01:38 AM »
In some of the examples, the "extraneous" expressions are there either for politeness purposes, or sometimes for flow/emphasis purposes.  For example, "remember to X" reads more like a gentle reminder vs just saying "X" directly, which may sound a little rude to some due to sounding much like a direct command or demand.  Context matters of course.  For example, given that telling people to go to bed is typically something a parent say to a child, it doesn't seem rude for a parent to say it to a child in direct imperative form.  For a different task and different social roles (for example, one coworker to another, speaking of some work-related task), it may be more proper to be less direct.

I agree that the other examples that Simon specifically struck out (ie. "like this") are far more likely to be extraneous.  But without seeing the preceding sentences, I can't rule out some occasional cases where being a little indirect and verbose may be (somewhat) justified.

I'm well aware that I can be a bit wordy in my own writing. :-\ Feel free to apply the Simon culls below to some example writings of mine in this forum, I welcome the closer look and debate.

Computer programming is quite different of course compared to spoken or written language.  The programming example you gave doesn't feel to me like much of an analogy to the "is something that" in English.  A programming language may offer multiple ways to do the same thing, but rarely would you have constructs that have completely no effect (besides comments, but they are there to help the human understand why the code is doing certain things certain ways, as opposed to telling the computer to do something).

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #239 on: June 18, 2020, 08:27:47 PM »
Thanks for the reply! Sorry for my belated reply.

Quote
The programming example you gave doesn't feel to me like much of an analogy to the "is something that" in English.

Here, my desired nuance wasn't filler phrases: Certainly, programming languages have few constructs that could be outright omitted with the same meaning. Thus, "is something that" isn't a suitable example here.

I wanted to draw attention to how the payload -- the businees logic in programming, the big ideas in writing -- should not be bloated by bookkeeping. The reader can often figure out the bookkeeping themselves, or the bookkeeping can be written somewhere else.

For such avoidance of bookkeeping, "if you don't know what X is" is a better example than "is something that". The meaning will change when we leave out "if you don't know what X is", but it really doesn't matter; we want to cut to the point immediately. The change in meaning happens to be irrelevant here, even better.

Quote
Feel free to apply the Simon culls below to some example writings of mine in this forum, I welcome the closer look and debate.

All right, I'll try once I see a particularly tasty target. :lix-tongue: I read practically everything by you, doesn't matter which topic on the forums.

Courtesy is interesting. People interpret bloated, deliberately weakened statements as courteous. When an author prunes the writing, people should be happy that the author doesn't waste their time, they shouldn't feel uncomfortable. <_<;;



Sorry for any of my slowness on the forums these days. I'm still stuck in the editor's undo feature for editor tile insertions/removals.



My current design problem appears to require triple dispatch. (If three objects are of specific subclasses each, call a certain method.) This is likely a misdesign in the classes, I merely don't see how. I expected double dispatch to appear, I have parallel class hierarchies that seem like the least-worst solution.

Maybe I'll have to lie on the psychiatric bench that is the Lemmings Forums, and make a detailed topic about this.

I hesitate making intricate programming design topics here though: It's really software development at heart, not of general Lemmings interest, and probably more sensible on Software Engineering stack overflow. It would be a genuine call for help, on a nontrivial and highly specific problem in my personal areas of expertise and interest (Lemmings, OOP) -- thus obvious solutions won't fit.

On the other hand, it's easier to explain the problem on Lemmings Forums, because we have a bunch of developers here that will readily understand the problem. And if we find the least-worst solution, maybe it'll be helpful too for somebody in the future.

Hmm. After this rambling, I should really make this topic.



Edit: Adding/removing tiles is functional, using the visitor pattern for the common double dispatch and dynamic casting to avoid introducing a second visitor on the parallel hierarchy. Topic here will still be reasonable, it still feels awkward.

-- Simon
« Last Edit: June 19, 2020, 03:03:03 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #240 on: June 18, 2020, 10:26:43 PM »
Quote
I hesitate making intricate programming design topics here though: It's really software development at heart, not of general Lemmings interest, and probably more sensible on Software Engineering stack overflow. It would be a genuine call for help, on a nontrivial and highly specific problem in my personal areas of expertise and interest (Lemmings, OOP) -- thus obvious solutions won't fit.

On the other hand, it's easier to explain the problem on Lemmings Forums, because we have a bunch of developers here that will readily understand the problem. And if we find the least-worst solution, maybe it'll be helpful too for somebody in the future.

There is no rule against posting in more than one place. ;)
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Simon blogs
« Reply #241 on: June 22, 2020, 10:05:15 AM »
There's no harm in posting the problem here; as the saying goes, two (or more) heads can be better than one.  But I also think you are actually already the person on the forum who's most well-versed in the theory and practice of software design and architecture.  So ideally you'd want to get advice from someone who's even better at this, and hence a more programming-oriented forum or channel is probably the way to go.

But even if you end up solving the problem through purely outside advice, I certainly wouldn't mind hearing about the solution here. ;)

[aside: your previous post about keeping sentences terser has made me actually took the time to review and edit my writing above accordingly]

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #242 on: June 23, 2020, 02:29:57 AM »
I often feel more comfortable posting questions in places like this where I recognize a lot of the posters even if there's probably a technically better place to ask the question. Of course, if it's too advanced, there might not be anyone here who can help, but there's certainly not any harm in posting it here. I'd certainly be interested in seeing whatever you come up with; I find your posts on these topics quite interesting and informative.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #243 on: June 23, 2020, 04:27:42 AM »
There's no harm in posting the problem here; as the saying goes, two (or more) heads can be better than one.  But I also think you are actually already the person on the forum who's most well-versed in the theory and practice of software design and architecture.  So ideally you'd want to get advice from someone who's even better at this, and hence a more programming-oriented forum or channel is probably the way to go.

Counter-point: Not all progamming problems are purely about the programming. Some might be about the underlying logic - there's usually many ways to approach such questions. Some might be about the UI, in which case feedback from potential users is very important - indeed, I feel that some decisions in Lix are based too much on programmer mentality and not user mentality (for example, the strong focus on making sure the UI is optimized in terms of fewest clicks - to the extent that some of the "nice fuzz" that players may expect in a game, is missing).

Of course, most such cases fall under "having a variety of opinions is good", and thus are most strongly arguments for "ask the question on both".
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #244 on: June 25, 2020, 01:58:48 AM »
Christmas tree problem

You have a fir tree and want to decorate it with christmas lights.

The fir tree's green bushy "surface" is cone-shaped, with a circular boundary at the bottom.

You also have n candles. These are about to be placed on the fir tree.

---

Task. Distribute the n candles on the fir tree such that the candles are nicely spaced apart from all other candles. You may place candles on the boundary.

No problem! I'm ace at decorating Christmas trees 8-) Nearer the time, I'll put up some pictures.



Application. If your christmas tree is instead the space of all colors, and you have 8 Lix player colors, find a distribution of 8 colors such that no two colors look more similar than necessary. This is hard, especially if you, in addition, want to avoid black because black lixes looks too much like the boundary level background.

To be fair, the picture you've posted distinguishes the Lixes very well. If you wanted to avoid black, this could be changed for hot pink or pastel pink, both of which are different enough from red not to be confused. Interesting that you chose teal rather than royal blue for Lix #5 in the image.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #245 on: June 25, 2020, 02:17:07 AM »
Quote
To be fair, the picture you've posted distinguishes the Lixes very well. If you wanted to avoid black, this could be changed for hot pink or pastel pink, both of which are different enough from red not to be confused. Interesting that you chose teal rather than royal blue for Lix #5 in the image.

Adding to this - I would say that you could use a deeper blue there, then also use cyan as a player color. This would then allow ultimately removing black, and using white for neutrals (if that's still planned).
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #246 on: June 28, 2020, 08:46:10 PM »
Thanks for the suggestions to post in both places!

The problem is elaborate to describe from scratch, it relies on several details. For a start: Tiles and Occurrences, I'll probably move that and any replies to new topic.

Quote from: ccexplore
But I also think you are actually already the person on the forum who's most well-versed in the theory and practice of software design and architecture.

This is flattering. :lix-blush: I would have easily thought that you were the most well-versed, or else one of the professional software engineers who post less often, but supposedly have formal education and more years in the business. Thanks!

Still so much to learn, especially with my near-zero experience in multithreading and inter-process communication (apart from networking, or temp files).

Quote from: Dullstar
there's certainly not any harm in posting it here. I'd certainly be interested in seeing whatever you come up with; I find your posts on these topics quite interesting and informative.

This is very inspiring, thanks! This was the reason that I've begun here today with the explanation.

Re colors in Lix: Hmm, reasonable recommendations. I'll have to consider everything here in case of a physics or format change. Light grey would be a good neutral color.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #247 on: July 30, 2020, 09:15:46 PM »
Deal or No Deal

Once in your lifetime, now, you're offered a choice:
  • 50 % chance of gaining 1,000,000 EUR, or
  • guaranteed gain of 200,000 EUR.
I would take the guaranteed win. The reason is the classic utility argument: The 200,000 help me reach most of the same goals in life as the million would. Any goals that don't mainly depend on money aren't helped any better with the million anyway.

Maybe one of my readers is already so wealthy that the gamble is more interesting to them for its higher expected value than the guaranteed 200,000. Congratulations then. :thumbsup: Or you're in a stickup and must pay 800,000 EUR of ransom. >_>

If you agree at all that there (may) exist sound reasons for picking the 200,000, the next interesting questions become:
  • What is the amount of money that makes you indifferent between winning that money guaranteed, and the 50 % chance at a million?
  • What is the probability of winning the million that makes you indifferent between a guaranteed 200,000 EUR, and winning the million with that probability?
I'm unsure if I would take 120,000 EUR over the chance at the million. The 120,000 is reasonably easy to grasp, one can work diligently towards it, and yet doesn't have to sacrifice one's entire life for it.

Varying the probability is even more interesting: People exhibit a psychological bias that overestimates small probabilities and underestimates high probabilities, especially when the exceptional outcome is easy to imagine (plane crash), but the likely outcome is boring (few safely arrived planes make it into the news). Thus, if you agreed with my pick of the 200,000 in the original choice, think if you really need 95 % for the million before the gamble becomes attractive.

-- Simon
« Last Edit: July 30, 2020, 11:43:17 PM by Simon »

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #248 on: July 31, 2020, 01:19:02 PM »
This is a conundrum I'd most likely be thinking about whilst I'm spending my 200,000 Euros ;P :crylaugh:

I guess the guaranteed win would have to be very small for me to want to take a chance on the million - something like 10 - 100 Euros. Higher than that, and you're basically being given free money not to gamble for 1,000,000. That is an attractive deal.

Furthermore - as you've said, 200,000 is still a relatively life-changing amount of money. There's lots you can do with it that may even turn it into a million if you're savvy enough.

The chances of winning the million would have to be at least 99% for me to even consider taking a chance on it versus a guaranteed gift of 200,000. And even then, I'd be very hesistant and would still probably favour the 200,000. The reason being that there's a 1% chance you could walk away with nothing, and that would be more difficult to live with and potentially more psychologically damaging than taking the 200,000 and living with the fact that you most likely would have won the million had you gambled.

200,000 Euros is just fine by me, I'm off to fantasise about what I'd do with it...!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #249 on: August 01, 2020, 08:52:15 PM »
By the EV (expected value) strategy, it makes more sense to take the shot at a million. The reasoning is simple: one has a 100% chance of a 200,000 euro payoff (average winning: 200,000 euros), the other has a 50% chance of a 1,000,000 euro payoff (average winning: 500,000 euros). The chance-at-a-million, on average, leaves you 300,000 euros better off.

However, the EV strategy is tailored to long-term gambling, not a one-off huge shot. This affects how one would act. I definitely deviate a bit from EV-based strategy when there's an unusually high-value hand when I'm playing Poker. To be fair, I'm not the strongest adherent to it in the first place (maybe I am subconciously, but I don't actively try to figure out my EV, even as a rough estimate) - I've given consideration to it when figuring out what my general approaches would be, but I don't think about it while actually playing in most cases.

Ultimately, I think in this case - I would take the 200k, unless I was already a millionaire (or close to it) at the time. Play it safe. I'm not sure what lower-guaranteed-amount or higher-win-chance I'd need to tip that. I would definitely take a 50% shot at a million over 1000 euro, probably over 10,000 euro. At 50,000 I'm not so sure.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #250 on: August 09, 2020, 10:38:42 PM »
Thanks! Yeah, the example was deliberately tailored to against the EV maximation strategy. The 200,000 is already so good a prize.

Still interesting to see the differences in how much certain cash makes the 50 % shot at the million unattractive. I assume it depends massively on job safety, expectations for personal development for the next years, current life problems, ...



Smoothening dice

We are designing a game involving dice. We want to generate a random integer between 3 and 18 inclusive. We would like to produce far more results in the middle of the range than we want to produce extreme values; i.e., we want 9, 10, 11, 12 to come up a lot, and 3, 4, 17, 18 to come up rarely.

Here are two procedures. Both are biased towards the desired middle values and against extreme values. Which of these is biased the most?
  • Roll three fair 15-sided dice, each with the numbers 3, 4, 5, ..., 18, then pick the middle outcome.
  • Roll three fair 6-sided dice, each with numbers 1, 2, ..., 6, then add the three outcomes.
Answer (click to show/hide)

-- Simon
« Last Edit: August 13, 2020, 04:10:00 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #251 on: August 22, 2020, 05:58:40 AM »
Sleep over it

For difficult tasks, start them, then go to bed and have a good night's sleep. Subconciousness will continue to attack the problem. This has two benefits the next morning:
  • You will have a better idea on how to continue, i.e., wise philosopher.
  • You want to rush to work to try the ideas, i.e., motivated guinea pig.
Rome wasn't built in a day.

Corollaries:
  • Don't ruin the sleep schedule for difficult work. You won't solve it within the next hour anyway, maybe not even within the same night. Not sleeping over it has opportunity costs.
  • With 1-2 spare hours in an evening, start the work, even if that's nowhere enough time to finish. Take for free the benefit of sleeping over it.
-- Simon
« Last Edit: August 22, 2020, 04:39:26 PM by Simon »

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: Simon blogs
« Reply #252 on: August 24, 2020, 08:33:30 PM »
Quote
Subconciousness will continue to attack the problem. This has two benefits the next morning: [...]
For me this usually comes with the following downside in the evening though:
  • I lie in bed unable to fall asleep for an hour or two...

Which also breaks the two corollaries.

Maybe it works if you make sure to do something mellow and not exciting in the last hour before you go to bed.

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #253 on: August 25, 2020, 01:15:01 AM »
I often have the problem of lying in bed for an hour...
Quote
Maybe it works if you make sure to do something mellow and not exciting in the last hour before you go to bed.

This is definitely usually true. They also say not looking at a computer screen an hour or so before bed helps a lot, (which nobody like us does that these days...). Also not listening to (loud) music or watching an exciting movie but reading a book or something like that (or puzzling/coding maybe?) would be better.

Wafflem showed me this app called "Flux" which eliminates certain blue colors in your screen which is supposed to help you get to sleep easier. Adjusting to the color of the screen took a bit but that wasn't bad.

------

Working/doing physical tasks while thinking about the problem may help. Years later I still remember solving Clam's level "Evacuating a retirement home" not while playing the game but while thinking about it at my old job taking apart crusty furniture. I knew I solved it too without evening having to test it out.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #254 on: August 29, 2020, 08:16:58 PM »
Quote from: geoo
Maybe it works if you make sure to do something mellow and not exciting in the last hour before you go to bed.
I often have the problem of lying in bed for an hour...

Yeah, you can't force the sleep. I assumed that the sleep came from regular bedtime or other genuine need to sleep.

The point is to not sacrifice regular/anticipated sleep for problem solving; instead, I consider the regular sleep part of the solving.

Quote from: mobius
Working/doing physical tasks while thinking about the problem may help.
Clam's level "Evacuating a retirement home"
I knew I solved it too without evening having to test it out.

Likely, physical activity allows the unconciousness to attack a problem similar to how sleep allows it.

Solving a Lemmings level offscreen without having to test it in the engine, that's really strong.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #255 on: September 29, 2020, 07:44:57 PM »


Caffeine withdrawal

In July, I quit drinking caffeine cold-turkey.

Before, I drank 3 liters of Pepsi Max Lemon per day. I suppose that 3 liters is probably not the daily recommended dose. The body was so accustomed to 3 liters of Pepsi that, after quitting, I had terrible headaches for 5 days and took several naps per day.

After that brutal week, the mind cleared, and the sleeping rhythm became super stable. Very nice. Probably better overall for working with other people and general functioning.

The new drink of the gods is deit Grapefruit, a German sugar-free lemonade. Again I drink about 3 liters of that per day.

I'll have a boardgaming weekend ahead, with Uwe and Icho. For the first time in two months, I'll buy caffeinated soda again -- but only for them, not for me. To still compete in mental prowess on uncaffeinated ground, I'll probably have to eat lots of candy to compensate. World wars aren't easy.





Zendo Notebook

Normal people read a book in bed. I put a notepad next to my bed, and I write down Zendo rules before sleeping.

Already, I have about 30 rules that I would like to master to a player group. I've tried hard to make rules of similar style as we had in Vienna, 2015, with ADmiral, geoo, and Ramon: A focus on geometric rules, trying to find yet-unexplored concepts. These rules will be too hard unless the player group is thoroughly experienced.


Some other rules don't care about the geometry at all, and they're important to the mix, too.

Eventually, I should write all the rules to files and host them on the web. And pruning the list would be nice before actual play.

-- Simon
« Last Edit: February 27, 2023, 12:16:19 AM by Simon »

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #256 on: September 29, 2020, 11:36:43 PM »
What is this Zendo, Simon? :)

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #257 on: September 30, 2020, 06:27:26 AM »
Locale

I use the en_US.UTF-8 Linux locale for everything. I don't want my computer to know that I'm German; all software should be in English so that I can websearch the error messages. The decimal sign is the dot . and the thousands separator is the comma , and that should be adopted worldwide.

Having been born and raised in the USA my entire life, yes, we use commas to separate groups of 3 digits, whereas in other countries they use a decimal point instead. So, for example, one thousand two hundred thirty four would be written as 1,234 where I'm from, which is a big number, but in your country, you instead would write the same number 1.234, which to us here in the USA is a small number, bigger than 1, but less than 2. When I visited my parents' home country of Vietnam for the very first time earlier this year, I remember having to constantly remember that the decimal point in the number for the currency is a thousands' separator, since I'm not used to the decimal point being used in place of a comma as a separator of 3 digits in big numbers. So that 100.000 in Vietnam is actually one hundred thousand, not just one hundred, which is exactly how we in the USA would interpret the number, one hundred. Consistency would definitely be nice, but too bad that's not going to happen.

Quote

Nonetheless, some features of the US locale are horrendous, such as starting the week on Sunday. This affects GUI calendar tools in the desktop panel. Here is how to make Monday the first day of the week:

Are dates in Europe written the same way as they are here in the US? I visited Europe back in 2007, but I don't remember what format the date uses. Here in the USA, we use month/date/year. In my parents home country of Vietnam, it's switched, so that the format is day/month/year. When they came to the USA about 40 years ago, they had to get used to the new format. In the same way, when I visited Vietnam for the very first time earlier this year, I had to get used to using Celsius instead of the familiar Fahrenheit. I remember on my Europe trip, my friends and I were on a bus where the temperature was displayed up in the very front and it read 25 degrees C One of them goes, "why is it not cold?" I said, "You know why? Because the temperature is not in Fahrenheit that we're all familiar with, it's in Celsius."  When converted to Fahrenheit, it makes sense that 25 C is actually a warm day (77 degrees F).
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline mantha16

  • Posts: 287
    • View Profile
Re: Simon blogs
« Reply #258 on: September 30, 2020, 05:28:50 PM »



Quote



Are dates in Europe written the same way as they are here in the US? I visited Europe back in 2007, but I don't remember what format the date uses. Here in the USA, we use month/date/year. In my parents home country of Vietnam, it's switched, so that the format is day/month/year. When they came to the USA about 40 years ago, they had to get used to the new format. In the same way, when I visited Vietnam for the very first time earlier this year, I had to get used to using Celsius instead of the familiar Fahrenheit. I remember on my Europe trip, my friends and I were on a bus where the temperature was displayed up in the very front and it read 25 degrees C One of them goes, "why is it not cold?" I said, "You know why? Because the temperature is not in Fahrenheit that we're all familiar with, it's in Celsius."  When converted to Fahrenheit, it makes sense that 25 C is actually a warm day (77 degrees F).

I think pretty much everywhere used day/month/year apart from the USA.   

In Britain we are super annoying cos sometimes we use celsius for cold temperatures and farenheit for hot.  Also most people of a younger generation than me will use kg and km for weight and distance whereas I grew up using  stones, lbs and oz for weight and miles for distance and speed (for driving as in MPH) but km, m, cm and mm for other measurements.  Our speed limits and speedomoters are in MPH despite the fact KPH would be the more modern way to do it.  It would be chaos to change those things though

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #259 on: September 30, 2020, 07:07:58 PM »
What is this Zendo, Simon? :)



Zendo is a tabletop game. Players build little structures of colorful pieces.

A moderator ("master") has a secret rule. For each structure, the master will mark it white if it follows the rule; black, if not. The player who correctly states the secret rule wins. Example secret rules for new players.

Zendo can produce strong aha effects. It has been my favorite tabletop game since 2014. Full rules of Zendo on the designer's homepage.



Quote from: mantha16
Britain
miles for distance and speed (for driving as in MPH) but km, m, cm and mm for other measurements.
speed limits and speedomoters are in MPH

The UK is particularly inconsistent because its main system is metric, and it still keeps the miles for driving.

The remainder of Europe enjoyed the full blast of metrication from the French revolution, only datetime wasn't metricated because the church was still strong. The adage is to never let a crisis go to waste. But no similar convenient event will happen anytime soon for UK or US.

I sure would like another French revolution for ditching decimal in favor of hexadecimal. And this time, we also fix datetime. :lix-grin:



Quote from: kaywhyn
dates in Europe written the same way
Quote from: mantha16
pretty much everywhere used day/month/year

Yeah, day.month.year is common. There is this joke how the US's month/day/year format is badly sorted, but those Europeans are ill-guided if they point to day.month.year and believe that to be an improvement. Reason: Even this European notation is still middle-endian, i.e., the most-often changing figure is neither at the front nor the back. The most-often changing figure is the ones digit of the day. It's in second position.

The One True Date Format (ISO-8601) is year-month-day, and it should be used wherever possible. There are even official German guidelines to use this (DIN EN 28601). But sadly, it's not popular, it doesn't match how Germans pronounce the dates either.

At least it's popular with information scientists and technical people. :lix-grin:

-- Simon
« Last Edit: September 30, 2020, 07:25:05 PM by Simon »

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #260 on: September 30, 2020, 07:38:01 PM »

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #261 on: October 01, 2020, 07:04:29 AM »
In Britain we are super annoying cos sometimes we use celsius for cold temperatures and farenheit for hot.  Also most people of a younger generation than me will use kg and km for weight and distance whereas I grew up using  stones, lbs and oz for weight and miles for distance and speed (for driving as in MPH) but km, m, cm and mm for other measurements.  Our speed limits and speedomoters are in MPH despite the fact KPH would be the more modern way to do it.  It would be chaos to change those things though

Interesting. Yea, I would find this inconsistency annoying as well. When I visited my parents' home country of Vietnam earlier this year, I had to get used to seeing kilometers instead of miles for distance, the latter which I'm very used to back in the USA.

I sure would like another French revolution for ditching decimal in favor of hexadecimal. And this time, we also fix datetime. :lix-grin:

Really? I for one definitely prefer the metric system over the customary USA system that we use. Conversions between metric units are so much easier, being based on powers of 10. Not so in the USA. Here, we have very strange measurement equivalents, and the only way to know them is to memorize them. For example, 12 inches = 1 foot, 3 feet = 1 yard, 1,760 yards = 5,280 feet = 1 mile. Not easy numbers to remember at all. These are some of the ones I happen to know and remember.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #262 on: October 01, 2020, 07:56:33 AM »
ditching decimal in favor of hexadecimal
Really? I for one definitely prefer the metric system over the customary USA system that we use. Conversions between metric units are so much easier, being based on powers of 10.

I don't advocate for what the US does.

My point is that 10 is a bad base for a positional system: 10 contains only one power of 2, and an awkward divisor of 5 in the base. I want to scrap base-10 everywhere for base-16, not only in measurement, but wherever numbers are expressed in a positional numeral system.

Exactly as we divide a meter into 10*10*10 millimeters, in hex, a day will then be divided into 16*16*16*16 subunits, which, written in base-16 that is universally adopted alongside, will be written as "1/10000 of a day" and conversions are again easy. One can also invent a prefix or a short name for this unit.

You will find people on the internet who advocate for base-12 over base-10. They have seen... at least part of the light. :lix-evil:

-- Simon

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #263 on: October 01, 2020, 09:34:01 AM »
I don't advocate for what the US does.

Nor do I expect you to. The customary system is a lot messier than the metric system, anyway.

Quote
My point is that 10 is a bad base for a positional system: 10 contains only one power of 2, and an awkward divisor of 5 in the base. I want to scrap base-10 everywhere for base-16, not only in measurement, but wherever numbers are expressed in a positional numeral system.

Well good luck convincing the folks at the board or whoever's in charge. Being a prospective math teacher myself, I don't quite see the advantages of base 16 over base 10, but that's probably because I have worked in base 10 my entire life and can't think of any good reasons right now. Granted, I learned how to do arithmetic in other bases briefly in my History of Math class for my graduate program, but it's been a while, so I would certainly need a refresher.

We people here in the USA certainly aren't going to be overhauling the decimal system for a long time, if ever. I certainly wouldn't mind working with a new base, although since we have worked in base 10 for a really long time and it has worked out fairly well, why change it? As they say, "If it ain't broke, don't fix it."

What we do need is a major educational reform here in the USA. We're one of the worse academically performing countries in the areas of science and math, in the bottom 5 out of the 50 states here in California. I plan to advocate for some major reform measures once I get my own classroom in the future. We recently switched to a new math curriculum called Common Core, which I understand it emphasizing critical thinking versus the tried-and-does-not work traditional lecture in the old curriculum, but honestly it's doing way more harm than good to students right now. Even I don't always understand the way the math is taught under this curriculum. I understand the mathematical material and concepts, but how it's being taught is quite perplexing, since the methods are drastically different than how I was taught the same mathematical concepts when I was going through school.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #264 on: October 02, 2020, 11:52:51 PM »
I found this Zendo game. maybe other websites will let you download the game.

https://www.old-games.com/download/5719/zendo-san

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #265 on: October 03, 2020, 05:17:40 AM »
Zendo is a tabletop game... The player who correctly states the secret rule wins

maybe other websites will let you download the game

This game looks amazing, I'll definitely have to try this out sometime. In theory, you could apply the principle to any game pieces, but the little colourful shapes make it particularly appealing. There's a set on eBay, I might get it to play at Christmas.

Even this European notation is still middle-endian, i.e., the most-often changing figure is neither at the front nor the back. The most-often changing figure is the ones digit of the day. It's in second position. The One True Date Format (ISO-8601) is year-month-day, and it should be used wherever possible.

Hmmm. I never thought of it that way! But, it makes total sense. We notate digital time that way (i.e. HH:MM:SSms) so, it does indeed follow that Year-Month-Day-Hour-Minute-Second-Millisecond is the best order for time notation in general.

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Simon blogs
« Reply #266 on: October 03, 2020, 12:47:05 PM »
I was thinking the same as yourself Willem as you could probably do a thing maybe with lemmings levels or other things. We use to play it on this forum as well in the past. I was still probably trying to get used to the rules and still learning the game. It's a great game as I love my board games, my brother got me some board games for Christmas. I like to think everyone has their board that they are good at, I know some board games require luck such as your backgammon but I challenge that aspect. There were skilled backgammon players playing against hard computers and most times the players won the game. Don't get me wrong luck plays a Hugh part in games but there's the skill aspect as well.

I noticed you gave up the caffeine Simon, is that very hard to do. I like the pepsi max, I think they have the non caffeine version of diet pepsi. Does caffeine do more damage than good, it probably does when we thing about it. Good on you Simon for giving that up for July time.

Are you still going cold turkey with it at the moment Simon?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #267 on: October 05, 2020, 07:04:52 PM »
This game looks amazing, I'll definitely have to try this out sometime. [...] There's a set on eBay, I might get it to play at Christmas.

I warmly encourage you to buy it. The 2017 release of Zendo ("Zendo 2.0") is the current and recommended printing, and it often appears on UK/US Amazon or Ebay.

It comes with 9 pieces of each of the 9 kinds, enough to rarely run out. Also, it offers cards with lots of easier rules, to help novice masters not accidentally make a rule too obstuse and difficult. More experienced masters can still invent their own rules.

(The only other release is the green box from 2003, it's practically nowhere to be found nowadays. So no worries; as long as your box is the black-and-white square box, you have the 2017 printing.)

Quote from: WillLem
In theory, you could apply the principle to any game pieces, but the little colourful shapes make it particularly appealing.
Quote from: grams88
you could probably do a thing maybe with lemmings levels or other things. We use to play it on this forum as well in the past.

Right, I too prefer Zendo with (either the 1.0 pyramids or the 2.0 shapes) over Zendo with letters, numbers, or playing cards. A few different colorful pieces combine in many different ways, they look amazing on the table and patterns pop out.

My older post on this, with reasoning.

Quote from: grams88
Does caffeine do more damage than good, it probably does when we thing about it. Good on you Simon for giving that up for July time.

Are you still going cold turkey with it at the moment Simon?

Yes, I still haven't drunk any caffeine since.

Caffeine probably won't lead to permanent damage, maybe I'll come back to it in a couple of months. But its wakening power is strongest when one isn't habituated to it. Thus, I'd rather not have any caffeine until I really need it some evening.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #268 on: October 29, 2020, 06:08:07 PM »
Some bash/git tricks

cd -
Switches back to the directory where came from before the most recent cd.

git checkout -
Switches back to the previously checked-out branch or commit.

sudo !!
Repeat the previously executed command, but this time with superuser rights. Careful! (The shell expands the !! before it executes anything; i.e., this is not a property of sudo.) There are magnificent apps that bring this idea of command-fixing to the extreme.

git switch
git restore
Around git 2.26, these appeared, they're intended as alternative commands for git checkout. These make it clearer whether you want to switch the checked-out branch (and the contents of the worktree along with it), or merely put some files from the same/another branch into the working directory. The manual says: THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. I feel you should still teach these instead of checkout, because checkout confuses newbies.

geany $(ack -l Wurst)
Open in the text editor (geany in my case) all files in the current directory (recursing through subdirectories) that contain the string Wurst. Here, ack is a better grep for searching through an entire directory of text files, and I warmly recommend ack. You can build a similar command line with find and grep, but it will of course be longer.

git diff --cached --name-only
Print all files that git status would show as changed and added, but not yet committed. Like the previous item in this post, you can wrap this in yourTextEditor $() to open the files in one shot: geany $(git diff --cached --name-only)

git diff --name-only --diff-filter=U
Print all files with unresolved merge conflicts. Again, mostly useful to wrap in yourTextEditor $(), because otherwise the plain git status remains king.

Lengthy commands can always become your own shell scripts or git aliases; see my aliases.

git purr :3

-- Simon
« Last Edit: March 13, 2022, 08:58:03 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #269 on: October 30, 2020, 03:33:18 AM »
Quote
cd -
Switches back to the directory where came from before the most recent cd.

Tested on PowerShell and Windows command prompt. Does not work on either. :(
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #270 on: October 31, 2020, 10:08:52 AM »
Powershell 6.2 added cd -. Alternatively, there is bash for Windows, and Windows git comes with git bash.



youtube-dl got DMCA'd and is not on github.

youtube-dl is a free-and-open-source video-downloading command-line tool. Extremely useful to avoid Google's bloated web player. When I want to watch something, I download the entire video and watch it offline. Only once in a blue moon, when I want to comment on a video, I access a video's actual page.

Bleeping Computer nicely summarizes: The successful use of a DMCA infringement notice to shutdown software that is in itself not a copyright violation is a scary precedent and one that lays the groundwork for misuse in the future.

Attacking a project via DMCA does not require any legal backing. It's enough to be a holder of some intellectual monopolies that somehow feel related. github is not the defendant, but is merely by DMCA forced to comply with the attack. It's the defendant's (the project's) task to fight an unduly issued DMCA takedown. IANAL.

That's part of the reason why I want no third-party copyrights in Lix, to avoid such DMCA harassment that is hard to fight.

Anyway!
youtube-dl 2020-09-20 Python source
youtube-dl 2020-09-20 Linux binary
youtube-dl 2020-09-20 Windows binary

The problem is that Youtube often changes its protocols or file naming etc., and youtube-dl plays catch-up. Above version 2020-09-20 will probably only remain useful for a few weeks.

Who wants to help me buy a battleship and blockade the Americans with me? Free Pepsi Max Lemon will be served on my ship.

-- Simon
« Last Edit: October 31, 2020, 10:35:48 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #271 on: October 31, 2020, 06:08:29 PM »
Huh. For some reason, I still have Powershell 5.X; despite regularly running Windows updates. I'm guessing I need to update it manually.

To be fair, I rarely use any kind of command line in Windows for more than a single command, and even that's pretty rare.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #272 on: December 17, 2020, 11:21:32 PM »
Tomorrow is the final day at work before 2 weeks of vacation. Because of pressure on the team to get stuff done, in 2020, I have never taken off more than a week continuously. Thus the 2 weeks are a luxury chance to get stuff done in several hobbies.

Plans for the holidays:

Sleep schedule. Maintain a super-early sleep schedule. Ideally, I'll be awake from 05:00 through 21:00 local time. No computer past 20:30 local time.

Undo. Finish the undo feature in the Lix editor. It's been in the works since May 2020. Magnificent feature, heavily relying on object-oriented programming that I like so much, I've owed it to myself for years to make undo.

Level contest. Build a level for Level Contest #22, enjoying the finished undo feature. After all, the serious work on undo began after my furious ragequit during level building for an earlier contest. I trashed 20 minutes of unsaved work by accidental tile deletion.

Jazz. Finish and assemble patch over Jazz Jackrabbit 1 v1.3 to submit to GOG that fixes the near-impassable Orbitus 2, fixes broken airboard ditches, and ideally adds v1.0, v1.2, unmodified v1.3. Even though there are several such patches for Orbitus 2 around the internet, the speciality here is that we want to push the patch into GOG's monopoly release of Jazz 1. The years of research across the different versions will be put to good use.

Also stream some speedruns of Jazz 1. Rarely had time for streams throughout the year. I should play through the entire fixed v1.3 anyway, to check that it all works.

Craft. Can't have anybody over for boardgaming yet. But I have a couple box/component improvements on the backburner that need peaceful evenings.



-- Simon
« Last Edit: December 17, 2020, 11:59:15 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #273 on: December 19, 2020, 05:29:04 PM »
Two Reasons

...for why it's hard to stop working in mathematics or software.

A Mind Is Born, Youtube video of the audio/video output of a Commodore 64 demo executable, 2 minutes, 2017, by lft.
  • The handwritten executable is 256 bytes long. Bytes! Not kilobytes.
  • The executable generates the song, that song in turn generates the visuals.
  • The song by itself is excellent already, highly mesmerizing in a loop.
The Art of Code, Youtube video of a programming culture talk, 61 minutes, 2020, by Dylan Beattie. Contents:
  • On Conway's Game of Life, the Mandelbrot set, emergent complexity.
  • On quines, including the Oroborous Quine that loops through 128 languages.
  • On esoteric programming languages, with his own esolang Rockstar: "Can you perform a Rockstar program and have people just think it's a bad heavy metal song from the 1980's?"


^ Plot of the Julia set at −0.5 + 0.1 i of the Burning Ship.

-- Simon
« Last Edit: December 21, 2020, 03:28:08 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #274 on: December 28, 2020, 06:39:25 AM »
Only squaring and absolute value

The basics of complex dynamics are accessible with a mere few weeks of first-semester math. Or maybe you've seen complex numbers during high school. Complex numbers can be multiplied and have an absolute value. The only thing that's not intuitively clear is that "tends to infinity" for complex numbers means "grows unbounded in absolute value, regardless of any direction".

Let f: ℂ → ℂ be a function. The filled Julia set of f consists of the points z ∈ ℂ whose orbit under under f remains bounded, i.e., the sequence z, f(z), f(f(z)), f(f(f(z))), ..., does not grow to infinity. Show that the filled Julia set of zz² is the closed unit disc { |z| ≤ 1 }.

Show that the filled Julia set of zz² − 2 contains no real number x with |x| > 2, and that it contains every real number x with |x| ≤ 2.
Hint (click to show/hide)

Harder though, probably needs more theory: Show that the filled Julia set of zz² − 2 is precisely the real interval [−2, 2] ⊆ ℂ, i.e. there are no other numbers in it than we had already seen in the previous exercise.
Hint (click to show/hide)

The Mandelbrot set M ⊆ ℂ is the set of points c ∈ ℂ for which 0 is contained in the filled Julia set of zz² + c. We've already seen that 0 and −2 are in M. Show that the intersection M ∩ ℝ is the interval [−2, ¼].
Hint (click to show/hide)

Show or refute that M is locally connected.
Hint (click to show/hide)



This is really all there is to the definition of the Mandelbrot set, and it shows why you can already draw nice pictures of these things in only 10 to 50 lines of code.

After that, you can get arbitrarily elaborate with coloring, depending on how fast values diverge to infinity. You may have seen the lovely smooth fractal zoom videos that abound on Youtube; they come from really elaborate programs that take hours and days to render the many frames.

-- Simon
« Last Edit: December 28, 2020, 09:04:58 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #275 on: December 30, 2020, 12:16:50 AM »
Powershell 6.2 added cd -. Alternatively, there is bash for Windows, and Windows git comes with git bash.



youtube-dl got DMCA'd and is not on github.

youtube-dl is a free-and-open-source video-downloading command-line tool. Extremely useful to avoid Google's bloated web player. When I want to watch something, I download the entire video and watch it offline. Only once in a blue moon, when I want to comment on a video, I access a video's actual page.

Bleeping Computer nicely summarizes: The successful use of a DMCA infringement notice to shutdown software that is in itself not a copyright violation is a scary precedent and one that lays the groundwork for misuse in the future.

Attacking a project via DMCA does not require any legal backing. It's enough to be a holder of some intellectual monopolies that somehow feel related. github is not the defendant, but is merely by DMCA forced to comply with the attack. It's the defendant's (the project's) task to fight an unduly issued DMCA takedown. IANAL.

That's part of the reason why I want no third-party copyrights in Lix, to avoid such DMCA harassment that is hard to fight.

Anyway!
youtube-dl 2020-09-20 Python source
youtube-dl 2020-09-20 Linux binary
youtube-dl 2020-09-20 Windows binary

The problem is that Youtube often changes its protocols or file naming etc., and youtube-dl plays catch-up. Above version 2020-09-20 will probably only remain useful for a few weeks.

Who wants to help me buy a battleship and blockade the Americans with me? Free Pepsi Max Lemon will be served on my ship.

-- Simon

thanks, that's useful.

HAve you heard anything about the supposed lawsuit the US government is taking against Google? (for monopolistic practices). I've only read about this once and heard little else about it.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #276 on: December 30, 2020, 01:08:40 AM »
lawsuit the US government is taking against Google? (for monopolistic practices).

No, had to websearch for it.

Google is special in that few other corporations (Facebook?) have such extensive collections of user privacies. The resulting lawsuits feel like precedence cases much more than like consequent applications of existing laws. Thus, hard to speculate what will happen.

I still don't have a smartphone, and I search with Google 2 or 3 times per year, in the rare occasions when alternative search engines fail to find what I want.



The youtube-dl repo is back on github and their homepage has always offered their downloads; my reosting wasn't necessary in the end. Happy to see github going to offer more help for attacked developers.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #277 on: January 25, 2021, 02:43:55 AM »
Sniping

To bid on Ebay, you enter the maximum that you are willing to pay. Ebay will then bid for you up to that amount. If you enter $50 for an item, but the highest anybody else is willing to pay is only $40, you win the item at $41.

This auction ruleset (winner pays the price of the 2nd-highest bid) is called a Vickrey auction (this would require Ebay to keep all bids sealed; see next post for correction). The Vickrey auction has a weakly dominant strategy at bidding personal valuation of the item: No matter what other people bid, you'll do best if you bid your own personal valuation. You cannot strategically bid better than your personal valuation to save money.

Thus, type your personal valuation once, and don't look at the auction again, assuming that your personal valuation doesn't change during the 7 days of the auction.

Do people do that? No. Many people will snipe, i.e., enter their maximum during the final 10 seconds, sometimes the final 2 or 3 seconds.

Sniping is good when the winner must pay his full winning amount, as opposed to Ebay's rule of paying the second-highest bid + $1. When you must pay your full entered amount, you want to keep the price artificially low during the auction, and then win with a strategic snipe bid that is less than your personal valuation. Other snipers make this really hard; if you fear that the item is super rare, you snipe close to your personal valuation just to make sure. But usually, sniping is sound because everybody will bid below their personal valuation.

Why do people still snipe Ebay auctions (pay second-highest bid + $1) when game theory tells us that it's unnecessary?
  • Habit. If you have free time around end-of-auction, it's fun to watch the end and participate.
  • Not understanding that entering the personal valuation is weakly dominant irrespective of when it's entered. After all, sniping is not worse than bidding early, assuming it doesn't cause you stress.
  • Enticing other bidders to misjudge the item. If you're successful, you'll save money even if you finally enter your own personal valuation: Since Ebay displays the number of bids and the current price, you make the item look unwanted. Other bidders might underestimate their personal valuation, thus the second-highest bid will be lower. You avoid nudging other bidders to reconsider. I'll call this the Kindergarden effect (probably not a widespread name): The same item is woth more to A if B wants it, regardless of whether A and B will ever interact. Kindergarden effect is real, e.g., in investment bubbles, so it can be a reason to snipe.
  • Abusing a human cognitive bias that favors safety. You can speculate that the other person will enter a small amount first, and that he plans to rebid on first resistance. This way, he can always rest assured that his final price is close to his current entered maximum. Maybe he expects, with good reason even, to win the auction at a small price, and he hates to be surprised by having to pay close to his high correct personal valuation. By obscuring your maximum until the last second, you force him to enter his personal valuation while there is no resistance, and thus force him to suffer mathematically irrelevant surprise.
All this makes me very happy, and I should work on my own biases.

-- Simon
« Last Edit: January 26, 2021, 01:44:01 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #278 on: January 25, 2021, 04:42:12 PM »
Sniping, part 2

Pitfalls of Early Bidding, an essay that deems sniping on Ebay the only proper way to bid, even though the winner will only have to pay the second-highest bid. He defines early bid to be anything that other bidders can react to. With good internet, even 5 seconds can be too early.

He has several strong points, and 80 % of it aligns with my 3rd assumption: Early bidding drives the price due to nudging other bidders to reconsider their personal valuation. My assumptions about habit/nonunderstanding weren't even remotely considered.

He makes a particular point of how (early bids and Ebay messaging) will induce auction fever in other buyers, i.e., irrational personal overvaluation of the item. This makes sense for Ebay because Ebay will earn more fees if the item sells for a higher price. But it's detrimental for the bidders; bidders don't want other people to overvaluate, since other people's personal valuation becomes the buyer's price.



Correction to part 1: A Vickrey auction requires sealed bids, i.e., bidders can't see the bids or names of other bidders. Ebay auctions are like Vickrey auctions only if everybody snipes. Early bids violate the requirement that bids be sealed; Ebay prominently displays the number of bids and the current price (~second-highest bid).

-- Simon
« Last Edit: January 25, 2021, 04:48:21 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #279 on: January 25, 2021, 10:16:45 PM »
I use ebay a lot, and ironically I rarely use the auctions. I'd say 95% of the time I buy things with the "buy it now" option. For those unaware; this is actually very common. I've bought countless things, hundred probably over the past 5-10 years with the buy it now option; no auction, no bidding, no waiting, no games.

And the points you mention are precisely why. If I want something; I don't want to play games with strangers over how much it's worth. And I'm not re-arranging my schedule to secure a bid on ebay.  Sometimes I bid on an item early I know I won't get just to drive the price up then laugh maniacally to myself.

I wanted to make the point about buy it now; because apparently a lot of people don't know about this; and shy away from ebay because they think it's all auctions. Also of course there is the gamble of buying from random people but in my experience I've had about exactly the same rate of quality/poor quality and good/bad experiences with ebay then with any other major retailer. Plus I really like the idea of giving money directly to fellow citizens instead of to a big corporation. Only once in fact, in the 10 years I've been using ebay have I ever had a bad experience. I bought and item which never came and got no word from the seller; I informed ebay and they refunded me the amount in full. So I honestly have no complaints what-so-ever.

Very rarely I have won a bid by bidding early. Its happened I think most likely with cases where there were plenty of other options listed at the time and/or it was a low demand item. Usually I was the only person to bid at all. I won my current video graphics card that way (GTX something(?) ~100$ used.) It was an older (arguably outdated) model.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #280 on: January 26, 2021, 06:14:57 AM »
A Vickrey auction requires sealed bids, i.e., bidders can't see the bids or names of other bidders. Ebay auctions are like Vickrey auctions only if everybody snipes. Early bids violate the requirement that bids be sealed; Ebay prominently displays the number of bids and the current price (~second-highest bid).

eBay's auction system is very unlike a traditional outcry auction, or even a sealed-bid type auction. The incentive of an eBay auction is to bid, in the first instance, the highest you'd be prepared to pay. This contrasts massively with other auction types, which tend to allow bidders to start very low and increase their bids in increments until somewhere close to the item's true value is reached.

Like mobius, eBay's bidding system totally puts me off getting involved with auctions, because far from presenting the opportunity to get an item at a fair price, or even a greatly reduced price, it's far more likely to drive the price higher than is fair, and encourages such practices as "bid sniping". I've won items by sniping, and there is definitely an accompanying rush of adrenaline, and the feeling that you've "beaten everybody", but it's an empty feeling, especially when you've been on the receiving end of a snipe and you know how frustrating and annoying it is.

This said, if an item isn't very popular and nobody else is bidding, it can be possible to get items extremely cheaply, and this can sometimes feel like cheating the seller. However, if the seller chooses to start the bidding so low, then they accept the possibility that the item will sell for that price.

Ultimately, I find that "Buy It Now" or "Best Offer" are the best ways to conduct a transaction on eBay, and I'll always favour these over an auction, even if an auction is somewhat presenting the opportunity to get the item at a lower price. You can never be sure that the opportunity is actually there until the auction has ended, and by then you could already be enjoying your item having bought it from someone who simply slapped a reasonable price tag on it.

Sometimes I bid on an item early I know I won't get just to drive the price up then laugh maniacally to myself.

:crylaugh: :crylaugh: :crylaugh:

Brilliant.

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #281 on: January 26, 2021, 07:39:00 AM »
Even ignoring eBay's specific implementation details, I definitely feel like an auction is the most stressful way to buy an item. I'd have to be pretty desperate for a deal to risk the auction over potentially paying a premium for the relatively stress-free buy-it-now option to get the item at a known, fixed price (sure, you could end up paying less with the auction... but you could also end up paying more, or not getting the item at all).

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #282 on: February 11, 2021, 10:11:52 PM »
Guess what? Another point for Ebay.

I recently tried buying a mechanical keybord from a web store called "monprice.com". Package never came, though they said it should've been "delivered" on XXX. Before even asking for a refund I ordered the same exact product on ebay and got it in four days [this was without urgent shipping or anything btw].

This sort of thing has happened a number of times with Amazon and other places.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #283 on: February 14, 2021, 05:37:14 PM »
Yeah, I tend to buy stuff at auctions only if it's near-impossible to get the stuff otherwise. E.g., out-of-print board games from decades ago.



Potential topics for future blog posts:

Nifflas's games from a game designer's perspective. In the past 2 weeks, I re-played Within a Deep Forest and Knytt. Download Nifflas's freeware games, they run on Windows and in Wine, they have lovely tracker music.

Card solitaires. My custom card set for PySol is 4-color, and I should make a dark mode for it. Post full rules of a solitaire game I invented in 2011. Good existing games:
  • Pile On (a.k.a. Pileon, Pile Up, Beeswax),
  • House on the Hill without undo,
  • 4-suit Spider with undo.
General software engineering. I haven't written much about it in a while. Should get back to it. E.g., look into C++20 more. Or write more posts for Object-Oriented Design with Simon, the perennial favorite topic of Simon.

Cute C++ trickery. It's possible to use a function pointer as template argument. And there is a rule that templates with the same arguments produce only a single instantiation. That leads to this
shady pearl. (click to show/hide)



As usual, many hobbies compete for my free time, so prod me for the stuff that you find interesting. You should do that with Lix bugs too, prod me for what annoys you most, so that I can prioritize.

-- Simon
« Last Edit: January 27, 2022, 11:12:50 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #284 on: March 15, 2021, 03:58:23 PM »
Social Golfer Problem

You are organizing a Bridge/Skat/Doppelkopf/Mahjong/... tournament. Each table must have exactly s players (s = size of a table); e.g., for Bridge, s = 4. Based on the pre-registration, you're happy that the total number of players is a clean multiple of s, so for each session, you can distribute the players evenly to g tables (g = number of groups).

During a session, the players will remain seated at their table. Between sessions, you can re-seat all players between all tables as you like. Our task is to schedule the seating for the sessions. We want to allow as many players to play with each other as possible. We'll ignore time constraints. Thus:
  • Given s and g, find the biggest possible number of sessions, w, and a seating schedule for the w sessions such that no pair of players ever meets twice. It's OK if a pair never meets. If every pair meets, then we call the schedule a perfect solution.
  • Given s, g, if above's solution wasn't perfect, find a seating schedule that allows each pair of players to meet, and that, secondarily, minimizes the excess. By excess, I mean that it's really bad if players play 3 or even more games together, and that we also want to minimize the number of pairs that play 2 games together.
Perfect solutions exist, e.g., for:
  • 16 players, s = 4 players per table, g = 4 tables, w = 5 sessions.
  • 15 players, s = 3 players per table, g = 5 tables, w = 7 sessions.
  • 9 players, s = 3 players per table, g = 3 tables, w = 4 sessions.
Image (click to show/hide)

The 16-player-4-per-table case is particularly interesting because it has this lovely graphical method to recreate the schedule: The image has 1 center point, 15 points around it in 3 concentric pentagons, and a system of lines. Consider only the lines in red, ignore all other colors. To create the pairings, rotate the red lines around the central point, and every time the lines match with the points (happens 5 times during a full turn; this produces the lines in the other colors), seat connected points at a table.

I apologize to the Bridge players if they register in partnerships instead of in singles. Matching partnerships is like matching chess players; it's the specialization of the Social Golfer Problem for s = 2.

Links:
-- Simon
« Last Edit: March 17, 2021, 11:33:44 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #285 on: March 26, 2021, 06:39:52 PM »


Tonight, I took the time to make this lovely gif of angry Colonel Shuffle. It's cropped sensibly and contains the maximum possible length of the shot without other stuff getting in the image.

Youtube: Source video (40 seconds)
Excerpt from Mississippi Hare, Bugs Bunny cheats Colonel Shuffle at Poker. Classic comedy.

There is even a bonus story here. Why did I think of this steamy cartoon scene today? Two weeks ago, I bought a new 49-inch monitor for home office. It works perfectly. Thus, it was time to dispose the packaging: A huge cardboard box and two gigantic pieces of polystyrene. They were too big for normal garbage, so I stuffed them in the car and drove to the recycling plant. The weather was surprisingly hot, I got into a traffic jam, and the car navigation didn't know the plant's street. I was about to run out of time before the plant closed for the day. I took half a day off work for this? I had to call Icho in the middle of the traffic jam to look online for nearby streets, in hope to enter one of them into the navigation system.

-- Simon

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #286 on: April 01, 2021, 01:42:55 AM »
I had to call Icho in the middle of the traffic jam to look online for nearby streets, in hope to enter one of them into the navigation system.

Somehow this doesn't surprise me. And I'm certain he knew exactly where you needed to go without researching :P :D
great gif btw, I remember that one from my childhood! :lix-cool:
« Last Edit: April 13, 2021, 04:46:14 AM by Simon »
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #287 on: April 14, 2021, 04:39:42 AM »
Thanks! No, this time, Icho had to research. I've moved to nearby town last year, and neither of us knew that plant in the middle of nowhere.





Amount estimation

You have n people. You want to cook dinner/rice/noodles/... and ensure to cook enough for all n.

Let's assume that when we, as a single person, are really hungry, we eat y noodles. Should we cook ny noodles for the entire group? No, that's too much. The chance that everybody is super hungry is small. For a single person, you'll certainly want to cook y noodles. But for 4 people, 3y noodles will probably suffice. For 5 people, 3.5 y. If you have women in the group, even more reason to cook less per person than y.

Linear models of the maximum for safety estimation won't scale when probability is involved. You'll want to model the average and scale that linearly. (Plus a safety amount that grows logarithmically.) But the average, as natural as it sounds, it can be surprisingly hard to reason about it. It's often much easier to think of an extreme case -- certainly, 1-2 people of the 10 invited will be extremely hungry -- and that is wise, and then linearly extrapolate to 10 people after forgetting that we're really extrapolating a statistical maximum for one person, and that is wrong.

The converse principle applies when you scale down: Let's assume you've heard that 100 people need Y noodles. Then, for 10 people, cooking 0.1 Y would be too little. You'll want to cook 0.15 Y.

-- Simon
« Last Edit: April 14, 2021, 02:52:47 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #288 on: April 16, 2021, 05:15:20 AM »
4 spaces

Indenting code with anything less than 4 spaces is claustrophobic. 4 spaces is good.

Example of bad is Google's C++ style that indents with 2. Why not 1 then? Doesn't make a difference much anymore in clarity.

The alleged exception is Scala -- the language, and even more the culture around the language. They favor nested expressions, not only nested compound statements. Likely, Scala writers indent carefully even within a single expression, and then make long expressions?

Several times already, I've toyed with the thought to make Scala the next language to learn. Allegedly, its type system has elegant solutions to solve common problems, often different to what was considered the solution in academics. Nnnnnnnn... but do I really want to chain the JVM permanently to whatever project it will be...



Nesting within a single expression will happen in many languages, but it hasn't yet been a reason for me to reject 4-space indentation.

Example from my D (click to show/hide)

-- Simon
« Last Edit: April 16, 2021, 05:33:18 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #289 on: April 27, 2021, 06:13:31 PM »
Hice

One mouse, two mice.
One house, two hice.
Very nice.



More seriosly, to hammer it in stone: I want to adhere to an early daily rhythm. All times are local times, i.e., UTC+2 in Summer, UTC+1 in winter.
  • 05:00: Rise. Minimal physical excercise. Shower. Dress. Take morning walk.
  • 06:00: The bakery opens. Buy Brötchen, return home, eat breakfast.
  • 07:00: Start work.
  • 16:00: End work if the day was normal, otherwise continue working.
  • 20:00: End of private computer usage. Offline hobbies, household, or early bed.
  • 21:00: Go to bed, maybe some reading, but not for hours.
Exceptions are OK for Lix sessions or other social things with a group of people who don't adhere to early rhythms. The schedule provides 8 hours of sleep, it's usually okay to compress it to 7 or 6 hours for a day, but it should never get out of hand.

Ending computer usage an hour before bedtime is common advice, see earlier posts by me/geoo on sleeping problems.

Good night!

-- Simon

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #290 on: April 29, 2021, 11:18:04 PM »
Regarding coding, the thing I find most difficult to get used to is everything being in curly braces and with different indentations.

By the time you have something like this:


void makePanel(Editor editor)
{
    editor._panel = new EditorPanel();
    addDrawingOnlyElder(editor._panel);
    with (editor._panel) {
        onExecute(
            Lang.editorButtonFileNew,
            KeySet(),
            () {
                editor.askForDataLossThenExecute(() {
                    editor.setLevelAndCreateUndoStack(newEmptyLevel, null);
                });
            }
        );
        // ...
    }
}



I have no idea which set of curly braces goes together, it's so easy to lose track. I'd prefer a language that is more like this:

function A = (description of function)
function B = (description of function)
function C = (description of function)
condition D = (description of condition)
condition E = (description of condition)

1. Do A
2. Do B
3. Do C, unless D, in which case do A again
4. Do B again, but only iff E

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #291 on: April 30, 2021, 12:53:40 AM »
In most (if not all) languages with curly braces, the indentation doesn't actually matter - it's just a formatting tool to make it easier to follow the braces.

I think I've mentioned this to you before in the Discord, but Python is a very good starter language. Its syntax is easy to follow. The indentation is enforced in Python, and once you understand it adding the curly braces in languages that have them is easy. It's also rather practical - people actually use it to do real tasks; it's not just a language that was designed specifically for people to learn off of before moving on to something else. It is a bit slow relative to C, C++, D, C#, Java, etc., but for a lot of tasks it's not slow enough to be an issue. In Python, your example would look something like this:


def A():
    # Do stuff

def B():
    # Do stuff

def C():
    # Do stuff

A()
B()
if not D:
    C()
else:
    A()
if E:
    B()


Note that this won't actually run, though, because the functions don't actually have anything in them, and that's not allowed: any time an indented block is expected, it has to be filled in with something, and comments don't count. There is a "pass" statement that can be used that can be inserted where the program is doing nothing, but a statement is syntactically required, however.

EDIT: Note that I never actually defined D and E. If they're simple conditions, e.g. my_variable < 2, it would make the most sense to just inline them instead of defining it ahead of time, e.g.
if my_variable < 2:
    do_stuff()


However, if it were a more complicated condition, you could make a function that evaluates it and returns either true or false, then call that inside of if statements:
def D():
    # Some long and complicated calculation here
    return result  # result is either True or False

if D():
    do_stuff()
« Last Edit: April 30, 2021, 01:09:22 AM by Dullstar »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #292 on: May 01, 2021, 01:15:47 PM »
The chunk in Python would look like this:

def makePanel(editor: Editor) -> None:
    editor._panel = EditorPanel()
    addDrawingOnlyElder(editor._panel)
    with editor._panel as p:
        p.onExecute(
            Lang.editorButtonFileNew,
            KeySet(),
            lambda: editor.askForDataLossThenExecute(
                lambda: editor.setLevelAndCreateUndoStack(newEmptyLevel(), None))
        )

Readability is roughly the same? Maybe indeed a tad better without the closing brace forest.

Sidetrack: Python "with" (click to show/hide)

Quote
I have no idea which set of curly braces goes together, it's so easy to lose track. I'd prefer a language that is more like this:
[declare many smaller functions and nest less]

Right, this is the correct feeling. We shouldn't write long or deeply-nested functions, but rather put different parts of the logic in separate functions.

The nesting in this example is necessary because we must capture the local editor in an argument-less function. Thus the definition of the function must be in the same scope where the editor variable of interest exists, which cannot be global scope.

The UI button gets assigned an argument-less function. All the button knows to do is call the function whenever we press the button. The button doesn't know about Editors, and it shouldn't have to know about them. It receives an argument-less function that already contains all necessary extra information (in its "closure").

I didn't choose the example because deep nesting were good, or for showing that I can use all these language features together; deep nesting is indeed to be avoided in general.

I chose the example because even when deep nesting cannot be easily avoided, 4 spaces is OK as an indentation. Any other solution in this particular instance of the problem, e.g., capturing the extra information in Command pattern classes like I do for the undo feature, would be 3-5 times as long and touch unrelated Button code. Thus, I accept the deep nesting this time, as a deliberate tradeoff.

-- Simon
« Last Edit: May 02, 2021, 12:45:00 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #293 on: May 13, 2021, 12:36:41 PM »
Culture

Image: Kvick Sört

Concise explanation of the fundamental idea, practically without words. Well, two uses of words, for the two recursive calls.

You can argue that it's too high-level, and you want lower-level algorithm that move the pivot element into place and shift the elements around (the partitioning step). This doesn't seem trivial to me if you insist on minimal complexity, i.e., I believe there is a chance that a naive implementation of the partitioning has higher-than-necessary complexity.

Youtube: Core Design Principles for Software Developers
by Venkat Subramaniam a.k.a. Hilarious Indian Scala Guy
2.5 hours, from 2015.

Warmly recommended to watch after you have a grounding in programming. Shows how software design principles (DRY, single responsibility, ...) apply in contemporary langauges that allow to mix object-oriented style, functional style, and metaprogramming.

High-level explanation of the ideas, often with stories as example. If there is code, it's mostly Java.

I recommended this to Arty in IRC 3 years ago, and it's still as good as ever.

-- Simon

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #294 on: May 13, 2021, 12:56:13 PM »
Image: Kvick Sört
---
You can argue that it's too high-level, and you want lower-level algorithm that move the pivot element into place and shift the elements around (the partitioning step). This doesn't seem trivial to me if you insist on minimal complexity, i.e., I believe there is a chance that a naive implementation of the partitioning has higher-than-necessary complexity.

Interesting!

The algorithm itself is not complex at all, I think the only potential problem is that the steps must be repeated several times to reach the end goal. A more complex algorithm may sort the blocks more quickly (i.e. with fewer steps), so it seems to me that the simpler algorithm comes at the mere cost of higher repetitions.

Youtube: Core Design Principles for Software Developers
by Venkat Subramaniam a.k.a. Hilarious Indian Scala Guy

Added this to my Java watch list :thumbsup:

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #295 on: June 17, 2021, 06:31:22 PM »
I haven't stuck to the sleeping schedule that wakes at 05:00 local time. It's hard going to bed early enough when it's bright outside, and housework/stuff/... happens enough in the evenings. Maybe I'll get to it some day again.

Weight loss bet

I want to lose weight again. I'm weighing 89 kg at 1.91 m with mostly fat, little muscle. The goal weight is 80 kg until end of the year. The method is the proven guinea pig diet: Eat lots of cucumber, put lots cucumber on bread to make meals more elaborate to prepare, have lots of healthy veggies, and have fewer snacks. Light strength training with pushups, but nothing excessive.

Around December 20th to 24th, I'll weigh myself. For every 100 g above 78 kg, I will donate 1 euro to the hosting of Lemmings Forums. E.g., merely touching the goal weight of 80 kg is 20 euros. Being lazy and not losing weight at all is 110 euros.




-- Simon

Offline Ramon

  • Posts: 118
    • View Profile
    • JRK Studios
Re: Simon blogs
« Reply #296 on: June 22, 2021, 09:50:09 PM »
Back to cucumber diet? I vaguely remember having heard this from you before, or was it geoo? :P How about some more garlic in the pot?

Do you find 89 kg to be a lot for your height?

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #297 on: June 23, 2021, 12:05:41 AM »
Quote
For every 100 g above 78 kg, I will donate 1 euro to the hosting of Lemmings Forums. E.g., merely touching the goal weight of 80 kg is 20 euros. Being lazy and not losing weight at all is 110 euros.

Take note everyone: The forums' survival is dependent on convincing Simon to eat lots of pizza. Not really, the site is fine, just in case anyone was actually worried.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #298 on: June 24, 2021, 05:41:30 PM »



Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #299 on: June 29, 2021, 09:00:04 PM »
Thanks for the feedback.

Yes, 89 kg with barely any muscle is too much. 89 kg would be nice at 1.92 m weight were I to pack a punch!

Thumper is so happy about his pizza, I ordered burgers this past weekend because of him. It's probably okay to have one Thumper day per week if the others are all guinea pig days. Tomorrow, back to more veggies.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #300 on: July 19, 2021, 10:12:55 PM »
87 kg after one month. (Goal weight is 80 kg by end of year. Donation to Lemmings Forums hosting will be 1 euro per 100 g over 78 kg.)

Link dump

Duke Nukem 2 is a classic DOS platformer where you blow up stuff ("Duke... You have destroyed everything. Excellent!"), enjoy grammar on which Proxima and I didn't agree ("It is the strongest of any weapon!" while I insist that this must be written "It is the strongest of all weapons!") and enjoy graphics ripped from Turrican.

To sort items by rating, don't sort by average (bad when an item has few votes), and don't sort by absolute difference either (bad when an item has many votes). Sort by the statistically lowest-plausible score by admitting larger variance when an item has only a few ratings.

The collection of "page is under construction" gifs contains some gifs with Lemmings. Can you find them?

-- Simon

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #301 on: July 20, 2021, 03:53:19 AM »
Quote
("It is the strongest of any weapon!" while I insist that this must be written "It is the strongest of all weapons!")

I suggest a quick read into descriptive vs prescriptive in linguistics. ;)
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #302 on: July 23, 2021, 06:13:34 AM »
Personally, I would consider both to be correct. If I were forced to choose one I would probably go with the "all weapons" version instead of the "any weapon" version, but I would not cite grammar as the reason for choosing it. You could also just say that "It is the strongest weapon" if you want to be concise. You could also go with something like "It is the strongest weapon in existence" or something along those lines. Really, the meaning is the same between all the variants, and it's just a matter of personal preference.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #303 on: August 20, 2021, 02:22:16 AM »
86.5 kg after the second month. It's the slowest of any diet.

"It is the strongest of any weapon!", in a strict sense, I still feel like that's the wrongest in all grammars, at least there are much clearer phrasings. But I accept that "any" is special in English and will bend the phrase to mean what (is closest to the original phrase) and (still fits the type system). Since a weapon -- in a computer game where we cannot combine weapons -- cannot be the strongest weapon of a weapon, "any" will bend to the closest meaning: The weapon is the strongest overall.

Counterexamples: "The skin is the biggest (organ) of any human." or "Number 1 is the smallest of any standard six-sided die." In each of these, "any" has no reason to bend, but will merely mean what it means in colloquial mathematics: "For all six-sided standard dice, number 1 is the smallest."

"It is the strongest weapon.", very nice. This is the best.



Game of Skill

We have a singleplayer game. We can play it randomly, or we can strategize and plan and find optimal moves as often as possible. It's possible to apply skill to nearly any move during the course of the game. If we strategize consistently, our chance to win is 20 times higher than when playing randomly. Is it a game of skill?

My intuitive answer is yes.

Another view is that the relative impact of strategy (20x) doesn't matter, only the absolute impact. E.g., to quote Morehead and Mott-Smith from The Complete Book of Solitaire and Patience: No game that has a slight chance of being won -- say worse than one chance in ten -- can be a game of skill, because the choices will not have sufficient effect on the outcome.

There is lots of wisdom here. We should value our limited time.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #304 on: September 05, 2021, 06:57:44 PM »
I worked the past Saturday. Peaceful refactoring evening, no collegue will ever interrupt by calling. (Probably never. You can't be sure in software development.) The type system is your trusty friend late at night. Feature is now ready for a smoke test on Monday morning.

To compensate, I spent the Sunday outside. Nobody from the group of university friends had time today, and I took a two-hour walk in the forests alone.

I want to play more Zendo in reallife. The physical pyramids have a certain attraction that words or drawn pictures don't have. Maybe it's nostalgy for 2014 and 2015 when I played Zendo excessively with university friends.

I bought a kilogram of honeycomb. Quality Brötchen topping.

I tend to take days off work in small chunks. There won't be time in 2021 for a full week off that I could pour into any single hobby. All hobbies will proceed slowly. Lix is still cooking. Eventually, I'll post updates in End-of-singleplayer screen.

-- Simon

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #305 on: September 06, 2021, 12:55:46 AM »
I bought a kilogram of honeycomb. Quality Brötchen topping.

Mmm nice! Is this similar to a Crunchie?

Regarding the diet: weight does not always equal health status. However, it seems to me like the choices you're making to reach your goal weight are all improving your overall health also, which is great :lemcat:

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #306 on: September 12, 2021, 06:41:43 PM »
86 kg after 3 months. We're not getting anywhere, are we.

I still eat too much and exercise too little. Let's see. Right, weight is largely a matter of how much you eat, not necessarily correlated with fitness.



Brötchen are German bread rolls that you cut in half, then top with butter and sausage/cheese/... For images, see my post Brötchen in Mobi's blog and Icho's wonderfully adequate praise of Mettbrötchen in Mobi's blog.

Honeycomb is what it literally means: The waxen structure by bees, filled with honey. You can eat honeycomb, no problem, and it's become my favorite way to have honey. Honey or jam are best on lighter Brötchen.

-- Simon
« Last Edit: September 12, 2021, 06:52:34 PM by Simon »

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #307 on: September 14, 2021, 11:22:05 PM »
do you go for walks/jogs/biking anything like that? Forgot part of your post before writing this. I do that once on a roughly weekly basis. I sort of gotten addicted. If I miss just one week; I really miss my hike. I love being out in nature and getting the exercise.  Besides the exercise it's also a great way to think and brainstorm if you're alone or even with someone else.

Never had honeycomb but I am curious. I love honey but rarely have a use for it. Oatmeal is about the only thing I use it for. I don't put sugar in coffee or tea. ....I haven't eaten oatmeal in a while and I like it. I should get back into that.
« Last Edit: September 17, 2021, 01:12:49 AM by mobius »
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #308 on: November 22, 2021, 06:56:54 AM »
87 kg a month before the end of the bet. This will be a wholesome donation for LF.

Sleeping rhythm is botched from complex git merging at work that riffled across way too many repositories. geoo asked me via PM tonight why I was up at such unholy times; this merge was the biggest reason.

I haven't been active here much in the past 1-2 months. I've lurked a lot. Many smaller non-Lemmings projects have come together, and are still coming together. It's always tempting to let projects sit at 80 % once all the thinking is done. But pushing projects to 100 % is healthy: You'll get the sweet, sweet peace of mind.

Lix is getting 16 in April 2022, sweet sweet sixteen. And still no end in sight! I'll write the roadmap later in 2021.

-- Simon



Split off the Baba discussion into the Baba Is You thread.
« Last Edit: December 09, 2021, 04:24:14 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #309 on: December 12, 2021, 09:04:09 AM »
Thinking

Mathematicians, scientists, puzzle fans, chess players, ... are supposed to be good thinkers. What does it mean: To think?

I conjecture:

Thinking is waiting for a good idea to arise. This activity takes little effort; instead, it takes experience and intuition in your area of work.

Thinking hard means focussing on how good partial solutions work or do not work towards a full solution. The effort here is in blocking area-unrelated thoughts. One way to achieve this is to mentally grind the already-categorized work again and again. Another way is to force yourself away from distractions.

I'll state this once more, because it's the main point of this conjecture. The effort during thinking hard is not spent by grinding the brain against the new work. Thinking hard means spending effort on unrelated or already-done related things, keeping them out/in mind, to let the brain think in peace, to give the brain the best conditions for the effortless generation of ideas.

You can spend further effort on preparation: Sleeping well, eating healthy, providing caffeine, ..., it all comes down to making it nice for the damn uptight brain to do what it does effortlessly, if it so wants.

-- Simon
« Last Edit: December 12, 2021, 09:15:07 AM by Simon »

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #310 on: December 13, 2021, 04:37:42 AM »
Thinking

Mathematicians, scientists, puzzle fans, chess players, ... are supposed to be good thinkers. What does it mean: To think?

Given the philosophical nature of this question, I'm surprised that you didn't include "philosophers" on this list ;)

I'd also add artists (musicians included in that term), since a lot of making art involves thinking and problem solving; most creative processes essentially involve a series of decisions, some of which are in response to problems that arise during the process itself.

Also, that way, I can be included on this list :) - I'm certainly not a mathematician or a scientist; I enjoy puzzles, but only ones I can solve ;P so I probably wouldn't call myself a "fan"; my chess skills are probably average at best, although again I do enjoy an occasional game. So, when it comes to thinking I'm much more of an artistic and philosophical thinker; I'm interested in questions more than answers, and exploration more than destination.

It's interesting that you posit a definition of "hard thinking." I'm not sure I entirely understand the difference here... for me, I'm either focusing on something properly or I'm not. I would consider "hard" thinking (by your definion) to be part of the same process, albeit perhaps further into it should it need to be extended or intensified for any reason.

Interesting topic!

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #311 on: December 20, 2021, 05:47:57 AM »
you didn't include "philosophers" on this list ;)

I didn't include software engineers either. :8():

Hmmm... why is your first reaction that you want to be included in a list of stereotypes of who are merely supposed to be good thinkers rather than be a good thinker?

Quote
add artists (musicians included in that term)

Yes, most likely the same process.



Bettings Ends

84.7 kg before breakfast. For 5 weeks, I got lots of sleep and didn't overeat.

I'll call it here. Donation for LF hosting will be 67 Euros at the promised rate of 1 Euro per 100 g over 78 kg.

-- Simon

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #312 on: December 21, 2021, 11:45:10 PM »
This stimulates my thought to a question; I wonder if anyone else has these feelings;

When thinking very hard, particularly, or most noticeably for me, at least, on a logical type of problem/puzzle, I know for certain when I'm in a deep state of though/concentration and when there is in fact 'something to' the problem I'm trying to solve. A good example of such a problem here is a puzzle that I don't know is solvable or not like some random Cheapo Level I come across ;P. This is very difficult to describe but I'll try anyways;
Solving a complex logical puzzle requires memory and ordering items around in your mental space. Something I love a lot but always struggled with. But I honestly feel a distinct mental feeling when this takes place. Almost a 'physical' feeling but that word may be misleading here.* And its so satisfying when you figure out something complex like this and see it to completion.

I feel a similar albeit quite different feeling when creating artistically. Though with video games or music the same Eureka feeling can happen, I think the memory part is very different (or non-existent). For me when creating it often involves starting by mushing random things together or going over practice routines and then veering off into randomness or unknown territory. Eventually you hit upon something that strikes your fancy and you follow it to more interesting things. I don't think much memory is required here (at least in the logical sense I use above, different from other types of memory, obviously memory of your routine or skills is needed etc.) But idk; correct me if this is patently wrong.

*The better I get to know my mind and how it words the more I've noticed and have been able to detect these different discrete types of mental feelings. That is when I'm not dead tired, which is most of the time because of my job >_>
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #313 on: February 05, 2022, 09:26:09 AM »
Killing a Rule

When a rule (e.g., in a tournament ruleset for a game, in a programming style guide, in real-world law, ...) isn't pulling its weight, remove it. Users will have a much easier time to focus on the real work, or on the meat of the game. Also, the rules that matter will be easier to follow, and they stand out better in the rulebook.

Problem: In the committee for maintaining the rules, it's tough to flat-out abolish a rule. People are happy to change rules, add rules, ..., but it's harder to abolish one. Surely, they think, the rule must have served some purpose ages ago (usually, yes, but was it worth it?), and the cost-benefit-ratio must have been good ages ago (less often so, this statement often lacks proof), so the committee should salvage the spirit (but why, given the rule sucks today?). And sunk-cost fallacy hits: We wrote the rule down, we can't cut it without replacement.

For example, if your committee has 5 members, of which 4 prefer the flat-out cut and 1 wants to keep it, it's tempting to put in compromises that nobody wants in that exact form, just to finish the discussion. I'm sure that this is the source of a lot of rules garbage in real life.

Takeaway: When you enter a committee, be careful not to introduce junk rules. Don't expect that it's okay to make mistakes and that others will clean it up when it sucks. Future committee members will have a surprisingly hard time killing the junk.

It would have been much harder to cut the player-variable spawn interval a.k.a. release rate from Lix in a committee. :lix-tongue: VSI had nonzero benefit and still sparks debate.

Split off: Loap, Coarse-grained Spawn Interval



Stuff that one finds on the internet:

Lovely 2012 music CD cover (click to show/hide)

-- Simon
« Last Edit: March 07, 2022, 11:18:56 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #314 on: March 07, 2022, 11:49:40 PM »
Wisdom from the ages

When you serialize information, build into the format some amount of redundancy. Not too much, but not too little. Here's an example.

In v1 of the networking protocol, the server sends to the client a single packet to describe several Foos at once.

Header (8 bytes)
Foo #0 (32 bytes)
Foo #1 (32 bytes)
Foo #2 (32 bytes)


...for a total packet length of 104 bytes about 3 Foos. When there are 4 Foos, we'll send 136 bytes, when there are 5 Foos, we'll send 168 bytes, and so on. One header per packet, followed by the Foos.

When the v1 client receives the packet, let's assume he knows only the length of the payload. To deduce the number of Foos in the packet, the client will deduct 8 from the length for the header, and divide the remaining number of bytes by 32. Very nice.

Now, in v2 of the networking protocol, it turns out that the Foos gained another special feature, let's call it X. Feature X is optional, Foo works with or without it in v2. We don't want to cramp X into the existing 32 bytes; instead, we decide to send 40 bytes per Foo with X.

Header (8 bytes)
FooX #0 (40 bytes = 32 for the old Foo + 8 for X)
FooX #1 (40 bytes = 32 for the old Foo + 8 for X)
FooX #2 (40 bytes = 32 for the old Foo + 8 for X)


The server happily sends out v2 to the newly updated clients that understand Foo with X.

Naively, you can't send these packets to a v1 client. If a v1 client gets a packet of length 88 with two FooX, he will deduct 8 for the header, and then decide that 80 isn't divisible by 32. Even if he doggedly interprets the bytes starting at offset 8 correctly as Foo #0, he will misinterpret the bytes at offset 8+32 as Foo #1 even though Foo #1 starts at offset 8+40.

Even worse: When you send a packet with 4 FooX to a v1 client, he'll be thoroughly confused because the packet length of 168 bytes makes complete sense to him. He'll divide 160 by 32, interprets it as 5 Foos, and won't even notice the problem from the packet length.

For the v1 clients, there are three possibilities in this new world where all the cool kids are doing X, but they're still happy with the X-less Foo:
  • Don't allow v1 clients on the v2 server.
  • Write extra decisions into the server to send v1 packets to v1 clients and v2 packets to v2 clients, and also take care to interpret packets coming from v1 clients one way, and v2 packets another way. Lots of extra code in the server. Who's up for long nights of romantic object-oriented refactoring?
  • When you write the v1 server, anticipate the need for growing Foo in v2 six years down the road. Don't make the clients rely purely on the division by a previously agreed struct length. Already in v1, write the length per Foo into the header. This way, clients (both v1 and v2) can receive the v2 FooX packets correctly: Both deduct 8 for the header, then iterate the remaining bytes by the stated length of FooX, 40, and interpret the first 32 bytes correctly as Foo #0. The v2 clients will know, in addition, what to do with the following 8 bytes for X #0. The v1 clients will cleanly discard those 8 bytes before starting to interpret Foo #1.
Instead of writing the length of a transmitted Foo, you can also write the number of Foo, assuming the receiver knows the total packet length and will then divide. Either allows the clients to deduce the other from the total packet length. For the recipient, I feel it's easier when he's told the length per Foo.

I'm sure there are more related ideas in network serialization, but this one is particularly annoying and enlightening in hindsight. It's more natural to anticipate this when you've designed binary file formats in the past. I've always avoided inventing binary file formats and it shows in the networking packet design. :lix-tongue:

The art in protocol or format design, as in code design, is to anticipate the most likely change, and keep the design open to changes in that direction. It's okay if most other changes are hard and need more code.

--  Simon
« Last Edit: March 09, 2022, 05:48:58 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #315 on: March 19, 2022, 10:44:22 PM »
Unix Wizard (click to show/hide)

This is a poster from 1985. What do we learn from it?
  • You can do everything in the shell.
  • You have many separate ingredients to mix and match.
  • Interesting data structures arise from such mixing.
  • Unneeded leftovers, pipe them into null.
  • The shell script is not an ingredient; it's a suggestion for how to combine ingredients.
  • By that time, C had superseded B (the programming language) since the B pot has a crack.
  • Cats follow those proficient in the mystic arts.
The strangest thing in the picture is the pot of oregano; there is no classic Unix tool called oregano. This oregano is presumably a joke.

The same picture as a 32 MB .png.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #316 on: June 09, 2022, 02:40:26 AM »
Mother of all Principles

Many software development principles, e.g., many of the object-oriented guidelines, follow from DRY.

DRY (Don't Repeat Yourself): Every piece of knowledge should have a single unabiguous authoritative representation in the system. Antonym: WET, Write Everything Twice, We Enjoy Typing.

Corollaries:
  • Repetition in logic calls for abstraction.
  • Repetition in process calls for automation.
Examples:
  • Extract duplicated logic into a new function/class/template/..., and call it from the original places.
  • Extract interface from several similar classes, and call the original functionality through the now-common interface.
  • Interface Segregation Principle. Have concise interfaces so that usercode can apply it where it fits, then usercode doesn't have to reinvent the wheel -- now you've dried usercode that you didn't even write. Also, test code doesn't need to mock too many unneeded methods.
  • Group closely related fields into a structure. It starts with struct Point { int x; int y; } or struct Version { int major; int minor; int patch; }. At minimum, the DRY happens when passing, re-assigning, ..., several fields when functions forward the arguments to other functions.
  • Write automated tests.
  • Write scripts or use test/build/packaging servers for common tasks.
  • Document solutions whenever people ask the same question more than once. I.e., have FAQs to avoid answering the same question every time.


About FAQs. Continuously convert FAQs into proper documentation, or your FAQ page will become the only important documentation, which is bad for the bigger information architecture.

A grotesque disease in modern documentation culture is to design and write FAQ sections upfront, before the release of the product, with questions that the authors would like to be asked, not with questions that really came up during support. You can often detect these anticipated questions from self-indulgent wording in the question.

Bad! FAQ are frequently asked questions, not frequently anticipated questions. Anticipated questions go into the normal documentation. If you're so terrible that all your documentation is bullet-point style without bigger structure, you don't solve the problem by calling it FAQ, you solve the problem hiring better technical documentors, better tech support, and flattening your processes to connect the two teams.

Documentation can violate DRY if you can't easily fix it. E.g., if people don't read the manual and only look in some other place, sure, put the answer in two places. But let this insight guide you to refactor the documentation into where people really look.



So much for DRY, the mother of most principles.

But some principles don't taste like DRY, no matter how long we chew. Why is a long, deeply-nested method bad? It doesn't necessarily repeat any logic, and it automates everything. It can be 100 % DRY and it still doesn't feel nice to edit/understand.

I believe that nearly all principles follow from either DRY or from SLAP.

SLAP (Single Layer of Abstraction Principle): Each piece of code should be at a single level of abstraction. Don't mix the high-level structure with the low-level details.

Examples:
  • Refactor the long function into several shorter functions, then either call them from the original one after another, or add even more structure that became apparent during the split.
  • Don't nest too deeply. Don't mix complex preparation/iteration in a single function with the payload work per element. Describe the work per element in one method and the iteration in another. Bonus: The work per element, as a function, becomes a nice argument to higher-order functions (filter, map, fold).
  • Single Responsibility Principle. Make a class do one thing well. Split big classes with multiple responsibilities into several classes. The original class can still stay as a (now much shorter) mediator to tie the several classes together for the original functionality.
  • Classes capture responsibilites, not necessarily real-world objects. Reason: Real-world objects can have too many responsibilities.
  • Sometimes, real-world objects appear to change their own type, a behavior that you can't capture in classical OO when classes correspond to real-world objects. Solutions like the strategy pattern, the state pattern, e.g., Lix jobs, ..., all have the same fundamental idea: A small class with the fixed high-level structure calls into other small classes with the payload work or the dynamic replaceable behavior. A very nice nontrivial example of SLAP.
  • Ask your caller for a favor if it helps you design a cleaner interface. Don't do his dirty work and the task; do only the task. Accept non-null of the correct type. Let the caller type-convert, let the caller skip calling you if it's null.
  • Null Object Pattern! Let the polymorphism handle the no-op case, and call stuff unconditionally. Easier code both on the caller and on the callee!
I merely don't see how the Liskov Substitution Principle fits into either DRY or SLAP. Maybe not breaking users' expectations is a third fundamental idea that neither DRY nor SLAP covers?

-- Simon
« Last Edit: June 09, 2022, 03:48:06 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #317 on: June 11, 2022, 11:37:16 PM »
Guinea Pig Diet #4

I weigh 89 kg and I'm trying to lose weight again.

I resisted the urge to order pizza. Instead, had an entire cucumber and two bananas. There are still bell peppers and apples around. Nonetheless, very hard to resist the pizza.

The new and exciting idea is to replace snacking (outside proper meals) with entire cucumbers. Instead of putting the little cucumber slices on bread, I'll have the entire cucumber as a raw snack, gnawing away over time like a true guinea pig. Only 40 kcal a pop.

I don't know if I want another bet with LF hosting costs on the line. Last year, it didn't spur me enough to hit 80 kg. I even feel that everybody else will be discouraged from donating if I do it. :lix-ashamed: They'll think: Why donate 5 dollars if Simon will donate 60 anyway, what good does a small extra donation do at all... In hindsight, maybe it was even counterproductive to publicize my 2021 weight bet in this way.

I'll find a nice way to get my bikini body. :lix-cool: Does somebody want to join the weight loss? Who's up to pursue a goal together until end of 2022?



My favorite animal is still the African crested porcupine, I like giant anteaters too, and I've recently grown to like the manul, a.k.a. Pallas's cat. International Pallas's Cat Day is April 23, so it'll be a while until I write an entire topic on manuls like my 2020 topic on the giant anteater.

But in the Lix release thread, I like to post an animal picture with each release, ideally a picture that fits the feeling of the release. Expect some manuls for the next couple releases!



-- Simon
« Last Edit: June 12, 2022, 10:06:24 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon Blogs
« Reply #318 on: June 26, 2022, 08:46:03 AM »
Simon Rhymes

filter, map, fold,
das Glück ist dir hold.
Doch std::transform,
das wurmt dich enorm.

I wrote this cheesy poem in 2016. Detailed explanation follows -- not all readers are proficient both in software development and in German here. A typical piece of code that appears every single time in an introduction to functional pipelines is:

const int y = [1, 2, 3, 4, 5]
    .filter!(x => x > 2)
    .map!(x => x*x)
    .sum();

This sets y to 50 because 50 is 3×3 + 4×4 + 5×5.

Now for the explanation of the poem. {

Functional pipelines for data are nice: Each step relies only on the output of the function from the previous step, not on any properties/mutation/earlier side effects to/of a publicly visible buffer containing the original input. Fewer bugs because we avoided mutable data.

Even though you can chain higher-order functions such as filter, map, fold in any sensible order, e.g., map first, then filter some, then map some more, then filter some more, ..., the most common order is exactly the order of the poem:
  • filter: First discard some elements that we want to ignore.
  • map: Transform the remaining elements.
  • fold: Collect the mapped elements into a final result.
These functional pipelines are notoriously hard to express in C++ because you can't write them as pipes even with the C++17 standard library. You don't pass the collection itself as a single argument, instead you pass two arguments, a start iterator and an end interator. Therefore, you can't chain the calls à la source.f().g().h(); but have to put every call into a separate statement, introducing a new name for every intermediate result.

In particular std::transform is the equivalent of map in that world, and the annoyance (having to put every step of the functional chain into a separate statement) feels already big enough here that it's nicer to write a conventional loop over the collection instead of calling std::transform.

You're annoyed enough in C++17 that you might consider the range-v3 library for C++17 or to move your project to C++20 where these pipeline-friendly ranges are part of the standard library.

}



Back from C++ to D. When I write functional pipelines in D, I rarely call an explicit fold() in the last step. It's much more common to call one of these:
  • join() some mapped strings into a single long string, possibly join(" ") or join(", ").
  • array() to keep the results in an eagerly-allocated random-access array, usually because we'll only store the result for now.
  • sum() on a list of numbers.
  • any() or all() on a list of bools.
All of these are (semantically, not implementation-wise) special cases of fold().
For example, list.sum() is
list.fold!((a, b) => a + b)(0).
The better name goes a long way though to make the pipeline more readable, especially if the more specialized function comes directly from the standard library.

Even map(list, func) and filter(list, predicate) are special cases of fold(), as explained in the blog article The Universal Properties of Map, Fold, and Filter with the maximum-possible amount of category theory. The gist is: filter() accumulates (folds) the list into a new list, possibly doing nothing instead of appending the next element. Similar for map().

-- Simon
« Last Edit: June 26, 2022, 10:11:36 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #319 on: June 27, 2022, 06:38:05 PM »
Writing

A job very hard.

English and German grammar suck. German sucks more than English because in German subordinate clauses, you the verb in last place, where the reader the verb won't find before he already the meaning of the sentence has forgotten, put must. But English isn't so much better in other regards, either.

Topic of the sentence, I want to put it in first place and not risk the sentence looking odd.

Noun proper should always come before their adjectives explaining, like in French, a langue très bèttre in regard this. Sometimes, I've written adjectives and forgot to add the noun.

Lots of parentheses, I want to add them everywhere. And I want to write in a two-dimensional way, e.g., I want to write a sentence and then add bubbles (with more information) around the sentence, tied to specific (parts in the sentence). The bubbles contain elaborations/definitions/... and you should be able to show (or hide) them (on demand).

C++ uniform initialization syntax, maybe it should become standard in English, too. I have Car{nice, black, Diesel} and I drive{with Car from earlier in this sentence, to Friend, Reason{visit, Reason{he is nice, I haven't seen the friend for a while}}} this afternoon. And now the braced initializer list for drive became too long, I want to refactor it; only the friend should be visible by default, and everything else from the list goes in a bubble{hidden by default, tied to drive}.

Edit Simon 2023: My immediate next post was only about C++ initialization; I've split it into:
C++ with Simon

-- Simon
« Last Edit: July 08, 2023, 07:49:31 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #320 on: June 29, 2022, 11:38:43 PM »
Summer

Summer is too warm. When will be the next wonderful thunderstorm?

Upside of the heat: Worse mood yields more Simon rants. The problem is finding a peaceful moment to write it down here; I'm striving for a certain minimum quality. Careless prose isn't fun to read.

One of my strategies to counter the heat is to open the windows wide at night, to let the cool air come in -- well, the relatively cool air. At night, it's still warm enough to walk outside in shorts and T-shirt. Plainly, it doesn't get properly cold these weeks. I have flyscreen in practically every window. The flyscreen is worth as much as all the gold in Fort Knox, i.e., as much as performant backwards framestepping. I don't know what people without flyscreen do.

Then again, people also play framestep-less Lemmings without raging. I guess you can treat the experience as a kind of meditation, hmm, even I like to play L1 in Dosbox occasionally for ye olde AdLib nostalgia.

Loap and L2Player, these projects must grow. Custom L2 packs are nice alrelady in DOS L2, but Kieran and Ste had to hold back on puzzle difficulty lest they introduced accidental execution difficulty. I deem level design more an art than a science. Let's not curb the designers' creativity, let's offer them the best tooling we can.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #321 on: August 14, 2022, 12:10:21 PM »
UI with Simon

You're designing a highly interactive program, e.g., a game.

Heuristic: The best place to configure a value is where you display the value.

Reason: Before you can edit a value, you must know that the value exists. Thus, once people want to edit the value, they already know where in the UI they see the value.

Mistake in Lix: The editor offers grid sizes 1, 2, 8, 16, but the 8 is really a user-configurable size. On the editor button, I print the number 8. You click the button to pick the 8 (instead of 1, 2, 16). But to edit the user-configurable grid size, you cannot click that 8; you must leave the editor and go to the options menu. In the editor tooltip, I tell people to go to the options menu, but it's really bad UI. You should be able to click on/near/rightclick the number 8 to change it.

Refinement of the heuristic: If the value's normal display has another function, e.g., it's a button to do stuff with the already-picked value, or it's a long text that people want to select with the mouse, don't turn the entire display into the change-the-value widget. Consider to add something to the side instead.

Bad example: Jira bug tracker. When you click into the main description (a long text) of a bug, e.g., to highlight something in it, the text turns into a text-entry field, and the text jumps around to fit the slightly changed boundaries of the field. Bad bad bad! I believe any sane person would rage here. Feels as if people at Atlassian didn't use their own products themselves.

Better: Add pencil icon next to the huge text.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #322 on: August 14, 2022, 01:19:49 PM »
All-in Poker

You're playing a slightly modified version of heads-up texas holdem. Rules: Both you and your opponent each bring N chips to the table. (Assume both players have practically infinite bankrolls that can supply any number of rebuys.) Each hand proceeds as follows: Each player gets 2 hole cards, then you bet 1 chip, then your opponent raises all-in regardless of holdings. You may now call or fold (depending on your 2 hole cards). If you call, the dealer deals 5 community cards, highest hand wins. After each hand, the loser restocks to N chips from his bankroll (i.e., whether he had 0 or N − 1 left, he'll have N for the next hand), and the winner must take south any excess of N.

To be most profitable, what is your calling range for N = 10? For N = 100? How high must N be so that the calling range is only the pair of aces? (Clarification: We're looking for optimum profitability, not merely for the loosest range that is still profitable.)

Nontrivial questions, and I don't have poker simulation code ready, thus I won't promise answers. I believe that for N = 10, the optimal calling range must be reasonably loose, considerably more than (any ace, any pair).



Pondering some more. I believe that the ranges for N = 10 and N = 100 are quite similar, that the range remains reasonably loose even for N → ∞, and that tightening the range to (only pair of aces) is wrong for any N. Reason: We can reword the stakes. To avoid wagering 1 unit that our hand is better, you can pay 1/N units (the price of folding). If your hand beats two random cards on average, you should call regardless of the price of folding.

-- Simon
« Last Edit: August 14, 2022, 03:17:59 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Simon blogs
« Reply #323 on: August 14, 2022, 08:09:53 PM »
Quote
Pondering some more. I believe that the ranges for N = 10 and N = 100 are quite similar, that the range remains reasonably loose even for N → ∞, and that tightening the range to (only pair of aces) is wrong for any N. Reason: We can reword the stakes. To avoid wagering 1 unit that our hand is better, you can pay 1/N units (the price of folding). If your hand beats two random cards on average, you should call regardless of the price of folding.

From memory, Q7o is the hand considered to be closest to a 50/50 chance of winning in such a situation.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Ste Woz Ere

  • Lemmings 2 fan
  • Posts: 73
    • View Profile
Re: Simon blogs
« Reply #324 on: August 15, 2022, 04:19:54 PM »

Loap and L2Player, these projects must grow. Custom L2 packs are nice alrelady in DOS L2, but Kieran and Ste had to hold back on puzzle difficulty lest they introduced accidental execution difficulty. I deem level design more an art than a science. Let's not curb the designers' creativity, let's offer them the best tooling we can.


Agreed. ToS would benefit so much more from L2Player, especially on the last level of each tribe - those are a crazy concept that probably does need a bit more in the player-aid department. (though savestate DOSBox is adequate to some degree, like it was with L3)
Tribes of Steel - a whole new Lemmings 2 game! (120-level pack)
Currently a WIP - all tribes are complete, testing and feedback is welcome!

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #325 on: September 19, 2022, 10:34:20 PM »
Q7o is the hand considered to be closest to a 50/50 chance of winning in such a situation.

I ran simulation:
  • Q5o is still minimally better than 50 % against random hand, but Q4o is not.
  • Any suited queen is better than 50 % against random hand.
  • J8o is better than 50 % against random hand, and J7o has less than 50 %.
  • J6s is better than 50 % against random hand, and J5s has minimally less than 50 %.
  • 22 has 50.3 % against random hand; I haven't run the other pairs but they should all be even higher.
  • Small suited connectors are less than 50 %, e.g., 45s has 41.5 %. We want to be dealt high hole cards more than anything else.
I still think that we should call with every 50-%-or-better hand in the given scenario regardless of N, and, if N is small, with even more hands. This is plausible with regard to the the extreme cases: For N = 1, calling and losing costs the same as folding, therefore we will shove any two.

Originally, it surprised me that every 50-%-or-better is call, but this is merely because under normal poker rules, for big N, no opponent would open-shove any two.

Agreed. ToS would benefit so much more from L2Player, especially on the last level of each tribe - those are a crazy concept that probably does need a bit more in the player-aid department. (though savestate DOSBox is adequate to some degree, like it was with L3)

Hmmm, I can imagine, and I haven't even seen most of the final levels.

I'd like to return to "normal" participation in the Lemmings culture, with more level solving, even if it's in regular Dosbox. I remember how happy I was to playtest the early Highland from Tribes of Steel in Summer of 2021. In 2022, I didn't find the time for serious level solving. Other hobbies got in the way, and whenever I found an evening for Lemmings, it always went to the Lix networking and physics.

-- Simon
« Last Edit: September 19, 2022, 11:01:24 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #326 on: September 20, 2022, 09:33:03 PM »
Random things I take for granted:
  • Everybody is a good enough Lemmings-1-level solver to be able to complete all of DOS Lemmings 1 and DOS ONML in a modern engine.
  • Everybody understands most of the mechanics from the other licensed Lemmings games until the year 2000 inclusive, i.e., including Lemmings Revolution.
  • Everybody knows how to program in at least one popular common language.
  • Everybody can read C source code.
  • Everybody knows the rules of popular classical board/card games.
  • Everybody is fit with high-school mathematics, in particular, high-school level calculus.
  • Everybody knows some mathematics beyond the high-school level, whether from formal education or by self-teaching. Hard to define how far I assume this; let's say, complex numbers, some graph theory, linear algebra, elementary set theory, elementary topology.
I do not assume that people use version control.

I do not assume that everybody is good enough to solve all of Genesis Lemmings in a modern engine. In particular, I forgot the solution to Lemmings' Ark, and geoo will hit me over the head for this the moment he reads it. Either because it should be common knowledge, or because he's envious that I get to resolve from scratch a classic level that he likes so much.

Even though I resolved Lemmings' Ark in Redux, I don't count that because this particular solution doesn't work in vanilla Lemmix, thus I assume it won't work on Genesis. And thus, I still don't assume that everybody is proficient in Genesis Lemmings! Edit: Solved Lemmings' Ark in vanilla Lemmix.

-- Simon
« Last Edit: September 20, 2022, 10:56:10 PM by Simon »

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #327 on: September 21, 2022, 06:52:14 AM »
Solved Lemmings' Ark in vanilla Lemmix.

Congratulations! :thumbsup: How does it feel to have conquered it at last?

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #328 on: September 21, 2022, 08:52:19 PM »
The main trick is cute, well-hidden and inspiring; it hits the core ideas of modern Lemmings.

The pure solving experience was then marred by the many engine differences: The first NL solution didn't replicate in vanilla Lemmix, and I remembered solving it years ago with vanilla L1 physics. The research that resulted from it was very valuable and makes up for the hassle.

-- Simon
« Last Edit: September 21, 2022, 09:16:13 PM by Simon »

Offline DireKrow

  • Noisy Crow
  • Posts: 113
    • View Profile
Re: Simon blogs
« Reply #329 on: September 25, 2022, 04:52:39 AM »
Quote
Everybody can read C source code.
Everybody knows the rules of popular classical board/card games.
Everybody is fit with high-school mathematics, in particular, high-school level calculus.
Everybody knows some mathematics beyond the high-school level, whether from formal education or by self-teaching. Hard to define how far I assume this; let's say, complex numbers, some graph theory, linear algebra, elementary set theory, elementary topology.

These ones aren't true for me, and not for most people I see in at least some of the communities I frequent. It does feel like it's true for most people I hang out with in the puzzler community, though.
LOTY 2020 Winner
My NeoLemmix Levels: The Krow Files (File A v1.2 released 21-Feb-2020)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #330 on: October 08, 2022, 04:15:27 PM »
Hmm.

I think with your background and involvement in puzzle culture, you can make up for any of those ad hoc. Or even routinely shove some missing groundwork on the backburner, understand a topic sufficiently well without, and come back to specific parts of the groundwork later if they really prove necessary.



x − 6 − 2 is not x − 4, it's x − 8. Cost me an hour of second-guessing batter physics today. :lix-scared:

The whole computation should really be written as x + −6 + −2, then you can reorder without making sign errors. Then, − will appear only ever as a unary operator, never as an infix, and we can have − bind stronger than all of addition, multiplication, and even raising to powers. We can write −1n for the popular (−1)n. :lix-evil:

-- Simon
« Last Edit: October 08, 2022, 06:35:52 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #331 on: October 09, 2022, 10:05:37 PM »
Game design problem.

Hardware: 1 opaque bag, and 5 marbles each in n ≥ 2 different colors.

We want to generate an infinite sequence of the n colors by drawing marbles from the bag, e.g., one by one, recording each drawn color.

Task: Design the protocol for inserting and reinserting marbles in the bag. It's up to you how many marbles to put in initially. It's up to you what to do with drawn marbles: You might put them back immediately, you might set them aside until some condition is met before you put them in, etc. You don't even have to use all the hardware available; maybe you need only 1 or 2 of each color.

Restrictions:
  • Marbles can only ever be in the bag or be set aside. No physical mangling, no half marbles, no markings.
  • You must never be able to know in advance what color you will draw the next time.
  • It's okay if some colors are temporarily impossible to draw.
  • After drawing a color, the probability of drawing it immediately again should be lower than the probability of this drawing was.
  • When a color hasn't been drawn for a while, its probability should increase. (I'd love to give a hard requirement here, e.g.: For n < 10, if color X hasn't been drawn in the previous 10n drawings, it should have > 50 % probability to appear next. But if your cool algorithm falls short just by a few percent, I'd rather see your cool algorithm than insist on these exact figures.)
  • Adhere to the law of large numbers: If we cut the sequence after the first 1,000 drawings, we should expect to see each color with relative frequencies around 1/n. If we cut after the first 100,000 drawings, we should expect even more to see relative frequencies around 1/n.
Design goals that can't be hard restrictions:
  • The protocol should be simple enough for 8-year-old kids to follow. Not a hard requirement because it's in the eye of the beholder.
  • The protocol should be reasonably fast to follow. Counting set-aside marbles is okay. Looking stuff up in arcane wargaming tables is too hard.
  • Your protocol can demand the players to dump all marbles from the bag, so you can re-seed the bag with exactly what you want, but that's not elegant. Ideally, the only time marbles ever leave the bag is the drawing for the sequence.
  • Your protocol can draw multiple marbles per drawing and then convert the drawn tuple to a single color by applying some function. Not the most elegant way, but I'll certainly allow it.
  • The protocol can form a queue of set-aside marbles, but again that's not so elegant. The marbles might roll around and disturb the order. Ideally, your collection of set-aside marbles remains a multiset -- we only care about the number of each color in the collection.
In effect, I want to have a biased drawing that implements gambler's fallacy ("It's due!") but still is nontrivially random on every single drawing.



One idea is: Put 1 of each color into the bag, we won't use the remaining 4 at all.
Repeat forever: {
    Draw without reinserting.
    After drawing the current marble, if now only 1 marble is left in the bag: {
        Put the earlier drawn marbles (that we previously set aside) back in the bag.
        Set aside the current marble (it's now the only one set aside).
    }
}

Downsides:
  • Purely by feeling: The most recent color is disadvantaged twice in the early game: We drew it pretty late for its first time, and now we even set it aside for longer than anything else.
  • The protocol falls short of the > 50 % goal. Colors only ever have 50 %.
  • For n = 2, it produces the alternating sequence, and thus allows certain knowledge about the next color after the first drawing.


Edit: Changed 90 % to > 50 % in that awkward goal.
Edit: More on elegance, I distinguish between dumping all and merely drawing multiples.

-- Simon
« Last Edit: October 10, 2022, 05:28:33 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #332 on: October 12, 2022, 06:35:44 PM »
Why not Twice

DOS Lemmings 1 had skill assignments.

Lix, NeoLemmix, Lemmini, ..., have replays: A replay is a recipe that tells the computer when the computer should assign skills. In particular, in Lix, we never assign directly into physics; instead, the click edits the replay, and then the nurse (yes, I really called it that :lix-trouble:) comes and feeds the replay contents to the gamestate, so that the gamestate grows big and strong.

We can iterate this construction once more. You might have a meta-replay: This tells the computer when to move physics forward, when to move physics back, when to write a skill assignment into the replay, when to cut a replay by removing all assignments from it after a given physics update, ... The good thing that comes from meta-replays will be networked puzzle solving in a team, a.k.a., girlfriend mode.

Names of the ideas in this post are all preliminary and I don't want to force any of them into culture. In particular, meta-replay is awkward and nondescriptive. Multiplayer puzzle solving is at best a long-term loose idea for Lix.

You can read time-travelling science fiction, or you can write Lemmings-like games. :lix-grin:

-- Simon
« Last Edit: October 13, 2022, 10:51:24 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #333 on: October 15, 2022, 02:54:57 PM »
> git co

...hmm, how did I name the branch again?
[Tab] [Tab] [Tab] [Tab] [Tab]

master
phys10
physideas
rmpre2018format
server
v10


Ah, v10 I called it. How could I have forgotten.

> git co git co v10

error: pathspec 'git' did not match any file(s) known to git
error: pathspec 'co' did not match any file(s) known to git
error: pathspec 'v10' did not match any file(s) known to git


Still pondering how to write a script around this typical user error. It's so mind-bashingly common.

-- Simon
« Last Edit: October 15, 2022, 09:05:00 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #334 on: November 01, 2022, 03:20:08 AM »
On Writing Well

Communicating with Extreme Clarity: Blog post about bringing all readers to the same understanding. Be succinct, but keep what guards against different understandings:
  • When you explain a bugfix, describe both the prior wrong state and how the fix resolves that.
  • When you express ratios or subquantities, state them both in absolute numbers and as a percentage. State what exactly is the ratio of what exactly.
Hemingway Editor directly in the browser: Paste prose into this page, then copyedit according to the suggestions. Paste the result back to where you need it. I've ignored the formatting features. Undo is Ctrl+Z as usual, but redo is Ctrl+Shift+Z, not Ctrl+Y.

Buy a copy of Strunk & White, The Elements of Style. ("The fact that is an especially debilitating expression. It should be revised out of every sentence in which it occurs.")

Avoid "the former", "the latter". Instead, repeat the subjects. The explicit subjects save the reader from backtracking and decouple your logic. If the subjects need annoying relative clauses for restating, introduce good names earlier, then use those names.

-- Simon
« Last Edit: November 01, 2022, 05:51:57 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #335 on: November 02, 2022, 03:55:18 AM »
It's possible to bring such clarification to Lix, e.g., add "100 %" or "all" or "lose 0" when the level has 40 lix, save 40. You can still compare 40 with 40 to conclude that you must save all, but it's also stated for you. Or write "39/40 (lose 1)" for 40 lix, save 39.

I've ranted about percentages in Lemmings for years. Indeed, 97 % is less useful than the positive save requirement 39/40 or the negative count, lose 1. But 100 % is still so common colloquially and needs no denominator (40) to compute; I feel like 100 % is special. I'll have to sleep over it. Probably just say "all".

This brings a typesetting issue: In German, best practice is to put a nonbreaking space between the number and the percent sign ("100 %"). Few Germans do this outside professional typesetting, but it's technically correct, the best kind of correct. In English, I haven't seen anybody put a space ("100%"). Is it correct to omit the space? That would treat % different than physical units; you'd write "220 V", "60 Hz" even in English.

-- Simon
« Last Edit: November 02, 2022, 04:16:55 AM by Simon »

Offline Dominator_101

  • Posts: 15
    • View Profile
Re: Simon blogs
« Reply #336 on: November 02, 2022, 12:33:21 PM »
In English, I haven't seen anybody put a space ("100%"). Is it correct to omit the space? That would treat % different than physical units; you'd write "220 V", "60 Hz" even in English.
As an only English speaker, I don't think I've ever seen someone put a space before a percent sign. Or at least, not that I can recall. It definitely looks weird to me.

And I wouldn't say that physical units always have a space in English, writing 220V or 60Hz is definitely normal, though adding the space there is probably more common than doing it for %. This might also depend on the unit though? I'm trying to think if there's any I would expect a space.

In fact, it looks like Google insists you don't put the space :P

Online Proxima

  • Posts: 4570
    • View Profile
Re: Simon blogs
« Reply #337 on: November 02, 2022, 02:52:21 PM »

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #338 on: November 02, 2022, 04:17:07 PM »
As an only English speaker, I don't think I've ever seen someone put a space before a percent sign. Or at least, not that I can recall. It definitely looks weird to me.

The space between a number and the percent symbol is completely foreign to me. I have never ever seen anyone do that, but then again I hail from the USA, and it is convention here to not put a space between the number and percent symbol. Thus, we here in America write 5%, 10%, 100%, etc.

I've ranted about percentages in Lemmings for years. Indeed, 97 % is less useful than the positive save requirement 39/40 or the negative count, lose 1. But 100 % is still so common colloquially and needs no denominator (40) to compute; I feel like 100 % is special. I'll have to sleep over it. Probably just say "all".

That makes sense that 100% is special, considering that percent means "per hundred." It also does have connotations in the sense of the accomplishment of getting everything correct on a test or completing everything for examples, which can be very satisfying depending on what it is.

Quote
And I wouldn't say that physical units always have a space in English, writing 220V or 60Hz is definitely normal, though adding the space there is probably more common than doing it for %. This might also depend on the unit though? I'm trying to think if there's any I would expect a space.

In fact, it looks like Google insists you don't put the space :P

Yea, Simon's post got me to pause and think about how I write quantities with physical units. I honestly have always written them together with no space, e.g, 5ft for 5 feet rather than 5 ft. The latter is therefore strange and foreign to me as well. However, I read up on this, and the convention is to always put a space. In that case I've been writing them "wrong" for years! :-[ The exception is when you are dealing with notation symbols, like with the percent sign. In this situation, it's convention to not put a space between the number and it. Thus, that's why you see 10%. Then again, can we really say whether one way is truly incorrect and the other way is correct in either situation?

I think it's just a matter of personal preference/style. You can't really say either one is incorrect in writing them. The most common example I always see is the date format. Here in America, it's month/date/year, but in other countries, like in Europe, it's instead date/month/year. There's still even other variations, such as in my parents' home country of Vietnam, where the format is year/date/month edit: Wow, I apparently don't know what I'm talking about :-[ I'm wrong, it's the same as Europe, date/month/year, and also there's no place, it appears, that uses year/date/month, but there are places that use year/month/date. So, can we really say that any of these is incorrect in writing out the date shorthand? As I am accustomed to the American way of writing it due to where I grew up, there's absolutely no chance of me adopting the European way or any other country's way of writing the date other than month/date/year. However, since differing formats can lead to confusion, the safest way to avoid any is to simply write it out completely in words, e.g, November 2, 2022.
« Last Edit: November 06, 2022, 01:54:27 PM by kaywhyn »
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #339 on: November 12, 2022, 08:46:42 PM »
Thanks for the links and the discussion! Hmm, ISO 31-0 suggests the space before %, but nobody puts it colloqially.

Hard-ass scientific ISO norms, yes, that's about the minimal acceptable standard for typesetting in hobby computer games. :lix-cool: Jokes aside, the biggest benefit is that the style guide is international. The main question I had in the back of my mind was: Should I internationalize the typesetting of the percent sign or can I hardcode a single way?

I'm still wavering between "Goal: 40/40 (all)" and "Goal: 40/40 (100 %)", regardless of whether there will be a space. "Goal: 39/40 (lose 1)" is easier to decide. The only real alternative is to keep it as it is, "Goal: 39/40".

Re dates: ISO 8601 covers your back with 2022-12-31 a.k.a. the one true date format. Otherwise, spell the month with letters, as you suggest.

-- Simon

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #340 on: December 06, 2022, 10:30:25 PM »
Re dates: ISO 8601 covers your back with 2022-12-31 a.k.a. the one true date format.

Ah, so I didn't make that up. Danke Simon. And the crowd and Germans go wild with excitement on my use of German :laugh: Only playing, but "thank you" is one that I happen to know in the language thanks to a Daffy Duck cartoon I watched (Daffy - the Commando) some time ago. It's such a common basic phrase that one should know in any language anyway!
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #341 on: January 04, 2023, 06:57:49 AM »
Around December 20th to 24th, I'll weigh myself. For every 100 g above 78 kg, I will donate 1 euro to the hosting of Lemmings Forums. E.g., merely touching the goal weight of 80 kg is 20 euros. Being lazy and not losing weight at all is 110 euros.

Hi,

I had just remembered you mentioning a weight loss plan from sometime ago. It is now January 2023, and so I was wondering when we were going to get an update from you on this. How much funding will LF get according to your proposed weight loss plan? ???
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #342 on: January 04, 2023, 07:31:12 AM »
That ran until December 2021, not 2022. But I admit that I made the resolution too hard to see. I squashed it into an answer to WillLem.

84.7 kg before breakfast. For 5 weeks, I got lots of sleep and didn't overeat.

I'll call it here. Donation for LF hosting will be 67 Euros at the promised rate of 1 Euro per 100 g over 78 kg.

I should double-post more when the issues are clearly separate. It's not only easier to see, but also makes it possible to split the thread later.

New, but barely exciting, is that I gaind back all the weight in 2022, and acquired Christmas flab on top of it. We're at 92 kg.

-- Simon

Online kaywhyn

  • Global Moderator
  • Posts: 1852
    • View Profile
Re: Simon blogs
« Reply #343 on: January 04, 2023, 09:44:48 AM »
Wow, of all things, I didn't bother to check the year :forehead: I'm not sure why I thought it was a goal you put down for 2022. I think I was too focused on the fact it was in June and hence I thought it was only about 6-7 months ago. Seriously, though, it's been 1.5 years since it was written down???? It definitely doesn't feel like it was that long ago. Then again, I probably could had figured out it was a 2021 goal just from the fact it's a couple of pages back, on page 20.

Please pass on any weight loss tips that have worked for you. I'm in a similar situation with wanting to lose weight and am slightly under your amount. The only thing that seems to have worked for me is eating less, though I have read online that what's important is not how much you eat but rather what you eat that determines whether you lose weight.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #344 on: January 05, 2023, 05:07:30 PM »
Eating less is probably 70 % of the story and exercising is 20 %. The human body is a machine with input, storage, and output, and now we want to run with a net input/output deficit.

The most direct way to the net deficit is to eat less. Not necessarily less volume, but less energy.

To not be unhappy while eating less:
  • Eat only slightly less at first.
  • Fill the stomach with non-energy filler material. Drink more water or tea.
  • Choose foods with lower energy density. Have cucumber for snacking. The guinea pig diet from OP is to eat cucumber frequently. You can have it on bread as an extra topping, or even have it by itself.
  • In case of munchies: More cucumber.


Exercise is mediocre at burning calories directly. It's for building muscle. Muscle will cost the body energy to maintain, and you gain less fat meanwhile. Building muscle is like building harvesters at the beginning of a real-time strategy game, they'll keep working for you even when you're idle.

I have no experience or deeper knowledge of lopsided diets that force the body into burning fat faster. The regular burning of fat from eating less was good enough in the past for me.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #345 on: January 13, 2023, 06:53:24 AM »
Ancient Treasure Chest

I'll be busy over the weekend. Here are some old pictures for your enjoyment.





We start with some screenshots from Cheapo, the old Lemmings clone from 20 years ago. It's guaranteed unoriginal, and that's very very good. Isn't the man as happy as we are! Well, he was, until I rotated the mouth.




Some toying with sprites from Lemmings 2. I used those lemmings as a forum avatar here around 2005.



One day, I put the lemming onto the chamaeleon, and this is the natural result.



I included this picture in a rant about time limits. Back in the day, level authors customarily reduced the time limit to the lowest possible minute that kept the level beatable. Lix still had time limits and NeoLemmix didn't allow unlimited time.



When I sprited the first few frames of the Lix platformer around 2010, I had this unused Lix sprite. Instead of not using it for anything, I made this little image.



Remix by geoo. Clones didn't like uneven terrain. It's only a mild exaggeration!

-- Simon

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Simon blogs
« Reply #346 on: January 14, 2023, 01:03:38 AM »
Awwwwww Cheapo Copycat Game, good memories. I still have it on my computer but for like my last 10-15 years of computers it always runs way slower that on the computers I had when it first came out for some reason.
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #347 on: January 14, 2023, 11:44:33 PM »
amazingly Cheapo works 80-90% on my current PC running windows 10. Its a bit slow but not terribly slow. I easily get more frustrated from lack of Lix/NL ease features than old bugs. I contacted Peter Spada last year for a question about Cheapo and he responded promptly. I didn't ask at the time but I wonder if he made any other games?

Every now and then I try to play Clones again and it's just... awful. Nothing about it feels intuitive. A Game of this nature that doesn't always allow you to pause or pausing that doesn't work correctly should be illegal. Sorry to the creator, I know they at one time were present on this forum but this game sucks.

I attached a recent Windows 10 home screen pic.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #348 on: January 22, 2023, 06:49:57 AM »
That's a Tamandua, a small anteater. It's not a Tapir. Very much lovely still. :lix-grin:
See also Gronklink's post about tamanduas.

Still so much work on Lix in my free time, I'm beginning to lose sleep over it. I'm 50:50 on whether the endorphines break even with health, or whether the Lix work is getting detrimental. I should probably schedule a day where I don't look at the source at all, don't play Lix, and don't check Lemmings Forums. Some time after 0.10.5 is out, which should release in the next few days.

-- Simon

Offline okmot

  • Posts: 66
    • View Profile
Re: Simon blogs
« Reply #349 on: February 17, 2023, 05:50:19 PM »
Every now and then I try to play Clones again and it's just... awful. Nothing about it feels intuitive. A Game of this nature that doesn't always allow you to pause or pausing that doesn't work correctly should be illegal. Sorry to the creator, I know they at one time were present on this forum but this game sucks.

Greetings! Nice to see Clones still being mentioned :)  The reason we limited pausing was to prevent super-human actions, because pausing makes playing levels easier and can bypass the intended challenge.  However to account for this we added a 2nd type of pausing called "Freeze Time" (default keyboard key is U) which you can use as often as you want to do super-human moves, but each Freeze Time use will incur a timeclock penalty so that players who don't Freeze Time will obtain a higher score for the leaderboard rankings, which we felt was fair.  You can even assign actions to clones when the game is paused via Freeze Time.

Here is Freeze Time in action - https://drive.google.com/file/d/1-777IGQDBmT1AWB_i_iRc4YQwNm4yTFe/view

In terms of not being intuitive, my only regret is that the "beautification" of my levels went a bit overboard I think. We hired someone and they added too many background graphics which I think make the levels a bit cluttered sometimes and hard to tell if something is land or background. I would have preferred a simpler clean look. You can however disable these graphics in the options menu: Disable Background and Sky. Oh and also the "Clones Belt" for gestures to give actions isn't practical I felt, I would have liked to make the keyboard bindings the default method - but this can also be changed in the options menu.

Otherwise I'm all ears for adjustments to include in future patches to improve the game! Multiplayer was always the focus, and I haven't played in a while so I'd be up for a match should anyone want to play.  That one "capture the star clone" map was really fun.

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #350 on: February 23, 2023, 01:13:49 AM »
Every now and then I try to play Clones again and it's just... awful. Nothing about it feels intuitive. A Game of this nature that doesn't always allow you to pause or pausing that doesn't work correctly should be illegal. Sorry to the creator, I know they at one time were present on this forum but this game sucks.

Greetings! Nice to see Clones still being mentioned :)  The reason we limited pausing was to prevent super-human actions, because pausing makes playing levels easier and can bypass the intended challenge.  However to account for this we added a 2nd type of pausing called "Freeze Time" (default keyboard key is U) which you can use as often as you want to do super-human moves, but each Freeze Time use will incur a timeclock penalty so that players who don't Freeze Time will obtain a higher score for the leaderboard rankings, which we felt was fair.  You can even assign actions to clones when the game is paused via Freeze Time.

Here is Freeze Time in action - https://drive.google.com/file/d/1-777IGQDBmT1AWB_i_iRc4YQwNm4yTFe/view

In terms of not being intuitive, my only regret is that the "beautification" of my levels went a bit overboard I think. We hired someone and they added too many background graphics which I think make the levels a bit cluttered sometimes and hard to tell if something is land or background. I would have preferred a simpler clean look. You can however disable these graphics in the options menu: Disable Background and Sky. Oh and also the "Clones Belt" for gestures to give actions isn't practical I felt, I would have liked to make the keyboard bindings the default method - but this can also be changed in the options menu.

Otherwise I'm all ears for adjustments to include in future patches to improve the game! Multiplayer was always the focus, and I haven't played in a while so I'd be up for a match should anyone want to play.  That one "capture the star clone" map was really fun.

ah yes now I remember vaguely, this freeze time function.... One has to wonder; why not just make pause behave this way? Why have essentially two different types of pause buttons?? Can't it do everything freeze time can, including incurring the penalty, without *failing to pause*? I get the points thing; that's just not my kind of challenge.

The other major roadblock was how you assign skills. NeoLemmix has a similar "follow lemming" feature, but as a side option. Selecting a skill then selecting the target lemming just seems to work better most of the time. Especially if you're new to the game and clones may often be spilling out in different directions suddenly you didn't intend, you want to click quickly to get them under control. From being a lemmings player this just felt totally backwards.

The other issue I can't recall very well but had something to do with physics and how clones moved around. Maybe it was just another issue of differences from being a Lemming player.
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline okmot

  • Posts: 66
    • View Profile
Re: Simon blogs
« Reply #351 on: February 23, 2023, 02:33:49 AM »
ah yes now I remember vaguely, this freeze time function.... One has to wonder; why not just make pause behave this way? Why have essentially two different types of pause buttons?? Can't it do everything freeze time can, including incurring the penalty, without *failing to pause*?

No they can't be merged [edit: well maybe :) see below], because the two pauses serve different functions. The original pause was for actual legit pausing which shouldn't incur any penalty (initial level overview, phone ringing, bathroom break, dinner burning, etc) but we found this could be abused to get higher leaderboard scores, especially on larger (wider) levels by eliminating scrolling time and morph-click accuracy, which would ultimately lead to all high-level players being forced to abuse pause just to have a chance to get the #1 spot, because it would certainly be exploited. I didn't think that was a good direction for competitive play, so we added a few seconds of "recharge" to that pause which shouldn't be an issue for regular pause use and would prevent "cheating".
However I did appreciate that exploiting pause can make the level easier and perhaps more fun for non-competitive players, and so we added "Freeze Time" to encourage that and even allowed giving morphs while time was frozen to lean into that use case. 
Although.... in thinking about it just now I wonder if we could have auto-transitioned from one to the other silently behind the scenes.. so that pausing a few seconds apart would not incur a penalty but pausing any quicker than that would. But giving morphs while paused was only allowed in one not the other so not sure.. hmm..

The other major roadblock was how you assign skills. NeoLemmix has a similar "follow lemming" feature, but as a side option. Selecting a skill then selecting the target lemming just seems to work better most of the time. Especially if you're new to the game and clones may often be spilling out in different directions suddenly you didn't intend, you want to click quickly to get them under control. From being a lemmings player this just felt totally backwards.

Yes Simon had the same thought during beta (gamma?) testing and we implemented a "Morph On Click" option in the Options menu that allows for this.  In that mode you select a morph first (keyboard or click) and then click on a clone to give the action right away.  The reason we reversed this by default was because Clones started as a multiplayer game and in that use case it's more common to want to select a single clone and then issue a bunch of morphs in quick succession, i.e. a sabotage or pathfinding clone lone wolf, possibly wearing a cool decoration :)  Also by selecting the clone first you can be sure which clone you are going to give the action to, which can be important due to there being dark clones and light clones, "fistfight" game mode, or clones with 2x speed, or tiny/large clones or clones at different gravities (4 ways). I feel selecting the clone first enables better multiplayer success, but the option is there so everyone can choose their preference.

The other issue I can't recall very well but had something to do with physics and how clones moved around. Maybe it was just another issue of differences from being a Lemming player.

Yes the clones are a bit bulky. Originally they started out as thin grey aliens but they chubbed up when the graphics was outsourced. The Light clones are directly controllable like a mario character, but due to the pixel-perfect nature of clones/lemmings they walk a bit odd sometimes. It did take great programming effort to get them to walk on rotating/moving land but I was satisfied with the result and the flexibility of the level editor in general. Moving land can give momentum to clones or crush them allowing for a lot of level design possibilities.  I think it was CCX that created a working minesweeper mini game level, which really impressed me!

Light clone: https://drive.google.com/file/d/1Zta4JI3T0xQJN8QFVA6n-n-VzP3FWRDg/view

I was just watching my step-son play Quantum Connection the other day and we saw the leaderboards had a 5 morph solution which seemed impossible, but after some thinking we figured out how they were doing it!  It's an exploit of the entangled clones where you give a morph to a falling clone that they can't do so they queue it up, but meanwhile the entangled clone performs the morph, then you cancel the morph on the first clone before they hit the ground so they never actually use the morph so it doesn't get counted. Not sure how the top 3 players on that map figured that out but kudos to them!
The leaderboards have never been reset so it's gotten increasingly difficult over the years to get #1 on any level.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #352 on: March 01, 2023, 03:39:06 AM »
Welcome back! Happy to see that you're still pondering Clones UI.

Yeah, modern Lemmings and Lix abolish execution difficulty wherever possible. Coming from this, it's natural for mobius to expect the regular pause to behave like freeze-time.

Quote
auto-transitioned from one to the other silently behind the scenes
But giving morphs while paused was only allowed in one not the other so not sure.. hmm..

Gut reaction: Yes, merging the the two pauses feels like the right direction. Penalize assignment during pause with 1 second. Still penalize rapid pausing with 1 second. Count and explain all incurred penalties on the results screen. Offer an option for whether the engine should allow such penalized input during pause, and allow it by default.

The biggest danger with this idea is that you're explaining the penalties too late, in the sense that highscore hunters stumble into new types of penalties during serious solution attempts.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #353 on: March 07, 2023, 11:11:01 PM »
UI

Collection of bad error messages from 1996-2000. Klopt niet!

Also a link to the homepage of Isys Information Architects, the site that hosts that collection. Has several other lovely pages about bad UI.

Makes me wonder how to word the confirmation box when overwriting or deleting a Lix level:
Really delete this level? [Delete] [No]
Would it be better to use "Cancel" than "No"? Or "Keep"?

-- Simon

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #354 on: March 08, 2023, 07:50:43 PM »
I think any of No, Cancel, or Delete work fine in this case.

The "Delete" option is already likely as clear as it possibly can be, and conveniently, that's the important one. From context, it's easy enough to deduce that "No" means "Don't Delete" (although I suppose "Don't Delete" is another wording you could consider; a bit lengthier, but abundantly clear), and I don't think anyone's going to say "Hmmm, I definitely don't want to delete this level, but I'm a little unsure of what "No" means here, so I'm going to push the button that says "Delete". That said, thinking about it, "No" is probably the least good option here (out of what has been presented), but least good != bad.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #355 on: March 11, 2023, 01:27:01 AM »
Hmm, thanks. I think I'll put "Delete" and "Cancel". I also like "Don't Delete", but it's more text to read, and it contains the word that we don't want to do, making it hard to skim.

Lix never writes "Yes" onto a button, it always re-spells the verb. That's good already. I searched the codebase for where "No" appears, and it only appears in these two boxes:

Really delete this level? (Level name), (filename), Delete, No.
Really overwrite the level? (Level name), (filename), Overwrite, No.

I'll replace both "No" with "Cancel".

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #356 on: March 21, 2023, 09:43:55 AM »
GUI

GUI code is both very nice and annoying at the same time. Very nice because I get to define and use lots of OO interfaces and have lots of good static checking. GUI and games are excellent applications for OO.

Annoying because it's practically impossible to unittest. The logic one or two levels beneath is more meaningfully tested independently from the GUI. But the GUI should still look nice and the buttons should all call the right logic. You chance 1-2 lines of code, recompile, run the game by hand, plow through the menus, look at it, change 1-2 more lines of code, ...

Wisdom

Some wisdom from hand-rolling Lix's UI years ago that has stood the test of 7-8 years.

GUI elements are nested tree-like. A window has buttons as its children, and a button has a text label or an image as child.

Define geometry relative to the parent. I want this button to be drawn 20 units from the left edge of me (the parent), and its width shall be 1/4 of my width.

Children calculate first, then the parent calculates. Reason: The parent is interested in any state change of the children, therefore the children should already bring their own new state to the party. The children, on the other hand, don't even need to know their parent, even though they must know the parent's geometry.

If the parent has information to pass to a child, that can still happen during calculation of the parent (after the child has finished its normal calculation), and trigger more code to run in the child separately from the child's regular calculation. All of this must still happen before anybody paints to the screen, thus separate calculation and painting completely.

Callbacks are handy for buttons. Give the parent a choice whether to hook a callback to the button (in OO code, everything happens elsewhere), or whether to query the button's state (soviet style: the central government knows best). Sometimes callbacks are nicer, sometimes soviet style is nicer. As the button, offer both.

Make stuff idempotent and avoid unnecessaary work, e.g., extra painting if it's already painted as you want. Push this logic down into the childmost GUI element. As a parent, don't { ask your button if it's already on, and if not, set it on }. The parent should write the simplest possible code: { set the button on }. The parent should trust that the button doesn't do unnecessary work, i.e., the parent should trust that the button is implemented roughly like this:

void Button::switchOn()
{
    if already on {
        return;
    }
    _on = true;
    require to be repainted (scheduled for the next round of painting);
    call your callbacks (that react to you getting switched on);
}


Outside of GUI, you rarely want to write setters, you'd usually prefer immutable objects that you discard and replace. But in GUI, setter-like methods are common and feel correct. As above, they tend to have more logic than setting one field.

Parent paints firsts, then the childrens paint. This is the inverse order in which they're calculated. Reason: You want the text label in front of the button, not behind the button (where the button's flat surface would obscure it entirely). You want the button in front of the window.

When a parent must repaint itself, all children must recursively repaint.

-- Simon
« Last Edit: March 21, 2023, 10:27:39 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #357 on: March 25, 2023, 08:49:03 AM »
What Simon does on Friday night

Plow the internet for classic board and card games, of course.

You're playing Yahtzee (identical rules and identical scoring as German Kniffel, except for how mutiple yahtzees score). You're going first, and on your first turn you roll 3-4-5-6-6. You have two more rolls to improve these dice. For your second roll, what do you keep?
  • Keep 3-4-5-6 and reroll the extra 6, aiming at large sraight (40 points). Even if we fail twice at rolling the wanted 2, we can score small straight (30 points) as a guaranteed fallback.
  • Keep 6-6 and reroll the 3-4-5 for more sixes. If we can enter 18 or even 24 as sixes, we'll be doing well for the upper section bonus (35 points), and there's a remote chance of yahtzee (50 points).
I kept the 3-4-5-6. The Yahtzee Proficiency Test scolded me:

# Game State        Tot Roll       You  Expect SD   OSYP  Expect SD  Delta
- ----------------- --- -------  -----  ------ --  -----  ------ --  -----
1 123456TFHSLYC;63-   0 34566;2  3456_  251.13 58  66___  253.94 59   2.80 **


Keeping the 6-6 would have been optimal. It's better than keeping 3-4-5-6 by an expected overall game total of 2.8 points. Even the eccentric choice of keeping 6-6-x and rerolling two dice would have been marginally better.

Nonetheless, it's nuanced. We keep the 3-4-5-6, reroll the extra 6, and again it's 6. Now, for third roll, keeping 3-4-5-6 is suddenly optimal! It's better than the second-best choice of keeping 6-6 by an expected overall game total of 1.3 points.

Optimal choices for other first rolls:
  • First roll 2-3-4-5-5, keep 2-3-4-5. It's a two-sided draw.
  • First roll 1-2-3-4-4, keep 4-4.
  • First roll 1-2-3-3-4, keep 3-3.
  • First roll 1-2-2-3-4, keep 1-2-3-4.
I've known Kniffel since elementary school. There is cute theroy here, but it's not earth-shattering. Lowering your expected game total by 3 points still leaves multiplayer largely a game of chance.

But I've never played Gin Rummy before. It's completely unknown to German kids. Gin Rummy looks like a reasonably deep game, and the rules are easy to boot. Good two-player card games with the standard 52-card deck are rare. I'll see with whom I can try it.

-- Simon
« Last Edit: March 25, 2023, 12:46:32 PM by Simon »

Offline Silken Healer

  • Posts: 190
    • View Profile
Re: Simon blogs
« Reply #358 on: March 26, 2023, 03:40:36 PM »
Does Yahtzee count as a board/card game? No boards and no cards ;P

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Simon blogs
« Reply #359 on: April 02, 2023, 06:13:51 PM »
(At least in the US) Yahtzee comes with a notepad with scorecards and a cup to roll the dice in, which if you're being a bit cheeky about it, can count as the board, so you could argue that it has both cards and boards ;)

Also checked out the Yahtzee analyzer for a bit and got a Yahtzee first try ah hahahaha, not sure if that's scripted or not but sure, you take those.
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline mobius

  • Posts: 2754
  • relax.
    • View Profile
Re: Simon blogs
« Reply #360 on: April 07, 2023, 05:16:46 PM »
Gin Rummy (and many variants of Rummy) was common here in U.S. My favorite to play was so-called "Contract
Rummy". Works similar to 'plain' Rummy except as follows;

1) there are a set number of rounds, the version I played always had 5.
2) each hand has a specific assortment of hands you need to make before you can discard, to go out (get rid of all cards, thus ending the round). 2 sets or 2 runs or 1 run and 1 set etc. I can't remember the exact rules for each round anymore except that it got  more difficult as the game progressed.
3) I don't remember if this was singular to this particular game or not but a player could "buy" a (1) card from another player by taking another card from the pile, but only 1 per turn or something like that.
4) Every round played like normal rummy (players lay their cards down whenever and first person to throw their last card away ends the round). But the final round functioned like Gin Rummy; in order to lay out you have to have all the cards in your hand fit the contract, thus the first person to lay out also ends the round and everyone else is stuck with all the cards in their hand.

The rest I think functions mostly like Rummy. After the final round the player with most points wins.

There's also this game called Rummikub; which I never played but looks like a mix between Rummy and dominoes... no idea how it works.
https://en.wikipedia.org/wiki/Rummikub

here's another Yatzhee like game I've not really played but heard of:

https://en.wikipedia.org/wiki/Farkle
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Dominator_101

  • Posts: 15
    • View Profile
Re: Simon blogs
« Reply #361 on: April 10, 2023, 12:53:32 PM »
I've mostly played what I think is typically called Rummy 500, which rather than solely holding cards in your hand you instead play your sets visibly, and can play cards on the other player's sets as well. It also involves being able to pick up one or many cards from the discard pile. I enjoy the additional strategical elements that it involves. In general I prefer this version to Gin, but still enjoy both.

Rummikub is pretty fun. It kind of plays like Rummy (you're trying to make sets of at least three matching/three in a row), but one of the things I like most about it is that you can mix and match tiles that are on the board as long as everything ends up a valid set. So for example if I have a a red five, blue five, and green two, and the board has a green 3-4-5 set, I can play my 2 at the front to make it 2-3-4, then yoink the 5 to make a 5-5-5 set as well. Sometimes I'd end up rearranging half the board just to get one or two tiles out of my hand.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #362 on: April 10, 2023, 09:24:34 PM »
Right, the appeal of Gin is that it's a potentially reasonable 2-player game. I've tried it, and it felt like it was still lots of luck, but possibly there is indeed more depth.

The other Rummies are better with more players than with 2.

Before, to me, Rummikub had always looked like an arbitrary Rummy-style ruleset that merely sold well because of its nice tiles. But you sound as if the ruleset holds up by itself, and it should be playable with two standard decks with standard jokers. I'll see when I get the chance to try it.

Thanks for the ideas!

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #363 on: April 22, 2023, 05:57:35 PM »
Esoterics with Simon

I've learned the mate with bishop and knight against a naked king.

There's an interesting limit to how well you can study it purely with a computer. The defending computer wants to prolong the mating sequence. Its favorite way to prolong the B+N endgame is to flee with its king into the wrong corner, from where it takes the most moves to mate. But from that wrong corner, the remaining moves are easy: The attacker can apply a largely fixed pattern.

The computer would pose a bigger problem to the human by avoiding starting points to common human patterns, even if it allowed shorter mates that an engine might find.

Edit Simon 2023-07-08: I've split all C++ posts into C++ with Simon.

-- Simon
« Last Edit: July 08, 2023, 07:59:49 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #364 on: August 12, 2023, 02:27:46 PM »
User Intercardface

No company makes sufficiently good playing cards. Some designs come closer to the ideal, but none check all the boxes. It shouldn't be so hard, but apparently it is.



The four suits should be in four clearly different colors. More generally, in a 2-axis deck of suits × ranks, the n suits should be in n colors, and the color distribution should solve the Christmas tree problem.

We can certainly argue if spades or clubs should be green, or whether the diamons should be blue or orange. It's hard. If you pick orange, like in the Skat Turnierbild (left image above), your orange is either too similar to the red hearts, or too light, failing to contrast from the white background. If you pick blue, as in the Copag 4-color deck (right picture above, with the four aces), you're prone to choosing too similar a hue for the blue diamonds and green clubs.

Nobody wants a 1-color 4-suit deck with black hearts and diamonds. Why should anybody want a 2-color 4-suit deck? This is such a basic UI principle: Make different things look different.



Well, some solitaire games have rules for packing red suits only on black suits, hmm ... the answer must then be to still have 4 colors, but choose more similar colors for hearts and diamonds, e.g., red and orange, and two darker colors for spades and clubs, e.g., black and a moderately dark green.

Above picture is my unpublished Turnierbild Dark, a 4-color dark-mode mod of a card deck for PySolFC. I wanted a 4-color deck and chose the Skat Turnierbild colors, mainly because I'm used to them, and also because orange diamonds and red hearts are reasonably close. But the spades and hearts look too similar in lightness for me. With this deck, it's harder than necessary to play games with alternating red-black packing. It's better for games that pack in suit or regardless of suit.

Hard to say how to improve it, given that I also want the dark background. Maybe the background should have one hue for clubs and spades, and a different hue for hearts and diamonds? We're getting really experimental here! But it's UI with Simon, what else do you wish for.



Index size. The index is what's in the corner: A number/letter and one suit symbol. Regular index (left picture) is too small, even while the card is in your hand. Jumbo index (right picture) is much better. Maybe it's a tad too big already, and the middle is ideal? Hard to tell. We want to fan it in hand and also see it clearly on the table.

If I'd have to choose right now, I'd pick that middle size. It's sometimes called Blackjack index, but that term is hard to websearch.



This is Magnum index, offering a logical extreme to the size problem. The entire card is nothing but indices. In hand, you see the good Blackjack-sized index. On the table, you see the big centerpiece.

It's an interesting idea, I've never tried it, and I'm neutral on it. But I've never seen it with four-corner indices (i.e., all four corners feature a Blackjack-sized index), which brings us to ...

Four indices. American cards put indices in two corners only. Does no American ever fan cards in hand in the wrong direction? European cards always have indices in all four corners. You can fan them both ways. I'd estimate that 20 percent of Europeans fan cards the uncommon way, i.e., the direction in which they wouldn't see indices on American cards.

Always put four indices! This is really easy to accomplish and everybody should always get it right. One counterargument to four indices is clutter, but the solution to clutter is a good box, not to restrict your fanning-in-hand direction. Which brings us to ...



The box. Surround the interior (everything that is not a corner index) with a box. Here, the eight of spades has no box, but the ace of hearts has this box. Boxes are common for court cards in American-style decks, but you should do it on spot cards, too. Do it everywhere!

Some Bridge decks have a yellowish hue in the box. That makes it even better to distinguish the in-box design from the out-of-box corner indices. I like it.

The box is the correct solution to clutter. Then you can have big indices in all four corners and it will still look good.

Card width: Practically always you want narrow cards; a common size is Bridge-sized. Poker-sized cards are wider and harder to fan.

The community cards in Texas Hold'em might look better on the table with Poker-sized cards, but that alone is a weak reason for such an unwieldy card format. If you want readability on the table, you want clearly readable, big, box-separated indices. Card width is secondary, but if you get big indices with your wide cards, that may be a good reason. For Texas Hold'em, consider the 4-color Copag, see the image of the four aces at top of this post.

The game of Tarot makes you fan 18 cards in your hand, and, as a result, Tarot cards are even taller than Bridge-sized; they're about 1:2. Not sure about that size for general use.



This is one of the best designs of physical playing cards: Desjgn Classic Circle.
  • Four colors, even though clubs and diamonds are slightly similar,
  • a box with light yellow background,
  • Jumbo index, nice and big, maybe 5 % too big,
  • Bridge-sized, not too wide, not too narrow.
Downsides:
  • Cards have only 2 indices, not 4 indices in all 4 corners.
  • The deck is surprisingly expensive.
-- Simon
« Last Edit: November 20, 2023, 04:22:05 AM by Simon »

Offline Silken Healer

  • Posts: 190
    • View Profile
Re: Simon blogs
« Reply #365 on: August 21, 2023, 06:35:27 PM »
Thank you for sharing PySolFC! Like you, I am into card game programs a lot and this is the best one by far! It brings back the good card games on Windows and not the bloated versions we have with adverts like now. Before this, the one I played was called "xmsol" if you want to check it out https://sourceforge.net/projects/pysolfc/ but I think PySolFC makes it obsolete.

Do you mind publishing that the full dark-mode pack? In my personal preference, your design is probably my favorite playing card design ever both from the perspective of talking about the card designs for the topic and just what I genuinely what to use in playing PySolFC on my own lol.

Sorry I can't contribute to the blog much in the terms of the actual linear algebra part as I have not learned linear algebra in school yet.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #366 on: August 21, 2023, 08:22:36 PM »
The only missing piece to make it releasable is anti-aliasing and darkening the queen of spades. :lix-grin: I've already reviewed how to install custom cardsets in PySolFC 2.21.0. It looks like I can get the set to run in a current version, nice.

I'll see how far I get tonight with the queen, and will post the dark cards here in 0-2 days.

-- Simon

Offline Silken Healer

  • Posts: 190
    • View Profile
Re: Simon blogs
« Reply #367 on: August 21, 2023, 08:35:14 PM »
Thanks

Offline Dominator_101

  • Posts: 15
    • View Profile
Re: Simon blogs
« Reply #368 on: August 22, 2023, 01:16:55 PM »
Four indices. American cards put indices in two corners only. Does no American ever fan cards in hand in the wrong direction?
To me this just seems like a self-fulfilling prophecy: why would anyone here learn to fan their cards the other way if you couldn't actually see what the cards were?

It actually took me a minute to figure out what fanning them the other way meant, at first I was wondering if you were all psychos that held the cards from the top or something. Didn't realize it meant having the left card on top rather than the right. Don't think I've ever even considered holding them that way. Just thinking about it that was feels like it'd be clunkier just to hold/fan, but that's likely just a muscle memory thing.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #369 on: August 23, 2023, 09:02:46 PM »
I've released my Turnierbild Dark for PySolFC.

Quote from: Dominator_101
figure out what fanning them the other way meant
it meant having the left card on top rather than the right.

Correct, with the uncommon way of fanning, I mean: The fan in hand (regardless of left or right hand) has the leftmost card fully exposed to the holder [_]]]]] instead of having the rightmost card exposed [[[[[_]. Having the leftmost card fully exposed hides incides on 2-index playing cards.

There is a nice rabbit hole here with handedness (I don't think it matters much), muscle memory (matters a lot) and style of game: Trick-taking games and many Rummy variants require you to pull cards from the middle of 10+ card fans. But 5-card-draw Poker fans have fewer cards and change rarely.

I agree that it's a chicken-and-egg problem. Still, it's inexpensive to put 4 indices, and it can be largely clutter-free. Given how many Europeans fan cards the uncommon way, why curb your market share?

Quote
you were all psychos that held the cards from the top or something.

This is wonderfully absurd. Thanks for sharing!

-- Simon
« Last Edit: August 23, 2023, 09:10:10 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #370 on: August 30, 2023, 02:14:32 AM »
I filed a bug against PySolFC (Archway doesn't let you pick arbitrary suit from arch). It dovetailed into UI design. :lix-grin: Equally fun as playing!

I've always noticed this in Lix and NL: I play for a while, then get the urge to continue development. The vision of playing an improved version, or allowing others to play an improved version, can be more entertaining than playing the existing version. As a countermeasure, I had scheduled singleplayer livestreams to finally play through Lix seriously. And it's also very enjoyable, I should do that more again. After lemforum, there is NepsterLix, ClamLix, and Rubix's set.

I used to joke how my ideal board gaming night would go: Before the night, choose the game, email everybody a copy of the rules, FAQs, errarta, ..., and expect everybody to arrive well-prepared. Then, on the night, don't play the game, but hold a conference about bugs and corner cases in the rules. The winner is who found the best bugs, or the most bugs, or whose bugs eventually make the maintainers board game authors release an updated rulebook or errata.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #371 on: February 21, 2024, 02:02:22 AM »


Docking Hell

Gimp (the drawing program) has dockable subwindows. Those dockable windows are a serious contender for the prize for the most unintuitive UI. They offer the following nasty trap:

How do you re-dock a dialog that you undocked by accident?

Quote
this is maddening. i can't get any help elsewhere so hopefully someone here can get me out of this hell.
Source

Yes! Hell it is!

Quote
try as I might I cannot manage to redock it
It just refuses to be fixed like the dialogue in "Layers/Brushes" on the right.
P.S. My awkward workaroung so far is to close gimp, delete the ".gimp-2.8" folder and restart gimp again; and loose the previous settings Sad
Source

Resign, close the program, and nuke your settings.

That's a whole level worse than anything we complain about in our own software. Sure, we had the occasional NeoLemmix user cancel the replay by closing NL, then reopening NL. But never anybody had to erase the settings or reinstall the program into a fresh directory. Maybe Lix's resolution options have more lock-out potential than anything in NL. I don't even know if it's possible; it might be possible to willfully enter garbage and still somehow avoid the automatic fallback of 640x480.

Anyway, back to Gimp. When your settings directory on hard disk is more discoverable than your drag-and-drop GUI ... you've written quite some drag-and-drop UI.

You can right-click the subwindow and you'll find a checkbox option "Lock tab to dock". It's unchecked. Can you check it? Yes. Does that re-dock the subwindow? No, that would be too easy. This option prevents accidental undocking, but that's only useful before you've undocked your tab. Now it's too late, and the option won't do anything until you've re-docked, which you don't know how to do.

Solution: Drag-and-drop the tab, not the window. The window (which your system's window manager manages), called, e.g., Tool Options: You can drag this around, too, for sure, but it will never dock. You must drag the single tab from inside the window, and the tab is also called Tool Options.

When you drag the tab (not the window), suddenly, Gimp plays ball, rolls out the red carpet, and offers you nice grid previews for docking your fine dialog. Now it looks easy and well-implemented. It feels so nice that, certainly, nobody on the internet will now understand how this comfortable UI can be terrible.

-- Simon
« Last Edit: February 21, 2024, 03:42:09 AM by Simon »

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Simon blogs
« Reply #372 on: February 22, 2024, 02:56:17 AM »
One thing I really appreciate about your approach to Lix is that you will look at something that people find unintuitive, and say that the fact that it's unintuitive is a problem. There's definitely a lot of people who write off those sorts of concerns as "It's working as intended." [often implying: "It's not broken or badly designed; you're just stupid."]

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #373 on: February 24, 2024, 01:54:17 AM »
Thanks! That means a lot to me.

Right, the designer's task is to make the user guess right. It's hard to influence the guess directly; the users bring many expectations from other applications than ours. If it's working as intended, but the users constantly guess wrong, then the design has a problem, even if it's intended.

Another view, more tongue-in-cheek: Design is de-signing, i.e., removing signs, or at least removing the need for signs. If you can guess how a program works without reading manuals/signs/..., it's well de-signed.

It's rare that an application is so useful that it can force arbitrary UI on the user. git comes to mind. But in git, the mental model of the commit graph should come first; the UI is merely a front-end to modify the graph. (Edit: Now I wrote this and will scare WillLem off git forever? There are nice GUI clients for git that do everything except rare advanced things.)

-- Simon
« Last Edit: February 24, 2024, 11:43:25 AM by Simon »

Offline WillLem

  • Posts: 3403
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Simon blogs
« Reply #374 on: February 24, 2024, 01:26:20 PM »
Now I wrote this and will scare WillLem off git forever?

:lemcat:

I use both Github and Bitbucket/Sourcetree, both are fine. Bitbucket and Sourcetree are nicer. Github is often remarkably unintuitive, but I think that most programmers secretly enjoy that ;P

For example, people who do most things via the command line tend to make it very clear that that's their preference. They want the kudos! Fair enough.

Give me a nice, clean, friendly GUI with big buttons and sliders any day.
« Last Edit: February 24, 2024, 01:31:50 PM by WillLem »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: Simon blogs
« Reply #375 on: March 02, 2024, 02:15:38 AM »
No hidden hotkeys.
  • Every function gets a GUI button with the hotkey printed on it.
  • If it can't be a GUI button, e.g., directional select or priority invert, the function gets a tooltip as soon as it's useful.
  • Can you automate the function to reduce mental burden?
  • Esc is special. It's a common hidden key in games, and it's like the home button on smartphones.
Still, in singleplayer Lix, you don't even need Esc; you can nuke. The nuke has a GUI button with a printed hotkey.

No dialogs.
  • If you must display a message, display it without interrupting the control flow.
  • The classic essay on this rule is Death to the Dialog Box on Coding Horror, 2004.
  • Example: Level loading errors show in the Lix level preview screen. You can keep clicking levels.
  • Five years ago, I followed this to an extreme, removed the end-of-singleplayer dialog, and printed game outcomes into the level browser. Only when people wanted a next-level button, the browser would have become too crowded.
  • Dialogs break flow the most after you perform action/command X and usually get no dialog after X.
On hard-to-remove dialogs:
  • Menus (that we implement as dialogs) are okay when we consciously summon them for their unique content, e.g., the options menu.
  • The menu, if it is a modal dialog (i.e., you must finish dealing with it before you may continue your normal work), must still pull its weight. If we only have 1-2 small options, can we stick those into another existing screen?
  • I believe that dialogs are less annoying (but still annoying) when you expect a drastic context switch anyway and have no clear next goal.
Example: You return from game to the menu. I still want to avoid dialogs here, but they're less nasty here than elsewhere.

Example: You start a time-consuming computation with nontrivial results that you rarely need, e.g., mass replay verification from inside the GUI.

Counterexample: When you need the replay verification often, dialogs will get annoying. E.g., you maintain Lix and want to test all packs before each release. Run the replay verification from the command line:
$ lix --coverage replays/path/to/your/pack

Counterexample: After you save a level in the editor, you usually want to playtest it. This is a clear goal; you don't want strange dialogs to get in the way despite the drastic context switch between editing and playing. Thinking about this, this leads us to more design insight: The context switch between editing and playing a level shouldn't be drastic in the first place. You're working on a single level throughout, after all. IIRC, back in the day, GigaLem suggested a button in the editor to playtest immediately.

-- Simon
« Last Edit: March 02, 2024, 09:14:06 AM by Simon »