« Back to channel list

#ruby - 29 October 2015

« Back 1 day Forward 1 day »
[00:00:02] sunya7a__: has joined #ruby
[00:00:19] raazdaan: has joined #ruby
[00:00:20] bigmac__: this will generate the a hole large list of hash's, but then only pull [0] the first array
[00:00:38] bigmac__: can i speed this up?
[00:00:45] bigmac__: with out generating the hole list
[00:01:16] hxegon: has joined #ruby
[00:01:53] rickmasta: has joined #ruby
[00:02:33] sunya7a: has joined #ruby
[00:03:13] bigmac__: hash.size**200 HUGE
[00:06:30] eam: bigmac__: hash is an Array in your example?
[00:06:38] bmurt: has joined #ruby
[00:07:16] bigmac__: could be 1,2,3
[00:07:19] eam: unless I'm missing something, that simplifies to hash.join
[00:07:26] finisherr: has joined #ruby
[00:08:26] cmoney: has joined #ruby
[00:09:08] bigmac__: i guess, if you have a array size of one million... and you wanted to seek to [100]... i hope to not generate the hole million
[00:09:15] tkuchiki: has joined #ruby
[00:10:01] chouhoulis: has joined #ruby
[00:11:18] bigmac__: or... can i read only line 100 from a file? would be a decent solution
[00:11:18] jackjackdripper: has joined #ruby
[00:11:29] passcod: has joined #ruby
[00:11:32] bigmac__: with out reading the hole file
[00:11:55] Ox0dea: bigmac__: You'll have to read the first 100.
[00:12:25] baweaver: bigmac__: it's whole, not hole
[00:12:43] Ox0dea: /dev/null is arguably a hole file.
[00:12:52] ellisTAA: has joined #ruby
[00:13:10] Ox0dea: bigmac__: f = File.open('foo'); 99.times { f.gets }; hundredth_line = f.gets
[00:13:12] baweaver: Ox0dea: you know what I meant :P
[00:13:51] bigmac__: so, trying to read line 1 million, would take a really long time lol
[00:14:02] Ox0dea: > Depends on the size of the chair.
[00:14:14] baweaver: if you're reading millions of lines in Ruby, you're doing something wrong
[00:14:28] bigmac__: millions of array
[00:14:30] eam: reading 80 megabytes is wrong?
[00:14:52] baweaver: 80M, probably not
[00:14:53] ellisTAA: i???m trying to get better @ recursion. i tried to write a method that searches for connections between ppl in groups. can someone offer feedback? https://gist.github.com/ellismarte/0cdf222c317084abc493
[00:14:58] baweaver: but if it gets larger you're in trouble
[00:15:10] eam: baweaver: dunno, ruby scales pretty well
[00:15:11] bigmac__: im working with very large stuff
[00:15:42] bigmac__: 2 very large => hash.repeated_permutation(x).map(&:join)
[00:16:05] baweaver: very large is vague
[00:16:08] bigmac__: im trying to run side by side, almost combine together
[00:16:21] skweek: has joined #ruby
[00:16:36] baweaver: eam: what point do you tend to cut off on it?
[00:16:58] baweaver: I'd think as you approach 500+M
[00:17:45] bigmac__: (2**20)+(95**1)+(95**2)+(95**3)+(95**4)
[00:17:57] baweaver: >> (2**20)+(95**1)+(95**2)+(95**3)+(95**4)
[00:17:58] ruboto: baweaver # => 83365696 (https://eval.in/458932)
[00:18:14] bigmac__: but the string length is increasing
[00:18:21] baweaver: so what exactly are you trying to do?
[00:18:31] baweaver: you're describing a solution
[00:18:49] bigmac__: i have a working example but its so ugly, (the long way around)
[00:19:08] baweaver: that'd be a solution
[00:19:13] baweaver: what's the base problem?
[00:19:21] bigmac__: very stressful when it gets past a size
[00:20:46] bigmac__: the out put im trying to generate, is to stressful... i can make a small scale example
[00:21:04] baweaver: what's the input
[00:21:17] bigmac__: >>puts 'site'
[00:21:18] ruboto: bigmac__ # => site ...check link for more (https://eval.in/458936)
[00:21:20] Contigi: has joined #ruby
[00:21:53] cyle: has joined #ruby
[00:22:06] baweaver: can you describe the problem in a sentence?
[00:22:27] baweaver: not the output, not the method of generation, not an example. Just the problem itself
[00:24:48] niemcu: has joined #ruby
[00:24:49] rubyaw: has joined #ruby
[00:26:14] bigmac__: there is a part in my loop that is ran over and over, then multiplies it self then becomes unstable...
[00:26:39] baweaver: bigmac__: what is the issue you are trying to solve with this code?
[00:26:48] bigmac__: like trying to read array[100000000]
[00:26:50] baweaver: the problem that you are attempting to code for
[00:26:54] bollullera: has left #ruby: ()
[00:26:58] bigmac__: its just for fun
[00:27:04] baweaver: that's great
[00:27:12] baweaver: but what are you trying to do?
[00:27:22] baweaver: you keep telling me parts of your solution
[00:27:45] Ox0dea: bigmac__: Is this still to do with strings of binary?
[00:27:59] bigmac__: just part of my examples
[00:28:08] baweaver: now we're getting closer to the base problem
[00:28:29] bigmac__: i think about this stuff all day
[00:28:36] baweaver: I can only ask so many times in so many different ways bigmac__
[00:28:58] bigmac__: well, sometimes its embarrassing to share my ideas,
[00:29:21] baweaver: ....so you share your solution but not the base problem?
[00:29:31] Ox0dea: > base problem
[00:29:41] Ox0dea: pelican.jpg
[00:30:07] workmad3: has joined #ruby
[00:30:27] bigmac__: you guys have a way of looking at my ugly function's, and show me a much better way
[00:30:56] ruboto: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[00:30:59] bigmac__: i tend to take the long way to get somewhere, turns out... there is a one liner to replace my 12 lines
[00:31:39] bigmac__: thanks for your help... i have to go
[00:32:40] baweaver: bigmac__: next time help us help you. When we ask for something, there's a reason for it.
[00:33:06] baweaver: ACTION sighs
[00:33:23] gregoriokusowski: has joined #ruby
[00:33:40] ekinmur: has joined #ruby
[00:33:46] keen__________: has joined #ruby
[00:35:24] rideh: has joined #ruby
[00:35:32] ellisTAA: for some reason i never hit lines 38 - 40 ??? i guess i???m using return inappropriately but im not sure how. could someone help? https://gist.github.com/ellismarte/0cdf222c317084abc493
[00:36:17] Radar: I guess because it's returning before that point
[00:36:23] Radar: time to employ some puts driven development :)
[00:36:51] pipework: Radar: puts, putz, whichever. :D
[00:37:12] baweaver: return is fairly straightforward. It returns
[00:38:45] havenwood: EllisTAA: Are you meaning to `break` from the iteration rather than `return` from the method for some of these `return`s I wonder?
[00:39:06] Oog: has joined #ruby
[00:40:05] ellisTAA: havenwood: that???s what i was thinking but i thought break wouldn???t send the value back to the method that called the method recursively???
[00:41:45] havenwood: P-Driven Development, REPL-Driven Development, Hammock-Driven Development, it's so hard to choose...
[00:41:59] pwnd_nsfw: has joined #ruby
[00:42:00] ellisTAA: i guess i???m wondering, how do i get this value sent back up to the method that called it? https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L15
[00:42:05] Ox0dea: Drive-driven development.
[00:42:28] havenwood: Ox0dea: development driven-driven development
[00:42:30] ellisTAA: i would use return there correct?
[00:43:17] Ox0dea: >> def foo; loop { break 42 }; end; foo # EllisTAA
[00:43:18] ruboto: Ox0dea # => 42 (https://eval.in/458963)
[00:43:23] havenwood: ??n??mqol??v????? n??vi?????-Driven Development
[00:44:24] astrobunny: has joined #ruby
[00:44:47] pipework: havenwood: I'm waiting for chauffeur-driven development.
[00:44:49] eam: baweaver: no limit - I'd switch away from ruby when I need more efficiency (can't fit in my fixed-size OS container) not necessarily due to any limit
[00:45:04] h99h9h88: has joined #ruby
[00:45:13] pipework: It's kinda like pairing, but one person just says what they want done and then the other person does it while the first doesn't even really pay attention.
[00:45:32] eam: baweaver: I've certainly processed huge datasets in ruby before (100s of gigs)
[00:45:40] pipework: Maybe I just have a secret yearning for enterprise development, and I'm hiding that fact from myself.
[00:45:57] baweaver: I'd probably switch to JRuby at least by that point.
[00:46:15] baweaver: then again I get impatient
[00:46:30] havenwood: Matz said he was surprised to learn that Ruby was being used in supercomputing.
[00:46:49] eam: I mean, I've used regular old grep on datasets that big too
[00:47:07] pipework: eam: why no ack, ag, or sift?
[00:47:15] havenwood: pipework: now sift i don't know
[00:47:33] eam: pipework: I use ag on osx where grep is terrible, but gnu grep's roughly the same speed
[00:47:38] pipework: havenwood: In 99% of cases: sift > ag > ack > grep
[00:48:19] eam: every tool has odd implementation limits
[00:48:40] havenwood: pipework: ooh, colors!
[00:48:41] pipework: And some are just slow except that one odd case where it outperforms all the otherwise fast things.
[00:48:43] havenwood: pipework: :D
[00:48:43] pipework: havenwood: Yeah!
[00:48:47] pipework: purty ones by default.
[00:48:48] eam: I use whatever's easiest in terms of my time while still being acceptably fast
[00:49:09] pipework: eam: sift has the easiest interface, but is also compatible with ag and ack as far as I can tell.
[00:49:26] pipework: havenwood: sift + parallel is great.
[00:49:29] startupality: has joined #ruby
[00:49:34] havenwood: pipework: i like the sound of that
[00:49:37] pipework: ACTION loves gnu-parallel
[00:50:07] baweaver: My definition of acceptable time taken is a fairly short chain
[00:50:30] eam: generally, optimizing only makes sense if you're building something repetitive (like a periodic search, or code in a query path)
[00:50:34] pipework: baweaver: Yet you spend hours figuring out why spark is faster and better than other things. :p
[00:51:02] pipework: eam: Egh, when the tool itself is more or less a swap-in with a few small changes you get used to after a couple times using it, it's just better.
[00:51:25] eam: well sure
[00:51:28] pipework: Investment of switching from grep to sift is small, but larger than ag or ack to sift which is really small.
[00:51:55] eam: but the benefit of switching is also small
[00:52:27] eam: (unless you're on a system with a crippled grep)
[00:52:27] pipework: My time and happiness with the speed in which my tools perform is something I value greatly.
[00:52:38] eam: yeah but gnu grep is roughly as fast as ag
[00:52:46] pipework: And sift is much faster than both!
[00:52:51] havenwood: lack of portability of grep flags is an argument for fleeing itself if portability is needed
[00:53:04] eam: havenwood: all the world's a gnu
[00:53:10] havenwood: eam: gnoooo
[00:53:34] bricker: has joined #ruby
[00:53:59] eam: what's sift doing to get that much faster?
[00:54:15] pipework: I have no idea at all, I'm assuming human sacrifice.
[00:54:36] pipework: At the bottom of the page: https://sift-tool.org/samples.html
[00:54:50] havenwood: https://github.com/svent/sift
[00:55:10] pipework: I mean, just look at that interface difference! And supporting sifting through gzip'd files? Awesome.
[00:55:30] eam: well zgrep
[00:55:53] pipework: Yeah, but how much faster do you think you'd arrive at the right invocation of sift vs grep and zgrep?
[00:56:01] eam: I wonder if it does more than just zcat|match
[00:56:13] pipework: Good stuff, that sift.
[00:56:33] eam: a long time ago I had an idea to translate the pattern through the huffman encoding to match files without decompression
[00:56:37] havenwood: pipework: Time to port it to Crystal! :P
[00:56:38] eam: no sure if that's viable
[00:56:40] h99h9h88_: has joined #ruby
[00:56:49] eam: but if it is, the speedup would be gigantic
[00:58:34] pipework: havenwood: I'll have to keep learning and contributing to the documentation first!
[00:59:07] PaulCapestany: has joined #ruby
[00:59:48] eam: so sift is threaded
[01:00:08] eam: seems to be the major benefit
[01:01:48] eam: marginally faster than grep -r from what I can see
[01:01:58] juanpablo__: has joined #ruby
[01:02:31] pipework: Could compare against `find . -type f | parallel -j+1 grep mypattern`
[01:03:10] eam: their sample data looks like it's benched against BSD grep, which is known terrible
[01:04:01] eam: parallelism within one large file, that's kinda cool
[01:06:38] eam: EllisTAA: re: https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L15, I don't follow the entire method you've got, but it looks like you're returning paths_between_poi_and_target right?
[01:06:45] eam: so you'd shovel onto that?
[01:07:26] devoldmx_: has joined #ruby
[01:07:42] djellemah_: has joined #ruby
[01:08:40] eam: pipework: lol, gnu grep --mmap beats sift
[01:09:58] pipework: eam: Will that work sanely with large files?
[01:10:12] eam: absolutely
[01:10:29] eam: main trouble with mmap is with files which shrink while you're grepping
[01:10:46] d34th4ck3r: has joined #ruby
[01:10:52] willardg: has joined #ruby
[01:10:56] ellisTAA: eam: i???m doing that on line 25 ??? but for some reason i dont think my method is doing what i want it to do. i???m trying to debug it right now ??? kinda confusing but i think i might be returning or breaking when i shouldn???t be https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L25
[01:10:56] eam: address space is cheap, the VM will map pages in and out as needed (it's doing that in the filesystem cache anyway on big search jobs)
[01:11:27] pipework: eam: would mmap be usable for really large datasets?
[01:11:54] eam: pipework: yeah, I've worked a bunch with mmap'd huge k/v stores (tens of gigs) based on https://github.com/yahoo/mdbm
[01:12:24] eam: you can mmap essentially any file smaller than your pointer size (modulo reserved address space)
[01:12:37] eam: and even then, you'd just do multiple maps if you needed larger -- say if you're on 32bit
[01:12:49] eam: you'd mmap every 2G or so
[01:13:06] ellisTAA: it actually might be working ???
[01:13:12] pipework: So I could safely just always use the mmap option with grep?
[01:13:29] eam: pipework: as long as you don't mind an occasional segv if a file gets truncated while you're interacting with it
[01:13:42] jgpawletko: has joined #ruby
[01:13:49] l_tonz: has joined #ruby
[01:13:56] symm-: has joined #ruby
[01:14:13] eam: calling read() after a truncate just returns nothing -- but addressing memory after a file shrinks turns into an illegal access
[01:14:32] eam: totally fine on static files though
[01:14:46] eam: (and even then, if a file truncates while you grep it you're gonna get BS anyway)
[01:16:47] eam: btw when I say faster it's less than 1% soooo just use sift if you like it
[01:17:04] eam: kinda amazing that a go app is getting that kind of speed to be honest
[01:17:16] knamehost: has joined #ruby
[01:17:40] ellisTAA: has joined #ruby
[01:17:42] rshetty: has joined #ruby
[01:17:50] pipework: I'll look more into that mmap thing. I mean, I know grep options. sift has nicer interface if I were to learn either grep or sift from scratch.
[01:18:28] eam: I bet if someone added the parallelism into gnu grep it'd get significantly faster than sift -- but unless it's >2x I don't care much
[01:18:54] txdv: has left #ruby: ()
[01:20:06] eam: ... I take that back, most of sift is just Cgo and inlined C
[01:20:19] havenwood: it seems i usually end up turning to mdfind or locate the second grep and friends are slow
[01:20:21] pipework: eam: Whale, in-file parallelism or would gnu parallel be enough?
[01:20:24] eam: well, a tantalizing thought while it lasted
[01:20:36] eam: pipework: I suspect adding parallelism by any means would do it
[01:20:46] jdawgaz: has joined #ruby
[01:20:48] pipework: eam: You're sure you didn't see any human sacrifice in the source?
[01:20:49] eam: the details probably matter less as the dataset grows in size
[01:21:34] eam: maybe some day safe languages will be fast *eyes rust*
[01:22:41] beauby: has joined #ruby
[01:22:51] raazdaan: has joined #ruby
[01:25:01] pipework: life is such
[01:25:52] RobertBirnie: has joined #ruby
[01:27:37] mag42c: has joined #ruby
[01:29:07] Thomas-0725: has joined #ruby
[01:30:33] EmeraldExplorer: has joined #ruby
[01:30:44] inteq: has joined #ruby
[01:31:02] DenSchub: has joined #ruby
[01:31:46] bruce_lee: has joined #ruby
[01:35:25] aspiers: has joined #ruby
[01:35:50] alexdunne: has joined #ruby
[01:35:51] hxegon: has joined #ruby
[01:36:43] swgillespie: has joined #ruby
[01:40:19] tmtwd: has joined #ruby
[01:43:27] lacrymology: has joined #ruby
[01:44:04] Puck6633: has joined #ruby
[01:44:44] jdawgaz: has joined #ruby
[01:45:25] dopamean_: has joined #ruby
[01:45:25] quazimodo: has joined #ruby
[01:47:21] Skull0Inc: has joined #ruby
[01:48:48] ledestin: has joined #ruby
[01:48:53] stardiviner: has joined #ruby
[01:49:58] SamGerber: has joined #ruby
[01:51:10] ElFerna: has joined #ruby
[01:51:57] tkuchiki: has joined #ruby
[01:52:33] ekinmur: has joined #ruby
[01:53:59] tubuliferous_: has joined #ruby
[01:54:46] hughjasss: has joined #ruby
[01:55:10] Igorshp: has joined #ruby
[01:55:52] Maletor: has joined #ruby
[01:55:54] darix: https://www.youtube.com/watch?v=PorfLSr3DDI
[01:57:36] davedev24: has joined #ruby
[01:58:56] devbug_: has joined #ruby
[01:59:16] diegoaguilar: has joined #ruby
[01:59:48] h99h9h88: has joined #ruby
[02:00:26] ElFerna: has joined #ruby
[02:00:28] alexdunne: has joined #ruby
[02:05:36] l_tonz: has joined #ruby
[02:05:54] l_tonz: has joined #ruby
[02:07:32] rbennacer: has joined #ruby
[02:10:38] freerobby: has joined #ruby
[02:11:27] juanpablo__: has joined #ruby
[02:15:49] ElFerna: has joined #ruby
[02:17:19] paradisaeidae: has joined #ruby
[02:17:41] AccordLTN: has joined #ruby
[02:17:50] mary5030: has joined #ruby
[02:19:28] jdawgaz: has joined #ruby
[02:19:58] mary5030: has joined #ruby
[02:20:10] cwong_on_irc: has joined #ruby
[02:20:56] cwong_on_irc: has joined #ruby
[02:22:55] roxtrongo: has joined #ruby
[02:23:57] shortdudey123: has joined #ruby
[02:27:00] leafybasil: has joined #ruby
[02:27:27] rickmasta: has joined #ruby
[02:28:19] AccordLTN: has joined #ruby
[02:29:21] Oatmeal: has joined #ruby
[02:29:38] m3_del: has joined #ruby
[02:30:35] axisys: has joined #ruby
[02:30:36] mary5030: has joined #ruby
[02:31:14] ddv: has joined #ruby
[02:31:16] Maletor: has joined #ruby
[02:35:47] rshetty: has joined #ruby
[02:41:20] h99h9h88: has joined #ruby
[02:41:44] c_nick: has joined #ruby
[02:41:51] swgillespie: has joined #ruby
[02:42:52] DiCablo: has joined #ruby
[02:43:13] Maletor: has joined #ruby
[02:45:03] RegulationD: has joined #ruby
[02:45:48] DiCablo: has left #ruby: ()
[02:46:10] GnuYawk: has joined #ruby
[02:47:07] cmoney: has joined #ruby
[02:47:11] Oatmeal: has joined #ruby
[02:47:54] dc_: has joined #ruby
[02:51:18] c_nick: i found in ruby the Constants and Static Variables are nearly the same
[02:52:17] c_nick: u can reinitialize the constants and all it does is throw up a warning while Static by definition needs to have the capability to reinitialize just wont require an object / class instance
[02:53:06] moeabdol: has joined #ruby
[02:54:00] finisherr: has joined #ruby
[02:55:26] Nanuq: has joined #ruby
[02:55:56] Ox0dea: c_nick: Could you give an example of your interpretation of "static variable"?
[02:57:20] Bloomer: has joined #ruby
[02:57:27] aspiers: has joined #ruby
[02:57:28] baweaver: has joined #ruby
[02:57:48] c_nick: static as in like C++ - class variables
[02:57:53] FungalRaincloud: has joined #ruby
[02:58:01] Oatmeal: has joined #ruby
[02:58:05] c_nick: so in ruby thats @@
[02:59:32] Ox0dea: Ah, yeah, that's probably the best analogy.
[03:00:12] c_nick: Ox0dea: your scaring me now :P
[03:00:37] favadi: has joined #ruby
[03:00:42] Ox0dea: "wont require an object" threw me a little.
[03:01:20] Ox0dea: In a sense, class variables are instance variables on singleton classes, but we can't instantiate those, so the relationship doesn't actually exist.
[03:02:10] arescorpio: has joined #ruby
[03:02:11] c_nick: Ox0dea: yes.
[03:02:21] SenpaiSilver: has joined #ruby
[03:04:06] Ox0dea: c_nick: How do you figure class variables "need to have the capability to reinitialize" by definition?
[03:04:55] nycjv321: has joined #ruby
[03:05:23] DiCablo: has joined #ruby
[03:05:27] jenrzzz: has joined #ruby
[03:06:06] avahey: has joined #ruby
[03:06:09] Ox0dea: http://git.io/vWbNC
[03:06:26] Ox0dea: There must be a good reason for that signature, but it's shitting in my cereal right now.
[03:06:50] c_nick: Ox0dea: for me a constant is something i cannot modify or should not modify which a class variable can be re assigned different values if required. I will use a class variable for URLS (which can change later on) but a constant would be like a REGEX or something similar (though this may change too but seldom chances)
[03:08:11] Ox0dea: c_nick: Sure, that's a decent grokking of the thing, but your wording was a little strange.
[03:08:42] benlieb: has joined #ruby
[03:08:47] c_nick: hehe yeah i type in a hurry i should read before pressing enter :D
[03:09:13] eam: a constant "shouldn't change" in ruby just like a constant "shouldn't change" in C++
[03:09:28] eam: in that it's possible in both, though ill-advised :)
[03:10:46] Ox0dea: >> ARGV << 42 # Oh, hey, no warning.
[03:10:47] ruboto: Ox0dea # => [42] (https://eval.in/458984)
[03:10:47] Oatmeal: has joined #ruby
[03:11:18] gregf: has joined #ruby
[03:11:26] c_nick: i thought it did pop out a warning
[03:11:42] c_nick: perhaps ruby version specific
[03:11:43] eam: warning on assignment, not on modifying the value it references
[03:12:31] krz: has joined #ruby
[03:12:48] l_tonz: has joined #ruby
[03:13:09] roxtrongo: has joined #ruby
[03:13:12] eam: >> [ARGV.object_id, (ARGV << 42; ARGV.object_id)]
[03:13:13] ruboto: eam # => [539583730, 539583730] (https://eval.in/458985)
[03:13:26] Feyn: has joined #ruby
[03:18:56] darkf: has joined #ruby
[03:21:35] FungalRaincloud: has left #ruby: ()
[03:21:40] FungalRaincloud: has joined #ruby
[03:22:02] hmsimha_: has joined #ruby
[03:22:34] raazdaan: has joined #ruby
[03:22:59] devbug_: does a dsl for defining objects + relationships (i.e. collections, collections-thru, etc.) exist completly detached from the idea of databases?
[03:23:50] devbug_: to rephrase, I want to compose objects with properties and in hierarchies to stay DRY
[03:24:11] devbug_: my deep trawls have yet to produce anything remotely similar to what I described
[03:24:28] devbug_: the closest, which is still far away, is datamapper--if that makes any sense
[03:24:47] segy: has joined #ruby
[03:24:51] DiCablo: has joined #ruby
[03:26:52] CBX: has joined #ruby
[03:27:20] arooni: has joined #ruby
[03:28:39] fedexo: has joined #ruby
[03:28:46] leafybasil: has joined #ruby
[03:29:17] Ox0dea: devbug_: How close does ECS get?
[03:29:18] CCBX: has joined #ruby
[03:32:49] mordocai: has joined #ruby
[03:32:58] kp666: has joined #ruby
[03:35:02] ivanskie: has joined #ruby
[03:35:23] devbug_: Ox0dea: as in an entity component system?
[03:35:25] jmonreal_: has joined #ruby
[03:35:29] sphex: has joined #ruby
[03:35:30] Ox0dea: devbug_: Yes, that one.
[03:35:35] devbug_: No, not close.
[03:35:39] devbug_: Think, like:
[03:35:52] jmonreal_: when using the json module, how can I tell JSON.parse to take the nil as 0 ?
[03:36:31] Ox0dea: jmonreal_: You can't; you'll have to modify the resultant Hash.
[03:36:37] The_Phoenix: has joined #ruby
[03:37:59] jmonreal_: like if value equal null then zero
[03:39:53] Ox0dea: >> require 'json'; JSON.parse('{"a": null, "b": null}').map { |k, v| [k, v.nil? ? 0 : v] }.to_h # jmonreal_
[03:39:54] ruboto: Ox0dea # => {"a"=>0, "b"=>0} (https://eval.in/458986)
[03:40:50] Ox0dea: That'll only work for the first level, though; you'll need to "deep map" if your JSON is nested.
[03:41:31] mary5030: has joined #ruby
[03:43:00] devbug_: Ox0dea: https://gist.github.com/mtwilliams/110a2fbdc643582690fb
[03:44:18] devbug_: Ox0dea: think some sort of schema-type thing
[03:44:25] Ox0dea: A database, you say?
[03:44:29] axiomatic_345: has joined #ruby
[03:44:32] devbug_: Not a database.
[03:44:37] rshetty: has joined #ruby
[03:44:43] devbug_: Completely detached from the idea of that.
[03:45:15] devbug_: I'm refactoring Ryb, and this is exactly what I need
[03:45:24] devbug_: an ORM-like DSL to keep my code dry
[03:46:17] Ox0dea: Looks delicious.
[03:46:24] devbug_: does this not exist?!
[03:48:11] devbug_: well, i guess I'm going to write it then
[03:49:04] Ox0dea: devbug_: What're you going to call it?
[03:49:09] devbug_: Ox0dea: pour
[03:49:16] devbug_: you know, you pour concrete
[03:49:20] Ox0dea: devbug_: No, this new paradigm you've discovered.
[03:49:35] devbug_: Is this really a paradigm?
[03:49:51] Antiarc: has joined #ruby
[03:49:57] devbug_: I'm open to suggestions o_o
[03:50:10] Ox0dea: What did that bush ever do to you?
[03:50:33] rshetty: has joined #ruby
[03:52:44] m3_del: has joined #ruby
[03:53:52] snath: has joined #ruby
[03:57:01] Maletor: has joined #ruby
[03:57:27] subscope: has joined #ruby
[03:58:01] houhoulis: has joined #ruby
[03:59:28] mordocai: has joined #ruby
[04:00:11] juanpablo__: has joined #ruby
[04:00:42] gener1c: has joined #ruby
[04:01:06] alexdunne: has joined #ruby
[04:01:39] Ox0dea: What fundamental misconception do I need disabused of? https://eval.in/458987
[04:01:53] Eiam_: has joined #ruby
[04:02:41] dc_: has joined #ruby
[04:02:43] m3_del: has joined #ruby
[04:03:33] snath: has left #ruby: ("Leaving")
[04:03:50] l_tonz: has joined #ruby
[04:04:16] agent_white: disabused... that's fancy talk, city boy.
[04:04:20] agent_white: I'll keep it.
[04:05:29] cmoney: has joined #ruby
[04:05:43] Ox0dea: Says the feller what uses a nominative comma on the Internet.
[04:06:56] devbug_: now i get _why
[04:06:59] beast: has joined #ruby
[04:07:05] rshetty: has joined #ruby
[04:07:25] devoldmx: has joined #ruby
[04:07:43] agent_white: devbug_: You realized the battlefield named nil? :)
[04:07:54] agent_white: s/realized/found/
[04:08:08] devbug_: Woah, we're gettin' meta.
[04:08:10] l_tonz: has joined #ruby
[04:08:57] benaiah: has left #ruby: ("WeeChat 0.4.2")
[04:09:13] joneshf-laptop: has joined #ruby
[04:09:13] devbug_: Ox0dea: I contend that this is not a new paradigm.
[04:09:17] braincrash: has joined #ruby
[04:09:44] diegoaguilar: has joined #ruby
[04:10:25] cmoney: has joined #ruby
[04:10:33] l_tonz: has joined #ruby
[04:15:12] h99h9h88: has joined #ruby
[04:19:10] astrobunny: has joined #ruby
[04:22:01] minimalism: has joined #ruby
[04:25:19] nertzy: has joined #ruby
[04:25:40] yashinbasement: has joined #ruby
[04:26:52] gix: has joined #ruby
[04:27:23] Igorshp: has joined #ruby
[04:28:12] terminalrecluse: has joined #ruby
[04:30:51] craysiii: has joined #ruby
[04:33:54] mordocai: has joined #ruby
[04:37:28] d34th4ck3r: has joined #ruby
[04:37:55] duncannz: has joined #ruby
[04:39:07] rshetty: has joined #ruby
[04:41:02] bmalum: has joined #ruby
[04:45:24] sosorry: has joined #ruby
[04:45:49] RegulationD: has joined #ruby
[04:55:41] Tombk: has joined #ruby
[04:58:49] favadi: has joined #ruby
[05:00:41] leafybasil: has joined #ruby
[05:02:53] Tombk: has left #ruby: ()
[05:05:29] jatb: has joined #ruby
[05:09:18] cwong_on_irc: has joined #ruby
[05:09:55] cwong_on_irc: has joined #ruby
[05:10:26] cwong_on_irc: has joined #ruby
[05:11:00] cwong_on_irc: has joined #ruby
[05:15:02] devoldmx: has joined #ruby
[05:17:18] nemo_: has joined #ruby
[05:20:54] rshetty_: has joined #ruby
[05:22:42] slash_nick: has joined #ruby
[05:24:40] bhorn1|away: has joined #ruby
[05:25:02] towski_: has joined #ruby
[05:25:10] sshuff|gone: has joined #ruby
[05:25:44] ericwood: has joined #ruby
[05:26:27] conrfrmn: has joined #ruby
[05:26:58] rshetty: has joined #ruby
[05:27:41] lorn: has joined #ruby
[05:27:43] to_json: has joined #ruby
[05:27:44] to_json: has joined #ruby
[05:27:44] sparr: has joined #ruby
[05:30:37] rshetty: has joined #ruby
[05:31:57] dfinninger: has joined #ruby
[05:33:27] rshetty: has joined #ruby
[05:33:57] towski_: has joined #ruby
[05:39:48] rshetty_: has joined #ruby
[05:40:41] SylarRuby: has joined #ruby
[05:42:42] dionysus69: has joined #ruby
[05:43:38] devbug: has joined #ruby
[05:45:19] Maletor: has joined #ruby
[05:45:47] favadi: has joined #ruby
[05:48:01] swgillespie: has joined #ruby
[05:48:56] juanpablo__: has joined #ruby
[05:52:10] moeabdol: has joined #ruby
[05:55:02] devoldmx: has joined #ruby
[05:55:14] lxsameer: has joined #ruby
[05:55:15] lxsameer: has joined #ruby
[05:55:15] swgillespie: has joined #ruby
[06:00:41] astrobunny: has joined #ruby
[06:00:47] arup_r: has joined #ruby
[06:01:25] leafybasil: has joined #ruby
[06:01:50] alexdunne: has joined #ruby
[06:03:31] Ox0dea: I don't normally post pictures of code, but this is scarcely deserving of the title. http://i.imgur.com/94jou4v.png
[06:03:41] Ox0dea: baweaver: I went too far this time.
[06:04:39] baweaver: oi, you're not going to make me type that all are you?
[06:06:05] Ox0dea: Can you imagine?
[06:06:08] Ox0dea: https://eval.in/459020
[06:07:19] baweaver: ....you didn't
[06:07:20] tlarevo: has joined #ruby
[06:07:57] baweaver: you made a sinatra app
[06:08:04] Ox0dea: I made a Sinatra app.
[06:09:23] jenrzzz: has joined #ruby
[06:09:31] Oog: has joined #ruby
[06:09:38] roxtrongo: has joined #ruby
[06:10:22] agent_white: Ox0dea: Is it as pretty as they say?
[06:10:29] Ox0dea: https://eval.in/458987 made me briefly consider using something else, but I found a loophole easily enough.
[06:10:41] Ox0dea: agent_white: Pardon?
[06:10:53] Maletor: has joined #ruby
[06:11:42] agent_white: Ox0dea: I've just never used Sinatra... heard good things. :)
[06:12:01] Ox0dea: agent_white: I think you missed the prelude to this exchange. :P
[06:12:09] baweaver: So you derived 60 and 1 so far. Probably ASCII again
[06:12:22] Ox0dea: baweaver: Not a good start.
[06:12:55] baweaver: how do you figure?
[06:13:38] agent_white: Ox0dea: Probably. I'll... find one of the exits... /me bumps into folks
[06:13:39] jackjackdripper: has joined #ruby
[06:13:45] Ox0dea: >> ___=(_=' '=~/$/)*_+_+_/((__=$$/$$)+__); [_, __, ___] # baweaver
[06:13:46] ruboto: Ox0dea # => [10, 1, 115] (https://eval.in/459024)
[06:14:14] baweaver: >> _=' '=~/$/
[06:14:15] ruboto: baweaver # => 10 (https://eval.in/459025)
[06:14:17] Ox0dea: agent_white: Sinatra is usually a treat to use, but not the way I've done this time around.
[06:14:24] Ox0dea: Click the links for a laugh?
[06:14:50] baweaver: >> 10 * 10 + 10
[06:14:51] ruboto: baweaver # => 110 (https://eval.in/459026)
[06:14:51] kerunaru: has joined #ruby
[06:14:57] l_tonz: has joined #ruby
[06:15:42] skade: has joined #ruby
[06:16:47] rshetty: has joined #ruby
[06:16:51] baweaver: how is it 115?
[06:16:56] towski_: has joined #ruby
[06:17:47] Ox0dea: >> 10 * 10 + 10 + 10 / (1 + 1)
[06:17:48] ruboto: Ox0dea # => 115 (https://eval.in/459028)
[06:18:19] baweaver: >> 10 * 10 + 10 + 10
[06:18:20] ruboto: baweaver # => 120 (https://eval.in/459029)
[06:18:30] l_tonz: has joined #ruby
[06:18:48] tmtwd: has joined #ruby
[06:19:04] baweaver: are parens evaluated out of order or something or am I just too asleep right now?
[06:19:26] Radar: PEMDAS, maybe.
[06:19:29] Ox0dea: Only one of the parens is for grouping; the other is to capture an assignment.
[06:20:00] baweaver: it's still grouped though
[06:20:06] ruboto: baweaver # => 2 (https://eval.in/459031)
[06:20:07] BTRE: has joined #ruby
[06:20:12] Ox0dea: Holy shit!
[06:20:36] mclee_: has joined #ruby
[06:20:39] baweaver: ACTION is confused
[06:20:50] Radar: >> 10 * 10 + 10 + (10 / (1 + 1))
[06:20:51] ruboto: Radar # => 115 (https://eval.in/459032)
[06:20:55] Radar: Does that help your brain?
[06:21:04] xaa: has joined #ruby
[06:21:19] Radar: (100) + (10) + (5)
[06:21:32] Radar: almost hometime
[06:21:37] l_tonz: has joined #ruby
[06:22:02] Ox0dea: baweaver: Well, don't go running it and spoil the surprise. >:)
[06:22:03] chrissonar: has joined #ruby
[06:22:13] agent_white: baweaver: You must be. I was thinking about when we were talking about 1 == 1 == 1... 15 or so hours ago. Two days of no sleep is probably not good.
[06:22:22] baweaver: it'll take me a while
[06:22:37] Ox0dea: There's... considerable weirdness going on in there.
[06:23:20] Ox0dea: I almost shit when I realized I needed a W.
[06:23:45] Ox0dea: But then I just tacked it on, shifted some thangs around, and all was well.
[06:23:51] dhjondoh: has joined #ruby
[06:24:47] last_staff: has joined #ruby
[06:25:09] tlarevo: has joined #ruby
[06:25:13] rshetty: has joined #ruby
[06:27:27] rshetty: has joined #ruby
[06:28:27] nemo__: has joined #ruby
[06:32:06] baweaver: send as a callable proc
[06:32:45] Ox0dea: Praised (blamed?) be Mon_Ouie.
[06:33:04] subscope: has joined #ruby
[06:39:35] l_tonz: has joined #ruby
[06:40:40] baweaver: some type of odd send table
[06:41:14] Ox0dea: I thought you liked Lisp?
[06:41:32] baweaver: I get where it's headed a bit
[06:41:42] naftilos76: has joined #ruby
[06:44:07] baweaver: so blank string is like a kernel call?
[06:46:04] rshetty: has joined #ruby
[06:46:12] Ox0dea: baweaver: Aye, Kernel methods are private methods on Object.
[06:46:28] Ox0dea: >> ''.send :rand
[06:46:29] ruboto: Ox0dea # => 0.2306887606376492 (https://eval.in/459039)
[06:46:45] DoubleMalt: has joined #ruby
[06:46:51] RegulationD: has joined #ruby
[06:47:19] yardenbar: has joined #ruby
[06:47:44] baweaver: aliasing ___ to get
[06:48:24] rshetty: has joined #ruby
[06:48:37] Ox0dea: I didn't want to have to. :<
[06:48:55] ruboto: baweaver # => 0 (https://eval.in/459040)
[06:49:11] Musashi007: has joined #ruby
[06:49:53] Ox0dea: I also hoped that #not_found being the only route would work as a catch-all without having to explicitly redirect, but it's good that it doesn't.
[06:49:56] baweaver: at the routes
[06:50:21] baweaver: well, GET /
[06:50:26] skade: has joined #ruby
[06:50:49] tagrudev: has joined #ruby
[06:51:06] yfeldblum: has joined #ruby
[06:51:42] Ox0dea: The original marble did have several routes, but I don't mind my food touching.
[06:52:36] yfeldblum: has joined #ruby
[06:53:15] rshetty_: has joined #ruby
[06:53:54] baweaver: getting the params from the binding receiver
[06:54:22] baweaver: not sure about the :_
[06:54:23] last_staff: has joined #ruby
[06:55:35] Ox0dea: That'd be the param.
[06:55:48] Ox0dea: You're dangerously good at this...
[06:55:57] l_tonz: has joined #ruby
[06:58:21] Pupp3tm4st3r: has joined #ruby
[06:58:33] baweaver: send delete_at to the array with true with param as an integer
[06:58:41] baweaver: (not sure what that does yet)
[06:59:03] tlarevo: has joined #ruby
[07:00:36] kerunaru: has joined #ruby
[07:01:13] Ox0dea: Not sure whence came `true`.
[07:02:07] baweaver: isn't $. 0?
[07:02:39] baweaver: ...did I do that backwards too
[07:04:13] Ox0dea: $. is 0 where you're reading, yes.
[07:04:41] baweaver: so an array of false
[07:06:20] skade: has joined #ruby
[07:06:50] baweaver: so if the param is 0 it does something, otherwise redirects back to root with more items
[07:06:53] baweaver: or something like that
[07:07:36] diegoaguilar: has joined #ruby
[07:07:40] shpoont: has joined #ruby
[07:07:57] baweaver: https://gist.github.com/baweaver/cc0b8aea562366e18bc3 - well, got a good ways through
[07:08:00] baweaver: but sleepy time
[07:09:45] Ox0dea: baweaver: You're so close!
[07:09:52] baweaver: if there are params do something with them, else what I haven't gotten to yet.
[07:09:59] n0xff: has left #ruby: ()
[07:10:06] Ox0dea: eval.in's syntax highlighter went crazy; you've got the same code ~3 times.
[07:10:27] baweaver: ACTION shrugs
[07:10:29] karapetyan: has joined #ruby
[07:10:32] baweaver: I'll clean it up later/
[07:12:41] Ox0dea: Well, it'd be impolite to finish the race for you, but nor can I congratulate you at the penultimate turn.
[07:12:47] Ox0dea: Really, though, you've not lost your touch.
[07:14:53] pu22l3r_: has joined #ruby
[07:15:00] codecop: has joined #ruby
[07:15:11] Soda: has joined #ruby
[07:15:17] duncannz: has joined #ruby
[07:17:17] rshetty: has joined #ruby
[07:17:35] alexdunne: has joined #ruby
[07:17:56] benlieb: has joined #ruby
[07:18:04] janelleb: has joined #ruby
[07:20:19] baweaver: browser crash of some sort?
[07:20:31] devoldmx: has joined #ruby
[07:20:39] baweaver: you're redirecting with a form input that autofocuses, but past there I'd need to think more.
[07:20:47] baweaver: and definitely too tired to get that right
[07:20:56] baweaver: seems like some syntax errors too
[07:21:15] baweaver: you had a line break in parens towards the end
[07:22:25] Ox0dea: Line breaks in parens are fine.
[07:22:43] Pupp3tm4_: has joined #ruby
[07:23:24] baweaver: updated gist to progress
[07:23:32] Ox0dea: Au revoir.
[07:24:39] pepperbreath: has left #ruby: ()
[07:32:51] User458764: has joined #ruby
[07:35:34] johnny56: has joined #ruby
[07:36:30] karapetyan: has joined #ruby
[07:37:42] juanpablo__: has joined #ruby
[07:39:57] tlarevo: has left #ruby: ()
[07:40:56] andikr: has joined #ruby
[07:41:02] rshetty: has joined #ruby
[07:43:54] TheHodge: has joined #ruby
[07:45:38] nemo_: has joined #ruby
[07:46:28] trautwein: has joined #ruby
[07:46:29] Pumukel: has joined #ruby
[07:50:20] devbug_: has joined #ruby
[07:52:19] aganov: has joined #ruby
[07:56:11] jas02: has joined #ruby
[08:02:14] matp_: has joined #ruby
[08:03:17] tujv: has joined #ruby
[08:04:13] aufi: has joined #ruby
[08:06:25] dionysus69: has joined #ruby
[08:07:35] fuukin_cuunt: has joined #ruby
[08:08:58] Ox0dea: Everything okay?
[08:09:06] ta: has joined #ruby
[08:09:26] apeiros: fuukin_cuunt: please change your nick.
[08:10:15] l_tonz: has joined #ruby
[08:10:46] apeiros: !ban fuukin_NlGGER no
[08:10:51] apeiros: !ban fuukin_NlGGER !P no
[08:10:52] ChanServ: +b fuukin_NlGGER!*@*
[08:10:52] ChanServ: ChanServ kicked fuukin_NlGGER: no
[08:11:17] apeiros: +b *!*@*24.7.59.225
[08:11:23] apeiros: -o apeiros
[08:11:29] jenrzzz: has joined #ruby
[08:13:06] TomyWork: has joined #ruby
[08:14:49] skade: has joined #ruby
[08:15:00] SOLDIERz: has joined #ruby
[08:15:36] rshetty: has joined #ruby
[08:17:08] leafybasil: has joined #ruby
[08:21:11] Pupp3tm4st3r: has joined #ruby
[08:21:39] edwinvdgraaf: has joined #ruby
[08:23:08] niemcu: has joined #ruby
[08:27:20] SCHAAP137: has joined #ruby
[08:28:21] big|bad|wolf: has joined #ruby
[08:31:38] purplexed-: has joined #ruby
[08:36:58] ruurd: has joined #ruby
[08:37:02] allomov: has joined #ruby
[08:37:18] Musashi007: has joined #ruby
[08:38:30] rshetty: has joined #ruby
[08:40:50] rshetty: has joined #ruby
[08:41:07] shinenelson: has joined #ruby
[08:41:14] ivanskie: has joined #ruby
[08:41:50] michae: has joined #ruby
[08:42:51] timonv: has joined #ruby
[08:43:30] solars: has joined #ruby
[08:44:12] howdoi: has joined #ruby
[08:45:04] dionysus69: has joined #ruby
[08:46:19] johnny56: has joined #ruby
[08:46:27] DoubleMalt: has joined #ruby
[08:47:37] RegulationD: has joined #ruby
[08:48:02] Musashi007: has joined #ruby
[08:48:05] adaedra: Ah, I forgot this :D
[08:48:32] nemo_: has joined #ruby
[08:49:45] adaedra: I'll remove it, that was not supposed to stay :D
[08:50:20] apeiros: IMO it's fine. up to you :)
[08:50:21] Kedare: has joined #ruby
[08:50:44] skade: has joined #ruby
[08:50:45] adaedra: I'll see if it gets old or abused
[08:51:23] adaedra: Ugh, I wanted to work on so much things yesterday I ended doing nothing.
[08:53:13] mgorbach: has joined #ruby
[08:55:14] Stan: has joined #ruby
[08:56:06] Peg-leg: has joined #ruby
[08:56:45] alexdunne: has joined #ruby
[08:56:46] duncannz: has joined #ruby
[08:57:09] startupality: has joined #ruby
[08:57:12] felixr: has joined #ruby
[08:57:35] duncannz: has joined #ruby
[08:59:10] Ox0dea: Where do data go when they leave the cloud?
[09:00:19] roxtrongo: has joined #ruby
[09:00:50] apeiros: they'll rain down on you
[09:00:57] yashinbasement: has joined #ruby
[09:01:07] mark2: has joined #ruby
[09:01:42] beauby: has joined #ruby
[09:02:29] shevy: Ox0dea You can check-out any time you like, but you can never leave
[09:03:44] Hounddog: has joined #ruby
[09:04:19] trash: has joined #ruby
[09:04:31] lipoqil: has joined #ruby
[09:04:31] chthon: has joined #ruby
[09:04:41] trash: hi, how would I write this condition: if current time is between 0900 and 1700?
[09:04:48] haxrbyte: has joined #ruby
[09:05:07] apeiros: Time.now.between?(time_at_0900, time_at_1700)
[09:05:18] trash: sounds easy
[09:05:21] apeiros: see Time.mktime/.local to construct a time.
[09:05:22] kimegede: has joined #ruby
[09:05:27] trash: apeiros: Thanks
[09:05:54] apeiros: the annoying part is constructing the other two times. but it's still trivial.
[09:06:17] haxrbyte_: has joined #ruby
[09:07:26] joonty: has joined #ruby
[09:09:00] Ox0dea: >> (9...17).include? Time.now.hour # trash
[09:09:01] ruboto: Ox0dea # => true (https://eval.in/459101)
[09:09:07] Ox0dea: I think that's more what you're going for?
[09:09:22] Pupeno: has joined #ruby
[09:09:57] apeiros: I'd still use between?, though.
[09:10:07] apeiros: Time.now.hour.between?(9, 17)
[09:10:09] trash: Ox0dea: ha, that even works.
[09:10:20] adaedra: Ox0dea: that includes 17:30, though.
[09:10:26] apeiros: (though that's not equivalent to Ox0dea's code, it'd be equivalent to (9..17).include?, i.e. including 17)
[09:10:31] Ox0dea: adaedra: No, it doesn't.
[09:10:43] adaedra: ah, didn't see the last .
[09:10:56] apeiros: ah, right, you'd have to use .between?(9, 16)
[09:10:57] adaedra: but that exlides 17:00
[09:11:27] marr: has joined #ruby
[09:11:29] l_tonz: has joined #ruby
[09:12:32] Ox0dea: There's reason enough to suspect that's what trash wants.
[09:13:22] trash: I think technically between?(9, 16) would be the most exact. That would be 0900..1659
[09:13:35] Ox0dea: As would mine.
[09:13:36] trash: Which is what people usually mean with 9x5.
[09:13:58] Ox0dea: ... creates a Range that excludes the end.
[09:14:16] Ox0dea: >> (1...4).to_a
[09:14:17] ruboto: Ox0dea # => [1, 2, 3] (https://eval.in/459102)
[09:15:07] trash: The between is slightly easier to read though (except the 1659 thing) because of using slightly less syntactic sugar.
[09:15:45] jcp: has joined #ruby
[09:15:56] Ox0dea: trash: It's true enough that #between? is more intention-revealing in this case, but there was no sugar in my suggestion.
[09:16:37] trash: Ox0dea: Depends on whom you are asking :-) I think the (x...y) might count as syntactic sugar.
[09:16:57] trash: (always wrong about that)
[09:17:05] Ox0dea: That's just how to create Ranges in Ruby, though...
[09:17:09] adaedra: Isn't it syntaxic sugar for Range.new ?
[09:17:12] Gnubie_: has joined #ruby
[09:17:15] Ox0dea: Well, but, come on.
[09:17:33] ddv: syntaxic? :p
[09:17:50] Ox0dea: >> 9..16 === Time.new.hour # trash: This is the "sweet" approach, but wipe it from your memory.
[09:17:51] ruboto: Ox0dea # => bad value for range (ArgumentError) ...check link for more (https://eval.in/459103)
[09:17:52] sindork: has joined #ruby
[09:18:08] Ox0dea: The precedence of `..` is the worst thing ever.
[09:18:54] rshetty: has joined #ruby
[09:19:00] trash: Ox0dea: Thanks for further input :)
[09:20:11] g3funk: has joined #ruby
[09:20:31] phatypus: has joined #ruby
[09:21:14] Ox0dea: trash: Sure thing. Just as something to file away, `===` is the "case equality" operator; it's the "equals on steroids" that makes Ruby's `when` clauses so nice, but you're advised against using it outside of that very narrow scope.
[09:21:40] Ox0dea: (Because tradition or something.)
[09:21:41] shevy: he likes to suggest things you should not use!
[09:21:56] Ox0dea: It's like reverse psychology.
[09:22:12] bmalum_: has joined #ruby
[09:22:36] rshetty: has joined #ruby
[09:22:47] trash: This talk was the classical moment how people know IRC and love. :D
[09:23:09] skade: has joined #ruby
[09:23:12] adaedra: I thought IRC was all about idling.
[09:23:23] trash: And telling people what not to use.
[09:23:34] adaedra: Don't use IRC.
[09:23:48] Ox0dea: trash: Don't write to-do apps in Sinatra: http://i.imgur.com/94jou4v.png
[09:23:49] trash: Why would I? I'm myself a person like Ox0dea.
[09:23:57] trash: s/a/am a/
[09:24:08] ljarvis: Ox0dea is not a person
[09:24:29] adaedra: Ox0dea: This is at the same time beautiful and revolting.
[09:24:31] trash: Ox0dea: Just looks like the code you gave me above already.
[09:24:51] Ox0dea: trash: Except there isn't a single letter or number to be found.
[09:24:52] gregoriokusowski: has joined #ruby
[09:25:06] ljarvis: finally got my internet switched on this morning; it was almost worth the wait http://i.imgur.com/pKcpR5Y.png
[09:25:33] DEA7TH: has joined #ruby
[09:25:49] adaedra: Ox0dea: isn't that a X in the 3rd line from bottom?
[09:25:50] Ox0dea: ljarvis: Are you sharing the love?
[09:25:55] Ox0dea: adaedra: Hm?
[09:26:06] ljarvis: Ox0dea: nope, I'm a jealous lover
[09:26:07] trash: ljarvis: Pfft, http://www.speedtest.net/my-result/4786214149
[09:26:25] ljarvis: why you gotta go and do that
[09:26:26] juanpablo__: has joined #ruby
[09:26:33] ljarvis: I was on 30 at best at my previous house
[09:26:36] ljarvis: so I'm happy
[09:26:41] rshetty: has joined #ruby
[09:26:58] Ox0dea: adaedra: Oh, right. I replaced it with BALLOT X: https://eval.in/459020
[09:27:05] Ox0dea: I trust that doesn't count as an alphanumeric.
[09:27:19] apeiros: trash: oy, nice upspeed
[09:27:34] ljarvis: yeah that upload is nice, that'll happen in the UK in about 20 years
[09:27:46] ljarvis: we'll have 50gb/s down and 3mb/s up
[09:27:47] nfk|laptop: has joined #ruby
[09:27:58] Miron: has joined #ruby
[09:27:59] trash: apeiros: Slightly cheated though. We sell and maintain our own dark fibre with upstreams.
[09:28:11] apeiros: dark fibre?
[09:28:11] everbot: has joined #ruby
[09:28:14] trash: That should have been 10Gb up/down.
[09:28:54] agit0: has joined #ruby
[09:29:12] trash: apeiros: https://en.wikipedia.org/wiki/Dark_fibre
[09:29:46] trash: It's rather a matter of how fast this notebook and the other server is.
[09:30:42] apeiros: thanks @ trash
[09:30:47] apeiros: and you work in berlin?
[09:30:52] rshetty: has joined #ruby
[09:30:56] arup_r: has joined #ruby
[09:30:57] Pupeno: has joined #ruby
[09:30:57] Pupeno: has joined #ruby
[09:31:00] trash: and live and was born
[09:31:14] joncol: has joined #ruby
[09:31:17] apeiros: and now you throttle connection between 9:00 and 17:00? :D
[09:31:55] trash: We share the connection between all the customers in this house too
[09:32:02] trash: Like 1000 people I guess
[09:32:10] adaedra: apeiros: it's all about being efficient.
[09:32:50] trash: Oh, misread your question
[09:32:53] leafybasil: has joined #ruby
[09:33:07] apeiros: I was just kidding
[09:33:12] trash: apeiros: No, the code is used to send SMS sensu notifications for some new kind of setup only between 9x5
[09:34:25] joncol: Hi, Is there a way to convert a method to a proc and later using instance_eval to run this proc with another `self`? When I try using `p = obj.method(:fun)`, and call it with `another_obj.instance_eval(&p)`, the `self` in `fun` is still `obj` and not `another_obj`...
[09:35:36] Ox0dea: >> 1.method(:to_s).unbind.bind(42).call # joncol
[09:35:37] ruboto: Ox0dea # => "42" (https://eval.in/459112)
[09:35:52] Ox0dea: The Method class has #to_proc, but UnboundMethod does not. :<
[09:36:05] zotherstupidguy: has joined #ruby
[09:37:16] trash: When I'm already here. What is the best way to write the condition: when a settings['notifications'] hash has nine_to_five value and that value is true, do something? settings['notifications'].include? 'nine_to_five' and settings['notifications']['nine_to_five'] == true can be probably shortend.
[09:37:46] apeiros: just use settings['notifications']['nine_to_five'] == true
[09:37:50] joncol: Ox0dea: Thanks!!
[09:37:54] Ox0dea: joncol: Sure thing.
[09:37:55] apeiros: if the hash doesn't have that key, it'll be nil
[09:38:01] apeiros: which is not == true
[09:38:28] trash: Doesn't seem to work. NoMethodError: undefined method `[]' for nil:NilClass
[09:38:34] xaa: has left #ruby: ()
[09:38:41] apeiros: that means settings does not have ['notifications']
[09:38:50] trash: Ah wait, missed that in irb.
[09:38:55] apeiros: and then settings['notifications'].include? 'nine_to_five' won't work either
[09:38:59] trash: Yeah, works.
[09:41:07] joncol: Ox0dea: but it seems the object that you bind to must be a kind_of? the method's original class... That seems a severe limitation? I basically don't use any of my surroundings in the method, so I expected it to be possible to execute it in another context.
[09:42:08] Ox0dea: joncol: It sounds like you might be going about $thing the wrong way; say a little more about what you're trying to do?
[09:42:37] Ox0dea: Do you know about #send?
[09:43:13] apeiros: joncol: yes, it is a severe limitation. the question is why it is a method in the first place if you don't use the receiver.
[09:43:57] tvw: has joined #ruby
[09:44:53] stardiviner: has joined #ruby
[09:45:32] teclator: has joined #ruby
[09:45:40] BadRobot: has joined #ruby
[09:46:20] mdst: has joined #ruby
[09:46:30] joncol: Ox0dea: I'm doing an RPC server thing, where I want to register callbacks that should be invoked when an RPC call is received. I pass these callbacks in as blocks to the `register` function. But for esthetical reasons I want to have the callbacks be ordinary methods in a class. Everything worked fine when passing in the callbacks using `&method(:name)`, but I now got the added requirement that I need to acces
[09:46:36] joncol: s the RJR Request object inside my callbacks (to get a hold of the client's IP). Thus I thought a nice solution would be to rebind `self` to the Request object, to access its instance variables.
[09:46:52] dionysus70: has joined #ruby
[09:46:53] hyperdrive: has joined #ruby
[09:47:18] BadRobot: has left #ruby: ()
[09:47:26] Ox0dea: joncol: There's #instance_variable_get, mind.
[09:47:42] Ox0dea: Probably better to use that than sticking things where they mightn't belong.
[09:47:49] astrobunny: has joined #ruby
[09:47:51] zwdr: has joined #ruby
[09:49:56] vigintas: has joined #ruby
[09:50:03] bluOxigen: has joined #ruby
[09:50:03] jenrzzz: has joined #ruby
[09:50:34] joncol: Ox0dea: OK, I'll look into that.
[09:52:00] Ox0dea: joncol: That Ruby doesn't let you stick any ol' object in some other object's context is scarcely a "severe limitation"; I suspect it has saved many a foot.
[09:52:35] joncol: Ox0dea: It seems a bit strange, since Ruby lets you do almost everything else :)
[09:53:07] Ox0dea: joncol: I think I see more or less where you're coming from and what you're going for, but your aesthetic considerations throw a proverbial spanner into the works.
[09:53:17] shevy: Ox0dea, look ruby just got faster! https://github.com/ruby/ruby/blob/trunk/ChangeLog#L8
[09:53:31] tlarevo: has joined #ruby
[09:54:08] terlar: has joined #ruby
[09:54:14] Ox0dea: shevy: Indeed it did. I wonder about this one: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L287
[09:54:25] Ox0dea: It's like really aggressive inlining or something.
[09:55:04] joncol: Ox0dea: Well, I guess a solution for my problem would be to define the callbacks as "free" Procs, and then call them with whatever `self` fits. Just feels a bit ugly to have all those procs "laying about" at the point where I define them.
[09:55:21] Ox0dea: joncol: Aye, I was just about to suggest something along those lines.
[09:55:30] shevy: I shall call Koichi Sasada Mr. Speed henceforthwith and Nobu the patch monster
[09:55:31] Pupp3tm4_: has joined #ruby
[09:55:45] Ox0dea: Procs are mighty nifty, but they're really not where you should be sticking all your behavior in an object-oriented language.
[09:56:38] rodfersou: has joined #ruby
[09:56:57] Ox0dea: shevy: http://cdn.oreillystatic.com/en/assets/1/event/59/Japan%20On%20Rails%20Presentation.pdf
[09:56:57] tlarevo: has joined #ruby
[09:57:50] senayar: has joined #ruby
[09:57:51] senayar: has joined #ruby
[09:59:19] Ox0dea: I don't know if that's meant to be interpreted as ko1's nickname being "the Ruby VM", but it's better than Mr. Speed. :P
[10:00:22] dionysus69: has joined #ruby
[10:00:39] terlar: has joined #ruby
[10:01:24] tlarevo: has joined #ruby
[10:01:47] ibouvousaime: has joined #ruby
[10:03:11] devoldmx: has joined #ruby
[10:04:58] beauby: has joined #ruby
[10:07:27] htmldrum: has joined #ruby
[10:07:55] tlarevo: has joined #ruby
[10:08:12] CloCkWeRX: has joined #ruby
[10:08:43] jxs_: has joined #ruby
[10:08:47] ruurd: has joined #ruby
[10:09:16] leafybasil: has joined #ruby
[10:09:22] skade: has joined #ruby
[10:09:54] pandaant: has joined #ruby
[10:10:25] leafybasil: has joined #ruby
[10:10:28] bmalum: has joined #ruby
[10:10:28] tlarevo: has joined #ruby
[10:11:13] codecop: has joined #ruby
[10:12:01] tlarevo: has joined #ruby
[10:12:27] l_tonz: has joined #ruby
[10:12:59] rshetty: has joined #ruby
[10:14:04] skade: has joined #ruby
[10:19:14] tlarevo_: has joined #ruby
[10:19:39] beauby: has joined #ruby
[10:20:26] rickmasta: has joined #ruby
[10:20:30] Igorshp: has joined #ruby
[10:20:57] User458764: has joined #ruby
[10:21:00] tlarevo: has joined #ruby
[10:23:51] tlarevo: has joined #ruby
[10:24:26] devyn: has joined #ruby
[10:25:07] jimms: has joined #ruby
[10:25:13] shredding: has joined #ruby
[10:26:13] tlarevo: has joined #ruby
[10:28:24] Cyther: has joined #ruby
[10:29:11] Ropeney: has joined #ruby
[10:29:20] tlarevo: has joined #ruby
[10:30:34] ldnunes: has joined #ruby
[10:30:42] tlarevo_: has joined #ruby
[10:31:50] zotherstupidguy: has joined #ruby
[10:32:08] terlar: has joined #ruby
[10:33:48] tomaz_b: has joined #ruby
[10:35:28] davedev24: has joined #ruby
[10:38:52] rshetty: has joined #ruby
[10:39:55] arup_r: has joined #ruby
[10:42:07] Azure: has joined #ruby
[10:43:13] zotherstupidguy: how to easily insert a line into a certain linenumber via standardlibrary?
[10:45:00] lacrymology: has joined #ruby
[10:45:42] Ox0dea: zotherstupidguy: You are not using a filesystem which supports arbitrary append.
[10:46:34] shevy: zotherstupidguy simplest way is to read in the file via File.readlines() then use array manipulation then save back
[10:46:38] tlarevo_: has joined #ruby
[10:48:32] RegulationD: has joined #ruby
[10:49:10] matp: has joined #ruby
[10:51:01] mikecmpbll: has joined #ruby
[10:51:16] cjk101010: has joined #ruby
[10:51:21] but3k4: has joined #ruby
[10:52:50] ibouvousaime: has joined #ruby
[10:55:36] Ulfalizer: has joined #ruby
[10:59:58] Thomas-0725: has joined #ruby
[11:01:02] niemcu: has joined #ruby
[11:02:02] ibouvousaime: has joined #ruby
[11:04:46] shadoi: has joined #ruby
[11:09:17] Ox0dea: Happy Boomtime. https://eval.in/459192
[11:10:45] ElFerna: has joined #ruby
[11:11:23] sanjayu: has joined #ruby
[11:11:55] elaptics: has joined #ruby
[11:12:00] adaedra: There's a fine line between genius and insane
[11:12:23] moeabdol1: has joined #ruby
[11:12:56] Ox0dea: I'm feeling... Discordian.
[11:13:25] rshetty: has joined #ruby
[11:13:31] lsmola: has joined #ruby
[11:13:52] SCHAAP137: has joined #ruby
[11:14:06] l_tonz: has joined #ruby
[11:14:33] _blizzy_: has joined #ruby
[11:15:10] juanpablo__: has joined #ruby
[11:15:44] big|bad|wolf: has joined #ruby
[11:15:54] ElFerna: has joined #ruby
[11:16:03] zenguy_pc: has joined #ruby
[11:16:41] Ox0dea: >> $, = ' n'; (['utter'] * 2).join # I confess that I'm an...
[11:16:42] ruboto: Ox0dea # => "utter nutter" (https://eval.in/459195)
[11:17:03] syath: has joined #ruby
[11:18:09] CloCkWeRX: has left #ruby: ()
[11:18:52] krisquigley: has joined #ruby
[11:19:50] yorickpeterse: don't make me lock you up in the basement again
[11:20:31] rikkipitt: has joined #ruby
[11:20:44] nhhagen: has joined #ruby
[11:20:49] erbesharat: has joined #ruby
[11:22:39] Ox0dea: >> g, i = 'genius', 'insane'; (g.chars & i.chars).each { |c| g.sub! c, ''; i.sub! c, '' }; i.bytes.reduce(:-) - g.bytes.reduce(:-) # adaedra: Fine indeed.
[11:22:40] ruboto: Ox0dea # => 1 (https://eval.in/459197)
[11:24:27] erbesharat: has joined #ruby
[11:26:07] [spoiler]: yorickpeterse: what if that is where they wanna be
[11:29:01] millerti: has joined #ruby
[11:30:10] stamina: has joined #ruby
[11:30:18] quazimodo: has joined #ruby
[11:30:53] platzhirsch: has joined #ruby
[11:31:30] [spoiler]: Ox0dea: I wasn't aware of `$,` being the default separator used by #join! I wasn't even aware `$,` was a thing
[11:31:36] sepp2k: has joined #ruby
[11:32:05] dc_: has joined #ruby
[11:32:20] ruurd: has joined #ruby
[11:34:21] Raboo: has joined #ruby
[11:34:52] cornerma1: has joined #ruby
[11:35:14] Ox0dea: [spoiler]: The things one learns in basements, eh?
[11:35:30] Ox0dea: &ri String#join
[11:35:30] `derpy: No results
[11:35:32] cyanide7: has joined #ruby
[11:35:38] Ox0dea: &ri Array#join
[11:35:38] `derpy: http://www.rubydoc.info/stdlib/core/Array#join-instance_method
[11:36:48] shevy: I wonder if Ox0dea is ever writing code that he also uses
[11:37:06] shevy: I know he has written about unicode snowmen before. or it was adaedra. or both
[11:37:14] rickmasta: has joined #ruby
[11:37:28] cyanide7: shevy: Why write code when you can just copy and paste stackoverflow?
[11:38:06] cyanide7: "I swear it's mine."
[11:38:30] Ox0dea: shevy: I'm running all kinds of code I wrote to use this very moment.
[11:38:36] Ox0dea: "Write once, run all day."
[11:38:38] adaedra: shevy: unicode snowman is mine, yes.
[11:38:56] Ox0dea: shevy: Rugen does much more than snowmen, mind; it's just that trio was a really good example.
[11:39:02] adaedra: that's a bad joke that went way to far.
[11:39:23] Ox0dea: I don't think it's funny that Ruby doesn't have named Unicode. :<
[11:39:24] cyanide7: Is anyone else caught in the issues of writing something to make a job easier, but it turns out that the time to write it takes longer than all the future time it would save?
[11:39:35] shevy: it ain't over until we have a game with unicode snowmen
[11:39:44] adaedra: shevy: code it.
[11:39:50] Ox0dea: !xkcd 1319 @ cyanide7
[11:40:05] ICantCook: has joined #ruby
[11:40:45] cyanide7: Ox0dea: that is my life in a nutshell.
[11:40:46] norc: has joined #ruby
[11:40:50] Ox0dea: !xkcd 1205 as well.
[11:41:19] norc: Why does rubocop suggest && and || over "and" and "or" ?
[11:41:33] Ox0dea: norc: Because the latter have weird precedence.
[11:41:37] adaedra: they have different precedence rules and are confusing.
[11:41:54] haxrbyte: has joined #ruby
[11:42:00] Ox0dea: norc: That you're "supposed to" use `and` and `or` for flow control should speak volumes.
[11:42:27] Ox0dea: http://devblog.avdi.org/2014/08/26/how-to-use-rubys-english-andor-operators-without-going-nuts/
[11:42:56] norc: Neat thanks
[11:43:15] Ox0dea: Speedy reader, eh?
[11:43:57] shevy: adaedra one day I shall!
[11:44:07] adaedra: yesterday you said tomorrow
[11:44:10] adaedra: just, do it
[11:44:10] cyanide7: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[11:44:16] [spoiler]: Ox0dea re basement: :D LOL Yeah
[11:44:58] adaedra: I wonder if anyone ever think of doing these lines as a motivational speech. It could go well. Maybe in front of a green background, but I don't know why.
[11:45:07] elaptics: has joined #ruby
[11:45:31] [spoiler]: adaedra: you mean like Shia LaBleh did?
[11:46:16] DEA7TH: has joined #ruby
[11:46:16] Ox0dea: Actual Cannibal Shia Laboof: https://www.youtube.com/watch?v=o0u4M6vppCI
[11:46:44] Ox0dea: Never mind that the narrator reminds you of tenderlove.
[11:46:49] [spoiler]: I am perpetually doing things tomorrow and it's working out so far
[11:47:09] norc: Ox0dea: Interesting. That whole thing made me discover an unidentified bug.
[11:47:09] adaedra: [spoiler]: [spoiler] it doesn't works forever.
[11:47:16] Ox0dea: [spoiler]: http://i.imgur.com/Ufbr5ej.gif
[11:47:17] norc: ACTION is thankful to ruboto
[11:47:20] adaedra: (no, that is not a double hl)
[11:47:23] s00pcan: has joined #ruby
[11:47:25] norc: rubocop I mean.
[11:47:58] Cyther_: has joined #ruby
[11:48:35] adaedra: norc: hopefully you have tests to catch bugs.
[11:49:01] charliesome: has joined #ruby
[11:49:15] Ox0dea: ACTION wonders how to correctly test DecayingBooleans.
[11:49:18] norc: adaedra: rake stat gives me a 1:1.9 code to test ratio.
[11:49:23] norc: Might not be stellar, but its something. :)
[11:49:37] Icey: has joined #ruby
[11:49:40] norc: Next up Ill put in simplecov to ensure better test coverage.
[11:49:51] adaedra: test size does not say much.
[11:50:03] YaknotiS: has joined #ruby
[11:50:17] adaedra: I could write `expect(String.new).to be_a(String)` a thousand times.
[11:50:45] Ox0dea: norc: Be advised that "pleasing the compiler" does not a (necessarily) healthy codebase make.
[11:50:54] jenrzzz: has joined #ruby
[11:51:59] [spoiler]: adaedra, Ox0dea: LOL I was joking, tbf. I don't procrastinate that often, but when I do, I procrastinate that thing like a champion
[11:52:16] norc: Ox0dea: You mean I shouldn't overdo it with rubocop?
[11:52:26] Ox0dea: norc: Just don't become a slave to the metagame.
[11:52:51] [spoiler]: Ox0dea: what if norc enjoys coding BDSM? Eh, eh?
[11:52:55] adaedra: You can write code that ruboto likes, you can also write code which works.
[11:53:24] [spoiler]: adaedra: rubucop, don't involve ruboto into this! It is innocent!
[11:53:27] adaedra: s/ruboto/rubocop/
[11:53:44] apeiros: ruboto doesn't like code.
[11:53:51] apeiros: it's codeophobic
[11:53:55] adaedra: Isn't it made of it?
[11:54:02] adaedra: That would be like hating blood.
[11:54:12] apeiros: but there's people who have a phobia of blood
[11:54:25] ruurd: has joined #ruby
[11:54:30] [spoiler]: I just don't use rubocop, because it gave me too much gief about something, then I tried fixing it and it looked like a bird took a shit over that portion of the code
[11:54:31] apeiros: hemophobia :)
[11:54:51] SylarRuby: has joined #ruby
[11:55:05] adaedra: [spoiler]: I try to put a fine line between do what rubocop says, fix rubocop settings to not bother me, and just fuck it.
[11:55:06] norc: Ox0dea: Oh absolutely not. There is quite a few things I dont agree with (in particular some methods that are 11-15 lines long, but that is only because of splitting arguments over a couple lines)
[11:55:34] [spoiler]: >> puts "Oh no, code! *Exceptions*"
[11:55:35] ruboto: [spoiler] # => Oh no, code! *Exceptions* ...check link for more (https://eval.in/459209)
[11:55:48] [spoiler]: i think I got it wrong
[11:56:36] adaedra: [spoiler]: also, look at all this code on codeclimate that has Fs that are still used. Pleasing automated tools are not always the priority.
[11:56:43] [spoiler]: adaedra: When I see rubocop comments all over someone's code I just go "Oh god..."
[11:57:13] rshetty: has joined #ruby
[11:57:15] sdothum: has joined #ruby
[11:57:20] adaedra: yeah, those are horrid.
[11:57:28] adaedra: I stopped with rubocop personally.
[11:58:24] Icey: has joined #ruby
[11:58:37] shevy: I did not like rubocop but it can autocorrect code!!! that's the single best feature it has
[11:59:26] Ox0dea: > correct
[11:59:30] adaedra: I don't like automated processes messing with my code.
[12:00:12] [spoiler]: shevy: I have a love-hate relationship with anything autocorrect
[12:00:57] [spoiler]: "bought some bats" "bangs" "bandanas" "DUCKING BANANAS"
[12:01:19] Icey: has joined #ruby
[12:01:28] Ulfalizer: is mkmf supposed to respect CC from the environment when compiling test programs with e.g. have_func()? looking into the mkmf.log file generated for a run, it says "gcc -I/home/ ... ", even though CC is set.
[12:01:32] ElFerna: has joined #ruby
[12:01:40] Icey: has joined #ruby
[12:01:56] Ox0dea: Ulfalizer: Did you export it?
[12:02:13] Igorshp: has joined #ruby
[12:02:16] Ulfalizer: Ox0dea: yep
[12:02:36] [spoiler]: what is CC set to?
[12:02:42] [spoiler]: is it set to GCC?
[12:03:12] Icey: has joined #ruby
[12:03:12] Icey: has joined #ruby
[12:03:55] devoldmx: has joined #ruby
[12:03:57] Ox0dea: Ulfalizer: Try using something like `$CFLAGS="CC=clang"` in your `extconf.rb`.
[12:05:07] norc: adaedra: Idk, I feel pretty strong about JSLint - it definitely is a huge benefit imo.
[12:05:09] Ulfalizer: [spoiler]: CC=i586-mgu-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/...
[12:05:32] Ulfalizer: it's set up by Yocto (a distribution builder thingy)
[12:05:36] blackoperat: has joined #ruby
[12:06:13] z4ph0d: has joined #ruby
[12:06:33] Ulfalizer: Ox0dea: unfortunately i'm working off a gem file with 'gem install'. i unpacked it to check what it was doing though, and it has RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] in it.
[12:06:38] Pupp3tm4st3r: has joined #ruby
[12:06:41] Ox0dea: norc: RuboCop only detects 135 offenses in this code: http://i.imgur.com/94jou4v.png
[12:06:44] Ulfalizer: i'm a ruby noob, so i learn as i go :)
[12:06:49] Ox0dea: Anything less than ??? is simply unacceptable.
[12:07:01] dEPy: has joined #ruby
[12:07:12] Ox0dea: Ulfalizer: Ah, well, that certainly should've done it.
[12:07:13] shadoi: has joined #ruby
[12:07:38] Pupp3tm4_: has joined #ruby
[12:07:46] Ulfalizer: it's for nokogiri btw
[12:08:14] atomical: has joined #ruby
[12:09:13] misterxavier: has joined #ruby
[12:09:18] juanpablo__: has joined #ruby
[12:09:31] [spoiler]: not sure then
[12:10:13] [spoiler]: Ox0dea: that image looks beautiful, you're just a primitive ape who doesn't appreciate ascii art!
[12:10:23] [spoiler]: Ox0dea: oh that's code.
[12:11:01] Igorshp: has joined #ruby
[12:11:12] Ox0dea: For varying definitions of "beautiful", "ape", "art", and "code", I couldn't agree with you more.
[12:11:42] spider-mario: has joined #ruby
[12:11:49] shevy: Ox0dea is a primitive ape :)
[12:14:49] l_tonz: has joined #ruby
[12:14:50] Ox0dea: ACTION checks to see that he still has his basal ganglia.
[12:15:00] Ox0dea: shevy: You're right!
[12:16:28] gusTester: has joined #ruby
[12:17:04] Pupp3tm4st3r: has joined #ruby
[12:17:19] civil_: has joined #ruby
[12:17:43] rbennacer: has joined #ruby
[12:17:53] ruurd: has joined #ruby
[12:18:28] erbesharat: has joined #ruby
[12:18:45] adaedra: Ox0dea: pics or it didn't happen.
[12:18:57] Ox0dea: This is gonna hurt.
[12:19:33] Ulfalizer: CC=thisshouldfail gem install nokogiri-1.6.6.2.gem succeeds too, when doing some local testing
[12:20:00] Ulfalizer: it builds the extension as part of the install process
[12:20:12] Ulfalizer: so looks like CC is being ignored for some reason :/
[12:20:14] Ox0dea: I vaguely remember learning why this doesn't work, but I've since forgotten. :< https://eval.in/459227
[12:20:14] Pupp3tm4_: has joined #ruby
[12:21:10] CloCkWeRX: has joined #ruby
[12:21:51] gusTester: has left #ruby: ()
[12:22:58] yeticry: has joined #ruby
[12:25:09] Ox0dea: Ulfalizer: I just realized I suggested using CC in CFLAGS...
[12:25:22] Ox0dea: I must help you get this sorted as penance.
[12:25:48] rbennacer: has joined #ruby
[12:26:29] Ulfalizer: yeah, thought it looked a bit odd when i looked at it again :)
[12:27:14] Ulfalizer: would be very appreciated. i'm stumbling around on a couple of days' worth of ruby knowledge.
[12:28:04] ESpiney: has joined #ruby
[12:29:14] prestorium: has joined #ruby
[12:29:22] nsuke: has joined #ruby
[12:29:49] sdfgsdfg: has joined #ruby
[12:30:15] synthroid: has joined #ruby
[12:31:07] ruurd: has joined #ruby
[12:32:01] AMERICAN_PSYCHO: has joined #ruby
[12:32:16] Pupp3tm4st3r: has joined #ruby
[12:32:16] Ulfalizer: oh, wait, it's failing now during local testing
[12:32:27] Ulfalizer: when giving it a broken CC
[12:32:58] Ulfalizer: so i need to investigate the build environment more. very odd since i've verified three times now that it's set there too. :/
[12:33:23] Ulfalizer: (and exported)
[12:33:48] AlexRussia: has joined #ruby
[12:33:52] blubjr: has joined #ruby
[12:33:53] trash: has left #ruby: ()
[12:35:41] Ulfalizer: ah... it doesn't fail during the tests though. only later while building it.
[12:35:52] Ulfalizer: so there's still an issue
[12:36:14] rbennacer: has joined #ruby
[12:36:16] charliesome: has joined #ruby
[12:36:33] Ulfalizer: that is, CC isn't respected by have_func() and pals
[12:36:56] rbennacer: has joined #ruby
[12:37:04] Renich: has joined #ruby
[12:38:00] Pupp3tm4_: has joined #ruby
[12:38:34] Ulfalizer: so the updated question would be how to specify the compiler options used by e.g. have_func() when compiling the test program for the test. it doesn't seem to use CC.
[12:41:11] erik_p: has joined #ruby
[12:42:44] norc: Ox0dea: If only our corporate firewall would allow imgur.
[12:43:03] Ox0dea: norc: Count your blessings.
[12:44:17] trabulmonkee: has joined #ruby
[12:44:35] dionysus69: has joined #ruby
[12:44:45] ruurd: has joined #ruby
[12:45:04] erik_p: So I'm trying to define a method so that by_three?(n) returns true if it's divisible by 3, and false if it doesn't. I tried with this without success: https://gist.github.com/anonymous/ebcf78d3236e8952d6d3
[12:46:13] Quandl: has joined #ruby
[12:46:31] ytti: [1] pry(main)> class Fixnum; def by_three?; self % 3 == 0; end; end
[12:46:31] ytti: => :by_three?
[12:46:31] ytti: [2] pry(main)> 3.by_three?
[12:46:34] ytti: [3] pry(main)> 4.by_three?
[12:46:36] ytti: => false
[12:46:39] ytti: [4] pry(main)>
[12:47:39] dikaio: has joined #ruby
[12:48:24] Ox0dea: ~ $ CC=clang ruby -e 'p RbConfig.expand "$(CC)"'
[12:48:32] Ox0dea: Ulfalizer: ^ I've no idea, mate. :<
[12:48:41] shevy: ytti! my favourite finnish song https://www.youtube.com/watch?v=4om1rQKPijI
[12:49:07] prestorium_: has joined #ruby
[12:49:22] RegulationD: has joined #ruby
[12:49:31] Ox0dea: Ulfalizer: It seems mkmf is desperate to hold onto the environment in which Ruby itself was compiled.
[12:49:59] erik_p: Ytti, that's lots of stuff I've not learned yet :o But thanks anyways
[12:50:21] shevy: Erik__ you never modified a core class in ruby yet?
[12:50:41] erik_p: I've not :o
[12:50:49] ytti: shevy, cool
[12:51:00] Ox0dea: Erik__: Right now is the time you learn the modulus operator.
[12:51:06] erik_p: I began like 2 days ago with ruby AND programming :D
[12:51:15] erik_p: What is that?
[12:51:27] Ox0dea: >> 17 % 5 # Erik__
[12:51:28] ruboto: Ox0dea # => 2 (https://eval.in/459271)
[12:51:45] Ox0dea: 17 divided by 5 is 3r2; the % operator gives you the remainder.
[12:52:02] shevy: Erik__ ok, in ruby you can modify behaviour of everything at runtime
[12:52:21] norc: shevy: Almost everything. :D
[12:52:30] Ox0dea: norc: What'd you have in mind?
[12:52:44] shevy: well you still have to satisfy the parser of course
[12:52:52] Ox0dea: Syntax isn't behavior.
[12:53:03] erik_p: I've seen % used before to give a remainder, yeah
[12:53:15] shevy: see .?foo versus the time before .?foo was possible
[12:53:43] northfurr: has joined #ruby
[12:53:52] banister: has joined #ruby
[12:54:01] havenwood: >> 17.modulo(5).zero?
[12:54:02] ruboto: havenwood # => false (https://eval.in/459272)
[12:54:21] norc: Ox0dea: Well Ruby still has keywords.
[12:54:32] Ox0dea: norc: That's still syntax.
[12:54:48] Ox0dea: I was asking which behavior you reckon we're not able to change.
[12:55:03] norc: Ox0dea: Well, only because that is the implementation. I mean there is no document or ISO that defines the Ruby syntax
[12:55:10] Ox0dea: Yes, there is.
[12:55:11] shevy: syntax limits everything
[12:55:28] norc: Ox0dea: I thought the MRI itself is the standard.
[12:55:29] havenwood: norc: Ruby does have an ISO.
[12:55:37] Ox0dea: http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579
[12:55:45] erik_p: Are you guys like working as programmers?
[12:55:45] Ulfalizer: Ox0dea: ah, okay, thanks for the help at least
[12:55:46] tkuchiki: has joined #ruby
[12:55:54] norc: Damn that must have gone by me entirely.
[12:55:58] dionysus69: has joined #ruby
[12:56:00] shevy: who here read the ISO spec
[12:56:12] norc: Id rather know: Who here *paid* for the ISO spec
[12:56:38] Ox0dea: I... looked for it in #bookz.
[12:56:51] ruurd: has joined #ruby
[12:57:32] jas02: has joined #ruby
[12:57:50] voker57: has joined #ruby
[12:58:05] havenwood: norc: I downloaded the draft ISO before they finalized and started charging.
[12:58:20] havenwood: norc: Not that I ever read it.
[12:58:21] shevy: did he just download it... or did he also read it
[12:58:24] norc: havenwood: Heh.
[13:01:40] _blizzy_: has joined #ruby
[13:02:16] gusTester1: has joined #ruby
[13:02:19] yalue: has joined #ruby
[13:02:33] Ox0dea: >> ObjectSpace.each_object(String).grep(/core#\w+/)
[13:02:34] ruboto: Ox0dea # => ["core#hash_merge_kwd", "core#hash_merge_ptr", "core#hash_merge_ary", "core#hash_from_ary", "core#se ...check link for more (https://eval.in/459278)
[13:02:47] RobertBirnie: has joined #ruby
[13:02:53] Ox0dea: norc: As an example, we used to be able to override these methods to do very strange things.
[13:03:33] shevy: so I sense sadness
[13:03:54] shevy: rubyists are tinker toys!
[13:04:18] JDiPierro: has joined #ruby
[13:06:04] erik_p: Will ruby replace other popular alternative languages in the future?
[13:06:41] tkuchiki: has joined #ruby
[13:06:49] shevy: Erik__ which ones?
[13:06:52] jhass: Erik__: will chainsaw's replace hammers in the future?
[13:07:10] shevy: it takes a long time for a programming language to fade away
[13:07:20] lkba: has joined #ruby
[13:07:24] charliesome: has joined #ruby
[13:07:31] Ox0dea: shevy: Which programming languages are truly gone for good?
[13:07:41] erik_p: Hm, perhaps not replace
[13:07:44] shadoi: has joined #ruby
[13:07:58] shevy: Ox0dea I don't know all of them, I am sure you'll find lots of those in the 1950s
[13:08:11] Ox0dea: shevy: ALGOL is still very much with us.
[13:08:37] Ox0dea: In spirit, if nothing else.
[13:08:40] shevy: which ALGOL
[13:09:01] Ox0dea: ALL THE ALGOLs!
[13:09:02] shevy: https://en.wikipedia.org/wiki/ALGOL_58
[13:09:35] shevy: ok let's work through: https://en.wikipedia.org/wiki/Timeline_of_programming_languages
[13:09:41] _aeris_: has joined #ruby
[13:10:01] dionysus69: has joined #ruby
[13:10:03] mikecmpbll: today, i learnt about DATA
[13:10:16] shevy: HAHAHA "Freiburger Code"
[13:10:26] allomov: has joined #ruby
[13:10:28] jas02_: has joined #ruby
[13:10:34] sankaber: has joined #ruby
[13:11:03] erik_p: Is it true that Ruby is harder to learn than for example Java, PHP, JavaScript, Python etc?
[13:11:19] jhass: who said so?
[13:11:33] erik_p: Articles n stuff
[13:11:34] shevy: Erik__ said so!
[13:11:47] ccooke: I found it a very easy language to learn
[13:11:50] jhass: Erik__: example?
[13:11:55] erik_p: Lemme find 'em
[13:11:59] Ox0dea: mikecmpbll: Do you know that it's actually just a File handle into your script?
[13:12:15] ccooke: I do think that some of the similarities make whichever of ruby or python you learn *second* a little bit more difficult, but not hugely so.
[13:12:35] mikecmpbll: Ox0dea: yeah. i was confused as hell by this gist: https://gist.github.com/jurisgalang/7637348#file-totp_demo-rb
[13:12:57] mikecmpbll: cus i'd never seen DATA before!
[13:13:05] hughjasss: ruby = harder than java?!
[13:13:11] Guest53: has joined #ruby
[13:13:22] Ox0dea: mikecmpbll: That's not quite how I meant, though.
[13:13:29] Ox0dea: `DATA.rewind.read.display` is a free quine.
[13:13:46] shevy: is this useful
[13:13:53] BadRobot: has joined #ruby
[13:13:55] mikecmpbll: i don't even know what that is
[13:14:05] Ox0dea: I like the part where you know how to explore your curiosity.
[13:14:24] treehug88: has joined #ruby
[13:14:24] apeiros: Ox0dea: wait, are you saying DATA.rewind rewinds to before __END__?
[13:14:59] charliesome: has joined #ruby
[13:15:07] pu22l3r: has joined #ruby
[13:15:07] DiCablo: has joined #ruby
[13:15:34] davedev24: has joined #ruby
[13:15:37] l_tonz: has joined #ruby
[13:16:00] apeiros: fuckme, it does. not sure I find that good???
[13:16:08] apeiros: it's DATA.tap(&:rewind), though
[13:16:23] mikecmpbll: what a funny little nugget.
[13:16:40] davedev24: has joined #ruby
[13:18:12] BadRobot: hi, can I ask a very quick JRuby quesiton (although I am certain its more of ruby)
[13:18:34] yorickpeterse: BadRobot: #jruby is probably a better place to ask JRuby questions
[13:18:41] yeticry: has joined #ruby
[13:18:44] erik____: has joined #ruby
[13:18:54] erik____: Okay guys, found it
[13:18:55] erik____: http://www.leonardteo.com/2012/07/ruby-on-rails-vs-php-the-good-the-bad/
[13:19:12] erik____: "My main beef with Ruby on Rails is that it actually has a steep learning curve. Do not believe the hype that says that it is really easy. They will show you podcasts where you build a simple blog application using scaffolding and voila! Instant website. Nothing could be further from the truth. Rails is seen to be easy because they have automated many things in the framework ??? this does not make it easy to understand."
[13:19:20] dopamean_: has joined #ruby
[13:19:23] BadRobot: yorickpeterse: they are a bit in a whole different world, no one uselly replies there, but its about the gems env options
[13:19:41] apeiros: Erik____: and another one who uses "steep learning curve" wrong :)
[13:19:51] sgambino: has joined #ruby
[13:20:33] BadRobot: what does -rubygems option does?
[13:20:37] jhass: Erik____: Comparing a framework to a language, great
[13:20:38] Ox0dea: apeiros: It's the simplest thing that could possibly work, so why not?
[13:20:56] joonty: has joined #ruby
[13:21:00] cdg: has joined #ruby
[13:21:03] Ox0dea: BadRobot: The -r flag does a `require`, and `ubygems` is an "alias" to `rubygems`.
[13:21:07] apeiros: Ox0dea: because DATA is supposed to access data after __END__
[13:21:23] apeiros: Ox0dea: for that reason I don't expect to be able to rewind to before that token
[13:21:51] erik____: He also says Ruby uses lambdas, I thought only blocks were used?
[13:21:55] Ox0dea: apeiros: But why shouldn't you have that option?
[13:21:56] bigmac: has joined #ruby
[13:22:05] jhass: Erik____: given such a major misconception, I wouldn't give much on the authors words. And please don't repeat his mistake of equaling Rails and Ruby
[13:22:14] Ox0dea: Erik____: I think you would be much better served by sticking a toe in the water.
[13:22:17] BadRobot: Ox0dea: thank you kindly
[13:22:22] Ox0dea: BadRobot: Sure thing.
[13:22:33] Ox0dea: BadRobot: Cute, right? There's also `-run`.
[13:22:37] apeiros: Ox0dea: because it makes it harder to work with DATA as means to work with stuff after __END__
[13:23:00] Ox0dea: apeiros: How hard is it to store the initial seek position?
[13:23:06] apeiros: Ox0dea: that said, I don't like the way DATA works anyway. I prefer what I do in my Scriptfile gem (access any .rb's __END__ data)
[13:23:15] BadRobot: Ox0dea: oh so does the same thing?
[13:23:16] apeiros: Ox0dea: I expect ruby to do that for me.
[13:23:23] Ox0dea: apeiros: Sure, I do think local DATA would be nice.
[13:23:25] apeiros: there's tons of things which are "not hard"
[13:23:39] apeiros: yet I don't want to reinvent those wheels.
[13:23:53] TDJACR: has joined #ruby
[13:23:58] ruurd: has joined #ruby
[13:24:20] apeiros: iow, "is it hard?" is the wrong question
[13:24:21] zapata: has joined #ruby
[13:24:33] apeiros: the right question is: "is DATA only about the stuff after __END__ or not?"
[13:24:40] apeiros: if it is, rewinding to before __END__ is wrong.
[13:24:42] Ox0dea: >> 'un' == 'ubygems' # BadRobot
[13:24:43] ruboto: Ox0dea # => false (https://eval.in/459287)
[13:24:47] apeiros: if it isn't, well, then I like DATA even less.
[13:25:36] skade: has joined #ruby
[13:25:39] apeiros: Ox0dea: as for "how hard is it?" - the reverse is: "how hard is File.open(__FILE__)"?
[13:26:23] jhass: >> "rubygems" == "ubygems" # Ox0dea
[13:26:24] ruboto: jhass # => false (https://eval.in/459292)
[13:27:00] Ox0dea: jhass: You missed some context.
[13:27:13] dravine_: has joined #ruby
[13:27:18] jhass: Ox0dea: nah, I'm just nitpicking
[13:27:27] workmad3: has joined #ruby
[13:28:17] jimms: has joined #ruby
[13:30:26] Guest53: has joined #ruby
[13:30:46] Macaveli: has joined #ruby
[13:30:59] dionysus69: has joined #ruby
[13:32:36] tkuchiki: has joined #ruby
[13:33:40] tens0r: has joined #ruby
[13:33:57] mrchris: has joined #ruby
[13:35:28] Ox0dea: ~ $ egrep '(..)\1\1' words | tail -n+3 | paste -sd \
[13:35:30] Ox0dea: larararia logogogue ratatat ratatats unununium unununiums
[13:35:36] Ox0dea: shevy: You made me say "tinkerer" earlier, so I brought you these.
[13:35:46] duckpuppy: has joined #ruby
[13:35:50] jilya: has joined #ruby
[13:36:09] Ox0dea: Unununium is the Pluto of the periodic table.
[13:37:34] i8igmac: is there a way i can find the arrays that are reoccurring... almost like array.uniq
[13:37:53] dfinninger: has joined #ruby
[13:37:56] i8igmac: in order of most popular
[13:39:19] Peg-leg: has left #ruby: ()
[13:40:00] `tim`: has joined #ruby
[13:40:45] apeiros: i8igmac: Errno::ENOTENOUGHINFO
[13:40:56] rwilcox: has joined #ruby
[13:41:03] Ox0dea: I understood.
[13:41:14] Ox0dea: >> Errno::EDOOFUS
[13:41:15] ruboto: Ox0dea # => Errno::NOERROR (https://eval.in/459295)
[13:41:33] norc: i8igmac: [[1], [1], [2]].inject(Hash.new(0)) { |h,e| h[e] += 1; h }.select { |k,v| v > 1 }
[13:42:02] norc: Im sure you can go on from there.
[13:42:09] i8igmac: ill check it out
[13:42:45] n008f4g_: has joined #ruby
[13:42:50] apeiros: Ox0dea: so what's the definition of "most popular"? and "how deeply nested?" and "by what type of equality?"
[13:43:00] rshetty_: has joined #ruby
[13:43:08] apeiros: you're just making a tons of assumptions. but sure, fine. if it happens to fit.
[13:43:30] Ox0dea: >> [1,2,2,2,3,3].group_by(&:itself).sort_by { |k, v| -v.size }.map(&:first) # i8igmac
[13:43:31] ruboto: Ox0dea # => [2, 3, 1] (https://eval.in/459296)
[13:43:36] Ox0dea: Is that what you were looking for?
[13:44:07] i8igmac: that looks about right
[13:44:32] Ox0dea: Well, shit, I didn't realize you specified reoccurring arrays; I thought you might've mispoke and meant "elements".
[13:44:45] norc: Ox0dea: Oh wow. Now that is extremely readable.
[13:45:08] apeiros: it'll become even more readable in 2.3 iirc (#count_by)
[13:45:30] Ox0dea: norc: havenwood would've beat me to it; he quite likes `group_by(&:itself)`.
[13:45:41] Ox0dea: I don't blame 'im.
[13:45:41] i8igmac: im sorry, my understanding, the terminology is on a third grade reading level...
[13:46:04] i8igmac: i always appreciate your guys help
[13:46:17] i8igmac: i need to read a book
[13:46:20] cschorn_: has joined #ruby
[13:46:45] deject3d_: has joined #ruby
[13:47:18] cschorn_: has left #ruby: ()
[13:47:31] Ox0dea: i8igmac: Oh, hey, did you end up discovering `xdotool`?
[13:48:03] i8igmac: um, ill look into it
[13:48:33] elusiveother: has joined #ruby
[13:48:51] i8igmac: i have been looking for this
[13:49:10] Pupp3tm4st3r: has joined #ruby
[13:50:02] blubjr: what did ruby actually get from lisp, i hear people say lisp and smalltalk as influences often but now that im looking at ruby i see a lot of smalltalk and no lisp..
[13:50:48] norc: blubjr: It certainly did not get Lisps elegant weapons... for a more civilized age...
[13:52:04] Guest53: has joined #ruby
[13:52:25] existensil: has joined #ruby
[13:52:25] jenrzzz: has joined #ruby
[13:53:29] jimms: has joined #ruby
[13:53:56] Pupp3tm4st3r: has joined #ruby
[13:54:01] Ox0dea: >> ((((((()))))))
[13:54:02] ruboto: Ox0dea # => nil (https://eval.in/459303)
[13:54:09] Ox0dea: norc: Go try that in your favorite dialect. :P
[13:54:13] Ox0dea: blubjr: Do you know a Lisp well?
[13:54:30] deception1: has joined #ruby
[13:54:52] blubjr: cl and scheme
[13:55:09] Ox0dea: blubjr: So you're quite comfortable with the notion of closures, then?
[13:56:01] blubjr: thats hardly something to pin as a lisp feature
[13:56:53] malconis: has joined #ruby
[13:57:12] freerobby: has joined #ruby
[13:57:17] blubjr: closures = lisp doesnt make any more sense in 2015 than garbage collection = lisp
[13:58:19] CJKinni_: has joined #ruby
[13:58:35] malconis: has joined #ruby
[13:58:39] bmurt: has joined #ruby
[13:59:10] Ox0dea: blubjr: I suspect you also maintain that JavaScript has nothing to do with Scheme.
[13:59:19] decoponio: has joined #ruby
[13:59:57] raazdaan: has joined #ruby
[13:59:59] blubjr: i don't know very much about javascript
[14:00:22] shinnya: has joined #ruby
[14:00:37] havenwood: blubjr: Closure-Oriented Programming, sounds like let for lambda to me.
[14:00:40] valeriansaliou: has joined #ruby
[14:00:52] valeriansaliou: has joined #ruby
[14:01:13] valeriansaliou: has joined #ruby
[14:01:28] bweston: has joined #ruby
[14:02:00] pard: has joined #ruby
[14:02:02] bweston92: has joined #ruby
[14:02:08] pard: greetin's
[14:02:14] havenwood: pard: good mornin'
[14:02:31] Ox0dea: pard: How'd 'e do ya?
[14:02:44] rshetty: has joined #ruby
[14:02:58] Ox0dea: Erm, I don't think that's the right orthography.
[14:03:06] pard: kay o pard, kay o; cow-juice price byn low :)
[14:03:16] Ox0dea: I'll take ten.
[14:03:23] blubjr: its not homoiconic, it doesn't have restarts, its object system is completely different, correct me if im wrong
[14:03:32] blubjr: aren't closures just expected nowadays
[14:03:53] Ox0dea: blubjr: Closures fundamentally pervade the language.
[14:04:05] Ox0dea: That just isn't true of most others.
[14:04:09] pathrocle: has joined #ruby
[14:04:40] devoldmx: has joined #ruby
[14:04:45] blubjr: thats still a smalltalk bite anyway
[14:04:54] havenwood: "If ... you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
[14:05:21] ibouvousaime: has joined #ruby
[14:05:55] sigurding: has joined #ruby
[14:05:56] musou: has joined #ruby
[14:05:57] mikecmpbll: i dunno where to ask this, any ideas why in the reference implementation for TOTP codes they drop a bit off the first byte of the hash? https://tools.ietf.org/html/rfc6238
[14:06:09] pard: pardon my impertinence; i guess i've jumpd amid an actual discussion -- i had no intention to
[14:06:10] mikecmpbll: page 13: ((hash[offset] & 0x7f) << 24) | ...
[14:06:14] deject3d_: has left #ruby: ("Leaving...")
[14:06:18] mikecmpbll: the mask for the other bytes is 0xff
[14:06:42] kfrz: has joined #ruby
[14:07:02] rwilcox: has joined #ruby
[14:07:12] pard: hello :)
[14:07:20] mikecmpbll: they get 4 bytes from the hash longer hash, and then convert to binary, but in doing so drop a bit off the first of the four bytes :/
[14:07:24] nfk|laptop: has joined #ruby
[14:08:16] Ox0dea: mikecmpbll: They're dropping the first four bits.
[14:08:46] mikecmpbll: Ox0dea: where?
[14:09:03] Ox0dea: Gah, sorry. I'll get coffee.
[14:09:15] pard: sorry if what i'm going to ask sounds rather stupid; but, is there any way to download the whole gems corpus at once?
[14:09:16] shadoi: has joined #ruby
[14:09:22] allenn: has joined #ruby
[14:09:32] mikecmpbll: heh it's k, i've been poring over this code for ages, just about got my head around it and then this weirdness.
[14:09:35] Ox0dea: mikecmpbll: It must be to leave room for a sign bit.
[14:11:42] colli5ion: has joined #ruby
[14:11:49] deject3d_: has joined #ruby
[14:12:04] pard: (i'm ntending to use it for test purposes)
[14:12:44] Ox0dea: pard: https://gist.github.com/0x0dea/274eed988ad0addfc16b
[14:12:50] pard: thanks a lot
[14:12:56] pard: i'm on it
[14:13:18] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[14:14:35] pard: why now?
[14:14:40] jlebrech: has joined #ruby
[14:14:54] pard: i mean, _now_ why _now_? :)
[14:15:04] sankaber: has joined #ruby
[14:15:49] Pupp3tm4st3r: has joined #ruby
[14:16:21] umdstu: has joined #ruby
[14:16:24] elusiveother: has joined #ruby
[14:16:46] Ox0dea: pard: What sort of research are you doing that requires such a corpus?
[14:17:29] DiCablo: has joined #ruby
[14:17:46] umdstu: hey I'm trying to build an rpm for ruby-2.2.2 so that I can install ruby-2.2.2 in addition to 1.9.3 on the system... I used the --program-suffix option so the names would be different. but the libruby.so still conflixts. how do i rename that in the config?
[14:17:52] mag42c: has joined #ruby
[14:18:04] mrchris: anyone with ThinkingSphinx experience help me out with this question? http://stackoverflow.com/questions/33394874/thinkingsphinx-with-all-or-query
[14:18:52] pard: i've prototyped a parser
[14:18:57] beauby: has joined #ruby
[14:19:21] Ox0dea: You're so full of 1F4A9.
[14:19:43] pard: one 'F' for a 9?
[14:19:53] danel: has joined #ruby
[14:22:09] pard: got it :)
[14:22:36] pard: sugar honey iced turkey you meant
[14:22:52] ldnunes: has joined #ruby
[14:23:26] umdstu: no he meant she hit it tenderly
[14:23:44] Ox0dea: pard: Well, have I made some grievous error in my assessment of your character?
[14:24:12] pard: my dad calld me what approximated to your postulate
[14:24:19] Ox0dea: I quite enjoyed shitting in your cereal after remembering that I had that pipeline lying around somewhere.
[14:24:25] Ox0dea: > plz can dl all teh gemz
[14:24:28] Ox0dea: "You got it, fucker."
[14:24:49] umdstu: kind of wishing i saw the first half of this convo
[14:24:57] pard: .w convo
[14:25:18] umdstu: yours and his
[14:25:21] moeabdol1: has joined #ruby
[14:25:28] umdstu: is there a list of all ruby configure options?
[14:25:35] dopamean_: has joined #ruby
[14:26:14] umdstu: i need to give my libruby.so a suffix during configure
[14:26:22] dionysus69: has joined #ruby
[14:26:35] pard: ah thanks;
[14:26:59] pdoherty: has joined #ruby
[14:27:18] pard: the reason i actually asked was ".... Parser has been extensively tested; in particular, it parses almost entire Rubygems corpus. For every issue, a breakdown of affected gems is offered."
[14:27:31] chouhoulis: has joined #ruby
[14:27:55] CJKinni__: has joined #ruby
[14:28:12] pard: (in https://github.com/whitequark/parser)
[14:28:38] Pupp3tm4_: has joined #ruby
[14:29:16] pard: i was just wondering how has its creator testd it against "almost entire Rubygems corpus"
[14:29:35] ytti: automatically?
[14:29:45] ytti: use canonical parser
[14:29:47] ytti: use own parser
[14:29:50] ytti: compare for equality
[14:31:01] alexdunne: has joined #ruby
[14:31:20] slawrence00: has joined #ruby
[14:32:08] Ox0dea: umdstu: Looks like you want `--with-soname=foo`.
[14:33:09] pard: ytti, my question actually was : how to source test cases, in particular, how has the https://github.com/whitequark/parser creator has testd it against the Rubygems corpus
[14:33:10] mordocai: has joined #ruby
[14:33:17] Pupp3tm4st3r: has joined #ruby
[14:33:34] ESpiney_: has joined #ruby
[14:33:55] diegoaguilar: has joined #ruby
[14:34:07] Ox0dea: pard: I bet he downloaded all the gems.
[14:34:17] jobewan: has joined #ruby
[14:34:26] pard: that's what has actually baffled me -- how?
[14:34:30] aspiers: has joined #ruby
[14:34:37] Ox0dea: It's impossible.
[14:35:30] ytti: Ox0dea, why impossible?
[14:35:32] ytti: or even hard
[14:35:33] ytti: https://rubygems.org/gems
[14:35:42] ytti: seems trivial to me
[14:35:45] tenderlove: has joined #ruby
[14:35:54] Ox0dea: ytti: It is: https://gist.github.com/0x0dea/274eed988ad0addfc16b
[14:36:36] ytti: parallel and jq <3
[14:36:52] ytti: i wish parallel would ship standard in distributions
[14:37:15] pard: strange, it gave me 404
[14:38:36] umdstu: Ox0dea: thanks i'll take a look
[14:39:05] Ox0dea: umdstu: Godspeed.
[14:39:27] ruurd: has joined #ruby
[14:42:11] senayar: has joined #ruby
[14:42:32] pard: Ox0dea, thanks
[14:42:41] pard: ytti, thanks
[14:43:10] jonee: has joined #ruby
[14:44:26] rshetty: has joined #ruby
[14:45:56] bruno-: has joined #ruby
[14:46:10] aryaching: has joined #ruby
[14:47:04] rshetty: has joined #ruby
[14:47:06] gusTester1: has left #ruby: ()
[14:47:50] cdg: has joined #ruby
[14:48:23] acharnosh1: has joined #ruby
[14:49:06] rgtk: has joined #ruby
[14:49:23] podman: has joined #ruby
[14:49:25] dhjondoh: has joined #ruby
[14:49:47] rshetty: has joined #ruby
[14:49:47] dnomyar: has joined #ruby
[14:50:02] aryaching_: has joined #ruby
[14:50:15] RegulationD: has joined #ruby
[14:51:18] bruce_lee: has joined #ruby
[14:51:51] Regulati_: has joined #ruby
[14:52:11] rippa: has joined #ruby
[14:53:12] elusiveother: has joined #ruby
[14:53:13] shredding: has joined #ruby
[14:54:26] InternetFriend: has joined #ruby
[14:55:33] Jameser: has joined #ruby
[14:55:42] Channel6: has joined #ruby
[14:56:39] bryanray: has joined #ruby
[14:56:44] denver: has joined #ruby
[14:56:58] finisherr: has joined #ruby
[14:58:21] cdg: has joined #ruby
[14:58:46] dhjondoh: has joined #ruby
[15:00:11] aryaching: has joined #ruby
[15:00:38] tmtwd: has joined #ruby
[15:00:40] aryaching: has joined #ruby
[15:01:04] Igorshp: has joined #ruby
[15:01:35] bnagy: has joined #ruby
[15:03:24] aryaching: has joined #ruby
[15:04:23] aryaching: has joined #ruby
[15:04:55] mclee_: has joined #ruby
[15:05:38] aryaching: has joined #ruby
[15:05:59] alexdunne: has joined #ruby
[15:06:09] Fire-Dragon-DoL: has joined #ruby
[15:06:24] momomomomo_: has joined #ruby
[15:08:30] umgrosscol: has joined #ruby
[15:10:09] BadRobot: hi, I have few gems I am using locally on machine, (ffi and win32/eventlog) and when I promote for production, they do not want to do (gem install <nameofgem>) because all our prod servers are not connected to internet, any other way to do it?
[15:12:12] mag42c: has joined #ruby
[15:12:37] shevy: how are these servers getting the gems
[15:13:19] shevy: if you can transfer them in another way, installing local gems is possible: "gem install ./*ffi*gem" should work
[15:13:24] rshetty: has joined #ruby
[15:13:39] nertzy: has joined #ruby
[15:13:55] BadRobot: shevy: I am currently using them in my local machine so I have a copy but not sure if it is safe to do it that way
[15:15:11] momomomomo_: has joined #ruby
[15:15:19] shevy: perhaps you can teleport the bytes magically with brain power alone
[15:15:42] MissionCritical: has joined #ruby
[15:16:18] BadRobot: shevy: very usefulll!!!!! now go gem yourself
[15:16:18] favadi: has joined #ruby
[15:17:04] the_new_tester: has joined #ruby
[15:17:31] shevy: you never said how you were going to put these gems onto the servers
[15:18:21] Rollabunna: has joined #ruby
[15:20:03] krz: has joined #ruby
[15:21:22] Igorshp: has joined #ruby
[15:21:28] BadRobot: shevy: this is how its done!!! http://help.rubygems.org/kb/rubygems/installing-gems-with-no-network
[15:21:55] workmad3: BadRobot: if you're deploying an app that manages gems via bundler, you can also use the `bundle pack` command to download all the gem files that the app needs, which will then be used by `bundle install` when deploying
[15:22:28] andikr: has joined #ruby
[15:24:07] wprice: has joined #ruby
[15:24:19] shevy: BadRobot how do you get the gems on your servers again?
[15:24:58] dhjondoh: has joined #ruby
[15:25:13] ldnunes: has joined #ruby
[15:27:23] rshetty: has joined #ruby
[15:29:48] mary5030: has joined #ruby
[15:29:52] BadRobot: workmad3: trying to avoid installing more stuff on the server, the company has an extreme allergies against good technologies hahahaha and design and programming patterns
[15:30:00] BadRobot: the real world they say!!!
[15:30:07] kerunaru: has joined #ruby
[15:30:47] mary5030: has joined #ruby
[15:31:52] jezeniel: has joined #ruby
[15:31:59] mary5030: has joined #ruby
[15:32:43] arthurix: has joined #ruby
[15:33:21] axl_: has joined #ruby
[15:34:12] hiyosi: has joined #ruby
[15:35:07] erik____: What's the action that makes a |placeholder| multiply by itself?
[15:35:41] Ox0dea: Erik____: You talk funny.
[15:36:03] acharnosh1: has joined #ruby
[15:36:18] yorickpeterse: Does anybody here run their own GitLab instance on PostgreSQL?
[15:36:28] yorickpeterse: (or MySQL otherwise)
[15:36:32] shevy: Ox0dea a common trait of many webchatters I have found :)
[15:36:53] jonee: we run our own gitlab
[15:37:05] northfurr: has joined #ruby
[15:37:07] hrs: has joined #ruby
[15:37:09] kaleido: has joined #ruby
[15:37:20] yorickpeterse: jonee: Pg or MySQL?
[15:37:29] dionysus69: has joined #ruby
[15:37:32] erik____: I wanna make n multiply by itself in this block https://gist.github.com/anonymous/12527d9103d2c8b5f35b , how to?
[15:37:46] erik____: The code I wrote obviously failed :c
[15:38:01] shevy: Erik____ why did it fail? you multiply by itself already there
[15:38:15] rgtk: Erik____: use map() instead of each
[15:38:17] shevy: Erik____ if you wish to modify the array itself, use .map! rather than .each
[15:38:19] skade: has joined #ruby
[15:38:27] shevy: Erik____ n won't be available outside your {} though
[15:38:31] Ox0dea: Erik____: Hi.
[15:38:44] DEA7TH: has joined #ruby
[15:39:17] erik____: My result is only a 4 for some reason
[15:39:41] Ox0dea: Erik____: *The* 4.
[15:39:52] Ox0dea: All the 4s are the same in Ruby.
[15:40:20] rgtk: nilthing
[15:40:25] Ox0dea: >> 4.object_id == (2 + 2).object_id # Erik____
[15:40:27] ruboto: Ox0dea # => true (https://eval.in/459390)
[15:40:43] Ox0dea: Erik____: Because Fixnums are actually implemented as tagged pointers for efficiency in both time and space.
[15:41:07] h99h9h88: has joined #ruby
[15:41:22] the_new_tester: has left #ruby: ()
[15:41:38] mikecmpbll: come with us now on a journey through time and space
[15:41:55] erik____: Okay so I used map, but I still got 4 nil
[15:42:21] shevy: can you update your gist?
[15:44:19] erik____: https://gist.github.com/anonymous/11658e6ed252ddd1954d
[15:44:57] shevy: Erik____ yeah, do: p array at the end, you can see that the array was modified. n is not available outside the {} though
[15:45:07] hxegon: has joined #ruby
[15:45:20] erik____: Ohhh, thank you
[15:45:55] erik____: What's the difference between .each and .map! ?
[15:46:13] kaleido: has joined #ruby
[15:46:19] Ox0dea: Nobody knows.
[15:46:43] bruno-: has joined #ruby
[15:47:01] erik____: .map! works perfectly fine, but .each refuses to work for some reason
[15:47:04] shevy: Erik____ youc an think of .each just as iterating over your collection, whereas you can think of .map as "modify in place"
[15:47:06] niemcu: has joined #ruby
[15:47:16] yorickpeterse: .each => iterate over values
[15:47:19] shevy: or rather, modify on a per-element basis
[15:47:26] yorickpeterse: .map => create a new array for every value in the original array (based on what the block returns)
[15:47:35] yorickpeterse: .map! => do the same, but replace the values of the array it's called on
[15:47:42] zwdr: functions with ! on the end are usually destructive or have side effects :3
[15:47:50] yorickpeterse: >> x = [10, 20]; x.map { |num| num * 2 }
[15:47:51] ruboto: yorickpeterse # => [20, 40] (https://eval.in/459408)
[15:47:53] yorickpeterse: >> x = [10, 20]; x.map { |num| num * 2 }; x
[15:47:54] ruboto: yorickpeterse # => [10, 20] (https://eval.in/459410)
[15:47:56] yorickpeterse: >> x = [10, 20]; x.map! { |num| num * 2 }; x
[15:47:57] ruboto: yorickpeterse # => [20, 40] (https://eval.in/459411)
[15:48:04] erik____: How would I write the code so I'd get the same result with .each ?
[15:48:37] praveen_p: has joined #ruby
[15:48:43] finisherr: has joined #ruby
[15:48:56] hxegon: Erik____: Is there a side effect you are trying to do?
[15:48:57] cwong_on_irc: has joined #ruby
[15:49:10] praveen_p: has left #ruby: ()
[15:49:24] roxtrongo: has joined #ruby
[15:49:31] cwong_on_irc: has joined #ruby
[15:49:37] noboyd: has joined #ruby
[15:50:02] erik____: I'm learning via codecademy, and they've only taught me .each so far, so it must be some easy way to get the same result with .each aswell, as this is the task :D
[15:50:49] erik____: there must be*
[15:50:54] bricker: has joined #ruby
[15:51:36] Ox0dea: Erik____: Get out of there before it's too late.
[15:51:59] erik____: What do you mean? :o
[15:52:12] karapetyan: has joined #ruby
[15:52:26] Ox0dea: Erik____: If something which claims to teach you Ruby is advising you to use #each to destructively update an Array, you've taken a wrong turn.
[15:52:31] madundead: has joined #ruby
[15:52:38] hxegon: Erik____: pretty much
[15:53:19] hxegon: Erik____: I've been trying to come up with a non-shitty example (that uses .each vs .each_with_index or something) but I'm so used to doing map for everything I'm not sure how I would
[15:53:34] erik____: Wait wait wait, codecademy is bad? :OO
[15:53:44] erik____: But everyone says it's the best :o
[15:53:55] hxegon: It's not aweful, but I think rubymonk or the koans are better
[15:55:06] skade: has joined #ruby
[15:55:31] tarspace: has joined #ruby
[15:55:42] tarspace: it is channer of ruby stone?
[15:55:46] tarspace: or ruby programmers?
[15:55:50] Ox0dea: tarspace: Either.
[15:55:51] hxegon: >> x = [1, 2]; x.each_with_index { |e, i| x[i] = e*2 }; x
[15:55:53] ruboto: hxegon # => [2, 4] (https://eval.in/459414)
[15:56:25] tarspace: has left #ruby: ()
[15:56:26] dfinninger: has joined #ruby
[15:56:31] gregf_: >> [1, 2].map{ |v| v*2 }
[15:56:32] ruboto: gregf_ # => [2, 4] (https://eval.in/459415)
[15:56:36] erik____: Creator of Ruby is learning ruby on rubymonk :OOOOO
[15:57:10] Ox0dea: >> xs = [1,2,3]; xs.each_index { |i| xs[i] *= xs[i] } # hxegon: If you really must.
[15:57:11] ruboto: Ox0dea # => [1, 4, 9] (https://eval.in/459416)
[15:57:35] skade: has joined #ruby
[15:57:39] erik____: Are those some internal jokes I'm not getting get? I got that feeling
[15:57:41] hxegon: Ox0dea: you and your elegant bullshit
[15:58:27] devoldmx: has joined #ruby
[15:58:32] erik____: What kind of music do you enjoy listening to while programming?
[15:58:39] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:59:21] kirun: has joined #ruby
[15:59:28] greenbigfrog: does 'net/http' cache websites? I'm calling a (more or less static) json API but it displays diffrent things if I put it then with my browser
[15:59:47] ibouvousaime: has joined #ruby
[16:00:53] shevy: Erik____ Ox0dea can be very confusing ;)
[16:01:01] NeverDie: has joined #ruby
[16:01:22] Ox0dea: greenbigfrog: Net::HTTP is not sending the same headers as your browser, and any one of them could technically be the reason for a different response.
[16:01:59] sdfgsdfg: has joined #ruby
[16:02:03] erik____: What programs have you guys made in ruby?
[16:02:04] alexdunne: has left #ruby: ()
[16:02:42] mikecmpbll: all of them.
[16:03:02] hxegon: Erik____: mostly sinatra integration server stuff for ecommerce middleware
[16:04:09] cwong_on_irc1: has joined #ruby
[16:04:26] Ox0dea: Did somebody say Sinatra? http://i.imgur.com/94jou4v.png
[16:04:43] erik____: <hxegon> Huh, what's sinatra integration server stuff?
[16:04:52] Zarthus: why are you taking screenshots of your code!
[16:04:56] hxegon: Ox0dea: WHAT IN GODS NAME
[16:05:03] erik____: What is that :o
[16:05:05] Ox0dea: hxegon: It's probably better you didn't ask.
[16:05:06] mikecmpbll: please make a vine next time.
[16:05:09] rcvalle: has joined #ruby
[16:05:20] r0bby_: has joined #ruby
[16:05:38] Ox0dea: Zarthus: Because it's purdy and eval.in shits the bed: https://eval.in/459020
[16:05:39] hxegon: Erik____: sinatra is a simple webserver framework
[16:05:53] rcvalle: has joined #ruby
[16:05:53] agit0: has joined #ruby
[16:05:59] Zarthus: I don't blame it
[16:06:13] Ox0dea: Sure, but I have no idea why it shows the code three separate times.
[16:06:16] erik____: A framework for ruby, like Rails?
[16:06:31] hxegon: Erik____: and ecommerce middleware is stuff like a server that sends/transforms data between an ebay store and quickbooks
[16:06:42] hxegon: Erik____: exactly, but way simpler
[16:06:56] prettiestPony11: has joined #ruby
[16:07:07] mrtomme: has joined #ruby
[16:07:17] cwong_on_irc: has joined #ruby
[16:07:21] erik____: Are you a seasoned programmer or young?
[16:07:34] FernandoBasso: has joined #ruby
[16:07:40] amclain: has joined #ruby
[16:07:51] The_Phoenix: has joined #ruby
[16:07:55] Zarthus: I program regardless of season
[16:08:05] cwong_on_irc: has joined #ruby
[16:08:19] banister: has joined #ruby
[16:08:21] erik____: <Zarthus> lmao
[16:08:30] hxegon: Erik____: Youngish, 23, but I've been programming for a while. I wouldn't call myself seasoned, but I'm not a beginner either
[16:08:43] cwong_on_irc: has joined #ruby
[16:08:45] erik____: For how long?
[16:09:08] moeabdol1: has joined #ruby
[16:09:18] cwong_on_irc: has joined #ruby
[16:09:21] hxegon: Erik____: hmm... 6-7 years? I read little brother by Cory Doctorow and thought his description of programming sounded amazing
[16:09:35] hxegon: Erik____: but there really isn't a wrong time to start
[16:09:51] hxegon: Erik____: on and off though during that time except in the last 2-3 years
[16:09:56] cwong_on_irc: has joined #ruby
[16:10:43] erik____: How many languages do you know?
[16:10:52] cwong_on_irc: has joined #ruby
[16:10:55] erik____: And which ones :D
[16:10:57] shadoi: has joined #ruby
[16:11:14] hxegon: Erik____: only 3 better than just dabling
[16:11:25] hxegon: Erik____: bash/zsh, python and ruby
[16:11:51] cwong_on_irc: has joined #ruby
[16:12:03] towski_: has joined #ruby
[16:12:23] erik____: <hxegon> You don't know HTML + CSS?
[16:12:37] timonv: has joined #ruby
[16:12:57] cwong_on_irc1: has joined #ruby
[16:13:05] elusiveother: has joined #ruby
[16:13:39] hxegon: Erik____: I don't really consider those programming languages strictly IMO
[16:13:45] hxegon: Erik____: but yeah
[16:14:59] shevy: Zarthus lol
[16:15:11] erik____: Is it easier/harder to get job as ruby programmer compared to other languages?
[16:15:41] shevy: one day I will be able to publish a massive amount of funny quotes from #ruby
[16:15:44] GarethAdams: has joined #ruby
[16:16:02] shevy: use java to get a job Erik____
[16:16:42] bmalum: has joined #ruby
[16:16:58] hxegon: Erik____: I've only recently gotten a full time position, before that I was doing freelance projects for small business stuff, so not sure I'm the best person to ask
[16:17:12] adaedra: shevy: that was mean.
[16:17:32] hxegon: Erik____: Don't sell the tech, sell the ability to get shit done
[16:17:33] momomomomo_: has joined #ruby
[16:17:39] mikecmpbll: i do ruby and i have a job ????
[16:17:59] mjuszczak: has joined #ruby
[16:18:07] shevy: adaedra java is the most powerful language according to tiobe!
[16:18:09] zwdr: Hey, CSS3 is turing complete!
[16:18:15] krz: has joined #ruby
[16:18:17] mikecmpbll: it's wonderful, isn't it.
[16:18:22] adaedra: shevy: if only I cared.
[16:18:23] mikecmpbll: god bless matz.
[16:18:28] big|bad|wolf: has joined #ruby
[16:19:16] erik____: Aye, I know that getting shit done and personality is important in the tech world.
[16:19:42] polishdub: has joined #ruby
[16:20:02] adaedra: get(????, :done)
[16:20:15] dnomyar_: has joined #ruby
[16:20:26] mikecmpbll: a getter in ruby? :O
[16:20:46] InternetFriend: has joined #ruby
[16:21:13] [Butch]: has joined #ruby
[16:21:42] adaedra: I should make a ruby library in unicode.
[16:21:47] hrs: has joined #ruby
[16:21:47] adaedra: I mean, in emoji.
[16:23:29] finisherr: has joined #ruby
[16:23:34] adaedra: ??????.new.tap do |????|????.body = 'Hello, world'end.?????? 'me@example.org'
[16:23:58] finisherr: has left #ruby: ()
[16:24:19] synthroid: has joined #ruby
[16:26:05] jonee: has joined #ruby
[16:26:28] blueOxigen: has joined #ruby
[16:26:29] Ox0dea: adaedra: About that: https://github.com/anowell/emoji-lang
[16:26:38] Maletor: has joined #ruby
[16:26:56] segfalt_: has joined #ruby
[16:27:38] adaedra: Ox0dea: amazing. Why are we using boring US-ASCII characters if we have that then?
[16:27:51] ivanskie: has joined #ruby
[16:28:22] Ox0dea: adaedra: Sometimes I only use 9, 10, and 32.
[16:28:35] Ox0dea: They're still ASCII, but I don't have to look at them.
[16:28:58] hxegon: adaedra: because we aren't 10xr rockstar ninja gurus
[16:29:04] Ox0dea: Some kind of Zalgo language would be interesting.
[16:29:41] Ox0dea: It's gonna happen now, isn't it?
[16:30:18] hxegon: >> class String; def new; puts 'HES COMING OHOGODOHGODOHGOD'; end; end String.new
[16:30:19] ruboto: hxegon # => /tmp/execpad-e739165ffbdf/source-e739165ffbdf:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/459431)
[16:30:51] adaedra: >> class String; def new; puts 'HES COMING OHOGODOHGODOHGOD'; end; end; String.new
[16:30:52] ruboto: adaedra # => "" (https://eval.in/459432)
[16:31:08] adaedra: and it's not new you should be defining.
[16:31:28] hxegon: * faceplams
[16:32:52] malconis: has joined #ruby
[16:34:06] hxegon: anytime you parse HTML with a regex, thats zalgo language
[16:34:46] benlieb: has joined #ruby
[16:35:33] ruboto: I don't know anything about zalgo
[16:35:37] benlieb: has joined #ruby
[16:35:45] karapetyan: can i know index of deleted element in array?
[16:36:01] Ox0dea: karapetyan: I think not. :<
[16:36:09] Ox0dea: Are you sure you need it?
[16:36:13] karapetyan: ok then i can use delete_at and store it.
[16:36:32] karapetyan: Ox0dea: thank you.
[16:36:39] Ox0dea: karapetyan: Sure, but... are you sure?
[16:37:07] Bloomer: has joined #ruby
[16:37:52] Ox0dea: Never mind; a use case or two sprung up.
[16:38:05] karapetyan: Ox0dea: i need remove all elements from array until there will be last element. And next removed element should be +3 index from last deleted element
[16:38:21] karapetyan: ehm, i hope i describe my task correctly.
[16:38:53] Ox0dea: karapetyan: Sure, I see what you're going for.
[16:39:37] karapetyan: Ox0dea: i think there is a math trick to make it another way. But i try to iterate array for now)
[16:40:04] Ox0dea: karapetyan: It's the soldiers in a circle or some such, yeah?
[16:40:16] karapetyan: Ox0dea: right )
[16:40:50] Ox0dea: karapetyan: There are certainly cleverer ways to go about it, but you can always refactor.
[16:41:20] araujo: has joined #ruby
[16:41:27] Ox0dea: Do you know #rotate?
[16:41:53] adaedra: You spin me right round ???
[16:42:02] chouhoulis: has joined #ruby
[16:42:21] beauby: has joined #ruby
[16:42:27] karapetyan: Ox0dea: yes, for now i trying to figure out can perseverance take over my dullness and can i become developer or not
[16:42:46] segfalt: has joined #ruby
[16:42:48] nemo_: has joined #ruby
[16:43:10] karapetyan: and i actually not often make good kata solution on codewars.
[16:43:24] Quandl: has joined #ruby
[16:43:35] mistym: has joined #ruby
[16:43:46] Ox0dea: Just keep sharpening your katana.
[16:44:04] Ox0dea: Even if you only end up being able to slice through butter, you'll be able to make delicious toast.
[16:45:37] hxegon: karapetyan: how do you like codewars? I've been meaning to try it out
[16:45:48] Ox0dea: That wasn't nearly as motivational as I'd intended, but I hope you took the gist.
[16:46:07] _djbkd: has joined #ruby
[16:47:19] karapetyan: hxegon: i like codewars.
[16:47:30] karapetyan: Ox0dea: thanks]
[16:47:36] ESpiney__: has joined #ruby
[16:47:42] bruno-: has joined #ruby
[16:47:42] sharkman: has joined #ruby
[16:48:21] cdg: has joined #ruby
[16:48:25] sharkman: if i have a variable, and its either a date, or a range of dates (i.e. Thu, 05 Sep 2013..Fri, 20 Dec 2013) what is a quick way to check that
[16:48:35] sharkman: if i want to verify that it is a single date
[16:48:55] tlarevo: has joined #ruby
[16:49:07] erik____: has joined #ruby
[16:49:45] Jardayn: has joined #ruby
[16:50:20] rakm: has joined #ruby
[16:50:31] karapetyan: has joined #ruby
[16:52:36] Motoservo: has joined #ruby
[16:53:58] Ox0dea: sharkman: Ask it.
[16:54:00] Jameser: has joined #ruby
[16:54:11] SleepySensei: has joined #ruby
[16:54:15] erik____: What programs do you use to write in Ruby?
[16:55:29] hxegon: sharkman: well you could do dates.is_a? or a case statement
[16:55:39] ibouvousaime: has joined #ruby
[16:55:46] Igorshp: has joined #ruby
[16:55:55] hxegon: sharkman: or you could do [dates].flatten to standardize it to an array
[16:56:01] Pathfinder: has joined #ruby
[16:56:10] nemo__: has joined #ruby
[16:56:26] hxegon: sharkman: I'm sure there are better ways, but that's how I've seen it done
[16:56:58] hrs: has joined #ruby
[16:57:55] bryanray: has joined #ruby
[16:57:55] Ox0dea: hxegon: [dates].flatten == Array(dates) == [*dates]
[16:57:59] zfez: has joined #ruby
[16:58:06] Ox0dea: Yay, Ruby.
[16:58:15] beauby: has joined #ruby
[16:58:33] hxegon: Ox0dea: thanks, I like [*dates] much better
[16:58:41] troulouliou_div2: has joined #ruby
[16:59:57] hxegon: Erik____: vim/neovim and the command line tools
[17:00:14] hxegon: Erik____: so pry mostly :)
[17:00:20] kaleido: has joined #ruby
[17:01:26] SleepySensei: has joined #ruby
[17:01:41] tlarevo: has left #ruby: ()
[17:02:19] hxegon: Erik____: I would highly recommend learning either emacs or vim
[17:02:52] yardenbar: has joined #ruby
[17:04:14] erik____: Okay, what are they good for?
[17:04:25] Renich: has joined #ruby
[17:04:34] adaedra: shevy: no, they are fine.
[17:04:36] northfurr: has joined #ruby
[17:04:44] adaedra: Erik____: those are text editors.
[17:04:58] adaedra: /powerfull/ text editors.
[17:05:03] shevy: they have a huge entry barrier
[17:05:07] erik____: I know, but why them over for example notepad
[17:05:08] hxegon: Erik____: well, I can only speak for vim, but after you learn it everything else seems stupidly painful to use because you edit text in vim the same way you think
[17:05:23] dfockler: has joined #ruby
[17:05:33] adaedra: shevy: so you stop at the first difficult thing? Pff.
[17:05:52] shevy: adaedra absolutely not. I make sure that it is worth it. emacs and vim were not worth it at all, ruby is
[17:06:09] hxegon: shevy: I feel like the entry barrier is exaturated. For the first week for sure you are floundering, but after that its nothing but gains
[17:06:16] adaedra: add this to you quote collection, "emacs and vim are not worth it at all".
[17:06:19] Ox0dea: > exaturated
[17:06:52] jenrzzz: has joined #ruby
[17:07:04] hxegon: Erik____: for example, in notepad to delete a word behind your cursor you would mash backspace until its done. in vim, press db
[17:07:22] adaedra: or ^W in insert mode.
[17:07:36] hxegon: Ox0dea: wow thats misspelled
[17:07:47] hxegon: exaggerated*
[17:08:17] joonty: has joined #ruby
[17:08:27] dtraveler: has joined #ruby
[17:08:35] to_json: has joined #ruby
[17:08:35] to_json: has joined #ruby
[17:08:36] erik____: No, exaturated saturated.
[17:08:38] adaedra: Erik____: emacs and vim are tools that can be a bit uneasy to learn, but once took in hand are great tools to work with.
[17:08:45] hxegon: Erik____: 2 delete 2 words behind cursor, 2db. you use mnemonic key sequences (2 delete word) to do edits
[17:08:59] InternetFriend: has joined #ruby
[17:09:04] erik____: db= down button?
[17:09:12] adaedra: no, d then b keys.
[17:09:14] shevy: it tampers with your brain
[17:09:26] hxegon: j k h l, don't ask why but they aren't hard to get used to
[17:09:27] allomov: has joined #ruby
[17:09:36] shevy: that was your cat type it
[17:09:36] hxegon: d is delete, b is back
[17:09:38] SleepySensei: has joined #ruby
[17:09:40] dtraveler: Hi, I want to replace all occurrences of " [anywordcangohere]" with "-" in a string.
[17:09:40] dtraveler: I am trying to use gsub. But no luck so far. Can someone please help me?
[17:09:44] adaedra: hxegon: I use vim but don't use hjkl.
[17:09:51] Eiam_: has joined #ruby
[17:09:53] hxegon: adaedra: you use arrow keys?
[17:09:55] adaedra: dtraveler: what did you try?
[17:09:55] shevy: adaedra you are a sinner! use vim in vi mode
[17:10:05] adaedra: hxegon: yes. It's not the '80 anymore.
[17:10:13] dtraveler: adaedra: line.gsub(/\\[(\w+)\\]/, "")
[17:10:14] erik____: Vim seems pretty nice when you talk about it
[17:10:17] northfurr: has joined #ruby
[17:10:32] adaedra: dtraveler: waouh, you went far.
[17:10:33] hxegon: Erik____: I would *never* use anything else unless there was no other choice.
[17:10:35] dtraveler: basically i want to replace it with "" or "-"
[17:10:37] shevy: Erik____ yeah, vim is almost as good as emacs
[17:10:39] adaedra: Erik____: it is! run vimtutor if you have it.
[17:11:00] adaedra: dtraveler: first, do you know rubular?
[17:11:02] erik____: vim vs emacs, which is best?
[17:11:10] adaedra: DON'T GO THERE.
[17:11:12] hxegon: Erik____: that is a bear your poking
[17:11:18] dtraveler: adaedra: I am new to ruby. :(
[17:11:29] gisli: has joined #ruby
[17:11:40] adaedra: dtraveler: http://rubular.com will help you with regexps.
[17:11:43] shevy: regexes can be quite difficult
[17:11:48] dtraveler: I am trying that.
[17:12:13] erik____: What does vim have that emacs doesn't have, and vice versa?
[17:12:16] shevy: so your target is " [word]" such as: " [fox]" or " [cat]" ?
[17:12:28] shevy: Erik____ emacs has a lot more
[17:12:30] adaedra: Erik____: vim won't break your fingers.
[17:12:36] eam: neither will emacs
[17:12:44] eam: emacs supports all the vi key bindings
[17:12:53] pdoherty: has joined #ruby
[17:12:54] shevy: Erik____ emacs-24.5.tar.xz 38M, vim-7.4.tar.xz 7,3M
[17:12:59] dtraveler: shevy: Yes.
[17:13:12] adaedra: Yes, once you M-x C-S-d M-S-X-R-T-????-u
[17:13:26] eam: vi style keybindings are way better, but you can just load 'em in emacs
[17:13:28] eam: it's the best vi
[17:13:43] adaedra: Erik____: best is to try them both and see.
[17:13:44] hxegon: Erik____: basically you can have tetris and browse mail in emacs and it uses key combinations, where as vim is supposed to integate with other tools
[17:13:44] eam: vim, well, might be good for non-programmers
[17:13:52] hxegon: Erik____: what adaedra said
[17:14:08] adaedra: Personally I prefer vim, even after having worked a while with emacs.
[17:14:13] dikaio: has joined #ruby
[17:14:14] hxegon: same here
[17:14:17] eam: vim has this weird thing called vimscript embedded, emacs has a lisp dialect
[17:14:23] shevy: dtraveler http://rubular.com/r/2XkLBOO0zs - can you give an example string though?
[17:14:30] erik____: What's lisp even?
[17:14:34] ruurd: has joined #ruby
[17:14:37] shevy: (this(is(lisp Erik____
[17:14:51] shevy: I hate the )
[17:14:57] gisli: Hiya, having problem with some ruby code and being unexperienced in Ruby I'm not sure what the problem is. Although the exec-command returns an exit code of '1' the 'javaORnode' variable is always "java", any ideas? https://gist.github.com/gislifreyr/9872e71673f86dae55c3
[17:15:00] shevy: lisp would be twice as pretty without the )
[17:15:15] baweaver: has joined #ruby
[17:15:28] Ox0dea: shevy: Aye, I've noticed you tend not to `end` your example code.
[17:15:41] symm-: has joined #ruby
[17:15:43] adaedra: shevy is a python programmer is disguise.
[17:15:44] shevy: Erik____ scheme can be quite a lot of fun, it should be a lisp dialect; the whole world for this game is written in scheme .scm files, have a look if you are curious http://downloads.sourceforge.net/project/nazghul/nazghul/nazghul-0.7.1/nazghul-0.7.1.tar.gz
[17:15:55] shevy: Ox0dea I have to use end :(
[17:16:11] shevy: it's one thing I would like about python actually, but only if it is optional
[17:16:16] dtraveler: shevy: Thanks a lot.
[17:16:45] shadoi: has joined #ruby
[17:16:48] erik____: <shevy> The whole page source is listed as "badware"
[17:16:55] Fire-Dragon-DoL: has joined #ruby
[17:17:01] Ox0dea: gisli: Do you have to use that monster just to run `which`?
[17:17:05] shevy: the ultimate programming language would be a merge of python and ruby. just think about unifying a philosophy that states that there is more than one way to do things AND to also state at the same time that there would be only one way to do something
[17:17:23] shevy: Erik____ yeah sourceforge fell from grace
[17:17:41] shevy: but the nazghul game was fine, I played it years ago up to perhaps the fourth town
[17:17:44] hxegon: Erik____: lisp is an extremely simple language that is stupidly powerful. other language that are technically lisp: clojure, scheme, racket, many many more
[17:17:47] shevy: ultima-nostalgia
[17:17:50] gisli: Ox0dea: The monster being facter?
[17:17:54] Ox0dea: gisli: Sure.
[17:18:01] Ox0dea: I mean, is it doing something special?
[17:18:11] kobain: has joined #ruby
[17:18:13] diegoviola: has joined #ruby
[17:18:21] baweaver: Ox0dea: going on vacation tomorrow and date tonight so might not get through that all.
[17:18:37] Ox0dea: baweaver: You've got one line left?!
[17:18:39] shevy: dam party!
[17:18:51] gisli: Ox0dea: I need to have the value of it in a few places in puppet yes. That is, I need to know if java is installed and act on that.
[17:19:04] Ox0dea: gisli: Right, you've not answered my question, though.
[17:19:14] baweaver: I still have to string it all together, and one of your lines doesn't count as one line :P
[17:19:19] NeverDie: has joined #ruby
[17:19:34] Ox0dea: gisli: `which java`.empty? ? 'node' : 'java'
[17:20:55] dtraveler: Just a quick question, if an expression is present at the last line of a function, it is returned implicitly(without the return keyword)?
[17:21:05] eam: dtraveler: yes
[17:21:07] adaedra: the result, yes
[17:21:09] dtraveler: eam: Thanks
[17:21:20] dtraveler: adaedra: Thanks
[17:21:25] Ox0dea: dtraveler: Thanks.
[17:21:28] erbesharat: has joined #ruby
[17:21:32] adaedra: Ox0dea: Thanks.
[17:21:35] dtraveler: :P Its okay.
[17:21:43] Ox0dea: dtraveler: Thank you for being thankful.
[17:21:47] Ox0dea: adaedra: Thanks for thanking.
[17:21:54] adaedra: #ruby-canada.
[17:21:59] nemo_: has joined #ruby
[17:22:07] bb010g: has joined #ruby
[17:22:24] Ox0dea: gisli: Will that not do, then?
[17:22:53] Ox0dea: baweaver: Are you going to show your date this wizardry of which you are capable?
[17:22:59] Ox0dea: *Muggle-ry?
[17:23:10] baweaver: -> offtopic
[17:23:34] gisli: Ox0dea: Ahh I see. Although I'm not getting the fact to print...
[17:23:53] Ox0dea: gisli: Are you... printing it?
[17:24:07] ibouvousaime: has joined #ruby
[17:24:23] adaedra: $stdout.reopen('/dev/lp0')
[17:24:43] gisli: Ox0dea: well no not really but it should be output when I run facter (sorry for not using the right words, not my 1st language)
[17:25:22] Ox0dea: gisli: I don't know anything about Facter, but things tend not to get printed automatically.
[17:26:39] diegoaguilar: has joined #ruby
[17:26:50] The_Phoenix: has joined #ruby
[17:27:54] gisli: Ox0dea: okay, so how would I assign the value 'node' or 'java' to a variable?
[17:28:16] shevy: variable = 'node'
[17:28:20] hxegon: variable = 'node'?
[17:28:32] shevy: did you copy-steal that! :D
[17:28:55] erik____: Guys, I'm unable to download ruby from ruby installer: dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.3.exe because my antivirus refuses to let me see it as they've detected malware. Is there actual malware???
[17:29:05] hxegon: Erik____: no
[17:29:07] fmcgeough: has joined #ruby
[17:29:07] Ox0dea: Erik____: Yes, your operating system.
[17:29:08] gisli: shevy, hxegon: well yeah but how woudl I do it when I'm doing this? `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' (sorry, ruby noob)
[17:29:26] n008f4g_: has joined #ruby
[17:29:27] hxegon: Erik____: what Ox0dea said, but just let it pass
[17:29:33] Ox0dea: gisli: Any expression can be assigned.
[17:29:46] shevy: gisli ah well `` returns something
[17:30:01] Ox0dea: It *evaluates* to something.
[17:30:01] erik____: You don't like Windows? Do you prefer linux?
[17:30:09] shadoi: has joined #ruby
[17:30:10] hxegon: gisli: how would you print it? just put puts in front of it
[17:30:24] shevy: gisli in this case you could do: variable = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java'
[17:30:30] hxegon: Erik____: yeah, been windows free since I was 15
[17:30:42] shevy: and now you are 16!
[17:30:49] hxegon: Erik____: not hating, but it really helped me understand computers more
[17:31:04] erik____: Oh, I can't hear you over all the games I can play
[17:31:08] Ox0dea: hxegon: Well done, but irssi is still for masochists.
[17:31:09] shevy: I sorta ditched windows almost hand-in-hand when I was going into ruby (actually, I started with perl first, so perhaps the first two years I did not use ruby)
[17:31:10] hxegon: shevy: actually I'm 14 now. Don't oppress me with you chrononormative BS
[17:31:20] shevy: hxegon :D
[17:31:22] adaedra: Erik____: for dev (except Windows dev), Windows is bad.
[17:31:28] shevy: being young is much cooler than being old
[17:31:59] adaedra: Ox0dea: I get you use it?
[17:32:05] hxegon: Ox0dea: It works good enough for me
[17:32:09] Ox0dea: hxegon: Check your causality at the wormhole, Time Lord.
[17:32:23] gisli: shevy: yeah I'm doing that and returning the value in the next line but I believe this has something to do with facter because it's not picking ut up when I return it. avaORnode = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' javaORnode
[17:32:29] erik____: Hxegon, you're swedish?
[17:32:32] lianj: shevy: which returns non 0 on failure. just use system instead of ``.empty? crap
[17:32:38] gisli: missing a 'j' there
[17:32:57] Ox0dea: adaedra: pelican.jpg, but no.
[17:33:23] Macaveli: has joined #ruby
[17:33:35] hxegon: Erik____: only in spirit (._.), jk AMERICUN AS FUUUUUUCK PARTNER
[17:33:42] devoldmx: has joined #ruby
[17:34:06] adaedra: Erik____: varf??r?
[17:34:14] cyle: has joined #ruby
[17:35:09] shevy: lianj it is his code - if you wanna help him, please use gisli there
[17:35:21] al2o3-cr: has joined #ruby
[17:35:24] karapetyan: has joined #ruby
[17:36:14] rbowlby: has joined #ruby
[17:36:23] hxegon: Ox0dea: CAUSALITY TRIGGERS ME SHITLORD!
[17:36:48] hxegon: Ox0dea: you need to tag your messages for us anti-causal folk
[17:37:26] Ox0dea: lianj: What's terrible about ```.empty?`?
[17:38:29] pipework: Ox0dea: are you intentionall backticking?
[17:38:42] Ox0dea: pipework: Habit.
[17:38:53] Ox0dea: I like to be precise.
[17:38:56] pipework: Ox0dea: Cause I was gonna be all, "Tricksy Ox0dea"
[17:38:59] karapetyan: has joined #ruby
[17:38:59] adaedra: `%x .empty?`
[17:39:30] postmodern: has joined #ruby
[17:39:34] ochkoffein: has joined #ruby
[17:40:12] northfurr: has joined #ruby
[17:40:46] p0wn3d__: has joined #ruby
[17:40:52] roxtrongo: has joined #ruby
[17:41:17] leafybas_: has joined #ruby
[17:41:23] bmalum: has joined #ruby
[17:42:21] mikecmpbll: has joined #ruby
[17:42:25] kaleido: has joined #ruby
[17:42:30] nemo_: has joined #ruby
[17:42:34] adaedra: It's quiet in here.
[17:43:03] roxtrongo: has joined #ruby
[17:44:00] hxegon: \/\/\/\^v^v^v^v^v~~~~~~=======
[17:44:06] gisli: okay guys (no tagging, so many were helping) I figured it out. Facter needs the 'setcode do' line so after I added that it works flawlessly. https://gist.github.com/gislifreyr/9872e71673f86dae55c3
[17:44:22] gisli: Thanks alot for your help ;)
[17:44:28] purplexed-: so I'm wondering about how to best deploy my two applications, that will be working together on a server... Should I be bundling it into a gem, and then gem install on the client server ?
[17:44:35] Igorshp: has joined #ruby
[17:44:37] dopie: has joined #ruby
[17:45:42] purplexed-: is that a typical way of installing an application ?
[17:45:52] dnomyar: has joined #ruby
[17:46:02] purplexed-: maybe, similar to chocolatey on windows ?
[17:46:18] Motoservo: has joined #ruby
[17:46:21] pipework: purplexed-: You can package your application for the system package manager(s) you want to target.
[17:46:35] pocketprotector-: has joined #ruby
[17:46:42] freerobby: has joined #ruby
[17:46:59] Igorshp: has joined #ruby
[17:47:04] shevy: gisli \o/
[17:47:07] purplexed-: pipework, my target, for now, will be windows ... except for windows 10, i don't think windows comes with a built in package manager
[17:47:23] pipework: purplexed-: there's a thing called orca, I think.
[17:47:40] pipework: Windows ain't my thang, so I can't help anymore than that.
[17:48:02] purplexed-: yes, but that requires additional install on the client, doesn't it ?
[17:48:22] purplexed-: but yeah, I heard about orca
[17:48:41] moeabdol1: has joined #ruby
[17:49:55] purplexed-: ocra is the name.. not orca :D
[17:50:08] pipework: evidence of how in touch I am with windows.
[17:50:39] purplexed-: windows is getting interesting though, with their headless servers and nano servers
[17:51:02] pipework: It's a shame that it's being made by microsoft though.
[17:51:24] pipework: But if it makes you happy or makes you money, I have no qualms with it.
[17:51:25] purplexed-: it think you should spend some time looking at what is going on over at microsoft... they are really changing
[17:51:53] pipework: purplexed-: I stop supporting companies that want to use data on my local network to their benefit and my detriment.
[17:52:11] pipework: I isolate most things that I'm not sure about, but I get rid of things that I am sure about.
[17:52:19] lkba: has joined #ruby
[17:52:30] shevy: so you isolate your cat
[17:52:43] pipework: My tinfoil hat takes precedence over silly features that have been in other softwares for decades.
[17:52:43] purplexed-: yes, but when things change, so should your opinions. :)
[17:52:56] pipework: purplexed-: They haven't changed yet, and I don't .trust them as a company.
[17:53:03] pipework: shevy: My cat isolates me.
[17:53:46] purplexed-: I can identify with your opinions. But i don't think they are as valid as they have been.
[17:54:03] djstorm: has joined #ruby
[17:54:14] eam: there's really not much compelling about windows at this point, and less so every year
[17:54:14] Ox0dea: > We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors.
[17:54:16] Ox0dea: pipework: ^
[17:54:22] pipework: purplexed-: Then I don't think you're up to date on the situation in windows 10 and that they've backported their 'helpful features' to other OS's
[17:54:25] purplexed-: just want you to know that things are changing, ..
[17:54:39] deception1: has joined #ruby
[17:54:46] purplexed-: there are lots of things I don't know either :)
[17:54:55] eam: they're changing because msft is rapidly losing ground and becoming irrelevant
[17:55:13] eam: you can't play the strongarm monopoly card when customers have better alternatives
[17:55:15] purplexed-: is there an echo in here? ;)
[17:55:57] pipework: I'll stick to open source and companies that at least have the self-awareness to publicly appear as if they defend my privacy.
[17:56:04] ta: has joined #ruby
[17:56:05] pipework: It takes a lot to repair .trust with me.
[17:56:09] purplexed-: .net is open source isn't it ?
[17:56:25] pipework: purplexed-: One small part to a very large ecosystem.
[17:57:12] purplexed-: oh well, I'm stuck working with the platform.. but I'm happy about the changes they are making.. ofcourse, Sharepoint still exists, so, they still have to make up for that
[17:57:28] purplexed-: and that will take some time
[17:57:35] pipework: Yeah, if you're already stuck in it, it seems like stockholm syndrome would be the easiest path forward.
[17:58:02] purplexed-: yes, I'm coding ruby because I have stockholm syndrome
[17:58:20] pipework: People sometimes have moments of clarity. :D
[17:58:45] purplexed-: and some people are just stuck on their beliefs :p
[17:58:54] kfrz: has joined #ruby
[17:59:01] pipework: I'm glad you're writing ruby and that there are some people who invest into the platform. I don't think that windows users should be imprisoned by their OS without any lifelines to the world of open source and trustworthy software.
[17:59:34] eam: purplexed-: if you think this perspective is borne from bias you couldn't be more wrong
[17:59:38] ivanskie: has joined #ruby
[17:59:48] eam: I've worked at msft, I have many friends there
[18:00:00] Musashi007: has joined #ruby
[18:00:17] eam: they're rapidly losing ground - that's why the change of direction
[18:00:20] bruno-: has joined #ruby
[18:00:24] eam: that's just a fact
[18:00:29] purplexed-: yeah, i can see they are losing the cloud race
[18:00:48] purplexed-: I myself stopped using Azure because I think it sucks
[18:00:51] shpoont: has joined #ruby
[18:01:10] eam: the people least happy with their ridgid licensing are msft developers -- it really doesn't impact the oss community too much anymore
[18:01:15] pipework: I'm chums with people on the UX teams, browser team, and lower non-dev stuff. A number of them contribute to open source any way that they can without losing their jobs because they believe in it so earnestly.
[18:01:49] pipework: eam: It causes a funny uproar when msft publishes non-free barely open code to github tough.
[18:02:13] purplexed-: btw, I just work with ms stuff, because that's where I ended up... but I'm trying to introduce new stuff at my place of work... ruby is one of them
[18:02:39] towski_: has joined #ruby
[18:02:44] sigurding: has joined #ruby
[18:03:03] pipework: eam: Have you seen those neat libre laptops?
[18:03:21] pipework: Free hardware is the goal, it's really great.
[18:03:38] kfrz1: has joined #ruby
[18:03:45] skweek: has joined #ruby
[18:04:30] shadoi: #microrubysoft
[18:04:38] eam: pipework: not gonna happen
[18:04:53] pipework: eam: What do you mean? That you won't use it, or that it won't ever ship?
[18:05:02] Rollabunna: has joined #ruby
[18:05:55] eam: high end hardware is never gonna have non-binary blob based hardware. I just checked out https://www.crowdsupply.com/purism/librem-15 if that's what you're talking about and they ship with an nvidia chipset ...
[18:06:09] eam: maybe they're saying you can use the non-accelerated driver?
[18:06:18] pipework: eam: They're working on acquiring hardware that can have open source replace the binary blobs.
[18:06:31] eam: yeah, that's what's not gonna work
[18:06:45] eam: don't get me wrong, I wish it would and I love the idea
[18:07:00] pipework: eam: It's better than hardware that can't have the binary blobs replaced.
[18:07:20] pipework: It opens the door for open source where right miaow most hardware can't have the binary blobs replaced.
[18:09:12] Motoservo: has joined #ruby
[18:09:43] Guest53: has joined #ruby
[18:10:25] Erik_Underline: has joined #ruby
[18:10:48] dnomyar: has joined #ruby
[18:11:57] ochkoffein: has joined #ruby
[18:11:58] Erik_Underline: What's the best line of code, to sort an array descendingly(in reverse that is), as opposed to ascendingly with .sort! ?
[18:12:06] Erik_Underline: I'm Erik___ btw :P
[18:13:29] baweaver: has joined #ruby
[18:13:36] Coraline: a.sort.reverse ?
[18:13:46] rbennacer: has joined #ruby
[18:15:18] Erik_Underline: Huh, it's that simple xD
[18:15:49] Erik_Underline: I kept using a.sort! do |x,y| y<=>x end
[18:15:58] havenwood: Erik_Underline: Or: sort_by { |n| -n }
[18:16:57] Ox0dea: Erik_Underline: Do you have a minute?
[18:17:22] Channel6: has joined #ruby
[18:17:30] havenwood: Erik_Underline: Never mind my last comment, I need more coffee.
[18:18:18] ruurd: has joined #ruby
[18:18:21] Erik_Underline: <Ox0dea> Yeah what?
[18:18:37] Ox0dea: Erik_Underline: I'd like to show you why you should strongly consider giving Vim a shot. :)
[18:18:38] Motoservo: has joined #ruby
[18:19:26] shadoi: Or: Let's restart an ages old religious flamewar!
[18:19:46] Ox0dea: Somebody posted to /r/vim a while back boasting about how Sublime gives them multiple cursors, and that it really speeds up their process: http://i.imgur.com/X8nzX5H.gif
[18:19:57] Erik_Underline: <Ox0dea> I've barely even learned the basics of Ruby and programming :O
[18:20:05] Ox0dea: Please do try to sit through the whole thing; they thought they were really moving.
[18:20:53] Ox0dea: And then watch how it's done in Vim: https://asciinema.org/api/asciicasts/14036
[18:21:08] Ox0dea: Note well that a macro is being used in the latter case, and so the approach essentially scales infinitely.
[18:21:20] zenguy_pc: has joined #ruby
[18:21:27] Ox0dea: Whether there were four or four million items, the Vimmer could simply say `4000000@@` and be done with it.
[18:21:34] Erik_Underline: Okay, I'll watch them. Do they program in ruby?
[18:21:36] NeverDie: has joined #ruby
[18:21:47] Ox0dea: The Sublime user would still be holding Ctrl and mashing their Down arrow until the kingdom came.
[18:21:48] eam: uh clearly they should've used ruby metaprogramming to solve that problem
[18:22:09] Ox0dea: Erik_Underline: The language is immaterial for this demonstration.
[18:23:00] rgtk: has joined #ruby
[18:24:02] baroquebobcat: has joined #ruby
[18:24:33] Erik_Underline: Vim was very fast
[18:24:47] poguez_: has joined #ruby
[18:25:36] chipotle: has joined #ruby
[18:25:51] Ox0dea: Erik_Underline: Now that you've seen it, watching the other one is kind of infuriating, no?
[18:25:58] pipework: There's precious few meaningful productivity features that aren't also available in the vim ecosystem.
[18:26:20] Erik_Underline: It is. But that stuff seems pretty advanced for a newb like me
[18:26:48] Erik_Underline: I'm still a squire, I should learn how to fight before I become a knight myself.
[18:26:50] pipework: Erik_Underline: Everything is advanced until you do it though, and then everything you've done is, more or less, quite easy. :D
[18:27:02] segfalt: I'd been using Emacs for half a year and realized after watching a talk that I missed the power of vim. Now I use Spacemacs, so I get all the pain and benefits of both :-).
[18:27:15] Ox0dea: Erik_Underline: It's dangerous to go alone! Here, take this: A,^Mdesc: ''^[^Wwjy$^WwP3j
[18:27:18] AccordLTN: has joined #ruby
[18:27:25] NeverDie: has joined #ruby
[18:27:26] pipework: segfalt: That neat helm thing is cool.
[18:27:29] Erik_Underline: <Ox0dea> What is that
[18:27:37] Ox0dea: Erik_Underline: That's the macro being used in the Vim demonstration.
[18:27:56] segfalt: pipework: Overall, Spacemacs is very cool. Though it does leave you feeling unsure of how it all works, unlike if you home-brew your own .emacs.d/ collection.
[18:28:20] Ox0dea: Erik_Underline: You record it into a "macro buffer" once, and then you can replay it as often as you like.
[18:28:26] pipework: segfalt: Yeah, but I bet people who copy other people's vimrc's without going and playing with each and every bit feel the same.
[18:28:55] segfalt: I have been having some issues with macros, ironically, I go to replay a macro (or even use '.' in some modes) and I get part of my macro inserted into my buffer. Very frustrating...
[18:28:58] segfalt: pipework: Totally.
[18:29:05] _djbkd: has joined #ruby
[18:29:30] segfalt: pipework: I never learned Vimscript or whatever, so I just had a huge .vimrc that confused me. I did spend some time learning elisp (It's more approachable in that you can hack on it right in the editor, with context and tab-completion).
[18:29:33] Pathfinder: has joined #ruby
[18:29:36] Ox0dea: Using somebody else's config files is akin to eating food you've just seen them spit out.
[18:29:48] pipework: segfalt: I don't know vimscript either. I just hack stuff together.
[18:29:52] segfalt: Did they look happy when they spit it out? If so, fair game!
[18:29:53] dtraveler: has left #ruby: ()
[18:30:02] pipework: segfalt: I don't know if I've pushed lately but: https://github.com/Spaceghost/vim-config
[18:30:38] Motoservo: has joined #ruby
[18:31:02] Erik_Underline: Why's poignant guide to Ruby is really weird
[18:31:31] pipework: Erik_Underline: It's supposed to be rather fun instead of being like a textbook.
[18:32:36] snockerton: has joined #ruby
[18:32:55] elusiveother: has joined #ruby
[18:33:16] Erik_Underline: I love it, something you can finally relate to :D It reminds me of a method of remembering stuff I learned in elementary school, associate the boring stuff with crazy stuff and you'll remember it better :D
[18:35:30] Ox0dea: Erik_Underline: I did that for pi.
[18:36:12] jessemcgilallen: has joined #ruby
[18:36:31] hxegon: Erik_Underline: back from being afk reading through history: about the 'i've barely even learned...' comment. I learned vim before I leared ruby. just saying.
[18:40:03] skade: has joined #ruby
[18:41:27] towski_: has joined #ruby
[18:41:38] mclee_: has joined #ruby
[18:41:41] hrs: has joined #ruby
[18:41:41] Erik_Underline: Wait, vim's a language, ish?
[18:41:50] hxegon: Erik_Underline: basically
[18:42:05] hxegon: Erik_Underline: http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/
[18:42:18] Erik_Underline: But you can program ruby in vim?
[18:42:29] hxegon: Erik_Underline: thats what I do
[18:43:16] ss_much: has joined #ruby
[18:43:28] dorei: has joined #ruby
[18:44:17] hxegon: Erik_Underline: basically you build your own IDE from vim + plugins + your OS + your config
[18:45:06] diegoviola: has joined #ruby
[18:45:39] Erik_Underline: hxegon: Okay, I'll learn vim when I've learned Ruby then :D Where's good download link for w7 ?
[18:45:57] keen___________: has joined #ruby
[18:46:21] hxegon: Erik_Underline: http://www.vim.org/download.php
[18:46:28] Erik_Underline: hxegon: What's an IDE?
[18:47:50] hxegon: Erik_Underline: Integrated Development Environment. For example I have tests running in a split window, a linter running everytime I save that checks my syntax, and pry screw around in and check assumptions about the how language stuff works
[18:48:20] hxegon: Erik_Underline: I also have keybindings that will run rubocop on my files to check for stylistic mistakes.
[18:48:35] pipework: Erik_Underline: Vim is an editor, rubymine is an IDE.
[18:48:37] linduxed: has joined #ruby
[18:48:46] hxegon: what he said
[18:48:57] hxegon: but you can build an ide up around vim
[18:49:28] pipework: Vim allows much more control so that you can DIY IDE between everything in your OS.
[18:49:45] Erik_Underline: I really need a good IDE. I enjoy the one I find at codecademy, but that's because I've nothing to compare to.
[18:49:59] hxegon: rubymine is nice from what I've heard
[18:50:04] pipework: Erik_Underline: rubymine is the only worthwhile IDE that I know of for ruby.
[18:50:10] jamesaxl|2: has joined #ruby
[18:50:13] ochkoffein: has joined #ruby
[18:50:19] Erik_Underline: Oh, nice, thanks alot
[18:50:27] devoldmx: has joined #ruby
[18:51:22] Erik_Underline: It says FREE 30 DAY TRIAL on download page on official page :/
[18:51:34] pipework: Erik_Underline: Yup.
[18:51:55] pipework: I know many people who don't like buying software that still buy rubymine.
[18:52:07] hxegon: (but vim is free <.< >.> )
[18:52:24] karapetyan: has joined #ruby
[18:53:01] pipework: If a chum wants an IDE, he can damn whale have himself an IDE.
[18:54:08] Erik_Underline: But I can make my own IDE with vim...
[18:54:30] craysiii: has joined #ruby
[18:54:37] Erik_Underline: Can learn more specifically
[18:54:42] pipework: You totally could! It's very DIY, but you can also find other people's stuff too.
[18:54:59] arocketman: has joined #ruby
[18:55:16] h99h9h88: has joined #ruby
[18:55:19] hxegon: Erik_Underline: installing syntastic is a good start
[18:55:32] hxegon: Erik_Underline: and vundle to make plugin management easier
[18:55:34] `tim`: has joined #ruby
[18:55:34] Trieste: has joined #ruby
[18:56:09] hxegon: Erik_Underline: (syntastic checks for syntax mistakes when you save a file)
[18:56:50] hxegon: Erik_Underline: I could even whip up a starter vimrc with comments and shit explaining everything
[18:56:55] Renich: has joined #ruby
[18:57:05] Erik_Underline: I'd love that :D
[18:57:16] sigurding: has joined #ruby
[18:58:13] bmalum: has joined #ruby
[18:59:19] Ox0dea: Erik_Underline: Do you have somewhere to put all these fish?
[18:59:31] Chaoborid: has joined #ruby
[18:59:56] Ox0dea: > Give a man a fish...
[19:00:18] pipework: Ox0dea: Give him many fish and he may die of food poisoning?
[19:00:23] hxegon: Ox0dea: I started with a vimrc with syntastic, so I'm not too woried about it
[19:01:45] Erik_Underline: Master believes in me. I can do it! :D
[19:02:01] pipework: Dobby can do it!
[19:02:08] ibouvousaime: has joined #ruby
[19:02:40] momomomomo: has joined #ruby
[19:02:48] SleepySensei: has joined #ruby
[19:02:48] Ox0dea: hxegon: The breadth of the net that Google permits students to cast is just ridiculous; it's almost morally reprehensible to duplicate the human effort that the machines can help save us from, and that while convincing a learner that knowledge is a dish best served on spoons.
[19:03:06] skade: has joined #ruby
[19:04:11] Erik_Underline: It's interesting how so many people are joining and leaving at the same time, but only a few of us are talking. Are they staring at us... ;-;
[19:04:48] Guest53: has joined #ruby
[19:05:11] senayar: has joined #ruby
[19:05:11] senayar: has joined #ruby
[19:05:12] northfurr: has joined #ruby
[19:05:25] segfalt: Erik_Underline: Lots of people like to idle, and pop in for quick questions they can ask/answer. You're just seeing their computers go to sleep and wake up :)
[19:06:17] h99h9h88: has joined #ruby
[19:07:03] Erik_Underline: I think it could improve the interface if those messages were in another bar on the side
[19:07:21] kfrz: has joined #ruby
[19:07:27] jenrzzz: has joined #ruby
[19:07:44] hxegon: I use /ignore * JOINS PARTS QUITS
[19:07:52] hxegon: Erik_Underline: which gets rid of that
[19:08:04] pipework: I just keep them in because I don't need to read every line in here.
[19:08:06] SOLDIERz: has joined #ruby
[19:08:08] Motoservo: has joined #ruby
[19:08:44] doddok: has joined #ruby
[19:09:52] hxegon: Ox0dea: the depth and bredth of the vim pond is enormous. I'm not going to send a man/woman into a hurricane without a boat. YOU WON'T TAKE THIS ONE EMACS. NOT ON MY WATCH *shakes fist*
[19:10:35] hxegon: Erik_Underline: https://gist.github.com/anonymous/b790cceefc44327246ff
[19:10:43] pipework: hxegon: http://i.imgur.com/qYiYUaS.jpg
[19:11:12] SCHAAP137: has joined #ruby
[19:11:21] hxegon: not realistic. that octopos needs more footpetals
[19:11:30] hxegon: octopus*?
[19:11:49] big|bad|wolf: has joined #ruby
[19:11:50] mikeharris22: has joined #ruby
[19:11:51] Ox0dea: Oh, hey, /r/unixporn!
[19:11:53] Erik_Underline: Emacs users at work must be those hackers on TV we see everytime
[19:12:10] hxegon: Ox0dea: love that sub
[19:12:17] hxegon: xmonad4lyfe
[19:12:24] Ox0dea: Did you mean dwm?
[19:12:34] Ox0dea: (I'm sick.)
[19:12:42] hxegon: Ox0dea: DWM is for people who don't give up after 11 hours of looking at a config
[19:13:02] hxegon: Ox0dea: who give up*
[19:13:08] adaedra: herbstluftwm <3
[19:13:24] Erik_Underline: hxegon /ignore * JOINS PARTS QUITS doesn't work :O Neither when I replace * with JOINS etc
[19:14:18] Ox0dea: hxegon: I'm not sure I follow. I fuckin' love writing C to customize my WM.
[19:14:41] Ox0dea: (See my earlier parenthetical.)
[19:15:17] hxegon: Ox0dea: we both got it bad. xmonads config is straight up haskell code
[19:15:51] `tim`: has joined #ruby
[19:15:52] Erik_Underline: hxegon, thanks btw for that vim stuff
[19:16:41] momomomomo: has joined #ruby
[19:16:43] hxegon: Erik_Underline: no prob. you still have to figure out where to put that, how to install vundle, and how to use vundle to install syntastic though
[19:17:01] skweek: has joined #ruby
[19:17:15] hxegon: behold the depths of my madness https://github.com/clebrun/dotfiles/blob/master/.xmonad/xmonad.hs
[19:17:16] mikeharr_: has joined #ruby
[19:17:25] Ox0dea: Erik_Underline: Nice boat. It'd be a shame if something were to happen to it.
[19:18:06] adaedra: I think the joke sank.
[19:18:41] hxegon: it hit an iceburg full of mixed metaphors
[19:18:53] hxegon: wait a minute... thats my iceburg
[19:19:05] pipework: lettuce consider another topic.
[19:19:15] adaedra: what an interesting word, iceberg.
[19:19:27] adaedra: half-english, half-german.
[19:19:50] northfurr: has joined #ruby
[19:19:52] pipework: p sure berg is South African.
[19:19:55] ochkoffein: has joined #ruby
[19:20:11] dhollinger: has joined #ruby
[19:20:29] codecop: has joined #ruby
[19:20:41] hxegon: english is partially german tho
[19:20:47] allcentury: has joined #ruby
[19:20:50] hxegon: or it has roots in german
[19:21:18] Ox0dea: I smell PIE.
[19:21:20] adaedra: they're both germanic languages.
[19:21:25] craysiii: ice has german roots too
[19:22:06] hxegon: adaedra: afrikaans? had no idea
[19:22:42] hxegon: I swear this conversation had ruby in it somewhere
[19:22:56] Ox0dea: adaedra: Was it you who pointed out that Proto-Indo-European never fails to make an appearance in linguistic discussions?
[19:23:14] adaedra: Ox0dea: no.
[19:23:38] adaedra: hxegon: isn't afrikaans a mix of different languages?
[19:23:50] adaedra: well, more than others.
[19:23:52] ohcibi: afrikaans is the language the people spoke/speak in dutch colonies
[19:23:59] ohcibi: in africa
[19:24:14] ohcibi: thus afrikaans
[19:24:26] hxegon: its west germanic mixed with some dutch according to google
[19:24:54] ohcibi: dutch is a mix in general, english french and german
[19:25:08] adaedra: dutch = (german | english).gsub(/a/) { |a| a + a }
[19:25:44] shinenelson: has joined #ruby
[19:25:57] hxegon: theres the ruby.
[19:25:58] yfeldblum: has joined #ruby
[19:26:10] barhum2013: has joined #ruby
[19:26:11] Erik_Underline: has joined #ruby
[19:26:19] momomomomo: has joined #ruby
[19:26:28] musl: has joined #ruby
[19:27:02] northfurr: has joined #ruby
[19:27:16] Erik_Underline: has joined #ruby
[19:27:40] Erik_Underline: What's the definition of boolean?
[19:27:44] adaedra: well, dutch, german and english have a lot in common (germanic languages), you find things
[19:27:50] hrs: has joined #ruby
[19:27:53] pipework: Erik_Underline: google may have an idea.
[19:28:05] Timba-as: has joined #ruby
[19:28:52] skade: has joined #ruby
[19:29:51] babblebre: has joined #ruby
[19:29:55] Jackneill: has joined #ruby
[19:31:36] Ox0dea: Erik_Underline: Why do you ask questions for which you *know* Google will be able to provide you with an immediate answer?
[19:31:44] Ox0dea: I am genuinely interested in the rationale.
[19:32:00] rbennacer: has joined #ruby
[19:32:14] Erik_Underline: I already got this tab open :D
[19:32:38] Erik_Underline: And you might provide with some "in-the hood" terminology
[19:33:09] baweaver: has joined #ruby
[19:33:40] blackmesa: has joined #ruby
[19:33:57] Ox0dea: http://i.imgur.com/sHt5q.jpg
[19:34:18] adaedra: "in-the-hood" terminology around these parts is more axed around criminal offenses.
[19:34:35] Ox0dea: > onouditint
[19:35:05] s00pcan: has joined #ruby
[19:35:38] adaedra: Erik_Underline: booleans are basically the same in all programming languages.
[19:35:52] adaedra: The main principle, at least.
[19:36:00] Erik_Underline: Yeah but I don't know any other programming :P
[19:36:21] adaedra: No, but that means google's answer should be ok without looking too far.
[19:36:35] Ox0dea: He's not allowed to use Google on days ending with Y.
[19:36:47] moeabdol1: has joined #ruby
[19:36:51] DEA7TH: has joined #ruby
[19:36:53] Ox0dea: >> Time.now.strftime('%A')[-1] == ?y
[19:36:54] ruboto: Ox0dea # => true (https://eval.in/459578)
[19:37:05] Ox0dea: Maybe tomorrow.
[19:37:08] diego2: has joined #ruby
[19:37:09] adaedra: This works so much better in English.
[19:37:42] Erik_Underline: https://media.giphy.com/media/ftwkxpY8dUFZ6/giphy.gif
[19:38:21] adaedra: ok, your gif game seems on.
[19:38:23] Musashi007: has joined #ruby
[19:38:50] pipework: >>Time.now.strftime('%A').end_with?('y')
[19:38:51] ruboto: pipework # => true (https://eval.in/459579)
[19:39:04] Ox0dea: >> begin; require 'French'; rescue LoadError; :dealwithit; end # adaedra
[19:39:05] ruboto: Ox0dea # => :dealwithit (https://eval.in/459580)
[19:39:40] adaedra: Too bad French isn't lingua franca anymore.
[19:39:51] pipework: lingua frencha?
[19:40:22] adaedra: lingua diffuculta
[19:41:32] diego2: has joined #ruby
[19:43:03] stannard_: has joined #ruby
[19:43:21] moeabdol1: has joined #ruby
[19:44:08] Motoservo: has joined #ruby
[19:45:33] whippythellama: has joined #ruby
[19:45:36] Erik_Underline: Je peux parle francais :P
[19:45:42] hrs: has joined #ruby
[19:46:34] lacrymol1gy: has joined #ruby
[19:46:36] Ox0dea: I was going to do Welsh in Ruby, but Enumerator#sample isn't a thing. :<
[19:46:42] ruurd: has joined #ruby
[19:46:43] Ox0dea: I don't see why it shouldn't be.
[19:46:53] Erik_Underline: lol, no that'd be "I can to speak french", as opposed to my sentence meaning " I can speak french"
[19:46:59] baweaver: has joined #ruby
[19:47:04] Ox0dea: It couldn't guarantee uniform distribution in the general case, but so what.
[19:47:05] pipework: Just to_a first?
[19:47:27] Erik_Underline: Parler is infinitive form
[19:47:29] dreinull75: Ox0dea: I got it: https://eval.in/459582
[19:47:43] dreinull75: Ox0dea that's what I was trying to get.
[19:48:00] Ox0dea: pipework: Welsh = consonants.cycle.sample(rand 58).join
[19:48:04] adaedra: Erik_Underline: yeah, and?
[19:48:17] kfrz: has left #ruby: ()
[19:49:07] bmalum: has joined #ruby
[19:49:54] dreinull75: feed it whatever you feel like and it'll do: https://eval.in/459587
[19:50:03] Erik_Underline: Je sais pas combien francais tu sais, mais si tu me comprends, t'es probablement un francophone aussi.
[19:50:20] VeryBewitching: has joined #ruby
[19:50:31] Ox0dea: dreinull75: That's really quite neat.
[19:50:32] pipework: The only French I know is 'waffle'.
[19:50:44] adaedra: Erik_Underline: That's not bad, except before the first comma.
[19:50:49] Macaveli: has joined #ruby
[19:51:08] dreinull75: Ox0dea thanks for your help again. Even if it was mostly rubberducking :)
[19:51:41] Erik_Underline: I know that I'm not speaking "correct" french, but rather day-to-day expression :D
[19:52:19] h99h9h88: has joined #ruby
[19:52:55] haylon: has joined #ruby
[19:53:35] Erik_Underline: Adaedra, do you study french aswell? :o
[19:53:40] adaedra: Erik_Underline: to get back on your first, you already have a conjugated verb "peux", so the second one is infinitive.
[19:53:46] _djbkd: has joined #ruby
[19:53:49] agit0: has joined #ruby
[19:53:53] adaedra: Erik_Underline: worse, I'm French.
[19:54:37] Ox0dea: Erik_Underline: You merely adopted the baguettes.
[19:54:39] crossbeau: has joined #ruby
[19:54:43] Erik_Underline: https://media.giphy.com/media/11BAxHG7paxJcI/giphy.gif
[19:55:05] karapetyan: has joined #ruby
[19:55:54] skade: has joined #ruby
[19:55:57] crossbeau: hi guys, I am trying to use 'some params filesource="sourcefile" some params' how should I get this to allow the "" inside 'some params filesource=\"source\" some params'
[19:56:17] musl: has joined #ruby
[19:56:26] senayar: has joined #ruby
[19:56:26] senayar: has joined #ruby
[19:56:57] _djbkd: has joined #ruby
[19:57:12] symm-: has joined #ruby
[19:58:13] hxegon: "some params filesource=\"source\" ..." not working?
[19:58:32] Ox0dea: >> %q{"Let's use '"q"u'o"t"e's'"} # crossbeau
[19:58:33] ruboto: Ox0dea # => "\"Let's use '\"q\"u'o\"t\"e's'\"" (https://eval.in/459596)
[19:58:38] yeticry: has joined #ruby
[19:58:39] Ox0dea: %Q if you need interpolation.
[19:58:56] to_json: has joined #ruby
[19:58:56] to_json: has joined #ruby
[19:59:05] adaedra: Erik_Underline: that's ok, you made me laugh.
[19:59:20] hashpuppy: has joined #ruby
[19:59:36] Ox0dea: crossbeau: And feel free to choose your favorite delimiter(s): idiosyncratic-ruby.com/15-207-ways-to-rome.html
[20:00:05] crossbeau: here let me give some more context, I am writing a chef recipe
[20:00:10] hashpuppy: has left #ruby: ()
[20:00:28] pipework: Ox0dea: And %{} for interpolation!
[20:00:45] pipework: >> %|Lol, #{Object.new}|
[20:00:45] crossbeau: 'start /wait msiexec /qn /norestart /i openoffice411.msi SELECT_WORD=0 SELECT_EXCEL=0 SELECT_POWERPOINT=0 INSTALLLOCATION=\"C:\\Program Files (x86)\\OpenOffice 4\" ADDLOCAL=gm_Root" this is failing on the Installocation
[20:00:46] ruboto: pipework # => "Lol, #<Object:0x41df4210>" (https://eval.in/459601)
[20:00:53] NeverDie_: has joined #ruby
[20:02:26] phatypus: has joined #ruby
[20:02:28] Macaveli: has joined #ruby
[20:02:34] Testo: has joined #ruby
[20:02:47] cdg: has joined #ruby
[20:02:49] adaedra: Erik_Underline: also, if you want, I can fix your other sentence in -offtopic :p
[20:02:56] tvw: has joined #ruby
[20:03:10] chrislotix: has joined #ruby
[20:03:47] Guest53: has joined #ruby
[20:04:17] opensource_ninja: has joined #ruby
[20:05:08] Rollabunna: has joined #ruby
[20:05:13] bruno-: has joined #ruby
[20:06:01] JDiPierro: has joined #ruby
[20:06:20] Testo: Hi all, I have yaml file with line: `other: ! "%{count} days"` why `!`? thanks in advanced.
[20:06:20] NeverDie: has joined #ruby
[20:06:40] quazimodo: has joined #ruby
[20:07:26] FrankD_: has joined #ruby
[20:08:44] jenrzzz: has joined #ruby
[20:08:46] linduxed: has joined #ruby
[20:08:49] chrislotix: Hey folks, I have a question. Ruby docs are quite unclear so i'm trying to make sure. I'm doing "Learn ruby the hard way" and there's a line: txt = open(filename). What does open return that you can store in a variable?
[20:09:06] Puck6633: has joined #ruby
[20:09:43] diegoviola: has joined #ruby
[20:09:51] arthurix_: has joined #ruby
[20:10:20] nemo_: has joined #ruby
[20:10:28] mistym: chrislotix: open returns a File object, if you're opening a file.
[20:10:42] darthdeus: has left #ruby: ("Leaving")
[20:10:42] hxegon: chrislotix: File, so File.read to get contents for example
[20:10:43] Ox0dea: Testo: `!` by itself indicates a "non-specific" tag: http://yaml.org/spec/1.2/spec.html#c-non-specific-tag
[20:11:26] Testo: has joined #ruby
[20:11:34] bricker: chrislotix: it will return some subclass of IO: http://ruby-doc.org/core-2.2.3/IO.html File or StringIO
[20:12:00] chrislotix: mistym, hxegon: I see, thank you. For some reason i thought it returns the content itself and that calling .read on it was uneccessary
[20:12:13] Ox0dea: chrislotix: LRTHW has you opening files without having taught you how to experiment at a REPL? :<
[20:12:30] karapetyan: has joined #ruby
[20:13:10] chrislotix: Ox0dea: Sorry, what's REPL? I went lesson by lesson and i just found it quite odd.
[20:13:16] chrislotix: I should probably google it...
[20:13:27] hxegon: Read Eval Print Loop
[20:13:31] hxegon: so for example
[20:13:40] hxegon: >> puts 'this is a repl'
[20:13:41] ruboto: hxegon # => this is a repl ...check link for more (https://eval.in/459602)
[20:14:09] Ox0dea: >> open($0).class # chrislotix
[20:14:10] ruboto: Ox0dea # => File (https://eval.in/459603)
[20:15:06] kadoppe: has joined #ruby
[20:15:21] Testo: has joined #ruby
[20:15:38] pipework: hxegon: I don't think that counts as a repl, actually.
[20:15:45] pipework: Namely the lack of the L.
[20:16:21] hxegon: pipework: true, but close enough
[20:17:20] shpoont: has joined #ruby
[20:17:27] akem: has joined #ruby
[20:17:36] hxegon: >> show-doc String#split
[20:17:37] ruboto: hxegon # => /tmp/execpad-e150bcfcaefc/source-e150bcfcaefc:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/459604)
[20:17:51] platzhirsch: has left #ruby: ()
[20:17:57] karapetyan: has joined #ruby
[20:18:00] but3k4: has joined #ruby
[20:18:25] Synthmead: has joined #ruby
[20:18:33] hxegon: Hola akem, como estas?
[20:19:04] shpoont: has joined #ruby
[20:19:27] Testo: Hi all.nobie her, why we use `!` in yaml?
[20:19:45] madundead: has joined #ruby
[20:20:03] akem: not so bad, hxegon, how you doing?
[20:21:03] pipework: hxegon: Three out of four letters. good enough
[20:21:04] Ox0dea: Testo: YAML permits tagging values with types.
[20:21:15] diegoviola: has joined #ruby
[20:21:23] hxegon: akem: not too bad, eating pistachios and refactoring monkey-patches, as always
[20:21:31] malconis: has joined #ruby
[20:22:23] davedev24: has joined #ruby
[20:22:51] Testo: has joined #ruby
[20:23:48] rgtk: has joined #ruby
[20:24:44] hxegon: pipework: I mostly speak rather than write so it works for me *shrugs*
[20:27:27] Motoservo: has joined #ruby
[20:27:39] Erik_Underline: trying to call reverse! on arr if rev is true: def alphabetize(arr, rev=false) arr.sort! if rev==true arr.reverse! end
[20:28:06] karapetyan: has joined #ruby
[20:28:37] Guest53: has joined #ruby
[20:29:24] adaedra: Erik_Underline https://gist.github.com/anonymous/92dd38d0bfe9f64d8944 (crossposted from -offtopic)
[20:29:26] AccordLTN: has joined #ruby
[20:29:54] adaedra: the inline if is to be put after the conditional expression, not before
[20:30:45] adaedra: it's like a sentence: do this if that
[20:30:51] hxegon: Eso arr.reverse if rev == true
[20:31:11] adaedra: don't forget the ! if you want it in place :)
[20:31:11] mjuszczak: has joined #ruby
[20:31:29] skade: has joined #ruby
[20:31:37] Erik_Underline: Well, sentences can also say, if this, do that :D
[20:31:43] pdoherty: has joined #ruby
[20:31:44] mjuszczak: has joined #ruby
[20:32:02] Ox0dea: Erik_Underline: It's `if this then` in Ruby, but pretend you didn't read that.
[20:32:18] Testo: has joined #ruby
[20:32:43] adaedra: Erik_Underline: don't misread, 'do this' was one thing, there's no 'do' keyword.
[20:33:13] Ox0dea: adaedra: Um.
[20:33:32] adaedra: Not in this expression at least.
[20:33:48] devoldmx: has joined #ruby
[20:34:09] Erik_Underline: Why does then work but not do when do exists in ruby?
[20:34:09] rgtk: has joined #ruby
[20:34:28] Ox0dea: `if this then do` is awkwardly verbose in a programming language.
[20:34:34] adaedra: do is for blocks.
[20:36:34] Testo: has joined #ruby
[20:36:44] Z00t: has joined #ruby
[20:36:52] swgillespie: has joined #ruby
[20:37:00] Testo: for waht we use `!` in yaml files?
[20:40:09] Erik_Underline: Okay, so I did this https://gist.github.com/anonymous/c5ec49f35d3166f325f4 but I face another problem, the method doesn't reverse-alphabetize an arrey when it recieves true as a parameter :c
[20:41:37] adaedra: protip: in gist, if you put the right file extension in the file name, you have syntax colors.
[20:42:11] Erik_Underline: https://gist.github.com/anonymous/03ddcc0523fd0326ba2f It doesn't default to alphabetizing an array when it doesn't receive a second parameter
[20:42:30] arthurix: has joined #ruby
[20:43:28] ngscheurich: has joined #ruby
[20:43:32] jpfuentes2: has joined #ruby
[20:43:34] allcentury: has joined #ruby
[20:43:38] musl: has joined #ruby
[20:43:38] diegoaguilar: has joined #ruby
[20:44:04] Motoservo: has joined #ruby
[20:44:08] adaedra: what is the expected output vs the actual output?
[20:44:21] bruno-: has joined #ruby
[20:44:30] Gi0: has joined #ruby
[20:45:00] mateusz_: has joined #ruby
[20:45:25] stamina: has joined #ruby
[20:47:05] mateusz_: I have a code that I intented to package as gem. My problem is that this code is using cache (to prevent repeated expensive API requests). Is there guideline where code packaged as gem should keep its cache? Maybe user should be forced to call "set_cache_path(path)" before using any functionality provided by gem?
[20:47:19] phil6kites: has joined #ruby
[20:47:22] mateusz_: Is there some guideline how gem should storing their caches?
[20:47:39] Motoservo: has joined #ruby
[20:47:47] Coldblackice: has joined #ruby
[20:48:36] Pumukel: has joined #ruby
[20:49:05] drbrain: Mateusz_: there's no guidelines
[20:49:22] drbrain: Mateusz_: if it's a per-process cache, use Dir.mktmpdir or Tempfile
[20:49:43] blue_deref: has joined #ruby
[20:49:45] agit0: has joined #ruby
[20:49:46] drbrain: if it's a cross-file cache, make a ~/.my_library_name/cache directory
[20:49:52] drbrain: err, cross-process
[20:50:35] Testo: has joined #ruby
[20:50:41] momomomomo: has joined #ruby
[20:51:05] ledestin: has joined #ruby
[20:51:11] mateusz_: So using "~/.my_library_name/cache" is normal? I though about it but it seemed to be an ugly solution (though I failed to find something better, explicit setting cache leads to really ugly boilerpalte code)
[20:52:53] platzhirsch: has joined #ruby
[20:52:54] treehug88: Mateusz_ : yup, that's pretty normal on unix. On Mac and windows they have different conventions
[20:53:14] mateusz_: drbrain: Thanks!
[20:53:28] adaedra: cache usually goes in /tmp if you don't need it to stay too long.
[20:53:33] timonv: has joined #ruby
[20:53:54] mateusz_: treehug88: Thanks! At this moment I want to have it working anywhere, I will worry about Win once/if somebody will want to use it except me :)
[20:54:09] drbrain: it's best to use Tempfile or Dir.mktmpdir if the cache is ephemeral, it'll end up in /tmp and disappear when your process exits
[20:54:39] Pumukel: has joined #ruby
[20:54:41] mateusz_: I found Tempfile and Dir.mktmpdir but I want cache to stay at least for days, maybe longer.
[20:55:12] htmldrum: has joined #ruby
[20:55:15] mateusz_: So ~/.something/ is the way to go, win/mac will be problematic but I may leave it for later.
[20:55:42] adaedra: Mateusz_: it's ok for mac too.
[20:55:46] Ox0dea: Mateusz_: How about Gem.datadir, then?
[20:56:01] Ox0dea: It's not got the greatest name as a place for cache data, but it's at least cross-platform.
[20:56:05] adaedra: Anyway, if your program is meant to run as daemon, maybe do it a place with right access in /var/cache .
[20:56:22] Erik_Underline: has joined #ruby
[20:56:27] Ox0dea: adaedra: Write it right.
[20:56:46] Ox0dea: > right access
[20:56:46] treehug88: adaedra 's idea is good too
[20:56:48] Erik_Underline: Why do I keep disconnecting while inactive?
[20:57:00] Ox0dea: Erik_Underline: Get a better client?
[20:57:10] loechel: has joined #ruby
[20:57:17] adaedra: Erik_Underline: computer inactive? It may disconnect when going into sleep mode.
[20:57:27] Erik_Underline: Better clients like what?
[20:57:33] Erik_Underline: I'm on other tabs in the browser
[20:57:46] Ox0dea: What year is it?
[20:57:57] h99h9h88: has joined #ruby
[20:58:17] Ox0dea: Erik_Underline: You can't have anything running but a browser?
[20:58:48] adaedra: Erik_Underline: yeah, get a non-web client, first.
[20:59:06] adaedra: Windows choices are mIRC, HexChat, Quassel, among others.
[20:59:11] diegoviola: has joined #ruby
[20:59:13] Ox0dea: drbrain: Gem.datadir isn't nearly as prevalent as it feels like it ought to be; how come?
[20:59:32] drbrain: few people know about it, and it's for static data usually
[20:59:46] rgtk: has joined #ruby
[21:00:02] x-light: has joined #ruby
[21:03:15] mateusz_: So Gem.datadir is returning existing folder, unique for each game where gem has read/write rights? Unfortunately I failed to find documentation better than http://ruby-doc.org/stdlib-1.9.2/libdoc/rubygems/rdoc/Gem.html#method-c-datadir
[21:03:26] SylarRuby: has joined #ruby
[21:03:31] beanHolez: has joined #ruby
[21:03:33] enigmaty: has joined #ruby
[21:04:25] Oatmeal: has joined #ruby
[21:05:35] Ox0dea: Mateusz_: That's about the size of it, but the directory doesn't automatically exist for each gem.
[21:06:05] beanHolez: I am using a cookie session storage for my app. Sometimes, a user will accidentally open two browser windows when logging in. They will do what it is they need to do and close the window. Another user will come along and attempt to log in with the window the previous user accidentally opened, but because the previous user logged in with both windows open, the new user is now authenticated as the previous one. What are my choices here?
[21:06:33] mateusz_: Ox0dea: So I need to create it... Can I expect it to work across different OSes?
[21:06:38] Ox0dea: Mateusz_: You create 'data/foo/' in your top directory, and then you've got access to it via Gem.datadir('foo') wherever it ends up getting put on the user's system.
[21:08:18] Motoservo_: has joined #ruby
[21:08:37] Ox0dea: beanHolez: cookie != session
[21:09:02] unshadow: has joined #ruby
[21:09:30] sepp2k: has joined #ruby
[21:09:40] unshadow: has joined #ruby
[21:09:52] momomomomo: has joined #ruby
[21:10:05] firstdayonthejob: has joined #ruby
[21:10:55] beanHolez: Ox0dea: A cookie containing the session_id (which is set across all browser windows) is not representative of the session?
[21:10:56] Pathfinder: has joined #ruby
[21:11:16] lesshaste: has joined #ruby
[21:12:19] mary5030: has joined #ruby
[21:13:21] Ox0dea: beanHolez: It is, but you needn't be using the same session_id in different browser windows.
[21:13:27] ruurd: has joined #ruby
[21:14:15] Ox0dea: You could either invalidate any existing sessions upon login, or else consider a session invalid after a certain period of inactivity.
[21:14:37] K1MOS: has joined #ruby
[21:15:07] karapetyan: has joined #ruby
[21:16:01] beanHolez: Ox0dea: Definitely not. The problem, though, is that the cookie is set for both open windows when the first user logs in. Therefore, the second user thinks they are logging in as themselves when they are really piggybacking off of the existing cookie that has already been set.
[21:16:27] mjuszczak: has joined #ruby
[21:16:35] beanHolez: I thought so as well, but when I clear_session, it doesn't seem to do the job. Was sure I was missing something
[21:16:39] davedev24: has joined #ruby
[21:17:14] shpoont: has joined #ruby
[21:17:56] pdoherty: has joined #ruby
[21:18:46] skade: has joined #ruby
[21:20:39] zenguy_pc: has joined #ruby
[21:20:59] shpoont: has joined #ruby
[21:22:37] Motoservo: has joined #ruby
[21:23:46] diegoviola: has joined #ruby
[21:24:30] hxegon_: has joined #ruby
[21:24:49] rbennacer: has joined #ruby
[21:25:01] beanHolez: Hmm, telling me "Can't verify CSRF token authenticity"
[21:25:08] SleepySensei: has joined #ruby
[21:25:17] shpoont: has joined #ruby
[21:26:16] yfeldblum: has joined #ruby
[21:26:46] karapetyan: why it is infinity loop https://gist.github.com/karapetyan/7f548e05476ff904ccb3
[21:26:50] Azure: has joined #ruby
[21:27:24] shpoont: has joined #ruby
[21:28:40] beanHolez: karapetyan: Are you certain based on your inputs that circle.size will ever be exactly 1? Usually, you'll want to use >= or <= for those kinds of conditions
[21:28:42] adaedra: This calls for the most basic form of debugging, the "puts-debug"
[21:29:38] mjuszczak: has joined #ruby
[21:29:49] karapetyan: beanHolez: no, size will be 1 finally. cause inside loop i delete elements untill array.size == 1
[21:30:14] karapetyan: and array.size == 1 is condition for finish loop
[21:30:28] jessemcgilallen: has joined #ruby
[21:31:34] momomomomo: has joined #ruby
[21:31:49] adaedra: karapetyan: what beanHolez says, is that usually the stop is done on the invalid range, not just the edge case. i.e., if you want to go up to 20, until i > 20 rather than until i = 20
[21:32:03] Erik_Underline: has joined #ruby
[21:32:23] ruby-lang519: has joined #ruby
[21:32:44] EmeraldExplorer: has joined #ruby
[21:33:05] adaedra: karapetyan: you should put a puts to inspect how your array or maybe other variables behave at each iteration and check if that match indended behavior.
[21:33:46] karapetyan: ok, thank you.
[21:34:52] sepp2k1: has joined #ruby
[21:34:58] Motoservo: has joined #ruby
[21:35:01] ruby-lang519: Hello! In define_singleton_method description(http://apidock.com/ruby/Object/define_singleton_method) it mentions that one could specify method body in a block. Is it possible to specify parameters to that method?
[21:35:21] everbot: has joined #ruby
[21:35:55] to_json: has joined #ruby
[21:35:56] to_json: has joined #ruby
[21:35:59] shpoont: has joined #ruby
[21:36:15] Ox0dea: >> define_method(:foo) { |a, b| a + b }; foo 17, 25 # ruby-lang519
[21:36:16] ruboto: Ox0dea # => 42 (https://eval.in/459610)
[21:36:30] CloCkWeRX: has joined #ruby
[21:36:46] Motoservo: has joined #ruby
[21:37:08] diegoaguilar: has joined #ruby
[21:38:08] symm-: has joined #ruby
[21:38:39] swgillespie: has joined #ruby
[21:39:40] diegoaguilar: has joined #ruby
[21:41:20] Erik_Underline: How long will it take to master ruby?
[21:41:45] karapetyan: how many times i need to write nested loops to learn it write fast and well
[21:42:22] ruurd: has joined #ruby
[21:42:48] Erik_Underline: Karapetyan, what do you mean?
[21:42:48] solocshaw: has joined #ruby
[21:43:40] skade: has joined #ruby
[21:43:50] adaedra: Erik_Underline: years and years.
[21:43:55] riceandbeans: if I have method foo that returns type int, and I have some not so bright person that made the type on the other end require a string for whatever reason and I can't fix his code, can I just do foo.to_s or how would I have to do it?
[21:43:59] adaedra: But you don't need to /master/ it.
[21:44:01] karapetyan: Erik_Underline: i have some issues writing nested loops. It's always wrong and i spent 30-60 mins on debugging and fixing. I think it's not impressive
[21:44:05] riceandbeans: bar = foo, bar.to_s ?
[21:44:25] Ox0dea: >> 42.to_s # riceandbeans
[21:44:26] ruboto: Ox0dea # => "42" (https://eval.in/459611)
[21:44:48] Erik_Underline: Can you give some gist?
[21:44:50] Ox0dea: karapetyan: You're writing this the hard way on purpose?
[21:44:50] riceandbeans: but can I say the named method.to_s
[21:45:08] bruno-: has joined #ruby
[21:45:08] Alina-malina: has joined #ruby
[21:45:15] Ox0dea: riceandbeans: You can call #to_s on any value, and methods return values.
[21:45:17] riceandbeans: if the method is foo, what is the most correct way?
[21:45:25] karapetyan: Ox0dea: sorry, don't understand.
[21:45:26] riceandbeans: so foo.to_s is valid
[21:45:56] Ox0dea: >> def foo a, b; a + b; end; foo(17, 25).to_s # riceandbeans
[21:45:57] ruboto: Ox0dea # => "42" (https://eval.in/459613)
[21:46:10] Ox0dea: karapetyan: Well, I suggested #rotate earlier and you didn't go for it.
[21:46:51] Ox0dea: You don't really need to bother about remembering indices; everybody's wearing an ID card.
[21:46:53] riceandbeans: Ox0dea: thank you
[21:46:55] karapetyan: Ox0dea: ah, yes. Sure. Syntax sugar it's really handy, but i trying to understand how it works inside
[21:47:20] Ox0dea: karapetyan: #rotate isn't syntactic sugar; it's the perfect method for the Josephus problem.
[21:47:51] NeverDie: has joined #ruby
[21:47:52] Motoservo: has joined #ruby
[21:48:02] karapetyan: Ox0dea: i understand. Anyway i want to try solve it by my way first and after using #rotate
[21:48:34] Ox0dea: karapetyan: Imagine you're the Roman general: how would you carry out the proceedings most efficiently?
[21:50:47] karapetyan: Ox0dea: group all warriors by 3 and kill last warrior in each 3 groups (if i correctly understood question)
[21:50:56] Thomas-0725: has joined #ruby
[21:50:59] Ox0dea: karapetyan: No, that's completely missing the point of the exercise.
[21:51:12] Ox0dea: What does it mean to "group [them] by 3"?
[21:51:21] Ox0dea: Where do the other two go when they lose their comrade?
[21:51:29] ellisTAA: has joined #ruby
[21:51:53] ellisTAA: has joined #ruby
[21:52:16] karapetyan: hm, let me think :)
[21:52:46] Ox0dea: karapetyan: You've got them in a circle, and you're looking at the kth Jew, the first victim.
[21:53:01] Ox0dea: You kill him, and now there's a gap in the circle; what's your next move?
[21:53:31] Silverfall: has joined #ruby
[21:53:47] senayar: has joined #ruby
[21:53:47] senayar: has joined #ruby
[21:54:40] karapetyan: put another victim in a gap?
[21:54:51] Ox0dea: karapetyan: And leave a different gap elsewhere, or?
[21:55:18] Ox0dea: What happens if you tell them to form up to make the circle complete again?
[21:55:24] lipoqil: has joined #ruby
[21:55:42] karapetyan: narrow a circle ?
[21:55:47] sankaber: has joined #ruby
[21:56:07] karapetyan: well there will be a circle again with -1 warrior :/
[21:56:17] pepperbreath: has joined #ruby
[21:56:52] karapetyan: okay i can kill nth warrior and narrow circle after killing
[21:57:03] agit0: has joined #ruby
[21:57:49] k3asd`: has joined #ruby
[21:58:02] karapetyan: Ox0dea: well, all warriors that stays after victim change their index -1
[21:58:11] Ox0dea: karapetyan: Okay, the first warrior is dead and the circle has been reformed; you're comfortable where you're standing, so what do you tell the Jews to do in order to bring your next kill to you?
[21:58:54] baweaver: has joined #ruby
[21:59:36] Ox0dea: "Everybody move a little to the right", but how many times?
[22:00:52] leafybasil: has joined #ruby
[22:01:01] dreinull75: Is there a better way to check for nil or empty? ("foo".nil? || "foo".empty? ? "bar" : "foo" #=> "foo")
[22:01:11] ruurd: has joined #ruby
[22:01:27] Ox0dea: dreinull75: ActiveSupport provides #blank?.
[22:01:53] dreinull75: Ox0dea I thought I'm on the #ruby channel???!!!ELF
[22:02:02] c355E3B: has joined #ruby
[22:02:04] Ox0dea: dreinull75: You asked. :P
[22:02:25] Ox0dea: >> nil.to_s # dreinull75: This should help.
[22:02:26] ruboto: Ox0dea # => "" (https://eval.in/459632)
[22:02:31] dreinull75: Ox0dea I have no association with this Rails thing whatsoever
[22:02:42] Ox0dea: ActiveSupports isn't technically Rails, mind.
[22:02:51] Thomas-0725: has joined #ruby
[22:03:32] reichni: has joined #ruby
[22:03:47] karapetyan: Ox0dea: actually i don't know how many times. :(
[22:03:59] karapetyan: there always be a gap
[22:04:05] adaedra: (Importing AS just for #blank? is not really a good idea though.)
[22:04:20] Ox0dea: karapetyan: Just the opposite! Immediately closing the gap makes for a very simple solution.
[22:04:35] Ox0dea: dreinull75: Do it just to spite the Frenchman.
[22:04:44] Ox0dea: adaedra: <3
[22:04:47] pu22l3r_: has joined #ruby
[22:05:08] yfeldblum: has joined #ruby
[22:05:19] karapetyan: i can't close gap in circle. i can do it in line put a last element to gap place
[22:05:27] dreinull75: Ox0dea by now you know I'm not here for simple solutions (TM)
[22:05:34] Ox0dea: karapetyan: If you kill the kth Jew, reform the circle, and then kill the k+kth Jew, the wrong person dies.
[22:05:43] mikecmpbll: has joined #ruby
[22:05:58] Rollabunna: has joined #ruby
[22:06:00] Ox0dea: dreinull75: Fair enough. Alas, that nil.to_s is "" gives you one this time. :P
[22:06:02] duckpuppy: has joined #ruby
[22:06:14] northfurr: has joined #ruby
[22:07:18] Ox0dea: karapetyan: To clarify, you've been using #delete_at to "close the gap" the whole time.
[22:07:22] zenspider: yay! my latest talk is finally up: http://confreaks.tv/presenters/ryan-davis
[22:07:49] K1MOS: has joined #ruby
[22:07:53] zenspider: Ox0dea: what the fuck did I just walk into?
[22:07:56] firstdayonthejob: has joined #ruby
[22:08:01] dreinull75: Ox0dea the blank? method looks nice though: respond_to?(:empty?) ? !!empty? : !self
[22:08:12] Ox0dea: zenspider: A slightly morbid dive into the Josephus problem.
[22:08:29] Ox0dea: dreinull75: Great artists steal.
[22:08:34] bruno-: has joined #ruby
[22:08:44] zenspider: uh. ok. wow.
[22:09:17] tkuchiki: has joined #ruby
[22:09:37] dreinull75: zenspider now that you're here we'll all behave
[22:09:46] zenspider: I've personally always disliked #blank?. Poorly named and usually a leaky abstraction
[22:10:31] Ox0dea: karapetyan: I hope you won't take offense.
[22:10:33] Ox0dea: >> def J n, k; c = [*1..n]; c.rotate! k-1 and c.shift until c.size == 2; c end; J 41, 3
[22:10:33] ruboto: Ox0dea # => [16, 31] (https://eval.in/459640)
[22:10:57] yorickpeterse: My most hated methods are Array#flatten and Array#compact
[22:11:12] yorickpeterse: Not because they are not useful, they are, but because they're incredibly often abuse in Rails code
[22:11:17] Motoservo: has joined #ruby
[22:11:17] rbennacer: has joined #ruby
[22:11:26] karapetyan: Ox0dea: well, thank you anyway. Can't say that i understood how to solve this task, but now i'l try
[22:11:29] yorickpeterse: the combination of "flatten.compact" or "compact.flatten" is far too common
[22:12:18] sasi: has joined #ruby
[22:12:28] skade: has joined #ruby
[22:12:40] Ox0dea: yorickpeterse: But which is better?
[22:12:52] yorickpeterse: This thing called an "if statement"
[22:13:07] sasi: I want to use gem_openssl that was downloaded via rubygems.. I'm trying to use check_validity on an object of type OpenSSL:X509:Certificate
[22:13:07] Kero: has joined #ruby
[22:13:16] yorickpeterse: The combination is often abused when pushing objects that might be nil into an array
[22:13:29] yorickpeterse: so instead of being a good citizen and checking before pushing people just chain 120938109231 methods like it's jQuery
[22:13:30] sasi: I keep getting the error undefined meethod check_validity for OpenSSL:X509:Certificate
[22:13:32] zenspider: I also hate that we don't have a good word for non-empty in english
[22:13:33] sasi: What am I missing>
[22:13:45] Ox0dea: zenspider: Occupied.
[22:13:56] yorickpeterse: zenspider: "any?" would be my first thought
[22:14:02] ramfjord: has joined #ruby
[22:14:10] h99h9h88: has joined #ruby
[22:14:21] Ox0dea: yorickpeterse: But [nil] is non-empty.
[22:14:25] sdothum: has joined #ruby
[22:14:48] FungalRaincloud: has joined #ruby
[22:15:01] ramfjord: Is there something like module_function for classes? IE a function that declares an instance method from a symbol representing a class method?
[22:15:07] sasi: The method is there in the gem_openssl rubygem
[22:15:36] yorickpeterse: Ox0dea: that was in reference to blank?
[22:15:54] zenspider: yorickpeterse: [false]
[22:16:08] yorickpeterse: zenspider: not sure what blank? would do in that case
[22:16:09] hxegon_: zenspider: Ox0dea inhabited might be better
[22:16:10] yorickpeterse: I rarely use it
[22:16:11] Ox0dea: >> [] + [*4] + [*nil] + [*2] # yorickpeterse: Problem "solved".
[22:16:12] ruboto: Ox0dea # => [4, 2] (https://eval.in/459643)
[22:16:14] Cyther: has joined #ruby
[22:16:28] zenspider: best I've come up with is has_stuff?
[22:16:33] zenspider: but damn that's clunky
[22:16:38] zenspider: sometimes English is horrible
[22:16:42] sasi: Can someone help me please?
[22:16:45] Ox0dea: hxegon_: Check your anthropomorphism.
[22:16:49] c355E3B: ramfjord: `ri define_method`
[22:16:52] sasi: It must be a simple question
[22:16:52] Ox0dea: *anthropocentrism
[22:17:02] sasi: I'm using this code:
[22:17:08] zenspider: sasi: nobody can help you with as little info as you've provided
[22:17:13] zenspider: (nobody can help you WELL)
[22:17:37] karapetyan: Ox0dea: well, seems i have not logic mind :) cause i completely don't understand how to solve this Jewish task)
[22:17:48] sasi: Oops.. sorry, I'm including details now..
[22:18:03] sasi: I have in my code user_cert = OpenSSL::X509::Certificate.new(self.browser_cert_signed)
[22:18:05] zenspider: ...sighs and waits for a full paste...
[22:18:25] ruboto: We can't help you without your code, please post it to https://gist.github.com
[22:19:05] hxegon_: Ox0dea: do you mean anthrocentrism?
[22:19:14] hxegon_: Ox0dea: either way, lol
[22:19:42] Ox0dea: hxegon_: Either way, Objects do not inhabit their collections by their choosing; we force them to occupy these spaces.
[22:19:49] senayar: has joined #ruby
[22:20:18] sasi: Here's my code : https://gist.github.com/itssasanka/2959c4f9e5687bd4fbcf
[22:20:35] sasi: I'm getting the error undefined method check_validity for OpenSSL:x509:Certificate
[22:20:43] hxegon_: Ox0dea: should we start #occupyunoccupation?
[22:21:07] zenspider: sasi: http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/X509/Certificate.html
[22:21:11] startupality: has joined #ruby
[22:21:28] zenspider: do you see check_validity in the method list?
[22:21:37] sasi: Nope, but I see it here : https://github.com/sj26/ruby-1.9.3-p0/blob/master/lib/rubygems/gem_openssl.rb
[22:21:37] zenspider: what might be more appropriate?
[22:21:52] sasi: I have that gem in my rubygems
[22:22:08] sasi: Do I need to do anything else?
[22:22:10] tvw: has joined #ruby
[22:22:17] zenspider: you see it IN RUBYGEMS itself?
[22:22:29] tkuchiki: has joined #ruby
[22:22:31] zenspider: code to the API, not to random code you find
[22:22:32] sasi: Yeah, its in gem_openssl.rb which is in rubygems/ folder
[22:22:55] Timba-as: has joined #ruby
[22:22:59] sasi: Sorry for being a completely ruby noob
[22:23:15] zenspider: no prob... just make sure you're using actual api
[22:23:52] sasi: What do you mean? shouldn't I use the gem_openssl.rb?
[22:24:02] Ox0dea: zenspider: Are you telling sasi to copy and paste?
[22:24:11] _djbkd: has joined #ruby
[22:24:45] zenspider: sasi: no, you shouldn't depend on the internals of some other project. they can change at any time
[22:24:59] zenspider: Ox0dea: are you causing problems?
[22:25:22] sasi: Oh, I see. I'll see if I can use some method from the class directly. Thanks a lot zenspider!
[22:25:37] mjuszczak: has joined #ruby
[22:26:16] mjuszczak: has joined #ruby
[22:26:45] umgrosscol: has joined #ruby
[22:26:49] rickmasta: has joined #ruby
[22:27:14] Ox0dea: sasi: Might I suggest #verify and the @not_before instance variable?
[22:27:20] Motoservo: has joined #ruby
[22:27:21] mike3: has joined #ruby
[22:30:34] skade: has joined #ruby
[22:32:12] blue_deref: has joined #ruby
[22:34:13] Musashi007: has joined #ruby
[22:34:25] Motoservo: has joined #ruby
[22:35:53] sasi: Hey zenspider, how do I create an Object of type Certificate?
[22:36:02] sasi: And not OpenSSL:x509:Certificate
[22:36:20] sasi: And one more thing: my project is guaranteed to be on ruby 1.8.7 for life
[22:36:26] vF3hNGxc47h8: has joined #ruby
[22:36:39] sasi: Oxodea, thanks, how do I do that?
[22:37:38] arthurix_: has joined #ruby
[22:38:47] Gi0: has joined #ruby
[22:39:30] skinux: has joined #ruby
[22:40:01] skinux: Someone in here had stated its' difficult to have an IDE for Ruby because it's interpreted. I would like to know why it's so difficult compared to PHP or Python which are also interpreted languages?
[22:42:43] c355E3B: skinux: its not so much the interpretation bit as the metaprograming stuff
[22:42:52] Motoservo: has joined #ruby
[22:43:01] skinux: What exactly is the "meta programming" of Ruby??
[22:43:17] c355E3B: stuff like `define_method` `missing_method` etf
[22:43:17] skinux: When I think of meta I think of HTML <meta name="this" content="that"/ >
[22:44:31] i8igmac: im trying to insert into a mysql database a single \
[22:44:40] i8igmac: %-UPDATE `compress`.`hash` SET `sub` = '\' WHERE `hash`.`ID` =55; -
[22:44:47] i8igmac: %-UPDATE `compress`.`hash` SET `sub` = "\" WHERE `hash`.`ID` =55; -
[22:45:07] i8igmac: "\" or '\' fails
[22:45:10] c355E3B: skinux: the short of it is that its hard to understand what methods are available by inspecting the source.
[22:46:27] skinux: Hmm. I thought IDEs used API documentations or some kind of stored lists to know what methods are available.
[22:46:28] i8igmac: "\" => \"\"
[22:46:50] c355E3B: skinux: some do, i think eclipse does that heavily for java
[22:47:13] skinux: Why couldn't it be done for Ruby?
[22:47:29] c355E3B: AFAIK Rubymine has done some of it
[22:47:46] c355E3B: you run into issues though on features like jump to method definition
[22:48:23] c355E3B: if the method is really implemented with missing method and has no "real" location in source
[22:48:54] skinux: Oh. Apparently missing_method isn't what I thought it was.
[22:49:03] Ox0dea: skinux: *method_missing
[22:49:16] ytti: meta is about self-referencing
[22:49:17] skinux: I thought missing_method would return true or false depending on whether or not the method exists.
[22:49:27] ytti: the HTML meta tag means it's metainformation, the HTML page is informatino
[22:49:38] ytti: and the META tag contains information of that information, hence meta
[22:49:43] c355E3B: skinux: nope
[22:49:46] skinux: Forgive me for this question, but can Ruby be compiled to native?
[22:49:46] Ox0dea: skinux: There is no such thing as `missing_method`.
[22:49:49] ytti: computer program does something
[22:49:51] Motoservo: has joined #ruby
[22:49:58] ytti: program which writes the program is metaprogram
[22:51:11] roxtrongo: has joined #ruby
[22:52:01] h99h9h88: has joined #ruby
[22:52:03] tlaxkit: has joined #ruby
[22:53:09] h99h9h88: has joined #ruby
[22:53:38] pullcheezy: has joined #ruby
[22:53:58] charliesome: has joined #ruby
[22:56:04] skade: has joined #ruby
[22:56:34] i8igmac: %-\- => improper
[22:56:41] i8igmac: "\" =>improper
[22:56:46] i8igmac: '\' =>improper
[22:57:03] quazimodo: has joined #ruby
[22:57:03] chipotle: has joined #ruby
[22:57:42] skade: has joined #ruby
[22:57:44] i8igmac: "'\'"=> "''"
[22:58:09] Motoservo: has joined #ruby
[22:58:27] karapetyan: has joined #ruby
[22:59:02] Ox0dea: i8igmac: You must always escape backslashes unless the backslash is itself being used as an escape character.
[22:59:27] aaron: has joined #ruby
[22:59:37] ruboto: adaedra # => (NilClass) ...check link for more (https://eval.in/459697)
[22:59:53] Ox0dea: That's... not what I expected.
[23:00:28] Ox0dea: i8igmac: Sorry, that wasn't quite right, but it's true for your cases where the backslash is escaping the closing delimiter.
[23:00:58] i8igmac: i feel like a dumb dumb lol i cant get it
[23:01:24] sasi: Hey @Ox0dea, I got it working with Not_after
[23:01:32] i8igmac: rs = con.query(%-UPDATE `compress`.`hash` SET `sub` = '#{x}' WHERE `hash`.`ID` =#{c+1}; -)
[23:01:38] sasi: But how can I use the check_validity method directly in the code I posteD?
[23:01:44] adaedra: i8igmac: \ is a special character with a special meaning. If you want a \, you have to double it.
[23:01:54] sasi: Once again it's here: https://gist.github.com/itssasanka/2959c4f9e5687bd4fbcf
[23:01:57] s00pcan: has joined #ruby
[23:02:07] i8igmac: my script fails when i get to this part of the loob "\\"
[23:02:18] leafybasil: has joined #ruby
[23:02:40] _djbkd: has joined #ruby
[23:03:03] Ox0dea: sasi: So you still want to call the #check_validity method that RubyGems adds to OpenSSL::X509::Certificate?
[23:03:38] sasi: Not that I still want to, but I want to know how
[23:03:41] sasi: If it's possible
[23:03:52] Ox0dea: It's okay if you want to do something bad.
[23:03:56] Ox0dea: We're not going to tell on you.
[23:04:13] haxrbyte_: has joined #ruby
[23:04:23] Ox0dea: sasi: Are you sure you don't want to just copy and paste it into your code?
[23:04:32] sasi: Nope, I am learning here.. will really appreciate it if you can tell me why it's exactly bad?
[23:04:36] sasi: copy paste what??
[23:05:26] allomov: has joined #ruby
[23:05:31] DiCablo: has joined #ruby
[23:05:54] Ox0dea: sasi: http://git.io/vlec8
[23:06:04] n_blownapart: has joined #ruby
[23:06:17] Ox0dea: They're just reopening the OpenSSL::X509::Certificate class and adding an instance method.
[23:06:22] Ox0dea: You're allowed to do that as well.
[23:06:40] s00pcan: has joined #ruby
[23:06:41] Nanuq: has joined #ruby
[23:07:07] sasi: Yeah, but how do I use that particular gem's method..I keep getting undefined method on class OpenSSL::X509::Certificate error..
[23:08:10] sasi: Oh, are you saying I have to reopen the class like that, and copy paste that exact code?
[23:08:24] Motoservo: has joined #ruby
[23:08:27] Ox0dea: sasi: If that is really what you want to do, go for it.
[23:08:56] sasi: Nope, I dont want to copy-paste.. I'm just wondering if I can use that class's method in my code directly
[23:09:00] sasi: I mean, invoke it..
[23:09:05] diego1: has joined #ruby
[23:09:50] moei: has left #ruby: ("Leaving...")
[23:09:52] rodfersou: has joined #ruby
[23:09:59] NeverDie: has joined #ruby
[23:10:12] diego1: has joined #ruby
[23:11:25] Ox0dea: sasi: You'll have to require 'rubygems/gem_openssl', but that'll execute all the code in that file.
[23:11:26] Motoservo: has joined #ruby
[23:11:46] sasi: Gotcha..
[23:11:58] sasi: Sorry for being a Ruby noob.. but I understand now
[23:13:00] h99h9h88: has joined #ruby
[23:13:45] Musashi007: has joined #ruby
[23:15:18] s00pcan: has joined #ruby
[23:15:18] senayar: has joined #ruby
[23:15:53] h99h9h88: has joined #ruby
[23:16:07] juanpablo__: has joined #ruby
[23:16:36] Motoservo: has joined #ruby
[23:16:40] riotjones: has joined #ruby
[23:16:43] s00pcan: has joined #ruby
[23:17:57] sasi: ACTION slaps AdamMeghji around a bit with a large fishbot
[23:19:20] zenguy_pc: has joined #ruby
[23:20:34] shevy: a self-slapping webchatster
[23:21:39] RegulationD: has joined #ruby
[23:22:29] `tim`: has joined #ruby
[23:24:22] s00pcan: has joined #ruby
[23:25:11] dopamean_: has joined #ruby
[23:25:57] Ropeney: has joined #ruby
[23:27:09] pullcheezy: has joined #ruby
[23:27:15] sankaber: has joined #ruby
[23:27:44] Motoservo: has joined #ruby
[23:28:32] x-light: has joined #ruby
[23:30:13] yfeldblum: has joined #ruby
[23:32:34] kobain: has joined #ruby
[23:32:47] mjuszczak: has joined #ruby
[23:33:43] sphex: has joined #ruby
[23:34:18] Pumukel: has joined #ruby
[23:38:10] hiyosi: has joined #ruby
[23:38:20] shevy: long live ruby \o/
[23:40:56] symm-: has joined #ruby
[23:41:55] pathrocle: has joined #ruby
[23:44:25] EminenceHC: has joined #ruby
[23:48:52] quaj: has joined #ruby
[23:49:09] quaj: has left #ruby: ("WeeChat 0.4.2")
[23:51:56] diegoaguilar: has joined #ruby
[23:53:26] skweek: has joined #ruby
[23:55:25] akem: has joined #ruby
[23:56:19] Musashi007: has joined #ruby
[23:57:16] JCOE: has joined #ruby
[23:57:35] Nanuq: has joined #ruby