• 0 Posts
  • 20 Comments
Joined 5 months ago
cake
Cake day: June 10th, 2024

help-circle
  • Back when I was in Russia I’d say it’d be Suzdal, famous for the density of churches and other traditional architecture; or Tarusa, known for that one song that everyone seems to know a couple of lines from, Gorodok (here is a random rendition I found just now), both with just under 10k pop according to the wiki. And, as a bit of a stretch since it’s not a town and most people would call it Solovki, Solovetsky settlement, famous for being a prison, with about 800 people. Also Oymyakon with under 600 people, the coldest settlement on earth if you’re into that sort of thing.

    Now in Georgia, I’d say Borjomi with just over 10k pop famous for its water, and Bakuriani (just over 1800 people) for its water and the ski resort. Again a bit of a stretch, but I guess everyone in Georgia at least also knows the ski resort of Gudauri at just under 100 people, as well as mountain resorts of Gomismta and Bakhmaro, both with no permanent residents due to the rough winters. Geography nerds will also be familiar with Ushguli, (arguably) the highest inhabited settlement in Europe, population 220.


  • Typically this is true, but it’s certainly possible to get comparable performance with functional style

    It’s possible, but you have to specifically write code that’s fast, rather than idiomatic or ergonomic, and you have to know what you’re doing. At that point, you may have been better off writing it in something else. I feel like OCaml is good at this because it allows you to write abstractions and main control flow in a functional way and hot paths in an imperative way without switching language, but so is Rust.

    Carp, which I linked above, basically uses the same approach to memory management as Rust. It doesn’t rely on GC.

    I’ll take a look, thanks!

    I also find that for most cases it really doesn’t matter all that much unless you’re in a specific domain like writing drivers, making a game engine, etc. Computers are plenty fast nowadays, and ergonomics tend to be more important than raw performance.

    I mostly agree with you, e.g. Haskell and Clojure, despite being “slow”, are plenty fast for what they’re used for. On the other hand, I’m very much annoyed when “user-facing” software takes way too long to load or do simple tasks. Java in particular is pretty bad at this: JOSM (Java OpenStreetMap editor) takes longer to load than my entire desktop startup, including a window manager and browser. Unfortunately it’s also the best editor around, so I pretty much have to use it to edit OSM, but it still annoys me to no end. Unnecessary computations, IO inefficiencies and layers of wrapping also affect the power consumption quite noticeably.


  • balsoft@lemmy.mltoProgrammer Humor@lemmy.mlOOP theory vs practice
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    4 days ago

    Modern C compilers are a fascinating blend of functional and imperative, that’s true; and I didn’t say that C is “close to how the modern architectures work”. However, mainstream modern architectures are almost always engineered with C in mind primarily, and this is also acknowledged in the article you’ve linked. Rust, having a lot of similarities to C in terms of its underlying memory model, calling conventions, and control flow primitives, can often benefit from those hardware patterns and optimizations in a way that’s more difficult to replicate with a functional language (especially so given most of them are GC-d due to their memory model). The closest I’ve seen in terms of easy-to-write-quick-code is OCaml, but even there the fast paths are often written in a very much imperative style. Idris2 also seems promising if they manage to get a GC-less mode working. Maybe also Roc, but I’ve not taken a look at it yet.

    Note that I write all of this as someone spending a lot of their work time programming in a functional language (Haskell), with Rust being mostly for hobby stuff. It just always surprises me how much easier it is to write fast code in Rust, and yet also how much of my Haskell intuition was applicable when I was learning it.


  • I agree that they fit different niches! My point was that with modern CPU architectures, imperative languages make it much easier to write fast&efficient code just because the hardware was pretty much engineered with C in mind. IMHO Rust offers the best of both worlds when it comes to systems/low-level dev.


  • TBH Rust is pretty nice, it borrows (pun intended) a lot of ideas from the functional world (algebraic data types, traits, closures, affine types to an extent, composition over inheritance, and the general vibe of type-driven development), but it’s much easier to write fast, efficient code, integrate with decades of libraries in imperative languages, and the ecosystem somehow feels mature already.


  • So, here’s my attempt

    The first portion (^.?$) matches all lines of 0 or 1 characters.

    The second portion (^(..+?)\1+$) is more complicated:

    1. (..+?) is a capture group that matches the first character in any line, followed by a smallest possible non-zero number of characters such that (2) still matches (note that the minimum length of this match is 2)
    2. \1+ matches as many as possible (and more than 0) repeats of the (1) group

    I think what this does is match any line consisting of a single character with the length

    • divisible by some number (due to the more than 0 condition in (2), so that there have to be repeats in the string), that’s not
      • 1 (due to the note in (1), so that the repeating portion has to be at least 2 characters long), or
      • the length itself (due to the more than 0 condition in the (2), so that there is at least one repetition)

    Therefore, combined with the first portion, it matches all lines of the same character whose lengths are composite (non-prime) numbers? (it will also match any line of length 1, and all lines consisting of the same string repeated more than one time)






  • “NixOS project” did not call anyone nazis, there was no “purge”, this article is clickbait and ragebait. What one contributor, however prolific, says, doesn’t represent the entire project (even though I somewhat agree with him here - there are sadly some bigots in the community).

    Nobody forced Eelco (the founder of Nix) to “abdicate”, but there was indeed pressure to step down as the de-facto BDFL put on him by various people. He’s respected as an engineer, architect, maintainer and mentor, but his community management skills were perceived to be lacking, and there were other perceived issues in the community - which boiled down to the fact that a lot of contributors didn’t feel like they could influence the direction of the project. Note that he’s not expelled from the project in any way, he’s still a maintainer of Nix itself, which AFAIU from my interactions with him is what interests him the most, and he’s more or less happy to leave administrative/community stuff to other people.

    Then began a process to establish a new governance structure. Currently, we’re up to a stage where there’s now formal community values and a new constitution for the project. There’s an election happening right now, with all active contributors able to become candidates or vote (although the deadline for candidate nominations has passed, so now we can only vote).



  • UNIX was kinda designed to be an IDE (of its time) by itself. Desktop/Server Linux (whether GNU or non-GNU) mostly continues this tradition; you are provided with some powerful tools for text manipulation, development, debugging and deployment out of the box in most distros. As such, any modern Linux distro is pretty good for development even out of the box. However, you must learn to use this power, and I’m not claiming it’s easy (I still regularly look up various manpages despite doing development on Linux for 10+ years in various forms).

    With that said, I myself prefer NixOS. It really feels more developer-oriented that other distros, as you get the power of Nix out of the box, and integrated into the system. With Nix you get easy access to the biggest software repository in the world. You get per-project development shells, so that you never have to worry about different toolchain versions for different projects, or your system being contaminated with bloat you no longer need. You get the power of reproducible packaging, to eliminate a lot of (but unfortunately not all of) “Works on my machine”-type of problems. It’s also got a hell of a learning curve, but I think it’s worth it.


  • balsoft@lemmy.mltoTechnology@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    3 months ago

    Problem is not how weak or strong the encryption is

    Here it’s definitely part of discussion. The context was

    It’s encrypted anonymous communication capabilities.

    It’s barely anonymous, and poorly encrypted. The latter is the reason Durov is in custody while Signal devs are scott free. He could easily turn illegal stuff over to French authorities, but doesn’t.

    The bigger problem is that people somehow assume this a huge threat, while all previous cases didn’t involve anything like that.

    There have absolutely been cases where a backdoor/weakness/lack of encryption used to catch criminals before: https://en.wikipedia.org/wiki/Operation_Trojan_Shield https://en.wikipedia.org/wiki/Ennetcom https://en.wikipedia.org/wiki/EncroChat . I distinctly remember that there were also arrests of opposition activists in Russia based on personal messages in VKontakte, but can’t find the news right now.

    real criminals do their stuff everywhere (especially on telegram) for years, staying safe.

    Some are staying safe, others are being caught precisely because of this.

    Problem is not how weak or strong the encryption is, but that once you are under oppression and do opposition activities, you’re going to learn by yourself how to deal with it.

    Using better encryption schemes is definitely part of that.


  • balsoft@lemmy.mltoTechnology@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 months ago

    Toy may call it TLS but it’s a custom protocol.

    Sure, it’s mtproto. The security it provides for non-encrypted chats (which are the absolute majority of chats) is not any different from just having TLS for transport. It’s potentially even worse as it’s not as well-audited.

    Data is not kept unencrypted on their servers, according to their docs.

    That just means that they store both your data in some encrypted way and the key. They can still read it trivially. You don’t even have to know the protocol to understand why: you can add new devices without having any other device online, and read all non-secret chats. It might also just mean disk encryption, in which case it’s plain-text in RAM while the server is running.




  • balsoft@lemmy.mltoTechnology@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 months ago

    There’s user to server encryption, just not e2e.

    That’s exactly what the comment said: The only encryption that applies to most chats on that platform should be transport encryption via TLS. It’s about the same level of encryption as Lemmy PMs.

    The fact that Telegram doesn’t cooperate with French authorities doesn’t mean that it doesn’t cooperate with other authorities or sell your data to the highest bidder. They have all the technical means for it.

    Don’t use a regular Telegram chat if your life depends on the messages being private. Use XMPP, Matrix with E2EE, or at the very least Signal. Heck, even WhatsApp is (reportedly) better, as it claims to provide E2EE and that’s been checked by some security professionals who have been given access to the source code. If you absolutely must use Telegram for something like that, only use secret chats.


  • balsoft@lemmy.mltoTechnology@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 months ago

    Telegram is categorically less encrypted than Signal for most chats. It’s mostly the same level of security as Facebook Messenger, Instagram DMs, even Email (SMTP/IMAP over TLS) or SMS: it only encrypts communications between the client and the server. Telegram can read everything you send in regular chats. The only way to get end-to-end encryption (such that Telegram technically can’t access your communication) is by starting a fussy and inconvenient “secret chat”. It can only be done between two people (so no E2E group chats at all), only when both are online at the same time, and it only works on the devices on which the secret chat was initiated and accepted; in other words, as a frequent user I’ve only used it once for some really sensitive personal information. Even then Telegram still has access to a lot of metadata about messages: phone numbers of both parties, when the messages are sent, how big they are, etc.

    I’m not saying that cooperating with intelligence/LE agencies is always an ethical, or even a good choice, but Telegram demonstrably had the ability to do so.


  • Navalniy and his team openly supported the annexation of Crimea (and destruction of Ukrainian and Crimean Tartar culture).

    Not really: https://www.nytimes.com/2014/03/20/opinion/how-to-punish-putin.html ; this is just days after the annexation. I’m no fan of Navalny for various reasons (his nationalist views, xenophobic comments and narratives, etc), but he was very much against all Putin’s shenanigans in Ukraine, and vehemently anti-war.

    The recently exchanged “dissidents” also showed their true colours by supporting the annexation of currently occupied territories in Ukraine.

    What are you on about? Name one of them who supported the war. Most of them were jailed due to their anti-war positions.