The thread formerly known as "Weekend Coding"


#21

Found this one with googling

Wish I had thought of trying this


#22

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.


#23

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


#24

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.


#25

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.


#26

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.


#27

I’m working on a TUI (terminal UI) for Discourse



#28

Let’s get meta


#29

this is a test post

Edit: :smiley:


#30

this is a test post that’s actually coming from discourse-tui


#31

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.


#32

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!

#33

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

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


#34

#35

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.


#36

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.


#37

:dango:


#38

Bug on line 31


#39

:scream:

:one::five:


#40

Python 3.7.