apeiros changed the topic of #ruby to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<Senjai> I mean he could "convert csv's" as a first step
<Senjai> and shell out to pg as a second step
Sawbones_ has joined #ruby
freerobby has joined #ruby
kblake has quit []
karmatr0n has quit [Ping timeout: 256 seconds]
plashchynski has joined #ruby
plashchynski_ has quit [Ping timeout: 264 seconds]
juanpaucar has quit [Ping timeout: 240 seconds]
it0a has joined #ruby
<Altonymous> I tried shelling out didn’t see any performance increase, but didn’t monitor the resources to see if it helped cpu.
Sawbones_ has quit [Ping timeout: 245 seconds]
<Altonymous> re-writing the file took as long as it currently takes to import so kind of just ruled it out.
rbennacer has quit [Read error: Connection reset by peer]
kblake has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
plashchynski has quit [Read error: Connection reset by peer]
plashchynski has joined #ruby
frem_ is now known as frem
rbennacer has joined #ruby
thumpba_ has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
DerisiveLogic has joined #ruby
momomomomo_ has joined #ruby
My_Hearing has joined #ruby
_djbkd has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
Mon_Ouie has quit [Ping timeout: 265 seconds]
zachrab has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
plashchynski has quit [Ping timeout: 255 seconds]
havenwood has quit [Ping timeout: 272 seconds]
zachrab has joined #ruby
sdothum has joined #ruby
jerematic has joined #ruby
plashchynski has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
dstarh has joined #ruby
deric_skibotn has joined #ruby
zachrab has quit [Ping timeout: 255 seconds]
tris has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MatthewsFace has quit [Remote host closed the connection]
DerisiveLogic has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
sevvie has joined #ruby
pork_clips is now known as _cake
spyderman4g63 has quit [Read error: Connection reset by peer]
Hobogrammer has joined #ruby
tvw has quit [Remote host closed the connection]
dseitz has joined #ruby
mleung has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
mleung has quit [Client Quit]
Inv1s1ble has quit [Remote host closed the connection]
tris has quit [Ping timeout: 256 seconds]
a5i has joined #ruby
Zai00 has quit [Quit: Zai00]
<a5i> Hi
<a5i> Ruby noob here :P
<a5i> can you guys beta test this?
Wolland has joined #ruby
<Phage> File.open("utc_time.txt", "r") do |f|
<Phage> f.each_line do |line|
<Phage> Does it return each line as a string?
momomomomo has quit [Quit: momomomomo]
oo_ has joined #ruby
<gr33n7007h> Phage: yep
<Phage> gr33n7007h: thanks.
<gr33n7007h> Phage: use: IO.foreach(file) {|line| whatever }
jerematic has quit [Remote host closed the connection]
<Phage> Why?
tris has joined #ruby
<gr33n7007h> more effecient and less code :)
BTRE has quit [Quit: Leaving]
RegulationD has joined #ruby
<havenn> a5i: i'd suggest trying to make it easier to copy/paste
iamjarvo has joined #ruby
<havenn> a5i: maybe even a JS snippet to copy to clipboard
<a5i> o wow
<a5i> thanks for that
freerobby has quit [Quit: Leaving.]
<a5i> were u actaully going to use the password? o.O
Wolland has quit [Ping timeout: 244 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has quit [Remote host closed the connection]
Wolland has joined #ruby
<Phage> gr33n7007h: whatever being, what?
RegulationD has quit [Ping timeout: 264 seconds]
hcnewsom has joined #ruby
iamjarvo has quit [Ping timeout: 256 seconds]
adriancb has joined #ruby
bean has joined #ruby
<gr33n7007h> Phage: meaning what ever your going to do with the string
<jhass> a5i: no, you could log it
<Phage> gr33n7007h: Could I put an if statement?
<gr33n7007h> Phage: sure
<jhass> a5i: and I prefer xkcd passwords anyway http://xkcd.com/936/
tacotaco_ has quit [Ping timeout: 272 seconds]
tacotaco_ has joined #ruby
jerematic has joined #ruby
<Phage> gr33n7007h: Does it append a \n to the end of the line?
sambao21 has quit [Quit: Computer has gone to sleep.]
<Phage> Because: IO.foreach(file) {|line| if line == time_posted }
<Phage> throws me a lot of errors
pontiki has joined #ruby
<gr33n7007h> Phage: yep if theres multiple lines in the file
Musashi007 has quit [Quit: Musashi007]
<Phage> There shouldn't be.
nii236 has joined #ruby
Soliah has joined #ruby
<gr33n7007h> need to show some code so I can see what your trying to do
<gr33n7007h> Phage: ^^
<Phage> one second
<gr33n7007h> ok
justin_pdx has quit [Quit: justin_pdx]
apeiros_ has quit [Remote host closed the connection]
Akagi201 has quit [Remote host closed the connection]
<Phage> gr33n7007h: https://dpaste.de/dCOj
<Phage> I get 5 errors.
apeiros_ has joined #ruby
<gr33n7007h> Phage: taking a look now
Stalkr_ has quit [Ping timeout: 245 seconds]
<havenn> Phage: What's an example of the contents of file?
maximski has joined #ruby
apxm has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maximski has quit [Max SendQ exceeded]
ghostpl_ has joined #ruby
adriancb has quit [Remote host closed the connection]
maximski has joined #ruby
oki has joined #ruby
adriancb has joined #ruby
<Phage> It starts off as empty until the first time stamp (1426034680.0)
tuelz has joined #ruby
<Phage> Gets written to it.
mitchellhenke has joined #ruby
Musashi007 has joined #ruby
granitosaurus has quit [Quit: Konversation terminated!]
ascarter has joined #ruby
Asher has joined #ruby
<Phage> I changed it to your code, no output at all.
tuelz has quit [Ping timeout: 252 seconds]
oki has quit [Ping timeout: 252 seconds]
<TheRinger> anyone alive in here
* baweaver *crickets*
<shevy> TheRinger what do you want man
* havenn hides
shadoi1 has quit [Quit: Leaving.]
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h> Phage: ah thought the file your were reading had content
bayed has quit [Quit: Connection closed for inactivity]
<shevy> Phage if it's a small file you could also read it into an Array directly through File.readlines('file_location_goes_here')
* baweaver wonders if he's the only one with a tendency to ignore greetings
<Phage> gr33n7007h: It does, after first time it runs.
<TheRinger> i have an amateurish question, I'm trying to add data to a hash from a loop, the data is ID#, Title, MagnetLink, is there a better way to do this ? I need a unique id for everyone \
<shevy> baweaver ah yeah yesterday some guy here was asking if someone was here, I said I was here, then suddenly he spams me in PRIVMSG unasked
<baweaver> le block?
<TheRinger> heye he4yeheheh
<Altonymous> Trying to figure out why the code outside the IO.foreach() never gets reached.. http://pastie.org/private/qprr73ozgnsaoyaxianhqq
<shevy> TheRinger ok but what data exactly, is it an array or also a hash?
ghostpl_ has quit [Ping timeout: 264 seconds]
<shevy> adding new stuff to a Hash is simple: hash[key] = value_goes_Here
<baweaver> Had one guy tell me to fsck off and acted insulted when I blocked him right after.
<baweaver> >> h = {}; h[:a] = 1; h
<eval-in_> baweaver => {:a=>1} (https://eval.in/298430)
<TheRinger> i guess that's where I am confused, the program i am writing uses nokogiri to grab some data off a site, i'm trying to store the data it pulls into something i can pull it back out of, should i be using an array or a hash or sql
<shevy> aha
adriancb_ has joined #ruby
<shevy> so you have XML/strings
<TheRinger> yah, css strings
<shevy> your description says hash really (ID#, Title, MagnetLink) so three IDs
<TheRinger> it pulls a magnet url, a title, and i was thinking like a unique id number
<shevy> yeah, once you know the name, you can populate your hash with it
<Altonymous> It seems to just hang after iterating over the file. It prints out to screen each line of the file as I would expect.. but then doesn’t exit the foreach
<shevy> TheRinger you could use the ID# as identifier
<shevy> then you need to store only Title and Magnetlink
nicolastarzia has joined #ruby
<shevy> you could do this as an Array [Title, Magnetlink], or as a Hash in a Hash {:title => 'James Bond Dr. No', :magnetlink => 'link here'}
sevenseacat has joined #ruby
<shevy> array might be easier if you store it consistently in that order
<shevy> I mean, a Hash first, but each element is an Array
<TheRinger> ok the part i was confused about is the proper method for adding the id to the hash, like hash('id') = 1, should I be changing the name of ID so it's like hash('ID(x)') = x
<shevy> nono
<shevy> that is a method call
<shevy> well
<shevy> [] is also a method call
Musashi007 has quit [Quit: Musashi007]
<TheRinger> what i'm trying to do is append the unique id# in the id name
<shevy> but hash() would be a method called def hash
<shevy> whereas hash[] is a method called [] on the object
adriancb has quit [Ping timeout: 265 seconds]
<shevy> well, you dont need to store the id twice right?
<TheRinger> no
<baweaver> Altonymous: IO.readlines.each
<TheRinger> so should i be storing arrays into a hash
<baweaver> not sure why it won't hangup unless there's no EOF for some stupid reason.
<shevy> hash = {}; hash[2598595] = ['James Bond Dr. No','magnet link here']
<TheRinger> each array containing id# magnet and title
<Altonymous> baweaver I don’t want to read the entire file into memory.
Volsus has quit [Ping timeout: 265 seconds]
ych4k3r has joined #ruby
<shevy> TheRinger a rule of thumb is - the simpler your data structure, the easier it is to query it
<TheRinger> ahhh
<TheRinger> i c
<shevy> with the above hash, you have the ids as identifier, and then the array. of course you could also store as hash in a hash
bricker has quit [Quit: leaving]
<TheRinger> nice, so the name of the hash would be the unique number containing the array in the data
<gr33n7007h> Phage: to do what your doing was right using File.open, my bad thought you already has content should of asked
<shevy> I like array in that case because I simply type [0] and [1] to access it; if I use a hash, I need to use the name which is longer
<TheRinger> key = ID# value = (title, magnet array)
<Phage> gr33n7007h: No problem :)
<shevy> TheRinger yeah; but please use the proper syntax; value = (title, magnet array) is not an Array
jenrzzz has quit [Ping timeout: 264 seconds]
<shevy> [] creates a new Array, {} creates a new Hash. If it is hard to remember, you can also use Array.new and Hash.new
Guest13442 has joined #ruby
<TheRinger> let me mess around with this, i have never added something to a hash using a loop so i need to experiment, since how i grab the title and how i grab the magnet are currently two different loops
lanemeyer has quit [Ping timeout: 264 seconds]
<shevy> normally you don't need a loopt
<Altonymous> baweaver: I did the readlines.each just to see if it would exit.. still doesn’t exit
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> you can use .select and grab what you need
<baweaver> odd, probably no EOF for some reason
<Phage> gr33n7007h: How do I delete all content in a file, but not the file itslef?
nfk has quit [Quit: yawn]
<shevy> >> %w( ab cde fghi ).select {|entry| entry.size > 2 }
<eval-in_> shevy => ["cde", "fghi"] (https://eval.in/298437)
robbyoconnor has quit [Ping timeout: 255 seconds]
<TheRinger> here is how i pull the magnet http://paste2.org/asC24stK
<shevy> Phage huh?
Musashi007 has joined #ruby
<Altonymous> baweaver: I think it has to do with being inside the PTY.spawn(cmd)
<shevy> Phage you could delete the file, then create it anew?
<shevy> require 'fileutils'; File.delete('my_file'); FileUtils.touch('my_file')
<Phage> shevy: seems like all content is erased before writing to it when using 'w'
<shevy> ah yes
<gr33n7007h> File.write(file, "")
<shevy> you can use 'a' for append too
<baweaver> might.
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<TheRinger> here is how i pull the title http://paste2.org/fne1VD6z
_djbkd has joined #ruby
Guest13442 has quit [Client Quit]
mitchellhenke has joined #ruby
<havenn> File.truncate('xoxo', 0)
<shevy> I don't know what that is TheRinger
kblake has quit [Remote host closed the connection]
<baweaver> you tried running those commands manually on the server?
<baweaver> typo might cause it to flip out
<Altonymous> baweaver: yeah it exits if it’s not in PTY.spawn(cmd) anyone have experience using PTY.spawn?
<shevy> cool did not know of File.truncate :D
<TheRinger> which one
<baweaver> Not offhand. I just use Net::SSH
<shevy> TheRinger that loop. you manually keep track of things with a counter too
_djbkd has quit [Remote host closed the connection]
<gr33n7007h> Phage: you want something like this: https://gist.github.com/anonymous/e7137639862ba5d581a2
<baweaver> Net::SSH.start(host, user, password: password).do |ssh| ssh.exec!(command) end
_djbkd has joined #ruby
<TheRinger> yah started trying that also
<shevy> TheRinger but I don't want to get a headache over your code, if it works for you that is fine ;) - just grab the data, and then populate your hash
matchaw has joined #ruby
<shevy> right now you don't seem to store it
<TheRinger> the thing about the magnets is that i don't know how to do the parsing that well, so i am starting at the 39'th link which is the magnet and then every 6 there is another magnet
<shevy> you only output it
<shevy> puts data.css('@href')[x]
<baweaver> though that's not a remote host.
<shevy> yeah whatever. one day you'll improve on it anyway
nii236 has quit [Ping timeout: 250 seconds]
lanemeyer has joined #ruby
<shevy> ruby is like a practical skill - the more code you write, the better you'll become
<baweaver> as to why you're not just putting that in a shell script on a cronjob, that's probably a better question.
zachrab has joined #ruby
<TheRinger> yah still working on the ability to add to the hash, just showing how i currently get the data to the screen
<shevy> have you added a hash variable yet :D
<TheRinger> basically it's just a interface for peerflix
<TheRinger> myHash = {}
<Phage> gr33n7007h: https://dpaste.de/KY4G
<shevy> good!
amclain has joined #ruby
<shevy> TheRinger if it is easier for you, work through the first loop first
<shevy> before going to the second
<baweaver> anyways, back home for me. 'night
<shevy> you can use exit statement to exit before you iterate over the second loop
<TheRinger> is there a trick to doing two loops at the same times
<shevy> come on man
<shevy> do it the simple way
<shevy> first loop first
<shevy> second loop later
<shevy> problem solved
DarkRoses has joined #ruby
<shevy> after it works you can think of improving it
<TheRinger> so store the title in an array then add to the array the magnet
<shevy> for instance
<gr33n7007h> Phage: yes, that should work
<TheRinger> i'll start digging in on it
<shevy> I actually don't know where you have the id
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Phage> gr33n7007h: didn't see the error message at the bottom?
baweaver has quit [Remote host closed the connection]
<gr33n7007h> Phage: that's gotta be a goog sign
<Phage> goog sign?
<shevy> hehe
<DarkRoses> Who's owner?
<shevy> I own everything
<ponga> hola shevo
<shevy> hey ponga. still writing in crystal?
<DarkRoses> Op your self to prove.
<gr33n7007h> Phage: fd.write(time_posted) should be fd.write("utc_time.txt", time_posted)
bruno- has quit [Ping timeout: 255 seconds]
DarkRoses has left #ruby [#ruby]
<ponga> shevy: you look very concerned about me doing crystal lol
<ponga> yop
<ponga> go crystal!
DarkRoses has joined #ruby
<shevy> ponga yeah you gave your old girlfriend (ruby) away for a new one (crystal) :D
<DarkRoses> Yes, you can't op. Ah bad girl!
<gr33n7007h> Phage: hang on, no don't change anything yet
<ponga> just as i said
{orb} has quit [Quit: WeeChat 1.1.1]
<gr33n7007h> Phage: you've missed a ) on line 23
<Phage> Oh :i
iteratorP has joined #ruby
claptor has joined #ruby
x1337807x has joined #ruby
<Phage> gr33n7007h: I don't get any output at all.
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h> Phage: What output are you expecting to see?
iteratorP has quit [Remote host closed the connection]
<Phage> It deletes the content in the file though.
iteratorP has joined #ruby
<gr33n7007h> Phage: use a instead w
<shevy> :)
<shevy> does any of you uses Readline module + tab completion a lot in ruby? I always found it hard to use
nii236 has joined #ruby
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
teddyp1cker has joined #ruby
<shevy> you essentially have to use a proc object to use it
kaiZen has joined #ruby
<gr33n7007h> Phage: one sec let me install cinch
<shevy> but that object lacks a convenient API in my opinion. for instance, if I want to say "Complete on all files and directories in the current directory", I need to add that ability manually
mois3x has quit [Quit: mois3x]
<shevy> Readline.completion_proc = proc {|word|
<shevy> my_array_with_possibilities.grep(/\A#{Regexp.quote(word)}/)
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
<shevy> and like populate that array ... + Dir['*']
Musashi007 has quit [Quit: Musashi007]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
<shevy> that's only for one-word arguments; it gets more annoying when I wish to also tab-complete on leading thingies such as "cd c<TAB_PRESS_HERE_>"
nicolastarzia has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 246 seconds]
<DarkRoses> #shevy
<Phage> gr33n7007h: you need you join too :)
<shevy> DarkRoses go learn ruby man
<DarkRoses> Shevy, SHUT YOU FUCKING FACE!
atomi has quit [Quit: brb]
tvon has quit [Quit: leaving]
<gr33n7007h> Phage: :)
mistermocha has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
tvon has joined #ruby
<Phage> gr33n7007h: ?
<DarkRoses> ##SC-Freebuild
mistermocha has joined #ruby
atomi has joined #ruby
gregf has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
plashchynski has quit [Quit: plashchynski]
pontiki has quit [Quit: book + bed]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
maximski has quit []
<shevy> DarkRoses come on man
<DarkRoses> No, FUCKING dip drip from a person shitting!
<Phage> gr33n7007h: It doesn't write to the file.
<a5i> Lotus outperforming Expressjs by a hair
thomas1 has joined #ruby
thomas1 has quit [Client Quit]
Deele has quit [Quit: User excited]
nucular11 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Akagi201 has joined #ruby
thomas1 has joined #ruby
thomas1 has quit [Client Quit]
reinaldob has quit [Remote host closed the connection]
wookiehangover has quit [Ping timeout: 265 seconds]
robustus has quit [Ping timeout: 255 seconds]
reinaldob has joined #ruby
deric_skibotn has quit [Ping timeout: 256 seconds]
DarkRoses has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Phage> gr33n7007h: I give up for tonight.
<Phage> it's 2:30 am and I gotta get some sleep.
blackmesa has quit [Quit: WeeChat 1.1.1]
<gr33n7007h> Phage: Just checking it out now not really used cinch
robustus has joined #ruby
<Phage> gr33n7007h: The cinch code is fine.
<gr33n7007h> Phage: I'll have a look be on tomorrow
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CorySimmons has joined #ruby
<Phage> It's the file reading/writing/checking that's the problem.
<Phage> I'll be back in 3 hours.
<Phage> 8*
<gr33n7007h> Phage: ok
defrang has quit [Quit: defrang]
<weaksauce> gr33n7007h what are you trying to do?
<weaksauce> also you are missing a ) on line 23
wookiehangover has joined #ruby
Asher has quit [Quit: Leaving.]
doodlehaus has joined #ruby
Musashi007 has joined #ruby
Akagi201 has quit [Ping timeout: 272 seconds]
Akagi201 has joined #ruby
mockra has joined #ruby
juanpaucar has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
tuelz has joined #ruby
oki has joined #ruby
veduardo has joined #ruby
justin_pdx has joined #ruby
paradisaeidae has joined #ruby
juanpaucar has quit [Ping timeout: 264 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
markholmes has joined #ruby
tuelz has quit [Ping timeout: 245 seconds]
oki has quit [Ping timeout: 264 seconds]
mclee_ has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermo_ has joined #ruby
cpt_yossarian has quit [Quit: And then he took off.]
mistermocha has quit [Read error: Connection reset by peer]
cpt_yossarian has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
krz has joined #ruby
defrang has joined #ruby
rbennacer has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
Asher has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
oo_ has quit [Remote host closed the connection]
Musashi007 has joined #ruby
oo_ has joined #ruby
duggiefresh has joined #ruby
hcnewsom has joined #ruby
freerobby has joined #ruby
_djbkd has quit [Remote host closed the connection]
hmsimha has quit [Ping timeout: 252 seconds]
Akagi201_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Akagi201 has quit [Read error: Connection reset by peer]
hcnewsom has quit [Client Quit]
Vile` has quit [Remote host closed the connection]
<TheRinger> shevy , you still chillin here
DerisiveLogic has quit [Ping timeout: 256 seconds]
Altonymous has quit [Quit: Altonymous]
DerisiveLogic has joined #ruby
razieliyo has quit [Ping timeout: 252 seconds]
<TheRinger> this is a dumb question but i don't know how to google it, how would I turn this loop http://paste2.org/ZgFMfW9H into a single line of code assigned to a variable ?
<jhass> TheRinger: what's c? bad variable name. l too
<jhass> and you're not building up anything, so I don't quite follow your question
<jhass> ah you mean you always want to assign the last one?
Vile` has joined #ruby
<jhass> lib["title #{c}"] = data.css(".detName").last.content
jottr has quit [Ping timeout: 245 seconds]
<TheRinger> sorry, wrong pbdump , http://paste2.org/AV4yMseG
<TheRinger> i think i'm figuring out, but haven't tested it, putting it together in irb right now
<jhass> TheRinger: yeah, that's .last
<TheRinger> kinda stuck on how to structure the hash or array to hold the info,
<TheRinger> ahh
<jhass> title = data.css(".detName").last.content
<TheRinger> dude that is awesome
mistermo_ has quit [Remote host closed the connection]
scripore has joined #ruby
jenrzzz has joined #ruby
psychopath_mind has joined #ruby
triangles has quit [Read error: Connection reset by peer]
apeiros has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
Akagi201_ has quit []
triangles has joined #ruby
duggiefresh has quit []
apeiros has joined #ruby
CorySimmons has quit [Quit: Bye!]
gsvolt has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
psychopath_mind has left #ruby [#ruby]
<scripore> if I'm looking to build a touch typing app with Rails, is there a particular frontend framework that's more suitable for this project?
ramfjord has quit [Ping timeout: 245 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
jerematic has quit [Remote host closed the connection]
<mozzarella> I don't see how a web framework is going to help you
<scripore> so using pure javascript should be fine then?
blazes816 has joined #ruby
<scripore> I'm new to Rails so I'm trying to learn through creating a project.
<mozzarella> I'm not too knowledgeable about javascript frameworks/libraries, sorry
<scripore> ah, me neither.
<jhass> scripore: you want to ask #javascript or whatever
<mozzarella> well, it's a client side thing, you're not going to practice rails that much
<jhass> this has nothing to do with Ruby, Rails or anything else that just delivers whatever to the browser
tuelz has joined #ruby
<weaksauce> scripore rails can handle the backend if you have things like leaderboards or whatever but frontend typing stuff would be javascript
<jhass> if you got an actual Rails question, those go to #RubyOnRails btw
tus has quit []
tcrypt has quit [Ping timeout: 256 seconds]
<scripore> ah, okay. I guess I'm not asking the right questions then. thanks, I'm going go ask on a javascript channels.
blazes816 has quit [Ping timeout: 244 seconds]
sevvie has quit [Ping timeout: 245 seconds]
sevvie has joined #ruby
martinbmadsen has quit [Ping timeout: 245 seconds]
<scripore> weaksauce: yes, I was thinking about using Rails on the server side to connect to a database that stores the score and then presents them in a leadership board. perhaps using a data visualization library.
jenrzzz has quit [Ping timeout: 250 seconds]
codeFiend has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
ghostpl_ has joined #ruby
unreal_ has joined #ruby
Megtastique has joined #ruby
Volsus has joined #ruby
Megtastique has quit [Client Quit]
unreal has quit [Ping timeout: 252 seconds]
livingstn has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
zzing has joined #ruby
<weaksauce> many different backends can handle that one scripore. I like rails
it0a has quit [Quit: WeeChat 1.1.1]
jrdnull has quit [Read error: Connection reset by peer]
jrdnull has joined #ruby
atomi has quit [Quit: brb]
ponga has quit [Remote host closed the connection]
atomi has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
elfuego has quit [Quit: elfuego]
oo_ has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
downtown has quit [Quit: Lost terminal]
adriancb_ has quit [Remote host closed the connection]
lessless has joined #ruby
jenrzzz has joined #ruby
Sawbones_ has joined #ruby
kaiZen has quit [Quit: Computer has gone to sleep.]
n80 has quit [Quit: n80]
<shevy> TheRinger semi-idling here
frem has quit [Quit: Connection closed for inactivity]
<shevy> TheRinger in general, if you use keys in a Hash, I would recommend to not use ' ' - at least it is easier for my brain to process
<shevy> ideally, if you can, use symbols: hash[:created_at] = 'August 2014'
<shevy> this here is a bit more annoying IMO hash['created at'] = 'August 2014'
veduardo has quit [Ping timeout: 255 seconds]
zorak8 has quit [Ping timeout: 272 seconds]
sevvie has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
narcan has joined #ruby
uptownhr has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
jottr has joined #ruby
mockra has quit []
Sawbones_ has joined #ruby
Volsus has quit [Ping timeout: 256 seconds]
amystephen has quit [Quit: amystephen]
paradisaeidae has quit [Ping timeout: 265 seconds]
vandemar has quit [Ping timeout: 246 seconds]
thumpba has joined #ruby
vandemar has joined #ruby
vandemar has quit [Changing host]
vandemar has joined #ruby
zorak8 has joined #ruby
bigmac has joined #ruby
<shevy> hmm
<shevy> I store Time.now.to_s into a text file
teddyp1cker has joined #ruby
<mozzarella> cool
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<agent_white> Good evenin
spiderbyte has joined #ruby
mistergibson has quit [Quit: Quitting ... be good to each other :)]
paradisaeidae has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
krz has quit [Ping timeout: 245 seconds]
<shevy> mozzarella lol
<shevy> I am having some bug ...
<shevy> I read that file
lizander has quit [Read error: Connection reset by peer]
<shevy> it's like this: (Time.now - Time.parse( File.read(LAST_UPDATE) )).to_s+' seconds:'
<shevy> Time.now gives me the current time; and I thought that Time.parse I can ... hmmmmm aha
thumpba_ has joined #ruby
vozcelik has quit [Ping timeout: 246 seconds]
DavidDudson has joined #ruby
tiago- has joined #ruby
<shevy> x = Time.now # => 2015-03-11 04:33:26 0100
<shevy> y = Time.now # => 2015-03-11 04:33:28 0100
<shevy> y-x # => 2.479660279
<shevy> in irb it works
tiago has quit [Ping timeout: 245 seconds]
tiago- is now known as tiago
<shevy> >> Time.now - Time.parse("2015-03-11 04:32:28 +0100")
<eval-in_> shevy => undefined method `parse' for Time:Class (NoMethodError) ... (https://eval.in/298493)
oo_ has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
<shevy> oh
<shevy> I am so dumb
moubry has joined #ruby
juanpaucar has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
charliesome has quit [Quit: zzz]
moubry has quit [Client Quit]
oivoodoo has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
keen__________83 has quit [Read error: Connection reset by peer]
<shevy> I stored a new time stamp every time the application was running
juanpaucar has quit [Ping timeout: 252 seconds]
<shevy> now I only store when it is not merely running but also making a real modification
phutchins has quit [Ping timeout: 240 seconds]
Volsus has joined #ruby
_honning_ has joined #ruby
dc_ has quit [Remote host closed the connection]
keen__________83 has joined #ruby
oivoodoo has joined #ruby
dc has joined #ruby
hmsimha has joined #ruby
ismael__ has quit [Ping timeout: 244 seconds]
johnzimm has joined #ruby
hgl has quit [Ping timeout: 250 seconds]
dc has quit [Ping timeout: 245 seconds]
a5i has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
hgl has joined #ruby
govg has quit [Quit: leaving]
ismaelga has joined #ruby
govg has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
oki has joined #ruby
pdoherty has joined #ruby
lemur has joined #ruby
mclee_ has joined #ruby
oki has quit [Ping timeout: 240 seconds]
pdoherty has quit [Quit: Leaving]
adriancb has joined #ruby
paradisaeidae has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
jeromelanteri has joined #ruby
nii236 has quit [Ping timeout: 252 seconds]
adriancb has quit [Ping timeout: 265 seconds]
thumpba_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
justin_pdx has joined #ruby
boshhead has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Ping timeout: 244 seconds]
martinbmadsen has joined #ruby
charliesome has quit [Quit: zzz]
djbkd has quit [Quit: Leaving...]
bruno- has quit [Ping timeout: 264 seconds]
braincrash has quit [Quit: bye bye]
davedev24_ has joined #ruby
Volsus has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
tuelz has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby
RegulationD has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
Volsus has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
braincrash has joined #ruby
chrishough has joined #ruby
zorak8 has quit [Ping timeout: 256 seconds]
kyb3r_ has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
sevvie has joined #ruby
govg has quit [Ping timeout: 252 seconds]
digitalextremist has joined #ruby
zorak8 has joined #ruby
govg has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
IrishGringo has joined #ruby
krz has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
hsps_ has quit [Quit: Leaving]
ghostpl_ has joined #ruby
Hirzu has joined #ruby
GnuYawk has joined #ruby
Komanda has joined #ruby
_maes_ has joined #ruby
<Komanda> Someone asked me to rewrite a php app into sinatra and ActiveRecord.
<shevy> hmm
<shevy> quite a task
hackerBoy has joined #ruby
<Komanda> i have never written ruby before
<shevy> I'd start by making the skeleton commandline-based first
nahtnam has joined #ruby
<Komanda> is there any way to create a C like syntax?
<shevy> well if you already know php then it should not be that difficult
<sevenseacat> gl with that
<Komanda> know some python
<Komanda> but dont really like the syntax
<shevy> Komanda you have a semi-limited way; the problem is that constructs such as {} in php will have another meaning in ruby
govg has quit [Ping timeout: 252 seconds]
<shevy> they are either a Hash, such as: hash = {}, or a block, when they are associated with a method (all methods in ruby can optionally accept a block)
krz has quit [Ping timeout: 264 seconds]
govg has joined #ruby
<Komanda> but i'm pretty sure i saw a project that allowed you to write python with curly braces once
<shevy> like: call_a_method { call_another_method here unless game_over? }
<shevy> dunno. there are transition-projects, like coffeescript, which then gets translated into javascript
<Komanda> this project does the opposit for c
ghostpl_ has quit [Ping timeout: 264 seconds]
<shevy> interesting
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<Komanda> this was the project i meant, it adds braces for python http://www.pythonb.org
<Komanda> do you guys know anything similair for ruby?
<shevy> "It's written in itself, so you won't be able to compile it without a compiled version of nobraces"
<shevy> don't think such a project exists in ruby
bootstrappm has joined #ruby
CorySimmons has joined #ruby
tlarevo has joined #ruby
bigmac has quit [Ping timeout: 245 seconds]
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
_honning_ has quit [Ping timeout: 255 seconds]
<TheRinger> I'm having some noob trouble, i am trying to append the magnet url as a hash value to the title, during a loop but I am i keep getting the same magnet url with different titles.. here's my amateurish code, anyone know what I'm doing wrong ? http://paste2.org/8y8n8WtY
bigmac has joined #ruby
thumpba has joined #ruby
paradisaeidae has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
defrang has quit [Ping timeout: 255 seconds]
harfangk has joined #ruby
thumpba has quit [Remote host closed the connection]
<hackerBoy> Anyone know how to have multi keep-alive conections on different ports to a single remote port? Thanks in advance
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
jonathanwallace has joined #ruby
dseitz has joined #ruby
<shevy> TheRinger so this part here: url = data.css('@href')[x].text
<shevy> is always the same?
<TheRinger> yah
<shevy> so let's break it down what we have
<shevy> x is 39
<shevy> so the first run is:
<shevy> data.css('@href')[39]
<TheRinger> right
<shevy> inside the loop you add 6
<shevy> so the second run is:
morenoh149 has quit [Ping timeout: 246 seconds]
<shevy> data.css('@href')[45]
Komanda has quit [Ping timeout: 255 seconds]
<TheRinger> yep
<shevy> can you do a p url
<shevy> on the line after line 13
<shevy> and confirm that url is indeed the same
oki has joined #ruby
<TheRinger> sure one second
<shevy> btw your indent is wrong
<shevy> .each opens a new indent; so the end should be on the same vertical line as the start of data.css
ponga has joined #ruby
<TheRinger> data.css('@href')[45].text returns a orginal magnet
<shevy> x += 6 should also be indented on the right side
<shevy> nono
<shevy> I want you to do: p url
<shevy> and run the loop
<shevy> and tell me if the result is always the same
Hirzu has quit [Remote host closed the connection]
<TheRinger> ok
wldcordeiro has joined #ruby
GnuYawk has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
phutchins has joined #ruby
SOLDIERz has joined #ruby
<shevy> what do you get?
oki has quit [Ping timeout: 264 seconds]
<TheRinger> worked
thumpba has joined #ruby
ponga has quit [Ping timeout: 245 seconds]
hackerBoy has quit [Ping timeout: 246 seconds]
crazydiamond has quit [Ping timeout: 272 seconds]
bigmac has quit [Ping timeout: 264 seconds]
markholmes is now known as markisonfire
<TheRinger> what was the p rul
<TheRinger> p url
SOLDIERz has quit [Client Quit]
<TheRinger> and how can I add it to my hash, i think this is wrong ... list[link.text.strip] = url
phutchins has quit [Ping timeout: 250 seconds]
<TheRinger> should it be list[link.text.strip] = p url
<TheRinger> p is just short for puts right
bluOxigen has joined #ruby
thumpba has quit [Remote host closed the connection]
jrcharney has joined #ruby
hmsimha has joined #ruby
rbennacer has joined #ruby
nii236 has joined #ruby
tris has quit [Quit: Leaving]
<jrcharney> Anyone still up?
kobain has joined #ruby
<jrcharney> Hello
<jefus> i'm partially here, what's up jrcharney
thumpba has joined #ruby
iterator_ has joined #ruby
iteratorP has quit [Ping timeout: 245 seconds]
<jrcharney> Anyone have experience using the Ruby Installer for Windows to upgrade to a new version of ruby?
nucular11 has joined #ruby
CorySimmons has quit [Quit: Bye!]
<jrcharney> What's the general process for that?
rbennacer has quit [Ping timeout: 246 seconds]
bigmac has joined #ruby
digitalextremist has quit [Ping timeout: 256 seconds]
oivoodoo has quit [Remote host closed the connection]
<jefus> ahh not ure exactly but it seems my windows ruby is installed to c:\ruby21
<jefus> i assume if you installed a different version it would exist separately
Hirzu has joined #ruby
<TheRinger> <-- Bash $USER
<jrcharney> Yeah, I have two linux machines and this windows one I want to keep windows
<jefus> what version are you running on windows now?
<jrcharney> ruby 2.0.0. I want to upgrade to 2.2.1
<jefus> and what are your concerns regarding the upgrade? guessing the procedure is just running the new version's installer and checking your path settings afterwards
bootstrappm has left #ruby [#ruby]
<jrcharney> I was hoping to uninstall the older version
<jrcharney> but Ruby does add variables to the path
karmatr0n has joined #ruby
teddyp1cker has joined #ruby
<jefus> path is easily adjustable
thumpba has quit [Remote host closed the connection]
<jefus> if you're not worried about breaking anything you could uninstall through admve programs
Sawbones_ has quit [Remote host closed the connection]
<jefus> add/remove*
<TheRinger> i have been using rvm
<jrcharney> That's the other part, removing the other version. That's the part that has me nervous
<jefus> i'd say go ahead and try the installer for the new version, it should ask you to confirm the path to install to
<jrcharney> ok
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
iterator_ has quit [Remote host closed the connection]
<jrcharney> "Add Ruby executables to your PATH"? Y/N
rkeene has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
iteratorP has joined #ruby
<jefus> if i were doing it i might say no there, and then run it by hand to make sure it works
IrishGringo has quit [Ping timeout: 256 seconds]
<jefus> and if so then you can add the path yourself afterwards
<rkeene> I'm still running into a little problem cross-compiling Ruby gems. "gem install" is looking at my *NATIVE* (a.k.a. build) Ruby to determine how to build gems for the *TARGET* (a.k.a. host) system and then getting mad when that can't actually be compiled
<jefus> it just adds \ruby21-x64\bin to path in my case
oivoodoo has joined #ruby
tris has joined #ruby
<rkeene> Particularly, my native Ruby install has access to a -lgmp, but the target Ruby does not, and it's trying to compile something with "-lgmp", which cannot be found (since it doesn't exist)
mleung has joined #ruby
juanpaucar has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mleung has quit [Client Quit]
x1337807x has joined #ruby
Musashi007 has joined #ruby
havenn has quit [Remote host closed the connection]
aiguu has joined #ruby
aiguu has left #ruby ["WeeChat 1.1.1"]
aiguu has joined #ruby
oivoodoo has quit [Remote host closed the connection]
paradisaeidae has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0.1/20150305021524]]
<shevy> rkeene hmm that is odd
codeFiend has quit [Ping timeout: 252 seconds]
<shevy> that is libgmp, for mouse support right?
<rkeene> No
<shevy> ah wait
<rkeene> -lgmp is GNU Multiprecision, it's used by the compiler
<shevy> a math application right? like http://ftp.sunet.se/pub/gnu/gmp/gmp-6.0.0a.tar.xz
teddyp1cker has quit [Remote host closed the connection]
<rkeene> My cross-compiler statically links to it, where my native compiler links to it dynamically
davedev2_ has joined #ruby
<rkeene> Yes, that is the correct URL. GCC requires it.
narcan has joined #ruby
juanpaucar has quit [Ping timeout: 244 seconds]
davedev24_ has quit [Ping timeout: 246 seconds]
mleung has joined #ruby
teddyp1cker has joined #ruby
<rkeene> But at any rate, -lgmp is just an example of the more general failure -- "gem install" is lookingat the Ruby running "gem" and not the Ruby that will be used to produce the gem
<rkeene> How can I tell it to look at the correct Ruby installation ?
<shevy> how many instances of "gem" do you have?
<rkeene> 2
<shevy> I mean it depends a lot on how you installed ruby actually
<shevy> e. g. if you use RVM then you may have it in the home dir
<shevy> I have it under /usr prefix
<rkeene> native-ruby/bin/gem an ruby/bin/gem
<shevy> hmmm
<shevy> can you run both absolutely "native-ruby/bin/gem env" "ruby/bin/gem env" and compare?
<shevy> and which variant is run first when you do a regular "gem install" command
codeFiend has joined #ruby
codeFiend has quit [Client Quit]
DavidDudson has joined #ruby
<rkeene> ruby/bin/gem is part of the target Ruby (i.e., I cannot run ruby/bin/ruby, while I can run native-ruby/bin/ruby)
<rkeene> You want me to run "native-ruby/bin/ruby ruby/bin/gem env" ?
wldcordeiro has quit [Ping timeout: 256 seconds]
<rkeene> That prints out a bunch of stuff referencing the native Ruby
tkuchiki has quit [Ping timeout: 256 seconds]
<shevy> rkeene well to get the two different environments
<shevy> you said that the wrong gem is being used
<shevy> have you tried with the other gem?
<shevy> I meant the full path to the gem commands :)
hmsimha has joined #ruby
<shevy> "native-ruby/bin/gem env"and "ruby/bin/gem env"
<shevy> I don't know the full paths from your system
<shevy> hmm
havenwood has joined #ruby
<shevy> when you use the leading "ruby" there
<shevy> you will use the same ruby
<shevy> let me ask differently perhaps
<rkeene> I only have 1 Ruby that I can run
<shevy> oh?
Hirzu has quit [Remote host closed the connection]
scripore has joined #ruby
<shevy> you have one "ruby" but two different instances of "gem"?
<rkeene> 1. Ruby (native-ruby) that I can run; 2. Ruby (ruby) that is run on the target
_Andres has joined #ruby
<rkeene> Yes, because I have two installations of Ruby
oivoodoo has joined #ruby
scripore has quit [Client Quit]
<rkeene> One is compiled for my local platform, one is compiled for the target platform
spicerack has quit [Quit: Textual IRC Client: www.textualapp.com]
<rkeene> I updated that page with the commands being run with their absolute paths
<shevy> ok but the second ruby is not yet there right?
<rkeene> There was no difference in the output
<rkeene> Both Rubys are installed
<shevy> yeah I thought you had two different rubies and two different gems
<shevy> erm...
<apoplexy> shevy: you're not my friend
<apoplexy> :[
<rkeene> -rwxr-xr-x 1 rkeene users 14282594 Mar 10 18:35 native-ruby-2.2.0/native-bin/ruby*
<rkeene> -rwxr-xr-x 1 rkeene users 14330256 Mar 10 18:45 ruby-2.2.0/bin/ruby*
<rkeene> shevy, I do
<shevy> apoplexy well, you are a PRIVMSG assassins
<rkeene> But I can only run one of them
<rkeene> The other one is compiled for some other platform
<shevy> apoplexy look how smooth things are when they are discussed on #ruby instead
<rkeene> Example:
<rkeene> $ native-ruby-2.2.0/native-bin/ruby --version
<rkeene> ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
<shevy> rkeene the full path is /home/rkeene/ruby-2.2.0/bin/ruby ?
<rkeene> shevy, No... ?
<rkeene> But that's not what $(pwd) means... ?
<rkeene> I'm confused by the question.
<shevy> ok see
<shevy> my ruby resides here: /usr/bin/ruby
<shevy> my gem resides here: /usr/bin/gem
lxsameer has joined #ruby
lxsameer has joined #ruby
ismaelga has quit [Remote host closed the connection]
<shevy> you have two ruby in different locations; I don't know where
<rkeene> Mine reside here: $ readlink -f native-ruby-2.2.0/native-bin/ruby
<rkeene> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/ruby
<rkeene> $ readlink -f ruby-2.2.0/bin/ruby
<rkeene> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/ruby
<shevy> I also don't know where your gem installations are - I assume in the same *bin/ directory
<shevy> ok
<shevy> and the two gem commands are also in the same directory level right?
<shevy> such as:
<rkeene> Right
<shevy> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/gem
<shevy> ok
<shevy> can you just have a quick look
<shevy> at the shebang of the two gems?
<shevy> "head /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/gem" I assume
<shevy> and can you try the "env" argument again
<rkeene> packages/installed/pkgs/ruby-2.2.0/bin/gem
<rkeene> ==> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/gem <==
<rkeene> #!/home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/ruby
<rkeene> ==> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/gem <==
<shevy> if the shebangs work, it might work as: "/home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/gem env"
<rkeene> #!/bin/ruby
<shevy> hmmm
<shevy> ok the first shebang is correct right?
<rkeene> Correct
<shevy> stat /bin/ruby on the other hand, does that exist?
<rkeene> No.
<shevy> ok, I assume it will default to another ruby if it can be found
<shevy> erm
<shevy> if it can *not be found
<rkeene> That refers to /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/ruby because it will be installed as /bin/ruby on the target
mleung has quit [Quit: mleung]
<shevy> aha
<rkeene> So that "gem" can run on the target
Volsus has quit [Quit: Leaving]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rkeene> Which does not help me at all, because, again, I cannot run /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/bin/ruby -- it's compiled for a different OS and CPU
<shevy> but you already have two "ruby" binaries right? and if you do a ldd on them, they will differ
<shevy> aha
<rkeene> If I run "ldd" on them I will get output on one, and an error on the other
<shevy> yeah I understand now
<shevy> that also means "gem env" probably can not work
<shevy> for the second
<shevy> on my system, my gem path is:
<shevy> /usr/lib/ruby/gems/2.2.0/
<shevy> I assume for your working ruby, the path is at:
<shevy> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/ruby-2.2.0/lib/ruby/gems/2.2.0/
<shevy> and for your not working ruby, the path may be at:
<shevy> /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-lib/ruby/gems/2.2.0/
<shevy> hmm
<shevy> not sure about the second
<rkeene> The path for that Ruby is: /lib/ruby/gems/2.2.0 -- of course, that's only meaningful when the package is installed
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> ok
<rkeene> I have no /lib/ruby on my system
<shevy> yeah
<rkeene> And I do have a -lgmp, where the target system does not
mleung has joined #ruby
<rkeene> And so when "gem install" tries to compile a gem and looks at the RUNNING Ruby to figure out how to compile something for the TARGET Ruby, it comes up wrong
<shevy> yeah
<rkeene> The Running Ruby has nothing to do with the Target Ruby, other than they're the same Ruby version
<shevy> I would not expect this to be that complicated
ismaelga has joined #ruby
<shevy> Let me show you my ldd /usr/bin/ruby
sivsushruth has quit [Ping timeout: 252 seconds]
<shevy> linux-gate.so.1 libpthread.so.0 librt.so.1 libgmp.so.10 libdl.so.2 libcrypt.so.1 libm.so.6 libc.so.6 /lib/ld-linux.so.2
sivsushruth has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
<shevy> so I also have a libgmp* link
<shevy> I am not sure how you can make gem install work there
<rkeene> Yep, me too -- on the system I'm running Ruby on. But not on the system I'm compiling the Gem for
justin_pdx has quit [Quit: justin_pdx]
<shevy> since your second ruby never works anyway or?
<rkeene> It doesn't work on MY system, it works on the TARGET system
bruno- has joined #ruby
tlarevo has quit []
robbyoconnor has joined #ruby
narcan has quit [Ping timeout: 256 seconds]
<rkeene> This is similar to almost everything else I compiled. I also have 2 versions of "ls", /bin/ls and /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/coreutils-8.23/bin/ls
<rkeene> I can run /bin/ls, I cannot run /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/coreutils-8.23/bin/ls -- it's meant to be /bin/ls on the target system
ismaelga has quit [Ping timeout: 246 seconds]
<shevy> I think "gem install" when it compiles, will just run some "ruby" command
tkuchiki has joined #ruby
krz has joined #ruby
wicope has joined #ruby
<shevy> usually instructions are kept in files called extconf.rb; for instance, the ruby readline bindings, reside in ext/readline/
<rkeene> I only ever run /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/gem, which only runs /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/ruby
<shevy> I can go there, run ruby extconf.rb
teddyp1c_ has joined #ruby
<shevy> then I have some C-related checks such as
<shevy> checking for tgetnum() in -lncurses... yes
<shevy> checking for readline/readline.h... yes
<shevy> then the final line is "creating Makefile" so it gives me a Makefile file
oki has joined #ruby
<rkeene> Yes, but something is looking at the native Ruby (/home/rkeene/devel/aurae/node/root/packages/installed/pkgs/native-ruby-2.2.0/native-bin/ruby)'s linux-x86_64/something-config.rb
<rkeene> Which says that it should link to -lgmp
<shevy> this generated Makefile has information like this: http://pastie.org/pastes/10017740/text
tlarevo has joined #ruby
<rkeene> Which is wrong, because the platform being compiled for has no -lgmp
<rkeene> If it had tried to run gcc ... -lgmp it would fail
<shevy> with entries such as:
<shevy> LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
ponga has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
<shevy> I am not entirely sure where it is inferred which flags to use
dc has joined #ruby
tkuchiki_ has joined #ruby
<shevy> which program are you trying to install via "gem install" btw?
<rkeene> I have a list of them
tkuchik__ has joined #ruby
<shevy> well let's focus on just one for now
tkuchiki has quit [Read error: Connection reset by peer]
<shevy> hmmmm wait
<shevy> "gem install sinatra" fails for you? that does not compile C code or?
<rkeene> Not all of them fail
<rkeene> Only ones that look at the native system's build
boadie has joined #ruby
iteratorP has quit [Quit: Leaving...]
oki has quit [Ping timeout: 255 seconds]
<rkeene> If I rebuild native-ruby without linking to libgmp, they all work, too
<shevy> a .gem is mostly just an archive, you can install it locally - it's just a recursive copy of some files. It's different for gems that require a "native compile"
ponga has quit [Ping timeout: 252 seconds]
<shevy> do you remember which gem you tried to install specifically?
mleung has quit [Quit: mleung]
RegulationD has joined #ruby
<shevy> I assume all of the gems will work on my system. I want to find out where the -lgmp part derives from
<rkeene> Hang on
<shevy> ah I found a small one
<shevy> syck
<shevy> ext/syck/Makefile:LIBS = -lpthread -lrt -lgmp -ldl -lcrypt -lm -lc
<shevy> this Makefile gets generated when I run a file called setup.rb
<shevy> setup.rb is not part of syck, but I love setup.rb
dc has quit [Ping timeout: 272 seconds]
<shevy> you can get it from here: http://i.loveruby.net/en/projects/setup/doc/usage.html or from rubygems.org I assume
iteratorP has joined #ruby
<shevy> anyway, it somehow grabs the flags of my /usr/bin/ruby
tkuchiki_ has quit [Ping timeout: 264 seconds]
Regulati_ has joined #ruby
RegulationD has quit [Remote host closed the connection]
dc has joined #ruby
<shevy> hmm
boadie has quit [Ping timeout: 256 seconds]
<shevy> the "ruby setup.rb config" step is supposed to create a Makefile
<rkeene> That's the wrong thing to do -- that will only tell you about the Ruby you are running, not about what you are compiling for
bigmac has quit [Read error: Connection reset by peer]
<shevy> right, but can it work if you manually would get rid of -lgmp there?
bigmac has joined #ruby
<shevy> from the Makefile
<rkeene> Yes
morenoh149 has joined #ruby
<shevy> there also must be a smoother way too
bigmac has quit [Read error: Connection reset by peer]
<shevy> I think luis lavena who compiles the rubyinstaller for windows may use a cross-compile system
<rkeene> But I want to fix the problem so it can work automatically and not look at my native configuration, which has no relationship with the Ruby that the Gem will run under
<shevy> what information would you assume would gem require so that it can work?
nucular11 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> drbrain is on #rubygems btw
<rkeene> I would assume it gathers the information by probing, like every other GNU autoconf-based system (I compile a few hundred packages for this platform)
<shevy> he was one of the guys who wrote gem so perhaps there is some hidden or less documented option for gem
zorak8 has quit [Ping timeout: 240 seconds]
<shevy> yeah but perhaps you can overrule; gem has a lot of stuff, even a levensthein calculator :D
Regulati_ has quit [Ping timeout: 264 seconds]
<shevy> rkeene in a few hours hanmac may wake up; he is a C++ guru
oki has joined #ruby
RegulationD has joined #ruby
multi_io_ has joined #ruby
dc has quit [Ping timeout: 250 seconds]
<apoplexy> shevy can i PRIVMSG u
<shevy> apoplexy I explained to you that it requires constant extra work for me
<shevy> I literally focus on just #ruby as a channel without having to constantly click back and forth
<shevy> if you can write things, write it on #ruby. if not, then it surely is not meant for me but someone else
oki has quit [Ping timeout: 240 seconds]
multi_io has quit [Ping timeout: 252 seconds]
teddyp1c_ has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 255 seconds]
sivsushruth has quit [Ping timeout: 252 seconds]
teddyp1cker has joined #ruby
sivsushruth has joined #ruby
teddyp1cker has quit [Read error: Connection reset by peer]
ponga has joined #ruby
Sawbones_ has joined #ruby
teddyp1cker has joined #ruby
<apoplexy> shevy fine, we will not cyber then
ghostpl_ has joined #ruby
<shevy> apoplexy go and learn ruby man
astrobunny has joined #ruby
wottam has joined #ruby
<eam> apoplexy: we can cyber
<eam> not in privmsg though, right here
<jefus> public show?
<jefus> u guys do ctcp?
<eam> and we have to use ruby code
ghostpl_ has quit [Ping timeout: 245 seconds]
<jefus> hot
VBlizzard has joined #ruby
<jefus> how long can you chain your methods?
<shevy> is there a limit?
tobago has joined #ruby
<jefus> until someone splats
<rkeene> shevy, It was the "json" Ruby Gem that fails
<apoplexy> what is the purpose of this 'rackspace' -- im confused what they would want me to upload there
teddyp1cker has quit [Remote host closed the connection]
<apoplexy> nevermind i get it
<apoplexy> ps not a programmer shevy :[
<shevy> apoplexy so what
Rephiax has joined #ruby
<shevy> go and learn it apoplexy
<shevy> jefus I'd assume there should not be a limit technically, I'd assume the ruby parser will always end up with some specific object
<shevy> rkeene ok
<jefus> oh probably not, i was speaking in context of eam cybering with ruby
teddyp1cker has joined #ruby
<jefus> but thank you for your thought process
Musashi007 has quit [Quit: Musashi007]
_blizzy_ has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
markisonfire has quit [Quit: So it goes.]
Sawbones_ has quit [Remote host closed the connection]
Morkel has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<shevy> eam is cybering with ruby?
<eam> can't help myself
iteratorP has quit [Remote host closed the connection]
<jefus> well, eam's what we call a "lazy enumerator"
<jefus> but he gets the job done
<shevy> did you at least get rid of the cybering with perl finally eam
<jefus> eventually.
<shevy> or do you have the hots for perl 6
<eam> you mean ruby?
<shevy> well perl 6 will be due in end of 2015 I think
<shevy> so perhaps that'll rekindle your interest in it!
iteratorP has joined #ruby
<eam> I'm already writing programs in the best perl6 and it's been out for decades
<eam> shevy: I discovered something upsetting today
<eam> ruby lets me define methods with a capital first letter
<eam> they act kinda weird
JohnBat26 has joined #ruby
My_Hearing is now known as Mon_Ouie
ARCADIVS has joined #ruby
red_horned_rihno has joined #ruby
arup_r has joined #ruby
AndyBotwin has quit [Read error: Connection reset by peer]
<eam> >> class Foo; def self.Bar; 5; end; def self.bar; 6; end; end; [Foo::bar, Foo.Bar, Foo.bar, (Foo::Bar rescue "oops")]
<eval-in_> eam => [6, 5, 6, "oops"] (https://eval.in/298521)
<eam> >> class Foo; def self.Bar; 5; end; def self.bar; 6; end; end; [Foo::bar, Foo.Bar, Foo.bar, (Foo::Bar rescue "oops"), Foo::Bar()]
<eval-in_> eam => [6, 5, 6, "oops", 5] (https://eval.in/298522)
Rephiax has quit []
Rephiax has joined #ruby
jrcharney has quit [Quit: Leaving]
SOLDIERz has joined #ruby
norc has joined #ruby
Wolland has quit []
charliesome has quit [Quit: zzz]
tagrudev has joined #ruby
oivoodoo has quit [Remote host closed the connection]
Hirzu has joined #ruby
oivoodoo has joined #ruby
hvxgr has quit [Ping timeout: 245 seconds]
fantazo has joined #ruby
tylersmith has quit [Ping timeout: 250 seconds]
Rephiax has quit []
Rephiax has joined #ruby
roolo has joined #ruby
elaptics is now known as elaptics_away
amclain has quit [Quit: Leaving]
jeromelanteri has quit [Ping timeout: 255 seconds]
neanderslob has quit [Remote host closed the connection]
neanderslob has joined #ruby
last_staff has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
phutchins has joined #ruby
kblake has joined #ruby
vdamewood has joined #ruby
rkgudboy has joined #ruby
ByronJohnson has quit [Ping timeout: 265 seconds]
deepa has joined #ruby
sandelius has joined #ruby
unreal_ has quit [Ping timeout: 264 seconds]
unreal has joined #ruby
lemur has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 252 seconds]
Morkel has quit [Quit: Morkel]
nahtnam has quit [Quit: Connection closed for inactivity]
kblake has quit [Ping timeout: 250 seconds]
oivoodoo has quit []
ByronJohnson has joined #ruby
edmilsonefs has joined #ruby
tuelz has joined #ruby
aganov has joined #ruby
edmilsonefs is now known as psychopath_mind
kyle__ has quit [Ping timeout: 245 seconds]
bricker has joined #ruby
_hollywood has joined #ruby
karmatr0n has quit [Remote host closed the connection]
narcan has joined #ruby
ptrrr has joined #ruby
karmatr0n has joined #ruby
juanpaucar has joined #ruby
bal has joined #ruby
lessless has quit [Max SendQ exceeded]
hvxgr has joined #ruby
acl_ has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
karmatr0n has quit [Ping timeout: 265 seconds]
AlphaTech has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
ghostpl_ has joined #ruby
piotrj has joined #ruby
juanpaucar has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 250 seconds]
sinkensabe has joined #ruby
freerobby has quit [Quit: Leaving.]
ghostpl_ has quit [Ping timeout: 256 seconds]
Schmidt has joined #ruby
andikr has joined #ruby
sinkensabe has quit [Remote host closed the connection]
rkgudboy has quit [Ping timeout: 246 seconds]
kyle__ has joined #ruby
relix has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
rrrutr has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
lolmaus has quit [Quit: Konversation terminated!]
multi_io_ has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
postmodern has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
theRoUS has quit [Quit: Coyote finally caught me]
astrobunny has quit []
fabrice31 has joined #ruby
piotrj has quit [Remote host closed the connection]
Macaveli has joined #ruby
iteratorP has quit [Remote host closed the connection]
iteratorP has joined #ruby
jenrzzz has joined #ruby
astrobunny has joined #ruby
martinbmadsen has quit [Ping timeout: 264 seconds]
hmsimha has quit [Ping timeout: 252 seconds]
commmmodo has quit [Quit: commmmodo]
commmmodo has joined #ruby
RegulationD has joined #ruby
phutchins has joined #ruby
DEA7TH has joined #ruby
strixd has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
Regulati_ has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
towski_ has joined #ruby
jud has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 252 seconds]
jud has joined #ruby
jud has quit [Changing host]
jud has joined #ruby
bricker has quit [Quit: leaving]
Regulati_ has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
cpt_yossarian has quit [Ping timeout: 256 seconds]
cpt_yossarian has joined #ruby
Dodo1 has joined #ruby
razieliyo has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
psychopath_mind has quit [Ping timeout: 244 seconds]
cpt_yossarian has quit [Ping timeout: 246 seconds]
ptrrr has quit [Quit: ptrrr]
vtunka has joined #ruby
blueOxigen has joined #ruby
ki0 has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
ki0 has quit [Read error: Connection reset by peer]
ki0 has joined #ruby
dumdedum has joined #ruby
rkgudboy has joined #ruby
Morkel has joined #ruby
rkgudboy has quit [Remote host closed the connection]
rkgudboy has joined #ruby
anarang has joined #ruby
commmmodo has quit [Quit: commmmodo]
ghostpl_ has joined #ruby
thumpba has joined #ruby
arup_r has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Dodo1 has left #ruby [#ruby]
thumpba has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Ping timeout: 245 seconds]
morenoh149 has quit [Quit: WeeChat 1.0.1]
CustosLimen has joined #ruby
Rephiax has quit [Read error: Connection reset by peer]
oki has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
Rephiax has joined #ruby
exadeci has joined #ruby
_cake has quit [Read error: Connection reset by peer]
Flcn has joined #ruby
dumdedum has quit [Ping timeout: 256 seconds]
rkgudboy has quit [Ping timeout: 255 seconds]
einarj has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
fantazo has quit [Ping timeout: 272 seconds]
danjordan has joined #ruby
anarang has quit [Quit: Leaving]
nii236 has quit [Ping timeout: 255 seconds]
kalusn has joined #ruby
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
Rephiax_ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
martinbmadsen has joined #ruby
fabrice31 has quit [Remote host closed the connection]
Rephiax has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
fabrice31 has joined #ruby
dumdedum has joined #ruby
piotrj has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
yfeldblu_ has joined #ruby
psy_ has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
CorySimmons has joined #ruby
Sawbones_ has joined #ruby
fantazo has joined #ruby
<alem0lars> Is it possible in middleman to render a partial with a different template for each language?
adaedra has joined #ruby
Rephiax has joined #ruby
<adaedra> Hello
bruno- has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
roolo has quit [Ping timeout: 252 seconds]
<Phage> Any help regarding comparing a string (stored in a variable) to a string from a file? I somehow haven't managed to make it work...
sevenseacat has quit [Remote host closed the connection]
Rephiax_ has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 246 seconds]
alex88 has joined #ruby
_Andres has joined #ruby
lolmaus has joined #ruby
fabrice31_ has joined #ruby
Schmidt has quit [Ping timeout: 245 seconds]
juanpaucar has joined #ruby
Schmidt has joined #ruby
spiderbyte has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
marr has joined #ruby
Vivex has quit [Read error: Connection reset by peer]
juanpaucar has quit [Ping timeout: 245 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
towski_ has quit [Remote host closed the connection]
<gregf_> Phage: what have you tried?
<Phage> Feel like everything, lol. I'm trying one last thing, if that doesn't work, I'll show you the code.
govg has quit [Ping timeout: 255 seconds]
<gregf_> >> str_from_file = "foo\n"; str_from_var = "foo"; p str_from_file.chomp == str_from_var
<eval-in_> gregf_ => true ... (https://eval.in/298560)
joonty has joined #ruby
<gregf_> notice the newline in the variable from the file
ki0 has quit [Remote host closed the connection]
CorySimmons has quit [Quit: Bye!]
<gregf_> >> str_from_var = "foo";p $stdin.gets.chomp == str_from_var
<eval-in_> gregf_ => undefined method `chomp' for nil:NilClass (NoMethodError) ... (https://eval.in/298561)
The_Phoenix has joined #ruby
<gregf_> haha
<gregf_> Phage: canwehasthecodez please
hmsimha has joined #ruby
ki0 has joined #ruby
multiscan has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
dfish has joined #ruby
neanderslob has joined #ruby
lordkryss has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
<Phage> gregf_: https://dpaste.de/rGi6
arup_r_ has joined #ruby
ghostpl_ has joined #ruby
<Phage> gregf_: It doesn't output anything.
<gregf_> er, chome seem to be a typo? should that be chomp?
<Phage> ofc.
dmolina has joined #ruby
livathinos has joined #ruby
MatthewsFace has joined #ruby
<Phage> Okay, now it outputs no matter that.
<Phage> what*
<Phage> But it shouldn't if time_posted == string_from_file...
arup_r has quit [Ping timeout: 252 seconds]
Miron has quit [Ping timeout: 252 seconds]
<gregf_> you can try and print before the match(for debugging) like so, print "#{line.chomp}-#{time_posted}"
Zai00 has joined #ruby
adriancb has joined #ruby
<gregf_> the formats could be different. whats that text file look like?
<Phage> 1426064773.0
<toretore> Phage: first, explain exactly what you're trying to do
<Phage> It contains a string like that.
<toretore> "it doesn't work" means absolutely nothing otherwise
<gregf_> >>"1426064773.0" == "1426064773.0"
<eval-in_> gregf_ => true (https://eval.in/298564)
<toretore> then, gist the files containing the data you're trying to compare
<Phage> toretore: This bot should pull the latest TIL from Reddit. I have that part working, but I do not want it to display the same news twice. So, I thought about storing the time-stamp of the time the TIL was posted and then compare it to the new time-stamp pulled.
MatthewsFace has quit [Ping timeout: 264 seconds]
DerisiveLogic has quit [Ping timeout: 252 seconds]
elaptics_away is now known as elaptics
Miron has joined #ruby
Takle has joined #ruby
adriancb has quit [Ping timeout: 265 seconds]
nii236 has joined #ruby
<toretore> you should check if the endpoint allows specifying a from timestamp first
jusmyth has joined #ruby
<Phage> toretore: I didn't understand that :i
teddyp1cker has joined #ruby
<adaedra> Phage: check if the API/Page you request don’t let you filter by date, so you just ask for new stories since last update
<Phage> adaedra: The stories gets pulled form a .json file.
<Phage> which gets updated every 30 seconds (if any new posts).
huddy has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
lkba has quit [Ping timeout: 240 seconds]
Hirzu_ has joined #ruby
Takle has joined #ruby
tlarevo has quit [Ping timeout: 246 seconds]
ghostpl_ has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 245 seconds]
tlarevo has joined #ruby
Hirzu has quit [Ping timeout: 265 seconds]
ghostpl_ has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
kapil___ has joined #ruby
psychopath_mind has joined #ruby
selu has joined #ruby
workmad3 has joined #ruby
ghostpl_ has joined #ruby
dEPy has joined #ruby
<mozzarella> wtf?
<mozzarella> ruby -e '%x(echo test)'
<mozzarella> doesn't do anything
<mozzarella> >> %x(echo $SHELL)
<eval-in_> mozzarella => (https://eval.in/298569)
blackmesa has joined #ruby
<gregf_> >> %x(echo "test")
<eval-in_> gregf_ => (https://eval.in/298570)
davidhq has joined #ruby
Rephiax_ has joined #ruby
govg has joined #ruby
<gregf_> mozzarella: %x/`` do not send the output to STDOUT, system does
<gregf_> >> a = %x(echo test); a
<eval-in_> gregf_ => (https://eval.in/298572)
DEA7TH has quit [Ping timeout: 264 seconds]
<gregf_> >> system(echo test)
<eval-in_> gregf_ => wrong number of arguments (0 for 2..3) (ArgumentError) ... (https://eval.in/298573)
<mozzarella> but echo uses stdout
<gregf_> >> system("echo test")
<eval-in_> gregf_ => (https://eval.in/298574)
arup_r_ has quit []
Rephiax has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
<gregf_> if you could just execute commands something like this would also find its way: %x(rm -Rf $HOME/*.txt)
<Phage> In Python I can do; "til_last_update = None". Can I do something similar in Ruby?
<gregf_> Phage: til_last_update = nil?
rdark has joined #ruby
<Phage> But that didn't work :(
<gregf_> i mean without the '?' *cries*
roolo has joined #ruby
govg has quit [Quit: leaving]
leafybas_ has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 240 seconds]
rdark has quit [Ping timeout: 256 seconds]
Deele has joined #ruby
phutchins has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
piotrj has quit []
<gregf_> Phage: the last_update=nil and the if statement are not useful; just assign ;)
rdark has joined #ruby
neanderslob_ has joined #ruby
neanderslob_ has quit [Read error: Connection reset by peer]
<gregf_> or wait. put the last_update=nil outside the loop
Regulati_ has joined #ruby
<gregf_> sorry, out of time. gtg
neanderslob has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
iteratorP has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
vtunka has quit [Quit: Leaving]
ghostpl_ has joined #ruby
wolf4ood___ has joined #ruby
<gregf_> Phage: have you tried the code in execute standalone?
<gregf_> without the bot?
<Phage> gregf_: No.
<Phage> Let me do that.
phutchins has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
Regulati_ has quit [Ping timeout: 272 seconds]
ghostpl_ has quit [Remote host closed the connection]
<gregf_> Phage: what is it you want to do btw? you've got 'time_posted' from that reddit feed. whats it you need to compare it to?
rdark has quit [Ping timeout: 252 seconds]
<gregf_> *feels it should'nt be difficult*.
RegulationD has joined #ruby
<Phage> gregf_: I need to check if the new time-stamp is later than the previous one.
<Phage> It really shouldn't.
<gregf_> Phage: if you tell the truth we wont go round and round in circles ;)
<Phage> I just did?
<gregf_> previous as in?
<gregf_> not that i can see you store previous nowhere?
<Phage> I make request, print post and save time stamp
mengu has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
<Phage> I make new request, if time stamp is not later > don't post it
Hirzu_ has quit [Ping timeout: 250 seconds]
<gregf_> that does'nt show me any previous_date, unless i've gone blind o_O
dstarh has joined #ruby
arup_r has joined #ruby
<gregf_> Phage: keep previous_date as a global, above the execute method and then do : if time_posted != previous_time; m.reply(); previous_time = time_posted;end
ghostpl_ has joined #ruby
rkgudboy has joined #ruby
arup_r has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
leafybas_ has quit [Ping timeout: 252 seconds]
dfish has quit []
rrrutr has quit [Ping timeout: 256 seconds]
rkgudboy has quit [Remote host closed the connection]
<Phage> gregf_: If I move that outside the function, it complains about time_posted being undefined.
rkgudboy has joined #ruby
<gregf_> set it to nil
psychopath_mind has quit [Ping timeout: 244 seconds]
<gregf_> or to yesterday(its an epoch)
ghostpl_ has quit [Remote host closed the connection]
<gregf_> well, whatever
MasterPiece has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
Flcn_ has joined #ruby
fgo has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
Flcn has quit [Read error: Connection reset by peer]
MasterPiece has joined #ruby
jusmyth has quit [Quit: Leaving.]
MasterPiece has quit [Max SendQ exceeded]
TheRinger has quit [Quit: Konversation terminated!]
Hirzu has joined #ruby
MasterPiece has joined #ruby
aswen has joined #ruby
<gregf_> Phage: its very simple. you're trying to make it too hard, unfortunately ;)
arup_r has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pretodor has joined #ruby
pretodor has quit [Read error: Connection reset by peer]
pretodor has joined #ruby
<vandemar> is there a built in function of any array/enumerable-like class that would do this: instead of [1,2,3,3,4,5] - [3] equaling [1,2,4,5], some operator/function that returns [1,2,3,4,5] instead? I know I can implement it by searching for elements piecemeal, I'm looking for a more concise solution
pretodor has quit [Client Quit]
<Phage> gregf_: https://gist.github.com/phildk/9f9636e050fdb7eb9e64 <--- doesn't output anything.
harfangk has quit [Quit: This computer has gone to sleep]
rohitkashyap has joined #ruby
pretodor has joined #ruby
pretodor has quit [Max SendQ exceeded]
teddyp1cker has joined #ruby
joonty has quit [Quit: joonty]
pretodor has joined #ruby
pretodor has quit [Client Quit]
<arup_r> How to get anything before @ like "spree" when I have "spree@exampl.com" ?
<gregf_> Phage: keep the bot out for the minute. try and get the execute code to work. also how often does that feed refresh?(store those feeds in 2 files and try it out)
<Phage> gregf_: the feed refreshes every 30 seconds.
rkgudboy has quit [Ping timeout: 255 seconds]
<gregf_> good. so get 2 new feeds and write the json to 2 files(in 1 minute)
nii236 has quit [Read error: Connection reset by peer]
<gregf_> >> "spree@exampl.com" =~ /([^@]+)/;[ $1 ];
<eval-in_> gregf_ => ["spree"] (https://eval.in/298584)
<gregf_> arup_r: ^^
<arup_r> I tried "spree@example.com".sub(/.*(@.*)/, "") didn't work
<arup_r> Ouchh! someone helped me.. nice :D
<gregf_> yeah, gsub's fine as well
<arup_r> >> "spree@exampl.com"[/([^@]+)/]
<eval-in_> arup_r => "spree" (https://eval.in/298585)
<arup_r> great
rohitkashyap has quit [Ping timeout: 255 seconds]
<arup_r> gregf_: thanks
rohitkashyap has joined #ruby
doodlehaus has joined #ruby
nii236 has joined #ruby
rohitkashyap has quit [Client Quit]
rkgudboy has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apoplexy_da_boss has joined #ruby
joonty has joined #ruby
rkgudboy has quit [Client Quit]
apoplexy has quit [Ping timeout: 264 seconds]
Sawbones_ has joined #ruby
rkgudboy has joined #ruby
dblessing has joined #ruby
didou has joined #ruby
<didou> hi
gisli has left #ruby [#ruby]
dukz has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
bim has quit [Remote host closed the connection]
freerobby has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
harfangk has joined #ruby
ianfleeton has joined #ruby
rsavage has joined #ruby
rsavage is now known as r3Dk1nG
leafybasil has joined #ruby
charliesome has joined #ruby
gisli has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
bartavelle has joined #ruby
bartavelle has left #ruby ["Ex-Chat"]
teddyp1cker has joined #ruby
coderhs has joined #ruby
juanpaucar has joined #ruby
sandelius has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
norc has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
Sawbone__ has joined #ruby
<arup_r> Spree::Order.first.created_at.strftime("%B %d, %Y %l:%M:%S %p") is giving "January 20, 2015 4:46:56 AM" but I want "January 20, 2015 4:46:56 AM IST" how to displacy timezone ? %z or %Z doesn't give what I want
Sawbones_ has quit [Read error: Connection reset by peer]
vtunka has joined #ruby
juanpaucar has quit [Ping timeout: 252 seconds]
arup_r_ has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
arup_r_ has quit [Client Quit]
<adaedra> %Z should give you the timezone
arup_r_ has joined #ruby
arup_r_ has quit [Client Quit]
<adaedra> what are you obtaining when doing `Time.now.strftime('%Z')`?
uptownhr has quit [Quit: uptownhr]
arup_r has quit [Ping timeout: 256 seconds]
arup_r_ has joined #ruby
arup_r_ has quit [Client Quit]
ianfleeton has quit [Remote host closed the connection]
jespada has joined #ruby
reinaldo_ has joined #ruby
reinaldob has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
mostlybadfly has joined #ruby
brandon_ has quit [Ping timeout: 265 seconds]
<arup_r> Any idea guys ?
rodfersou has joined #ruby
<adaedra> What do you want and what do you obtain when using %Z?
aswen has quit [Ping timeout: 245 seconds]
muzik has quit [Quit: Textual IRC Client: www.textualapp.com]
cpt_yossarian has joined #ruby
ghostpl_ has joined #ruby
<arup_r> adaedra: Spree::Order.first.created_at.strftime("%B %d, %Y %l:%M:%S %p %Z") gives "January 20, 2015 4:46:56 AM UTC"
<arup_r> I want it to be IST
<arup_r> I am from India
robbyoconnor has quit [Ping timeout: 245 seconds]
reinaldo_ is now known as reinaldob
<adaedra> try with .localtime
dawkirst has joined #ruby
Zai00 has quit [Quit: Zai00]
<arup_r> ok
<vandemar> I don't understand why anyone would use their server's "local" time for anything.
nfk has joined #ruby
<arup_r> adaedra: wowowowowowowowowow
fabrice31 has quit [Remote host closed the connection]
<adaedra> wow
<arup_r> adaedra: you are from ?
elfuego has joined #ruby
<adaedra> France
<arup_r> wow
ghostpl_ has quit [Read error: Connection reset by peer]
lanemeyer has quit []
ghostpl_ has joined #ruby
lkba has joined #ruby
bim has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
sdothum has joined #ruby
maximski has joined #ruby
MasterPiece has quit [Ping timeout: 255 seconds]
tkuchik__ has quit [Ping timeout: 245 seconds]
rkgudboy has quit [Ping timeout: 244 seconds]
hmsimha has joined #ruby
bim has quit [Remote host closed the connection]
yfeldblu_ has quit [Ping timeout: 265 seconds]
ixhdsl has joined #ruby
freerobby has quit [Quit: Leaving.]
plashchynski has joined #ruby
boadie has joined #ruby
bruno- has joined #ruby
plashchynski has quit [Client Quit]
<adaedra> ok
bim has joined #ruby
Sawbone__ has quit [Remote host closed the connection]
fella5s has quit [Quit: Leaving]
boadie has quit [Ping timeout: 256 seconds]
hanmac1 has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby
cpt_yossarian has quit [Quit: And then he took off.]
cpt_yossarian has joined #ruby
bal has quit [Quit: bal]
scripore has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
plashchynski has joined #ruby
doodlehaus has quit [Remote host closed the connection]
dmr8 has joined #ruby
scripore has quit [Quit: Leaving]
maasha has joined #ruby
MasterPiece has joined #ruby
nhhagen has joined #ruby
bal has joined #ruby
Takle has quit [Remote host closed the connection]
dfish has joined #ruby
antgel has joined #ruby
didou has left #ruby [#ruby]
dawkirst has quit [Quit: Leaving...]
Takle has joined #ruby
bim has quit [Remote host closed the connection]
aswen has joined #ruby
dawkirst has joined #ruby
dawkirst has quit [Remote host closed the connection]
hmsimha has quit [Read error: Connection reset by peer]
narcan has joined #ruby
vt102 has joined #ruby
elfuego has quit [Quit: elfuego]
bim has joined #ruby
d10n-work has joined #ruby
RegulationD has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
hmsimha has joined #ruby
arup_r has quit [Remote host closed the connection]
dc_ has joined #ruby
jmignault has joined #ruby
dc_ has quit [Remote host closed the connection]
dreinull75 has joined #ruby
multiscan has quit [Remote host closed the connection]
<dreinull75> cheapest way to get the last digit of an integer? 12.to_s[-1] ?
lxsameer has quit [Ping timeout: 245 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
RegulationD has joined #ruby
<gregf_> >> 12 % 10
<eval-in_> gregf_ => 2 (https://eval.in/298641)
aclearman037 has joined #ruby
iamjarvo has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
chinmay_dd has joined #ruby
lxsameer has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
a5i has joined #ruby
tvw has joined #ruby
aryaching has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<dreinull75> gregf yep, that ones good too
RegulationD has joined #ruby
otisZart has joined #ruby
hcnewsom has joined #ruby
apoplexy_da_boss has quit [Ping timeout: 256 seconds]
rrrutr has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
startupality has joined #ruby
_honning_ has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
RegulationD has quit [Ping timeout: 255 seconds]
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n80 has joined #ruby
claptor has quit [Quit: this channel is bakas]
arup_r has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
_dropp` has joined #ruby
<_dropp`> yooo
tkuchiki has joined #ruby
_dropp` is now known as dropp
slackbotgz has joined #ruby
fabrice31 has joined #ruby
ghostpl_ has joined #ruby
zapata has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Remote host closed the connection]
Megtastique has joined #ruby
fabrice31 has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
charliesome has quit [Quit: zzz]
jusmyth has joined #ruby
Zai00 has joined #ruby
Hirzu has quit [Ping timeout: 265 seconds]
surs has quit [Quit: leaving]
surs has joined #ruby
_hollywood has quit [Ping timeout: 245 seconds]
jusmyth has quit [Client Quit]
teddyp1cker has joined #ruby
JohnBat26 has quit [Ping timeout: 250 seconds]
amystephen has joined #ruby
n80 has quit [Quit: n80]
mengu has quit [Remote host closed the connection]
n80 has joined #ruby
sgambino has joined #ruby
juanpaucar has joined #ruby
unshadow has joined #ruby
neanderslob has quit [Ping timeout: 244 seconds]
xcombelle has joined #ruby
<unshadow> Hi guys, yesterday I asked about some feedback on my first GEM , you guys gave me great advices, just wanted to show you the new code ==> https://github.com/bararchy/safe-t-rest , I really think it's shaping up to be a nice project :)
jud has quit [Quit: Leaving]
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
brb3 has joined #ruby
arup_r_ has joined #ruby
<jhass> that looks a lot better already, yeah :)
arup_r has quit [Ping timeout: 245 seconds]
aiguu has quit [Ping timeout: 245 seconds]
vdamewood has quit [Ping timeout: 256 seconds]
<jhass> unshadow: I still wonder though, what format is the BusinessLogic parameter supposed to be? Is it json?
vinleod has joined #ruby
tesuji has joined #ruby
_hollywood has joined #ruby
<arup_r_> >> /Size: (?<size>\d+), Color: (?<color>[A-Z]+)/ =~ "Size: 10, Color: BLACK" ; [size, color]
<eval-in_> arup_r_ => ["10", "BLACK"] (https://eval.in/298689)
kallisti5 has quit [Quit: leaving]
<arup_r_> this is perfect
joast has quit [Ping timeout: 244 seconds]
juanpaucar has quit [Ping timeout: 252 seconds]
<jhass> arup_r_: no :(
<jhass> I hate that "feature"
<jhass> it's way too non-obvious
<arup_r_> but the prob is - when I have a strings like -- "Size: XL, Color: BLACK", "Size: XXL, Color: BLACK" etc
<arup_r_> jhass: is it?
<jhass> yes
<unshadow> jhass, its a 'hack' to allow rest to talk with the backend server, its actually a full method implamented in .net on the server side, so each connection is just passing a pieace of code
vinleod is now known as vdamewood
<arup_r_> then how would I do it ? I need to create 2 local vars like color and size using regexp which I will use inside the ERB templates..
fgo has quit [Ping timeout: 256 seconds]
<jhass> >> m = "Size: 10, Color: BLACK".match /Size: (?<size>\d+), Color: (?<color>[A-Z]+)/; m[:color]
lektrik has joined #ruby
<eval-in_> jhass => "BLACK" (https://eval.in/298690)
CorySimmons has joined #ruby
<arup_r_> ok.. you like it jhass: :) Why not like the other one ?
dmr8 has quit [Quit: Leaving]
<jhass> arup_r_: because it's totally not obvious where those locals come from
<jhass> unshadow: mmh, but it just looks like some hash/map like data structure?
<jhass> very much like JSON in fact
tier has joined #ruby
<jhass> unshadow: are the API docs public?
paradoja has joined #ruby
<unshadow> jhass, they will be, I'll upload them when they will be ready to the same git
lanemeyer has joined #ruby
Feyn has quit [Quit: Leaving]
arup_r has joined #ruby
<arup_r> I'm back
<jhass> unshadow: so what's the spec for that format if it's not json?
arup_r__ has joined #ruby
arup_r has quit [Read error: No route to host]
<unshadow> jhass, TBH I dont really know, I'm not the server side developer, I asked one of our application developer , I'll know in a sec
<jhass> I'm asking because I have a hunch that there's a nice way to take out a ton of redundancy there still
matchaw has quit [Read error: Connection reset by peer]
arup_r_ has quit [Ping timeout: 245 seconds]
<arup_r__> I'm back ... F****ing internet
danjordan has quit [Quit: danjordan]
revoohc has joined #ruby
<toretore> also, what is an extenstion
bruno- has joined #ruby
Hirzu has joined #ruby
<unshadow> jhass, He said and I'll try to translate as best as I can: "its a reflection technique that takes the string from the REST call, and parse it to .NET\C# function in the background and run it"
commmmodo has joined #ruby
<jhass> unshadow: so the format is entirely made up? mmh
<toretore> in other words, the web service exposes its guts to the client
<jhass> It's way too close to JSON, why not use that?
MatthewsFace has joined #ruby
jud has joined #ruby
fmcgeough has joined #ruby
dblessing has joined #ruby
<jhass> unshadow: note that I'm entirely uninterested in what it's doing, I'm interested about the spec of the format of that parameter
Hirzu_ has joined #ruby
codecop has joined #ruby
<unshadow> jhass, I'm not really sure, how is it 'like JSON' ?
<jhass> >> require "json"; {"key" => [{"key" => "value"}, true, 1]}.to_json
<eval-in_> jhass => "{\"key\":[{\"key\":\"value\"},true,1]}" (https://eval.in/298691)
boadie has joined #ruby
<unshadow> (I have no clue about JSON or how it looks)
coderhs has quit [Ping timeout: 252 seconds]
<jhass> do you see the similarities?
silkfox has joined #ruby
<unshadow> it looks almost the same
spiderbyte has joined #ruby
<unshadow> I see what you mean
Hirzu has quit [Ping timeout: 246 seconds]
dfish has quit []
MasterPiece has quit [Remote host closed the connection]
MatthewsFace has quit [Ping timeout: 240 seconds]
<jhass> unshadow: and given that we have a nice serializer to json shipped with ruby, if it really is json we could nicely build up a ruby hash and extract all that redundancy there and just call .to_json at the end
dblessing has quit [Ping timeout: 244 seconds]
wottam has joined #ruby
tomeara has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tomeara has quit [Client Quit]
oki has quit [Read error: Connection reset by peer]
oki has joined #ruby
<unshadow> I see, I'll take a look
<unshadow> Thanks !
arup_r has joined #ruby
<unshadow> :)
Macaveli has joined #ruby
tkuchiki has joined #ruby
danjordan has joined #ruby
kohvihoor has joined #ruby
wolf4ood___ has quit [Quit: (null)]
jerius has joined #ruby
RegulationD has joined #ruby
boadie has quit [Ping timeout: 252 seconds]
Macaveli has quit [Ping timeout: 244 seconds]
arup_r__ has quit [Ping timeout: 246 seconds]
boadie has joined #ruby
polysics has quit [Remote host closed the connection]
lyuben_ has joined #ruby
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vandemar has quit [Ping timeout: 252 seconds]
joonty_ has joined #ruby
juanpablo_ has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
oki has quit [Quit: Lost terminal]
sivsushruth has quit [Ping timeout: 240 seconds]
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
joonty has quit [Quit: joonty]
joonty_ is now known as joonty
sivsushruth has joined #ruby
CorySimmons has quit [Quit: Bye!]
dukz has quit [Read error: Connection reset by peer]
dukz has joined #ruby
boadie has quit [Remote host closed the connection]
boadie has joined #ruby
jespada has quit [Ping timeout: 252 seconds]
mengu has joined #ruby
mengu has joined #ruby
joast has joined #ruby
<jokke> hi
<jokke> i have a question regarding open-uri
HOrangeJewce has joined #ruby
zenith_ has joined #ruby
<jokke> if i do open(some_uri), does it already get the whole response body, or is it lazy?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jokke> i want to get the first n bytes of a response body
doodlehaus has joined #ruby
<jokke> that's why i'm asking
ziyadb has joined #ruby
<jhass> I think it fetches fully
Rephiax has joined #ruby
<jokke> ok
<jhass> but I never checked
tus has joined #ruby
boadie has quit [Ping timeout: 256 seconds]
Vivex has joined #ruby
roshanavand has joined #ruby
dstarh has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Rephiax_ has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
Channel6 has joined #ruby
max96at|off is now known as max96at
jespada has joined #ruby
shay- has joined #ruby
charliesome has joined #ruby
<shay-> hi, can I pass options to a gem when installing a bundle?
eladmeidar has joined #ruby
<jokke> --
<jokke> afair
jerius has quit [Quit: /quit]
livingstn has joined #ruby
jerius has joined #ruby
<jhass> shay-: yes, bundle help config
tkuchiki has quit [Ping timeout: 250 seconds]
ych4k3r has joined #ruby
mbeasley has quit [Quit: WeeChat 0.4.2]
mbeasley has joined #ruby
dstarh has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
multiscan has joined #ruby
spyderman4g63 has joined #ruby
<shay-> jhass: perfect, thank you!
jlebrech has joined #ruby
polysics has joined #ruby
_maes_ has joined #ruby
jerematic has joined #ruby
iamjarvo has joined #ruby
unshadow has quit [Quit: leaving]
zenith_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
<shevy> shay!
<shevy> I like your nick
Rephiax__ has joined #ruby
dukz has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
sambao21 has joined #ruby
enebo has joined #ruby
<jokke> maybe i'm missing something but am i right, that there's no way to read a single byte from a http response body without getting more?
IrishGringo has joined #ruby
startupality has quit [Quit: startupality]
dstarh has joined #ruby
fryguy9 has joined #ruby
RegulationD has joined #ruby
multiscan has quit [Ping timeout: 244 seconds]
Rephiax has quit [Ping timeout: 246 seconds]
ojacobson has joined #ruby
freerobby has joined #ruby
<arup_r> need help! :(
<tobiasvl> arup_r: with… what?
<arup_r> How can I calculate the character distance between each word like "Item Sku Size Colour Qty Subtotal"
fabrice31_ has joined #ruby
charliesome has quit [Quit: zzz]
<arup_r> I mean space counts
<arup_r> between 1st and 2nd word, 2nd and 3rd word so on
<tobiasvl> regex match on each sequence of whitespace and then check the length of the matches?
dblessing has joined #ruby
otisZart has joined #ruby
multisca_ has joined #ruby
adriancb has joined #ruby
paradoja has quit [Ping timeout: 264 seconds]
commmmodo has quit [Quit: commmmodo]
<jhass> ^ .scan(/\s+/).map(&:size)
fgo has joined #ruby
Tuxero has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
joonty has quit [Quit: joonty]
<agent_white> jhass: nice :D
tlarevo has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 265 seconds]
werelivinginthef has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Fluent> o.O
<Fluent> mes.scan(/\s/).map(&:size)
<Fluent> => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
<arup_r> jhass: thanks
<jhass> >> "Item Sku Size Colour Qty Subtotal".scan(/\s+/).map(&:size)
<eval-in_> jhass => [26, 7, 4, 4, 5] (https://eval.in/298706)
<jhass> not sure what you're doing Fluent :P
<Fluent> Oh, forgot the +
multiscan has joined #ruby
<Fluent> s+
<jokke> Fluent: +
<arup_r> now next question is :
ojacobson has quit [Quit: Leaving...]
shortCircuit__ has joined #ruby
<arup_r> "%13s" % "abb"
<arup_r> sorry'
<arup_r> I thought I am in IRB
codecop has quit [Remote host closed the connection]
zenith_ has joined #ruby
blackmesa has joined #ruby
<shortCircuit__> hi
fgo has quit [Ping timeout: 264 seconds]
<arup_r> I'll be back very soon
<shortCircuit__> I want a little help on a ruby-ish code
hcnewsom has quit [Quit: hcnewsom]
codecop has joined #ruby
<arup_r> >> d = 13 ; "%#{d}s" % "abb"
<eval-in_> arup_r => " abb" (https://eval.in/298708)
<shortCircuit__> https://gist.github.com/aghosh47/25868220ef5101e02a3f , when I access the index page, it shows no method error filter_offers. how to fix ?
<arup_r> no question
<arup_r> :)
<arup_r> thanks jhass:
slackbotgz has quit [Remote host closed the connection]
<adaedra> needs more ruby
<arup_r> jhass: I might need help again near future
deuterium has joined #ruby
<arup_r> :)
multisca_ has quit [Ping timeout: 246 seconds]
<shortCircuit__> more ruby?
elfuego has joined #ruby
<jhass> shortCircuit__: I'd start by removing AS::Concern, you don't use its features
<shortCircuit__> ok
<shortCircuit__> removed
<jhass> shortCircuit__: then check what kind of object controller is, you got it wrong
<shortCircuit__> ow
<arup_r> most of us don't know how to _debug_ and myself included in those list
<shortCircuit__> ah, I should learn some concerns. be back in a minute
it0a has joined #ruby
<arup_r> Bye all...
arup_r has quit []
lolmaus_ has joined #ruby
<adaedra> with patience.
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
ismaelga has joined #ruby
spider-mario has joined #ruby
<jhass> shortCircuit__: on a higher level I'd suggest to compose your modules, have one for each controller defining the right filter_offers and include the specific one, then extract the common code of the two into a third module (you can include a module into a module just fine)
momomomomo has joined #ruby
multiscan has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
<shortCircuit__> ok, will do that.
multiscan has joined #ruby
<shevy> and then
<shevy> marry jhass
Channel6 has quit [Quit: Leaving]
lolmaus has quit [Ping timeout: 264 seconds]
<shortCircuit__> :D , I am a boy. I have to bitten by a woman to become a woman
aclearma_ has joined #ruby
<shortCircuit__> like twilight
JohnBat26 has joined #ruby
<adaedra> ._o
n1lo has joined #ruby
adaedra has quit [Read error: Connection reset by peer]
aclearman037 has quit [Ping timeout: 252 seconds]
neonalpine has joined #ruby
phutchins has joined #ruby
mitchellhenke has joined #ruby
adaedra has joined #ruby
codecop has quit [Remote host closed the connection]
<adaedra> Why is there a dead domain (modruby.net) in the topic?
rbennacer has joined #ruby
<workmad3> adaedra: to see if you're paying attention? :)
lxsameer has quit [Quit: Leaving]
Spami has joined #ruby
<adaedra> :)
rbennace_ has joined #ruby
rbennace_ has quit [Remote host closed the connection]
rbennacer has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
neonalpine has quit [Read error: Connection reset by peer]
zenith_ has quit [Read error: Connection reset by peer]
hcnewsom has joined #ruby
hcnewsom has quit [Client Quit]
zenith_ has joined #ruby
Rephiax has joined #ruby
paradoja has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
<shevy> adaedra the topic probably has not been changed in years
bim has quit [Remote host closed the connection]
rdark has joined #ruby
<adaedra> (Just noticed it was ChanServ welcome message, not topic, but anyway.)
jenrzzz has quit [Ping timeout: 240 seconds]
razieliyo has quit [Remote host closed the connection]
rdark has quit [Client Quit]
Rephiax__ has quit [Ping timeout: 245 seconds]
dumdedum has quit [Quit: foo]
rdark has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
rdark has quit [Client Quit]
astrobunny has quit [Remote host closed the connection]
deuterium has quit [Ping timeout: 265 seconds]
rdark has joined #ruby
zenith_ has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 265 seconds]
bim has joined #ruby
<jhass> adaedra: because the guy with access rights to this channel sufficient to change it doesn't visit IRC anymore all that often
<adaedra> i see
oo_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
startupality has joined #ruby
rdark has quit [Client Quit]
matchaw has joined #ruby
kblake has joined #ruby
rdark has joined #ruby
rdark has quit [Client Quit]
<shevy> :(
kblake has quit [Ping timeout: 255 seconds]
<shevy> he abandoned IRC!
<jhass> Last seen : Oct 31 11:16:16 2014 (18w 5d 2h ago)
roshanavand has quit [Remote host closed the connection]
Rephiax has quit []
<adaedra> :o
<shevy> half a year!
nucular11 has joined #ruby
deuterium has joined #ruby
civim has joined #ruby
LJT has joined #ruby
fabrice31_ has joined #ruby
plashchynski has quit [Ping timeout: 252 seconds]
dEPy has quit [Quit: (null)]
plashchynski has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
<civim> I have a question about printing HTML in pry. Anyone have tips for getting pry to indent the HTML properly?
lolmaus__ has joined #ruby
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has quit [Ping timeout: 264 seconds]
lolmaus_ has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
LJT has quit [Read error: Connection reset by peer]
shadeslayer has quit [Ping timeout: 256 seconds]
nhhagen_ has joined #ruby
tier_ has joined #ruby
juanpaucar has joined #ruby
dukz has joined #ruby
shadeslayer has joined #ruby
ych4k3r has quit [Quit: Textual IRC Client: www.textualapp.com]
<kaleido> nobody truly leaves IRC
hiyosi has joined #ruby
<hanmac1> civim: what is "prpertly" intended HTML for you? you mean like a xml should be?
oo_ has quit [Remote host closed the connection]
<civim> hanmac1: yeah like xml. right now, when i print html in pry, i just get a blob with no line breaks
havenwood has joined #ruby
nhhagen has quit [Ping timeout: 240 seconds]
<jhass> civim: you could roundtrip it through Nokogiri :P
ych4k3r has joined #ruby
<hanmac1> imo best one: parse it with nokogiri and then let it print it again
<hanmac1> build
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
tier has quit [Ping timeout: 246 seconds]
<adaedra> If it’s stored as a String, pry has no way to know it’s html, so you won’t be able to have special treatments
<jhass> ah, no that actually doesn't format it
fryguy9 has quit [Quit: Leaving.]
Takle has joined #ruby
zenith_ has joined #ruby
<adaedra> Pass it manually to a HTML formatter or something like that
nhhagen_ has quit [Ping timeout: 265 seconds]
<jhass> but its inspect is nice
<civim> ah, but nokogiri might help me see the structure, which is what i really need anyway
joonty has joined #ruby
juanpaucar has quit [Ping timeout: 265 seconds]
Macaveli has joined #ruby
<civim> adaedra: any recommendations for an html formatter?
<adaedra> no
<adaedra> look if ruby-toolbox have something maybe
<civim> ok, thanks. i'll see what i can do with nokogiri, i'll need to use that to parse the rest of the page anyway.
<civim> thanks
cpt_yossarian has quit [Quit: And then he took off.]
justin_pdx has joined #ruby
Takle has quit [Remote host closed the connection]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
banister has joined #ruby
<civim> wasamasa: I just found that. Reading it now!
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<wasamasa> IIRC there's a pretty-printing method
iamjarvo has joined #ruby
giuseppesolinas has joined #ruby
SOLDIERz_ has joined #ruby
dukz has quit [Remote host closed the connection]
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
fgo has joined #ruby
_1_Joel1256 has joined #ruby
ascarter has joined #ruby
Takle has joined #ruby
dreinull75 has left #ruby ["undefined"]
oo_ has joined #ruby
MatthewsFace has joined #ruby
multiscan has quit [Remote host closed the connection]
jonr22 has joined #ruby
red_horned_rihno has quit [Ping timeout: 250 seconds]
_1_Joel1256 has quit [Quit: WhatsChat IRC Android APP]
roshanavand has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
joonty has quit [Quit: joonty]
GnuYawk has joined #ruby
dfinninger has joined #ruby
joonty has joined #ruby
MatthewsFace has quit [Ping timeout: 246 seconds]
prasselpikachu has quit [Ping timeout: 264 seconds]
nii236 has quit [Ping timeout: 240 seconds]
prasselpikachu has joined #ruby
mengu has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
narcan has joined #ruby
shortCircuit__ has left #ruby [#ruby]
lyuben_ has quit [Quit: Leaving]
fantazo has quit [Ping timeout: 264 seconds]
SOLDIERz__ has joined #ruby
nii236 has joined #ruby
hmsimha has quit [Read error: Connection reset by peer]
lektrik has quit [Ping timeout: 255 seconds]
xcombelle has quit [Ping timeout: 255 seconds]
<shevy> it prints dirty
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
rrrutr has quit [Ping timeout: 272 seconds]
ascarter has joined #ruby
SOLDIERz_ has quit [Ping timeout: 264 seconds]
zenith_ has quit [Ping timeout: 272 seconds]
ascarter has quit [Max SendQ exceeded]
sambao21 has quit [Quit: Computer has gone to sleep.]
zenith_ has joined #ruby
ascarter has joined #ruby
hmsimha has joined #ruby
nateberkopec has joined #ruby
jlast has joined #ruby
freerobby has joined #ruby
sambao21 has joined #ruby
dukz has joined #ruby
Outlastsheep has joined #ruby
dropp_ has joined #ruby
hcnewsom has joined #ruby
blackmesa has joined #ruby
grn has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
bim has quit [Remote host closed the connection]
bim has joined #ruby
lektrik has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
dropp has quit [Ping timeout: 245 seconds]
crueber has joined #ruby
psychopath_mind has joined #ruby
mengu has quit [Client Quit]
<grn> Hi! I'm running into issues with Mocha in my Rails app. It doesn't teardown properly which causes expectations to "leak" from tests, e.g.: I have two tests that call #expects and get a failure saying that the method was expected to be called *twice*.
mitchell_ has joined #ruby
<grn> Did anyone run into similar problems?
<grn> Of course I required 'mocha/mini_test' at the end of 'test_helper.rb' with no effect.
bim has quit [Remote host closed the connection]
mitchellhenke has quit [Ping timeout: 252 seconds]
fantazo has joined #ruby
nii236 has quit [Ping timeout: 264 seconds]
DerisiveLogic has joined #ruby
bim has joined #ruby
momomomomo has quit [Quit: momomomomo]
zenith_ has quit [Remote host closed the connection]
_maes_ has joined #ruby
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
Cache_Money has joined #ruby
brb3 has quit [Quit: ZZZzzz…]
B1n4r10 has joined #ruby
brb3 has joined #ruby
multiscan has joined #ruby
tagrudev has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 255 seconds]
karmatr0n has joined #ruby
kblake has joined #ruby
juanpablo_ has joined #ruby
astrobunny has joined #ruby
apoplexy_da_boss has joined #ruby
polysics has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
polysics has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
havenn has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
multiscan has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 255 seconds]
havenwood has quit [Ping timeout: 264 seconds]
grn has quit []
polysics has quit [Ping timeout: 252 seconds]
justin_pdx has quit [Quit: justin_pdx]
eladmeidar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bim has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vtunka has quit [Quit: Leaving]
Pumukel has joined #ruby
aiguu has joined #ruby
poguez_ has joined #ruby
roshanavand has quit [Remote host closed the connection]
mog_ has joined #ruby
dropp_ has quit [Ping timeout: 256 seconds]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Remote host closed the connection]
lolmaus__ has quit [Ping timeout: 255 seconds]
mistermocha has joined #ruby
lolmaus__ has joined #ruby
apoplexy_da_boss has quit [Ping timeout: 272 seconds]
digitalextremist has joined #ruby
zenith_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Cache_Money has quit [Quit: Cache_Money]
hanmac1 has quit [Quit: Leaving.]
krz has quit [Quit: WeeChat 1.0.1]
freerobby has quit [Quit: Leaving.]
Macaveli has quit [Read error: No route to host]
selva_ has joined #ruby
<selva_> Hello Everyone,
<selva_> Recently I have upgraded Rails 2.3.5 to 2.3.18 and noticed a weird things.
Macaveli has joined #ruby
<selva_> PlaceEntity model have accepts_nested_attributes_for Place model. When running the update_attributes on PlaceEntity to update two fields in Place model, the two fields are updated in current object but the fields were not updated in database
<selva_> can anyone please help me on this
<shevy> the rails experts are on #rubyonrails selva_
Morkel has quit [Quit: Morkel]
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<selva_> shevy: thanks, let me try there
antgel has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<selva_> shevy: it says "#RubyOnRails Cannot send to channel"
sambao21 has joined #ruby
freerobby has joined #ruby
ascarter has joined #ruby
<shevy> yeah they mandate registration
<shevy> selva_ the commands are listed here: https://freenode.net/faq.shtml#userregistration
<shevy> once you are registered you can join
mistermocha has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
lanemeyer has quit []
ascarter has joined #ruby
chrisja has joined #ruby
<selva_> shevy: thank you, It works with registration
Macaveli has quit [Ping timeout: 264 seconds]
fryguy9 has joined #ruby
<Outlastsheep> Hayo everyone :D
<Outlastsheep> I just started learning ruby, and I have to say it's a nice language ^^
ascarter has quit [Max SendQ exceeded]
<havenn> Outlastsheep: hi, welcome
<Outlastsheep> thanks, havenn ^^
GaryOak_ has joined #ruby
polysics has joined #ruby
ascarter has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
SOLDIERz__ has quit [Quit: Be back later ...]
maasha has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
lanemeyer has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
psy_ has joined #ruby
<shevy> Outlastsheep have you used another programming language before?
<Outlastsheep> shevy: Lua, mostly.
<Outlastsheep> I tried a bunch of other languages, but...
ascarter has quit [Client Quit]
danzilio has joined #ruby
<shevy> one distant day mruby may replace lua!
<Outlastsheep> Python didn't click, Perl wasn't what I was looking for, and C++ doesn't do anything that Lua can't.
rodfersou has quit [Remote host closed the connection]
dEPy has joined #ruby
rodfersou has joined #ruby
danzilio has quit [Max SendQ exceeded]
<Outlastsheep> I'm planning to work with Shoes sometime and create an IRC Client.
<shevy> well ruby is a lot like perl in many ways, except that it has a nicer syntax
atomiccc has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
<adaedra> « C++ doesn't do anything that Lua can’t »
<adaedra> That’s not really an argument for or against a langage
<shevy> let's use php!
<Outlastsheep> Yeah, Ruby is the first language I didn't find the syntax terrible or anything.
danzilio has joined #ruby
<vifino> pls no
<adaedra> shevy: I have many arguments against this langage.
<Outlastsheep> adaedra: why would I learn C++ if Lua does everytihg C++ can?
<Outlastsheep> *That I need.
<vifino> Lua is nice.
<shevy> yeah but php is more widespread than ruby :(
danzilio has quit [Max SendQ exceeded]
<adaedra> Why would you not learn it ?
<adaedra> shevy: unfortunately.
<Outlastsheep> I just didn't find it as useful as Lua.
<adaedra> That’s personal choice here.
<Outlastsheep> adaedra: did I ever say it wasn't? ^^
<shevy> templates in C++ are so lovely
danzilio has joined #ruby
<agent_white> Not learning X because you can in Y is a terrible argument.
<agent_white> We might as well just write it all in ASM.
<shevy> AND WE SHOULD
<Outlastsheep> And needing to re-compile code every. single. time... BLARGH.
<adaedra> agent_white pls
<agent_white> AND WE SHOULD!!!!
<vifino> Outlastsheep: If you like Lua, check out my github, I ported llvm-lua to recent llvm and did other useless stuff.
jmignault has quit [Quit: Textual IRC Client: www.textualapp.com]
<Outlastsheep> agent_white: again: personal opinion.
polysics has quit [Remote host closed the connection]
<agent_white> adaedra: There's many arguments against this language, as well as EVERY OTHER.
<workmad3> agent_white: I can't write code that runs on x86 with my knowledge of ARM ASM :(
<agent_white> >.<
<agent_white> workmad3: Well... ruby instead! :D
<adaedra> agent_white: against PHP?
Hirzu_ has quit [Ping timeout: 272 seconds]
jespada has quit [Ping timeout: 246 seconds]
<agent_white> adaedra: Again, the same. There's many for, against, whatever. But PHP is PHP.
<atomiccc> PHP is really the best language ever
<agent_white> "today you are you, this is truer than true. there is noone else alive, that is youer than you."
<gregf_> Ha!
<workmad3> atomiccc: I hope just typing that made you vomit over your keyboard
<atomiccc> lol
<adaedra> :)
<agent_white> That's dr.seuss explaining programming languages. Quit comparing. They each have a different goal.
<atomiccc> we use PHP as the backend here and I don't touch a single line of it
<atomiccc> I hate PHP
Hijiri has quit [Quit: WeeChat 1.0.1]
* agent_white huffs and puffs
ojacobson has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
<Outlastsheep> Ayways
<adaedra> I have to actually work in PHP, it sucks.
<Outlastsheep> I'll be off.
<gregf_> PHP 5 is'nt too bad
<shevy> haha
<shevy> you guys are all PHPers!
phutchins has joined #ruby
<Outlastsheep> Seeya o/
<agent_white> GET OUTTA HEE-YAH
fabrice31 has joined #ruby
<adaedra> bye.
<agent_white> ;)
<atomiccc> PHP is like Ruby, but better
jottr has joined #ruby
<atomiccc> ;-)
<ccooke> Didn't you know? Ruby is secretly written in php
<adaedra> atomiccc: stop that, you’re giving me attacks.
<atomiccc> haha
<atomiccc> honestly, I don't even think I could learn PHP it is so dumb
<atomiccc> all teh little syntax things that don't make sense
<adaedra> It’s rather easy to 'learn' basics
Outlastsheep is now known as zz_Outlastsheep
<adaedra> The problem comes when you try to do something with it
<civim> like build wordpress
fabrice31_ has joined #ruby
<adaedra> But I will not digress, many articles already exists on the Internet about that and it is not the subject here.
<workmad3> ccooke: php is so awesome, we needed a way to run it on ruby! https://github.com/tenderlove/phuby
nhhagen has joined #ruby
dukz has quit [Remote host closed the connection]
SegFaultAX has quit [Excess Flood]
<adaedra> workmad3: OMG
<ccooke> workmad3: ... I feel ill
jespada has joined #ruby
bal has quit [Quit: bal]
varunwachaspati has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<adaedra> Just saying, if your goal is to run PHP code from Ruby, just use pipes and PHP binary
bim has joined #ruby
GnuYawk has quit [Ping timeout: 256 seconds]
SegFaultAX has joined #ruby
<workmad3> adaedra: what if your goal is to see if you can create stuff that's 'good software' in that it's well tested, designed, etc. but completely pointless?
nhhagen has quit [Client Quit]
arup_r has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GnuYawk has joined #ruby
dropp has joined #ruby
<agent_white> workmad3: phuby? /giggles
maletor has joined #ruby
<workmad3> adaedra: annoyingly, the video with the presentation of phuby and phuby on phails seems to be down atm :(
iamjarvo has joined #ruby
<adaedra> workmad3: I would say that you have much time in your hands, but whatever floats your boat…
<workmad3> adaedra: the end result of that is wordpress running on rails, through phuby
sambao21 has joined #ruby
Dr3amc0d3r|away has quit [Ping timeout: 240 seconds]
<workmad3> (and yes, it's pronounced 'pooby on fails')
<workmad3> adaedra: I didn't do that :P
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
linoespinoza has joined #ruby
<agent_white> Hahahah
<adaedra> Should have used quotes
ascarter has joined #ruby
<agent_white> phuby on phails :D
otisZart has joined #ruby
<shevy> that's tenderlove right?
<workmad3> adaedra: but you can tell tenderlove that he's got too much free time ;)
ascarter has quit [Client Quit]
<shevy> I think he has a couple of project like that
iamjarvo has quit [Client Quit]
ascarter has joined #ruby
davedev24_ has joined #ruby
mitchell_ has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
nii236 has joined #ruby
Dr3amc0d3r|away has joined #ruby
jespada has quit [Ping timeout: 256 seconds]
cjim has joined #ruby
justin_pdx has joined #ruby
zenith_ has quit [Quit: Leaving]
zachrab has quit [Remote host closed the connection]
<arup_r> did I write it correctly? https://gist.github.com/aruprakshit/20fb5d3b457b731d4d2c or it is a buggy ?
zachrab has joined #ruby
rbennacer has quit [Remote host closed the connection]
apoplexy has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
deric_skibotn has joined #ruby
<adaedra> arup_r: why did you wow’d so much earlier?
Pupeno_ has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
mjmac has quit [Ping timeout: 265 seconds]
Klumben has quit [Ping timeout: 265 seconds]
zipkid has quit [Ping timeout: 265 seconds]
troter___ has quit [Ping timeout: 265 seconds]
amitchellbullard has quit [Ping timeout: 265 seconds]
psmolen has quit [Ping timeout: 265 seconds]
<flughafen> sup certainty
LBRapid has quit [Ping timeout: 265 seconds]
Nightmare has quit [Ping timeout: 265 seconds]
mattjbarlow has quit [Ping timeout: 265 seconds]
cbetta has quit [Ping timeout: 265 seconds]
CMAXW_ has quit [Ping timeout: 265 seconds]
alol__ has quit [Ping timeout: 265 seconds]
machty has quit [Ping timeout: 265 seconds]
ramblinpeck_ has quit [Ping timeout: 265 seconds]
jaxxstorm has quit [Ping timeout: 265 seconds]
<arup_r> means ?
SegFaultAX has quit [Ping timeout: 265 seconds]
wookiehangover has quit [Ping timeout: 265 seconds]
sudog has quit [Ping timeout: 265 seconds]
epochwolf has quit [Ping timeout: 265 seconds]
KnownSyntax has quit [Ping timeout: 265 seconds]
AdamMeghji_ has quit [Ping timeout: 265 seconds]
PhilK has quit [Ping timeout: 265 seconds]
mjc_ has quit [Ping timeout: 265 seconds]
hellschreiber has quit [Ping timeout: 265 seconds]
einarj has quit [Remote host closed the connection]
nii236 has quit [Ping timeout: 246 seconds]
kalz has quit [Ping timeout: 265 seconds]
johnhamelink has quit [Ping timeout: 265 seconds]
jimeh has quit [Ping timeout: 265 seconds]
callenb___ has quit [Ping timeout: 265 seconds]
OliverTynes has quit [Ping timeout: 265 seconds]
ballPointPenguin has quit [Ping timeout: 265 seconds]
tessi_zz has quit [Ping timeout: 265 seconds]
bcavileer_ has quit [Ping timeout: 265 seconds]
teotwaki has quit [Ping timeout: 265 seconds]
maZtah has quit [Ping timeout: 265 seconds]
sfr^ has quit [Ping timeout: 265 seconds]
aganov has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 265 seconds]
jordanm has quit [Ping timeout: 265 seconds]
Junaos has quit [Ping timeout: 265 seconds]
BLuEGoD has quit [Ping timeout: 265 seconds]
Ikri has quit [Ping timeout: 265 seconds]
RealMarc has quit [Ping timeout: 265 seconds]
adambeynon has quit [Ping timeout: 265 seconds]
whoojemaflip has quit [Ping timeout: 265 seconds]
electrical has quit [Ping timeout: 265 seconds]
thesheff17 has quit [Ping timeout: 265 seconds]
blackjid has quit [Ping timeout: 265 seconds]
fryguy9 has quit [Quit: Leaving.]
BLuEGoD has joined #ruby
jaxxstorm has joined #ruby
epochwolf has joined #ruby
Ikri has joined #ruby
RealMarc has joined #ruby
LBRapid has joined #ruby
wookiehangover has joined #ruby
mattjbarlow has joined #ruby
sfr^ has joined #ruby
tessi_zz has joined #ruby
Nightmare has joined #ruby
sudog has joined #ruby
mjmac has joined #ruby
psmolen has joined #ruby
teotwaki has joined #ruby
Shidash has joined #ruby
Junaos has joined #ruby
RegulationD has quit [Remote host closed the connection]
<arup_r> adaedra: ok.. the method you gave me.. i was not aware of.. and it solved ,my issue
freerobby has quit [Quit: Leaving.]
linoespinoza has quit [Quit: Textual IRC Client: www.textualapp.com]
jimeh has joined #ruby
<adaedra> ah ok
aiguu has quit [Ping timeout: 245 seconds]
bcavileer_ has joined #ruby
alol__ has joined #ruby
elfuego has quit [Ping timeout: 250 seconds]
Soda has joined #ruby
AlexRussia has joined #ruby
freerobby has joined #ruby
amitchellbullard has joined #ruby
blackjid has joined #ruby
SegFaultAX has joined #ruby
juanpaucar has joined #ruby
cbetta has joined #ruby
rbennacer has joined #ruby
callenb___ has joined #ruby
OliverTynes has joined #ruby
mbeasley has quit [Ping timeout: 256 seconds]
whoojemaflip has joined #ruby
adambeynon has joined #ruby
DaniG2k has joined #ruby
PhilK has joined #ruby
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Client Quit]
CMAXW_ has joined #ruby
ballPointPenguin has joined #ruby
a5i has quit []
AdamMeghji_ has joined #ruby
troter___ has joined #ruby
ramblinpeck_ has joined #ruby
fryguy9 has joined #ruby
KnownSyntax has joined #ruby
freerobby has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
maZtah has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
zipkid has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shay- has quit [Remote host closed the connection]
hellschreiber has joined #ruby
thesheff17 has joined #ruby
mjc_ has joined #ruby
Takle has quit [Remote host closed the connection]
electrical has joined #ruby
last_staff has quit [Quit: last_staff]
juanpaucar has quit [Ping timeout: 256 seconds]
<gregf_> arup_r: def is_numeric? foo; foo[/^\d+$/] ? true : false; end; %w{ 1 foo 1.23}.each{ |d| print is_numeric? d }
matchaw has quit [Ping timeout: 264 seconds]
kalz has joined #ruby
Takle has joined #ruby
zapata has joined #ruby
machty has joined #ruby
<arup_r> ok
<havenn> arup_r: Get your dotfiles sorted yet?
<arup_r> gregf: thanks.. could you help me know why mine is bad and buggy ... just for to get myself educated on this
<arup_r> havenn: No.. I'm sitting now-a-days in another location of my office.. tomorrow I'll be there
<apeiros_> gregf_: ^$ --> \A\z
dukz has joined #ruby
<arup_r> apeiros: why ?
<workmad3> arup_r: "1\nfoo"
<apeiros_> >> def is_numeric? foo; foo[/^\d+$/] ? true : false; end; is_numeric? "hello world!\n123"
<eval-in_> apeiros_ => true (https://eval.in/298760)
<arup_r> ok..
<adaedra> last time I searched for that I got another solution
<arup_r> so good you guys.. why mine is bad?
<workmad3> also, if you want to allow for floats, then /\A\d+(\.\d+)?\z/
<apeiros_> misses negative numbers
<kaleido> regex, the bane of my existence
<workmad3> arup_r: [-+]? at the start then ;)
apoplexy has quit [Ping timeout: 240 seconds]
<arup_r> no.. just a number or name ? kind of id :p
<havenn> arup_r: Complex and Rational are Numeric too. Are you wanting to see if it's a valid Float?
mitchell_ has joined #ruby
mleung has joined #ruby
tvon_ has joined #ruby
<arup_r> no
<havenn> arup_r: What do you want to see?
<arup_r> it is to check reference id or name..?
<arup_r> it wouldn't never be a float
<workmad3> havenn: I've always wanted to put in an order with number i**-pi :)
mleung has quit [Client Quit]
<havenn> wait, wouldn't that be a really small order?
parduse has quit [Ping timeout: 245 seconds]
<workmad3> arup_r: out of curiosity, why not just have 'your order reference is #{blah}', making the issue of whether it's numeric or not moot?
<havenn> one one-hundredth of a fries please!
mitchellhenke has quit [Ping timeout: 245 seconds]
tvon_ has quit [Client Quit]
<eam> Float() is a better way to test numeric -- there are a ton of numeric strings that those regexes won't match
<arup_r> +1
Wolland has joined #ruby
<workmad3> havenn: i**i fries please!
fryguy9 has quit [Quit: Leaving.]
JimmyNeutron has quit [Quit: Leaving]
<eam> >> Float("-0e-1")
<eval-in_> eam => -0.0 (https://eval.in/298761)
ixhdsl has quit [Read error: Connection reset by peer]
<flughafen> does anybody here use jruby?
<eam> flughafen: sure
<adaedra> I did for a short while
<flughafen> is there any performance gains?
<flughafen> besides real jvm threading
<eam> there can be; depends on your workload
<adaedra> depends on what
<workmad3> havenn: nice, the complex lib in ruby can handle complex exponentiation :)
parduse has joined #ruby
<workmad3> >> require 'complex'; Complex(0,1)**Complex(0,1)
<eval-in_> workmad3 => (0.20787957635076193+0.0i) (https://eval.in/298762)
<flughafen> adaedra: rails?
<havenn> workmad3: sounds complex!
Takle has quit [Remote host closed the connection]
<workmad3> havenn: do you also love that i**i is a real number? :)
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenn> hooah!
<adaedra> is_numeric?: Float(n) and true rescue false
<adaedra> flughafen: yes
<flughafen> adaedra: would you say a huge performance gain?
apoplexy has joined #ruby
<arup_r> eam: As per doc Float() would raise only TypeError if you pass `nil`.. so should I write it as !!Float(order_ref) rescue TypeError
<adaedra> I don’t know, I was not testing that.
tohsig has joined #ruby
<adaedra> It just made CLI reaaaaaaly slow, though.
<eam> arup_r: that's not right, see:
<eam> >> Float("asdf")
<eval-in_> eam => invalid value for Float(): "asdf" (ArgumentError) ... (https://eval.in/298763)
MatthewsFace has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
<eam> rescue /win 1
sarlalian has quit [Quit: WeeChat 0.4.2]
MatthewsFace has joined #ruby
aboudreault has left #ruby ["Leaving"]
sarlalian has joined #ruby
<adaedra> >> def is_numeric?(n); Float(n) and true rescue false; end; [ "1", "1.2", "-0e-1", "ruby" ].map { |e| is_numeric?(e) }
<eval-in_> adaedra => [true, true, true, false] (https://eval.in/298764)
Spami has joined #ruby
startupality has joined #ruby
<arup_r> ok
fryguy9 has joined #ruby
fryguy9 has quit [Client Quit]
sarlalian has quit [Client Quit]
Beliq has quit [Quit: Textual IRC Client: www.textualapp.com]
mbeasley has joined #ruby
sarlalian has joined #ruby
topolinux has joined #ruby
Takle has joined #ruby
thumpba has joined #ruby
blackmesa has joined #ruby
plashchynski has quit [Quit: plashchynski]
mistermocha has quit [Ping timeout: 255 seconds]
civim has quit [Quit: This computer has gone to sleep]
multiscan has joined #ruby
boshhead has joined #ruby
oo_ has quit [Remote host closed the connection]
ARCADIVS has quit [Quit: ARCADIVS]
thumpba has quit [Ping timeout: 252 seconds]
plashchynski has joined #ruby
mockra has joined #ruby
livathin_ has joined #ruby
thumpba has joined #ruby
rbennacer has quit [Remote host closed the connection]
Klumben has joined #ruby
ascarter has joined #ruby
codecop has joined #ruby
attamusc has joined #ruby
CustosLimen has quit [Ping timeout: 246 seconds]
ascarter has quit [Max SendQ exceeded]
rbennacer has joined #ruby
ascarter has joined #ruby
livathinos has quit [Ping timeout: 245 seconds]
ascarter has quit [Max SendQ exceeded]
livathin_ has quit [Ping timeout: 252 seconds]
aiguu has joined #ruby
ascarter has joined #ruby
piotrj has joined #ruby
GnuYawk has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
thumpba_ has joined #ruby
mitchell_ is now known as mitchellhenke
jtreminio has joined #ruby
<jtreminio> Morning all. Is there a function similar to merge() but that does not create new elements? ie, merge(A, B) - if a.foo does not exist but b.foo does, it does not create a.foo ?
Flcn_ has quit [Quit: Be back later ...]
juanpaucar has joined #ruby
<adaedra> if no better, `merge(A, B.slice(A.keys))` should do the trick
Flcn_ has joined #ruby
thumpba has quit [Ping timeout: 240 seconds]
<adaedra> mh wait, Hash#slice seems to be activesupport
danjordan has quit [Quit: danjordan]
strixd has quit [Quit: 500]
danjordan has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
polysics has joined #ruby
axl_ has joined #ruby
multisca_ has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
x1337807x has joined #ruby
spyderman4g63 has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby
narcan has joined #ruby
varunwachaspati has quit [Quit: Leaving]
narcan has quit [Client Quit]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jespada has joined #ruby
wallerdev has joined #ruby
selva_ has left #ruby [#ruby]
amdbcg has joined #ruby
sambao21 has joined #ruby
multiscan has quit [Ping timeout: 252 seconds]
lolmaus__ has quit [Quit: Konversation terminated!]
Hirzu has joined #ruby
piotrj has quit [Remote host closed the connection]
jespada has quit [Ping timeout: 252 seconds]
maximski has quit []
B1n4r10 has joined #ruby
ptrrr has joined #ruby
Jackneill has joined #ruby
nii236 has joined #ruby
juanpaucar has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
thiagovsk has joined #ruby
juanpaucar has joined #ruby
joonty has quit [Quit: joonty]
elaptics is now known as elaptics_away
danjordan has quit [Quit: danjordan]
dwilbank has quit []
johnhamelink has joined #ruby
n80 has quit [Quit: n80]
pglombardo has joined #ruby
nii236 has quit [Ping timeout: 246 seconds]
n80 has joined #ruby
RegulationD has joined #ruby
juanpaucar has quit [Ping timeout: 250 seconds]
DaniG2k has quit [Quit: leaving]
ghostmoth has joined #ruby
ramfjord has joined #ruby
ascarter has joined #ruby
_djbkd has joined #ruby
ascarter has quit [Client Quit]
RegulationD has quit [Ping timeout: 244 seconds]
pietr0 has joined #ruby
dmolina has quit [Quit: Leaving.]
Macaveli has joined #ruby
OrbitalKitten has joined #ruby
jonr22 has joined #ruby
mistermocha has joined #ruby
icarus has joined #ruby
varunwachaspati has joined #ruby
fantazo has quit [Quit: Verlassend]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
mleung has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
jonr22 has quit [Ping timeout: 256 seconds]
tylersmith has joined #ruby
RegulationD has joined #ruby
Hirzu has quit [Remote host closed the connection]
danzilio has quit [Quit: Baiii!]
scripore has joined #ruby
uptownhr has joined #ruby
startupality has quit [Quit: startupality]
wald0 has joined #ruby
mleung_ has joined #ruby
ingolfured has joined #ruby
mleung has quit [Ping timeout: 246 seconds]
mleung_ is now known as mleung
mloveless has joined #ruby
SegFaultAX has quit [Excess Flood]
bim has quit [Remote host closed the connection]
rippa has joined #ruby
rdark has joined #ruby
jespada has joined #ruby
SegFaultAX has joined #ruby
sivsushruth has quit [Ping timeout: 252 seconds]
graydot has joined #ruby
Flcn_ has quit [Ping timeout: 252 seconds]
rocknrollmarc has joined #ruby
sivsushruth has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
bim has joined #ruby
Flcn_ has joined #ruby
dfinninger has quit [Remote host closed the connection]
jenrzzz has joined #ruby
ki0 has quit [Ping timeout: 252 seconds]
tylersmith has quit [Ping timeout: 264 seconds]
lolmaus has joined #ruby
Flcn_ has quit [Read error: Connection reset by peer]
Flcn_ has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
selu has quit [Quit: Textual IRC Client: www.textualapp.com]
rocknrollmarc has joined #ruby
<maletor> irb(main):335:0> [][0, 34]
<maletor> => []
<maletor> irb(main):336:0> [][12, 34]
<maletor> => nil
<maletor> why?
rocknrollmarc has quit [Max SendQ exceeded]
<jhass> >> [][1]
<eval-in_> jhass => nil (https://eval.in/298784)
<pipework> >>[][0,34]
<eval-in_> pipework => [] (https://eval.in/298785)
<wallerdev> >> [][0]
<eval-in_> wallerdev => nil (https://eval.in/298786)
<pipework> >>[][1][1][1][1]
<maletor> oh cool
<eval-in_> pipework => undefined method `[]' for nil:NilClass (NoMethodError) ... (https://eval.in/298787)
<wallerdev> lol
rocknrollmarc has joined #ruby
<maletor> also
<pipework> >>[][0][0][0]
<eval-in_> pipework => undefined method `[]' for nil:NilClass (NoMethodError) ... (https://eval.in/298788)
<maletor> >> [][0, -1]
<eval-in_> maletor => nil (https://eval.in/298789)
<jhass> maletor: >> [][2]
<pipework> d'aw. Anyways, not sure, I'm going to bed, suckers.
<jhass> er
<wallerdev> its because its a range starting at 0, if you draw it out on paper it makes sense
<jhass> >> [][2]
<eval-in_> jhass => nil (https://eval.in/298790)
<jhass> mmh
<maletor> wallerdev: but [0, -1] also returns 0
<Fluent> >> print 'nice' if !()
<eval-in_> Fluent => nicenil (https://eval.in/298791)
<wallerdev> well
<maletor> wallerdev: also, what is paper?
rdark has quit [Ping timeout: 255 seconds]
<wallerdev> lol
zachrab has quit [Remote host closed the connection]
<wallerdev> the -1 is a little trickier to explain, im not sure where that would point to in an array with no elements
<jhass> >> [[1][0, 1], [1][1, 1], [1][2, 1]]
<eval-in_> jhass => [[1], [], nil] (https://eval.in/298793)
<wallerdev> i mean you're saying take -1 elements
zachrab has joined #ruby
<maletor> wallerdev: satan. it points to satan.
<wallerdev> if you did
mjuszczak has joined #ruby
<wallerdev> >> [][0..-1]
<eval-in_> wallerdev => [] (https://eval.in/298794)
<wallerdev> does that clear that case up? lol
<jhass> wallerdev: eh, range is a different beast, remember it's [start_index, items_to_take] but [start_index..end_index]
<wallerdev> right but if items to take is -1
Zai00 has quit [Quit: Zai00]
<wallerdev> how would you get anything besides nil
<jhass> well, you don't?
pglombar_ has joined #ruby
<wallerdev> right
tobago has quit [Remote host closed the connection]
<wallerdev> maybe i misunderstood the question haha
rocknrollmarc has quit [Max SendQ exceeded]
ingolfured has quit [Quit: Leaving]
<jhass> I guess it's actually an artifact for the poor souls that can't substract -1 from size
rocknrollmarc has joined #ruby
<jhass> mmh, no that doesn't make sense either *shrug*
pglombardo has quit [Ping timeout: 245 seconds]
zachrab has quit [Ping timeout: 245 seconds]
_Andres has joined #ruby
<workmad3> hmm, ary[x, -1] seems to always return nil
<jhass> yeah
rocknrollmarc has quit [Max SendQ exceeded]
<jhass> I expect argument error kind of
<workmad3> same
<workmad3> either that, or it to use +/- as direction of counting
<eam> holdover behavior from perl
<jhass> >> [[1][0, 0], [1][1, 0], [1][2, 0]]
<eval-in_> jhass => [[], [], nil] (https://eval.in/298795)
Fluent has quit [Changing host]
Fluent has joined #ruby
rocknrollmarc has joined #ruby
roshanavand has joined #ruby
vandemar has joined #ruby
jonatin has joined #ruby
AlexRussia has quit [Ping timeout: 255 seconds]
tylersmith has joined #ruby
zachrab has joined #ruby
<eam> ary[x..-1] doesn't enumerate, it just looks at the endpoints - fancy way of passing two args
rocknrollmarc has quit [Max SendQ exceeded]
gr33n7007h has quit [Ping timeout: 264 seconds]
rocknrollmarc has joined #ruby
gr33n7007h has joined #ruby
adaedra has quit [Quit: Textual IRC Client: www.textualapp.com]
fmcgeough has quit [Quit: fmcgeough]
roolo has quit [Remote host closed the connection]
jefus has quit [Quit: WeeChat 1.1.1]
roolo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
juanpaucar has joined #ruby
fryguy9 has joined #ruby
waxjar has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pglombar_ has quit []
sambao21 has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has quit [Client Quit]
x1337807_ has joined #ruby
x1337807x has quit [Ping timeout: 240 seconds]
roolo has quit [Ping timeout: 264 seconds]
amdbcg has quit [Ping timeout: 264 seconds]
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
zachrab has joined #ruby
sambao21 has joined #ruby
deuterium has quit [Quit: zzZZZzzz..]
MatthewsFace has joined #ruby
jefus has joined #ruby
dukz has quit [Remote host closed the connection]
ramfjord has joined #ruby
toretore has joined #ruby
rrrutr has joined #ruby
elfuego has joined #ruby
Flcn_ has quit [Read error: Connection reset by peer]
shredding has joined #ruby
Flcn_ has joined #ruby
ki0 has joined #ruby
havenn has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
mloveless has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 250 seconds]
alex88 has quit []
zachrab has quit [Ping timeout: 265 seconds]
doodlehaus has quit [Ping timeout: 272 seconds]
apxm has joined #ruby
Wolland has joined #ruby
spyderman4g63 has joined #ruby
harfangk has quit [Quit: This computer has gone to sleep]
antgel has quit [Ping timeout: 245 seconds]
lolmaus has quit [Quit: Konversation terminated!]
makerops has joined #ruby
Flcn_ has quit [Quit: Be back later ...]
civim has joined #ruby
AlexRussia has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
Hijiri has joined #ruby
fuzzyhorns has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
graft has joined #ruby
graft has joined #ruby
sambao21 has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
<graft> hey, i want to iterate over two enumerables that both have the same number of elements; but, i don't want to zip them (which converts to an array). what's my best option? list1.each_with_index {|l,i| ... } is as far as I've got
hmsimha has joined #ruby
Flcn_ has joined #ruby
<fuzzyhorns> i'm writing a gem which mainly defines a module which is included by apps that use the gem — when using `yardoc` it ignores that file and only documents the sub dir, why would that be?
<fuzzyhorns> graft: what do you mean iterate over 2 enumerables? only one can receive at a time, but you could pass the other to the first
silkfox has quit [Ping timeout: 245 seconds]
roshanavand has quit [Remote host closed the connection]
<jhass> graft: .lazy.zip I guess
apxm has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> fuzzyhorns: and nothing in the output of yardoc that hints?
towski_ has joined #ruby
<jhass> got a repo to show?
<fuzzyhorns> jhass: company hosted :C
shrike-10131 has joined #ruby
amdbcg has joined #ruby
sambao21 has joined #ruby
<fuzzyhorns> jhass: the dir structure is normal though, and no warnings
<graft> .lazy.zip eh
<fuzzyhorns> jhass: it's the dir structure you see in the rubygems guide
<jhass> fuzzyhorns: mmmh, this will be hard without a reproducer
jenrzzz has joined #ruby
<fuzzyhorns> jhass: perhaps impossible
<fuzzyhorns> i will make a colleague try x)
hmsimha has quit [Ping timeout: 252 seconds]
<jhass> :D
ghostpl_ has quit [Remote host closed the connection]
sivsushruth has quit [Ping timeout: 252 seconds]
Hirzu has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
civim has quit [Quit: Leaving]
<eam> why does irb call close() on an unallocated descriptor every time a command is entered?
ramfjord has joined #ruby
<eam> nevermind
mjuszczak has quit []
ferr has joined #ruby
plashchynski has quit [Quit: plashchynski]
<hoelzro> eam: it looks to me like it's closing a dup of standard output (or something like it)
<hoelzro> why, I don't know
sivsushruth has joined #ruby
<eam> it's a socket()
workmad3 has quit [Ping timeout: 252 seconds]
<eam> it's doing some netlink stuff for some reason
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Remote host closed the connection]
doodlehaus has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
ptrrr is now known as p
spyderman4g63 has joined #ruby
jerius has quit [Quit: /quit]
_honning_ has quit [Ping timeout: 256 seconds]
tcrypt has joined #ruby
p is now known as Guest88150
Guest88150 is now known as puts
puts is now known as ptr_
ptr_ is now known as _ptr
dfinninger has joined #ruby
_ptr is now known as ptr-
fmcgeough has joined #ruby
ferr has quit [Client Quit]
rrrutr has quit [Ping timeout: 256 seconds]
ptr- is now known as ptr^
eshy has quit [Ping timeout: 246 seconds]
gr33n7007h has quit [Quit: WeeChat 0.3.8]
ptr^ is now known as ptr^^
harfangk has joined #ruby
tuelz has quit [Ping timeout: 252 seconds]
eshy has joined #ruby
Soda has quit [Remote host closed the connection]
spyderma_ has joined #ruby
shrike-10131 has quit [Quit: Textual IRC Client: www.textualapp.com]
spyderman4g63 has quit [Read error: Connection reset by peer]
<eam> it's libreadline hooking into NETLINK_AUDIT
shrike-10131 has joined #ruby
DarkRoses has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ki0 has quit [Remote host closed the connection]
ptr^^ is now known as ptr_hax^^
<DarkRoses> stupid IRC CHANNEL!
<DarkRoses> ##minetest
jerius has joined #ruby
<jhass> DarkRoses: how's your ruby going?
DarkRoses has left #ruby [#ruby]
<fuzzyhorns> ?
jenrzzz has quit [Ping timeout: 264 seconds]
DarkRoses has joined #ruby
<DarkRoses> STUFF
<jhass> DarkRoses: wb
Takle has joined #ruby
SegFaultAX has quit [Excess Flood]
<jhass> DarkRoses: how's your ruby going?
<DarkRoses> STUPID IRC CHANNEL!
lolmaus has joined #ruby
<DarkRoses> Bad!!
<jhass> why?
<jhass> can we help?
scripore has quit [Quit: This computer has gone to sleep]
silkfox has joined #ruby
<DarkRoses> All go wrong wonna Dee my dev channel? #smallservers
<DarkRoses> Sure.
kalusn has quit [Remote host closed the connection]
<jhass> so what's your problem?
shrike-10131 has left #ruby [#ruby]
DarkRoses has left #ruby [#ruby]
Vile` has quit [Ping timeout: 264 seconds]
SegFaultAX has joined #ruby
OrbitalKitten has joined #ruby
<jhass> trolls have no endurance these days :/
scripore has joined #ruby
<toretore> when i was your age you couldn't even tell it was a troll
sambao21 has quit [Ping timeout: 246 seconds]
<toretore> everybody was just equally annoying
DarkRoses has joined #ruby
jonatin has quit [Ping timeout: 252 seconds]
<jhass> DarkRoses: you need a proper IRC client, you drop put all the time :/
Vile` has joined #ruby
<DarkRoses> One are y?ou here
multisca_ has quit []
apoplexy has quit [Ping timeout: 256 seconds]
<DarkRoses> Ive made a bot!
<apeiros_> DarkRoses: get your act together or go
mloveless has joined #ruby
<jhass> DarkRoses: what does it do?
<DarkRoses> You plays minetest?
<jhass> no
<DarkRoses> Is lags don't work..
<jhass> I program ruby for fun
<DarkRoses> Jhass are you owner?
<jhass> of?
<DarkRoses> Thieves
juanpaucar has quit [Remote host closed the connection]
Alina-malina has joined #ruby
<DarkRoses> This?*
<jhass> no, I don't believe in slavery
<jhass> no
jottr has joined #ruby
juanpaucar has joined #ruby
* apeiros_ thinks DarkRoses is a bot
* apeiros_ ponders kickban
<DarkRoses> Jhass /join #Develop-Minetest
sambao21 has joined #ruby
<jhass> nah, too many channels already
DarkRoses is now known as EmSeBot
jlebrech has quit [Remote host closed the connection]
<jhass> EmSeBot: what's your bot written in?
<EmSeBot> Github.
<jhass> no, which programming language
<EmSeBot> :P
aryaching has quit [Ping timeout: 252 seconds]
<EmSeBot> Its a minetest one..
<jhass> doesn't answer my question
ItSANgo has quit [Quit: Leaving...]
mbeasley has quit [Ping timeout: 272 seconds]
kadoppe has quit [Ping timeout: 255 seconds]
<EmSeBot> Gtg going to do minetest YouTube by!
EmSeBot has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
brb3 has quit [Quit: ZZZzzz…]
tgunr has joined #ruby
<apeiros_> what an odd person
kadoppe has joined #ruby
<jhass> as said, no endurance these days
CorySimmons has joined #ruby
juanpaucar has quit [Ping timeout: 264 seconds]
<apeiros_> I was close to kicking them.
mloveless has quit [Remote host closed the connection]
<jhass> if there was regular channel traffic I'd asked you to ;)
<apeiros_> if there was regular traffic, you wouldn't have had to :)
jottr has quit [Ping timeout: 264 seconds]
DerisiveLogic has quit [Ping timeout: 256 seconds]
fryguy9 has quit [Quit: Leaving.]
aryaching has joined #ruby
amdbcg has quit [Ping timeout: 244 seconds]
<jhass> now I'm bored again
<jhass> maybe I should join #develop-minetest?
Hobogrammer has quit [Read error: Connection reset by peer]
mbeasley has joined #ruby
<apeiros_> careful, when you test mines, they might explode
Hobogrammer has joined #ruby
mbeasley has quit [Client Quit]
Flcn_ has quit [Quit: Be back later ...]
mbeasley has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
hmsimha has joined #ruby
<jhass> I just set finding one that explodes as goal
mloveless has joined #ruby
CorySimmons has quit [Quit: Bye!]
amdbcg has joined #ruby
tuelz has joined #ruby
mockra has quit []
Hirzu has quit [Remote host closed the connection]
varunwachaspati has quit [Read error: Connection reset by peer]
dropp has quit [Quit: leaving]
shredding has quit [Ping timeout: 255 seconds]
mloveless has quit [Client Quit]
Notte has joined #ruby
brb3 has joined #ruby
relix has joined #ruby
ki0 has joined #ruby
shadoi1 has joined #ruby
leafybasil has quit [Remote host closed the connection]
juanpaucar has joined #ruby
varunwachaspati has joined #ruby
maximski has joined #ruby
Rayford has joined #ruby
maximski has quit [Max SendQ exceeded]
JimmyNeutron has joined #ruby
jottr has joined #ruby
gr33n7007h has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
ghostpl_ has joined #ruby
brb3 has quit [Ping timeout: 264 seconds]
werelivinginthef has quit [Remote host closed the connection]
nii236 has joined #ruby
Sgeo_ has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
brb3 has joined #ruby
MatthewsFace has joined #ruby
ismaelga has quit [Remote host closed the connection]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
baweaver has joined #ruby
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fryguy9 has joined #ruby
maximski has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
fryguy91 has joined #ruby
maximski has quit [Max SendQ exceeded]
Sgeo has quit [Ping timeout: 240 seconds]
rocknrollmarc has quit [Ping timeout: 252 seconds]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
nii236 has quit [Ping timeout: 252 seconds]
ych4k3r has joined #ruby
tier_ has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
Rayford has quit [Quit: Rayford]
sambao21 has quit [Quit: Computer has gone to sleep.]
cpt_yossarian has joined #ruby
patrick99e99 has joined #ruby
sambao21 has joined #ruby
freerobby has quit [Quit: Leaving.]
tier has joined #ruby
tjohnson has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
maximski has joined #ruby
Hirzu has joined #ruby
eshy has quit [Ping timeout: 252 seconds]
zachrab has joined #ruby
atomiccc has joined #ruby
axl_ has quit [Quit: axl_]
jonr22 has joined #ruby
<patrick99e99> Hi ruby friends... I am trying to test that a class' super implementation of a method gets called in a certain case.. And I did this by using a module, and doing subject.class.instance_eval { include SpyModule } ... But the problem is, this change to the ancestorys heirarhcy persists after the test finishes so other tests in my suite randomly fail depending on the ordering...
<patrick99e99> I am trying to figure out a way to remove the class entirely from memory so that the next spec will just reload the real class implementation and things will be back to normal... However, I don't know how to remove_const on a namespaced class?
<patrick99e99> Object.send(:remove_const, 'MyNameSpace::Foo') doesn't work...
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
<jhass> patrick99e99: is there really no way you can assert that this happens through observing behavior instead?
axl_ has joined #ruby
<jhass> after all, ask yourself, does it matter that the method accomplishes what it does by calling super? Or isn't enough that it does what it should do, no matter how?
yfeldblum has joined #ruby
<patrick99e99> jhass: let me think about that...
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kalusn has joined #ruby
eshy has joined #ruby
aswen has joined #ruby
govg has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
Guest60 has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
cjim has quit [Quit: (null)]
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
postmodern has quit [Quit: Leaving]
<patrick99e99> jhass: i can't think of a way to make that work... the only way would be if there was a way to change the super class of the class under test..
<jhass> can you show the method?
startupality has joined #ruby
leafybasil has joined #ruby
ki0 has quit [Remote host closed the connection]
cjim has joined #ruby
tuelz has quit [Ping timeout: 256 seconds]
tgunr has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
kalusn has quit [Read error: Connection reset by peer]
otisZart has joined #ruby
ki0 has joined #ruby
DerisiveLogic has joined #ruby
kalusn has joined #ruby
eshy has quit [Ping timeout: 272 seconds]
scripore has joined #ruby
pglombardo has joined #ruby
tvon has quit [Quit: leaving]
<patrick99e99> jhass: actually I think I got a solution.. thanks
giuseppesolinas has quit [Quit: This computer has gone to sleep]
huddy has quit [Quit: Connection closed for inactivity]
ptr_hax^^ is now known as ptrr
sambao21 has quit [Quit: Computer has gone to sleep.]
chinmay_dd has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
tvon has joined #ruby
roolo has joined #ruby
tuelz has joined #ruby
lanemeyer has quit [Ping timeout: 240 seconds]
adriancb has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 264 seconds]
brb3_ has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
thumpba_ has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
thumpba has joined #ruby
kalusn has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 250 seconds]
juanpaucar has quit [Remote host closed the connection]
_djbkd has joined #ruby
juanpaucar has joined #ruby
brb3 has quit [Ping timeout: 250 seconds]
brb3 has joined #ruby
ki0 has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 250 seconds]
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eshy has joined #ruby
freerobby has joined #ruby
maximski has quit []
_honning_ has joined #ruby
brb3_ has quit [Ping timeout: 264 seconds]
juanpaucar has quit [Ping timeout: 256 seconds]
Hirzu has quit [Remote host closed the connection]
kalusn has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
cjim has quit [Quit: (null)]
karmatr0n has joined #ruby
tier has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cjim has joined #ruby
ismaelga has joined #ruby
WildBamboo-Josh has quit [Quit: Leaving]
spyderman4g63 has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
spyderma_ has quit [Ping timeout: 256 seconds]
r3Dk1nG has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
ki0 has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
spyderma_ has joined #ruby
WildBamboo-Josh has joined #ruby
Sgeo has joined #ruby
wallerdev has joined #ruby
sambao21 has joined #ruby
Sgeo__ has joined #ruby
aarkerio has joined #ruby
<aarkerio> Hi! in : stripped_text = strip_tags(String(text))
Sgeo_ has quit [Ping timeout: 244 seconds]
kaiZen has joined #ruby
<aarkerio> what String() does?
Rephiax has joined #ruby
<aarkerio> could be text.to_s ?
sambao21 has quit [Client Quit]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Sgeo has quit [Ping timeout: 244 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore> aarkerio: pretty much the same, yes
scripore has quit [Quit: This computer has gone to sleep]
<aarkerio> thanks toretore
scripore has joined #ruby
zzing has joined #ruby
<jhass> aarkerio: it's the Kernel#String method
DrShoggoth has joined #ruby
patrick99e99 has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eat_multi has joined #ruby
Rephiax has quit [Ping timeout: 244 seconds]
ych4k3r has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
piotrj has joined #ruby
teddyp1cker has joined #ruby
DavidDudson has joined #ruby
greenbagels has joined #ruby
patrick99e99 has joined #ruby
afex has joined #ruby
sevvie has quit [Ping timeout: 244 seconds]
pietr0 has quit [Quit: pietr0]
timburby has joined #ruby
pietr0 has joined #ruby
hmsimha has joined #ruby
teddyp1cker has quit [Ping timeout: 252 seconds]
<aarkerio> so could be: Object::Module::Kernel::String(text) ?
<triangles> 45.10.to_s ==> "45.1"
<triangles> Is there any way to retain the 0?
frem has joined #ruby
werelivinginthef has joined #ruby
<apeiros_> triangles: given that there's no 0 in 45.10, you can't retain it. but you can print one.
<apeiros_> >> "%5.2f" % 45.1
<eval-in_> apeiros_ => "45.10" (https://eval.in/298828)
_hollywood has quit [Quit: Leaving]
sambao21 has joined #ruby
<waxjar> have a look at String#% and Kernel#sprintf
dEPy has quit [Quit: (null)]
yqt has joined #ruby
govg has quit [Ping timeout: 246 seconds]
OrbitalKitten has joined #ruby
afex has quit []
thumpba has joined #ruby
HakN99 has joined #ruby
aarkerio has quit [Quit: Verlassend]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
<triangles> apeiros,waxjar: I see, thanks for the tip
ghostmoth has quit [Quit: ghostmoth]
werelivinginthef has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
iliketurtles has joined #ruby
kirun has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
Flcn_ has joined #ruby
x1337807x has joined #ruby
DavidDudson has quit [Read error: Connection reset by peer]
DavidDudson has joined #ruby
shlant has joined #ruby
Sgeo has joined #ruby
<shlant> anyone know why I'm getting "You have to install development tools first." with gem install compass on Debian? I tried apt-get install ruby-dev
<shlant> error above
adriancb has joined #ruby
<hoelzro> shlant: apt-get install build-essential, perhaps?
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shlant> ew
IrishGringo has joined #ruby
<ekem> shlant: install the required libs of course
<shlant> ekem: how do I know which ones?
<ekem> the projects page, or look at the log
brb3_ has joined #ruby
<ekem> you should probably put build-essential on...
Flcn_ has quit [Ping timeout: 252 seconds]
galeido has joined #ruby
unreal_ has joined #ruby
n1lo has quit [Remote host closed the connection]
fuzzyhorns1 has joined #ruby
Bankzy has joined #ruby
fuzzyhorns has quit [Read error: Connection reset by peer]
ki0 has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<shlant> ekem: yes… build-essential is kind of overkill for a docker image
Zai00 has joined #ruby
Sgeo__ has quit [Ping timeout: 244 seconds]
<shlant> that was it though, thanks
<ekem> 37 kb?
<shlant> After this operation, 123 MB of additional disk space will be used.
<ekem> lol sorry i was derping out ther
tgunr has joined #ruby
brb3 has quit [Ping timeout: 265 seconds]
unreal has quit [Ping timeout: 272 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
HakN99 has quit [Quit: Peace!]
Flcn_ has joined #ruby
sevvie has joined #ruby
_honning_ has quit [Read error: Connection reset by peer]
Soda has joined #ruby
maximski has joined #ruby
_honning_ has joined #ruby
mog_ has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 265 seconds]
varunwachaspati has quit [Remote host closed the connection]
maletor has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<eam> shlant: vendor bundle and slurp it over into your image
havenwood has joined #ruby
scripore has joined #ruby
scripore has quit [Client Quit]
agent_white has quit [Ping timeout: 246 seconds]
<arup_r> >> "$%d.%2d" % [12344444444444, 100000000001]
<eval-in_> arup_r => "$12344444444444.100000000001" (https://eval.in/298832)
<arup_r> why not only 2 digits after `.` ?
Soda has quit [Max SendQ exceeded]
<shlant> eam: good suggestion
brb3_ has quit [Quit: ZZZzzz…]
Soda has joined #ruby
HOrangeJewce has quit [Ping timeout: 264 seconds]
Soda has quit [Max SendQ exceeded]
Soda has joined #ruby
AlexRussia has joined #ruby
minminsanjose has joined #ruby
<minminsanjose> brew install ruby
<minminsanjose> Warning: ruby-2.2.1 already installed, it's just not linked
<minminsanjose> how to link that thanks
HOrangeJewce has joined #ruby
sgambino has quit [Remote host closed the connection]
<shlant> eam ekem: i got it working with just gcc and make. a little better :)
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timburby has quit [Remote host closed the connection]
baweaver has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
wallerdev has quit [Quit: wallerdev]
silkfox has quit [Ping timeout: 272 seconds]
lemur has joined #ruby
<shlant> the official ruby image actually has both but they deleted at the end of the build
fryguy91 has quit [Quit: Leaving.]
arescorpio has joined #ruby
wallerdev has joined #ruby
Soda has quit [Max SendQ exceeded]
fryguy9 has joined #ruby
Soda has joined #ruby
rrrutr has joined #ruby
brb3 has joined #ruby
<arup_r> any help ?
baweaver has quit [Ping timeout: 265 seconds]
<hoelzro> arup_r: %.2f is probably what you want
uptownhr has quit [Quit: uptownhr]
<hoelzro> >> '%.2f' % 123.456
<eval-in_> hoelzro => "123.46" (https://eval.in/298836)
maximski has quit []
Soda has quit [Max SendQ exceeded]
<arup_r> no I have 2 vars x and y
Hirzu has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
<hoelzro> ah ha
<arup_r> and I want to use it as "x" as the full number and y only 2 digits
Soda has joined #ruby
<shadoi1> shlant: you can use bundle package to get pre-build gems (as long as they match arch and paths). Use those in your Dockerfile instead of bundle commands or gem install commands.
<arup_r> but my code failed in doing so
<eam> is anyone familiar with the incremental gc in 2.2?
<eam> I'm trying to better understand when the gc will interrupt user code and vice versa
<hoelzro> arup_r: the thing is, you're formatting 1000000001 (or whatever) as an integer, and the %d format will never chop parts off of a number; it will only ever add padding
* hoelzro wonders if it's like Lua's GC
<arup_r> makes sense
hmsimha has quit [Ping timeout: 252 seconds]
<shadoi1> shlant: also if you need a lot of system-level dependencies, look into using omnibus to package your app
ghostmoth has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<arup_r> >> "$%d.%02d" % [12344444444444, 1]
<eval-in_> arup_r => "$12344444444444.01" (https://eval.in/298842)
<shlant> shadoi: yea I think what I got will work, thanks. The only reason I need to even deal with ruby is because gulp-compass needs it… I can't escape haha ;)
<arup_r> what if I want to get as "$12344444444444.10"
Hirzu has quit [Ping timeout: 246 seconds]
<arup_r> hoelzro:
<shadoi1> shlant: it makes me happy to see other people care about the size of their containers :)
cjim_ has joined #ruby
rrrutr has quit [Ping timeout: 255 seconds]
akkad has quit [Excess Flood]
lemur has quit [Remote host closed the connection]
<shlant> shadoi: yea it's funny how the docker mindset makes you so much more concerned about dependancies
<shlant> like everytime a dev needs a node module that requires python or something
<shlant> I groan
_djbkd has quit [Remote host closed the connection]
akkad has joined #ruby
ascarter has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
Guest60 has quit [Quit: Textual IRC Client: www.textualapp.com]
_djbkd has joined #ruby
ascarter has quit [Max SendQ exceeded]
nii236 has joined #ruby
otisZart has joined #ruby
_honning_ has quit [Ping timeout: 246 seconds]
cjim has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
napcae is now known as reindeer
max96at is now known as max96at|off
ascarter has quit [Max SendQ exceeded]
otisZart has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
ascarter has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
minminsanjose has quit []
<hoelzro> arup_r: divide the second element by the next highest power of ten, add them together, and use %.2f?
<hoelzro> shlant: I feel your pain there
Sgeo_ has joined #ruby
<hoelzro> esp. since node-gyp requires Python 2, and my Linux distro ships with 3
jtreminio has left #ruby ["Linkinus - http://linkinus.com"]
<hoelzro> and so many things use node-gyp
<shlant> yup. luckily most of the dep heavy things only are used for local development
<shlant> like strongloop
<shlant> needs node-gyp
<arup_r> adding a trailing zero is not possible then... right ?
<shlant> their official image is terrible
<shlant> 1.2
nii236 has quit [Ping timeout: 264 seconds]
<shlant> Gb
<hoelzro> shlant: I was working on a project that needed node-gyp, and was horribly broken by node 0.12
fryguy9 has quit [Quit: Leaving.]
<hoelzro> it turns out one of the dependencies refused to build, but didn't report that information to me
fryguy9 has joined #ruby
AlexRussia has joined #ruby
PaulCapestany has quit [Quit: .]
Sgeo has quit [Ping timeout: 244 seconds]
rodfersou has quit [Quit: leaving]
rkeene has left #ruby [#ruby]
cracknight has joined #ruby
decoponio has quit [Quit: Leaving...]
hmsimha has joined #ruby
cracknight has left #ruby [#ruby]
tvw has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
cracknight has joined #ruby
revoohc has quit [Quit: revoohc]
<cracknight> farttest
tgunr has joined #ruby
<cracknight> 3
<cracknight> 0
cracknight has quit [Client Quit]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
AlphaTech has joined #ruby
spyderman4g63 has joined #ruby
spyderma_ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
PaulCapestany has joined #ruby
PaulCapestany has quit [Client Quit]
jonr22 has quit [Ping timeout: 246 seconds]
tier has quit [Remote host closed the connection]
relix has joined #ruby
fuzzyhorns1 has left #ruby [#ruby]
Volsus has joined #ruby
sambao21 has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
xcombelle has joined #ruby
n80 has quit [Quit: n80]
jerius has quit [Quit: /quit]
brb3 has quit [Quit: ZZZzzz…]
sevvie has quit [Ping timeout: 264 seconds]
piotrj has quit [Remote host closed the connection]
Jackneill has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
Nightmare has quit [Ping timeout: 256 seconds]
aclearma_ has quit [Quit: I'm out!]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
DavidDud_ has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aphprentice has joined #ruby
jenrzzz_ has joined #ruby
amystephe has joined #ruby
alvaro_o has joined #ruby
Nightmare has joined #ruby
scripore has joined #ruby
ldnunes has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 256 seconds]
Asher has joined #ruby
piotrj has joined #ruby
mog_ has joined #ruby
DavidDudson has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
Azure has quit [Quit: Blue Sky Fish]
PaulCapestany has joined #ruby
chrishough has joined #ruby
amystephen has quit [Ping timeout: 252 seconds]
PaulCapestany has quit [Max SendQ exceeded]
PaulCapestany has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 252 seconds]
rbennacer has quit [Ping timeout: 256 seconds]
lektrik has quit [Quit: Leaving]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
PaulCapestany has quit [Max SendQ exceeded]
_honning_ has joined #ruby
PaulCapestany has joined #ruby
ki0 has joined #ruby
maximski has joined #ruby
PaulCapestany has quit [Client Quit]
juanpaucar has joined #ruby
hatzopoulos has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
spyderma_ has joined #ruby
tgunr has joined #ruby
mwlang has joined #ruby
jerematic has quit [Remote host closed the connection]
<mwlang> is it possible to use define_method to define a method that takes parameters?
sevvie has joined #ruby
prasselpikachu has quit [Remote host closed the connection]
<wallerdev> yes
spyderman4g63 has joined #ruby
ki0 has quit [Ping timeout: 264 seconds]
maximski has quit [Ping timeout: 246 seconds]
spyderma_ has quit [Read error: Connection reset by peer]
juanpaucar has quit [Ping timeout: 252 seconds]
tgunr has quit [Client Quit]
<tuelz> I have a @@var that is only being referenced inside te same class via self.method; @@var; end --- would there be any difference in the way ruby handles that code at all if I were to change it to an @var instead?
dfinninger has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 264 seconds]
<wallerdev> how is it set?
<tuelz> @@var = :symbol at top of class
<wallerdev> well youd have to change that
<tuelz> answers my question
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wallerdev> yeah
<wallerdev> you really shouldnt have a reason to use @@
<tuelz> was kinda a ruby implementation question I think (I don't really know I'm slowly going from a rails dev to a ruby dev)
Sgeo has joined #ruby
spyderman4g63 has quit []
* mwlang gives up on define_method and uses eval
<shadoi1> Only reason to ever use @@ I've had is to cache a cross-class-inheritance value that is computation intensive, or a network connection that is shared.
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elaptics_away is now known as elaptics
<wallerdev> >> define_method(:cool) { |x| puts x }; cool(10)
<eval-in_> wallerdev => 10 ... (https://eval.in/298856)
ascarter has joined #ruby
<bradland> mwlang: oh man, don't do that
Sgeo_ has quit [Ping timeout: 244 seconds]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang> bradland: hmm…it works. :-o https://gist.github.com/mwlang/30bbbe9f5530afa2c696
<mwlang> bradland: what’s the better way to do it?
<wallerdev> oh god
<wallerdev> lol
<mwlang> wallerdev: I smell a better solution coming from your corner… :-)
<wallerdev> i have real work to do today :(
it0a has quit [Quit: WeeChat 1.1.1]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
ascarter has quit [Ping timeout: 245 seconds]
DEA7TH has joined #ruby
Azure has joined #ruby
dfinninger has joined #ruby
<mwlang> wallerdev: fair enough. I’ll try this again with your example above.
<bradland> mwlang: well, first thing is works/doesn't work isn't the bar you should set for yourself.
<bradland> lots of code that "works" contains vulnerabilities that can allow people to break your software in very, very bad ways :)
<bradland> sorry for the lecture
mikecmpbll has joined #ruby
xcombelle has quit [Quit: Quitte]
amdbcg has quit [Quit: amdbcg]
hmsimha has quit [Ping timeout: 252 seconds]
pglombardo has quit [Ping timeout: 272 seconds]
piotrj has quit [Ping timeout: 244 seconds]
<bradland> mwlang: as a hint, define_method can take a block, and blocks can take arguments
PaulCapestany has joined #ruby
unreal has joined #ruby
<mwlang> bradland: I know where you’re coming from. I wouldn’t be asking if I wasn’t reeling from the stench of code smell. ;-)
aswen has quit [Ping timeout: 245 seconds]
piotrj has joined #ruby
unreal_ has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
ojacobson has quit [Quit: Leaving...]
scripore has quit [Quit: This computer has gone to sleep]
flingo has joined #ruby
<flingo> Do you want a new and better facebook? Join www.flingonet.no now! OOOR maybe you want your own social website? then you gonna join http://moxi9.com/go/3586 NOW This is no joke at all!
flingo has quit [Killed (idoru (Spam is off topic on freenode.))]
oo_ has joined #ruby
sambao21 has joined #ruby
lanemeyer has joined #ruby
<bradland> sounds totally legit
livingstn has quit []
adamjleonard has joined #ruby
ki0 has joined #ruby
sevvie has quit [Ping timeout: 264 seconds]
tubulife- has joined #ruby
oo_ has quit [Ping timeout: 256 seconds]
<wallerdev> lol
_djbkd has quit [Remote host closed the connection]
<wallerdev> you know its good social network when they advertise on programming irc channels
jenrzzz_ has quit [Ping timeout: 252 seconds]
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<havenwood> we are oh so social
<bradland> it's 1999 baby!
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
jespada has quit [Ping timeout: 256 seconds]
hiyosi has joined #ruby
maximski has joined #ruby
makerops has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
maximski has quit [Max SendQ exceeded]
reinaldob has quit [Remote host closed the connection]
tubuliferous has quit [Quit: Textual IRC Client: www.textualapp.com]
tubulife- is now known as tubuliferous
wald0 has quit [Ping timeout: 252 seconds]
<GaryOak_> anyone know some good tunes i could get on napster?
tubuliferous_ has joined #ruby
maximski has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hatzopoulos has quit [Read error: Connection reset by peer]
<bradland> ZOMG mind meld. i was literally just about to ask if anyone had heard of napster. it's all the rage.
jenrzzz has joined #ruby
hatzopoulos has joined #ruby
eshy has quit [Max SendQ exceeded]
tubuliferous has quit [Quit: ZNC - http://znc.in]
eshy has joined #ruby
shlant has left #ruby [#ruby]
eshy has quit [Max SendQ exceeded]
elfuego has left #ruby [#ruby]
paradoja has quit [Read error: Connection reset by peer]
eshy has joined #ruby
eshy has quit [Max SendQ exceeded]
Flcn__ has joined #ruby
eshy has joined #ruby
<GaryOak_> I think '99 was when we got a DSL modem, 700kb/s dude!
kaiZen has joined #ruby
cjim_ has quit [Quit: (null)]
_djbkd has joined #ruby
juanpaucar has joined #ruby
jenrzzz_ has joined #ruby
dcarmich has joined #ruby
piotrj has quit [Remote host closed the connection]
tuelz has quit [Ping timeout: 245 seconds]
DavidDud_ has quit [Quit: Goodbye all, and thankyou.]
tubuliferous_ has quit [Quit: Textual IRC Client: www.textualapp.com]
nicolastarzia has joined #ruby
Flcn_ has quit [Ping timeout: 272 seconds]
_djbkd has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
juanpauc_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
juanpaucar has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
nfk has quit [Quit: yawn]
B1n4r10 has quit [Quit: Textual IRC Client: www.textualapp.com]
piotrj has joined #ruby
Alina-malina has quit [Ping timeout: 255 seconds]
rocknrollmarc has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
<patrick99e99> when I have an object, and I call to_s on it, it looks like #<Foo:12345> .. If I want to override that behavior so that I can get some insight into the properties of the instance, but want it to look similar-- how can I do that other than making my to_s return something like this string: "#<#{class.name}:#{object_id} attr_a:#{attr_a}, attr_b#{attr_b}>"
<patrick99e99> Is there a way to tell my to_s representation to also include attrs?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has quit [Ping timeout: 246 seconds]
psychopath_mind has quit [Ping timeout: 272 seconds]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
Alina-malina has joined #ruby
<apeiros_> patrick99e99: that's what inspect exists for
<mwlang> GaryOak_: and ten years before that, 9,600 bits/sec modems were all the rage.
<apeiros_> patrick99e99: and you can define to_s for your class in whatever way you want (same for inspect)
piotrj has quit [Remote host closed the connection]
HOrangeJewce has quit [Quit: Leaving.]
sevvie has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
shortdudey123 has quit [Max SendQ exceeded]
DavidDudson has joined #ruby
scripore has joined #ruby
shortdudey123 has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
<patrick99e99> apeiros_: yeah but.. what if I want to limit the properties displayed?
<apeiros_> patrick99e99: as said, define inspect in whatever way you want.
<patrick99e99> apeiros_: but if I want it to look the same, I have to do "#<#{class.anem>:#{object.id}... ?
fryguy9 has quit [Quit: Leaving.]
<patrick99e99> there's no way to get that for free?
iliketurtles has quit [Quit: zzzzz…..]
eshy has quit [Ping timeout: 252 seconds]
<apeiros_> what about "define it in whatever way you want" don't you understand?
Soda has quit [Remote host closed the connection]
<patrick99e99> maybe you're not understanding me..
<patrick99e99> I want it to look like it does by default... #<Foo:192312> .. but I don't want to have to have a method that has "#<#{class.name}:#{object.id}...
<patrick99e99> and I am wondering, is there some magical thing to tell inspect to only evaluate certain properties
<apeiros_> that thing does not exist, no
riotjones has joined #ruby
<patrick99e99> ok, thank you
rocknrollmarc has joined #ruby
blackmesa has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
enebo has quit [Quit: enebo]
drizi has joined #ruby
riotjon__ has quit [Ping timeout: 265 seconds]
martin_work has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
maximski has quit []
phutchins has quit [Ping timeout: 240 seconds]
rocknrollmarc has joined #ruby
jenrzzz has joined #ruby
crdpink has quit [Quit: q term]
havenwood has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Client Quit]
drizi has quit [Client Quit]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
crdpink has joined #ruby
OrbitalKitten has joined #ruby
tubuliferous has joined #ruby
tubuliferous has quit [Client Quit]
spider-mario has quit [Read error: Connection reset by peer]
maximski has joined #ruby
tubuliferous has joined #ruby
<gr33n7007h> anyone know how much disk space rvm uses for one ruby binary?
scripore has quit [Quit: This computer has gone to sleep]
rocknrollmarc has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
<atomiccc> 1 million gigabytes!
Megtastique has quit []
jerematic has joined #ruby
tuelz has joined #ruby
maximski_ has joined #ruby
maximski_ has quit [Max SendQ exceeded]
jenrzzz has joined #ruby
maximski_ has joined #ruby
maximski_ has quit [Max SendQ exceeded]
fenzil has joined #ruby
maximski_ has joined #ruby
maximski has quit [Ping timeout: 256 seconds]
triplecorn has joined #ruby
<triplecorn> hi
iliketurtles has joined #ruby
<triplecorn> #bundler channel is dead so I ask here instead.
<triplecorn> I want to update the versions in the Gemfile.
<triplecorn> I tried bundle update, but this hadn't changed anything in Gemfile.
phutchins has joined #ruby
tubuliferous_ has joined #ruby
topolinux has quit [Quit: Sto andando via]
tubuliferous_ has quit [Client Quit]
jerematic has quit [Ping timeout: 245 seconds]
tubuliferous has quit [Remote host closed the connection]
tubuliferous has joined #ruby
harfangk has quit [Quit: This computer has gone to sleep]
tubuliferous has quit [Client Quit]
pdoherty has joined #ruby
tubuliferous has joined #ruby
<wallerdev> triplecorn: you are supposed to edit your gemfile by hand
<triplecorn> oudated is helpful, thanks
<wallerdev> if you need a specific version you specify it in the gemfile
pdoherty has quit [Client Quit]
<wallerdev> if not you dont specify the version and bundler will download the latest
scripore has joined #ruby
Rephiax has joined #ruby
jlast has quit [Remote host closed the connection]
Notte has quit [Remote host closed the connection]
<triplecorn> ok
triplecorn has left #ruby [#ruby]
thiagovsk has quit [Quit: Connection closed for inactivity]
ki0 has quit [Remote host closed the connection]
govg has joined #ruby
nii236 has joined #ruby
narcan has joined #ruby
tubuliferous_ has joined #ruby
ki0 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
mitchellhenke has joined #ruby
nii236 has quit [Ping timeout: 245 seconds]
scripore has joined #ruby
jottr has joined #ruby
Rephiax__ has joined #ruby
dfinninger has quit [Remote host closed the connection]
BTRE has joined #ruby
Rephiax has quit [Ping timeout: 272 seconds]
jonr22 has joined #ruby
Flcn__ has quit [Quit: Lingo: www.lingoirc.com]
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axl_ has left #ruby [#ruby]
RegulationD has quit [Remote host closed the connection]
tubuliferous_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dh64 has quit [Quit: Konversation terminated!]
jespada has joined #ruby
roolo has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 244 seconds]
roolo has joined #ruby
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
rrrutr has joined #ruby
echevemaster has joined #ruby
<gr33n7007h> Is there an easy way to take a fraction as string and evaluate it's sum?
<gr33n7007h> all i got is
<gr33n7007h> "9/4".scan(/\d+/).map(&:to_f).inject :/
<apeiros_> what's the sum of a fraction? o0
jespada has quit [Ping timeout: 256 seconds]
<Senjai> apeiros_: I beleieve that brings out to 94
<Senjai> err, [9,4]
reinaldob has joined #ruby
roolo has quit [Ping timeout: 246 seconds]
<Senjai> not sure
<Senjai> >> "9/4".scan /\d+/
<eval-in_> Senjai => ["9", "4"] (https://eval.in/298868)
<apeiros_> gr33n7007h: please elaborate on what you want as result.
<Senjai> >> "9/4".scan(/\d+/).inject(0) { |sum, item| sum += item.to_i |
<eval-in_> Senjai => /tmp/execpad-df2239e24f4e/source-df2239e24f4e:3: syntax error, unexpected keyword_rescue ... (https://eval.in/298869)
<Senjai> >> "9/4".scan(/\d+/).inject(0) { |sum, item| sum += item.to_i }
<eval-in_> Senjai => 13 (https://eval.in/298870)
<gr33n7007h> apeiros_: oh sorry 2.25
<Senjai> gr33n7007h: ^
<apeiros_> oh dear
freerobby has joined #ruby
<Senjai> hahahaa
<apeiros_> that's not the *sum*
<whateverman> so you want to get the quotient
<Senjai> apeiros_: xD
<gr33n7007h> yep
<whateverman> or whatever
<apeiros_> Senjai: seems you're not the only one who's light on his maths ;-)
<scripore> is there a way to make a new binding object in order to save the current variable values?
<whateverman> decimal representation?
hmsimha has joined #ruby
<gr33n7007h> did i put sum i am stupid
<Senjai> apeiros_: Shush, I wouldn't do this xD
<apeiros_> whateverman: quotient is quite correct
<Senjai> apeiros_: This is a code issue xD
fgo has joined #ruby
tbon has joined #ruby
<apeiros_> gr33n7007h: are divisor and dividend always integers?
crueber has quit [Quit: Leaving.]
<gr33n7007h> apeiros_: yes
jespada has joined #ruby
<apeiros_> >> Rational(*"9/4".split("/").map { |v| Integer(v) })
<eval-in_> apeiros_ => (9/4) (https://eval.in/298871)
<whateverman> looks like a "I don't know what I want to actually do" issue
<apeiros_> >> Rational(*"9/4".split("/").map { |v| Integer(v) }).to_f # if you want a float
<eval-in_> apeiros_ => 2.25 (https://eval.in/298872)
IrishGringo has joined #ruby
_honning_ has quit [Ping timeout: 245 seconds]
<tbon> hi, i want to run ruby cgi which requires gem on apache2.4, but it fails and error.log says that "`require': cannot load such file -- ". how can i fix it?
<gr33n7007h> apeiros_: ok thanks
<tbon> hello world ruby cgi works.
chrisja has quit [Quit: leaving]
maximski_ has quit []
reinaldob has quit [Ping timeout: 264 seconds]
polysics has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
polysics has joined #ruby
Rephiax__ has quit []
chipotle has joined #ruby
DavidDud_ has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
iliketurtles has quit [Quit: zzzzz…..]
Alina-malina has quit [Read error: Connection reset by peer]
<baweaver> people still use CGI?
<baweaver> huh
Alina-malina has joined #ruby
iliketurtles has joined #ruby
<ramfjord> Hey guys, I'm having a weird issue with blocks that I'm not certain is solvable
<tbon> i must maintain legacy code..
<ramfjord> I've managed to condense it into a 1 liner:
<ramfjord> << tmp = Proc.new { |e| [1,2,3].each { |i| yield i } } && tmp.call(1) { |i| puts i }
<ramfjord> >> tmp = Proc.new { |e| [1,2,3].each { |i| yield i } } && tmp.call(1) { |i| puts i }
<eval-in_> ramfjord => undefined method `call' for nil:NilClass (NoMethodError) ... (https://eval.in/298874)
Volsus has quit [Ping timeout: 256 seconds]
DavidDudson has quit [Ping timeout: 252 seconds]
polysics has quit [Ping timeout: 245 seconds]
kirun has quit [Quit: Client exiting]
scripore has quit [Quit: This computer has gone to sleep]
<wallerdev> cant assign and reference in the same line
<wallerdev> right hand is evaluated first
<wallerdev> then assigned to the left
<jhass> ramfjord: ^ don't use &&/and/||/or for control flow
<ramfjord> eh, I might not be able to get it in the eval here then
<wallerdev> just put a semicolon?
<ramfjord> it throws the right error locally: LocalJumpError: no block given (yield)
<ramfjord> >> tmp = Proc.new { |e| [1,2,3].each { |i| yield i } } ; tmp.call(1) { |i| puts i }
<eval-in_> ramfjord => no block given (yield) (LocalJumpError) ... (https://eval.in/298875)
<jhass> ah yes
<jhass> that's because it's a proc I think
<ramfjord> basically the block I pass to proc.call isn't getting through to the [1,2,3].each
<jhass> >> tmp = ->(e) { [1,2,3].each { |i| yield i } } ; tmp.call(1) { |i| puts i }
<eval-in_> jhass => no block given (yield) (LocalJumpError) ... (https://eval.in/298876)
last_staff has quit [Remote host closed the connection]
<jhass> well, looks like you just can't pass a block to a proc and that's what there is to it
<wallerdev> lol
<ramfjord> hehehe, ok
thumpba_ has joined #ruby
<wallerdev> how about
<wallerdev> >> tmp = Proc.new { |e, &block| [1,2,3].each { |i| block.call(i) } }; tmp.call(1) { |i| puts i }
<eval-in_> wallerdev => 1 ... (https://eval.in/298877)
revoohc has joined #ruby
ki0 has quit [Remote host closed the connection]
jespada has quit [Ping timeout: 250 seconds]
SegFaultAX has quit [Excess Flood]
thumpba has quit [Ping timeout: 252 seconds]
<ramfjord> what makes this even more complicated in the actual instance, is that the "puts" is actually a "yield" in my case...
<ramfjord> so maybe I could propogate the block all the way through
relix has joined #ruby
<wallerdev> haha maybe you need to rethink your design :p
<wallerdev> or use actual methods
<ramfjord> but I think the easiest way would just be to keep tmp as something with a .each method
SegFaultAX has joined #ruby
<ramfjord> the idea was to iterate over calling an iterator on each element of a collection
dfinninger has joined #ruby
freerobby has quit [Quit: Leaving.]
chipotle has quit [Read error: Connection reset by peer]
mog_ has quit [Ping timeout: 256 seconds]
eshy has joined #ruby
n008f4g_ has joined #ruby
chipotle has joined #ruby
piotrj has joined #ruby
scripore has joined #ruby
eshy has quit [Max SendQ exceeded]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
eshy has joined #ruby
eshy has quit [Max SendQ exceeded]
rrrutr has quit [Ping timeout: 245 seconds]
eshy has joined #ruby
<bricker> ramfjord: you can also just pass the block as-is, eg: Proc.new { |e, &block| [1,2,3].each(&block) }
narcan has joined #ruby
eshy has quit [Max SendQ exceeded]
psychopath_mind has joined #ruby
eshy has joined #ruby
TheNet has joined #ruby
centrx has joined #ruby
eshy has quit [Max SendQ exceeded]
eshy has joined #ruby
piotrj has quit [Ping timeout: 246 seconds]
codecop has quit [Remote host closed the connection]
scripore has quit [Client Quit]
eshy has quit [Max SendQ exceeded]
eshy has joined #ruby
monsieurp has quit [Read error: Connection reset by peer]
monsieurp has joined #ruby
monsieurp has quit [Changing host]
monsieurp has joined #ruby
jottr has quit [Remote host closed the connection]
scripore has joined #ruby
Sawbones has joined #ruby
<ramfjord> yup, passing the block explicitly seems to totally work
baweaver has quit [Read error: Connection reset by peer]
silkfox has joined #ruby
baweaver has joined #ruby
<TheNet> can I make namespaced exceptions?
nicolastarzia has quit []
startupality has joined #ruby
<TheNet> e.g. raise MyApp::CustomError
ptrr has quit [Quit: ptrr]
jespada has joined #ruby
drkyro has joined #ruby
nicolastarzia has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
<TheNet> nvm realized I can just wrap it in a module
psychopath_mind is now known as edmilsonefs
scripore has quit [Quit: This computer has gone to sleep]
baweaver has quit [Ping timeout: 265 seconds]
dfinninger has quit [Remote host closed the connection]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
bim has quit [Remote host closed the connection]
davedev2_ has quit [Ping timeout: 246 seconds]
Olipro_ has quit [Ping timeout: 256 seconds]
rrrutr has joined #ruby
pork_clips has joined #ruby
wicope has quit [Remote host closed the connection]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edmilsonefs is now known as psychopath_mind
Zai00 has quit [Quit: Zai00]
jottr has joined #ruby
MatthewsFace has quit []
Sawbones has quit [Remote host closed the connection]
scripore has joined #ruby
jottr has quit [Client Quit]
iliketurtles has quit [Quit: zzzzz…..]
mitchellhenke has joined #ruby
scripore has quit [Client Quit]
bigmac has joined #ruby
davedev24_ has joined #ruby
juanpablo_ has quit [Quit: (null)]
MatthewsFace has joined #ruby
juanpauc_ has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
larissa has quit [K-Lined]
sparr has quit [K-Lined]
jalcine has quit [K-Lined]
MatthewsFace has quit [Remote host closed the connection]
thumpba_ has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
MatthewsFace has joined #ruby
jalcine has joined #ruby
larissa has joined #ruby
jenrzzz has joined #ruby
iliketurtles has joined #ruby
jalcine is now known as Guest9281
sparr has joined #ruby
tier has joined #ruby
jottr has joined #ruby
Crazy_Atheist has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
juanpablo_ has quit [Ping timeout: 240 seconds]
zachrab has quit [Remote host closed the connection]
zachrab has joined #ruby
<jhass> TheNet: yes
<jhass> they're just constants
<jhass> classes and modules are just constants
prasselpikachu has joined #ruby
<jhass> exceptions are just classes inheriting directly or indirectly from the Exception base class
prasselpikachu has quit [Read error: Connection reset by peer]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
RegulationD has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
nii236 has joined #ruby
bim has joined #ruby
bim has quit [Read error: Connection reset by peer]
bim_ has joined #ruby
prasselpikachu has joined #ruby
prasselpikachu has quit [Remote host closed the connection]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
RegulationD has quit [Ping timeout: 256 seconds]
nii236 has quit [Ping timeout: 240 seconds]
maximski has joined #ruby
wallerdev has quit [Quit: wallerdev]
jenrzzz has quit [Ping timeout: 246 seconds]
maximski has quit [Max SendQ exceeded]
prasselpikachu has joined #ruby
oo_ has joined #ruby
wallerdev has joined #ruby
mikecmpbll has quit [Quit: ciao.]
pietr0 has quit [Quit: pietr0]