#ruby - 16 July 2018
« Back 1 day Forward 1 day »
[07:40:10] tobiasvl: Radar: hm. hard to say, not sure how it parses "generic" URIs, but I think the RFC actually requires a scheme
[07:42:30] tobiasvl: I don't know the RFC well enough unfortunately, but if you know the scheme, it's probably best to include it if possible
[08:11:23] yuung: a while ago i found this really cool site that had Ruby's source code with annotations on the side describing the code, does anyone know/remember this site?
[10:25:29] gray_-_wolf: hi :) I would like to ask what is recommended to way to print error after rb_protect. I looked into how Vim does it and it uses defines for RUBY_TAG_NONE, RUBY_TAG_RETURN, ... Those are in vm_core.h (and therefore not installed) so Vim just hardcodes the values. Is this the recommended way or should I take different route? Using ruby 2.5.1 and don't care about backward compatibility fwiw
[16:50:27] konsolebox: GTK+ is really a good toolkit. i've coded in it in C, and it's very comfortable to use even in the form of C. it's a consistent library.
[17:01:00] Alec: konsolebox: https://blogs.gnome.org/desrt/2016/06/13/gtk-4-0-is-not-gtk-4/ @ mohsen_1 enjoy - this'll make you want to stab the devs
[17:02:01] Alec: Support that if you can! :P (I use wxWidgets BTW, with a strong case for using it over QT as it's the lesser known one of the two - however as I don't know Ruby (new here, hiya!) I'm not sure if some of it's better features would shine through
[17:02:50] Alec: wxWidgets means "basically native" where as QT fakes it, that is it goes a long way to try and *look* native, but it isn't actually native. They're better now but when I used Windows (circa 7 preview, not since) the scroll bars would be a tiny bit off and such
[17:04:09] Alec: wxWidgets *IS* native - and where it can't be it provides "universals" - so you know the data time picker? One platform (I forget which) is missing this dialog, so wxUniversal has one, so on platforms which *do* have a date picker, it uses that, if absent it falls back on the universal one (and you can *choose* to use the universal one if you like) - I really like this attitude.
[17:05:26] Alec: Last example - apparently on Mac an "okay/cancel" type dialog is like the mirror image of a "conventional" style one with an extra button, there's even a special sizer that recognises buttons using the wx-standard codes for things (eg OKAY, CANCEL, NEW...) and puts the buttons correctly.
[17:06:03] Alec: So you really do get a native look and feel for "basically free" if you read the book to learn how to do it like I did (PDFs found easily)
[17:12:33] Alec: "Each 6 months, the new release (Gtk 4.2, Gtk 4.4, Gtk 4.6) will break API and ABI vs. the release that came before it. These incompatible minor versions will not be fully parallel installable;
[17:43:11] konsolebox: Alec: i've also seen that blog, but that doesn't really worry me about the future Gtk+
[17:43:18] Alec: konsolebox: there's some version of GTK 3 involving 24 but I don't remember what, it was so crazy painful.
[17:44:01] Alec: ACTION gives konsolebox an inclusive sticker - a star with a shiny face - then a pat on the head.
[18:07:23] konsolebox: Alec: last time i coded with wxwidgets was probably 13 years ago using Perl. it's a good "abstract" library. unfortunately it's not actively supported in Ruby. See https://rubygems.org/gems/wxruby/. I'm not sure if someone would ever try to revive it knowing that ruby-gnome2 is actively maintained.
[18:57:34] fredlinhares: Hi. Can someone tell some projects that uses TypedData_Wrap_Struct? I am reading the extension.rdoc but I want to see some examples for understand better how it works.
[19:12:46] konsolebox: TypedData_Wrap_Struct is indeed more complicated than the former, but it seemed necessary for Ruby future improvements
[19:17:12] konsolebox: fredlinhares: my two gems make use of it: https://github.com/konsolebox/digest-xxhash-ruby/blob/master/ext/digest/xxhash/ext.c, and https://github.com/konsolebox/digest-kangarootwelve-ruby/blob/master/ext/digest/kangarootwelve/ext.c
[20:58:00] zenspider: fredlinhares: I use Data_Wrap_Struct in my much older rubyinline gem. I use TypedData_Wrap_Struct in my newer graphics gem