matcha_addict

joined 1 year ago
[–] [email protected] 4 points 1 month ago (3 children)

Is it just as secure doing this (with crowdsec) vs hosting on a rented server from a cloud provider?

[–] [email protected] 1 points 1 month ago (3 children)

I have my own self-hosted blog. Is there a way to publish my blog to the fediverse and have its own fediverse server?

I know I can technically just post a link to my blog posts on mastodon or something, but is there another way to do it directly?

[–] [email protected] 0 points 1 month ago

I use neovim. But if I had to choose between vscode vs. JetBrains stuff, I much rather vscode. It's far cleaner.

[–] [email protected] 1 points 1 month ago

I definitely considered this approach. The only problem is it is difficult to represent linking items to each other. For example, dependent tasks or sub tasks.

[–] [email protected] 5 points 1 month ago

Write freely is a federated platform

[–] [email protected] 1 points 1 month ago (1 children)

Oh wow that's pretty cool. From my understanding this is good for notes, but would it work for tasks / todos?

[–] [email protected] 1 points 1 month ago

I think what I'm looking for doesn't exist, but what I meant by CLI is something I can pipe things into and interface with other unix tools easily.

But you're right, they all have a way to open a session via CLI.

[–] [email protected] 2 points 1 month ago (1 children)

What would then? I haven't found anything that has command line interface and supports dependent tasks and a flexible, queryable tag system

[–] [email protected] 2 points 1 month ago (1 children)

I think you're right about notes, but what about the other use cases?

[–] [email protected] 1 points 1 month ago (1 children)

First, I want to apologize for mentioning notes. Notes should be separate from the rest, and I agree with you on what you said about notes.

For the rest, I've asked before on suggestions for apps to save my todos, links, etc. There were a couple issues

  • I couldn't find something that gives me the same interface for all of these. They are all lists of things with some attributes and relations, but most apps out there handled each one of these separately and differently

  • they lacked features I wanted. For example, dependent tasks, a flexible tag system I can query by, etc.

A DB would let me do all of that.

[–] [email protected] 1 points 1 month ago

Todo txt lacked some features I needed, which would be trivial to implement as a SQL column.

I do not remember what it was... Maybe it was dependent tasks? I believe so.

[–] [email protected] 2 points 1 month ago (1 children)

Task warrior was close to what I wanted. I forgot what it lacked when I tried it. I think it was dependent tasks or sub tasks? If not that, then a tag system with flexible querying. I want querying by tag, due date, and other attributes to be possible.

I think orgmode may be what I want, but the learning curve was discouraging. I was also discouraged about the possibility for myself to build extensions for it, for example to use on android. That would be easier with sql.

Obsidian is gui from my understanding, so it wouldn't fit what I'm looking for. I want something I can integrate with my scripts and other unix tools.

 

I've been enjoying learning ocaml, but I found it very easy to write code riddled with side effects and imperative-ness.

Take this example:

let some_func arg = 
  let input = format_input_from_stdin ()
  let read_content = read_file "some/file/path.txt"
  let to_write = get_write_file_content input read_content
  let () = write_file "some/other/path.txt" to_write 
  let output = run_external_command_with_output 
  (output, read_content)

As you can see, many side effects and imperative steps in the code. Is there a better practice for coding this in a functional manner?

 

I read a lot of answers online that its a bad idea, but the arguments did not make a lot of sense. "it's a heavily ingrained part of the eco system". Well if I can change it, what's the deal?

It makes more sense to make an interrupt signal be the harder shortcut, and copy to be ctrl+C, matching other programs and platforms.

 

I constantly hear about research into functional programming, and even real things coming out of them, like certain programming languages (idris).

Is there anything like this for frontend UI dev? It doesn't have to be FP related.

 

Hello friends,

Unfortunately none of my friends (or even my coworkers, surprisingly) share my passion for programming.

I am looking for a tightly knit online community where I can make friends with other nerds who are enthusiastic about programming (i.e. It's not just a job for them).

Matrix, discord, or honestly any online platform is good.

I do highly prefer that the community is welcoming and not toxic.

Topics I'm interested in: programming theory, comp sci, devops, self hosting, system design, Linux, functional programming, OOP, etc.

 

cross-posted from: https://lemy.lol/post/19181146

I just started to learn Ocaml to learn functional programming. I will use it to build a CLI that's mostly orchestrating other programs.

My experience is mostly in JS / TS, but I've also coded a good bit in Python and Lua.

Below, I provided a list of things I learned or focused on while using OCaml. But I feel like I must be missing something. This is only moderately different from what I'm used to in JS. I expected something more radical. Moreover, I constantly hear a lot of FP jargon (like "highly kinded types", monads, etc) that I feel am still missing.

So far, here's what I studied:

  • immutability
  • avoid side affects
  • static typing
  • recursion instead of loops
  • option / maybe
  • higher order functions
  • conditionals and other constructs as expressions, when they're statements in other languages
  • pipelines and functions as input —> output
  • currying
  • scoping with let

What am I missing?

 

I just started to learn Ocaml to learn functional programming. I will use it to build a CLI that's mostly orchestrating other programs.

My experience is mostly in JS / TS, but I've also coded a good bit in Python and Lua.

Below, I provided a list of things I learned or focused on while using OCaml. But I feel like I must be missing something. This is only moderately different from what I'm used to in JS. I expected something more radical. Moreover, I constantly hear a lot of FP jargon (like "highly kinded types", monads, etc) that I feel am still missing.

So far, here's what I studied:

  • immutability
  • avoid side affects
  • static typing
  • recursion instead of loops
  • option / maybe
  • higher order functions
  • conditionals and other constructs as expressions, when they're statements in other languages
  • pipelines and functions as input —> output
  • currying
  • scoping with let

What am I missing?

 

There are so many definitions of OOP out there, varying between different books, documentation and articles.

What really defines OOP?

 

What do package managers do? Install packages, obviously! But that is not everything. In my opinion, package managers do enough to be characterized as general automation frameworks. For example:

  • manage configurations and configuration files
  • manage custom compilation options and flags
  • provide isolation or containerization
  • make sure a specific file is present in a specific place given specific conditions
  • change installation files or configuration based on architecture or other conditions

Not all package managers do all of the above, but you get the idea.

Nix even manages your entire setup with a single configuration file.

It occurred to me that package management could theoretically be managed by an automation framework.

What do I mean by automation framework? Ansible, chef, puppet, or Sparrow.

Now imagine if you were to use one of those package managers as an automation framework. For most of them, it would suck. (nix is a notable exception). So maybe common package managers are just bad automation frameworks?

What if we used an automation framework as a package manager? Well currently, it might also suck, but only because it lacks the package definitions. Maybe it is not a bad experiment to have a distribution managed by a modern automation framework like Sparrow.

What are the benefits?

  • usable on other distributions
  • more easily create your own packages on the fly
  • Greater customization and configurability
  • use a known programming language that is easy to read to define packages and other functions, instead of a DSL
  • your package manager can easily automate just about any task using the same syntax and framework
 

Background

I am designing a CLI for a container build tool I am making. It uses Gentoo's Portage behind the scenes

Question

I want to give the user the ability to specify a custom package repository. The repository must have a name, URI and sync type.

custom_repo: {
    uri: 'https://...',
    name: 'custom',
    sync_type: 'git',
}

How do I have the user represent this in the CLI? keep in mind, this is not the main input and is optional.

One way is to make this only provide-able via a config file using JSON or another structured data representation. But I want to see if theres a good way to do it in the CLI

What I am thinking of: command --custom-repo uri='https://...',name=custom,sync_type=git --custom-repo ... [main input]

Is this the best way of doing this?

 

I know that a lot of what Nix does is working around its break from FHS, but I can imagine there are still things that seep through. Are there any unsolvable problems due to this?

I saw on this post that it is possible to use FHS on Nix. Does this solve all potential issues then?

 

or do we want to keep this as a mostly user-auth instance?

I was thinking of creating something similar to "findAReddit". There doesn't seem to be a big one around. It could become a directory that other instances frequent. Are we willing to handle something like that?

 

I am looking for a neovim colorscheme that is customizable and is best in terms of offered features. What features? well, at least granularity in highlight groups, performance (preferably using tree-sitter), customizability and documentation. If you know of any other fancy features, I will take those too.

I have tried

view more: ‹ prev next ›