Live data from Hacker News

Ruby website redesigned

ruby-lang.org

171–180 of 224 posts

Re: Ruby website redesigned

#172

I thought it would be interesting to try the showcase examples in Raku (since I am always saying how good Raku's imitation of Ruby is)... - https://glot.io/snippets/he42jpfm27 - https://glot.io/snippets/he42trx6w6 - https://glot.io/snippets/he434b6ryj Obviously Raku leans more to `{}` and `my $var` than Ruby - but otherwise I think it does a credible job. Obviously these are carefully chosen Ruby snippets to highlit…

Man. Haven’t thought about Raku for a while. Does it have a good web framework these days?

See https://rakujourney.wordpress.com/2025/03/30/the-harc-stack/

Re: Ruby website redesigned

#173

I thought it would be interesting to try the showcase examples in Raku (since I am always saying how good Raku's imitation of Ruby is)... - https://glot.io/snippets/he42jpfm27 - https://glot.io/snippets/he42trx6w6 - https://glot.io/snippets/he434b6ryj Obviously Raku leans more to `{}` and `my $var` than Ruby - but otherwise I think it does a credible job. Obviously these are carefully chosen Ruby snippets to highlit…

For fun, I did the same for OCaml:

Ex 1

    let say = "I love OCaml"
    let () = print_endline say

    (* Requires linking in the 'str' library *)
    let say = Str.replace_first (Str.regexp {|\(.*\)love\(.*\)|}) {|\1*love*\2|} say;;
    let () = print_endline (String.uppercase_ascii say)

    let () = ignore |> Seq.init 5 |> Seq.iter (fun () -> print_endline say)
Ex 2

    module StringSet = Set.Make(String)

    let cities = StringSet.of_list [
      "London";
      "Oslo";
      "Paris";
      "Amsterdam";
      "Berlin";
    ]
    let visited = StringSet.of_list ["Berlin"; "Oslo"]

    (* Requires the 'fmt' library *)
    let string_set fmt v = Fmt.Dump.list Fmt.string fmt (StringSet.to_list v)

    let () =
      Format.printf "I still need to visit the following cities: %a\n"
        string_set
        (StringSet.diff cities visited)
Ex 3

  module Greeter : sig
    type t

    val make : string -> t
    val salute : t -> unit
  end = struct
    type t = { name : string }

    let make name = { name = String.uppercase_ascii name }
    let salute t = Format.printf "Hello %s\n" t.name
  end

  let g = Greeter.make "world"
  let () = Greeter.salute g
Obviously, OCaml is a much lower-level language than Ruby or Raku–notably, regex support is not as great, and we have to explicitly tell it how to print values of custom types. Still, I find its lack of syntax sugar makes it easy to read nearly any OCaml code I come across in the wild!

Re: Ruby website redesigned

#174
I find this distasteful:

  cities  = %w[ London
              Oslo
              Paris
              Amsterdam
              Berlin ]
Do it properly with quotes you lazy people :)

EDIT: typical ruby (on rails) code: saves a few characters, breaks readily (Hint: consider "New Orleans")

Re: Ruby website redesigned

#175

Earlier quoted context omitted.

Because as a user, I want to change the light/dark of your site, not every set, and not my OS. If you don't have a toggle, you are making assumptions that aren't accurate.

I am assuming that if the user selected a specific brightness mode, they want sites they visit to respect that theme. Call me crazy but this seems like common sense.

I know some web developers think that that’s true, but looking at the average people I know, they tend to want different settings depending on the site. People don’t generally want computer-wide settings for darkmode.

Re: Ruby website redesigned

#176

Earlier quoted context omitted.

It's a common philosophy for developers with standards of robustness and accessibility to not hard depend on js for things that don't need js to function. > Why the target audience of the ruby, probably primary web developers, whould do that? In my experience, it's mostly web developers who care about this in the first place.

> mostly web developers who care about this in the first place. I’m not sure what you mean by this. We care about our users and how they use our websites. JavaScript is everywhere and has been the de facto frontend standard for the past few years. Supporting no-JS is starting to feel like supporting a new browser. As much as I’d like to, from a business and product point of view, the numbers are just too small for us…

I didn't imply that all web developers care about it, but that most of the people who care about it are web developers. I won't deny that it's still a minority.

Re: Ruby website redesigned

#177
post #127

Earlier quoted context omitted.

"Programmer's best friend" is precisely the wrong thing to do though (it says nothing and only makes the reader confused. Are we talking about a language or a pet? I'm not looking for a friend.). They took a step back with that. For reference this is the old one, which is much better: https://www.ruby-lang.org/images/about/screenshot-ruby-lang-... From: https://www.ruby-lang.org/en/about/website/ The old one was bett…

Dunno, it's a comfy tagline. I never got into Ruby but it always feels to me like it's a really ergonomic and cozy language. Sure, the best friend thing is a stretch, but it's honestly a slogan. How many people land on this page with no knowledge of what Ruby is and will confuse it with an app to make friends?

It sure is a comfy tagline, but because it doesn't really mean anything you could say it about any language, and it only works if you already know what Ruby is. It's not that anyone would confused Ruby with an app to make friends, but it doesn't really say anything about Ruby at all. As other pointed out, the page doesn't even make clear that Ruby is a programming language.

Re: Ruby website redesigned

#178

Earlier quoted context omitted.

I am assuming that if the user selected a specific brightness mode, they want sites they visit to respect that theme. Call me crazy but this seems like common sense.

I know some web developers think that that’s true, but looking at the average people I know, they tend to want different settings depending on the site. People don’t generally want computer-wide settings for darkmode.

This is true, also for people immersed in this world. Sometimes the dark mode of a site is ass, and it's better to set a preference for that site to use light mode to make it more usable.

Re: Ruby website redesigned

#180

Bad branding community wise to quote DHH on the frontpage. Will immediately turn away many. He isn’t worth wasting the reputational loss that comes with printing his words.

I'm outta the loop; what did DHH do or say to invite the wrath of the Kraken?
Post reply on HN