Pseudoclasses via ruby-fiddle?
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
Comece revisando os bindings FFI de libui referenciados em lib/libui/ffi.rb e os exemplos de ruby-libui; depois, inspecione como o Fiddle atualmente expõe chamadas nativas e falhas. Defina um escopo concreto para uma pseudoclasse e para o suporte à depuração, incluindo como os usuários identificariam a chamada com defeito ou uma falha relacionada a GC; o trabalho estará concluído quando houver um design acordado ou uma proposta implementável e testável.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Hello fiddle-folks,
fiddle is quite epic. kojix2 wrote the bindings (if you can call them) for libui - see here for
most of the try_extern calls:
https://github.com/kojix2/LibUI/blob/main/lib/libui/ffi.rb
As a "downstream" user, though, fiddle is not easy to use. Often I just get segfaults and
then I end up not understanding why. I can figure out indirectly to some extent and with
helpful comments (e. g. GC kicking in), but by and large I'd love if ruby-fiddle would have
more debug-friendly support - similar to did-you-mean gem or the recent debug-related
changes by mame in MRI ruby.
Having worked with ruby-gtk a lot I am kind of used to modify core widgets such as
Gtk::Windows or Gtk::Box (horizontal and vertical). I like simple APIs such as .add()
or << just to add widgets together, a bit like LEGO building blocks.
With fiddle, though, this is a bit complicated. So the core question for this issue is
whether fiddle could allow for "designated" pseudoclasses? I'd love to build up
classes that can simulate the Gtk widgets to some extent (at the least what libui
allows for; see also libui-ng that has been recently started).
Something where I can build "pseudoclasses" and then at the least the error
messages can be more helpful. Rather than a segfault as such, something
that allows us to investigate which line is faulty or why it crashed (e. g. GC
kicking in). kojix2 showed various work arounds (see the examples he provides
for ruby-libui) but this requires some more expert knowledge than many ruby
developers have. For instance I do not really know C. And while I should really
have learned C properly, ruby is simply more fun to work with! :D
I do not know how easy it would be to have something like pseudoclasses
work, and better error/debug support for fiddle. It's ok if the downstream
dev has to write more code to enable this - I am not really suggesting an
"autofixer" that solves all problems as-is. But something with better debug-support
and to use fiddle in a more ruby-way, including a traditional OOP-like hierarchy.
Getting random SEGFAULTS and not really knowing why can be frustrating.
Other than that fiddle is pretty cool. (ruby-gtk via gobject-introspection also
has this problem partially by the way - the error messages I get are often
not super-useful.)
- Linguagem predominante
- Ruby
- Estrelas
- 195
- Forks
- 53
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ruby/fiddle
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 45/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 52/100
Todas as issues de ruby/fiddle
Issues semelhantes
-
kotlin-lsp is missingAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
JetBrains/homebrew-utils#21 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ublue-os/homebrew-experimental-tap#774 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
r-uby-dev/llm#251 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
accessibility
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
slovensko-digital/ops-portal#212 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100