« Back to channel list

#ruby - 31 May 2015

« Back 1 day Forward 1 day »
[00:03:35] ronh-: has joined #ruby
[00:03:46] ronh-: has left #ruby: ()
[00:03:57] segfalt: has joined #ruby
[00:04:43] sdwrage: has joined #ruby
[00:04:56] aeontech: has joined #ruby
[00:05:33] claw: hey there
[00:05:52] starless: has joined #ruby
[00:06:12] claw: i want to collect 100 elements in an array with 1M elements
[00:06:23] claw: i use select
[00:06:38] jhass: just random 100 elements?
[00:06:52] claw: performance problem: select continous even if i have the 100 elements
[00:07:02] claw: so i know how many are in there
[00:07:14] claw: so actually could stop if i got that amount
[00:07:19] claw: i could that be done ?
[00:07:46] havenwood: >> 1.upto(Float::INFINITY).lazy.select(&:even?).first 5
[00:07:48] ruboto: havenwood # => [2, 4, 6, 8, 10] (https://eval.in/373111)
[00:07:49] mello: has joined #ruby
[00:08:48] claw: okay that proofs that first actually stops it
[00:09:15] jhass: are the elements you're going to select consecutive items by any chance?
[00:09:26] havenwood: claw: Say more about what you're doing?
[00:09:32] claw: i thought i will continue till end and then first will select the first 5 of the whole result
[00:09:59] claw: havenwood: i think you already provided the solution
[00:10:04] Diabolik: jhass i finished the core code in my app, but i don't know how to test the prime_grid, since i've never done rspec outside of rails
[00:10:05] Diabolik: https://github.com/askl56/PrimeTime/blob/master/lib/prime_grid.rb
[00:10:12] claw: i will test that thanks so far
[00:10:32] jhass: Diabolik: check the docs, they'll get you started with the project setup
[00:10:56] gkra: has joined #ruby
[00:11:03] jhass: claw: you did notice the .lazy. in there?
[00:11:19] Limix: has joined #ruby
[00:12:05] claw: i just looked that up jhass
[00:12:14] claw: did not know lazy before
[00:12:22] claw: and thats what i was searching
[00:13:07] bruno-: has joined #ruby
[00:13:15] bkxd: has joined #ruby
[00:19:51] railsForDaiz: has joined #ruby
[00:23:38] luckyme: has joined #ruby
[00:23:42] iamninja: has joined #ruby
[00:26:05] davedev24_: has joined #ruby
[00:29:42] OrbitalKitten: has joined #ruby
[00:29:48] sinkensabe: has joined #ruby
[00:33:24] lennae: has joined #ruby
[00:34:15] Kevifo: has joined #ruby
[00:34:42] Kevifo: So in Ruby, private protects against an explicit receiver?
[00:36:23] zarubin: has joined #ruby
[00:37:25] Kevifo: What's the point really?
[00:38:54] jenrzzz: has joined #ruby
[00:41:06] spiderbyte: has joined #ruby
[00:41:09] gluten_hell_: has joined #ruby
[00:42:41] jhass: declaring intent
[00:43:37] mistermocha: has joined #ruby
[00:44:16] rht: has joined #ruby
[00:44:49] cryptarium: has joined #ruby
[00:45:10] kayloos: has joined #ruby
[00:48:58] Muhannad: has joined #ruby
[00:49:29] Kevifo: In the pickaxe book, are there only the first 400 pages that describes the language?
[00:49:48] Kevifo: I think the other pages describe the modules and standard class methods etc.
[00:50:07] Muhannad: has joined #ruby
[00:50:38] asteros: has joined #ruby
[00:51:34] bogdanteleaga: has joined #ruby
[00:51:51] robustus|Off: has joined #ruby
[00:53:00] ddarkpassenger: has joined #ruby
[00:53:24] RegulationD: has joined #ruby
[00:56:14] chipotle: has joined #ruby
[00:56:40] Jello_Raptor: when I try to use "require 'rake'" it immidiately turns my application into a full rake task, before I can actually monkey-patch the internals.
[00:58:03] knowtheory: has joined #ruby
[00:58:25] codeFiend: has joined #ruby
[00:59:00] ghr: has joined #ruby
[00:59:17] cubesandcode: has joined #ruby
[01:02:16] c_u_u_n_t_: has joined #ruby
[01:04:11] jhass: !kick c_u_u_n_t_ try a better nick
[01:04:11] helpa: jhass: No.
[01:04:12] ruboto: ruboto kicked c_u_u_n_t_: a better nick
[01:04:12] ruboto: -o ruboto
[01:04:12] c_u_u_n_t_: has joined #ruby
[01:04:28] c_u_u_n_t_: what is wrong with my nick?
[01:04:36] kinduff: has joined #ruby
[01:04:36] kinduff: has joined #ruby
[01:04:46] jhass: don't argue, you have one minute
[01:05:08] c_u_u_n_t_: I'm not arguing. you're being disrespectful
[01:05:24] jhass: 30 seconds
[01:05:55] c_u_u_n_t_: #Ruby does not kindly welcome new users
[01:06:11] c_u_u_n_t_: the #Ruby community is very hostile and toxic
[01:06:19] c_u_u_n_t_: I regret learning ruby
[01:06:32] c_u_u_n_t_: has left #ruby: ()
[01:06:39] bkxd: you will be sorely missed...
[01:06:55] gattuso: ty for the monologue :-D
[01:07:20] Hijiri: has joined #ruby
[01:08:36] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, miah, workmad3, Coraline, drbrain, sevenseacat, slyphon, zenspider, Aria, ljarvis, rubyhacker1
[01:08:49] baweaver: oh, jhass already saw it
[01:09:13] baweaver: ACTION wanders back off
[01:13:49] kt2: has joined #ruby
[01:17:57] iamninja: has joined #ruby
[01:18:59] Guest50824: has joined #ruby
[01:20:55] rikai: has joined #ruby
[01:24:25] ScriptGeek: has joined #ruby
[01:25:03] ScriptGeek: How to put a method reference into a hash to be executed later?
[01:25:50] jhass: ScriptGeek: use a symbol and public_send or wrap it into a proc
[01:26:23] ScriptGeek: thanks, I'll check it out
[01:27:44] havenwood: >> {newline: method(:puts)}[:newline].call 'ScriptGeek'
[01:27:45] ruboto: havenwood # => ScriptGeek ...check link for more (https://eval.in/373149)
[01:28:02] jhass: oh, or method right
[01:28:08] arescorpio: has joined #ruby
[01:28:10] jhass: sign I should go to bed
[01:28:12] Musashi007_: has joined #ruby
[01:30:45] ScriptGeek: I'm looking to make a UI menu system for a text console program that uses recursion to navigate through a nested set of hashes and at some point I need to make calls to methods from within this recursive conundrum.
[01:32:05] ScriptGeek: havenwood: what does the >> mean ?
[01:32:26] S3thc0n: has joined #ruby
[01:32:37] havenwood: ScriptGeek: Just tells the bot to eval it.
[01:32:42] ruboto: havenwood # => 2 (https://eval.in/373154)
[01:33:09] ScriptGeek: >> hi little bot
[01:33:10] ruboto: ScriptGeek # => undefined local variable or method `bot' for main:Object (NameError) ...check link for more (https://eval.in/373155)
[01:37:36] rikai: has joined #ruby
[01:37:45] postmodern: does protected work across modules?
[01:37:57] ruboto: kinduff # => undefined local variable or method `hi' for main:Object (NameError) ...check link for more (https://eval.in/373156)
[01:38:14] postmodern: if i include the same module into multiple classes, and it defines the same protected method, can those classes access it from each other?
[01:38:39] ag4ve: has joined #ruby
[01:41:15] ag4ve: any intro tutorials for ruby syntax/parsing, variable types, blocks, scoping, sourcing/requiring
[01:42:17] centrx: ag4ve, http://tryruby.org/
[01:42:21] ag4ve: i want intro, but not the hello world stuff - i'm quite familiar with bash, perl, and some python, so don't want "this is a loop" but "this is how you uxe x feature of another language here" or "this is different"
[01:42:33] centrx: ag4ve, Ruby Monk
[01:42:51] jhass: ?quickref
[01:42:51] ruboto: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[01:42:54] pengin: has joined #ruby
[01:42:59] Ropeney_: has joined #ruby
[01:43:21] cubesandcode: has joined #ruby
[01:43:38] ag4ve: ah yeah, quickref looks like what i want - thanks
[01:45:50] jhass: ag4ve: also good might be to port one of your smaller scripts with that to ruby and then ask for style review here ;)
[01:47:12] ag4ve: hmmm, i don't see any discussion on scope or sourcing/namespace in that ref
[01:48:32] ag4ve: s/ref/quickref/
[01:49:01] jhass: modules are used as namespace, there's no "load file under this namespace"
[01:49:09] jhass: the toplevel is Object
[01:49:25] jhass: classes are modules, so they can be used as namespace too
[01:49:43] ag4ve: so you can't import functions from a module?
[01:49:58] jhass: you load files in ruby, not modules
[01:50:10] jhass: the files may define whatever, it's just convention
[01:51:59] Exponential: has joined #ruby
[01:53:16] pengin: has joined #ruby
[01:53:30] ag4ve: and documentation in ruby? pod or something else?
[01:54:22] jhass: rdoc and yard are the major formats, cli tool for accessing rdoc docs is ri, cli tool for yard docs is yri. rdoc comes with ruby, yard is a gem (library)
[01:54:51] Brozo: has joined #ruby
[01:54:54] jhass: notations are Class#instance_method and Class:class_method
[01:55:14] jhass: er, ::, not :
[01:55:44] jhass: popular online docs are ruby-doc.org and rubydoc.info
[01:56:22] ag4ve: i can handle rdoc :)
[01:56:36] mello: has joined #ruby
[01:58:42] ghr: has joined #ruby
[01:58:43] ag4ve: ah, so rdoc is just formatted comments?
[01:58:50] jhass: both are, yup
[01:59:11] ag4ve: weird, ok
[02:00:15] User458764: has joined #ruby
[02:01:15] ellisTAA: has joined #ruby
[02:02:20] ellisTAA: can anyone tell me how to use ARGV? i googled it but nothing good came up
[02:02:56] jhass: treat it like an array
[02:03:05] Soda: has joined #ruby
[02:03:18] jhass: put p ARGV into a foo.rb
[02:03:32] jhass: do ruby foo.rb; ruby foo.rb a b c
[02:04:41] ag4ve: ok, i don't get this and pp isn't showing me why:
[02:04:41] ag4ve: (1..10) === 10 # true
[02:04:41] ag4ve: (1...10) === 10 # false
[02:04:42] betahikaru: has joined #ruby
[02:04:49] ag4ve: https://pastebin.mozilla.org/8835256
[02:05:20] jhass: === is a method call, so Range#===
[02:06:03] jhass: http://ruby-doc.org/core-2.2.2/Range.html#method-i-3D-3D-3D
[02:06:19] ellisTAA: so do i always have to put the p for it to work?
[02:06:29] ellisTAA: so i put p argv anywhere where i want user input?
[02:06:33] jhass: the p is puts ARGV.inspect
[02:06:43] jhass: it's just so you can look at it
[02:06:53] jhass: as said, treat it like an array
[02:07:19] ellisTAA: so i put p ARGV in a file and when i ran it it returned an empty array. how could i get stuff into it?
[02:08:09] jhass: EllisTAA: I gave you two commands
[02:08:46] ellisTAA: ok intersting. how does it know to put a b and c into the argv?
[02:09:05] jhass: it's what ARGV is
[02:09:10] jhass: the commandline arguments
[02:09:30] jhass: experiment with calling it in different ways with different arguments
[02:10:05] ellisTAA: gotcha so argv is used specifically for command line programs? like i would write a file and the user would run it and add in some things that could be treated as options? like git commit -m ???asdfad??? could be using argv?
[02:10:34] jhass: it could, yes
[02:10:40] ellisTAA: when would i use argv and not gets?
[02:10:56] jhass: they're vastly different
[02:11:23] ellisTAA: seems like they both accept input
[02:11:23] jhass: gets reads from standard input, ARGV are the programs arguments (in fact any method of invoking a program can provide these)
[02:12:14] ellisTAA: ok so argv is for program arguments so it wouldn???t be used for regular input
[02:13:39] Azure: has joined #ruby
[02:14:00] ellisTAA: thanks for helping me understand argv
[02:17:15] davedev24_: has joined #ruby
[02:20:38] ellisTAA: has joined #ruby
[02:21:40] ag4ve: argv is given by the subprocess and gets is an fd
[02:22:09] ag4ve: s/is an/reads from/
[02:24:19] jokke: has joined #ruby
[02:26:12] jokke: has joined #ruby
[02:27:50] jokke: has joined #ruby
[02:27:53] codeFiend: has joined #ruby
[02:28:26] juanda: has joined #ruby
[02:30:18] [A]rmandoo: has joined #ruby
[02:30:41] chipotle: has joined #ruby
[02:32:25] jenrzzz: has joined #ruby
[02:32:49] ellisTAA: are there benefits to using colon on hash keys instead of quotes?
[02:33:07] MrBeardy: has joined #ruby
[02:33:58] ellisTAA: why do some people not use parentheses for their arguments?
[02:34:18] mistermocha: has joined #ruby
[02:34:28] shevy: how do I fetch error with Popen?
[02:34:39] shevy: right now I have:
[02:34:45] shevy: Open3.popen3(cmd_that_is_run_here) { |std_in, std_out, std_error, wait_thr|
[02:34:47] ScriptGeek: What is the meaning of this syntax? {newline: method(:puts)}[:newline].call
[02:34:50] havenwood: has joined #ruby
[02:35:01] shevy: and I get line-by-line input in a: loop { line = std_out.gets
[02:35:13] shevy: but line may be nil, and I assume it happens because some error happens
[02:35:42] shevy: ScriptGeek this seems to be a hash
[02:36:01] MrBeardy: ScriptGeek: Seems redundant, send(:puts) looks like it would achieve the same result
[02:36:16] shevy: method() is a method -> method :puts # => #<Method: Object(Kernel)#puts>
[02:36:22] [A]rmandoo: has left #ruby: ()
[02:36:26] MrBeardy: unless the hash is related to something, other than just being written as a standalone hash
[02:36:40] shevy: yeah it looks as if someone made a puts call more complicated than necessary
[02:36:56] ScriptGeek: yeah, I'm trying to put a method reference into a hash value
[02:37:05] zarubin: has joined #ruby
[02:37:10] shevy: ScriptGeek the part [:newline] is simply on a hash object, you ask for the value of the symbol-key called :newline
[02:37:33] ScriptGeek: so like this: hash[:newline] ?
[02:37:50] mistergibson: ScriptGeek : you might try MyHash[:key] = &method(:the_method_name)
[02:37:55] mistergibson: just off the top of my head
[02:38:07] shevy: ScriptGeek yeah
[02:38:26] ScriptGeek: mistergibson: I'll give that a shot
[02:39:45] shevy: I solved my problem, I needed to call the read() method on the stderror fd object std_error.read
[02:42:16] RegulationD: has joined #ruby
[02:42:29] mrsolo: has joined #ruby
[02:44:22] ohaibbq: has joined #ruby
[02:46:52] Tuccuay: has joined #ruby
[02:46:56] Tuccuay: has left #ruby: ()
[02:47:47] Limix: has joined #ruby
[02:48:38] roolo_: has joined #ruby
[02:49:08] shevy: hmm sinatra code has curious tidbits:
[02:49:11] shevy: @@eats_errors = Object.new
[02:49:13] shevy: def @@eats_errors.flush(*) end
[02:49:36] shevy: the .flush(*) part is to allow as many arguments as you want to?
[02:50:23] centrx: yeah they all get thrown away
[02:50:35] centrx: but that's not weirdest part
[02:53:37] last_staff: has joined #ruby
[02:55:12] Diabolik: shevy i decided to make my prime_finder.rb a module
[02:55:16] bkxd: has joined #ruby
[02:56:51] darkf: has joined #ruby
[02:57:09] choke: has joined #ruby
[02:57:10] Jello_Raptor: bah :/ I've no idea how to get this monkey patch working. I'm trying to patch rake internals, and a few functions out of "Rake::Module::TaskManager" I want to replace (they already exist in the original) but creating a new module with them and including it with "Rake::TaskManager" and "Rake::Application" isn't doint anything :/
[02:57:25] prereflect: has joined #ruby
[02:58:32] Jello_Raptor: i'm also including it in "Rake::Application" which imports "Rake::TaskManager" but that doesn't do anything either.
[02:59:12] ghr: has joined #ruby
[02:59:35] Jello_Raptor: some of the functions work one (overwriting initialize for one) but others refuse to over ride ("enhance_with_matching_rule")
[02:59:47] mrsolo: has joined #ruby
[02:59:53] Jello_Raptor: best I can tell, the latter set of functions tend to on;y be called relative to self
[03:02:15] baweaver: Diabolik: http://ruby-doc.org/stdlib-2.2.0/libdoc/prime/rdoc/Prime.html
[03:02:31] Diabolik: but i had to do it myself
[03:02:59] commondream: has joined #ruby
[03:03:58] shevy: Diabolik \o/
[03:04:13] Diabolik: how is the heart coming along
[03:04:43] cubesandcode: has joined #ruby
[03:05:15] ChanServ: -b ihatehonkies!*@*
[03:05:43] shevy: nah I finished that
[03:06:16] shevy: I am collecting ruby code that has to do with ascii
[03:09:13] starless: has joined #ruby
[03:09:20] havenwood: Diabolik: Is your code public? Curious to see your implementation.
[03:09:52] ellisTAA: has joined #ruby
[03:10:12] Diabolik: yes havenwood
[03:10:12] Diabolik: https://github.com/askl56/PrimeTime
[03:12:08] havenwood: Diabolik: I'd move `spec/lib/` to `spec/`.
[03:12:20] doctorly: has joined #ruby
[03:12:27] braincrash: has joined #ruby
[03:12:30] havenwood: Diabolik: I'd suggest moving toward gem conventions.
[03:12:36] Diabolik: in terms of?
[03:12:57] havenwood: Diabolik: Organization and naming.
[03:13:47] doctorly: Hello guys, I am having a problem when trying to use `green_shoes`. I cant seem to get anything to flow even when I do something as simple as: http://pastebin.com/Z3XXntgY it seems to stack elements instead of flow them. Is there something obvious I am missing or is this probably a system issue?
[03:13:48] ruboto: doctorly, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9c80c7bd0546647e741d
[03:13:48] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:14:09] havenwood: Diabolik: Here's an example gem structure: http://guides.rubygems.org/patterns/#consistent-naming
[03:14:15] pontiki: has joined #ruby
[03:14:19] bkxd_: has joined #ruby
[03:14:20] bronson: has joined #ruby
[03:15:14] Diabolik: so move main.rb to bin/main.rb?
[03:16:11] workmad3: has joined #ruby
[03:16:19] havenwood: Diabolik: I think more like to: bin/prime_time
[03:16:26] joneshf-laptop: has joined #ruby
[03:16:42] havenwood: Diabolik: For the `prime_time` executable.
[03:16:56] Diabolik: main.rb is the exec file
[03:16:58] Diabolik: so il move it
[03:18:31] Jello_Raptor: ACTION bangs his head against the wall
[03:18:46] Jello_Raptor: It was a fucking mismatched if else end >_<
[03:18:51] Diabolik: so the exec command is ruby bin/prime_time.rb --count 10?
[03:18:53] Diabolik: havenwood ^
[03:19:27] havenwood: Diabolik: Take a look at the Pry gem for an example of directory structure: https://github.com/pry/pry
[03:19:31] MrBeardy: Diabolik: remove the .rb, add a ruby shebang
[03:19:47] MrBeardy: http://en.wikibooks.org/wiki/Ruby_Programming/Hello_world#Executable_Ruby_scripts
[03:19:54] MrBeardy: doctorly: Do you need a separate flow call for each flowed block of code? Never used green_shoes, just going off one of the samples in the github repo
[03:19:58] havenwood: Diabolik: This is Pry's shebang for example: https://github.com/pry/pry/blob/master/bin/pry#L1
[03:20:47] MrBeardy: doctorly: try flow { para "test" }; flow { button "test" } and see if that works for you
[03:21:24] havenwood: Diabolik: The magic incantation is: #!/usr/bin/env ruby
[03:21:32] havenwood: Diabolik: man env
[03:22:01] Diabolik: havenwood as soon as i did this
[03:22:07] Diabolik: /Users/andrew/code/PrimeTime/lib/prime_finder.rb:33: warning: assigned but unused variable - multi
[03:22:17] Diabolik: it is used to build the times table
[03:22:22] havenwood: Diabolik: What's on line 33?
[03:22:32] Diabolik: multi = primes.map { |prime1| primes.map {|prime2| prime2 * prime1 } }
[03:22:53] havenwood: Diabolik: So you assign it there but don't later use it.
[03:22:54] pontiki: note: that is a warning, not an error
[03:23:12] havenwood: Diabolik: Why do you assign it if you're not going to use it?
[03:24:29] havenwood: Diabolik: Are you using it for the side effects? Should be map be an each and there be no multi assignment? Or do you mean to be using multi and something is amiss?
[03:24:46] Diabolik: it feeds into the matrix
[03:24:49] Diabolik: in prime_grid
[03:25:07] Diabolik: it was one of those "i don't know why this works but it does" moments that im trying to figure out
[03:25:20] Diabolik: its used in the executable
[03:25:29] Diabolik: prime_matrix = PrimeFinder.times_primes(primes_count)
[03:25:30] Diabolik: prime_grid = PrimeGrid.new prime_matrix
[03:25:30] Diabolik: prime_grid.render
[03:25:38] Musashi007: has joined #ruby
[03:25:47] doctorly: MrBeardy: putting each element in it's own block doesn't work either, having them in a block together should work too. I have seen so many examples, and just have no idea why it won't work, it should be pretty simple.
[03:25:53] Exuma: has joined #ruby
[03:26:13] havenwood: Diabolik: Ah, looking at the code you're just returning the map from that method. So just drop `multi =` since as the warning says it's unused.
[03:26:22] doctorly: MrBeardy: also, I did try to put them in their own blocks when you suggested it, I wasn't dismissing it.
[03:28:00] Diabolik: so havenwood
[03:28:03] Diabolik: having done all of this
[03:28:11] MrBeardy: doctorly: strange. Could it be the missing width and height? Maybe the result is being shrunk to fill the items.
[03:28:18] Diabolik: typing in just prime_time into terminal doesn't launch it
[03:28:24] MrBeardy: Oh, he left.
[03:28:49] MrBeardy: might need bin/prime_time
[03:28:49] havenwood: Diabolik: If you installed it as a gem, it would make the executable in bin/ as referenced in your gemspec available in your PATH.
[03:29:13] havenwood: Diabolik: You can cd to bin/ and run ./prime_time after you `chmod +x prime_time`.
[03:29:54] cubesandcode: has joined #ruby
[03:29:58] havenwood: Diabolik: To make a file executable via its shebang you need to change the file mode to allow execution.
[03:30:10] Diabolik: ok i did that
[03:30:13] chipotle: has joined #ruby
[03:30:26] Diabolik: but now in order to make it runnable from the home directory i need to make it a gem
[03:30:53] havenwood: Diabolik: Like any other executable you can create a shim in a directory that's already in your PATH or make a symlink.
[03:31:15] havenwood: Diabolik: But yeah, if you go ahead and create a gemspec and install the gem it'd be a nice way to do all that.
[03:31:34] havenwood: Diabolik: It's a good exercise to learn to create a gem.
[03:31:40] Diabolik: ive built a gem before
[03:31:53] havenwood: Diabolik: If I create a script I often first create a single file executable then extract it into a gem.
[03:32:00] pontiki: is starting these things off by doing `bundle gem my_script -b` considered pass???
[03:32:03] mmazing: has joined #ruby
[03:32:07] Diabolik: https://github.com/askl56/Seller
[03:32:33] charliesome: has joined #ruby
[03:33:08] doctorly: has joined #ruby
[03:33:16] doctorly: I have another question for you guys, is green_shoes the best cross-platform and easy gui gem?
[03:33:36] mrsolo: has joined #ruby
[03:33:37] havenwood: pontiki: I think that's a fine way to start.
[03:34:00] Diabolik: havenwood do you think the code/explanations are ok
[03:34:12] choke: has joined #ruby
[03:34:15] MrBeardy: doctorly: since you left earlier: <MrBeardy> doctorly: Could it be the missing width and height? Maybe the result is being shrunk to fill the items.
[03:34:37] bkxd: has joined #ruby
[03:35:11] doctorly: MrBeardy: sorry, I accidentally dc'd. I was trying to make it very big earlier to make sure, and that wasn't helping. I will try again really fast though
[03:35:58] MrBeardy: doctorly: No worries about the d/c. Sorry I can't really help much other than speculate either, since I've never used the gem.
[03:36:56] havenwood: Diabolik: I like the Module with module_function. I don't think 10 makes sense as a default n parameter for find_primes.
[03:36:58] doctorly: MrBeardy: Yeah, that didn't work either. I am convinced it is a system issue or something now. This is supposed to be very easy haha. Thanks for the help though.
[03:37:11] havenwood: Diabolik: I prefer: infinity = Float::INFINITY
[03:37:42] havenwood: Diabolik: I think it's better to use the constant than rely on division to get there.
[03:38:13] havenwood: Diabolik: #none? instead of !#any?
[03:39:37] MrBeardy: doctorly: I looked at the tutorials: coult it be that `para` is automatically creating a line break because it's a paragraph?
[03:39:57] MrBeardy: doctorly: try edit_line and button after each other in a flow block
[03:40:09] mistermocha: has joined #ruby
[03:43:08] MrBeardy: Oh, I was looking at the `shoes`, but `green_shoes` might have the same functions and functionality
[03:43:41] starless: has joined #ruby
[03:44:39] starless: has joined #ruby
[03:44:46] CloCkWeRX: has joined #ruby
[03:45:20] mello: has joined #ruby
[03:47:27] commondream: has joined #ruby
[03:48:06] jpfuentes2: has joined #ruby
[03:50:03] bruno-: has joined #ruby
[03:50:18] Contigi: has joined #ruby
[03:51:49] cats: has joined #ruby
[03:53:46] codeFiend: has joined #ruby
[03:54:34] doctorly: MrBeardy: Ok, I got it working now. It was that I needed to specify a width for each flow. I think that is what you were saying before but I misunderstood and thought you meant width for the entire window. The flows were definitely defaulting to maximum window length and then wrapping. I am pretty sure all the guides I have been looking at are really old haha. Thanks for the help, should be pretty easy now.
[03:55:18] Oog: has joined #ruby
[03:55:33] Xoro: has joined #ruby
[03:57:05] Oog: has joined #ruby
[03:57:43] MrBeardy: doctorly: I did mean the entire window, heh. Good job on getting it to work!
[03:59:04] ghr: has joined #ruby
[03:59:13] rhg135: has joined #ruby
[03:59:53] DerisiveLogic: has joined #ruby
[03:59:54] doctorly: MrBeardy: Oh well you were steering me in the right direction. Hopefully the chat log can help someone else in the future. Seeya, thanks again.
[04:03:07] macmartine: has joined #ruby
[04:03:42] pengin: has joined #ruby
[04:03:49] Limix: has joined #ruby
[04:03:51] charliesome: has joined #ruby
[04:04:40] Guest50824: has joined #ruby
[04:08:31] ByronJohnson: has joined #ruby
[04:10:40] mrsolo: has joined #ruby
[04:13:07] Nuck: has joined #ruby
[04:13:51] rkazak: has joined #ruby
[04:14:20] pengin: has joined #ruby
[04:14:58] braincra-: has joined #ruby
[04:15:59] djbkd: has joined #ruby
[04:16:37] choke: has joined #ruby
[04:18:25] NightMonkey: has joined #ruby
[04:20:20] jpfuentes2: has joined #ruby
[04:23:54] pocketprotector: has joined #ruby
[04:25:27] Scripore: has joined #ruby
[04:26:10] macmartine: has joined #ruby
[04:26:57] ellisTAA: has joined #ruby
[04:28:56] Hobogrammer: has joined #ruby
[04:29:01] Nuck: has joined #ruby
[04:29:01] darkf: has joined #ruby
[04:29:05] nateberkopec: has joined #ruby
[04:30:08] choke: has joined #ruby
[04:31:08] RegulationD: has joined #ruby
[04:35:54] jenrzzz: has joined #ruby
[04:36:17] towski_: has joined #ruby
[04:37:45] zarubin: has joined #ruby
[04:38:02] commondream: has joined #ruby
[04:41:30] The_Phoenix: has joined #ruby
[04:42:29] towski_: has joined #ruby
[04:44:34] ellisTAA: can anyone recommend some good code for me to read?
[04:49:39] Scripore: has joined #ruby
[04:49:44] balazs: has joined #ruby
[04:50:59] Xiti: has joined #ruby
[04:51:33] commondream: has joined #ruby
[04:52:25] existensil: https://github.com/ruby-concurrency/concurrent-ruby
[04:52:35] existensil: EllisTAA: ^^ recommended reading
[04:54:29] ellisTAA: existensil: what should i read after the readme
[04:54:33] ismaelga: has joined #ruby
[04:55:16] existensil: the examples. learning the concurrency patterns is super useful. Then, I'd move on to looking at the code which enables the various patterns.
[04:55:24] existensil: to see how they implemented them in Ruby
[04:56:50] Exuma: has joined #ruby
[04:57:16] commondream: has joined #ruby
[04:58:45] ghr: has joined #ruby
[05:00:04] ismaelga: has joined #ruby
[05:01:47] existensil: To really answer what code to read you first have to answer what you want to learn
[05:02:59] ellisTAA: existensil: i want to learn whatever will make me attractive to employers, then i want to learn things that will allow me to build cool software, but first just what employers want
[05:03:43] existensil: in that case you should probably be reading guides.rubyonrails.org and github.com/rails/rails
[05:04:39] ellisTAA: what do companies use sinatra for?
[05:04:57] existensil: You should also come up with something to learn other than "what looks good to employers". What looks good is the ability to see a problem and solve it, so find one and learn what you need to solve it with software.
[05:06:36] existensil: sinatra is used for small web services, APIs, or really anything. It's a tool to make applications that communicate over http, just like rails.
[05:06:44] existensil: It's just much smaller and simpler than rails
[05:06:50] existensil: easier to get started, but does less for you
[05:07:13] ellisTAA: i see??? what???s an example of a small web service?
[05:08:57] existensil: like a simple one you'd set up for internal use, or a public service that just does one or a few simple things
[05:09:11] existensil: https://placekitten.com/
[05:09:15] existensil: that's a simple web service
[05:10:02] djbkd: has joined #ruby
[05:14:28] _seanc_: has joined #ruby
[05:15:07] skinny_much: i used Sinatra to quickly get and show a Slack.com's chatrooms messages and other basic info with the database that I was putting the data into when I was messing around because of Slack's free tier 10K message limit
[05:15:46] existensil: I'm using it right now for a simple bookmark sync service
[05:16:36] existensil: API only, few endpoints, speaks in JSON. Rails would be overkill.
[05:17:14] watchtheblur: has joined #ruby
[05:17:33] sjums: has left #ruby: ()
[05:17:45] riotjones: has joined #ruby
[05:18:49] riotjones: has joined #ruby
[05:19:53] tesuji: has joined #ruby
[05:20:26] ellisTAA: can someone help me understand databinding? it sounds like it connects the view to the controller?
[05:21:53] Xiti: has joined #ruby
[05:22:58] cubesandcode: has joined #ruby
[05:30:17] haxrbyte: has joined #ruby
[05:30:47] A205B064: has joined #ruby
[05:31:39] haxrbyte_: has joined #ruby
[05:32:04] mistermocha: has joined #ruby
[05:34:00] Scripore: has joined #ruby
[05:34:09] mello: has joined #ruby
[05:39:10] bruno-: has joined #ruby
[05:41:47] marsjaninzmarsa: has joined #ruby
[05:42:15] Limix: has joined #ruby
[05:42:21] Diabolik: shevy or hackeron
[05:45:06] haxrbyte: has joined #ruby
[05:46:15] lxsameer: has joined #ruby
[05:46:37] haxrbyte_: has joined #ruby
[05:49:29] ellisTAA: has joined #ruby
[05:49:56] haxrbyte: has joined #ruby
[05:50:27] haxrbyte_: has joined #ruby
[05:51:58] chenillen: has joined #ruby
[05:54:46] chenillen: has joined #ruby
[05:58:50] joneshf-laptop: has joined #ruby
[05:59:07] ghr: has joined #ruby
[06:02:16] multi_io: has joined #ruby
[06:04:04] Diabolik: need somewhat urgent help
[06:05:04] haxrbyte: has joined #ruby
[06:06:25] haxrbyte_: has joined #ruby
[06:12:10] iamninja: has joined #ruby
[06:13:01] a346: has joined #ruby
[06:13:40] Landser88: has joined #ruby
[06:15:25] haxrbyte: has joined #ruby
[06:15:44] emocakes: has joined #ruby
[06:15:48] jpfuentes2: has joined #ruby
[06:16:37] cubesandcode: has joined #ruby
[06:19:07] joneshf-laptop: has joined #ruby
[06:19:33] Limix: has joined #ruby
[06:20:02] RegulationD: has joined #ruby
[06:21:50] AhabsBeard: has joined #ruby
[06:22:35] Landser_Reich: has joined #ruby
[06:24:11] Scripore: has joined #ruby
[06:32:04] randiman: has joined #ruby
[06:34:43] whomp: has joined #ruby
[06:35:14] whomp: when running some unit tests with minitest using "ruby -Ilib:test test.rb", how do i get test.rb to see the other file in the same folder
[06:35:20] jenrzzz: has joined #ruby
[06:35:39] Landser_Reich: is this only ruby chat or can we talk about music here?
[06:35:51] starless: has joined #ruby
[06:38:34] zarubin: has joined #ruby
[06:39:34] bruno-: has joined #ruby
[06:41:22] MrBeardy: depends if you have the kaiser chiefs in mind
[06:42:52] sevenseacat: has joined #ruby
[06:43:22] ag4ve: is there a 'prove' like command for ruby tests?
[06:44:41] ag4ve: or is it just a script with tap output from a script?
[06:47:52] baweaver: has joined #ruby
[06:49:46] Oog: has joined #ruby
[06:52:21] rht: has joined #ruby
[06:53:26] wildroman2: has joined #ruby
[06:53:58] konsolebox: has joined #ruby
[06:53:59] yardenbar: has joined #ruby
[06:58:46] ghr: has joined #ruby
[07:01:15] jenrzzz: has joined #ruby
[07:08:57] bmalum: has joined #ruby
[07:09:11] existensil: ag4ve: what would prove do? are you possibly looking for assert (minitest) or expect (rspec)?
[07:12:07] doodleha_: has joined #ruby
[07:12:45] chenillen: has joined #ruby
[07:14:00] choke: has joined #ruby
[07:14:18] konsolebox: has joined #ruby
[07:15:54] doodleha_: has joined #ruby
[07:16:25] kristofferR: has joined #ruby
[07:17:27] pengin: has joined #ruby
[07:18:08] Musashi007: has joined #ruby
[07:18:22] ag4ve: existensil: not sure:
[07:18:22] ag4ve: swilson@swlap1:~/temp$ man prove | grep -A1 NAME | tail -1 prove - Run tests through a TAP harness.
[07:19:01] ag4ve: blah, that didn't stick the line break - w/e - it's the way of running individual test for perl scripts
[07:19:40] tesuji: has joined #ruby
[07:19:44] doodleha_: has joined #ruby
[07:19:56] mello: has joined #ruby
[07:22:08] DEA7TH: has joined #ruby
[07:24:32] mistermocha: has joined #ruby
[07:25:07] charliesome: has joined #ruby
[07:25:12] User458764: has joined #ruby
[07:26:30] charliesome_: has joined #ruby
[07:27:50] pengin: has joined #ruby
[07:28:45] charliesome__: has joined #ruby
[07:31:18] Hanmac: has joined #ruby
[07:33:17] choke: has joined #ruby
[07:34:30] bkxd: has joined #ruby
[07:36:56] doodleha_: has joined #ruby
[07:41:06] chinmay_dd: has joined #ruby
[07:42:34] bruno-: has joined #ruby
[07:42:44] doodleha_: has joined #ruby
[07:43:22] OrbitalKitten: has joined #ruby
[07:45:33] joneshf-laptop: has joined #ruby
[07:47:23] michael_mbp: has joined #ruby
[07:48:08] lkba_: has joined #ruby
[07:48:49] bronson: has joined #ruby
[07:49:17] joneshf-laptop: has joined #ruby
[07:52:25] mister_goodcat: has joined #ruby
[07:53:05] whomp: has joined #ruby
[07:53:58] codecop: has joined #ruby
[07:54:12] doodleha_: has joined #ruby
[07:54:42] sinkensabe: has joined #ruby
[07:58:13] doodleha_: has joined #ruby
[07:58:44] ghr: has joined #ruby
[07:59:01] charliesome: has joined #ruby
[08:00:00] doodleha_: has joined #ruby
[08:01:19] JamesBrink: has joined #ruby
[08:02:50] gluten_hell_: has joined #ruby
[08:08:04] jhass: Diabolik: please have a look at rule 2.7 http://ruby-community.com/pages/user_rules
[08:08:53] RegulationD: has joined #ruby
[08:11:30] doodleha_: has joined #ruby
[08:11:52] wildroman2: has joined #ruby
[08:14:19] towski_: has joined #ruby
[08:15:23] doodleha_: has joined #ruby
[08:16:09] Igorshp: has joined #ruby
[08:17:10] Asher: has joined #ruby
[08:19:59] blackmesa: has joined #ruby
[08:20:58] Musashi007: has joined #ruby
[08:21:02] doodleha_: has joined #ruby
[08:23:41] Oog: has joined #ruby
[08:23:49] bkxd: has joined #ruby
[08:25:06] iamdoo2: has joined #ruby
[08:26:03] sandstrom: has joined #ruby
[08:28:57] Jackneill: has joined #ruby
[08:30:42] doodleha_: has joined #ruby
[08:32:02] meph: has joined #ruby
[08:32:48] mujou: has joined #ruby
[08:33:27] whomp: say i have a var, "s", and i want to either get nil if s is nil or else get s.strip. how can i do this? i tried s.try(:strip) but i guess nil doesn't have the method try
[08:34:37] apeiros: whomp: try is a rails method. in rails, nil has try (it'd be pointless otherwise), but plain ruby doesn't have try
[08:34:49] apeiros: in plain ruby, you can so: s && s.strip
[08:35:15] apeiros: or you use the active_support gem which provides try.
[08:35:24] whomp: apeiros, thx :)
[08:38:20] doodleha_: has joined #ruby
[08:40:12] doodleha_: has joined #ruby
[08:44:04] doodleha_: has joined #ruby
[08:44:48] sinkensabe: has joined #ruby
[08:47:16] psye: has joined #ruby
[08:49:44] mello: has joined #ruby
[08:50:29] TinkerTyper: has joined #ruby
[08:51:47] doodleha_: has joined #ruby
[08:53:36] lkba: has joined #ruby
[08:54:40] kristofferR: has joined #ruby
[08:55:05] pengin: has joined #ruby
[08:56:52] jpfuentes2: has joined #ruby
[08:58:35] marr: has joined #ruby
[08:59:01] ghr: has joined #ruby
[08:59:26] doodleha_: has joined #ruby
[09:01:28] CloCkWeRX: has joined #ruby
[09:05:48] DexterLB: has joined #ruby
[09:06:01] pengin: has joined #ruby
[09:06:17] cryptarium: has joined #ruby
[09:10:08] hmnhf: has joined #ruby
[09:10:59] pandaant: has joined #ruby
[09:11:01] bluish: has joined #ruby
[09:12:58] doodleha_: has joined #ruby
[09:14:28] toretore: has joined #ruby
[09:15:41] zipace: has joined #ruby
[09:16:00] mistermocha: has joined #ruby
[09:16:51] doodleha_: has joined #ruby
[09:18:05] zotherstupidguy: has joined #ruby
[09:18:37] konsolebox: has joined #ruby
[09:20:43] doodleha_: has joined #ruby
[09:21:16] hardlin3r: has joined #ruby
[09:23:31] TinkerTyper: has joined #ruby
[09:25:05] jenrzzz: has joined #ruby
[09:27:46] Oog: has joined #ruby
[09:28:28] doodleha_: has joined #ruby
[09:28:43] Peteykun: has joined #ruby
[09:29:10] alphaatom: has joined #ruby
[09:30:00] Rollabunna: has joined #ruby
[09:34:40] mandarinkin: has joined #ruby
[09:35:56] konsolebox: has joined #ruby
[09:37:16] platzhirsch: has joined #ruby
[09:38:40] platzhirsch: has left #ruby: ()
[09:40:15] cubesandcode: has joined #ruby
[09:42:45] ddfreyne: I'm interested in trying out whether using a Some(x)/None style in Ruby works well. I suppose a None could implement #nil? and #! and it'd behave pretty normally.
[09:43:13] ScriptGeek: Is it possible to store parameters along with its method within the same hash value?
[09:43:31] Narzew: has joined #ruby
[09:44:13] Mon_Ouie: Not really though. 'if !x' and 'if x' would do the same thing if you redefine '!', that's probably what makes custom null-objects most confusing.
[09:45:18] ddfreyne: Mon_Ouie: Yeah, I guess.
[09:49:17] bruno-: has joined #ruby
[09:50:10] jhass: ScriptGeek: just store an array of them
[09:51:19] ScriptGeek: jhass: you mean store an array of parameters as another value separate from the method value?
[09:52:18] jhass: ScriptGeek: key => [method(:x), params]
[09:52:29] jhass: or maybe a proc is better in your case
[09:52:45] jhass: key => proc { a.x(params) }
[09:53:17] ScriptGeek: I'm not sure, I'm building a nested hash that acts as the entire UI for my console program
[09:53:47] jhass: yeah, sounds a bit like you're reinventing the class system
[09:53:57] m8: has joined #ruby
[09:54:35] jhass: why not create a standard class hierarchy? component pattern or something
[09:54:36] ScriptGeek: I thought it might be nifty to use nested hashes like a menu tree
[09:55:01] TheHodge: has joined #ruby
[09:55:02] jhass: http://en.wikipedia.org/wiki/Composite_pattern
[09:57:48] RegulationD: has joined #ruby
[09:58:18] bosma: has joined #ruby
[09:58:43] ghr: has joined #ruby
[10:05:11] wjimenez5271: has joined #ruby
[10:13:23] tomaszbalon: has joined #ruby
[10:16:13] MrBeardy: has joined #ruby
[10:19:15] nfk: has joined #ruby
[10:21:55] Azure: has joined #ruby
[10:25:38] FernandoBasso: has joined #ruby
[10:25:57] jokke: has joined #ruby
[10:27:16] charliesome: has joined #ruby
[10:28:14] ponga: has joined #ruby
[10:31:10] banister: has joined #ruby
[10:31:42] Oog: has joined #ruby
[10:34:47] sarkyniin: has joined #ruby
[10:38:16] rippa: has joined #ruby
[10:39:43] zarubin: has joined #ruby
[10:40:24] woodennails: has joined #ruby
[10:41:05] Musashi007: has joined #ruby
[10:48:36] sarkyniin: has joined #ruby
[10:49:33] riotjones: has joined #ruby
[10:52:19] camilasan: has joined #ruby
[10:53:27] bronson: has joined #ruby
[10:53:40] sdothum: has joined #ruby
[10:59:04] ghr: has joined #ruby
[10:59:21] yh: has joined #ruby
[11:02:36] randiman: has joined #ruby
[11:04:00] serivich: has joined #ruby
[11:07:05] edwinvdgraaf: has joined #ruby
[11:09:28] mistermocha: has joined #ruby
[11:10:17] charliesome: has joined #ruby
[11:14:19] chipotle: has joined #ruby
[11:17:12] jacor: has joined #ruby
[11:18:37] mandarinkin: when will be release of 2.3 ruby
[11:18:51] jhass: in the future
[11:19:03] pengin: has joined #ruby
[11:24:26] Abhijit: has joined #ruby
[11:26:45] lordkryss: has joined #ruby
[11:28:13] xcesariox: has joined #ruby
[11:28:52] workmad3: has joined #ruby
[11:29:28] pengin: has joined #ruby
[11:29:56] bruno-: has joined #ruby
[11:31:08] bashusr: has joined #ruby
[11:37:19] mello: has joined #ruby
[11:41:30] cubesandcode: has joined #ruby
[11:41:40] Nilium: ACTION has been in the office for the past 18 hours.
[11:41:48] Nilium: I'm going insane. I bought meatmaps.net.
[11:42:21] _blizzy_: has joined #ruby
[11:43:07] woodennails: has joined #ruby
[11:43:10] ddfreyne: Nilium: Rusalka VM looks interesting. I've implemented a register-based VM myself. Fun!
[11:43:42] _blizzy_: has joined #ruby
[11:45:38] Nilium: Usually a lot easier to implement one than it is to do a stack VM
[11:45:53] thebastl: has joined #ruby
[11:46:26] ddfreyne: Nilium: https://github.com/ddfreyne/rcpu
[11:46:31] Nilium: Rusalka itself isn't all that interesting aside from the basic green threads stuff and pseudo-coroutines
[11:46:37] sandstrom: has joined #ruby
[11:46:37] RegulationD: has joined #ruby
[11:46:37] ddfreyne: Nilium: Hm, not sure... I haven't written a stack one.
[11:47:05] ddfreyne: Prettier README: http://ddfreyne.github.io/rcpu/
[11:47:13] Nilium: And those are just pulled off by having a separate process/thread setup with unique registers and a stack per thread
[11:47:33] ddfreyne: Nilium: Ah, I didn't get to that point yet.
[11:47:50] ddfreyne: Nilium: But mine has video!
[11:47:51] Nilium: So a coroutine is created by blowing away all but the current stack frame and then copying all registers and the stack to a new thread
[11:48:18] Nilium: Also looks like asciidoctor?
[11:48:30] ddfreyne: Nilium: Couldn't you change the stack pointer and register values instead, rather than copying the entire stack?
[11:48:36] ddfreyne: Nilium: Yeah, I like AsciiDoc.
[11:48:51] Nilium: I managed to convert a few people at work to using it for internal READMEs.
[11:49:16] ddfreyne: I tried using it for nanoc.ws documentation, but I found Markdown (with bits of HTML) easier.
[11:49:32] Nilium: It doesn't copy the entire stack, just the current stack frame (i.e., only the current function)
[11:49:53] Nilium: Otherwise each coroutine would be more of a fork than a coroutine
[11:50:12] Nilium: The instruction for doing it is called fork though, since it was originally just that
[11:50:58] ddfreyne: I wanted to implement process management in my VM (or rather, in a kernel written on top of the VM)
[11:51:16] ddfreyne: I wanted something more high-level to work with than assembly, so I started writing my own language that compiles to that VM's assembly
[11:51:40] ddfreyne: It ha been a while since I worked on that, because I also have other stuff to work on. But I'll probably come back to it at some point!
[11:51:50] Nilium: Mine's more intended for embedding than it is acting as a stand-in for theoretical hardware
[11:52:14] Nilium: I was working on a Lisp for my VM but I keep getting side-tracked by stuff.
[11:52:19] ddfreyne: Ah, mine's absolutely just for educational purposes.
[11:52:22] Nilium: Also, there's work.
[11:52:38] ddfreyne: Language: https://github.com/ddfreyne/rcpu-lang -- lisp syntax, but it's not lisp.
[11:52:41] Nilium: Mine is educational, but I figure I've got it so I might as well use it in personal projects
[11:52:50] Nilium: Right now the best I have is a semi-expressive assembly language.
[11:53:34] ddfreyne: Biggest assembly program I've ever written: https://github.com/ddfreyne/rcpu/blob/master/samples/video.rcs
[11:53:50] Nilium: Most I did was implement a rot13 function
[11:54:09] Nilium: Which I think I put in the blog post about it
[11:56:07] allcentury: has joined #ruby
[11:57:59] snath: has joined #ruby
[11:58:11] TinkerTyper: has joined #ruby
[11:58:57] snath: has left #ruby: ()
[11:59:05] ghr: has joined #ruby
[12:00:27] MyMind: has joined #ruby
[12:02:09] jokke: has joined #ruby
[12:02:53] Oog: has joined #ruby
[12:02:59] yh: has joined #ruby
[12:06:32] shevy: you two are big chatters
[12:08:57] bkxd: has joined #ruby
[12:09:56] OrbitalKitten: has joined #ruby
[12:10:00] jhass: how's your unicode bluefish 1.x port going shevy?
[12:10:11] apt-get_: has joined #ruby
[12:15:15] shevy: jhass it's not a unicode port
[12:15:28] shevy: however had I did not have much time at all to work on bluefish 1.x :(
[12:17:15] shevy: look at that http://www.top500.org/statistics/details/osfam/1
[12:17:41] shevy: in Nov 2002, 14,2% of the supercomputers were using linux
[12:18:04] shevy: 10 years later it was 92.4%, and today it is more than 97%
[12:18:18] naive: has joined #ruby
[12:18:34] naive: has anyone know how to write ffi
[12:19:09] naive: do in ffi source file we have to write source code or it will be automatically generated
[12:19:27] spider-mario: has joined #ruby
[12:20:05] jhass: what do you refer to by "ffi source file"?
[12:20:26] jokke: has joined #ruby
[12:20:34] sandelius: has joined #ruby
[12:25:12] aryaching: has joined #ruby
[12:25:40] naive: when we write rqire ffi...... in .rb file also do we have to make c file
[12:26:26] jhass: probably not
[12:27:43] Scripore: has joined #ruby
[12:29:34] phale: has joined #ruby
[12:29:41] phale: is ruby more readable than bash?
[12:29:46] jokke: has joined #ruby
[12:30:05] Nilium: Probably.
[12:30:32] phale: http://codepad.org/9FURvqBS << bash code
[12:31:04] yqt: has joined #ruby
[12:31:13] gluten_hell_: has joined #ruby
[12:31:34] jhass: phale: you might like termbin.com
[12:31:51] phale: design looks weird..
[12:32:10] newbie: has joined #ruby
[12:32:11] phale: yeah i might try it out
[12:32:54] phale: jhass: it seems slow
[12:33:01] phale: takes like 6 seconds to upload
[12:33:48] jhass: oh, not IME
[12:34:02] jhass: try again, maybe your resolver had a hiccup
[12:34:41] phale: real 0m5.154s
[12:34:47] phale: user 0m0.000s
[12:34:52] phale: sys 0m0.000s
[12:35:52] jhass: anyway, ruby version should be something like require "net/http"; Net::HTTP.post_form("http://codepad.org", lang: ARGV[0] || "Plain+Text", run: "True", submit: "Submit", code: ARGF.read)
[12:36:00] phale: well yeah that's more readable
[12:36:02] OrbitalKitten: has joined #ruby
[12:36:44] jhass: mh, $stdin.read might be better if it takes params
[12:37:05] zarubin: has joined #ruby
[12:37:14] otherj: has joined #ruby
[12:37:25] phale: why hasn't anyone made a non-OOP ruby?
[12:37:35] phale: i mean, you can use it without using OOP but it's still OOP behind the scenes
[12:38:16] jhass: you mean like Elixir?
[12:38:24] phale: what's that?
[12:38:32] jhass: a programming language
[12:38:44] phale: yeah kinda like that, but pure Ruby
[12:38:44] zarubin: has joined #ruby
[12:38:53] jhass: pure Ruby is inherently OOP
[12:39:17] jhass: it's not a bad thing
[12:39:29] jhass: it's saying like Apples are a bad thing because Oranges exist
[12:39:46] jhass: if you hate Apples that much, eat Oranges instead
[12:40:03] phale: apples are a bad thing because of iPhone
[12:41:22] mello: has joined #ruby
[12:42:29] phale: jhass: I know
[12:42:49] phale: but I'm not so sure
[12:42:53] nateberkopec: has joined #ruby
[12:43:27] jhass: the fear of the unknown, we need to have our mind win the fight over our instincts
[12:43:28] Musashi007: has joined #ruby
[12:43:38] Papierkorb: has joined #ruby
[12:44:21] nateberkopec: has joined #ruby
[12:44:48] dorei: has joined #ruby
[12:46:52] jottr: has joined #ruby
[12:47:03] qwertme: has joined #ruby
[12:49:44] shevy: what's up with the jhass today
[12:49:47] shevy: is he drunk or what
[12:50:15] shevy: <mandarinkin> when will be release of 2.3 ruby
[12:50:15] shevy: <jhass> in the future
[12:50:17] shevy: <jhass> the fear of the unknown, we need to have our mind win the fight over our instincts
[12:50:22] shevy: I'm going to collect the quotes
[12:52:07] mrdmi: has joined #ruby
[12:52:34] phale: has joined #ruby
[12:54:15] phale: >> quotes = ["in the future", "the fear of the unknown, we need to have our mind win the fight over our instincts"] quotes.sample
[12:54:16] ruboto: phale # => /tmp/execpad-b2dc16c6e212/source-b2dc16c6e212:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/373267)
[12:54:25] phale: i need to re-learn ruby lol
[12:54:38] phale: >> quotes = ["in the future", "the fear of the unknown, we need to have our mind win the fight over our instincts"]; quotes.sample;
[12:54:38] ruboto: phale # => "the fear of the unknown, we need to have our mind win the fight over our instincts" (https://eval.in/373268)
[12:56:53] romero: has joined #ruby
[12:57:14] cubesandcode: has joined #ruby
[12:57:30] edwinvdg_: has joined #ruby
[12:57:33] shevy: how would the same look in haskell?
[12:57:38] shevy: to fetch a random array entry
[12:58:42] phale: haskell is a language everybody talks about but no one programs in
[12:58:43] ghr: has joined #ruby
[12:59:39] shevy: but #haskell is bigger than #ruby
[13:02:46] mistermocha: has joined #ruby
[13:03:49] DoubleMalt: has joined #ruby
[13:03:53] Musashi007: has joined #ruby
[13:04:45] whomp: has joined #ruby
[13:05:24] despai: has joined #ruby
[13:08:11] _ixti_: has joined #ruby
[13:10:01] banister: has joined #ruby
[13:10:17] sandstrom: has joined #ruby
[13:12:33] CloCkWeRX: has joined #ruby
[13:13:06] badhatter: has joined #ruby
[13:13:06] badhatter: has joined #ruby
[13:15:36] mujou: has joined #ruby
[13:19:13] mrchris: has joined #ruby
[13:20:37] Azure: has joined #ruby
[13:24:23] shevy: They are also more active than we here :(
[13:24:51] shevy: they ask fancy questions
[13:24:54] shevy: "Is there any [good] examples for Cofree Comonads in there?"
[13:24:58] shevy: so not only are there monads
[13:25:03] shevy: nope, they also have Comonads
[13:25:09] shevy: it's like a symbiotic relationship I am sure
[13:25:20] sevenseacat: that seems to be the only thing most people know about haskell - omg monads
[13:25:28] [k-: has joined #ruby
[13:31:12] workmad3: has joined #ruby
[13:32:32] RegulationD: has joined #ruby
[13:33:51] arup_r: has joined #ruby
[13:35:27] joneshf-laptop: has joined #ruby
[13:36:08] Azure: has joined #ruby
[13:39:40] kstuart: has joined #ruby
[13:39:45] cubesandcode: has joined #ruby
[13:45:22] phale: has left #ruby: ("Leaving")
[13:46:08] zarubin: has joined #ruby
[13:49:50] OrbitalKitten: has joined #ruby
[13:51:53] mrchris: has joined #ruby
[13:52:09] sandelius: has joined #ruby
[13:56:03] DerisiveLogic: has joined #ruby
[13:58:23] vickleton: has joined #ruby
[13:58:25] ta: has joined #ruby
[14:00:24] phutchins: has joined #ruby
[14:02:33] someword: has joined #ruby
[14:04:50] e1nh4nd3r: has joined #ruby
[14:08:12] mistermocha: has joined #ruby
[14:08:38] OrbitalKitten: has joined #ruby
[14:10:10] zotherstupidguy: has joined #ruby
[14:12:07] e1nh4nd3r: has joined #ruby
[14:14:30] sandstrom: has joined #ruby
[14:19:10] Ropeney: has joined #ruby
[14:19:17] bashusr: has joined #ruby
[14:19:40] whomp: has joined #ruby
[14:21:18] kubunto: has joined #ruby
[14:21:34] kubunto: is there a way to programatically access JPEG meta data using ruby?
[14:21:38] ndrei: has joined #ruby
[14:21:58] DerisiveLogic: has joined #ruby
[14:22:03] Diabolik: https://github.com/remvee/exifr
[14:23:45] shevy: Diabolik did you move to another project finally :P
[14:23:56] zotherstupidguy: has joined #ruby
[14:25:04] CloCkWeRX: has left #ruby: ()
[14:25:11] Diabolik: i need your help
[14:25:17] Diabolik: i started refactoring last night
[14:25:20] Diabolik: i couldn't stop :P
[14:25:31] Diabolik: i submit it tonight
[14:25:46] Diabolik: shevy https://github.com/askl56/PrimeTime
[14:25:53] Diabolik: the only thing that is failing
[14:26:01] Diabolik: is what i put in my exec file in bin
[14:26:16] Diabolik: what paramaters would work since ive been try to work it out for like 6 hours
[14:26:20] Outlastsheep: I like how the technical documentation on CTCP calls the receiver of the protocol the 'victim'
[14:26:24] roolo: has joined #ruby
[14:28:08] thiagovsk: has joined #ruby
[14:28:12] shevy: not sure what you mean Diabolik
[14:28:16] shevy: parameters to work?
[14:29:07] ismaelga: has joined #ruby
[14:29:20] Diabolik: il try and explain
[14:29:38] Diabolik: prime_grid now accepts two paramaters
[14:29:41] Diabolik: display and formatter
[14:29:56] Diabolik: so to get it to run
[14:30:06] Diabolik: what do i need to put in prime_time exec
[14:30:23] shevy: your script breaks for me btw when I install it as a gem
[14:30:33] Diabolik: its not a gem
[14:30:40] shevy: it is because of require_relative '../lib/prime_finder'
[14:31:20] shevy: it also does not work when I invoke it from its base directory (the directory that one gets after unzipping and cd-ing into it)
[14:31:24] shevy: bin/prime_time:10:in `<main>': undefined local variable or method `max_col_width' for main:Object (NameError)
[14:31:32] Diabolik: that is my problem
[14:31:39] shevy: require_relative works in a relative manner, but plain require() alone already does too when you have a gem-structured project
[14:32:07] shevy: that error means that
[14:32:22] shevy: trf = TableRowFormatter.new(max_col_width, column_count)
[14:32:23] MrBeardy: doesn't pushing the lib directory onto the load path also make require work for non-gem projects
[14:32:40] woodennails: has joined #ruby
[14:32:41] shevy: the ruby parser does not know what is max_col_width
[14:32:48] shevy: you did not define max_col_width anywhere there Diabolik
[14:32:56] Diabolik: i know ive since removed it
[14:32:58] Diabolik: the problem is
[14:33:11] Diabolik: i have no idea what to put in as the parameter
[14:33:39] shevy: can't you decide :)
[14:34:21] Diabolik: can you give me a hint
[14:34:21] mrchris: has joined #ruby
[14:34:35] shevy: You assume that I'd know what you want there
[14:34:43] shevy: but it's your code, I have no idea about your code :)
[14:34:43] Diabolik: i want it to render a grid
[14:34:46] Diabolik: as it did yesterday
[14:34:53] shevy: you mean it worked yesterday
[14:34:54] Diabolik: i then did extract object refactoring
[14:34:54] shevy: then you broke it
[14:35:11] Diabolik: # This class has been heavily refactored due to separation of concerns.
[14:35:11] Diabolik: # Before it was responsible for both generating the grid and displaying it
[14:35:11] Diabolik: # in addition to the implicit responsibility of co-ordinating those two
[14:35:11] Diabolik: # responsibilities. We have now split those up.
[14:35:12] shevy: that's why you have to move in small steps and verify that it all works
[14:35:19] shevy: yeah and add
[14:35:23] shevy: # Also, I broke it.
[14:35:45] Diabolik: but what's really annoying
[14:35:49] shevy: btw you could try to simplify it
[14:35:51] Diabolik: the most annoying this
[14:35:55] Diabolik: is that my tests all pass
[14:36:04] shevy: you have bin/prime_time right now
[14:36:10] shevy: look at what classes you call from that file:
[14:36:29] shevy: PrimeFinder.times_primes(); ConsoleDisplay.new(); TableRowFormatter.new(); PrimeGrid.new()
[14:36:35] shevy: you are not making it easy for you there
[14:37:07] shevy: Diabolik I'd ignore bin/prime_time for now, and just ensure that the library itself does what it is supposed to do
[14:37:19] shevy: once the library has all those features, you can make a single API
[14:37:40] shevy: such as: PrimeFinder.find() or PrimeFinder.run() or PrimeFinder[] if you don't want to have to think about a method name
[14:37:49] shevy: I love []
[14:37:51] jcaho_m: has joined #ruby
[14:38:43] qwertme: has joined #ruby
[14:39:18] Diabolik: shevy the library does what i want it to do
[14:39:25] shevy: excellent
[14:39:30] Diabolik: the prime_grid rspec tests are exhaustive
[14:39:39] shevy: even when the app itself does not work
[14:39:54] Diabolik: yes, its a wonderful problem to have
[14:40:35] shevy: btw in the description at https://github.com/askl56/PrimeTime
[14:40:40] shevy: main.rb --count 15 would show:
[14:40:44] shevy: but I can't find a file called main.rb
[14:40:51] Diabolik: yeah i need to fix that
[14:41:01] Diabolik: where are the docs to easily convert this into an API
[14:41:10] Diabolik: ive only done APIs in Rails
[14:41:35] bmalum: has joined #ruby
[14:42:10] shevy: probably rdoc or yard
[14:42:17] shevy: you could try to invoke it via "rdoc" perhaps
[14:42:23] shevy: in the base dir of your ruby project
[14:42:52] red_menace: has joined #ruby
[14:43:07] jhass: Diabolik: API is a general term for "code used by other through a defined interface"
[14:43:19] jhass: *other code
[14:43:28] red_menace: has left #ruby: ()
[14:43:38] jhass: so the public methods of a class make up its API for example
[14:44:44] zarubin: has joined #ruby
[14:45:49] Diabolik: <shevy> such as: PrimeFinder.find() or PrimeFinder.run() or PrimeFinder[] if you don't want to have to think about a method name
[14:46:05] Diabolik: so i need to make primegrid part of the primefinder module?
[14:46:20] tomaszbalon: has joined #ruby
[14:47:19] Scripore: has joined #ruby
[14:48:19] mary5030: has joined #ruby
[14:48:49] havenwood: has joined #ruby
[14:49:09] sandstrom: has joined #ruby
[14:50:28] kubunto: has joined #ruby
[14:50:42] kubunto: how do i pull a git project to use in my own code?
[14:52:06] shevy: Diabolik well; usually projects have one top namespace
[14:52:12] jhass: kubunto: talking about a gem?
[14:52:13] shevy: such as the main module; which usually is the name of your gem
[14:52:31] shevy: Diabolik you could of course also use a class, and then just call #new on it
[14:52:41] kubunto: jhass: https://github.com/remvee/exifr
[14:52:47] TheNumb: has left #ruby: ("Leaving")
[14:52:48] kubunto: how do i pull that in?
[14:52:56] shevy: Diabolik the main point is that your bin/prime_finder file right now calls 4 different classes; that is not good. push that functionality into your module
[14:53:19] jhass: kubunto: seems properly released as gem, gem install exifr
[14:53:51] lukequaint: has joined #ruby
[14:53:53] shevy: Diabolik my (forever unfinished) diamond shell has essentially these two lines: http://pastie.org/10216270
[14:54:09] woodennails: has joined #ruby
[14:55:17] mcpierce: has joined #ruby
[14:56:07] kubunto: how do i get a list of my current gems?
[14:56:19] shevy: Diabolik also make sure you listen to proper music while you are coding
[14:56:26] jhass: kubunto: https://remvee.github.io/exifr/ btw you could have just followed to their homepage
[14:56:30] Diabolik: im listening to springsteen atm
[14:56:30] jhass: kubunto: gem help
[14:56:42] shevy: just kidding ;)
[14:56:44] chenillen: has joined #ruby
[14:56:54] Diabolik: meh i usually listen to chilled electronica
[14:57:05] kubunto: jhass: i see what you did there
[14:57:10] shevy: you need to embrace chilled jazz
[14:57:25] Diabolik: dat saxophone
[14:57:52] jhass: kubunto: yeah, before you do "how do I x with command y" questions, make sure to try y -h, y --help, y help and man y first
[14:58:42] ghr: has joined #ruby
[14:58:42] Diabolik: shevy recommendations
[14:59:20] ellisTAA: has joined #ruby
[14:59:38] shevy: nah not really; the only jazz-like music I could accept were two from Dave Brubeck
[14:59:47] DoubleMalt: has joined #ruby
[15:00:07] dopie: has joined #ruby
[15:00:12] shevy: Diabolik I am riding on the 1970 funk list right now! Soul train, the dudes were just so funny because they move in really weird ways
[15:01:24] Zai00: has joined #ruby
[15:01:43] kubunto: i am getting unitialized constant off of this code, https://gist.github.com/anonymous/79ffe40983b2adc6c4c8
[15:02:02] jhass: kubunto: did you even follow my last link
[15:02:27] kubunto: i am being a ditz
[15:03:17] zotherstupidguy: has joined #ruby
[15:04:57] kubunto: this is rather odd, i added in the require line and this is the stuff that came out: https://gist.github.com/anonymous/343888d945423e42325b
[15:05:15] kubunto: scratch that
[15:06:13] Pupeno: has joined #ruby
[15:09:28] Limix: has joined #ruby
[15:09:29] penpen: has joined #ruby
[15:10:47] mistermocha: has joined #ruby
[15:11:04] Oog: has joined #ruby
[15:20:08] n008f4g_: has joined #ruby
[15:21:28] RegulationD: has joined #ruby
[15:23:32] camonz: has joined #ruby
[15:28:10] someword1: has joined #ruby
[15:28:27] xcesariox: has joined #ruby
[15:29:38] kobain: has joined #ruby
[15:30:36] ChoiKyuSang: has joined #ruby
[15:33:57] jottr: has joined #ruby
[15:34:34] zotherstupidguy: has joined #ruby
[15:37:37] tomaszbalon: has joined #ruby
[15:37:56] zarubin: has joined #ruby
[15:38:18] jpfuentes2: has joined #ruby
[15:40:53] Rollabunna: has joined #ruby
[15:41:17] Kozen: has joined #ruby
[15:41:47] sandelius: has joined #ruby
[15:42:53] xxneolithicxx: has joined #ruby
[15:43:18] zotherstupidguy: has joined #ruby
[15:45:51] sandstrom: has joined #ruby
[15:46:31] zotherstupidguy: has joined #ruby
[15:47:26] Cache_Money: has joined #ruby
[15:48:01] zotherstupidguy: has joined #ruby
[15:48:57] zotherstupidbot: has joined #ruby
[15:49:47] ismaelga: has joined #ruby
[15:50:47] nateberkopec: has joined #ruby
[15:50:59] jokke: hi i'm trying to put together some statsd instrumentation for systemd services
[15:51:04] jokke: i'm using the ruby-dbus gem
[15:51:23] jokke: for some reason my signal handlers are triggered only once
[15:52:10] jokke: here's my script
[15:52:15] jokke: http://p.jreinert.com/FkG/ruby
[15:53:17] ChoiKyuSang: has joined #ruby
[15:55:31] jhass: docs don't state anything, but a common idiom is that returning true keeps the handler registered
[15:55:54] jokke: i'll give it a try
[15:56:01] watchtheblur: has joined #ruby
[15:56:59] jokke: hm. too bad..
[15:57:03] jokke: not working
[15:57:11] jhass: figured, worth a shot anyways
[15:58:50] juanda: has joined #ruby
[15:59:03] ghr: has joined #ruby
[15:59:30] tomaszba_: has joined #ruby
[15:59:41] DoubleMalt: has joined #ruby
[16:00:16] Diabolik: https://gist.github.com/askl56/f2c05173d3140e5e45f8
[16:00:34] jhass: Diabolik: please have a look at rule 2.7 http://ruby-community.com/pages/user_rules
[16:00:45] shevy: now you can call that method directly
[16:00:50] shevy: (if it works) :)
[16:00:54] Scripore: has joined #ruby
[16:00:59] Diabolik: jhass i was having a direct conversation with shevy
[16:01:15] shevy: I don't mind
[16:01:49] shevy: btw Diabolik
[16:01:58] kinduff: has joined #ruby
[16:02:15] jhass: Diabolik: well, wasn't sure whether you've seen my earlier nudge when you clearly weren't having any and called people out
[16:02:17] shevy: not important, but I think it may be better if you word documentation in an objective manner
[16:02:43] Diabolik: when i try to run the code
[16:02:45] shevy: I mean it's ok if you use it as a reminder of what you did and such
[16:02:55] Diabolik: from bin/prime_time:7:in `<main>'
[16:02:59] Diabolik: /Users/andrew/code/PrimeTime/lib/prime_finder.rb:8:in `run': undefined local variable or method `primes_count' for PrimeFinder:Module (NameError)
[16:02:59] Diabolik: from bin/prime_time:7:in `<main>'
[16:03:01] shevy: but the first/primary objective should be to describe what the method should do
[16:03:32] shevy: you use lots of references to undefined local variables
[16:03:36] shevy: where did they come from?
[16:03:42] shevy: and if it is a method, then it just can not be found there
[16:04:08] shevy: what is primes_count
[16:04:09] shevy: a variable?
[16:07:04] ChoiKyuSang: has left #ruby: ("Closing Window")
[16:07:43] bronson: has joined #ruby
[16:07:51] lindii_: has joined #ruby
[16:08:15] Diabolik: primes_count = ARGV[0] == '--count' ? ARGV[1].to_i : 10
[16:08:17] Diabolik: in the exec file
[16:08:40] zimt: has joined #ruby
[16:08:54] zimt: has left #ruby: ("WeeChat 1.2")
[16:08:57] ChoiKyuSang: has joined #ruby
[16:10:15] ChoiKyuSang: has left #ruby: ()
[16:10:20] Diabolik: shevy you can see the code before i added the run function on github
[16:10:32] xxneolithicxx: self.run(count) == self.run(primes_count) ?
[16:10:33] Diabolik: https://github.com/askl56/PrimeTime
[16:10:48] Diabolik: in the exec file xxneolithicxx
[16:11:07] xxneolithicxx: but in that function you use primes_count and its not defined
[16:11:21] shevy: yeah, for some reason he likes to use uninitialized variables :)
[16:11:51] shevy: primes_count = ARGV[0] == '--count' ? ARGV[1].to_i : 10
[16:12:02] shevy: Diabolik, put a default value towards primes_count then
[16:12:55] shevy: you still use so many classes there :(
[16:12:57] Diabolik: this is so frustrating
[16:13:06] Diabolik: is there a way of simplifying it?
[16:13:12] shevy: primes_count = 5 # This is my default
[16:13:19] shevy: unless ARGV.empty?
[16:13:23] shevy: primes_count = ARGV.first
[16:13:54] shevy: but all of this code should not be in that bin/ file, put it into your library, either in run() or in any of the other corresponding calls
[16:14:07] shevy: finish the functionality first though
[16:14:11] shevy: make bin work first ;P
[16:14:57] xxneolithicxx: primes_count in bin is not a global
[16:15:58] xxneolithicxx: oh nevermind i dont see where you are calling run but that method is def wrong
[16:16:13] CustosLimen: has joined #ruby
[16:16:30] Channel6: has joined #ruby
[16:16:35] Diabolik: https://github.com/askl56/PrimeTime
[16:16:39] Diabolik: ive just committed where i am at atm
[16:18:05] allcentury: has joined #ruby
[16:19:47] michael_mbp: has joined #ruby
[16:20:18] bigmac: has joined #ruby
[16:20:36] shevy: jokke cool, you use ruby-gnome?
[16:20:57] jokke: i don't have gnome
[16:21:24] shevy: Diabolik did you change anything at all
[16:21:30] shevy: looks like 100% the same old code
[16:21:42] _blizzy_: has joined #ruby
[16:21:50] shevy: except that you chopped off some lines :)
[16:22:20] shevy: the primary objective should always be to make things work
[16:22:27] shevy: you can beautify and simplify and optimize lateron anyway
[16:22:40] sandelius: has joined #ruby
[16:24:43] Dreamer3: has joined #ruby
[16:24:54] allcentury: has joined #ruby
[16:27:14] sandstrom: has joined #ruby
[16:28:56] leafybasil: has joined #ruby
[16:29:30] ellisTAA: has joined #ruby
[16:30:24] despai: has joined #ruby
[16:30:58] kinduff_: has joined #ruby
[16:31:10] nateberkopec: has joined #ruby
[16:31:52] veduardo: has joined #ruby
[16:31:56] kinduff_: hey guys and gals
[16:32:45] kinduff_: https://gist.github.com/kinduff/f8ed2e9b3b1da95da020
[16:32:57] kinduff_: could someone help me out refactoring that last method?
[16:33:13] kinduff_: Was using case statemets but they worked a little bit weird
[16:33:35] cubesandcode: has joined #ruby
[16:34:59] Scully: has joined #ruby
[16:36:23] ChoiKyuSang: has joined #ruby
[16:37:12] kinduff: has joined #ruby
[16:37:12] kinduff: has joined #ruby
[16:37:13] Scully: ayone wanna chat?]
[16:38:06] zotherstupidbot: has joined #ruby
[16:38:44] penpen: Scully: On "the truth is out there"?
[16:39:08] Scully: exactly...
[16:39:16] balazs: has joined #ruby
[16:39:18] penpen: Wrong channel I'd say
[16:39:22] zotherstupidguy: has joined #ruby
[16:39:34] Scully: uhm...so what channel should i be?
[16:40:05] balazs: has joined #ruby
[16:40:07] penpen: yikes, freenode has an awful lot of channels
[16:40:15] Scully: actually i??d say i am a litlle bit lost
[16:40:57] sinkensabe: has joined #ruby
[16:40:58] havenwood: Scully: Do you want to discuss Ruby?
[16:41:22] _seanc_: has joined #ruby
[16:41:23] havenwood: kinduff: How about?: case [from_month, to_month]
[16:42:02] Scully: you mean ruby, the stone ruby?
[16:42:22] penpen: Scully: nope, Ruby is a programming language
[16:42:33] jhass: Scully: /join ##social
[16:42:35] penpen: at least in the context of this channel
[16:42:53] kinduff: havenwood: is that possible? like case [from, to], when "from", "to" then "this"?
[16:43:15] havenwood: kinduff: when ['from', 'to'] then 1
[16:43:45] MrBeardy: kinduff: I've replied to the gist. Not sure if it's the most efficient solution, but I think it makes the concept clearer and makes it easier to change later.
[16:43:55] Scully: oh Lord...i??m actually very very lost...
[16:44:15] Scully: thank you people
[16:44:20] victorkohl: has joined #ruby
[16:44:30] MrBeardy: Scully, make sure you have your towel and don't panic
[16:45:27] kinduff: MrBeardy: nice thinking there! ty
[16:45:28] Scully: i really wanna know how to deal with it again...
[16:45:56] penpen: MrBeardy: Towel day is over but you are right, you should ALWAYS know where your towel is
[16:45:57] havenwood: kinduff: http://ruby-doc.org/core/doc/syntax/control_expressions_rdoc.html#label-case+Expression
[16:47:11] victorkohl: has joined #ruby
[16:47:17] kinduff: havenwood: thanks :)
[16:47:32] Scully: everybody knows everything about computer programming nowadays...i??m kind of lost in space...
[16:48:11] yh: has joined #ruby
[16:48:23] havenwood: Scully: If you'd like to learn Ruby you're welcome here. If you'd like to chat about non-Ruby stuff: /join ##social
[16:48:53] Scully: havenwood: and what does Ruby does?
[16:48:54] victorkohl: has joined #ruby
[16:49:09] havenwood: Scully: https://www.ruby-lang.org/en/
[16:49:53] jhass: kinduff: not as efficient as the case when either, but periods = {"one" => 1, "two" => 2, "three" => 3}; from, to = [from_month, to_month].map {|m| periods[m[/[^_]+/]] }; to - from
[16:50:11] victorkohl: has joined #ruby
[16:50:43] Soda: has joined #ruby
[16:50:51] zarubin: has joined #ruby
[16:51:04] randiman: has joined #ruby
[16:51:42] jhass: or just periods = {"one_month" => 1, "two_months" => 2, "three_months" => 3}; [to_month, from_month].map {|m| periods[m] }.inject(:-) even
[16:52:18] dorei: >> Object.const_get('String').new('a')
[16:52:19] ruboto: dorei # => "a" (https://eval.in/373354)
[16:52:29] dorei: is this the only way to get a class from a string ?
[16:52:33] kinduff: jhass, that looks pretty good actually
[16:52:38] jhass: dorei: yep
[16:52:43] woodennails: has joined #ruby
[16:52:48] jhass: well, only sane
[16:53:50] qwertme: has joined #ruby
[16:54:16] victorkohl: has joined #ruby
[16:54:20] phale: has joined #ruby
[16:54:26] jhass: Scully: how did you end up here?
[16:54:39] Scully: i am making myself the same question
[16:55:14] jhass: nah, really, what did you do? found an IRC client and just joined a big channel or what is it?
[16:55:23] penpen: has left #ruby: ()
[16:55:47] victorkohl: has joined #ruby
[16:56:13] CustosLimen: has joined #ruby
[16:56:27] Scully: well at first i downloaded IRC programm
[16:56:49] phale: jhass: in 10^30 years the earth will be consumed by a supermassive black hole
[16:57:15] jhass: who cares
[16:57:24] jhass: phale: you too, /join ##social
[16:57:37] phale: ##social isn't for geography and physics
[16:57:39] havenwood: Or maybe you guys should join?: #r.trees
[16:57:42] jhass: Scully: so just exploring, cool
[16:57:55] zarubin_: has joined #ruby
[16:58:04] pengin: has joined #ruby
[16:58:42] havenwood: phale: Do some geography or physics in Ruby and you're back in the game.
[16:59:03] ghr: has joined #ruby
[16:59:17] phale: but ruby can't predict the future, can it?
[16:59:36] MrBeardy: Think there's a pull request for that
[16:59:36] claptor: has joined #ruby
[16:59:43] Scully: jhass: i used IRC in 1997
[16:59:50] havenwood: phale: It sure can. Modeling.
[17:00:01] Scully: i mean, from 1995 to 1997
[17:00:03] phale: havenwood: no lol i don't want to model the entire universe in a ruby program
[17:00:06] phale: i want to use this universe
[17:00:36] Scully: since then i stopped, so since then until today is almost 20 years ago
[17:00:56] DoubleMalt: has joined #ruby
[17:02:15] Scripore: has joined #ruby
[17:02:26] phale: i don't even know how to make a gameboy emulator
[17:02:32] phale: and u want me to predict da future in ruby?
[17:03:02] Limix: has joined #ruby
[17:03:20] mistermocha: has joined #ruby
[17:03:40] havenwood: phale: For example, use Ruby to predict the phase of the moon next week. Start small. Make an API. Share it.
[17:03:55] phale: havenwood: i cant see the moon
[17:04:18] phale: but yeah, I can use ruby for that
[17:05:09] moretti: has joined #ruby
[17:05:53] mrchris: has joined #ruby
[17:07:21] bricker: has joined #ruby
[17:07:27] m8: has joined #ruby
[17:07:34] roolo: has joined #ruby
[17:08:27] workmad3: has joined #ruby
[17:08:51] pengin: has joined #ruby
[17:10:17] despai: has joined #ruby
[17:10:20] RegulationD: has joined #ruby
[17:10:50] Scripore: has joined #ruby
[17:11:22] havenn: has joined #ruby
[17:11:56] Master44: has joined #ruby
[17:12:30] woodennails: has joined #ruby
[17:13:45] Vile`: has joined #ruby
[17:18:51] phale: has left #ruby: ("Leaving")
[17:18:56] balazs: has joined #ruby
[17:21:06] Master44: no talk here.. ;P
[17:21:28] jhass: ask a good question!
[17:21:33] juanda: has joined #ruby
[17:22:03] chenillen: has joined #ruby
[17:23:14] psye: has joined #ruby
[17:25:38] Diabolik: sorry jhass
[17:25:51] Diabolik: i went back to my core functionality
[17:25:56] Diabolik: since it wasn't working
[17:26:08] Diabolik: if im testing https://gist.github.com/askl56/31aabddb3204ac10faf1
[17:26:15] Diabolik: should i use stubs/doubles?
[17:26:56] chenillen: has joined #ruby
[17:28:11] jhass: wrong question, ask what you want to test and then ask what to use to achieve that
[17:28:37] sarkyniin: has joined #ruby
[17:29:14] Diabolik: i want to test to ensure that the matrix renders correctly
[17:29:35] jhass: split it up
[17:29:49] Diabolik: the test or the class
[17:29:56] jhass: try to come down to "with input x I want output y"
[17:30:10] jhass: include at least the common case and the edge cases
[17:30:59] jhass: and since you write to stdout, you probably want to set $stdout to a StringIO to capture the output
[17:31:20] jhass: (you don't need to take a backup, STDOUT has one ready for you)
[17:32:16] Spami: has joined #ruby
[17:32:32] gambl0re: has joined #ruby
[17:33:13] lucky: has joined #ruby
[17:35:05] qwertme: has joined #ruby
[17:36:32] ellisTAA: has joined #ruby
[17:36:59] Limix: has joined #ruby
[17:37:21] ddarkpassenger: has joined #ruby
[17:37:36] shevy: anyone knows if a module called "Ruby" already exists? module Ruby
[17:38:13] hmnhf: has joined #ruby
[17:39:48] havenwood: Diabolik: If I recall you're using RSpec right? See: https://relishapp.com/rspec/rspec-expectations/v/3-2/docs/built-in-matchers/output-matcher
[17:39:55] waxjar: >> defined? Ruby
[17:39:56] ruboto: waxjar # => nil (https://eval.in/373357)
[17:40:19] jhass: shevy: https://www.omniref.com/ruby/gems/ripper2ruby/0.0.2/symbols/Ruby?d=120379560&n=25# found one
[17:40:46] jhass: havenwood: oh that's a thing? til
[17:40:55] tjohnson: has joined #ruby
[17:41:02] rkazak: has joined #ruby
[17:41:29] shevy: jhass wow
[17:41:40] jhass: shevy: https://www.omniref.com/ruby/gems/ruby-libappindicator/0.1.5/symbols/Ruby?d=121663925&n=43# another one
[17:41:55] jhass: https://www.omniref.com/ruby/gems/ruby-extjs/2.0.4/symbols/Ruby?d=121443859&n=44# number three
[17:41:58] rodfersou: has joined #ruby
[17:42:07] jhass: https://www.omniref.com/ruby/gems/ruby-git/0.2.2/symbols/Ruby?d=99953569&n=45# number four
[17:42:08] shevy: they wanna mangle my pretty new module!
[17:42:27] jhass: and so it goes on for a while https://www.omniref.com/?utf8=%E2%9C%93&q=Ruby&commit=Search
[17:46:39] shevy: I am looking at a big yaml file someone else wrote for those keywords
[17:46:52] shevy: https://gist.github.com/shevegen/e81b8b5abbe399290d39
[17:47:04] shevy: damn colours... here without colours https://gist.githubusercontent.com/shevegen/e81b8b5abbe399290d39/raw/4a39087c4fd640a64aaf8b28a96acb0cea430834/keywords.yml
[17:47:24] baweaver: has joined #ruby
[17:47:24] shevy: he went to show examples for them :)
[17:47:31] AhabsBeard: has joined #ruby
[17:49:21] Scripore: has joined #ruby
[17:49:22] ismaelga: has joined #ruby
[17:49:49] nettoweb: has joined #ruby
[17:51:00] Cache_Money: has joined #ruby
[17:51:29] platzhirsch: has joined #ruby
[17:51:51] saadq: has joined #ruby
[17:52:07] Master44: whats the different between " and ' in ruby
[17:52:24] waxjar: " allows string interpolation, ' doesn't
[17:52:38] jhass: also " interprets more escapes
[17:52:39] jacor: has joined #ruby
[17:53:14] gambl0re: has joined #ruby
[17:53:36] postmodern: has joined #ruby
[17:53:51] miah: ' creates string literals. '\nfoo#{ baz}' will result in a string that contains '\nfoo#{ baz }', whereas " would interpolate the \n as a new line and execute `baz` in your #{}
[17:54:16] Master44: so I can use " every time if I want?
[17:54:34] miah: some people get weird about it =)
[17:54:46] Master44: so its never wrong to use "
[17:54:53] miah: just be consistent
[17:54:54] miah: https://github.com/bbatsov/ruby-style-guide/#consistent-string-literals
[17:54:56] Master44: I can just use " forever and dont mind about '?
[17:55:12] Master44: whats the point with ' then
[17:55:15] allcentury: has joined #ruby
[17:55:22] miah: i always use ' unless i want interpolation
[17:55:32] Andriamanitra: you dont need to escape so much stuff
[17:56:04] catcher: has joined #ruby
[17:56:42] miah: when my strings are " it signals to the reader that im doing something beyond creating a string
[17:56:54] havenwood: Master44: Single quotes signal to the reader that escapes and interpolation aren't happening.
[17:57:33] havenwood: Signaling to the reader! \o/
[17:57:44] Andriamanitra: is there a performance difference then?
[17:57:46] miah: programming isn't just about feeding input into a compilter/interpolator
[17:57:57] miah: its about the other people working with your code, and being able to interpolate it themselves
[17:58:09] MrBeardy: tell that to brainfuck
[17:58:10] Andriamanitra: i've always preferred " unless i specifically need ' because it's more natural for me to type
[17:58:13] havenwood: Andriamanitra: There is but not one worth being concerned about.
[17:58:16] miah: if your style is consistent, its easier for readers to interpolate
[17:58:35] miah: ' doesnt require me to press a shift key
[17:58:43] ghr: has joined #ruby
[17:59:35] juanda: has joined #ruby
[18:00:10] jhass: -bo *!*@host86-139-75-0.range86-139.btcentralplus.com jhass
[18:01:49] creakybones: has joined #ruby
[18:03:37] Master44: so its different from people to people where you use ' and "? lol
[18:03:54] qwertme: has joined #ruby
[18:04:02] sinkensabe: has joined #ruby
[18:04:15] jhass: ACTION is adopting " by default
[18:06:02] ellisTAA: can anyone tell me why i???m getting this error message? https://gist.github.com/ellismarte/4b410c4dba8db0af26f3#file-error-rb-L1-L4
[18:07:54] Andriamanitra: i think it should be to_eq not to eq
[18:07:59] Andriamanitra: but im no expert
[18:08:14] jhass: no, to eq is right
[18:08:34] jhass: but you need some parens
[18:08:38] jhass: expect(...).to
[18:08:42] toretore: kale burger :/
[18:09:18] CustosLimen: has joined #ruby
[18:09:26] Master44: jhass what do you work as?
[18:09:42] jhass: still in the student phase
[18:10:11] ellisTAA: jhass: thanks jhass!
[18:10:22] baweaver: jhass: If you're interested in the Bay Area, shoot me a ping later.
[18:10:24] ellisTAA: lol @ toretore
[18:10:29] Master44: jhass when did you start to program?
[18:10:53] jhass: baweaver: dunno US doesn't seem attractive tbh (not talking about pays)
[18:10:58] mrchris: has joined #ruby
[18:11:07] baweaver: Fair enough, just throwing it out there.
[18:11:16] jhass: Master44: age or years?
[18:11:26] jhass: baweaver: appreciate it
[18:12:11] jhass: about 14 so it's approaching the 10 years I guess, though I'm not sure I really count the first 3-4
[18:12:38] Master44: you know other languages to?
[18:12:49] jhass: toying with Crystal more and more recently
[18:13:54] miah: crystal looks interesting
[18:14:19] bb010g: has joined #ruby
[18:14:27] Master44: jhass its ruby a good first language?
[18:14:35] jhass: I'd say so, yes
[18:15:05] Master44: why is ruby good?
[18:15:17] havenwood: Master44: It makes us happy.
[18:15:25] jhass: because it's a highlevel language that takes object orientation to every corner
[18:15:30] Master44: why havenwood?
[18:15:37] jhass: so you have less concepts to start with
[18:15:50] Mon_Ouie: has joined #ruby
[18:15:57] Master44: jhass and havenwood you live on irc?
[18:16:18] jhass: IRC is a semi-passive medium, you just leave it open in the background
[18:16:36] havenwood: Master44: I live in real life and visit irc.
[18:16:46] miah: i have a server that just acts as my irc system, where i run irc in tmux and i always have a window devoted to it
[18:17:03] miah: and i work from home as well; and at work we also communicate via irc
[18:17:12] havenwood: Yeah, I also work remotely.
[18:17:21] Master44: all of you work with ruby?
[18:17:48] miah: ruby primarily, but also go lang, and i deal with everything else on an administrative level (i do systems admin)
[18:17:55] havenwood: Master44: We're polyglots but Ruby is what brings us here.
[18:18:16] Master44: is it good money on programming?
[18:18:23] Psy-Q: has joined #ruby
[18:18:24] miah: depends on where you work
[18:18:40] Master44: like just a basic programmer :P
[18:19:27] miah: its lots of variables; company industry, location, etc
[18:19:32] greenbagels: has joined #ruby
[18:19:44] Master44: whats the best overall?
[18:19:51] Master44: apps, systems, websites?
[18:20:52] havenwood: Master44: Yes.
[18:21:36] Master44: havenwood in what age did you start to program?
[18:23:11] miah: i was around 8
[18:23:56] Master44: miah you are a girl or boy?
[18:24:15] woodennails: has joined #ruby
[18:24:34] ellisTAA: i have a method that reads a file and turns each row into an object. how can i test this method?
[18:24:40] miah: mid 30's
[18:25:16] toretore: EllisTAA: !gist plz
[18:25:16] helpa: EllisTAA: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:25:21] Master44: Ellistastaa what you mean
[18:25:23] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[18:25:55] miah: luckily my school had a computer class and we learned basic; my mom also sent me to summer camps and sometimes they were computer camps
[18:26:17] miah: (usually it was swimming though)
[18:26:37] ellisTAA: i just wrote this method & now i???m trying to test it but i???m not sure what i would test for ??? an array of objects? https://gist.github.com/ellismarte/4b410c4dba8db0af26f3#file-ruby-rb-L20-L28
[18:27:45] bluish: has joined #ruby
[18:27:56] mrmargolis: has joined #ruby
[18:28:27] toretore: EllisTAA: you test against the desired state of @recipes after it's run
[18:28:31] mrmargolis: has joined #ruby
[18:28:38] ellisTAA: test against?
[18:28:57] ellisTAA: so does that mean test to see if i got an array of objects?
[18:28:58] miah: that you can perform specific actions against the object and they return useful data
[18:29:34] toretore: EllisTAA: your method is supposed to add objects to @recipes; test that it actually does this by inspecting @recipes after
[18:29:50] spider-mario: has joined #ruby
[18:30:14] toretore: ideally, you'd decouple the i/o and the manipulation of @recipes so you could test each part in isolation
[18:30:28] toretore: i.e. the method as-is does too much
[18:30:37] jpfuentes2: has joined #ruby
[18:30:41] RegulationD: has joined #ruby
[18:30:43] ellisTAA: how would u write the test?
[18:30:56] edwinvdgraaf: has joined #ruby
[18:30:57] toretore: i wouldn't, it's not my code
[18:31:09] havenwood: EllisTAA: In Minitest. :)
[18:32:23] toretore: yeah i wouldn't be doing this `expect().to eq` bs
[18:32:26] towski_: has joined #ruby
[18:32:56] toretore: assert_equal ought be enough for everybody
[18:34:14] platzhirsch: has joined #ruby
[18:34:30] marr: has joined #ruby
[18:35:16] Master44: Array.new its the same as []
[18:35:17] sandelius: has joined #ruby
[18:35:44] Master44: so why write Array.new
[18:35:49] Master44: why not just []
[18:35:53] Andriamanitra: except with Array.new you can do Array.new(0)
[18:35:56] havenwood: EllisTAA: Looking at your code, why are you skipping the first index? Is there a nice CSV way of getting what you're after? Consider using map if you're mapping.
[18:36:17] havenwood: Master44: If you're simply creating an Array, use the Array literal: []
[18:36:18] ellisTAA: havewood: i bet there is ???.
[18:36:30] ellisTAA: so how could i use the first line?
[18:36:38] ellisTAA: as a key for the restof the lines
[18:36:56] Master44: when do I use Array.new then havenwood?
[18:37:01] Master44: when I can just []
[18:38:06] Master44: or someone else here? why do we have Array.new??
[18:38:17] miah: when you want to ensure a object is an array; eg Array.new(foo)
[18:38:20] Andriamanitra: >> Array.new(3, 0)
[18:38:21] ruboto: Andriamanitra # => [0, 0, 0] (https://eval.in/373377)
[18:38:43] Master44: if array.new = foo
[18:38:43] reset: has joined #ruby
[18:38:47] Master44: what does it do?
[18:39:52] edwinvdgraaf: has joined #ruby
[18:40:25] joneshf-laptop: has joined #ruby
[18:40:38] miah: here is a better description; http://stackoverflow.com/questions/18358717/ruby-elegantly-convert-variable-to-an-array-if-not-an-array-already
[18:42:45] Cache_Money: has joined #ruby
[18:43:17] towski_: has joined #ruby
[18:43:55] Jello_Raptor: hmm, if I have a function 'a' in a class 'Foo' that references 'self' is there a way to automagically get a function 'Foo.a' that takes an object of 'Foo' as the first parameter?
[18:44:44] ismaelga: has joined #ruby
[18:45:39] lala: has joined #ruby
[18:46:41] veduardo: has joined #ruby
[18:46:41] casadei: has joined #ruby
[18:47:18] Master44: when should you use %m in your array
[18:47:36] moretti: has joined #ruby
[18:47:44] jacor: has joined #ruby
[18:48:01] yh: has joined #ruby
[18:48:11] miah: i dont think i know %m
[18:48:28] Master44: you know ruby good right?
[18:48:44] miah: maybe? =)
[18:48:48] Master44: ok, then %m its totally useless
[18:48:53] woodennails: has joined #ruby
[18:49:01] miah: http://teohm.com/blog/2012/10/15/start-using-ruby-percent-notation/
[18:49:03] miah: here is a list
[18:49:08] Master44: its some shit convert each element of array to a string
[18:49:35] Master44: like : %m ["hello this is me"]
[18:49:48] Master44: "hello", "this", "is", "me"
[18:50:01] Master44: or something
[18:51:37] miah: can you show me the code or gist?
[18:52:03] catcher: has joined #ruby
[18:52:25] Master44: you know %w?
[18:52:30] miah: so ya, i use %w all the time.
[18:52:39] amclain: has joined #ruby
[18:52:51] miah: >> %w(foo bar baz)
[18:52:52] ruboto: miah # => ["foo", "bar", "baz"] (https://eval.in/373385)
[18:53:53] Master44: why you use %w??
[18:53:53] Master44: to make string out of array+
[18:54:24] miah: because %w lets me be lazy. i dont have to use quotes, commas or brackets
[18:54:57] mistermocha: has joined #ruby
[18:55:10] Master44: but whats the point of getting it to a string?
[18:55:30] miah: depends on what you're doing; sometimes storing an array of strings is useful =)
[18:55:47] Master44: so its for the lazy people?
[18:55:48] yqt: has joined #ruby
[18:55:58] miah: its a commonly used idiom
[18:56:03] Master44: ok I got it, thanks :)
[18:56:24] miah: https://github.com/bbatsov/ruby-style-guide/#percent-w
[18:57:14] miah: you should give the ruby style guide a read if you haven't yet
[18:57:32] miah: or this book; http://eloquentruby.com/
[18:57:44] greenbagels: has joined #ruby
[18:57:47] HotCoder: has joined #ruby
[18:58:52] mhoungbo_: has joined #ruby
[18:59:01] mhoungbo__: has joined #ruby
[18:59:01] ghr: has joined #ruby
[18:59:02] Master44: I am reading a book now
[18:59:14] nettoweb: has joined #ruby
[18:59:29] Master44: the ruby programming language
[18:59:29] Master44: by o reilly
[18:59:40] miah: ive read that too
[18:59:54] Kozen: Eloquent Ruby is the best book I have read so far
[19:00:17] Master44: its good book
[19:00:28] Master44: but I need to go and sleep now or my dad get angry :D
[19:00:45] miah: yes, eloquent ruby is a++; the one that gave me the 'i know kung-fu' moment was poodr. http://www.poodr.com/
[19:00:58] Master44: bye bye guys :)
[19:02:03] CustosLimen: has joined #ruby
[19:02:04] miah: yes poodles.
[19:02:11] ohaibbq: has joined #ruby
[19:02:17] shevy: miah the kung-fu poodle!
[19:03:22] miah: poodles were originally bred for hunting
[19:04:02] gambl0re: has joined #ruby
[19:05:25] shevy: yeah - I can see how that one is a deadly mouse hunter http://goo.gl/rPGXRb
[19:06:04] miah: https://en.wikipedia.org/wiki/Poodle#Standard_Poodle
[19:06:14] miah: the modern haircuts are for show and not hunting =)
[19:07:05] miah: "The modern Standard retains many of the traits prized by their original owners: a keen working intelligence that makes the dog easy to command, webbed feet that make it an agile swimmer (all of the poodle's ancestors and descendants had or share the love of water) athletic stamina, and a moisture-resistant, curly coat that acts like a wool jumper in damp conditions."
[19:07:27] iamninja: has joined #ruby
[19:07:45] edwinvdg_: has joined #ruby
[19:08:38] shevy: now that's some poodle love there
[19:08:57] shevy: I totally must get me a poodle
[19:09:00] _orangejuice: has joined #ruby
[19:09:14] _orangejuice: has left #ruby: ()
[19:09:27] shevy: and some noodles
[19:10:02] miah: speaking of food.. i will eat some.
[19:10:56] shevy: don't eat the poodle!!!
[19:11:36] ellisTAA: im testing this instance method and it depends on some data created by another instance method, how can i get my test to run the contingent test before the dependent test?
[19:11:55] ellisTAA: or independet test before the dependent one*
[19:12:21] yh: has joined #ruby
[19:13:05] sorbo_: has joined #ruby
[19:13:09] codecop: has joined #ruby
[19:13:40] mrmargolis: has joined #ruby
[19:14:02] last_staff: has joined #ruby
[19:14:34] mhoungbo_: has joined #ruby
[19:14:38] mhoungbo__: has joined #ruby
[19:14:52] Jello_Raptor: welp, that's rake semantics changed bigtime :P
[19:15:32] Jello_Raptor: now i can mark a rule as optional, and if the components to perform it aren't there to use it will move onto the next one
[19:15:57] edwinvdgraaf: has joined #ruby
[19:16:39] ddv: has joined #ruby
[19:17:01] allcentury: has joined #ruby
[19:17:37] Limix: has joined #ruby
[19:18:16] edwinvdgraaf: has joined #ruby
[19:18:16] starless: has joined #ruby
[19:18:17] jhass: EllisTAA: don't, tests should be idempotent
[19:18:53] luckyme: has joined #ruby
[19:19:09] ellisTAA: can u explain idempotence, wiki is just so broad
[19:19:49] jhass: "not affect the result of others when run in any order" should be good enough for this case
[19:19:52] woodennails: has joined #ruby
[19:20:11] jhass: you likely want before/setup all/each hooks
[19:21:11] ringarin: has joined #ruby
[19:21:29] shevy: impotence!
[19:22:05] shevy: wikipedia says this is a good example
[19:22:08] shevy: 1 ? 1 = 1
[19:22:45] juanda: has joined #ruby
[19:22:52] Jello_Raptor: jhass: you want 'independent' not 'idempotent' for that case.
[19:24:03] Jello_Raptor: jhass: the pure maths version of idempotency applies to functions and says that for any idempotent function x and any input 'f(x) == f(f(x))' (this assumes the functions are purely functional, no external state, etc)
[19:25:10] jhass: well, I kind of do want the latter for my tests, the world should be exactly the same before and after
[19:25:41] Jello_Raptor: the CS version thereof says that for an entire system s and an idempotent function f and any input x replacing an invocation of "f(x)" with "{f(x);f(x)}" will not change anything
[19:27:44] Jello_Raptor: jhass: that's independance, idempotency can change the system. consider "$foo = 1; def func { $foo = 3 } end " given that setup running both 'func()' and 'func();func()' will leave you in the same state after, but that state is *different* from the one you started with.
[19:28:17] balazs: has joined #ruby
[19:29:16] _seanc_: has joined #ruby
[19:29:52] jhass: yes, independence is sufficient, but idempotency should be ideal, if it might not matter
[19:30:12] Jello_Raptor: running 'puts $foo' and 'func(); puts $foo' will produce different output, but we only care about the fact that the cases 'func(); puts $foo' and 'func();func(); puts $foo' are the same for idempotence.
[19:31:26] Jello_Raptor: jhass: idempotence is a strictly weaker property than independence. some 'func()' is independant of '$foo' if both 'puts $foo' and 'func(); puts $foo' have the same result, and that ( by definition) means it's idempotent.
[19:31:29] RegulationD: has joined #ruby
[19:31:36] platosha_: has joined #ruby
[19:32:23] jhass: mh, I have to admit my CS might be a bit weak here, still have to pick up an FP lang :/ so thanks I guess :)
[19:33:05] Jello_Raptor: (note: the cs sems of idempotence reduces to the maths sense if for some function 'f()' in cs land there's a math's land function 'f'(x)' that takes the entire system state as the input and returns the entire system state as output, so 'f();f()' is the same as "f'(f'(x))"
[19:33:24] Jello_Raptor: ... i should be better about mixing prime ticks, and single quotes in ascii :P
[19:34:08] Jello_Raptor: jhass: yes but your ruby fu is strong :) you advice yesterday helped me a bunch. If only i hadn't lost 6 hours to forgetting that ruby uses 'elsif' instead of 'else if' :P
[19:34:23] SouL_|_: has joined #ruby
[19:37:30] Vile`: has joined #ruby
[19:40:00] baweaver: What FP now?
[19:40:05] baweaver: ACTION reads back a bit
[19:41:18] baweaver: Ruby is actually pretty functional in some regards
[19:41:45] baweaver: The running joke I have is that Python is the imperative scripting language and ruby is the functional one
[19:42:20] baweaver: Though really if you know Ruby well, a language like Scala or Standard ML will be very familiar.
[19:42:25] havenwood: baweaver: Have you checked out Matz' new lang, Streem?: https://github.com/matz/streem#readme
[19:42:32] OrbitalKitten: has joined #ruby
[19:42:41] baweaver: heard of, skimmed, but wouldn't say really checked out
[19:43:05] havenwood: baweaver: It actually does run scripts now on OS X even though the docs say it's non-functional.
[19:43:37] baweaver: People are a bit too religious with the word functional if you ask me
[19:43:52] gambl0re: guys, i just installed photoshop.
[19:44:06] havenwood: gambl0re: Ruby?
[19:44:09] baweaver: ACTION stares blankly
[19:44:48] gambl0re: no, photoshop
[19:45:02] baweaver: As in this is the Ruby channel
[19:45:10] baweaver: why are you mentioning photoshop
[19:45:34] gambl0re: guys, sorry. wrong channel.
[19:45:44] baweaver: ACTION shakes head
[19:46:12] havenwood: baweaver: I meant non-functioning not non-functional. Heh.
[19:46:31] baweaver: well, point still stands
[19:46:35] havenwood: So much functional talk I typo'd.
[19:47:28] jhass: so your keyboard is infunction...i give up
[19:48:28] Scripore: has joined #ruby
[19:48:43] seitensei: has joined #ruby
[19:48:43] seitensei: has joined #ruby
[19:49:00] mrchris: has joined #ruby
[19:49:09] Ox0dea: has joined #ruby
[19:49:22] lala: has left #ruby: ()
[19:50:35] sinkensabe: has joined #ruby
[19:51:22] davedev24: has joined #ruby
[19:51:53] zarubin: has joined #ruby
[19:52:59] armyriad: has joined #ruby
[19:53:19] Jello_Raptor: so I'm trying to monkey patch a function that uses the splat, and ampersand for block operator, how i do i call 'super' so that it won't barf? example: http://hastebin.com/ruxicitidu.rb
[19:53:56] Papierkorb: has joined #ruby
[19:54:10] Ox0dea: Jello_Raptor: super()
[19:54:57] Jello_Raptor: ... that was easy
[19:55:31] Ox0dea: Just another of Ruby's many idiosyncracies.
[19:55:33] Mon_Ouie: super() calls the super method with no arguments except for the block argument, super(&nil) calls the super method with absolutely no arguments, and super calls the super method with the same arguments as the current method
[19:56:57] bmalum: has joined #ruby
[19:58:42] ghr: has joined #ruby
[19:58:45] balazs: has joined #ruby
[19:59:35] s2013: has joined #ruby
[19:59:50] Ox0dea: Mon_Ouie: How does that work, given NilClass#to_proc is undefined?
[20:00:04] havenwood: baweaver: It'll be interesting to see if Ruby 3.0 goes with agents or Koichi-san's idea for objects being mutable in the thread that currently possesses ownership while being immutable from other threads.
[20:00:31] gkra: has joined #ruby
[20:00:59] Channel6: has joined #ruby
[20:01:40] havenwood: baweaver: I think the immutability from the outside route might bode really well for functional programming in Ruby.
[20:03:16] Vile`: has joined #ruby
[20:03:33] baweaver: We'll have to see how it goes.
[20:03:35] jhass: Ox0dea: well I guess it's just valid for passing no block? some things are simply special cases after all
[20:03:39] baweaver: Well, off I go.
[20:06:50] balazs: has joined #ruby
[20:07:57] Neomex: has joined #ruby
[20:09:17] iliketurtles: has joined #ruby
[20:11:53] ashemark: has joined #ruby
[20:12:18] ashemark: has left #ruby: ("WeeChat 1.2")
[20:12:19] Mon_Ouie: Ox0dea: It's a special case. It specifically means 'pass no block', as opposed to 'pass nil as a block'
[20:16:12] zarubin: has joined #ruby
[20:17:49] olistik: has joined #ruby
[20:17:51] mrchris: has joined #ruby
[20:20:09] Soda: has joined #ruby
[20:22:02] yqt: has joined #ruby
[20:22:05] apt-get_: has joined #ruby
[20:23:17] Musashi007: has joined #ruby
[20:24:57] apt-get__: has joined #ruby
[20:26:48] mrchris: has joined #ruby
[20:27:11] unreal_: has joined #ruby
[20:28:38] s2013: has joined #ruby
[20:28:55] banister: has joined #ruby
[20:31:05] saadq: has joined #ruby
[20:35:26] Musashi007: has joined #ruby
[20:36:08] Miccet: has joined #ruby
[20:36:27] allcentury: has joined #ruby
[20:37:07] bmalum: has joined #ruby
[20:38:29] Musashi007: has joined #ruby
[20:39:51] platzhirsch: has joined #ruby
[20:41:14] zarubin: has joined #ruby
[20:45:59] workmad3: has joined #ruby
[20:47:21] Billias: has joined #ruby
[20:49:40] juanda: has joined #ruby
[20:55:00] Musashi007: has joined #ruby
[20:55:26] A205B064: has joined #ruby
[20:56:07] s2013: has joined #ruby
[20:59:04] ghr: has joined #ruby
[21:00:49] michael_mbp: has joined #ruby
[21:01:13] tomaszbalon: has joined #ruby
[21:02:25] wildroman2: has joined #ruby
[21:05:21] towski_: has joined #ruby
[21:10:39] wildroman2: has joined #ruby
[21:14:31] Micket: has joined #ruby
[21:15:16] dseitz: has joined #ruby
[21:15:38] ellisTAA: has joined #ruby
[21:16:03] ellisTAA: what???s the difference between someone who just got hired as a junior developer and a senior developer?
[21:16:20] kstuart_: has joined #ruby
[21:17:25] wildroman3: has joined #ruby
[21:18:49] Adran: has joined #ruby
[21:19:29] Rennex: has joined #ruby
[21:19:59] ddarkpassenger: has joined #ruby
[21:20:21] RegulationD: has joined #ruby
[21:21:35] davedev24_: has joined #ruby
[21:21:53] Ox0dea: >> def true.-(a, &b) a[] end; def false.-(a, &b) b[] end; (1 == 1).--> { p :ok } { fail Math }
[21:21:55] ruboto: Ox0dea # => :ok ...check link for more (https://eval.in/373432)
[21:22:01] Ox0dea: I think that's my favorite multi-block syntax.
[21:22:05] gkra: has joined #ruby
[21:22:41] mistermocha: has joined #ruby
[21:23:01] Ox0dea: Granted, it's only really nice in conditional contexts, but I suspect that's the most common use case.
[21:25:05] jhass: that took my way too long to understand...
[21:25:09] jhass: so there's that
[21:26:04] _seanc_: has joined #ruby
[21:26:10] commondream: has joined #ruby
[21:27:00] shevy: https://github.com/mruby/mruby/commit/bd2686d82d233774003fe683e9396f366b152b6d
[21:27:03] shevy: C is simple or?
[21:27:55] jhass: after you added all those macros and convenience functions... perhaps
[21:29:30] wasamasa: shevy: C is more like, "Be really careful"
[21:29:50] shevy: I am very careful
[21:30:00] wasamasa: you better be
[21:30:18] wasamasa: a segfault is your cpu's version of running into a pole
[21:32:45] ismaelga: has joined #ruby
[21:33:22] ellisTAA: can you guys tell me what some of your recent tasks were at work? i want to get an idea of what a developer actually does
[21:33:28] shevy: Diabolik no
[21:33:32] shevy: Diabolik write here
[21:33:44] Diabolik: i wasn't confident enough to be able to explain the full refactoring
[21:33:49] Diabolik: so i reverted to my original strucutre
[21:33:50] Diabolik: https://github.com/askl56/PrimeTime
[21:33:53] Diabolik: i think that's it done
[21:33:57] Diabolik: any comments are welcome
[21:34:09] doublemalt_: has joined #ruby
[21:34:17] shevy: how did the original error go away?
[21:34:26] triangles: has joined #ruby
[21:34:51] shevy: by the way
[21:34:52] Diabolik: i reverted to having prime_grid handle all the logic. I realised that this was the only way id be able to confidently explain what i had done
[21:34:52] shevy: prime_grid = PrimeGrid.new prime_matrix
[21:34:53] shevy: prime_grid.render
[21:35:03] shevy: are you sure you want to call render manually?
[21:35:16] Diabolik: so straight up prime_grid?
[21:35:25] shevy: well perhaps you had a reason to do so
[21:35:27] shevy: perhaps you did not :)
[21:35:36] Diabolik: i thought it was the only way to get it to run
[21:35:47] shevy: why? you already instantiate a new object
[21:35:55] shevy: the render call could become mandatory of your class PrimeGrid
[21:36:46] shevy: so your class is there https://github.com/askl56/PrimeTime/blob/master/lib/prime_grid.rb
[21:36:52] shevy: and in initialize, you could call render
[21:40:02] meph: has joined #ruby
[21:43:12] juanda: has joined #ruby
[21:43:21] roolo: has joined #ruby
[21:46:19] qwertme: has joined #ruby
[21:51:07] arescorpio: has joined #ruby
[21:51:46] nettoweb: has joined #ruby
[21:53:04] platosha: has joined #ruby
[21:53:49] gaboesquivel: has joined #ruby
[21:57:16] balazs: has joined #ruby
[21:58:34] tomaszbalon: has joined #ruby
[21:58:49] ghr: has joined #ruby
[22:00:21] Sawbones: has joined #ruby
[22:01:15] badhatter: has joined #ruby
[22:02:06] allcentury: has joined #ruby
[22:05:28] davedev24_: has joined #ruby
[22:05:59] towski_: has joined #ruby
[22:07:13] mrmargolis: has joined #ruby
[22:09:34] baroquebobcat: has joined #ruby
[22:09:46] platosha: has joined #ruby
[22:11:32] yuciyuar: has left #ruby: ("Communi 3.4.0 - http://communi.github.com")
[22:11:36] pontiki: has joined #ruby
[22:13:09] pengin: has joined #ruby
[22:13:45] jottr: has joined #ruby
[22:13:55] mello: has joined #ruby
[22:14:17] codelurker: has joined #ruby
[22:18:41] bashusr: has joined #ruby
[22:18:44] bashusr: has joined #ruby
[22:20:38] ellisTAA: has joined #ruby
[22:21:14] Parker0: has joined #ruby
[22:21:20] Sawbones: has joined #ruby
[22:21:43] sdwrage: has joined #ruby
[22:23:45] Sawbones: has joined #ruby
[22:24:04] pengin: has joined #ruby
[22:24:28] OrbitalKitten: has joined #ruby
[22:26:01] sorbo_: has joined #ruby
[22:27:13] shevy: hey pontikis
[22:29:16] kinduff: has joined #ruby
[22:29:16] kinduff: has joined #ruby
[22:30:48] kinduff: has joined #ruby
[22:30:48] kinduff: has joined #ruby
[22:31:20] kinduff: has joined #ruby
[22:31:49] Mia: has joined #ruby
[22:32:45] Sawbones: has joined #ruby
[22:33:06] baroquebobcat: has joined #ruby
[22:34:08] A205B064: has joined #ruby
[22:34:24] Blaguvest: has joined #ruby
[22:36:32] jottr: has joined #ruby
[22:37:57] jfarmer: has joined #ruby
[22:38:38] Musashi007: has joined #ruby
[22:45:46] Ropeney: has joined #ruby
[22:48:12] segfalt: has joined #ruby
[22:50:01] platzhirsch: has joined #ruby
[22:50:57] ismaelga: has joined #ruby
[22:52:20] michael_mbp: has joined #ruby
[22:55:18] qwertme: has joined #ruby
[22:55:34] vudew_: has joined #ruby
[22:58:15] freerobby: has joined #ruby
[22:58:43] ghr: has joined #ruby
[22:59:55] Yzguy: has joined #ruby
[23:02:08] xxneolithicxx: has joined #ruby
[23:06:00] HotCoder: has joined #ruby
[23:09:13] duncannz: has joined #ruby
[23:09:14] RegulationD: has joined #ruby
[23:09:23] davedev24_: has joined #ruby
[23:10:57] _blizzy_: anyone know any ways to get a list of the resources a website grabbed in ruby?
[23:11:21] Aeyrix: _blizzy_: How do you mean?
[23:11:56] _blizzy_: I load a website called foo.com, it loads an image from cdn.bar.com/image.png
[23:12:00] _blizzy_: I want to get the cdn link
[23:12:03] Sawbones: has joined #ruby
[23:12:34] Papierkorb: has joined #ruby
[23:13:49] nateberkopec: has joined #ruby
[23:13:52] OrbitalKitten: has joined #ruby
[23:13:54] jottr: has joined #ruby
[23:14:24] mistermocha: has joined #ruby
[23:14:29] mello: has joined #ruby
[23:14:53] ellisTAA: i???m looking for a mentor, if anyone would be willing to help me find one or let me be there mentee that would be cool
[23:15:37] bosma: has joined #ruby
[23:17:13] zipace: has joined #ruby
[23:17:13] zipace: has joined #ruby
[23:17:28] jfarmer: _blizzy_: It depends on how it was loaded, but assuming it's a simple <img src="..."> link, you can fetch the HTML from foo.com and parse it
[23:17:48] Musashi007: has joined #ruby
[23:18:00] jfarmer: Nokogiri (a Ruby gem) makes the parsing very straightforward, assuming you understand HTML and CSS.
[23:18:33] jfarmer: If the resource was loaded via CSS, JavaScript, or some other means then it won't be that simple.
[23:21:50] fedexo: has joined #ruby
[23:22:24] davedev24: has joined #ruby
[23:23:14] _blizzy_: thanks, jfarmer.
[23:23:57] allcentury: has joined #ruby
[23:26:19] chipotle: has joined #ruby
[23:27:23] mr_goodcat: has joined #ruby
[23:27:39] Heartmender: has joined #ruby
[23:27:45] gunthler: has joined #ruby
[23:28:18] Limix: has joined #ruby
[23:28:26] GnuYawk: has joined #ruby
[23:28:26] GnuYawk: has joined #ruby
[23:28:29] gunthler: how do i know if my program is working
[23:30:17] jfarmer: gunthler: When (1) it does what you intend for it to do and (2) what you intend for it to do is correct.
[23:31:33] pontiki: jfarmer: extremely succinct and well-said!
[23:31:35] Papierkorb: has joined #ruby
[23:31:42] pontiki: jfarmer+=1
[23:32:35] jfarmer: Hah, thanks!
[23:32:36] gunthler: hold on i need to acquire pastebin for code
[23:32:43] jfarmer: http://gist.github.com
[23:32:53] jhass: well actually you never really know, except for a few exceptional cases. One of the unsolved CS problems
[23:33:14] jhass: you can only get confident that it works for all your usecases
[23:33:20] pontiki: yes, but we're humans, and perfect knowledge is never available to us
[23:33:27] Musashi007: has joined #ruby
[23:33:34] jfarmer: gunthler Be forewarned, the first question I (or anyone else here) will ask is: "What do you expect your code to do, what is it doing instead, and how can you tell?"
[23:33:53] pontiki: as such, human speech is full of such fuzzy generalizations
[23:35:49] Ox0dea: pontiki: Did you mean to imply that we can never know anything for certain?
[23:35:59] joelataylor: has joined #ruby
[23:36:33] pontiki: Ox0dea: i'm going to really stretch it and say that "knowing" is just a feeling, a result of biochemical processes in your brain
[23:36:50] pontiki: therefore, temporary
[23:37:35] gunthler: ok heres my code http://pastebin.com/SgcKyR7d
[23:37:35] ruboto: gunthler, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/967382d65c084e2de1d6
[23:37:35] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:38:08] krz: has joined #ruby
[23:38:21] jfarmer: oh ok a troll
[23:38:40] Musashi007: has joined #ruby
[23:38:41] jfarmer: People still do that?
[23:38:54] Rubie: has joined #ruby
[23:39:11] shevy: gunthler pastebin is so hard to read, there are literally no line breaks
[23:39:11] eggoez: has joined #ruby
[23:39:37] shevy: there was a time when there was annoying music ad on pastebin too
[23:39:49] Brando753: has joined #ruby
[23:39:50] shevy: I can't survive the www anymore without adblock, because of things like that
[23:43:16] ismaelga: has joined #ruby
[23:45:58] veduardo: has joined #ruby
[23:46:44] jhass: they're not even in #python and do the reverse there, how boring
[23:51:06] icarus: has joined #ruby
[23:54:50] gunthler: has left #ruby: ("https://youtu.be/5FjWe31S_0g")
[23:55:35] icarus: has joined #ruby
[23:56:17] s2013: has joined #ruby
[23:56:19] Aeyrix: Sanity check: How would I do a range from 0x00 to 0xFF ?
[23:56:22] jpfuentes2: has joined #ruby
[23:56:30] kinduff: has joined #ruby
[23:56:43] jfarmer: Aeyrix: The numbers themselves of the hexadecimal representations of those numbers?
[23:56:51] Aeyrix: The hex rep
[23:57:59] _djbkd: has joined #ruby
[23:58:17] jfarmer: (0..255).map { |n| sprintf("0x%0.2X", n) }
[23:58:42] Aeyrix: Gotcha. Was wondering if there was a way to work with them without sprintf.
[23:58:43] Aeyrix: Cheers yo.
[23:59:00] ghr: has joined #ruby
[23:59:11] jfarmer: You can convert any Fixnum to an arbitrary base by passing a radix argument to to_s
[23:59:23] jfarmer: e.g., 255.to_s(16) # => "ff"