#ruby - 17 February 2019
« Back 1 day Forward 1 day »
[09:51:50] phaul: What is the name of the element that is used to define what an object looks like after it is created?
[10:13:31] hightower2: Hey how do I run a regex match and return result in one go? Like var = 'value'.match '(regex)'
[19:12:24] Nexos: I installed ruby 2.5.3-1 (x64) on windows with ruby+devkit, but when I launch irb, as soon as I try to enter a non-ascii (say é), it doesn't work anymore (any further input is not shown, Enter works)
[19:12:25] Nexos: Any idea why? (win10, console is in UTF-8 with chcp 65001 ; setting LANG variable to xx_YY.UTF-8 doesn't help)
[20:16:31] hansol: Could not find generator 'active_admin:install'. Maybe you meant 'active_record:model', 'active_record:migration' or 'test_unit:system'
[20:48:44] hansol: rb:235:in `allowed_in_path': The git source https://github.com/activeadmin.git is not yet checked out. Please run `bundle install` before trying to start your application (Bundler::GitError)
[21:02:16] hansol: i run bundle install, but its loading old Gemfile not new changed what must i do to reload Gemfile.lock ?
[23:16:15] dmwit: I'd like to represent infinite streams, and have a way for multiple consumers to cleanly iterate over them independently. I've got something working, but the approach I took feels like I'm forcing my Python-based thoughts into Ruby (it uses iterators).
[23:16:22] ruby[bot]: dmwit: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[23:17:12] dmwit: Okay, a small example is also here: https://gist.github.com/dmwit/6e4af9138bd96729d4b746a127aa21f6
[23:48:02] dmwit: Hm. It doesn't seem like you can "restart" an Enumerator, though, which my Stream+Iterator can do.
[23:49:16] dmwit: You're not proposing replacing both, just Iterator, and so Stream.iterator (which I guess now that I understand the suggestion I should call Stream.each) would return an Enumerator.
[23:50:26] phaul: hm. I haven't got that far :) I was just observing and pointing out similarities between your stuff and stuff that's there :D
[23:52:17] phaul: but since you mentioned "infinite streams" I immediately thought of Enumerators and lazyness. because they use fibers internally, and without those you can't afaik replicate lazy behaviour. the infinite loop with strict evaluation will be infinite
[23:55:00] dmwit: Ah well, you can always get lazy behavior with some pain by exploiting the fact that you don't evaluate a function's body when evaluating the function itself (only when calling it).