llvm-project
ruby
Our great sponsors
llvm-project | ruby | |
---|---|---|
346 | 181 | |
25,055 | 21,447 | |
3.9% | 0.9% | |
10.0 | 10.0 | |
about 3 hours ago | 1 day ago | |
C++ | Ruby | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
llvm-project
-
Programming from Top to Bottom - Parsing
You can never mistake type_declaration with an identifier, otherwise the program will not work. Aside from that constraint, you are free to name them whatever you like, there is no one standard, and each parser has it own naming conventions, unless you are planning to use something like LLVM. If you are interested, you can see examples of naming in different language parsers in the AST Explorer.
-
C++ Safety, in Context
> It's true, this was a CVE in Rust and not a CVE in C++, but only because C++ doesn't regard the issue as a problem at all. The problem definitely exists in C++, but it's not acknowledged as a problem, let alone fixed.
Can you find a link that substantiates your claim? You're throwing out some heavy accusations here that don't seem to match reality at all.
Case in point, this was fixed in both major C++ libraries:
https://github.com/gcc-mirror/gcc/commit/ebf6175464768983a2d...
https://github.com/llvm/llvm-project/commit/4f67a909902d8ab9...
So what C++ community refused to regard this as an issue and refused to fix it? Where is your supporting evidence for your claims?
> Take for example CVE-2022-21658 (https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html) in Rust, related to a filesystem API. It's true, this was a CVE in Rust and not a CVE in C++, but only because C++ doesn't regard the issue as a problem at all.
That just plain wrong. Just simply wrong. And I hope it is not a lie done on purpose.
The C++ community acknowledge the issue as soon as the Rust one posted the problem and issued a fix which is already deployed with major compilers [^1] [^2]
It does not have a CVE associated since the issue was spotted within Rust stdlib first.
This is this exact kind of FUD and zealotism that makes people hate the Rust community. I wish the community mature a bit on this aspect.
[^1]: https://github.com/gcc-mirror/gcc/commit/ebf6175464768983a2d...
[^2]: https://github.com/llvm/llvm-project/commit/4f67a909902d8ab9...
-
Clang accepts MSVC arguments and targets Windows if its binary is named clang-cl
For everyone else looking for the magic in this almost 7k lines monster, look at line 6610 [1].
[1] https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
-
Rewrite the VP9 codec library in Rust
Through value tracking. It's actually LLVM that does this, GCC probably does it as well, so in theory explicit bounds checks in regular C code would also be removed by the compiler.
How it works exactly I don't know, and apparently it's so complex that it requires over 9000 lines of C++ to express:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Anal...
-
MiniScript Ports
• Go • Rust • Lua • pure C (sans C++) • 6502 assembly • WebAssembly • compiler backends, like LLVM or Cranelift
-
On Avoiding Register Spills in Vectorized Code with Many Constants
Compilers also may even spill data to stack from memory, even when the original location is still available, as can be seen in this issue: https://github.com/llvm/llvm-project/issues/53348
I vaguely remember that spilling like this could allow high-end CPUs to use something similar to register renaming, i.e. stack locations like [rsp + 96] could be stay in a physical registers during function execution (high-end CPUs often have more physical registers, than logical ones), but could find good references whether such optimization exists in practice or not.
Unfortunately, I think more often than note it causes performance regressions and in some cases it may even cause unnecessary stack spilling of sensitive data: https://github.com/rust-lang/rust/issues/88930#issuecomment-...
-
MRISC32 – An Open 32-Bit RISC/Vector ISA (Suitable for FPGA CPU)
Looks like llvm recently got some fusion support via -mtune now: https://github.com/llvm/llvm-project/commits/main/llvm/lib/T...
-
Std: Clamp generates less efficient assembly than std:min(max,std:max(min,v))
https://github.com/llvm/llvm-project/issues/57589
Turn on fast-math, it flips the FTZ/DAZ bit for the entire application. Even if you turned it on for just a shared library!
ruby
- Ruby 3.3
-
Tests Everywhere - Ruby
Ruby testing with RSpec
-
YJIT Is the Most Memory-Efficient Ruby JIT
https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md#co...
It just dumps all the JIT-compiled code? I'd expect to see some kind of heuristic or algorithm there... LFU or something.
The internals of a JIT are essentially black magic to me, and I know the people working on YJIT are super talented, so I am sure there is a good reason why they just dump everything instead of the least-frequently used stuff. Maybe the overhead of trying frecency outweighs the gains, maybe they just haven't implemented it yet, or maybe it's just a rarely-reached condition.
Also for a practical tip on YJIT memory usage, note that there is a "--yjit-exec-mem-size" option, see https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md#co... for more details. (This command-line argument is mentioned in the paper https://dl.acm.org/doi/10.1145/3617651.3622982 but not in this blog post about the paper.)
At Heii On-Call https://heiioncall.com/ we use:
ENV RUBY_YJIT_ENABLE=1
Not parent poster and do not have production YJIT experience. =)
My guess is that you would monitor `RubyVM::YJIT.runtime_stats[:code_region_size]` and/or `RubyVM::YJIT.runtime_stats[:code_gc_count]` so that you can get a feel for a reasonable value for your application, as well as know whether or not the "code GC" is running frequently.
https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md#pe...
-
GitHub and Developer Ecosystem Control
Part of the major userbase pull in GitHub revolves around hosting a considerable number of popular projects including Angular, React, Kubernetes, cpython, Ruby, tensorflow, and well even the software that powers this site Forem.
-
Ruby Outperforms C: Breaking the Catch-22
The title is misleading, just like other commenters mentioned. Just check how much indirection "rb_iv_get()" has to make (at the end, it will call [1], which isn't "a light" call). Now, check generated JIT code (in a blog post) for the same action where JIT knows how to shave off unnecessary indirection.
We are comparing apples and oranges here.
[1] https://github.com/ruby/ruby/blob/b635a66e957e4dd3fed83ef1d7...
-
A Tour of CPython Compilation
As with actual spoken languages, programming languages have their own grammar as well. I've you've read any RFCs for networking protocols you may have come across a variation of Backus–Naur form, commonly referred to as BNF. The HTTP protocol uses an augmented version of it for its standard. Other languages such as Ruby may even utilize a grammar file.
-
Everything about this Device is so good but I need to know if there is an easy way to delete duplicated games like almost 10K + is duplicated
It relies on ruby and would be installed with ruby gems: gem install finddups TBH, I've only tested it with macOS. It should work with linux too, but I don't think it will work with windows.
-
Creating a Gem using Ruby C API (part 1)
But do not trust in me, see the repository of language!
What are some alternatives?
CocoaPods - The Cocoa Dependency Manager.
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
gcc
SDL - Simple Directmedia Layer
cosmopolitan - build-once run-anywhere c library
advent-of-code - My solutions for Advent of Code
SimpleCov - Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
CPython - The Python programming language
yjit - Optimizing JIT compiler built inside CRuby
Ruby on Rails - Ruby on Rails
STL - MSVC's implementation of the C++ Standard Library.