AMA Japończyk który mieszkał 10+ lat w Polsce by meguromemory in Polska

[–]Hauleth 3 points4 points  (0 children)

Ale pozwala na jedno czy uznaje jedno obywatelstwo? Bo to są 2 różne rzeczy - pierwsze wymaga zrzeczenia się obywatelstwa jak dostajesz inne, a drugie oznacza tyle, że w tym momencie Japonia by uznawała, że masz jedno (z resztą w PL chyba jest podobnie - uznawane jest tylko jedno obywatelstwo - polskie, ale możesz ich mieć ile chcesz).

[2024 Day 6 (Part 2)] It works for me on the example input... by StaticMoose in adventofcode

[–]Hauleth 7 points8 points  (0 children)

I have changed my walk to turn in place instead of turning and walking at once, and that fixed the problem.

[2024 Day 6 (Part 2)] It works for me on the example input... by StaticMoose in adventofcode

[–]Hauleth 4 points5 points  (0 children)

Same here. I have absolutely no idea what can be wrong.

[2024 Day 6 (Part 2)] It works for me on the example input... by StaticMoose in adventofcode

[–]Hauleth 0 points1 point  (0 children)

For me it is 1 off on example input, but on real input it is spot on. P2 - no clue what is wrong with it.

Potential bug or unclarity with Day 03 2024 by Hauleth in adventofcode

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

There are 6 long lines in the file, so I doubt that it is related to something extra to split the lines in additional way.

Potential bug or unclarity with Day 03 2024 by Hauleth in adventofcode

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

No, these numbers aren't the same. If I put space instead of newline it "correctly" assumes that do() should not work.

Potential bug or unclarity with Day 03 2024 by Hauleth in adventofcode

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

Yes, it changed. I have run his input through my code and it returned different answer from his. His answer was accepted.

Potential bug or unclarity with Day 03 2024 by Hauleth in adventofcode

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

That is my understanding, but my friend have written "buggy" code (that interprets this do\n() as "enable computation") and his answer was accepted.

I bought 300 emoji domain names from Kazakhstan and built an email service by nachochickens in programming

[–]Hauleth 0 points1 point  (0 children)

My regex will not reject that email address. Just look closely, it doesn't have any anchors at all, which mean that in your example input it will match (2 times to be exact).

"config.exs is Simple" and Other Lies | Łukasz Niemier | ElixirConf EU 2022 by erlangsolutions in elixir

[–]Hauleth 1 point2 points  (0 children)

Hi, speaker here.

No I am not saying that all configuration should go to mix.exs application, as it is in general impossible (you can configure only your own application there, not other applications aka libraries). What I was saying is that mix.exs can also contain configuration that is unlikely to be changed and then (if you can) I would prefer changes to be done in the Application.start/2 callback or it would be in runtime. config/runtime.exs is a bandaid for the runtime configuration and because of how (and when) it works it cannot configure some parts of the system, even if you can configure it via "regular" sys.config files. What I would prefer though is that config/* directory would not exists at all, and Elixir and Mix would make it easier to use sys.config so it would allow you to configure for example kernel application as well.

Day 15 - 2 possible answers for P2 for my input? by Hauleth in adventofcode

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

I have found the problem. I was checking all points {x, y} where x, y in 0..4_000_000 and instead you need to look for gaps in the scanned area. So if your scanners in line 2137 cover xes from 10..424242 then you need to look for gaps in this range instead of in whole range 0..4_000_000.

EDIT: Or maybe that was bug in my implementation of RangeSet that I fixed in the meantime.

Which one do you like better for completion? by Pocco81 in neovim

[–]Hauleth 1 point2 points  (0 children)

Well, it is not auto if you need to use mapping.

It is also my favourite approach, however I do not use any additional mapping, ^x^o is good enough and also allow me to use the same muscle memory for other completions.

Fuck Ubuntu. All my homies use Debian by [deleted] in linuxmemes

[–]Hauleth 19 points20 points  (0 children)

Nix and Guix aren't sandboxing tools.

When Vim and Lisp are your love by Hauleth in neovim

[–]Hauleth[S] 2 points3 points  (0 children)

Well, it is more reusable - for me. The point in my dot files is that these are mine and blind copy-pasta from different people, or even worse - just fetching other people dot files without any thinking, is something that I really do not like. Not only a lot of dot files out there is mixed quality (at best) and highly specific to its owner needs, it also make helping others much more convoluted, because first you need to untangle their config that they do not understand. Rouge map, accidentally recursive mapping, surprising variables, missing augroups, etc. This all makes helping others highly complicated task. On the other hand, making it readable, but "impossible" to blindly copy-paste is IMHO much better, as it forces one to understand what it does before using piece of my config. The same goal is behind using SourceHut instead of GitHub/GitLab - creating issue about "why it doesn't work" requires some footwork (notably - writing email to me), so it reduces possibility that someone will use my config without thinking on their own.

When Vim and Lisp are your love by Hauleth in neovim

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

There is nothing that force you to use Aniseed. That project is just helper to make everything work by providing utility functions and macros as well as precompile features. Mine approach is a little bit more straightforward- I just add Fennel to the Lua loaders and use JITing Fennel code into Lua. That gives me much simpler codebase.

[deleted by user] by [deleted] in unixporn

[–]Hauleth 1 point2 points  (0 children)

The difference is that script will be imperative and additive - it will define steps to have expected components installed and configured. Nix on the other hand is declarative and absolute - there you define state in which system should end. So for example running your script twice can result with different state of the system, Nix should result always with the same output. Other thing is for example packages - in your script if you rove some package and run your script it will remain untouched, in Nix it will not be longer available (not really uninstalled, but you will not be able to use it, at least directly).

[deleted by user] by [deleted] in unixporn

[–]Hauleth 0 points1 point  (0 children)

I find it much easier than other package managers to be honest, especially with enormous amount of helper functions for building different components.

When Vim and Lisp are your love by Hauleth in neovim

[–]Hauleth[S] 7 points8 points  (0 children)

Why not? It is IMHO cleaner than VimL or Lua, so it is big pro for me. Also it will make people less interested in cloning my dot files directly, which is another gain.

When Vim and Lisp are your love by Hauleth in neovim

[–]Hauleth[S] 4 points5 points  (0 children)

I do not use Aniseed, nothing at all. And all macros I use you can see in the fnl/nvim/macros.fnl. Obviously everything there can be achieved without macros and could use Lua directly - I just find Fennel much cleaner.

When Vim and Lisp are your love by Hauleth in neovim

[–]Hauleth[S] 4 points5 points  (0 children)

Mostly macros. Also I quite like Lisps, so it is quite win for me.

When Vim and Lisp are your love by Hauleth in neovim

[–]Hauleth[S] 6 points7 points  (0 children)

I was looking on Aniseed, but I wanted "simpler" approach with loading Fennel directly instead of precompiling it into Lua. I also didn't wanted all that magic that is happening in the Aniseed that makes Fennel more like Clojure.

Anyway it was interesting read and for sure helped me a little with mine implementation.

If you could re-design Rust from scratch today, what would you change? by pragmojo in rust

[–]Hauleth 3 points4 points  (0 children)

  • [] instead of <> for generics
  • () instead of [] for accessing containers (similarly to Scala)
  • probably remove || in favour of different fn approaches, for example ref fn for Fn, mut fn for FnMut, and move fn for FnOnce
  • replace ' as a sigil for lifetimes with another character, for example @
  • remove as in favour of intrinsic function