• 0 Posts
  • 138 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle
  • I like vimdiff, since it’s fair quick to collapse and expand code chunks if you know the keyboard shortcuts. Actually, since it’s vim, knowing the keyboard shortcuts is the entire game lol.

    I usually have vimdiff open in a horizontal pane in tmux, then use the other horizontal pane to look at other code that the change references. Could I optimize and have everything in a single vim session? Sure, but at that point, I’d also want cscope set up to find references within vim, and I’m now trivial steps away from a full IDE in vim.

    … which people do have, and more power to them. But alas, I don’t have the luxury of fastidious optimization of my workflow to that degree.


  • In my personal workflow, I fork GitHub and Codeberg repos so that my local machine’s “origin” points to my fork, not to the main project. And then I also create an “upstream” remote to point to the main project. I do this as a precursor before even looking at a code on my local machine, as a matter of course.

    Why? Because if I do decide to draft a change in future, I want my workflow to be as smooth as possible. And since the norm is to push to one’s own fork and then create a PR from there to the upstream, it makes sense to set my “origin” to my fork; most established repos won’t allow pushing to a new topic branch.

    If I decide that there’s no commit to do, then I’ll still leave the fork around, because it’s basically zero-cost.

    TL;DR: I fork in preparation of an efficient workflow.


  • For a link of 5.5 km and with clear LoS, I would reach for 802.11 WiFi, since the range of 802.11ah HaLow wouldn’t necessarily be needed. For reference, many WISPs use Ubiquiti 5 GHz point-to-point APs for their backhaul links for much further distances.

    The question would be what your RF link conditions look like, whether 5 GHz is clear in your environment, and what sort of worst-case bandwidth you can accept. With a clear Fresnel zone, you could probably be pushing something like 50 Mbps symmetrical, if properly aimed and configured.

    Ubiquiti’s website has a neat tool for roughly calculating terrain and RF losses.





  • Tbf, can’t the other party mess it up with signal too?

    Yes, but this is where threat modeling comes into play. Grossly simplified, developing a threat model means to assess what sort of attackers you reasonably expect to make an attempt on you. For some people, their greatest concern is their conservative parents finding out that they’re on birth control. For others, they might be a journalist trying to maintain confidentiality of an informant from a rogue sheriff’s department in rural America. Yet others face the risk of a nation-state’s intelligence service trying to find their location while in exile.

    For each of these users, they have different potential attackers. And Signal is well suited for the first two, and only alright against the third. After all, if the CIA or Mossad is following someone around IRL, there are other ways to crack their communications.

    What Signal specifically offers is confidentiality in transit, meaning that all ISPs, WiFi networks, CDNs, VPNs, script skiddies with Wireshark, and network admins in the path of a Signal convo cannot see the contents of those messages.

    Can the messages be captured at the endpoints? Yes! Someone could be standing right behind you, taking photos of your screen. Can the size or metadata of each message reveal the type of message (eg text, photo, video)? Yes, but that’s akin to feeling the shape of an envelope. Only through additional context can the contents be known (eg a parcel in the shape of a guitar case).

    Signal also benefits from the network effect, because someone trying to get away from an abusive SO has plausible deniability if they download Signal on their phone (“all my friends are on Signal” or “the doctor said it’s more secure than email”). Or a whistleblower can send a message to a journalist that included their Signal username in a printed newspaper. The best place to hide a tree is in a forest. We protect us.

    My main issue for signal is (mostly iPhone users) download it “just for protests” (ffs) and then delete it, but don’t relinquish their acct, so when I text them using signal it dies in limbo as they either deleted the app or never check it and don’t allow notifs

    Alas, this is an issue with all messaging apps, if people delete the app without closing their account. I’m not sure if there’s anything Signal can do about this, but the base guarantees still hold: either the message is securely delivered to their app, or it never gets seen. But the confidentiality should always be maintained.

    I’m glossing over a lot of cryptographic guarantees, but for one-to-one or small-group private messaging, Signal is the best mainstream app at the moment. For secure group messaging, like organizing hundreds of people for a protest, that is still up for grabs, because even if an app was 100% secure, any one of those persons can leak the message to an attacker. More participants means more potential for leaks.




  • Having previously been on the reviewing side of job applications, if you have GitHub/Codeberg repos with your work, please, please, please include those links somewhere on the resume, ideally spelled out and also clickable in the PDF. It’s a neat trick to showcase more work than what fits on a page.

    Although the non-technical recruiters might gloss over links, the technical reviewers very much look at your code examples. Why? Because seeing your coding style and hygiene, Git workflow and commit messages, documentation, and overall approach to iterative improvement of a codebase is far more revealing than anything that AI-nonsense coding tests can show.

    So while this won’t necessarily get your resume past the first gate, always be thinking about the different audiences whom your resume might be passed around to, within the prospective organization you’re applying to.


  • I use LibreOffice has my word processor, and no substantial amounts of automation to speak of. And each time I intend to submit a resume, I save off a new copy and tailor it specifically for the recipient employer. After all, what’s relevant and worth highlighting (not literally!) to one employer won’t be the same as for another.

    Yes, I’m aware that a lot of recruiters/reviewers use LLMs as a first-pass filter, but that’s precisely why my submission should be crafted by hand each time: if it’s an LLM, then I want its checkbox exercises to be easily met, and if it’s a human, I want to put my best foot forward.

    In days of yore, where paper resumes were circulated by hand to prospective employers at career fairs, having a bespoke resume for each would have been difficult to pull off. But with PDF submissions, there’s no reason not to gear your submission to exactly the skills that a company is looking for.

    To be clear, tailoring a resume does not mean adding fake or hallucinated qualifications that you do not possess. Rather, it means that you copyedit the resume so that your relevant skills are readily apparent. If you already listed an example project from a prior employer or internship, but a different project would better align to the prospective employer, consider swapping out the example for max appeal. Bullet-points are particularly easy to rearrange: if you have web-dev skills and that’s desirable by the employer, those should be moved up the list of bullet-points. And so on.

    Although resumes are now mostly PDFs, the custom remains – both as an informal fairness criteria between applicants, but also because it would be more to read – that one’s resume should fit on a single sheet of US Letter or A4 paper, barring unique exceptions like professors that have long lists of published papers or systems architects that hold patent numbers. And so the optimization problem is how to most effectively use the space on that sheet of digital paper.


  • If only one side of the switch/points remain, depending on the type of crossing and condition of the wheels, there’s a chance that the trolley’s right side wheels can jump over the switch and continue straight forward, even as the switch is set to diverge onto the non-existent siding.

    Or it could derail but continue barreling forward anyway. But trolleys don’t tend to be going that fast.


  • Let me make sure I understand everything correctly. You have an OpenWRT router which terminates a Wireguard tunnel, which your phone will connect to from somewhere on the Internet. When the Wireguard tunnel lands within the router in the new subnet 192.168.2 0/24, you have iptable rules that will:

    • Reject all packets on the INPUT chain (from subnet to OpenWRT)
    • Reject all packets on the OUTPUT chain (from OpenWRT to subnet)
    • Route packets from phone to service on TCP port 8080, on the FORWARD chain
    • Allow established connections, on the FORWARD chain
    • Reject all other packets on the FORWARD chain

    So far, this seems alright. But where does the service run? Is it on your LAN subnet or the isolated 192.168.2.0/24 subnet? The diagram you included suggests that the service runs on an existing machine on your LAN, so that would imply that the router must also do address translation from the isolated subnet to your LAN subnet.

    That’s doable, but ideally the service would be homed onto the isolated subnet. But perhaps I misunderstood part of the configuration.


  • I did indeed have a chuckle, but also, this shouldn’t be too foreign compared to other, more-popular languages. The construction of func param1 param2 can be found in POSIX shell, with Bash scripts regularly using that construction to pass arguments around. And although wrapping that call with parenthesis would create a subshell, it should still work and thus you could have a Lisp-like invocation in your sh script. Although if you want one of those parameters to be evaluated, then you’re forced to use the $() construction, which adds the dollar symbol.

    As for Lisp code that often looks like symbol soup, like (= 0 retcode), the equal-sign is just the name for the numerical equality function, which takes two numbers. The idea of using “=” as the function name should not be abnormal for Java or C++ programmers, because operator overload allows doing exactly that.

    So although it does look kinda wonky for anyone that hasn’t seen Lisp in school, sufficient exposure to popular codebases and languages should impart an intuition as to how Lisp code is written. And one doesn’t even need to use an RPN calculator, although that also aids understanding of Lisp.

    Addendum: perhaps in a century, contemporary programmers will find it bizarre that C used the equal-sign to mean assignment rather than equality, when the <= arrow would more accurately describe assignment, while also avoiding the common error of mixing up = and == in an if-conditional. What looks normal today will not necessarily be so obvious in hindsight.


  • litchralee@sh.itjust.workstoSelfhosted@lemmy.worldSelf hosting Signal server
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    1
    ·
    edit-2
    3 months ago

    This doesn’t answer OP’s question, but is more of a PSA for anyone that seeks to self-host the backend of an E2EE messaging app: only proceed if you’re willing and able to upkeep your end of the bargain to your users. In the case of Signal, the server cannot decrypt messages when they’re relayed. But this doesn’t mean we can totally ignore where the server is physically located, nor how users connect to it.

    As Soatok rightly wrote, the legal jurisdiction of the Signal servers is almost entirely irrelevant when the security model is premised on cryptographic keys that only the end devices have. But also:

    They [attackers] can surely learn metadata (message length, if padding isn’t used; time of transmission; sender/recipients). Metadata resistance isn’t a goal of any of the mainstream private messaging solutions, and generally builds atop the Tor network. This is why a threat model is important to the previous section.

    So if you’re going to be self-hosting from a country where superinjunctions exist or the right against unreasonable searches is being eroded, consider that well before an agent with a wiretap warrant demands that you attach a logger for “suspicious” IP addresses.

    If you do host your Signal server and it’s only accessible through Tor, this is certainly an improvement. But still, you must adequately inform your users about what they’re getting into, because even Tor is not fully resistant to deanonymization, and then by the very nature of using a non-standard Signal server, your users would be under immediate suspicion and subject to IRL side-channel attacks.

    I don’t disagree with the idea of wanting to self-host something which is presently centralized. But also recognize that the network effect with Signal is the same as with Tor: more people using it for mundane, everyday purposes provides “herd immunity” to the most vulnerable users. Best place to hide a tree is in a forest, after all.

    If you do proceed, don’t oversell what you cannot provide, and make sure your users are fully abreast of this arrangement and they fully consent. This is not targeted at OP, but anyone that hasn’t considered the things above needs to pause before proceeding.



  • A Nintendo Wii would also work, as exemplified by this blog running on a NetBSD Wii.

    But in all seriousness, the original comment has a point: using a mobile phone as a server is possible but also wastes a lot of the included hardware, like the cellular baseband, the touchscreen, and the voice and Bluetooth capabilities. Selling the phones and using the proceeds to purchase a used NUC or an SFF PC would give you more avenues to expand, in addition to just being plain easier to set up, since it would have USB ports, to name a few luxuries.


  • From my limited experience with PoE switches, how much power being drawn in relation to how much the switch can supply has a notable impact on efficiency. Specifically, when only one or two ports on a 48-port switch are delivering PoE, the increased AC power drawn from the wall is disproportionately high. Hence, any setup where you’re using more of the PoE switch’s potential power tends to increase overall efficiency.

    My guess is that it has to do with efficiency curves that are only reasonable when heavily loaded for enterprise customers. In any case, if either of those two candidate switches meet your needs today and with some breathing room, both should be fine. I would tend to lean towards Netgear before TP-Link though, out of personal preference.



  • I think – but do correct me if I have this wrong – what you’re describing is a resort, which all the big casinos do have, hence “casino resort”. Resorts are truly astounding, how they basically operate their own in-house logistics. That some casinos expand to become a resort is not a coincidence, since it’s the lure that draws people, and then they stay for the food, the hotel, the shows, etc…

    But there are also non-casino resorts, often located in otherwise undeveloped places that don’t have a nearby town to support all the visitors. And then at sea, there are floating resorts in the form of cruise ships, whose logistics are simply unfathomable to me.