lainproliant
lainproliant wrote
Reply to comment by Moonside in ruby lets you put an array inside itself by musou
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.
lainproliant wrote
Reply to comment by musou in soon we will be able to do math in javascript by musou
No worries, just don't bet the farm on this one is all I'm sayin' ;)
lainproliant wrote
Reply to comment by flabberghaster in ruby lets you put an array inside itself by musou
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);
lainproliant wrote
Reply to soon we will be able to do math in javascript by musou
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.
lainproliant wrote
Reply to Game of Life with three species (gif) by twovests
Wow, It's absolutely mezmerizing. Thanks for sharing!
lainproliant wrote
Reply to comment by lainproliant in So what project are you working on? by Moonside
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.
lainproliant wrote
Reply to comment by twovests in So what project are you working on? by Moonside
It's going through a rewrite, but I can share with you the old version.
lainproliant wrote
Reply to please observe this excellent graphic i made in a discord i'm in while waiting for code to compile by hollyhoppet
Don't forget to like, subscribe, checkout my instragram and give me money on pateroni
lainproliant wrote
Reply to So what project are you working on? by Moonside
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.
lainproliant wrote
Reply to My news feeds all jumped straight to "Oprah should not run for president in 2020" by cute_spider_ni_srsly
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).
lainproliant wrote
Reply to which overwatch character is your favorite by toasthaste
Between Blackwidow and Junkrat, I probably have to choose Junkrat.
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.
lainproliant wrote
lainproliant OP 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.
lainproliant wrote
Reply to ORMs are weird sometimes by musou
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.
lainproliant wrote
Reply to programming forum by musou
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!
lainproliant wrote
Reply to Attn: jstpst.net will soon be down for about up to an hour for an upgrade by hollyhoppet
You did it!