« Back to channel list

#ruby - 11 July 2015

« Back 1 day Forward 1 day »
[00:00:47] shevy: zenspider lol
[00:00:53] shevy: as long as you were drunk it's all ok
[00:01:58] n008f4g_: has joined #ruby
[00:04:25] zacstewart: has joined #ruby
[00:06:19] bruno-: has joined #ruby
[00:06:23] eggoez: has joined #ruby
[00:06:57] casadei_: has joined #ruby
[00:07:07] chipotle: has joined #ruby
[00:09:21] serivich: has joined #ruby
[00:12:19] mleung: has joined #ruby
[00:14:41] hotpancakes: has joined #ruby
[00:15:11] davedev24_: has joined #ruby
[00:15:32] mrconfused: has joined #ruby
[00:16:37] chipotle: ?seen s2013
[00:16:38] ruboto: s2013, I don't know anything about seen
[00:16:41] davedev24: has joined #ruby
[00:18:07] juanpablo_: has joined #ruby
[00:22:34] funnel: has joined #ruby
[00:22:42] hotpancakes: has joined #ruby
[00:23:11] pawz: has joined #ruby
[00:23:12] surs: has joined #ruby
[00:23:39] fgo: has joined #ruby
[00:26:17] beef-wellington: has joined #ruby
[00:27:15] zenspider: has joined #ruby
[00:33:09] chouhoulis: has joined #ruby
[00:36:20] chipotle: has joined #ruby
[00:36:59] tomphp: has joined #ruby
[00:37:51] Ox0dea: has joined #ruby
[00:38:48] Ox0dea: bricker: It didn't work. I'm supposed to type seven asterisks, right?
[00:38:54] [H]unt3r: has joined #ruby
[00:42:18] Xiti: has joined #ruby
[00:44:16] _ixti_: has joined #ruby
[00:45:56] jhass: only if your stuff is ancient, else it's ?????????????????????
[00:46:51] cajone: has joined #ruby
[00:48:29] Ox0dea: TIL getty uses <input type="password" />.
[00:48:45] jhass: html5 is everywhere!
[00:50:00] devdazed: has joined #ruby
[00:51:13] davedev24_: has joined #ruby
[00:52:34] surs1: has joined #ruby
[00:55:28] sdothum: has joined #ruby
[00:56:28] Scripore: has joined #ruby
[00:56:31] dfockler: has joined #ruby
[00:57:01] poguez_: has joined #ruby
[01:02:17] bronson: has joined #ruby
[01:02:56] Rodya_: has joined #ruby
[01:05:15] zacstewart: has joined #ruby
[01:06:12] sharpmachine: has joined #ruby
[01:06:59] ledestin: has joined #ruby
[01:08:00] blue_deref: has joined #ruby
[01:11:28] surs2: has joined #ruby
[01:12:35] Scroff: has joined #ruby
[01:13:12] brain_shim: has joined #ruby
[01:14:17] dgutierrez1287: has joined #ruby
[01:19:04] nathanstitt: has joined #ruby
[01:19:48] loc22: has joined #ruby
[01:21:05] josh: has joined #ruby
[01:22:05] quimrstorres: has joined #ruby
[01:22:20] hotpancakes: has joined #ruby
[01:22:44] matcouto: has joined #ruby
[01:23:21] gnudon: has joined #ruby
[01:25:10] v4n: has joined #ruby
[01:25:15] aaeron: has joined #ruby
[01:26:24] blaines: has joined #ruby
[01:27:42] zacstewart: has joined #ruby
[01:28:03] luckyno7: has joined #ruby
[01:28:27] blaines_: has joined #ruby
[01:28:54] Azulinho: has joined #ruby
[01:30:26] cajone: has left #ruby: ()
[01:31:30] i8igmac: has joined #ruby
[01:33:15] unreal: has joined #ruby
[01:33:45] Guest71946: has joined #ruby
[01:35:19] tkuchiki: has joined #ruby
[01:35:31] T3: has joined #ruby
[01:35:57] eggoez: has joined #ruby
[01:38:06] prestorium: has joined #ruby
[01:40:21] omegahm: has joined #ruby
[01:40:25] quiXotic__: has joined #ruby
[01:41:49] wookiehangover: has joined #ruby
[01:42:17] GnuYawk: has joined #ruby
[01:45:34] surs3: has joined #ruby
[01:47:32] riskish: has joined #ruby
[01:49:50] fabrice31: has joined #ruby
[01:50:16] Hobogrammer_: has joined #ruby
[01:51:02] fgo: has joined #ruby
[01:52:40] bungoman: has joined #ruby
[01:53:37] Guest71946: has joined #ruby
[01:57:35] Musashi007: has joined #ruby
[02:02:21] dgutierrez1287: has joined #ruby
[02:03:14] christia1: has joined #ruby
[02:06:18] towski_: has joined #ruby
[02:06:49] juanpablo_: has joined #ruby
[02:06:57] sharpmachine: has joined #ruby
[02:07:16] rikai: has joined #ruby
[02:07:55] sdothum: has joined #ruby
[02:08:00] PlasmaStar: has joined #ruby
[02:08:58] craysiii: has joined #ruby
[02:09:35] edwardly: has joined #ruby
[02:09:35] edwardly: has joined #ruby
[02:11:05] prestorium: has joined #ruby
[02:11:20] postmodern: is markdown now the defacto markup?
[02:11:30] postmodern: even if you use the rdoc gem for documentation generation?
[02:13:01] ValicekB: has joined #ruby
[02:13:20] Scroff: has joined #ruby
[02:18:56] rudak: has joined #ruby
[02:19:38] Hobogrammer: has joined #ruby
[02:20:21] jbw_: has joined #ruby
[02:20:32] Guest71946: has joined #ruby
[02:20:49] fullofcaffeine: has joined #ruby
[02:20:52] howdoicomputer: has joined #ruby
[02:22:49] hotpancakes: has joined #ruby
[02:22:57] quimrstorres: has joined #ruby
[02:24:11] kiki_lamb: has joined #ruby
[02:24:12] xsdg: has joined #ruby
[02:24:17] TTilus: has joined #ruby
[02:24:19] Jamo_: has joined #ruby
[02:25:08] zata: has joined #ruby
[02:25:51] arescorpio: has joined #ruby
[02:28:20] aef: has joined #ruby
[02:29:42] zenguy_pc: has joined #ruby
[02:30:54] j_mcnally: has joined #ruby
[02:31:35] j_mcnally: has joined #ruby
[02:32:21] RegulationD: has joined #ruby
[02:35:31] radialneon: has joined #ruby
[02:37:13] bruno-: has joined #ruby
[02:39:15] tmtwd: has joined #ruby
[02:40:45] dgutierrez1287: has joined #ruby
[02:41:03] iamse7en: has joined #ruby
[02:49:00] surs4: has joined #ruby
[02:49:44] charliesome: has joined #ruby
[02:51:05] quimrstorres: has joined #ruby
[02:51:08] jenrzzz: has joined #ruby
[02:54:29] RandyT: has joined #ruby
[02:55:45] yfeldblum: has joined #ruby
[02:57:01] metalic: has joined #ruby
[02:57:06] surs: has joined #ruby
[02:59:14] mrconfused: has joined #ruby
[03:01:22] lavros: has joined #ruby
[03:02:43] nofxx: postmodern, I think so, long time no see a .rdoc
[03:02:47] [k-: has joined #ruby
[03:05:07] rbowlby: has joined #ruby
[03:06:15] surs1: has joined #ruby
[03:07:38] juanpablo_: has joined #ruby
[03:07:42] tkuchiki: has joined #ruby
[03:07:45] sharpmachine: has joined #ruby
[03:08:29] casadei_: has joined #ruby
[03:15:00] braincrash: has joined #ruby
[03:16:37] [k-: mwahahahaha
[03:16:39] [k-: http://pastie.org/private/fip4tgukwwln5mp5qkrvg
[03:19:48] [k-: I should grep the logs for <Ox0dea> >>
[03:19:54] christiandsg: has joined #ruby
[03:22:18] T3: has joined #ruby
[03:22:39] hotpancakes: has joined #ruby
[03:23:53] Ox0dea: [k-: Having them all in close proximity like that makes me look like a total nutter. :P
[03:25:19] [k-: hue hue hue
[03:25:33] [k-: I should write a script for this
[03:25:49] Ox0dea: ACTION is currently trying to figure out a symbols-only encoding of the Latin alphabet that doesn't break during regex interpolation.
[03:26:09] Ox0dea: 14 of the 29 ASCII symbols have meaning in regular expressions. :/
[03:26:16] fallen_: has joined #ruby
[03:26:42] junies: has joined #ruby
[03:26:54] junies: is it possible to make a pokemon game in ruby?
[03:26:59] Ox0dea: junies: Of course.
[03:27:02] jbw_: has joined #ruby
[03:27:15] junies: what would it require Ox0dea
[03:27:17] Azulinho: has joined #ruby
[03:27:19] Ox0dea: Many things.
[03:27:49] [k-: wise words, wise words
[03:28:13] Ox0dea: junies: A comprehensive data source, a thoroughly contemplated object hierarchy, all the various formulae, and lots of special-casing for special moves and such.
[03:28:35] icebourg: has joined #ruby
[03:29:15] howdoicomputer: has joined #ruby
[03:30:12] pengin: has joined #ruby
[03:30:26] darkf: has joined #ruby
[03:30:50] [k-: wait a minute... you are trying to encode alphabets in symbols?!
[03:31:09] Ox0dea: Just the Latin one.
[03:31:22] tkuchiki: has joined #ruby
[03:31:37] Ox0dea: And just lowercased letters, which I realize are technically "symbols", but I trust you catch my meaning.
[03:32:42] [k-: common letters should be given one letter symbols like utf-8 does!
[03:33:07] [k-: or is that utf-7
[03:33:57] Ox0dea: Well, I'd of course like to be able to just use one symbol for each letter, but then I won't be able to use the String =~ Regex trick to obtain the index into the alphabet.
[03:34:01] RegulationD: has joined #ruby
[03:34:08] Ox0dea: I'll have to loop for every character of every string. :/
[03:34:15] sharpmachine: has joined #ruby
[03:35:24] eggoez: has joined #ruby
[03:35:39] [k-: you mean ?a =~ %r{,} == 0?
[03:35:56] chipotle: has joined #ruby
[03:36:08] ChanServ: -b WhiteAssCrackers!*@*
[03:36:41] i8igmac: https://eval.in/396454
[03:36:50] mike___1234: has joined #ruby
[03:37:06] i8igmac: im trying to setup a function for opening a url and handle all possible errors
[03:37:12] zata: has joined #ruby
[03:37:15] Ox0dea: i8igmac: Do you have nokogiri installed?
[03:37:31] i8igmac: well, if i remove that for the paste
[03:37:42] Ox0dea: Wait, what?
[03:37:52] i8igmac: https://eval.in/396455
[03:37:55] gix: has joined #ruby
[03:38:05] i8igmac: without nokogiri, looks like eval.in dont have nokogiri
[03:38:08] chipotle: i just got out of a 300mg k hole
[03:38:11] chipotle: oops, wrong channel
[03:38:37] i8igmac: so, ever once in a while i run into some errors that crash the script
[03:38:44] i8igmac: due to the connection
[03:38:57] i8igmac: in `read_nonblock': end of file reached (EOFError)
[03:39:16] Musashi007: has joined #ruby
[03:39:25] i8igmac: i hope to cover all errors that you could experience from a http connection
[03:41:00] xcesariox: has joined #ruby
[03:41:32] i8igmac: well, eval.in dont allow sockets
[03:41:38] jbw_: has joined #ruby
[03:42:02] Ox0dea: i8igmac: It's clear enough what you're trying to do, though.
[03:42:16] Ox0dea: But why do you want to do it manually rather than let the abstraction do what it's meant to?
[03:42:31] i8igmac: what do you mean
[03:44:13] Ox0dea: Well, HTTPError is there to catch the various non-200 response codes, and you're handling timeout and connection reset. Besides losing the connection (the cause of your EOFError, likely as not), what all do you feel you're missing?
[03:44:59] arashb: has joined #ruby
[03:45:04] Ox0dea: >> 'abc'['@#:' =~ /#/]
[03:45:05] ruboto: Ox0dea # => "b" (https://eval.in/396458)
[03:45:07] Ox0dea: [k-: More like that.
[03:47:14] Ox0dea: All of these have special meaning inside a regular expression: !$&()*+-./?[\]^
[03:47:40] i8igmac: i was just looking for a cover all connection type error handling.
[03:48:01] i8igmac: if my wifi connection goes out, for example will encounter a connection error
[03:48:04] [k-: ^ and $ only needs to be not in certain special cases
[03:48:38] Ox0dea: i8igmac: You'd probably bump into the timeout error in that case.
[03:48:51] i8igmac: so i have that one covered ,-)
[03:48:52] Ox0dea: [k-: Right, but I'd be matching against *just* the character in order to obtain its index.
[03:49:02] [k-: you forgot | <> "'
[03:49:07] _blizzy_: has joined #ruby
[03:49:07] hotpancakes: has joined #ruby
[03:49:14] i8igmac: Ox0dea: so there are more errors i have to cover with this weak wifi signal
[03:49:19] i8igmac: more are to be found
[03:49:42] sharpmachine: has joined #ruby
[03:49:45] i8igmac: the script crashing, is just lame
[03:49:57] i8igmac: i hope to retry ten times on all errors
[03:50:01] Ox0dea: i8igmac: Some programming environments don't think so.
[03:50:26] Ox0dea: It's quite common in some circles to let children die with reckless abandon, only to immediately reincarnate them.
[03:50:36] Ox0dea: It's quite strange, but it's just the right approach for some situations.
[03:50:40] fabrice31: has joined #ruby
[03:50:59] [k-: shevy! he spoke in Oracle!
[03:51:28] i8igmac: you guys are to smart
[03:51:29] v4n: has joined #ruby
[03:51:42] [k-: ACTION sends a pm to shevy
[03:51:46] Ox0dea: i8igmac: Still, I suspect you want $thing to loop indefinitely, so catching all the reasonable errors makes sense.
[03:51:49] quimrstorres: has joined #ruby
[03:51:54] [k-: [01:29:56] <ruboto> Ox0dea # => 2015-07-10 17:30:01 +0000 (https://eval.in/396404)
[03:51:54] [k-: [01:32:53] <Ox0dea> >> _=$$/$$;[*?`...?{][_..-_]*''
[03:51:54] [k-: [01:32:54] <ruboto> Ox0dea # => "abcdefghijklmnopqrstuvwxyz" (https://eval.in/396407)
[03:51:54] [k-: <Ox0dea> >> $_=$$/$$;@_=->_,__{_==[]?[]:[__[_[$_-$_]]]+@_[_[$_..-$_],__]}; foo = [1, 2, 3]; @_[foo, -> x { x + 1 }]
[03:51:55] [k-: [01:05:56] <ruboto> Ox0dea # => [2, 3, 4] (https://eval.in/396394)
[03:51:55] [k-: [01:06:03] <Ox0dea> @_ is MAP there.
[03:51:56] [k-: [02:02:37] <Ox0dea> >> ?????:?:
[03:51:56] [k-: [02:02:38] <ruboto> Ox0dea # => /tmp/execpad-8e19d5c57214/source-8e19d5c57214:2: warning: string literal in condition ...check link for more (https://eval.in/396413)
[03:51:57] [k-: <Mon_Ouie> >> get_block = ->(&b) { b }; send = get_block[&:"send"]; send[:anything, "rand"]
[03:51:57] [k-: [01:07:55] <ruboto> Mon_Ouie # => 0.9301043372750087 (https://eval.in/396396)
[03:51:58] [k-: <Ox0dea> >>??_=$$/$$;__=_-_;@_=_+_;$_=@_+_;$__=@_+$_;$-_=$__*$_;@__=''<<$-_*($__+$_)+@_;$___=''<<$-_*$__-$__<<$-_*($__+@_)<<@__<<@__;@___=''<<$-_*$__-$_*$_<<$-_*($__+$_)-$_<<@__<<@__;(___=->____{$.+=_;____<<($.%$-_==__???$___+@___:$.%$_==__ ?$___:$.%$__==__ ?@___:$.);$.<($__*@_)**@_?___[____]:____})[[]]??
[03:51:58] [k-: 16:44??<ruboto> Ox0dea # => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz", 16, 17, "Fiz ...check link for more (https://eval.in/396389)
[03:52:02] Ox0dea: Honestly.
[03:52:24] [k-: I had the wrong thing in my clipboard
[03:52:38] i8igmac: so, i just hit another error, => `rescue in rbuf_fill': Timeout::Error (Timeout::Error)
[03:52:57] Ox0dea: i8igmac: Right, you should be rescuing that error, nor TimeoutError.
[03:53:02] i8igmac: script crashed, i thought i had timeout covered
[03:54:23] i8igmac: rescue Timeout::Error
[03:54:28] [k-: ACTION makes a note to self: /msg only covers you for 1 line
[03:54:39] Ox0dea: i8igmac: Yeah, that's weird.
[03:54:49] Ox0dea: You must have a really spotty connection. :/
[03:55:07] i8igmac: lol, ah i guess i should fix it
[03:55:07] [k-: Timeout is regarded as broken!
[03:55:12] Ox0dea: It's really not great.
[03:55:26] idiocrash: has joined #ruby
[03:55:31] i8igmac: my connection is about 100 feet away
[03:55:47] [k-: it uses Threads to raise errors
[03:55:48] i8igmac: long range repeater
[03:55:55] [k-: so it sleeps in the other thread
[03:56:06] [k-: and when it wakes up, it raises an error
[03:56:29] [k-: so it can give you random errors at times
[03:57:03] Ox0dea: i8igmac: Windows?
[03:57:17] Ox0dea: You could do `while :; do ruby foo.rb; done`. :P
[03:57:33] Ox0dea: Just don't catch the errors and let your script start over. :P
[03:57:34] i8igmac: correction, my wireless connection is 1000 feet away
[03:57:39] Ox0dea: But don't actually do that.
[03:57:53] i8igmac: ah, i used to do everything this way
[03:57:59] i8igmac: its so ugly
[03:58:04] willywos: has joined #ruby
[03:58:13] Ox0dea: And almost useless if you're maintaining any sort of state.
[03:58:14] i8igmac: zero error handling, just start the script over
[03:58:31] _blizzy_: has joined #ruby
[03:58:42] Ox0dea: [k-: Your IRC client should protect you from spewing.
[03:58:58] i8igmac: im trying to learn error handling, before i get so far ahead
[03:59:00] [k-: my irc client is android
[03:59:23] Ox0dea: i8igmac: The timeout library has great potential to sour that experience considerably.
[03:59:24] i8igmac: error handling procrastinating
[04:00:28] i8igmac: i used to write my scripts, log everything... when a error was found to crash the script
[04:01:01] i8igmac: i would while `system('ruby script.rb STRING'); end
[04:01:20] Ox0dea: Catching and handling exceptions is obviously a good thing, but Timeout has ways of subverting your good intentions.
[04:01:28] i8igmac: with out running the script with string, the script would start off from its default state
[04:01:57] lessless: has joined #ruby
[04:03:36] i8igmac: ill have to climb into my attic space and reconfigure my wireless repeater
[04:05:37] zacstewart: has joined #ruby
[04:11:30] mary5030: has joined #ruby
[04:12:00] startupality: has joined #ruby
[04:12:19] Scroff: has joined #ruby
[04:17:29] sevenseacat: has joined #ruby
[04:23:06] Maletor: has joined #ruby
[04:24:33] casadei_: has joined #ruby
[04:26:09] luriv_: has joined #ruby
[04:27:14] radialneon: has joined #ruby
[04:30:12] radialneon_: has joined #ruby
[04:31:30] MEATCHICKEN: has joined #ruby
[04:33:43] tkuchiki: has joined #ruby
[04:34:55] hmnhf: has joined #ruby
[04:37:13] baweaver_: has joined #ruby
[04:39:12] surs2: has joined #ruby
[04:41:15] Fezzler: has joined #ruby
[04:42:02] neanderslob_: has joined #ruby
[04:43:20] baweaver: has joined #ruby
[04:43:26] mrconfused: has joined #ruby
[04:51:03] skade: has joined #ruby
[04:52:29] v4n: has joined #ruby
[04:52:38] quimrstorres: has joined #ruby
[04:56:23] juanpablo_: has joined #ruby
[04:57:31] Ox0dea: >> $_=$$/$$;@_=->_{_==''?_:[*?`..?{]['. !#% & , :;<= >@_ `'=~/#{_[$.]}/]+@_[_[$_..-$_]]};_=->&_{_}[&:"#{@_['@%<#']}"];_[_[_[_['',@_['!: @@']],@_[' <!%@_=>@']][-$_-$_],@_['!=<@_']+?_+@_['&%_'],(''<<(_=$_+$_)**_**(_+$_)/(_+$_)-$_)+@_[',;%']],@_['<%`']]
[04:57:32] ruboto: Ox0dea # => 2015-07-11 04:57:31 +0000 (https://eval.in/396475)
[04:57:50] Ox0dea: baweaver: I almost wish I were the one tasked with Muggling this thing.
[05:00:28] chinmay_dd: has joined #ruby
[05:00:30] Ox0dea: It totally invokes Time.new.
[05:00:42] surs3: has joined #ruby
[05:00:54] baweaver: Just a sec, finishing up practicing on a guitar solo.
[05:00:56] idiocrash: has joined #ruby
[05:01:14] baweaver: Mr Crowley, old school Ozzy \o/
[05:01:54] baweaver: that solo is going to take me a month though...
[05:02:18] hotpancakes: has joined #ruby
[05:03:50] bronson: has joined #ruby
[05:06:51] zacstewart: has joined #ruby
[05:07:27] T3: has joined #ruby
[05:09:06] baweaver: though either way that one would take a while
[05:09:17] [k-: you are totally doing the index thing!
[05:09:28] Ox0dea: [k-: But only because I get to use a limited alphabet.
[05:09:34] Ox0dea: I'd like to be able to generalize it.
[05:09:43] hotpancakes: has joined #ruby
[05:11:29] baweaver: How are you setting last line of STDIN I wonder... poke poke poke
[05:11:46] Ox0dea: baweaver: How do you mean?
[05:11:54] baweaver: thinking out loud
[05:12:02] baweaver: $_ is used a lot
[05:12:03] Ox0dea: I'm not touching stdin, though?
[05:12:17] baweaver: it's set to one
[05:12:21] baweaver: ignore that
[05:12:24] Ox0dea: I've repurposed $_ to be my 1 for every single one of these. :P
[05:12:43] [k-: following, Ox0dea's convention, me too
[05:13:06] Ox0dea: Well, I've used _ a few times if I only needed 1 at the top level to build other things, but it's pervasive in this one.
[05:13:43] Ox0dea: baweaver: [k- made non-alphanumeric Infinity the other day.
[05:14:00] Ox0dea: With just twenty dollars, no less!
[05:14:06] revath: has joined #ruby
[05:14:20] riotjones: has joined #ruby
[05:14:25] baweaver: >> _=$$/$$;_/(_-_)
[05:14:26] ruboto: baweaver # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/396478)
[05:14:42] baweaver: hm, doesn't work that way in ruby does it
[05:14:50] baweaver: only floats
[05:15:46] Ox0dea: We can has non-alphanumeric Floats, of course.
[05:16:02] mary5030: has joined #ruby
[05:16:43] [k-: mine was longer tho
[05:16:48] Ox0dea: Only just.
[05:17:31] [k-: I took the rational path
[05:18:00] Ox0dea: Well, as did I, but only because 2 ** -1 forced me to.
[05:18:39] [k-: I forgot what we both did
[05:18:45] [k-: my memory is really bad
[05:18:49] [k-: I should sleep more
[05:19:01] Ox0dea: >> [($_=$$/$$;$__=$_+$_;_=$_/$__;__=$__**($_-$__);_=_**(__**__);$_/_), (_=$$/$$;_=(_+_)**(_+_)**-_;_/(_-_))]
[05:19:02] ruboto: Ox0dea # => [Infinity, Infinity] (https://eval.in/396482)
[05:19:36] revath1: has joined #ruby
[05:19:52] [k-: the first one is mine!
[05:20:42] chouhoulis: has joined #ruby
[05:20:42] Ox0dea: Mine has butts in.
[05:22:28] Ox0dea: baweaver: Any idea what the hell `_[_[_[_[` is yet? :)
[05:22:32] dseitz: has joined #ruby
[05:22:34] RegulationD: has joined #ruby
[05:22:57] baweaver: I derived that you have a T in there and the rest of the lower case alphabet
[05:23:03] Ox0dea: Aye, that feckin' T.
[05:23:16] baweaver: and somehow you're using special characters as an index retrieval for letters
[05:23:28] baweaver: that I bet spells out the rest of ime.now or something like it
[05:23:57] sdothum: has joined #ruby
[05:24:12] Ox0dea: Well, that's the overarching idea, more or less, but the actual mechanism of invocation is quite interesting.
[05:24:33] Ox0dea: I could've just used invoked `eval`, but that'd be lame.
[05:25:25] baweaver: give me a bit, translating all occurrences of @_ function
[05:25:39] GitGud: has joined #ruby
[05:26:37] Ox0dea: Mon_Ouie simultaneously spoiled and rekindled my fun in the same breath earlier, but revealing quite how would be a spoiler just yet.
[05:27:23] baweaver: ["c", "l", "a", "s", "s"]
[05:27:26] baweaver: working on the others
[05:27:48] baweaver: symbol to proc up there.
[05:27:53] Ropeney: has joined #ruby
[05:28:24] Ox0dea: Nice! Hot on the trail.
[05:28:25] lxsameer: has joined #ruby
[05:29:13] baweaver: ah that'll be fun
[05:29:36] simplyianm: has joined #ruby
[05:30:04] KrzaQ: has joined #ruby
[05:30:18] simplyianm: has joined #ruby
[05:30:21] Ox0dea: Oh, come on! It's basically Scala. :P
[05:30:24] baweaver: >> self.send('class')
[05:30:25] ruboto: baweaver # => Object (https://eval.in/396493)
[05:30:26] symm-: has joined #ruby
[05:30:42] xcesariox: has joined #ruby
[05:31:26] emdub: has joined #ruby
[05:31:43] baweaver: >> self.send('', 'class')
[05:31:44] ruboto: baweaver # => undefined method `' for main:Object (NoMethodError) ...check link for more (https://eval.in/396495)
[05:31:49] Ox0dea: baweaver: Other way.
[05:31:57] Ox0dea: You'll need to channel your inner John McCarthy for this one.
[05:32:36] DoubleMalt: has joined #ruby
[05:32:36] baweaver: >> self.send('Time.now')
[05:32:37] ruboto: baweaver # => undefined method `Time.now' for main:Object (NoMethodError) ...check link for more (https://eval.in/396496)
[05:33:10] baweaver: I get the gist at least that somehow you're sending kernel or something upper level Time
[05:35:19] Ox0dea: Shall I reveal the "sane" version?
[05:36:19] baweaver: const_get(Time)
[05:36:36] Ox0dea: Excellent. :)
[05:36:46] Ox0dea: I mean, you're pretty much there.
[05:37:17] baweaver: It's probably something like kernel_send(const_get(Time), 'now')
[05:37:53] baweaver: translating the rest of it.
[05:38:01] Scripore: has joined #ruby
[05:38:12] baweaver: New eh? I guess Time.new works too
[05:38:15] towski_: has joined #ruby
[05:38:16] baweaver: >> Time.new
[05:38:17] ruboto: baweaver # => 2015-07-11 05:38:16 +0000 (https://eval.in/396501)
[05:38:24] Ox0dea: They're synonyous.
[05:39:32] Ox0dea: Being able to #send means it's mostly trivial to convert any Ruby program to non-alphanumerics. ^_^
[05:39:53] Ox0dea: So many underscores, though! :/ If I end up doing a translator, I'll probably just use the Greek alphabet.
[05:40:12] Ox0dea: That puts a hard limit of 48 on local variables, but it should do.
[05:40:14] baweaver: String ancestors
[05:40:26] baweaver: Kernel, huh
[05:40:46] [k-: Ox0dea I got NaN ;)
[05:40:49] [k-: https://eval.in/396505
[05:40:58] Ox0dea: >> Object.include?(Kernel)
[05:40:59] ruboto: Ox0dea # => true (https://eval.in/396506)
[05:41:36] Ox0dea: [k-: That's, like, SuperNaN.
[05:43:08] Ox0dea: >> _=$$/$$;_=(_+_)**(_+_)**-_;(_-_)/(_-_)
[05:43:09] ruboto: Ox0dea # => NaN (https://eval.in/396508)
[05:43:33] Ox0dea: It's approximately 53% butts.
[05:43:58] sevenseacat: >> $$/($$-$$)
[05:43:59] ruboto: sevenseacat # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/396509)
[05:44:14] Ox0dea: DBZ error is best error.
[05:44:16] sevenseacat: and I'm done.
[05:44:26] baweaver: https://gist.github.com/baweaver/ecc68d8588f906b4df54
[05:44:44] symm-: has joined #ruby
[05:45:11] baweaver: though @_ returns a string
[05:45:33] idiocrash: has joined #ruby
[05:45:35] [k-: turrdurrr I changed the - to + to get NaN https://eval.in/396510
[05:46:14] Ox0dea: baweaver: Almost.
[05:46:30] Ox0dea: send[foo, bar] is actually foo.send(bar).
[05:46:50] baweaver: forgot to correct that
[05:46:58] baweaver: I'd figured that out after poking it a bit.
[05:47:01] Ox0dea: But yeah, yer a wizard.
[05:47:56] Ox0dea: >> $_=$$/$$;@_=->_{_==''?_:[*?`...?{][' !# % & ,:;<>'=~/#{_[$.]}/]+@_[_[$_..-$_]]};->&_{_}[&:"#{@_[';#&!']}"]['',@_[':#,>%:#'],@_[';#<']]; Set
[05:47:57] ruboto: Ox0dea # => Set (https://eval.in/396513)
[05:48:21] baweaver: Set on the end there.
[05:48:29] Ox0dea: For demonstration porpoises.
[05:48:44] atesec: whatcha doin
[05:48:47] Ox0dea: It's just meant to show that the principle can easily be applied to bring in dependencies.
[05:48:57] Ox0dea: atesec: We're making Ruby do very naughty things.
[05:49:07] atesec: looks neat
[05:49:12] Ox0dea: Glad you think so.
[05:49:28] baweaver: warning kids, don't try what you're seeing at home
[05:49:32] atesec: ive been reading for awhile but you guys are way outta my league so im just soaking up knowledge :P
[05:49:36] baweaver: or for gods sakes, in production
[05:49:39] sevenseacat: Ox0dea: is the king of making Ruby do very naughty things
[05:49:52] sevenseacat: atesec: its all crazy to me too, I'm just watching :) here, have some popcorn
[05:49:59] Ox0dea: atesec: Familiar with FizzBuzz?
[05:50:05] atesec: thanks! i forgot popcorn
[05:50:10] kies^: has joined #ruby
[05:50:38] atesec: nope but im googling it now Ox0dea
[05:50:39] [k-: ah 0.0/0.0 is NaN and 1/0.0 is infinity
[05:50:47] Ox0dea: [k-: Because math says so.
[05:50:50] xkef: has joined #ruby
[05:50:56] sevenseacat: dammit thats where i stuffed up in my NaN
[05:51:11] baweaver: >> _=$$/$$;__=_-_;@_=_+_;$_=@_+_;$__=@_+$_;$-_=$__*$_;@__=''<<$-_*($__+$_)+@_;$___=''<<$-_*$__-$__<<$-_*($__+@_)<<@__<<@__;@___=''<<$-_*$__-$_*$_<<$-_*($__+$_)-$_<<@__<<@__;(___=->____{$.+=_;____<<($.%$-_==__ ?$___+@___:$.%$_==__ ?$___:$.%$__==__ ?@___:$.);$.<($__*@_)**@_?___[____]:____})[[]]
[05:51:12] ruboto: baweaver # => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz", 16, 17, "Fiz ...check link for more (https://eval.in/396517)
[05:51:13] sevenseacat: >> ($$-$$)/($$-$$)
[05:51:14] ruboto: sevenseacat # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/396518)
[05:51:22] baweaver: float, love
[05:51:27] fabrice31: has joined #ruby
[05:51:28] [k-: not so easy!
[05:52:07] sevenseacat: oh man, I so want someone to use that in a programming interview
[05:52:33] baweaver: sevenseacat: I might have done that once after seeing that gem
[05:52:40] [k-: >> class Fixnum; def / other; self.to_f / other.to_f end end; ($$/$$-$$)
[05:52:41] ruboto: [k- # => -19064.0 (https://eval.in/396519)
[05:52:55] baweaver: Someone said programmers can't fizzbuzz
[05:53:01] baweaver: So I said watch and learn
[05:53:10] baweaver: and proceeded to horrify their junior selves
[05:53:18] quimrstorres: has joined #ruby
[05:53:44] Ox0dea: [k-: You forgot the other OOP.
[05:54:12] baweaver: order of operations
[05:54:20] [k-: ohhhhhh
[05:54:29] [k-: try dat
[05:54:39] Ox0dea: But hey, at least we know you got PID 19065.
[05:54:41] baweaver: Do your parens know you've failed math?
[05:55:01] Alina-malina: has joined #ruby
[05:55:04] baweaver: ACTION bows
[05:55:43] Ox0dea: [k-: And now we know you always use infix operators in your Haskell code.
[05:56:29] baweaver: Ox0dea: took a bit longer than normal. Someone was celebrating today, brought in a bottle of Johnny Blue
[05:56:35] Ox0dea: Om nom nom.
[05:56:38] baweaver: still recovering a bit
[05:56:51] Ox0dea: Color me doubly impressed, then.
[05:57:20] Ox0dea: I do genuinely wanna Muggle something, though.
[05:57:48] baweaver: Ox0dea: I came up with and implemented a good portion of Clairvoyant while tipsy.
[05:57:48] Ox0dea: I wonder if that Malbolge beam search could be repurposed to generate these.
[05:58:03] Ox0dea: The Ballmer peak is real.
[05:58:15] [k-: oh gosh malbolge
[05:58:27] [k-: yes I use infix
[05:58:30] Ox0dea: I think it's a fascinating language.
[05:58:43] Ox0dea: You have to actively fight the damned thing after every instruction executes.
[05:59:58] baweaver: Dante would be proud
[06:00:08] baweaver: speaking of which, DMC4 was rereleased on PS4
[06:00:11] zacstewart: has joined #ruby
[06:00:33] baweaver: You all should buy one if you haven't yet </shameless-plug>
[06:00:40] arashb: has joined #ruby
[06:01:07] Ox0dea: That guy has never failed to remind me of Sephiroth.
[06:01:09] revath: has joined #ruby
[06:01:27] baweaver: Speaking of which
[06:01:31] baweaver: FF7 remake <3
[06:01:50] baweaver: comes out on PS4 first </shameless-hint>
[06:04:35] hotpancakes: has joined #ruby
[06:05:07] zacstewa_: has joined #ruby
[06:06:15] [k-: <shameless-hint text="comes out on PS4 first" />
[06:06:40] olistik: has joined #ruby
[06:08:08] [k-: http://iorcc.blogspot.sg/?m=1
[06:08:45] dellavg: has joined #ruby
[06:08:46] T3: has joined #ruby
[06:08:51] Scroff: has joined #ruby
[06:08:55] sevenseacat: plug, plug, plug
[06:09:52] Ox0dea: > obfuscated Ruby 2005 0x5adface
[06:10:24] baweaver: buy, buy, buy
[06:10:53] baweaver: Honestly though my income is more affected by me convincing people to join
[06:11:12] rbowlby: has joined #ruby
[06:12:13] Ox0dea: That's not to imply that membership is more profitable than game sales, of course.
[06:12:37] rbowlby_: has joined #ruby
[06:12:44] baweaver: nope, just that my bottom line is more affected by recruiting other people than by convincing a few to buy a PS4.
[06:13:09] casadei_: has joined #ruby
[06:13:33] mary5030: has joined #ruby
[06:13:50] sevenseacat: we'll get a PS4 one day
[06:15:31] baweaver: Just recently got one myself honestly
[06:15:39] baweaver: I'm a Nintendo fanboy at heart
[06:16:18] sevenseacat: lot of good games coming out for PS4 later this year/early next year. will get one then.
[06:20:51] hmnhf_: has joined #ruby
[06:21:46] Zai00: has joined #ruby
[06:22:29] acke_: has joined #ruby
[06:23:31] surs3: has joined #ruby
[06:25:28] krz: has joined #ruby
[06:25:38] acke_: has joined #ruby
[06:26:50] bodgix_wrk: has joined #ruby
[06:28:13] djbkd: has joined #ruby
[06:29:30] ndrei: has joined #ruby
[06:30:59] rbowlby: has joined #ruby
[06:31:13] re9ulus: has joined #ruby
[06:32:03] sharpmachine: has joined #ruby
[06:32:29] rippa: has joined #ruby
[06:32:44] jenrzzz: has joined #ruby
[06:34:58] ips|malc: has joined #ruby
[06:35:54] surs4: has joined #ruby
[06:36:30] bricker: has joined #ruby
[06:38:01] solars: has joined #ruby
[06:38:15] peter_paule: has joined #ruby
[06:39:46] hmnhf__: has joined #ruby
[06:42:44] SylarRuby: has joined #ruby
[06:45:36] Pupeno: has joined #ruby
[06:45:44] juanpablo_: has joined #ruby
[06:50:28] Mia: has joined #ruby
[06:51:49] jenrzzz: has joined #ruby
[06:52:34] Rollabunna: has joined #ruby
[06:53:08] rht: has joined #ruby
[06:54:08] quimrstorres: has joined #ruby
[06:54:57] idiocrash: has joined #ruby
[06:55:16] zacstewart: has joined #ruby
[06:55:39] T3: has joined #ruby
[06:57:08] tkuchiki: has joined #ruby
[07:00:54] riotjones: has joined #ruby
[07:01:42] farn: has joined #ruby
[07:03:19] djbkd: has joined #ruby
[07:04:15] gard: has joined #ruby
[07:05:12] Zai00: has joined #ruby
[07:06:30] Sehryn: has joined #ruby
[07:06:35] acke: has joined #ruby
[07:07:30] Spami: has joined #ruby
[07:08:14] kies^: has joined #ruby
[07:08:30] asif: has joined #ruby
[07:08:45] asif: has left #ruby: ()
[07:10:19] hotpancakes: has joined #ruby
[07:11:30] jamesaxl: has joined #ruby
[07:14:35] Ilyas: has joined #ruby
[07:20:49] acke: has joined #ruby
[07:22:17] Rollabunna: has joined #ruby
[07:24:35] Scroff: has joined #ruby
[07:26:43] MagePsycho: has joined #ruby
[07:28:44] T3: has joined #ruby
[07:29:02] hahuang61: has joined #ruby
[07:29:35] bodgix_wrk: has joined #ruby
[07:32:01] Zai00: has joined #ruby
[07:33:12] sharpmachine: has joined #ruby
[07:33:44] Scroff: has joined #ruby
[07:35:07] xkef: has joined #ruby
[07:36:53] monod: has joined #ruby
[07:37:59] Soda: has joined #ruby
[07:39:26] xkef: has joined #ruby
[07:40:26] CloCkWeRX: has joined #ruby
[07:40:51] zacstewart: has joined #ruby
[07:41:33] Rollabunna: has joined #ruby
[07:41:47] farn: has joined #ruby
[07:42:51] surs4: has joined #ruby
[07:43:03] zacstewart: has joined #ruby
[07:45:45] dgutierrez1287: has joined #ruby
[07:46:20] endash: has joined #ruby
[07:52:15] fabrice31: has joined #ruby
[07:52:33] chinmay_dd: has joined #ruby
[07:53:27] robbyoconnor: has joined #ruby
[07:54:51] quimrstorres: has joined #ruby
[07:56:04] gthank: has joined #ruby
[07:56:04] gthank: has joined #ruby
[07:56:39] farn: has joined #ruby
[07:56:51] r0bby_: has joined #ruby
[07:57:08] surs: has joined #ruby
[07:59:38] eGGsha: has joined #ruby
[08:01:13] arup_r: has joined #ruby
[08:01:27] ych_: has joined #ruby
[08:03:07] ohaibbq: has joined #ruby
[08:03:30] [k-: has joined #ruby
[08:03:35] Musashi007: has joined #ruby
[08:04:13] timonv: has joined #ruby
[08:05:03] evanjs: has joined #ruby
[08:08:44] hotpancakes: has joined #ruby
[08:11:50] allomov: has joined #ruby
[08:11:51] krz: has joined #ruby
[08:12:13] suffice: has joined #ruby
[08:12:17] RegulationD: has joined #ruby
[08:16:07] mercwithamouth: has joined #ruby
[08:16:51] mike___1234: has joined #ruby
[08:19:46] xkef: has joined #ruby
[08:20:58] yfeldblum: has joined #ruby
[08:22:30] yfeldblum: has joined #ruby
[08:25:12] lkba_: has joined #ruby
[08:27:27] zacstewart: has joined #ruby
[08:29:30] Frem: has joined #ruby
[08:33:10] roolo: has joined #ruby
[08:33:51] juanpablo_: has joined #ruby
[08:34:15] fgo: has joined #ruby
[08:34:23] sharpmachine: has joined #ruby
[08:36:42] timonv: has joined #ruby
[08:41:46] ytti: has joined #ruby
[08:44:17] [k-: has joined #ruby
[08:45:14] arquebus: has joined #ruby
[08:46:58] shevy: oh damn, you are a game cat
[08:49:04] kies^: has joined #ruby
[08:49:06] Jackneill: has joined #ruby
[08:49:59] _blizzy_: has joined #ruby
[08:55:35] quimrstorres: has joined #ruby
[08:56:06] i8igmac: has joined #ruby
[08:56:32] kedibasi: has joined #ruby
[08:57:16] cscheib: has joined #ruby
[09:00:45] bashusr: has joined #ruby
[09:04:40] DoubleMalt: has joined #ruby
[09:05:26] bronson: has joined #ruby
[09:07:16] bricker: has joined #ruby
[09:08:49] olistik: has joined #ruby
[09:09:20] fullofcaffeine: has joined #ruby
[09:09:57] zacstewart: has joined #ruby
[09:10:11] hotpancakes: has joined #ruby
[09:10:24] atesec: has joined #ruby
[09:16:29] bricker: has joined #ruby
[09:17:26] El3ktra: has joined #ruby
[09:21:45] n008f4g_: has joined #ruby
[09:24:05] MarkTurner: has joined #ruby
[09:25:43] bricker: has joined #ruby
[09:26:42] bodgix_wrk: has joined #ruby
[09:27:38] NeverDie: has joined #ruby
[09:32:10] hanyn: has joined #ruby
[09:33:12] hanine: has joined #ruby
[09:33:20] tacotaco_: has joined #ruby
[09:35:00] bricker: has joined #ruby
[09:35:15] sharpmachine: has joined #ruby
[09:36:44] surs1: has joined #ruby
[09:37:11] olistik: has joined #ruby
[09:38:21] arashb: has joined #ruby
[09:43:19] jenrzzz: has joined #ruby
[09:44:05] sdothum: has joined #ruby
[09:44:38] psye: has joined #ruby
[09:45:21] tomphp: has joined #ruby
[09:45:53] JMoir: has joined #ruby
[09:47:33] whiteline: has joined #ruby
[09:47:47] JMoir: Hey, for some reason this code won't add anything to the database. When it is ran nothing happens, the database file sits their empty. https://gist.github.com/jamalmoir/50b46fa2fd19bfb566d2
[09:48:23] ruby-lang922: has joined #ruby
[09:48:54] Rollabun_: has joined #ruby
[09:52:29] sevenseacat: validation errors?
[09:52:31] spider-mario: has joined #ruby
[09:52:38] sevenseacat: what does User.create return?
[09:53:04] fabrice31: has joined #ruby
[09:54:30] JMoir: I don't get any errors, it just does nothing.
[09:54:34] Rollabunna: has joined #ruby
[09:55:36] sevenseacat: you wouldnt get any, because youre not checking for them
[09:56:49] JMoir: Haha, right. But the database is empty and I'm specifically putting in data that is valid, so there shouldn't be a problem right?
[09:56:53] konsolebox: has joined #ruby
[09:57:13] sevenseacat: check and see? :)
[09:57:28] sevenseacat: what does User.create return?
[09:57:28] ruby-lang922: has left #ruby: ()
[09:57:46] simplyianm: has joined #ruby
[09:58:56] ruby-lang722: has joined #ruby
[09:59:44] FernandoBasso: has joined #ruby
[10:00:18] allcentury: has joined #ruby
[10:00:26] dfockler: has joined #ruby
[10:00:29] eGGsha: has joined #ruby
[10:01:05] gix-: has joined #ruby
[10:01:19] JMoir: Ah, it's setting the id to nil
[10:01:34] zacstewart: has joined #ruby
[10:03:56] JMoir: I thought property :id, Serial is supposed to create an autoincrementing integer, why is it set to nil?
[10:05:53] sevenseacat: do you have any validation errors on the user record?
[10:07:08] JMoir: Ah... The password hash is too long
[10:07:26] JMoir: Haha, thanks xD
[10:07:45] Ropeney: has joined #ruby
[10:09:02] lkba: has joined #ruby
[10:09:53] JMoir: Yup, that was it. All working now :)
[10:11:24] ledestin: I've seen people embed Github code into web pages, but all I can find is gist-it. Those embeds that I've seen were like "hosted with love by Github"
[10:13:16] sevenseacat: ledestin: use the embed URL on a gist?
[10:13:43] ledestin: sevenseacat ah, right, they only do gists :(
[10:15:11] sevenseacat: got an example of what you mean, then?
[10:16:02] MarkTurner: has joined #ruby
[10:16:22] ledestin: sevenseacat gits-it works, I just wanted a beautiful footer http://gist-it.appspot.com/
[10:16:30] sevenseacat: guess that's a no
[10:16:44] ledestin: sevenseacat there's example embedded
[10:17:16] ledestin: those that I mentioned earlier are apparently gists by Github
[10:17:32] sevenseacat: thats why i asked :P
[10:17:45] ledestin: but gists won't do
[10:18:20] melter: has joined #ruby
[10:22:35] juanpablo_: has joined #ruby
[10:24:02] ada2358: has joined #ruby
[10:26:27] Musashi007: has joined #ruby
[10:28:49] surs2: has joined #ruby
[10:31:00] peter_paule: has joined #ruby
[10:32:06] randiman: has joined #ruby
[10:34:23] DLSteve: has joined #ruby
[10:35:15] fantazo: has joined #ruby
[10:36:01] braincra-: has joined #ruby
[10:36:07] sharpmachine: has joined #ruby
[10:36:13] bubbys: has joined #ruby
[10:38:56] omegahm: has joined #ruby
[10:39:01] ht__: has joined #ruby
[10:40:03] quimrstorres: has joined #ruby
[10:40:49] denym_`: has joined #ruby
[10:40:56] Musashi007: has joined #ruby
[10:41:49] denym_`: Hey guys! Is there an escape sequence that also does the auto indentation? Like I have 2 Spaces in front of a text and do a \n at the end that the newline is also already 2 spaces?
[10:42:57] nfk: has joined #ruby
[10:43:24] MarkTurner: has joined #ruby
[10:46:03] jroith: has joined #ruby
[10:47:12] Hanmac: denym_`: it depends what you want to indent ... if its html or xml code you can use nokogiri for indenting
[10:48:23] hotpancakes: has joined #ruby
[10:49:17] jhass: I'd say the answer is no
[10:51:11] surs3: has joined #ruby
[10:52:07] rbowlby: has joined #ruby
[10:52:08] edwinvdgraaf: has joined #ruby
[10:54:00] peter_paule: has joined #ruby
[10:55:31] bruno-: has joined #ruby
[11:03:52] alphaatom: has joined #ruby
[11:06:23] Squarepy: has joined #ruby
[11:06:35] surs4: has joined #ruby
[11:12:49] Stan: has joined #ruby
[11:14:12] mahmoudmahfouz: has joined #ruby
[11:16:40] riotjones: has joined #ruby
[11:16:59] bodgix_wrk: has joined #ruby
[11:17:36] riotjones: has joined #ruby
[11:17:45] jroith: has joined #ruby
[11:19:14] Rollabun_: has joined #ruby
[11:19:49] ips|malc: has joined #ruby
[11:21:56] MagePsycho: here it goes: http://www.blog.magepsycho.com/run-magento-database-repair-tool-from-cli-using-rubys-mechanize/
[11:22:03] MagePsycho: thanks a ton to this channel
[11:22:13] MagePsycho: i was able to run ruby + mechanize
[11:22:21] MarkTurner: has joined #ruby
[11:22:57] bricker: has joined #ruby
[11:28:00] bricker: has joined #ruby
[11:28:30] davedev24_: has joined #ruby
[11:29:26] peter_paule: has joined #ruby
[11:29:37] hotpancakes: has joined #ruby
[11:32:28] quimrstorres: has joined #ruby
[11:33:24] anisha: has joined #ruby
[11:36:17] teoric: has joined #ruby
[11:38:18] mike___1234: has joined #ruby
[11:41:09] eGGsha: has joined #ruby
[11:42:11] leonardoajim: has joined #ruby
[11:42:55] FernandoBasso: has joined #ruby
[11:44:18] Rollabunna: has joined #ruby
[11:46:34] Papierkorb: has joined #ruby
[11:47:25] ndrei: has joined #ruby
[11:50:51] zacstewart: has joined #ruby
[11:51:55] davedev24: has joined #ruby
[11:52:18] zacstewart: has joined #ruby
[11:53:18] wasamasa: I hope that's your blog screwing with indentation and not you
[11:53:53] fabrice31: has joined #ruby
[11:56:51] hakunin: has joined #ruby
[12:03:45] peter_paule: has joined #ruby
[12:04:11] Rollabun_: has joined #ruby
[12:07:18] tomphp: has joined #ruby
[12:09:11] surs: has joined #ruby
[12:09:18] hotpancakes: has joined #ruby
[12:10:25] ips|malc: has joined #ruby
[12:11:16] jimmythehat: has joined #ruby
[12:11:23] juanpablo_: has joined #ruby
[12:15:21] chinmay_dd: has joined #ruby
[12:15:33] hosttor: has joined #ruby
[12:16:31] Timba-as: has joined #ruby
[12:18:09] xlogic: has joined #ruby
[12:20:00] Scripore: has joined #ruby
[12:20:52] prestorium: has joined #ruby
[12:21:28] phutchins2: has joined #ruby
[12:22:46] MagePsycho: has joined #ruby
[12:25:18] serivich: has joined #ruby
[12:26:18] chinmay_dd: has joined #ruby
[12:29:25] _blizzy_: has joined #ruby
[12:29:46] bricker: has joined #ruby
[12:32:50] ndrei: has joined #ruby
[12:33:14] Timba-as: has joined #ruby
[12:36:30] mercwithamouth: has joined #ruby
[12:36:57] simplyianm: has joined #ruby
[12:37:34] sharpmachine: has joined #ruby
[12:37:54] lordkryss: has joined #ruby
[12:39:11] bricker: has joined #ruby
[12:42:48] xkef: has joined #ruby
[12:48:20] Rollabunna: has joined #ruby
[12:48:54] ndrei: has joined #ruby
[12:49:00] freerobby: has joined #ruby
[12:49:31] segfalt: has joined #ruby
[12:49:44] lkba_: has joined #ruby
[12:51:11] n008f4g_: has joined #ruby
[12:51:35] quimrstorres: has joined #ruby
[12:51:46] eGGsha: has joined #ruby
[12:52:40] victortyau: has joined #ruby
[12:53:28] peter_paule: has joined #ruby
[12:54:43] ChanServ: -b diegoviola!*@*
[12:55:39] tomphp: has joined #ruby
[12:56:37] lkba: has joined #ruby
[12:56:40] [k-: has joined #ruby
[12:57:43] surs1: has joined #ruby
[13:03:37] quimrsto_: has joined #ruby
[13:06:24] chouhoulis: has joined #ruby
[13:08:44] hotpancakes: has joined #ruby
[13:10:45] mahmoudmahfouz: has joined #ruby
[13:11:21] kirun: has joined #ruby
[13:14:02] evanjs: has joined #ruby
[13:15:54] arashb: has joined #ruby
[13:15:59] joelataylor: has joined #ruby
[13:16:25] GPrime: has joined #ruby
[13:18:56] devdazed: has joined #ruby
[13:19:19] davedev24_: has joined #ruby
[13:22:22] devdazed: has joined #ruby
[13:22:44] davedev24: has joined #ruby
[13:23:03] zacstewart: has joined #ruby
[13:24:21] surs2: has joined #ruby
[13:24:33] dagda1: has joined #ruby
[13:26:01] bsdbofh: has joined #ruby
[13:28:56] wlknsn: has joined #ruby
[13:29:00] wlknsn: Afternoon guys
[13:29:29] wlknsn: Excited to join my new job on monday doing ruby, I'm being put through a 'Ruby Bootcamp'
[13:29:56] lessless: has joined #ruby
[13:30:15] quimrstorres: has joined #ruby
[13:30:32] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:31:03] wlknsn: apologies
[13:31:26] wlknsn: I meant guys and gals alike, here in England guys when spoken to kinda means both so please excuse my ignorance
[13:31:43] jhass: yeah, it's regionally different
[13:34:34] shevy: you guys rock!
[13:34:44] shevy: it means both things at the same time!!!
[13:35:07] jhass: shevy: if you're bored write some Ruby
[13:35:36] shevy: I am not bored at all, I am excited and happy
[13:35:42] Rutix: has joined #ruby
[13:35:42] Rutix: has joined #ruby
[13:36:40] tmtwd: has joined #ruby
[13:38:19] sharpmachine: has joined #ruby
[13:39:05] alphaatom: has joined #ruby
[13:39:40] shevy: I wonder if Aderium solved his solaris problem
[13:40:02] revath: has joined #ruby
[13:41:02] SCHAAP137: has joined #ruby
[13:42:06] juanpablo_: has joined #ruby
[13:43:05] [k-: Poor shevy
[13:43:52] [k-: Shevy: did you see Ox0dea's oracle talk? :>
[13:43:55] yardenbar: has joined #ruby
[13:44:36] shevy: <Ox0dea> It's quite common in some circles to let children die with reckless abandon, only to immediately reincarnate them.
[13:44:49] shevy: however soon after that you invoked his cthulhu code [k-
[13:45:13] shevy: the oracle was not approving of those many lines from you [k- -> <Ox0dea> Honestly. <-- The Oracle was not happy.
[13:46:02] [k-: Telling you that triggered his unhappiness :(
[13:46:14] [k-: It was an accident!
[13:46:33] shevy: hmm I just stumbled over this code written by someone else: Math::log10
[13:46:42] shevy: that is more commonly written as Math.log10 these days right?
[13:47:23] beef-wellington: has joined #ruby
[13:49:20] Rollabun_: has joined #ruby
[13:49:33] kobain: has joined #ruby
[13:49:59] hotpancakes: has joined #ruby
[13:50:15] but3k4: has joined #ruby
[13:50:20] fenjamin: has joined #ruby
[13:50:34] shevy: I got all sorts of old weirdness Math::sin 45.degrees
[13:51:55] olistik: has joined #ruby
[13:53:14] surs3: has joined #ruby
[13:53:30] dgutierrez1287: has joined #ruby
[13:53:41] shevy: the ruby cgi stdlib also has those old ways all over everywhere
[13:53:43] shevy: util.rb: # print CGI::unescapeElement(
[13:53:55] shevy: html.rb: s << CGI::escapeHTML(value.to_s)
[13:54:01] shevy: even camelcased methods!
[13:54:29] jhass: old crufty stuff is old and crufty
[13:54:39] fabrice31: has joined #ruby
[13:55:38] radialneon: has joined #ruby
[13:58:19] Rollabunna: has joined #ruby
[13:58:24] fenjamin: is there a place to go for a more introductory conversation on Ruby?
[13:58:51] shevy: well this here is #ruby
[13:59:15] [k-: Should we have a #ruby-beginner
[13:59:19] shevy: so your topic is about ruby so it's a good topic to be had for #ruby
[13:59:29] [k-: there is one for haskell
[13:59:40] shevy: that's ok, haskell needs that
[13:59:43] MarkTurner: has joined #ruby
[14:00:35] fenjamin: im trying to write a method that takes an integer as its input and returns a comma separated integer as a string
[14:00:38] unshadow: has joined #ruby
[14:01:18] [k-: You mean method(1000) == "1,000"?
[14:01:39] jhass: fenjamin: call to_s and then forget that it's a number, view it as a series of characters in which you want to inject commas
[14:02:30] aryaching: has joined #ruby
[14:02:53] halfdan: has joined #ruby
[14:02:57] jhass: also there's ##new2ruby but you're just as welcome here ;)
[14:03:26] xkef: has joined #ruby
[14:03:35] halfdan: is there a way to use Dir.glob and find directories that do NOT contain a file?
[14:04:55] giuseppesolinas: has joined #ruby
[14:05:27] mahmoudmahfouz: has joined #ruby
[14:06:26] shevy: halfdan just obtain all entries, and apply a .select or .reject
[14:06:27] alphaatom: has joined #ruby
[14:06:37] shevy: on the directories there (File.directory? query)
[14:07:29] [k-: He wants empty directories
[14:07:32] alphaatom: has joined #ruby
[14:07:38] [k-: Probably a delete script
[14:07:53] [k-: Gotta rid those damned empties
[14:08:34] Sehryn: has joined #ruby
[14:08:36] alphaatom: has joined #ruby
[14:09:13] FernandoBasso: has joined #ruby
[14:11:03] jwaldrip: has joined #ruby
[14:11:25] tmtwd: has joined #ruby
[14:11:57] revath: has left #ruby: ()
[14:13:15] gizmore: has joined #ruby
[14:14:48] shevy: perhaps he wants to fill them with files!
[14:15:33] surs4: has joined #ruby
[14:18:51] Thomas-0725: has joined #ruby
[14:19:19] Rollabun_: has joined #ruby
[14:19:52] [k-: So if there are no empty directories, what's he gonna do
[14:20:59] Scripore: has joined #ruby
[14:21:15] eggoez: has joined #ruby
[14:21:18] [k-: I'll show you my NaN and Infinity!
[14:21:24] c355E3B: has joined #ruby
[14:22:12] chouhoulis: has joined #ruby
[14:23:07] gnudon: has joined #ruby
[14:23:42] tkuchiki: has joined #ruby
[14:24:10] jhass: you too are so helpful
[14:24:15] jhass: er, *two even
[14:24:32] gizmore: NaN + 2 == NaP
[14:24:46] [k-: We cant help if he doesnt respond
[14:25:10] [k-: >> "NaN".succ.succ
[14:25:11] ruboto: [k- # => "NaP" (https://eval.in/396658)
[14:25:20] [k-: Indeed!
[14:27:45] shevy: oh but we already helped, the problem is solved!
[14:27:49] GitGud: has joined #ruby
[14:27:54] shevy: brb need to start mate-desktop
[14:30:26] shevy: has joined #ruby
[14:30:34] chipotle: has joined #ruby
[14:31:45] hotpancakes: has joined #ruby
[14:31:46] bricker: has joined #ruby
[14:32:53] s2013: has joined #ruby
[14:35:31] mmasaki: has joined #ruby
[14:35:38] eggoez: has joined #ruby
[14:36:11] shevy: has joined #ruby
[14:39:09] sharpmachine: has joined #ruby
[14:40:42] mmasaki: has joined #ruby
[14:41:19] timonv: has joined #ruby
[14:46:03] bricker: has joined #ruby
[14:47:31] dgutierrez1287: has joined #ruby
[14:49:59] ferr: has joined #ruby
[14:50:45] bruno-: has joined #ruby
[14:51:23] Thomas-0725: has joined #ruby
[14:52:36] hotpancakes: has joined #ruby
[14:53:10] tfitts: has joined #ruby
[14:53:29] lalalaaa: has joined #ruby
[14:53:36] acke: has joined #ruby
[14:53:41] dgutierrez1287: has joined #ruby
[14:53:46] lalalaaa: Anybody know how to `gem install eventmachine` on FreeBSD? error: cannot initialize a parameter of type 'rb_fdset_t *' with an rvalue of type 'fd_set *' -- https://gist.github.com/anonymous/eab1a155289c25b23494
[14:54:08] charliesome: has joined #ruby
[14:54:08] schov: has joined #ruby
[14:54:11] GPrime: has joined #ruby
[14:54:13] nathanstitt: has joined #ruby
[14:54:30] acke: has joined #ruby
[14:54:52] hashrocket: has joined #ruby
[14:55:10] schov: hello, noob q - I'm wondering how to run a program within atom.io without resorting to command line
[14:55:13] bricker: has joined #ruby
[14:55:39] Sehryn: has joined #ruby
[14:55:43] edwardly: has joined #ruby
[14:55:43] edwardly: has joined #ruby
[14:56:51] joneshf-laptop: does `require` only look in `lib`?
[14:56:53] acke_: has joined #ruby
[14:57:06] jhass: joneshf-laptop: through all of $LOAD_PATH
[14:57:33] jhass: in the case of a gem rubygems adds all require_paths to the $LOAD_PATH
[14:57:44] jhass: (as specified in the gemspec)
[14:58:24] SilentEcho: has joined #ruby
[14:58:42] nathanstitt: has joined #ruby
[14:58:50] joneshf-laptop: How does `lib` get into `$LOAD_PATH`?
[14:59:01] whomp: has joined #ruby
[14:59:14] joneshf-laptop: pry seems to only mention global path stuff
[15:00:06] joneshf-laptop: or maybe not, "How does `lib` get into `$LOAD_PATH`?", but when does require look outside of that for a `lib` directory?
[15:00:16] jhass: you (or something, e.g. rubygems or bundler) adds it
[15:00:49] joneshf-laptop: so it might be something rspec is doing?
[15:01:45] jhass: mmh, I don't think rspec adds lib, but your spec_helper.rb might
[15:01:59] pontiki: also depends how rspec is invoked
[15:02:44] allcentury: has joined #ruby
[15:03:41] SilentEcho: has joined #ruby
[15:03:48] joneshf-laptop: hmm, looks like it does somewhere: http://www.rubydoc.info/github/rspec/rspec-core/file/README.md#Get_Started
[15:03:53] joneshf-laptop: that's really confusing
[15:04:27] bricker: has joined #ruby
[15:07:48] charliesome: has joined #ruby
[15:08:08] bronson: has joined #ruby
[15:08:13] snakehsu: has joined #ruby
[15:08:14] havenwood: has joined #ruby
[15:08:49] zacstewart: has joined #ruby
[15:09:08] niemcu: has joined #ruby
[15:10:26] bigsky: has joined #ruby
[15:11:19] bigsky: has left #ruby: ()
[15:11:22] bigsky: has joined #ruby
[15:12:16] bigsky: has joined #ruby
[15:12:25] bigsky_: has joined #ruby
[15:13:08] christiandsg: has joined #ruby
[15:13:33] [k-: jhass just wasted some bytes
[15:13:42] [k-: Be thankful!
[15:14:02] jhass: *invested
[15:14:51] eGGsha: has joined #ruby
[15:14:53] Ox0dea: Is it possible to recover from $LOAD_PATH.clear?
[15:14:59] zata: has joined #ruby
[15:15:03] surs: has joined #ruby
[15:15:52] Ox0dea: That is, if that were the first line of the program, does Ruby provide sufficient information that you could theoretically reconstruct the default load path?
[15:16:09] [k-: >> [$LOAD_PATH.clear, $LOAD_PATH, $:]
[15:16:10] ruboto: [k- # => [[], [], []] (https://eval.in/396689)
[15:16:23] jhass: if so it gotta be somewhere in RbConfig::CONFIG I guess
[15:17:03] casadei_: has joined #ruby
[15:18:45] MarkTurner: has joined #ruby
[15:18:52] lapide_viridi: has joined #ruby
[15:19:15] ndrei: has joined #ruby
[15:21:35] xkef: has joined #ruby
[15:22:11] shevy: [k- the oracle attempts to achieve the state of birth
[15:22:24] but3k4: has joined #ruby
[15:22:48] dgutierrez1287: has joined #ruby
[15:23:01] MarkTurner: has joined #ruby
[15:23:03] [k-: My guess is he is going to use the load path to get some letters
[15:23:32] jhass: no, as array so he can save typing []
[15:24:44] sigurding: has joined #ruby
[15:25:01] [k-: Using his send thing he can just use send[Array]
[15:25:14] shevy: aha so one value is ib RbConfig::CONFIG['rubylibprefix']
[15:25:56] shevy: that one even has keys such as 'rubyarchhdrdir'
[15:26:00] s2013: has joined #ruby
[15:26:05] shevy: that's cthulhu worthy
[15:27:31] poguez_: has joined #ruby
[15:30:53] juanpablo_: has joined #ruby
[15:31:16] [k-: Ox0dea mungled run length encoder pls
[15:32:08] fantazo: has joined #ruby
[15:33:44] shevy: a bit like a virus
[15:33:50] SilentEcho: has joined #ruby
[15:33:51] shevy: it enters the dark parths of the ruby
[15:35:11] tkuchiki: has joined #ruby
[15:35:38] SilentEcho: has joined #ruby
[15:36:41] [k-: Parths: paths + farts?
[15:37:04] peter_paule: has joined #ruby
[15:38:13] MarkTurner: has joined #ruby
[15:38:35] Spami: has joined #ruby
[15:38:39] MarkTurner: has left #ruby: ()
[15:39:54] sharpmachine: has joined #ruby
[15:40:54] mercwithamouth: has joined #ruby
[15:41:38] pontiki: ewwww, dark farts
[15:42:30] asdasdasdasd: has joined #ruby
[15:43:56] startupality: has joined #ruby
[15:47:01] Ox0dea: >> $_=$$/$$;@__=->_{___=[];__=$_-$_;(@_=->{__+=$_;(_+' ')[$.+=$_]?((_[$.]!=_[$.-$_]?(___<<[_[$.-$_],__];__=$_-$_):$_-$_);@_[]):___})[]}; @__['aaaabbbccdddeee']
[15:47:02] ruboto: Ox0dea # => [["a", 4], ["b", 3], ["c", 2], ["d", 3], ["e", 3]] (https://eval.in/396717)
[15:47:11] dagda1: has joined #ruby
[15:47:21] [k-: I... I...
[15:47:22] Ox0dea: It's gross, though.
[15:50:05] alphaatom: has joined #ruby
[15:50:22] eGGsha: has joined #ruby
[15:51:56] zacstewart: has joined #ruby
[15:52:31] Scripore: has joined #ruby
[15:53:15] sigurding: has joined #ruby
[15:53:45] olistik: has joined #ruby
[15:54:05] blackmesa: has joined #ruby
[15:54:18] but3k4: has joined #ruby
[15:55:27] fabrice31: has joined #ruby
[15:55:57] hotpancakes: has joined #ruby
[15:56:06] kies^: has joined #ruby
[15:59:41] alphaatom: has joined #ruby
[16:01:08] Muhannad: has joined #ruby
[16:03:41] ivanf: has joined #ruby
[16:04:43] [k-: What i am doing: https://eval.in/396729
[16:05:03] alphaatom: has joined #ruby
[16:05:23] konsolebox: has joined #ruby
[16:06:13] shevy: [k- Fart vader!
[16:06:14] fullofcaffeine: has joined #ruby
[16:06:52] shevy: obviously the oracle inspires you to write ... alien code
[16:07:05] Ox0dea: [k-: This is the craziest code I've ever seen.
[16:07:12] shevy: and to be honest with you...
[16:07:21] shevy: your code is actually worse than Ox0dea code now :\ :/
[16:07:33] [k-: I write crazier code :)
[16:07:52] konsolebox: has joined #ruby
[16:08:33] bricker: has joined #ruby
[16:11:49] davedev24_: has joined #ruby
[16:16:07] Scripore: has joined #ruby
[16:17:04] rippa: has joined #ruby
[16:17:47] sarkyniin: has joined #ruby
[16:24:33] arashb: has joined #ruby
[16:24:45] ferr: has left #ruby: ("WeeChat 1.2")
[16:25:22] Thomas-0725: has joined #ruby
[16:29:56] ascarter: has joined #ruby
[16:36:05] ascarter: has joined #ruby
[16:37:53] ascarter: has joined #ruby
[16:39:19] rickmasta: has joined #ruby
[16:39:36] alphaatom: has joined #ruby
[16:40:56] Sehryn: has joined #ruby
[16:41:08] alphaatom: has joined #ruby
[16:41:40] Sehryn_: has joined #ruby
[16:42:13] alphaatom: has joined #ruby
[16:42:40] s2013: has joined #ruby
[16:43:19] alphaatom: has joined #ruby
[16:44:30] alphaatom: has joined #ruby
[16:44:43] dh64: has joined #ruby
[16:46:04] MarkTurner: has joined #ruby
[16:46:05] fgo: has joined #ruby
[16:46:14] sarkyniin: has joined #ruby
[16:46:17] alphaatom: has joined #ruby
[16:47:30] alphaatom: has joined #ruby
[16:47:50] joast: has joined #ruby
[16:48:13] casadei_: has joined #ruby
[16:50:17] Channel6: has joined #ruby
[16:51:11] dagda1: has joined #ruby
[16:51:43] charliesome: has joined #ruby
[16:51:44] blue_deref: has joined #ruby
[16:52:16] NeverDie: has joined #ruby
[16:53:16] surs1: has joined #ruby
[16:53:33] alphaatom: has joined #ruby
[16:54:00] quimrstorres: has joined #ruby
[17:02:34] quimrstorres: has joined #ruby
[17:03:15] alphaatom: has joined #ruby
[17:07:06] lavros: has joined #ruby
[17:09:06] toretore: has joined #ruby
[17:10:08] lalalaaa: has joined #ruby
[17:11:17] [k-: I love it how $?? is allowed
[17:13:17] hotpancakes: has joined #ruby
[17:13:44] gizmore: https://xkcd.com/1513/
[17:13:52] gizmore: the hover text fits :)
[17:14:13] eGGsha: has joined #ruby
[17:14:41] zacstewart: has joined #ruby
[17:16:04] [k-_: has joined #ruby
[17:16:09] lkba_: has joined #ruby
[17:16:44] _blizzy_: has joined #ruby
[17:17:39] AndChat-43764: has joined #ruby
[17:19:28] blackmesa: has joined #ruby
[17:19:37] juanpablo_: has joined #ruby
[17:21:32] heftig: what kind of implementation would you recommend for a priority queue?
[17:21:40] shevy: emoji in hover messages, now that is nasty
[17:22:24] heftig: right now I use a list with bsearch-based sorted insertion
[17:22:41] Brainling: has joined #ruby
[17:22:41] |Brainling|: has joined #ruby
[17:22:45] heftig: well, array
[17:22:55] chouhoulis: has joined #ruby
[17:23:05] Contigi: has joined #ruby
[17:23:22] quimrstorres: has joined #ruby
[17:24:36] lkba: has joined #ruby
[17:27:03] haroldwu: has joined #ruby
[17:27:51] Azulinho: has joined #ruby
[17:28:08] serivichi: has joined #ruby
[17:28:12] lessless: has joined #ruby
[17:29:55] hotpancakes: has joined #ruby
[17:30:43] tjohnson: has joined #ruby
[17:32:44] surs2: has joined #ruby
[17:34:53] jayMillz: has joined #ruby
[17:35:46] jwaldrip: has joined #ruby
[17:38:09] woodennails: has joined #ruby
[17:38:24] dgutierrez1287: has joined #ruby
[17:40:25] woodennails: Can you folks recommend a small project to do tonight / tomorrow, i'm a beginner and start a new job on monday so kinda want to get ahead of the curve
[17:40:42] ljarvis: woodennails: what type of project?
[17:40:47] ljarvis: heftig: how big could it get?
[17:40:49] woodennails: something very basic
[17:41:18] ljarvis: woodennails: could you be more specific? you start a new job so presumably you're passed the basics :)
[17:41:19] heftig: ljarvis: a handful of priorities, a hundred thousand jobs
[17:41:47] existensil: woodennails: you looking for a full stack project or pure ruby or rails but backend focused?
[17:41:47] eGGsha: has joined #ruby
[17:41:50] ljarvis: heftig: have you benched it? insertion could still be pretty slow I guess. It depends on your goal
[17:41:54] baweaver: has joined #ruby
[17:41:56] woodennails: Well, thats the thing, Im a javascript developer and at my new job I'm going to be using Ruby as well and theyre fully aware I dont know Ruby and are going to train me on it.. just wanted to get a head start really :)
[17:42:21] Scroff: has joined #ruby
[17:42:45] existensil: woodennails: i'd start with a simple TODO list application. That's a good one and will require you to get familiar with rails' resource routing and active record
[17:42:56] ljarvis: woodennails: what type of Ruby will you be doing?
[17:43:02] woodennails: Im not using Rails i dont believe... im using just pure Ruby :)
[17:43:03] existensil: (assuming rails)
[17:43:05] ljarvis: I've heard nothing about rails yet so wouldn't recommend that
[17:43:19] ljarvis: are you doing web related stuff?
[17:43:33] woodennails: yes :D i believe so
[17:43:44] ljarvis: you start on Monday and don't know what your job entails? :D
[17:43:52] existensil: you should have asked more questions :-P
[17:44:55] woodennails: I know its going to be mainly Javascript based I just know there may be some Ruby
[17:45:04] woodennails: its for a junior developer role :)
[17:45:39] existensil: that sure sounds like its probably rails. could be sinatra or something else.
[17:45:49] Mia: has joined #ruby
[17:45:49] Mia: has joined #ruby
[17:46:17] woodennails: I asked and they said there isnt much Rails, its mainly Ruby and Sinatra :)
[17:46:24] woodennails: maybe i'll look into Sinatra
[17:46:28] peter_paule: has joined #ruby
[17:46:31] existensil: so do a todo list app in sinatra
[17:46:33] NateDeHiggers: has joined #ruby
[17:47:00] zacstewart: has joined #ruby
[17:47:06] existensil: woodennails: do you know what kind of data storage tools they are using? might be good to use something similar on your project
[17:47:18] existensil: so mysql, mongo, postgresql, redis... whatever they are using
[17:47:34] woodennails: I think i may just wait until Monday haha
[17:47:55] heftig: ljarvis: hm, getting around 12.787k (??12.0%) insertions/s starting with 100000 entries
[17:47:58] woodennails: oh ps, any of you guys use Vim?
[17:49:06] woodennails: just wanted to know how you had it set up with ruby
[17:49:20] casadei_: has joined #ruby
[17:49:26] pontiki: woodennails: over the weekend, maybe what you want to do is run through a bunch of ruby examples, koans, that sort of thing to get comfy with ruby by itself
[17:49:32] pontiki: read the docs, etc.
[17:50:00] heftig: ljarvis: compared to a normal Queue at 8.410M (?? 6.5%) insertions/s
[17:50:05] jhass: !ban NateDeHiggers 1d troll
[17:50:13] jhass: !ban ChipmunkHarris 1d troll
[17:50:14] heftig: well, it sucks, but i guess it's good enough
[17:50:18] lalalaaa: has joined #ruby
[17:50:25] jhass: !ban ChipmunkHarris !T 1d troll
[17:50:25] ChanServ: +b ChipmunkHarris!*@*
[17:50:26] ChanServ: ChanServ kicked ChipmunkHarris: troll
[17:50:34] shevy: jhass lol are you scanning for naughty nicks?
[17:50:36] jhass: meh, I need an alias
[17:50:59] existensil: why is freenode having a recent rash of racist trolls? that never seemed to be a problem before
[17:51:02] havenwood: shevy: Same boring troll, don't feed em.
[17:51:05] nfk: has joined #ruby
[17:51:14] havenwood: existensil: One person can use a lot of nicks. :P
[17:51:36] existensil: true. probably just one obnoxious racist that doesn't like going outside and being racist
[17:52:12] eGGsha: has joined #ruby
[17:52:38] eggoez: has joined #ruby
[17:53:49] jhass: !unban ChipmunkHarris
[17:53:58] jhass: apeiros: meh, we don't have that?^
[17:55:03] freerobby: has joined #ruby
[17:55:32] [k-_: Tada! Ox0dea: shevy: https://eval.in/396785
[17:56:18] fabrice31: has joined #ruby
[17:57:05] shevy: I'm not going to look at that
[17:57:09] shevy: you want to make me blind
[17:59:30] s00pcan: has joined #ruby
[17:59:36] arup_r: has joined #ruby
[18:00:45] tmtwd: has joined #ruby
[18:02:19] Azulinho: has joined #ruby
[18:03:57] sarkyniin: has joined #ruby
[18:04:03] [k-_: Bonus: no conditionals
[18:05:39] Maletor: has joined #ruby
[18:06:00] [k-_: I should get baweaver making one too
[18:06:21] autrilla: has joined #ruby
[18:06:48] [k-_: A mungled run length encoder!
[18:07:42] theery: has joined #ruby
[18:07:50] blackmesa: has joined #ruby
[18:08:07] dgutierrez1287: has joined #ruby
[18:08:57] dgutierrez1287: has joined #ruby
[18:09:25] [k-_: Bad point: it only works on alphabets
[18:11:37] GitGud: has joined #ruby
[18:13:39] jhack: has joined #ruby
[18:13:39] jhack: has joined #ruby
[18:14:03] dgutierrez1287: has joined #ruby
[18:15:26] beef-wellington: has joined #ruby
[18:18:24] surs3: has joined #ruby
[18:18:52] eGGsha: has joined #ruby
[18:19:45] xxneolithicxx: has joined #ruby
[18:22:28] s00pcan: has joined #ruby
[18:24:31] vdamewood: has joined #ruby
[18:26:53] davedev24: has joined #ruby
[18:27:54] xxneolithicxx: has joined #ruby
[18:29:16] olistik: has joined #ruby
[18:31:02] atomical: has joined #ruby
[18:31:17] rfish2: has joined #ruby
[18:31:40] yeticry: has joined #ruby
[18:32:04] atomical: has joined #ruby
[18:33:54] s00pcan: has joined #ruby
[18:37:39] ChanServ: -b ChipmunkHarris!*@*
[18:39:02] dgutierrez1287: has joined #ruby
[18:40:29] bronson: has joined #ruby
[18:42:55] rbowlby_: has joined #ruby
[18:43:14] shevy: we need more ruby
[18:44:14] GitGud: has joined #ruby
[18:44:39] RegulationD: has joined #ruby
[18:47:52] hotpancakes: has joined #ruby
[18:49:34] peter_paule: has joined #ruby
[18:50:20] juanpablo_: has joined #ruby
[18:50:56] claw: has joined #ruby
[18:51:19] Nahra: has joined #ruby
[18:54:06] dagda1: has joined #ruby
[18:54:32] lkba: has joined #ruby
[18:54:41] icebourg: has joined #ruby
[18:55:09] sharpmachine: has joined #ruby
[18:55:45] mandarinkin2: has joined #ruby
[18:56:04] yeticry: has joined #ruby
[18:56:41] MarkTurner: has joined #ruby
[18:58:58] eGGsha: has joined #ruby
[18:59:09] yfeldblum: has joined #ruby
[19:01:30] mrconfused: has joined #ruby
[19:01:57] DLSteve: has joined #ruby
[19:02:23] gizmore: how would i make rake tasks available from my gem in another project/gem?
[19:02:48] gizmore: currently i have some tiny test task in Rakefile, and added Rakefile to the gem files... which is wrong i think
[19:03:27] Torrieri: has joined #ruby
[19:03:46] Torrieri: has joined #ruby
[19:04:44] n008f4g_: has joined #ruby
[19:04:54] hahuang61: has joined #ruby
[19:05:23] dgutierrez1287: has joined #ruby
[19:05:36] jhass: just ship a file and instruct your users to require it inside their Rakefile
[19:05:47] ips|malc: has joined #ruby
[19:05:52] dseitz: has joined #ruby
[19:06:20] gnudon: has joined #ruby
[19:08:58] MagePsycho: has joined #ruby
[19:09:31] monod: has joined #ruby
[19:10:34] psyprus: has joined #ruby
[19:11:01] davedev24_: has joined #ruby
[19:11:07] pontiki: i wouldn't add the whole project Rakefile
[19:12:24] shevy: private static boolean isApacheHttpClientPresent() {
[19:12:48] shevy: so beautiful
[19:13:29] peter_paule: has joined #ruby
[19:14:34] davedev24: has joined #ruby
[19:15:15] arashb: has joined #ruby
[19:15:37] KnownSyntax: has joined #ruby
[19:17:37] startupality: has joined #ruby
[19:19:16] gizmore: can i include lib/somecommondir/*.rake?
[19:19:25] gizmore: and write with all my subgems in somecommondir?
[19:19:32] lokulin: has joined #ruby
[19:20:25] Musashi007: has joined #ruby
[19:20:26] shevy: you can grab all files via Dir[] and '*' if you give it the right path
[19:21:15] allomov: has joined #ruby
[19:29:17] cashnguns: has joined #ruby
[19:29:21] Azulinho: has joined #ruby
[19:32:59] alphaatom: has joined #ruby
[19:34:23] olistik: has joined #ruby
[19:34:24] alphaatom: has joined #ruby
[19:35:53] Torrieri: has joined #ruby
[19:36:54] hotpancakes: has joined #ruby
[19:37:06] eggoez: has joined #ruby
[19:37:30] charliesome: has joined #ruby
[19:37:55] lkba_: has joined #ruby
[19:37:56] casadei_: has joined #ruby
[19:38:26] felixjet: has joined #ruby
[19:41:13] puddy: has joined #ruby
[19:41:31] Torrieri: has joined #ruby
[19:41:32] Torrieri: has joined #ruby
[19:41:42] puddy: has left #ruby: ()
[19:43:21] leonardoajim: has joined #ruby
[19:43:52] arashb: has joined #ruby
[19:44:26] charliesome: has joined #ruby
[19:44:40] serivichi: has joined #ruby
[19:49:03] symm-: has joined #ruby
[19:50:10] eGGsha: has joined #ruby
[19:51:39] revath: has joined #ruby
[19:52:51] dagda1: has joined #ruby
[19:53:30] hotpancakes: has joined #ruby
[19:55:24] ferr: has joined #ruby
[19:57:04] fabrice31: has joined #ruby
[19:57:15] lkba: has joined #ruby
[19:59:11] mary5030: has joined #ruby
[20:01:47] lkba_: has joined #ruby
[20:02:22] MarkTurner: has joined #ruby
[20:03:31] multi_io: has joined #ruby
[20:04:24] bubbys: has joined #ruby
[20:05:01] aaeron: has joined #ruby
[20:05:06] s00pcan: has joined #ruby
[20:05:11] shevy: today is sleepy day on #ruby
[20:08:39] chouhoulis: has joined #ruby
[20:08:55] tmtwd: has joined #ruby
[20:11:10] bruno-: has joined #ruby
[20:13:36] davedev24_: has joined #ruby
[20:13:46] bubbys: has joined #ruby
[20:13:55] enders: has joined #ruby
[20:15:12] jwaldrip: has joined #ruby
[20:15:31] havenwood: has joined #ruby
[20:15:42] Hobogrammer_: has joined #ruby
[20:16:31] JMoir: has joined #ruby
[20:16:37] Hobogrammer_: has joined #ruby
[20:19:43] ddarkpassenger: has joined #ruby
[20:19:45] arup_r: shevy: Bcoz I am on #css
[20:20:22] arup_r: my elements on the page are not in expected location.... :/
[20:20:28] arup_r: time to learn CSS
[20:21:27] slumos: has joined #ruby
[20:21:27] jhass: just use a grid system
[20:21:37] jhass: the jquery of css
[20:22:05] arup_r: jhass: Using bootstrp3 ,,, But things went wrong.. I applied wrong ofcourse..
[20:22:10] arup_r: #css is slow
[20:22:18] ndrei: has joined #ruby
[20:22:18] jhack: if hit_or_stay_prompt == "stay" && (hand[0].to_i + hand[1].to_i + hand[2].to_i + hand[3].to_i + hand[4].to_i) > 21
[20:22:25] djbkd: has joined #ruby
[20:22:28] jhack: is ther a simpler way to write this than to do the .to_i command?
[20:22:31] chouhoulis: has joined #ruby
[20:22:37] jhass: don't store strings
[20:22:57] jhass: and hand.inject(:+) > 21
[20:22:59] startupality: has joined #ruby
[20:23:06] zacstewart: has joined #ruby
[20:24:29] vyorkin: has joined #ruby
[20:24:51] Scripore: has joined #ruby
[20:25:21] weaksauce: if you are forced to use strings you could use map too hand.map(&:to_i).inject(:+)
[20:27:13] peter_paule: has joined #ruby
[20:29:00] Ox0dea: But maybe you don't want to silently convert non-numeric strings to 0, in which case you'll need to use map(&method(:Integer)).
[20:32:33] j416: has joined #ruby
[20:32:53] alphaatom: has joined #ruby
[20:33:48] postmodern: has joined #ruby
[20:34:13] t0rrieri: has joined #ruby
[20:34:29] djbkd: has joined #ruby
[20:34:56] havenwood: `map(&Kernel.public_method(:Integer))` but really just use the simpler `map { |s| Integer(s) }` ;)
[20:35:17] charlenopires: has joined #ruby
[20:35:17] postmodern: map(&method(:Integer)) ?
[20:35:34] crdpink: has joined #ruby
[20:35:43] havenwood: >> %w[1 2 3].map &Kernel.public_method(:Integer)
[20:35:44] ruboto: havenwood # => [1, 2, 3] (https://eval.in/396815)
[20:36:15] havenwood: >> %w[1 2 3].map &method(:Integer)
[20:36:16] ruboto: havenwood # => [1, 2, 3] (https://eval.in/396816)
[20:36:43] nofxx: has joined #ruby
[20:36:43] nofxx: has joined #ruby
[20:36:50] Scroff: has joined #ruby
[20:36:51] pipework: >> %w|1 2 3|.map &:Integer
[20:36:52] ruboto: pipework # => private method `Integer' called for "1":String (NoMethodError) ...check link for more (https://eval.in/396817)
[20:37:15] havenwood: http://ruby-doc.org/core/Kernel.html#method-i-Integer
[20:38:57] ljarvis: >> "1".send(:Integer, 2)
[20:38:58] ruboto: ljarvis # => 2 (https://eval.in/396818)
[20:39:05] juanpablo_: has joined #ruby
[20:39:15] havenwood: >> Kernel.public_send :Integer, 2
[20:39:16] ruboto: havenwood # => 2 (https://eval.in/396819)
[20:39:34] yfeldblum: has joined #ruby
[20:40:02] ljarvis: >> nil.send(:puts)
[20:40:03] ruboto: ljarvis # => ...check link for more (https://eval.in/396820)
[20:40:21] apeiros: >> nil.send(:puts, "yay!")
[20:40:22] ruboto: apeiros # => yay! ...check link for more (https://eval.in/396821)
[20:40:46] t0rrieri_: has joined #ruby
[20:40:51] toretore: >> %w[1 2 3].map &Kernel.method(:Integer)
[20:40:52] ruboto: toretore # => [1, 2, 3] (https://eval.in/396822)
[20:40:53] bubbys: has joined #ruby
[20:41:02] pipework: >> send(:puts, "yay!")
[20:41:03] ruboto: pipework # => yay! ...check link for more (https://eval.in/396823)
[20:41:22] LJT: has joined #ruby
[20:41:55] apeiros: puts is in Kernel
[20:41:59] apeiros: Kernel is in Object
[20:42:07] apeiros: that's why they're private
[20:42:21] apeiros: and that's why module_function >> extend(self)
[20:44:23] BTRRY: has joined #ruby
[20:44:29] rbowlby: has joined #ruby
[20:44:31] Ox0dea: >> [].send :require, 'json'
[20:44:32] ruboto: Ox0dea # => true (https://eval.in/396824)
[20:44:49] devdazed: has joined #ruby
[20:45:30] jhass: >> send(:puts, "starting").send(:require, "json").send(:require, "yaml").send(:puts, "success")
[20:45:31] ruboto: jhass # => starting ...check link for more (https://eval.in/396825)
[20:46:34] lxsameer: has joined #ruby
[20:46:34] lxsameer: has joined #ruby
[20:47:06] jhass: ^ is that what's called a pipeline?
[20:47:13] revath: has joined #ruby
[20:47:21] Ox0dea: Not quite, I don't think.
[20:47:26] Ox0dea: A pipeline tends to be a series of transformations.
[20:47:36] pipework: ACTION lines some pipes up
[20:47:51] Ox0dea: ACTION pipes some lines up.
[20:48:33] havenwood: pipeline paralel-eeeesim
[20:48:47] ruurd: has joined #ruby
[20:49:06] RobertBirnie: has joined #ruby
[20:49:36] shevy: ACTION ipes some lines up
[20:50:02] rbennacer: has joined #ruby
[20:50:10] jhass: semicolon and newline free programming, can you do it?
[20:50:16] Hanmac: has joined #ruby
[20:50:16] Ox0dea: I can do it.
[20:51:05] shevy: I see jhass got into lisp up there
[20:51:37] toretore: a series of tubes, the ideal program
[20:51:43] Ox0dea: What's the least invasive way to just completely throw out method visibility?
[20:51:47] haroldwu: has joined #ruby
[20:51:55] Ox0dea: `class Object; public *private_methods; end` doesn't quite get there.
[20:52:40] Cache_Money: has joined #ruby
[20:53:02] jhass: a preprocessor that replaces . with send?
[20:54:00] toretore: ideally, class Object; def public_send(*a, &b); __send__(*a, &b); end; end
[20:55:52] Gulaangga: has joined #ruby
[20:56:22] pipework: toretore: No keyword args?
[20:56:53] hotpancakes: has joined #ruby
[20:57:08] KrzaQ: Is there a way to use string::squeeze with strings?
[20:57:25] KrzaQ: [2] pry(main)> "a\r\nb\r\n\r\nc".squeeze("\r\n")
[20:57:25] KrzaQ: => "a\r\nb\r\n\r\nc"
[20:57:51] KrzaQ: I'd like to get "a\r\nb\r\nc"
[20:58:43] Gulaangga: any ideas how to open URL that contains a dot like "http://www.alexa.com/siteinfo/google.com" with open-uri? I'm getting "rfc3986_parser.rb:66:in `split': bad URI(is not URI?)" because of "google.com" part
[20:58:57] apeiros: KrzaQ: use gsub
[20:59:04] apeiros: and no, squeeze is char based
[20:59:40] blue_deref: has joined #ruby
[21:00:46] djbkd: has joined #ruby
[21:01:11] jhass: >>> require "uri"; URI.parse "http://www.alexa.com/siteinfo/google.com" # Gulaangga: I don't think your assumption is right
[21:01:12] ruboto: jhass # => /tmp/execpad-b1132210b3f5/source-b1132210b3f5:2: syntax error, unexpected '>' ...check link for more (https://eval.in/396826)
[21:01:23] jhass: >> require "uri"; URI.parse "http://www.alexa.com/siteinfo/google.com"
[21:01:24] ruboto: jhass # => #<URI::HTTP http://www.alexa.com/siteinfo/google.com> (https://eval.in/396827)
[21:01:57] dagda1: has joined #ruby
[21:02:22] dgutierrez1287: has joined #ruby
[21:03:44] idiocrash: has joined #ruby
[21:04:33] Maletor: has joined #ruby
[21:05:47] gizmore: line = exec("ping -W 1.0 -c 1", @uri.host, "| grep '1 received'")
[21:05:47] gizmore: #<Errno::ENOENT: No such file or directory - ping -W 1.0 -c 1>
[21:05:54] SylarRuby: has joined #ruby
[21:06:31] Gulaangga: jhass: yes, thanks, I'm looking into it
[21:06:33] ruurd: has joined #ruby
[21:07:04] Gulaangga: it's actually because I'm reading URLs from file
[21:07:10] jhass: gizmore: 1) exec replaces the current process, 2) the multi arg form doesn't invoke a shell (no piping) 3) the multi arg form expects just the binary as first argument, no parameters
[21:07:12] Gulaangga: with File.readlines('sites.txt').each
[21:07:18] toretore: pipework: *a will capture **kwargs too
[21:07:35] gizmore: jhass: thanks... should i use backticks and escape the host param?
[21:07:38] jhass: Gulaangga: .chomp of the trailing \n
[21:07:41] prestorium: has joined #ruby
[21:07:47] i8igmac: has joined #ruby
[21:07:57] Gulaangga: jhass: ok, thanks again
[21:08:07] jhass: gizmore: no, do the | grep with ruby methods, it's good at such
[21:08:39] gizmore: jhass: do you hass a oneliner? :]
[21:09:28] AJA: has joined #ruby
[21:09:29] malconis: has joined #ruby
[21:10:03] Thomas-0725: has joined #ruby
[21:10:47] jhass: require "open3"; output, _status = Open3.capture(["/usr/bin/ping", "-W", "1.0", "-c", "1", @uri.host); output.include?("1 received") I guess
[21:10:47] Vile`: has joined #ruby
[21:10:53] jhass: (completely untested)
[21:11:01] sarkyniin: has joined #ruby
[21:11:52] lkba: has joined #ruby
[21:11:59] Musashi007: has joined #ruby
[21:12:15] jhass: require "open3"; output, _status = Open3.capture2("/usr/bin/ping", "-W", "1.0", "-c", "1", @uri.host); output.include?("1 received") actually
[21:12:29] toretore: ok, tell me this expert genius programars: how do i make a thread wait for some signal before it continues?
[21:12:30] WeiJunLi: has joined #ruby
[21:12:39] jhass: toretore: with a ConditionVariable
[21:12:41] zacstewart: has joined #ruby
[21:13:50] ddarkpassenger: has joined #ruby
[21:13:56] toretore: jhass: without a bunch of edge cases to ruin my day?
[21:13:59] apeiros: jhass officially expert genius programar
[21:14:08] jhass: where's my cookie?
[21:14:28] toretore: ?cookie jhass
[21:14:28] ruboto: jhass, I don't know anything about cookie
[21:14:32] gizmore: jhass: that looks complicated! :P
[21:14:35] apeiros: ?cookie jhass
[21:14:35] ruboto: jhass, here's your cookie
[21:14:41] zanloy: has joined #ruby
[21:14:53] jhass: toretore: pretty much, I'm not sure on Ruby's "random interrupt" semantics, so putting the wait in a while that checks the condition is still good practice
[21:14:57] toretore: oh you just added it
[21:15:06] apeiros: you were too quick
[21:15:44] apeiros: CV should work correctly without additional safeguarding
[21:15:47] apeiros: it'd be a bug if not
[21:16:13] toretore: jhass, apeiros: https://gist.github.com/toretore/bab608e6814d4d3ae49d
[21:16:19] jhass: well, the underlying pthread primitive has the random interrupt semantics
[21:16:22] toretore: am i doing it wrong?
[21:16:24] hotpancakes: has joined #ruby
[21:16:40] apeiros: but that's just the reply I give by principle :)
[21:17:07] apeiros: tbh, I've to triple check CV code. I rarely ever used them.
[21:17:08] duoi: has joined #ruby
[21:17:11] toretore: i hate threads
[21:17:12] jhass: you don't need the synchronize to signal, but it shouldn't harm either, mh
[21:17:16] lkba_: has joined #ruby
[21:19:45] jhass: http://paste.mrzyx.de/pmm0mxl0i works correctly here
[21:20:03] LJT: has joined #ruby
[21:21:01] RobertBirnie: has joined #ruby
[21:21:07] toretore: ok then tell me this if ure so smatr, why am i getting "fatal: No live threads left. Deadlock?"
[21:21:29] jhass: because you called .wait in all your active threads
[21:21:43] jhass: so none is left to .signal
[21:21:44] Mweshi_: has joined #ruby
[21:22:00] havenwood: has joined #ruby
[21:22:12] jhass: (active threads means that it might also that you let others die)
[21:22:30] apeiros: ?code toretore
[21:22:31] ruboto: toretore, We can't help you without your code, please post it to https://gist.github.com
[21:22:32] olistik: has joined #ruby
[21:23:09] toretore: just a minute, got some real pipes to look after
[21:23:14] jhass: toretore: e.g. remove the final sleep 1 in my example and you'll have a race between the .wait returning and the main thread dying and taking everything down with it
[21:23:39] bricker: has joined #ruby
[21:23:42] apeiros: pipedreams???
[21:24:07] apeiros: ACTION has to look after his pillow. lemme check real quick. don't expect me to come back, though :-D
[21:24:30] dagda1: has joined #ruby
[21:24:32] jhass: Thread.abort_on_exception = true might help to find accidentially dying threads
[21:24:34] chipotle: has joined #ruby
[21:24:46] Papierkorb: has joined #ruby
[21:25:55] eggoez: has joined #ruby
[21:25:58] toretore: https://gist.github.com/toretore/2b302fe2ee6bf9bbcc5e
[21:26:15] toretore: will reply to your questions in a sec, sorry
[21:26:29] RobertBirnie: has joined #ruby
[21:26:55] toretore: line 62, d.run blocks
[21:27:03] WeiJunLi: in python there is a pythonic way of writting code, such happens with ruby?
[21:27:04] casadei_: has joined #ruby
[21:27:09] jhass: toretore: it's quite possible that the body of the thread runs before the main threads wait call even enters
[21:27:27] jhass: toretore: signal calls don't buffer up, if nobody's is waiting they just puff
[21:27:53] jhass: WeiJunLi: yeah, the general (and in the ruby community used) term is idiomatic code
[21:29:16] blackmesa: has joined #ruby
[21:29:24] WeiJunLi: jhass: can you show me any article that talks about that?
[21:29:45] jhass: I learned it from this channel ;)
[21:31:42] rbennacer: has joined #ruby
[21:32:15] apeiros: in ruby, you don't come to idiomatic code. idiomatic code comes to you.
[21:33:13] jhass: apeiros: the pillow seems to do stuff to you
[21:33:15] rbennacer: has joined #ruby
[21:33:38] apeiros: toretore: you mean you could remove L47-58;68-83 and still have the exception?
[21:33:57] toretore: jhass: d'oh! you're right of course, the thread exited prematurely
[21:34:26] apeiros: ACTION disappoint. toretore should know how to create reproducible examples :(
[21:34:38] Vile`: has joined #ruby
[21:34:40] lkba: has joined #ruby
[21:34:40] toretore: undefined local variable or method `d'
[21:34:59] toretore: i am my own worst nightmare
[21:35:00] apeiros: whoops??? :)
[21:35:02] bricker: has joined #ruby
[21:35:17] apeiros: I'll repeat that IMO Thread.abort_on_exception=true should be the default
[21:35:21] jhass: that's gonna cost you a few places on apeiros "people I'd like to work with" ranking list
[21:35:33] Ox0dea: has left #ruby: ("WeeChat 1.2")
[21:35:35] apeiros: also that it should be possible to set it per thread, to allow .value to work as intended.
[21:35:44] toretore: apeiros: well, to be fair, it's difficult to make a consistently reproducible example when it comes to threads
[21:35:59] apeiros: jhass: oh, there's things which cost him more ranks. like that he doesn't want to use ivars :<
[21:36:03] toretore: you can set it per thread tho
[21:36:10] apeiros: wait what?
[21:36:13] jhass: apeiros: you can set it per thread apparently
[21:36:24] toretore: Thread#abort_on_exception=
[21:36:28] apeiros: AND I NEVER EVEN CHECKED!
[21:36:30] apeiros: what's wrong with me?
[21:36:43] jhass: the pillow. I'm telling you the pillow
[21:36:48] apeiros: can we also start a thread in sleeping condition?
[21:36:49] toretore: apeiros: hey my Waiter uses only ivars!
[21:37:10] apeiros: toretore: who are you and what did you to toretore?
[21:37:15] jhass: apeiros: with subclassing perhaps, I forgot
[21:37:20] apeiros: ACTION tries .allocate
[21:37:35] apeiros: "TypeError: allocator undefined for Thread", right. tried that before.
[21:37:35] toretore: Thread.new{ Thread.stop; ... }
[21:37:42] apeiros: toretore: race.
[21:37:54] toretore: i still hate threads
[21:38:12] apeiros: I don't. but yeah, they're easily brain melting.
[21:38:12] toretore: my hate stems from lack of knowledge, sure, but still
[21:38:14] lkba_: has joined #ruby
[21:38:27] apeiros: do worry. it won't get better with knowledge. only worse.
[21:38:41] apeiros: you'll realize in how many additional places you actually have race conditions.
[21:38:51] apeiros: and you'll realize that you probably still don't even know half of all places.
[21:38:56] toretore: basically, "anything you can think of, and anything you can't think of will go wrong"
[21:39:11] apeiros: toretore: worse. it will also go wrong *at the same time* :'D
[21:39:21] apeiros: ok, not in MRIruby
[21:39:41] jhass: I'm not sure if it holds true in Ruby, but in theory you got a race condition in your Waiter class between the .wait and the until :P
[21:39:42] mjuszczak: has joined #ruby
[21:39:47] chipotle_: has joined #ruby
[21:39:50] toretore: that's why we have jruby and rubinius, so that we can experience the pain of real parallelism
[21:39:50] apeiros: jhass: yes, definitively the pillow. I'm sure the vodka is unrelated. :o)
[21:40:13] apeiros: I'd still love if we had a way to control the scheduler.
[21:40:13] jhass: apeiros: that's what the vodka is telling me too all the time
[21:40:16] apeiros: it'd allow testing threads.
[21:40:28] apeiros: jhass: your vodka talks?!?!?
[21:40:29] toretore: jhass: really? it's holding the mutex at that point
[21:40:32] apeiros: where can I get that brand?
[21:40:58] jhass: toretore: mmh, true, nvm :P
[21:41:15] toretore: ACTION +1
[21:41:23] jhass: apeiros: if yours doesn't it just meant you didn't show it enough love
[21:41:40] Pupeno: has joined #ruby
[21:42:02] jhass: that you can still use a keyboard is another indicator for that^^
[21:42:29] apeiros: I've never managed to drink enough to be unable to use a keyboard :<
[21:43:12] arooni-mobile: has joined #ruby
[21:43:14] toretore: jhass: also re: your comment about missed signals, that's what @signalled is there for right?
[21:43:41] jhass: my concentration is not good apparently :/
[21:43:56] sigurding: has joined #ruby
[21:44:46] olistik: has joined #ruby
[21:45:51] Darkwater: has joined #ruby
[21:46:55] apeiros: I'm not sure that'd be indicative that CV is the wrong tool (if you have to check whether it has been signaled)
[21:48:22] toretore: well, as a primitive used in the Waiter implementation i guess it is the right tool
[21:48:38] idiocrash: has joined #ruby
[21:48:48] toretore: waiter/event/barrier being the "right" level of abstraction
[21:49:23] apeiros: ooooh, Thread.handle_interrupt looks interesting
[21:50:21] toretore: isn't kill and raise for threads discouraged?
[21:51:24] hotpancakes: has joined #ruby
[21:53:00] jhass: apeiros: it's the right primitive to build the right tool
[21:53:52] jhass: Mutex, Thread and ConditionVariable are the essential primitives you can't reimplement because you need support from the scheduler
[21:54:01] apeiros: toretore: totally. but handle_interrupt might change the game. but I haven't read the docs yet.
[21:54:37] apeiros: jhass: I do think something is off if you have to check with an additional aid whether the signal has been sent before waiting for it.
[21:54:53] jottr: has joined #ruby
[21:55:05] jhass: nope, it's a really really common thing to do
[21:55:05] Blaguvest: has joined #ruby
[21:55:06] apeiros: but my thread experience is too limited to know this like "oh, generic case X, you're doing Y wrong, use Z instead".
[21:55:19] apeiros: jhass: a lot of bad code is common.
[21:55:27] toretore: java wait/notify behaves the same way afaik
[21:55:31] jhass: don't be confused by the name similarity, the conditionvariable signal and the @signalled are two different things
[21:56:19] jhass: think of the classic Queue, you'll put the wait in pop in a loop to check for empty, same thing
[21:56:38] einarj: has joined #ruby
[21:56:42] balazs: has joined #ruby
[21:57:04] jhass: it guards against contention and random interrupts
[21:57:24] gnudon: has joined #ruby
[21:57:47] fabrice31: has joined #ruby
[21:57:48] bronson: has joined #ruby
[21:58:10] pabs: has joined #ruby
[21:58:15] olistik: has joined #ruby
[21:58:21] lkba: has joined #ruby
[21:58:33] Azulinho: has joined #ruby
[21:58:39] toretore: i guess what's missing are more higher-level concurrency primitives
[21:58:44] AndChat-43764: has joined #ruby
[21:58:52] jhass: concurrent-ruby has some I've heard
[21:58:55] beef-wellington: has joined #ruby
[21:59:13] toretore: and "concurrent" too
[22:00:06] jhass: you waiter is actually a high level primitive, but I can't remember the proper name :/
[22:00:40] apeiros: not really
[22:00:49] apeiros: it'd be a "singlebarrier" :D
[22:00:57] apeiros: barriers wait for N entities to complete
[22:01:10] apeiros: where N is variable.
[22:01:16] apeiros: not fixed.
[22:01:19] jhass: the main thread and the one
[22:01:21] decoponio: has joined #ruby
[22:01:27] Thomas-0725: has joined #ruby
[22:01:32] toretore: just replace with wait_until{ @counter == @n }
[22:01:33] jhass: running the schedule thing
[22:02:01] jhass: I guess you could use an Exchanger too and trade nil :P
[22:02:23] lkba_: has joined #ruby
[22:02:27] simplyianm: has joined #ruby
[22:02:29] Scripore: has joined #ruby
[22:04:08] lkba: has joined #ruby
[22:04:10] Mweshi: has joined #ruby
[22:04:31] micalexander: has joined #ruby
[22:05:25] lkba: has joined #ruby
[22:05:59] schov: has joined #ruby
[22:06:46] schov: I have a basic query. If user enters a number using gets.chomp how can i check if it's an integer?
[22:06:53] micalexander: I want to include mina-deploy https://github.com/mina-deploy into my gem and work directly with it allowing me to have access to the variables set in the config/deploy.rb. What is the best way to do this? Am I stuck with only being about to call its commands using exec? Or can I interface with it directly?
[22:06:53] hotpancakes: has joined #ruby
[22:07:11] apeiros: schov: Integer(input, 10) raises if input is not a valid base10 int
[22:07:18] swgillespie: has joined #ruby
[22:07:18] jhass: schov: if input[/\A\d+\z/]
[22:07:25] apeiros: schov: alternatively use highline. I think it's got stuff for that
[22:07:29] allomov: has joined #ruby
[22:07:33] apeiros: jhass: missing neg. int already ;-p
[22:07:37] Sembei: has joined #ruby
[22:07:52] jhass: fine add a -?
[22:08:00] apeiros: is +10 valid?
[22:08:21] apeiros: how do you know?!? that's a question for schov!
[22:08:37] havenwood: =>> Integer("+10")
[22:08:45] weemsledeux: has joined #ruby
[22:09:08] swgillespie: has joined #ruby
[22:09:21] apeiros: ok, I'm honestly not sure anymore how I implemented Thread.stopped
[22:09:41] apeiros: when I think about it now, it seems to me it'd have to signal *after* calling sleep. but that's impossibru :<
[22:09:52] apeiros: and spinning is fugly
[22:09:54] havenwood: oops, there's a new test for elixir.rb - i did it wrong >.>
[22:11:00] havenwood: well, accidentally correct \o/
[22:11:29] havenwood: testing anyways so i don't break my accidental correctness in refactor :)
[22:11:46] apeiros: ooooh, silly me!
[22:11:57] toretore: has joined #ruby
[22:12:41] apeiros: no. while I had an idea which makes implementing Thread.stopped stupidly simple, it's probably also a way any truly parallel ruby would dislike???
[22:13:37] zacstewart: has joined #ruby
[22:14:38] apeiros: "rb_thread_sleep_deadly" uh?
[22:14:49] apeiros: what are you doing, ruby?!
[22:14:51] Thomas-0725: has joined #ruby
[22:15:33] allcentury: has joined #ruby
[22:16:16] apeiros: hm, that stupidly easy way doesn't even work :-/
[22:17:00] bricker1: has joined #ruby
[22:17:38] jhass: class LazyThread; def initialize(&code); @code = code; end; def start; @thread.new(&@code); end; end; + delegate stuff
[22:17:56] jhass: er, @thread = Thread
[22:18:43] apeiros: and then somebody calls LazyThread.start and you're f'ed :-p
[22:18:52] apeiros: but ok, that's a line I didn't consider.
[22:19:16] apeiros: use SimpleDelegator
[22:19:51] apeiros: as Thread.stopped, the only way I can currently think of is by spinning
[22:20:13] apeiros: def Thread.stopped(*args); th = Thread.new do; sleep; yield(*args); end; Thread.pass until th.sleep?; th; end
[22:20:26] toretore: class LazyThread < Thread; def initialize(&b); m, cv = Mutex.new, ConditionVariable.new; super{ m.sync{ cv.wait(m); } }; end; def start; cv.signal; end; end ?
[22:21:00] toretore: and a b.call after the wait there
[22:21:03] apeiros: I wouldn't want a special .start
[22:21:09] apeiros: I'd want .wakeup to work
[22:21:18] micalexander: I want to include mina-deploy https://github.com/mina-deploy into my gem and work directly with it allowing me to have access to the variables set in the config/deploy.rb. What is the best way to do this? Am I stuck with only being about to call its commands using exec? Or can I interface with it directly?
[22:21:37] apeiros: but yeah, can check whether it's not yet started in wakeup and branch to start/wakeup
[22:22:17] toretore: that should work
[22:22:45] apeiros: I wonder how many things one can do wrong adding the whole thread api, tho
[22:25:11] crdpink2: has joined #ruby
[22:25:12] Zai00: has joined #ruby
[22:25:54] toretore: so immediately after a `Thread.new{};here`, can i safely assume that this thread is running?
[22:26:26] xkef: has joined #ruby
[22:26:42] prestorium: has joined #ruby
[22:27:52] juanpablo_: has joined #ruby
[22:28:55] Antiarc: toretore: you can assume that it will run at some time now or in the future
[22:30:00] Antiarc: Though it may also be that that thread has run and terminated by the time that next instruction is reached
[22:30:01] toretore: by that i mean assume that the scheduler knows about the thread and that i can use a Mutex without risking a deadlock
[22:30:23] ryanprior: has joined #ruby
[22:30:40] girakrok: has joined #ruby
[22:30:58] jhass: mh, well except for the case Antiarc just mentioned
[22:31:31] jhass: but if you can assure that your thread won't exit till whatever you do in the mutex is done, it's okay
[22:31:41] ryanprior: I want to split a string like "cow cat=yellow dog=black" into an array ["cow", "cat=", "yellow", "dog=", "black"]
[22:32:00] Antiarc: How would you achieve a deadlock with a single mutex, anyhow?
[22:32:04] hotpancakes: has joined #ruby
[22:32:05] toretore: ok, that's what i meant
[22:32:18] Antiarc: I'm trying to figure that one out and can't come up with a case for it, though it may be that I am just not thinking about it sufficently thoroughly
[22:32:31] toretore: Antiarc: well, not an actual deadlock, but ruby telling me about a "possible deadlock"
[22:32:34] Antiarc: Taking a reentrant mutex will throw an exception anyhow
[22:32:47] toretore: as it does in that case
[22:32:49] blackmesa: has joined #ruby
[22:33:02] bungoman: has joined #ruby
[22:33:25] bluOxigen: has joined #ruby
[22:33:41] existensil: has joined #ruby
[22:33:45] bluOxigen: has joined #ruby
[22:33:48] bricker: has joined #ruby
[22:33:55] jhass: ryanprior: .split(/(?: |(?<==))/)
[22:34:10] bluOxigen: has left #ruby: ()
[22:35:18] toretore: i'd do split(' ').map{|s| s.split('=') }
[22:35:30] jhass: read again
[22:35:32] ljarvis: that doesn't do the same thing
[22:35:45] jhass: but derp, .split(/ |(?<==)/)
[22:35:55] toretore: >>"cow cat=yellow dog=black".split(' ').flat_map{|s| s.split('=') }
[22:35:56] ruboto: toretore # => ["cow", "cat", "yellow", "dog", "black"] (https://eval.in/396830)
[22:36:03] toretore: ok youre right
[22:36:20] mike___1234: has joined #ruby
[22:36:30] toretore: i'm just assuming that these are parameter keys that may or may not have values
[22:36:58] jhass: and how do you differentiate the keys from the values if you drop the =?
[22:37:03] toretore: >>"cow cat=yellow dog=black".split(' ').map{|s| s.split('=') }
[22:37:04] ruboto: toretore # => [["cow"], ["cat", "yellow"], ["dog", "black"]] (https://eval.in/396831)
[22:37:31] apeiros: ACTION somewhat suspects that ryanprior will do something after that split which would make a different approach better
[22:37:35] jhass: meh, I should just say good night for today
[22:37:47] xkef: has joined #ruby
[22:37:51] mgorbach: has joined #ruby
[22:38:30] toretore: it sounds like they are asking about what they think is a partial solution on the way to the final solution
[22:38:34] apeiros: jhass: do the same as I did - say good night and stay around :-p
[22:38:48] apeiros: toretore: yupp.
[22:39:03] apeiros: and I suspect it's a bad partial solution to the real goal.
[22:39:16] apeiros: or rather: it's a bad partial solution to what I suspect to be the real goal.
[22:39:35] existensil: has joined #ruby
[22:40:29] hotpancakes: has joined #ruby
[22:42:45] xkef_: has joined #ruby
[22:43:15] Yiota: has joined #ruby
[22:44:01] ryanprior: apeiros: I'm doing bash completions and want to be able to check for '=' as I go.
[22:44:53] allcentury: has joined #ruby
[22:45:43] ryanprior: apeiros: if I get more sophisticated in the future, I'll use an actual parser for command line strings and build a data structure. But for the time being I'm just tokenizing it, checking the end of strings for '=', etc.
[22:45:56] phutchins2: has joined #ruby
[22:46:03] Thomas-0725: has joined #ruby
[22:46:15] ryanprior: incidentally: nobody knows of a ruby parser for system shell strings that builds a data structure, do they?
[22:47:12] fgo: has joined #ruby
[22:47:20] apeiros: see whether Shellwords covers what you need
[22:47:33] workmad3: has joined #ruby
[22:48:46] apeiros: if you're processing shell argv data, split is the wrong choice anyway. you'll handle none of the edge cases (quoted values etc.)
[22:49:02] apeiros: you should use Shellwords.split for that and postprocess for =
[22:49:05] ryanprior: apeiros: Shellwords doesn't do anything with constructs of the type --foo=bar afaik
[22:49:17] apeiros: no, it doesn't. as that's a single argument.
[22:49:24] apeiros: it's optionparsers which do something with that.
[22:49:28] apeiros: not the shell.
[22:49:30] blenny: has left #ruby: ()
[22:49:41] apeiros: and it's depending on the individual optionparser what it actually does with it.
[22:49:50] Thomas-0725: text="someTextWithoutSpaces"; words=["some", "words"]; ... Is there an obvious, easy solution to find the index of the first character of a word in text that is not in words? e.g. first_difference("thisIsText", ["this", "text"]) == 5
[22:49:55] apeiros: e.g. whether -xyz is a single flag "xyz" or a contraction of "-x -y -z"
[22:50:11] apeiros: so all *those* special cases are still undealt with.
[22:50:44] apeiros: Thomas-0725: do you mean == 4?
[22:50:56] apeiros: remember, strings are 0 indexed
[22:50:58] Thomas-0725: apeiros, I do. My mistake
[22:51:02] ryanprior: apeiros: I do want something like an option parser.
[22:51:26] apeiros: ryanprior: I don't know your use case, but remember that each optionparser deals with options differently. see my example.
[22:51:33] Fezzler: has joined #ruby
[22:52:03] ryanprior: apeiros: my use case is writing bash completions, so option parsers that just take an option string and return a data structure representing its contents aren't actually that useful
[22:52:07] ljarvis: and good option parsers will allow you to configure the ambiguity away
[22:52:23] apeiros: ryanprior: you keep repeating that. it doesn't really provide meaningful context, though.
[22:53:09] ryanprior: hmm, I'm not sure what more to say
[22:53:46] Thomas-0725: apeiros, for more context, see here ( http://pastebin.com/kd7hf2Nh ) ... specifically, the PigLatinConsonants.first_non_consonant_position(word) method.
[22:53:47] ruboto: Thomas-0725, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/275e3ae52357e2a5c338
[22:53:47] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:54:17] existensil: has joined #ruby
[22:54:53] NeverDie: has joined #ruby
[22:55:34] apeiros: Thomas-0725: I don't have any obvious way, and too late for me to come up with something sensible.
[22:55:59] Thomas-0725: alrighty. Anyone else?
[22:56:00] apeiros: also the rules matter a bit. e.g. foo("thisthis", ["this"]) == 4 or nil?
[22:56:15] micalexander: I want to include mina-deploy https://github.com/mina-deploy into my gem and work directly with it allowing me to have access to the variables set in the config/deploy.rb. What is the best way to do this? Am I stuck with only being about to call its commands using exec? Or can I interface with it directly?
[22:56:31] Thomas-0725: apeiros it would equal nil
[22:57:04] apeiros: and what about "thisthis", ["is", "thi"] ?
[22:57:29] apeiros: (or just "this", ["is", "thi"])
[22:57:48] arooni-mobile: has joined #ruby
[22:58:10] Thomas-0725: in that case, we would seek for the longer words first, which would mean that "s" would be excluded, and the return value would be 3.
[22:58:20] rehat: has joined #ruby
[22:58:48] apeiros: so text already hit is no longer eligible
[22:59:03] apeiros: kinda important for a correct algorithm :-p
[22:59:21] apeiros: any characters which can't be in the string? e.g. "\0"?
[22:59:47] apeiros: can't -> are not allowed (in the original string)
[22:59:48] rehat: I need help with reading ruby docs. I am reading a tutorial on Mechanize and it has this line 'agent.page.parser.css('form')' I see the parser method in the doc but not css. Am I reading this wrong?
[23:00:16] Thomas-0725: apeiros, we can assume that the original string is just lowercase, alphabetical characters.
[23:00:39] apeiros: Thomas-0725: k. gsub your way through it, replacing stuff with \0 of same length. then just =~ /[^\0]/ :)
[23:01:03] chipotle: has joined #ruby
[23:01:14] existensil: has joined #ruby
[23:01:30] zacstewart: has joined #ruby
[23:01:39] Thomas-0725: =~ returns the position of the first exclusion? I thought it returned false. Also, did you view the pastebin/gist.github post? I believe you have described what I already did.
[23:01:57] apeiros: >> t="thisIsText"; ws=["this", "text"]; ws.each do |w| t.gsub!(w, "\0"*w.size) end; t =~ /[^\0]/
[23:01:58] ruboto: apeiros # => 4 (https://eval.in/396832)
[23:02:11] apeiros: =~ returns the position of the match
[23:02:14] apeiros: nil if nothing matched
[23:02:23] apeiros: docs help with such things ;-p
[23:02:26] Thomas-0725: oh ok. That is convenient. I was using .index
[23:02:49] Thomas-0725: In any case, our solutions are essentially the same. So now I at least have backup that my solution doesn't have any glaring issues.
[23:02:52] apeiros: Thomas-0725: oh, also "Text" != "text"
[23:03:02] Thomas-0725: right right. I downcase the input string
[23:03:13] Thomas-0725: I was using caps only to highlight word spacing for you, my human reader.
[23:03:16] simplyianm: has joined #ruby
[23:03:18] xkef: has joined #ruby
[23:04:28] bubbys: has joined #ruby
[23:04:55] apeiros: k, kinda important too :-p
[23:05:06] apeiros: ("kinda important" = include it in your descriptions)
[23:06:18] eggoez: has joined #ruby
[23:07:20] Thomas-0725: ok. Well, issue solved. I posted the paste to clarify any ambiguity in my original question. I will note however to be more specific with future questions.
[23:09:49] xxneolithicxx: has joined #ruby
[23:14:55] hololeap: has joined #ruby
[23:15:25] charlenopires: has joined #ruby
[23:15:35] sross07: has joined #ruby
[23:15:39] casadei_: has joined #ruby
[23:15:57] fenjamin: has joined #ruby
[23:16:32] hotpancakes: has joined #ruby
[23:16:46] but3k4: has joined #ruby
[23:17:07] fenjamin: im looking at destructive methods and {|tree| tree + " Tree"}
[23:17:53] fenjamin: more specifically trees.collect! {|tree| tree + " Tree"}
[23:18:15] cout: fenjamin: if you start with Zero then the result should should be a multiple of Tree :)
[23:18:33] fenjamin: i've assigned trees to an array and would like to understand more about {|tree| tree + " Tree"}
[23:19:09] fenjamin: |tree| what does that mean?
[23:19:18] adaedra: argument of a block
[23:19:35] Antiarc: That's just a block which accepts a argument named "tree", and calls tree.+("Tree") and returns the result
[23:19:57] fenjamin: it inserts Tree into the array
[23:20:08] RobertBirnie: has joined #ruby
[23:20:21] simplyianm: has joined #ruby
[23:20:26] Antiarc: http://ruby-doc.org/core-2.2.0/Array.html#method-i-collect-21
[23:20:29] Antiarc: That should explain it
[23:20:52] i8igmac: has joined #ruby
[23:22:13] fenjamin: the array is called trees - how does it unerstand |trees|?
[23:22:47] adaedra: { ... } is a block, it will be called by collect! for each element of the array
[23:23:12] fenjamin: if i call an array times then call the item |time| Ruby understand singular?
[23:23:16] fenjamin: does that makes sense?
[23:23:17] RobertBirnie: has joined #ruby
[23:23:21] Antiarc: The name doesn't matter
[23:23:30] adaedra: tree is a parameter (like in a function/method), and is passed array elements one by one
[23:23:34] fenjamin: ok so item can be anything
[23:23:43] Antiarc: Yes, you should read up on Ruby blocks
[23:24:45] WeiJunLi: has joined #ruby
[23:25:05] fenjamin: i didn't declare tree as a parameter, i can still call |tree| (or |treats| or |trease|) and it still understands as an item?
[23:25:22] Scripore: has joined #ruby
[23:26:14] fenjamin: and so || is to declare an item without using a parameter?
[23:26:24] weemsledeux: has joined #ruby
[23:26:25] Thomas-0725: fenjamin, when you call a method and give it a {block}, it basically uses the {block} as a separate method with parameters in |here| instead of (here). So trees.each { |variable| some code} basically means that it will take every item in the array trees and pass it, one-by-one, into the block of code you give it with the individiaul elements passed in as the |tree| parameter.
[23:27:37] fenjamin: I understand clearly!
[23:28:58] Thomas-0725: Like Antiarc said, it will help you to read up on code blocks, Enumerable class, and Enumerable methods. fenjamin
[23:29:04] apeiros: fenjamin: same as with a method or any other variable
[23:29:18] apeiros: def foo(bar) # ruby does not care that you named the argument "bar". it's not relevant to ruby.
[23:29:18] Antiarc: Understanding blocks is pretty fundamental to grokking Ruby
[23:29:21] Antiarc: It's worth spending some time on
[23:30:03] apeiros: same with trees = ["some", "trees"]. ruby has no concept of language. it doesn't understand that your variable refers to a concept in the real world. you could just as well assign those values to x0123z
[23:30:03] fenjamin: you would only declare a parameter if you have no use immediately using it
[23:30:32] dopie: has joined #ruby
[23:31:18] Cache_Money: has joined #ruby
[23:32:02] phutchins2: has joined #ruby
[23:32:37] fenjamin: blocks really really want to use a method that you didn't do anything to previously
[23:32:52] fenjamin: *use blocks when you really really want to use a method that yo udidn't do anything to previously
[23:33:30] apeiros: I don't think I understood what you were saying in any of the last 3 messages of yours???
[23:34:12] fenjamin: when you declare a method without a parameter you can use a block on that method when you suddenly need to do something to that method
[23:34:33] fenjamin: parameters merely save an ability to perform something
[23:34:34] apeiros: fenjamin: anyway, let me phrase it differently: *all* names in a computer program are *for you*, the programmer. the computer doesn't care at all. all it needs is that different variables have different names.
[23:34:59] fenjamin: aperios: i know and love this part of ruby. my programming school curriculm feels otherwise.
[23:35:08] apeiros: fenjamin: use tab completion. my nick ain't aperios.
[23:35:48] fenjamin: which makes it tremendously confusing and hard to understand because i feel like i'm performing a routine of "who's on first"
[23:36:14] apeiros: parameters don't save an ability to perform something.
[23:36:17] apeiros: parameters pass values.
[23:36:28] apeiros: from one part of your program to another.
[23:36:35] nertzy: has joined #ruby
[23:36:51] fenjamin: but in and of themselves are useless until you perform an action on them
[23:36:54] apeiros: whether you do something with that parameter immediately or later is up to the method. it's not part of it being a parameter.
[23:36:56] Pupeno_: has joined #ruby
[23:37:19] fenjamin: apeiros, cool
[23:37:20] apeiros: um. you could say that about all data.
[23:37:29] fenjamin: this helps me to learn
[23:38:01] apeiros: regardless of whether the data is passed as params or not??? data you don't do something with is useless (even if "do something" just means "store it to disk")
[23:39:23] Thomas-0725: has joined #ruby
[23:40:32] MichaelGG: has joined #ruby
[23:43:33] zacstewart: has joined #ruby
[23:43:44] LeDiegue: has joined #ruby
[23:45:20] davedev24: has joined #ruby
[23:45:30] zacstewart: has joined #ruby
[23:46:04] chipotle: has joined #ruby
[23:46:22] leonardoajim: has joined #ruby
[23:47:12] hakunin_: has joined #ruby
[23:48:56] armyriad: has joined #ruby
[23:54:49] MichaelGG_: has joined #ruby
[23:54:59] bmurt: has joined #ruby
[23:55:06] dgutierrez1287: has joined #ruby
[23:56:41] davedev24: has joined #ruby
[23:57:07] CloCkWeRX: has joined #ruby
[23:58:39] fabrice31: has joined #ruby