« Back to channel list

#ruby - 03 July 2018

« Back 1 day Forward 1 day »
[00:00:41] mynameisdebian: a for loop is also a built-in
[00:00:54] havenwood: mynameisdebian: headlessCamels aren't a thing in Ruby, use snake_case for variables.
[00:01:20] caleBOT: has joined #ruby
[00:01:27] mynameisdebian: ok, I'll test that and see if it fixes my problem
[00:01:40] havenwood: >> method(:loop).owner # mynameisdebian
[00:01:41] ruby[bot]: havenwood: # => Kernel (https://eval.in/1030633)
[00:02:12] havenwood: mynameisdebian: If you write idiomatic code, it'll be *way* easier for us to read and spot errors.
[00:02:28] havenwood: mynameisdebian: Write code for the reader.
[00:02:52] baweaver: that and for loops put you in the completely wrong mindframe
[00:03:23] mynameisdebian: okay, I'll fix my for loops
[00:03:25] baweaver: You'd start doing things like: arr2 = []; for x in y; arr2.push(x * 2) end
[00:03:47] baweaver: when in Ruby this makes more sense: ys.map { |x| x * 2 }
[00:03:47] havenwood: mynameisdebian: I think if you solve the threshold problems you'll find and resolve your error, and have code that you and others can read! If you bear with us on incremental improvement we can probably quickly hone in on the issue.
[00:04:07] baweaver: also makes it easier to abstract portions of transformations
[00:04:46] mynameisdebian: Okay, I'll try. Let me consider the recommendations suggested above and try to refactor my code, and I'll come back and ask the question again.
[00:04:55] havenwood: mynameisdebian: Sounds good!
[00:07:06] eckhardt_: has joined #ruby
[00:07:43] bradleyprice: has joined #ruby
[00:08:05] ramfjord: has joined #ruby
[00:14:53] cagomez: has joined #ruby
[00:23:10] ohcibi: has joined #ruby
[00:23:12] mupt: has joined #ruby
[00:23:55] roamingdog: has joined #ruby
[00:24:04] TvL2386: has joined #ruby
[00:24:40] roamingdog: has joined #ruby
[00:25:30] roamingdog: has joined #ruby
[00:26:18] roamingdog: has joined #ruby
[00:29:48] rshetty: has joined #ruby
[00:30:11] mynameisdebian: I have this code/output: https://gist.github.com/rrdein/7fc0d1bdee60308036c98af00eed7686 . On line 33 it prints some variables. You can see that when i goes from 0 to 1 that cidrs[0][1] (the fourth column) continues to change in the output, even though the value of i should never again be 0 to change cidrs[0][1] on line 30 (cidrs[i][1] += 1). I have commented out line 30 and confirmed that it is the onl
[00:30:11] mynameisdebian: y line changing this value. Can anyone see the error in my code?
[00:32:16] duderonomy: has joined #ruby
[00:32:36] myndzi: has left #ruby: ()
[00:32:53] ciscam: has joined #ruby
[00:33:44] taylorzr: has joined #ruby
[00:35:14] mynameisdebian: baweaver: can you explain?
[00:35:27] baweaver: Array.new(cidr_list_length, [nil, -1, -1])
[00:35:38] baweaver: If you initialize with a default value, it literally passes that value
[00:35:50] baweaver: in other words, that same array gets passed to everything
[00:36:09] baweaver: You probably want: Array.new(cidr_list_length) { [nil, -1, -1] }
[00:36:29] baweaver: which calls a function to generate each individual "counter" instead of passing the same one.
[00:36:46] baweaver: Now then, as to the nature of the code itself... one sec, reading.
[00:37:15] havenwood: mynameisdebian: Said another way, when you pass the default value as a second argument, it's that *same* object for each element of the Array. When you pass the default value as a block, the evaluated block value is distinct for each element of the Array.
[00:37:19] mynameisdebian: baweaver: you mean that it becomes pass by reference?
[00:37:39] mynameisdebian: havenwood: same question I think
[00:37:47] r29v: has joined #ruby
[00:38:09] mynameisdebian: I guess you already answered that, both of you
[00:38:10] havenwood: >> a = Array.new(3, ''); a.first << 'mynameisdebian'; a
[00:38:11] ruby[bot]: havenwood: # => ["mynameisdebian", "mynameisdebian", "mynameisdebian"] (https://eval.in/1030634)
[00:38:27] havenwood: >> a = Array.new(3) { '' }; a.first << 'mynameisdebian'; a
[00:38:28] ruby[bot]: havenwood: # => ["mynameisdebian", "", ""] (https://eval.in/1030635)
[00:39:12] havenwood: mynameisdebian: Above ^, you'll see the former is one string three times, and the latter is three strings, once each.
[00:39:30] mynameisdebian: Ah, give me a minute to process that plz
[00:41:06] lavamind: havenwood: I fixed my problem by installing the upstream vagrant Debian package, instead of the distribution one
[00:41:33] havenwood: lavamind: ah, nice
[00:41:34] lavamind: it seems the distribution package does a gem-type install, which messes up the bundle components
[00:41:43] havenwood: ooooh - didn't think of that
[00:41:55] lavamind: well, more like confuses
[00:42:17] havenwood: i stick to the gem install variants
[00:42:57] havenwood: i like to install my rubies with the package manager and my gems with ruby
[00:43:06] mynameisdebian: havenwood: I must confess I'm not totally familiar with the syntax on that eval.in, but I'll try to research Array.new a little bit more. I'm going to try the solution you and baweaver posted
[00:43:18] lavamind: the thing is with vagrant is it used to be gem-based but isn't anymore
[00:43:29] ramfjord: has joined #ruby
[00:43:29] havenwood: lavamind: what is it these days?
[00:43:42] lavamind: so if you install the "vagrant" gem it just puts in some kind of placeholder with a message
[00:44:20] jabowa: has joined #ruby
[00:44:32] lavamind: havenwood: "Vagrant 1.0.x had the option to be installed as a RubyGem. This installation method is no longer supported. "
[00:44:36] Zarthus: i was unaware vagrant was a gem ever at all ;D
[00:44:55] Zarthus: Though in the time I used vagrant I never even used ruby
[00:45:11] lavamind: https://www.vagrantup.com/docs/installation/
[00:45:20] lavamind: grrr "Beware of system package managers! "
[00:48:16] jabowa: Is there a way to log *args with key/value name? https://repl.it/repls/SturdyGoldNumerators
[00:49:13] mynameisdebian: baweaver: THANK YOU
[00:49:17] mynameisdebian: havenwood: THANK YOU
[00:49:47] rshetty: has joined #ruby
[00:50:22] Zarthus: jabowa: I very much doubt it.
[00:50:47] Zarthus: jabowa: sounds like you just want to pass a hash in the log function to be done with it
[00:51:17] banisterfiend: has joined #ruby
[00:51:39] nibbo: has joined #ruby
[00:52:39] jabowa: Zarthus: puts a, puts b, puts c, puts d vs. log(a,b,c,d)
[00:53:12] Zarthus: I meant like log({a: 'first', b: 'second', c: 'third', d: 'fourth'})
[00:55:03] Nicmavr: has joined #ruby
[00:55:19] baweaver: havenwood: I kinda want to do bidirectional dependencies in an FP manner now
[00:56:51] nibbo: has joined #ruby
[00:57:52] baweaver: havenwood / mynameisdebian: https://gist.github.com/rrdein/7fc0d1bdee60308036c98af00eed7686#gistcomment-2636300
[00:57:56] baweaver: playing around with that idea
[00:58:03] baweaver: not sure if it'll work or not though.
[00:58:09] baweaver: I'd have to see a sample file to know.
[00:58:51] mynameisdebian: baweaver: I'll look into it more. I wish I could provide more code and a sample file but it's not possible in this case
[00:59:00] mynameisdebian: baweaver: appreciate the code
[00:59:19] baweaver: could also probably have done: cidr_block.zip(cidr_block).reduce ...
[00:59:25] baweaver: but that gets tweaky fast.
[00:59:38] havenwood: baweaver nice
[00:59:51] havenwood: baweaver: ARGF.read would probably be nice too
[01:00:03] baweaver: Always forget that one.
[01:00:43] bga57: has joined #ruby
[01:11:06] gizmore|2: has joined #ruby
[01:11:13] cadillac_: has joined #ruby
[01:20:42] graphene: has joined #ruby
[01:26:00] apparition: has joined #ruby
[01:26:01] archedice: has joined #ruby
[01:27:38] karapetyan: has joined #ruby
[01:28:05] CrazyEddy: has joined #ruby
[01:31:41] graphene: has joined #ruby
[01:36:36] bradleyprice: has joined #ruby
[01:41:13] mynameisdebian: If I have an array of Nokogiri Nodes (node_array) and a Nokogiri XML document (xml_doc), how can I replace the nodes located in xml_doc at XPath "//dict//array//string" with the XML nodes in node_array?
[01:50:43] ramfjord: has joined #ruby
[01:51:19] roamingdog: has joined #ruby
[01:56:22] bradleyp_: has joined #ruby
[01:56:39] ramfjord: has joined #ruby
[02:00:35] Ragso: has joined #ruby
[02:02:37] Ragso: Im a newbie on rails, can anyone possibly help me out with something that im stuck at?
[02:06:14] graphene: has joined #ruby
[02:15:08] pauliesaint: has joined #ruby
[02:19:27] rshetty: has joined #ruby
[02:20:02] StarSeed0000: has joined #ruby
[02:22:36] pauliesaint: has joined #ruby
[02:24:11] pauliesaint: has joined #ruby
[02:24:15] motstgo: has joined #ruby
[02:30:35] jinie: has joined #ruby
[02:31:14] nicht: has joined #ruby
[02:39:58] cschneid: has joined #ruby
[02:40:46] rshetty: has joined #ruby
[02:41:21] emerson: has joined #ruby
[02:41:31] DeepIO_: has joined #ruby
[02:42:12] DeepIO_: has joined #ruby
[02:46:24] graphene: has joined #ruby
[02:51:00] Radar: ?rubyonrails Ragso
[02:51:00] ruby[bot]: Ragso: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[02:56:30] AlHafoudh: has joined #ruby
[02:58:14] cschneid: has joined #ruby
[03:00:16] cadillac_: has joined #ruby
[03:00:25] aupadhye: has joined #ruby
[03:07:10] kvda: has joined #ruby
[03:09:51] braincrash: has joined #ruby
[03:10:26] redlegion: has joined #ruby
[03:10:44] shinnya: has joined #ruby
[03:10:55] redlegion: has joined #ruby
[03:11:30] redlegion: has joined #ruby
[03:12:00] redlegion: has joined #ruby
[03:12:26] redlegion: has joined #ruby
[03:13:14] redlegion: has joined #ruby
[03:13:45] redlegion: has joined #ruby
[03:14:24] redlegion: has joined #ruby
[03:14:51] redlegion: has joined #ruby
[03:15:14] tdy: has joined #ruby
[03:15:15] redlegion: has joined #ruby
[03:15:43] redlegion: has joined #ruby
[03:16:07] redlegion: has joined #ruby
[03:16:30] redlegion: has joined #ruby
[03:16:53] redlegion: has joined #ruby
[03:17:22] redlegion: has joined #ruby
[03:18:09] redlegion: has joined #ruby
[03:18:33] redlegion: has joined #ruby
[03:18:58] redlegion: has joined #ruby
[03:19:25] redlegion: has joined #ruby
[03:19:50] redlegion: has joined #ruby
[03:20:12] redlegion: has joined #ruby
[03:20:38] redlegion: has joined #ruby
[03:21:10] redlegion: has joined #ruby
[03:21:31] caleBOT_: has joined #ruby
[03:21:37] redlegion: has joined #ruby
[03:22:02] redlegion: has joined #ruby
[03:22:27] redlegion: has joined #ruby
[03:22:51] baweaver: !connection redlegion
[03:22:51] ruby[bot]: +bb redlegion!*@*$#ruby-fix-your-connection *!*@gateway/tor-sasl/redlegion$#ruby-fix-your-connection
[03:26:03] eckhardt_: has joined #ruby
[03:30:32] karapetyan: has joined #ruby
[03:30:56] konsolebox: has joined #ruby
[03:36:59] AlHafoudh: has joined #ruby
[03:37:45] apparition: has joined #ruby
[03:44:58] gix-: has joined #ruby
[03:52:04] jenrzzz: has joined #ruby
[03:52:05] jenrzzz: has joined #ruby
[03:52:13] taylorzr: has joined #ruby
[04:02:17] rshetty: has joined #ruby
[04:06:27] caleBOT_: has joined #ruby
[04:09:52] xuyuheng: has joined #ruby
[04:14:00] rshetty: has joined #ruby
[04:22:40] pauliesaint: has left #ruby: ()
[04:28:33] rshetty: has joined #ruby
[04:29:27] dreamthese: has joined #ruby
[04:31:27] caleBOT: has joined #ruby
[04:38:31] ciscam: has joined #ruby
[04:39:21] Jushy: has joined #ruby
[04:44:31] kvda: has joined #ruby
[04:49:53] reber: has joined #ruby
[04:57:34] pauliesaint: has joined #ruby
[05:04:51] banisterfiend: has joined #ruby
[05:16:34] anisha: has joined #ruby
[05:19:31] Hanmac: has joined #ruby
[05:22:14] aufi: has joined #ruby
[05:27:01] AlHafoudh: has joined #ruby
[05:27:34] foxxx0: has joined #ruby
[05:28:01] ohcibi: has joined #ruby
[05:31:10] giraffe: has joined #ruby
[05:31:36] rshetty: has joined #ruby
[05:31:53] karapetyan: has joined #ruby
[05:32:10] tpendragon: has joined #ruby
[05:33:22] hph^: has joined #ruby
[05:34:05] vondruch: has joined #ruby
[05:35:35] schleppel: has joined #ruby
[05:40:07] ramfjord: has joined #ruby
[05:46:19] caleBOT: has joined #ruby
[05:49:32] dionysus70: has joined #ruby
[05:50:05] za1b1tsu: has joined #ruby
[05:52:13] pauliesaint: has joined #ruby
[05:53:02] jenrzzz: has joined #ruby
[05:53:02] jenrzzz: has joined #ruby
[05:55:19] RougeR: has joined #ruby
[05:55:20] RougeR: has joined #ruby
[05:59:38] _rshetty_: has joined #ruby
[06:04:54] SeepingN: has joined #ruby
[06:08:40] amar: has joined #ruby
[06:14:46] Tempesta: has joined #ruby
[06:18:32] alem0lars: has joined #ruby
[06:22:40] kapil___: has joined #ruby
[06:22:51] pauliesaint: has joined #ruby
[06:23:51] conta: has joined #ruby
[06:26:01] DTZUZO: has joined #ruby
[06:31:44] alex``: has joined #ruby
[06:41:30] konsolebox: has joined #ruby
[06:43:57] eckhardt_: has joined #ruby
[06:44:12] jenrzzz: has joined #ruby
[06:44:15] jenrzzz: has joined #ruby
[06:48:20] crankharder: has joined #ruby
[06:52:08] feelx-: has joined #ruby
[06:54:19] konos5__: has joined #ruby
[06:59:20] tdy: has joined #ruby
[07:04:37] j416: has joined #ruby
[07:05:53] amelliaa: has joined #ruby
[07:09:51] sysvalve: has joined #ruby
[07:11:41] aufi: has joined #ruby
[07:15:54] TomyWork: has joined #ruby
[07:19:08] j416: has joined #ruby
[07:19:23] claudiuinberlin: has joined #ruby
[07:21:42] clemens3: has joined #ruby
[07:21:46] andikr: has joined #ruby
[07:22:29] karapetyan: has joined #ruby
[07:28:57] faces: has joined #ruby
[07:31:36] dionysus69: has joined #ruby
[07:40:11] ramfjord: has joined #ruby
[07:44:39] yohji: has joined #ruby
[07:46:40] jhass: has joined #ruby
[07:49:12] roamingdog: has joined #ruby
[07:49:20] dionysus69: has joined #ruby
[07:50:02] roamingdog: has joined #ruby
[07:50:28] caleBOT: has joined #ruby
[07:50:52] roamingdog: has joined #ruby
[07:51:37] roamingdog: has joined #ruby
[07:52:07] burgestrand: has joined #ruby
[07:53:23] apeiros: konos5: yes
[07:53:31] ellcs: has joined #ruby
[07:55:02] pauliesaint: has joined #ruby
[07:55:28] Guest97195: has joined #ruby
[07:55:49] konos5: Hi, thanks for the prompt response
[07:56:17] konos5: I have a ruby class diagram here
[07:56:36] konos5: https://www.dropbox.com/s/rmcdzjgb9c4ljsw/ruby-eigenclass-diagram-edit.png?dl=0
[07:56:47] konos5: which I got from this channel
[07:57:15] konos5: and if I remember correctly it was you that you had quoted it...
[07:57:45] konos5: and now I have a question about this exact diagram which probably you can answer... so here it goes:
[07:58:13] konos5: The ruby eigenclass diagram suggests that `BasicObject.singleton_class.singleton_class.superclass` is `Class`
[07:58:53] konos5: However using a ruby interpreter (v2.5.1) I found out that it's `#Class` and not just `Class`. Which one is true?
[08:02:09] apeiros: that diagram might be from dminuoso or baweaver. it's not mine :)
[08:03:55] apeiros: that's the original diagram or edited by you?
[08:05:15] apeiros: not quite sure how to read that diagram. I think it refers to the fields in C (klass & super).
[08:05:55] AlHafoudh: has joined #ruby
[08:06:47] konos5: that's right
[08:07:16] konos5: dminuoso definitely rings a bell...
[08:07:25] konos5: could be him...
[08:07:55] konos5: it's slightly edited just to point out my question but that's it...
[08:08:33] konos5: the diagram is a bit intimidating at first but let me tell you it's really easy and totally makes sense...
[08:08:46] konos5: apart from the bit I asked about above...
[08:09:03] konos5: anyway, how can I reach dminuoso?
[08:09:06] konos5: anyway, how can I reach @dminuoso?
[08:09:19] apeiros: no @ needed in irc ;-)
[08:09:27] apeiros: he's usually around, no idea where he's today.
[08:10:03] konos5: right... I'll try again later this evening...
[08:10:12] konos5: thnx anyway
[08:10:47] apeiros: I assume the difference is exactly because C vs. ruby is not a 1:1 match
[08:11:07] apeiros: around the object root, ruby cheats a bit
[08:11:24] apeiros: I'm fuzzy about the details, though. been ages when I looked at that.
[08:13:17] foxxx0_: has joined #ruby
[08:15:53] shenghi: has joined #ruby
[08:16:26] halbbalda: has joined #ruby
[08:20:09] pauliesaint_: has joined #ruby
[08:22:20] foxxx0: has joined #ruby
[08:23:00] Alina-malina: has joined #ruby
[08:25:05] pauliesaint: has joined #ruby
[08:25:27] biberu: has joined #ruby
[08:28:52] rafadc: has joined #ruby
[08:29:31] foxxx0_: has joined #ruby
[08:30:10] rshetty: has joined #ruby
[08:32:08] Crack: has joined #ruby
[08:32:11] Crack: has left #ruby: ()
[08:32:29] Crack: has joined #ruby
[08:38:28] ohcibi: has joined #ruby
[08:40:16] nowhere_man: has joined #ruby
[08:46:50] InfinityFye: has joined #ruby
[08:48:09] InfinityFye: has left #ruby: ()
[08:49:27] ellcs: has joined #ruby
[08:49:53] aufi_: has joined #ruby
[08:50:29] dionysus69: has joined #ruby
[08:51:11] Beams: has joined #ruby
[08:53:34] nowhere_man: has joined #ruby
[08:55:31] foxxx0_: has joined #ruby
[08:59:21] karapetyan: has joined #ruby
[09:00:03] rafadc_: has joined #ruby
[09:01:14] Mike11: has joined #ruby
[09:04:11] rshetty: has joined #ruby
[09:06:51] tff^: has joined #ruby
[09:13:35] caleBOT: has joined #ruby
[09:27:02] pauliesaint: has joined #ruby
[09:33:26] foxxx0_: has joined #ruby
[09:40:10] ramfjord: has joined #ruby
[09:43:10] pwnd_nsfw: has joined #ruby
[09:43:50] quobo: has joined #ruby
[09:50:49] conta: has joined #ruby
[09:57:11] _whitelogger: has joined #ruby
[09:57:58] howdoi: has joined #ruby
[10:00:58] pauliesaint_: has joined #ruby
[10:02:30] TinkerT: has joined #ruby
[10:07:04] aufi: has joined #ruby
[10:17:32] tvw: has joined #ruby
[10:20:30] AlHafoudh: has joined #ruby
[10:21:46] ohcibi: has joined #ruby
[10:22:04] foxxx0_: has joined #ruby
[10:22:18] GodFather: has joined #ruby
[10:24:41] drale2k_: has joined #ruby
[10:28:29] kapil___: has joined #ruby
[10:30:12] guille-moe: has joined #ruby
[10:31:11] amar_: has joined #ruby
[10:32:16] ciscam: has joined #ruby
[10:32:19] psychicist__: has joined #ruby
[10:38:49] emerson: has joined #ruby
[10:41:32] xuyuheng: has joined #ruby
[10:41:59] karapetyan: has joined #ruby
[10:42:15] Crack: has joined #ruby
[11:02:56] DeepIO_: has left #ruby: ("No boundaries on the net!")
[11:03:56] emerson: has joined #ruby
[11:11:36] nowhere_man: has joined #ruby
[11:12:13] mikecmpbll: has joined #ruby
[11:13:25] conta: has joined #ruby
[11:14:32] lunarkitty7: has joined #ruby
[11:15:14] alex``: has joined #ruby
[11:15:18] AJA4350: has joined #ruby
[11:15:46] foxxx0_: has joined #ruby
[11:16:04] cagomez: has joined #ruby
[11:20:32] shinnya: has joined #ruby
[11:26:53] saTchymoto: has joined #ruby
[11:29:23] saTchymoto: has joined #ruby
[11:30:58] VladGh: has joined #ruby
[11:34:43] Nicmavr: has joined #ruby
[11:35:48] ciscam: has joined #ruby
[11:37:12] ablackack: has joined #ruby
[11:39:22] drale2k_: has joined #ruby
[11:41:37] DEac-: has joined #ruby
[11:42:36] rshetty: has joined #ruby
[11:42:36] AlHafoudh: has joined #ruby
[11:42:40] S007: has joined #ruby
[11:42:46] rshetty: has joined #ruby
[11:43:00] desperek: has joined #ruby
[11:43:33] aufi: has joined #ruby
[11:46:06] nowhere_man: has joined #ruby
[11:46:41] ellcs: has joined #ruby
[11:47:16] ldnunes: has joined #ruby
[11:48:05] burgestrand: has joined #ruby
[11:50:45] saTchymoto: has joined #ruby
[11:56:04] hfp_work: has joined #ruby
[11:56:09] Zarthus: has joined #ruby
[11:56:21] elomatreb: has joined #ruby
[11:58:00] Crack: has joined #ruby
[12:00:38] conta: has joined #ruby
[12:02:10] Alina-malina: has joined #ruby
[12:03:39] suukim: has joined #ruby
[12:05:44] bathtub_shark: has joined #ruby
[12:06:03] roamingdog: has joined #ruby
[12:06:16] Puffball: has joined #ruby
[12:11:05] banisterfiend: has joined #ruby
[12:14:25] conta: has joined #ruby
[12:20:21] apparition: has joined #ruby
[12:26:25] conta: has joined #ruby
[12:26:49] BloopMonster: has joined #ruby
[12:32:21] graphene: has joined #ruby
[12:37:14] mzo: has joined #ruby
[12:37:51] ellcs: has joined #ruby
[12:42:07] dviola: has joined #ruby
[12:42:09] Crack: has joined #ruby
[12:42:35] jinie: has joined #ruby
[12:42:45] lypsis: has joined #ruby
[12:42:55] deadnull: has joined #ruby
[12:45:44] DTZUZO: has joined #ruby
[12:45:57] Megamos: has joined #ruby
[12:52:44] lypsis: has joined #ruby
[12:54:19] havenwood: >> BasicObject.singleton_class.singleton_class.superclass.superclass.superclass.superclass.superclass
[12:54:20] ruby[bot]: havenwood: # => Class (https://eval.in/1030955)
[12:58:37] rshetty: has joined #ruby
[13:01:54] conta: has joined #ruby
[13:04:09] hfp_work: has joined #ruby
[13:05:53] mjolnird: has joined #ruby
[13:06:37] rdsm: has joined #ruby
[13:11:11] cadillac_: has joined #ruby
[13:15:04] pauliesaint: has joined #ruby
[13:15:21] wilbert_: has joined #ruby
[13:15:31] karapetyan: has joined #ruby
[13:15:44] dionysus69: has joined #ruby
[13:16:52] caleBOT_: has joined #ruby
[13:18:39] mupt: has joined #ruby
[13:21:10] burgestrand: has joined #ruby
[13:21:34] nowhere_man: has joined #ruby
[13:26:21] pauliesaint: has joined #ruby
[13:26:25] Crack: has joined #ruby
[13:30:44] graphene: has joined #ruby
[13:39:53] ciscam: has joined #ruby
[13:40:39] addyluxe: has joined #ruby
[13:41:26] ineb: has joined #ruby
[13:42:58] ineb: is there a name for software tests that go against real-world systems? for example if i write an image-uploader to imgur and finally want to test if a real world upload really works.
[13:43:14] ineb: of course these tests can fail if imgur changes anything server-side
[13:43:14] havenwood: ineb: end-to-end?
[13:43:26] havenwood: ineb: i dunno
[13:43:52] ineb: both, unit- and integrationtests dont cover this
[13:44:19] havenwood: HIT_REAL_APIS=1 rake
[13:45:16] havenwood: ineb: i can't think of anything fancy to call it
[13:45:27] ineb: i was thinking of a separate test suite for those tests but then i thought that these kinds of test shouldnt be included in the gem at all
[13:45:49] wilbert: has joined #ruby
[13:46:33] ineb: maybe a spearate project that includes my gem as depency and test things.
[13:46:34] havenwood: ineb: i've put that sort of test behind an env var before, just for convenience - but it's a good question, what best practices are in handling those real API integration sanity checks
[13:46:59] havenwood: it might be a nice thing to leave to the CI to do
[13:48:00] havenwood: ineb: it's interesting how many projects have tests that break when you disable WiFi ;-)
[13:48:32] ineb: iam having this issue on another front aswell. i wrote a gem which can alter GPU settings. like voltage and clocks. all tests are mocked but at some point i want to try if my code really works at altering the settings of my GPU ^^
[13:48:32] Bish: has joined #ruby
[13:49:00] Bish: >> RUBY_VERSION
[13:49:01] ruby[bot]: Bish: # => "2.3.0" (https://eval.in/1030982)
[13:49:10] Bish: >> p **{}
[13:49:11] ruby[bot]: Bish: # => nil (https://eval.in/1030983)
[13:49:19] Bish: this crashes my ruby 2.5.1
[13:49:22] Bish: can anyone confirm?
[13:49:41] ineb: Bish: can confirm.
[13:49:44] havenwood: Bish: I can't reproduce.
[13:50:07] havenwood: Bish: yes, can confirm (the `p` part is mandatory, got it)
[13:50:27] Bish: haha, how did this go unnoticed
[13:50:47] havenwood: Bish: not enough fuzzing?
[13:51:00] Bish: how does one report something like that, i have no clue
[13:51:04] havenwood: Bish: no issue in 2.4
[13:51:10] havenwood: Bish: https://bugs.ruby-lang.org/projects/ruby-trunk/issues
[13:51:30] Bish: very odd
[13:51:47] mostlybadfly: has joined #ruby
[13:52:20] havenwood: Bish: it's still an issue on nightly
[13:52:36] ineb: p **(Hash.new) is fine
[13:53:13] Bish: btw, i tried to find something similiar to the spread operator inr uby
[13:53:21] Bish: ae getting a new hash with old and new values
[13:53:25] Bish: a shorthand for update
[13:54:02] havenwood: Bish: Interestingly, even in Ruby 2.4 it doesn't print anything. ¯\_(ツ)_/¯
[13:54:43] nowhere_man: has joined #ruby
[13:55:18] havenwood: In JRuby, TruffleRuby and Rubinius: ruby -e "p **{}" #>> {}
[13:55:18] havenwood: In JRuby, TruffleRuby and Rubinius: ruby -e "p **{}" #>> {}
[13:55:25] Bish: can confirm just results in nil
[13:55:41] havenwood: Bish: It prints nothing, not even: nil
[13:55:59] Bish: well no, not print
[13:56:01] Bish: but return value
[13:56:05] Bish: irb(main):002:0> p **{}
[13:56:25] ineb: funny behaviour.
[13:56:45] havenwood: Bish: Just that `p` should be printing...
[13:57:09] havenwood: unless it's not getting an argument
[13:57:26] ruby[bot]: havenwood: # => nil (https://eval.in/1030984)
[13:57:29] ruby[bot]: havenwood: # => nil ...check link for more (https://eval.in/1030985)
[13:58:00] Bish: super odd
[13:58:00] havenwood: Bish: It's like ` **{}` is getting interpreted as nothing.
[13:58:09] Bish: i found SuperNil
[13:58:23] Bish: can somebody report that i feel not comfortable doing that
[13:58:33] havenwood: Bish: sure, will do
[13:58:46] havenwood: Bish: thanks for finding it!
[13:59:00] Bish: well, as i said, tried to find a spread operator
[13:59:03] Bish: i guess it doesn't existh
[13:59:42] ineb: Bish: why not comfortable?
[14:00:02] Zaab1t: has joined #ruby
[14:00:28] Bish: i don't know, i never did a bug report
[14:00:35] Bish: atleast not without fixing it
[14:00:35] havenwood: Bish: I guess it's fairly predictable that it's the case, but this produces the segfault: RubyVM::InstructionSequence.compile('p **{}')
[14:01:11] Bish: yeah that's funny
[14:01:14] Bish: it dies while compiling
[14:01:17] Bish: not while executing
[14:01:20] Bish: so we learned a thing
[14:01:31] havenwood: >> RubyVM::InstructionSequence.compile('p **{}').to_a.last
[14:01:32] ruby[bot]: havenwood: # => [1, [:trace, 1], [:putself], [:opt_send_without_block, {:mid=>:p, :flag=>20, :orig_argc=>0}, false], ...check link for more (https://eval.in/1030986)
[14:01:32] Asher: has joined #ruby
[14:01:38] Bish: rubybot is 2.3
[14:01:56] Bish: maybe parsing changed to 2.4?
[14:02:06] havenwood: Bish: same in 2.3 and 2.4
[14:02:11] havenwood: Bish: breaks in 2.5 and subsequent
[14:02:19] havenwood: still broken in 2.6.0-preview2 and nighlty
[14:02:25] Bish: yes, you're right
[14:02:38] Bish: but compiling it to bytecode already dies
[14:02:39] havenwood: Bish: in 2.4 it parses as though there's no: **{}
[14:02:47] havenwood: Bish: That above is just: p
[14:02:57] havenwood: so it's losing the hash bit
[14:03:16] havenwood: >> RubyVM::InstructionSequence.compile('p **{}').to_a.last == RubyVM::InstructionSequence.compile('p').to_a.last
[14:03:16] ruby[bot]: havenwood: # => false (https://eval.in/1030989)
[14:03:28] drale2k_: has joined #ruby
[14:03:38] Bish: well, that's expected, isn't it?
[14:03:59] havenwood: the flag changes
[14:04:06] Bish: i don't thing equality works on compiled bytecode
[14:04:20] havenwood: Bish: it's just an Array
[14:04:30] Bish: oh, you made .to_a
[14:04:33] havenwood: Bish: i didn't visually spot the difference
[14:04:40] havenwood: :flag=>20 versus :flag=>28
[14:05:14] Rapture: has joined #ruby
[14:05:20] ineb: i tried Ripper to get an AST but **{} looks the same as **Hash.new
[14:05:25] havenwood: :orig_argc=>0
[14:06:00] havenwood: Bish: yeah, something already funky in the parser pre-2.5 became a segfault in 2.5
[14:09:15] Mike11: has joined #ruby
[14:10:33] strmpnk: has joined #ruby
[14:11:11] havenwood: Bish: works fine (in that it bugs and doesn't pring) with parens: p(**{})
[14:12:20] havenwood: Any method triggers the segfault as well.
[14:12:33] havenwood: Integer **{} #!> Blarg!
[14:13:38] ineb: havenwood: how to debug that from here on? RubyVM::InstructionSequence.compile('p **{}') crashes ofc
[14:14:18] havenwood: ineb: ruby -yydebug -e "p **{}"
[14:14:39] havenwood: ineb: ^ to find the line of parse.y where it's borking
[14:15:05] havenwood: "Reducing stack by rule 62 (line 1671)"
[14:16:10] jinie: has joined #ruby
[14:16:42] havenwood: well, that's just where it's ending up
[14:18:26] havenwood: -e:2: warning: `**' interpreted as argument prefix
[14:22:13] Asher: has joined #ruby
[14:27:48] ineb: i see that warning on working code aswell
[14:28:28] ineb: maybe after Shifting token '}' i see $2 = nterm assoc_list (2.5-2.5: ) at the failing code and $3 = nterm brace_body (2.2-2.3: ) when its a working hash
[14:28:37] ineb: but i dont really understand anything
[14:29:43] alem0lars: has joined #ruby
[14:30:39] ineb: nah scratch that.
[14:31:06] nowhereman_: has joined #ruby
[14:33:58] rain1: has joined #ruby
[14:34:13] rain1: im learning to use nokogiri to get some data off a web page! I wanted to ask advice
[14:34:27] rain1: The tutorial says use open-uri Nokogiri::HTML(open("http://www.threescompany.com/"))
[14:34:48] rain1: but I need a cookie too, what library would you recommend to include cookies when getting a page?
[14:35:37] mynameisdebian: has joined #ruby
[14:35:45] dbugger_: has joined #ruby
[14:36:39] rshetty: has joined #ruby
[14:37:51] bak1an: has joined #ruby
[14:39:13] chouhoulis: has joined #ruby
[14:39:33] RougeR: has joined #ruby
[14:39:33] RougeR: has joined #ruby
[14:40:59] BTRE: has joined #ruby
[14:45:09] graphene: has joined #ruby
[14:46:27] karapetyan: has joined #ruby
[14:50:07] StarSeed0000: has joined #ruby
[14:54:15] millerti: has joined #ruby
[14:55:37] Inline: has joined #ruby
[14:56:12] cschneid: has joined #ruby
[14:58:59] tdy: has joined #ruby
[14:59:25] grilix: has joined #ruby
[14:59:43] mmattice_: has joined #ruby
[15:00:27] havenwood: ineb: Bish: looks like it's this commit: https://github.com/ruby/ruby/commit/4b279cfdd2e3e4a05e852632f3305c893f6c46a4
[15:01:05] Asher: has joined #ruby
[15:02:17] havenwood: rain1: https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit?usp=sharing
[15:03:16] havenwood: rain1: http and typhoeus are great options
[15:03:34] havenwood: rain1: https://github.com/httprb/http
[15:04:07] rain1: thank you
[15:05:28] mupt: has joined #ruby
[15:07:06] rafadc: has joined #ruby
[15:09:30] fluxAeon_: has joined #ruby
[15:10:20] graphene: has joined #ruby
[15:11:24] Cork: is it possible to get sprintf("%{base}-%03{serial}", {base: "abc", serial: 1}) to generate "abc-001"?
[15:12:13] Cork: i can't find a way to instruct it to print it as a digit (and it appears like that is needed for leading zeros)
[15:12:55] wilbert: has joined #ruby
[15:15:31] rafadc: has joined #ruby
[15:20:42] eam: Cork: weird, the normal non-named sprintf format seems to work
[15:21:10] eam: >> sprintf "%s-%03d", "abc", 1
[15:21:47] eam: I'm guessing that's some kind of issue with named parameters
[15:21:57] eam: perhaps because the type isn't being specified
[15:23:48] npgm: has joined #ruby
[15:24:47] atmosx: has joined #ruby
[15:27:37] agent_white: has joined #ruby
[15:29:03] Lytol: has joined #ruby
[15:34:09] akaiiro: has joined #ruby
[15:35:24] caleBOT_: has joined #ruby
[15:36:43] noobineer: has joined #ruby
[15:38:22] cagomez: has joined #ruby
[15:39:44] za1b1tsu: has joined #ruby
[15:40:28] rkoller: has joined #ruby
[15:41:48] RougeT430: has joined #ruby
[15:42:24] kapil___: has joined #ruby
[15:46:18] BloopMonster: has joined #ruby
[15:47:47] konsolebox: Cork: i think that's something worth reporting
[15:51:43] segy: has joined #ruby
[15:52:07] RougeR: has joined #ruby
[15:52:07] RougeR: has joined #ruby
[15:54:46] jinie: has joined #ruby
[15:54:56] amar_: has joined #ruby
[15:55:53] rouget430__: has joined #ruby
[15:57:04] greengriminal: has joined #ruby
[15:57:46] grilix: has joined #ruby
[15:58:33] greengriminal: Hey all quick question, I know that in Ruby 2.4 changes were made to how rounding works and I know that you can now pass optional params such as `half: :even`
[15:59:10] greengriminal: Now previously in 2.3 I could do: (0.99 + (1.0 * 0.025)).round(2) which would give me 1.01. now in ruby 2.4 the same calculation is giving 1.02.
[15:59:53] greengriminal: Using `round(half: :down)` or `round(half: :up)` doesn't appear to be working.
[16:00:00] greengriminal: Am I missing something fundamental here?
[16:00:28] rshetty: has joined #ruby
[16:00:39] RougeR: has joined #ruby
[16:03:23] naftilos76: has joined #ruby
[16:06:00] amar_: has joined #ruby
[16:09:38] Es0teric: has joined #ruby
[16:09:52] ruby[bot]: -bb redlegion!*@*$#ruby-fix-your-connection *!*@gateway/tor-sasl/redlegion$#ruby-fix-your-connection
[16:09:52] RougeT430: has joined #ruby
[16:10:37] cthulchu: has joined #ruby
[16:10:53] graphene: has joined #ruby
[16:11:10] apeiros: greengriminal: uh, no? (0.99 + (1.0 * 0.025)).round(2) gives 1.02 in 2.3 too
[16:11:41] apeiros: not that the `1.0 *` part would do anything…
[16:12:45] apeiros: it is interesting that this results in 1.02, though, given that it's 1.0149999999999999023003738329862244427204132080078125.round(2)
[16:12:47] konsolebox: apeiros: ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux] gives 1.01
[16:13:02] apeiros: 2.3.5 here
[16:13:27] konsolebox: so which one has correct behavior?
[16:14:15] apeiros: if it wasn't a float, 1.02 would be correct. but since the approximation is <1.015, I'd say 1.01 would be correct.
[16:14:56] apeiros: but then again, I've never read the full IEEE specs, they might say something else.
[16:18:22] greengriminal: https://i.imgur.com/ZA8x9zW.png
[16:18:28] greengriminal: apeiros, check that out ^
[16:18:59] apeiros: yeah, given that somebody else confirmed, I already believed you.
[16:19:40] [Butch]: has joined #ruby
[16:20:51] apeiros: the next older than 2.3.5 I have is 2.2.3, and there I get 1.01 too.
[16:21:28] cthulchu: do we have actual developers of the language around in freenode?
[16:22:44] greengriminal: my team are trying to upgrade to a rails proj to use 2.5.0 and as a result we have some failing spec which relates back to the rounding changes that were introduced in 2.4
[16:25:26] dionysus69: has joined #ruby
[16:26:56] apeiros: given that 1.015 itself is the same approximation, this might well be due to handling such deviations.
[16:27:20] mtkd: has joined #ruby
[16:27:55] caleBOT: has joined #ruby
[16:28:14] dionysus70: has joined #ruby
[16:28:47] apeiros: (almost certainly is)
[16:29:08] mynameisdebian: has joined #ruby
[16:29:23] dtzuzu: has joined #ruby
[16:29:42] bjpenn: has joined #ruby
[16:31:17] havenwood: cthulchu: yeah, there are several implementers from various Ruby engines around. why do you ask?
[16:31:37] cthulchu: purely out of curiosity.
[16:32:16] taylorzr: has joined #ruby
[16:32:37] cthulchu: I actually am trying to make rubocop work. it seems like it uses Ruby 2.1 parser while I use Ruby 2.2
[16:32:51] cthulchu: so it highlights errors that are not errors
[16:33:58] havenwood: cthulchu: did you install rubocop with Ruby 2.2?
[16:34:20] havenwood: cthulchu: do that
[16:34:23] cthulchu: it's installed as an extention to VS Code
[16:34:26] cthulchu: I kinda cant
[16:34:27] cthulchu: https://i.imgur.com/OKACB9M.png
[16:34:29] havenwood: cthulchu: gem which rubocop
[16:34:52] jcarl43: has joined #ruby
[16:35:14] cthulchu: I mean, I want it as my text editor extention
[16:35:31] vindvaki: has joined #ruby
[16:36:13] cthulchu: so I also did gem install rubocop
[16:36:32] cthulchu: after which I installed the extension
[16:37:08] cthulchu: and it works, but uses a wrong ruby version... which can be changed in its .rubocop.yml
[16:37:18] cthulchu: I don't know where that file is, however
[16:38:08] havenwood: cthulchu: What OS?
[16:38:44] havenwood: cthulchu: mdfind -name .rubocop.yml
[16:39:36] cthulchu: doesn't look right
[16:39:52] havenwood: cthulchu: what does that mean? the results aren't as expected? why not?
[16:40:02] cthulchu: no results at all
[16:40:15] havenwood: cthulchu: mdfind -onlyin / -name rubocop.yml
[16:40:15] cthulchu: https://i.imgur.com/g6xMbXn.png
[16:40:45] havenwood: cthulchu: use text to represent text, not images! or go all-out, and make a video.
[16:40:58] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[16:41:16] cthulchu: you do realize you told me this like five times by now?
[16:41:23] cthulchu: and every time I told you the same thing
[16:41:23] havenwood: cthulchu: mdfind -onlyin / -name rubocop.yml
[16:41:57] havenwood: cthulchu: I think you should invest in learning how to copy and paste text.
[16:42:11] cthulchu: yeah, I kinda know, but it's really tedious
[16:42:25] havenwood: cthulchu: https://github.com/defunkt/gist
[16:43:04] cthulchu: has to be one floor up
[16:43:37] cthulchu: maybe I'll find something for pastebin or alike
[16:43:41] cthulchu: I don't like gist
[16:43:49] havenwood: Just stop with the images!
[16:45:30] konsolebox: greengriminal: reading this thread, it seems like rounding .5 up was the default, changed, and then reverted back. https://bugs.ruby-lang.org/issues/12958
[16:45:52] claudiuinberlin: has joined #ruby
[16:46:01] dgaff: has joined #ruby
[16:47:46] dgaff: Hey all - I'm gettin re-acquainted with rspec and I'm writing lots of tests that look like so: expect(SomeClass.run.keys.collect(&:class).uniq).to eq([String]) - in effect, I'm checking to see if the structure of the returned output looks like it ought to (in this case, a hash with exclusively string keys) - is there a more idiomatic way to do this?
[16:49:21] rippa: has joined #ruby
[16:49:57] bradleyprice: has joined #ruby
[16:52:08] mynameisdebian: has joined #ruby
[16:52:38] karapetyan: has joined #ruby
[16:58:50] caleBOT__: has joined #ruby
[16:58:57] jraavis: has joined #ruby
[17:00:15] akaiiro: has joined #ruby
[17:00:27] cthulchu: hell this is too difficult
[17:00:32] cthulchu: configuring rubocop
[17:00:39] cthulchu: what an uncomfortable thing
[17:02:11] jraavis: has joined #ruby
[17:02:46] greengriminal: Thanks konsolebox so with that said I should be using BigDecimal instead of a Float ?
[17:03:08] apeiros: greengriminal: you should always use BigDecimal or Rational if you care about precision.
[17:03:18] mupt: has joined #ruby
[17:03:47] konsolebox: greengriminal: you have to check the last part of the thread
[17:04:02] greengriminal: Yeah I was taking a thorough read through of that read just now
[17:07:33] donofrio: has joined #ruby
[17:10:32] konsolebox: > require 'bigdecimal'; (BigDecimal("0.99") + 1.0 * 0.025).round(2).to_s
[17:10:38] konsolebox: >> require 'bigdecimal'; (BigDecimal("0.99") + 1.0 * 0.025).round(2).to_s
[17:10:39] ruby[bot]: konsolebox: # => "0.102E1" (https://eval.in/1031074)
[17:11:35] jraavis: has joined #ruby
[17:13:37] apeiros: it'd not incorporate floats into calculations with bigdecimal. can easily defeat using bd.
[17:15:58] xuyuheng: has joined #ruby
[17:18:24] amarks: has joined #ruby
[17:19:24] konsolebox: apeiros: yeah, originally i also used BD for 1.0, and 0.025, but i thought it's unnecessary complexity for a definite rational number.
[17:20:04] apeiros: 1.015 is also a rational number, yet floats can only approximate it.
[17:20:27] apeiros: >> "%.60f" % 0.025
[17:20:28] ruby[bot]: apeiros: # => "0.025000000000000001387778780781445675529539585113525390625000" (https://eval.in/1031075)
[17:20:54] apeiros: iow, 0.025 is not 0.025.
[17:21:58] conta: has joined #ruby
[17:26:35] taylorzr: has joined #ruby
[17:30:55] mynameisdebian: has joined #ruby
[17:35:09] mtkd: has joined #ruby
[17:35:34] cagomez: has joined #ruby
[17:38:08] konsolebox: apeiros: ok, point taken
[17:38:16] ellcs: has joined #ruby
[17:38:24] mynameisdebian: has joined #ruby
[17:42:52] vindvaki: has joined #ruby
[17:44:08] c0ncealed2: has joined #ruby
[17:44:43] alem0lars: has joined #ruby
[17:49:35] cthulchu: when I run rubocop -V, I get: 0.57.2 (using Parser 2.5.1.0, running on ruby 2.2.0 x86_64-darwin17)
[17:49:58] cthulchu: it's so weird that it uses parser 2.5 on 2.2
[17:50:03] cthulchu: why would it
[17:50:09] amar_: has joined #ruby
[17:50:17] leitz: has joined #ruby
[17:51:34] greengriminal: has joined #ruby
[17:52:24] Alina-malina: has joined #ruby
[17:54:20] amarks: has joined #ruby
[17:56:03] cagomez: has joined #ruby
[17:58:14] biberu: has joined #ruby
[18:01:19] headius: havenwood: I need to start aggregating some of your results, have you managed to put them somewhere?
[18:02:45] leitz: ACTION needs to aggregate some of havenwood's brains. 
[18:03:01] havenwood: headius: I haven't consolidated them into a repo. I just have gists and image ilnks so far.
[18:03:25] bradleyprice: has joined #ruby
[18:03:35] headius: ideally I would be able to reproduce them under a specific environment so nobody can cry foul :-)
[18:03:44] bjpenn: has joined #ruby
[18:07:01] sameerynho: has joined #ruby
[18:07:37] grilix: has joined #ruby
[18:08:10] amar_: has joined #ruby
[18:09:22] cthulchu: managed to force rubocop into 2.2
[18:09:28] cthulchu: now I get a lot more errors
[18:09:33] cthulchu: often useless
[18:09:53] cthulchu: Have to figure how to make it ignore some things
[18:10:34] leitz: cthulchu, I think there's a config file in it.
[18:10:40] MagePsycho_: has joined #ruby
[18:11:08] cthulchu: yeah, will look into it
[18:11:14] cthulchu: I mean, there was no cfg
[18:11:22] cthulchu: I had to create one to override its defaults
[18:11:35] wilbert: has joined #ruby
[18:12:01] leitz: mine was in a sub-direcotry rubocop/rubocop.yml
[18:12:11] cthulchu: I don't even get the rubocop dir
[18:12:18] cthulchu: after installing the gem
[18:12:30] cthulchu: where did yours appear?
[18:12:31] leitz: Can't recall if I had to make it or not.
[18:14:17] leitz: My config and notes: https://github.com/makhidkarun/2d6_ogl_chargen/blob/master/rubocop/rubocop.yml
[18:15:03] cthulchu: no notes though, man
[18:15:25] cthulchu: oh you're not a fan of spaces around operators either!
[18:15:51] cthulchu: I don't mind them, but the max line length or percieved method complexity...
[18:16:11] leitz: Notes: how to run it. I usuually forget from one minute to the next.
[18:16:12] mtkd: has joined #ruby
[18:16:22] elomatreb: Method complexity is kind of a shitty metric anyway, yeah
[18:16:33] cthulchu: you don't need it
[18:16:40] cthulchu: just put it in your bash_profile
[18:16:43] cthulchu: I did just that
[18:17:47] leitz: Nyah, I keep most of my code in git, but not my profile, etc. Too many computers to keep track of.
[18:17:48] cthulchu: oh there's rubocop --auto-gen-config
[18:17:54] cthulchu: it's not even in the documentation
[18:18:06] cthulchu: hell this rubocop is sloppy
[18:20:49] cagomez: has joined #ruby
[18:21:55] leitz: ACTION is slogging through Python regex for work. 
[18:29:28] cagomez: has joined #ruby
[18:29:28] cthulchu: there's no python regex
[18:29:32] cthulchu: there's just regex
[18:29:40] cthulchu: regex-the-great
[18:30:29] roamingdog: has joined #ruby
[18:31:28] conta: has joined #ruby
[18:32:07] amar_: has joined #ruby
[18:35:04] xuyuheng: has joined #ruby
[18:35:48] eckhardt_: has joined #ruby
[18:41:28] grilix: has joined #ruby
[18:42:04] jenrzzz: has joined #ruby
[18:42:05] jenrzzz: has joined #ruby
[18:43:54] redlegion: has joined #ruby
[18:43:55] orbyt_: has joined #ruby
[18:46:17] amar_: has joined #ruby
[18:47:32] amar_: has joined #ruby
[18:50:51] RougeT430: has joined #ruby
[18:52:07] amarks: has joined #ruby
[18:53:42] amar_: has joined #ruby
[18:54:56] knight_: has joined #ruby
[18:55:02] halbbalda: has left #ruby: ()
[18:55:14] xuyuheng: has joined #ruby
[19:00:23] tff^: has joined #ruby
[19:01:42] \void: has joined #ruby
[19:02:11] redlegion: has joined #ruby
[19:04:34] chouhoul_: has joined #ruby
[19:06:22] cagomez: has joined #ruby
[19:06:54] jenrzzz: has joined #ruby
[19:06:54] jenrzzz: has joined #ruby
[19:06:54] greengriminal: has joined #ruby
[19:08:57] quobo: has joined #ruby
[19:10:08] amarks: has joined #ruby
[19:11:45] Crack: has joined #ruby
[19:13:38] greengriminal: has joined #ruby
[19:14:21] wilbert: has joined #ruby
[19:14:59] Mike11: has joined #ruby
[19:15:27] greengriminal: has joined #ruby
[19:18:11] roamingdog: has joined #ruby
[19:19:30] roamingdog: has joined #ruby
[19:20:11] grilix: has joined #ruby
[19:20:55] SeepingN: has joined #ruby
[19:21:59] amar_: has joined #ruby
[19:25:25] SeepingN: has joined #ruby
[19:26:14] jrafanie: has joined #ruby
[19:26:25] amar_: has joined #ruby
[19:27:14] fuxx: has joined #ruby
[19:33:14] dionysus69: has joined #ruby
[19:35:20] xuyuheng: has joined #ruby
[19:36:06] Tempesta: has joined #ruby
[19:36:14] ellcs: has joined #ruby
[19:39:17] herbmillerjr: has joined #ruby
[19:41:26] chouhoulis: has joined #ruby
[19:43:00] Tempesta: has joined #ruby
[19:44:40] GodFather: has joined #ruby
[19:45:11] noobineer: has joined #ruby
[19:45:28] jamesaxl: has joined #ruby
[19:45:42] Eiam: has joined #ruby
[19:46:26] orbyt_: has joined #ruby
[19:46:41] greengriminal: has joined #ruby
[19:47:30] claudiuinberlin: has joined #ruby
[19:49:48] greengriminal: has joined #ruby
[19:52:04] SeepingN: has joined #ruby
[19:54:40] NingaLeaf: has joined #ruby
[19:55:26] xuyuheng: has joined #ruby
[19:56:06] greengriminal: has joined #ruby
[20:00:00] chouhoul_: has joined #ruby
[20:00:57] yokel: has joined #ruby
[20:03:39] shinnya: has joined #ruby
[20:04:15] bradleyp_: has joined #ruby
[20:04:36] floHH: has joined #ruby
[20:05:40] tag: has joined #ruby
[20:09:19] floHH: Hi, I`m a student from Germany and in serious trouble with my exam exercises, is there anyone who can help ? The task is written in german... we find an agreement for your effort =)
[20:09:45] Zarthus: we're not going to write your exam for you.
[20:09:56] floHH: and if I pay ?
[20:10:02] Zarthus: that's still unethical
[20:10:10] Zarthus: if you're not competent enough to pass the exam, you should have studied better.
[20:10:23] floHH: ya most of ppl act that way
[20:11:15] floHH: had not enough time (child,work,..) and next semester we dont continue with ruby
[20:13:08] mupt: has joined #ruby
[20:14:24] havenwood: floHH: If you're allowed to get help, post a gist of what you've tried so far and the trouble you're having.
[20:14:53] zachk: has joined #ruby
[20:14:53] zachk: has joined #ruby
[20:15:05] rshetty: has joined #ruby
[20:15:27] xuyuheng: has joined #ruby
[20:15:36] floHH: it is definetly not forbidden, the code was put online by the prof
[20:16:41] tolerablyjake: has joined #ruby
[20:17:55] tty: has joined #ruby
[20:18:59] elomatreb: Generally getting a specific solution from other people will be considered plagiarism
[20:21:57] eam: if you're getting specific answers for your job though, that's fine
[20:27:33] Nahra: has joined #ruby
[20:28:07] mupt: has joined #ruby
[20:29:40] dkmueller: has joined #ruby
[20:30:07] roamingdog: has joined #ruby
[20:30:52] roamingdog: has joined #ruby
[20:31:42] roamingdog: has joined #ruby
[20:32:31] roamingdog: has joined #ruby
[20:33:21] roamingdog: has joined #ruby
[20:34:06] roamingdog: has joined #ruby
[20:34:26] jenrzzz: has joined #ruby
[20:34:27] jenrzzz: has joined #ruby
[20:34:54] roamingdog: has joined #ruby
[20:35:31] xuyuheng: has joined #ruby
[20:35:44] roamingdog: has joined #ruby
[20:36:28] Es0teric: has joined #ruby
[20:36:29] roamingdog: has joined #ruby
[20:41:09] NingaLeaf: has joined #ruby
[20:50:23] jenrzzz: has joined #ruby
[20:50:23] jenrzzz: has joined #ruby
[20:51:47] mupt: has joined #ruby
[20:52:32] raynold: has joined #ruby
[20:55:07] Crack: has joined #ruby
[20:55:39] xuyuheng: has joined #ruby
[20:57:59] graphene: has joined #ruby
[21:00:35] chouhoulis: has joined #ruby
[21:02:25] alem0lars: has joined #ruby
[21:02:41] orbyt_: has joined #ruby
[21:04:20] Eiam: eam: hey now, I donate to the open source communities when they help me for my job! ;)
[21:04:31] Eiam: I'd give the code back, if I was allowed to do so!
[21:04:55] cthulchu: suddenly my color coding stopped working
[21:05:13] cthulchu: what's wrong with this: \e[1m\e[43m>>>Analytics testing is in progress:\e[0m
[21:06:07] SeepingN: it's hard to read? ;)
[21:06:22] SeepingN: (I get white on mustard. black text would be nice perhaps)
[21:06:33] SeepingN: ACTION blames yhour TERM
[21:08:10] Eiam: I see \ e [ 1 m \ e [ 43 ,
[21:10:40] bak1an: has joined #ruby
[21:11:51] graphene: has joined #ruby
[21:12:22] jenrzzz: has joined #ruby
[21:12:23] jenrzzz: has joined #ruby
[21:15:47] xuyuheng: has joined #ruby
[21:16:59] tolerablyjake: has joined #ruby
[21:24:47] r29v: has joined #ruby
[21:24:55] mtkd: has joined #ruby
[21:27:29] caleBOT: has joined #ruby
[21:29:48] graphene: has joined #ruby
[21:31:58] havenwood: headius: Another bench to round out the pure-Ruby digests: https://gist.github.com/havenwood/f04f99a3050d17ae0cd152f6c86fcf8a
[21:32:14] havenwood: https://i.imgur.com/AjT8NIe.png
[21:32:38] Crack: has joined #ruby
[21:33:29] havenwood: just need to put them in a repo and make it easy to reproduce, i suppose
[21:35:04] cthulchu: folks, my puts stopped coloring things in the console
[21:35:18] cthulchu: it's uncomfortable now
[21:35:53] xuyuheng: has joined #ruby
[21:37:32] eckhardt_: has joined #ruby
[21:37:53] roamingdog: has joined #ruby
[21:40:47] elomatreb: If you didn't change your code it's probably your terminal that changed settings somewhere
[21:41:50] cthulchu: never use '
[21:41:55] cthulchu: use doublequotes
[21:42:05] cthulchu: I don't even know why you would bother
[21:42:37] eam: I just use %@ @ is that ok?
[21:45:52] Megamos: has joined #ruby
[21:46:07] karapetyan: has joined #ruby
[21:47:12] graphene: has joined #ruby
[21:49:28] NingaLeaf: has joined #ruby
[21:52:09] graphene: has joined #ruby
[21:55:59] xuyuheng: has joined #ruby
[22:04:36] mynameisdebian: has joined #ruby
[22:06:15] havenwood: eam: !"#$%&')*+,-./:;=>?@\]^_`|}~
[22:06:16] headius: havenwood: cool that's great...not quite beating TR on that one but in shooting distance
[22:06:39] headius: my experiments show that small algorithms that inline completely optimize on JRuby almost as well as on TR
[22:07:02] headius: if we can't/don't inline some things or if it's using a lot of data structures we have more work to do
[22:07:09] headius: but at least I know what we're not doing
[22:07:20] headius: havenwood: http://blog.headius.com/2018/07/running-jruby-on-graal-jit.html
[22:07:31] headius: I'd be interested in a follow-up post showing your results
[22:07:58] havenwood: this xxhash library uses class variables in place of constants - i'd not be surprised if there's lots of room to optimize
[22:08:05] headius: oh jeez, yeah
[22:08:17] headius: class vars are dirt stupid in JRuby now
[22:09:18] jenrzzz: has joined #ruby
[22:09:18] jenrzzz: has joined #ruby
[22:09:30] headius: I don't know what TR does for class vars
[22:11:12] roamingdog: has joined #ruby
[22:11:14] headius: yeah looks like TR does optimize class vaes
[22:11:16] headius: so there's an opportunity
[22:11:24] headius: I know how to do it, I just hate class vars :-)
[22:11:55] havenwood: headius: I hate them too!
[22:12:05] havenwood: headius: That's a great read. Thanks for the article!
[22:12:18] headius: sure, hopefully more to come as I explore this stuff
[22:16:04] xuyuheng: has joined #ruby
[22:21:01] cthulchu: why do we need the final newline?
[22:22:16] grilix: has joined #ruby
[22:23:08] caleBOT: has joined #ruby
[22:26:54] elomatreb: cthulchu: At the end of source files? It's an old convention from Unix, so that you could print the file to the terminal and it wouldn't mess up your prompt
[22:27:53] headius: I used to hate final newline until I realized that version control is way cleaner that way
[22:28:01] headius: you add a new line it's only a single +, rather than a - and a +
[22:28:06] moei: has joined #ruby
[22:29:00] elomatreb: That too, yeah
[22:29:41] eam: I like to add two of three of 'em
[22:29:46] caleBOT_: has joined #ruby
[22:30:30] znz_jp: has joined #ruby
[22:32:13] headius: eam: just to make sure
[22:32:23] headius: if one's good, two is better
[22:32:46] eam: space is cheap don'tcha know
[22:34:53] elomatreb: You'll exhaust the Strategic Newline Reserve
[22:35:02] SeepingN: and wc -l works better
[22:35:11] eam: we are making the things by the dozen over here
[22:36:14] xuyuheng: has joined #ruby
[22:37:36] caleBOT: has joined #ruby
[22:39:05] Eiam: I like to tease new hires about running out of bug numbers, create a bunch of bugs then don't save them, the numbers are lost to history forever! we will run out some day
[22:39:16] mynameisdebian: has joined #ruby
[22:39:26] cthulchu: elomatreb, ha! very cool, thanks!
[22:40:07] Eiam: the good news is once we run out of numbers for new bugs, we will just cease to find or fix bugs and everyone will eventually accept their bug ridden reality. But it'll never get worse!
[22:42:14] nowhereman_: has joined #ruby
[22:44:23] cagomez: has joined #ruby
[22:46:00] cagomez: has joined #ruby
[22:46:46] kvda: has joined #ruby
[22:47:59] elomatreb: Give each issue a UUID
[22:50:07] headius: give each issue a 4096-bit RSA key to be sure
[22:53:18] orbyt_: has joined #ruby
[22:56:14] xuyuheng: has joined #ruby
[23:01:50] wilbert: has joined #ruby
[23:03:09] caleBOT_: has joined #ruby
[23:03:12] eam: after you run out of bug numbers how will you track fixing it?
[23:04:11] johnny56: has joined #ruby
[23:04:13] SeepingN: a new instance
[23:05:53] kvda: has joined #ruby
[23:16:17] xuyuheng: has joined #ruby
[23:24:28] zapata: has joined #ruby
[23:30:01] blackmesa: has joined #ruby
[23:35:35] cagomez: has joined #ruby
[23:36:26] xuyuheng: has joined #ruby
[23:37:17] r29v: has joined #ruby
[23:44:28] caleBOT_: has joined #ruby
[23:46:19] jrafanie: has joined #ruby
[23:50:31] nicht: has joined #ruby
[23:51:16] mynameisdebian: has joined #ruby
[23:51:30] nicht: has joined #ruby
[23:51:41] caleBOT_: has joined #ruby
[23:52:36] mupt: has joined #ruby
[23:54:37] blackmesa1: has joined #ruby
[23:56:03] mynameisdebian: has joined #ruby
[23:56:30] xuyuheng: has joined #ruby
[23:56:42] nicht: has joined #ruby
[23:57:11] nicht: has joined #ruby
[23:57:51] graphene: has joined #ruby
[23:57:51] karapetyan: has joined #ruby
[23:59:06] darkhanb: has joined #ruby