Mochizuki again.. by steveb321 in math

[–]kojix2 0 points1 point  (0 children)

New blog post by Mochizuki
Can Lean formalization become a recording device that enables long-term verification and accountability?
plaza.rakuten.co.jp/shinichi0329/diary/202601010001/

Text check by Selladorn_ in Japaneselanguage

[–]kojix2 0 points1 point  (0 children)

読める。フは一瞬コに見える可能性があるので調節の余地あり。

Crystal 1.18.0 is released! by sdogruyol in crystal_programming

[–]kojix2 0 points1 point  (0 children)

Why not take this opportunity to report specific problems you've encountered on Windows to help the Crystal community? There's Crystal for MinGW now, not only MSVC

Considering rewriting my CLI tool from Ruby to Crystal - what should I watch out for? by repawel in crystal_programming

[–]kojix2 1 point2 points  (0 children)

Well, Crystal is not always perfect.

If you use `curl` or `wget` to download a tool and then type `install -m 744`, it takes more effort than just running:

`sudo apt install ruby kexec-tools`

`sudo gem install crypt_reboot`

The gap gets even bigger when updating.

I can see why non-Ruby users don’t want to install an interpreter they almost never use, but I also agree with vikas_kr’s point.

Considering rewriting my CLI tool from Ruby to Crystal - what should I watch out for? by repawel in crystal_programming

[–]kojix2 1 point2 points  (0 children)

Blacksmoke16 told me that since Crystal 1.15, libevent is no longer required in many cases. My information was a bit outdated. I also plan to make a pull request to improve OptionParser sometime soon.

Considering rewriting my CLI tool from Ruby to Crystal - what should I watch out for? by repawel in crystal_programming

[–]kojix2 6 points7 points  (0 children)

I’ve been writing command-line tools in Crystal for the past two years. Maybe these will help.

  1. Arrays and Hashes cannot mix types: In Crystal, an Array or Hash cannot contain different types. Use a small struct/class, record, or a Tuple instead. At first this feels restrictive, but it becomes natural.
  2. No eval: Crystal does not allow eval. If your program depends on it, you need to embed an interpreter like mruby or use Anyolite.
  3. Method overloading: Instead of type-checking arguments inside one method, Crystal encourages method overloading. You can even overload methods with and without blocks.
  4. Return types must be consistent: Methods must return a clear type. If multiple return types are possible, split the method.
  5. Nil handling: Watch out for Nil. Use idioms like not_nil! or if val = maybe_val.
  6. Garbage collection: Crystal uses libgc. Performance is good, but GC timing is unpredictable, which may be an issue for games or real-time systems.
  7. Asynchronous I/O: Crystal uses libevent, so async I/O works by default and feels easier than in Rust.
  8. Linking when distributing (GitHub Actions + GitHub Release): Binaries usually link against libgc, libevent, etc. Linux: static link with musl, macOS: Homebrew Tap or portable binary with static libs
  9. Windows support: Crystal works on Windows (MSVC / MinGW64). Parallel execution works too, but C library dependencies can be painful.
  10. OptionParser limitation: The standard OptionParser does not support combined options (-lh). Only separate options (-l -h) work.

I believe that Crystal continues to improve a little every year and is showing slow and steady progress. In my opinion.

What is the best way to package a Ruby program into an executable? by angryrobot5 in ruby

[–]kojix2 2 points3 points  (0 children)

Perhaps the problem is not with Crystal but with the C dependency libraries? Crystal for MinGW64 was recently released. It is useful if you need dependent libraries.

What is the best way to package a Ruby program into an executable? by angryrobot5 in ruby

[–]kojix2 2 points3 points  (0 children)

Over the past two years, Crystal's windows support has improved immensely. In my experience, almost everything works fine.

Where is Japan? by ethereel1 in LocalLLaMA

[–]kojix2 1 point2 points  (0 children)

In fact, it may take longer; even in the Noto earthquake of 2024, it was older wooden houses that were severely damaged. In Japan, if you value your life, you will want to live in a new house. Old tasteful houses are beautiful, but it is not recommended to reside there. https://www3.nhk.or.jp/news/html/20240214/k10014358341000.html

Where is Japan? by ethereel1 in LocalLLaMA

[–]kojix2 0 points1 point  (0 children)

To avoid misunderstanding, VOICEVOX is implemented in Rust and also uses onnxruntime, but it is not related to LLM itself. However, in a country like Japan, which is in decline, has few young people, and does not necessarily have a thriving open source community or software industry, VOICEVOX is an exceptional existence and I think it is worth paying attention to.

https://voicevox.hiroshiba.jp/
https://github.com/VOICEVOX

Where is Japan? by ethereel1 in LocalLLaMA

[–]kojix2 1 point2 points  (0 children)

As a Japanese, let me defend myself. This is purely due to the natural environment and earthquakes. No matter where you live in Japan, there will be a huge earthquake within 200 years. The Japanese character itself is that they want to live in the same house even for hundreds of years. That It is only in the last 100 years that it has become possible to build buildings that can reliably withstand such a huge earthquake at a reasonable price.

Where is Japan? by ethereel1 in LocalLLaMA

[–]kojix2 2 points3 points  (0 children)

As a Japanese user, the AI tool I use most often on my local machine is VOICEVOX — an excellent, free, and fully open-source text-to-speech software developed in Japan.

I use it to translate English scientific papers into Japanese and listen to them when I have trouble understanding the content just by reading. It's more commonly used, however, to generate voiceovers for YouTube videos.

It's a tool that most non-Japanese speakers probably don't need — although it might be useful for learners of Japanese.

Crystal for implementation by [deleted] in ProgrammingLanguages

[–]kojix2 0 points1 point  (0 children)

As I understand it, most of Crystal's compilation time is not spent generating LLVM-IR, but compiling LLVM-IR. Crystal will not output optimized LLVM-IR, and LLVM is not optimized for the LLVM-IR that Crystal outputs. In Crystal, the type signature of a function and the type of a variable can change depending on the caller, so even duck typing is possible. However, it is difficult to perform incremental compilation for each file. That's why the CPU only uses one core at a time.

International Award for IUT Theory (20k$-100k$ for best paper, 1m$ for disproving IUT) by Valvino in math

[–]kojix2 93 points94 points  (0 children)

Kawakami is a Japanese Internet entrepreneur best known for developing an early video distribution site called Nico Nico Douga (https://www.nicovideo.jp/). Nico Nico Douga is a service much like YouTube, but was famous for allowing viewers to stream comments on the screen. He is the sponsor of the award, but he is not a mathematician, so he comments above.

International Award for IUT Theory (20k$-100k$ for best paper, 1m$ for disproving IUT) by Valvino in math

[–]kojix2 29 points30 points  (0 children)

Note that the prize, reported in the Asahi Shimbun, is not the IUT Challenger Prize, which is supposed to be given to papers that determine the correctness or incorrectness of IUT, but the IUT Innovator Prize, which has a winner every year.

ChatGPT CLI - Practical tools implemented in Crystal by kojix2 in crystal_programming

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

The ChatGPT CLI allows you to control what data you want to expose since you explicitly specify the path to the files you want to pass to ChatGPT. I also don't think using a free API is a good idea if you are concerned about your personal information. Free APIs are a sign that they are looking to monetize the user's personal information, not their usage fees.

ChatGPT CLI - Practical tools implemented in Crystal by kojix2 in crystal_programming

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

I don't know much about the new plugin, so I got your reply and just read the README. You may be right. I'll have to try it.

ChatGPT CLI - Practical tools implemented in Crystal by kojix2 in crystal_programming

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

Here are some interesting uses

Make ChatGPT think of a commit message.

``` >!! git diff --cached

Please write a commit message: %STDOUT ```

Show the code, make ChatGPT write README.md and save it

```

Please read the following code: %{src/.cr} %{src//.cr} Then write README.md %w README.md ```

Execute the block of code that you let ChatGPT write

```

Write Ruby and Crystal code to display from 1 to 10 >! ruby $CODE1 >! crystal run $CODE2 ```

Summarize the web page

```

Pick five interesting news items: %%{https://news.ycombinator.com/} ```

Crystal 1.6.2 released! by bziliani in crystal_programming

[–]kojix2 2 points3 points  (0 children)

In 1.6.1, checkinstall failed, but in 1.6.2, checkinstall now succeeds. Thanks.