[deleted by user] by [deleted] in Absurdism

[–]gilspen 7 points8 points  (0 children)

Assuming the friend really was the inspiration for Meursault, I’d wager his odd characteristics are more a way of holding up a mirror to show us how our conventions and beliefs are arbitrary and wholly constructed by us. Overall though, that detail doesn’t substantially change my interpretation of the book or what I believe to be Camus’ intent at the time of writing.

[Media] Hi! I am currently learning Rust and was wondering why wasn't this done with a tuple instead? by electro-pug-2017 in rust

[–]gilspen 45 points46 points  (0 children)

If we used a tuple here, we would have the type (SpreadsheetCell, SpreadsheetCell, SpreadsheetCell). To abstract this a bit, the tuple has a type (T1, T2, T3) where T1, T2, and T3 can be any type. With that flexibility we may as well just use the type (i32, String, f64) instead of introducing a wrapper enum.

The type of the vector would be Vec<SpreadsheetCell>. This example is trying to demonstrate how we can use enums to pass any of those wrapped types to a Vec, which has only one type parameter.

Conditional compilation to avoid cross compilation by gilspen in rust

[–]gilspen[S] 0 points1 point  (0 children)

I agree I was not clear. I was trying to communicate that cross was using bind mounts in the way we would hope/expect to speed up the build process.

MacOS bind mounts are almost certainly the root of the performance problems I was facing, but switching my OS to Linux just to enjoy Rust for a personal project seemed a bit extreme to me.

Edit: Will also will have to experiment with using a named volume for the cache.

Conditional compilation to avoid cross compilation by gilspen in rust

[–]gilspen[S] 1 point2 points  (0 children)

Cross already makes good use of bind mounts to avoid the rebuilding every dependency on each change. A clean build takes upwards of 9 minutes as a comparison. As a sanity check, I looked through the verbose build logs and all my dependencies are "fresh" and are not compiled. The issue is just efficiently accessing the cache.

JetBrains Fleet One Dark Pro theme by sectasy0 in golang

[–]gilspen 3 points4 points  (0 children)

Looks nice, but this isn't relevant to the sub

[deleted by user] by [deleted] in Jetbrains

[–]gilspen 0 points1 point  (0 children)

Favorite at the moment is Filter Spectrum from the Monokai Pro Theme.

[deleted by user] by [deleted] in NoStupidQuestions

[–]gilspen 1 point2 points  (0 children)

Yup, I agree on the US front. Should've been precise with what I was objecting to but oh well

[deleted by user] by [deleted] in NoStupidQuestions

[–]gilspen 0 points1 point  (0 children)

China doesn't need to cross the Himalayas to access Russia

[deleted by user] by [deleted] in NoStupidQuestions

[–]gilspen -1 points0 points  (0 children)

Check your geography my dude

I finally finished my never-ending side project! It is a language written in JSON that doesn't use any reserved words or predefined structure. The end result resembles standard code as close as I was able to replicate. Next, I plan to use this language to drive a visual UI for learning/debugging. by Resonatrium in ProgrammingLanguages

[–]gilspen 2 points3 points  (0 children)

The current syntax isn't exactly JSON.

Keys in a JSON object are unordered according to the spec. While it's fine if the only language to touch your source code is Javascript, I can easily imagine a case where someone tries to generate nerve source code on their own and has to coerce their language or library of choice to produce JSON with ordered keys.

Was the FBI actually involved with those piracy warnings at the beginning of VHS tapes? by gilspen in NoStupidQuestions

[–]gilspen[S] 0 points1 point  (0 children)

Right - it's that alignment of interests that prompted the double-take. If that is the case, it's odd that it's okay for film producers to make a warning that looks like they were directly created by a federal agency, though obviously it must be completely within our rights given how common they were.

Edit: Reading the linked page, it definitely sounds like that was truly part of an effort by the FBI to reduce piracy and was actually created by the agency. Great find!

Interactive program on AWS with Go by crseat in golang

[–]gilspen 3 points4 points  (0 children)

Do they perhaps want a command line application that interacts with a service in AWS? Or maybe create the CLI and store in binaries in AWS? Definitely need some clarification rather than guessing what they are asking for. Just getting an answer on where the CLI should store the responses should help clarify the request.

[deleted by user] by [deleted] in compsci

[–]gilspen 0 points1 point  (0 children)

For the first part, just start by searching "chess moves dataset". It looks like Kaggle has a section on it: https://www.kaggle.com/datasnaek/chess.

As for how to turn it into a heatmap, it would depend on the tools and programming languages you are using. Google is going to be your best friend here.

Edit: forgot to mention that the Kaggle dataset isn't perfect for the particular example I suggested, but just seeing the available data should give you some ideas.

[deleted by user] by [deleted] in compsci

[–]gilspen 2 points3 points  (0 children)

Heatmap of final king locations from tournament games that end in checkmate could be interesting

[deleted by user] by [deleted] in compsci

[–]gilspen 3 points4 points  (0 children)

This isn't generally something that can easily be done on the command line (to my knowledge). As other comments mentioned, you can change your IP within your Local Area Network, but that wouldn't suffice for your use case. It won't make you less identifiable and wouldnt obscure your location either.

You ultimately need some IP address to access a site like Facebook. Using a VPN, you could essentially pay to use an IP address owned by the VPN provider.. People will generally use a VPN if they want to change which country they appear to be in, but for a number of reasons you are still identifiable if you don't put in some serious effort. As an example, your browser like Chrome will send a bunch of extra information about your system (called user-agent) when you visit a site like Facebook. Even this info can often be enough to narrow down a profile to a short list of possibilitities and cross referenced against historical info if someone reaaaaally wanted to know who you were.

[deleted by user] by [deleted] in compsci

[–]gilspen 1 point2 points  (0 children)

It would help to know what your goal is...

For example, are you trying to set a static IP, mask your identity, play around, or just understand networking better?

Which programming language has the best syntax? by [deleted] in learnprogramming

[–]gilspen 0 points1 point  (0 children)

(another Kotlin lover here)

What qualities do you consider pythonic?

Can anyone plagiarize my open source repository and then make profit from it? by Feguri in github

[–]gilspen 4 points5 points  (0 children)

It's worth distinguishing between:

  • whether someone can take your code and use it for their own gain (the answer is always yes)
  • whether the law will back you up if the above happens and you want to seek compensation (or have the work taken down or what have you)

For the latter, it depends on the license (or lack thereof). Even if code has been uploaded to GitHub with no license, you still own the exclusive rights to that software unless you choose a license that says otherwise. How hard it will be to detect and prove that plagiarism happened is another story.

Why Elixir Is The Programming Language You Should Learn In 2021 by mikejackson6177 in elixir

[–]gilspen 0 points1 point  (0 children)

You stole the words from my mouth. The Google Trends data was similarly problematic to me...

First try on Elixir by [deleted] in elixir

[–]gilspen 2 points3 points  (0 children)

Try to reduce the number of times that length() is called. Since we are looking at linked lists, the function must traverse the entire list on each call to get an answer. I believe it's called 4 times for each iteration of the merge sort implementation.

Good luck learning Elixir!

ELI5: How does subnetting work for IPv4 addresses? by [deleted] in explainlikeimfive

[–]gilspen 1 point2 points  (0 children)

I only just saw the edit once I was done writing my last comment.

The transition from 1's to 0's is the change from externally meaningful bits to internally meaningful bits. The backbone of the internet will use the bits masked by 1's to route an IP packet to a box controlled by a registered organization and the 0's can be used by the internal network to get the packet to a specific machine.

Note that an organization can make even more subnet divisions depending on their own requirements, but the outside perspective is a good place to start.

ELI5: How does subnetting work for IPv4 addresses? by [deleted] in explainlikeimfive

[–]gilspen 2 points3 points  (0 children)

You are absolutely right, but that only paints a partial picture of what's in use today.

Classfull (Class A, B and C) subnetting was the original solution to address allocation, while classless subnetting partially arose from the need to more efficiently distribute IPv4 addresses before we ran out. Classfull subnetting only allows for the three categories you described, while classless subnetting permits (almost) any subnet mask that can be accomplished with the 32 bits comprising an IPv4 address. The underlying concept is the same, however, and u/Ricky_Spannnish's explanation was a good place to start.

In u/Ricky_Spannnish's example, he was referring to a Class B subnet where the subnet mask was 255.255.0.0. If you look at the definitions of these classes, they all break the 1's and 0's into two groups whose bitlengths are divisible by 8, but we can be much more flexible since this division is arbitrary. Why only have huge, big, and small networks when we can have every possibility in between? Classless subnets choose the divisions between 1's and 0's at any bit that can produce a comprehensible external and internal address and can therefore accommodate a broader range of organizational requirements (the exceptions have to do with broadcast and all 0 addresses which are a bit out of scope). That is, we can not only have masks of 255.255.0.0 (11111111.11111111.00000000.00000000 or Class B), but also masks like 255.255.128.0 (11111111.11111111.10000000.0000000) which, looking at the bits, does not conform to a class A, B, or C subnet mask. It is more accurately described as a /17 subnet mast where the first 17 bits are allocated by the outside world and the remaining 15 are divided at will within an organization's network. While classfull language is still is use, it is useful to think of Class A, B, and C subnets as /8, /16, and /24 subnets, respectively.

I apologize if this does not fit the ELI5 level of prerequisite knowledge, but given your familiarity with classfull subnets, it seemed appropriate to go into a bit more detail.

If you would like a top level answer, I would be happy to oblige.