apeiros changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
aredridel is now known as Aria
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
dorei has quit []
segfalt has quit [Quit: segfalt]
ronh- has joined #ruby
ronh- has left #ruby [#ruby]
commondream has quit [Ping timeout: 272 seconds]
segfalt has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 252 seconds]
sdwrage has joined #ruby
nfk has quit [Quit: yawn]
aeontech has joined #ruby
<claw> hey there
codeFiend has quit [Ping timeout: 265 seconds]
aeontech is now known as codeFiend
starless has joined #ruby
mikecmpbll has quit [Quit: ciao.]
<claw> i want to collect 100 elements in an array with 1M elements
<claw> i use select
<jhass> just random 100 elements?
<claw> performance problem: select continous even if i have the 100 elements
<claw> so i know how many are in there
<claw> so actually could stop if i got that amount
<claw> i could that be done ?
<havenwood> >> 1.upto(Float::INFINITY).lazy.select(&:even?).first 5
<ruboto> havenwood # => [2, 4, 6, 8, 10] (https://eval.in/373111)
mello has joined #ruby
chipotle has quit [Ping timeout: 246 seconds]
<claw> okay that proofs that first actually stops it
<jhass> are the elements you're going to select consecutive items by any chance?
Lucky__ has quit [Ping timeout: 252 seconds]
<havenwood> claw: Say more about what you're doing?
<claw> i thought i will continue till end and then first will select the first 5 of the whole result
<claw> havenwood: i think you already provided the solution
<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
<claw> i will test that thanks so far
gkra has quit [Remote host closed the connection]
<jhass> Diabolik: check the docs, they'll get you started with the project setup
gkra has joined #ruby
<jhass> claw: you did notice the .lazy. in there?
Limix has joined #ruby
<claw> i just looked that up jhass
<claw> did not know lazy before
<claw> and thats what i was searching
mello has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
bkxd has joined #ruby
Agoldfish has quit [Quit: G'Bye]
bruno- has quit [Ping timeout: 256 seconds]
codeFiend has quit [Quit: codeFiend]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railsForDaiz has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
Lucky__ has joined #ruby
iamninja has joined #ruby
davedev24_ has quit [Ping timeout: 276 seconds]
davedev24_ has joined #ruby
OrbitalKitten has joined #ruby
sinkensabe has joined #ruby
veduardo has quit [Ping timeout: 272 seconds]
railsForDaiz has quit [Read error: Connection reset by peer]
lennae has joined #ruby
Kevifo has joined #ruby
<Kevifo> So in Ruby, private protects against an explicit receiver?
<Xtopherus`> exactly
zarubin has joined #ruby
spiderbyte has quit [Ping timeout: 265 seconds]
<Kevifo> What's the point really?
jenrzzz has joined #ruby
arescorpio has quit [Quit: Leaving.]
zarubin has quit [Ping timeout: 255 seconds]
spiderbyte has joined #ruby
gluten_hell_ has joined #ruby
<jhass> declaring intent
mistermocha has joined #ruby
_ht has quit [Remote host closed the connection]
_ht has joined #ruby
cryptarium has joined #ruby
kayloos has joined #ruby
bogdanteleaga has quit [Ping timeout: 246 seconds]
gluten_hell_ has quit [Ping timeout: 265 seconds]
kalusn has quit [Ping timeout: 265 seconds]
Muhannad has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
<Kevifo> In the pickaxe book, are there only the first 400 pages that describes the language?
robustus has quit [Ping timeout: 255 seconds]
Muhannad has quit [Max SendQ exceeded]
<Kevifo> I think the other pages describe the modules and standard class methods etc.
Muhannad has joined #ruby
asteros has joined #ruby
Limix has quit [Quit: Limix]
jenrzzz has quit [Ping timeout: 272 seconds]
asteros has quit [Client Quit]
bogdanteleaga has joined #ruby
kinduff has quit [Ping timeout: 244 seconds]
robustus|Off has joined #ruby
robustus|Off is now known as robustus
ddarkpassenger has joined #ruby
<Jello_Raptor> aargh :/
RegulationD has joined #ruby
Hijiri has quit [Ping timeout: 272 seconds]
chipotle has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<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.
knowtheory has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
codeFiend has joined #ruby
ghr has joined #ruby
cubesandcode has joined #ruby
c_u_u_n_t_ has joined #ruby
<c_u_u_n_t_> hi
<jhass> !kick c_u_u_n_t_ try a better nick
c_u_u_n_t_ was kicked from #ruby by ruboto [try a better nick]
c_u_u_n_t_ has joined #ruby
<c_u_u_n_t_> what is wrong with my nick?
kinduff has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
<jhass> don't argue, you have one minute
<c_u_u_n_t_> I'm not arguing. you're being disrespectful
<jhass> 30 seconds
<c_u_u_n_t_> #Ruby does not kindly welcome new users
<c_u_u_n_t_> the #Ruby community is very hostile and toxic
<c_u_u_n_t_> I regret learning ruby
DEA7TH has quit [Ping timeout: 264 seconds]
c_u_u_n_t_ has left #ruby [#ruby]
<bkxd> you will be sorely missed...
<gattuso> ty for the monologue :-D
Hijiri has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
CloCkWeRX has quit [Ping timeout: 250 seconds]
<baweaver> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, miah, workmad3, Coraline, drbrain, sevenseacat, slyphon, zenspider, Aria, ljarvis, rubyhacker1
<baweaver> oh, jhass already saw it
* baweaver wanders back off
Xtopherus` is now known as Xtopherus
kt2 has joined #ruby
kt2 has quit [Client Quit]
Xtopherus is now known as banister
sinkensabe has quit [Remote host closed the connection]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest50824 has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
Muhannad has quit [Quit: Leaving]
rikai has joined #ruby
<centrx> Too slow
plashchynski has quit [Quit: plashchynski]
starless has quit [Quit: Leaving]
ScriptGeek has joined #ruby
<ScriptGeek> How to put a method reference into a hash to be executed later?
rikai has quit [Ping timeout: 265 seconds]
<jhass> ScriptGeek: use a symbol and public_send or wrap it into a proc
<ScriptGeek> thanks, I'll check it out
<havenwood> >> {newline: method(:puts)}[:newline].call 'ScriptGeek'
<ruboto> havenwood # => ScriptGeek ...check link for more (https://eval.in/373149)
<jhass> oh, or method right
arescorpio has joined #ruby
<jhass> sign I should go to bed
Musashi007_ has joined #ruby
chipotle has quit [Quit: cheerio]
Musashi007 has quit [Ping timeout: 264 seconds]
Musashi007_ is now known as Musashi007
<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.
<ScriptGeek> havenwood: what does the >> mean ?
S3thc0n has joined #ruby
_ht has quit [Quit: Konversation terminated!]
<havenwood> ScriptGeek: Just tells the bot to eval it.
<havenwood> >> 1 + 1
<ruboto> havenwood # => 2 (https://eval.in/373154)
<ScriptGeek> >> hi little bot
<ruboto> ScriptGeek # => undefined local variable or method `bot' for main:Object (NameError) ...check link for more (https://eval.in/373155)
<ScriptGeek> neat lol
icarus has quit [Remote host closed the connection]
cubesandcode has quit [Remote host closed the connection]
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
rikai has joined #ruby
<postmodern> does protected work across modules?
<kinduff> >> hi
<ruboto> kinduff # => undefined local variable or method `hi' for main:Object (NameError) ...check link for more (https://eval.in/373156)
<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?
ag4ve has joined #ruby
<ag4ve> any intro tutorials for ruby syntax/parsing, variable types, blocks, scoping, sourcing/requiring
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> ag4ve, http://tryruby.org/
<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"
<centrx> ag4ve, Ruby Monk
<jhass> ?quickref
pengin has joined #ruby
Ropeney_ has joined #ruby
cubesandcode has joined #ruby
<ag4ve> ah yeah, quickref looks like what i want - thanks
havenwood has quit [Remote host closed the connection]
<jhass> ag4ve: also good might be to port one of your smaller scripts with that to ruby and then ask for style review here ;)
<ag4ve> hmmm, i don't see any discussion on scope or sourcing/namespace in that ref
kayloos has quit []
<ag4ve> s/ref/quickref/
Brozo has quit [Remote host closed the connection]
<jhass> modules are used as namespace, there's no "load file under this namespace"
<jhass> the toplevel is Object
<jhass> classes are modules, so they can be used as namespace too
<ag4ve> so you can't import functions from a module?
<jhass> no
<jhass> you load files in ruby, not modules
<jhass> the files may define whatever, it's just convention
Exponential has joined #ruby
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
<ag4ve> and documentation in ruby? pod or something else?
aphprentice_ has quit [Ping timeout: 246 seconds]
cubesandcode has quit [Remote host closed the connection]
<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)
Brozo has joined #ruby
<jhass> notations are Class#instance_method and Class:class_method
<jhass> for doc
<jhass> er, ::, not :
axilla has quit [Quit: Lost terminal]
<jhass> popular online docs are ruby-doc.org and rubydoc.info
<ag4ve> i can handle rdoc :)
mello has joined #ruby
pengin has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
<ag4ve> ah, so rdoc is just formatted comments?
<jhass> both are, yup
<ag4ve> weird, ok
User458764 has joined #ruby
EllisTAA has joined #ruby
mello has quit [Ping timeout: 264 seconds]
<EllisTAA> can anyone tell me how to use ARGV? i googled it but nothing good came up
juanda has quit [Quit: juanda]
<jhass> treat it like an array
Soda has joined #ruby
<jhass> put p ARGV into a foo.rb
<jhass> do ruby foo.rb; ruby foo.rb a b c
ghr has quit [Ping timeout: 264 seconds]
<ag4ve> ok, i don't get this and pp isn't showing me why:
<ag4ve> (1..10) === 10 # true
<ag4ve> (1...10) === 10 # false
betahikaru has joined #ruby
edwinvdgraaf has quit [Ping timeout: 272 seconds]
<jhass> === is a method call, so Range#===
<EllisTAA> johass: ty
<EllisTAA> so do i always have to put the p for it to work?
<jhass> no
<EllisTAA> so i put p argv anywhere where i want user input?
<jhass> the p is puts ARGV.inspect
<jhass> it's just so you can look at it
<jhass> as said, treat it like an array
<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?
<jhass> EllisTAA: I gave you two commands
<EllisTAA> ok intersting. how does it know to put a b and c into the argv?
<jhass> it's what ARGV is
<jhass> the commandline arguments
<jhass> experiment with calling it in different ways with different arguments
<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?
allcentury has quit [Ping timeout: 265 seconds]
<jhass> it could, yes
<EllisTAA> when would i use argv and not gets?
<jhass> they're vastly different
<EllisTAA> seems like they both accept input
<jhass> gets reads from standard input, ARGV are the programs arguments (in fact any method of invoking a program can provide these)
<EllisTAA> ok so argv is for program arguments so it wouldn’t be used for regular input
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
<EllisTAA> thanks for helping me understand argv
davedev24_ has quit [Ping timeout: 244 seconds]
Exponential has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24_ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
kinduff has quit [Quit: back tomorrow]
EllisTAA has joined #ruby
yqt has quit [Ping timeout: 258 seconds]
<ag4ve> argv is given by the subprocess and gets is an fd
<ag4ve> s/is an/reads from/
senayar has quit []
bkxd has quit [Ping timeout: 265 seconds]
jokke has quit [Quit: ninja vanish]
jokke has joined #ruby
codeFiend has quit [Quit: codeFiend]
Kevifo has quit [Remote host closed the connection]
jokke has quit [Client Quit]
podman has quit [Quit: Connection closed for inactivity]
jokke has joined #ruby
jokke has quit [Client Quit]
jokke has joined #ruby
codeFiend has joined #ruby
juanda has joined #ruby
[A]rmandoo has joined #ruby
chipotle has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jenrzzz has joined #ruby
<EllisTAA> are there benefits to using colon on hash keys instead of quotes?
MrBeardy has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<EllisTAA> why do some people not use parentheses for their arguments?
mistermocha has joined #ruby
<shevy> how do I fetch error with Popen?
<shevy> right now I have:
<shevy> Open3.popen3(cmd_that_is_run_here) { |std_in, std_out, std_error, wait_thr|
<ScriptGeek> What is the meaning of this syntax? {newline: method(:puts)}[:newline].call
powder has quit [Quit: leaving]
havenwood has joined #ruby
<shevy> and I get line-by-line input in a: loop { line = std_out.gets
<shevy> but line may be nil, and I assume it happens because some error happens
<shevy> ScriptGeek this seems to be a hash
<MrBeardy> ScriptGeek: Seems redundant, send(:puts) looks like it would achieve the same result
<shevy> method() is a method -> method :puts # => #<Method: Object(Kernel)#puts>
[A]rmandoo has left #ruby [#ruby]
<MrBeardy> unless the hash is related to something, other than just being written as a standalone hash
<shevy> yeah it looks as if someone made a puts call more complicated than necessary
<ScriptGeek> yeah, I'm trying to put a method reference into a hash value
zarubin has joined #ruby
<shevy> ScriptGeek the part [:newline] is simply on a hash object, you ask for the value of the symbol-key called :newline
<ScriptGeek> so like this: hash[:newline] ?
<mistergibson> ScriptGeek : you might try MyHash[:key] = &method(:the_method_name)
<mistergibson> just off the top of my head
<shevy> ScriptGeek yeah
codeFiend has quit [Quit: codeFiend]
juanda has quit [Quit: juanda]
<ScriptGeek> mistergibson: I'll give that a shot
<shevy> I solved my problem, I needed to call the read() method on the stderror fd object std_error.read
zarubin has quit [Ping timeout: 258 seconds]
RegulationD has joined #ruby
mrsolo has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
balazs has quit [Remote host closed the connection]
choke has quit [Ping timeout: 256 seconds]
ohaibbq has joined #ruby
TDJACR is now known as NotTheNSA
Tuccuay has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
Tuccuay has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 272 seconds]
Limix has joined #ruby
Limix has quit [Client Quit]
roolo_ has joined #ruby
<shevy> hmm sinatra code has curious tidbits:
<shevy> @@eats_errors = Object.new
<shevy> def @@eats_errors.flush(*) end
<shevy> the .flush(*) part is to allow as many arguments as you want to?
<centrx> yeah they all get thrown away
<centrx> but that's not weirdest part
<shevy> :)
roolo has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
last_staff has joined #ruby
chipotle has quit [Quit: cheerio]
mrsolo has quit [Quit: This computer has gone to sleep]
<Diabolik> shevy i decided to make my prime_finder.rb a module
bkxd has joined #ruby
darkf has joined #ruby
choke has joined #ruby
<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 :/
prereflect has joined #ruby
NotTheNSA is now known as TDJACR
<Jello_Raptor> i'm also including it in "Rake::Application" which imports "Rake::TaskManager" but that doesn't do anything either.
sdwrage has quit [Quit: This computer has gone to sleep]
prereflect has quit [Client Quit]
ghr has joined #ruby
<Jello_Raptor> some of the functions work one (overwriting initialize for one) but others refuse to over ride ("enhance_with_matching_rule")
mrsolo has joined #ruby
<Jello_Raptor> best I can tell, the latter set of functions tend to on;y be called relative to self
<Diabolik> baweaver
<Diabolik> thanks
<Diabolik> but i had to do it myself
commondream has joined #ruby
<shevy> Diabolik \o/
ghr has quit [Ping timeout: 246 seconds]
<Diabolik> how is the heart coming along
cubesandcode has joined #ruby
braincrash has quit [Quit: bye bye]
<shevy> nah I finished that
cubesandcode has quit [Remote host closed the connection]
<shevy> I am collecting ruby code that has to do with ascii
commondream has quit [Ping timeout: 276 seconds]
EllisTAA has quit [Quit: EllisTAA]
starless has joined #ruby
<havenwood> Diabolik: Is your code public? Curious to see your implementation.
EllisTAA has joined #ruby
<Diabolik> yes havenwood
Musashi007 has quit [Quit: Musashi007]
A205B064 has quit [Ping timeout: 255 seconds]
<havenwood> Diabolik: I'd move `spec/lib/` to `spec/`.
doctorly has joined #ruby
braincrash has joined #ruby
<havenwood> Diabolik: I'd suggest moving toward gem conventions.
<Diabolik> in terms of?
<havenwood> Diabolik: Organization and naming.
<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?
<ruboto> doctorly, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9c80c7bd0546647e741d
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<havenwood> Diabolik: Here's an example gem structure: http://guides.rubygems.org/patterns/#consistent-naming
pontiki has joined #ruby
bkxd_ has joined #ruby
bronson has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<Diabolik> so move main.rb to bin/main.rb?
workmad3 has joined #ruby
<havenwood> Diabolik: I think more like to: bin/prime_time
joneshf-laptop has joined #ruby
<havenwood> Diabolik: For the `prime_time` executable.
<Diabolik> main.rb is the exec file
<Diabolik> so il move it
* Jello_Raptor bangs his head against the wall
<Jello_Raptor> It was a fucking mismatched if else end >_<
<Diabolik> so the exec command is ruby bin/prime_time.rb --count 10?
<Diabolik> havenwood ^
mujou has quit [Quit: Leaving...]
bronson has quit [Ping timeout: 256 seconds]
<havenwood> Diabolik: Take a look at the Pry gem for an example of directory structure: https://github.com/pry/pry
<MrBeardy> Diabolik: remove the .rb, add a ruby shebang
<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
<havenwood> Diabolik: This is Pry's shebang for example: https://github.com/pry/pry/blob/master/bin/pry#L1
mrsolo has quit [Quit: This computer has gone to sleep]
PaulCapestany has quit [Ping timeout: 256 seconds]
<MrBeardy> doctorly: try flow { para "test" }; flow { button "test" } and see if that works for you
<havenwood> Diabolik: The magic incantation is: #!/usr/bin/env ruby
workmad3 has quit [Ping timeout: 272 seconds]
<havenwood> Diabolik: man env
choke has quit [Ping timeout: 250 seconds]
<Diabolik> havenwood as soon as i did this
<Diabolik> i get
<Diabolik> /Users/andrew/code/PrimeTime/lib/prime_finder.rb:33: warning: assigned but unused variable - multi
<Diabolik> it is used to build the times table
<havenwood> Diabolik: What's on line 33?
S3thc0n has quit [Remote host closed the connection]
<Diabolik> multi = primes.map { |prime1| primes.map {|prime2| prime2 * prime1 } }
<havenwood> Diabolik: So you assign it there but don't later use it.
<pontiki> note: that is a warning, not an error
<havenwood> Diabolik: Why do you assign it if you're not going to use it?
<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?
DerisiveLogic has quit [Ping timeout: 265 seconds]
<Diabolik> it feeds into the matrix
<Diabolik> in prime_grid
<Diabolik> it was one of those "i don't know why this works but it does" moments that im trying to figure out
<Diabolik> its used in the executable
<Diabolik> prime_matrix = PrimeFinder.times_primes(primes_count)
<Diabolik> prime_grid = PrimeGrid.new prime_matrix
<Diabolik> prime_grid.render
Musashi007 has joined #ruby
<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.
Exuma has joined #ruby
<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.
<doctorly> MrBeardy: also, I did try to put them in their own blocks when you suggested it, I wasn't dismissing it.
bkxd_ has quit [Ping timeout: 264 seconds]
doctorly has quit [Quit: leaving]
<Diabolik> so havenwood
<Diabolik> having done all of this
<MrBeardy> doctorly: strange. Could it be the missing width and height? Maybe the result is being shrunk to fill the items.
<Diabolik> typing in just prime_time into terminal doesn't launch it
<MrBeardy> Oh, he left.
<MrBeardy> might need bin/prime_time
<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.
<havenwood> Diabolik: You can cd to bin/ and run ./prime_time after you `chmod +x prime_time`.
cubesandcode has joined #ruby
<havenwood> Diabolik: To make a file executable via its shebang you need to change the file mode to allow execution.
<Diabolik> ok i did that
chipotle has joined #ruby
<Diabolik> but now in order to make it runnable from the home directory i need to make it a gem
<Diabolik> ?
<havenwood> Diabolik: Like any other executable you can create a shim in a directory that's already in your PATH or make a symlink.
chipotle has quit [Client Quit]
<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.
<havenwood> Diabolik: It's a good exercise to learn to create a gem.
<Diabolik> ive built a gem before
<havenwood> Diabolik: If I create a script I often first create a single file executable then extract it into a gem.
<pontiki> is starting these things off by doing `bundle gem my_script -b` considered passé?
mmazing has joined #ruby
cubesandcode has quit [Remote host closed the connection]
charliesome has joined #ruby
doctorly has joined #ruby
<doctorly> I have another question for you guys, is green_shoes the best cross-platform and easy gui gem?
mrsolo has joined #ruby
<havenwood> pontiki: I think that's a fine way to start.
<Diabolik> havenwood do you think the code/explanations are ok
choke has joined #ruby
<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.
bkxd has joined #ruby
<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
<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.
<havenwood> Diabolik: I like the Module with module_function. I don't think 10 makes sense as a default n parameter for find_primes.
<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.
<havenwood> Diabolik: I prefer: infinity = Float::INFINITY
<havenwood> Diabolik: I think it's better to use the constant than rely on division to get there.
<havenwood> Diabolik: #none? instead of !#any?
Exuma has quit []
<Diabolik> great idea
<MrBeardy> doctorly: I looked at the tutorials: coult it be that `para` is automatically creating a line break because it's a paragraph?
<MrBeardy> doctorly: try edit_line and button after each other in a flow block
mistermocha has joined #ruby
baweaver has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
<MrBeardy> Oh, I was looking at the `shoes`, but `green_shoes` might have the same functions and functionality
starless has quit [Quit: Leaving]
starless has joined #ruby
kappy has quit [Remote host closed the connection]
starless has quit [Client Quit]
starless has joined #ruby
CloCkWeRX has joined #ruby
mello has joined #ruby
lennae has quit [Ping timeout: 244 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
cats has quit [Ping timeout: 244 seconds]
commondream has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
jpfuentes2 has joined #ruby
mello has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
Contigi has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
cats has joined #ruby
codeFiend has joined #ruby
<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.
Guest50824 has quit [Quit: This computer has gone to sleep]
oo_ has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
Xoro has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
oo_ has joined #ruby
<MrBeardy> doctorly: I did mean the entire window, heh. Good job on getting it to work!
ghr has joined #ruby
rhg135 has joined #ruby
DerisiveLogic has joined #ruby
<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.
macmartine has joined #ruby
pengin has joined #ruby
Limix has joined #ruby
charliesome has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
Guest50824 has joined #ruby
_seanc_ has quit [Quit: _seanc_]
djbkd has quit [Quit: Leaving...]
codeFiend has quit [Ping timeout: 265 seconds]
Ropeney_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pocketprotector has quit [Ping timeout: 272 seconds]
duderonomy has quit [Ping timeout: 246 seconds]
nuck has quit [Ping timeout: 246 seconds]
ByronJohnson has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 264 seconds]
NightMonkey has quit [Ping timeout: 264 seconds]
ByronJohnson has joined #ruby
mrsolo has joined #ruby
nuck has joined #ruby
pengin has quit [Remote host closed the connection]
rkazak has joined #ruby
pengin has joined #ruby
jpfuentes2 has quit [Ping timeout: 264 seconds]
choke has quit [Quit: Leaving]
braincra- has joined #ruby
charliesome has quit [Quit: zzz]
djbkd has joined #ruby
mrsolo has quit [Ping timeout: 244 seconds]
choke has joined #ruby
Limix has quit [Ping timeout: 256 seconds]
NightMonkey has joined #ruby
braincrash has quit [Ping timeout: 265 seconds]
pengin has quit [Ping timeout: 246 seconds]
djbkd has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
EllisTAA has quit [Quit: EllisTAA]
jpfuentes2 has joined #ruby
macmartine has quit [Remote host closed the connection]
jpfuentes2 has quit [Client Quit]
pocketprotector has joined #ruby
nuck has quit [Read error: Connection reset by peer]
scripore has joined #ruby
macmartine has joined #ruby
EllisTAA has joined #ruby
last_staff has quit [Quit: last_staff]
darkf has quit [Read error: Connection reset by peer]
Hobogrammer has quit [Read error: Connection reset by peer]
Hobogrammer has joined #ruby
nuck has joined #ruby
darkf has joined #ruby
nateberkopec has joined #ruby
choke has quit [Quit: This computer has gone to sleep]
choke has joined #ruby
RegulationD has joined #ruby
Musashi007 has quit [Quit: Musashi007]
RegulationD has quit [Ping timeout: 246 seconds]
scripore has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
towski_ has joined #ruby
betahikaru has quit []
commondream has quit [Remote host closed the connection]
zarubin has joined #ruby
commondream has joined #ruby
arescorpio has quit [Quit: Leaving.]
towski_ has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
zarubin has quit [Ping timeout: 245 seconds]
towski_ has joined #ruby
Brozo has quit [Quit: Leaving...]
<EllisTAA> can anyone recommend some good code for me to read?
jenrzzz has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Xiti]
scripore has joined #ruby
balazs has joined #ruby
commondream has quit [Remote host closed the connection]
Xiti has joined #ruby
commondream has joined #ruby
commondream has quit [Remote host closed the connection]
doctorly has quit [Quit: leaving]
<existensil> EllisTAA: ^^ recommended reading
<EllisTAA> thanks
<EllisTAA> existensil: what should i read after the readme
ismaelga has joined #ruby
<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.
<existensil> to see how they implemented them in Ruby
Exuma has joined #ruby
commondream has joined #ruby
Exuma has quit [Client Quit]
ismaelga has quit [Remote host closed the connection]
ghr has joined #ruby
ohaibbq has quit [Quit: Leaving...]
techsilo has quit [Quit: Leaving]
ismaelga has joined #ruby
<existensil> To really answer what code to read you first have to answer what you want to learn
<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
<existensil> in that case you should probably be reading guides.rubyonrails.org and github.com/rails/rails
<EllisTAA> cool ty
commondream has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 265 seconds]
<EllisTAA> what do companies use sinatra for?
<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.
<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.
<existensil> It's just much smaller and simpler than rails
<existensil> easier to get started, but does less for you
<EllisTAA> i see… what’s an example of a small web service?
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<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
<existensil> that's a simple web service
djbkd has joined #ruby
balazs has quit [Remote host closed the connection]
macmartine has quit []
_seanc_ has joined #ruby
<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
<existensil> I'm using it right now for a simple bookmark sync service
<existensil> API only, few endpoints, speaks in JSON. Rails would be overkill.
watchtheblur has joined #ruby
sjums has left #ruby [#ruby]
riotjones has joined #ruby
riotjones has quit [Read error: Connection reset by peer]
Xiti has quit [Quit: Xiti]
riotjone_ has joined #ruby
<EllisTAA> :)
tesuji has joined #ruby
<EllisTAA> can someone help me understand databinding? it sounds like it connects the view to the controller?
lindii_ has quit [Ping timeout: 245 seconds]
Xiti has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
riotjone_ has quit [Ping timeout: 240 seconds]
cubesandcode has joined #ruby
cubesandcode has quit [Remote host closed the connection]
yh has quit [Ping timeout: 252 seconds]
haxrbyte has joined #ruby
A205B064 has joined #ruby
joneshf-laptop has quit [Ping timeout: 256 seconds]
haxrbyte_ has joined #ruby
mistermocha has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marsjaninzmarsa has quit [Ping timeout: 246 seconds]
scripore has joined #ruby
mello has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
Channel6 has quit [Quit: Leaving]
mello has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Quit: Leaving...]
marsjaninzmarsa has joined #ruby
Limix has joined #ruby
<Diabolik> shevy or hackeron
<Diabolik> have
bruno- has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
haxrbyte_ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
haxrbyte_ has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
chenillen has joined #ruby
chenillen has quit [Client Quit]
haxrbyte has quit [Ping timeout: 256 seconds]
chenillen has joined #ruby
joneshf-laptop has joined #ruby
ghr has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
multi_io has quit [Ping timeout: 244 seconds]
joneshf-laptop has quit [Max SendQ exceeded]
multi_io has joined #ruby
<Diabolik> jhass
<Diabolik> here
<Diabolik> ?
<Diabolik> zenspider
haxrbyte_ has quit [Read error: Connection reset by peer]
<Diabolik> need somewhat urgent help
ghr has quit [Ping timeout: 240 seconds]
cryptarium has quit [Ping timeout: 252 seconds]
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
Limix has quit [Quit: Limix]
haxrbyte has quit [Ping timeout: 250 seconds]
iamninja has quit [Read error: Connection reset by peer]
starless has quit [Quit: Leaving]
iamninja has joined #ruby
a346 has joined #ruby
a346 has quit [Client Quit]
Landser88 has joined #ruby
_seanc_ has quit [Quit: _seanc_]
haxrbyte has joined #ruby
emocakes has joined #ruby
jpfuentes2 has joined #ruby
cubesandcode has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
haxrbyte_ has quit [Ping timeout: 265 seconds]
joneshf-laptop has joined #ruby
Limix has joined #ruby
RegulationD has joined #ruby
AhabsBeard has joined #ruby
Landser88 has quit [Remote host closed the connection]
Landser_Reich has joined #ruby
scripore has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
Limix has quit [Quit: Limix]
AhabsBeard has quit []
randiman has joined #ruby
psy_ has quit [Ping timeout: 272 seconds]
EllisTAA has quit [Quit: EllisTAA]
whomp has joined #ruby
<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
<whomp> ?
jenrzzz has joined #ruby
<Landser_Reich> is this only ruby chat or can we talk about music here?
oo_ has quit [Remote host closed the connection]
starless has joined #ruby
towski_ has quit [Remote host closed the connection]
zarubin has joined #ruby
bruno- has joined #ruby
Landser_Reich has quit [Disconnected by services]
<MrBeardy> depends if you have the kaiser chiefs in mind
sevenseacat has joined #ruby
zarubin has quit [Ping timeout: 256 seconds]
<ag4ve> is there a 'prove' like command for ruby tests?
<ag4ve> or is it just a script with tap output from a script?
bruno- has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
oo_ has joined #ruby
Jarboe has quit []
_ht has joined #ruby
wildroman2 has joined #ruby
konsolebox has joined #ruby
yardenbar has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
ghr has joined #ruby
jenrzzz has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
MrBeardy has quit []
Rollabunna has quit [Quit: Leaving...]
claptor has quit [Quit: this channel is bakas]
chenillen has quit [Quit: chenillen]
Blaguvest has quit []
bMalum has joined #ruby
<existensil> ag4ve: what would prove do? are you possibly looking for assert (minitest) or expect (rspec)?
DerisiveLogic has quit [Ping timeout: 244 seconds]
doodleha_ has joined #ruby
chenillen has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
jamesbrink has quit [Remote host closed the connection]
choke has quit [Quit: This computer has gone to sleep]
choke has joined #ruby
konsolebox has joined #ruby
doodleha_ has joined #ruby
kristofferR has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
pengin has joined #ruby
hanmac has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
<ag4ve> existensil: not sure:
<ag4ve> swilson@swlap1:~/temp$ man prove | grep -A1 NAME | tail -1 prove - Run tests through a TAP harness.
tesuji has quit [Read error: Connection reset by peer]
<ag4ve> blah, that didn't stick the line break - w/e - it's the way of running individual test for perl scripts
tesuji has joined #ruby
doodleha_ has joined #ruby
mello has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
DEA7TH has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 244 seconds]
_ixti_ has quit [Ping timeout: 245 seconds]
mello has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
whomp has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby
User458764 has joined #ruby
pontiki has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome_ has joined #ruby
choke has quit [Quit: Leaving]
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
charliesome__ has joined #ruby
charliesome has quit [Ping timeout: 265 seconds]
cubesandcode has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 265 seconds]
hanmac has joined #ruby
charliesome_ has quit [Ping timeout: 256 seconds]
pengin has quit [Ping timeout: 252 seconds]
choke has joined #ruby
joneshf-laptop has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
doodleha_ has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
chinmay_dd has joined #ruby
bruno- has joined #ruby
doodleha_ has joined #ruby
OrbitalKitten has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
joneshf-laptop has joined #ruby
Musashi007 has quit [Quit: Musashi007]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
lkba_ has joined #ruby
joneshf-laptop has quit [Max SendQ exceeded]
bronson has joined #ruby
joneshf-laptop has joined #ruby
charliesome__ has quit [Ping timeout: 265 seconds]
lkba has quit [Ping timeout: 265 seconds]
mister_goodcat has joined #ruby
whomp has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has joined #ruby
doodleha_ has joined #ruby
sinkensabe has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
mister_goodcat has quit [Ping timeout: 244 seconds]
doodleha_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
ghr has joined #ruby
charliesome has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
doodleha_ has joined #ruby
postmodern has quit [Quit: Leaving]
jamesbrink has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 272 seconds]
gluten_hell_ has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
wildroman2 has quit [Remote host closed the connection]
konsolebox has quit [Remote host closed the connection]
Ropeney has quit [Remote host closed the connection]
<jhass> Diabolik: please have a look at rule 2.7 http://ruby-community.com/pages/user_rules
Asher has quit [Quit: Leaving.]
RegulationD has joined #ruby
doodleha_ has joined #ruby
wildroman2 has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
starless has quit [Quit: Leaving]
towski_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
doodleha_ has joined #ruby
Igorshp has joined #ruby
Asher has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
towski_ has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
Musashi007 has joined #ruby
doodleha_ has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
bkxd has joined #ruby
iamdoo2 has joined #ruby
sandstrom has joined #ruby
oo_ has quit [Ping timeout: 245 seconds]
Jackneill has joined #ruby
doodleha_ has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
meph has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
Joufflu has quit [Read error: Connection reset by peer]
mujou has joined #ruby
<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
<apeiros> whomp: try is a rails method. in rails, nil has try (it'd be pointless otherwise), but plain ruby doesn't have try
<apeiros> in plain ruby, you can so: s && s.strip
<apeiros> or you use the active_support gem which provides try.
<whomp> apeiros, thx :)
<apeiros> yw
doodleha_ has joined #ruby
randiman has quit [Quit: (null)]
doodleh__ has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
doodleh__ has quit [Read error: Connection reset by peer]
sinkensabe has quit [Remote host closed the connection]
doodleha_ has joined #ruby
sinkensabe has joined #ruby
TinkerTyper has quit [Ping timeout: 244 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Remote host closed the connection]
psy_ has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
mello has joined #ruby
TinkerTyper has joined #ruby
kristofferR has quit [Read error: Connection reset by peer]
doodleha_ has joined #ruby
Igorshp has quit [Ping timeout: 264 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
kristofferR has joined #ruby
pengin has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
kristofferR has quit [Read error: Connection reset by peer]
lkba_ has quit [Ping timeout: 272 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has joined #ruby
ghr has joined #ruby
doodleha_ has joined #ruby
DexterLB has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 246 seconds]
ghr has quit [Ping timeout: 272 seconds]
pengin has quit [Remote host closed the connection]
DexterLB has joined #ruby
pengin has joined #ruby
cryptarium has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
hmnhf has joined #ruby
pengin has quit [Ping timeout: 256 seconds]
pandaant has joined #ruby
bluish has joined #ruby
doodleha_ has joined #ruby
ismaelga has quit [Remote host closed the connection]
jamesbrink has quit []
chinmay_dd has quit []
toretore has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
zipace has joined #ruby
mistermocha has joined #ruby
Musashi007 has quit [Quit: Musashi007]
doodleha_ has joined #ruby
TinkerTyper has quit [Ping timeout: 250 seconds]
zotherstupidguy has joined #ruby
konsolebox has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodleha_ has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]
meph has quit [Quit: Leaving.]
doodleha_ has joined #ruby
hardlin3r has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Client Quit]
TinkerTyper has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
blackmesa has quit [Quit: WeeChat 1.1.1]
oo_ has joined #ruby
doodleha_ has joined #ruby
peteykun has joined #ruby
baweaver has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
Rollabunna has joined #ruby
doodleha_ has quit [Ping timeout: 265 seconds]
mandarinkin has joined #ruby
konsolebox has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
platzhirsch has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
platzhirsch has left #ruby [#ruby]
cubesandcode has joined #ruby
<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.
<ScriptGeek> Is it possible to store parameters along with its method within the same hash value?
Narzew has joined #ruby
<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.
<ddfreyne> Mon_Ouie: Yeah, I guess.
The_Phoenix has quit [Quit: Leaving.]
Guest50824 has quit [Quit: This computer has gone to sleep]
bruno- has joined #ruby
bosma has quit [Quit: Leaving]
watchtheblur has quit [Ping timeout: 276 seconds]
<jhass> ScriptGeek: just store an array of them
<ScriptGeek> jhass: you mean store an array of parameters as another value separate from the method value?
<jhass> ScriptGeek: key => [method(:x), params]
<jhass> or maybe a proc is better in your case
<jhass> key => proc { a.x(params) }
<ScriptGeek> I'm not sure, I'm building a nested hash that acts as the entire UI for my console program
<jhass> yeah, sounds a bit like you're reinventing the class system
m8 has joined #ruby
<jhass> why not create a standard class hierarchy? component pattern or something
<ScriptGeek> I thought it might be nifty to use nested hashes like a menu tree
TheHodge has joined #ruby
RegulationD has joined #ruby
bosma has joined #ruby
ghr has joined #ruby
pigoz has quit [Quit: WeeChat 1.1]
RegulationD has quit [Ping timeout: 244 seconds]
wjimenez5271 has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 246 seconds]
wjimenez5271 has joined #ruby
Dreamer3 has quit [Ping timeout: 258 seconds]
tomaszbalon has joined #ruby
Rollabunna has quit [Read error: No route to host]
nso95 has quit [Quit: nso95]
charliesome has quit [Ping timeout: 256 seconds]
MrBeardy has joined #ruby
nfk has joined #ruby
Azure has quit [Excess Flood]
Azure has joined #ruby
oo_ has quit [Remote host closed the connection]
jokke has quit [Quit: ninja vanish]
FernandoBasso has joined #ruby
FernandoBasso has quit [Client Quit]
jokke has joined #ruby
charliesome has joined #ruby
ponga has joined #ruby
A205B064 has quit [Ping timeout: 265 seconds]
banister has joined #ruby
oo_ has joined #ruby
sarkyniin has joined #ruby
camilasan has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
zarubin has joined #ruby
woodennails has joined #ruby
cubesandcode has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
sarkyniin has joined #ruby
riotjones has joined #ruby
camilasan has joined #ruby
bronson has joined #ruby
sdothum has joined #ruby
riotjones has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
bronson has quit [Ping timeout: 250 seconds]
ghr has joined #ruby
yh has joined #ruby
chenillen has quit [Quit: chenillen]
randiman has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
serivich has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
edwinvdgraaf has joined #ruby
charliesome has quit [Ping timeout: 256 seconds]
mistermocha has joined #ruby
Soda has quit [Remote host closed the connection]
charliesome has joined #ruby
chipotle has joined #ruby
jacor has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 244 seconds]
mello has quit [Ping timeout: 246 seconds]
jacor has joined #ruby
<mandarinkin> when will be release of 2.3 ruby
<jhass> in the future
pengin has joined #ruby
Narzew has quit [Remote host closed the connection]
Abhijit has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 276 seconds]
woodennails has quit [Ping timeout: 250 seconds]
bashusr has quit [Read error: Connection reset by peer]
Abhijit has quit [Client Quit]
lordkryss has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
yh has quit [Ping timeout: 272 seconds]
xcesariox has joined #ruby
workmad3 has joined #ruby
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
bruno- has joined #ruby
bashusr has joined #ruby
<shevy> lol
bosma has quit [Ping timeout: 265 seconds]
pandaant has quit [Remote host closed the connection]
pengin has quit [Ping timeout: 246 seconds]
HotCoder has quit [Ping timeout: 245 seconds]
mello has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
cubesandcode has joined #ruby
* Nilium has been in the office for the past 18 hours.
<Nilium> I'm going insane. I bought meatmaps.net.
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
woodennails has joined #ruby
<ddfreyne> Nilium: Rusalka VM looks interesting. I've implemented a register-based VM myself. Fun!
_blizzy_ has joined #ruby
<Nilium> It is.
<Nilium> Usually a lot easier to implement one than it is to do a stack VM
thebastl has joined #ruby
cubesandcode has quit [Ping timeout: 256 seconds]
bashusr has quit [Quit: ZNC - http://znc.in]
workmad3 has quit [Ping timeout: 240 seconds]
<Nilium> Rusalka itself isn't all that interesting aside from the basic green threads stuff and pseudo-coroutines
sandstrom has joined #ruby
RegulationD has joined #ruby
<ddfreyne> Nilium: Hm, not sure... I haven't written a stack one.
<ddfreyne> Prettier README: http://ddfreyne.github.io/rcpu/
<Nilium> And those are just pulled off by having a separate process/thread setup with unique registers and a stack per thread
<ddfreyne> Nilium: Ah, I didn't get to that point yet.
<ddfreyne> Nilium: But mine has video!
<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
<Nilium> Neat
<Nilium> Also looks like asciidoctor?
<ddfreyne> Nilium: Couldn't you change the stack pointer and register values instead, rather than copying the entire stack?
<ddfreyne> Nilium: Yeah, I like AsciiDoc.
<Nilium> Nice.
<Nilium> I managed to convert a few people at work to using it for internal READMEs.
whomp has quit [Ping timeout: 265 seconds]
<ddfreyne> Sweet :)
<ddfreyne> I tried using it for nanoc.ws documentation, but I found Markdown (with bits of HTML) easier.
<Nilium> It doesn't copy the entire stack, just the current stack frame (i.e., only the current function)
<Nilium> Otherwise each coroutine would be more of a fork than a coroutine
<Nilium> The instruction for doing it is called fork though, since it was originally just that
RegulationD has quit [Ping timeout: 244 seconds]
<ddfreyne> I wanted to implement process management in my VM (or rather, in a kernel written on top of the VM)
<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
<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!
<Nilium> Mine's more intended for embedding than it is acting as a stand-in for theoretical hardware
<Nilium> I was working on a Lisp for my VM but I keep getting side-tracked by stuff.
<ddfreyne> Ah, mine's absolutely just for educational purposes.
<Nilium> Also, there's work.
<ddfreyne> Language: https://github.com/ddfreyne/rcpu-lang -- lisp syntax, but it's not lisp.
<Nilium> Mine is educational, but I figure I've got it so I might as well use it in personal projects
<Nilium> Right now the best I have is a semi-expressive assembly language.
<ddfreyne> Biggest assembly program I've ever written: https://github.com/ddfreyne/rcpu/blob/master/samples/video.rcs
<Nilium> Most I did was implement a rot13 function
<Nilium> Which I think I put in the blog post about it
TinkerTyper has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
snath has joined #ruby
TinkerTyper has joined #ruby
snath has left #ruby [#ruby]
ghr has joined #ruby
MyMind has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
jokke has quit [Quit: ninja vanish]
Sembei has quit [Ping timeout: 258 seconds]
jokke has joined #ruby
oo_ has joined #ruby
yh has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
randiman has quit [Quit: (null)]
<shevy> you two are big chatters
bkxd has joined #ruby
tomaszbalon has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
<jhass> how's your unicode bluefish 1.x port going shevy?
apt-get_ has joined #ruby
sarkyniin has quit [Ping timeout: 252 seconds]
lala has quit [Quit: Connection closed for inactivity]
<shevy> jhass it's not a unicode port
<shevy> however had I did not have much time at all to work on bluefish 1.x :(
<jhass> no
<shevy> lol
<shevy> in Nov 2002, 14,2% of the supercomputers were using linux
leafybasil has quit [Remote host closed the connection]
<shevy> 10 years later it was 92.4%, and today it is more than 97%
naive has joined #ruby
<naive> has anyone know how to write ffi
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<naive> do in ffi source file we have to write source code or it will be automatically generated
spider-mario has joined #ruby
jokke has quit [Quit: ninja vanish]
apt-get_ has quit [Remote host closed the connection]
bluish has quit [Quit: bluish]
<jhass> what do you refer to by "ffi source file"?
allcentury has quit [Ping timeout: 245 seconds]
jokke has joined #ruby
sandelius has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
ta has quit [Remote host closed the connection]
aryaching has joined #ruby
<naive> when we write rqire ffi...... in .rb file also do we have to make c file
<jhass> probably not
naive has quit [Quit: Page closed]
scripore has joined #ruby
jokke has quit [Quit: ninja vanish]
phale has joined #ruby
<phale> is ruby more readable than bash?
jokke has joined #ruby
<Nilium> Probably.
<phale> http://codepad.org/9FURvqBS << bash code
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
yqt has joined #ruby
gluten_hell_ has joined #ruby
<jhass> phale: you might like termbin.com
<phale> design looks weird..
newbie has joined #ruby
<phale> yeah i might try it out
newbie is now known as Guest83279
thebastl has quit [Quit: Leaving...]
<phale> jhass: it seems slow
<phale> takes like 6 seconds to upload
<jhass> oh, not IME
<jhass> try again, maybe your resolver had a hiccup
<phale> i did
<phale> real0m5.154s
<phale> user0m0.000s
<phale> sys 0m0.000s
yqt has quit [Ping timeout: 244 seconds]
mello has quit [Ping timeout: 256 seconds]
<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)
<phale> well yeah that's more readable
OrbitalKitten has joined #ruby
gluten_hell_ has quit [Ping timeout: 252 seconds]
<jhass> mh, $stdin.read might be better if it takes params
zarubin has joined #ruby
otherj has joined #ruby
<phale> why hasn't anyone made a non-OOP ruby?
<phale> i mean, you can use it without using OOP but it's still OOP behind the scenes
zarubin has quit [Remote host closed the connection]
<jhass> you mean like Elixir?
<phale> what's that?
<jhass> a programming language
<phale> oh i see
<phale> yeah kinda like that, but pure Ruby
zarubin has joined #ruby
<jhass> pure Ruby is inherently OOP
<phale> :(
<jhass> it's not a bad thing
<jhass> it's saying like Apples are a bad thing because Oranges exist
<jhass> if you hate Apples that much, eat Oranges instead
<phale> apples are a bad thing because of iPhone
mello has joined #ruby
<phale> jhass: I know
<phale> but I'm not so sure
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
<jhass> the fear of the unknown, we need to have our mind win the fight over our instincts
Musashi007 has joined #ruby
Papierkorb has joined #ruby
nateberkopec has joined #ruby
dorei has joined #ruby
jottr has joined #ruby
qwertme has joined #ruby
mrdmi has quit [Ping timeout: 265 seconds]
<shevy> haha
<shevy> what's up with the jhass today
<shevy> is he drunk or what
<shevy> <mandarinkin> when will be release of 2.3 ruby
<shevy> <jhass> in the future
<shevy> <jhass> the fear of the unknown, we need to have our mind win the fight over our instincts
<shevy> I'm going to collect the quotes
phale has quit [Read error: Connection reset by peer]
mrdmi has joined #ruby
phale has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 256 seconds]
<phale> >> quotes = ["in the future", "the fear of the unknown, we need to have our mind win the fight over our instincts"] quotes.sample
<ruboto> phale # => /tmp/execpad-b2dc16c6e212/source-b2dc16c6e212:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/373267)
<phale> i need to re-learn ruby lol
<phale> >> quotes = ["in the future", "the fear of the unknown, we need to have our mind win the fight over our instincts"]; quotes.sample;
<ruboto> phale # => "the fear of the unknown, we need to have our mind win the fight over our instincts" (https://eval.in/373268)
otherj has quit [Quit: .]
charliesome has quit [Quit: zzz]
romero has joined #ruby
Musashi007 has quit [Quit: Musashi007]
cubesandcode has joined #ruby
edwinvdg_ has joined #ruby
<shevy> how would the same look in haskell?
<shevy> to fetch a random array entry
<phale> haskell is a language everybody talks about but no one programs in
ghr has joined #ruby
<shevy> but #haskell is bigger than #ruby
edwinvdgraaf has quit [Ping timeout: 246 seconds]
doublemalt_ has quit [Ping timeout: 256 seconds]
cubesandcode has quit [Ping timeout: 240 seconds]
ph8 has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
DoubleMalt has joined #ruby
mujou has quit [Ping timeout: 276 seconds]
Musashi007 has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
whomp has joined #ruby
despai has joined #ruby
<phale> monads
<phale> lol
Musashi007 has quit [Client Quit]
_ixti_ has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
banister has joined #ruby
sandstrom has joined #ruby
CloCkWeRX has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
mujou has joined #ruby
zarubin has quit [Remote host closed the connection]
__chris has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
<shevy> They are also more active than we here :(
<shevy> they ask fancy questions
<shevy> "Is there any [good] examples for Cofree Comonads in there?"
<shevy> so not only are there monads
<shevy> nope, they also have Comonads
<shevy> it's like a symbiotic relationship I am sure
<sevenseacat> that seems to be the only thing most people know about haskell - omg monads
[k- has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
RegulationD has joined #ruby
arup_r has joined #ruby
joneshf-laptop has quit [Quit: Leaving]
yh has quit [Ping timeout: 272 seconds]
joneshf-laptop has joined #ruby
Azure has quit [Quit: Oops.]
Azure has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 265 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kstuart has quit [Quit: WeeChat 1.1.1]
kstuart has joined #ruby
cubesandcode has joined #ruby
lxsameer has quit [Quit: Leaving]
mcpierce has quit [Ping timeout: 265 seconds]
__chris has quit [Quit: This computer has gone to sleep]
phale has left #ruby ["Leaving"]
bMalum has quit [Quit: bMalum]
zarubin has joined #ruby
dhosterman has quit [Quit: WeeChat 0.4.2]
OrbitalKitten has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
zz_Outlastsheep is now known as Outlastsheep
__chris has joined #ruby
sandelius has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DerisiveLogic has joined #ruby
vickleton has joined #ruby
ta has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
phutchins has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Quit: Leaving...]
someword has joined #ruby
ta has quit [Remote host closed the connection]
e1nh4nd3r has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
mistermocha has joined #ruby
OrbitalKitten has joined #ruby
zotherstupidguy has joined #ruby
e1nh4nd3r has quit [Quit: Leaving.]
e1nh4nd3r has joined #ruby
someword has quit [Quit: Leaving.]
_blizzy_ has quit [Ping timeout: 256 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
sandstrom has joined #ruby
whomp has quit [Ping timeout: 245 seconds]
Ropeney has joined #ruby
bashusr has joined #ruby
whomp has joined #ruby
<Diabolik> shevy
kubunto has joined #ruby
<kubunto> is there a way to programatically access JPEG meta data using ruby?
ndrei has joined #ruby
DerisiveLogic has joined #ruby
<Diabolik> kubunto ^
__chris has quit [Ping timeout: 244 seconds]
<kubunto> perfect
<kubunto> thank you
zotherstupidguy has quit [Quit: WeeChat 1.2]
<shevy> Diabolik did you move to another project finally :P
zotherstupidguy has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<Diabolik> no shevy
<Diabolik> i need your help
<Diabolik> i started refactoring last night
<Diabolik> i couldn't stop :P
<Diabolik> i submit it tonight
<Diabolik> the only thing that is failing
<Diabolik> is what i put in my exec file in bin
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Diabolik> what paramaters would work since ive been try to work it out for like 6 hours
<Outlastsheep> I like how the technical documentation on CTCP calls the receiver of the protocol the 'victim'
roolo has joined #ruby
thiagovsk has joined #ruby
<shevy> not sure what you mean Diabolik
<shevy> parameters to work?
ismaelga has joined #ruby
<Diabolik> yes
<Diabolik> hang on
<Diabolik> il try and explain
<Diabolik> prime_grid now accepts two paramaters
roolo_ has quit [Ping timeout: 276 seconds]
<Diabolik> display and formatter
<Diabolik> so to get it to run
<Diabolik> what do i need to put in prime_time exec
scripore has quit [Quit: This computer has gone to sleep]
<shevy> your script breaks for me btw when I install it as a gem
<Diabolik> its not a gem
<shevy> it is because of require_relative '../lib/prime_finder'
<Diabolik> why?
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<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)
<shevy> bin/prime_time:10:in `<main>': undefined local variable or method `max_col_width' for main:Object (NameError)
<Diabolik> yes
<Diabolik> that is my problem
<shevy> require_relative works in a relative manner, but plain require() alone already does too when you have a gem-structured project
<shevy> that error means that
<shevy> trf = TableRowFormatter.new(max_col_width, column_count)
<MrBeardy> doesn't pushing the lib directory onto the load path also make require work for non-gem projects
woodennails has joined #ruby
<shevy> the ruby parser does not know what is max_col_width
<shevy> you did not define max_col_width anywhere there Diabolik
<Diabolik> i know ive since removed it
<Diabolik> but
<Diabolik> the problem is
<Diabolik> i have no idea what to put in as the parameter
<Diabolik> s
<shevy> why not
<shevy> can't you decide :)
<Diabolik> right
<Diabolik> so
<Diabolik> can you give me a hint
__chris has joined #ruby
<shevy> You assume that I'd know what you want there
<shevy> but it's your code, I have no idea about your code :)
<Diabolik> i want it to render a grid
<Diabolik> as it did yesterday
<shevy> lol
<shevy> you mean it worked yesterday
<Diabolik> i then did extract object refactoring
<shevy> then you broke it
<Diabolik> # This class has been heavily refactored due to separation of concerns.
<Diabolik> # Before it was responsible for both generating the grid and displaying it
<Diabolik> # in addition to the implicit responsibility of co-ordinating those two
<Diabolik> # responsibilities. We have now split those up.
<shevy> that's why you have to move in small steps and verify that it all works
<Diabolik> that's why
<shevy> yeah and add
<shevy> # Also, I broke it.
<Diabolik> lol
<Diabolik> but what's really annoying
<shevy> btw you could try to simplify it
<Diabolik> the most annoying this
<Diabolik> *thing
<Diabolik> is that my tests all pass
<shevy> you have bin/prime_time right now
<shevy> look at what classes you call from that file:
<shevy> PrimeFinder.times_primes(); ConsoleDisplay.new(); TableRowFormatter.new(); PrimeGrid.new()
<shevy> you are not making it easy for you there
<shevy> Diabolik I'd ignore bin/prime_time for now, and just ensure that the library itself does what it is supposed to do
<shevy> once the library has all those features, you can make a single API
<shevy> such as: PrimeFinder.find() or PrimeFinder.run() or PrimeFinder[] if you don't want to have to think about a method name
<shevy> I love []
jcaho_m has joined #ruby
jacor_m has quit [Ping timeout: 252 seconds]
jacor has quit [Ping timeout: 256 seconds]
qwertme has joined #ruby
<Diabolik> shevy the library does what i want it to do
<shevy> excellent
oo_ has quit [Remote host closed the connection]
<Diabolik> the prime_grid rspec tests are exhaustive
nfk has quit [Quit: yawn]
<shevy> even when the app itself does not work
<Diabolik> yes, its a wonderful problem to have
<shevy> btw in the description at https://github.com/askl56/PrimeTime
<shevy> main.rb --count 15 would show:
<shevy> but I can't find a file called main.rb
<Diabolik> yeah i need to fix that
kubunto has quit [Quit: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.]
<Diabolik> where are the docs to easily convert this into an API
<Diabolik> ive only done APIs in Rails
bMalum has joined #ruby
<shevy> probably rdoc or yard
<shevy> you could try to invoke it via "rdoc" perhaps
psy_ has quit [Quit: Leaving]
<shevy> in the base dir of your ruby project
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
red_menace has joined #ruby
<jhass> Diabolik: API is a general term for "code used by other through a defined interface"
<jhass> *other code
red_menace has left #ruby [#ruby]
<jhass> so the public methods of a class make up its API for example
zarubin has joined #ruby
<Diabolik> <shevy> such as: PrimeFinder.find() or PrimeFinder.run() or PrimeFinder[] if you don't want to have to think about a method name
<Diabolik> so i need to make primegrid part of the primefinder module?
tomaszbalon has joined #ruby
scripore has joined #ruby
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
havenwood has joined #ruby
sandstro_ has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.2]
sandstrom has quit [Ping timeout: 264 seconds]
Outlastsheep is now known as zz_Outlastsheep
kubunto has joined #ruby
<kubunto> how do i pull a git project to use in my own code?
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
<shevy> Diabolik well; usually projects have one top namespace
roolo has quit [Remote host closed the connection]
<jhass> kubunto: talking about a gem?
<shevy> such as the main module; which usually is the name of your gem
<shevy> Diabolik you could of course also use a class, and then just call #new on it
TheNumb has left #ruby ["Leaving"]
<kubunto> how do i pull that in?
<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
<jhass> kubunto: seems properly released as gem, gem install exifr
lukequaint has joined #ruby
<shevy> Diabolik my (forever unfinished) diamond shell has essentially these two lines: http://pastie.org/10216270
<kubunto> sweet
woodennails has joined #ruby
mcpierce has joined #ruby
<kubunto> how do i get a list of my current gems?
<shevy> Diabolik also make sure you listen to proper music while you are coding
<jhass> kubunto: https://remvee.github.io/exifr/ btw you could have just followed to their homepage
<Diabolik> im listening to springsteen atm
<jhass> kubunto: gem help
<shevy> omg
<shevy> just kidding ;)
chenillen has joined #ruby
<Diabolik> meh i usually listen to chilled electronica
<kubunto> jhass: i see what you did there
<shevy> you need to embrace chilled jazz
<Diabolik> dat saxophone
<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
ghr has joined #ruby
<Diabolik> shevy recommendations
DoubleMalt has quit [Ping timeout: 256 seconds]
EllisTAA has joined #ruby
<shevy> nah not really; the only jazz-like music I could accept were two from Dave Brubeck
DoubleMalt has joined #ruby
dopie has joined #ruby
tomaszbalon has quit [Remote host closed the connection]
<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
ismaelga has quit [Ping timeout: 250 seconds]
Zai00 has joined #ruby
<kubunto> i am getting unitialized constant off of this code, https://gist.github.com/anonymous/79ffe40983b2adc6c4c8
dopie has quit [Client Quit]
<jhass> kubunto: did you even follow my last link
mujou has quit [Quit: Leaving...]
<kubunto> i am being a ditz
zotherstupidguy has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
<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
<kubunto> scratch that
<kubunto> got it
kubunto has quit [Quit: The truth exists beyond the gate]
Pupeno has joined #ruby
mary5030 has quit [Remote host closed the connection]
Limix has joined #ruby
penpen has joined #ruby
mistermocha has joined #ruby
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
mistermocha has quit [Ping timeout: 265 seconds]
n008f4g_ has joined #ruby
Limix has quit [Ping timeout: 246 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
CamonZ has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
someword1 has joined #ruby
xcesariox has joined #ruby
kobain has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
ChoiKyuSang has joined #ruby
jottr has joined #ruby
sandstro_ has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Quit: WeeChat 1.2]
zotherstupidguy has joined #ruby
ItSANgo has quit [Quit: Leaving...]
tomaszbalon has joined #ruby
zarubin has joined #ruby
jpfuentes2 has joined #ruby
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m8 has quit [Ping timeout: 258 seconds]
yardenbar has quit [Quit: Leaving]
Rollabunna has joined #ruby
Kozen has joined #ruby
sandelius has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
xxneolithicxx has joined #ruby
zipace has quit [Ping timeout: 272 seconds]
zotherstupidguy has quit [Changing host]
zotherstupidguy has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
peteykun has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Quit: WeeChat 1.2]
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
Cache_Money has joined #ruby
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
zotherstupidbot has joined #ruby
stryek has quit [Remote host closed the connection]
ismaelga has joined #ruby
nateberkopec has joined #ruby
<jokke> hi i'm trying to put together some statsd instrumentation for systemd services
<jokke> i'm using the ruby-dbus gem
<jokke> for some reason my signal handlers are triggered only once
<jokke> here's my script
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
ChoiKyuSang has joined #ruby
<jhass> docs don't state anything, but a common idiom is that returning true keeps the handler registered
<jokke> oooh
DoubleMalt has quit [Ping timeout: 256 seconds]
<jokke> wow
<jokke> i'll give it a try
watchtheblur has joined #ruby
<jokke> hm. too bad..
nateberkopec has quit [Quit: Leaving...]
<jokke> not working
<jhass> figured, worth a shot anyways
scripore has quit [Quit: This computer has gone to sleep]
juanda has joined #ruby
ghr has joined #ruby
tomaszba_ has joined #ruby
DoubleMalt has joined #ruby
<Diabolik> shevy
<jhass> Diabolik: please have a look at rule 2.7 http://ruby-community.com/pages/user_rules
<shevy> \o/
tomaszbalon has quit [Ping timeout: 272 seconds]
<shevy> now you can call that method directly
<shevy> (if it works) :)
scripore has joined #ruby
<Diabolik> jhass i was having a direct conversation with shevy
<Diabolik> but ok
Rollabunna has quit [Quit: Leaving...]
<shevy> I don't mind
<shevy> btw Diabolik
kinduff has joined #ruby
kinduff has joined #ruby
<jhass> Diabolik: well, wasn't sure whether you've seen my earlier nudge when you clearly weren't having any and called people out
<shevy> not important, but I think it may be better if you word documentation in an objective manner
<Diabolik> when i try to run the code
<Diabolik> i get
<shevy> I mean it's ok if you use it as a reminder of what you did and such
<Diabolik> from bin/prime_time:7:in `<main>'
<Diabolik> /Users/andrew/code/PrimeTime/lib/prime_finder.rb:8:in `run': undefined local variable or method `primes_count' for PrimeFinder:Module (NameError)
<Diabolik> from bin/prime_time:7:in `<main>'
<shevy> but the first/primary objective should be to describe what the method should do
<shevy> well
<shevy> you use lots of references to undefined local variables
<shevy> where did they come from?
<shevy> and if it is a method, then it just can not be found there
<shevy> what is primes_count
<shevy> a variable?
ghr has quit [Ping timeout: 272 seconds]
ChoiKyuSang has left #ruby ["Closing Window"]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
lindii_ has joined #ruby
<Diabolik> primes_count = ARGV[0] == '--count' ? ARGV[1].to_i : 10
<Diabolik> in the exec file
zimt has joined #ruby
zimt has left #ruby ["WeeChat 1.2"]
ChoiKyuSang has joined #ruby
bronson has quit [Client Quit]
ChoiKyuSang has left #ruby [#ruby]
<Diabolik> shevy you can see the code before i added the run function on github
<xxneolithicxx> self.run(count) == self.run(primes_count) ?
<Diabolik> in the exec file xxneolithicxx
spider-mario has quit [Read error: Connection reset by peer]
emocakes has quit [Ping timeout: 276 seconds]
<xxneolithicxx> but in that function you use primes_count and its not defined
<shevy> yeah, for some reason he likes to use uninitialized variables :)
serivich has quit [Ping timeout: 256 seconds]
<shevy> primes_count = ARGV[0] == '--count' ? ARGV[1].to_i : 10
hardlin3r has quit [Quit: Leaving]
<shevy> Diabolik, put a default value towards primes_count then
<shevy> you still use so many classes there :(
<Diabolik> this is so frustrating
<Diabolik> is there a way of simplifying it?
<shevy> why
<shevy> primes_count = 5 # This is my default
<shevy> unless ARGV.empty?
<shevy> primes_count = ARGV.first
<shevy> end
CustosLimen has quit [Ping timeout: 252 seconds]
<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
<shevy> finish the functionality first though
<shevy> make bin work first ;P
<xxneolithicxx> primes_count in bin is not a global
<xxneolithicxx> oh nevermind i dont see where you are calling run but that method is def wrong
CustosLimen has joined #ruby
Channel6 has joined #ruby
<Diabolik> ok
<Diabolik> ive just committed where i am at atm
allcentury has joined #ruby
michael_mbp has quit [Excess Flood]
hmnhf has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
bigmac has joined #ruby
zotherstupidbot has quit [Quit: WeeChat 1.2]
<shevy> jokke cool, you use ruby-gnome?
<jokke> nope
<jokke> i don't have gnome
<shevy> Diabolik did you change anything at all
<shevy> looks like 100% the same old code
_blizzy_ has joined #ruby
<shevy> except that you chopped off some lines :)
<shevy> the primary objective should always be to make things work
allcentury has quit [Ping timeout: 246 seconds]
<shevy> you can beautify and simplify and optimize lateron anyway
sandelius has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ismaelga has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
allcentury has joined #ruby
sandstrom has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
leafybasil has joined #ruby
EllisTAA has joined #ruby
despai has joined #ruby
kinduff_ has joined #ruby
nateberkopec has joined #ruby
veduardo has joined #ruby
<kinduff_> hey guys and gals
kinduff has quit [Disconnected by services]
<kinduff_> could someone help me out refactoring that last method?
<kinduff_> Was using case statemets but they worked a little bit weird
cubesandcode has quit []
cubesandcode has joined #ruby
cubesandcode is now known as saadq
Scully has joined #ruby
<Scully> hi
ChoiKyuSang has joined #ruby
edwinvdg_ has quit [Ping timeout: 240 seconds]
<kinduff_> \quit
kinduff_ has quit [Quit: leaving]
kinduff has joined #ruby
kinduff has quit [Changing host]
kinduff has joined #ruby
<Scully> ayone wanna chat?]
zotherstupidbot has joined #ruby
<zotherstupidbot> exit
<penpen> Scully: On "the truth is out there"?
zotherstupidbot has quit [Client Quit]
<Scully> exactly...
balazs has joined #ruby
<penpen> Wrong channel I'd say
zotherstupidguy has joined #ruby
<Scully> uhm...so what channel should i be?
balazs has quit [Remote host closed the connection]
balazs has joined #ruby
<penpen> yikes, freenode has an awful lot of channels
<Scully> actually i´d say i am a litlle bit lost
sinkensabe has joined #ruby
<havenwood> Scully: Do you want to discuss Ruby?
_seanc_ has joined #ruby
<havenwood> kinduff: How about?: case [from_month, to_month]
<Scully> you mean ruby, the stone ruby?
wildroman2 has quit [Ping timeout: 265 seconds]
<penpen> Scully: nope, Ruby is a programming language
<jhass> Scully: /join ##social
<penpen> at least in the context of this channel
<kinduff> havenwood: is that possible? like case [from, to], when "from", "to" then "this"?
<havenwood> kinduff: when ['from', 'to'] then 1
<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.
<Scully> oh Lord...i´m actually very very lost...
<Scully> thank you people
whomp has quit [Quit: Lost terminal]
victorkohl has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<MrBeardy> Scully, make sure you have your towel and don't panic
saadq has quit [Remote host closed the connection]
victorkohl has quit [Max SendQ exceeded]
zotherstupidguy has quit [Quit: WeeChat 1.2]
<Scully> kkkkkkk
<kinduff> MrBeardy: nice thinking there! ty
<Scully> i really wanna know how to deal with it again...
<penpen> MrBeardy: Towel day is over but you are right, you should ALWAYS know where your towel is
victorkohl has joined #ruby
<kinduff> havenwood: thanks :)
<Scully> everybody knows everything about computer programming nowadays...i´m kind of lost in space...
victorkohl has quit [Max SendQ exceeded]
yh has joined #ruby
<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
<Scully> havenwood: and what does Ruby does?
victorkohl has joined #ruby
<havenwood> Scully: https://www.ruby-lang.org/en/
victorkohl has quit [Max SendQ exceeded]
<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
victorkohl has joined #ruby
Soda has joined #ruby
victorkohl has quit [Max SendQ exceeded]
zarubin has joined #ruby
randiman has joined #ruby
<jhass> or just periods = {"one_month" => 1, "two_months" => 2, "three_months" => 3}; [to_month, from_month].map {|m| periods[m] }.inject(:-) even
<dorei> >> Object.const_get('String').new('a')
<ruboto> dorei # => "a" (https://eval.in/373354)
<dorei> is this the only way to get a class from a string ?
<kinduff> jhass, that looks pretty good actually
<jhass> dorei: yep
woodennails has joined #ruby
<jhass> well, only sane
qwertme has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
victorkohl has joined #ruby
veduardo has quit [Ping timeout: 265 seconds]
phale has joined #ruby
<jhass> Scully: how did you end up here?
<Scully> kkkkkkkk
<Scully> i am making myself the same question
victorkohl has quit [Max SendQ exceeded]
scripore has quit [Quit: This computer has gone to sleep]
<jhass> nah, really, what did you do? found an IRC client and just joined a big channel or what is it?
penpen has left #ruby [#ruby]
victorkohl has joined #ruby
CustosLimen has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
<Scully> well at first i downloaded IRC programm
<phale> jhass: in 10^30 years the earth will be consumed by a supermassive black hole
<jhass> who cares
<phale> i do
<jhass> phale: you too, /join ##social
<phale> ##social isn't for geography and physics
<havenwood> Or maybe you guys should join?: #r.trees
<jhass> Scully: so just exploring, cool
<havenwood> :P
zarubin_ has joined #ruby
pengin has joined #ruby
<havenwood> phale: Do some geography or physics in Ruby and you're back in the game.
DoubleMalt has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
lukequaint has quit [Quit: Bye!]
<phale> yea
<phale> but ruby can't predict the future, can it?
<MrBeardy> Think there's a pull request for that
claptor has joined #ruby
<Scully> jhass: i used IRC in 1997
<havenwood> phale: It sure can. Modeling.
<Scully> i mean, from 1995 to 1997
<phale> havenwood: no lol i don't want to model the entire universe in a ruby program
<phale> i want to use this universe
zarubin has quit [Ping timeout: 276 seconds]
<Scully> since then i stopped, so since then until today is almost 20 years ago
DoubleMalt has joined #ruby
scripore has joined #ruby
<phale> i don't even know how to make a gameboy emulator
<phale> and u want me to predict da future in ruby?
Limix has joined #ruby
mistermocha has joined #ruby
<havenwood> phale: For example, use Ruby to predict the phase of the moon next week. Start small. Make an API. Share it.
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phale> havenwood: i cant see the moon
ghr has quit [Ping timeout: 256 seconds]
<phale> but yeah, I can use ruby for that
moretti has joined #ruby
__chris has quit [Quit: This computer has gone to sleep]
__chris has joined #ruby
sinkensabe has quit [Remote host closed the connection]
__chris has quit [Client Quit]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bricker has joined #ruby
m8 has joined #ruby
marr has quit []
roolo has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
pengin has quit [Remote host closed the connection]
workmad3 has joined #ruby
pengin has joined #ruby
despai has joined #ruby
RegulationD has joined #ruby
tomaszba_ has quit [Remote host closed the connection]
scripore has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
balazs has quit [Remote host closed the connection]
Master44 has joined #ruby
Vile` has quit [Quit: .]
woodennails has joined #ruby
zarubin_ is now known as zarubin
workmad3 has quit [Ping timeout: 252 seconds]
pengin has quit [Ping timeout: 256 seconds]
Vile` has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
havenn is now known as havenwood
scripore has quit [Client Quit]
RegulationD has quit [Ping timeout: 272 seconds]
chenillen has quit [Quit: chenillen]
gambl0re has quit []
phale has left #ruby ["Leaving"]
balazs has joined #ruby
juanda has quit [Read error: Connection reset by peer]
<Master44> no talk here.. ;P
<jhass> ask a good question!
juanda has joined #ruby
chenillen has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
<Diabolik> shevy
<Diabolik> sorry jhass
<Diabolik> everyone
<Diabolik> i went back to my core functionality
<Diabolik> since it wasn't working
<Diabolik> should i use stubs/doubles?
chenillen has quit [Client Quit]
chenillen has joined #ruby
Limix has quit [Quit: Limix]
<jhass> wrong question, ask what you want to test and then ask what to use to achieve that
gkra has quit [Ping timeout: 276 seconds]
sarkyniin has joined #ruby
<Diabolik> i want to test to ensure that the matrix renders correctly
<jhass> split it up
<Diabolik> the test or the class
<jhass> try to come down to "with input x I want output y"
<jhass> include at least the common case and the edge cases
<jhass> and since you write to stdout, you probably want to set $stdout to a StringIO to capture the output
<jhass> (you don't need to take a backup, STDOUT has one ready for you)
Spami has joined #ruby
gambl0re has joined #ruby
olistik has quit [Remote host closed the connection]
Lucky has joined #ruby
qwertme has joined #ruby
kinduff has quit [Quit: leaving]
EllisTAA has quit [Quit: EllisTAA]
EllisTAA has joined #ruby
Limix has joined #ruby
ddarkpassenger has joined #ruby
<shevy> anyone knows if a module called "Ruby" already exists? module Ruby
hmnhf has joined #ruby
juanda has quit [Quit: juanda]
<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
<waxjar> >> defined? Ruby
<ruboto> waxjar # => nil (https://eval.in/373357)
<jhass> havenwood: oh that's a thing? til
decoponio has quit [Quit: Leaving...]
tjohnson has joined #ruby
rkazak has joined #ruby
<shevy> jhass wow
hmnhf has quit [Quit: Konversation terminated!]
<shevy> hmm
rodfersou has joined #ruby
<shevy> damn
<shevy> they wanna mangle my pretty new module!
[k- has quit [Quit: Lingo: www.lingoirc.com]
Guest83279 has quit [Ping timeout: 276 seconds]
<shevy> cool
<shevy> I am looking at a big yaml file someone else wrote for those keywords
baweaver has joined #ruby
<shevy> he went to show examples for them :)
allcentury has quit [Ping timeout: 256 seconds]
AhabsBeard has joined #ruby
<Master44> lol
scripore has joined #ruby
ismaelga has joined #ruby
victorkohl has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
Cache_Money has joined #ruby
Cache_Money has quit [Client Quit]
platzhirsch has joined #ruby
saadq has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Master44> whats the different between " and ' in ruby
<Master44> ?
<waxjar> " allows string interpolation, ' doesn't
<jhass> also " interprets more escapes
jacor has joined #ruby
gambl0re has quit [Ping timeout: 258 seconds]
chenillen has quit [Quit: chenillen]
Channel6 has quit [Quit: Leaving]
gambl0re has joined #ruby
postmodern has joined #ruby
<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 #{}
<Master44> so I can use " every time if I want?
<miah> you can
<miah> some people get weird about it =)
<Master44> so its never wrong to use "
<miah> just be consistent
<Master44> I can just use " forever and dont mind about '?
<Andriamanitra> basically yes
<Master44> whats the point with ' then
allcentury has joined #ruby
<miah> i always use ' unless i want interpolation
<Andriamanitra> read above
<Andriamanitra> you dont need to escape so much stuff
<Master44> xD
catcher has joined #ruby
<miah> when my strings are " it signals to the reader that im doing something beyond creating a string
saadq has quit [Ping timeout: 265 seconds]
<havenwood> Master44: Single quotes signal to the reader that escapes and interpolation aren't happening.
<Master44> ok
<havenwood> Signaling to the reader! \o/
<Andriamanitra> is there a performance difference then?
<miah> programming isn't just about feeding input into a compilter/interpolator
<miah> its about the other people working with your code, and being able to interpolate it themselves
<MrBeardy> tell that to brainfuck
<Andriamanitra> i've always preferred " unless i specifically need ' because it's more natural for me to type
<havenwood> Andriamanitra: There is but not one worth being concerned about.
<miah> if your style is consistent, its easier for readers to interpolate
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
AhabsBeard has quit [Ping timeout: 250 seconds]
<miah> ' doesnt require me to press a shift key
ghr has joined #ruby
CustosLimen has quit [Ping timeout: 265 seconds]
juanda has joined #ruby
someword1 has quit [Quit: Leaving.]
creakybones has joined #ruby
<Master44> :D
<Master44> so its different from people to people where you use ' and "? lol
qwertme has joined #ruby
sinkensabe has joined #ruby
* jhass is adopting " by default
ghr has quit [Ping timeout: 256 seconds]
zz_Outlastsheep is now known as Outlastsheep
<EllisTAA> can anyone tell me why i’m getting this error message? https://gist.github.com/ellismarte/4b410c4dba8db0af26f3#file-error-rb-L1-L4
<Andriamanitra> i think it should be to_eq not to eq
<Andriamanitra> but im no expert
<jhass> no, to eq is right
<jhass> but you need some parens
<jhass> expect(...).to
<toretore> kale burger :/
juanda has quit [Quit: juanda]
CustosLimen has joined #ruby
<Master44> jhass what do you work as?
<jhass> still in the student phase
<EllisTAA> jhass: thanks jhass!
<baweaver> jhass: If you're interested in the Bay Area, shoot me a ping later.
<EllisTAA> lol @ toretore
<Master44> jhass when did you start to program?
catcher has quit [Ping timeout: 256 seconds]
<jhass> baweaver: dunno US doesn't seem attractive tbh (not talking about pays)
__chris has joined #ruby
<baweaver> Fair enough, just throwing it out there.
<jhass> Master44: age or years?
<Master44> years
<Master44> and age :P
<jhass> baweaver: appreciate it
ponga has quit [Quit: Leaving...]
<jhass> about 14 so it's approaching the 10 years I guess, though I'm not sure I really count the first 3-4
<Master44> ok :p
<Master44> you know other languages to?
<jhass> sure
<Master44> nice
<jhass> toying with Crystal more and more recently
Spami has quit [Quit: This computer has gone to sleep]
<miah> crystal looks interesting
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 272 seconds]
bb010g has joined #ruby
<Master44> jhass its ruby a good first language?
<jhass> I'd say so, yes
<Master44> why is ruby good?
<havenwood> Master44: It makes us happy.
<miah> +1
<jhass> because it's a highlevel language that takes object orientation to every corner
<Master44> why havenwood?
<Master44> :)
<jhass> so you have less concepts to start with
<Master44> ok
Mon_Ouie has joined #ruby
<Master44> jhass and havenwood you live on irc?
<jhass> IRC is a semi-passive medium, you just leave it open in the background
<havenwood> Master44: I live in real life and visit irc.
<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
<Master44> ok
<miah> and i work from home as well; and at work we also communicate via irc
<havenwood> Yeah, I also work remotely.
<Master44> all of you work with ruby?
<miah> ruby primarily, but also go lang, and i deal with everything else on an administrative level (i do systems admin)
<havenwood> Master44: We're polyglots but Ruby is what brings us here.
platzhirsch has quit [Ping timeout: 252 seconds]
<miah> indeed
<Master44> is it good money on programming?
psy_ has quit [Ping timeout: 250 seconds]
psy__ has joined #ruby
<miah> depends on where you work
<Master44> like just a basic programmer :P
moretti has quit [Remote host closed the connection]
<Master44> websites.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<miah> its lots of variables; company industry, location, etc
greenbagels has joined #ruby
<Master44> ok
<Master44> whats the best overall?
<Master44> apps, systems, websites?
<havenwood> Master44: Yes.
<miah> *
<Master44> havenwood in what age did you start to program?
ismaelga has quit [Remote host closed the connection]
<miah> i was around 8
<Master44> dam :D
<Master44> early
<Master44> miah you are a girl or boy?
woodennails has joined #ruby
<miah> girl
<Master44> how old?
joneshf-laptop has quit [Ping timeout: 246 seconds]
<EllisTAA> i have a method that reads a file and turns each row into an object. how can i test this method?
<miah> mid 30's
<Master44> ok
<Master44> ;(
<Master44> :P
<toretore> EllisTAA: !gist plz
<Master44> Ellistastaa what you mean
<toretore> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<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
<miah> (usually it was swimming though)
<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
bluish has joined #ruby
mrmargolis has joined #ruby
mrmargolis has quit [Remote host closed the connection]
<toretore> EllisTAA: you test against the desired state of @recipes after it's run
mrmargolis has joined #ruby
<EllisTAA> test against?
despai has quit [Quit: This computer has gone to sleep]
<EllisTAA> so does that mean test to see if i got an array of objects?
<miah> that you can perform specific actions against the object and they return useful data
<miah> sure
<toretore> EllisTAA: your method is supposed to add objects to @recipes; test that it actually does this by inspecting @recipes after
spider-mario has joined #ruby
<toretore> ideally, you'd decouple the i/o and the manipulation of @recipes so you could test each part in isolation
<EllisTAA> hmmm
<toretore> i.e. the method as-is does too much
jpfuentes2 has joined #ruby
RegulationD has joined #ruby
<EllisTAA> how would u write the test?
edwinvdgraaf has joined #ruby
<toretore> i wouldn't, it's not my code
<havenwood> EllisTAA: In Minitest. :)
<EllisTAA> lol
yh has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has quit [Ping timeout: 272 seconds]
rodfersou has quit [Quit: leaving]
<toretore> yeah i wouldn't be doing this `expect().to eq` bs
towski_ has joined #ruby
<toretore> assert_equal ought be enough for everybody
<toretore> +to
mrmargolis has quit [Ping timeout: 276 seconds]
platzhirsch has joined #ruby
marr has joined #ruby
<Master44> Array.new its the same as []
sandelius has joined #ruby
<Master44> ?
RegulationD has quit [Ping timeout: 265 seconds]
<Andriamanitra> yup
<Master44> so why write Array.new
<Master44> why not just []
<Andriamanitra> except with Array.new you can do Array.new(0)
<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.
<Andriamanitra> etc
<havenwood> Master44: If you're simply creating an Array, use the Array literal: []
<EllisTAA> havewood: i bet there is ….
<EllisTAA> so how could i use the first line?
<EllisTAA> as a key for the restof the lines
<Master44> when do I use Array.new then havenwood?
<Master44> when I can just []
towski_ has quit [Ping timeout: 264 seconds]
<Master44> or someone else here? why do we have Array.new??
bricker has quit [Ping timeout: 245 seconds]
<miah> when you want to ensure a object is an array; eg Array.new(foo)
<Andriamanitra> >> Array.new(3, 0)
<ruboto> Andriamanitra # => [0, 0, 0] (https://eval.in/373377)
<Master44> miah
<Master44> if array.new = foo
reset has joined #ruby
<Master44> what does it do?
Outlastsheep is now known as zz_Outlastsheep
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
joneshf-laptop has joined #ruby
MrBeardy has quit []
<Master44> ty
zz_Outlastsheep is now known as Outlastsheep
Cache_Money has joined #ruby
towski_ has joined #ruby
<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?
ismaelga has joined #ruby
lala has joined #ruby
veduardo has joined #ruby
casadei has joined #ruby
<Master44> mia?
jacor has quit [Read error: Connection reset by peer]
<Master44> when should you use %m in your array
moretti has joined #ruby
jacor has joined #ruby
yh has joined #ruby
<miah> i dont think i know %m
<Master44> you know ruby good right?
towski_ has quit [Ping timeout: 272 seconds]
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<miah> maybe? =)
<Master44> ok, then %m its totally useless
woodennails has joined #ruby
<miah> here is a list
<Master44> its some shit convert each element of array to a string
<Master44> like : %m ["hello this is me"]
<Master44> "hello", "this", "is", "me"
<Master44> or something
codecop has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Linkinus - http://linkinus.com]
<miah> can you show me the code or gist?
CustosLimen has quit [Ping timeout: 246 seconds]
catcher has joined #ruby
<Master44> its %w
<miah> ok
<Master44> *
<Master44> %w
<Master44> you know %w?
<miah> so ya, i use %w all the time.
yh has quit [Ping timeout: 240 seconds]
amclain has joined #ruby
<miah> >> %w(foo bar baz)
<ruboto> miah # => ["foo", "bar", "baz"] (https://eval.in/373385)
<Master44> why you use %w??
<Master44> to make string out of array+
<miah> because %w lets me be lazy. i dont have to use quotes, commas or brackets
mistermocha has joined #ruby
<Master44> but whats the point of getting it to a string?
<Andriamanitra> lol
<miah> depends on what you're doing; sometimes storing an array of strings is useful =)
<Master44> ahh ok
<Master44> so its for the lazy people?
yqt has joined #ruby
<miah> nah
<miah> its a commonly used idiom
<Master44> ok I got it, thanks :)
greenbagels has quit [Quit: Leaving]
<miah> you should give the ruby style guide a read if you haven't yet
lordkryss has quit [Quit: Connection closed for inactivity]
<miah> or this book; http://eloquentruby.com/
greenbagels has joined #ruby
HotCoder has joined #ruby
Scully has quit []
mhoungbo_ has joined #ruby
bluish has quit [Quit: bluish]
mhoungbo__ has joined #ruby
ghr has joined #ruby
<Master44> I am reading a book now
zarubin has quit [Remote host closed the connection]
nettoweb has joined #ruby
<Master44> the ruby programming language
<Master44> by o reilly
<miah> cool
<miah> ive read that too
<Kozen> Eloquent Ruby is the best book I have read so far
<Master44> its good book
<Master44> but I need to go and sleep now or my dad get angry :D
<miah> yes, eloquent ruby is a++; the one that gave me the 'i know kung-fu' moment was poodr. http://www.poodr.com/
<Master44> bye bye guys :)
Master44 has quit [Quit: Lost terminal]
<miah> later
<shevy> poodle?
CustosLimen has joined #ruby
<miah> yes poodles.
ohaibbq has joined #ruby
<shevy> miah the kung-fu poodle!
<miah> poodles were originally bred for hunting
gambl0re has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<shevy> yeah - I can see how that one is a deadly mouse hunter http://goo.gl/rPGXRb
<miah> the modern haircuts are for show and not hunting =)
mistermocha has quit [Ping timeout: 265 seconds]
iamninja has quit [Read error: Connection reset by peer]
<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."
iamninja has joined #ruby
edwinvdg_ has joined #ruby
m8 has quit [Quit: Sto andando via]
<shevy> now that's some poodle love there
<shevy> I totally must get me a poodle
_orangejuice has joined #ruby
_orangejuice has left #ruby [#ruby]
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mhoungbo__ has quit [Ping timeout: 246 seconds]
<shevy> and some noodles
bMalum has quit [Quit: bMalum]
mhoungbo_ has quit [Ping timeout: 256 seconds]
Limix has quit [Quit: Limix]
<miah> speaking of food.. i will eat some.
<shevy> don't eat the poodle!!!
edwinvdgraaf has quit [Ping timeout: 256 seconds]
<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?
<EllisTAA> or independet test before the dependent one*
yh has joined #ruby
sorbo_ has joined #ruby
codecop has joined #ruby
mrmargolis has joined #ruby
last_staff has joined #ruby
mhoungbo_ has joined #ruby
mhoungbo__ has joined #ruby
<Jello_Raptor> welp, that's rake semantics changed bigtime :P
<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
Outlastsheep is now known as zz_Outlastsheep
edwinvdgraaf has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
allcentury has joined #ruby
Limix has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
Lucky has quit [Disconnected by services]
ismaelga has quit [Remote host closed the connection]
edwinvdg_ has quit [Ping timeout: 258 seconds]
edwinvdgraaf has joined #ruby
starless has joined #ruby
<jhass> EllisTAA: don't, tests should be idempotent
<EllisTAA> :\
Lucky__ has joined #ruby
<EllisTAA> can u explain idempotence, wiki is just so broad
<jhass> "not affect the result of others when run in any order" should be good enough for this case
woodennails has joined #ruby
woodennails has quit [Client Quit]
<jhass> you likely want before/setup all/each hooks
ringarin has joined #ruby
<shevy> impotence!
<shevy> wikipedia says this is a good example
<shevy> 1 × 1 = 1
juanda has joined #ruby
<Jello_Raptor> jhass: you want 'independent' not 'idempotent' for that case.
<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)
<jhass> well, I kind of do want the latter for my tests, the world should be exactly the same before and after
allcentury has quit [Ping timeout: 276 seconds]
<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
_seanc_ has quit [Quit: _seanc_]
catcher has quit [Ping timeout: 264 seconds]
balazs has quit [Remote host closed the connection]
<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.
balazs has joined #ruby
ringarin has quit [Quit: Leaving]
_seanc_ has joined #ruby
<jhass> yes, independence is sufficient, but idempotency should be ideal, if it might not matter
<jhass> *eve nif
<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.
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<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.
RegulationD has joined #ruby
platosha_ has joined #ruby
<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 :)
balazs has quit [Remote host closed the connection]
platosha has quit [Ping timeout: 264 seconds]
<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))"
<Jello_Raptor> ... i should be better about mixing prime ticks, and single quotes in ascii :P
<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
SouL_|_ has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
Vile` has quit [Quit: .]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Vile` has joined #ruby
veduardo has quit [Ping timeout: 250 seconds]
<baweaver> What FP now?
* baweaver reads back a bit
sinkensabe has quit [Remote host closed the connection]
_seanc_ has quit [Quit: _seanc_]
<baweaver> Ruby is actually pretty functional in some regards
<baweaver> The running joke I have is that Python is the imperative scripting language and ruby is the functional one
__chris has quit [Quit: This computer has gone to sleep]
<baweaver> Though really if you know Ruby well, a language like Scala or Standard ML will be very familiar.
<havenwood> baweaver: Have you checked out Matz' new lang, Streem?: https://github.com/matz/streem#readme
OrbitalKitten has joined #ruby
<baweaver> heard of, skimmed, but wouldn't say really checked out
<havenwood> baweaver: It actually does run scripts now on OS X even though the docs say it's non-functional.
<baweaver> People are a bit too religious with the word functional if you ask me
<gambl0re> guys, i just installed photoshop.
scripore has quit [Quit: This computer has gone to sleep]
<havenwood> gambl0re: Ruby?
* baweaver stares blankly
<gambl0re> no, photoshop
<baweaver> As in this is the Ruby channel
<baweaver> why are you mentioning photoshop
<lala> Lol.
<gambl0re> guys, sorry. wrong channel.
<lala> Hahaha!
* baweaver shakes head
<havenwood> baweaver: I meant non-functioning not non-functional. Heh.
<baweaver> ah
<baweaver> well, point still stands
<havenwood> So much functional talk I typo'd.
seitensei has quit [Ping timeout: 240 seconds]
<jhass> so your keyboard is infunction...i give up
scripore has joined #ruby
seitensei has joined #ruby
seitensei has joined #ruby
__chris has joined #ruby
Ox0dea has joined #ruby
lala has left #ruby [#ruby]
sinkensabe has joined #ruby
platzhirsch has quit [Ping timeout: 264 seconds]
davedev2_ has joined #ruby
zarubin has joined #ruby
Kozen has quit [Ping timeout: 256 seconds]
davedev24_ has quit [Ping timeout: 264 seconds]
armyriad has joined #ruby
SouL_|_ has quit [Remote host closed the connection]
Papierkorb has quit [Read error: Connection reset by peer]
<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
Papierkorb has joined #ruby
<Ox0dea> Jello_Raptor: super()
<Jello_Raptor> ... that was easy
<Jello_Raptor> thanks
<Ox0dea> Just another of Ruby's many idiosyncracies.
<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
<Jello_Raptor> ahh okay
bMalum has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
randiman has quit [Quit: (null)]
zarubin has quit [Ping timeout: 265 seconds]
ghr has joined #ruby
balazs has joined #ruby
s2013 has joined #ruby
<Ox0dea> Mon_Ouie: How does that work, given NilClass#to_proc is undefined?
<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.
gkra has joined #ruby
Soda has quit [Remote host closed the connection]
Channel6 has joined #ruby
Vile` has quit [Remote host closed the connection]
<havenwood> baweaver: I think the immutability from the outside route might bode really well for functional programming in Ruby.
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
balazs has quit [Remote host closed the connection]
Vile` has joined #ruby
<baweaver> We'll have to see how it goes.
<jhass> Ox0dea: well I guess it's just valid for passing no block? some things are simply special cases after all
<baweaver> Well, off I go.
ghr has quit [Ping timeout: 255 seconds]
spiderbyte has quit [Ping timeout: 244 seconds]
balazs has joined #ruby
_ht has quit [Quit: Konversation terminated!]
EllisTAA has quit [Quit: EllisTAA]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Neomex has joined #ruby
mrmargolis has quit [Remote host closed the connection]
iliketurtles has joined #ruby
twistedpixels is now known as zz_twistedpixels
ashemark has joined #ruby
ashemark has left #ruby ["WeeChat 1.2"]
<Mon_Ouie> Ox0dea: It's a special case. It specifically means 'pass no block', as opposed to 'pass nil as a block'
iliketurtles has quit [Ping timeout: 256 seconds]
__chris has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
zarubin has joined #ruby
zarubin has quit [Remote host closed the connection]
olistik has joined #ruby
__chris has joined #ruby
Soda has joined #ruby
yqt has joined #ruby
apt-get_ has joined #ruby
Musashi007 has joined #ruby
apt-get__ has joined #ruby
juanda has quit [Quit: juanda]
sarkyniin has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Client Quit]
__chris has quit [Quit: This computer has gone to sleep]
__chris has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unreal_ has joined #ruby
apt-get_ has quit [Ping timeout: 264 seconds]
bMalum has quit [Quit: bMalum]
s2013 has joined #ruby
banister has joined #ruby
unreal has quit [Ping timeout: 240 seconds]
mello has quit [Ping timeout: 258 seconds]
__chris has quit [Client Quit]
saadq has joined #ruby
xxneolithicxx has quit [Ping timeout: 255 seconds]
s2013 has quit [Client Quit]
gambl0re has quit []
starless has quit [Quit: Leaving]
WillAmes has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Miccet has joined #ruby
allcentury has joined #ruby
bMalum has joined #ruby
Musashi007 has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Musashi007 has joined #ruby
platzhirsch has joined #ruby
bMalum has quit [Client Quit]
zarubin has joined #ruby
saadq has quit []
Billias has quit [Read error: Connection reset by peer]
zarubin has quit [Client Quit]
workmad3 has joined #ruby
Billias has joined #ruby
DEA7TH has quit [Ping timeout: 276 seconds]
juanda has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
Musashi007 has quit [Ping timeout: 245 seconds]
mhoungbo_ has quit [Ping timeout: 252 seconds]
mhoungbo__ has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
A205B064 has joined #ruby
s2013 has joined #ruby
ghr has joined #ruby
michael_mbp has quit [Excess Flood]
juanda has quit [Quit: juanda]
michael_mbp has joined #ruby
tomaszbalon has joined #ruby
wildroman2 has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
towski_ has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wildroman2 has quit [Ping timeout: 258 seconds]
wildroman2 has joined #ruby
apt-get__ has quit [Remote host closed the connection]
Micket has joined #ruby
dseitz has joined #ruby
balazs has quit [Remote host closed the connection]
EllisTAA has joined #ruby
<EllisTAA> what’s the difference between someone who just got hired as a junior developer and a senior developer?
kstuart_ has joined #ruby
wildroman3 has joined #ruby
Miccet has quit [Ping timeout: 245 seconds]
Adran has quit [Excess Flood]
Rennex has quit [Ping timeout: 264 seconds]
Adran has joined #ruby
wildroman2 has quit [Ping timeout: 264 seconds]
kstuart has quit [Ping timeout: 264 seconds]
Rennex has joined #ruby
ddarkpassenger has joined #ruby
RegulationD has joined #ruby
davedev24_ has joined #ruby
gkra has quit [Remote host closed the connection]
<Ox0dea> >> def true.-(a, &b) a[] end; def false.-(a, &b) b[] end; (1 == 1).--> { p :ok } { fail Math }
<ruboto> Ox0dea # => :ok ...check link for more (https://eval.in/373432)
<Ox0dea> I think that's my favorite multi-block syntax.
gkra has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
Micket has quit [Quit: Leaving]
mistermocha has joined #ruby
<Ox0dea> Granted, it's only really nice in conditional contexts, but I suspect that's the most common use case.
Channel6 has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 258 seconds]
<jhass> that took my way too long to understand...
<jhass> so there's that
davedev24_ has quit [Ping timeout: 246 seconds]
_seanc_ has joined #ruby
commondream has joined #ruby
<shevy> hmm
<shevy> C is simple or?
<jhass> after you added all those macros and convenience functions... perhaps
mistermocha has quit [Ping timeout: 245 seconds]
<wasamasa> shevy: C is more like, "Be really careful"
<shevy> I am very careful
<wasamasa> you better be
<wasamasa> a segfault is your cpu's version of running into a pole
vickleton has quit [Quit: Ex-Chat]
ismaelga has joined #ruby
<Diabolik> shevy
<Diabolik> pm?
<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
<shevy> Diabolik no
<shevy> Diabolik write here
<Diabolik> i wasn't confident enough to be able to explain the full refactoring
<Diabolik> so i reverted to my original strucutre
<Diabolik> i think that's it done
<Diabolik> any comments are welcome
doublemalt_ has joined #ruby
<shevy> how did the original error go away?
triangles has joined #ruby
<shevy> by the way
<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
<shevy> prime_grid = PrimeGrid.new prime_matrix
<shevy> prime_grid.render
<shevy> are you sure you want to call render manually?
<Diabolik> so straight up prime_grid?
<shevy> well perhaps you had a reason to do so
<shevy> perhaps you did not :)
<Diabolik> i thought it was the only way to get it to run
<shevy> why? you already instantiate a new object
<shevy> the render call could become mandatory of your class PrimeGrid
<shevy> and in initialize, you could call render
DoubleMalt has quit [Ping timeout: 272 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meph has joined #ruby
ddarkpassenger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roolo has quit [Remote host closed the connection]
juanda has joined #ruby
roolo has joined #ruby
tomaszbalon has quit [Remote host closed the connection]
zz_twistedpixels is now known as twistedpixels
sorbo_ has quit []
qwertme has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildroman3 has quit []
mandarinkin has quit [Quit: Leaving]
platosha_ has quit [Ping timeout: 265 seconds]
allcentury has quit [Ping timeout: 272 seconds]
arescorpio has joined #ruby
nettoweb has joined #ruby
platosha has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
gaboesquivel has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
balazs has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
tomaszbalon has joined #ruby
ghr has joined #ruby
Sawbones has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
badhatter has joined #ruby
allcentury has joined #ruby
chipotle has quit [Quit: cheerio]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 250 seconds]
towski_ has quit [Read error: No route to host]
davedev24_ has joined #ruby
towski_ has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
mrmargolis has joined #ruby
bashusr has quit [Ping timeout: 265 seconds]
Zai00 has quit [Quit: Zai00]
platosha has quit [Ping timeout: 258 seconds]
balazs has quit [Remote host closed the connection]
HotCoder has quit [Quit: Leaving]
baroquebobcat has joined #ruby
platosha has joined #ruby
last_staff has quit [Quit: last_staff]
yuciyuar has left #ruby ["Communi 3.4.0 - http://communi.github.com"]
pontiki has joined #ruby
<pontiki> hi all
mrmargolis has quit [Remote host closed the connection]
pengin has joined #ruby
jottr has joined #ruby
mello has joined #ruby
codelurker has joined #ruby
tomaszbalon has quit [Remote host closed the connection]
gaboesquivel has quit []
mello has quit [Ping timeout: 246 seconds]
Sawbones has quit [Remote host closed the connection]
bashusr has joined #ruby
bashusr has quit [Changing host]
bashusr has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
EllisTAA has joined #ruby
Parker0 has joined #ruby
A205B064 has quit [Ping timeout: 244 seconds]
Sawbones has joined #ruby
Parker0 has quit [Client Quit]
sdwrage has joined #ruby
pengin has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
pengin has joined #ruby
OrbitalKitten has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sorbo_ has joined #ruby
sorbo_ has quit [Client Quit]
<shevy> hey pontikis
towski_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
pengin has quit [Ping timeout: 258 seconds]
kinduff has joined #ruby
Axy has quit [Read error: Connection reset by peer]
kinduff has quit [Client Quit]
kinduff has joined #ruby
kinduff has joined #ruby
kinduff has quit [Client Quit]
kinduff has joined #ruby
Mia has joined #ruby
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
baroquebobcat has joined #ruby
A205B064 has joined #ruby
Blaguvest has joined #ruby
platzhirsch has quit [Quit: Leaving.]
jottr has quit [Read error: Connection reset by peer]
codelurker has quit [Quit: Leaving]
jottr has joined #ruby
pulgolino has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jfarmer has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Musashi007 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Sawbones has quit []
Ropeney has joined #ruby
segfalt has quit [Quit: segfalt]
Jackneill has quit [Read error: Connection reset by peer]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segfalt has joined #ruby
Soda has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
juanda has quit [Quit: juanda]
platzhirsch has joined #ruby
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #ruby
michael_mbp has joined #ruby
qwertme has joined #ruby
vudew_ has joined #ruby
sdwrage has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
ghr has joined #ruby
Yzguy has joined #ruby
xxneolithicxx has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
HotCoder has joined #ruby
watchtheblur has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
davedev24_ has quit [Ping timeout: 256 seconds]
duncannz has joined #ruby
RegulationD has joined #ruby
davedev24_ has joined #ruby
kinduff has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 256 seconds]
Papierkorb has quit [Read error: Connection reset by peer]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_blizzy_> anyone know any ways to get a list of the resources a website grabbed in ruby?
<Aeyrix> _blizzy_: How do you mean?
<_blizzy_> I load a website called foo.com, it loads an image from cdn.bar.com/image.png
<_blizzy_> I want to get the cdn link
Sawbones has joined #ruby
Papierkorb has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
nateberkopec has joined #ruby
OrbitalKitten has joined #ruby
jottr has joined #ruby
mistermocha has joined #ruby
HotCoder is now known as BadBoy20
mello has joined #ruby
<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
platzhirsch has quit [Quit: Leaving.]
bosma has joined #ruby
segfalt has quit [Quit: segfalt]
zipace has joined #ruby
zipace has joined #ruby
<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
Musashi007 has joined #ruby
<jfarmer> Nokogiri (a Ruby gem) makes the parsing very straightforward, assuming you understand HTML and CSS.
Papierkorb has quit [Read error: Connection reset by peer]
<jfarmer> If the resource was loaded via CSS, JavaScript, or some other means then it won't be that simple.
mello has quit [Ping timeout: 276 seconds]
jottr has quit [Quit: WeeChat 1.2]
mistermocha has quit [Ping timeout: 265 seconds]
fedexo has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 250 seconds]
zipace has quit [Quit: Leaving]
<_blizzy_> thanks, jfarmer.
allcentury has joined #ruby
chipotle has joined #ruby
mr_goodcat has joined #ruby
Heartmender has joined #ruby
Limix has quit [Quit: Limix]
gunthler has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
Limix has joined #ruby
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<gunthler> how do i know if my program is working
Limix has quit [Client Quit]
Sawbones has quit [Remote host closed the connection]
<jfarmer> gunthler: When (1) it does what you intend for it to do and (2) what you intend for it to do is correct.
<pontiki> jfarmer: extremely succinct and well-said!
Papierkorb has joined #ruby
<pontiki> jfarmer+=1
<jfarmer> Hah, thanks!
<gunthler> hold on i need to acquire pastebin for code
<jhass> well actually you never really know, except for a few exceptional cases. One of the unsolved CS problems
<jhass> you can only get confident that it works for all your usecases
Brando753 has quit [Quit: o_O_o]
<pontiki> yes, but we're humans, and perfect knowledge is never available to us
Musashi007 has joined #ruby
<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?"
<pontiki> as such, human speech is full of such fuzzy generalizations
eggoez has quit [Ping timeout: 276 seconds]
iamninja has quit [Read error: Connection reset by peer]
joelataylor has quit [Ping timeout: 240 seconds]
<Ox0dea> pontiki: Did you mean to imply that we can never know anything for certain?
joelataylor has joined #ruby
<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
davedev2_ has quit []
<pontiki> therefore, temporary
ismaelga has quit [Remote host closed the connection]
<gunthler> ok heres my code http://pastebin.com/SgcKyR7d
<ruboto> gunthler, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/967382d65c084e2de1d6
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Musashi007 has quit [Ping timeout: 255 seconds]
krz has joined #ruby
<jfarmer> oh ok a troll
Ropeney has quit [Max SendQ exceeded]
Musashi007 has joined #ruby
<jfarmer> People still do that?
rubie has joined #ruby
<shevy> lol
<shevy> gunthler pastebin is so hard to read, there are literally no line breaks
eggoez has joined #ruby
<shevy> there was a time when there was annoying music ad on pastebin too
Brando753 has joined #ruby
<shevy> I can't survive the www anymore without adblock, because of things like that
tjohnson has quit [Quit: Connection closed for inactivity]
ismaelga has joined #ruby
veduardo has joined #ruby
<jhass> they're not even in #python and do the reverse there, how boring
Akagi201 has quit []
icarus has joined #ruby
icarus has quit [Client Quit]
marr has quit [Ping timeout: 245 seconds]
Yzguy has quit [Quit: I'm sleeping, go away.]
gunthler has left #ruby ["https://youtu.be/5FjWe31S_0g"]
icarus has joined #ruby
icarus has quit [Client Quit]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
<Aeyrix> Sanity check: How would I do a range from 0x00 to 0xFF ?
jpfuentes2 has joined #ruby
kinduff has joined #ruby
<jfarmer> Aeyrix: The numbers themselves of the hexadecimal representations of those numbers?
<jfarmer> or*
<Aeyrix> The hex rep
n008f4g_ has quit [Ping timeout: 276 seconds]
_djbkd has joined #ruby
<jfarmer> (0..255).map { |n| sprintf("0x%0.2X", n) }
nateberkopec has quit [Quit: Leaving...]
<Aeyrix> Gotcha. Was wondering if there was a way to work with them without sprintf.
<Aeyrix> Cheers yo.
ghr has joined #ruby
<jfarmer> You can convert any Fixnum to an arbitrary base by passing a radix argument to to_s
<jfarmer> e.g., 255.to_s(16) # => "ff"
spider-mario has quit [Ping timeout: 244 seconds]