Spyke

Replies

news

Comment on

China is using the world's largest known online disinformation operation to harass Americans, a CNN review finds

Reply in thread

Every major country that has ever gone down the communist road ended up a dictatorship

While I don't think full-on Marxism is necessary and am in agreement on the democratic socialism, I think the reason for this is really more towards the political end of it than the economic.

If a country practicing a communist economy had a more representative/democratic political system from the start, I'd like to see how the results panned out. And I'd also like to see which came first, the dictatorship, or the communism. The former being first makes more sense than the latter.

Comment on

Why does the for loop repeat in this recursion?

Why does the for loop repeat after it exits to print a new line? If it exits the loop, shouldn't it be done with it?

There's the new line after the for loop to make sure that the next recursion starts on a fresh line. Otherwise the next recursion would print on the same line, right where it left off, and you'd just have a line of "#"'s. The for loop itself is just for printing "#"'s.

Why is n incremented and not i as stated with i++?

I think this is a confusion with the recursion. Look at the line with draw(n - 1); this happens before any printing of hashes happens, and only continues after its done. And it calls itself as long as it's not less than or equal to 0. To psuedo-code the order of operations here:

draw 3 {
    draw 2 {
        draw 1 {
            draw 0 {};
            print "#" * 1;
        };
        print "#" * 2;
    };
    print "#" *3;
};

so n is never incremented as you think, it just calls decremented versions of the draw function before the current one finishes. The i's are purely involved in the for loop, which only prints hashes. Does that make sense?

Comment on

understanding many2one, one2many and many2many relationshit

I find real-world examples help grasp concepts for me. I'll use an example like a video platform (like Youtube) as an example for this:

One-to-one: for each one User, you maybe only allow one [content] Channel (or, could be one-or-none, meaning a User may have one Channel, or may use use their User account to be a viewer and have no Channel. You might decide to change this later to be one-to-many, but for the example let's say you don't). All the data could be stored just on the User entity, but maybe you decided to separate it into two tables so you don't need to query the User entity which has sensitive info like a password, email, or physical address, when you just need a Channel. For each Channel, there is a foreign key pointing to the (owning_)user_id, and this is "unique", so no duplicate id's can exist in this column.

One-to-many (or Many-to-one): for each one Channel, there may be many Videos. You could use a relational table (channel_x_video), but this isn't necessary. You can just store the (owning_)channel_id on the Video, and it will not be unique like the prior example, since a Channel will have many Videos, and many Videos belong to one Channel. The only real difference between "one-to-many" and "many-to-one" is semantic - the direction you look at it.

Many-to-many: many Users will watch many Videos. Maybe for saving whether a Video was watched by a User, you store it on a table (by the way, this example might not be the best example, but I was struggling to find a good example for many-to-many to fit the theme). Although each video-to-user relation may be one-to-one, many Videos will be watched by one User, and many Users will watch one Video. This would be not possible to store on both the Video or the User tables, so you will need a relational table (video_x_user, or include "watched" in the table name for clarity of purpose). The id column of each row is irrelevant, but each entry will need to store the video_id and the user_id (and neither will be unique), as well as maybe the percent watched as a float, the datetime it was watched, etc. Many-to-many relationships get very complicated often, so should be used carefully, especially when duplicate combinations of a_x_b can occur (here, we shouldn't store a new row when a user watches a video a second time)

Comment on

The more they censor, bigger it gets

Reply in thread

Essentially, there is a massive pixel-divided canvas. It starts out pure-white.

You are allowed to place one single pixel of a certain subset of colors every x minutes (I don't remember how often, somewhere between 5 minutes to an hour).

Your pixel(s) can be overridden by any other user who places their pixel on your space after you place yours.

Some people come together to form collaborative art, messages, etc. (As seen here).

In the past, there have been countries' flags, a giant spreading black void, hidden Among Us beans, and many fandom-specific and subreddit-specific images.

Comment on

Recommend me a programming language

Elm

In short, it's ruined my expectations of languages. It's a functional language, like the style of Haskell, and transpiles to html or js (its meant for web). There's very little that it allows for going wrong, and for things that could fail, it either tells you to port that out to JS and bring it back when you're done, or you have to handle a Result type or Maybe type.

It sounds strict, yes, but not having to deal with issues later is so nice.

Comment on

What programming language ruby, python og javascript?

To be fair, all three can probably do what you're asking for, in building a desktop application. So the real question comes as which flavor of language do you want to write. The only language of the three I can't speak on is Ruby, as I haven't used it.

Python is a "scripting language", but by that token technically so is Javascript. It's an immensely popular language due to its simple syntax, yet complex features as you get better with it. Python can build large-ish applications: web apps, desktop apps, terminal apps, and yes also of course AI, bulk data processing, etc. For GUI applications, I've personally used pyqt (4? 5? 6?)

Much of the same can be said for Javascript. As you said, there are "negative opinions" about JS, but everyone has their opinions (most factually-based) on the goods and bads of languages (although, yes, JS does get more negative opinions than others). Yet, Javascript is still a widely used language, and you'll probably end up needing learning it anyway if you decide to go into web development.

What I personally suggest is this:

  • See the learn x in y minutes pages for Python, Javascript, and Ruby. Make sense of the quick-tour of the languages.
  • Make a simple project using each of the three languages. Something that just reads something from STDIN, does some work, prints stuff, as an example. This helps you get to know the basics of the syntax, tooling, and quirks of a language, and helps you narrow down which language you'd like to be working further with.
  • Pick one of the languages you're leaning in favor of and go build your application. If you come to a point where you feel like the language you choose is no longer suitable for what you wanted to do, you can always retry with another language, and then you will know at least a fair part of more than one language.

Comment on

*Permanently Deleted*

Reply in thread

Haskell for sure has a very sloped learning curve. The functional style, different syntax, a myriad of symbols and pragmas, as well as the tooling around it.

The only reason I was able to pick it up as quick as I did was because I was used to Elm due to my job. Then it was just learning about the IO type (and how to use it), cabal, stack, built-in symbols, and the most common pragmas.

But the symbols part is especially harsh, since symbols only hold meaning if they're universally understood. Sure, the base- language ones are kinda adopted at this point, so they'll stay, but the fact that external modules can also make symbols (sometimes without actually-named counterparts) adds some confusion. Like, would you just know what .: is supposed to mean off the top of your head?

Comment on

Is She-Hulk actually bad or are the 'haters' just misogynists?

I'll be honest, I thought She-Hulk was alright. Was it Marvel's best work? Not really. I think the ending was pretty... Different? Not good? A cop-out? Unsure.

It kinda feels like they just slapped together something for the sake of slapping together something, for money. If it felt like it was a bit more planned out in terms of story line, flow, and if the ending was an actual ending, then I think it'd be better rated.

Of course, the female-lead movies will have the misogynists that tank the ratings, and that's unfortunately unavoidable. But I think some of She-Hulk's ratings was that people were expecting a fully-fleshed-out season like their other streamables, like Daredevil, The Punisher, Wandavision. Those felt like complete, planned stories, even if meant to be supplemental to the movies. This felt different. In fact, most of the recent episodic stories feel different. Because I think they feel episodic: divided up while also trying to be a story.

I'm not sure if the portayal of She-Hulk is true to her comics. I honestly have only read a small handful of comics, so I go into the movies and shows just taking it in as it's shown.

She-Hulk felt like they tried to slap some laughs, fourth-wall-breaking, and a variety of cameos into a sort of "what whacky adventures will Jen the Hulk Lawyer get into today?", followed by a botched ending to wrap it all up.

Now all of that said, I did enjoy it. Except the ending, if I haven't made that clear enough. It was nice pieces of a story. I have nothing against She-Hulk as a character, or any of the female characters. I think its great to bring a wider variety of people (sex/genders, religions, sexual orientations, etc) into the multiverse. I just think this story was not great, and I hope that botching the story and causing bad ratings as a result wasn't an intentional act in order to say "See, people don't want this Marvel hero."

Comment on

Preview builds for the Zed editor now available on Linux

Neat. I use Zed at work, but now also having it on my personal desktop will be nice. Bye, VSCode.

On my system, just one note that it didn't render a menu bar. Not that I use it much anyway, just had to find the default keybind to open the keybinds config (btw: ctrl K |> ctrl S) and pasted what I used from work (then bulk-replaced all cmd's with ctrl's)

Theme change was not sticking on first launch, but second launch I guess it realized "Oh, I'm supposed to be this color now. Got it". Ligatures don't do, but it is a preview and that's just an aesthetic.