Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)VE
Posts
10
Comments
18
Joined
12 mo. ago
  • I was surprised to learn that

    • a) macOS only recently added Left/Right-tiling natively (without extensions, just like GNOME does)
    • b) they leave gaps when you tile them so that it looks like you messed up the tiling somehow
  • linuxmemes @lemmy.world
    VegOwOtenks @lemmy.world

    When I try to go on a ricing journey again

    Haskell @programming.dev
    VegOwOtenks @lemmy.world

    Use monoids for construction, what does it do?

    I consider myself to be learning haskell. I am proficient enough to solve Advent of Code and do some small projects using it. I love doing it but I always feel like there's more to it. Apparently there is: this blog post from Reasonably Polymorphic caught me, I was probably exactly the intended audience.

    What's in the blog post?

    They visualize the Builder Pattern, where an Object is created through repeated mutation, which, when transferred to Haskell, should be replaced by creating objects through Monoids and the corresponding Semigroup function <>.

    I parse a programming language using parsec and I did exactly what was proposed to enhance my structure creation.

    Before, my code was this

    ::: spoiler Old Code

     haskell
        
    data StructStatement = Variable VariableName VariableType
            | Functio
      
    No Stupid Questions @lemmy.world
    VegOwOtenks @lemmy.world

    Is there any security in the communication with Voyager I?

    I mean the Voyager 1 probe which is currently the human-made object the farthest away from earth. The space program people operating the mission seem to have great control options, they even "moved software from one chip to another" (link) Apart from the probably gigantic and expensive installation needed to receive and/or send messages from/to that far away from home (23 hours of delay?), are there any safety measures to prevent a potentially malicous actor from sending commands to the probe?

    Ask Lemmy @lemmy.world
    VegOwOtenks @lemmy.world

    What is your favourite matrix client?

    Up until now I simply used Element, it just works and it doesn't look too bad. Unfortunately, I now have two Matrix accounts, my personal account and the account my university automatically created on their own matrix instance.
    I need to communicate using both my accounts now, but Element couldn't handle two accounts at the same time, so I went on to install a second client, Fractal, which also supports multiple accounts. However, I am somewhat unhappy with Fractal because I cannot select text in messages.

    Please share your experiences and recommendations with or on matrix clients.

    memes @lemmy.world
    VegOwOtenks @lemmy.world

    Quit Windows Fun Now

  • You could wrap the entirety of your file in a monster macro but you'd still have to assign the macro result to a variable you need to register, which doesn't sound viable to me at least.

    Maybe you can use a script that would extract all the trait implementations and create the boilerplate glue code for you, something like this:

     bash
        
    grep --recursive --only-matching "impl PluginFunction for \w*" functions/ | sed --quiet "s/functions\/\(.*\)\.rs:impl PluginFunction for \(\w*\)/crate::functions::\1::\2{}.register(\&mut functions_map)/p"
    
    
      

    I tried to recreate your situation locally but it may not match perfectly, maybe you'll have to adjust it a little. When I run it on my file tree which looks like this

     undefined
        
    functions
    ├── attr.rs
    ├── export.rs
    └── render.rs
    
    1 directory, 3 files
    
    
      

    where every file has a content like this

     rust
        
    // comment
    
    pub struct MyAttrStructName {}
    
    impl PluginFunction for MyAttrStructName {
    
    }
    
      

    Then I receive the following output:

     rust
        
    crate::functions::attr::MyAttrStructName{}.register(&mut functions_map)
    crate::functions::export::MyExportStructName{}.register(&mut functions_map)
    crate::functions::render::MyRenderStructName{}.register(&mut functions_map)
    
      
  • Programmer Humor @programming.dev
    VegOwOtenks @lemmy.world

    TemporalAccessor, TemporalAdjustor could just as well be Star Trek things

    Programmer Humor @lemmy.ml
    VegOwOtenks @lemmy.world

    Regex flavors

  • Fair point. My browser (FF) supports 'search in tabs' as well and suggest it over a new search engine result when typed in the address bar. I don't know what about the style makes me think this, but it looks like FF on Windows in the Screenshot.

  • Programmer Humor @lemmy.ml
    VegOwOtenks @lemmy.world

    What Parity Flag is that?

    linuxmemes @lemmy.world
    VegOwOtenks @lemmy.world

    getsockname()