The thread formerly known as "Weekend Coding"


Found this one with googling

Wish I had thought of trying this

The one in this picture was what I came up with (only I think I turned left, my bunny is no Zoolander). I was too lazy to calculate how many iterations it would take so I just put an arbitrarily large number in the loop though.

If youā€™re playing Advent of Code, we have a private leaderboard that SuperPichu created last year. The join code is 111686-e01a629f.

1 Like

Has anyone here worked with Julia? It seems like it combines most of the syntax of Python with a few of the good features of Matlab, while supposedly having similar performance to C. Iā€™ve only started messing with it today so Iā€™ll see if the shine wears off.

I started reading a little bit about Julia. One of its developers gave a talk at work about it. Right now it doesnā€™t solve a problem I have, so I didnā€™t dive in.

I was annoyed by indexing-starts-at-1 for about ten minutes.

1 Like

Yeah the arrays thing bothers me but it seems to be pretty standard with languages based around matrices, like matlab and scilab. What really bothers me from reading the docs is that instead of defining a method within a class, you define the method externally and restrict the first argument to the class you made. So instead of

class MyClass:
    def myMethod(self):
        pass

You write something like

function myMethod(x::MyClass)
    whatever
end
struct MyClass()
    whatever
end

In other news, the more I use Python the more I love its syntax. I made a quick class for Bezier curves and decided to just use __getitem__ to pass the parameter t so you can slice with start:stop:step syntax. This lets you sample the curve however you want, or use the default step value and intelligent start/stop limits along with tuple unpacking to plot the whole thing in one go:

bez = Bezier(xcoords, ycoords)
plt.plot(*bez[:])

Iā€™m still not sure if I think using __getitem__ like that is a great idea or a terrible one.

Iā€™m working on a TUI (terminal UI) for Discourse

3 Likes

Letā€™s get meta

4 Likes

this is a test post

Edit: :smiley:

1 Like

this is a test post thatā€™s actually coming from discourse-tui

3 Likes

Fact 1: We played Paris Connection several times this weekend and kept saying, ā€œthis would be better if setup were faster.ā€
Fact 2: I needed to practice front-end web dev stuff.

Result: https://pence.github.io/sncf/

The name is a pun.

3 Likes

Slack is pulling the plug on irc support next week. I like having a curses interface to slack. Iā€™m currently using emacsā€™s erc as my irc client.

Down the rabbit hole:

  • emacs-slack exists, but has a bunch of dependencies, has an extraordinarily clunky process for getting oauth2 tokens, and mostly doesnā€™t work.
  • slack-term exists and works but is ugly.
  • bitlbee has a libpurple build to which you can build slack-libpurple. This actually worked painlessly, albeit with missing documentation for actually getting started using it.
  • Learned enough bitlbee to log in to slack accounts.
  • Figured out how to trick erc to connect to localhost. For some reason, localhost is bad but 127.0.0.1 is fine.
  • Learned enough bitlbee to add the proper channels corresponding to slack channels. Success and goodnight!

Have you tried Finch, which is the terminal version of Pidgin?

https://developer.pidgin.im/wiki/Using%20Finch

1 Like

Finch is trying too hard to be Pidgin. Why do Finch and slack-term love box drawing so much? Every row, column, and character is precious!

Bitlbee is pretty great so far. It holds all the configuration state, leaving the irc client configuration to a minimum.

So, I discovered this game on Steam recently.

Iā€™d love to see someone here do a Letā€™s Play on it to test whether its accurate or full of crap.

:dango:

Bug on line 31

1 Like

:scream:

:one::five:

1 Like

Python 3.7.