Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

According to Stack Overflow as of this year, #Ruby is *3 times* more popular than Zig

Uncategorized
5 2 28

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    2 Posts
    15 Views
    @codeDude sorry I just woke up and I may be saying something stupid, but don't you need to wait/join on that thread to make sure its block is executed?
  • 0 Votes
    2 Posts
    9 Views
    @denny I think it's the misleading ||= asval ||= x should desugar toval || val = xsoval || val = false if foo # foo neededvsval || val = (false if foo) # foo unneeded
  • Hi everyone,

    Uncategorized ruby
    1
    0 Votes
    1 Posts
    4 Views
    Hi everyone,I'd like to share and announce the release of llm.rb v2.1.0.The source is available at https://github.com/llmrb/llm.rb > What is llm.rb?llm.rb is a zero-dependency Ruby toolkit for Large Language Models thatincludes OpenAI, Gemini, Anthropic, xAI (Grok), zAI, DeepSeek, Ollama,and LlamaCpp. The toolkit includes full support for chat, streaming,tool calling, audio, images, files, and structured outputs. > ExampleA simple chatbot that maintains a conversation and streams responses inreal-time:#!/usr/bin/env rubyrequire "llm"llm = LLM.openai(key: ENV["KEY"])bot = LLM::Bot.new(llm, stream: $stdout)loop do print "> " bot.chat(gets) print "\n"end#ruby
  • 0 Votes
    1 Posts
    7 Views
    so, #Day2 of #AdventOfCode with #rust and #ruby.Brute force, but in ruby it feels more natural for me to create a bunch of arrays, in rust it seemed easier to fiddle with array indexes. I wonder if I could use some "zero cost" slices?I'm pretty sure I could do both things the same way tho. Also my first rust tests! I'm not sure what the naming convention is supposed to be, the rust book doesn't make it clear imo.https://gist.github.com/riffraff/0aae02aeaa3af9e0320b8d944ab78e2d