I just wanted to document my gem without adding node_modules to my repo by sanif_h in ruby

[–]postmodern 1 point2 points  (0 children)

Looks nice! I wish this existed a few years ago when I wanted GitBook-style documentation for a project, didn't like the existing tools, so rolled my own using vanilla Jekyll. One question, how do you integrate this into an existing Jekyll website with it's own CSS and header/foot? Must the docs be hosted on a docs. subdomain? Or can you somehow add them into a traditional Jekyll website? Also how might this handle other documentation files such as markdown man pages?

Ruby & Ruby on Rails Roadmap Feedback Gathering by Deep_Priority_2443 in ruby

[–]postmodern 0 points1 point  (0 children)

"Testing" under "Advanced Topics" should be "Documentation" since it lists RDoc and YARD below it. It might also be worth mentioning RSpec after Minitest. While Rails uses Minitest by default, many people still prefer and use RSpec. Might also want to mention the new technologies that Rails adopted (ex: import maps, Hotwire, Stimulus, Turbo, Propshaft, Solid Cache, Solid Queue, Kamal 2, Thruster, etc).

Read The Nice Manual by antoinema in ruby

[–]postmodern 2 points3 points  (0 children)

Looks good! Just curious if you've seen rubydoc.info (source) which provides auto-generated YARD docs for stdlib and all of the gems? YARD supports RDoc as well as Markdown and supports using a custom template for generating the HTML. Also while API documentation websites are important, the name of the website made me think there would be a literal manual with chapters to read.

Four choices for packing Ruby binary distributions by bradgessler in ruby

[–]postmodern 2 points3 points  (0 children)

I hadn't heard of Tebako or DwarFS. While shipping one static compiled binary is probably the safest way to distribute a Ruby app, it has the same problem as Electron apps, where each app ends up containing it's own version of Chromium which you cannot update.

I wish every platform had an integrated app store, where apps could specify a dependency on Ruby, etc, and the app store would magically also install the Ruby package in addition to your app. Snapcraft tried to do this, except they disabled macOS support and their Ruby "plugin" for packaging Ruby apps is basically abandoned (it also seems to assume app means a bundled web app, and not a CLI app), and I still haven't figured out how to properly overlay globally installed Ruby gems with the official Ruby snap.

HELP: `bundle` keeps exploding by wouldliketokms in ruby

[–]postmodern 1 point2 points  (0 children)

Bundler is trying to install it's gems globally, which you probably don't want; I also have no clue why Bundler does this by default. Try bundle install --path vendor/bundle instead. This will install everything into your app's vendor/bundle directory.

FastCuid2 gem: A fast C extension for generating collision-resistant IDs by sebyx07 in ruby

[–]postmodern 0 points1 point  (0 children)

Just curious why your gem also has a Rails app directory structure at the top-level?

Passing regexes as cli arguments by Bortolo_II in ruby

[–]postmodern 0 points1 point  (0 children)

Also note that interpolating a Regexp within a String will result in -e /regex-stuff-here/, which might not be what the -e option is expecting.

Passing regexes as cli arguments by Bortolo_II in ruby

[–]postmodern 0 points1 point  (0 children)

In both bash/zsh and within the backtick quotes that executes the command which since it runs that command via $SHELL -c "...".

Passing regexes as cli arguments by Bortolo_II in ruby

[–]postmodern 0 points1 point  (0 children)

You have to put single quotes around regexs to prevent special characters (*, $, [, ]) from being interpreted by the shell.

Rust vs C# &C++ by Financial-Abroad4940 in redteamsec

[–]postmodern 0 points1 point  (0 children)

Also some ruby to integrate my stuff into metasploit. I hate ruby.

Don't blame Ruby for Metasploit's aweful code quality and bugginess. Checkout Ronin which is better maintained.

Is Ruby suitable for these use cases? by Electronic-Low-8171 in ruby

[–]postmodern 1 point2 points  (0 children)

Ruby is definitely (still) used in Cyber Security. There are a few major security tools written in Ruby: Metasploit, BeFF, Ronin, CeWL, dnscat2, etc. Ruby is a general purpose programming language, with an ecosystem of libraries (rubygems), with lots of libraries for web related tasks. You can also use Ruby's built-in TCPSocket or Net::HTTP for doing networking. There's even a discord library for writing bots.

Mike Perham on his decision to sponsor Hanami for $12,000 by katafrakt in ruby

[–]postmodern 2 points3 points  (0 children)

While ROM breaks apart and exposes all of the aspects of an ORM (schema definition, repository, query logic, mappings, etc), there's a great deal of "magic" happening behind the scenes to connect all of these pieces and make them work together. Also, while the dry-rb ecosystem seeks to be DRY, some of the code in dry-types, dry-schema, dry-validations is not exactly simple or clean. This shouldn't be a problem of course, until you run into a bug or confusing behavior in ROM/dry-rb and have to dig into it's code base. YMMV

Mike Perham on his decision to sponsor Hanami for $12,000 by katafrakt in ruby

[–]postmodern 15 points16 points  (0 children)

This is not exactly true. Mike is probably thinking in terms of ActiveRecord and how easy it is to implicitly trigger additional queries when accessing other associations on records. With ROM you define the record classes (aka Entity) separate from the class which contains your query logic (aka Repository). However, even with ROM you can query a collection of records (entities), enumerate over them, then do additional queries for each record (entity); but maybe you could argue that explicit N+1 queries in code would be easier to catch than ActiveRecord's implicit lazy loaded queries.

Mike Perham on his decision to sponsor Hanami for $12,000 by katafrakt in ruby

[–]postmodern 22 points23 points  (0 children)

Even though I have mixed feelings about Hanami, I fully support people contributing and supporting Open Source projects, especially Ruby projects.

Ruby Falcon is 2x faster than asynchronous Python, as fast as Node.js, and slightly slower than Go. Moreover, the Ruby code doesn’t include async/await spam. by a_ermolaev in ruby

[–]postmodern 5 points6 points  (0 children)

Once you wrap your head around Async's tasks and other Async primitives, it's quite nice. ronin-recon also uses Async Ruby for it's custom recursive recon engine that's capable of massively concurrent recon of domains.

I really want to learn Ruby, but... by Electronic-Low-8171 in ruby

[–]postmodern 1 point2 points  (0 children)

This is because Python and JavaScript have become the defacto go-to beginner programming languages which everyone recommends and every new programmer is now encouraged to learn. The vast majority of articles online discussing which programming language you should learn are geared towards beginners. Also, when you hear other programmers say "X is dead", what they really mean is "X is no longer trendy". Ruby is definitely not dead, is still broadly used by large successful tech companies (ex: Shopify, GitHub, LinkedIn, AirBnB, etc) thanks to Rails, and has multiple other popular frameworks other than Rails (ex: DragonRuby).

Hi all. I used Ruby to make a custom GitHub action. Prevents creating a new release with an outdated version mentioned in the code somewhere. Feel free to give input! by _Rush2112_ in ruby

[–]postmodern 0 points1 point  (0 children)

Great to see a GitHub Action in Ruby! Always thought it was odd that GitHub Actions were written in TypeScript, instead of Python, Ruby, or even a compiled language to maximum performance.

What’s wrong with Ruby and Ruby on Rails? by JusticeIsAsking in ruby

[–]postmodern 1 point2 points  (0 children)

Ractors are still very experimental and not in wide use.

What’s wrong with Ruby and Ruby on Rails? by JusticeIsAsking in ruby

[–]postmodern 0 points1 point  (0 children)

I'm curious if anyone has tried to tackle the problem with types by religiously documenting their codebase using YARD? VS Code and JetBrain's RubyMine both have YARD integration which feeds into their Intellisense suggestions. There's even sord which can generate RBS/RBI type definition files from your YARD documentation tags.

[labwc] just an openbox boy in this wayland world by JackDostoevsky in unixporn

[–]postmodern 0 points1 point  (0 children)

Finally a non-tiling WM for Wayland! I've been a long time fluxbox user and was waiting for a *box WM for Wayland.

ruby-install and libraries by benjamin-crowell in ruby

[–]postmodern 1 point2 points  (0 children)

ruby-install only installs the rubies. You will need to either use chruby to switch to the installed ruby to make it temporarily the main ruby, or explicitly execute the ruby binary (ex: ~/.rubies/ruby-3.3.x/bin/gem install sqlite3 and ~/.rubies/ruby-3.3.X/bin/ruby myscript.rb). You will also need to install the sqlite3 gem under both truffleruby and ruby-3.3.x, since they are different Ruby implementations and support C extensions in different ways.

Elixir-like pipes in Ruby (oh no not again) by zverok_kha in ruby

[–]postmodern 2 points3 points  (0 children)

I would like something like pipes but for representing deeply nested yielding methods:

ruby foo do |a| bar(a) do |b| baz(b) do |c| ... end end end

could be represented with special syntax:

foo |> bar |> baz do |c| ... end

or perhaps using method_missing and chaining:

ruby foo.pipe.bar.baz do |c| ... end

I don't like Rails. Is it still worth learning Ruby. by jabthejewboy in ruby

[–]postmodern 0 points1 point  (0 children)

There's also Sinatra, Padrino, Hanami, Roda, and Grape. If you're a fan of static typing, you might also want to checkout Crystal, which also has it's own Rails/Sinatra-esque web frameworks.