The thread formerly known as "Weekend Coding"

Iā€™ve been playing around with an fpga game emulator lately. It got a new update that added an Atari ST. After sifting through the games library on a totally legally obtained hard drive image and being quite bored, I was much more excited when I saw a C compiler in the same hdd image.

I am now programmatically uploading videos to youtube.

I did this song and dance before with Gmail, and their API was Not Good. Why did I think Youtube would be any different?

I compiled Rust for Sony PSP.

1 Like

Iā€™m assuming the only reason why was to see if you could?

Just a natural merging of passions I guess.

1 Like

Iā€™ve been using Git for over 10 years, like when other people were still using Subversion I was already on the Git train. Github didnā€™t even exist.

Today I learned that git checkout - will switch you back to the previous branch you were on.

1 Like

Way more than 10 years then, I feel late to the git revolution and my github goes back to 2009!

created_at: ā€œ2008-04-08T16:13:56Zā€

The Defold Game Engine made by King Games (Candy Crush) is now completely open source. All ownership of its parts has been transferred to a foundation and all the source is on Github.

1 Like

New pipenv release. Pipenv is the one I want to use, hopefully with this they can get back on the train.

Theyā€™re all the same to me. At work I still just use virtualenv and pip. It works. I see no meaningful difference with pipenv, pyenv, whatever.

For personal stuff Iā€™m trying out poetry. I like that it logically separates the explicit dependencies from the ones further down the tree, and locks versions appropriately. I also like how it identifies optional and dev dependencies.

1 month laterā€¦

2 Likes

That is some great stuff!

1 Like

Has Rust gotten to a point where someone would actually want to use it yet? My main experience with it is rolling my eyes when people used to declare it the next big embedded language, so I never really bothered paying much attention.

I prefer it over any other language for low-level tasks. Itā€™s not 100% there for gamedev or web apps or anything yet.

So Iā€™m messing around with CircleCI, which uses YAML for configuration files. The syntax is pretty simple. You can define commands like this.

commands:
  sayhello:
    description: "A very simple command for demonstration purposes"
    parameters:
      to:
        type: string
        default: "Hello World"
    steps:
      - run: echo << parameters.to >>

And then you can use the commands you define, even inside of other commands:

commands:
  ...
  sayhellotwice:
    description: "Call sayhello two times"
    steps:
      - sayhello:
        to: "Hello the first time"
      - sayhello:
        to: "Hello a second time"

Except, that actually wonā€™t work. Youā€™ll get an error like this:

[#/commands/sayhellotwice/steps/0] expected type: String, found: Mapping

Can you spot whatā€™s wrong? This is the correct syntax.

commands:
  ...
  sayhellotwice:
    description: "Call sayhello two times"
    steps:
      - sayhello:
          to: "Hello the first time"
      - sayhello:
          to: "Hello a second time"

Spot the difference yet?

Itā€™s the indentation.

Now, Iā€™m a fan of indentation being significant. I do primarily code in Python. But this is complete horseshit. First of all, the syntax validator gives a completely bullshit readout that nobody could ever figure out that indentation was the problem.

Second, I do recognize that you want the parameter to be visually indented from the name of the command you are invoking. However, the previous line beings with the - not with the sayhello. In every other part of the syntax you indent one level deeper from the previous line. But here, in this special case you have to indent twice from the previous line.

I donā€™t know whether to blame YAML, CircleCI, or both, but they are on my shit list.

Whatā€™s a pure yaml parser make of this? - is list itemā€¦ Iā€™m not sure how sayhello is supposed to be related to to:, syntactically.

You can see that when the sayhello command was defined, ā€œtoā€ was defined as an optional string parameter.

If you want to call the sayhello command, to pass it the parameter you have to double indent the to: and then put the value.

I donā€™t know what a pure YAML parser things, because Iā€™m using the CircleCI validator.

EDIT: Oh, I see why you are confused. I forgot some : in my example. I have fixed it. The point about double indent still stands.