konsolebox

Activity Graph

Page 1 of 16 | Next »

2018-10-20

[09:57:02] konsolebox: has joined #ruby
[10:18:07] konsolebox: Read error: Connection reset by peer

2018-10-19

[09:05:43] konsolebox: has joined #ruby
[14:43:16] konsolebox: Ping timeout: 252 seconds

2018-09-20

[07:52:51] konsolebox: has joined #ruby
[08:04:14] konsolebox: Ping timeout: 252 seconds

2018-08-20

[05:23:24] konsolebox: Read error: Connection reset by peer

2018-08-19

[13:32:38] konsolebox: has joined #ruby
[13:48:03] konsolebox: maybe show your daemon script
[14:42:52] konsolebox: nikivi: i believe { ... },{ ... } is not JSON
[14:43:09] konsolebox: nikivi: [{ ... },{ ... }] is
[14:43:55] konsolebox: nikivi: and if you want to do it right, i suggest pretty_generate-ing them all at once as a single array
[14:48:54] konsolebox: nikivi: if you're combining raw JSON strings, i suggest that you convert them to ruby objects first
[14:52:19] konsolebox: >> a = []; a << JSON.parse('{ "abc": "xyz" }'); a << JSON.parse('{ "xyz": "abc" }'); a.to_json
[14:52:32] konsolebox: >> [JSON.parse('{ "abc": "xyz" }'), JSON.parse('{ "xyz": "abc" }')].to_json
[14:52:53] konsolebox: >> require 'json'; a = []; a << JSON.parse('{ "abc": "xyz" }'); a << JSON.parse('{ "xyz": "abc" }'); a.to_json
[14:53:28] konsolebox: bot still broken?
[14:53:59] konsolebox: anyway you get the concept
[14:56:54] konsolebox: maybe it's no different, but that's one of the ways you can use to avoid print(,)
[14:59:54] konsolebox: nikivi: maybe you can use this hack: "[" + [swapkeys, simkeys, wkey, ekey, rkey, ikey, okey, akey, skey, dkey, fkey, zkey].join(',') + "]"
[15:02:05] konsolebox: nikivi: i believe that's easy to understand
[15:18:04] konsolebox: nikivi: try to understand the code. if you need reference, see https://ruby-doc.com/.

2018-08-16

[15:26:37] konsolebox: has joined #ruby
[17:26:32] konsolebox: Ping timeout: 268 seconds

2018-08-14

[07:09:40] konsolebox: Ping timeout: 256 seconds

2018-08-13

[19:10:29] konsolebox: has joined #ruby

2018-08-04

[05:38:27] konsolebox: has joined #ruby
[07:44:09] konsolebox: Ping timeout: 264 seconds
[18:41:08] konsolebox: has joined #ruby
[19:02:09] konsolebox: Ping timeout: 264 seconds

2018-08-02

[10:30:33] konsolebox: has joined #ruby
[19:22:23] konsolebox: Ping timeout: 244 seconds

2018-08-01

[07:21:27] konsolebox: Ping timeout: 240 seconds

2018-07-31

[15:50:25] konsolebox: has joined #ruby

2018-07-28

[08:22:59] konsolebox: Ping timeout: 268 seconds

2018-07-27

[08:59:15] konsolebox: has joined #ruby
[21:17:45] konsolebox: >> Class Book; end; Object.const_get "Book"

2018-07-26

[00:47:30] konsolebox: Ping timeout: 256 seconds
[14:32:45] konsolebox: has joined #ruby
[22:07:13] konsolebox: siery: it's a little hard to understand what you want to do
[22:08:29] konsolebox: "each second element counting from the second character"?
[23:55:01] konsolebox: Ping timeout: 256 seconds

2018-07-25

[02:27:20] konsolebox: Ping timeout: 256 seconds
[02:30:37] konsolebox: has joined #ruby

2018-07-24

[02:29:11] konsolebox: Ping timeout: 276 seconds
[02:30:46] konsolebox: has joined #ruby

2018-07-22

[02:27:45] konsolebox: Ping timeout: 248 seconds
[02:30:32] konsolebox: has joined #ruby
[13:11:19] konsolebox: Max SendQ exceeded
[13:17:50] konsolebox: has joined #ruby
[22:27:13] konsolebox: has joined #ruby

2018-07-21

[02:27:59] konsolebox: Ping timeout: 276 seconds
[02:30:44] konsolebox: has joined #ruby
[07:25:35] konsolebox: Ping timeout: 240 seconds
[08:49:24] konsolebox: has joined #ruby
[11:45:02] konsolebox: plp_: how is an instance var accessed besides "instances of the class"?
[11:45:57] konsolebox: i'm getting an idea of what you really want, but i'd rather have you clarify it first
[11:46:28] konsolebox: plp_: maybe you need to demonstrate it with a code
[11:47:07] konsolebox: i agree, hence it needs code
[12:28:05] konsolebox: plp_: i think apeiros's suggestion is the best solution you can have. you can't restrict the class's singleton method for itself, and allow the instance to have special access to it.
[22:22:32] konsolebox: yet another one leaving too quickly

2018-07-20

[00:06:58] konsolebox: *.net *.split
[00:15:32] konsolebox: has joined #ruby
[08:00:23] konsolebox: Ping timeout: 276 seconds
[08:48:57] konsolebox: has joined #ruby
[14:14:16] konsolebox: Read error: Connection reset by peer
[14:32:19] konsolebox: has joined #ruby
[16:13:29] konsolebox: gray_-_wolf: you may need to check each child process in your list
[16:41:19] konsolebox: gray_-_wolf: manual says you use waitid, not waitpid
[17:20:40] konsolebox: >> /[[:alnum:]-.]/ # this gives me "getting unmatched range specifier in char-class" in ruby 2.5 rev 61468; [[:alnum:].-] fixes it
[17:21:51] konsolebox: havenwood: yeah there sure are workarounds, but it's not necessary in 2.2 to 2.4.
[17:22:22] konsolebox: i only noticed my script to fail now
[17:25:21] konsolebox: havenwood: maybe
[18:25:19] konsolebox: and now my script gets killed before it kills its child processes
[21:55:26] konsolebox: JJonah: not sure what you mean, but checkout prepend
[22:01:09] konsolebox: JJonah: i see. but i haven't really used refinements sorry. maybe some other people can tell.

2018-07-19

[06:38:44] konsolebox: Ping timeout: 276 seconds
[06:41:45] konsolebox: has joined #ruby
[13:25:25] konsolebox: Max SendQ exceeded
[13:35:23] konsolebox: has joined #ruby
[14:25:20] konsolebox: tycoon177: sure, except when it's a constant factor, hence i ask
[14:48:37] konsolebox: tcurdt: but what happens when the array always end up > N? like when a number is greater than N, or when two adjacent numbers sums up as > N?
[14:48:49] konsolebox: that looks like fun to solve, good luck
[14:49:10] konsolebox: try playing with enums and take_while
[15:11:20] konsolebox: "<tcurdt> elomatreb konsolebox I've updated the gist with an imperative version https://gist.github.com/tcurdt/b32af4abae8ea918f68fb958b31b7b9d'" didn't resolve my questioning
[15:18:22] konsolebox: bottles = [{ id: 1, liters: 4 }, { id: 2, liters: 2 }, { id: 3, liters: 2 }, ... ]; liters_per_bucket = 3
[15:18:45] konsolebox: "what happens when the array always end up > N? like when a number is greater than N, or when two adjacent numbers sums up as > N?"
[15:40:29] konsolebox: also, ruby's integers store dynamically based on endian
[15:41:43] konsolebox: TomyWork: how about using real serialization formats like msgpack
[22:30:10] konsolebox: i hope you're being sarcastic
[22:35:51] konsolebox: al2o3-cr: and now you switch to legitimate sarcasm mode
[23:07:05] konsolebox: i really don't see how that is a security flaw. maybe it is if you allow public_send(:send, user_input_1, etc)
[23:07:19] konsolebox: and the only one to blame is the programmer
[23:08:30] konsolebox: why? you can always use eval anywhere
[23:08:50] konsolebox: allowing user input as an argument to :send is ...
[23:09:28] konsolebox: and i'm talking about unsanitized input at least
[23:10:17] konsolebox: al2o3-cr: what about public_send? why would you allow public_send to send :send anyway?
[23:18:25] konsolebox: regardless of how you use 'send' or any type of :send method, this what you call vulnerability is only effective if you allow allow an unfiltered user-supplied factor to define the method, regardless of the recursion.
[23:20:27] konsolebox: lupine: i'm unable to imagine a case where that can be relevant
[23:21:12] konsolebox: lupine: sure, feel free to give a legitimate example when you do
[23:22:27] konsolebox: i'm 99% sure it would just sum up to bad design of the shared function, or the application itself, because "abstraction"
[23:22:52] konsolebox: "high level abstractionz my friend"

2018-07-18

[06:38:35] konsolebox: Ping timeout: 240 seconds
[06:41:56] konsolebox: has joined #ruby
[13:49:12] konsolebox: anyone knows how to make a gem test itself during `gem install`?
[13:49:57] konsolebox: (still lazy to re-examine rubygems)
[13:53:48] konsolebox: Alec: yes, you know how?
[17:13:33] konsolebox: left too quickly
[18:39:50] konsolebox: Ping timeout: 276 seconds
[18:41:35] konsolebox: has joined #ruby
[23:11:29] konsolebox: zenspider: try #jq

2018-07-17

[06:39:49] konsolebox: Ping timeout: 260 seconds
[06:41:42] konsolebox: has joined #ruby
[15:20:17] konsolebox: catphish: also check serialization formats like msgpack
[15:31:57] konsolebox: rails used to be more active than this channel
[15:41:50] konsolebox: and messagepack still has no bigint/dec support

2018-07-16

[06:38:03] konsolebox: Ping timeout: 244 seconds
[06:41:53] konsolebox: has joined #ruby
[16:45:16] konsolebox: mohsen_1: i'd pick https://ruby-gnome2.osdn.jp/
[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.
[16:50:36] konsolebox: i also like GIO
[17:41:33] konsolebox: Alec: i only coded at Gtk2 with some Gtk3
[17:43:11] konsolebox: Alec: i've also seen that blog, but that doesn't really worry me about the future Gtk+
[17:43:46] konsolebox: Alec: yeah, anyway point is you can create stable software with just Gtk+ 2
[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.
[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
[19:18:07] konsolebox: from what i recall, i only used a very "normal" configuration for it

2018-07-15

[06:38:25] konsolebox: Ping timeout: 248 seconds
[06:41:36] konsolebox: has joined #ruby

2018-07-14

[00:09:46] konsolebox: has joined #ruby
[06:38:29] konsolebox: Ping timeout: 260 seconds
[06:41:50] konsolebox: has joined #ruby

2018-07-13

[06:37:51] konsolebox: Ping timeout: 240 seconds
[06:41:54] konsolebox: has joined #ruby
[11:15:10] konsolebox: to be fair, it's rtfd
[11:45:37] konsolebox: adm_: `ruby dk.rb` means dk.rb is supposed to be in current path, unless you use -S
[11:46:14] konsolebox: adm_: perhaps you need to set up your %PATH% to have C:\Ruby25-x64\bin included
[11:46:33] konsolebox: then execute ruby in the directory where dk.rb exists
[11:46:47] konsolebox: yes, and dk.rb is not there
[11:47:15] konsolebox: of course. why do you even run `ruby dk.rb`?
[11:48:31] konsolebox: running `ruby dk.rb` means you want to execute the script dk.rb. why did you think about using that command?
[11:50:25] konsolebox: it says "ruby <devKitRoot>\dk.rb init"
[11:50:39] konsolebox: did you replace <devKitRoot> with the actual directory of devkit?
[11:50:54] konsolebox: what is the complete command?
[11:51:17] konsolebox: have you manually checked devkit (not the ruby) the directory if dk.rb exists?
[11:52:04] konsolebox: adm_: C:\Ruby25-x64 is not the devkit directory
[11:52:23] konsolebox: you should have seen it when you install devkit
[12:11:56] konsolebox: adm_: read the installer's instructions in the "Select Components" page
[12:14:56] konsolebox: adm_: that "ruby <devKitRoot>\dk.rb init" instruction seems to refer to the old installer "RubyInstaller". RubyInstaller2 seems to do it automatically for the user in the last installer page.
[12:18:58] konsolebox: intuitively no. examine the documentations if you're worried. https://github.com/oneclick/rubyinstaller2
[12:30:11] konsolebox: James123: scan(/^Re:.+?(?=^Re:)|^Re:.*/m)
[12:59:21] konsolebox: Ping timeout: 240 seconds
[16:23:05] konsolebox: has joined #ruby
[16:25:48] konsolebox: has joined #ruby
[19:48:52] konsolebox: dr3w_: puts string.scan(/<script>.*?<\/script>|.+?(?=<script>)|.+/)

2018-07-12

[06:38:57] konsolebox: Ping timeout: 240 seconds
[06:41:39] konsolebox: has joined #ruby
[11:20:50] konsolebox: block argument perhaps
[11:25:17] konsolebox: SunnyLumens: a block is basically treated like a method. the "yielder" internally calls the block. in your example, `each` is the "yielder", and it calls the block method in a loop, with the "msg" passed as an argument to it.
[11:29:10] konsolebox: the next end maybe
[11:55:39] konsolebox: i don't get to really like languages that are compulsive at using spaces over explicit symbols
[11:56:26] konsolebox: yes, i'm also talking about haskell
[13:18:50] konsolebox: vim may not have enough Ruby support

2018-07-11

[06:39:27] konsolebox: Ping timeout: 240 seconds
[06:41:51] konsolebox: has joined #ruby
[18:38:45] konsolebox: Ping timeout: 264 seconds
[18:41:35] konsolebox: has joined #ruby

2018-07-10

[06:39:54] konsolebox: Ping timeout: 244 seconds
[06:41:47] konsolebox: has joined #ruby
[10:09:06] konsolebox: Bish: in some way i agree. #forced
[10:10:21] konsolebox: Bish: but seriously there is eventually a default choice of configuration that has to be made, hence forced configuration is needed sometimes
[17:03:57] konsolebox: Ping timeout: 240 seconds
[17:08:34] konsolebox: has joined #ruby

2018-07-09

[05:36:01] konsolebox: Ping timeout: 248 seconds
[05:39:09] konsolebox: has joined #ruby
[06:39:26] konsolebox: Ping timeout: 244 seconds
[06:51:59] konsolebox: has joined #ruby

2018-07-08

[06:39:03] konsolebox: Ping timeout: 256 seconds
[06:41:50] konsolebox: has joined #ruby
[08:52:00] konsolebox: nice, now everyone suggests ruby-doc.org :)
[08:52:35] konsolebox: i prefer using an offline copy of the documentation that use ri
[08:59:38] konsolebox: i have it bookmarked in the "Refs" folder menu in Bookmarks Toolbar: https://imgur.com/a/rsolsUK
[09:06:06] konsolebox: *than use ri
[09:12:21] konsolebox: apeiros: why "too"? i prefer the html documentation :) yeah i care about ri; i mean i persisted on making the documentation of my gems work for it. and i know it's more updated, especially with documentation of other libraries. but then i still like how easy it is to quickly browse from one class to another in the html docs. it's easy to skim/search for strings.
[09:13:00] konsolebox: yeah i made i a typo there
[14:48:38] konsolebox: Max SendQ exceeded
[14:50:18] konsolebox: has joined #ruby

2018-07-07

[06:40:10] konsolebox: Ping timeout: 256 seconds
[06:41:32] konsolebox: has joined #ruby

2018-07-06

[06:37:53] konsolebox: Ping timeout: 248 seconds
[06:41:48] konsolebox: has joined #ruby
[22:14:38] konsolebox: sotrhraven: you can also write c++

2018-07-05

[09:15:56] konsolebox: Gbardis: ruby --version
[09:30:29] konsolebox: Gbardis: how about the output of `ruby -e 'puts 0.size'`?
[09:31:59] konsolebox: Gbardis: i tried it on a 5G file (size greater than 2^32), and it doesn't show the error
[09:34:01] konsolebox: well that's odd
[09:34:35] konsolebox: Gbardis: the way you execute File.foreach is like this, correct? File.foreach('/path/to/file'){ |line| puts line }
[09:36:01] konsolebox: Gbardis: care to show a snippet of the command?
[09:59:49] konsolebox: Gbardis: that might be build or system-related
[10:04:46] konsolebox: Gbardis: i don't think it really has something to do with versions of Ruby, (i tested it with 2.2 and 2.5). it's probably on how Ruby is configured during its compilation from source, or the features the system or the library provides
[10:06:15] konsolebox: Gbardis: perhaps you can ask your distro on how they built the ruby package, and report the error
[12:47:55] konsolebox: maasha: default setup should include them, unless Debian makes it act differently, or you're trying to include gems installed for a different version of ruby
[12:49:13] konsolebox: maybe a debian image
[12:52:28] konsolebox: or you need to run it as biodsl
[13:00:32] konsolebox: maasha: maybe you can use them: https://unix.stackexchange.com/questions/203376/how-to-set-ruby-gem-home-and-gem-path. just watch out for binary incompatibilities.
[13:01:26] konsolebox: maasha: run `ruby -e 'puts Gem.user_dir'` and see if the output matches your gems directory
[13:05:30] konsolebox: maasha: no, perhaps your version of ruby is different like i said
[13:07:19] konsolebox: maasha: it's really hacky to reuse gems that were built from a different system because of possible incompatibility with the system or the installed ruby
[13:08:59] konsolebox: why not just work on top of alpine
[13:25:22] konsolebox: maasha: you can try building the gems on a temporary image with build-essentials package. you then transfer the .gem directory to the real image. it may work if the built gems end up not requiring runtime dependencies from the build-essentials package. it's a risk that's up to you to take.
[13:28:33] konsolebox: maasha: a Gentoo-based distro or image is very ideal for your target, but unfortunately you want Debian
[13:29:26] konsolebox: stability is very relative in my opinion
[15:23:34] konsolebox: AndroidKitKat: i highly recommend you install and use `pry`
[15:25:20] konsolebox: AndroidKitKat: it's like a shell so you can try execute simple Ruby syntax
[15:28:58] konsolebox: AndroidKitKat: like pyshell maybe
[15:31:02] konsolebox: AndroidKitKat: are you using and installer from here? https://rubyinstaller.org/downloads/. i suggest you install one with devkit, and if you're using a 64-bit windows, install the 64bit one. e.g. https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.1-2/rubyinstaller-devkit-2.5.1-2-x64.exe
[15:32:33] konsolebox: you would have less problems installing gems
[15:33:01] konsolebox: AndroidKitKat: i suggest this as a reference for Ruby's modules and classes: https://ruby-doc.org/core-2.5.1/
[15:40:14] konsolebox: mattb20: i haven't coded in rspec yet. i only used minitest. can you make it more complete so i can run it here as well? i'm not sure how to set it up, like what 'require' line to add for rspec stuff.
[15:42:36] konsolebox: mattb20: basically the idea to find the problem is to verify what type of objects those variables contain. e.g. you place `puts "bank.class: #{bank.class}"; puts "bank.transaction_history: #{bank.transaction_history}"; bank.transaction_history.each do |transaction| puts "transaction: #{transaction}"; puts transaction.join( ' || '); end
[16:11:28] konsolebox: mattb20: you seem to have gone offline. i can't test it: `require': cannot load such file -- printer (LoadError)
[16:13:29] konsolebox: mattb20: like this? https://bpaste.net/show/bfd3b364c16c
[16:17:52] konsolebox: if you think it should completely work, maybe the problem is in the describe stuff
[16:19:24] konsolebox: and i'd also debug that part if i were you
[16:35:08] konsolebox: "add one to the current value"
[16:35:36] konsolebox: >> h = {}; h[:rate] = 0; h[:rate] += 1; h[:rate]
[16:39:48] konsolebox: AndroidKitKat: he's referring to books.values
[16:40:34] konsolebox: AndroidKitKat: the hash has unique keys, so "finding all the values with a given name" doesn't apply there
[17:17:31] konsolebox: AndroidKitKat: personally no if it feels like i'm executing a command, but no otherwise, especially when it's returning values.
[17:17:53] konsolebox: AndroidKitKat: (i was talking about methods)
[17:18:26] konsolebox: AndroidKitKat: sorry, i mean personally yes ...
[17:18:33] konsolebox: got confused with the negation there
[18:33:47] konsolebox: cthulchu: i don't think that's easy. you can hack the source code of minitest maybe