lainproliant

2

lainproliant wrote

I actually run into these types of circular reference loops often in JS, especially when I want to serialize arbitrary objects to JSON. Some other formats such as YAML provide reference semantics and are thusly able to deal with circular references, but JSON does not.

2

lainproliant wrote

What you're actually doing in Python when you put a list into itself is to put a reference to the list into itself.

L = []
L.append(L)
L[0] is L # True

Python and Ruby arrays are heterogenous, unlike in C++, where strong typing forces us to define a common type for objects contained in the same collection. There's no way to do this with the STL <vector>, but you could do this with an object system, for example Qt, where all "Q" objects derive from QObject:

QVector<QObject*> objectVector;
objectVector.append(&objectVector);
3

lainproliant wrote

Does the author offer any sort of arXiv or other link to a research paper about this? So far, it's just them saying "hey I found this thing!" and gives a very basic and non-rigorous explanation of the "innovative" solution. Snake oil until proven otherwise.

2

lainproliant wrote

https://github.com/lainproliant/lost-levels

Run submodules.sh to pull down the submodules, then make to build. Requires sdl2 and sdl2-image.

There's two demos: quadtree that shows the breakdown of a quadtree that would be used for collision detection, and simple that I use as a benchmarking tool to see how many sprites I can get on the screen before framerate starts to suffer.

2

lainproliant wrote

Don't forget to like, subscribe, checkout my instragram and give me money on pateroni

4

lainproliant wrote

I'm working on a few different things, balancing load across them based on whatever I feel like working on at any given time.

  • moonlight: A set of utilities for everyday C++ coding that make life easier, used in almost all of my C++ projects. It's effectively an overhaul of this which I wrote a few years ago: https://github.com/lainproliant/toolbox-cpp
  • lost-levels: A 2D game engine.
  • bakery: A python-based dependency driven build system: https://github.com/lainproliant/python3-bakery
  • pixart-queue: Part of a RPi project where the RPi is mounted in a shadowbox frame along with a 16x16 RGB LED grid. pixart-queue is an agent running on the RPi which will respond to requests in a Slack channel and will add images, animations, or printouts to its circular display queue.
  • jotdown: An extension for annotating notes, tasks, and appointments on top of Markdown, along with some helpful self-organization utilities to go along with it.
2

lainproliant wrote

The only real issues I have with Oprah is that she's anti-vaxx and she gave airtime and made money off crack doctors (Dr. Phil, Dr. Oz).

5

lainproliant wrote

Between Blackwidow and Junkrat, I probably have to choose Junkrat.

5

lainproliant wrote

I think pair programming can be great, but the secret is that it has to work for everyone who wants to do it. I like to work by myself sometimes so I wouldn't want to do pair programming everyday, but sometimes it is helpful especially when getting a project off the ground. When two developers are working together like that, you can branch away by establishing clear areas of ownership and then popping off and working on those areas separately, then consulting again when it is time to merge them together.

3

lainproliant wrote

Next level:

if (memcmp(0x00001000, 0x00002000, 256) == 0) {
...
}
3

lainproliant wrote

We already have f/post_music, but f/now_listening imposes a bit of formatting rules to give users a bird's eye glance of what genres of music folks are listening to in addition to just links to music in general. Cross posts are with f/post_music are welcome.

2

lainproliant wrote

I feel that ORMs can be useful in certain projects, especially ones where you are building a small app to interact with an existing database and want to get off the ground running fast. If you end up interacting with a dataset that is very relational, you'll start running into some of the edge cases of optimization in ORMs and end up with N+1 queries and such.

I have experience with Hibernate in Java and SQLAlchemy in Python. In general I like them both but I tend to avoid them for projects where the DB schema is simple and just roll my own DAO layer.

3

lainproliant wrote

The orange site is too focused on cutthroat startup culture. Not all of us hacker types are out to be the next zuck. Greatly appreciated, thanks!