« Back to channel list

#ruby - 03 February 2016

« Back 1 day Forward 1 day »
[00:00:23] toretore: law, it's easier to help if you explain what you're trying to do in more detail
[00:00:50] law: I have this big ol' ugly JSON object that I'm pulling from an API
[00:01:04] law: I want Sensu to check certain keys/values in that json object, and graph others
[00:01:44] law: I figure if I can get my ruby script to print out the data in 'perfdata' format (just "<check status> | key1=value1, key2=value2, keyN=valueN" format)
[00:01:48] Rodya_: has joined #ruby
[00:01:50] law: that would make my life much less hateful
[00:02:20] law: so, in preparation for flattening the hash for printing certain keys/values, I want to build a new hash in a slightly different format
[00:02:31] techietrash: has joined #ruby
[00:02:38] law: specifically, https://gist.github.com/803a8aa6d3f1219e61c2
[00:02:44] amoeba: has joined #ruby
[00:05:10] phredus: has joined #ruby
[00:05:38] garethrees: has joined #ruby
[00:05:59] _Tariq: How do I read Request Headers using the 'socket' library?
[00:06:19] dudedudeman: has joined #ruby
[00:07:31] mrmargolis: has joined #ruby
[00:07:54] Ox0dea: law: https://eval.in/512156
[00:08:03] Ox0dea: Not sure how you feel about that, but it's a start in the right direction.
[00:08:37] Ox0dea: Define your translation map and use it to drive the process of building the new Hash.
[00:08:51] law: ...whoa
[00:09:00] law: wtf is going on here?
[00:09:45] law: I understand... SOME of those idioms :-)
[00:09:56] toretore: _Tariq, socket doesn't know anything about http headers
[00:10:04] _Tariq: Oh dear, toretore
[00:10:07] law: you're taking an array of hashes in people, mapping them, and 'doing stuff'
[00:10:20] Ox0dea: law: Sure, it's all just mapping, really.
[00:10:33] iateadonut: has joined #ruby
[00:10:36] law: I don't quite grok lines 25 thru 29
[00:10:41] Ox0dea: >> [[:a, 1], [:b, 2]].to_h # law
[00:10:42] ruby[bot]: Ox0dea: # => {:a=>1, :b=>2} (https://eval.in/512157)
[00:10:49] Ox0dea: A Hash is literally just a buncha key-value pairs. :)
[00:11:18] law: what is [dest, src ? person.dig(*src) : person[dest]] doing?
[00:11:23] toretore: law, you want to do this, but first check that all the necessary values are present?
[00:11:29] law: toretore: yes
[00:11:47] danielwzd: has joined #ruby
[00:11:56] pawnbox: has joined #ruby
[00:11:58] Canar: ACTION smokes some Hash
[00:12:17] Ox0dea: law: This should clear things up a bit: https://eval.in/512158
[00:12:39] dsilfen: has joined #ruby
[00:12:49] Ox0dea: Shun such imperative code relentlessly!
[00:13:06] k13nox: has joined #ruby
[00:13:09] toretore: law, pretty = ugly.each_with_object{|station, result| if this && that; result[station['name']] = {this => that} end }
[00:13:53] toretore: i think imperative is good enough to begin with, if you're new inject, dig and friends can be intimidating
[00:14:06] toretore: better to get it working and the improve
[00:15:16] toretore: law, all you have to do is have an `if` that sanity checks and then populates the result if it passes
[00:16:54] mrmargolis: has joined #ruby
[00:17:16] toretore: _Tariq: what are you trying to do?
[00:17:33] _Tariq: toretore: I am building my own web server for a school project
[00:17:50] _Tariq: and one of the assignments is that I need to find out the User Agent string
[00:18:09] _Tariq: of the browser who is attending my webserver
[00:18:16] _Tariq: so that I can track how many times that same browser sees my website
[00:18:31] _Tariq: The thing is that I don't know how to even access the Request Headers
[00:18:39] vishwa: has joined #ruby
[00:18:39] _Tariq: since I need those Request Headers do be able to know the User String
[00:18:56] toretore: _Tariq: does it say to use a socket directly?
[00:19:02] havenwood: _Tariq: What are the constraints? Do you have to? ^
[00:19:36] toretore: _Tariq: parsing http is only really something you do if you're writing a parser, or as an educational excercise
[00:19:54] _Tariq: It does not say to use a socket directly
[00:19:55] whatsupdoc_: has joined #ruby
[00:19:57] B1n4r10: has joined #ruby
[00:20:03] havenwood: _Tariq: Are you familiar with Rack?
[00:20:05] toretore: then you should probably be using an http library
[00:20:27] _Tariq: The goal is to create a webserver though, havenwood, so I don't think Rack would work
[00:20:36] toretore: that's what rack is for
[00:20:44] havenwood: _Tariq: You can create a Rack webserver.
[00:20:57] _Tariq: Okay, I got it, the only limitation seems to be that I should use TCPServer
[00:21:04] kirillzh: has joined #ruby
[00:21:23] toretore: _Tariq: it depends on what ie expected from you
[00:21:39] Timberwo|f: has joined #ruby
[00:22:08] toretore: if the point is to learn about sockets, then you should be using sockets, if the point is to learn how to make a web server then you should probably be using something like rack
[00:22:11] nettoweb: has joined #ruby
[00:23:37] _Tariq: I think the unstated implication in these instructions is that I would be using sockets to build something like Rack
[00:23:52] _Tariq: I am afraid that if I use Rack, my assignment might become much more easier than it's supposed to be
[00:23:58] zacstewart: has joined #ruby
[00:24:29] whatsupdoc_: has joined #ruby
[00:25:03] toretore: ok, so then you have to parse the http as it comes off the socket
[00:25:40] azul1: has joined #ruby
[00:25:56] toretore: http 1 is fairly simple to parse, so writing a simple standalone server is feasible
[00:26:06] victoryismine: has joined #ruby
[00:26:50] toretore: basically it's ["METHOD PATH", *[header1, header2], '', *body].join("\r\n")
[00:26:57] _Tariq: Yeah, that's done
[00:27:08] _Tariq: I mean, I can parse simple queries
[00:27:13] _Tariq: even POST requests
[00:27:19] _Tariq: not POST requests
[00:27:22] _Tariq: GET requests with parameters
[00:27:40] victoryismine: has left #ruby: ()
[00:27:42] _Tariq: but is the only thing I'm getting just the HTTP as it come off the socket?
[00:27:52] toretore: ok, so then you should be able to separate the headers from the rest
[00:28:01] toretore: yes, that's all there is to it
[00:28:16] _Tariq: Let me see if I can get my code
[00:28:31] _Tariq: maybe I made a mistake of some kind that is only allowing me to see something like 'GET /home' and nothing eles
[00:28:54] toretore: method_path = line1; headers = read each line until empty line; body = read #{Content-Length} bytes
[00:29:02] Ox0dea: toretore: Do you happen to know more about why \r\n was chosen to delimit headers?
[00:29:26] toretore: no idea really.. maybe to please both unix and windows users?
[00:30:04] toretore: there is actually more to parsing headers afaicr, but most cases are this simple
[00:30:31] eam: Ox0dea: from the teletype and original ASCII standards I imagine
[00:31:00] Ox0dea: eam: It's defined in RFC 2616.
[00:31:03] atomical_: has joined #ruby
[00:31:16] eam: yeah \r\n is the canonical line separator for internet things
[00:31:23] toretore: _Tariq: if there existed a good standalone http parser for ruby you could use that.. but alas, that doesn't wxist
[00:31:30] eam: I thought you were asking why they made that choice
[00:31:39] _Tariq: https://github.com/tra38/My-First-Server/blob/master/parser.rb
[00:31:45] Ox0dea: eam: I am...
[00:31:55] Ox0dea: Were the CERN folks Windows users?
[00:32:12] _Tariq: I have seen \r\n before in my debugging
[00:32:14] eam: no, this predates windows - CRLF was common on teletypes
[00:32:22] eam: and many mainframes
[00:32:36] kalopsian: has joined #ruby
[00:32:37] _Tariq: But if I read all lines
[00:32:39] _Tariq: not just the first line
[00:32:40] toretore: Ox0dea: first web server was a next i think
[00:32:46] Ox0dea: toretore: You're right.
[00:32:46] _Tariq: maybe I might get the headers
[00:33:00] eam: Ox0dea: MSDOS took CRLF from CP/M
[00:33:08] toretore: _Tariq: your parser should probably take an io object
[00:33:21] toretore: then read lines off of it until it's "done"
[00:33:36] eam: multics is the oddball system that started the lone LF as a line terminator
[00:33:41] eam: unix then copied that
[00:33:58] eam: teletypes predate unix and multics both
[00:34:09] eam: ASCII dates back to the telegraph
[00:34:12] Ox0dea: CR is vestigial as fuck.
[00:34:14] dsilfen: has joined #ruby
[00:34:46] eam: control characters were invented in 1901
[00:35:09] Ox0dea: I'm not knocking control characters in general.
[00:35:10] _Tariq: Got it, thanks toretore
[00:35:38] eam: CR/LF I believe date back to the mid 1800s https://en.wikipedia.org/wiki/Baudot_code
[00:35:51] toretore: _Tariq: when it gets to the body, you should have read the Content-Length header to know how many bytes are in it
[00:35:55] eam: "Baudot's code became known as International Telegraph Alphabet No. 1"
[00:36:03] hahuang65: has joined #ruby
[00:36:06] toretore: _Tariq: and if not present, body is until EOF
[00:36:25] _Tariq: Okay, this is going to be tough then
[00:36:27] Ox0dea: From then to not very long ago, CR meant to move the damned writing head back to the far left.
[00:36:34] eam: but here comes johnny come lately mr self-important multics in the 1960s thinking it ought to just change around the line terminators
[00:36:38] _Tariq: but, wait, requests shouldn't have a body, right?
[00:36:46] eam: Ox0dea: it still does!
[00:36:57] Ox0dea: eam: On sane systems! :P
[00:37:07] eam: your pty is a tty virtual device implementing the mechanical logic of the telegraph
[00:37:08] toretore: _Tariq: you mean GET? they can, but usually don't
[00:37:21] eam: stty sane
[00:37:37] toretore: _Tariq: but your parser should handle all types, GET, POST, PUT, etc
[00:37:39] _Tariq: Well, I mean the request that the browser makes to a server
[00:37:39] Ox0dea: Why use two characters where one suffices? :/
[00:37:40] mostlybadfly: has joined #ruby
[00:37:45] _Tariq: not the HTTP Method
[00:38:05] eam: well, then you lose the ability to reposition in each dimension independently
[00:38:09] toretore: _Tariq: yes, requests do have bodies sometimes
[00:38:12] _Tariq: Like, I thought you do a request "GET /home" with its request headers, and then the browser sends its own page and response headers
[00:38:13] uber: has joined #ruby
[00:38:23] _Tariq: What are the purpose of these bodies then?
[00:38:26] Ox0dea: eam: I'm speaking specifically about the choice to use CRLF for HTTP headers again.
[00:38:43] toretore: _Tariq: there are many types of requests. POST is one of them and it usualy includes a body
[00:39:06] _Tariq: Fair enough
[00:39:17] _Tariq: Man, this parser is going to be difficult
[00:39:22] eam: Ox0dea: arguably no one ever stopped
[00:39:54] Ox0dea: I appreciate CR where it's appropriate; I disagree with RFC 2616 in that regard.
[00:40:18] eam: well RFC 2616 didn't set the standard -- it was published in the late 90s and just acknowledged it
[00:40:24] eam: the standard predates unix
[00:40:45] Ox0dea: The standard for...?
[00:40:49] eam: newlines
[00:41:22] lemur: has joined #ruby
[00:41:35] eam: remember unix only took off in the 80s
[00:41:36] pawnbox: has joined #ruby
[00:41:45] betabet: has joined #ruby
[00:42:08] eam: a minority of internet participating systems used LF back when these protocols were being first invented
[00:42:22] toretore: unix was the one to deviate from the standard afaik
[00:42:27] eam: (unix? Is that the thing AT&T just published?)
[00:42:31] eam: toretore: multics, but yeah
[00:42:52] eam: multics dates to the 60s, but it wasn't dominant
[00:42:56] toretore: well ok yes :)
[00:43:14] ^CrYpto^: has joined #ruby
[00:43:52] toretore: cr+lf makes sense in that that's what it took to move to the next line on a typewriter type device
[00:44:02] wldcordeiro: has joined #ruby
[00:44:06] Ox0dea: To the beginning of the next line.
[00:44:46] Ox0dea: That distinction doesn't seem particularly applicable to HTTP headers is the point I mean to make.
[00:44:53] k13nox: has joined #ruby
[00:45:01] Ox0dea: I get that it was just "the done thing".
[00:45:02] eam: Ox0dea: which protocols came before http?
[00:45:30] Ebok: has joined #ruby
[00:45:30] eam: http is one of the much later ones
[00:45:31] VeryBewitching: eam: That would be a bit of a list.
[00:45:48] toretore: i guess they wanted to have a "line based" protocol, and cr+lf is what "line" meant
[00:46:36] Ox0dea: ??\_(???)_/??
[00:46:43] VeryBewitching: I think with HTTP it comes down to "Let's not add extra syntax when a line break is data enough."
[00:47:12] VeryBewitching: It's a single character that separates headers, pretty effective.
[00:47:33] eam: we're discussing why the line break sequence is \r\n and not just \n
[00:47:52] toretore: i don't know.. frames seem simpler to me
[00:47:53] eam: and it's because the very early internet stuff was essentially about virtualizing a tty over the packet switched networks
[00:47:55] VeryBewitching: Because no one in the industry necessarily plays nicely?
[00:48:37] eam: and the original tty stuff is all \r\n, a decision which is traced directly back to Emile Baudot in the 1800s
[00:48:41] toretore: eam: that's a good point. it's just the way people were thinking back then
[00:49:04] toretore: the tty legacy is visible everywhere
[00:49:30] eam: the telegraph legacy, really
[00:49:39] VeryBewitching: The print medium is hard to let go of.
[00:49:49] aupadhye: has joined #ruby
[00:50:01] toretore: we shoud have moved on from that a few decades ago
[00:50:02] VeryBewitching: This is OT though, so I'm going to hide from the bat.
[00:50:04] eam: Baudot code became the International Telegraph Alphabet
[00:51:26] VeryBewitching: Everything starts somewhere.
[00:52:19] eam: assuming "\n" instead of honoring a flexible newline separator sequence is commonly called "unix brain damage" and ruby suffers from it in a few places
[00:52:21] Ox0dea: "The pure and simple truth is rarely pure and never simple."
[00:52:24] william3: has joined #ruby
[00:52:42] eam: http://catb.org/jargon/html/U/Unix-brain-damage.html
[00:54:21] Ox0dea: Down with progress, you say?
[00:54:50] eam: why is unix brain damage progress?
[00:56:32] Ox0dea: How do you overwrite the current line in Windows?
[00:57:46] kirillzh: has joined #ruby
[00:57:50] c0ncealed: has joined #ruby
[00:57:56] Ox0dea: This is apparently one way to do it: http://superuser.com/a/492067
[00:58:07] Ox0dea: In Unix, we just say \r.
[00:58:25] mg^: Depends on if ANSI.SYS is loaded or not :)
[00:58:42] eam: I haven't used windows in a long time, but why wouldn't \r work?
[00:59:01] Ox0dea: I guess it might.
[00:59:21] dsilfen: has joined #ruby
[00:59:23] eam: that's kind of the point of the multibyte sequence -- each component can be invoked independently
[00:59:38] eam: a better question is: how do you advance the line without resetting the cursor to the left margin on unix?
[01:00:32] Ox0dea: Does \n just move down a row on Windows, then?
[01:00:50] eam: I think it should -- I haven't used cmd.exe in decades
[01:00:51] ja: has joined #ruby
[01:01:12] VeryBewitching: OT: I run Windows for games only. I have no other use for it.
[01:01:17] eam: btw, re: RFC 2616, I'd suggest this is just an explicit statement of the implicit assumptions found in RFC 1 (which talked about virtualizing the tty over the internet)
[01:01:21] ja: Hi peeps! I???m curoius: Has any of you ever used Float#phase? What???s the point? I find it very intriguing.
[01:01:40] eam: it only took them 30 years to realize they should spell it out
[01:02:11] ja: ???Returns 0 if the value is positive, pi otherwise.??? ?????Who would *ever* need something like that? It???s probably a math thing that I don???t understand.
[01:03:02] Ox0dea: ja: Complex#phase is a little more interesting.
[01:03:28] Ox0dea: Never mind.
[01:03:33] moeabdol: has joined #ruby
[01:03:50] aryaching: has joined #ruby
[01:05:13] Ox0dea: Someone's got their phaser set to stun.
[01:06:08] VeryBewitching: Phaser.stun :Ox0dea
[01:06:14] ja: Reading Complex#phase???s documentation only confused me further
[01:06:31] Ox0dea: VeryBewitching: That really oughta be an instance method.
[01:06:32] yoongkang: has joined #ruby
[01:06:39] Ox0dea: And I'm a perfectly valid numeric literal, thank you!
[01:07:00] VeryBewitching: Maybe Phaser is a module.
[01:07:29] toretore: Phaser.stun implies firing all pharers at once
[01:07:56] toretore: or setting, i guess
[01:08:00] shevy: I would append a ! because it excites us more
[01:08:18] Ox0dea: ObjectSpace.each_object Phaser, &:stun
[01:09:21] bronson: has joined #ruby
[01:09:28] VeryBewitching: Existence.all :phaser do |p|; p.stun 0x0dea; end
[01:09:52] VeryBewitching: That would take a long time to run I bet.
[01:09:58] eam: did you hear about the ensign and her troubles with the ship's security team?
[01:10:19] aupadhye: has joined #ruby
[01:10:33] eam: no matter how hard they tried they couldn't phase her
[01:10:45] Ox0dea: http://tfd.com/faze
[01:11:02] atomical: has joined #ruby
[01:11:08] eam: yes but the double entendre you see
[01:11:15] eam: just a moment let me explain this joke
[01:11:25] moeabdol1: has joined #ruby
[01:11:37] eam: hangon I swear it will be much more funny after a lengthy explanation
[01:11:47] Ox0dea: A woman walks into a bar and asks for a double entendre; the barman gives it to her.
[01:11:52] jbrhbr1: has joined #ruby
[01:11:56] shevy: I don't get it
[01:12:10] craysiii: has joined #ruby
[01:12:19] shevy: the only one who should make jokes is baweaver cuz they are dam funny
[01:12:27] eam: shevy: nice
[01:12:34] mg^: They hold back lots of water?
[01:12:49] mg^: in an amusing fashion, no less?
[01:13:03] shevy: I learned in ecology that they are "system engineers"
[01:13:05] Rodya_: has joined #ruby
[01:13:36] atomical_: has joined #ruby
[01:14:06] mg^: and damn, I should have gotten that sooner
[01:14:16] mg^: I blame 5 PM
[01:15:22] youch: has joined #ruby
[01:15:40] sucks: has joined #ruby
[01:16:46] dsilfen: has joined #ruby
[01:17:45] tenderlove: has joined #ruby
[01:18:21] Rodya_: has joined #ruby
[01:18:36] arthropododo: what does the i in the symbol array %i(example example example) stand for?
[01:19:35] Mon_Ouie: 'interned' (symbols being interned strings)
[01:19:38] dontpauseyet: has joined #ruby
[01:20:12] lessless: has joined #ruby
[01:20:20] dontpauseyet: ho. im getting this error when i try to run msfcli http://pastie.org/10706335
[01:20:36] dontpauseyet: is this a dependency issue?
[01:20:59] shevy: invalid multibyte escape: /\xff\xed\xff\xfd\x06/
[01:21:14] arthropododo: Mon_Ouie: the more you know. thanks
[01:21:47] Rodya_: has joined #ruby
[01:22:54] triplekmafia: has joined #ruby
[01:22:56] triplekmafia: hello i would like to know if you have to give up foreign citizenships if you want to get a security clearance
[01:23:33] craysiii: this might be the wrong room for that
[01:23:42] triplekmafia: where should i ask
[01:24:02] jamw: has joined #ruby
[01:24:31] Rodya_: has joined #ruby
[01:25:05] baweaver: has joined #ruby
[01:25:31] shevy: triplekmafia what do you have to say about this
[01:26:20] havenwood: !troll triplekmafia
[01:26:20] ruby[bot]: +bb triplekmafia!*@*$#ruby-banned *!*@gateway/web/freenode/ip.192.34.60.21$#ruby-banned
[01:26:22] ruby[bot]: ruby[bot] kicked triplekmafia: is a bannable offense, see http://ruby-community.com/pages/user_rules
[01:26:40] ruby[bot]: -b mantas322!*@*$#ruby-banned
[01:26:48] dlitvak: has joined #ruby
[01:26:55] Ox0dea: Gotta love the new trigger.
[01:29:40] eam: he didn't even clarify as to what state the security clearance was for
[01:29:45] TomPeed: has joined #ruby
[01:29:54] eam: supply sufficient information with your questions, folks
[01:31:11] DLSteve: has joined #ruby
[01:31:14] mg^: Well, I could speak to probable outcomes when applying for a U.S. clearance, but this is not the place.
[01:32:49] lektrik: has joined #ruby
[01:32:54] dsilfen: has joined #ruby
[01:34:14] uris: has joined #ruby
[01:35:28] Ox0dea: eam: 3J#Eq
[01:36:42] hahuang65: has joined #ruby
[01:36:58] Ox0dea: >> Encoding::ITA2 rescue :/
[01:36:59] ruby[bot]: Ox0dea: # => :/ (https://eval.in/512169)
[01:39:12] Rodya_: has joined #ruby
[01:39:34] kirillzh: has joined #ruby
[01:41:47] dlitvak_: has joined #ruby
[01:42:49] stevemackinnon: has joined #ruby
[01:46:00] meves: has joined #ruby
[01:46:22] stevemac_: has joined #ruby
[01:46:34] p1k: has joined #ruby
[01:47:58] dsilfen: has joined #ruby
[01:47:58] youch: has joined #ruby
[01:48:41] atomical: has joined #ruby
[01:49:27] Ox0dea: eam: Never mind. :( I messed it up by having an extra 0 in my NUL escape: https://eval.in/512170
[01:50:20] krobzaur_: has joined #ruby
[01:51:14] pawnbox: has joined #ruby
[01:52:11] nanoz: has joined #ruby
[01:53:45] uris: has joined #ruby
[01:54:56] vagnerd: has joined #ruby
[01:54:57] vagnerd: has joined #ruby
[01:58:16] jottr_: has joined #ruby
[01:58:26] babblebre: has joined #ruby
[01:58:35] DEA7TH: has joined #ruby
[01:59:10] Hanmac: has joined #ruby
[01:59:40] hahuang65: has joined #ruby
[02:05:46] uris: has joined #ruby
[02:05:53] at46_: has joined #ruby
[02:08:18] bb010g: has joined #ruby
[02:10:56] dsilfen: has joined #ruby
[02:11:36] eam: well then
[02:11:38] dcunit3d: has joined #ruby
[02:12:12] ferz_: has joined #ruby
[02:12:56] dlitvak: has joined #ruby
[02:15:04] Ebok: has joined #ruby
[02:18:36] Bloomer: has joined #ruby
[02:19:43] Ox0dea: I didn't mean for it to be a goose chase, I swear. :(
[02:20:02] Ox0dea: I was so glad that "HI THERE" came out to all printable characters too.
[02:21:06] Alazoral: has joined #ruby
[02:22:14] DEA7TH: has joined #ruby
[02:24:28] uris: has joined #ruby
[02:25:17] atomical: has joined #ruby
[02:26:37] yoongkang: has joined #ruby
[02:29:14] sankaber: has joined #ruby
[02:29:59] youch: has joined #ruby
[02:31:07] cassioscabral: has joined #ruby
[02:31:10] dsilfen: has joined #ruby
[02:31:42] aryaching_: has joined #ruby
[02:34:19] rkazak: has joined #ruby
[02:39:47] Channel6: has joined #ruby
[02:41:50] sankaber: has joined #ruby
[02:42:09] baweaver: has joined #ruby
[02:43:04] dlitvak_: has joined #ruby
[02:46:46] moeabdol2: has joined #ruby
[02:49:43] dsilfen: has joined #ruby
[02:49:53] ecksit: has joined #ruby
[02:50:29] ecksit: has joined #ruby
[02:51:06] ecksit: has joined #ruby
[02:51:45] ecksit: has joined #ruby
[02:53:53] law: has left #ruby: ()
[02:54:19] Bloomer: has joined #ruby
[02:54:44] jackjackdripper1: has joined #ruby
[02:54:56] hxegon: has joined #ruby
[02:56:22] dopamean_: has joined #ruby
[02:56:43] newbie22: has joined #ruby
[02:57:19] jgt2: has joined #ruby
[02:57:46] dangeranger: has joined #ruby
[02:57:53] arescorpio: has joined #ruby
[02:59:09] chouhoulis: has joined #ruby
[03:00:03] tuelz1: has joined #ruby
[03:03:40] meves: has joined #ruby
[03:09:24] Bloomer: has joined #ruby
[03:11:31] dsilfen: has joined #ruby
[03:12:23] newbie22: *: I have a question, is there anyone there ??? And do not forget my name is newbie22
[03:12:32] bhaak: has joined #ruby
[03:18:52] havenwood: newbie22: hi
[03:20:01] newbie22: I solve it, thanks anyway
[03:20:19] newbie22: I was using irb
[03:20:21] atomical: has joined #ruby
[03:20:51] Ox0dea: That's a paddlin'.
[03:20:53] newbie22: and the question was about "require", but then I found out about "load" so, thanks anyway
[03:21:21] uris: has joined #ruby
[03:22:07] krobzaur_: has joined #ruby
[03:22:43] newbie22: What is a paddlin ??
[03:24:51] jamw: has joined #ruby
[03:26:11] KensoDev: has joined #ruby
[03:27:33] ecksit: has joined #ruby
[03:27:45] uris: has joined #ruby
[03:28:14] ecksit: has joined #ruby
[03:28:52] ecksit: has joined #ruby
[03:29:31] ecksit: has joined #ruby
[03:29:40] Darmani: has joined #ruby
[03:29:46] Darmani: Hey kids<3
[03:30:10] ecksit: has joined #ruby
[03:30:29] ledestin: has joined #ruby
[03:30:50] ecksit: has joined #ruby
[03:32:11] sneakerhax: has joined #ruby
[03:32:26] dsilfen: has joined #ruby
[03:34:31] Ox0dea: Darmani: Let's write a linear congruential generator!
[03:34:48] Darmani: Ox0dea - Lol
[03:34:58] Ox0dea: inb4 OMGWTFLCG
[03:35:10] uris: has joined #ruby
[03:35:11] Darmani: Why you so mean Q.Q
[03:35:42] pawnbox: has joined #ruby
[03:35:46] Darmani: inb4 omgwtflcg lol
[03:37:52] uris: has joined #ruby
[03:40:57] Ox0dea: >> ?= * rand(6) + ?D + ?~ * rand(6)
[03:40:58] ruby[bot]: Ox0dea: # => "D~~~~" (https://eval.in/512265)
[03:41:05] Ox0dea: A paltry showing, ruby[bot].
[03:41:41] al2o3-cr: biggen at they
[03:49:18] dsilfen: has joined #ruby
[03:49:25] william3: has joined #ruby
[03:52:30] exadeci: has joined #ruby
[03:58:17] jgt2: has joined #ruby
[04:01:01] Darmani: Ox0dea - yo
[04:01:55] Darmani: I found that Ruby book that everyone likes, fundamentals of ruby or pragmatic ruby whatever the fuck its called
[04:02:00] Darmani: there's like a fat lady on the front cover.
[04:02:04] tuelz1: has joined #ruby
[04:02:30] Darmani: Anyway, I found it free as a pdf on the internet but it's outdated. It's like for 1.9.3
[04:02:35] Darmani: Can I still read it? Would it help
[04:03:06] Ox0dea: No, 1.9.3 is kill.
[04:05:08] Ox0dea: Darmani: https://eval.in/512276
[04:05:51] Darmani: Alright for sure. I was just looking for some new material to read.
[04:05:56] Darmani: Ox0dea - thanks ^^
[04:06:05] ZeeNoodleyGamer: has joined #ruby
[04:06:11] Ox0dea: What's with the change of heart? :P
[04:06:25] Brklyn: has joined #ruby
[04:06:36] baweaver: has joined #ruby
[04:06:36] Darmani: What do you mean?
[04:06:56] jottr_: has joined #ruby
[04:07:24] Ox0dea: http://logs.ryanbigg.com/ruby?date=2016-01-18#4991695
[04:07:47] Darmani: You would have that saved
[04:07:55] zast: has joined #ruby
[04:08:18] baweaver: ACTION reads a ton
[04:08:34] Darmani: baweaver - Hey gorgeous<3
[04:08:37] krz: has joined #ruby
[04:08:47] ^CrYpto^: has joined #ruby
[04:09:27] youch: has joined #ruby
[04:09:31] Darmani: Ox0dea - I actually just started some office job today. It's not that difficult and I have my own room so I was looking for some stuff to read on my down time.
[04:09:36] Darmani: If you must know.
[04:09:58] Ox0dea: Er, does your room have a door...?
[04:10:13] Darmani: yeah... Lol
[04:10:44] Ox0dea: Does it close?
[04:11:01] dsilfen: has joined #ruby
[04:11:08] Ox0dea: Does it lock?
[04:11:36] Darmani: what the fuck
[04:11:39] Darmani: what color is it
[04:11:44] Darmani: do you have air conditioning
[04:12:11] Darmani: How many questions are you going to ask lol
[04:12:28] User458764: has joined #ruby
[04:13:56] Ox0dea: No further questions.
[04:15:07] nbdy: has joined #ruby
[04:16:01] braincrash: has joined #ruby
[04:16:09] Darmani: Ox0dea - I was actually pretty tired after work today. I didn't even want to read or do anything with programming. But I feel like I should at least do a little something everyday...
[04:16:26] Darmani: Otherwise everything I've gained up until this point will have been a waste
[04:16:27] Darmani: ACTION sigh
[04:16:34] ICantCook: has joined #ruby
[04:17:55] adgtl: has joined #ruby
[04:17:57] Ox0dea: [commitment escalates]
[04:18:06] Ox0dea: Once again: https://en.wikipedia.org/wiki/Escalation_of_commitment
[04:18:13] Ox0dea: (Last time, I promise.)
[04:20:23] oetjenj: has joined #ruby
[04:20:43] Darmani: Here's the problem with that theory. It's that I have not committed myself to any other path (as far as career-wise). Nor do I have any inclination to begin to learn something again from square one. I can do this. I mean the concepts are understandable, what I lack is the connections. Yeah they might not come to me as easily as they came to you but I can learn them. I know that much...
[04:21:55] Darmani: Ox0dea - Perhaps you're right. But nonetheless I won't give up, not yet anyway.
[04:24:43] Darmani: But thank you for that wonderful tidbit. The encouragement and empathy that you offer me is truly astonishing.
[04:26:01] moeabdol3: has joined #ruby
[04:26:59] krobzaur_: has joined #ruby
[04:28:04] zast: has joined #ruby
[04:28:51] arthropodado: has joined #ruby
[04:29:15] yoongkang: has joined #ruby
[04:32:38] dsilfen: has joined #ruby
[04:34:39] yfeldblum: has joined #ruby
[04:38:16] meves: has joined #ruby
[04:38:51] meves_: has joined #ruby
[04:38:59] danielwzd: has joined #ruby
[04:39:46] jbrhbr: has joined #ruby
[04:40:22] AnoHito: has joined #ruby
[04:42:39] davedev24: has joined #ruby
[04:44:31] jbrhbr: has joined #ruby
[04:44:37] Mia: has joined #ruby
[04:44:48] arthropodado: has joined #ruby
[04:45:26] graffix222: has joined #ruby
[04:46:07] gix: has joined #ruby
[04:47:27] barhum2013: has joined #ruby
[04:47:34] krz: has joined #ruby
[04:48:21] zambini: has joined #ruby
[04:48:35] kirillzh: has joined #ruby
[04:50:18] dsilfen: has joined #ruby
[04:58:49] hxegon: has joined #ruby
[04:59:19] jgt2: has joined #ruby
[05:00:14] ElSif: has joined #ruby
[05:02:09] jamw: has joined #ruby
[05:02:31] DTSCode: has joined #ruby
[05:02:47] tuelz1: has joined #ruby
[05:03:02] DTSCode: has joined #ruby
[05:07:22] sucks: has joined #ruby
[05:10:45] bronson: has joined #ruby
[05:11:18] DarthGandalf: has joined #ruby
[05:12:58] dsilfen: has joined #ruby
[05:14:17] kaka__: has joined #ruby
[05:19:03] moeabdol: has joined #ruby
[05:22:52] duderonomy: has joined #ruby
[05:24:10] ta: has joined #ruby
[05:25:19] rkazak: has joined #ruby
[05:32:04] Ebok: has joined #ruby
[05:32:15] vdamewood: has joined #ruby
[05:33:23] dsilfen: has joined #ruby
[05:37:36] arup_r: has joined #ruby
[05:38:06] barhum2013: has joined #ruby
[05:38:50] ZeeNoodleyGamer: has joined #ruby
[05:39:34] yfeldblum: has joined #ruby
[05:41:25] nisstyre: has joined #ruby
[05:41:33] sucks: has joined #ruby
[05:42:02] nisstyre: has joined #ruby
[05:42:10] yfeldblum: has joined #ruby
[05:42:46] moei: has joined #ruby
[05:44:51] vishwa: has left #ruby: ()
[05:45:31] ta: has joined #ruby
[05:45:32] elifoster: has joined #ruby
[05:46:05] phredus_: has joined #ruby
[05:46:41] nchambers: has joined #ruby
[05:47:38] krz: has joined #ruby
[05:49:03] Eiam_: has joined #ruby
[05:51:17] zapata: has joined #ruby
[05:52:30] moeabdol1: has joined #ruby
[05:53:18] k13nox: has joined #ruby
[05:54:29] sucks: has joined #ruby
[05:54:50] terminalrecluse: has joined #ruby
[05:55:14] dsilfen: has joined #ruby
[05:56:38] iateadonut: has left #ruby: ()
[05:59:13] moeabdol2: has joined #ruby
[06:00:10] jgt2: has joined #ruby
[06:02:52] iateadonut: has joined #ruby
[06:03:19] PedramT: has joined #ruby
[06:03:32] tuelz1: has joined #ruby
[06:03:33] iateadonut: has left #ruby: ()
[06:06:39] mdw: has joined #ruby
[06:06:49] Axy: has joined #ruby
[06:08:59] jottr_: has joined #ruby
[06:14:18] govg: has joined #ruby
[06:14:33] n00bDev: has joined #ruby
[06:14:46] dsilfen: has joined #ruby
[06:17:05] stryek: has joined #ruby
[06:21:29] baweaver: has joined #ruby
[06:22:13] rkazak: has joined #ruby
[06:22:53] lemur: has joined #ruby
[06:22:56] PedramT: has joined #ruby
[06:22:56] mary5030: has joined #ruby
[06:23:18] ur5us: has joined #ruby
[06:27:17] govg_: has joined #ruby
[06:29:58] yoongkang: has joined #ruby
[06:30:59] graffix222: has joined #ruby
[06:31:22] ur5us: has joined #ruby
[06:31:28] PedramT: has joined #ruby
[06:31:53] Musashi007: has joined #ruby
[06:32:06] ramfjord: has joined #ruby
[06:32:48] aganov: has joined #ruby
[06:32:51] speakingcode: has joined #ruby
[06:34:37] dsilfen: has joined #ruby
[06:34:40] at46: has joined #ruby
[06:36:12] anisha: has joined #ruby
[06:40:15] Mon_Ouie: has joined #ruby
[06:42:16] atmosx: has joined #ruby
[06:46:53] adgtl: has joined #ruby
[06:46:57] adgtl: has joined #ruby
[06:49:48] hahuang65: has joined #ruby
[06:49:49] djbkd: has joined #ruby
[06:50:23] william3: has joined #ruby
[06:54:32] lemur: has joined #ruby
[06:55:07] MrSamuel: has joined #ruby
[06:57:13] yfeldblum: has joined #ruby
[06:57:44] TomyLobo: has joined #ruby
[06:57:45] claw: has joined #ruby
[06:58:28] dsilfen: has joined #ruby
[06:58:59] last_staff: has joined #ruby
[07:03:34] kwesidev: has joined #ruby
[07:03:55] troulouliou_div2: has joined #ruby
[07:04:00] kwesidev: has left #ruby: ()
[07:04:19] tuelz1: has joined #ruby
[07:05:14] solars: has joined #ruby
[07:05:50] tvw: has joined #ruby
[07:07:05] PedramT: has joined #ruby
[07:07:32] Guest84191: has joined #ruby
[07:10:50] karapetyan: has joined #ruby
[07:10:57] karapetyan: has joined #ruby
[07:11:04] PedramT: has joined #ruby
[07:11:26] psye: has joined #ruby
[07:12:51] zarubin: has joined #ruby
[07:13:34] roshanavand: has joined #ruby
[07:14:04] mhoungbo: has joined #ruby
[07:14:09] Infra-Red: has joined #ruby
[07:14:45] roshanavand: has joined #ruby
[07:15:27] roshanavand: has joined #ruby
[07:17:03] bjmllr: has joined #ruby
[07:17:23] dsilfen: has joined #ruby
[07:17:30] symm-: has joined #ruby
[07:18:14] sandstrom: has joined #ruby
[07:19:00] PedramT_: has joined #ruby
[07:19:06] scepticulous: has joined #ruby
[07:20:37] PedramT: has joined #ruby
[07:22:02] burgestrand: has joined #ruby
[07:23:07] nodejunkie: has joined #ruby
[07:24:18] mondok: has joined #ruby
[07:27:05] karapetyan: has joined #ruby
[07:27:17] enkristoffer: has left #ruby: ("???")
[07:28:40] andikr: has joined #ruby
[07:30:03] wethu: has joined #ruby
[07:32:45] Infra-Red: has joined #ruby
[07:33:52] wethu: Hey, how does :[] work? As in, I know the effects of defining [](property) and []=(property, value), I just would like to know how to get more info on the internals of how the work being called like object[:accessor] and object[:mutator]= "foo", is there a term that defines them special that i could google for ?
[07:34:05] william3: has joined #ruby
[07:34:23] aufi: has joined #ruby
[07:35:47] heftig: wethu: it's just transformed into a method call at syntax level
[07:37:12] Ox0dea: wethu: heftig is correct: https://git.io/vgt2H
[07:37:17] dsilfen: has joined #ruby
[07:37:26] wethu: heftig, Ah right, a bit like how #mutator = Value works when its defined foo=
[07:37:42] phredus_: has joined #ruby
[07:38:07] wethu: Awesome, thank you both
[07:38:10] Ox0dea: Sure thing.
[07:38:35] heftig: hm, actually there seem to be special bytecodes for a[]= and a[]
[07:38:49] heftig: opt_aset for the former and opt_aref for the latter
[07:39:05] Ox0dea: There's a difference between tokens and bytecode instructions, of course.
[07:41:10] heftig: rubinius seems to handle operators like other methods even at the bytecode level
[07:42:28] ur5us: has joined #ruby
[07:42:45] PedramT: has joined #ruby
[07:43:10] Ox0dea: MRI does too, for the most part, but it's also got all the `opt_` instructions to grasp at better performance.
[07:43:39] karapetyan: has joined #ruby
[07:44:31] Brklyn: has joined #ruby
[07:44:40] juddey: has joined #ruby
[07:44:59] blt: has joined #ruby
[07:45:39] mary5030: has joined #ruby
[07:45:43] firstdayonthejob: has joined #ruby
[07:50:07] heftig: has joined #ruby
[07:50:13] Ox0dea: https://eval.in/512394
[07:50:25] Ox0dea: Weird that there's an `opt_ltlt`, but no `opt_gtgt`.
[07:50:47] eGGsha: has joined #ruby
[07:51:48] Bloomer: has joined #ruby
[07:52:18] kalopsian: has joined #ruby
[07:52:56] william3: has joined #ruby
[07:53:03] Bloomer: has joined #ruby
[07:53:53] howdoi: has joined #ruby
[07:54:33] bruce_lee: has joined #ruby
[07:56:06] srenatus: has joined #ruby
[07:56:44] IrishGringo: has joined #ruby
[07:58:55] dsilfen: has joined #ruby
[08:00:30] Spami: has joined #ruby
[08:00:41] yoongkang: has joined #ruby
[08:00:48] jgt2: has joined #ruby
[08:03:56] heftig: Ox0dea: not worth it, I guess. << is used as lot to mean append, but >> is hardly popular
[08:05:09] tuelz1: has joined #ruby
[08:05:27] heftig: (If you want to speed up number crunching with a lot of right shifts, you would want to write an extension anyway)
[08:05:50] jamw: has joined #ruby
[08:08:58] Azulinho: has joined #ruby
[08:09:02] TomyWork: has joined #ruby
[08:09:44] jottr_: has joined #ruby
[08:10:24] Kero: has joined #ruby
[08:10:33] glcx: has joined #ruby
[08:13:15] tomphp: has joined #ruby
[08:13:45] Azulinho1: has joined #ruby
[08:14:04] mdw: has joined #ruby
[08:15:09] jbrhbr: has joined #ruby
[08:15:15] SCHAAP137: has joined #ruby
[08:18:53] dsilfen: has joined #ruby
[08:21:05] sepp2k: has joined #ruby
[08:21:15] mdw: has joined #ruby
[08:23:33] karapetyan: has joined #ruby
[08:24:29] User458764: has joined #ruby
[08:24:34] einarj: has joined #ruby
[08:24:45] shadeslayer: has joined #ruby
[08:26:15] karapetyan: has joined #ruby
[08:29:34] sandstrom: has joined #ruby
[08:30:26] ur5us: has joined #ruby
[08:30:34] Macaveli: has joined #ruby
[08:31:18] mauricio: has joined #ruby
[08:32:20] haraoka: has joined #ruby
[08:37:32] adac: has joined #ruby
[08:37:34] dsilfen: has joined #ruby
[08:37:57] vondruch: has joined #ruby
[08:41:59] passcod: has joined #ruby
[08:51:17] c0m0: has joined #ruby
[08:53:25] nettoweb: has joined #ruby
[08:55:22] adgtl: has joined #ruby
[08:55:35] antgel: has joined #ruby
[09:00:14] dsilfen: has joined #ruby
[09:00:35] yardenbar: has joined #ruby
[09:00:48] craysiii: has joined #ruby
[09:00:51] adgtl: has joined #ruby
[09:02:23] Macaveli: has joined #ruby
[09:03:39] astrofog: has joined #ruby
[09:05:31] craysiii: has joined #ruby
[09:06:07] sandstrom: has joined #ruby
[09:09:36] skade: has joined #ruby
[09:10:13] tomphp: has joined #ruby
[09:10:24] PedramT: has joined #ruby
[09:11:53] jgt2: has joined #ruby
[09:12:37] mondok: has joined #ruby
[09:13:26] blaxter: has joined #ruby
[09:14:16] UtkarshRay: has joined #ruby
[09:15:18] Averna: has joined #ruby
[09:15:20] UtkarshRay: has joined #ruby
[09:16:02] karapetyan: has joined #ruby
[09:16:43] dionysus69: has joined #ruby
[09:17:05] UtkarshRay: has joined #ruby
[09:17:30] thomas: has joined #ruby
[09:17:34] k13nox_: has joined #ruby
[09:18:27] UtkarshRay: has joined #ruby
[09:18:33] mark3: has joined #ruby
[09:19:37] dsilfen: has joined #ruby
[09:19:54] william3: has joined #ruby
[09:20:06] mark3: has joined #ruby
[09:20:58] mark3: has joined #ruby
[09:22:20] futilegames: has joined #ruby
[09:22:58] sftrabbit: has joined #ruby
[09:22:58] Xeago: has joined #ruby
[09:23:18] futilegames: has left #ruby: ()
[09:23:56] aef: has joined #ruby
[09:24:05] rvchangue: has joined #ruby
[09:24:28] marr: has joined #ruby
[09:24:56] codecop: has joined #ruby
[09:26:29] william3: has joined #ruby
[09:28:08] sandstrom: has joined #ruby
[09:32:22] rdark: has joined #ruby
[09:33:21] b3nt_pin: has joined #ruby
[09:33:42] ympeg: has joined #ruby
[09:34:17] futilegames: has joined #ruby
[09:34:21] blaxter: has joined #ruby
[09:35:19] mary5030: has joined #ruby
[09:36:39] zyzioziom: has joined #ruby
[09:36:51] yoongkang: has joined #ruby
[09:37:53] DoubleMalt: has joined #ruby
[09:38:20] digidog: has joined #ruby
[09:40:23] kalopsian: has joined #ruby
[09:40:55] dmolina: has joined #ruby
[09:42:35] tuelz1: has joined #ruby
[09:44:11] dsilfen: has joined #ruby
[09:46:10] karapetyan: has joined #ruby
[09:47:11] AlexRussia: has joined #ruby
[09:47:55] sgambino: has joined #ruby
[09:49:51] f4cl3y: has joined #ruby
[09:51:11] aibot: has joined #ruby
[09:52:26] bruce_lee: has joined #ruby
[09:53:00] User458764: has joined #ruby
[09:54:28] flughafen_: has joined #ruby
[09:54:28] lyoshajapan: has joined #ruby
[09:56:08] lyoshajapan: If I get an object in debugger looking something like this: #<#<Class*0x00734534534>::0x00fe09e8098e> how do I find how was it generated
[09:56:48] kerunaru: has joined #ruby
[09:56:53] huyderman: has joined #ruby
[09:58:46] n00bDev: has joined #ruby
[09:59:15] dcunit3d: has joined #ruby
[09:59:18] dlitvak: has joined #ruby
[10:00:21] karapetyan: has joined #ruby
[10:00:37] darkf: has joined #ruby
[10:00:47] ready: has joined #ruby
[10:00:52] victortyau: has joined #ruby
[10:05:20] dsilfen: has joined #ruby
[10:05:59] yardenbar: has joined #ruby
[10:06:18] ferr: has joined #ruby
[10:06:32] jamw: has joined #ruby
[10:06:41] baweaver: has joined #ruby
[10:09:44] voidDotClass: has joined #ruby
[10:10:24] Hounddog: has joined #ruby
[10:10:32] jottr_: has joined #ruby
[10:11:15] voidDotClass: in the following code: https://gist.github.com/aliakhtar/e4705c113041cf14d1f3 , the second 'if' block runs even if restaurant.nil is true, and i get an error about calling update_attribute on Nil
[10:11:27] mikecmpbll: has joined #ruby
[10:11:34] voidDotClass: but if I change the else to elsif ! restaurant.nil? , then it works as expected. why is that?
[10:11:39] rodfersou: has joined #ruby
[10:11:40] dajobat: has joined #ruby
[10:12:00] lessless: has joined #ruby
[10:12:51] deuterium: has joined #ruby
[10:13:51] dlitvak: has joined #ruby
[10:14:06] antgel: has joined #ruby
[10:14:28] jhass: voidDotClass: your gist has only one if
[10:14:35] jhass: so what do you mean by "second if block"?
[10:14:37] apeiros: voidDotClass: do you mean "the else block"?
[10:14:38] potsmoker: has joined #ruby
[10:14:42] voidDotClass: jhass, yes, sorry
[10:14:47] voidDotClass: if i change the else to elseif
[10:15:17] jhass: what you describe is highly unlikely
[10:15:37] apeiros: voidDotClass: a) are you sure the if block AND the else block are running?
[10:15:39] jhass: I'm inclined to say you observe the behavior wrong
[10:15:58] voidDotClass: aren't they supposed to run?
[10:16:12] apeiros: if/else is either/or
[10:16:14] apeiros: it's *never* both
[10:16:21] voidDotClass: I know, which is why this is weird
[10:16:42] apeiros: which is why I concur with jhass - I think your observation is wrong
[10:16:43] voidDotClass: if I literally change the elsif ! restaurant.nil? to just 'else', it runs
[10:16:48] voidDotClass: how is it wrong
[10:18:05] apeiros: voidDotClass: make a full chain of logouts. that is: `p restaurant: restaurant` before the if, add a `p :creating` in the if, and a `p updating: restaurant` in the else
[10:18:18] apeiros: I'm pretty sure you'll figure from there what's going on
[10:19:42] betabet: has joined #ruby
[10:19:55] voidDotClass: looks like the restaurant is not nil before the if
[10:20:01] voidDotClass: but on entering the else, it becomes nil
[10:21:34] jhass: voidDotClass: is restaurant a local variable or a method call (like an attr_reader/accessor)?
[10:21:36] voidDotClass: looks like its due to restaurant= and not self.restaurant=
[10:21:38] voidDotClass: inside the if
[10:21:51] voidDotClass: but that's retarded because the if is not even called
[10:22:53] yoongkang: has joined #ruby
[10:22:54] fumk: has joined #ruby
[10:22:55] william3: has joined #ruby
[10:23:17] jhass: ruby creates locals when seeing an assignment, prior running the code
[10:23:27] jhass: their default value is nil
[10:25:41] voidDotClass: very intuitive
[10:27:38] ldnunes: has joined #ruby
[10:27:47] Mirza: has joined #ruby
[10:28:23] dsilfen: has joined #ruby
[10:28:59] x0F: has joined #ruby
[10:29:28] Ebok: has joined #ruby
[10:29:46] AlexJakeGreen: has joined #ruby
[10:30:26] Cohedrin: has joined #ruby
[10:32:22] Brklyn: has joined #ruby
[10:33:27] agit0: has joined #ruby
[10:33:54] Azulinho: has joined #ruby
[10:34:34] PlasmaStar: has joined #ruby
[10:35:44] trinaldi: has joined #ruby
[10:36:49] mhoungbo: has joined #ruby
[10:37:11] Mirza: has left #ruby: ()
[10:38:29] akem: has joined #ruby
[10:39:40] workmad3: has joined #ruby
[10:41:05] FooMunki: has joined #ruby
[10:42:09] Pumukel: has joined #ruby
[10:42:25] mikecmpbll: does anyone know which facility Ruby 2.0.0's Syslog::Logger logs to? http://ruby-doc.org/stdlib-2.0.0/libdoc/syslog/rdoc/Syslog/Logger.html
[10:43:15] antgel: has joined #ruby
[10:43:20] tuelz1: has joined #ruby
[10:43:39] blackmesa: has joined #ruby
[10:44:37] hamed_r: has joined #ruby
[10:45:51] nettoweb: has joined #ruby
[10:46:13] sgambino: has joined #ruby
[10:46:16] burgestrand: has joined #ruby
[10:46:32] agit0: has joined #ruby
[10:47:23] araujo: has joined #ruby
[10:47:29] Ropeney: has joined #ruby
[10:48:12] arup_r: has joined #ruby
[10:48:51] araujo: has joined #ruby
[10:49:26] dsilfen: has joined #ruby
[10:51:03] araujo: has joined #ruby
[10:53:19] dionysus69: has joined #ruby
[10:53:29] araujo: has joined #ruby
[10:54:27] Azulinho: has joined #ruby
[10:55:40] araujo: has joined #ruby
[10:57:45] araujo: has joined #ruby
[10:57:56] bjensen82: has joined #ruby
[10:58:49] bjensen82: lets say I have an array a = [1,54,2,9,44,22,999] how would you guys remove for example all the odd numbers and append it afterwards to the list?
[10:59:12] agit0: has joined #ruby
[10:59:38] yoongkang: has joined #ruby
[10:59:54] araujo: has joined #ruby
[10:59:58] aryaching: has joined #ruby
[11:01:46] Yeomra: has joined #ruby
[11:02:18] araujo: has joined #ruby
[11:02:26] jhass: with more patience than 3 minutes
[11:03:58] BaroMeter: has joined #ruby
[11:04:20] karapetyan: has joined #ruby
[11:04:25] PedramT: has joined #ruby
[11:04:30] araujo: has joined #ruby
[11:04:35] Cohedrin: has joined #ruby
[11:04:44] jhass: >> [1,54,2,9,44,22,999].sort {|a, b| (a.odd? && b.odd?) || (a.even? && b.even?) ? a <=> b : a.odd? ? 1 : -1 }
[11:04:46] ruby[bot]: jhass: # => [2, 22, 44, 54, 1, 9, 999] (https://eval.in/512492)
[11:04:52] jhass: there's probably something prettier
[11:05:59] mikecmpbll: nvm worked it out it's log_ndelay
[11:06:02] moeabdol3: has joined #ruby
[11:07:46] dsilfen: has joined #ruby
[11:08:10] araujo: has joined #ruby
[11:09:59] Infra-Red: has joined #ruby
[11:10:15] araujo: has joined #ruby
[11:11:11] User458764: has joined #ruby
[11:11:58] sankaber: has joined #ruby
[11:12:30] araujo: has joined #ruby
[11:12:33] DEA7TH: has joined #ruby
[11:12:54] platzhirsch: has joined #ruby
[11:13:30] bronson: has joined #ruby
[11:13:32] sankaber: has joined #ruby
[11:16:19] twintail: has joined #ruby
[11:16:35] apeiros: jhass: partition + +, even if that needs multiple statements :)
[11:16:40] f4cl3y: has joined #ruby
[11:17:00] apeiros: e,o = a.partition(&:even?); e+o
[11:17:08] jhass: well and 3 array allocations
[11:17:09] HunterQ: has joined #ruby
[11:17:24] apeiros: that's less than N allocations sort uses ;-p
[11:17:51] jhass: mh, those aren't optimized?
[11:18:02] apeiros: ah, though, actually that happens only with things like Hash#each
[11:18:25] kristofferR: has joined #ruby
[11:19:30] FernandoBasso: has joined #ruby
[11:19:43] moeabdol3: has joined #ruby
[11:20:16] n00bDev: has joined #ruby
[11:20:22] dlitvak: has joined #ruby
[11:21:29] UtkarshRay: has joined #ruby
[11:22:12] Infra-Red: has joined #ruby
[11:25:00] et0r: has joined #ruby
[11:28:00] ccooke: has joined #ruby
[11:28:29] platzhirsch: has left #ruby: ()
[11:28:43] kalopsian: has joined #ruby
[11:30:31] Infra-Red: has joined #ruby
[11:31:04] dsilfen: has joined #ruby
[11:31:28] FernandoBasso: has joined #ruby
[11:32:33] dlitvak: has joined #ruby
[11:35:47] zarubin: has joined #ruby
[11:36:41] moeabdol3: has joined #ruby
[11:36:55] evidex: has joined #ruby
[11:37:42] dlitvak: has joined #ruby
[11:38:33] roshanavand: has joined #ruby
[11:39:37] PedramT: has joined #ruby
[11:40:20] et0r: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:42:28] aryaching: has joined #ruby
[11:44:08] tuelz1: has joined #ruby
[11:46:40] User458764: has joined #ruby
[11:47:06] Spami: has joined #ruby
[11:47:44] joonty: has joined #ruby
[11:47:54] cpup: has joined #ruby
[11:48:57] fsapo: has joined #ruby
[11:49:51] dsilfen: has joined #ruby
[11:50:38] rgtk: has joined #ruby
[11:51:14] tvw: has joined #ruby
[11:54:05] william3: has joined #ruby
[11:54:11] askhat: has joined #ruby
[11:54:25] ElFerna_: has joined #ruby
[11:54:58] brendan-: has joined #ruby
[11:56:48] sandstrom: has joined #ruby
[11:59:05] burgestrand: has joined #ruby
[11:59:45] mauricio: has joined #ruby
[12:00:37] f4cl3y: has joined #ruby
[12:00:59] Xeago: has joined #ruby
[12:01:17] roshanavand: has joined #ruby
[12:01:38] c355E3B: has joined #ruby
[12:04:28] zzz: has joined #ruby
[12:05:20] phredus_: has left #ruby: ("Going out for tacos.")
[12:06:59] jottr_: has joined #ruby
[12:07:12] Mon_Ouie: has joined #ruby
[12:07:19] jamw: has joined #ruby
[12:08:22] baweaver: has joined #ruby
[12:08:31] dsilfen: has joined #ruby
[12:11:02] brendan-: has joined #ruby
[12:13:46] _mirko_: has joined #ruby
[12:14:46] _mirko_: I have trouble using gems. Adding PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" to .zshrc doesn't solve the problem. I'm running arch linux. Any idea?
[12:15:01] skade: has joined #ruby
[12:15:57] shevy: ah that is for jhass :)
[12:17:14] Ropeney: has joined #ruby
[12:18:09] PedramT: has joined #ruby
[12:18:17] _mirko_: It's weird I installed sass and in gem list output there is no sass.
[12:19:27] blackmesa: has joined #ruby
[12:20:35] william3: has joined #ruby
[12:20:59] n00bDev: has joined #ruby
[12:21:14] shevy: do you have more than one gem or do you install into your home dir? can you put the "gem env" output on gist and say how you installed ruby
[12:22:11] freerobby: has joined #ruby
[12:22:27] kalopsian: has joined #ruby
[12:24:26] ferr: has joined #ruby
[12:27:28] krz: has joined #ruby
[12:28:40] brendan-: has joined #ruby
[12:28:46] SebastianThorn: shevy: haha, i do that mistake all the time, "what the ****, i just installed that ****, why cant i use it"
[12:29:48] _mirko_: has joined #ruby
[12:30:31] _mirko_: shevy: Thanks, I got it working. I needed to restart tmux process not just terminal emulator.
[12:30:58] jottr: has joined #ruby
[12:31:06] adgtl: has joined #ruby
[12:31:11] Kero_: has joined #ruby
[12:31:12] evidex_: has joined #ruby
[12:31:12] tAn: has joined #ruby
[12:31:14] dsilfen: has joined #ruby
[12:32:14] yarden_: has joined #ruby
[12:33:45] digidog_: has joined #ruby
[12:33:47] mostlybadfly_: has joined #ruby
[12:34:15] SirCmpwn: has joined #ruby
[12:34:59] vqrs: has joined #ruby
[12:35:35] potsmoker: will knowing ruby and looking at the metasploit source help me to become a hacker?
[12:35:42] flughafen_: has joined #ruby
[12:35:42] Musashi007: has joined #ruby
[12:35:47] william3: has joined #ruby
[12:35:48] sarlalian: has joined #ruby
[12:37:06] Ropeney: has joined #ruby
[12:37:23] ddv: potsmoker: lol
[12:37:55] potsmoker: ddv: not a yes or a no or even a maybe?
[12:38:00] ddv: potsmoker: the answer is no
[12:38:04] potsmoker: ddv: well thats constructive.
[12:38:08] potsmoker: alright thanks.
[12:39:04] lyoshajapan: has joined #ruby
[12:39:08] pdoherty: has joined #ruby
[12:39:37] lipoqil: has joined #ruby
[12:39:49] SebastianThorn: well, any language would help to become a hacker?
[12:40:05] benhuda: has joined #ruby
[12:40:51] carella_: has joined #ruby
[12:41:09] shevy: hmm... a nick called "potsmoker" ... asking about metasploit ...
[12:41:34] potsmoker: yeah this computer shit is getting really easy
[12:41:39] potsmoker: even a skiddie can do it
[12:41:50] potsmoker: not that pot has anything to do with that, though
[12:43:08] potsmoker: but would learning Ruby, and so many metasploit modules being written in ruby, what would that allow a hacker to do
[12:43:24] potsmoker: not much besides reading some modules that could be rewritten in any language probably.
[12:43:26] shevy: smoke pot, get rich
[12:43:36] potsmoker: oh if only metasploit was written in python.
[12:43:38] potsmoker: Why wasnt it?
[12:43:48] huyderman: has joined #ruby
[12:43:54] shevy: metasploit would be useless in any programming language
[12:44:02] brendan-: has joined #ruby
[12:44:23] ddv: potsmoker: without understanding the software the exploit is exploiting you won't learn anything
[12:44:24] potsmoker: shevy its not about being useless, its about the sweet spot
[12:44:33] burgestrand: It will help you become a hacker.
[12:44:39] potsmoker: what advantages does it have from a venn diagram point of view
[12:44:50] potsmoker: what aspects does it encompass as opposed to other combinations of technology
[12:44:52] tuelz1: has joined #ruby
[12:44:56] shevy: you are a philosopher potsmoker
[12:45:08] potsmoker: no im a wannabe-1337-haxxor
[12:45:15] shevy: you don't code
[12:45:27] potsmoker: i haven't been coding the past 10 years?
[12:45:51] potsmoker: you mean c, c++, objective c, c#, java, php, python, ruby, Go, javascript etc aren't code?
[12:46:02] shevy: you excel at chaining words together
[12:46:03] potsmoker: I can understand dissing visual basic
[12:46:04] rashmirathi: has joined #ruby
[12:46:06] potsmoker: but all those?
[12:46:11] potsmoker: you excel at spitting jibberish.
[12:46:13] potsmoker: so whos cooler?
[12:46:18] potsmoker: I excel at many things, faggot.
[12:46:20] Yeomra: has joined #ruby
[12:46:24] potsmoker: you excel at faggotry.
[12:46:27] potsmoker: keep it to yourself.
[12:46:44] dsilfen: has joined #ruby
[12:46:58] ddv: potsmoker: lol php
[12:47:08] potsmoker: people on the internet care so much about presentation
[12:47:15] potsmoker: illusions are for losers
[12:47:29] potsmoker: I wonder how con artists can feel good about themselves after using persuasion, manipulation, and deception to get what they want.
[12:47:32] ddv: potsmoker: are you 12 or something?
[12:47:39] potsmoker: you think you can sprinkle shitty sprinkles on something great and make it shitty
[12:47:47] potsmoker: your sprinkles don't control everything.
[12:47:55] potsmoker: you think you can control everyones perspective by mocking people?
[12:47:57] potsmoker: thats childish.
[12:49:16] anisha: has joined #ruby
[12:50:11] potsmoker: well thanks for making yourselves look stupid
[12:50:16] potsmoker: ...to an expert.
[12:50:18] blackmesa: has joined #ruby
[12:50:26] potsmoker: ACTION scratches head
[12:50:39] dlitvak: has joined #ruby
[12:50:48] burgestrand: potsmoker sup?
[12:50:52] potsmoker: ACTION rips the pipe
[12:50:55] shevy: potsmoker be patient and wait for the ops man
[12:50:56] potsmoker: ACTION codes beast mode
[12:51:24] potsmoker: shevy: I like to ban evade channels that troll me I'm bored.
[12:51:34] potsmoker: When I'm bored.
[12:52:04] potsmoker: some people act like changing their IP is impossible.
[12:52:11] burgestrand: Can't you troll in a fun way instead. :(
[12:52:14] potsmoker: like theres not a million public servers out there to bounce through.
[12:52:20] potsmoker: not when idiots antagonize me
[12:52:22] jottr: has joined #ruby
[12:52:27] potsmoker: i'm forced to stoop down to their level of stupidity
[12:53:02] burgestrand: I mean, with more style.
[12:53:11] potsmoker: people are so childish when they cling to the status quo.
[12:53:20] potsmoker: you want me to be more like this one thing that you've seen before.
[12:53:31] potsmoker: just accept that every individual is a bit different.
[12:53:32] burgestrand: I mean, anybody can spout insults or spam, where's the fun in that.
[12:53:46] potsmoker: any one can also accurately express what they have to say.
[12:53:51] potsmoker: but someone they don't do it that often
[12:54:03] potsmoker: they just troll like faggots and expect to get a reaction out of people by being a smart ass
[12:54:08] potsmoker: using sarcasm etc
[12:54:28] potsmoker: how about this: "lets just be honest, lets just be real"
[12:54:32] ElFerna_: has joined #ruby
[12:54:51] potsmoker: ACTION does the hang loose hand sign
[12:54:53] sepp2k: has joined #ruby
[12:55:40] burgestrand: I would once like to have a troll completely blow the channel's mind, like those epic trolls you only read about.
[12:55:57] burgestrand: Something smart that you don't see coming until it's too late and hits you in the face.
[12:56:13] shevy: metasploit just is not good troll training material
[12:56:37] potsmoker: I'm not a big connoisseur of this "trolling" you speak of.
[12:56:44] zapata: has joined #ruby
[12:56:46] potsmoker: I prefer friendly conversations.
[12:56:57] potsmoker: but I despise idiocy just as much as the next man.
[12:57:03] burgestrand: You're just arrogant.
[12:57:11] burgestrand: Like me, so I kind of get it!
[12:57:34] potsmoker: I choose not to let people broadcast illusions.
[12:57:39] potsmoker: I break right through them.
[12:57:55] potsmoker: I cut through bullshit with an exacto blade, metaphorically
[12:58:05] potsmoker: or so I've been told.
[12:58:09] zzz: has joined #ruby
[12:58:11] potsmoker: I like to get right to the bottom of things,
[12:58:16] potsmoker: and teasing often distracts from that.
[12:58:45] potsmoker: but I also am aware that there is no reason we all can't get along.
[12:58:53] burgestrand: What kind of illusions?
[12:59:57] potsmoker: misleading ones
[13:00:45] burgestrand: Like the one you're trying to give me?
[13:00:54] vqrs: has joined #ruby
[13:00:55] potsmoker: no, that is an illusion.
[13:01:05] potsmoker: see why they are unhelpful?
[13:01:11] potsmoker: I knew you would.
[13:01:16] burgestrand: I'm clever that way.
[13:01:17] potsmoker: You're a fast learner, Burgestrand.
[13:01:23] Xeago: has joined #ruby
[13:01:29] potsmoker: I like you.
[13:01:33] burgestrand: I don't like you.
[13:01:49] potsmoker: Thats because I just started using illusions to demonstrate how foolish they are.
[13:01:55] PedramT: has joined #ruby
[13:02:02] potsmoker: and as you can see, they can be fairly annoying.
[13:02:27] burgestrand: No, I think you're too much like me but slightly meaner.
[13:02:44] shevy: potsmoker simply is bored
[13:02:59] ElFerna_: has joined #ruby
[13:03:01] burgestrand: I hope not, I'm having a blast.
[13:03:01] potsmoker: Which is why I don't appreciate people creating an illusion that LEARNING about metasploit, or having the name "potsmoker" has nothing to do with... Me.
[13:03:08] potsmoker: namely shevy
[13:03:20] potsmoker: and yes I am very bored.
[13:03:27] potsmoker: and bored.'
[13:03:38] mooru: has joined #ruby
[13:03:46] sepp2k: has joined #ruby
[13:03:52] potsmoker: so there I hope we can all understand the context of this conversation now.
[13:04:11] hobodave: has joined #ruby
[13:04:13] burgestrand: You'll get there soon.
[13:04:33] potsmoker: That is an illusion.
[13:04:36] william3: has joined #ruby
[13:04:41] radgeRayden: has joined #ruby
[13:04:42] Pupeno: has joined #ruby
[13:04:53] potsmoker: "Cuz everytime I try to go where I really want - to -be, its already where I am... CUZ I FUCKIN NEED TO LEAVE"
[13:04:54] burgestrand: It would've been, but I liked the future the way it looked.
[13:05:47] dlitvak: has joined #ruby
[13:05:49] burgestrand: This was fun. Please don't be mean, you can troll and still be nice to others, it just takes more skill.
[13:05:55] potsmoker: the kabucha mushroom people, sitting around all day.
[13:06:02] potsmoker: who can believe you? who can believe you?
[13:06:14] dsilfen: has joined #ruby
[13:06:36] potsmoker: see, I code.
[13:07:55] dajobat: Afternoon all.
[13:08:01] arian0n: has joined #ruby
[13:08:54] moeabdol: has joined #ruby
[13:10:06] blackmesa: has joined #ruby
[13:10:52] potsmoker: ddv: thats a good bit of wisdom, about understand the software that the exploit is exploiting.
[13:11:30] bkxd: has joined #ruby
[13:12:00] DEA7TH: has joined #ruby
[13:12:02] mfb2: has joined #ruby
[13:14:26] PedramT: has joined #ruby
[13:16:43] potsmoker: so what do you guys know about alestor crowley?
[13:16:48] huyderman: has joined #ruby
[13:18:05] Lochez: has joined #ruby
[13:18:21] mooru: has joined #ruby
[13:18:59] kerunaru: has joined #ruby
[13:19:45] lurch_: has joined #ruby
[13:20:00] f4cl3y: has joined #ruby
[13:21:47] n00bDev: has joined #ruby
[13:23:19] synthroid: has joined #ruby
[13:26:21] burgestrand: has joined #ruby
[13:27:43] potsmoker: has joined #ruby
[13:28:14] ziyadb: has joined #ruby
[13:29:22] dsilfen: has joined #ruby
[13:30:23] sepp2k: has joined #ruby
[13:31:16] glcx: has joined #ruby
[13:31:16] glcx: has joined #ruby
[13:34:11] arup_r: has left #ruby: ()
[13:34:54] ddv: ?offtopic potsmoker
[13:34:54] ruby[bot]: potsmoker: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:35:16] potsmoker: ok. sorry for the offtopicness.
[13:35:17] theRealAlexz: has joined #ruby
[13:35:24] Jardayn: has joined #ruby
[13:35:32] potsmoker: If you could please direct me to a channel where they talk about this?
[13:35:36] skingsbu: has joined #ruby
[13:35:39] sonOfRa: has joined #ruby
[13:36:27] PedramT: has joined #ruby
[13:36:28] dajobat: I believe that message does so
[13:36:44] hxegon: has joined #ruby
[13:37:54] skade: has joined #ruby
[13:38:29] Shaboum: has joined #ruby
[13:38:54] IrishGringo: has joined #ruby
[13:41:06] potsmoker: no you are generalising a bit too much
[13:41:18] potsmoker: I want a chat room specifically focused on that subject.
[13:41:26] pdoherty: has joined #ruby
[13:42:51] dajobat: You should discuss this further in a channel for finding channels.
[13:43:39] Xeago: has joined #ruby
[13:43:47] mfb2: has joined #ruby
[13:44:25] arup_r: has joined #ruby
[13:44:48] EdwardIII: hrm is it satanic to say self.new(params)? like this? https://gist.github.com/EdwardIII/9e276ff0a56854037397#file-r-rb-L20 ?
[13:45:38] tuelz1: has joined #ruby
[13:46:25] sdothum: has joined #ruby
[13:46:40] ljarvis: EdwardIII: no, the rest of the code is weird though
[13:46:45] ljarvis: EdwardIII: don't use return in blocks
[13:46:58] william3: has joined #ruby
[13:47:05] ljarvis: heck, dont use return anywhere unless you want to return early
[13:47:24] EdwardIII: just use implicit return?
[13:47:26] ljarvis: EdwardIII: also, self is implied, so new(raw_rate) works too
[13:47:48] agit0: has joined #ruby
[13:47:52] Mon_Ouie: >> def f; [1, 2, 3].each { |x| return x }; return 4; end; f
[13:47:54] ruby[bot]: Mon_Ouie: # => 1 (https://eval.in/512567)
[13:48:15] EdwardIII: ljarvis: even inside a class method (you call 'em a class method in ruby, right?)
[13:48:42] aegis3121: has joined #ruby
[13:48:51] ljarvis: EdwardIII: self is always implied, you should only use it when you want to be explicit for some reason (i.e variable name conflicts, or keywords)
[13:48:54] shredding: has joined #ruby
[13:49:08] joonty: has joined #ruby
[13:49:18] ljarvis: or use it and be explicit, it's not a written rule; it's a style preference
[13:49:19] EdwardIII: ljarvis: but isn't def self.name the way to define a class method? as opposed to def name for instance methods?
[13:49:22] dsilfen: has joined #ruby
[13:49:51] dlitvak_: has joined #ruby
[13:49:51] ljarvis: EdwardIII: yes, and inside the class method self is the class level
[13:50:20] Rodya_: has joined #ruby
[13:50:44] dajobat: EdwardIII: You could try using the Eigenclass (horrible name) to define your class methods instead, I think that's used more often.
[13:50:48] dajobat: Though I may be wrong
[13:51:24] EdwardIII: Eigenclass doesn't sound very japanese heh
[13:52:15] dajobat: see the Eigenclass bit at the end of this gist: http://gist.github.com/rsliter/4216800]
[13:52:22] Infra-Red: has joined #ruby
[13:52:22] arthropododo: has joined #ruby
[13:52:25] dajobat: Well, I messed up that URL.
[13:53:03] EdwardIII: no i got it heh
[13:53:03] k13nox: has joined #ruby
[13:53:07] Mon_Ouie: It's called singleton class in the Ruby documentation and in the methods that are related to it
[13:53:13] EdwardIII: a class... inheriting... from an instance!?
[13:53:22] ta: has joined #ruby
[13:53:50] dajobat: Mon_Ouie: Ah, I'm out of date then. As ever!
[13:54:15] Mon_Ouie: No, inheritance is '<', class << some_object; ???; end is to open some_object's singleton class.
[13:54:48] EdwardIII: ljarvis: is that more idomatic? https://gist.github.com/EdwardIII/cee0cfb9b02bb66b48c3
[13:57:45] PedramT: has joined #ruby
[13:57:54] treehug88: has joined #ruby
[13:58:08] sftrabbit: has joined #ruby
[13:59:26] pink_vampire: has joined #ruby
[14:00:03] zapata: has joined #ruby
[14:00:32] ESpiney: has joined #ruby
[14:01:44] sepp2k: has joined #ruby
[14:02:12] dlitvak: has joined #ruby
[14:02:49] eugenekgn: has joined #ruby
[14:02:52] arup_r: has joined #ruby
[14:04:15] Rodya_: has joined #ruby
[14:07:47] dsilfen: has joined #ruby
[14:08:01] jamw: has joined #ruby
[14:08:19] ljarvis: EdwardIII: yes, I would move the class methods above initialize though, but again that's a style preference (class methods first, instance methods to follow)
[14:08:23] eugenekgn: Hi there, I am new to Ruby world as I've been .Net developer for about 6 years and after looking at my teams code base I am really questioning what is claimed to be "the best ruby practices" i.e I am not sure how a I feel about place queries in a controller given that's part of business logic which should be hidden in (service or model), why are models so FAT (This is clear violation of (S) in SOLID -- is there a noition of PLAIN OLD RUBY OBJECT? Should
[14:08:23] eugenekgn: there really be logic in Rabl files -- why not just have ViewModel that sends back the data with prescribe schema?
[14:09:17] PedramT: has joined #ruby
[14:09:37] Demetrio: has joined #ruby
[14:09:52] hamed_r: has joined #ruby
[14:10:03] baweaver: has joined #ruby
[14:10:27] ljarvis: eugenekgn: the query logic should be inside of the model, but the query itself is obviously in the controller
[14:10:56] eugenekgn: right so you should not have Model.find(id: id) correct?
[14:11:03] Demetrio: I'm not used to working in Ruby, so bare with me, but can someone show me how to add an option to this code to use TLSv1? I'm stumped.
[14:11:13] ljarvis: eugenekgn: that in a controller is fine
[14:11:30] eugenekgn: but that would hit the db in a way?
[14:11:48] ljarvis: of course, why is it bad to do that in a controller?
[14:11:50] platzhirsch: has joined #ruby
[14:11:50] cdg: has joined #ruby
[14:12:17] Demetrio: has joined #ruby
[14:12:32] Demetrio: Sorry, hexchat dc'd.
[14:12:36] Demetrio: https://github.com/jekyll/jekyll-gist/blob/07609daad006dcea666a6faaaaf0f3d23779e42c/lib/jekyll-gist/gist_tag.rb#L79-L81
[14:12:43] ljarvis: controllers are meant to execute business logic
[14:12:51] ljarvis: application logic, rather
[14:12:55] Bloomer: has joined #ruby
[14:12:59] ljarvis: which includes making queries to the business end (a model)
[14:13:02] duckpuppy: has joined #ruby
[14:13:05] ljarvis: which is exactly what Model.find does
[14:13:11] sgambino: has joined #ruby
[14:13:21] eugenekgn: because I want my business logic to live inside some object given that manages business rules so if the query becomes more complex it is easy to change it in one central place
[14:13:23] Demetrio: I keep getting SSL issues using this gem. I was adviced that I add an option to use TLSv12.
[14:13:29] Demetrio: I have no idea how. Can someone help me?
[14:13:38] dexter_e: has joined #ruby
[14:13:53] ljarvis: eugenekgn: if it becomes more complex then it belongs in a Model. Your example is not complex and belongs in the controller
[14:14:35] eugenekgn: so what is used a judgement?
[14:14:38] ljarvis: Demetrio: http://stackoverflow.com/questions/22550213/how-to-set-tls-context-options-in-ruby-like-opensslsslssl-op-no-sslv2/24237525#24237525
[14:14:49] ljarvis: eugenekgn: I don't understand the question
[14:14:50] eugenekgn: why not stick to the rule that keep queries out of controllers?
[14:15:05] Bloodshot: has joined #ruby
[14:15:07] ljarvis: eugenekgn: so how would you abstract this?: Model.find(id)
[14:15:14] EdwardIII: ljarvis: cool, thanks for your feedback
[14:15:18] eugenekgn: meaning how do you determine which queries should live in controller and which should not
[14:15:33] rkazak: has joined #ruby
[14:16:14] joonty: has joined #ruby
[14:16:18] ljarvis: eugenekgn: right yeah, use judgement. For me, when you start doing JOINs and add conditions then that belongs in the model and exposed as a class method
[14:16:21] eugenekgn: Model.get_element_by_id(id) // so if your db blows up the fallback is in the Model, you're handling null case in the model, and you test your model for something very specific and your controller only for hTTP codes
[14:16:26] ljarvis: and when it gets even more complex, then a service object
[14:16:52] eugenekgn: So is there a concept for PORO?
[14:17:17] EdwardIII: hmm you want something like unit-of-work instead of activerecord by the sounds of it
[14:17:22] ljarvis: what's PORO?
[14:17:59] EdwardIII: eugenekgn: right?
[14:18:05] eugenekgn: http://blog.steveklabnik.com/posts/2011-09-06-the-secret-to-rails-oo-design
[14:18:05] ljarvis: POLS perhaps
[14:18:14] eugenekgn: PLAIN OLD RUBY OBJECT
[14:18:16] dajobat: ljarvis: plain old ruby object. I think he's trying to make it similar to the java POJO ideal
[14:18:28] ljarvis: right i see
[14:18:40] ljarvis: i mean, I don't agree with that blog post
[14:18:41] Demetrio: ljarvis, while I appreciate the LMGTFY, I'm at a loss as to how and where to implement this.
[14:18:46] ljarvis: so it's really your own judgement
[14:18:47] kalopsian: has joined #ruby
[14:18:55] JDiPierro: has joined #ruby
[14:18:58] Vitor_: has joined #ruby
[14:19:20] ljarvis: Demetrio: yeah it seems like it's non-trivial I'm afraid, so I was hoping that SO answer might steer in the right direction. Otherwise I have no ideas
[14:19:25] eugenekgn: @ljarvis have you read the article carefully and considered the points that the has author made?
[14:19:26] vondruch: has joined #ruby
[14:19:36] ljarvis: yes I've read this before
[14:19:37] Stratus3D: has joined #ruby
[14:19:45] Demetrio: I appreciate the help all the same, thanks ljarvis.
[14:20:39] ljarvis: eugenekgn: I'm a fan of plain Ruby objects, but it's easy to add abstractions to *all the things*
[14:21:03] EdwardIII: imo UoW is more 'correct' but ActiveRecord is probably more useful
[14:21:09] ljarvis: the examples are just bad, imo
[14:21:18] EdwardIII: i've done a lot with DIC and UoW stuff lately on symfony and it's just... so, so clunky
[14:21:58] EdwardIII: ror, django & laravel are not really about that from what i've learned heh
[14:23:53] n00bDev: has joined #ruby
[14:24:07] roshanavand: has joined #ruby
[14:24:11] Stratus3D: Can someone help me with an issue I am having with `to_i`? I have a string (pp outputs "\u00004\u00009\u00000\u0000" when I print it), that when I call .to_i on it to_i returns 0, which is not what I expected
[14:24:43] eugenekgn: are you sure it's a string not some other object?
[14:25:00] Stratus3D: can anyone explain why this is happening and what I can do to convert this UTF-8 string to the integer 490?
[14:25:49] Stratus3D: eugenekgn: just re-ran my script and printed the class of the variable, it's String
[14:25:57] dsilfen: has joined #ruby
[14:26:13] platzhirsch: has left #ruby: ()
[14:26:13] Stratus3D: which is what I expect, since this is coming from a text file
[14:26:22] VeryBewitching: has joined #ruby
[14:26:28] eugenekgn: it's a string of bytes
[14:26:37] krobzaur_: has joined #ruby
[14:26:45] eugenekgn: it should probably be a stream
[14:26:47] VeryBewitching: Good morning folks.
[14:27:00] dajobat: Stratus3D: What method are you using to read the file?
[14:27:41] atomical: has joined #ruby
[14:28:05] dajobat: Stratus3D: If you're using the IO#read method, then that reads out bytes. If you want to read out strings, use the readlines method instead.
[14:28:11] adgtl: has joined #ruby
[14:28:19] bmalum: has joined #ruby
[14:28:36] TomPeed: has joined #ruby
[14:29:01] dlitvak: has joined #ruby
[14:30:52] PedramT: has joined #ruby
[14:30:53] victortyau: has joined #ruby
[14:31:25] Stratus3D: dajobat: file = File.open(file, "rb")
[14:31:25] Stratus3D: text = file.read
[14:31:26] mrmargolis: has joined #ruby
[14:31:47] Stratus3D: I think that should return a string
[14:31:51] centrx: has joined #ruby
[14:33:00] EdwardIII: sorry for the basic question but how do i make my object accessible like you'd access a hash? e.g. myprop['thingy']
[14:33:20] chipotle: has joined #ruby
[14:33:32] PedramT: has joined #ruby
[14:35:22] ljarvis: Stratus3D: why are you reading in binmode?
[14:35:32] EdwardIII: i see i can do def [] but that seems more for arrays?
[14:35:48] yos7ph: has joined #ruby
[14:35:58] ljarvis: Stratus3D: text = File.read(file)
[14:36:17] shevy: EdwardIII it is just a method; def [](argument); and def self.[](argument)
[14:38:36] JohnBat26: has joined #ruby
[14:39:34] dajobat: Stratus3D: as ljarvis says, the File.open(file, "rb") is the issue there. "rb" reads in binary mode.
[14:40:12] snowy: has joined #ruby
[14:40:37] Yiota: has joined #ruby
[14:40:44] vqrs: has joined #ruby
[14:40:44] B1n4r10: has joined #ruby
[14:41:25] PaulCapestany: has joined #ruby
[14:41:32] Xeago: has joined #ruby
[14:41:43] william3: has joined #ruby
[14:41:48] malconis: has joined #ruby
[14:42:33] malconis: has joined #ruby
[14:43:25] freerobby: has joined #ruby
[14:44:59] ramortegui: has joined #ruby
[14:46:23] tuelz1: has joined #ruby
[14:46:28] Snowy_: has joined #ruby
[14:46:46] symbol: has joined #ruby
[14:46:50] dajobat: Demetrio: Does this help at all? It looks like it's meant to set the TLS version. https://www.proctor-it.com/ruby-tuesday-ssl-version-in-ruby/
[14:47:31] JDiPierro: has joined #ruby
[14:47:53] william3: has joined #ruby
[14:48:12] dsilfen: has joined #ruby
[14:48:15] Demetrio: dajobat, that gives me a clue about where I can start from, thanks!
[14:48:26] Demetrio: I'll give it a read through and see what I get.
[14:49:57] Mon_Ouie: has joined #ruby
[14:50:41] hxegon: has joined #ruby
[14:50:49] Demetrio: Sorry for the pedant mode, dajobat, but using the first two code examples in his article, are those supposed to run in irb? I'm on windows and they return undefined constants.
[14:51:02] PedramT: has joined #ruby
[14:51:27] stannard: has joined #ruby
[14:51:32] dlitvak: has joined #ruby
[14:51:47] dajobat: Demetrio: The requires?
[14:52:40] Demetrio: That and the OpenSSL. I keep getting back errors when I try them.
[14:52:59] dajobat: Interesting. I'm running IRB on windows as well and it works fine. What ruby installation do you have?
[14:53:25] dajobat: What does your RUBY_VERSION give you?
[14:53:52] kerunaru: has joined #ruby
[14:54:46] william3_: has joined #ruby
[14:54:59] Demetrio: I can't run that. I just used ruby -v in Git Bash and I get 2.2.3
[14:55:19] Demetrio: I'm used RubyInstaller if that matters.
[14:55:40] iamvery: has joined #ruby
[14:55:58] sankaber: has joined #ruby
[14:57:25] dajobat: Hm. That's strange. Sounds like your irb is doing something a little weird.
[14:58:50] Demetrio: Oh, that's great to hear then. :S
[14:58:56] sankaber: has joined #ruby
[14:59:07] dajobat: Yeah. I assume it's a new session of IRB?
[14:59:09] arup_r: has left #ruby: ()
[14:59:16] moeabdol: has joined #ruby
[14:59:20] polishdub: has joined #ruby
[14:59:21] Demetrio: If you mean I opened a new window, yeah.
[14:59:40] PedramT: has joined #ruby
[14:59:52] ddv: Demetrio: doing any ruby or rails development on Windows will be pain
[15:00:03] Demetrio: Should I be running ruby within irb? Not to ask for a whole course on it, but..
[15:00:24] Demetrio: ddv, I'm learning this. I'm just trying to run Jekyll so I can redevelop my github pages site. XD
[15:00:26] meves: has joined #ruby
[15:00:34] dajobat: Nah, irb drops you straight into a ruby session
[15:00:35] ddv: Demetrio: use linux or osx
[15:00:52] Demetrio: ddv I'm coming to Windows from Mac actually.
[15:01:10] Demetrio: My old machine was getting slow and I needed something with some more power behind it. Getting into C#.
[15:01:29] Demetrio: dajobat, what are some basic ruby commands to test.
[15:01:35] ddv: Demetrio: well Windows is just a weird choice for ruby/rails development
[15:01:41] dlitvak: has joined #ruby
[15:01:46] darkxploit: has joined #ruby
[15:01:51] dajobat: Demetrio: str = "hello"
[15:01:59] dajobat: see if that outputs hello
[15:02:01] Demetrio: ddv, I'm sure, but again, I'm not doing a lot of ruby dev.
[15:02:05] dajobat: also, do Gem.path
[15:02:28] Demetrio: Alright, I'm getting outputs here.
[15:02:29] dajobat: I think you might have an old version of ruby installed or something
[15:02:30] Brklyn: has joined #ruby
[15:02:43] barhum2013: has joined #ruby
[15:02:50] Demetrio: 2.2.0 according to this.
[15:02:57] dajobat: Demetrio: Well damn.
[15:03:10] Demetrio: Might that be my problem then?
[15:03:18] dajobat: No, that sounds fine.
[15:04:19] Demetrio: Is this something that would run in irb? OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ssl_version]
[15:04:53] dhollinger: has joined #ruby
[15:04:57] Demetrio: Would that pull up the ssl_version?
[15:05:40] dajobat: only if the require 'openssl' has run, because it's using a class from that module.
[15:05:52] jtzero1: has joined #ruby
[15:06:04] jtzero1: has left #ruby: ()
[15:06:06] jtzero1: has joined #ruby
[15:06:53] Demetrio: Alright, there we go. I was duncing it.
[15:06:58] dsilfen: has joined #ruby
[15:07:06] Demetrio: Apparently, my params are set to SSLv32.
[15:07:35] dajobat: Had you missed out the quotation marks around the module names?
[15:07:50] s00pcan: has joined #ruby
[15:07:51] vondruch: has joined #ruby
[15:07:52] dajobat: Cool, in that case that blog post should enable you to set them to TLS
[15:08:31] burgestrand: has joined #ruby
[15:09:25] arup_r: has joined #ruby
[15:12:08] Demetrio: The only difference is that if I use `ssl_version: :SSLv3` it gives me a handshake failure.
[15:12:13] sanguisdex: has joined #ruby
[15:13:08] sanguisdex: can some one point me to a rake algorithm that will allow me to add a --watch flag to a rake funtion and run that function on ever change?
[15:15:23] sandstrom: has joined #ruby
[15:15:37] jottr: has joined #ruby
[15:16:15] mondok: has joined #ruby
[15:16:36] agentmeerkat: has joined #ruby
[15:17:30] dajobat: Demetrio: I need to pop off and do some work for a while, but I'll be back in a bit to have another look.
[15:17:51] Demetrio: dajobat: Thanks for the help!
[15:18:08] whippythellama: has joined #ruby
[15:18:16] nofacade: has joined #ruby
[15:18:17] sumark: has joined #ruby
[15:18:54] dlitvak_: has joined #ruby
[15:19:38] sgambino: has joined #ruby
[15:19:50] zerowaitstate: has joined #ruby
[15:20:01] william3: has joined #ruby
[15:20:56] decoponio: has joined #ruby
[15:21:01] The_Phoenix: has joined #ruby
[15:21:30] atomical: has joined #ruby
[15:22:06] jhass: sanguisdex: you probably want to use the guard gem
[15:22:21] dopamean_: has joined #ruby
[15:22:31] sanguisdex: ACTION reads up on guard :)
[15:23:22] PedramT: has joined #ruby
[15:24:16] Stratus31: has joined #ruby
[15:24:37] n00bDev: has joined #ruby
[15:24:54] william3: has joined #ruby
[15:25:27] william3: has joined #ruby
[15:25:37] Xeago: has joined #ruby
[15:25:37] blackmesa: has joined #ruby
[15:26:18] momomomomo: has joined #ruby
[15:26:47] jgpawletko: has joined #ruby
[15:28:34] Demetrio: So I can get this to work no problem. WIth OpenSSL::SSL::VERIFY_NONE.
[15:28:42] Demetrio: So that's not going live any time soon.
[15:28:57] dsilfen: has joined #ruby
[15:29:15] icbm: has joined #ruby
[15:29:23] Stratus3D: has joined #ruby
[15:29:47] User458764: has joined #ruby
[15:30:16] Musashi007: has joined #ruby
[15:30:27] jhass: can't be bothered to read all that up, mind a quick recap?
[15:30:42] kies^: has joined #ruby
[15:34:00] jpoole: has left #ruby: ()
[15:34:18] mary5030: has joined #ruby
[15:34:57] mary5030: has joined #ruby
[15:35:22] Demetrio: jhass, basically, I'm having trouble with a gem, jekyll-gist.
[15:35:37] meves: has joined #ruby
[15:35:43] Demetrio: I've been getting SSLv3 errors, in that it can't verify certificates.
[15:36:08] Demetrio: I submitted an issue, and was told that updating the ssl to TLSv1_2 should help.
[15:36:16] mary5030: has joined #ruby
[15:36:38] Bloomer: has joined #ruby
[15:36:48] Demetrio: In trying to do that, I attempted running jekyll using the Poole theme with OpenSSL::SSL::VERIFY_NONE flagged in the jekyll-gist gem.
[15:37:10] nrsk: has joined #ruby
[15:37:15] Demetrio: It runs without error. So while that's great for production, I'm very much rather not let that go into live production.
[15:37:21] Demetrio: Even if it's just my github page.
[15:37:37] davedev24: has joined #ruby
[15:38:13] shinnya: has joined #ruby
[15:38:44] platzhirsch: has joined #ruby
[15:38:48] last_staff: has joined #ruby
[15:38:51] platzhirsch: has left #ruby: ()
[15:39:20] sepp2k: has joined #ruby
[15:39:21] Pothead: has joined #ruby
[15:39:50] coderMe: has joined #ruby
[15:40:06] potsmoker: has joined #ruby
[15:40:10] jhass: what's your OS?
[15:41:22] karapetyan: has joined #ruby
[15:42:50] sgambino: has joined #ruby
[15:43:35] Guest38: has joined #ruby
[15:44:11] Demetrio: jhass: Windows.
[15:44:25] Demetrio: whoop wrong window
[15:44:27] jhass: I see the culprit :P
[15:44:30] dopie: has joined #ruby
[15:45:31] bluOxigen: has joined #ruby
[15:45:31] spex: has joined #ruby
[15:45:44] bluOxigen: has left #ruby: ()
[15:46:08] jhass: my rough guess would be that your ruby is built against an ancient openssl or doesn't have access to a proper CA store
[15:46:17] ferr: has joined #ruby
[15:46:26] jhass: depends on the full error message
[15:46:40] AlexJakeGreen: has joined #ruby
[15:46:45] Demetrio: I can link you the initial cause of all of this: the gem.
[15:47:08] tuelz1: has joined #ruby
[15:47:12] Demetrio: https://github.com/jekyll/jekyll-gist/issues/30
[15:48:17] Kruppe: has joined #ruby
[15:48:20] huddy: has joined #ruby
[15:48:31] jhass: Demetrio: yeah that comment is plain wrong, the SSL/TLS version shouldn't be the issue here, that would result in a protocol error otherwise
[15:48:43] jhass: and hence turning of certificate validation helps
[15:48:49] jhass: thus no protocol issue
[15:49:30] Demetrio: So what you're saying is my solution is fine.
[15:49:35] jhass: I don't work with windows, so I'm not clear on the specifics, but I'd try to get curl's CA bundle (https://curl.haxx.se/docs/caextract.html) and make ruby use it for validation
[15:49:58] jhass: not harmful in this case but nothing that should be spread as solution to that error message
[15:51:38] Demetrio: Pretty sure I've downloaded this, but I have no idea how to point ruby to it.
[15:52:05] william3: has joined #ruby
[15:52:15] nrsk: has joined #ruby
[15:52:20] Demetrio: Would the implementation be that different across OSs?
[15:53:51] treehug88: has joined #ruby
[15:55:26] karapetyan: has joined #ruby
[15:56:13] jhass: well, normally your OS has a bundle which ruby (or rather openssl) just uses
[15:56:15] glcx: has joined #ruby
[15:56:15] glcx: has joined #ruby
[15:56:20] jhass: since it's a compiled in default location then
[15:56:27] jhass: not sure you can set it globally, mmh
[15:56:54] jhass: Demetrio: http://stackoverflow.com/a/14797635/2199687
[15:57:03] burgestrand: has joined #ruby
[15:57:28] sucks: has joined #ruby
[15:58:22] Demetrio: My concern about this is that it might not work when hosted on GitHub Pages.
[15:58:53] PedramT: has joined #ruby
[16:00:26] Demetrio: At this point, I'm tinking that it might just be easiest for me to not use gists in my posts. I can use <code> and link anything I might need to share.
[16:00:30] barhum2013: has joined #ruby
[16:02:11] Lochez: has joined #ruby
[16:02:32] SenpaiSilver: has joined #ruby
[16:02:32] mpistone: has joined #ruby
[16:04:36] dlitvak: has joined #ruby
[16:06:44] webopsx: has joined #ruby
[16:07:42] chipotle: has joined #ruby
[16:07:52] dsilfen: has joined #ruby
[16:08:24] william3: has joined #ruby
[16:08:48] jamw: has joined #ruby
[16:10:14] Bloomer: has joined #ruby
[16:10:27] Abrin: has joined #ruby
[16:10:28] vondruch: has joined #ruby
[16:10:47] baweaver: has joined #ruby
[16:11:18] Infra-Red: has joined #ruby
[16:12:09] apeiros: Burgestrand: tons and tons of meetings
[16:12:12] mhoungbo: has joined #ruby
[16:12:14] dudedudeman: has joined #ruby
[16:12:36] burgestrand: apeiros oh, you've joined the land of non-coders now?
[16:12:43] chouhoulis: has joined #ruby
[16:13:11] aegis3121: has joined #ruby
[16:13:11] x77686d: has joined #ruby
[16:13:15] apeiros: we shall see where it leads
[16:13:20] apeiros: and what are you up to? :)
[16:13:37] mark3: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :wilhelm.freenode.net")
[16:13:58] dsilfen: has joined #ruby
[16:14:03] apeiros: ACTION suspects mark3 to be a poorly coded bot :D
[16:14:06] burgestrand: Quit Elabs and moved to Stockholm (wanted to live closer to family), so now I'm with a product-ish company doing Rails/JS/Elixir :)
[16:14:28] yos7ph: has joined #ruby
[16:14:30] codehotter: If GC.stat shows heap_sorted_length 13xx, does that mean ruby managed heap is only 20 or so MB?
[16:14:37] jbrhbr: has joined #ruby
[16:14:46] codehotter: why is my process memory over 400 MB?
[16:14:56] codehotter: Where is that memory allocated? By what? How do I find out?
[16:15:01] jhass: Demetrio: I'm pretty sure GH pages will not suffer from this issue since it's pretty much a setup problem
[16:15:26] Xeago: has joined #ruby
[16:15:36] burgestrand: apeiros time to end the day though, TTYL. :)
[16:15:48] Kedare: has joined #ruby
[16:16:23] PedramT: has joined #ruby
[16:16:31] arup_r: has left #ruby: ()
[16:17:58] tomchapin: has joined #ruby
[16:17:58] TomPeed: has joined #ruby
[16:18:49] cschneid_: has joined #ruby
[16:19:29] dlitvak_: has joined #ruby
[16:20:57] selfadhesivefilm: has joined #ruby
[16:22:17] toretore: has joined #ruby
[16:22:50] qyjxmx: has joined #ruby
[16:23:02] agit0: has joined #ruby
[16:23:35] trinaldi: has joined #ruby
[16:24:36] skade: has joined #ruby
[16:24:40] adgtl: has joined #ruby
[16:25:20] nofacade: has joined #ruby
[16:25:54] n00bDev: has joined #ruby
[16:26:26] sandstrom: has joined #ruby
[16:30:07] adgtl: has joined #ruby
[16:30:51] william3: has joined #ruby
[16:31:00] duckpuppy: has joined #ruby
[16:31:27] hobodave: has joined #ruby
[16:33:37] Bloomer: has joined #ruby
[16:34:37] akem: has joined #ruby
[16:35:31] meves: has joined #ruby
[16:36:32] dionysus69: has joined #ruby
[16:37:48] zyzioziom: has joined #ruby
[16:37:52] platzhirsch: has joined #ruby
[16:38:27] rakm: has joined #ruby
[16:38:38] dsilfen: has joined #ruby
[16:39:06] duckpuppy: has joined #ruby
[16:39:51] Frem: has joined #ruby
[16:40:29] apeiros: how to spot emacs users in irc, lesson 1???
[16:43:14] rgtk: has joined #ruby
[16:43:22] diegoviola: has joined #ruby
[16:44:36] shortdudey123: has joined #ruby
[16:44:37] arup_r: has joined #ruby
[16:45:40] aep: has joined #ruby
[16:45:47] SirFunk: has joined #ruby
[16:46:27] JoshL: has joined #ruby
[16:46:35] ryotarai: has joined #ruby
[16:46:43] vbatts|work: has joined #ruby
[16:47:05] moeabdol: has joined #ruby
[16:47:53] tuelz1: has joined #ruby
[16:48:00] cfloare: has joined #ruby
[16:48:14] ghr: has joined #ruby
[16:49:17] YaknotiS: has joined #ruby
[16:49:17] duckpuppy: has joined #ruby
[16:50:34] duracrisis: has joined #ruby
[16:51:12] william3: has joined #ruby
[16:51:21] blackmesa: has joined #ruby
[16:52:34] agit0: has joined #ruby
[16:52:46] duckpuppy: has joined #ruby
[16:53:54] Infra-Red: has joined #ruby
[16:54:35] babblebre: has joined #ruby
[16:54:41] Guest73968: has joined #ruby
[16:56:38] dlitvak: has joined #ruby
[17:02:06] [Butch]: has joined #ruby
[17:02:15] oetjenj: has joined #ruby
[17:02:41] karapetyan: has joined #ruby
[17:02:42] lyoshajapan: has joined #ruby
[17:03:12] dmolina: has joined #ruby
[17:03:52] Infra-Red: has joined #ruby
[17:04:45] B1n4r10: has joined #ruby
[17:04:54] s00pcan: has joined #ruby
[17:05:13] davedev24: has joined #ruby
[17:05:24] amclain: has joined #ruby
[17:07:29] nrsk_: has joined #ruby
[17:07:38] tjohnson: has joined #ruby
[17:07:46] zambini: has joined #ruby
[17:07:52] karapetyan: has joined #ruby
[17:08:13] amb77: has joined #ruby
[17:08:18] ramfjord: has joined #ruby
[17:08:21] jottr: has joined #ruby
[17:09:00] User458764: has joined #ruby
[17:09:02] Pupeno: has joined #ruby
[17:09:39] nrsk: has joined #ruby
[17:12:27] ElFerna_: has joined #ruby
[17:13:29] amb77: has joined #ruby
[17:13:38] snowy: has joined #ruby
[17:13:43] symm-: has joined #ruby
[17:13:53] sftrabbit: has joined #ruby
[17:14:06] agit0: has joined #ruby
[17:15:14] nrsk_: has joined #ruby
[17:15:24] tubbo: apeiros: us vim users cantbb'i be detected!^haha,
[17:15:33] dlitvak: has joined #ruby
[17:15:47] tubbo: fuck emacsESCdd
[17:16:10] bronson: has joined #ruby
[17:18:09] sneakerhax: has joined #ruby
[17:18:36] sgambino: has joined #ruby
[17:21:09] zambini: C-x M-w perfect-score
[17:21:50] hadronzoo: has joined #ruby
[17:21:59] LuckyABA: has joined #ruby
[17:22:27] hadronzoo: Does anyone have a recommendation for an HTTP client library, ideally with keepalive support?
[17:22:56] jhass: typhoeus (the hydra interface)
[17:23:25] hadronzoo: jhass: thanks, I was just looking at that library, and libcurl isn't a problem.
[17:23:28] jhass: in case you want to pump out a lot of requests that is
[17:24:28] ElFerna_: has joined #ruby
[17:25:26] hadronzoo: jhass: indeed that's my constraint. We're having reliability and throughput issues with Faraday.
[17:25:26] diegoviola: has joined #ruby
[17:25:57] jhass: be aware that typhoeus can ramp up quite some memory usage though
[17:26:42] hadronzoo: jhass: how much memory (order of magnitude)? 100 Mb or 5 GB?
[17:26:57] n00bDev: has joined #ruby
[17:26:58] hadronzoo: (per process)?
[17:27:02] jhass: depends on the workload really
[17:27:02] meves: has joined #ruby
[17:27:10] jhass: per process yes
[17:27:34] jhass: the default pool settings are quite big, I've seen it take up a gig and more
[17:27:41] The_Phoenix: has joined #ruby
[17:27:44] jhass: but usually you should stay below 200 I think
[17:28:18] jhass: anyway, worth a shot, might be because I was requesting to a lot of different hosts
[17:29:31] chouhoulis: has joined #ruby
[17:29:46] Guest38: has joined #ruby
[17:29:54] hadronzoo: I'm only requesting to a few internal API servers, but the number of requests is significant.
[17:29:56] Tristan-Speccy: has joined #ruby
[17:30:11] hadronzoo: That makes sense, memory grows proportional to the number of hosts.
[17:30:18] sucks_: has joined #ruby
[17:30:34] synthroid: has joined #ruby
[17:31:54] pdoherty: has joined #ruby
[17:33:08] hadronzoo: jhass: thanks for your help. I'll test it and see if it's reasonable given the number unicorn processes per host.
[17:33:13] nrsk: has joined #ruby
[17:33:19] jackjackdripper: has joined #ruby
[17:33:30] JDiPierro: has joined #ruby
[17:33:40] meves: has joined #ruby
[17:34:33] platzhirsch: has left #ruby: ()
[17:34:35] roshanavand: has joined #ruby
[17:34:44] dsilfen: has joined #ruby
[17:35:10] davedev24: has joined #ruby
[17:36:03] ferr: has joined #ruby
[17:36:20] despai: has joined #ruby
[17:37:08] codehotter: I recompiled ruby with jemalloc, and now I cannot make it leak memory anymore!!! ????
[17:37:21] codehotter: What effects does using jemalloc have? Can just switching out libc malloc for jmalloc fix a memory leak?
[17:37:25] ZoffixW: has joined #ruby
[17:38:08] ZoffixW: has left #ruby: ("Leaving")
[17:38:11] maho: has joined #ruby
[17:38:14] maho: Can someone provide me a link to the solution of the NP-Complete Set Partition Problem?
[17:38:32] SCHAAP137: has joined #ruby
[17:38:51] maho: Also, I need links to solutions for solving the Countdown Game Show Numbers
[17:39:51] pilne: has joined #ruby
[17:39:59] roshanavand: has joined #ruby
[17:41:59] newbie22: has joined #ruby
[17:42:53] sorah: has joined #ruby
[17:42:57] amb77: has joined #ruby
[17:43:08] elifoster: has joined #ruby
[17:44:18] fedexo: has joined #ruby
[17:44:41] baweaver: has joined #ruby
[17:44:50] lagweezle: I'm not even sure what you asked, moho ... :(
[17:44:55] lagweezle: newbie22: hello
[17:45:13] jhass: lagweezle: sounds like homework
[17:45:50] dajobat: maho: If you're looking to run a solution to an NP complete problem, i'd say you might want to consider using a language a little faster than ruby.
[17:47:15] maho: has left #ruby: ()
[17:47:42] nrsk_: has joined #ruby
[17:47:48] ramfjord: has joined #ruby
[17:48:09] nrsk_: has joined #ruby
[17:48:31] lagweezle: ACTION goes to find out what the countdown numbers game is.
[17:48:32] duckpuppy: has joined #ruby
[17:48:53] tuelz1: has joined #ruby
[17:49:32] newbie22: has joined #ruby
[17:49:38] ghr: has joined #ruby
[17:49:55] stannard: has joined #ruby
[17:50:03] dajobat: lageweezle: It's where you get a set of numbers e.g. 5 10 1 2 3 and a total number to get like 436 and then you have to get as close to the total as possible, using any/all of the provided numbers once only, along with + - * /
[17:50:11] shevy: ruby is not slow - it is just misunderstood :(
[17:50:30] webopsx: has joined #ruby
[17:50:31] dajobat: That was an awful description by me there I think.
[17:51:19] shevy: lagweezle will heroically decipher it
[17:51:27] dajobat: shevy: Sorry, my mistake. Would it be better to say that there are probably languages that can solve that problem significantly faster?
[17:51:45] shevy: haha nah I was not being serious
[17:51:57] shevy: I just read that article about eval in javascript not being evil, but just misunderstood
[17:51:57] lagweezle: dajobat: Good enough for me to grok. Thank you!
[17:52:15] lagweezle: ACTION does a heroes pose, cape waving in the breeze.
[17:52:18] lemur: has joined #ruby
[17:52:38] baweaver: shevy: that's what it wants you to think
[17:53:01] SenpaiSilver: has joined #ruby
[17:53:11] lagweezle: At least ES6 has drug JavaScript further towards not horrible. :)
[17:53:40] dajobat: lagweezle: You should probably watch some countdown though, it's flipping great. Simultaneously interesting, tedious and pointless, it's basically the epitome of britishness.
[17:54:17] lagweezle: Disturbingly, I'd probably love it.
[17:54:39] dlitvak: has joined #ruby
[17:54:39] dajobat: As you should.
[17:55:54] baweaver: Street countdown, it's like countdown but on the street
[17:57:46] ElFerna_: has joined #ruby
[17:57:58] Demetrio: has joined #ruby
[17:58:45] Ox0dea: dajobat: Exponentiation and roots are technically permitted, right?
[17:58:45] jbrhbr: has joined #ruby
[18:00:39] kirun: has joined #ruby
[18:00:52] dajobat: 0x0dea: I don't know, I sort of assumed they weren't but I'm no countdownologist.
[18:02:12] rht: has joined #ruby
[18:02:20] JDiPierro: has joined #ruby
[18:03:34] william3: has joined #ruby
[18:05:27] Bloomer: has joined #ruby
[18:05:28] skade: has joined #ruby
[18:06:55] PedramT: has joined #ruby
[18:08:00] despai: has joined #ruby
[18:09:33] jamw: has joined #ruby
[18:09:57] lagweezle: Oif. That number game hurts my head.
[18:11:31] stannard: has joined #ruby
[18:11:38] anisha: has joined #ruby
[18:12:42] dlitvak_: has joined #ruby
[18:13:59] tomphp: has joined #ruby
[18:14:34] Brklyn: has joined #ruby
[18:15:01] camillo: has joined #ruby
[18:15:04] joonty: has joined #ruby
[18:15:12] confounds: has joined #ruby
[18:19:24] aegis3121: has joined #ruby
[18:19:59] Ox0dea: >> (1..6).reduce(0) { |t, n| t + [*n.times].permutation.size + %i[+ - * /].repeated_permutation(n).size }
[18:20:01] ruby[bot]: Ox0dea: # => 6333 (https://eval.in/512673)
[18:20:09] Ox0dea: lagweezle: Brute-forcing it is perfectly viable. ^
[18:20:32] Ox0dea: For larger inputs, you need to reach for dynamic programming or the like.
[18:21:02] william3: has joined #ruby
[18:21:13] lagweezle: That's ... delicious.
[18:21:27] lagweezle: I was figuring permutations would be the way to go, but that's ... kind of beautiful.
[18:21:32] Pupeno: has joined #ruby
[18:21:50] lagweezle: Dynamic programming ... I could not wrap my head around that very well when reading about it. :(
[18:22:16] lagweezle: Recent interview I had make me think that I'd be good as a Junior / standard Dev, but finding a place that'll give me the time of day is ... challenging.
[18:23:00] Ox0dea: Dynamic programming ~= recursion * memoization.
[18:23:17] lagweezle: Memoization is ... basically "caching", kind of?
[18:23:25] n00bDev: has joined #ruby
[18:23:34] Ox0dea: Yeah, no sense performing the same calculation more than once.
[18:23:35] lagweezle: Well, more, keep the result about after solving it, in case you need it (or can use it as a sub-solution) later?
[18:23:46] lagweezle: Welp ... I guess I DO understand it. Heh.
[18:23:46] mikecmpbll: has joined #ruby
[18:24:19] PedramT: has joined #ruby
[18:24:41] synthroid: has joined #ruby
[18:24:48] lagweezle: Wait, where is the input for the value to solve for in that?
[18:24:57] hightower3: has joined #ruby
[18:25:01] despai_: has joined #ruby
[18:25:10] hahuang65: has joined #ruby
[18:25:18] sgambino: has joined #ruby
[18:25:33] TomyLobo: has joined #ruby
[18:25:47] nofacade: has joined #ruby
[18:25:57] Ox0dea: Oh, that up there was just showing the worst-case number of possibilities you'd have to check.
[18:25:58] arlek: has joined #ruby
[18:26:27] Ox0dea: You'd zip up the numbers and the operators, reduce over them, and return if you found that they came out to the target number.
[18:27:41] diego2: has joined #ruby
[18:27:46] The_Phoenix1: has joined #ruby
[18:27:47] diego2: has joined #ruby
[18:28:42] ht__: has joined #ruby
[18:29:29] tomphp: has joined #ruby
[18:31:13] ^CrYpto^: has joined #ruby
[18:32:58] dajobat: Right, I'm off. Cheerio all.
[18:33:12] momomomomo: has joined #ruby
[18:33:23] dajobat: Demetrio: i'll be back on tonight if you're still around to have another crack at that HTTPS thing if it's not been solved already.
[18:33:32] B1n4r10: has joined #ruby
[18:34:57] tomphp: has joined #ruby
[18:35:01] moeabdol: has joined #ruby
[18:35:27] CoderPuppy: has joined #ruby
[18:35:51] dlitvak: has joined #ruby
[18:36:12] karapetyan: has joined #ruby
[18:36:15] vondruch: has joined #ruby
[18:37:33] AndroUser2: has joined #ruby
[18:39:14] lyoshajapan: has joined #ruby
[18:39:16] konsolebox: has joined #ruby
[18:41:33] FooMunki: has joined #ruby
[18:42:47] PedramT_: has joined #ruby
[18:42:59] sanguisdex: has joined #ruby
[18:43:10] stannard: has joined #ruby
[18:43:20] skade: has joined #ruby
[18:44:52] Xeago: has joined #ruby
[18:45:32] Sirithcam: has joined #ruby
[18:47:03] shellie: has joined #ruby
[18:47:21] nrsk: has joined #ruby
[18:49:12] nunchuck: has joined #ruby
[18:49:26] amb77_: has joined #ruby
[18:49:38] tuelz1: has joined #ruby
[18:50:47] agentmeerkat: has joined #ruby
[18:51:08] shadoi: has joined #ruby
[18:51:50] ccooke: has joined #ruby
[18:52:38] adac: has joined #ruby
[18:53:06] baweaver: has joined #ruby
[18:53:35] zambini: has joined #ruby
[18:53:47] despai: has joined #ruby
[18:54:35] depesz: has joined #ruby
[18:54:44] nettoweb: has joined #ruby
[18:55:09] depesz: hi. I'm using Kernel.select() with 2 IO objects. when I get them back, how to I check which one I'm reading from at the moment?
[18:55:25] Infra-Red: has joined #ruby
[18:56:16] firstdayonthejob: has joined #ruby
[18:56:29] mooru: has joined #ruby
[18:57:06] dsilfen: has joined #ruby
[18:58:07] drbrain: depesz: select returns an array of IOs you should read from
[18:58:13] drbrain: you have to loop through them separately
[18:58:14] lurch_: has joined #ruby
[18:58:15] depesz: drbrain: i know.
[18:58:22] depesz: and I will. but I have to know which is which.
[18:58:38] drbrain: do you need to read different things from each?
[18:58:42] depesz: because output should go to different places depending on which fh it is.
[18:58:44] baweaver: has joined #ruby
[18:58:49] arthropododo: has joined #ruby
[18:59:02] depesz: basically, i'm running open3, and getting output from stdout and stderr.
[18:59:33] drbrain: two solutions: a) track IO#fileno, b) select with timeout on each IO separately
[18:59:42] dfockler: has joined #ruby
[18:59:50] depesz: ok. fileno seems like better solution. thanks.
[19:00:04] drbrain: there's a third solution, use threads, but that's much more work, I'm sure
[19:00:21] william3: has joined #ruby
[19:00:45] drbrain: depesz: if you're using open3, can Kernel#spawn's redirection features make your life easier?
[19:00:46] ht__: has joined #ruby
[19:00:49] depesz: not sure how threads can help me with distinguishing stdout/stderr from single command.
[19:00:55] [Butch]: has joined #ruby
[19:01:05] drbrain: Threads replace using select at all
[19:01:18] depesz: drbrain: apparently i have to run my own reading code, because open3 doesn't work well with timeout.
[19:01:23] Cohedrin: has joined #ruby
[19:01:39] drbrain: so one thread handles open3 out, the other open3 err
[19:01:56] depesz: basically i'm trying to convert this code: https://gist.github.com/lpar/1032297 so that it will return stdout and stderr separately
[19:02:08] Brklyn: has joined #ruby
[19:02:12] User458764: has joined #ruby
[19:02:50] drbrain: http://docs.ruby-lang.org/en/2.3.0/Kernel.html#method-i-spawn
[19:03:01] jbrhbr: has joined #ruby
[19:03:45] drbrain: yeah, spawn will make this much easier, I think
[19:03:47] dudedudeman: has joined #ruby
[19:04:13] Infra-Red: has joined #ruby
[19:04:24] depesz: i don't see it having redirect to variable.
[19:05:21] drbrain: near the bottom it shows redirecting to a pipe
[19:06:06] drbrain: then you can read from the pipe directly after the command is finished without blocking the process
[19:06:14] bb010g: has joined #ruby
[19:06:43] depesz: i'm not sure about it. will try to convert first the code from github. if it will fail, will look into spawn, but I'm not sure if I want to deal with pipes.
[19:06:54] neanderslob: has joined #ruby
[19:07:02] JohnBat26: has joined #ruby
[19:07:17] stannard: has joined #ruby
[19:07:37] depesz: not to mention that I don't understand the example.
[19:07:53] depesz: it seems to read from log_r, but I don't see anywhere that it's being used for anything.
[19:08:15] drbrain: understandable, I don't like to maintain things I don't understand either
[19:08:33] depesz: undefined method `fileno' for [#<IO:(closed)>]:Array
[19:08:41] yfeldblum: has joined #ruby
[19:08:44] Infra-Red: has joined #ruby
[19:08:52] drbrain: call it on the #<IO> inside the Array
[19:09:45] depesz: i think that the select() returns something else than I expected. I thought it will be array of IO objects, but it doesn't look that way
[19:10:13] depesz: stupid me.
[19:10:28] jottr: has joined #ruby
[19:10:35] drbrain: http://docs.ruby-lang.org/en/2.3.0/Kernel.html#method-i-select
[19:10:41] drbrain: nah, select is tricky
[19:11:08] drbrain: it took me a long time to understand what it does, it still feels very cumbersome to use
[19:11:12] dyre17: has joined #ruby
[19:11:24] Musashi007: has joined #ruby
[19:11:34] depesz: thanks a lot - got to jet. will bookmark spawn() docs, and maybe will get back to it tomorrow.
[19:11:37] drbrain: select returns an Array with more arrays inside which contain IOs
[19:11:47] drbrain: cool, good luck
[19:12:07] aegis3121: has joined #ruby
[19:13:01] joe42: has joined #ruby
[19:13:58] joe42: Is ruby still one of the most used languages? Also, can one do decent development without using rails?
[19:14:26] drbrain: I don't know how to quantify the first, other than to say it is still popular and powers many businesses
[19:14:35] drbrain: yes, you can do decent development without using rails
[19:15:02] drbrain: there are some Japanese companies that run ruby on mainframes
[19:15:16] drbrain: I highly suspect they don't use Rails for that
[19:15:44] drbrain: I work for Fastly and we use Sinatra instead of Rails for many services, but that's still webbish
[19:16:05] fmcgeough: has joined #ruby
[19:16:30] joe42: drbrain: Thanks. I was reading many articles/blog posts which say ruby is not scalable. I found that hard to believe considering it is just a kanguage, but wanted to ask anyway. Is it?
[19:16:42] joe42: typo; language
[19:16:45] Conflict: has joined #ruby
[19:17:04] burgestrand: has joined #ruby
[19:17:15] drbrain: I think you can make arguments about most languages if you narrow your criteria enough
[19:17:40] slawrence00: has joined #ruby
[19:18:03] baweaver: has joined #ruby
[19:18:25] zeroDivisible: has joined #ruby
[19:18:29] drbrain: there are a bunch of problems ruby is not as well suited-to as some other language
[19:18:47] ht__: has joined #ruby
[19:19:51] sneakerhax: has joined #ruby
[19:23:12] k13nox: has joined #ruby
[19:23:33] kenpoint: has joined #ruby
[19:27:08] despai: has joined #ruby
[19:27:39] pawnbox: has joined #ruby
[19:27:43] sdothum: has joined #ruby
[19:28:19] vagnerd: has joined #ruby
[19:28:20] vagnerd: has joined #ruby
[19:30:21] benhuda: has joined #ruby
[19:30:47] uris: has joined #ruby
[19:31:20] mdw: has joined #ruby
[19:31:30] dsilfen: has joined #ruby
[19:31:46] tuelz1: has joined #ruby
[19:31:50] IrishGringo: has joined #ruby
[19:32:37] selfadhe_: has joined #ruby
[19:33:40] Jackneill: has joined #ruby
[19:33:57] User458764: has joined #ruby
[19:34:00] dudedudeman: has joined #ruby
[19:34:44] nettoweb: has joined #ruby
[19:35:11] despai: has joined #ruby
[19:36:17] sandstrom: has joined #ruby
[19:36:23] minimalism: has joined #ruby
[19:36:25] elifoster: has joined #ruby
[19:38:44] ur5us: has joined #ruby
[19:41:18] spider-mario: has joined #ruby
[19:42:29] jpoole: has joined #ruby
[19:42:56] jpoole: how do I check if a variable is in my defined array named CONSTANT. include?
[19:43:18] jpoole: better said, not defined, found in/included in the constant.
[19:43:34] djbkd: has joined #ruby
[19:43:51] despai_: has joined #ruby
[19:44:18] slackbotgz: has joined #ruby
[19:45:43] drbrain: >> CONSTANT = [1, 'a', :c]; v = :c; CONSTANT.include? v
[19:45:44] ruby[bot]: drbrain: # => true (https://eval.in/512711)
[19:45:50] drbrain: jpoole: ??? like this?
[19:46:37] _lazarevsky: has joined #ruby
[19:48:28] _lazarevsky: I have two arrays - A = ["a", "c", "e] and B = ["b", "d", "f"]. I need to write a function which would output A = ["a", null, "c", null, "e", null] and B = [null, "b", "null", "d", null, "f"]
[19:48:43] drbrain: _lazarevsky: look at Array#zip
[19:48:52] _lazarevsky: I have done it for the case where the values in the arrays are numbers
[19:49:08] _lazarevsky: but am not too sure how I can check if a string is greater than another string
[19:49:31] Infra-Red: has joined #ruby
[19:49:33] _lazarevsky: the lists are sorted alphabetically
[19:49:45] bougyman: anyone play with ldap? Looking for something higher-level than ruby-ldap but not as blot as ActiveLDAP
[19:49:54] _lazarevsky: bougyman: I have
[19:50:00] bougyman: seeing treequel, but doesn't seem to be very current on maintenance... maybe it's just Done?
[19:50:01] meves: has joined #ruby
[19:50:04] bougyman: _lazarevsky: what do you use?
[19:50:12] _lazarevsky: dunno, lemme check
[19:50:16] drbrain: _lazarevsky: why do you need to know if one string is creater than the other?
[19:51:13] _lazarevsky: bougyman: http://www.rubydoc.info/gems/ruby-net-ldap/Net/LDAP
[19:51:24] bougyman: _lazarevsky: yep, used Net::LDAP before, too.
[19:51:28] bougyman: it's pure ruby, iirc.
[19:51:32] _lazarevsky: drbrain: cuz that's a business requirement
[19:51:37] _lazarevsky: drbrain: users are comparing scenarios
[19:51:42] _lazarevsky: each scenario has multiple projects
[19:51:52] bougyman: ruby-ldap wraps libldap, and this is for benchmarking an ldap server so I was looking towards that.
[19:51:59] _lazarevsky: projects featured in both scenarios should be lined up (they are represented in a juxtaposed tables)
[19:52:08] drbrain: _lazarevsky: I mean, what does comparing strings have to do with making an Array with nils in it?
[19:52:21] dionysus69: has joined #ruby
[19:52:31] _lazarevsky: drbrain: I've failing to articulate my problem correctly, I apologise
[19:52:50] _lazarevsky: drbrain: just look at the original question and the desired output
[19:53:20] _lazarevsky: on the front-end I'm returning 2 scenarios along with the scenario projects side loaded
[19:53:34] _lazarevsky: there are two tables juxtaposed
[19:53:54] drbrain: so the table has a, b, c, d, e, f
[19:53:57] _lazarevsky: the data should be presented in the following way, given the input above
[19:54:05] _lazarevsky: Scenario 1 | Scenario 2
[19:54:06] drbrain: and you want two arrays that maintain the order of items?
[19:54:18] drbrain: with omitted items replaced by nil?
[19:54:35] despai: has joined #ruby
[19:54:42] _lazarevsky: if say.. Z was featured in both scenarios
[19:54:46] _lazarevsky: then it would be
[19:55:02] _lazarevsky: so the returned arrays should be of the same size, regarding of the lengths of the original arrays
[19:55:03] drbrain: I think that matches my explanation
[19:55:16] drbrain: yes, with position maintained
[19:55:25] _lazarevsky: lemme look at the zip method
[19:55:52] drbrain: zip might not be enough to do what you need, I thought you just needed to stick nils in at regular intervals
[19:56:05] gheegh: has joined #ruby
[19:56:06] drbrain: you can compare strings by value with < and >
[19:56:20] _lazarevsky: well in that case it's problem solved
[19:56:22] _lazarevsky: I already have a function which does that
[19:56:23] drbrain: >> "a" < "b"
[19:56:24] ruby[bot]: drbrain: # => true (https://eval.in/512713)
[19:56:32] drbrain: "apple" > "banana"
[19:56:37] momomomomo: has joined #ruby
[19:56:40] drbrain: oops, that would be false ???
[19:56:42] _lazarevsky: I just need to parametarise the model attribute
[19:57:02] _lazarevsky: drbrain: thanks for yer help man
[19:57:14] _lazarevsky: bougyman: I hope you come right mate
[19:57:33] _lazarevsky: bougyman: I found the lib very easy to work with once I read up on the ldap protocol
[19:57:49] bougyman: _lazarevsky: yep i've used them many times before. this time I specifically need speed, though.
[19:57:56] bougyman: I'll just wrap some stuff around ruby-ldap.
[19:58:02] bougyman: (https://github.com/bearded/ruby-ldap)
[19:58:16] _lazarevsky: g'luck with that too :)
[19:58:20] ElFerna_: has joined #ruby
[19:58:22] bougyman: thanks for the input, just didn't want to miss out on some Big Deal that I didn't know about in the ruby->ldap space.
[19:58:32] _lazarevsky: ya I know what you mean.. querying ldap was very sometimes slow for us too
[19:58:41] _lazarevsky: was sometimes very*
[19:59:09] _lazarevsky: so instead decided to use POSIX groups to logically group users
[19:59:15] bougyman: ActiveLDAP works great if idiots have to modify the code
[19:59:35] neanderslob_: has joined #ruby
[20:00:10] neanderslob: has joined #ruby
[20:01:14] aegis3121: has joined #ruby
[20:01:58] sgambino: has joined #ruby
[20:02:06] matp: has joined #ruby
[20:03:31] sanguisdex: has joined #ruby
[20:03:38] burgestrand: has joined #ruby
[20:04:02] ged: bougyman: Yeah, we just stopped needing to change Treequel since it just works (for us), but please do let us know if you find anything that needs adding/fixing.
[20:04:27] BTRE: has joined #ruby
[20:06:15] karapetyan: has joined #ruby
[20:07:05] geekbri: has joined #ruby
[20:07:33] pawnbox: has joined #ruby
[20:07:34] dopamean_: has joined #ruby
[20:07:47] arup_r: has joined #ruby
[20:07:59] jottr: has joined #ruby
[20:08:47] ht__: has joined #ruby
[20:08:47] n_blownapart: has joined #ruby
[20:09:14] baweaver: has joined #ruby
[20:09:36] despai: has joined #ruby
[20:10:17] jamw: has joined #ruby
[20:12:06] lilvim: has joined #ruby
[20:12:45] ht__: has joined #ruby
[20:13:04] dlitvak: has joined #ruby
[20:15:28] blackmesa: has joined #ruby
[20:16:27] bluOxigen_: has joined #ruby
[20:16:40] FernandoBasso: has joined #ruby
[20:18:37] dlitvak: has joined #ruby
[20:19:03] shadoi: has joined #ruby
[20:19:30] slackbotgz: has joined #ruby
[20:19:49] jordanm: has joined #ruby
[20:20:23] celly: has joined #ruby
[20:21:47] Ruby_Rocks_007: has joined #ruby
[20:25:36] ^CrYpto^: has joined #ruby
[20:25:37] Cohedrin: has joined #ruby
[20:26:51] Musashi007: has joined #ruby
[20:27:24] betabet: has joined #ruby
[20:27:49] dcunit3d: has joined #ruby
[20:28:47] ht__: has joined #ruby
[20:29:07] k13nox: has joined #ruby
[20:30:22] dlitvak_: has joined #ruby
[20:31:18] supremekay: has joined #ruby
[20:32:31] fantazo: has joined #ruby
[20:32:35] mhoungbo: has joined #ruby
[20:32:44] ht__: has joined #ruby
[20:33:49] duckpuppy: has joined #ruby
[20:33:52] PedramT: has joined #ruby
[20:34:33] joonty: has joined #ruby
[20:36:19] kalopsian: has joined #ruby
[20:36:45] arooni: has joined #ruby
[20:36:47] jpoole: drbrain yes, thanks :)
[20:36:48] dsilfen: has joined #ruby
[20:37:24] dajobat: has joined #ruby
[20:37:41] juddey: has joined #ruby
[20:38:45] ht__: has joined #ruby
[20:38:51] PedramT: has joined #ruby
[20:42:39] FooMunki: has joined #ruby
[20:44:47] ht__: has joined #ruby
[20:46:38] dopamean_: has joined #ruby
[20:47:03] serbalgi: has joined #ruby
[20:48:47] tomphp: has joined #ruby
[20:48:48] cdg: has joined #ruby
[20:50:12] Felix444: has joined #ruby
[20:50:19] keebz: has joined #ruby
[20:52:58] keebz: has joined #ruby
[20:53:19] DoubleMalt: has joined #ruby
[20:53:52] keebz: has left #ruby: ()
[20:53:54] lemur: has joined #ruby
[20:54:44] Channel6: has joined #ruby
[20:55:07] synthroid: has joined #ruby
[20:55:08] webopsx: has joined #ruby
[20:55:12] Infra-Red: has joined #ruby
[20:56:05] dlitvak: has joined #ruby
[20:56:44] ht__: has joined #ruby
[20:56:55] IrishGringo: has joined #ruby
[20:57:59] Pupeno: has joined #ruby
[20:59:55] Yeomra: has joined #ruby
[21:00:55] hakunin_: has joined #ruby
[21:02:45] ht__: has joined #ruby
[21:02:54] mostlybadfly: has joined #ruby
[21:03:23] dopamean_: has joined #ruby
[21:05:49] sandstrom: has joined #ruby
[21:06:44] bluOxigen: has joined #ruby
[21:06:46] ferr: has joined #ruby
[21:08:17] dfockler: has joined #ruby
[21:09:15] djkeebz: has joined #ruby
[21:10:19] tomphp: has joined #ruby
[21:10:43] icbm: has joined #ruby
[21:11:48] speaking1ode: has joined #ruby
[21:11:54] Azure: has joined #ruby
[21:12:40] dopamean_: has joined #ruby
[21:12:45] ht__: has joined #ruby
[21:12:56] nerium: has joined #ruby
[21:12:56] dsilfen: has joined #ruby
[21:13:40] meves: has joined #ruby
[21:14:07] karapetyan: has joined #ruby
[21:14:15] djkeebz: has left #ruby: ()
[21:15:35] unreal: has joined #ruby
[21:16:06] skade: has joined #ruby
[21:16:21] TomyLobo: has joined #ruby
[21:16:42] moeabdol: has joined #ruby
[21:17:51] dsilfen: has joined #ruby
[21:17:54] kbni: So I'm using pry.. but one of my objects contains a rather large child object that makes using it kind of difficult, how can I prevent one object from showing up?
[21:21:25] tomphp: has joined #ruby
[21:21:51] shanemcd: has joined #ruby
[21:22:04] baweaver: has joined #ruby
[21:25:01] bluOxigen_: has joined #ruby
[21:25:19] RegulationD: has joined #ruby
[21:25:46] dsilfen: has joined #ruby
[21:25:52] k13nox: has joined #ruby
[21:27:42] adac: has joined #ruby
[21:27:45] AnxiousCarrot: has joined #ruby
[21:28:00] dsilfen_: has joined #ruby
[21:28:45] moeabdol1: has joined #ruby
[21:29:15] ElFerna_: has joined #ruby
[21:29:42] glcx: has joined #ruby
[21:29:42] glcx: has joined #ruby
[21:29:45] nrsk_: has joined #ruby
[21:31:32] tomphp: has joined #ruby
[21:31:42] solars: has joined #ruby
[21:32:14] shadoi: kbni: you could customize the print setting
[21:32:27] shadoi: kbni: Pry.config.print = proc { |output, value| output.puts "=> #{value.inspect}" } # add your exceptions in here
[21:32:28] shevy: that's the problem with those big kids - they just become too big to stay at home
[21:32:45] dopamean_: has joined #ruby
[21:32:57] chipotle: has joined #ruby
[21:33:13] silentdanni: has joined #ruby
[21:33:15] momomomomo: has joined #ruby
[21:33:47] nrsk: has joined #ruby
[21:33:59] hxegon: has joined #ruby
[21:34:23] kbni: doesn't Pry.config.print hit only for the first thing?
[21:34:27] yfeldblum: has joined #ruby
[21:35:19] shadoi: kbni: probably, though I guess you could just override that object type's inspect method
[21:35:34] joonty: has joined #ruby
[21:36:55] kbni: hm, yeah was hoping to avoid that.
[21:37:10] kbni: oh, I guess I can just override that from another module, nbd
[21:37:25] shadoi: well I'd probably just do it in pry only
[21:37:32] shadoi: for debugging
[21:37:43] pawnbox: has joined #ruby
[21:38:01] djbkd: has joined #ruby
[21:38:35] B1n4r10: has joined #ruby
[21:39:38] toretore: has joined #ruby
[21:40:10] dubek: has joined #ruby
[21:40:45] ht__: has joined #ruby
[21:43:03] william3: has joined #ruby
[21:43:09] momomomomo: has joined #ruby
[21:44:27] iamvery: has joined #ruby
[21:45:11] dsilfen: has joined #ruby
[21:45:16] dajobat: Good evening all.
[21:47:04] bronson: has joined #ruby
[21:48:09] dlitvak: has joined #ruby
[21:49:34] symm-_: has joined #ruby
[21:54:45] ht__: has joined #ruby
[21:55:11] GinoManWorks: has joined #ruby
[21:55:56] treehug88: has joined #ruby
[21:56:07] shanemcd: has joined #ruby
[21:57:21] blackgoat: has joined #ruby
[21:57:46] bratchley: has joined #ruby
[21:58:14] hosttor: has joined #ruby
[21:58:43] shanemcd: has joined #ruby
[21:59:21] william3: has joined #ruby
[21:59:30] IrishGringo: has joined #ruby
[21:59:33] roshanavand: has joined #ruby
[21:59:40] infernix: has joined #ruby
[22:00:02] dsilfen_: has joined #ruby
[22:00:36] JDiPierro: has joined #ruby
[22:00:58] stevemackinnon: has joined #ruby
[22:01:31] hxegon: has joined #ruby
[22:04:28] jbrhbr: has joined #ruby
[22:04:42] zambini: has joined #ruby
[22:04:44] nrsk: has joined #ruby
[22:05:50] PsionTheory: has joined #ruby
[22:06:38] futilegames: has joined #ruby
[22:08:44] unreal: has joined #ruby
[22:09:31] cschneid_: I'm seeing a hang on a line: `STDOUT.puts data` -- in what case could that pause (indefinately). I thought that the OS allowed that buffer to get arbitrarily large, until crash?
[22:09:35] baweaver: has joined #ruby
[22:09:59] blackmesa: has joined #ruby
[22:11:05] jamw: has joined #ruby
[22:11:20] ferr: has joined #ruby
[22:11:34] lubekpl: has joined #ruby
[22:11:56] dlitvak: has joined #ruby
[22:12:31] ElFerna: has joined #ruby
[22:13:23] Ox0dea: cschneid_: You're certain that's the line that's hanging?
[22:13:54] cschneid_: ya, I log before & after. I think it's related to https://thraxil.org/users/anders/posts/2008/03/13/Subprocess-Hanging-PIPE-is-your-enemy/ -- The stdout pipe is being listened to from a Go program that's using this ruby process as a subprocess
[22:14:07] cschneid_: turns out pipes have max sizes maybe?
[22:14:15] cschneid_: which is rather awkward for me. :-/
[22:14:27] momomomomo: has joined #ruby
[22:14:36] dsilfen: has joined #ruby
[22:14:44] mondok: has joined #ruby
[22:15:29] betabet: has joined #ruby
[22:16:31] Xeago: has joined #ruby
[22:16:47] lemur: has joined #ruby
[22:17:04] zyzioziom: has joined #ruby
[22:18:46] tomphp: has joined #ruby
[22:18:56] lubekpl: has joined #ruby
[22:19:01] amb77_: has left #ruby: ()
[22:19:35] Cihan: has joined #ruby
[22:20:53] s00pcan: has joined #ruby
[22:21:21] jottr_: has joined #ruby
[22:24:22] n_blownapart: has joined #ruby
[22:25:04] adaedra: cschneid_: pipe data is stored in a kernel buffer while going between processes. Theses buffers are not infinite.
[22:25:21] cschneid_: ya, but I don't have stupidly large data
[22:25:30] cschneid_: lines are on the order of 100k (json silliness)
[22:25:41] cschneid_: but it looks like 64k is standard there
[22:25:50] cschneid_: I'm rearchitecting instead of trying to force down this path
[22:25:51] adaedra: sounds about right
[22:26:00] dlitvak: has joined #ruby
[22:26:06] adaedra: pipes are not made to be storing lots of data
[22:27:40] baweaver: has joined #ruby
[22:27:45] cschneid_: well, there's a go app at the other end that I thought was consuming, but timing is probably off.
[22:28:25] cschneid_: like, it write everything, hits a barrier, but the goapp doesn't start reading until a flush or something. Whatever, reworking things :)
[22:28:38] adaedra: Be careful that Ruby tend to not flush often also
[22:28:39] pawnbox: has joined #ruby
[22:28:47] solocshaw: has joined #ruby
[22:29:18] Musashi007: has joined #ruby
[22:29:33] shadoi: cschneid_: have you tried using $stdout.sync = true
[22:30:03] Xeago: has joined #ruby
[22:30:13] cschneid_: Have not. Changing business requirements a bit ends up being easier. I'm always iffy on communicating processes like this (was a hack to support old versions of data that were ruby marshal encoded).
[22:30:36] cschneid_: I think there's a way to just not do this work in the first place. Was surprising that a simple line like STDOUT.puts hung though :)
[22:31:03] shadoi: well sync will make it unbuffered, should just make the issue go away.
[22:31:13] cschneid_: thanks. I'll give it a try
[22:32:51] s00pcan: has joined #ruby
[22:33:09] Coldblackice: has joined #ruby
[22:34:11] LoneHerm_: has joined #ruby
[22:35:59] joonty: has joined #ruby
[22:37:35] momomomomo_: has joined #ruby
[22:39:43] dlitvak_: has joined #ruby
[22:40:43] govg: has joined #ruby
[22:41:06] moeabdol: has joined #ruby
[22:41:47] supremekay: has joined #ruby
[22:42:14] zenlot1: has joined #ruby
[22:43:40] tomphp: has joined #ruby
[22:44:39] celly_: has joined #ruby
[22:45:24] n_blownapart: has joined #ruby
[22:48:10] jackjackdripper: has joined #ruby
[22:51:28] snowy: has joined #ruby
[22:51:38] aegis3121: has joined #ruby
[22:54:07] peterevjan: has joined #ruby
[22:54:31] ledestin: has joined #ruby
[22:54:47] dlitvak: has joined #ruby
[22:54:56] lemur: has joined #ruby
[22:56:11] Nympth: has joined #ruby
[22:57:46] jgt2: has joined #ruby
[22:57:57] victortyau: has joined #ruby
[22:59:03] wethu: has joined #ruby
[23:01:14] yqt: has joined #ruby
[23:01:48] william3: has joined #ruby
[23:03:23] user083: has joined #ruby
[23:05:25] lubekpl: dajobat hello
[23:06:24] despai: has joined #ruby
[23:08:04] blackmesa: has joined #ruby
[23:10:55] ReK2: has joined #ruby
[23:11:03] meves: has joined #ruby
[23:11:28] mjc__: has joined #ruby
[23:12:34] william3: has joined #ruby
[23:14:44] s00pcan: has joined #ruby
[23:15:50] davedev24: has joined #ruby
[23:17:42] dajobat: I say hi, but I'm actually going to head to bed. Cheerio
[23:17:58] KnownSyntax: has joined #ruby
[23:17:58] KnownSyntax: has joined #ruby
[23:18:14] Demetrio: has joined #ruby
[23:20:00] meves: has joined #ruby
[23:20:29] AlexRussia: has left #ruby: ()
[23:25:57] mg^^: has joined #ruby
[23:30:34] solocshaw: has joined #ruby
[23:32:26] stevemackinnon: has joined #ruby
[23:32:34] stevemackinnon: has joined #ruby
[23:34:01] Ropeney: has joined #ruby
[23:36:45] joonty: has joined #ruby
[23:37:05] djbkd: has joined #ruby
[23:37:15] meves: has joined #ruby
[23:40:52] tuelz1: has joined #ruby
[23:49:28] davedev24: has joined #ruby
[23:50:53] davedev24: has joined #ruby
[23:51:38] NeverTired: has joined #ruby
[23:53:55] diegoviola: has joined #ruby
[23:54:02] peterevjan: has joined #ruby
[23:55:34] flughafen: has joined #ruby
[23:57:33] northfurr: has joined #ruby
[23:58:35] pwnd_nsfw: has joined #ruby