jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
whiteline has joined #ruby
houhoulis has quit [Remote host closed the connection]
jgt3 has joined #ruby
ap4y has quit [Quit: WeeChat 1.3]
jdelaney has joined #ruby
jgt2 has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ropeney has joined #ruby
devbug has joined #ruby
<shevy> hmm if you build commandline apps in ruby
claw has quit [Ping timeout: 240 seconds]
<shevy> how many help-options would you want to display at maximum?
<shevy> for instance, "gem help" has split things up a lot
<shevy> "gem help commands" shows more information
<shevy> 31
Suntzu has quit [Ping timeout: 256 seconds]
<shevy> hmm first time I am noticing "gem stale"
tulak has quit [Read error: Connection reset by peer]
tulak has joined #ruby
arescorpio has joined #ruby
Qantourisc has quit [Ping timeout: 256 seconds]
<EllisTAA> when i define a new tree and call look_for_word it says ’10:in `block (2 levels) in create_first_children': wrong number of arguments (1 for 0) (ArgumentError)’ but i can’t figure out what’s wrong … https://gist.github.com/ellismarte/02687f16f0565da6ad02#file-trie-rb-L62-L64
mary5030_ has quit [Remote host closed the connection]
claw has joined #ruby
dlitvak has joined #ruby
ur5us has quit [Remote host closed the connection]
Yzguy has joined #ruby
Yzguy has quit [Client Quit]
<shevy> you must have omitted information
<shevy> ah
<shevy> line 10
ascarter has joined #ruby
<shevy> self.class.send(:define_method, character) { return Node.new(:value => character) }
<shevy> so this method accepts zero arguments
jpfuentes2 has joined #ruby
lictor36 has quit [Read error: Connection reset by peer]
zeroDivisible has quit [Quit: WeeChat 1.3]
seitensei has quit [Remote host closed the connection]
<shevy> you can use .instance_eval or .class_eval rather than .send there
zeroDivisible has joined #ruby
rehat has quit [Ping timeout: 256 seconds]
rikai has joined #ruby
<EllisTAA> shevy: thanks … that’s weird bc i thought that method was working …
TomPeed has joined #ruby
mclong has quit [Ping timeout: 240 seconds]
davedev2_ has quit [Ping timeout: 250 seconds]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
arescorpio has quit [Ping timeout: 272 seconds]
shanemcd has joined #ruby
<shevy> hmm
DavidDudson has joined #ruby
<EllisTAA> shevy: on line ten i’m trying to define a new method called whatever character corresponds to e.g. g or h
<EllisTAA> shevy: i dont want to pass any arguments to the method though
kmckelvin has joined #ruby
<EllisTAA> this returns an instance of Node https://gist.github.com/ellismarte/02687f16f0565da6ad02#file-trie-rb-L64 so i think that line is working …
<shevy> wrong number of arguments (1 for 0)
<shevy> you say you don't want to pass any arguments to the method
<shevy> but your code says otherwise
<shevy> does that code error?
<shevy> I get this output
<shevy> "the word hello does not exist in our dictionary"
<shevy> #<Node:0x8ae542c @value="h", @word=nil>
ablemike has joined #ruby
davedev24 has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
ablemike has left #ruby [#ruby]
<EllisTAA> yeah that’s what i get, so doesn’t that mean the line is working
<shevy> in the code you showed above yes
<shevy> so how can you get the error with the same code ;)
tenderlove has quit [Remote host closed the connection]
shanemcd has quit [Ping timeout: 256 seconds]
<EllisTAA> calling that line from somewhere where i pass an argument… i’m wondering if line 19 is causing problems
<EllisTAA> i mean 34
kmckelvin has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
ElFerna has joined #ruby
ornerymoose has joined #ruby
<shevy> so will you upload the full code that has the error too
xdc has quit [Ping timeout: 272 seconds]
claw has quit [Ping timeout: 240 seconds]
f00bar-32 has joined #ruby
rodfersou has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 240 seconds]
mclong has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
<EllisTAA> shevy: that is the whole thing. https://gist.github.com/ellismarte/02687f16f0565da6ad02 im thinking maybe the error is caused by calling self.send(character) on line 34
pwnd_nsfw has joined #ruby
<EllisTAA> yeah i’m pretty sure the problem is with self.send(character)
claw has joined #ruby
f00bar-32 has quit [Ping timeout: 240 seconds]
<shevy> why do you even use .send there
last_staff has quit [Quit: last_staff]
<shevy> what argument do you send to define_method
<shevy> ah
<shevy> you use .send
<EllisTAA> one line 10 or 34?
<shevy> I forgot
<shevy> your code confuses me :)
<EllisTAA> i know its ugly : \
<EllisTAA> i need to write better code
<baweaver> learn and use hash
<shevy> ellistaa get rid of "p" and try again
<baweaver> define_method and send do not exist
<baweaver> metaprogramming is a bad idea until you have basics down better.
<baweaver> it adds to confusion
<shevy> ellistaa this code works: http://pastie.org/pastes/10633012/text you invoke the wrong .p() method; there also exists Kernel#p
<EllisTAA> shevy: invoke it where?
devbug has quit [Ping timeout: 240 seconds]
<shevy> when you call create_first_children
<EllisTAA> oh shit
<shevy> just copy the code in the link I gave above into your editor, run it
<shevy> then you see that the only letter missing is p
<shevy> so it's the method p() that confuses there
akem has joined #ruby
<baweaver> use a hash
akem2 has quit [Read error: Connection reset by peer]
bithon has quit [Quit: WeeChat 0.4.2]
<EllisTAA> shevy: so u turned the character into a symbol?
shock_one has quit [Remote host closed the connection]
<shevy> no ellistaa
shock_one has joined #ruby
<baweaver> >> h = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }; h[1][2][3][4] = 5; h
<ruboto> baweaver # => {1=>{2=>{3=>{4=>5}}}} (https://eval.in/485151)
<shevy> I just played around with it, ignore the .to_sym
<shevy> ellistaa did you not read what I wrote the last 20 times :P
<EllisTAA> shevy: i did
<shevy> did you run that code!
DLSteve has joined #ruby
AnoHito has joined #ruby
<EllisTAA> yeah it worked
<EllisTAA> wait but it looks like its creating symbols instead of nodes?
<EllisTAA> nvm
<shevy> you need to learn how to walk before you learn how to run
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrmatt has quit []
shock_one has quit [Ping timeout: 250 seconds]
<baweaver> ellistaa: metaprogramming does not exist for you, don't use it. It's insidiously complicated to debug at times and not something someone learning should be using. You'll notice it's exceptionally rare in most pro production code as well.
Feyn has joined #ruby
vdamewood has quit [Quit: Life beckons.]
pawnbox has joined #ruby
snockerton has quit [Quit: Leaving.]
<EllisTAA> baweaver: doesn’t seem that hard
neanderslob has quit [Ping timeout: 250 seconds]
<baweaver> apparently
armel1 has joined #ruby
neanderslob has joined #ruby
ElFerna has quit [Quit: WeeChat 1.3]
ur5us has joined #ruby
ElFerna has joined #ruby
finisherr has quit [Quit: finisherr]
<baweaver> you're making things unnecessarily complicated for the sake of using it instead of learning the basics. That's what insidiously complicated means
<baweaver> it appears deceptively easy
ElFerna has quit [Max SendQ exceeded]
dlitvak_ has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
<baweaver> which it is, assuming you have a grasp of the basics
<baweaver> and its tested thoroughly.
<baweaver> it's*
synthroid has joined #ruby
<EllisTAA> so why won’t the code work
tvw has quit []
<baweaver> you said it doesn't seem hard
<EllisTAA> it doesn’t, that doesn’t mean there’s something i dont understand
<baweaver> ...
ElFerna has joined #ruby
<EllisTAA> i might not know how to make bread but i wouldn’t say its hard
pawnbox has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 240 seconds]
<baweaver> Use a hash
<baweaver> look into path explosion and implosion
<baweaver> it's dramatically simpler, cleaner, and easier to understand
kerframil has joined #ruby
stannard has quit [Remote host closed the connection]
<EllisTAA> err thanks ill check it out
<baweaver> the only difference is this has no delimiter whereas typical explosion/implosion problems use '.'
jhooker has joined #ruby
jbrhbr has quit [Quit: Leaving.]
claw has quit [Ping timeout: 250 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
devoldmx has joined #ruby
claw has joined #ruby
rakm has quit [Quit: Textual IRC Client: www.textualapp.com]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
calderonroberto has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jbrhbr has joined #ruby
colleenmcguckin has quit [Remote host closed the connection]
Mojo_Nixon has joined #ruby
armel1 has quit []
seitensei has joined #ruby
s00pcan has quit [Remote host closed the connection]
mchu has joined #ruby
mchu has quit [Client Quit]
s00pcan has joined #ruby
rdavila has joined #ruby
DrCode has quit [Ping timeout: 272 seconds]
rakm has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm_ has joined #ruby
rkazak__ has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
graffix222 has joined #ruby
rakm has quit [Ping timeout: 250 seconds]
sucks has quit [Read error: Connection reset by peer]
Yzguy has joined #ruby
akem2 has joined #ruby
akem has quit [Read error: No route to host]
sucks has joined #ruby
tulak has quit [Remote host closed the connection]
mclong has quit [Ping timeout: 250 seconds]
aspire has quit [Quit: Leaving]
colegatron has quit [Ping timeout: 250 seconds]
kmckelvin has joined #ruby
houhoulis has joined #ruby
Mirry has joined #ruby
Yzguy has quit [Quit: Zzz...]
hxegon has quit [Remote host closed the connection]
rkazak__ is now known as rkazak
jessemcgilallen has quit [Quit: jessemcgilallen]
kmckelvin has quit [Ping timeout: 272 seconds]
duckpuppy has joined #ruby
hxegon has joined #ruby
domoremath has joined #ruby
claw has quit [Ping timeout: 272 seconds]
claw has joined #ruby
jhooker has quit [Ping timeout: 272 seconds]
duckpuppy has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #ruby
Encapsulation has quit [Ping timeout: 250 seconds]
mclong has joined #ruby
<EllisTAA> does anyone know why line 27 is giving me ‘undefined method `create_new_child' for :e:Symbol (NoMethodError)’ https://gist.github.com/ellismarte/02687f16f0565da6ad02
<baweaver> hash
<havenwood> ellistaa: Because the last element of `path` is the Symbol `:e`, which doesn't respond to #create_new_child.
<baweaver> use a hash
minimalism has quit [Quit: leaving]
symm- has quit [Quit: Leaving...]
<EllisTAA> havenwood: thanks i really appreciate that .. thought that couldn’t be it
<baweaver> it is
<baweaver> it says it is
colegatron has joined #ruby
DrCode has joined #ruby
<EllisTAA> baweaver: thanks
jessemcgilallen has joined #ruby
gusTester has joined #ruby
marr has quit []
mclong has quit [Ping timeout: 240 seconds]
snguyen has joined #ruby
snguyen has quit [Client Quit]
jessemcgilallen has quit [Client Quit]
DroidBur_ has quit []
jessemcgilallen has joined #ruby
howdoicomputer has joined #ruby
snguyen has joined #ruby
Yzguy has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
pawnbox has joined #ruby
bronson has quit [Remote host closed the connection]
EllisTAA has quit [Quit: ellistaa]
goodcodeguy has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EllisTAA has joined #ruby
bronson has joined #ruby
jhooker has joined #ruby
<baweaver> anyways, off for the night I go.
baweaver has quit [Remote host closed the connection]
<EllisTAA> aw didn’t get to say thanks
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
Yzguy has quit [Client Quit]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Arnvald has joined #ruby
synthroid has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 250 seconds]
mclong has joined #ruby
colleenmcguckin has joined #ruby
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
dimasg has joined #ruby
gregf has joined #ruby
Guest44309 is now known as saneax_AFK
petanikode has quit [Quit: petanikode]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
dlitvak_ has quit [Ping timeout: 272 seconds]
icarus_ has joined #ruby
dlitvak has joined #ruby
mclong has quit [Quit: Leaving]
tokik has quit [Quit: leaving]
domoremath has quit [Ping timeout: 252 seconds]
mclong has joined #ruby
nerium has joined #ruby
<nerium> Any recommendations on alteritves to RestClient and the http gem?
tokik has joined #ruby
<havenwood> nerium: I'd generally recommend http.rb: https://github.com/httprb/http#readme
<nerium> havenwood: It tries to parse the response as json, which I can’t figure out how to turn off
<havenwood> nerium: What type of response do you want to accept?
TomPeed has joined #ruby
hagabaka has joined #ruby
<nerium> havenwood: Anything, but it should not be processed
gusTester has quit [Quit: Leaving.]
Sigma00 has quit [Ping timeout: 276 seconds]
hxegon has quit [Ping timeout: 240 seconds]
nomadic_ has quit [Ping timeout: 276 seconds]
Sigma00 has joined #ruby
<havenwood> nerium: Err, are you sure you're talking the same gem I linked?
icarus_ has quit [Quit: Lost terminal]
nomadic has joined #ruby
<havenwood> nerium: Oh, you mean RestClient? Nvm.
jhooker has quit [Ping timeout: 256 seconds]
lguardiola has quit [Ping timeout: 276 seconds]
livcd has quit [Ping timeout: 276 seconds]
minimalism has joined #ruby
lguardiola has joined #ruby
akem2 has quit [Remote host closed the connection]
akem has joined #ruby
devoldmx has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
livcd has joined #ruby
goodcodeguy has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<havenwood> nerium: There are many other good options if you have anything specific you're looking for.
<nerium> havenwood: I think anything would work
bithon has joined #ruby
Arnvald has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
<havenwood> nerium: Give HTTP.rb a shot. :)
<nerium> havenwood: I’ll give it a try, thanks
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
f00bar-32 has joined #ruby
dlitvak has quit [Remote host closed the connection]
framling has joined #ruby
devoldmx_ has joined #ruby
dlitvak has joined #ruby
Zamerick_ has quit [Ping timeout: 256 seconds]
Arnvald has joined #ruby
B1n4r10 has quit [Ping timeout: 256 seconds]
kmckelvin has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<havenwood> nerium: (HTTParty is the only one I know with automatic parsing.)
f00bar-32 has quit [Ping timeout: 272 seconds]
EllisTAA has quit [Quit: ellistaa]
bithon has quit [Changing host]
bithon has joined #ruby
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
B1n4r10 has joined #ruby
bithon has left #ruby ["Frodo wait for me!"]
bithon has joined #ruby
kmckelvin has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
xdc has joined #ruby
f00bar-32 has joined #ruby
Arnvald has joined #ruby
hully has joined #ruby
bithon has left #ruby ["Frodo wait for me!"]
BlackCoyote has joined #ruby
bithon has joined #ruby
bithon has left #ruby ["Frodo wait for me!"]
s2013 has joined #ruby
ElFerna has joined #ruby
blackgoat has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
rakm_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hully has quit [Client Quit]
duckpuppy has quit [Ping timeout: 240 seconds]
f00bar-32 has quit [Ping timeout: 240 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rideh has quit [Changing host]
rideh has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
devoldmx has joined #ruby
devoldmx_ has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Arnvald has quit []
goodcodeguy has joined #ruby
skcin7 has joined #ruby
nocd has joined #ruby
Qantourisc has joined #ruby
goodcodeguy has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
goodcodeguy has joined #ruby
devoldmx has joined #ruby
celly has joined #ruby
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snguyen has joined #ruby
auzty has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
goodcodeguy has quit [Client Quit]
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
snguyen has quit [Client Quit]
goodcodeguy has joined #ruby
snguyen has joined #ruby
<celly> /msg NickServ SETPASS celly obkcuoywndig 4596valleyparkway
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<celly> /msg NickServ SETPASS celly obkcuoywndig 4596valleyparkway
<julian-delphiki> celly, ...
<julian-delphiki> i'd recommend you not using that password now
<celly> am i failing over here?
<celly> it's not letting me use it anyway
<celly> ugh
<julian-delphiki> you had a space in front of your query.
<celly> this shit is so frustrating
dorei has quit []
<celly> smmfh
<julian-delphiki> IRC is not frusturating... it's old and easy to use :)
devoldmx_ has joined #ruby
colleenmcguckin has quit []
<celly> thanks
<celly> i'm sure i'll forget this password (again) and need to reset it (again)
<celly> i don't sign on here enough, so i ALWAYS forget my password. tried to make it generic last time, but clearly, i couldn't remember it then
devoldmx has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
spt0 has quit [Ping timeout: 272 seconds]
<julian-delphiki> celly, you could always just set up your client to send it for you when you connect
<celly> by any chance, have you used or are using hstore with simple_form?
rideh has quit [Remote host closed the connection]
<celly> @julian-delphiki, i'll poke around and give that a shot. i'm using LimeChat
kerframil has quit []
workmad3 has quit [Ping timeout: 272 seconds]
htmldrum has quit [Ping timeout: 256 seconds]
skcin7 has quit [Ping timeout: 240 seconds]
ornerymoose has joined #ruby
htmldrum has joined #ruby
Lildirt has quit [Ping timeout: 272 seconds]
ElFerna has quit [Quit: Textual IRC Client: www.textualapp.com]
dimasg has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Quit: Leaving.]
arescorpio has joined #ruby
FooMunki has quit [Quit: FooMunki]
azgil has quit [Ping timeout: 240 seconds]
skcin7 has joined #ruby
Lildirt has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
stevenxl has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
phillips1012 is now known as solenoids
pika_pika has quit [Ping timeout: 250 seconds]
shock_one has joined #ruby
devbug has joined #ruby
DiCablo has joined #ruby
blackjid has quit [Max SendQ exceeded]
rideh has joined #ruby
blackjid has joined #ruby
Bloomer has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
nateberkopec has joined #ruby
rideh has quit [Changing host]
rideh has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
freerobby has joined #ruby
Lildirt has quit [Ping timeout: 272 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kmckelvin has joined #ruby
Lildirt has joined #ruby
solenoids has quit [Ping timeout: 272 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goodcodeguy has joined #ruby
kmckelvin has quit [Ping timeout: 256 seconds]
goodcodeguy has quit [Client Quit]
duckpuppy has joined #ruby
solenoids has joined #ruby
B1n4r10 has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
jbrhbr has joined #ruby
madcodes has quit [Ping timeout: 250 seconds]
Lildirt has quit [Ping timeout: 250 seconds]
akem has quit [Quit: Bye]
duckpuppy has quit [Ping timeout: 256 seconds]
devbug has quit [Ping timeout: 250 seconds]
saddad has joined #ruby
wnd has quit [Ping timeout: 246 seconds]
wnd has joined #ruby
PaulCapestany has joined #ruby
PaulCapestany has quit [Client Quit]
Lildirt has joined #ruby
bronson has joined #ruby
houhouli_ has joined #ruby
pdoherty has quit [Remote host closed the connection]
nocd has left #ruby [#ruby]
htmldrum has quit [Ping timeout: 250 seconds]
houhoulis has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
<kfpratt> celly: unsolicited help: press command+u and you'll find the server settings for whatever server the channel that you're currently in. Once there you'll see the general tab where you can enter your nick and password. It will identify you on connection from then on.
bronson has quit [Ping timeout: 256 seconds]
ornerymoose has joined #ruby
<celly> @kfpratt: thanks man, you rock
<kfpratt> np
s00pcan has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
krz has joined #ruby
Mirry has quit [Ping timeout: 272 seconds]
saddad has quit [Ping timeout: 240 seconds]
B1n4r10 has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
wolffles has joined #ruby
arescorpio has quit [Excess Flood]
epochwolf has quit [Quit: Uh no...]
gamache has quit [Remote host closed the connection]
shanemcd has joined #ruby
drys has quit [Quit: Konversation terminated!]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
tvon has joined #ruby
htmldrum has joined #ruby
shanemcd has quit [Ping timeout: 240 seconds]
braincra- has quit [Quit: bye bye]
dimasg has joined #ruby
rdavila has quit [Ping timeout: 240 seconds]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
devbug has joined #ruby
mclong has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
zast has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
braincrash has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
EllisTAA has joined #ruby
synthroid has joined #ruby
synthroid has quit [Remote host closed the connection]
shock_one has joined #ruby
gix has quit [Ping timeout: 272 seconds]
EllisTAA has quit [Client Quit]
DavidDudson has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
juddey has quit [Ping timeout: 240 seconds]
shock_one has quit [Ping timeout: 240 seconds]
framling has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
gix has joined #ruby
jpank has quit [Ping timeout: 250 seconds]
framling has joined #ruby
RickHull has joined #ruby
pawnbox has joined #ruby
sirecote_ has joined #ruby
sirecote has quit [*.net *.split]
kmckelvin has joined #ruby
dlitvak has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
Mojo_Nixon has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
epochwolf has joined #ruby
ornerymoose has joined #ruby
ornerymoose has quit [Client Quit]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
kmckelvin has quit [Ping timeout: 272 seconds]
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
iateadonut has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
bronson has quit [Remote host closed the connection]
celly has quit [Remote host closed the connection]
agent_zzz has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
pulgolino has quit [Read error: Connection reset by peer]
pulgolino has joined #ruby
ledestin has joined #ruby
chipotle has quit [Quit: cheerio]
devbug has joined #ruby
iateadonut has quit [Quit: Leaving.]
YankNYC has quit [Quit: Connection closed for inactivity]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Lildirt has quit [Ping timeout: 256 seconds]
shadoi has quit [Quit: Leaving.]
jbrhbr has quit [Quit: Leaving.]
krz has quit [Remote host closed the connection]
Lildirt has joined #ruby
dopie has quit [Quit: Leaving]
dopie has joined #ruby
Lildirt has quit [Ping timeout: 240 seconds]
berserk_ren has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
Lildirt has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
TheBloke- has joined #ruby
woodruffw is now known as yossarian
yossarian is now known as woodruffw
Suntzu has joined #ruby
s00pcan has joined #ruby
s00pcan has quit [Remote host closed the connection]
tvon has quit []
TheBloke has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
s00pcan has joined #ruby
dopie has quit [Quit: Leaving]
bungoman has joined #ruby
I has joined #ruby
I has quit [Remote host closed the connection]
kiez0rd has joined #ruby
dopie has joined #ruby
pawnbox has joined #ruby
colegatron has quit [Ping timeout: 240 seconds]
tenzan has joined #ruby
ascarter has joined #ruby
tenzan has quit [Client Quit]
pawnbox has quit [Ping timeout: 272 seconds]
pdoherty has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
kiez0rd has quit [Remote host closed the connection]
Yzguy has joined #ruby
psy_ has quit [Ping timeout: 240 seconds]
framling has quit [Ping timeout: 250 seconds]
shock_one has joined #ruby
colegatron has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
techsethi has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
dmcp has joined #ruby
dmcp has quit [Quit: Disconnecting...]
kmckelvin has joined #ruby
pawnbox has joined #ruby
nateberkopec has joined #ruby
yardenbar has quit [Ping timeout: 250 seconds]
tenderlove has joined #ruby
newdan has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
jdelaney has quit [Quit: Textual IRC Client: www.textualapp.com]
<newdan> Is there a method to match a regex only at a certain index? E.g. ideally /foo/.strict_match('ofoo', 0) => nil; /foo/.strict_match('ofoo', 1) => MatchData
blackgoat has joined #ruby
kmckelvin has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Ping timeout: 256 seconds]
krz has joined #ruby
krz has quit [Client Quit]
celly has joined #ruby
astrobun_ has joined #ruby
krz has joined #ruby
houhouli_ has quit [Remote host closed the connection]
celly has quit [Ping timeout: 256 seconds]
lkba has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest99717
arooni has quit [Ping timeout: 240 seconds]
bbert has joined #ruby
bbert has quit [Changing host]
bbert has joined #ruby
seitensei has quit [Remote host closed the connection]
lannonbr has joined #ruby
<RickHull> newdan: probably better to restrict your input string ('ofoo') according to the index
<RickHull> that is, only send 'foo'
<RickHull> but i'm assuming this isn't helpful, and that your example was crafted around this
<lannonbr> Question, is there a simple algorithm that splits a single number into n numbers that add up to the initial number?
dionysus69 has joined #ruby
<RickHull> lannonbr: there are an infinite number of ways to do that
<RickHull> e.g. 0 + 0 + 0 + number
radgeRayden_ has quit [Ping timeout: 256 seconds]
<RickHull> 1 + 1 + 1 + number - 3
Yzguy has quit [Quit: Cya]
mary5030 has quit [Remote host closed the connection]
<lannonbr> Oh I forgot, is there a way to randomly do that?
<RickHull> in stdlib, probably not
<lannonbr> Wait, I think I might have an idea
<RickHull> you can write a fn to do it
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
berserk_ren has quit [Ping timeout: 256 seconds]
<lannonbr> yea I'm going to do that now
<RickHull> with random numbers
mary5030 has joined #ruby
uglybandersnatch has joined #ruby
uglybandersnatch has left #ruby [#ruby]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
SylarRuby has joined #ruby
threh has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
revengeofbigd has joined #ruby
<lannonbr> I basically got it, I just have to fix a few kinks
<hagabaka> lannonbr: are you doing adventofcode by any chance?
<lannonbr> Indeed
AlexRussia has quit [Ping timeout: 272 seconds]
<hagabaka> this one is such a leap in difficulty
<lannonbr> Is there a better way to do day 15 other than brute force the proportions?
<havenwood> which day is it?
<havenwood> ah
stannard has joined #ruby
<hagabaka> I think it's "linear programming", but I don't really get it
<lannonbr> Well I got the back end of calculating the total, just finding the proportions it what I am stuck at right now
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 272 seconds]
pleiosaur has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
<hagabaka> I think there are 10s of millions of combinations to brute force, and just thinking of a algorithm to generate them hurts my head too
<lannonbr> 100 million different combinations
<lannonbr> Good thing computers are fast
bronson has joined #ruby
scpike_ has quit [Remote host closed the connection]
xet7 has quit [Quit: Leaving]
csaunders has quit [Quit: later tater]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
<lannonbr> 9 and 13 were also brute force, but this is much more difficult
charliesome has joined #ruby
stannard has quit [Ping timeout: 256 seconds]
B1n4r10 has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
ur5us has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
<hagabaka> I think you could brute force like 0.upto(100) {|a| 0.upto(100 -a) {|b| ... d = 100 - a - b - c; score(a, b, c, d)
<lannonbr> Well I just wrote a 4-deep (0..100).each do |i|... thing
ur5us has quit [Ping timeout: 256 seconds]
Contigi has quit [Read error: Connection reset by peer]
leat1 has quit [Quit: leat1]
freerobby has quit [Quit: Leaving.]
leat has joined #ruby
psy_ has quit [Quit: Leaving]
darkf has joined #ruby
<lannonbr> At first I had no idea how to do this, but I just finished part 2. It's challenging to understand
msankhala has joined #ruby
<hagabaka> yeah I guess it's still very brute-forceable
A5101 has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shock_one has joined #ruby
Arnvald has joined #ruby
pawnbox has quit [Remote host closed the connection]
EvilDMP has joined #ruby
SOLDIERz has joined #ruby
pawnbox has joined #ruby
techsethi has quit [Quit: techsethi]
bungoman has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 256 seconds]
arooni has joined #ruby
techsethi has joined #ruby
niatehiggers has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saddad has joined #ruby
charliesome has joined #ruby
kmckelvin has joined #ruby
nateberkopec has joined #ruby
aufi has joined #ruby
aganov has joined #ruby
techsethi has quit [Ping timeout: 272 seconds]
tenzan has joined #ruby
phantummm has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
zast has quit [Ping timeout: 240 seconds]
kmckelvin has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<ja> is there a cleaner way to get `[:foo, :bar].map { |a| [a, nil] }.to_h`?
<ja> s/a/k
csaunders has joined #ruby
<havenwood> >> [:foo, :bar].each_with_object(nil).to_h
<ruboto> havenwood # => {:foo=>nil, :bar=>nil} (https://eval.in/485231)
astrobun_ has quit [Remote host closed the connection]
trautwein has joined #ruby
<ja> nice! I don't think I've ever seen #each_with_object before
<ja> thanks a lot, havenwood
<ja> that's pretty amazing
<havenwood> ja: np
trautwein has quit [Client Quit]
duckpuppy has quit [Ping timeout: 256 seconds]
tagrudev has joined #ruby
<niatehiggers> HI NIGGERS
CloCkWeRX has quit [Quit: Leaving.]
<niatehiggers> GOODBYE NIGGER =D
amclain has quit [Quit: Leaving]
phantummm has quit [Quit: WeeChat 1.3]
edwinvdgraaf has quit [Remote host closed the connection]
techsethi has joined #ruby
<hagabaka> >> [:foo, :bar].zip([]).to_h
<ruboto> hagabaka # => {:foo=>nil, :bar=>nil} (https://eval.in/485232)
dlitvak has joined #ruby
<ja> O_O oh! of course, `#zip`!
<ja> I kinda thinks `each_with_object(nil)` reads better though
<ja> but I dunno
<ja> `@remote_attributes = @resource.attribute_names.keys.each_with_object(nil).to_h` could use some shortening however >.>
<hagabaka> >> [:foo, :bar].product([nil]).to_h
<ruboto> hagabaka # => {:foo=>nil, :bar=>nil} (https://eval.in/485233)
polysic__ has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
trautwein has joined #ruby
polysics has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
astrobun_ has joined #ruby
<havenwood> !mute niatehiggers
codecop has joined #ruby
ascarter has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
zast has joined #ruby
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
newdan has left #ruby [#ruby]
niatehiggers has quit [Quit: Page closed]
<flughafen> morning
<blub> hi flughafen
<havenwood> flughafen: g'morn
celly has joined #ruby
<ja> interesting, hagabaka
<ja> and thanks
<ja> now I have too many solutions to choose from ^_^
deeprave_ has joined #ruby
phantummm has joined #ruby
celly has quit [Read error: No route to host]
<hagabaka> hope one day there will be something like Hash#map_values
celly has joined #ruby
<ja> yeah, as do I
<havenwood> hagabaka: In the meanwhile: class Hash; def map_value; each_with_object({}) { |(k, v), h| h[k] = yield(v) } end end
<ja> that was actually the first method name that popped into my mind
celly has quit [Read error: No route to host]
<ja> :D
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
celly has joined #ruby
<flughafen> hey blub havenwood !
deeprave_ is now known as deeprave
bbert has quit [Ping timeout: 250 seconds]
celly has quit [Read error: No route to host]
howdoicomputer has joined #ruby
dlitvak has joined #ruby
celly has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimik has quit [Ping timeout: 272 seconds]
dimik has joined #ruby
<ja> how niftily tight, havenwood
<hagabaka> oh, each_with_object is kind of like inject in how you use it
boxofrox has quit [Ping timeout: 272 seconds]
celly has quit [Read error: No route to host]
celly has joined #ruby
Walex has quit [Quit: leaving]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* ja needs to think with higher-order functions more
celly has quit [Read error: No route to host]
celly has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 250 seconds]
wolffles has quit [Quit: wolffles]
<ja> is there a #ruby-code-review or something I can go to?
howdoicomputer has quit [Ping timeout: 250 seconds]
celly has quit [Read error: No route to host]
<havenwood> ja: This is a good place when folk are around.
celly has joined #ruby
celly has quit [Read error: No route to host]
s00pcan has quit [Ping timeout: 240 seconds]
celly has joined #ruby
RickHull has left #ruby [#ruby]
djbkd has quit [Quit: My people need me...]
celly has quit [Read error: No route to host]
celly has joined #ruby
sucks has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 250 seconds]
celly has quit [Read error: Connection reset by peer]
celly has joined #ruby
celly has quit [Read error: No route to host]
juddey has joined #ruby
celly has joined #ruby
Pupp3tm4st3r has joined #ruby
celly has quit [Read error: No route to host]
polysic__ has quit []
yardenbar has joined #ruby
celly has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
gambl0re has quit [Ping timeout: 250 seconds]
InvGhost has joined #ruby
arooni has quit [Ping timeout: 240 seconds]
<ja> havenwood: Nice. I’ll definitely try that at a later time where I’m more awake.
celly has quit [Read error: No route to host]
celly has joined #ruby
shock_one has joined #ruby
* ja needs Hash#map_value again already ^_^
celly has quit [Read error: No route to host]
djbkd has joined #ruby
celly has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
celly has quit [Read error: No route to host]
celly has joined #ruby
celly has quit [Read error: No route to host]
troys has joined #ruby
celly has joined #ruby
kmckelvin has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
nateberkopec has joined #ruby
celly has quit [Read error: No route to host]
steffkes has quit [Ping timeout: 256 seconds]
scepticulous has joined #ruby
celly has joined #ruby
lemur has quit [Remote host closed the connection]
celly has quit [Read error: No route to host]
kmckelvin has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
celly has joined #ruby
duckpuppy has joined #ruby
firstdayonthejob has joined #ruby
shock_one has joined #ruby
celly has quit [Read error: No route to host]
nateberkopec has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
celly has joined #ruby
troys has quit [Quit: Bye]
boxofrox has joined #ruby
celly has quit [Read error: No route to host]
moeabdol1 has quit [Ping timeout: 272 seconds]
solars has joined #ruby
celly has joined #ruby
krzkrz has joined #ruby
krz has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 256 seconds]
celly has quit [Read error: No route to host]
tenderlove has quit [Remote host closed the connection]
celly has joined #ruby
kmckelvin has joined #ruby
ibouvousaime has joined #ruby
juddey has quit [Ping timeout: 272 seconds]
celly has quit [Read error: No route to host]
celly has joined #ruby
boxofrox has quit [Ping timeout: 250 seconds]
kies has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
iateadonut has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
gaiada has joined #ruby
gaiada is now known as kaka
celly has quit [Read error: No route to host]
celly has joined #ruby
B1n4r10 has joined #ruby
astrobun_ has quit [Remote host closed the connection]
kmckelvin has quit [Ping timeout: 250 seconds]
astrobun_ has joined #ruby
celly has quit [Read error: No route to host]
phantummm has quit [Ping timeout: 240 seconds]
seitensei has quit [Ping timeout: 240 seconds]
celly has joined #ruby
M-Kodo has quit [Remote host closed the connection]
M-prosodyContext has quit [Write error: Connection reset by peer]
M-mistake has quit [Write error: Connection reset by peer]
M-shine has quit [Write error: Connection reset by peer]
frem has quit [Quit: Connection closed for inactivity]
celly has quit [Read error: No route to host]
celly has joined #ruby
djbkd has quit [Remote host closed the connection]
celly has quit [Read error: No route to host]
B1n4r10 has quit [Ping timeout: 240 seconds]
celly has joined #ruby
astrobun_ has quit [Ping timeout: 256 seconds]
celly has quit [Read error: No route to host]
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
celly has joined #ruby
A5101 has quit [Ping timeout: 256 seconds]
celly has quit [Read error: No route to host]
celly has joined #ruby
revengeofbigd has quit [Quit: Connection closed for inactivity]
DarkBushido has quit [Quit: ZNC - http://znc.in]
celly has quit [Read error: No route to host]
celly has joined #ruby
retornam has quit [Quit: retornam is gone]
edwinvdgraaf has joined #ruby
skade has joined #ruby
dlitvak has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
rattatmatt has joined #ruby
anisha has joined #ruby
jas02 has joined #ruby
celly has quit [Read error: No route to host]
shock_one has quit [Remote host closed the connection]
celly has joined #ruby
M-prosodyContext has joined #ruby
M-mistake has joined #ruby
shock_one has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
techsethi has quit [Quit: techsethi]
solars has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
celly has quit [Read error: No route to host]
howdoicomputer has joined #ruby
Puffball has quit [Remote host closed the connection]
celly has joined #ruby
kp666 has quit [Ping timeout: 250 seconds]
shock_one has quit [Ping timeout: 240 seconds]
celly has quit [Read error: No route to host]
Puffball has joined #ruby
celly has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
howdoicomputer has quit [Ping timeout: 272 seconds]
TomyWork has joined #ruby
celly has quit [Read error: No route to host]
zeroDivisible has quit [Quit: WeeChat 1.3]
celly has joined #ruby
M-Kodo has joined #ruby
null__ has left #ruby ["Textual IRC Client: www.textualapp.com"]
celly has quit [Read error: Connection reset by peer]
ibouvousaime has joined #ruby
celly has joined #ruby
boxofrox has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
M-shine has joined #ruby
celly has quit [Read error: No route to host]
devoldmx has joined #ruby
celly has joined #ruby
pbw has joined #ruby
ur5us has quit [Remote host closed the connection]
calderonroberto has joined #ruby
celly has quit [Read error: No route to host]
Puffball has quit [Remote host closed the connection]
celly has joined #ruby
boxofrox has quit [Ping timeout: 256 seconds]
Puffball has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
DeXterbed has joined #ruby
celly has quit [Ping timeout: 240 seconds]
saddad has quit [Ping timeout: 240 seconds]
Phage has joined #ruby
SylarRuby has quit []
InvGhost has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Munim has joined #ruby
nerium has quit [Quit: nerium]
<Munim> Anyone here? I need some advise regarding setting up thin on my servers to handle live seamless reloads.
zast has quit [Remote host closed the connection]
<mozzarella> just ask
dimik has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
nateberkopec has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
monthy has joined #ruby
pbw has quit [Quit: Leaving.]
blackms has joined #ruby
dlitvak has joined #ruby
baweaver has quit [Remote host closed the connection]
yfeldblum has joined #ruby
vasilakisfil has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
DavidDudson has joined #ruby
DavidDudson has quit [Client Quit]
duckpuppy has joined #ruby
jbrhbr has joined #ruby
vasilakisfil_ has joined #ruby
kmckelvin has joined #ruby
s2013 has joined #ruby
Hounddog has joined #ruby
rdark has joined #ruby
nateberkopec has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
rdark has quit [Client Quit]
chthon has joined #ruby
rdark has joined #ruby
s2013 has quit [Client Quit]
dionysus69 has joined #ruby
Snowy has joined #ruby
vasilakisfil has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 256 seconds]
chthon has quit [Max SendQ exceeded]
chthon has joined #ruby
mark3 has joined #ruby
calderonroberto has quit [Ping timeout: 250 seconds]
<adaedra> Hello
<flughafen> hey adaedra
blaxter has joined #ruby
boxofrox has joined #ruby
darkxploit has quit [Ping timeout: 256 seconds]
techsethi has joined #ruby
Jet4Fire has quit [Quit: leaving]
wmdrossard has joined #ruby
passerine has joined #ruby
tenzan has quit [Quit: Textual IRC Client: www.textualapp.com]
joonty has joined #ruby
mikecmpbll has joined #ruby
boxofrox has quit [Ping timeout: 256 seconds]
celly has joined #ruby
celly has quit [Read error: No route to host]
cajone is now known as cajone_afk
celly has joined #ruby
elaptics`away is now known as elaptics
trampi has quit [Remote host closed the connection]
celly has quit [Read error: No route to host]
trampi has joined #ruby
celly has joined #ruby
howdoi has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
solars has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
Couch has joined #ruby
darkxploit has joined #ruby
scripore has joined #ruby
celly has quit [Read error: No route to host]
howdoicomputer has joined #ruby
celly has joined #ruby
edwinvdgraaf has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
InvGhost has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
drptbl has joined #ruby
rsc___ has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
c0dedead has joined #ruby
garethrees has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
scripore has quit [Quit: This computer has gone to sleep]
<c0dedead> I am working on a project using Ruby version 1.9.3 that may require me to update it. If I update to version 2.2.3 how likely am I to break things?
celly has quit [Read error: No route to host]
celly has joined #ruby
celly has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
celly has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
<rdark> c0dedead: Ruby 1.9.3 was closer to ruby 2.0.0 than 1.8.7, so shouldn't be too much of a jump. Hopefully you have decent test coverage to catch any breakage?
PaulCapestany has joined #ruby
celly has quit [Read error: No route to host]
celly has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
alexjose has joined #ruby
celly_ has joined #ruby
celly has quit [Read error: No route to host]
scripore has joined #ruby
workmad3 has joined #ruby
tomphp has quit [Quit: Textual IRC Client: www.textualapp.com]
alexjose has quit [Quit: Leaving]
celly_ has quit [Read error: No route to host]
celly has joined #ruby
<c0dedead> Rspec says 116 of 293 tests fail :/
celly has quit [Read error: No route to host]
dionysus69 has quit [Ping timeout: 240 seconds]
celly has joined #ruby
jayne has quit [*.net *.split]
PaulCapestany has quit [Quit: .]
CloCkWeRX has joined #ruby
jayne has joined #ruby
celly has quit [Read error: No route to host]
Peg-leg has joined #ruby
sidoaight has joined #ruby
celly has joined #ruby
dmolina has joined #ruby
<elaptics> what sort of failures are they?
PaulCapestany has joined #ruby
BrunoSaboia has joined #ruby
Tempesta has joined #ruby
vasilakisfil_ has quit [Ping timeout: 240 seconds]
sidoaight has left #ruby ["We need to work as a team. Which means doing what I say."]
<c0dedead> It looks like a lot of them were from bcrypt saying it found an invalid salt. I'm still looking through them.
tomphp has joined #ruby
<c0dedead> Is that something that could render my existing data invalid if I update bcrypt?
celly has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
nateberkopec has joined #ruby
<elaptics> not sure, but I wouldn't have thought so
dionysus70 has joined #ruby
duckpuppy has joined #ruby
dionysus70 is now known as dionysus69
B1n4r10 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
jxs_ has joined #ruby
krzkrz has quit [Read error: Connection reset by peer]
krzkrz has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
vasilakisfil has joined #ruby
jbrhbr has quit [Quit: Leaving.]
B1n4r10 has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaka has quit [Ping timeout: 240 seconds]
craysiii has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 240 seconds]
<c0dedead> Updating bcrypt corrected all of the errors.
<c0dedead> I'm not sure if I should be, but I am worried about the data in our production database. I guess worst case I can just force all users to update their passwords.
duncannz has quit [Remote host closed the connection]
kaka has joined #ruby
c0m0 has joined #ruby
seitensei has joined #ruby
seitensei has joined #ruby
<marens> jaja
stannard has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
FooMunki has joined #ruby
seitensei has quit [Ping timeout: 256 seconds]
stannard has quit [Ping timeout: 256 seconds]
baweaver has quit [Ping timeout: 240 seconds]
phantummm has joined #ruby
rdark has quit [Quit: WeeChat 1.0.1]
SCHAAP137 has joined #ruby
howdoicomputer has joined #ruby
rodfersou has joined #ruby
huyderman has joined #ruby
Ropeney has joined #ruby
phantummm has quit [Ping timeout: 250 seconds]
krzkrz has quit [Ping timeout: 240 seconds]
Ropeney has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 250 seconds]
<DylanJ> anyone know how i can xor a bignum with a bignum?
Arnvald has quit [Read error: Connection reset by peer]
Xentil has joined #ruby
ur5us has joined #ruby
Arnvald has joined #ruby
dlitvak has joined #ruby
rdark has joined #ruby
Arnvald_ has joined #ruby
Arnvald_ has quit [Read error: Connection reset by peer]
calderonroberto has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
shock_one has joined #ruby
bithon has joined #ruby
bithon has quit [Changing host]
bithon has joined #ruby
Arnvald_ has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
dlitvak has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 256 seconds]
<KrzaQ> I'm doing advent of code. I want to enumerate all n-element array that have the same sum (say, k). I came up with this: http://melpon.org/wandbox/permlink/iiQUNAwVYibodegS and it works, but I'm wondering if it can be done in a better way
Arnvald has joined #ruby
Arnvald_ has quit [Read error: Connection reset by peer]
chthon has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
pawnbox has joined #ruby
calderonroberto has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
<vasilakisfil> I run this program: http://pastie.org/private/xeenoytephcapgtiq7u3gw but a some times (not always) I get Actor crashed! errors after the print of the results
<vasilakisfil> should I terminate my script in a different way ?
<vasilakisfil> monkey_patches file is this: http://stackoverflow.com/a/7749613
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
toretore has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
devbug has joined #ruby
chthon has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Arnvald has quit [Read error: Connection reset by peer]
Munim has quit [Quit: Connection closed for inactivity]
Arnvald has joined #ruby
arup_r has joined #ruby
FooMunki has quit [Quit: FooMunki]
nateberkopec has joined #ruby
marr has joined #ruby
ur5us has quit [Remote host closed the connection]
shock_one has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
aryaching has joined #ruby
kalopsian has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
Arnvald has quit [Read error: Connection reset by peer]
Arnvald_ has joined #ruby
<shevy> so we don't know why it crashes
tulak has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
chthon has quit [Ping timeout: 255 seconds]
chthon has joined #ruby
Mon_Ouie has joined #ruby
bithon has quit [Quit: WeeChat 1.3]
bithon has joined #ruby
tulak has quit [Remote host closed the connection]
platzhirsch has joined #ruby
bithon has quit [Client Quit]
ElFerna has joined #ruby
bithon has joined #ruby
nettoweb has joined #ruby
ElFerna has quit [Client Quit]
cassioscabral has joined #ruby
sepp2k has joined #ruby
c0dedead has quit [Quit: leaving]
* KrzaQ feels ignored
<KrzaQ> I take it it's not bad since noone yells at me
<jhass> or we think you're beyond any help :P
<jhass> j/j
<jhass> * j/k
<shevy> I dunno, I feel it's much simpler to help when people got to work on code that is actually used for anything :D
aryaching has quit [Read error: Connection reset by peer]
Arnvald_ has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
<Silex> KrzaQ: the name "permutations" looks wrong here
<KrzaQ> Silex: what would be the correct word then? I want an enumerator of arrays such that the sum of their elements is n
aryaching has joined #ruby
<KrzaQ> shevy: aoc may be a game, but I still used it there :P
FooMunki has joined #ruby
<Silex> I think you want more like a generator
<blub> i would call it permutations_summing
Arnvald has quit [Ping timeout: 256 seconds]
<shevy> I call it madness!
build22 has joined #ruby
gagrio has quit [Ping timeout: 272 seconds]
drys has joined #ruby
<adaedra> Madness?
<adaedra> THIS. IS. RUBY.
* adaedra kicks shevy
cassioscabral has quit [Quit: cassioscabral]
<KrzaQ> I'll investigate the name
howdoicomputer has joined #ruby
<KrzaQ> but I was more interested in implementation issues
<Silex> hum, actually it can be permutations, but you need to start with a bigger array of all possible elements then
bithon has quit [Changing host]
bithon has joined #ruby
nfk|laptop has joined #ruby
<Silex> [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3].permutation(4)
<KrzaQ> and then .select{|n| n.inject(:+) == desired} ?
<Silex> then each_with_object({}) h[arr.sum] etc
drys has quit [Client Quit]
<Silex> basically what you said yeah
<Silex> but, it depends wether you focus on elegance or performance
drys has joined #ruby
<KrzaQ> The performance drop is so drastic I'd call it inelegant, tbh
cassioscabral has joined #ruby
<Silex> for an array of 16 elements I doubt you'd notice
<blub> that has less right to be called permutations
<KrzaQ> Silex: it's just a small example, the actual code needs to have the sum of 100
<KrzaQ> so it'd be 400 elements
skade has joined #ruby
<Silex> 400 elements is peanuts
<Silex> (or at least I'd believe it is, maybe I'm wrong)
aibot_ has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 272 seconds]
ibouvousaime has quit [Ping timeout: 256 seconds]
c355e3b has joined #ruby
ibouvousaime has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bloomer has quit [Remote host closed the connection]
<KrzaQ> I'll give it a try
aibot has joined #ruby
sepp2k1 has joined #ruby
spt0 has joined #ruby
<KrzaQ> ([*(0..100)]*4).permutation(4).count
solars has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 240 seconds]
<KrzaQ> several seconds now, still counting
<KrzaQ> ah, wait, I forgot to select
charliesome has joined #ruby
<Silex> hum, you're right it's rather slow
<KrzaQ> p ([*(0..100)]*4).permutation(4).select{|n| n == 100}.count
<KrzaQ> left that in sublime, I wonder how long it'll take
<KrzaQ> my solution does it in ~2 seconds on my vm
techsethi has quit [Quit: techsethi]
jxs_ has quit [Remote host closed the connection]
<Silex> interesting example of elegancy vs performance
chthon has quit [Ping timeout: 255 seconds]
<blub> ruby needs SERIES @_@
bithon has quit [Quit: WeeChat 1.3]
krzkrz has joined #ruby
gagrio has joined #ruby
wmdrossard has quit [Ping timeout: 256 seconds]
bithon has joined #ruby
cassioscabral has quit [Ping timeout: 272 seconds]
celly has joined #ruby
colegatron has quit [Ping timeout: 272 seconds]
bithon has quit [Changing host]
bithon has joined #ruby
garethrees has quit []
cassioscabral has joined #ruby
Macaveli has joined #ruby
mostlybadfly has joined #ruby
platzhirsch has left #ruby [#ruby]
joonty has quit [Quit: joonty]
celly has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
timonv has joined #ruby
joonty has joined #ruby
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
B1n4r10 has joined #ruby
chthon has joined #ruby
emrox has joined #ruby
skade has joined #ruby
quazimodo has joined #ruby
wmdrossard has joined #ruby
<shevy> drama?
Mon_Ouie has quit [Ping timeout: 240 seconds]
<KrzaQ> there's an anime
<KrzaQ> spelled rwby though
B1n4r10 has quit [Ping timeout: 250 seconds]
ElFerna has joined #ruby
colegatron has joined #ruby
krzkrz has quit [Ping timeout: 272 seconds]
prestorium has joined #ruby
kaka has quit [Ping timeout: 240 seconds]
<shevy> lol
nateberkopec has joined #ruby
build22 has quit [Read error: Connection reset by peer]
shock_one has quit [Ping timeout: 272 seconds]
duckpuppy has joined #ruby
auzty has quit [Ping timeout: 250 seconds]
nateberkopec has quit [Ping timeout: 250 seconds]
kaka has joined #ruby
ElFerna has quit [Quit: WeeChat 1.3]
Danielss89 has joined #ruby
<Danielss89> Hi
<Danielss89> does rvm.io has anything to do with this channel?
ElFerna has joined #ruby
gagrio has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 272 seconds]
<Bish> Danielss89: well, it does install ruby, but that does every packagemanager of any linux distribution, too
gagrio has joined #ruby
<Danielss89> Bish ok, i'm asking because the website is down
yfeldblum has joined #ruby
<Danielss89> and just wanted to notify the right people
<KrzaQ> Silex: p ([*(0..100)]*4).permutation(4).select{|n| n == 100}.count still processing ;)
<Bish> i started that one in crystal on my 4g ram machine
<Bish> totally freezed it :D
<KrzaQ> so I guess my question would be if you can do recursive enumerators in a more elegant way than mine
shock_one has joined #ruby
CloCkWeRX has joined #ruby
<Bish> froze? i don't know
<Silex> KrzaQ: you can probably get rid of the if somehow
<jhass> Bish: I think master just added an iterator for it
<Bish> jhass: crystal you say?
<jhass> yes
<Bish> well, im only playing around with it, only having the version my package manager gives me
<Silex> hum... actually no
<Silex> meh
krzkrz has joined #ruby
<KrzaQ> hm
<KrzaQ> I dunno how
ElFerna has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
stevenxl has quit [Quit: leaving]
<Bish> >> Array.new.methods.select{ |x| x.to_s =~ /each/ }
<ruboto> Bish # => [:each, :each_index, :reverse_each, :each_with_index, :each_entry, :each_slice, :each_cons, :each_wi ...check link for more (https://eval.in/485618)
<Bish> intradesting
kaka has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
kaka has joined #ruby
howdoicomputer has joined #ruby
ElFerna has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
bMalum has quit [Remote host closed the connection]
bMalum has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
cassioscabral has quit [Quit: cassioscabral]
cornerma1 has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
aryaching has joined #ruby
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
dlitvak has joined #ruby
dmolina has joined #ruby
rsc___ has quit [Quit: rsc___]
kaka__ has joined #ruby
madcodes has joined #ruby
madcodes has quit [Max SendQ exceeded]
dlitvak has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
madcodes has joined #ruby
idefine has joined #ruby
kaka has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
cassioscabral has joined #ruby
dlitvak has joined #ruby
moeabdol1 has joined #ruby
xabcf has joined #ruby
<xabcf> hi, i am doing
<xabcf> system('export Y=path')
<xabcf> and then
<xabcf> ENV["Y"]
<xabcf> but it returns nil instead of 'path'
<xabcf> how can i access the variables exported using system
<Bish> try Y=$PATH
<xabcf> or is there any other way to tun system command from ruby
<KrzaQ> I don't think ENV get's updated when parent's environment changes
<xabcf> i mean
<Bish> xabcf: try %x(echo 'path')
<shevy> xabcf I am not sure you can get the ENV value updated lateron
<xabcf> system('export Y=abcstring')
scripore has joined #ruby
<jhass> xabcf: just use ENV["Y"] = "path"
<shevy> perhaps there is some manual way to get it synced lateron at runtime... hmm
<jhass> shevy: there isn't
idefine has quit [Remote host closed the connection]
Feyn has quit [Quit: Leaving]
<shevy> :(
<xabcf> so one has to have set all the exported values manually which is being in some shell script
<shevy> time for a pre-xmas PR!!!
<Bish> or you let them set with the shell script? xabcf
<Bish> by the*
<shevy> yeah it's sorta a non-issue in this case because he already manually sets it via system
johnzorn has joined #ruby
<shevy> so he knows the value so he can manipulate ENV directly
<xabcf> yes i have a script.sh that exports some variables. And then i run that script from ruby using system('./script.sh') and now i want my variables in ruby
<adaedra> xabcf: when you do `system('export Y=path')`, you don't set the env in the parent. You create a subshell, set it there, and close the shell.
ElFerna has joined #ruby
<Bish> xabcf: why not let script.sh invoke your ruby script?
<adaedra> Or do like ssh-agent: print the variables to set in your script.sh, and then use this output in the parent to fix your own env.
<shevy> could add an ENV.sync() method or something
<adaedra> To sync with what?
<shevy> to how ENV normally gets populated
<adaedra> You don't have access to parent or children environment.
<shevy> ENV gets populated
<adaedra> Yes, using the environment passed by your system at startup.
<Bish> shevy: script.sh get's his own environment, then sets stuff there, and ends
<Bish> the env of the ruby script, doesn't get changed
<xabcf> hmm, but if we want to sync somehow the ENV
<adaedra> you can't.
<Bish> that's not what they are for
<adaedra> that's not how environment works.
bronson has quit [Remote host closed the connection]
<Bish> xabcf: can you be more specific in what you're trying to do
<Bish> like, whats inside those variables
minimalism has quit [Quit: leaving]
<xabcf> but suppose in case of building native extension gem, you call a script.sh through extconf.rb and want to get the exported variables which were set in script.sh
<xabcf> Bish ^
ElFerna_ has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
<adaedra> You cannot make environment variables magically go up in processes. Use io or ipc to transmit the variables, xabcf.
<shevy> he can already manually update ENV syncing should be easily doable
<xabcf> is this the case with ruby, or is it same with python as well
<adaedra> It's the case even with C.
charliesome_ has joined #ruby
ElFerna has quit [Ping timeout: 256 seconds]
<adaedra> Each process has its own environment; it is copied in new processes at the time of fork(2), and then is not shareable to other processes. The only way to have a process get your env is to be called by the program calling it.
<apeiros> xabcf: it's the case with your OS
dlitvak has joined #ruby
<apeiros> and note that this is indeed a feature, not a bug. being able to override a parent's env would be a security issue.
<adaedra> I think environment is not the storage you want.
<shevy> xabcf sorta http://stackoverflow.com/a/4907053/722915 python has it collected as part of "os.", ruby just uses the global constant ENV
charliesome has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<adaedra> hi apeiros, thanks for the support :p
<apeiros> adaedra: for you, always ;-D
nateberkopec has joined #ruby
<xabcf> hmm right
<xabcf> so manually setting ENV is the way to go
<adaedra> Well, there may be others ways.
<shevy> yeah like a baby you have to manually update all the variables on your own :)
charliesome has joined #ruby
<xabcf> hmm
kaka__ has quit [Ping timeout: 240 seconds]
<adaedra> As I said above, maybe ENV is not what you're looking for. You could output a file and read it in Ruby process, for example.
azgil has joined #ruby
duckpuppy has joined #ruby
<xabcf> ENV['x'] = `ls`.chomp
<xabcf> like this
<xabcf> ?
<jhass> or likely even compute the values you compute in your shellscript in ruby
sdothum has joined #ruby
charliesome_ has quit [Ping timeout: 272 seconds]
solars has joined #ruby
<Bish> execute it inside a fork, attach to the process with ptrace and then read out the environment variables with writing a thread in x86 assembler
<Bish> sounds reasonable to me!
<jhass> xabcf: what kind of variables are we talking about here really? got any real world example instead of the fake stuff?
<xabcf> ENV['x'] = `ls`.chomp
<shevy> xabcf this is of course moot since you can obtain these information from plain ruby too
<adaedra> Bish: sssh, they may think it's ok to do.
<xabcf> this creates a fork first and then attaches the value to ENV
<xabcf> right ?
<Bish> it's a okay thing to do!
<Bish> no it's crazy, don't do that
<jhass> ?xy xabcf
<ruboto> xabcf, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
nateberkopec has quit [Ping timeout: 256 seconds]
<xabcf> execute it inside a fork, attach to the process with ptrace and then read out the environment variables with writing a thread in x86 assembler . Bish, this is hard for me to understand
<xabcf> thats why i asked specifically
<xabcf> sorry if that breaks any irc manner
scripore has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
<Bish> xabcf: it would be the hardest way to do , there is
<Bish> but it would probably do what you want to do
<Bish> you still shoudn't, printing to a pipe would bbe more easy, by far
<adaedra> xabcf: Bish's solution is not the thing to do. Ignore it.
<adaedra> Bish: see!?
<xabcf> hehe
<Bish> im sorry :p
<jhass> well can't say we didn't try to lead you to a proper solution, if you prefer to ignore our advice I see no sense in continuing the discussion
<adaedra> xabcf: explain us what you're trying to do in the first place; we may help you find a better solution
<xabcf> i want to set compiler flags (CC, CXX) while building native extension
<xabcf> and these CC, CXX would differ for linux, darwin
<jhass> why do you need to compute the values inside a shellscript?
<jhass> also doesn't mkmf have its own settings for those?
aryaching has quit [Ping timeout: 250 seconds]
* Bish wishes the ptrace gem would actually work
<xabcf> because there were few other things as well that i had in the script.sh so i though of export it through script.sh and getting them through ENV or something in ruby
<xabcf> mkmf settings ?
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<jhass> apparently not, mh
<shevy> xabcf one obvious workaround would be to source the .sh script that sets it before you start ruby
DeXterbed has quit [Ping timeout: 240 seconds]
<jhass> xabcf: I repeat myself, what makes computing these values from Ruby impossible or even just hard?
aryaching has joined #ruby
<xabcf> nothing jhass.
tvw has joined #ruby
<xabcf> i can do that
<xabcf> but i thought i could make my extconf.rb cleaner
<jhass> then why waste time on this trying to reuse your shell script no matter what
<jhass> I doubt so
<xabcf> hmm yeah
pulgolino has quit [Remote host closed the connection]
tomaz_b has joined #ruby
tejasmanohar has quit [Ping timeout: 240 seconds]
kalopsian has quit [Ping timeout: 240 seconds]
<xabcf> jhass, but even if i use it, i have to compute the values in ruby
blackgoat has quit [Quit: night night]
<jhass> yes
<xabcf> hmm
tejasmanohar has joined #ruby
<jhass> I still can't imagine why that would be complicated
<jhass> what's possibly complex about them
DeXterbed has joined #ruby
<xabcf> i just thought that if i can use the exported values from script.sh
phantummm has joined #ruby
passerine has quit [Ping timeout: 240 seconds]
<xabcf> by the way, this is also a way to set compiler -> RbConfig::CONFIG['CXX'] = path
msankhala has quit [Quit: This computer has gone to sleep]
<shevy> are you reading stackoverflow or something
<jhass> ok. you're evading the question, so no point in pressing it further
<xabcf> i am reading this
<Bish> is there a cool x86 debugging tool for ruby?
<Bish> i tried Ptrace and rtrace, they both don't work
ElFerna_ has quit [Ping timeout: 250 seconds]
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
<adaedra> 24 letters left to test then.
dlitvak has quit [Read error: Connection reset by peer]
pika_pika has joined #ruby
idefine has joined #ruby
dlitvak has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
<GinoManAFK> Hey, is there a difference between puts and print?
<toretore> \n
phantummm has quit [Ping timeout: 250 seconds]
<jhass> GinoManAFK: puts appends a trailing newline unless there already is one
ornerymoose has joined #ruby
<jhass> GinoManAFK: it also has a different behavior when passed an array
<GinoManAFK> What behavior does it have when passed an array?
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
<GinoManAFK> hmmm
Borkot|2 has joined #ruby
<shevy> GinoManAFK puts will ensure that one \n is at the end
Borkot|2 has left #ruby [#ruby]
<jhass> shevy: I think I already said that?
ElFerna_ has joined #ruby
<Bish> if i do puts "x\n" it will not add an \n?
celly has joined #ruby
<Bish> interesting, didn't know that.
<shevy> jhass I did not read what you wrote when I looked at the tab here
<shevy> I am multitasking!
graffix222 is now known as graffix
drys has quit [Ping timeout: 272 seconds]
<shevy> Bish yeah that confused me too once
ElFerna_ has quit [Client Quit]
<shevy> puts "hello world!" would yield the same result as a puts "hello world!\n" would
GinoManAFK has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 256 seconds]
ornerymoose_ has joined #ruby
ornerymoose has quit [Ping timeout: 240 seconds]
ornerymoose_ is now known as ornerymoose
arup_r has quit [Remote host closed the connection]
celly has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
sameerynho has joined #ruby
GinoManWorks has joined #ruby
tulak has joined #ruby
djcp2 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
djcp1 has quit [Ping timeout: 240 seconds]
<GinoManWorks> print actually prints the .to_s of the array itself, puts prints each string in the array on it's own line.
joonty has quit [Quit: joonty]
Macaveli has quit [Ping timeout: 240 seconds]
<shevy> so suddenly you mention an array
<shevy> :)
<jhass> GinoManWorks: exactly!
B1n4r10 has joined #ruby
devbug has joined #ruby
<jhass> shevy: you still didn't read what I wrote then ...
<shevy> jhass is this required?
<jhass> shevy: for that type of comment you just made, yes
<shevy> jhass no I don't think it is required
huyderman has quit [Remote host closed the connection]
<GinoManWorks> sorry, I crashed Quassel trying to renick myself as GinoMan@work.... I feel like if that's not legal it should have caught that and told me so
<GinoManWorks> rather than crashed.
<shevy> have you tried /j #0 or something yet
dlitvak_ has joined #ruby
<jhass> GinoManWorks: well, get a better client then :P
dlitvak has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
<shevy> quassel is a very strange name... then again so is peechat
djcp3 has joined #ruby
<shevy> GinoManWorks use a ruby IRC client!
arup_r has joined #ruby
<jhass> shevy: such as?
djcp2 has quit [Ping timeout: 240 seconds]
<shevy> yeah!
Macaveli has joined #ruby
<shevy> perhaps one could use ruby-ncurses
huyderman has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
EvilDMP has left #ruby ["Textual IRC Client: www.textualapp.com"]
B1n4r10 has quit [Ping timeout: 250 seconds]
<shevy> jhass does crystal have an IRC client yet? :)
Macaveli_ has joined #ruby
<shevy> hmmm next time I stroll into crystal, I will look at the GUI bindings
<GinoManWorks> shevy: That's really the only reason I didn't put a whole lot of energy into learning ruby through and through; there really isn't a super mature and robust gui library for it like there is for C/C++
<jhass> shevy: there is a client library or two
<GinoManWorks> There's rails for web apps which I've heard is awesome but
<shevy> jhass cool
<GinoManWorks> mostly the only gui stuff for ruby are bindings to C/C++ gui libraries.
<jhass> well of course
<jhass> it's not a wheel you want to reinvent in every language
synthroid has joined #ruby
gaiada has joined #ruby
<jhass> I mean look at what a pain Swing GUIs are to use (and write)
arup_r has quit [Ping timeout: 240 seconds]
B1n4r10 has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
<GinoManWorks> jhass: That's true, but for example, Qt, which is what I know how to use, is taylored to C++'s strengths and weaknesses and uses the full extent of C++ and even a seperate meta-object compiler to make gui programming easy and fully integrated with the language.
<shevy> yeah well
xabcf has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<shevy> most of the time there are like 1-2 devs... they have enough energy to map the C API 1:1 onto ruby... and then they move on to do other things
<jhass> GinoManWorks: nothing against building a nicer to use API on top of a rather raw binding
<GinoManWorks> Yeah, I'm programming alone as it were
TomPeed has joined #ruby
<jhass> and yes, Ruby is lacking in that kind of abstractions
<jhass> but so are most languages if we're honest
<GinoManWorks> sure
arup_r has joined #ruby
<shevy> GinoManWorks ruby-qt looked very nice
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GinoManWorks> Perl doesn't have great gui support either. Python I wouldn't even begin to know what it's like, but I know it has qt bindings
<shevy> python has more developers so they have an advantage there
<GinoManWorks> Bash fuggedaboudit
<shevy> GinoManWorks you can see it on that page there http://www.gtk.org/language-bindings.php ... ruby is not an official binding :(
<GinoManWorks> bash scripts you can access curses stuff using certain programs
jpank has joined #ruby
<shevy> yeah you mean something like the slackware menu interface for installing packages and stuff
momomomomo has joined #ruby
<GinoManWorks> yes
B1n4r10 has quit [Ping timeout: 272 seconds]
<GinoManWorks> there are bash scripts that will give you like some curses stuff
<GinoManWorks> that use those libraries
<shevy> GinoManWorks gobolinux had a nice idea back when it still sorta existed http://www.gobolinux.org/abstk/
<blub> i just finished bashing together a cocoa thing in lisp like five minutes ago i really hate interfaces but those bindings are pretty good..
<shevy> I think python has had something similar... anaconda? or whatever it was where you could both have ncurses and gtk
momomomomo has quit [Client Quit]
<shevy> cacao and lisp sounds like a cool combination!
<GinoManWorks> Cocoa I liked a lot
pawnbox has quit []
p0wn3d has joined #ruby
d0nn1e has quit [Ping timeout: 272 seconds]
<GinoManWorks> I hated it at first because it was all gui based instead of codebased but when I realized that the design actually makes it *more* powerful than handcoding things, I realized how productive I was being in it and grew to like it a lot
dravine has quit [Quit: dravine]
Macaveli_ has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
d0nn1e has joined #ruby
DeXterbed has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Read error: Connection reset by peer]
cajone_afk is now known as cajone
sgambino has joined #ruby
gambl0re has joined #ruby
rsc___ has joined #ruby
Macaveli has joined #ruby
_stu_ has joined #ruby
joonty has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
<GinoManWorks> I did find this: http://shoesrb.com/
pawnbox has joined #ruby
nateberkopec has joined #ruby
dlitvak has joined #ruby
duckpuppy has joined #ruby
<Bish> i tried shoes, its fun but weird
<Bish> who needs GUIs anyways
gaiada is now known as xD
scripore has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Ping timeout: 250 seconds]
Jardayn has joined #ruby
teotwaki has left #ruby ["WeeChat 1.3"]
xD is now known as x^D
<KrzaQ> barefoot is better
duckpuppy has quit [Ping timeout: 240 seconds]
<KrzaQ> guess what. I did a google search for barefoot.js and it exists
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
Jackneill has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
dravine has joined #ruby
scripore has joined #ruby
<Bish> .oO( Will we ever run out of software names...? )
CloCkWeRX has quit [Ping timeout: 240 seconds]
shock_one has quit []
dlitvak has joined #ruby
goodcodeguy has joined #ruby
freerobby has joined #ruby
<c355e3b> Bish no
<shevy> lol
<Bish> okay, now you really convinced me
<shevy> naming things is hard
<shevy> shoes... barefoot ... node ...
<shevy> animalistic programming languages such as python
<shevy> falcon
<shevy> not that A B C C++ C# D is all much better as a name
teotwaki has joined #ruby
goodcodeguy has quit [Client Quit]
baweaver has joined #ruby
ESpiney has joined #ruby
teotwaki has left #ruby ["WeeChat 1.3"]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hagabaka has quit [Ping timeout: 240 seconds]
kmckelvin has quit [Read error: Connection reset by peer]
spiman has joined #ruby
cassioscabral has quit [Read error: Connection reset by peer]
goodcodeguy has joined #ruby
cassioscabral has joined #ruby
lipoqil has joined #ruby
cwong_on_irc has joined #ruby
drys has joined #ruby
B1n4r10 has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
sameerynho has quit [Quit: Leaving]
ibouvousaime has quit [Ping timeout: 240 seconds]
yaewa has joined #ruby
bMalum has quit [Ping timeout: 240 seconds]
dlitvak has quit [Read error: Connection reset by peer]
moei has quit [Ping timeout: 272 seconds]
jhooker has joined #ruby
howdoicomputer has joined #ruby
artX000 has quit [Ping timeout: 256 seconds]
ibouvousaime has joined #ruby
dlitvak has joined #ruby
Ishido has joined #ruby
howdoicomputer has quit [Ping timeout: 246 seconds]
prillian5 has joined #ruby
<Bish> hm there was a watchdog gem, which was pretty powerful..
<Bish> forgot it's name, can you help me with that?
Encapsulation has joined #ruby
kalopsian has joined #ruby
CloCkWeRX has joined #ruby
jhooker has quit [Quit: Leaving]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aspire has joined #ruby
tesuji_ has quit [Ping timeout: 256 seconds]
goodcodeguy has joined #ruby
Macaveli_ has joined #ruby
Macaveli_ has quit [Max SendQ exceeded]
ramortegui has joined #ruby
atumzin has quit [Ping timeout: 240 seconds]
Macaveli_ has joined #ruby
Macaveli_ has quit [Max SendQ exceeded]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
atomical has joined #ruby
Macaveli_ has joined #ruby
Macaveli_ has quit [Max SendQ exceeded]
Macaveli has quit [Ping timeout: 240 seconds]
chrisarcand has quit [Ping timeout: 276 seconds]
Macaveli has joined #ruby
davedev24 has joined #ruby
DroidBurgundy has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
dlitvak has quit [Read error: Connection reset by peer]
benhuda has joined #ruby
dlitvak has joined #ruby
renderf__ has quit [Ping timeout: 240 seconds]
tomaz_b has quit [Ping timeout: 240 seconds]
Bloomer has joined #ruby
dorei has joined #ruby
Anderson69s has joined #ruby
Vitor_ has joined #ruby
renderfu_ has joined #ruby
Verde` has joined #ruby
<Verde`> Hey guys
<c355e3b> Good morning
tlarevo has joined #ruby
<Verde`> I'm having a hard time finding digest support or a gem for RIPEMD-128
prillian5 has quit [Quit: Konversation terminated!]
<Verde`> Surely this is supported somehow? Could any of you point me in the right direction?
Macaveli has quit [Ping timeout: 265 seconds]
<Verde`> I can call Ripemd 160 using Digest::RMD160, but there's no 128 bit equivalent
tlarevo has quit [Client Quit]
cdg has joined #ruby
jdm_ has joined #ruby
jdm has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
thekingofbandit has joined #ruby
freerobby has quit [Quit: Leaving.]
Macaveli has joined #ruby
InvGhost has quit [Ping timeout: 240 seconds]
cassioscabral has joined #ruby
kam270 has joined #ruby
chouhoul_ has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
babblebre has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
ghoti_ is now known as ghoti
dlitvak has joined #ruby
cored has joined #ruby
<cored> hi
decoponio has joined #ruby
<cored> is there a way in Ruby to validate a JSON structure?
cdg has quit [Remote host closed the connection]
shanemcd has joined #ruby
chrisarcand has joined #ruby
codecop has quit [Remote host closed the connection]
malconis has joined #ruby
<Bish> no that's impossible
<cored> I'm trying with json-schema
chouhoulis has quit [Ping timeout: 256 seconds]
zapata has quit [Ping timeout: 240 seconds]
<cored> but I just notice that my specs keep passing even when the structure of the schema is not right
<cored> like having nested nodes in the schema but not having the same nesteing in the output from my app
<cored> Bish: oh, thanks, I thought it was possible
<Bish> i was joking.
<cored> Bish: me too
<Bish> just wanted to make sure
<Bish> what's wrong with trying to parse it, rescue the raise?
<cored> the json schema is properly formatted
<cored> so parsing it will work
<cored> is the structure of it that is wrong in contrast with the output from the endpoint
idefine has quit [Remote host closed the connection]
<Bish> so you want the json to have a specific structure?
<cored> I want to enforce schemas on my app so people stop making changing and breaking stuffs
<cored> yes
<havenwood> Verde`: Taking a stab at implementing it. :P
nateberkopec has joined #ruby
<Verde`> havenwood, so that's really where we're at?
shanemcd has quit [Remote host closed the connection]
<Bish> well, give us an example where i fails, so we can help
<Verde`> There is no support for RipeMD 128 in Ruby?
shanemcd has joined #ruby
<havenwood> Verde`: Nobody uses it.
<Verde`> I'm not gonna invent a whole new gem to resolve an issue that should've taken me 15 minutes 4 hours ago with a deadline tomorrow :-/
dlitvak has quit [Remote host closed the connection]
<Verde`> Ugh
<Verde`> On to second rate hashes then I guess
nomadicoder has joined #ruby
<havenwood> Verde`: Why do you need RMD128 instead of RMD160?
nettoweb has joined #ruby
<Verde`> havenwood, because I need a 128 bit hexadecimal to be generated
dlitvak has joined #ruby
duckpuppy has joined #ruby
<cored> take a look at the output from the endpoint
<cored> and if you contrast it with the schema the schema have a linked nested inside links which is not the proper structure
<cored> but the specs are passing
<Verde`> To keep it short, the input is "random" as it is but I wanted to run it through Ripe to get a better number distribution
<cored> I would like to enforce structure
tagrudev has quit [Remote host closed the connection]
<dorei> Verde`: if you aint looking for a pure ruby implementation, maybe this https://github.com/TibshoOT/ruby-mhash might be of help
InvGhost has joined #ruby
<Verde`> Ooh thanks dorei, that may actually be my ticket here
stannard has joined #ruby
aganov has quit [Remote host closed the connection]
<Verde`> Didn't think of Mhash in the context of Ruby yet :-/
<Bish> cored: well, can you tell me, where it should break?
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cored> Bish: so linked is inside the links key instead of in the root of the JSON, I think that's an issue because that means that I can put the root nodes inside any node without a problem
s00pcan has joined #ruby
dimasg has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
<Bish> i see linked outside of links
zerowaitstate has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
bungoman has joined #ruby
dlitvak has joined #ruby
thekingofbandit has quit [Quit: HydraIRC -> http://www.hydrairc.com <- It'll be on slashdot one day...]
zapata has joined #ruby
<cored> hm
<cored> wait
<Verde`> Thanks cored, that solved my issue
polishdub has joined #ruby
<Bish> cored is a good guy
uri_ has joined #ruby
<cored> Verde`: hm?
<cored> Bish: updated it
<Bish> (he means dorei)
<cored> Bish: specs keep passing
<cored> well I'm a good guy either way, right Bish ?
idefine has joined #ruby
<Bish> im sure!
<Verde`> cored, mhash I mean
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<Bish> mhash is a good guy
<Verde`> I'm going back in, god speed gents
<Bish> HACKING IN PROGRESS
Verde` has quit [Quit: Beware of he who would deny you access to information, for in his heart he dreams himself your master.]
<shevy> the cave of the dragon
mary5030 has joined #ruby
<KrzaQ> Silex: [Finished in 7064.0s]
dimasg has quit [Ping timeout: 272 seconds]
<Bish> KrzaQ: :D
<KrzaQ> roughly 3500 times slower :P
<Bish> slower than what?
<KrzaQ> an old discussion ([*(0..100)]*4).permutation(4).select{|n| n.inject(:+) == 100} vs. http://melpon.org/wandbox/permlink/iiQUNAwVYibodegS
<KrzaQ> old = ~4 hours or so, I think
CloCkWeRX has quit [Quit: Leaving.]
<KrzaQ> I was wondering if it's possible to make my permutations generator nicer (it's supposed to make k-element arrays that sum up to a specified value)
dfinninger has joined #ruby
<vasilakisfil> so I have this little ruby program: http://pastie.org/private/rmgiifat6ysbtemnqja44g it fires a tons of requests in my rails API, but it keeps the alive threads constant. If I set ulimit -n 100 (allow 100 open fd) it craches almost in 10 seconds. If I set ulimit -n 1024 it craches after 1 minute. Why aren't socket fd closed? do I do something wrong ?
<Bish> cored: still can't see where it breaks your shema
<vasilakisfil> obviously if I want it to run for 5 hours I can't fix it by increasing the fd limit
idefine has quit [Ping timeout: 256 seconds]
genpaku has quit [Ping timeout: 256 seconds]
nettoweb has quit [Ping timeout: 265 seconds]
genpaku has joined #ruby
nateberkopec has quit [Quit: Leaving...]
rodfersou is now known as rodfersou|lunch
pulgolino has joined #ruby
freerobby has joined #ruby
rippa has joined #ruby
<jhass> vasilakisfil: regarding Timeout::timeout, https://github.com/httprb/http#timeouts
<cored> Bish: I mean, my schema is not broken
The_Phoenix has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<cored> Bish: what I think should fail is the fact that I have a nested attribute in the JSON schema but in the response that attribute is not nested
<Bish> yeah i am not a native speaker, i mean where your data is not valid according to your shema
<vasilakisfil> jhass I don't want per request timeout but rather a global timeout so I am not sure if that helps
<jhass> vasilakisfil: and yeah, you never seem to remove stuff from requests?
<cored> Bish: well, no the data is valid what is not valid is the structure of it according to the schema, that's what I want to also be enforce
<Bish> hngg
<Bish> i understand what you're trying to say, but i cannot see where
<vasilakisfil> what do you mean? when the request is done, the method returns so actor terminates
Madhur_ has joined #ruby
<cored> Bish: well did you see the output?
momomomomo has joined #ruby
<jhass> vasilakisfil: fire returns a reference to the response object
<cored> Bish: if you see the output linked is not nested in links but in the schema it is; I think that should make the spec to fail
<jhass> which you append to the requests array
<jhass> and never remove
Macaveli_ has joined #ruby
<Bish> cored: well you have required "linked" in root
howdoicomputer has joined #ruby
<vasilakisfil> yes but when the request is done I return some objects.. I mean no point of keeping the connection alive there.. I think I should add the Connection: close header
<Bish> so it should fail, when its missing, shouldn't it?
<cored> Bish: right, probably this is not supported
Macaveli has quit [Ping timeout: 240 seconds]
<Bish> dafuq? i mean.. you say "this is broken because linked is in root, while it should be in links"
<jhass> vasilakisfil: even if that stops leaking FDs, you'll leak memory still
<Bish> but the root says "linked is required"
<Bish> so it should break, if there is no linked in root
madcodes has quit [Ping timeout: 256 seconds]
<Bish> maybe im the wrong person to answer this, because im a confused guy, but i can't see a mistake in the gem
<cored> Bish: the opposite
<cored> Bish: it should fail because linked is not in the root it's inside the links key
boxofrox has joined #ruby
<Bish> but it isn't or am i blind
banister has quit [Read error: Connection reset by peer]
houhoulis has joined #ruby
whippythellama has joined #ruby
<Bish> there are two }} before "Linked", meaning it is in root
howdoicomputer has quit [Ping timeout: 246 seconds]
<cored> I'm tseting wth a simple schema and data
<cored> wait
shanemcd has quit [Read error: Connection reset by peer]
<Bish> there is no need to simplify it for me :D but i can't see a violation of your schema
rsc___ has quit [Quit: rsc___]
<Silex> KrzaQ: :P
anisha has quit [Quit: Leaving]
<Bish> https://gist.github.com/cored/b084716e2a33659358fc <= linked is in root in this one.
mclong has joined #ruby
rsc___ has joined #ruby
p337rB has joined #ruby
rsc___ has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
ElFerna has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
shanemcd has joined #ruby
<cored> Bish: hehe, you are right it was my mistake
boxrick1 has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
dfinninger has quit [Remote host closed the connection]
ElFerna has quit [Client Quit]
boxrick1 has joined #ruby
RobertBirnie has joined #ruby
<cored> Bish: you are right, what needs a required linked is the root node not the links so that's why is not failing because the required node is in the response
<Bish> woop wooop
dionysus69 has joined #ruby
<jhass> cored: don't forget to set "additionalProperties": false in your schema, it's not forbidden by default
<jhass> cored: also make sure to use fully_validate over validate, irrc
vcoinminer_ has quit [Ping timeout: 250 seconds]
<jhass> so you get all issues at once
hobodave has joined #ruby
<cored> jhass: yes using fully_validate
tulak has quit [Read error: Connection reset by peer]
grill has joined #ruby
hxegon has joined #ruby
<cored> did not know about the additionalProperties
<vasilakisfil> modifying the array in the each block is a bad idea ?
<cored> thanks
rflot has quit [Ping timeout: 250 seconds]
<jhass> vasilakisfil: it usually leads to hard to understand code
<ljarvis> vasilakisfil: yes
tulak has joined #ruby
<cored> vasilakisfil: it depends but there are simpler way to implement that type of stuffs
snguyen has joined #ruby
<jhass> vasilakisfil: while request = requests.shift;
vcoinminer_ has joined #ruby
<vasilakisfil> I have the array that loops with the each block and afterr X loops I want to append a value so it keeps looping.. but at the same time I have to start deleting the first items in order not to have memory leak
dhollinger has joined #ruby
shanemcd has quit [Read error: Connection reset by peer]
shanemcd_ has joined #ruby
<jhass> vasilakisfil: anything wrong with my last suggestion?
<cored> jhass: if I use additionalProperties: false at the top level will it apply to the entire json schema?
rflot has joined #ruby
bithon has quit [Quit: WeeChat 1.3]
<jhass> cored: uh I don't remember but I don't think so, I think it only applies to the currently defined object
bithon has joined #ruby
<cored> gotcha
<cored> thanks
nateberkopec has joined #ruby
rgtk has joined #ruby
phantummm has joined #ruby
<jhass> I don't see anything about "apply to child" or "check parents", neither in http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.4.4.3
<cored> jhass: yes, reading that right now too
SOLDIERz has quit [Ping timeout: 272 seconds]
chouhoul_ has quit [Remote host closed the connection]
dimasg has joined #ruby
chouhoulis has joined #ruby
<vasilakisfil> jhass yes it doesn't work unless you meant something else. Firstly shift modifies the object so it's just requests.shift. Secondly it seems like .each uses an internal counter when looping so when removing an item in the start of the array and adding an item in the end of the array, there is no different for .each, it continues looping using the internal counter. So since requests.size is constant, it stops after a while
<vasilakisfil> at least that's what I understand, I don't know how .each works exactly
<jhass> vasilakisfil: I didn't say use it inside .each ...
<vasilakisfil> ah ok sorry my bad
phantummm has quit [Ping timeout: 255 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> && is not a method, right?
kaka__ has joined #ruby
<vasilakisfil> given an array of celluloid features, for each one that resolves (returns a value) I want to create a new one.. how can I do that? I tried modyfying the array inside the each block but obviously it doesn't work
<vasilakisfil> sorry, celluloid futures
spiman_ has joined #ruby
codecop has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
<adaedra> Bish: doesn't seem to be.
eichenwald has joined #ruby
arup_r has quit [Remote host closed the connection]
platzhirsch has joined #ruby
<Bish> hm, im trying to translate a set of "filter expressions" into sequel.filter stuff
x^D has quit [Ping timeout: 240 seconds]
<platzhirsch> Is there a neater way of writing: array_of_hashes.map { |h| h['key'] } ?
spiman has quit [Ping timeout: 264 seconds]
DeXterbed has joined #ruby
<ljarvis> platzhirsch: what's not neat about that?
<Bish> platzhirsch: wat?
<platzhirsch> hah
<platzhirsch> like .map(&:method_name)
InvGhost has quit [Ping timeout: 272 seconds]
<ljarvis> no
<Bish> especially wha tyou wrote, "prettier" is just "array_of_hashes" :D
radgeRayden_ has joined #ruby
<ljarvis> they didn't say prettier but yeah
dlitvak_ has joined #ruby
<ljarvis> it's basically not possible, platzhirsch. Your code is fine
<platzhirsch> thanks
Xentil has quit [Read error: Connection reset by peer]
<vasilakisfil> is there a way to modify the each counter ?
dlitvak has quit [Read error: Connection reset by peer]
Xentil has joined #ruby
Xentil has quit [Read error: Connection reset by peer]
<Bish> how can i dynamicially create a proc that "ands" things?
<ljarvis> vasilakisfil: what?
<ljarvis> Bish: what?
<ljarvis> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<Bish> like [a,b,c] => Proc.new { a && b && c }
aufi has quit [Quit: Konversation terminated!]
<ljarvis> [a, b, c].all?
<Bish> no, i don't care about the result
<Bish> i need a proc for generating a sequel filter
Xentil has joined #ruby
<ljarvis> where does a && b && c come from inside the proc?
<Bish> sequel allows me to do things like dataset.where :id == 3 }
ibouvousaime has joined #ruby
Xentil has quit [Read error: Connection reset by peer]
kaka__ has quit [Ping timeout: 272 seconds]
<ljarvis> ok, we're getting there with some real info, more examples would be helpful
<ljarvis> ones that aren't a && b && c
Xentil has joined #ruby
devbug has joined #ruby
<Bish> yeah utf8 is broken in this terminal can't writ eit out
<vasilakisfil> http://pastie.org/private/nitwcnwouvs9bxgzjb3mq likes 84 - 91. I need somehow to remove the first item in the array, append another item in the array and keep looping over the array. I was thinking modifying the index in the each_with_index but it doesn't work
<ljarvis> Bish: gist.github.com
<Bish> i have filter expressions in an array like [{type:"equal",field:"fieldname",params:["peter"]}]
<ljarvis> vasilakisfil: use a new array for the new requests
<Bish> and i want dynamicially create a proc which puts them all together
<ljarvis> and a while loop
<Bish> right now i am doing
duckpuppy has joined #ruby
<Bish> table = table.where({field: /something/}) <=
<Bish> but that's pretty ugly, to me
<bradland> So I think I ended up answering some of my own questions while writing this up, but I'd love any feedback/comments on this gist: https://gist.github.com/bradland/559955fc61addf3c96ba
<ljarvis> Bish: that looks nice to me, and you can omit the curlies..
JohnBat26 has joined #ruby
<bradland> I'm trying to write a library for reading and parsing a UDP stream that is broadcast by the racing simulator ProjectCARS.
n008f4g_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
troulouliou_div2 has joined #ruby
arup_r has joined #ruby
<Bish> ljarvis: well a loop that does x = x.something
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> feels so broken :/ i feel like there has to be a better way
<ljarvis> ok, I dont think we have all of the code necessary to really help answer this but I guess I disagree that it feels broken
duckpuppy has quit [Ping timeout: 272 seconds]
<ddubs> bradland, have you started first with wireshark to get a feel for offsets and how they encode the data?
dlitvak_ has quit [Read error: Connection reset by peer]
Guest99717 is now known as saneax_AFK
dlitvak has joined #ruby
arup_r has quit [Ping timeout: 255 seconds]
<Bish> ljarvis: :( too bad sequel doesn't have .where! wonder why there isn't
<Bish> wonderful little gem, but this table = table.where stuff bugs me
atumzin has quit [Read error: Connection reset by peer]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
azgil has quit [Quit: Leaving]
pandaant has joined #ruby
yardenbar has quit [Ping timeout: 272 seconds]
benhuda has joined #ruby
rdark has quit [Quit: WeeChat 1.0.1]
sepp2k1 has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
<ljarvis> yes I dont really understand why but I still can't tell exactly what you're trying to do, I'm very familiar with Sequel
<ljarvis> you have multiple conditions and want to do a where OR instead of a where AND which is what the Sequel where method does?
p0wn3d_ has joined #ruby
<Bish> imagine i already have the conditions in another language
<ljarvis> sigh
<ljarvis> sorry I can't help
<Bish> :(
<Bish> okay what about this
<ljarvis> suggestion: write some actual code and put it on github so people can see exactly what you're trying to do
<Bish> i don't have a github account :(
tvw has quit [Remote host closed the connection]
<ljarvis> you don't need one
<ljarvis> again.. gist.github.com
p0wn3d has quit [Ping timeout: 272 seconds]
spiman_ has quit []
rgtk has quit [Remote host closed the connection]
<havenwood> Verde, ah left already. And I finished a pure Ruby implementation! :(
baweaver has quit [Ping timeout: 240 seconds]
FooMunki has quit [Quit: FooMunki]
<havenwood> I suppose there's use for this? >.> Maybe I'll make a little gem.
FooMunki has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<Bish> sorry for the indent, can't get it to work
<Bish> that's what im doing right now.
wmdrossard has quit [Ping timeout: 272 seconds]
steffkes has quit [Ping timeout: 272 seconds]
<ljarvis> that code would have been so useful all that time ago
<ljarvis> but thank you
<Bish> :3
<ljarvis> basically from an abstract view I think this is fine. Where do the filter strings come from? user-input?
<Bish> it 'url' get parameters
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<Bish> urlencoded, whatver its called
<ljarvis> hmm ok, do you do any sanitization or is this it?
<Bish> request.query is just {"key"=>"value"} then
howdoicomputer has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<Bish> this is it, but as i said i wasn't planning on keeping it this way
<ljarvis> well I think the part you dislike (the loop + @table = @table.xxx) is absolutely fine
<Bish> :(
<Bish> which part is not fine?
<Bish> using // on user input?
rdark has joined #ruby
rgtk has joined #ruby
<bradland> ddubs: i used tcpdump to grab the data, and it's identical to the pcars.dump content.
hobodave has joined #ruby
<Bish> why does sequel not have .where!
lipoqil has quit [Quit: Connection closed for inactivity]
rkazak has left #ruby [#ruby]
<bradland> so the game setting is a time interval, so i'm thinking it just dumps the contets of this C storage structure to the wire at the specified interval
arup_r has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
<bradland> that means i should be able to detect any non-zero value and read the length of the number of bytes that constitute SharedMemory.h
<bradland> ddubs: added the SharedMemory.h file to the gist. https://gist.github.com/bradland/559955fc61addf3c96ba
icey has quit [Ping timeout: 256 seconds]
banister has joined #ruby
<bradland> there's no clear licensing on that code (and it is copyright), so I may not be able to levae it up indefinitely.
rubio has joined #ruby
linocisco has joined #ruby
<adaedra> Bish: go ask jeremyevans in #sequel.
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Bish> that man has done enough for me
freerobby has quit [Quit: Leaving.]
TomPeed has joined #ruby
huyderman has quit [Remote host closed the connection]
ibouvousaime has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
<rubio> Hi there, i'm trying to make a dynamic module loading, basically my idea is that i have a class Customer and i will like to be able to do: customer_extended_functionality = first_customer.custom_module; so then i can call thinks inside customer_extended_functionality.proc1..... each customer will have a lib/custom/customer_id.rb file with a module Custom_id
<rubio> i have try something like @@custom = eval(File.new('lib/...').read) and i have the result BUT @@custom is not filled, so each time i need to read a custom function the system i re-loading the custom file :(
<rubio> ideas?
karidoe has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
InvGhost has joined #ruby
dlitvak has quit [Remote host closed the connection]
duckpuppy has joined #ruby
nerium has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has left #ruby [#ruby]
YankNYC has joined #ruby
rodfersou|lunch is now known as rodfersou
icey has joined #ruby
jas02 has quit [Quit: jas02]
duckpuppy has quit [Read error: No route to host]
goodcodeguy has joined #ruby
duckpuppy has joined #ruby
sucks has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
dfinninger has joined #ruby
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
scepticulous has quit [Ping timeout: 250 seconds]
<linocisco> hi all
<havenwood> hi
<rubio> hi
dravine has quit [Quit: dravine]
nfk|laptop has quit [Quit: yawn]
msankhala has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
hobodave has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
senayar has quit []
ornerymoose has quit [Quit: ornerymoose]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
moeabdol1 has quit [Ping timeout: 250 seconds]
p337rB has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 246 seconds]
cwong_on_irc has joined #ruby
<shevy> HI
bronson has joined #ruby
ascarter has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
iateadonut has quit [Ping timeout: 240 seconds]
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
queequeg2 has joined #ruby
tulak has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 260 seconds]
linocisco has quit [Ping timeout: 256 seconds]
akem has joined #ruby
optikalmouse has joined #ruby
<optikalmouse> has anyone had an issue with simplecov where it uses cached files? I’m working within a virtual machine and simplecov keeps reporting on a changed file. the # of lines of code are different even and I’ve removed the coverage folder so the cache it uses should be clear but it isn’t. am I missing smething?
synthroid has quit [Remote host closed the connection]
govg has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CpuID has quit [Ping timeout: 250 seconds]
DroidBur_ has joined #ruby
jbrhbr has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emrox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 240 seconds]
DroidBurgundy has quit [Ping timeout: 256 seconds]
idefine has quit [Remote host closed the connection]
goodcodeguy has joined #ruby
pdoherty has quit [Read error: Connection reset by peer]
idefine has joined #ruby
FooMunki has quit [Quit: FooMunki]
linocisco has joined #ruby
FooMunki has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
alvarolm has joined #ruby
<alvarolm> hi all ! :), im thinking in to use encryption (nacl) with http for an API with just one endpoint (e: http://api.service.com) is that a good idea ?
<cored> so I found a very interesting exception with the json validation Bish
<cored> if you have required fields in your schema but they are not part of your response, the validation passes
bMalum has joined #ruby
<apeiros> cored: "interesting"? wouldn't "bug" be the more fitting term?
eichenwald has left #ruby ["WeeChat 1.1.1"]
<shevy> hehe
InvGhost has joined #ruby
<shevy> you people are adding to my IRC quotes collection!
S01780 has joined #ruby
emrox has joined #ruby
<cored> apeiros: well, yeap that also can define it
emrox has quit [Client Quit]
wmdrossard has joined #ruby
bap1313 has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
rgtk has quit [Remote host closed the connection]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
lokulin has quit [Quit: bye!]
linocisco has quit [Quit: Leaving]
linocisco has joined #ruby
dfinninger has quit [Remote host closed the connection]
<linocisco> how can I learn ruby quickly?
Lucky__ has joined #ruby
<adaedra> Reading tutorials, trying to do some projects
<pabs> linocisco: i recommend the book "Programming Ruby" by dave thomas
<shevy> linocisco write as much code as you possibly can
<optikalmouse> linocisco: download it to your brain.
<bradland> linocisco: what's your background. is this your first language?
<linocisco> pabs, Programming Ruby 1.9 & 2.0
<linocisco> The Pragmatic Programmers’ Guide
<linocisco> Dave Thomas
<linocisco> with Chad Fowler
<linocisco> Andy Hunt?
<linocisco> sorry for my mulitlines
Pathfinder has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Snowy has quit [Remote host closed the connection]
<linocisco> bradland, I learnt C in 2001, C++ to the level I can only write screen saver in DOS. no OOP, No Pointers
<linocisco> bradland, now I forgot most of that
<shevy> go write your first gem, ideally a game in ruby
howdoicomputer has joined #ruby
<shevy> and publish it on rubygems.org too
phantummm has joined #ruby
Macaveli_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has joined #ruby
<bradland> linocisco: i'd second the recommendation of "Programming Ruby" by Dave Thomas
<linocisco> shevy, I am not willing to write game. even all Linux games I saw are not eye catching like windows games as far as I saw. I am just so much into learning ruby to learn rails in no time. My final goal is to develop a database driven website
edwinvdgraaf has quit [Ping timeout: 272 seconds]
<bradland> linocisco: I would also recommend "Design Patterns in Ruby" by Obie Fernandez
<linocisco> bradland, yes. thanks again. I have that book in soft copy. it covers 1.9. and 2.0 on cover
TomyLobo has joined #ruby
Hounddog has quit [Remote host closed the connection]
<bradland> that book will help you once you've learned the basics of the Ruby language
<linocisco> bradland, thanks alot
<bradland> godspeed
<c-c> linocisco: note that "eyecatching" will not have anything to do with platform
<shevy> oh rails
<c-c> for that one needs good artists! :)
devbug has quit [Ping timeout: 260 seconds]
rehat has joined #ruby
houhoulis has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
solars has quit [Ping timeout: 240 seconds]
<linocisco> bradland, I have seen that book "Design Pattern" . I am not fully aware of that and what it aims
howdoicomputer has quit [Ping timeout: 260 seconds]
<bradland> most of the problems you encounter will already have solutions
joonty has quit [Quit: joonty]
<bradland> a "design pattern" is an approach to solving a common problem
<bradland> it's a higher level concept than simply writing code
dravine has joined #ruby
shanemcd_ has quit [Remote host closed the connection]
<bradland> it has to do with how you structure your code
<linocisco> bradland, thanks. i see. so First book I should read is Programming Ruby and 2nd -> Design pattern?
<alvarolm> i offer an HTTP API which is part of a SaaS for a business client that exclusively uses TLS 1.2 on machines that have custom third party CAs, recently got a complaint that 'someone' has been changing their settings in the SaaS and exported records with their authorization, its not the first time that this happens, an I'm thinking that we might have to implement an encryption layer at the appliction level, Is a good idea to drop TLS and just use one endpoi
<alvarolm> nt using the NACL (http://nacl.cr.yp.to/) library ?
<bradland> linocisco: yes, that would be a sensible approach.
<bradland> if your target is web programming, i would suggest starting out with something like Sinatra, which is a simple library for authoring websites that are powered by ruby
timonv has quit [Ping timeout: 240 seconds]
<bradland> Sinatra is very, very simple. it maps routes (URL paths) to code, but that's all.
tomphp has quit [Ping timeout: 250 seconds]
<bradland> that will allow you to focus on writing Ruby code, rather than learning a framework.
synthroid has joined #ruby
cored has quit [Ping timeout: 250 seconds]
Couch has quit [Ping timeout: 250 seconds]
senayar has quit [Ping timeout: 272 seconds]
<bradland> depending upon your final application goals, you may choose to stay with Sianatra, or move to a larger framework, such as Ruby on Rails.
kerframil has joined #ruby
[Butch] has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
<jhass> alvarolm: elaborate on your motive? Why would TLS not be sufficient?
vasilakisfil has quit [Quit: Konversation terminated!]
colegatron has quit [Ping timeout: 250 seconds]
ornerymoose has joined #ruby
<alvarolm> <jhass> is seems that isn't, MitM atacks seems to be pretty common for us.
<bradland> sometimes business requirements dictate that data must be encrypted while at rest
<hxegon> linocisco, Practical object oriented design in ruby might be better if your beginning
rakm has joined #ruby
<jhass> alvarolm: are you maybe conflating transport encryption with authentication and your API lacks the latter?
rakm has quit [Client Quit]
B1n4r10 has joined #ruby
<bradland> alvarolm: pinning this on a MitM attack as a result of a TLS break is a pretty far stretch, unless you mean to say that someone has lost control of their CA.
<jhass> ^
ElFerna has joined #ruby
<bradland> in that case, it's "not your problem", but I know how this goes. sometimes it's your problem, regardless.
<bradland> if the business needs dictate that the data needs to be encrypted while at rest, then that's the requirement.
<jhass> alvarolm: in fact TLS is probably better protecting you from MITM than your own solution ever will. Avoiding replay attacks and such in the right way is hard
Pathfinder has quit [Ping timeout: 240 seconds]
<bradland> *however* I would not drop TLS.
<havenwood> Anyways, RipeMD-128 in pure Ruby: https://gist.github.com/havenwood/b39abc979402ecd1e496
shanemcd has joined #ruby
jbrhbr has quit [Quit: Leaving.]
<bradland> there's nothing silly about using TLS for transport, even if you're sending encrypted data.
<havenwood> The person who wanted it left, and now I've had no coffee and have to rush!
<havenwood> Maybe... one day... someone else will need it.
<havenwood> Oh well!
idefine has quit [Remote host closed the connection]
<bradland> well, i'm still adequately impressed, havenwood
<havenwood> bradland: ;)
<bradland> i'll star anything with Array#pack in it anyway
idefine has joined #ruby
<linocisco> hxegon, so learning ruby with OOP first? please dont get me more confused!! :P
<bradland> linocisco: i think he meant instead of the design patterns book.
<bradland> which isn't a terrible suggestion
amclain has joined #ruby
<hxegon> ^
yqt has joined #ruby
B1n4r10 has quit [Ping timeout: 260 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
<bradland> linocisco: Practical Object Oriented Design in Ruby is more general, which would help you understand the Design Patterns book better.
pietr0 has joined #ruby
<havenwood> pseudo-run the pseudo-code
<hxegon> linocisco, It's also a lot easier to get through, and ruby specific.
devbug has joined #ruby
pandaant has quit [Remote host closed the connection]
cassioscabral has joined #ruby
Pathfinder has joined #ruby
msankhala has quit [Ping timeout: 240 seconds]
davejlong has joined #ruby
jpfuentes2 has joined #ruby
msankhala has joined #ruby
alvarolm has quit [Quit: Leaving]
mloy has joined #ruby
snoozelose has joined #ruby
dfinninger has joined #ruby
tomphp has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
thezanke has joined #ruby
colegatron has joined #ruby
cored has joined #ruby
cored has quit [Changing host]
cored has joined #ruby
idefine has quit [Remote host closed the connection]
rgtk has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
RobertBirnie has joined #ruby
gaiada has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
DeXterbed has quit [Ping timeout: 246 seconds]
karidoe has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
scripore has joined #ruby
last_staff has joined #ruby
mclong has quit [Quit: Leaving]
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 240 seconds]
zast has joined #ruby
wolffles has joined #ruby
ElFerna has joined #ruby
Pathfinder_ has joined #ruby
Pathfinder has quit [Ping timeout: 240 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
chthon has quit [Ping timeout: 255 seconds]
mark3 has quit [Remote host closed the connection]
dlitvak has joined #ruby
ixti has joined #ruby
baweaver has joined #ruby
Xiti has quit [Quit: Xiti]
B1n4r10 has joined #ruby
goodcodeguy has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
firstdayonthejob has joined #ruby
nateberkopec has quit [Quit: Leaving...]
bensarz has joined #ruby
rakm has joined #ruby
<shevy> hmm calculating the md5sum takes quite a long while?
<jhass> who still uses md5 anyhow
hobodave has quit [Quit: Computer has gone to sleep.]
<jhass> it's like not using Unicode yet
snguyen has joined #ruby
<shevy> no
NeverDie has quit [Quit: http://radiux.io/]
rsc___ has joined #ruby
<shevy> I thought it would be fairly cheap but it's now the biggest bottleneck for a commandline ruby file
<shevy> now I can probably not show this information :(
<shevy> I am aiming to functionally clone and auto-generate pages similar to this http://www.linuxfromscratch.org/blfs/view/svn/general/ruby.html - one entry is md5sum ...
<shevy> I guess for a static .html this is no issue ... but on the commandline hmmmmm...
B1n4r10 has quit [Ping timeout: 246 seconds]
<bensarz> ruby n00b here... I've been googling the hell out of debugging techniques in ruby (I'm using Sublime Text 3). I found Pry and Debugger, (also debugger2) and ruby-debug and pry-byebug and just byebug... I'm using it on Ruby 2.2.3 and Rails 4.2.5. My question is this: is there a debugging standing that allows for break points, stepping over/in/out? I know I could be using RubyMine but I'm on the fence about the licensing...
<bensarz> don't hesitate to redirect me to articles/SO posts if the answer already exists out there
<shevy> hmm strange... the commandline md5sum shows the information almost instantly
<bensarz> couldn't find anything that was less than a year or two old
<jhass> bensarz: pry-byebug does that and would be my recommendation
<bensarz> *debugging standard
rsc___ has quit [Ping timeout: 240 seconds]
<jhass> perhaps adding pry-stack_explorer and pry-doc to the mix
howdoicomputer has joined #ruby
Alayde has joined #ruby
<bensarz> ok awesome, that's good to know, it felt like pry was a bit outdated but I'm probably wrong
<shevy> require 'digest/md5reverse' is no longer available?
Alayde has left #ruby [#ruby]
<jhass> bensarz: yes, very :P
jbrhbr has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
msx has quit [Ping timeout: 272 seconds]
juddey has joined #ruby
hahuang65 has joined #ruby
howdoicomputer has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
dhollinger has quit [Ping timeout: 246 seconds]
nkwsy has joined #ruby
Macaveli has joined #ruby
baweaver has joined #ruby
colleenmcguckin has joined #ruby
shanemcd has quit [Read error: Connection reset by peer]
iwaffles has joined #ruby
momomomomo has joined #ruby
shanemcd has joined #ruby
bronson has joined #ruby
NeverDie has joined #ruby
nateberkopec has joined #ruby
howdoicomputer has quit [Quit: WeeChat 1.3]
benhuda has joined #ruby
shanemcd has quit [Read error: Connection reset by peer]
<bradland> shevy: you sure that was ever Stdlib?
shanemcd has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Pathfinder_ has quit [Ping timeout: 256 seconds]
yqt has quit [Ping timeout: 260 seconds]
dlitvak_ has joined #ruby
Peg-leg has quit [Quit: Leaving.]
jbrhbr has joined #ruby
ElFerna has quit [Quit: WeeChat 1.3]
msankhala has quit [Ping timeout: 260 seconds]
frem has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
momomomomo has quit [Quit: momomomomo]
baweaver has quit [Remote host closed the connection]
tenderlove has joined #ruby
duckpuppy has joined #ruby
pumpkinlemma has joined #ruby
pdoherty has joined #ruby
pumpkinlemma has left #ruby ["WeeChat 0.3.8"]
bungoman has quit []
[Butch] has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
juddey has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
aspire has quit [Quit: Leaving]
[Butch] has joined #ruby
arup_r has quit []
Pathfinder has joined #ruby
howdoicomputer has joined #ruby
advent1 has joined #ruby
baweaver has joined #ruby
snoozelose has quit [Quit: Leaving]
snoozelose has joined #ruby
Insti has quit [Ping timeout: 245 seconds]
krzkrz has quit [Quit: WeeChat 1.2]
colleenmcguckin has quit [Read error: Connection reset by peer]
snoozelose has quit [Remote host closed the connection]
Insti has joined #ruby
snoozelose has joined #ruby
colleenmcguckin has joined #ruby
troulouliou_div2 has quit [Ping timeout: 260 seconds]
dfinninger has quit [Remote host closed the connection]
snoozelose has quit [Remote host closed the connection]
dlitvak_ has quit [Remote host closed the connection]
nertzy has joined #ruby
davejlong has quit [Remote host closed the connection]
tortle has joined #ruby
optikalmouse has quit [Quit: optikalmouse]
tortle has quit [Remote host closed the connection]
snoozelose has joined #ruby
dionysus69 has joined #ruby
snoozelose has quit [Remote host closed the connection]
kaka__ has joined #ruby
bensarz has quit [Quit: Textual IRC Client: www.textualapp.com]
c0m0 has quit [Ping timeout: 256 seconds]
linocisco has quit [Ping timeout: 255 seconds]
kaka__ has quit [Read error: Connection reset by peer]
gaiada has quit [Ping timeout: 256 seconds]
jbrhbr has quit [Quit: Leaving.]
advent1 has left #ruby [#ruby]
juddey has joined #ruby
ElFerna has joined #ruby
DroidBur_ has quit []
kalopsian has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
DeXterbed has joined #ruby
jbrhbr has joined #ruby
nettoweb has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
dlitvak has joined #ruby
steffkes has joined #ruby
sneakerhax has joined #ruby
gregf has quit [Ping timeout: 240 seconds]
snockerton has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tenderlove has quit [Ping timeout: 256 seconds]
dfinninger has joined #ruby
<Papierkorb> how do I convert a Fixnum from network byte order to host byte order?
dlitvak has quit [Ping timeout: 240 seconds]
<pipework> Papierkorb: Isn't network usually big and most computers are big, so you'll just have to detect if the machine is little and then handle that?
<pipework> Or are you needing help handling, not just detecting?
<Papierkorb> pipework: handling, I know that the received stuff is in network order (so yes, big endian), and need to turn it into host order. host order is little endian here
<jhass> Papierkorb: I don't it's possible to have an actual Fixnum instance in the wrong byte order
<Papierkorb> it's a small script, don't really care if it just fits that case
<jhass> that is if you have the way you obtain it is what needs fixing, not the Fixnum itself
FooMunki has quit [Quit: FooMunki]
<Papierkorb> huh
<jhass> *don't think
<pipework> Yeah, I don't even understand what that meant.
<Papierkorb> Why should a Fixnum care what the byte order it is in?
<jhass> that's my point?
<Papierkorb> I need to reverse it byte-wise
<Papierkorb> Nothing else.
<jhass> Are you asking how to use Array#pack?
<pipework> You'll likely need to use some String#unpack too.
<pipework> Or #unpack whatever.
nettoweb has quit [Ping timeout: 240 seconds]
shanemcd has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 260 seconds]
<bradland> Papierkorb: the reason you're having difficulty getting an answer is because the question isn't entirely clear. internally, you can't affect the byte order of Fixnum within Ruby. you can only affect the byte order of buffers (strings in Ruby).
<bradland> so you read from the wire in to a string, then use pack/unpack to change the byte order for what will be sent back out over the wire, or persisted somewhere.
<Papierkorb> I have a Fixnum which I get out of a HEX string which is in big endian. Need a fixnum out of it using whatever the host uses, possibly doing endian conversion
<pipework> reverse that
agent_white has quit [Quit: brb]
berserk_ren has joined #ruby
<bradland> Papierkorb: you'll need to post some code to get more help than what you've got so far.
<Papierkorb> bradland: parts[7].to_i 16
<Papierkorb> that's litterally it.
antgel has quit [Quit: leaving]
<bradland> and parts[7] is a string value, I presume?
<jhass> Papierkorb: use String#unpack instead
<bradland> ^^
<jhass> possibly twice to turn the hex into actual bytes and then decode the number
<bradland> highly recommended that you get familiar with String#unpack and Array#pack if you're going to work with bytes
<pipework> See my last link.
<pipework> kinda covers the last minute or so of the chat.
<Papierkorb> And all I need is ntohl()
<jhass> String#unpack is Ruby's interface to exactly that function
<jhass> well s/exactly//
vifino has quit [Remote host closed the connection]
<bradland> also, recommend that you set your string encoding to BINARY when creating/modifying strings you intend to use as binary buffers
<jhass> but functionality class wise
ruby-lang706 has joined #ruby
antgel has joined #ruby
<ruby-lang706> hi can anyone help me with a quesiton i have
<havenwood> ruby-lang706: ask away!
bithon has quit [Changing host]
bithon has joined #ruby
podman has joined #ruby
<ruby-lang706> it is most likely easy to most of you as i am still learning
ascarter has quit [Remote host closed the connection]
<jhass> no worries
agent_white has joined #ruby
<ruby-lang706> i am doing practice problems and it asks that i create a method that takes an array of integers and returns the sum of all the odd parts
<ruby-lang706> two problems i am encountering
yqt has joined #ruby
hobodave has joined #ruby
<bradland> Papierkorb: i'll see if i can wire up a method def for you, but i need a few to get through my current work item.
norc has joined #ruby
suffice has quit [Remote host closed the connection]
<ruby-lang706> if someone gives it anything other than a number it returns non defined local variable
ascarter has joined #ruby
<Papierkorb> bradland: Bit twiddling hacks are no issue. main concern was if there was a fast built-in for that
<jhass> ?code ruby-lang706
<ruboto> ruby-lang706, We can't help you without your code, please post it to https://gist.github.com
<ruby-lang706> also i dont know how to add the elements in the index but i can output the odd ones
baweaver has quit [Remote host closed the connection]
<ruby-lang706> ok give me a few i will create a gist
<bradland> Papierkorb: Array#pack and String#unpack are the fastest (performance wise)
<bradland> i've benchmarked them
<norc> bradland: Since I just hopped in, what is this about? You peaked my curiosity already.
<jhass> Papierkorb: I think the core issue here is that you're asking for specific way to solve it. Give us exact input and exact desired output and soon enough you'll have the most adequate solution
<hxegon> quick room poll; Anyone here used a text editor and then switched to rubymine? or vice versa?
<Papierkorb> jhass: sniffing USB data. https://www.kernel.org/doc/Documentation/usb/usbmon.txt
<bradland> reversing the byte order of a string buffer
<Papierkorb> jhass: and make it *fast*. not convenient to code. just go fast.
dhollinger has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
hectortrope has quit [Read error: Connection reset by peer]
<jhass> Papierkorb: ok. give us the .inspect of your source data and the value you want out of it
<norc> Papierkorb: If you want it done fast, dont do it in Ruby. Write an extension and use FFI.
astrobunny has quit [Ping timeout: 250 seconds]
<bradland> Array#pack and String#unpack are highly optimized
dlitvak has joined #ruby
<Papierkorb> norc: I'm already considering calling into the libc. I've forgotten though if htonl() was a glibc macro or not
<bradland> i wouldn't be surprised if they beat the overhead of FFI for such a basic operation
gagrio_ has joined #ruby
jzigmund_ has joined #ruby
<ruby-lang706> this is the gist link
nettoweb has joined #ruby
<norc> bradland: Mmm
<eam> Papierkorb: have you considered using FFI to do your conversions for you?
vondruch has quit [Ping timeout: 240 seconds]
<pipework> Have you considered just using String#unpack and Array#pack and benchmarking it against whatever you think would be faster?
<ruby-lang706> i am trying to add the elements that are odd but i only output them, also if given anything other than a number my method has an error
<Papierkorb> pipework: I'm writing a benchmark. I can't do everything at once.
<eam> oh, I see bradland beat me to the recommendation while I was reading sb
jzigmund has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby
<pipework> Papierkorb: Then you're clearly not an emacs user
gagrio has quit [Ping timeout: 256 seconds]
<Papierkorb> Neither vim
<norc> Papierkorb: I think this is where premature optimization will be an issue.
<eam> the nice thing about FFI is you're likely dealing with entire structs, not just ints
<bradland> to be clear, i haven't benchmarked them against FFI, personally
<eam> and it'll handle that for you
davejlon_ has joined #ruby
<norc> Papierkorb: Using unpack/reverse!/pack should be sufficiently fast like bradland says. If its an issue, you can still find another solution.
<Papierkorb> norc: no. this is a self-contained, 20 line ruby script. it could even be a bash script.
<jhass> ruby-lang706: and what's the exact error message you're getting?
dlitvak has quit [Ping timeout: 260 seconds]
<norc> Papierkorb: My point is, try unpack/reverse!/pack and see how it performs.
<Papierkorb> norc: [20:09] <Papierkorb> pipe_nohighlight_work: I'm writing a benchmark. I can't do everything at once.
f00bar-32 has joined #ruby
<norc> Papierkorb: You spent more time here discussing this than trying it out would have cost you. ;-)
<ruby-lang706> @jhass if someone passed the method anything other than a number it returns non defined local variable
<ruby-lang706> the other thing is im not adding the elements only seperating them
<jhass> ruby-lang706: I don't think that's the exact error message you get from Ruby
<jhass> as a programmer you need to be precise
<bradland> and here i am frantically copy/pasting in to a spreadsheet so i can deconstruct this SharedMemory.h file :)
<jhass> ruby-lang706: also one issue at a time
<ruby-lang706> @jhass it says nameerror
<jhass> ruby-lang706: I've never seen Ruby say just "nameerror"
<ruby-lang706> "undefined local variable or method" when the method i used is passed something other than a number
<jhass> there's usually a ton more context alongside it
<jhass> still vague
jzigmund_ has quit [Ping timeout: 255 seconds]
<jhass> I'll just keep asking you for the exact error messages you're getting until you provide them
Bloomer has quit [Remote host closed the connection]
<ruby-lang706> <NameError: undefined local variable or method `hello' for main:Object> > @jhass
<ruby-lang706> is when i pass "hello" to my method
yos7ph has joined #ruby
bronson has quit [Remote host closed the connection]
gagrio_ has quit [Ping timeout: 272 seconds]
<jhass> do you pass the string "hello" or the bare word hello?
baweaver has joined #ruby
<ruby-lang706> odd_sum(hello)
<ruby-lang706> and i get the error
<jhass> ruby-lang706: well, that's quite expected, the hello there is a local variable or method call
<jhass> but neither a local variable nor method hello is available
pwnd_nsfw has quit [Ping timeout: 240 seconds]
jzigmund has joined #ruby
<jhass> did you mean to odd_sum("hello") ?
<jhass> passing the string "hello"?
<ruby-lang706> no
<ruby-lang706> just using it to see if it would make an error i think?
<jhass> then I don't see what kind of value you expect hello to be
<ruby-lang706> not sure why i used hello
zeroDivisible has joined #ruby
<jhass> well, it made an error, no?
<ruby-lang706> error yes
<Papierkorb> https://gist.github.com/Papierkorb/81a406af843275ca0db6 the #pack dance is abysmally slow
<Papierkorb> Which is expected with its GC overhead
nertzy has quit [Quit: This computer has gone to sleep]
Renich has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang706> @jhass if i use "hello" i get this as error => #<TypeError: no marshal_dump is defined for class Proc> >
saddad has joined #ruby
<jhass> ruby-lang706: on which line of your code?
pdoherty has quit [Ping timeout: 272 seconds]
<ruby-lang706> how can i tell which line has the error?
<jhass> it's in the full error message
<jhass> file:line
shanemcd has joined #ruby
<ruby-lang706> i copied and pasted full error
<jhass> I don't think so
<ruby-lang706> thats all that is there
<jhass> you do ruby foo.rb or what?
<ruby-lang706> idk what that is
NeverDie has joined #ruby
norc has quit [Ping timeout: 252 seconds]
ElFerna has joined #ruby
saddad has quit [Client Quit]
jpfuentes2 has joined #ruby
saddad has joined #ruby
dfinninger has quit [Remote host closed the connection]
dfinninger has joined #ruby
kalopsia1 has joined #ruby
howdoi has joined #ruby
zast has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
Pathfinder_ has joined #ruby
<ruby-lang706> ok well i guess error messages not going to be resolved
<ruby-lang706> maybe help me with how to add the elements once i have the odd ones?
Pathfinder has quit [Ping timeout: 246 seconds]
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
optikalmouse has joined #ruby
shanemcd has quit [Ping timeout: 256 seconds]
<jhass> ruby-lang706: how do you use ruby?
<ruby-lang706> beginner
<bradland> Papierkorb: did you work out a solutoin?
<bradland> I just wrapped up my other work.
Renich has quit [Quit: leaving]
lxsameer has quit [Remote host closed the connection]
shanemcd has joined #ruby
<Papierkorb> bradland: but replace the :int with :uint32
kalopsian has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
<bradland> looks like FFI wins!
momomomomo has joined #ruby
<jhass> ruby-lang706: no literally, how? how do you run your ruby code?
<ruby-lang706> im using a site that runs it
gagrio_ has joined #ruby
<ruby-lang706> try ruby
Cohedrin has joined #ruby
<bradland> a = 0x11223344
<bradland> sry
<jhass> uh
<jhass> oh well
<jhass> isn't try ruby running a fake interpreter?
<jhass> I'm surprised it even allows Proc.new
lkba has joined #ruby
<ruby-lang706> idk what that means
<bradland> Papierkorb: eh, i'm not sure this benchmark is valid
pwnd_nsfw has joined #ruby
<jhass> ruby-lang706: you can rewrite your select to odd_numbers = numbers.select {|number| number.even? }
<Papierkorb> bradland: ?
<bradland> for bits and ntoh, you're operating on a Fixnum, but for pack/unpack you're operating on a string
solars has joined #ruby
<jhass> ruby-lang706: and compute the sum using ri:Enumerable#reduce
<bradland> so, presumably, this value comes from somewhere over a wire, right?
<`derpy> method `Enumerable#reduce`: Combines all elements of enum by applying a binary operation, specified by a blo… • http://rubydoc.info/stdlib/core/Enumerable#reduce-instance_method
tomaz_b has joined #ruby
<bradland> which is going to be IO, which will result in a string
<bradland> not a Fixnum
<Papierkorb> bradland: no, that's fine. that's what I get, and I'm just taking advantage of it there
<bradland> so, you get a Fixnum?
<Papierkorb> bradland: so, in fact, I'm doing it an favor and it's still 5x slower
<Papierkorb> no, i get a hex string.
<bradland> in the pack benchmark, you're performing extra work
<ruby-lang706> @jhass so my method is all wrong?
<Papierkorb> bradland: mh?
<jhass> ruby-lang706: it's rather unidiomatic/convoluted
<ruby-lang706> why do you search for even numbers then reduce? i dont quite understand the doc on .reduce
<jhass> ruby-lang706: oh right, .odd? not .even?, sorry
<jhass> ruby-lang706: did you look at the examples? there's one for summing right there
<ruby-lang706> it just adds the range?
<ruby-lang706> yes but i dont understand it exactly
<bradland> Papierkorb: the bits and ntoh bencmarks are starting with a Fixnum, while pack has to start from a String
<ruby-lang706> will it exclude the even since we are using the odd? method?
<bradland> which results in extra pack/unpack calls
<bradland> not that i think it's going to get down to 0.09s, but it's worth noting
<bradland> this is not apples-to-apples
<jhass> ruby-lang706: the select will give you new array with only the odd numbers, that new array is what you should use reduce on to sum
kadoppe has quit [Ping timeout: 256 seconds]
cassioscabral_ has joined #ruby
<jhass> (reduce/inject are two names for the same method)
kirun has joined #ruby
<bradland> if you start with a string, your benchmarks for bits and ntoh need to do the work of converting from String to Fixnum within the benchmark
cassioscabral has quit [Ping timeout: 240 seconds]
cassioscabral_ is now known as cassioscabral
<ruby-lang706> ok i have to read about those methods idk them
kadoppe has joined #ruby
ur5us has joined #ruby
norc has joined #ruby
<shevy> ruby-lang706 .select is trivial, you select based on the conditions you put inside your {} block
<norc> unit.send(:*, arg).to('db')
<norc> Why does this feel so ugly. :(
Zamerick has joined #ruby
blaxter has quit [Ping timeout: 256 seconds]
<shevy> because you write ugly code!
whiteline has quit [Ping timeout: 240 seconds]
dmolina has joined #ruby
<ruby-lang706> i havent seen .reduce or .inject so maybe trivial to you guys but new to me
<norc> Or is there another way to chain operators that Im not away of?
devbug has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sulky has quit [Ping timeout: 256 seconds]
optikalmouse has left #ruby [#ruby]
whiteline has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
ElFerna has quit [Quit: WeeChat 1.3]
sulky has joined #ruby
momomomomo has quit [Quit: momomomomo]
ElFerna has joined #ruby
<jhass> norc: I'd prefer (unit * arg).to('db')
jackjackdripper has quit [Quit: Leaving.]
B1n4r10 has joined #ruby
jackjackdripper has joined #ruby
cored has quit [Ping timeout: 265 seconds]
momomomomo has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has quit [Client Quit]
emrox has joined #ruby
devbug has quit [Remote host closed the connection]
devbug has joined #ruby
jdm_ has quit [Quit: Leaving]
devbug has quit [Remote host closed the connection]
goodcodeguy has joined #ruby
devbug has joined #ruby
<shevy> ruby-lang706 yeah that name is a bit weird
<ruby-lang706> i was getting undefined method name for reduce but when i used .inject it worked
centrx has joined #ruby
<shevy> I myself use .inject as well
<ruby-lang706> glad i found inject i was trying to index the elements and was thinking i had to add each one depending on the length xD
<ruby-lang706> thank you guys
<jbrhbr> inject seems kinda funky to me
<ruby-lang706> is there any major difference between .reduce or .inject? can they be used interchangably?
<jbrhbr> at least the memo form
troulouliou_dev has joined #ruby
cored has joined #ruby
cored has quit [Changing host]
cored has joined #ruby
hectortrope has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
<ruby-lang706> my other question i might not be asking correctly
<ruby-lang706> how do i make the method more usable?
<ruby-lang706> if i give anything other than number it errors
troulouliou_dev has joined #ruby
<jhass> ruby-lang706: yes reduce and inject are aliases of each other, they're the same method
<jhass> ruby-lang706: what result would you expect for odd_sum("hello", "world")?
troulouliou_dev has quit [Max SendQ exceeded]
pdoherty has joined #ruby
idefine has quit [Remote host closed the connection]
<ruby-lang706> @jhass i would expect maybe helloworld ?
troulouliou_dev has joined #ruby
<jhass> why? what has that to do with the operation "sum all odd numbers"?
Pumukel has joined #ruby
<ruby-lang706> what if the person using our method types in a string or something?
<jhass> then they made a mistake in using the method and should receive an error, no?
<jbrhbr> you can either do validation or it's their problem
<ruby-lang706> i ran the odd_sum("hello", "world") and got #<NoMethodError: undefined method `odd?' for "hello":String>
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yos7ph has quit [Quit: Leaving]
znz_jp has quit [Ping timeout: 250 seconds]
treehug88 has joined #ruby
cored has quit [Ping timeout: 240 seconds]
dfinning_ has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
norc has quit [Ping timeout: 252 seconds]
<ruby-lang706> @jhass what is validation?
<jhass> raise ArgumentError.new("Expected only numbers") unless numbers.all? {|number| number.is_a? Numeric } for example
<jhass> I wouldn't recommend it here
dlitvak has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
blackmesa has joined #ruby
pawnbox has quit [Remote host closed the connection]
<ruby-lang706> @jhass that is new to me i have to read about that
pawnbox has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
skade has joined #ruby
speakingcode has quit [Ping timeout: 256 seconds]
kristianpaul has joined #ruby
pawnbox has quit [Remote host closed the connection]
speakingcode has joined #ruby
xaxisx has joined #ruby
momomomomo has joined #ruby
JohnBat26 has joined #ruby
dimik has joined #ruby
shanemcd has quit [Remote host closed the connection]
ascarter has joined #ruby
shanemcd has joined #ruby
dlitvak_ has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
dfinning_ has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
pawnbox has joined #ruby
jbrhbr has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
shanemcd has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
steffkes has quit [Ping timeout: 255 seconds]
eytanfb has joined #ruby
hakunin has left #ruby [#ruby]
trautwein has joined #ruby
wolffles has quit [Quit: wolffles]
houhoulis has joined #ruby
momomomomo has quit [Quit: momomomomo]
trautwein has quit [Client Quit]
pawnbox has quit [Ping timeout: 255 seconds]
phantumm1 has joined #ruby
S01780 has quit []
dfinninger has joined #ruby
steffkes has joined #ruby
steffkes has joined #ruby
dfinninger has quit [Remote host closed the connection]
lkba_ has joined #ruby
dfinninger has joined #ruby
phantumm1 has quit [Client Quit]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
houhoulis has quit [Ping timeout: 272 seconds]
leat has left #ruby [#ruby]
nkwsy has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
wasane has joined #ruby
Pathfinder has joined #ruby
yfeldblum has joined #ruby
Jackneill has quit [Quit: Leaving]
lkba has quit [Ping timeout: 260 seconds]
Pathfinder_ has quit [Ping timeout: 240 seconds]
wasane has quit [Client Quit]
jgt3 has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
kerframil has quit []
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackgoat has joined #ruby
iwaffles has quit [Quit: iwaffles]
ElFerna has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
Phage has left #ruby [#ruby]
ascarter has joined #ruby
ElFerna has quit [Remote host closed the connection]
S01780 has joined #ruby
rodfersou has quit [Ping timeout: 272 seconds]
shanemcd has joined #ruby
baweaver has quit [Ping timeout: 265 seconds]
berserk_ren has quit [Ping timeout: 255 seconds]
eytanfb has quit [Remote host closed the connection]
ElFerna has joined #ruby
shanemcd has quit [Client Quit]
nettoweb has joined #ruby
aryaching has joined #ruby
houhoulis has joined #ruby
saneax_AFK is now known as saneax
Idakyne has joined #ruby
saneax is now known as Guest25637
djbkd has joined #ruby
bbert has joined #ruby
bbert has quit [Changing host]
bbert has joined #ruby
ElFerna has quit [Quit: WeeChat 1.3]
hahuang65 has quit [Ping timeout: 240 seconds]
Phage has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: I'm out . . .]
pawnbox has joined #ruby
<bithon> hello. anyone here use rbenv? i'm having a slight issue with setting up global ruby version on my system
<bithon> i issue a following command 'rbenv global 2.2.3', yet older version is still the default (i.e. when i do ruby -v i get 2.2.2)
<jhass> `which ruby` ?
<bithon> ~/.rbenv/shims/ruby
<bithon> hmm
pawnbox has quit [Ping timeout: 240 seconds]
* jhass shrugs
<jhass> (while true; do rbenv rehash; done) &
jbrhbr has quit [Quit: Leaving.]
<bithon> is this a bug or something
<bithon> oh
<bithon> nvm
<bithon> lol silly me
<bithon> yes forgot to rehash
<bithon> thanks jhass
<bithon> haven't used rbenv in months
nfk|laptop has joined #ruby
Pathfinder_ has joined #ruby
AlphaAtom has joined #ruby
pwnd_nsfw has joined #ruby
Pathfinder has quit [Ping timeout: 240 seconds]
TheBloke- is now known as TheBloke
skade has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
<adaedra> jhass: dat solution.
<jhass> adaedra: problem?
<adaedra> I'd have thought you would come with a more efficient one. :p
<jhass> meh, don't care enough about rbenv
nfk|laptop has quit [Ping timeout: 240 seconds]
howdoicomputer has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
webus has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<shevy> you use rvm?
<jhass> no
s2013 has joined #ruby
idefine has quit [Remote host closed the connection]
<havenwood> shevy: Do your research! :P
s2013 has quit [Read error: Connection reset by peer]
Rotwang has quit [Quit: Lost terminal]
bronson has joined #ruby
<shevy> aaah
<shevy> the yoghurt package manager
norc has joined #ruby
xaxisx has quit [Quit: xaxisx]
norc has quit [Changing host]
norc has joined #ruby
norc has joined #ruby
rubio has quit [Quit: This computer has gone to sleep]
<hxegon> the best ruby version manager is arch linux clearly
dlitvak has joined #ruby
xaxisx has joined #ruby
xaxisx has quit [Client Quit]
minimalism has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<norc> Hi folks. I somehow have this script lying around http://pastie.org/10634816# (I removed basically a few hundred lines of crap code instead of that task.execute). Is there a more elegant way to parallelize this?
rakm has joined #ruby
dlitvak has quit [Remote host closed the connection]
monthy has quit [Read error: Connection reset by peer]
<norc> There are only a few hundred nodes around, so I have no need for a worker pool and what not
dlitvak_ has quit [Ping timeout: 265 seconds]
p0wn3d_ has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
hahuang65 has joined #ruby
butterlord has joined #ruby
<butterlord> I need some help... I need to change a chunk of HTML on a header/topbar on a specific page. Is this possible? Basically if its the page i specify, display the altered HTML, if not display the normal
idefine has joined #ruby
tomaz_b has quit [Quit: Leaving]
thezanke has quit [Quit: Leaving]
webus has quit [Ping timeout: 256 seconds]
Idakyne has quit [Ping timeout: 240 seconds]
<norc> butterlord: Is this about rails?
eytanfb has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard_ has joined #ruby
stannard_ has quit [Remote host closed the connection]
stannard_ has joined #ruby
idefine has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
<bithon> butterlord: best. name. ever.
<slash_nick> What's the best way to get `cat path/to/thesefiles_*_*.csv` with ruby?
xaitec has joined #ruby
<slash_nick> I'm assuming I can do it with a oneliner without shelling out
xaitec has quit [Remote host closed the connection]
drys has quit [Ping timeout: 240 seconds]
<jhass> Pathname.glob("path/to/thesefiles_*_*.csv").map(&:read).join
<adaedra> slash_nick: `Dir['path/to/thesefiles_*_*.csv'].map(&IO.method(:read)).join
wrivera has joined #ruby
<adaedra> lacks a closing `.
jgt3 has joined #ruby
darkf has quit [Quit: Leaving]
<slash_nick> thanks you two :)
davedev2_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
agentmeerkat has quit [Quit: Lost terminal]
Pathfinder_ has quit [Ping timeout: 272 seconds]
Pathfinder has joined #ruby
rgtk has quit [Remote host closed the connection]
webus has joined #ruby
atomical_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
jgt3 has quit [Ping timeout: 246 seconds]
Moonman has joined #ruby
Moonman was kicked from #ruby by ChanServ [User is banned from this channel]
gizless has joined #ruby
<adaedra> õ_o
finisherr has joined #ruby
Pathfinder has quit [Remote host closed the connection]
<finisherr> Where can I find some good literature on metaprogramming concepts?
atomical has quit [Ping timeout: 240 seconds]
<finisherr> I'm trying to basically generate methods and classes
lemur has joined #ruby
<hxegon> finisherr, try the seventh level of hell, I hear they have an excellent library. </jk>
failshell has joined #ruby
<finisherr> ha
<finisherr> I'm just seeing a lot of repetition in some code I'm writing
<finisherr> maybe i can leverage define_method a bit
<finisherr> but that's about all i'm aware of
gizmore has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
quazimodo has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
<norc> finisherr: Just please, whatever you do. Don't use method_missing. :(
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
skade has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
bodgix has joined #ruby
CaptainCibai has joined #ruby
momomomomo has joined #ruby
baweaver has joined #ruby
davedev24 has joined #ruby
c355e3b has joined #ruby
<shevy> finisherr there isn't that much really; you have ... define_method method_missing respond_to? and the various *eval* variants
<finisherr> This might be the wrong approach
<shevy> and some hooks
wildlander has joined #ruby
<finisherr> I'll try to find a good pattern that fits the mold a bit
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has quit []
calderonroberto has joined #ruby
Cohedrin has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
<norc> finisherr: Basically most of the time using various forms of mixins (especially prepend), together with various techniques of defining methods and send gets you pretty far.
davedev2_ has quit [Ping timeout: 240 seconds]
DeXterbed has quit [Ping timeout: 256 seconds]
wrivera has quit []
CaptainCibai has quit [Remote host closed the connection]
<shevy> ah yes I forgot about .send
CaptainCibai has joined #ruby
<shevy> finisherr if you wanna go totally crazy, also use Fiddle and manipulate pointers
<norc> That has nothing to do with metaprogramming...
<shevy> there used to be a collection of evil code in a file called evil.rb
<shevy> norc I consider what Ox0dea is doing absolutely meta
<hxegon> necronomicon.rb
juddey has quit [Ping timeout: 260 seconds]
<norc> shevy: The whole point of metaprogramming extends on reflection, ducktyping - these sorts of things. When you start breaking down into the memory (i.e. Fiddle), that is the exact opposite way..
<norc> Its not abstraction, its implementation.
CaptainCibai has quit [Client Quit]
solars has quit [Ping timeout: 260 seconds]
<mg^> "Is_1_8 = RUBY_VERSION[/\A1.[678]/]"
finisherr has quit [Quit: finisherr]
<mg^> might be 1.8, or approximately so
<norc> Ah, that is still using DL.
<shevy> evil.rb was cool
juddey has joined #ruby
<ruby-lang706> can someone help me with understanding http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-each_cons
dlitvak has joined #ruby
<ruby-lang706> if i add .inject with the each_cons
brendan- has joined #ruby
<ruby-lang706> will it add the last index in the array with index 0?
rubio has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
dlitvak has quit [Remote host closed the connection]
TomPeed has quit [Client Quit]
sucks has quit [Ping timeout: 255 seconds]
TomPeed has joined #ruby
TomPeed has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
jbrhbr has joined #ruby
Lucky__ has quit [Ping timeout: 272 seconds]
last_staff has quit [Quit: last_staff]
<baweaver> ruby-lang706: what are you trying to do?
kerframil has joined #ruby
<baweaver> also, consider picking a nickname
<ruby-lang706> @baweaver i am trying to add 3 consecutive elements in an array to see if they add up to 8
<baweaver> lets take another step back
<baweaver> what is the entire problem?
<ruby-lang706> create method which takes in an array of integers and returns true if any three consecutive elements sum to 8
<ruby-lang706> practice problem im learning ruby
<baweaver> any three
<baweaver> each cons won't work
<baweaver> that's each consecutive 3
<ruby-lang706> each con is 0,1,2 then 3,4,5 ?
<baweaver> !try
<baweaver> hm
<baweaver> why don't you try and find out?
<ruby-lang706> not 0,1,2 then 1,2,3 ?
<baweaver> ruby comes with irb to experiment with
<baweaver> learn to use it, it's a requirement to use ruby well
<ruby-lang706> im using it froma browser
<ruby-lang706> how do i use irb
<jbrhbr> install ruby on your machine and type irb
<baweaver> the next thing you want to learn is how to properly search the internet for things
howdoicomputer has joined #ruby
<baweaver> such as putting in google: "How do I use irb?"
<ruby-lang706> i thought i searched i was confused thats why i asked
<ruby-lang706> i didnt know of irb until u just told me
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
rakm has joined #ruby
rakm has quit [Client Quit]
cassioscabral has quit [Quit: cassioscabral]
<baweaver> so it was consecutive, misread it.
jgt3 has joined #ruby
wmdrossard has quit [Ping timeout: 256 seconds]
<baweaver> find out what each_cons returns in irb
nfk|laptop has joined #ruby
davejlon_ has quit []
<baweaver> then look for a method that will "find" something or return nothing
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mg^> each_cons, nice little method
howdoicomputer has quit [Ping timeout: 246 seconds]
<baweaver> but honestly if you're learning to program I would not use that method
aspire has joined #ruby
<baweaver> why, you may ask? Ask yourself how it's implemented. If you can't answer that you should always consider digging a little deeper.
ESpiney has quit [Quit: Leaving]
InvGhost has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
oddmunds has quit [Quit: WeeChat 1.3]
<baweaver> the hint I would give on the implementation of each_cons has something to do with a Stack using push and pop on Array
elektronaut has quit [Quit: ZNC - http://znc.in]
kmckelvi1 has joined #ruby
ornerymoose has quit [Ping timeout: 265 seconds]
stannard_ has quit [Remote host closed the connection]
<jbrhbr> man there are so many built-in methods
stannard has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<baweaver> Suggested reading: Enumerable, String. Memorize those two and you're set for a while.
<baweaver> Scala has more of a kitchen sink than ruby though
scripore has joined #ruby
rsc___ has joined #ruby
<jbrhbr> really?
chipotle has joined #ruby
<jbrhbr> i haven't used it but that is surprising
prestorium has quit [Quit: Leaving]
chipotle has quit [Read error: Connection reset by peer]
<jbrhbr> if it's in the core language
stannard has quit [Remote host closed the connection]
<jbrhbr> although all of my experience so far has been with rails so it's hard for me to know what rails has monkey-patched in vs what's core at this point :/
stannard has joined #ruby
bbert has quit [Ping timeout: 246 seconds]
vifino has joined #ruby
cassioscabral has joined #ruby
Morrolan has quit [Ping timeout: 260 seconds]
AugustoC has quit [Quit: Connection closed for inactivity]
<ruby-lang706> i tried searching for a method that finds something but returns nothing and all i got was that ruby always returns something
sucks has joined #ruby
<baweaver> what method returns true if any element is true?
atom3 has quit [Ping timeout: 255 seconds]
agent_white has quit [Read error: Connection reset by peer]
rsc___ has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
<baweaver> I would suggest reading through The Well Grounded Rubyist or Eloquent Ruby
solars has joined #ruby
ur5us has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
<ruby-lang706> ok ill download those now
<baweaver> they'll cover a lot of groundwork
atom3 has joined #ruby
<baweaver> also ill-advised to mention you're "downloading" them
<jbrhbr> :p
<ruby-lang706> they are linked for free pdf format on front page of google
<ruby-lang706> i dont think they mind if i had a copy on my comp
dfinninger has quit [Remote host closed the connection]
<baweaver> yeah, that's called pirated copy
sucks has quit [Read error: Connection reset by peer]
<baweaver> and really not a good idea to talk about on channel
Zamerick has quit [Ping timeout: 255 seconds]
sucks has joined #ruby
<ruby-lang706> ill pay for the books right away
pawnbox has joined #ruby
codecop has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
bithon has quit [Ping timeout: 272 seconds]
jgt3 has quit [Read error: Connection reset by peer]
pika_pika has quit [Ping timeout: 240 seconds]
tulak has joined #ruby
idefine has joined #ruby
aryaching has quit []
bronson has joined #ruby
saddad has quit [Ping timeout: 240 seconds]
vifino has quit [Quit: Who turned this off?! D:<]
B1n4r10 has quit [Ping timeout: 240 seconds]
NeverDie has joined #ruby
hobodave has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
saddad has joined #ruby
<ruby-lang706> so maybe the each_with_object combined with .any
<ruby-lang706> i have ruby installed and typed irb
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has quit [Ping timeout: 256 seconds]
vifino has joined #ruby
<baweaver> >> (1..5).each_cons(3).any? { |xs| xs.reduce(0, :+) == 8 } # The each_cons implementation
<ruboto> baweaver # => false (https://eval.in/485906)
dreinull has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
<ruby-lang706> i stopped with the each_cons and im trying the .any from the page you linked me
<baweaver> for the other, you want to look into what a stack is. Push elements onto it until you have 3, then sum them.
zeroDivisible has joined #ruby
<ruby-lang706> ok ill look up stack now
<bodgix> I've just tested that TCPSocket.new 'fqdn', port tries the next A record of fqdn if fqdn has multiple A records and the 1st one fails. I didn't find any mentions of that in the docs
<baweaver> anyways, meetings
<baweaver> off I go
<ruby-lang706> ty
saddad has quit [Ping timeout: 260 seconds]
<bodgix> anyone knows if that's something portable or platform dependent?
f00bar-32 has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
bithon has joined #ruby
baweaver has quit [Remote host closed the connection]
dfinninger has joined #ruby
ramortegui has quit [Remote host closed the connection]
finisherr has joined #ruby
gregf has joined #ruby
Morrolan has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
gizmore has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has joined #ruby
Wompy has joined #ruby
momomomomo has quit [Quit: momomomomo]
gizless has quit [Ping timeout: 256 seconds]
norc has quit [Ping timeout: 252 seconds]
viktor_ has joined #ruby
steffkes has quit [Ping timeout: 240 seconds]
snoozelose has joined #ruby
dling has quit []
baweaver has joined #ruby
uri_ has quit [Ping timeout: 272 seconds]
f00bar-32 has joined #ruby
kalopsia1 has quit [Ping timeout: 256 seconds]
jdm has joined #ruby
wildlander has quit [Quit: Saliendo]
ledestin has joined #ruby
freerobby has quit [Quit: Leaving.]
cassioscabral has quit [Quit: cassioscabral]
zenlot1 has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenlot has quit [Ping timeout: 240 seconds]
kerframil has quit [Ping timeout: 265 seconds]
devbug has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
Xiti has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xiti has quit [Read error: Connection reset by peer]
colleenmcguckin has joined #ruby
yfeldblum has joined #ruby
synthroid has quit []
polishdub has quit [Quit: Leaving]
nfk|laptop has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
Azure has quit [Quit: Oops.]
edwinvdgraaf has joined #ruby
snoozelose has quit [Changing host]
snoozelose has joined #ruby
Azure has joined #ruby
<grill> what exactly is "io" in the context of this module? http://ruby-doc.org/stdlib-1.9.3/libdoc/rubygems/rdoc/Gem/Package/TarReader.html
<grill> are we talking an IO stream?
Wompy has left #ruby ["Leaving..."]
edwinvdgraaf has quit [Read error: Connection reset by peer]
<jhass> grill: yeah I would expect anything that .is_a?(IO)
solars has quit [Ping timeout: 246 seconds]
edwinvdgraaf has joined #ruby
deeprave has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
<grill> how does one open a file with IO
<grill> i've tried read and sysopen, but neither seem to work
deeprave has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
edwinvdgraaf has joined #ruby
eytanfb has quit [Remote host closed the connection]
charliesome has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<viktor_> ignore #xkcd-signal MODES JOINS PARTS QUITS
snoozelose has quit [Quit: Leaving]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Client Quit]
scripore has joined #ruby
vcoinminer_ has quit [Ping timeout: 240 seconds]
<viktor_> grill did you try IO.binread("filename")
<grill> I just used File.open
rodfersou has quit [Quit: leaving]
<viktor_> k
vcoinminer_ has joined #ruby
<jhass> grill: just File.open("foo") do |io|
finisherr has quit [Ping timeout: 240 seconds]
finisherr has joined #ruby
BTRE has quit [Remote host closed the connection]
dhollinger has quit [Quit: WeeChat 1.3]
f00bar-32 has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
pawnbox has joined #ruby
idefine has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 256 seconds]
kobain has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
colleenmcguckin has joined #ruby
Xiti has joined #ruby
BTRE has joined #ruby
colegatron has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
SenpaiSilver has joined #ruby
david77 has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
tomphp has joined #ruby
dorei has quit []
mroth has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
radgeRayden has joined #ruby
arooni has joined #ruby
calderonroberto has quit [Ping timeout: 260 seconds]
mroth has joined #ruby
calderonroberto has joined #ruby
webus has quit [Ping timeout: 272 seconds]
butterlord has quit [Ping timeout: 252 seconds]
lemur has joined #ruby
rgtk has quit [Ping timeout: 246 seconds]
ChameleonSix has joined #ruby
<ChameleonSix> Hello
<ChameleonSix> Can i ask a question
baweaver has quit [Remote host closed the connection]
<jhass> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<ChameleonSix> lol
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ChameleonSix> It has nothing to do with ruby
<ChameleonSix> Knowledge is better than grades
<jhass> ?offtopic
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<jhass> !kick ChameleonSix no single line lols
ChameleonSix was kicked from #ruby by ruboto [no single line lols]
ChameleonSix has joined #ruby
<ChameleonSix> Ok sorry
<ChameleonSix> Do you need great grades to be successful
colegatron has joined #ruby
<centrx> Negative
<ChameleonSix> I can't understand few things in my life
lemur has quit [Ping timeout: 240 seconds]
<ChameleonSix> I mean singers don't
<centrx> Singers are not successful
znz_jp has joined #ruby
<ChameleonSix> Lol
<jhass> ?offtopic
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<ChameleonSix> But i need someone with experience
<ChameleonSix> People on off topic are retarded
<Coraline> That's offensive.
<ChameleonSix> Ok i was joking
<Coraline> You're not really winning friends here...
<ChameleonSix> I dont need any irc friends
<jhass> cool. bye.
eytanfb has joined #ruby
eytanfb has quit [Remote host closed the connection]
<ChameleonSix> Hmm
<ChameleonSix> Offtopic?
eytanfb has joined #ruby
tvw has joined #ruby
hizenger has joined #ruby
<ChameleonSix> Only programmers can help me
<ChameleonSix> Jk
<jhass> join ##chat if you want general casual talk. If your next sentence isn't a Ruby question I will remove you
<ChameleonSix> I don't need good grades to be a good ruby programmer
<ChameleonSix> ?
<jhass> you don't.
<ChameleonSix> Im at high school anyway
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfinninger has quit [Remote host closed the connection]
<ChameleonSix> But people always say study
acovrig has joined #ruby
<ChameleonSix> If you want to go to uni
bronson has quit [Remote host closed the connection]
<jhass> this isn't a life support channel
<ChameleonSix> I can't study fucking history
<ChameleonSix> It isn't
kalopsian has quit [Ping timeout: 272 seconds]
<ChameleonSix> But still
<jhass> no
<ChameleonSix> So?
<acovrig> I’m having a negative sense moment… in (nokogiri) page.xpath('//table[@id="ctl00_ContentPlaceHolder1_GridView1"]/tr').each do |r|; how can `r’ be nil?
<jhass> acovrig: it shouldn't, how do you assert it is?
nunchuck has joined #ruby
<acovrig> jhass: my next line is `p r’ and it returns `nil’ ~50% of the time...
spider-mario has quit [Remote host closed the connection]
znz_jp has quit [Ping timeout: 260 seconds]
<jhass> acovrig: do you think you can make a minimal example that we can run and see for ourselves?
<acovrig> jhass: sure, gist pending
ICantCook has joined #ruby
<acovrig> jhass: https://gist.github.com/acovrig/57d58cdc924b8086733d is the HTML I’m parsing and the script I’m using
TomyLobo has quit [Ping timeout: 246 seconds]
ChameleonSix has left #ruby ["Quit"]
<acovrig> jhass: nevermind, there is a r.xpath line that was returning nil…
howdoicomputer has joined #ruby
<jhass> acovrig: yup, was just about to mention :)
<acovrig> but it does feel odd to have to do a `next if c.nil?’ for each loop...
<jhass> acovrig: btw I recommend avoiding single letter vars, they're only confusing
<acovrig> and a `next if c.first.nil?’ and a `next if c.xpath(‘/div’).nil?’ ...
Ropeney has joined #ruby
bronson has joined #ruby
<acovrig> yea, I should flush those out to better names (and I started to, but when things refused to make sense I dropped back to single letters for speed fo typing as I am trying to figure out why I’m getting rows with 0 columns, or rows that are “1” instead of an element)
<jhass> I just made it a habit to basically never use them
znz_jp has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
<jhass> typing row and column isn't that much slower than r and c after all
skade has quit [Quit: Computer has gone to sleep.]
n008f4g_ has quit [Ping timeout: 265 seconds]
zerowaitstate has quit [Quit: leaving]
finisherr has quit [Quit: finisherr]
howdoicomputer has quit [Ping timeout: 240 seconds]
<acovrig> jhass: shouldn’t https://gist.github.com/acovrig/57d58cdc924b8086733d#file-parse-rb-L10 be possible? when i run that I get an error that column[1] is nil, but p column shows there are `td’s there…
rflot has quit [Ping timeout: 240 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> acovrig: really? '/td' restarts at the top
<acovrig> and isn’t there a source_code method (or something like it) to dump the HTML source for the elemnt I have, cuz I kinda can’t read the output of the element with any reasonable amount of time…
<jhass> just 'td' or './td'
<jhass> to_html iirc?
<jhass> or just to_s even
rflot has joined #ruby
<jhass> doc.xpath('//table[@id="ctl00_ContentPlaceHolder1_GridView1"]/tr').each_with_object(Hash.new(0)) {|row, counts| counts[row.xpath("td").size] += 1 }
<jhass> => {1=>2, 0=>1, 11=>50}
<jhass> so careful there
<acovrig> jhass: I tried the `td’ and `./td’ and it works the same way…
<acovrig> jhass: wait, what does that mean?
Vitor_ has quit [Ping timeout: 240 seconds]
finisherr has joined #ruby
moeabdol1 has joined #ruby
YankNYC has quit [Quit: Connection closed for inactivity]
<jhass> that means there's one row without any td's, 2 with only 1 and 50 with 11
scripore has quit [Quit: This computer has gone to sleep]
cassioscabral has joined #ruby
ta has quit [Read error: Connection reset by peer]
<acovrig> jhass: thanks for the .to_s idea; I can see there is a tr it can’t find any columns, but I can see it has 24 <td> elements...
<jhass> who said 24?
<acovrig> jhass: so I guess I will need a `next if column.count < 5’ line?
<jhass> why 5?
<acovrig> jhass: that’s what I count
<acovrig> jhass: so there will be at least 5 columns
<jhass> are you sure you gisted the right html?
<acovrig> jhass: yes, `pbcopy </Volumes/ram/d.html’
devoldmx has joined #ruby
<jhass> idk where or how you counted 24 but I trust my code more
<jhass> and the only counts are none, 1 and 11
_stu_ has quit [Quit: _stu_]