<Guest61>
hey guys anyone got a second to help with some direction on a homework assignment?
Timba-as has quit [Ping timeout: 256 seconds]
<BraddPitt>
sure Guest61
<Guest61>
i'm needing to print out a ordered list from an array
<Guest61>
thanks brad.
charliesome has joined #ruby
<BraddPitt>
baweaver how do you add ? commands to ruboto?
<baweaver>
?add-commands
<ruboto>
I don't know anything about add
<BraddPitt>
;/
<baweaver>
me either ruboto, me either
<BraddPitt>
I thought you said you added a module to him
<Guest61>
so i've got an array with todos in it, now the assignment asks me to print out "don't forget to:" then list the items from that array in order 1,2.3
nux443 has quit [Ping timeout: 250 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BraddPitt>
sure
<baweaver>
I did, but I don't know how radar wires them up.
<Guest61>
now accessing items from that array i'm not sure i'm doing right and i'm pretty sure there needs to be a loop in here too
blackjid has quit [Max SendQ exceeded]
<BraddPitt>
you are correct about the loop
<BraddPitt>
do you have any code so far?
<Guest61>
yep
blackjid has joined #ruby
<Guest61>
whats the best way to share that on this channel?
<Guest61>
its about 10 lines
<BraddPitt>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
baweaver has quit [Remote host closed the connection]
<shevy>
totimkopf ack... mantisbt bug tracker in centos?
<shevy>
github spoiled me
<Guest61>
ok so that produced some solid results i'm just not sure what |x| stands for in this statment
<Radar>
WHO DARE SUMMONS RADAR
<BraddPitt>
Guest61 think of it as a named parameter
<Radar>
oh it was baweaver but he's not ehre
<BraddPitt>
so in [1, 2, 3].each { |x| puts x }
<BraddPitt>
`x` will be the current element during the iteration
Ropeney has joined #ruby
pietr0 has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mleung has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
<shevy>
Guest61 well it's just a name you give to something here, a block variable, just as you would normally do: x = 42, to assign 42 to x, for instance; except that it remains local to the block and ceases to exist outside of said block
<shevy>
Guest61 you can give it any other name too, like |hogglepuffins|
<Guest61>
gotcha
Nawn has joined #ruby
Ox0dea has joined #ruby
<Ox0dea>
shevy: No, "hogglepuffins" is a reserved word in Ruby.
<totimkopf>
shevy: tell them mantis sucks :p
yfeldblum has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
<Guest61>
ok let me get back into this i'll come back soon i'm sure i'll have more beginner questions
rodfersou has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
casadei has quit [Remote host closed the connection]
Lucky__ has joined #ruby
kr3ssh has quit [Ping timeout: 255 seconds]
<shevy>
totimkopf yeah, for some reason, mantis annoys me immensely... first, gobolinux was using it... then a browser game I used to play called the reincarnation ... now you say that centos also uses it.. I am glad that the ruby core team uses another way to track bugs than mantis
<Ox0dea>
Nawn: Your `condition` variable never becomes falsy.
<Ox0dea>
*`continue`
<BraddPitt>
is it becuase he didn't do gets.chomp?
<BraddPitt>
like isnt there a \n on the end of the input?
<Ox0dea>
Aye, that's why he's not seeing the results he expects, but his loop still goes forever.
<shevy>
if he didn't chomp it off then there should be
<Nawn>
:o Yeah, I replaced the [currentIn == 'Done'] with True, and it does print the output.
<shevy>
\o/
baweaver has quit [Remote host closed the connection]
<Ox0dea>
Nawn: You need to gain an appreciation for precision. :P
<Nawn>
Okay, so gets needs to run the .chomp method?
<shevy>
Nawn btw if you save on gist, with file ending .rb, you get automatic colour highlighting
<shevy>
Nawn it helps if you inspect your variables one after the other
<shevy>
for instance, there is pp - called pretty print
<shevy>
you do: require 'pp'
<shevy>
and then: pp your_var
<shevy>
then you can see that it is a string that has a "\n" at the end
<Ox0dea>
Nawn: That case statement is way too wet.
<Nawn>
;~; I don't know what that means
<BraddPitt>
also there is no need for ('DONE'||"DONE")
<Ox0dea>
Nawn: DRY == Don't Repeat Yourself
<BraddPitt>
you can simply do "DONE"
_djbkd has quit [Quit: My people need me...]
<shevy>
ok Nawn
<shevy>
in that case statement
<shevy>
you should align case and when on the same line:
<shevy>
case x
<shevy>
when 'foo'
<Nawn>
Braddpitt : yeah, I added that in as part of the Debugging. I wanted to make sure it wasn't the apostrophe messing me up
RegulationD has joined #ruby
<BraddPitt>
oh ok
<BraddPitt>
fair enough
d2dchat has quit [Remote host closed the connection]
<Nawn>
^_^
<shevy>
also, you can get rid of 3-4 lines
<shevy>
if you do:
<shevy>
select = false
<shevy>
and then, in the else, at line 44
<shevy>
you add:
<shevy>
select = true
<shevy>
right now you assign select = true in all case/when matches
solocshaw has quit [Quit: solocshaw]
<shevy>
you could also change currentIn = gets; currentIn.to_i just to: currentIn = gets.to_i
roolo has quit [Ping timeout: 264 seconds]
guest1241234 has quit [Quit: Connection closed for inactivity]
diegoaguilar has quit [Remote host closed the connection]
<ICantCook>
baweaver and Radar: You guys were helping me get the mysql gem installed on CentOS yesterday. I just fixed it by running this: 'yum install make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel'
<ICantCook>
thanks for the help
iateadonut has joined #ruby
solocshaw has joined #ruby
dr3w has quit [Ping timeout: 246 seconds]
<ICantCook>
I'll narrow it down and find out exactly which package(s) fixed it
bronson has quit [Remote host closed the connection]
<Radar>
ICantCook: Magical :)
<Nawn>
shevy: at line 20, I change that to false? and then delete all the false declarations on select. and then change the else to set it to true?
<Nawn>
shevy: wouldn't that make my while loop not start?
jcoe has joined #ruby
dc has quit [Disconnected by services]
RegulationD has quit [Ping timeout: 255 seconds]
<shevy>
lemme see
dc_ has joined #ruby
<shevy>
Nawn oh yeah
<shevy>
see, you debugged me there
jcoe has quit [Client Quit]
baweaver has joined #ruby
chrisja has quit [Quit: leaving]
<Nawn>
Okay, good I was worried. xD
<shevy>
I normally use loop {} and then manually break out of it
<Nawn>
Oh? what would I google to get a reference to that?
<jesterfraud>
how in particular do you think we're getting closer to it?
<jesterfraud>
closer: do you get a notification every time we use that word?
Asher has joined #ruby
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
<weaksauce>
jesterfraud well the edward snowden surveillance revelations. the fact that there is so much cctv in England etc. the expanded ability to track everything you do digitally.
<jesterfraud>
weaksauce: that's only _part_ of 1984 though
<weaksauce>
was it 1984 that had the 5 min hate or was that a brave new world?
<pontiki>
i don't remember
<pontiki>
how's that for beind old :'(
iceyec_ has joined #ruby
<weaksauce>
ha indeed
nb_bez___ has joined #ruby
<jesterfraud>
I think 1984 had the five minute hate
Kallis has joined #ruby
IceyEC has quit [Read error: Connection reset by peer]
iceyec_ is now known as iceyec
DiscoM has quit [Read error: Connection reset by peer]
DiscoM has joined #ruby
_derpy has joined #ruby
<pontiki>
2 minutes, from 1984
`derpy has quit [Read error: Connection reset by peer]
<pontiki>
the wiki remembers for me
<weaksauce>
ah yeah. details details
<weaksauce>
as a programmer we just refer to the docs ;)
<jesterfraud>
but yeah, there's a lot more to 1984 than just surveillance
<weaksauce>
oh yeah it's a complex book. just one part of it
<weaksauce>
been years since i read it
<pontiki>
for me, the strongest is how we're all complicit in creating and maintaining such a society
<shevy>
the big brother protects you pontiki
unreal_ has joined #ruby
ledestin has joined #ruby
<pontiki>
that's what they want you to believe
dopamean_ has quit [Ping timeout: 260 seconds]
Eiam has joined #ruby
unreal has quit [Ping timeout: 255 seconds]
phutchins has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby
freerobby has quit [Quit: Leaving.]
<jesterfraud>
North Korea (from what I've heard) has shown more similarities to the society in 1984.
<pontiki>
that's because Oceana wants you to believe that
bruno- has quit [Ping timeout: 240 seconds]
<ICantCook>
I want to run a simple ruby script every 30 seconds. I could cron this, but is there a better way of doing it? I'm thinking of using rufus-scheduler, but how would I daemonise it?
nettoweb has joined #ruby
<pontiki>
what criteria for "better" ?
<pontiki>
cron is dead simple
<Ox0dea>
> I could cron this
<Ox0dea>
ICantCook: No, you couldn't.
<pontiki>
stop verbing
AlexAltea has quit [Ping timeout: 264 seconds]
<Ox0dea>
I was referring to cron's granularity.
<ICantCook>
Right, 1 minute
<ICantCook>
I could put a 30second sleep in the script and make it run again
<ICantCook>
then cron that script to run every minute
<ICantCook>
lol
radgeRayden has joined #ruby
<ICantCook>
pontiki: That's true. I might as well cron it
EllisTAA has quit [Quit: EllisTAA]
<pontiki>
what's the script do?
I has joined #ruby
I is now known as Guest19679
TheTFEF is now known as Nightmare
hotpancakes has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Ping timeout: 255 seconds]
<Ox0dea>
It tells the actors what to say, and sometimes how.
bronson has joined #ruby
northfurr has quit [Quit: northfurr]
saddad has joined #ruby
<pontiki>
*the* script, not *a* script
<shevy>
:)
clarkenciel has joined #ruby
willharrison has joined #ruby
helpa has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 244 seconds]
helpa has joined #ruby
Alayde has joined #ruby
helpa has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
morochena has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Timba-as has quit [Ping timeout: 244 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j_mcnally has joined #ruby
<ICantCook>
lol
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<ICantCook>
The script runs some mysql queries, and dumps the output to a json file in Amazon S3
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
hahuang65 has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
tomdalling has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
dopamean_ has joined #ruby
IrishGringo has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
charliesome has joined #ruby
yatish27 has joined #ruby
rodfersou has quit [Quit: leaving]
hahuang65 has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
hahuang65 has joined #ruby
<Nawn>
Hey guys! Got the thing completely functional! :D
<Nawn>
anyone else still here? :)
njs126 has quit [Ping timeout: 272 seconds]
dopamean_ has quit [Ping timeout: 245 seconds]
bghjksdf has quit [Ping timeout: 264 seconds]
<sevenseacat>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<sevenseacat>
ruboto ?
<sevenseacat>
gee thanks.
cymbalinee has joined #ruby
<Nawn>
Lol.
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cymbalinee is now known as lucyinthesky
Valeness has quit [Disconnected by services]
Valeness_ has joined #ruby
ecnalyr has quit [Remote host closed the connection]
<Nawn>
Yeah :P I just kinda patched it together xD any tips?
arooni-mobile has quit [Remote host closed the connection]
lucyinthesky has left #ruby ["Leaving"]
<shevy>
yeah
<shevy>
but minor things
<shevy>
endOfLoop = false;
<shevy>
you use a ; there when it is not necessary
arooni-mobile has joined #ruby
arooni-mobile has quit [Max SendQ exceeded]
solocshaw has quit [Ping timeout: 244 seconds]
solocshaw1 has joined #ruby
arooni-mobile has joined #ruby
<shevy>
Also, line 35, 41, 46, 51 are all the same
<Nawn>
I don't understand? :o what do you mean by 'when it is not necessary'
<shevy>
the ;
<shevy>
can you see the ;
bghjksdf has joined #ruby
<shevy>
do you not see it
<sevenseacat>
we don't use semicolons to terminate lines in ruby
<Nawn>
OH, sorry, I usually write in C#, that was a force of habit xD
<shevy>
yeah
<sevenseacat>
only needed when putting two lines of code onto one line
<shevy>
you can get rid of the repetition in these lines
<shevy>
since you already use one variable in the else clause
<Nawn>
OH
roolo has joined #ruby
<shevy>
you can use it for output too
<Nawn>
puts after the end of the case?
<shevy>
puts sum unless endOfLoop
<shevy>
yeah
dr3w has quit [Ping timeout: 246 seconds]
christiandsg has joined #ruby
<shevy>
since in all four conditions you output sum
solocshaw1 is now known as solocshaw
<shevy>
for practice, you could convert this back into a while loop :)
<shevy>
btw I think you may even simplify more...
<shevy>
Since essentially you do only: add a number, subtract a number, multiplay a number, divide a number ... which is the same action, except that it uses different operators... + - * /
jonee has joined #ruby
<shevy>
Perhaps you could use a hash, which maps '1' => :+ and so on, and then apply/.send that operator... but anyway the current code is ok
roolo has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 245 seconds]
allcentury has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
chouhoulis has quit [Remote host closed the connection]
pdoherty has quit [Quit: Leaving]
dimasg has quit [Ping timeout: 246 seconds]
martin_work has joined #ruby
<Nawn>
in which line would i add the "unless" endOfLoop? I'm not familiar with 'unless'
sdwrage has quit [Quit: This computer has gone to sleep]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bghjksdf has quit [Ping timeout: 272 seconds]
lucyinthesky has joined #ruby
RegulationD has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
jonee has quit [Ping timeout: 272 seconds]
<martin_work>
whats would be the cleanest way to write this “if node.chef_environment == 'stg' || node.chef_environment == 'prd’”
<Nawn>
I would assume :(if node.chef_environment == ('stg || 'prd')) but I'm new too
sdwrage has joined #ruby
__main__ has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
sudiptamondal has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<shevy>
Nawn it's always the same, post-conditionals
<shevy>
puts 'hi there' if true
<shevy>
puts 'hi there' unless false
<shevy>
you just need to train your brain to think in boolean toggles
Ox0dea has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
<Ox0dea>
shevy: Hashes with sequential numeric keys are kind of a smell.
<shevy>
why do you tell me
mleung has quit [Quit: mleung]
<Ox0dea>
Because you suggested it?
<shevy>
did I suggest it to you?
<Ox0dea>
How is that of any relevance?
<shevy>
How is your comment to me relevant?
dimasg has joined #ruby
<Ox0dea>
It's morally salient to advise somebody against giving bad adivce?
<Nawn>
Ohh, so unless is the opposite of If. where it will only execute when false?
<shevy>
Did you give Nawn any advice or did you pester me Ox0dea?
<Ox0dea>
shevy: We're not talking in secret.
Timba-as has joined #ruby
<shevy>
Here is Nawn, talk to him Ox0dea.
<Ox0dea>
martin_work: `%w[stg prd].include?(chef_environment)` or, less advisably, `chef_environment[/^(stg|prd)$/]`.
patrick_star has quit [Ping timeout: 265 seconds]
<martin_work>
ahh thats handy thanks
auzty has joined #ruby
arooni-mobile has quit [Remote host closed the connection]
hyy1 has quit [Ping timeout: 245 seconds]
dimasg has quit [Ping timeout: 264 seconds]
Timba-as has quit [Ping timeout: 255 seconds]
tmtwd has joined #ruby
bghjksdf has joined #ruby
jeadre has quit [Remote host closed the connection]
jonee has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
jeadre has joined #ruby
Guest19679 has quit [Quit: This computer has gone to sleep]
<zenspider>
anyone have any good resources to read/study to learn TypedData_Wrap_Struct and friends?
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
patrick_star has joined #ruby
baweaver has joined #ruby
Rinzlit1 has quit [Ping timeout: 256 seconds]
hotpanca_ has quit [Ping timeout: 245 seconds]
decuser has quit [Quit: Page closed]
<shevy>
no idea sorry; I think the first and last time I would see any *Data_Wrap_Struct variant would have been from the old pickaxe
hotpancakes has joined #ruby
<zenspider>
yeah. I don't think the new one goes over the typed variants
<zenspider>
not sure tho, I don't have the latest edition
Eiam has joined #ruby
towski_ has quit [Remote host closed the connection]
Rinzlit1 has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
Ox0dea has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
CloCkWeRX has joined #ruby
hotpanca_ has quit [Read error: Connection reset by peer]
<Ox0dea>
zenspider: How's your Japanese?
rmoriz has quit [Ping timeout: 252 seconds]
<Ox0dea>
Aoki-san's "Ruby Hacking Guide" sees wide praise, but it's only been partially translated into English.
Kallis has quit [Read error: Connection reset by peer]
<zenspider>
has it been updated? because it was old as hell last time I poked at it
<zenspider>
like, 1.6
<zenspider>
if that
chipotle has quit [Quit: cheerio]
<Ox0dea>
1.6 is best Ruby.
<zenspider>
I had to read parts of it in order to finish the esoteric parts of ParseTree
EllisTAA has joined #ruby
haxrbyte_ has joined #ruby
<zenspider>
looks like it doesn't go over DWS or TDWS
haxrbyte has quit [Ping timeout: 245 seconds]
krz has joined #ruby
hotpancakes has joined #ruby
devoldmx has joined #ruby
Nawn has left #ruby [#ruby]
<zenspider>
I'm currently cribbing off of file.c from ruby itself... but ... ugh.
braincra- has quit [Quit: bye bye]
<zenspider>
zero doco in README.EXT too... of course
oo_ has quit [Remote host closed the connection]
<Ox0dea>
zenspider: file.c's (single) use of TDWS isn't particularly enlightening.
northfurr_ has joined #ruby
arooni-mobile has joined #ruby
Guest19679 has joined #ruby
<Ox0dea>
Scratch that.
devoldmx has quit [Ping timeout: 246 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
rb_data_type_struct has a name, a marker, a freer, some other stuff, and then the binary blob to massage.
northfurr has quit [Quit: northfurr]
northfurr_ is now known as northfurr
sudiptamondal has quit [Ping timeout: 272 seconds]
jud has quit [Quit: Leaving]
braincrash has joined #ruby
jhack has quit [Ping timeout: 260 seconds]
Ox0dea has quit [Read error: No route to host]
avahey has quit [Quit: Connection closed for inactivity]
Ox0dea has joined #ruby
<Ox0dea>
zenspider: Erm, doc/extension.rdoc has plenty of information regarding TDWS.
jud has joined #ruby
<zenspider>
doesn't exist in the version I'm coding against
<zenspider>
hrm.. I might have to increase my minimal version
ramfjord has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
SirFunk_ is now known as SirFunk
<zenspider>
in fact, it's only on head
<zenspider>
suck
maletor has joined #ruby
<Ox0dea>
zenspider: Huh? This file has existed since at least 1998.
sudiptamondal has joined #ruby
<zenspider>
if you're talking about the base /README.EXT, yes... but it doesn't go over TDWS at all...
christiandsg has joined #ruby
<zenspider>
there we go. I even had to update my svn checkout to get the TypedData infos...
<zenspider>
I hope it goes over the stuff I can actually use rather than what's on head
darkf has joined #ruby
<zenspider>
this should help. thanks.
Yzguy has quit [Quit: Zzz...]
<Ox0dea>
No, I'm talking about doc/extension.rdoc.
sacarlson has joined #ruby
<sacarlson>
seems I have problem when I move from rbenv 2.2.1 to 1.9.1 and back each time it breaks the other for json and now seems ffi
tmtwd has quit [Ping timeout: 260 seconds]
<zenspider>
Ox0dea: doesn't exist on 2.0, 2.1, 2.2 branches at all
<Ox0dea>
zenspider: Oh, wow. That's strange.
<Ox0dea>
It's a very old file.
<sevenseacat>
sacarlson: #ruby isnt #rbenv
<zenspider>
it was originally README.EXT, which oddly still exists up top
<sacarlson>
yes I know sevenseacat I already sent them this also
<Ox0dea>
sacarlson: You're switching back and forth between versions of rbenv?
dc_ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
mleung has joined #ruby
<zenspider>
sacarlson: stop using gemsets
dc_ has joined #ruby
<zenspider>
sounds like you're installing the json gem in a version neutral place
fullofcaffeine has quit [Remote host closed the connection]
mleung has quit [Client Quit]
<Ox0dea>
Which is best for managing Ruby version managers: rvmvm, rbenvenv, or chchruby?
christiandsg has quit [Ping timeout: 265 seconds]
<sacarlson>
yes I switch with rbenv and using bundler for gems
rushed has joined #ruby
<sacarlson>
zenspider: yes that sounds correct, how might I separate the gems between the two versions?
chouhoulis has joined #ruby
<zenspider>
don't use gemsets. if you do, don't use gemsets that install to the same place
<sacarlson>
gemsets? is that what bundler does? yes I want to separate so I don't have to delete all the gems each time I move
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<sacarlson>
some config setting I can make in the project directory?
chouhoulis has quit [Remote host closed the connection]
nettoweb has joined #ruby
chouhoulis has joined #ruby
<sacarlson>
I'm new to this bundler thing sorry, I was forced into it with this project that now requires 2.2.1
EllisTAA has quit [Quit: EllisTAA]
nettoweb has quit [Client Quit]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
danoo_ has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
mleung has joined #ruby
Timba-as has joined #ruby
martin_work has quit [Ping timeout: 246 seconds]
danoo_ has joined #ruby
slucx has joined #ruby
Alayde has joined #ruby
martin_work has joined #ruby
keen___________3 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
fullofcaffeine has joined #ruby
dimasg has joined #ruby
grenierm has joined #ruby
keen___________2 has quit [Ping timeout: 256 seconds]
diegoviola has joined #ruby
Timba-as has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Alayde has quit [Ping timeout: 250 seconds]
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
dimasg has quit [Ping timeout: 240 seconds]
nb_bez___ has quit [Quit: Connection closed for inactivity]
dfockler has quit [Quit: Leaving]
devoldmx has joined #ruby
petricore has joined #ruby
khebbie has joined #ruby
slucx has quit [Remote host closed the connection]
houhoulis has joined #ruby
chipotle has joined #ruby
ecnalyr has joined #ruby
rmoriz has joined #ruby
_blizzy_ has joined #ruby
khebbie has quit [Ping timeout: 240 seconds]
rushed has quit [Quit: rushed]
max_Q has quit [Ping timeout: 250 seconds]
<sacarlson>
so from my reading I take it gemset is something to do with RVM that I already don't use so I take it gemsets is not my problem as far as I can tell
ecnalyr has quit [Ping timeout: 264 seconds]
mleung has quit [Quit: mleung]
lucyinthesky has left #ruby ["Leaving"]
hotpancakes has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
Eiam has joined #ruby
devoldmx has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
gamov has joined #ruby
_blizzy_ has joined #ruby
<Ox0dea>
sacarlson: It's probably a bad interaction at the system library level.
arescorpio has quit [Quit: Leaving.]
<Ox0dea>
Ruby's ABI has changed considerably between 1.9 and 2.2.
msnyon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomdalling has joined #ruby
<sacarlson>
so fix would be...?
<Ox0dea>
You've not actual clarified what sort of error you're receiving...
<Ox0dea>
*actually
lessless has joined #ruby
hotpancakes has joined #ruby
<sacarlson>
Restoring gems to pristine condition...
<sacarlson>
Cached gem for json-1.5.5 not found, attempting to fetch...
<sacarlson>
Fetching: json-1.5.5.gem (100%)
<sacarlson>
ERROR: While executing gem ... (Gem::Exception)
<sacarlson>
Cannot load gem at [/home/sacarlson/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/cache/json-1.5.5.gem] in /home/sacarlson/github/stellar/stellar_utility
<sacarlson>
was the last one
<sacarlson>
but this is a new one nothing like the others
ta has joined #ruby
<sacarlson>
this was my attempt to fix it with pristine instead of deleteing entire gem collecttion
khebbie has joined #ruby
<sacarlson>
in this case I also note that it attempted to install an older version of json than what was used in 2.2.1
hotpancakes has quit [Remote host closed the connection]
oo_ has joined #ruby
jgt1 has quit [Ping timeout: 264 seconds]
khebbie has quit [Remote host closed the connection]
arcticblue has joined #ruby
<bghjksdf>
:q
bghjksdf has quit [Quit: WeeChat 1.3]
<sacarlson>
no libruby.so seen in /usr/lib
hotpancakes has joined #ruby
<sacarlson>
It's proby in .rbenv ?
<Ox0dea>
sacarlson: So you don't have a system Ruby?
<sacarlson>
no It was conflicting with 2.2.1 so I removed it
maletor has quit [Quit: Computer has gone to sleep.]
max_Q has joined #ruby
<sacarlson>
only way I could get 2.2.1 to work at the time
<Ox0dea>
Sounds like you dun goofed.
ta has quit [Ping timeout: 252 seconds]
<sacarlson>
I'm sure
<sacarlson>
but I can always get ether one to work just not both at the same time
roolo has quit [Ping timeout: 264 seconds]
lucyinthesky has joined #ruby
Guest19679 has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
northfurr has quit [Quit: northfurr]
martin_work has quit [Quit: martin_work]
Musashi007 has quit [Quit: Musashi007]
lucyinthesky has left #ruby [#ruby]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
dgutierrez1287 has joined #ruby
chipotle has quit [Quit: cheerio]
chipotle has joined #ruby
astrobun_ has joined #ruby
dgutierrez1287 has quit [Ping timeout: 255 seconds]
NeverDie has joined #ruby
Guest19679 has joined #ruby
msnyon has joined #ruby
pranny has joined #ruby
rakm has joined #ruby
Guest19679 has left #ruby [#ruby]
jancuk has joined #ruby
I has joined #ruby
yatish27 has quit [Remote host closed the connection]
I is now known as Guest27071
Guest27071 has quit [Client Quit]
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has joined #ruby
jancuk has quit [Client Quit]
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
jeadre has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 246 seconds]
devoldmx has quit [Remote host closed the connection]
jeadre has joined #ruby
jonee has quit [Ping timeout: 260 seconds]
Timba-as has joined #ruby
Eiam_ has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
pranny has quit [Remote host closed the connection]
rehat has joined #ruby
Timba-as has quit [Ping timeout: 272 seconds]
RegulationD has joined #ruby
dopamean_ has joined #ruby
pranny has joined #ruby
pranny has quit [Read error: Connection reset by peer]
pranny has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
_blizzy_ has quit [Ping timeout: 255 seconds]
christiandsg has joined #ruby
totimkopf has quit [Quit: leaving]
hotpancakes has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 245 seconds]
dopie has quit [Quit: This computer has gone to sleep]
rushed has joined #ruby
__main__ has joined #ruby
sphex has quit [Ping timeout: 245 seconds]
jonee has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
oo_ has joined #ruby
wldcordeiro has joined #ruby
khebbie has joined #ruby
ohaibbq has joined #ruby
casadei has joined #ruby
grenierm has quit [Quit: grenierm]
hotpancakes has joined #ruby
EllisTAA has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
casadei has quit [Ping timeout: 256 seconds]
mcpherrin has joined #ruby
saddad has quit [Ping timeout: 246 seconds]
<mcpherrin>
What's the recommended intro to ruby text for experienced programmers? I looked at "Ruby the Hard Way" but it's not for me (it's just too slow and not information-dense enough).
<baweaver>
Eloquent Ruby or learnxinyminutes
<baweaver>
the latter is just a speed run on any language
RobertBirnie has joined #ruby
<sevenseacat>
learn x in y mintues will give you a crash course in ruby syntax
<baweaver>
the former is how do ruby people do ruby
<mcpherrin>
Yeah, I'm more looking for how ruby folk do ruby
<mcpherrin>
Thanks for the suggestions; I'll look into both
<sacarlson>
I might have found one posible solution to my problem with bundle install --force seems to get my rbenv 1.9.3 working without a complete delete of all the gems
<sacarlson>
I have yet to see if this will break the 2.2.1 when I go back to that
skade has joined #ruby
msnyon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sacarlson>
I will also try bundle exec gem pristine --all in the future but I don't think this fixes it
khebbie has quit [Remote host closed the connection]
pawnbox_ has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
lucyinthesky has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pranny has quit [Remote host closed the connection]
tomdalling has quit [Ping timeout: 246 seconds]
rubie has joined #ruby
amclain has quit [Quit: Leaving]
lucyinthesky has quit [Quit: Leaving]
pawnbox_ has quit [Ping timeout: 250 seconds]
bhorn1 is now known as bhorn1|away
crowell has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
agent_white has quit [Quit: goodnight zenspider]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jonee has joined #ruby
RegulationD has joined #ruby
sphex has joined #ruby
EllisTAA has joined #ruby
charliesome has joined #ruby
voxxit has quit [Ping timeout: 244 seconds]
Timba-as has joined #ruby
pawnbox_ has joined #ruby
rakm has joined #ruby
aganov has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
freeze has quit [Ping timeout: 245 seconds]
krz has quit [Ping timeout: 246 seconds]
crowell has joined #ruby
Timba-as has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
jonee has quit [Ping timeout: 250 seconds]
<ICantCook>
Not sure if I should ask this here, or in #mysql. I'm getting an issue using the 'mysql' gem on my production server. Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") (Mysql::Error)
<ICantCook>
I have moved my mysql.sock to a non-default location
<ICantCook>
if I create a symlink to it in that location, everything is fine
<ICantCook>
but I don't want to do this
blueOxigen has joined #ruby
<ICantCook>
how can I point to my mysql.sock ?
<sevenseacat>
why did you move it to a non-default location?
<Ox0dea>
ICantCook: You have a config/database.yml, yes?
Mekkis has quit [Ping timeout: 256 seconds]
jgt1 has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
<ICantCook>
Ox0dea: nope
<Ox0dea>
Oh.
<ICantCook>
connection string specified in Mysql.new(...)
devoldmx has quit [Ping timeout: 246 seconds]
<Ox0dea>
ICantCook: You should be able to specify the appropriate socket file in that initializer.
joneshf-laptop has joined #ruby
<baweaver>
also want to make sure you're using mysql2
<ICantCook>
Ox0dea: thanks. I'll read the manual then :)
<zenspider>
... just curious and I don't want to derail... but why are you making things needlessly difficult?
<baweaver>
the original is out of maintinance
<Ox0dea>
ICantCook: Sure. You'll probably have to forego the convenience of a connection string.
<zenspider>
(jesus... no pun, esp since I don't think they're doing rails)
<ICantCook>
baweaver: oh. I guess I have the original then? I did 'gem install mysql' and am requiring 'mysql'
<baweaver>
common thing
keen___________4 has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
hashrocket has quit [Quit: Connection closed for inactivity]
craysiii has quit [Remote host closed the connection]
<baweaver>
zenspider: I made an active point of ignoring it
Eiam has quit [Ping timeout: 252 seconds]
<Ox0dea>
Anyone for segfault golf?
<baweaver>
hm, no no, that was just a horrid pun. Ignore that one.
<zenspider>
you should be able to provide: :socket - Defaults to “/tmp/mysql.sock”.
<zenspider>
ICantCook: ^^
<zenspider>
Ox0dea: who can segfault the ... smallest?
jgt1 has quit [Ping timeout: 264 seconds]
keen___________3 has quit [Ping timeout: 250 seconds]
<baweaver>
suggested reading into what mysql.sock actually is and why that really is pointless
dhjondoh has joined #ruby
<ICantCook>
baweaver: lol... ok
<baweaver>
TL;DR: mysql.sock is a psuedo-file for data transmission
<zenspider>
either way, this gets them onto mysql2
<zenspider>
so: win
pranny has joined #ruby
jonee has joined #ruby
Alayde has quit [Ping timeout: 255 seconds]
<ICantCook>
I'll look into the mysql.sock thing another time. For now I'll just move to mysql2 and specify :socket
<ICantCook>
thanks for the help
ferhaty has joined #ruby
zenguy_pc has quit [Ping timeout: 244 seconds]
pranny has quit [Remote host closed the connection]
<sacarlson>
gem list json in ruby 2.2.1 shows I have json (1.8.3, 1.8.1) ; but bundle exec gem list json shows Could not find json-1.8.3 in any of the sources
<sacarlson>
so can't run bundle install -force or I get same error
pranny has joined #ruby
yardenbar has joined #ruby
<zenspider>
bundle exec gem list?
<zenspider>
that better only show one version or it isn't doing its fucking job
roolo has joined #ruby
<zenspider>
that's the only thing bundler (should do) does
<sacarlson>
same error Could not find json-1.8.3 in any of the sources
<sacarlson>
maybe I need to reinstall bundler?
<zenspider>
maybe you need to understand what you're doing
<sacarlson>
yes that might help
<zenspider>
bundler figures out dependencies AND REMOVES EVERYTHING ELSE
<zenspider>
that's its job
<sevenseacat>
sounds like rbenv is borked.
tagrudev has joined #ruby
omilun has joined #ruby
<zenspider>
gem list json and bundle exec gem list json MUST differ unless you only have one version installed
<zenspider>
sevenseacat: why? I highly doubt it
<zenspider>
pebcak
petricore has quit [Read error: Connection reset by peer]
<sevenseacat>
that too, but this has been going on all morning and sacarlson said they only got it to work before after they deleted a bunch of random filers
<sevenseacat>
-r
<zenspider>
they don't understand what bundler is
greymeister has quit [Quit: greymeister]
<zenspider>
and they're trying to switch between 1.9.x and 2.x
<omilun>
hello i need to know about the best IDE for ruby on rails
<zenspider>
using bundler... and if I had to guess, the same Gemfile.lock
<sevenseacat>
k
casadei has joined #ruby
pranny has quit [Client Quit]
<zenspider>
omilun: define best
<sevenseacat>
there arent many IDEs out there for ruby stuff
petricore has joined #ruby
<sevenseacat>
we dont typically want/need them
<zenspider>
and the dependencies won't resolve the same between 1.9.x and 2.x
<baweaver>
and typically go with Vim or Sublime
<baweaver>
are there others? Yeah, but those seem to be the two major camps at this point
<sevenseacat>
I've been using atom solidly for a couple weeks now. its not perfect, but it does the job
<zenspider>
and emacs. jerk.
<baweaver>
neither of those I'd call an IDE though
<omilun>
baweaver: vim and sublime are not ide
<zenspider>
matz uses emacs and so we use emacs
rubie has quit [Remote host closed the connection]
riotjones has joined #ruby
<Ox0dea>
omilun: Define "IDE".
<baweaver>
heathen
<zenspider>
omilun: you have yet to answer my question
<baweaver>
:P
<zenspider>
matz is a mormon. opposite of heathen...
<zenspider>
me on the other hand...
<Ox0dea>
"Mormon" is pushing it, no?
<sacarlson>
baweaver: I like the Pluma editor the colors the text that sometimes shows errors you made before you save them
chipotle has quit [Quit: cheerio]
<zenspider>
Ox0dea: see south park movie. the mormons got it right
<baweaver>
Moreover I just grew up in Vim so I tend to use it for everything. Headless servers, lots of them.
<baweaver>
all modern editors have color options y'know.
<Ox0dea>
zenspider: Oh, right. I forgot that LDS == Mormon.
jeadre has quit [Remote host closed the connection]
<baweaver>
They prefer the former to the latter honestly
<zenspider>
right
EllisTAA has quit [Quit: EllisTAA]
<baweaver>
now that was a truly heretical pun
<omilun>
zenspider: have auto complete ... consul ... free
<zenspider>
matz uses the word mormon
<sevenseacat>
baweaver: lol
<sevenseacat>
took me a second
<zenspider>
omilun: that's your definition of "best"?
<omilun>
zenspider: emacs is so good but very hard
<Ox0dea>
That's his definition of an IDE.
<Ox0dea>
Whatever "consul" is.
<sevenseacat>
free lol
<zenspider>
well, that's not what I asked
<omilun>
zenspider: fast and esy and free
<sevenseacat>
it can be complete garbage but as long as its free!
<zenspider>
so at this point, I think I'm flipping the bozo bit on omilun. I'm a programmer, not a dentist. I don't pull teeth.
<baweaver>
choose one
zenguy_pc has joined #ruby
jeadre has joined #ruby
casadei has quit [Ping timeout: 265 seconds]
<sevenseacat>
flipping the bozo bit... I'll have to remember that one
<baweaver>
most people say choose two, but that's too optimistic. Easy, Free, Fast
eightfold has joined #ruby
<zenspider>
is that from prag prog?
astrobun_ has quit [Remote host closed the connection]
<Ox0dea>
baweaver: Unix!
tomdalling has joined #ruby
<zenspider>
right. Dynamics of Software Development by Jim McCarthy
<zenspider>
good book
laurentide has joined #ruby
<omilun>
zenspider: aaam thx for UR HELLP
<baweaver>
Ox0dea: fair
* baweaver
grabs popcorn
pawnbox has joined #ruby
* baweaver
preemptively passes some to sevenseacat
<zenspider>
luckily "best ide" is moot until omilun learns to type
<sevenseacat>
omnomnomnom thankee
eightfold has quit [Client Quit]
<baweaver>
zenspider: No no, that answered it just fine
<baweaver>
Nano it is
<Ox0dea>
'om' + 'nom'.cycle
houhoulis has quit [Remote host closed the connection]
<baweaver>
only so many noms to be had before you overflow eh?
<Ox0dea>
No lazy strings in Ruby... yet?
pawnbox_ has quit [Ping timeout: 246 seconds]
<zenspider>
Ox0dea: if only that worked
<baweaver>
immutable at least
acosonic has quit [Ping timeout: 245 seconds]
<baweaver>
zenspider: don't tempt him
<zenspider>
but! you could totally make a StringIO that did that
<Ox0dea>
There's gotta be something sexier than that, though.
<rehat>
rushed: thanks
<zenspider>
pry + a lot of half working plugins... not a fan myself.
<zenspider>
rehat: depending on what you're doing. irb or pry to use as a repl and run stuff by hand
omilun has left #ruby [#ruby]
Trieste has quit [Ping timeout: 245 seconds]
<baweaver>
oi, I'll have you know I wrote some of those half working plugins
<zenspider>
rehat: or, pry does have some debugger-esque plugins that'll let you invoke pry at a particular location and then step
<zenspider>
rehat: there's also actual debuggers in ruby, including one that ships with ruby
<zenspider>
they're all ... special.
Eiam has joined #ruby
<rehat>
zenspider: how do I use the one that ships with ruby
<baweaver>
won't deny that, writing a debugger is difficult
<zenspider>
ruby -rdebug script.rb
Trieste has joined #ruby
<zenspider>
rehat: what're you trying to do?
<baweaver>
pry, for its hiccups, is still a good piece of work.
<zenspider>
personally, I debug with tests
oo_ has quit [Remote host closed the connection]
<Ox0dea>
Spikes fired.
lele has joined #ruby
<zenspider>
for the most part, I find pry gets in my way at least as much as it helps
<zenspider>
doesn't help that my client has ~20 second startup time. drives me nuts, but it is what it is
<rehat>
zenspider: trying to fix my code that I am running in irb want to step through the method instead of having a bunch of print statements
catoblepa has joined #ruby
<zenspider>
depending on your editor, you can sometimes just run the lines by hand in irb. (in emacs you can send line/region to repl)
youngbaks has joined #ruby
oo_ has joined #ruby
<zenspider>
rehat: the -rdebug thing above... you'll start in the debugger prompt. type "help"
diegoviola has quit [Quit: WeeChat 1.3]
stardiviner has quit [Ping timeout: 264 seconds]
<zenspider>
you can set breakpoint by method name or location
<zenspider>
hit "c" to continue
bigkevmcd has joined #ruby
<zenspider>
then either [s]tep or [n]ext
msnyon has joined #ruby
<rehat>
zenspider: thanks I'll try it out
manila90 has joined #ruby
<zenspider>
I'm saddened that omilun left
<Ox0dea>
Were you hoping to make a convert of him?
<zenspider>
iranian IP????? wow
postmodern has joined #ruby
<baweaver>
Spacemacs!
kies has joined #ruby
<baweaver>
or Neovim
<Ox0dea>
Iran supports TCP/IP?
<baweaver>
aren't those the hotness now?
<baweaver>
I'd tell you they support UDP but you probably wouldn't get it
RegulationD has quit [Ping timeout: 256 seconds]
dopie has joined #ruby
<Ox0dea>
I didn't get it. I am ready to receive a TCP joke instead.
<zenspider>
I think that's the first time I've seen ".ir" in actual use
<baweaver>
I'm ready to send TCP joke
<baweaver>
ACK!
_djbkd has joined #ruby
astrobun_ has joined #ruby
<sacarlson>
and zenspider I do have a ruf idea of what rbenv and bundler are suposed to do to some limited degree. I'm trying to document a method that will work when using two versions of rbenv with bundler.
<sacarlson>
the is two versions of ruby with rbenv
eightfold has joined #ruby
<sacarlson>
maybe it's just these two very far apart versions that have this problem, I'm not sure
Timba-as has joined #ruby
<sacarlson>
now that I have something that seems to be duplicatable it should be posible to solve instead of others that just deleted all gems without finding the real solution
<sevenseacat>
I'm not convinced there is an actual problem.
fullofcaffeine has quit [Remote host closed the connection]
<sacarlson>
sevenseacat: after bundle install would be rbenv rehash that as far as I know puts all the new bin files that were loaded from gems installed with bundle install in a place that they can be run from command line with rbenv shims
casadei has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
baweaver has quit [Remote host closed the connection]
DiscoM has quit [Remote host closed the connection]
<sacarlson>
then the last line that would be needed in some cases if a bin was not shimed bundler exec ruby ./yourrubyapp.rb to run your app
DiscoM has joined #ruby
grahambailey has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
sundhell has joined #ruby
JaRe_Ax has joined #ruby
<sacarlson>
or maybe that's where I'm wrong?
<sevenseacat>
yeah I don't use rbenv, which is why it all doesnt make sense to me
<sevenseacat>
I use chruby and we don't have any of that shim junk
casadei has quit [Ping timeout: 240 seconds]
<sacarlson>
IC, well it seems they have at least 3 or 4 methods now so change versions. this was the method the main developer chose
<sacarlson>
so = to
JaReAx has quit [Ping timeout: 240 seconds]
JaRe_Ax is now known as JaReAx
<sacarlson>
and it's new to me also
anaeem1 has joined #ruby
BTRE has joined #ruby
<sacarlson>
but I'm probly the only one that has code that still runs that is over 4 years old
anaeem1 has quit [Client Quit]
bhorn1|away is now known as bhorn1
<sevenseacat>
no, you're not
<sacarlson>
>>>>me old fart<<<<
<ruboto>
sacarlson # => /tmp/execpad-f30e5d76ffe6/source-f30e5d76ffe6:2: syntax error, unexpected >> ...check link for more (https://eval.in/422460)
rbowlby has joined #ruby
<sacarlson>
well I should say only one in my group. all youngsters
<sevenseacat>
I suggest finding someone who uses rbenv, and checking how people typically do things
<sevenseacat>
because these sorts of problems are not normal
<sacarlson>
Bundler::GemNotFound: Could not find rake-10.4.2.gem for installation
<sacarlson>
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
<sacarlson>
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.
<apeiros>
sevenseacat: re your tweet - I started to just wait for people to actually answer my questions and not react until they do. insanity levels have fallen ever since.
<sevenseacat>
what part of 'gist' did not come through clearly
<Ox0dea>
sevenseacat: The "gist" part, I reckon.
<sevenseacat>
did i say 'spam the message with your error'
<sevenseacat>
*spam the channel
<apeiros>
!gist sacarlson
<apeiros>
?gist sacarlson
<ruboto>
sacarlson, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<sevenseacat>
apeiros: yeah I probably should
<sevenseacat>
people like this frustrate me
hyy has joined #ruby
<sevenseacat>
given this has been going for about six hours now
<sacarlson>
sorry
<apeiros>
sevenseacat: I know that feeling quite well :-/
<[k->
die!
<sevenseacat>
sorry, just over four hours.
<sacarlson>
we called it pastebin in my day ha ha
hyy has quit [Client Quit]
clarkenciel has quit [Quit: Leaving]
<[k->
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.
rbowlby has quit [Remote host closed the connection]
<[k->
is this not clear enough?
<sevenseacat>
11:05 to 15:23
hyy has joined #ruby
<sacarlson>
but if I just do bundle install is shows it worked
<sevenseacat>
then whats the problem?
<[k->
WELL USE THAT THEN!
dumdedum has quit [Ping timeout: 260 seconds]
<sevenseacat>
'this is too easy, I must try to do something harder'
hyy has quit [Client Quit]
hyy has joined #ruby
<[k->
have you tried turning bundler on and off again
<[k->
off and on*
* apeiros
goes to search a "calm down" pie
<sacarlson>
[k-: didn't know turning it on and off was an option
msnyon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
[k-: Doing it the way you first suggested would definitely make the problem go away.
terlar has joined #ruby
<[k->
you mean the way i last* suggested
<Ox0dea>
No, the other one.
symm- has quit [Quit: Leaving...]
tomdalling has quit [Ping timeout: 244 seconds]
<Ox0dea>
sacarlson: Is your computer on?
<sacarlson>
yes
<[k->
last is definite for now, there is no other one!
slackbotgz has quit [Remote host closed the connection]
lessless has quit [Read error: Connection reset by peer]
duncannz has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
_blizzy_ has joined #ruby
xhosae has joined #ruby
Contigi777 has quit [Ping timeout: 272 seconds]
* Ox0dea
power-cycles [k-.
towski_ has quit [Remote host closed the connection]
Karpah has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
sevenseacat has quit [Ping timeout: 256 seconds]
Eiam has joined #ruby
livathinos has joined #ruby
<zenspider>
I would change sacarlson's script to do a `gem update --system` before `gem install bundler`
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
I have no idea what lines 14-15 even mean
Alayde has joined #ruby
dumdedum has joined #ruby
<sacarlson>
oh that could be why it can't find the rails good idea
Karpah is now known as sevenseacat
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider>
no idea why you're doing bundler exec ruby yourrubyapp.rb before you install your gems
<zenspider>
ZERO idea why you're using --force
Feyn has joined #ruby
<zenspider>
`bundle exec gem` makes zero sense
<sacarlson>
I assume it would be done inside bundler? bundle exec gem update --system
<sevenseacat>
`gem update --system` has nothing to do with rails
<sevenseacat>
and no, no it shouldnt
<zenspider>
there's a lot of cargo culting in here.... on top of it, there's zero documentation of an actual problem
ramfjord has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
msnyon has joined #ruby
roolo has joined #ruby
bMalum has quit [Quit: bMalum]
<zenspider>
you've been going at this all day and haven't even gisted the problem for us ...
<sacarlson>
problem I had was this https://github.com/ffi/ffi/issues/423 that seemed to repeat with json but I might have fixed it with bundle install -force
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sacarlson>
it was posted above
Alayde has quit [Ping timeout: 250 seconds]
<sacarlson>
but I can't perform bundle install -force on 2.2.1 so may only work on 1.9.3
<zenspider>
did you notice that the developer immediately turned around and asked for more info, it wasn't actually provided, and nobody could help the guy?
UtkarshRay has joined #ruby
<[k->
the life of an average ticket
<sacarlson>
yes and this wasn't the only one similar if I search for json but all just deleted gems as he did and I was doing
<zenspider>
sacarlson: soooo... you should cargo cult a bandaid on top of a cargo culted bandaid.
<apeiros>
that band aid is applied on a voodoo code doll
nisstyre has quit [Ping timeout: 272 seconds]
bruno- has quit [Ping timeout: 244 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
1) your repro isn't a repro. 2) your actual problem is undocumented. 3) you're not listening to feedback.
ferhaty has joined #ruby
bMalum has joined #ruby
roolo has quit [Ping timeout: 250 seconds]
<zenspider>
not sure what else I (or anyone) can possibly do at this point
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 244 seconds]
Iskarlar has joined #ruby
Ox0dea has quit [Ping timeout: 255 seconds]
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
Iskarlar has quit [Client Quit]
<zenspider>
git show doesn't give you a diff in diff/patch format?? really?
Iskarlar has joined #ruby
OrbitalKitten has joined #ruby
stan has joined #ruby
tonios57 has joined #ruby
<zenspider>
"Chunk header format is modified to prevent people from accidentally feeding it to patch -p1. Combined diff format was created for review of merge commit changes, and was not meant for apply."
jackjackdripper has joined #ruby
rdark has joined #ruby
<zenspider>
oh thank god. They're saving me from myself!
* zenspider
whispers to sevenseacat: I hear they can't code anyhow.
<sevenseacat>
heh
michael_mbp has quit [Excess Flood]
<freezevee>
Is the CPU a huge difference?
<freezevee>
because it's the only difference in terms of computing power I see
<freezevee>
1.8 with turboboost to 2.8 vs 2.6
<pusewicz_>
Say I want to look at memory consumption/GC cost etc. in a Rails app to try to optimize allocations, what's a recommended tool for that?
roolo has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<zenspider>
memprof and friends will help. and the newer alloc trace functionality
<pusewicz_>
Gotcha, thanks!
<zenspider>
I mostly try to profile my tests and get them as fast as possible. Helps devs and users alike
<pusewicz_>
makes sense
michael_mbp has joined #ruby
dstarh has joined #ruby
roolo has quit [Ping timeout: 240 seconds]
Voker57|2 has quit []
Voker57 has joined #ruby
chinmay_dd has joined #ruby
tonios57 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
techsethi has quit [Quit: techsethi]
<freezevee>
zenspider: where are these girls with the macbook airs ?
<freezevee>
g-air-ls
patrick_star has quit [Ping timeout: 256 seconds]
<freezevee>
I wonder if sevenseacat: has coded a bot or something because each time I speak she appears
<zenspider>
maybe it's because you keep saying stupid shit?
<freezevee>
why do you see it like that
<sevenseacat>
yes, and it's not like I'm here all day or anything o.O
pusewicz_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lele has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
ldnunes has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sphex has quit [Ping timeout: 260 seconds]
cfloare has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
<freezevee>
sevenseacat: maybe you're a bot
dgutierrez1287 has joined #ruby
ayonkhan has quit []
<zenspider>
pusewicz: and dtrace hooks... but that's entering esoterica
SenpaiSilver has quit [Quit: Leaving]
chinmay_dd has quit [Read error: Connection reset by peer]
<sevenseacat>
freezevee: I assure you, I am not.
<sevenseacat>
you know what zenspider was saying about stupid shit? yeah. that.
<freezevee>
sevenseacat: what is your main machine ? what do you use to code ?
<sevenseacat>
i have a 13" 2015 rMBP
<freezevee>
seriously ?
<sevenseacat>
uh, yes?
<zenspider>
how am I misinterpreting this exchange?
Mon_Ouie has quit [Ping timeout: 264 seconds]
<freezevee>
sevenseacat: have you considered buying an Air instead of a Pro ?
syath has joined #ruby
<freezevee>
sevenseacat: I know you're experienced, that's why I ask
<sevenseacat>
no.
<freezevee>
why not ?
<sevenseacat>
because I didnt want one. I was given my choice of laptop when I took my new job in March, and this is what I picked.
tomdalling has joined #ruby
sdfgsdfg has joined #ruby
cfloare_ has joined #ruby
<freezevee>
so no particular "computing power" reason or something
<sevenseacat>
thats part of it. portability was the other part of it.
<freezevee>
sevenseacat: do you use vagrant/docker in your MBP ?
<sevenseacat>
no.
<freezevee>
so you don't run something that needs extra memory or power ?
<sevenseacat>
what kind of question is that?
<freezevee>
it's not a trap
<freezevee>
just asking
<sevenseacat>
I didnt say it was a trap, it just doesnt make much sense
Alayde has joined #ruby
<freezevee>
because PROs suppose to have more power and usually more memory
<sevenseacat>
thats correct, they do.
<freezevee>
I rarely see a 8GB Air
<freezevee>
I suppose that your choice had to do with that
<sevenseacat>
i have 16GB memory in my MBP.
<freezevee>
I see
<freezevee>
anyway, thanks for the info
cfloare_ has left #ruby [#ruby]
kfpratt has quit [Read error: Connection reset by peer]
<freezevee>
I am thinking to exchange my pro for an air and I thought I could ask here
<DEA7TH>
I'm trying to make parallel web requests and using Typhoeus, but I'm not sure it can achieve what I need - I need to make 2 sets of requests at the same time, and each request in one of the sets has a follow-up request which must happen immediately after it. Can this be achieved with Typhoeus, or if no what should I use instead?
kfpratt has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<DEA7TH>
Alternatively I could use one thread per request for the first set of requests in order to do the follow-up ones, but I suspect this won't work.
jso has quit [Ping timeout: 245 seconds]
bobby__ has joined #ruby
cscheib has quit [Ping timeout: 245 seconds]
verto_ has quit [Ping timeout: 260 seconds]
<zenspider>
my air has 8gb. just $100 more
Alayde has quit [Ping timeout: 255 seconds]
radgeRayden has quit [Read error: Connection reset by peer]
jonee has quit [Ping timeout: 260 seconds]
rubyhelpme has joined #ruby
cscheib has joined #ruby
jso has joined #ruby
<rubyhelpme>
Hello does someone mind helping me real fast?
verto has joined #ruby
bigmac_ has quit [Ping timeout: 264 seconds]
<DEA7TH>
The reason it needs to be structured like that is because I simulate two parties - a listener and a sender. The listener is supposed to make a request and get a response after up to 55 seconds (yes, really, and there was no other solution for that), while it's waiting a sender must send a request with the listener's ID, and then the listener must send a follow-up request to reply to the sender.
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cfloare has joined #ruby
<rubyhelpme>
Hello does someone mind helping me real fast?
gigetoo has quit [Remote host closed the connection]
qba73 has joined #ruby
gigetoo has joined #ruby
<sevenseacat>
rubyhelpme: no-one can help you unless you ask your question
<rubyhelpme>
sevenseacat good point
skade has quit [Quit: Computer has gone to sleep.]
<apeiros>
but I switched to an MBPr because of the retina screen
pusewicz_ has joined #ruby
<sevenseacat>
rubyhelpme: for starters, there's no "else if" in ruby
<rubyhelpme>
zenspider you think? I am using VS Code and it isn't the best for spacing
<zenspider>
sluukkonen: tweet at fastly. they're usually fairly responsive
<maloik>
apeiros: happy with it? I expect I'll need a new laptop in the coming months, currently leaning towards MBPr as well because it's only slightly thicker/heavier than an air
<zenspider>
I just got a 200 for that url tho
<rubyhelpme>
sevenseacat to much cpp
<rubyhelpme>
thanks, haven't used ruby in a long time
sarkyniin has quit [Read error: Connection reset by peer]
<apeiros>
maloik: I'm mostly happy with it, yes. it's 3y old, though. and I want to replace it when USB C + TB3 MBPs are out
Musashi007 has quit [Quit: Musashi007]
<maloik>
That's interesting, that must've been just about the first version then? I thought people were largely unhappy with those
<rubyhelpme>
sevenseacat that fixed the end of input error, thanks. But now i am getting an undefined error
<zenspider>
apeiros: TB3?
<zenspider>
oh. derp. n/m
<sevenseacat>
rubyhelpme: I cant see what it is
<apeiros>
thunderbolt 3
lele has joined #ruby
<maloik>
USB C and TB3 sounds good, but I have a feeling I won't be able to wait that long
arup_r has quit [Remote host closed the connection]
ddv has quit [Changing host]
ddv has joined #ruby
RegulationD has joined #ruby
sacarlson has joined #ruby
sarkyniin has joined #ruby
fast_scooter has joined #ruby
roolo has quit [Ping timeout: 272 seconds]
sarkyniin has quit [Remote host closed the connection]
joonty has joined #ruby
<pontiki>
morning
RegulationD has quit [Ping timeout: 250 seconds]
dhjondoh has quit [Quit: dhjondoh]
freerobby has joined #ruby
NeverDie has joined #ruby
<adaedra>
hi
<[k-_>
hello
thiagovsk has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
bMalum has quit [Quit: bMalum]
freerobby has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
ofdtrinity has joined #ruby
Iskarlar has joined #ruby
skade has joined #ruby
sameerynho has joined #ruby
Feyn has quit [Quit: Leaving]
casadei has joined #ruby
fmcgeough has joined #ruby
dseitz has joined #ruby
dimasg has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
victortyau has joined #ruby
AlphaAtom has joined #ruby
allcentury has joined #ruby
[k-_ has quit [Read error: Connection reset by peer]
[k-__ has joined #ruby
nettoweb has joined #ruby
freezevee has quit []
freerobby has joined #ruby
dimasg has quit [Ping timeout: 255 seconds]
bigbadbear has joined #ruby
devdazed has joined #ruby
whippythellama has joined #ruby
pawnbox has quit [Remote host closed the connection]
malconis has joined #ruby
JoshL has joined #ruby
Zai00 has quit [Quit: Zai00]
Zai00 has joined #ruby
sankaber has joined #ruby
enebo has joined #ruby
pyon has quit [Quit: Screw you, Emacs.]
PaulCapestany has quit [Quit: .]
Zai00 has quit [Client Quit]
Zai00 has joined #ruby
nug is now known as cFouts
atomical has joined #ruby
JDiPierro has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
<datacat>
hi
tagrudev has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<datacat>
hi
<datacat>
so sprockets is a task runner for ruby, right?
pyon has joined #ruby
<datacat>
a pipeline thing - like gulp?
datacat has quit [Changing host]
datacat has joined #ruby
freerobby has quit [Quit: Leaving.]
<adaedra>
it will compile assets on demand, when they are loaded
<adaedra>
it's plugged into a web application
ranaharoni has joined #ruby
<pontiki>
gulp is closer to rake, i'd say
sevenseacat has quit [Quit: .]
kinduff has joined #ruby
<adaedra>
iirc sprockets also take care of the pre-compilation for production mode, but it's strength (at least how I see it) is the live re-compilation on development
<adaedra>
its*
yardenbar has quit [Ping timeout: 246 seconds]
<pontiki>
anyway, i don't think about ever running sprockets for tasks
dopamean_ has quit [Ping timeout: 260 seconds]
JDiPierro has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
<adaedra>
sprockets is really web assets oriented
bruno- has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
christiandsg has joined #ruby
Eiam has joined #ruby
<shevy>
sevenseacat will be so happy to see datacat
<datacat>
coool
<datacat>
meow meow
[k-__ is now known as [k-_
fast_scooter has quit [Ping timeout: 246 seconds]
bigmac_ has quit [Ping timeout: 246 seconds]
<shevy>
lol
arup_r has quit [Remote host closed the connection]
pawnbox has joined #ruby
tomdalling has quit [Ping timeout: 245 seconds]
<adaedra>
datacat:
fast_scooter has joined #ruby
pyon has quit [Quit: fix config]
dojobo has joined #ruby
ofdtrinity has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
paulcsmith has joined #ruby
voltalio has joined #ruby
yardenbar has joined #ruby
ta has quit [Remote host closed the connection]
pyon has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
slackbotgz has joined #ruby
sameerynho has quit [Quit: Leaving]
_blizzy_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Alayde has joined #ruby
jhack has joined #ruby
Macaveli has joined #ruby
bobby__ has quit []
bigmac_ has joined #ruby
revoohc has joined #ruby
kinduff has quit []
Kallis has joined #ruby
kinduff has joined #ruby
atomical has joined #ruby
fast_scooter has quit [Quit: fast_scooter]
Spami_ has quit [Quit: Leaving]
Spami has joined #ruby
rbennacer has joined #ruby
Chau has joined #ruby
sdwrage has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
pandaant has joined #ruby
arcticblue has joined #ruby
RegulationD has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
revoohc has quit [Quit: revoohc]
revoohc has joined #ruby
ta has joined #ruby
freerobby has joined #ruby
revoohc has quit [Client Quit]
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revoohc has joined #ruby
arcticblue has quit [Ping timeout: 245 seconds]
khebbie has quit [Remote host closed the connection]
ecnalyr has joined #ruby
fast_scooter has joined #ruby
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 1.1.1]
solocshaw has joined #ruby
Kallis has joined #ruby
zenguy_pc has joined #ruby
dhollinger has joined #ruby
Kallis has quit [Max SendQ exceeded]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
ecnalyr has quit [Ping timeout: 256 seconds]
j_mcnally has joined #ruby
sarkyniin has joined #ruby
hashrocket has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
gregf has joined #ruby
ta has quit [Remote host closed the connection]
<shevy>
adaedra if you were to go back to your old nick
<shevy>
you could be undeadcat
dopamean_ has joined #ruby
livathinos has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
“old” nick
Macaveli has joined #ruby
riotjones has quit [Remote host closed the connection]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli_ has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has quit [Quit: Zai00]
pyon has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
xhosae has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
xhosae_ has quit [Remote host closed the connection]
Ropeney has joined #ruby
<fluffykat>
hmm, is that code actually testing for randomnes though jhass ? If variable is always =1 then the test would still always pass, despite not setting variable to a random number between 0-2
Quandl has quit [Read error: Connection reset by peer]
jeadre has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 246 seconds]
sarkyniin has joined #ruby
sarkyniin has quit [Remote host closed the connection]
Ropeney has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
andybernard has joined #ruby
yardenbar has quit [Quit: Leaving]
cornerman has quit [Ping timeout: 260 seconds]
cornerma1 is now known as cornerman
<bradland>
measuring distribution won't do the trick
<bradland>
012210012210
tkuchiki has joined #ruby
<bradland>
ordered with equal distribution
<bradland>
testing randomness is hard
<pontiki>
you're making the problem much bigger than they're asking
Torrieri has joined #ruby
<bradland>
am I?
<bradland>
we don't know why they need randomness
<bradland>
a lower standard might be suitable
dimasg has joined #ruby
<bradland>
but we can't presume that is the case
The_Phoenix has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<pontiki>
that they're asking about it at all presumes they don't trust their code to correctly use a random number generator, not that they're writing a random number generator
<jhass>
fluffyKat: pleeaase end this
paulcsmith has quit [Quit: Be back later ...]
<bradland>
lol
<pontiki>
that's my assumption. that they wanted to use capybara to test it makes me more sure of that assumption
<pontiki>
i have no more to add
<fluffykat>
jhass: your code is good enough. Thanks
marr has quit [Ping timeout: 250 seconds]
dumdedum has quit [Ping timeout: 252 seconds]
skade has joined #ruby
sphex_ has joined #ruby
paradoja has joined #ruby
<ElSif>
you should test that the number your rng produces have an expected distribution :) but that is harder
<pontiki>
i disagree
<ElSif>
but bradland is right, even distribution isnt enough
<pontiki>
unless you're writing a generator
<ElSif>
yea thats fair
<bradland>
the point i was really getting at is that the test should frame the question correctly
<ElSif>
very true
<bradland>
i wouldn't write a test that infers it validates randomness unless it passes that bar
dimasg has quit [Ping timeout: 260 seconds]
<bradland>
test the range, test the distribution
<bradland>
but don't name it as a randomness test
paulcsmith has joined #ruby
<pontiki>
i certainly wouldn't
sphex has quit [Ping timeout: 260 seconds]
<bradland>
i should have just said that :P
<TomyWork>
is there an elegant way to getting the sum of an array, preferably with a block to grab a field of those elements?
<pontiki>
inject
<[k->
if you are testing randomness are you really testing randomness?
<ElSif>
i think there is a #sum method now yes?
<ElSif>
but inject is essentially the same
<pontiki>
hum, i know there is in rails
<TomyWork>
ElSif ruby 1.9.3? :)
<ElSif>
might be just rails
<bradland>
ElSif: Array#sum is part of active support, i believe
<ElSif>
yea it is
Eiam has joined #ruby
<ElSif>
i think it just uses inject under th hood :)
<bradland>
TomyWork: are you working with rails, or just ruby?
<[k->
array.map(&:accessor).reduce(:+)?
<TomyWork>
ruby
<havenwood>
ElSif: Ruby doesn't provide an Enumerable#sum but you're free to implement one or use ActiveSupport.
<[k->
your face can be synonymous and not aliases!
sarkyniin has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
<TomyWork>
pontiki oh i was only looking at superclasses
<havenwood>
ElSif: If you wanted to cherry pick it, but doesn't seem worth bothering unless you're already using Rails: require 'active_support/core_ext/enumerable'
<TomyWork>
the included modules should be further up, or the superclasses further down
<[k->
you mean subclasses
<pontiki>
nw TomyWork
livathinos has quit [Ping timeout: 244 seconds]
jas02 has quit [Quit: jas02]
<[k->
havenwood are you sureeeee synonymous > aliases
<TomyWork>
reduce has no neutral element, it just starts with [0]+[1], right?
<havenwood>
[k-: I know what the words mean. I have no doubt.
Torrieri has quit [Quit: Be back later ...]
<havenwood>
[k-: To the dictionary with you!!
JDiPierro has quit [Remote host closed the connection]
riotjones has joined #ruby
Torrieri has joined #ruby
<TomyWork>
except if it does... hmm
* adaedra
hints at offtopic
<[k->
[0]+[1] is [0,1]
<bradland>
TomyWork: you can use an argument form of reduce/inject to do this really simply: [5,10,100].reduce(:+)
rbennacer has quit [Remote host closed the connection]
but3k4 has joined #ruby
christiandsg has joined #ruby
joonty_ has joined #ruby
joonty has quit [Ping timeout: 245 seconds]
joonty_ is now known as joonty
qba73 has quit []
<[k->
that's zip...
cschneid_ has quit []
<[k->
well if you wanted to be more expressive, okay...
lucyinthesky has joined #ruby
<TomyWork>
that's what zip does? uhhh
rbennacer has joined #ruby
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Torrieri has joined #ruby
* TomyWork
reads manual
<[k->
why do you think we can use them both and get the same result...
<TomyWork>
well i thought what i posted first wouldnt work :D
joonty has quit [Client Quit]
joonty has joined #ruby
SCHAAP137 has joined #ruby
I has joined #ruby
I is now known as Guest65069
<bradland>
TomyWork: have you tried irb yet?
<bradland>
you can evaluate ruby at a console
<bradland>
and get live results
<bradland>
great for trying out different permutations of code without re-running an entire application over and over
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<[k->
zip = [[a,b],[c,d]] where the first array is [a,c] and second is [b,d]
JoshL has quit [Read error: Connection reset by peer]
marr has joined #ruby
<[k->
basically it pairs the elements of the same index together from to arrays
JoshL has joined #ruby
<[k->
two*
christiandsg has quit [Ping timeout: 265 seconds]
<TomyWork>
bradland yeah, been using irb all the time
bootstrappm has joined #ruby
<TomyWork>
i just didnt try it because it looked wrong
<[k->
in your case, map would be better since you needed to use a method to get the value from the key
towski_ has joined #ruby
lea has joined #ruby
<TomyWork>
that's what i meant
<TomyWork>
where does get_value_for come into play?
<[k->
TomyWork that wasnt in your original question
CorySimmons has joined #ruby
<[k->
so you should be ashamed!
<TomyWork>
"a block or something"
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
<[k->
proc { #generate array }.call
manila90 has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
<[k->
ok, indeed, you did
<[k->
you can also lazily generate the hash
<TomyWork>
that's probably not good for iteration
sshuff is now known as sshuff|gone
Chau has quit [Ping timeout: 240 seconds]
amclain has joined #ruby
hubcaps has joined #ruby
lea has quit [Quit: bye]
minimuffins has joined #ruby
lea has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hanmac has quit [Ping timeout: 246 seconds]
failshell has quit [Ping timeout: 240 seconds]
jeadre has quit [Remote host closed the connection]
snockerton1 has joined #ruby
<[k->
in case you might eventually need it: Hash.new { |k, hash| (array.include? k) ? hash.store(k, get_value_for k) : nil }
craysiii has joined #ruby
snockerton1 has quit [Client Quit]
umgrosscol has joined #ruby
BLuEGoD has joined #ruby
snockerton1 has joined #ruby
<[k->
the proc is called when the key is not found, so it wouldn't override your keys!
joonty has quit [Quit: joonty]
jeadre has joined #ruby
stan has quit [Ping timeout: 246 seconds]
snockerton has quit [Ping timeout: 265 seconds]
fullofcaffeine has joined #ruby
<[k->
caveat: more expensive in the long run
<sacarlson>
my solution for the problem I spoke of earlier today seems to be working now with both versions of ruby 1.9.3 and 2.2.1 with rbenv bundler now with details here https://gist.github.com/sacarlson/834de549cf0058c1572c
Guest65069 has quit [Quit: Leaving]
rakm has joined #ruby
dudedudeman has joined #ruby
<dudedudeman>
happy wednesday everyone :)
<TomyWork>
[k- is hash.store any different from hash[]?
<TomyWork>
[]= that is
kinduff has quit []
lea has quit [Changing host]
lea has joined #ruby
al3xy has joined #ruby
<[k->
no, it just allows me to not care about = precedence and whatnot
<TomyWork>
also, doesnt the hash come before the key in the arguments?
<bankair>
Hey, guys. I'd like your input on a question we like to ask in interview.
<[k->
ah, you're right TomyWork
<dudedudeman>
bankair: i'd love to hear it
walla has joined #ruby
<walla>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
meatherl_ has joined #ruby
rubie has quit [Remote host closed the connection]
<bankair>
Given a list of elements, how do you return all duplicated ones ([1, 1, 1, 2, 3, 2, 4] => [1, 2])
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
shinnya has joined #ruby
senayar has quit []
<havenwood>
?pizza pizzas
<ruboto>
pizzas, here's your pizza:
dc_ has joined #ruby
Eiam has joined #ruby
<pizzas>
domo arigato mr ruboto
<sacarlson>
the problem parser.so: undefined symbol: rb_str_new_static
<sacarlson>
seems to be fixed with ether bundle install -force or bundle exec gem pristine gemname but will only work on one of the ruby version that have the problem
<TomyWork>
lagweezle the group_by would return a hash where each array element is represented as a key
pizzas has left #ruby ["WeeChat 0.4.3"]
youngbaks has quit [Client Quit]
allcentury has quit [Ping timeout: 265 seconds]
<havenwood>
bankair: ^ just for the heck of it, not that i'd do it that way
<TomyWork>
and the values of the hash are arrays with n times the key in them, where n is how many times the key occurs in the original array
armyriad has joined #ruby
<pontiki>
the value is not in the answer, but in watching the candidate solve it
<walla>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<TomyWork>
next, he's removing all entries where the values are single-element arrays
<TomyWork>
and then he just takes the remaining keys and he's done
casadei has quit [Remote host closed the connection]
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<dorei>
although i wonder if they've messed with PATH env
<[k->
your face is forbidden
<shevy>
hmmm
rippa has joined #ruby
<adaedra>
execution of anything is blocked in the bot
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paradoja has quit [Ping timeout: 250 seconds]
<shevy>
website overhauls... leading to loss of functionality...
bMalum has joined #ruby
Torrieri has quit [Quit: Be back later ...]
al3xy has quit [Read error: Connection reset by peer]
<dorei>
shevy: more job opportunities for developers :D
mikecmpbll has joined #ruby
<[k->
(your face is a loss of functionality)
<lagweezle>
TomyWork: I think I don't understand true/false in Ruby well enough...
<shevy>
well they could test their stuff, just as we do in ruby!
<adaedra>
[k-: will you stop with people's faces
ranaharoni has quit []
<TomyWork>
lagweezle there's no true/false there
<[k->
it depends on what they say :(
bhaak has quit [Ping timeout: 255 seconds]
<shevy>
[k- they say bad things about your face
bhaak has joined #ruby
<[k->
i don't your face everything if it wouldn't be funny
<lagweezle>
TomyWork: But ... v.one? isn't being supplied a block, so ...
* lagweezle
feels very lost.
einarj has quit [Remote host closed the connection]
<walla>
?guys face
<ruboto>
face, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<havenwood>
!mute walla
<shevy>
lol
<TomyWork>
lagweezle v.one? returns true if v is 1 i guess
<shevy>
havenwood was keeping a close eye there :)
CanTonic has joined #ruby
<pontiki>
no; .one? scans an array and if one and only one item in the array returns truthy, then .any? is true
<lagweezle>
TomyWork: Yeah. That's the bit that is kind of messing with me. I think I finally wrapped my head around group_by(&:itself) after re-reading group_by
zenguy_pc has quit [Read error: Connection reset by peer]
xet7_ has quit [Quit: Leaving]
d2dchat has joined #ruby
<lagweezle>
pontiki: If the .any? is actually a .one? in your question, that's my understanding. I'm having trouble making sense of 'truthy' in Ruby right now.
zenguy_pc has joined #ruby
voltalio has joined #ruby
<pontiki>
oops, yes, sorry
voltalio has quit [Max SendQ exceeded]
<pontiki>
it's easier to define 'falsy' and anything else is 'truthy'. falsy is nil and false
<lagweezle>
pontiki: AH! That fills in a great deal, then.
fluffykat has quit [Ping timeout: 264 seconds]
c0m0 has quit [Ping timeout: 272 seconds]
RegulationD has quit [Remote host closed the connection]
<TomyWork>
lagweezle v is a local variable. Fixnum.one? is a method. By convention, methods whose names end in a question mark return a boolean. v.one? tells if v is 1
DEA7TH has quit [Quit: DEA7TH]
roolo has joined #ruby
Chau has joined #ruby
zenguy_pc has quit [Excess Flood]
<TomyWork>
`printf '%s' '#{[1, 1, 1, 2, 3, 2, 4].join("\n")}' | sort | uniq -c | sed -rn '/^ *1 / ! s/^ *([^ ]+) //p'`.split("\n").map(&:to_i) # Made it a bit more solid to whitespacery
Chau has quit [Max SendQ exceeded]
<adaedra>
shevy: havenwood never sleeps. That's Op duty.
<shevy>
he just injects more coffee to stay awake
Chau has joined #ruby
but3k4 has joined #ruby
<adaedra>
havenwood.inject(:coffee)
zenguy_pc has joined #ruby
<theRoUS>
the #cucumber channel is pretty quiet. is it reasonable to ask cucumber questions here?
<centrx>
reduce(:coffee)
zendrix has joined #ruby
<centrx>
theRoUS, It is sensible if not rational
<TomyWork>
so havenwood is an array whose elements have a coffee method?
hackeron has joined #ruby
lucyinthesky has quit [Quit: Leaving]
bruno- has joined #ruby
<lagweezle>
TomyWork: The truthiness bit was missing; wasn't sure there, so was having issues with one? as ... well, I needed that info to know how it behaved with numbers.
hackeron_ has quit [Ping timeout: 260 seconds]
<shevy>
theRoUS the usage % is probably low here; you can still try and hope that someone may know though
<TomyWork>
lagweezle truthiness in ruby is basically like in lua :)
rbennacer has quit [Remote host closed the connection]
<lagweezle>
TomyWork: I know almost nothing about LUA. :/
<TomyWork>
it's a basically like ruby thee
<lagweezle>
The 'not false and not nil' bit helps a lot though.
<theRoUS>
cucumber with ruby. i have a API realised as a module. it defines a class as simply as 'class Foo; include API; end' -- but it's also used to extend another module via 'module Bar; include API; ... end'
angrywombat has joined #ruby
roolo has quit [Ping timeout: 252 seconds]
<theRoUS>
i want to test the behaviour both of an instance of Foo (e.g., Foo.new.methname) but also the module functions (e.g., Bar.methname)
failshell has joined #ruby
JoshL has quit []
<theRoUS>
(sorry, the module definition should be 'module Bar ; class << self ; include API ; end ; ... end')
<theRoUS>
one of my Before hooks defines '@exemplar' as the default object against tests should be applied.
<theRoUS>
so, the question: how can my Before hook tell whether it should use '@exemplar = Bar' or '@exemplar = Foo.new' ?
voltalio has joined #ruby
<theRoUS>
alternatively, if a scenario is tagged with '@a' and '@b', and i have 'Around("@a")' and 'Around("@b")' hooks, and cucumber is invoked with '-t @a'
<theRoUS>
both hooks get invoked. is there a way the hook code can tell a) what the Around('...') argument is (value of the '...'), b) what tags are actually in the set being applied?
<theRoUS>
i.e., is there any way the 'Around("@b")' hook can tell that it's for the '@b' tag expression, *and* that '@b' is *not* in the list of tags being applied?
<shevy>
hmm I have this line in my irbrc: require 'psych'
<shevy>
does anyone remember why I did this? :\
<angrywombat>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<angrywombat>
neat!
<theRoUS>
shevy: psych is prefered for yaml
<havenwood>
angrywombat: Do not spam the bot.
<theRoUS>
shevy: but it wasn't the default prior to, um, 1.9.1 ?
<angrywombat>
havenwood: how should i interact with the bot then?
<havenwood>
!mute angrywombat
<havenwood>
In silence.
meatherl_ has quit []
<havenwood>
Better! :)
<theRoUS>
angrywombat: politely and with restraint? :-)
Spami has quit [Quit: This computer has gone to sleep]
<dorei>
is "folks" still used nowdays?
<theRoUS>
'fellow sentients' ?
<shevy>
theRoUS yeah... but I think, require 'yaml' should suffice or? I don't remember why I did this, my irbrc is really old... I'm gonna delete it and see what happens
DoubleMalt has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<theRoUS>
shevy: what version of ruby are you using? if a newer one, psych is already the default for yaml, and you can safely delete it.
<shevy>
dorei for people who talk 1880 english style
<shevy>
theRoUS I always use the latest official tarball release, 2.2.3 something right now
<theRoUS>
shevy: if you're still doing 1.8.7 or so, though, you should leave it in as it does no harm
<eam>
dorei: none of the alternative suggestions are used in common parlance, which is part of why the suggestion is so silly
<theRoUS>
shevy: psych or an alternative is a prereq for require('yaml')
devoldmx has quit [Ping timeout: 244 seconds]
<eam>
folks can work in some contexts, but "y'all?" I'd rather not be mistaken for a southener
<adaedra>
eam: too late, I already place you in Texas
<theRoUS>
shevy: so you probably put it in there when something else was the default
<eam>
adaedra: I've heard we shouldn't mess with texas
<pontiki>
texas is already too much of a mess
<adaedra>
eam: good thing there's an ocean between them and me.
<pontiki>
two oceans would be better
<eam>
texas isn't really the south, though
<shevy>
theRoUS yeah I guess so, I didn't add any comments so I don't remember for sure
<adaedra>
anyway, time to go
<adaedra>
my train won't wait for me :x
unver has joined #ruby
<eam>
not gonna touch that one with a 10 meter pole eh
petricore has joined #ruby
<ecnalyr>
8.36% of americans live in Texas.
youch has joined #ruby
<dorei>
shevy: i think the last time i've heard of "folks" was on bugs bunny cartoons
turb0 has joined #ruby
<pontiki>
time and train wait for no one
<eam>
ecnalyr: almost as many as in my state!
<pontiki>
i use "folks"
AlexAltea has quit [Ping timeout: 250 seconds]
<pontiki>
but then i'm probably in an old bugs bunny cartoon anyway
turb0 has left #ruby [#ruby]
ruby017 has joined #ruby
<BraddPitt>
this chat needs to eliminate the pointless pronoun discussion
<BraddPitt>
just say whatever you want, ignore those with thin skin who are needlessly upset
<pontiki>
you seem upset
<BraddPitt>
yes because this is clearlty off-topic discussion in a chat that is designed for helping people with Ruby questions
<pontiki>
my my thin skin
angrywombat has left #ruby [#ruby]
<unver>
he has a point -> #ruby-offtopic
qwebirc13579 has joined #ruby
<shevy>
dorei haha
<shevy>
dorei so now we know, jhass is bugs bunny!
zenguy_pc has quit [Read error: No route to host]
<qwebirc13579>
Hi all, I'd like to file a bug report about the web application at irclog.whitequark.org
hs366 has quit [Ping timeout: 245 seconds]
zenguy_pc has joined #ruby
<qwebirc13579>
I'm not sure if you're aware but the filter functionality doesn't work in conjunction with the live updates
zenguy_pc has quit [Read error: Connection reset by peer]
<shevy>
dunno how active whitequark is
<shevy>
last commit 25 days ago so that's still better than +one year inactive projects :D
<qwebirc13579>
Eh, a bug is a bug :)
Hounddog has quit [Read error: Connection reset by peer]
<shevy>
a programmer's old nemesis
troulouliou_div2 has quit [Quit: Leaving]
khebbie has joined #ruby
ruby017 has quit [Ping timeout: 246 seconds]
<craysiii>
hello other biological lifeforms of which sex and gender are not important
<craysiii>
oh sorry ruboto, didn't mean to be exclusionary :P
<jhass>
?justabot
<ruboto>
I'm just a bot. You don't need to address me.
ruby095 has joined #ruby
youngbaks has quit [Quit: WeeChat 1.3]
choke has joined #ruby
<qwebirc13579>
Actually, I think this is an issue report against the JS on whitequarks website I think, not the bot's logging mechanism-- so I will just send them a message next time I see them
nfk has joined #ruby
leafybasil has quit [Remote host closed the connection]
<shevy>
BraddPitt I think you may require permission...
saddad has joined #ruby
<theRoUS>
BraddPitt: a trigger? to shoot someone? :-)
<shevy>
the syntax format is probably available on a website, hopefully
stamina has quit [Quit: WeeChat 1.3]
<BraddPitt>
what do you mean shevy? Who is in charge of him?
<shevy>
ruby095 that code you wrote literally works 1:1 :)
<pipework>
BraddPitt: It's a bot.
<shevy>
BraddPitt there is some way to query the access levels I think; the chain of command should be ruboto -> apeiros -> jhass -> nobody -> anybody ... ah ok I don't know who else can add stuff to the bot
<BraddPitt>
Yes pipework I'm well aware
<ruby095>
sorry I'm trying to get it to only print even# I keep getting odd#
<pipework>
BraddPitt: triggers are for factoids
<shevy>
ruby095 well just change i % 2 then
<shevy>
or the == 0 to == 1 should do
<pipework>
Oh sorry, I had to refresh the view. My client shifted who said what by one row.
<jhass>
BraddPitt: by asking an op to do it
<Mon_Ouie>
BraddPitt: I guess you want a factoid for input/expected output? Just not sure what to call it
<pipework>
textual :(
<ruby095>
thank you i'll try that
<BraddPitt>
shevy would you happen to know how to query the access levels? Like to add a trigger can I do it through a command or do I need to submit a PR?
vorg has joined #ruby
<vorg>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
AlexAltea has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
Zai00 has quit [Quit: Zai00]
lucyinthesky has joined #ruby
<BraddPitt>
please stop
<ruby095>
That worked perfect thank you very much shevy you made my day
DoubleMalt has joined #ruby
<shevy>
BraddPitt when you have access permission you should be able to do so yourself, I don't know how to get access; jhass said an op, so perhaps this is connected to #ruby channel op access
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
I think you can use ?ops but that will highlight them all
ht__ has joined #ruby
iceden|2 has joined #ruby
<craysiii>
there should be a ?stop
<shevy>
haha yeah
<shevy>
but I guess we know who vorg is
niftylettuce has joined #ruby
<craysiii>
and then a ?stahp for the lolez
cschneid_ has joined #ruby
<vorg>
BraddPitt: is ?guys offensive to you?
<Mon_Ouie>
!fact add example Please provide us with an example of valid input for your problem and the output that you want to produce.
<ruboto>
Mon_Ouie, I will remember that example is Please provide us with an example of valid input for your problem and the output that you want to produce.
<jhass>
!mute vorg
<craysiii>
i like how they don't leave rubono OPed
<craysiii>
lol intentional typo, i like to mix things up
JDiPierro has joined #ruby
<ziggles>
Stupid question but what does starting a yaml file with `---` do? I've noticed it seems to make no difference if it's there or not but if i YAML.dump the string always contains `---` as the first line
<tubbo>
wait is this seriously the same guy coming in here and going '?guys'?
<tubbo>
because that is the strangest spam i've ever seen
<craysiii>
yes. yes they are
<craysiii>
social harmony combatant i assume?
<BraddPitt>
hence why the meme trigger needs to be disabled imo. But enough of talking about this, back to ruby
IrishGringo has joined #ruby
<shevy>
tubbo yeah. Some people just have way too much time
fast_scooter has joined #ruby
ghr has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<Mon_Ouie>
!fact edit example Please provide us with an example of valid input for your problem, the output that you're getting, and the output that you were expecting.
<ruboto>
Mon_Ouie, I stand corrected that example is Please provide us with an example of valid input for your problem, the output that you're getting, and the output that you were expecting.
<tubbo>
"i stand corrected" haha
<tubbo>
classy bot
<craysiii>
shouldn't it be !example or something
bMalum has joined #ruby
charginghawk has joined #ruby
<craysiii>
oh it is
<craysiii>
im blind.
<hazelux>
Thanks Mon_Ouie, yeah, I was looking for something that didn't involve checking the array size. dorei's solution seems good!
<Mon_Ouie>
That still won't work if the size of the array is empty or only has one element in it though
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paulcsmith has quit [Quit: Be back later ...]
<dorei>
yeah, a recursive solution would be ideal for something like that
<dorei>
hmm, or maybe not
<craysiii>
#breakthestack
casadei has joined #ruby
<dorei>
it all depands on what the output should be on one one element array
The_Phoenix has quit [Read error: Connection reset by peer]
charginghawk has left #ruby [#ruby]
<dorei>
depends even
paulcsmith has joined #ruby
krisquigley has joined #ruby
jaycee has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
Zackio has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
failshell has quit []
<BraddPitt>
thanks a lot Mon_Ouie, appreciate it
_djbkd has joined #ruby
awlkjwad has joined #ruby
<unver>
craysiii: What is #breakthestack?
awlkjwad has quit [Client Quit]
_blizzy_ has quit [Ping timeout: 255 seconds]
hazelux has quit []
Zackio has joined #ruby
<craysiii>
a joke. recursive functions have a tendency to break the stack (in lower level langs at least)
<shevy>
that auto-correct along with auto-save in an editor via rubocop looks pretty awesome (if rubocop itself is clever enough)
DEA7TH has joined #ruby
<shevy>
arcanez programmers are often very lazy people
Valeness is now known as timeebot
<shevy>
I think (&:to_s) looks uglier but it is shorter which is good
timeebot is now known as Valeness
fullofcaffeine has quit [Remote host closed the connection]
<Porfa>
I'm having like this deep issues with mechanize and APEX (oracle application express) i cannot do anything in pages that are done on APEX, the buttons have no labels (in mechanize) and other stuff lie that, BUT when i inspect the elements on firefox everything is there.. so. do i need to set some things in the mechanize agent?…
hahuang61 has quit [Quit: WeeChat 1.2]
shadeslayer has quit [Ping timeout: 260 seconds]
<Porfa>
so when it requests the page, it gets me the "full" page and not incomplete things.. (apex is a pain in the butt)
<arcanez>
shevy: (&:to_s) instead of { |x| x.to_s }, I much prefer the first :)
khebbie has joined #ruby
<arcanez>
I guess &:to_s is the closest we can get to running to_s on every element
RegulationD has quit [Remote host closed the connection]
shadeslayer has joined #ruby
<craysiii>
you could implement #to_string_array (#tsa for short ;) ) on Enumerable?
dopamean1 has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
baweaver has quit [Remote host closed the connection]
<pipework>
miah: No, I use my OS's autocorrect to insert luls into my day.
flounders has joined #ruby
choke has joined #ruby
towski_ has joined #ruby
rapeboto has joined #ruby
<rapeboto>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
RegulationD has joined #ruby
<jhass>
!mute rapeboto
<craysiii>
oh come on.
<BraddPitt>
just remove it
RegulationD has quit [Remote host closed the connection]
<BraddPitt>
it literally serves no purpose
scottschecter has joined #ruby
<miah>
wat?
<arcanez>
i got my question answered, i was more interested if there was any optimization made by using &: but seems it just expands to the same code
meatherly has quit []
rapeboto has quit [Client Quit]
dopamean_ has quit [Ping timeout: 246 seconds]
<pipework>
arcanez: Ruby's Benchmark library is super easy to use if you're curious about performance.
<shevy>
this would look like this? (&:to_s.to_proc.call(42, 16))
<pipework>
But that's for methods on self
<shevy>
oh right
<shevy>
the .call() can probably become a [] in that example too?
<pipework>
yup
abbe_ is now known as abbe
dgutierrez1287 has joined #ruby
CorySimmons has quit [Quit: Bye!]
Jackneill has joined #ruby
rapeiros has joined #ruby
<rapeiros>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<rapeiros>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
_blizzy_ has joined #ruby
bMalum_ has joined #ruby
<arcanez>
pipework: you think { |x| x.to_s } or (&:to_s) is more concise?
<Mon_Ouie>
!mute rapeiros
chrisja has joined #ruby
but3k4 has joined #ruby
<pipework>
arcanez: The one that fits the definition of concise more closely than the other.
_blizzy_ has quit [Max SendQ exceeded]
bMalum has quit [Ping timeout: 244 seconds]
<arcanez>
:)
rapeiros has quit [Client Quit]
_blizzy_ has joined #ruby
<pipework>
I try not to convey intent for an audience that doesn't know the language it's written in.
<shevy>
php
krisquigley has quit [Remote host closed the connection]
<pipework>
shevy: lul
<pipework>
Also why I don't advertise that I know perl.
<shevy>
it's ok, it's our old grandpa
<shevy>
and there is perl 6
dgutierrez1287 has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
<miah>
is perl6 out yet?
bronson has joined #ruby
<shevy>
they want it for the end of the year 2015, one dude on #bioinformatics is using it already though so I guess it must be somewhat usable
blackmesa has quit [Ping timeout: 264 seconds]
thiagovsk has left #ruby [#ruby]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zendrix has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
yardenbar has joined #ruby
<baweaver>
miah: Same time as ES6 actually comes out.
khebbie has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
gals has joined #ruby
<gals>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<gals>
?gals
<ruboto>
I don't know anything about gals
<jhass>
!mute gals
codecop has joined #ruby
_blizzy_ has joined #ruby
* pipework
wonders how long it'll take for someone to ban-forward kiwiirc and set this channel to registered accounts only
<miah>
ive banned kiwiirc once =)
darkf has quit [Quit: Leaving]
momomomomo has joined #ruby
<pipework>
gotta ban-forward to something like #ruby-unregistered though and have either topic and/or chanserv notices explaining what to do and why they landed there.
<miah>
the unfortunate thing about irc is user friendliness, in regards to both irc clients, and irc users.
<miah>
web gateways lower the barrier on the irc client side, but unfortunate people use them
<miah>
s/use/abuse
<pipework>
miah: Take the knowledge that they're doing this by hand and make it take longer to get here.
<miah>
hard to tarpit irc
<pipework>
#rubyonrails is registered users only.
catoblepa has joined #ruby
<miah>
i dont think we want to go that route.
<pipework>
whatever :)
<apeiros>
it has been discussed and rejected
diegoaguilar has quit [Read error: Connection reset by peer]
<apeiros>
we can temporarily use the general unregistered ban, and maybe today we will.
blue_deref has joined #ruby
<eam>
it's amazing to me that someone is doing this by hand
<pipework>
Freenode staff will often just turn on different things that make joining harder for their channels until the attack abates.
lucyinthesky has joined #ruby
<miah>
interesting
kirun has joined #ruby
<eam>
we're in a channel that discusses a simple language for basic automation, whoever's doing this has to be really bad at understanding the kind of tasks ruby is good at
<pipework>
You all seem to believe that you've got it whale in hand though, so I'll lend my expertise elsewhere on the matter.
<shevy>
what is it with you and the whales
arooni-mobile has joined #ruby
<pipework>
shevy: I've explained it to you multiple times.
<apeiros>
eam: I think the kind of people doing that are generally quite bad at understanding things.
<miah>
a lack of understand is what led them astray in the first place. =)
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
Seems speculative.
<eam>
maybe. undestanding can be a very complex shape - sometimes people are really good at understanding some things and really bad at others
<miah>
of course
d2dchat has quit [Remote host closed the connection]
bl4ckpajamas has joined #ruby
<miah>
anyways. i'd much rather discuss ruby. than racism, and all the other isms that the trolls are brining.
freerobby has quit [Quit: Leaving.]
<miah>
s/brining/bringing
<miah>
i cant type
<apeiros>
sure. it's better anyway. those special kind of people draw satisfaction from being discussed.
baweaver_ has joined #ruby
roman has joined #ruby
<roman>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<apeiros>
!kick roman
roman was kicked from #ruby by ruboto [roman]
* wasamasa
sighs
lucyinthesky has left #ruby ["Leaving"]
Rinzlit1 has joined #ruby
<baweaver_>
apeiros: temp ban kiwi?
<baweaver_>
well
<baweaver_>
that answers that
roolo has joined #ruby
bMalum_ has quit [Quit: bMalum_]
baweaver has quit [Ping timeout: 250 seconds]
SuMo_D has joined #ruby
<shevy>
lol
victortyau has quit [Quit: Leaving]
<ght>
Question: Assuming that commcheck_start_dt is a DateTime object, and user_profile["dates"]["tz"] is an ActiveSupport::Timezone object, would the following if condition accurately ensure that the date represented...
zendrix has joined #ruby
bruno- has joined #ruby
<ght>
in commcheck_start_dt is either the same day or in the future relative to user_profile["dates"]["tz"} -
<ght>
unver: Thank you, I assume you mean date ranges?
<pivA>
uhmm, anyone had problems with Bundler + unicorn? I'm running into some problem with "cannot load such file -- kgio_ext" and Google isn't really helping :/
<unver>
ght: yes, it might make things easier to read
<havenwood>
a kinder, gentler IO
<ght>
haha
<ght>
Hmm, I've never used DateRange()
<havenwood>
pivA: Prefixing `bundle exec` to your unicorn command?
<pivA>
havenwood: yeap, running with 'bundle exec'
<ght>
So, with those conditions, how on earth would DateRange apply to this situation?
<ght>
I'm reading about it now.
<unver>
pivA: What OS?
<unver>
ruby version, etc.
<ght>
commcheck_start_dt is a DateTime object, and user_profile["dates"]["tz"] is an ActiveSupport::TimeZone object.
<BlueShoesYes_>
Anyone use Ocra? I've written a very small app (it essentially just formats text in your clipboard) and it takes roughly 10 seconds to run when compiled with Ocra. Any ideas?
freerobby has joined #ruby
<ght>
I just need to check to ensure commcheck_start_dt is either the current date or in the future relative to user_profile["dates"]["tz"]
pandaant has quit [Remote host closed the connection]
<pivA>
havenwood: what's even stranger is that this application is running in a Docker container, I have another one with the same app but for a different country that's running flawlessly, I've just built a new image with the only difference being the config files pointing to another DB
hinbody_ has joined #ruby
UtkarshRay has quit [Quit: Leaving]
datacat_ has joined #ruby
dc_ has joined #ruby
<pivA>
unver: ruby 1.9.3, OS in the container is an Ubuntu 12.04
datacat_ has quit [Client Quit]
voltalio has joined #ruby
datacat has quit [Ping timeout: 250 seconds]
<havenwood>
pivA: Any errors when you?: bundle install
nofxx has quit [Ping timeout: 265 seconds]
QKO has joined #ruby
<pivA>
havenwood: nope, everything is installed without errors, if it had any error the Docker image weren't going to finish building
benlieb has joined #ruby
<ght>
My initial thought is simply to check whether or not the year, month, and day are >=
hinbody has quit [Ping timeout: 252 seconds]
<ght>
I figure if all of those conditions are met then it will be in the future, no?
<ght>
So forgetting about cleaning up the interface, just to check and ensure the logic will work.
erts has joined #ruby
<ght>
Will that statement work for ensuring this conditon?
n_blownapart has quit [Remote host closed the connection]
<pivA>
it's been pretty strange, I'm building the image right now in the same environment that the application for another country is currently being built on (a Jenkins instance) but that shouldn't change anything... let's see
n_blownapart has joined #ruby
<ght>
will that ensure commcheck_start_dt is either the same day or in the future realtive to user_profile["dates"]["tz"]?
<pipework>
ght: Why not just other_date >= ["tz"].beginning_of_day ?
<ght>
I know the .now.year and all those are correct, I'm just asking about the logic
<ght>
becuase they're of two different types
<ght>
one is DateTime, one is ActiveSupport::TimeZone
BlueShoesYes has joined #ruby
<ght>
I could create a supplemental DateTime Object and then >= I suppose
iateadonut1 has quit [Quit: Leaving.]
<pipework>
Err ['tz'].now.beginning_of_day I guess
JoshGlzBrk has joined #ruby
<ght>
do what?
n_blownapart has quit [Client Quit]
<pipework>
Yeah, I'd spend my efforts getting objects that are easily comparable instead of handling the differences between the two in the comparison code.
hinbody has joined #ruby
thang has joined #ruby
<ght>
Ok, I'll do that then, thank you
hinbody_ has quit [Ping timeout: 260 seconds]
yatish27 has joined #ruby
rapeiros has joined #ruby
kr3ssh has joined #ruby
BlueShoesYes_ has quit [Ping timeout: 246 seconds]
rapeiros has quit [Client Quit]
dseitz has joined #ruby
rick_nick has joined #ruby
<rick_nick>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<rick_nick>
?rape
<ruboto>
I don't know anything about rape
<apeiros>
!kick rick_nick
<rick_nick>
?how to moderatre
<ruboto>
to, I don't know anything about how
<rick_nick>
?lol
<ruboto>
I don't know anything about lol
<rick_nick>
?cantmod
<ruboto>
I don't know anything about cantmod
khebbie has joined #ruby
rick_nick was kicked from #ruby by ruboto [rick_nick]
iceden|2 is now known as iceden
catoblepa has joined #ruby
<shevy>
this guy
towski__ has joined #ruby
towski_ has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
RobertBirnie has quit [Ping timeout: 265 seconds]
devoldmx has joined #ruby
lucyinthesky has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has quit [Ping timeout: 246 seconds]
Ariadeno has quit [Ping timeout: 246 seconds]
unver has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
ramfjord has quit [Ping timeout: 265 seconds]
cschneid_ has quit [Read error: Connection reset by peer]
code1o6 has quit [Ping timeout: 244 seconds]
<ght>
The fuck was that about?
Ariadeno has joined #ruby
<ght>
What a clever guy.
<ght>
Was that a disgruntled Python user?
Ariadeno is now known as Guest87866
<apeiros>
a bored asshole
code1o6 has joined #ruby
stef204 has joined #ruby
<pipework>
A bored asshole that doesn't even automate.
<pipework>
Not a troll worth having.
<shevy>
ght a python user would probably have better things to do such as write code
devoldmx has quit [Ping timeout: 250 seconds]
khebbie has quit [Remote host closed the connection]
<wasamasa>
hmm
<wasamasa>
so, do we ban freenode webchat next?
<pipework>
Maybe they're building the next generation of cyberbullying AI software!
<ght>
shevy: fair point.
<wasamasa>
ght: I'm fairly sure python users wouldn't go as far as bothering this channel for weeks with fairly bad, I dunno what I'd call it
<wasamasa>
ght: juvenile trolling?
postmodern has joined #ruby
christiandsg has joined #ruby
Pilrate has joined #ruby
bnizzle has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
benlieb has quit [Quit: benlieb]
benaiah has joined #ruby
dudedudeman has joined #ruby
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
ofdtrinity has quit [Ping timeout: 246 seconds]
erts has quit [Quit: erts]
Pilrate has left #ruby [#ruby]
ghr has quit [Ping timeout: 256 seconds]
guysguys has joined #ruby
guysguys has left #ruby [#ruby]
guysguysguys has joined #ruby
rbowlby has quit [Remote host closed the connection]
guysguysguys has left #ruby [#ruby]
RegulationD has joined #ruby
skade has joined #ruby
havenn has joined #ruby
revoohc has quit [Quit: revoohc]
Porfa has joined #ruby
yatish27 has quit [Read error: Connection reset by peer]
RegulationD has quit [Remote host closed the connection]
christiandsg has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
yatish27 has joined #ruby
BlueShoesYes has quit [Quit: Page closed]
Alayde has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 265 seconds]
baweaver_ has quit [Remote host closed the connection]
fluffykat has joined #ruby
kr3ssh has quit [Ping timeout: 252 seconds]
sphex_ has quit [Ping timeout: 246 seconds]
dfockler has quit [Remote host closed the connection]
ofdtrinity has joined #ruby
yatish27 has quit [Remote host closed the connection]
lele has quit [Ping timeout: 240 seconds]
jhack32 has joined #ruby
sphex has joined #ruby
baweaver has joined #ruby
linoespinoza has joined #ruby
fantazo has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 240 seconds]
jhack has quit [Ping timeout: 250 seconds]
fluffykat has left #ruby [#ruby]
centrx has joined #ruby
jamesdoh has joined #ruby
yatish27 has joined #ruby
jamesdoh has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 244 seconds]
lele has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
ruby-lang267 has joined #ruby
momomomomo has quit [Quit: momomomomo]
bigredboots has joined #ruby
dudedudeman has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
linuxboytoo has joined #ruby
codecop has quit [Remote host closed the connection]
mordocai has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
mary5030 has quit [Ping timeout: 245 seconds]
krisquigley has joined #ruby
fast_scooter has quit [Quit: fast_scooter]
z1haze2 has joined #ruby
_seanc_ has joined #ruby
yatish27 has quit [Remote host closed the connection]
<Porfa>
do i have to "submit" a button? (very new to all this stuff)
<jhass>
^ feel free to PR new items for that to apeiros/ruby-community
<BraddPitt>
question. I have an array of strings and if one of the words matches a regex, I would like to insert a 'nil' string in the array before that word. How can I do this with map?
<Porfa>
atzorvas: hmm there is only one form on the page, and only one button with the id "Create"
<atzorvas>
Porfa: how do you populate the form?
garethrees has quit [Ping timeout: 252 seconds]
tno has joined #ruby
<atzorvas>
just lookup for the form and do a form.submit
Gribo has quit [Read error: Connection reset by peer]
<Porfa>
atzorvas: i don't want to populate the form, when i click that button, it just takes me to another page where i can in fact, populate a form to Create something
<Porfa>
ok
<Porfa>
there are other buttons on that form though
nertzy has joined #ruby
<atzorvas>
.submit will look for the input="submit"
ghr has joined #ruby
<Porfa>
hmm ok
terrellt has quit [Ping timeout: 244 seconds]
<atzorvas>
if your form has more than one input="submit" then it's mal-form-ed :P
allcentury has joined #ruby
<johnflux>
I want to set up a server that is the same sort of setup as I have
ofdtrinity has joined #ruby
<johnflux>
I can do: gem --list to get a list of gems
<johnflux>
can I easily install that list on the server?
<craysiii>
wouldnt you just use bundle ?
lupine has quit [Ping timeout: 244 seconds]
yqt has quit [Ping timeout: 265 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saddad has quit [Ping timeout: 252 seconds]
<johnflux>
hmm maybe
terrellt has joined #ruby
ruby_ops_r_nazis has quit [Ping timeout: 246 seconds]
hanmac has quit [Ping timeout: 244 seconds]
RobertBirnie has quit [Ping timeout: 256 seconds]
rideh has joined #ruby
<Porfa>
in the inspect element, the button has this "onclick="onclick="apex.navigation.redirect('f?p=220:21:13297205215999::NO:21::');""
lupine has joined #ruby
decoponio has quit [Quit: Leaving...]
z1haze2 has quit [Quit: Leaving]
momomomomo has quit [Ping timeout: 256 seconds]
ofdtrinity has quit [Client Quit]
hanmac has joined #ruby
<atzorvas>
Porfa: go for watir-webdriver
<atzorvas>
mechanize can fill forms etc but it can't handle js
RobertBirnie has joined #ruby
<havenwood>
johnflux: You can do it in Ruby entirely with Gem but if you'd like to do it from the terminal you could do something along the lines of: gem list -q | ruby -e "puts \"gem install #{ARGF.readlines.map(&:split).map(&:first).join(' ')}\""
poli has joined #ruby
momomomomo has joined #ruby
<shevy>
how do aliases in a class or a module actually work?
<havenwood>
johnflux: Or awk/sed or like I mentioned you can do it entirely from within Ruby. I'm not quite clear on what you're wanting exactly.
<poli>
I need to record some information I collect from a number of hosts. But I will keep only a limited (~10) for each machine. I am planning on keeping them on the filesystem using a file for each individual host. Is there some gem or some best practive for this kind of situation?
<havenwood>
johnflux: Maybe say more? Are you trying to generate the command to run remotely or something else?
<johnflux>
havenwood: I think I'll manually install things like rails, and then use bundle for the rest
polpak has joined #ruby
bsdbofh has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<atzorvas>
poli: at least store them as json. so you can parse json from the file later
<havenwood>
johnflux: Ah, I think I misunderstood your query. Gotcha.
baweaver has joined #ruby
<poli>
atzorvas: any gems that might help?
<atzorvas>
poli: u can write with f.puts JSON.pretty_generate item
<atzorvas>
(pretty generate is for creating a human-readable json file)
<jhack>
can someone help me out with rspec? I'm having writing a test to pass through my (play?) method which contains a get.chomp (getting an error from terminal). Gist: https://gist.github.com/jhack32/e75b8fd6bc840f9ad830
<poli>
atzorvas: thank you!
ofdtrinity has joined #ruby
yardenbar has quit [Quit: Leaving]
<atzorvas>
jhack: could you post the error as well somewhere in the gist?
<jhack>
yeah, ill update it right now
dc_ has quit []
<jhack>
okay, updated
Cache_Money has quit [Quit: Cache_Money]
<jhack>
i've tried stub! already, didnt work, maybe i might've used it incorrectly
SuMo_D has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
<Porfa>
atzorvas: i can i use that without a graphical interface like i can with mechanize? I'm only working in a putty terminal for doing those tasts
<atzorvas>
Porfa: anything you need with watir-headless don't hesitate to ping me
bigbadbear has quit [Ping timeout: 260 seconds]
<atzorvas>
it's relatively easy
denisemccoy has quit [Remote host closed the connection]
ruby-lang896 has joined #ruby
<workmad3>
jhack: atzorvas's link is a good idea too, btw... or my personal preference is to have a class where I can pass in an IO object and use gets/puts/etc on that object, rather than calling them implicitly or explicitly on $stdin and $stdout
<Porfa>
do i need anything else besides a terminal/putty and that gem? because if i do, I'm out of luck ;_;
[k- has joined #ruby
k3asd` has joined #ruby
<atzorvas>
Porfa: xvfb is an OS-dep for headless so you have to install this one with your package manager
<workmad3>
because then you can just pass a StringIO into your class, rather than have to mess around shimming $stdin and $stdout in your before and after blocks
khebbie has joined #ruby
<workmad3>
atzorvas: it's also dependent on your browser running through an x11 server, which can be a PITA if you're on a mac :(
dhollinger has quit [Remote host closed the connection]
<workmad3>
Porfa: if you want a really headless browser, take a look at PhantomJS
<havenwood>
johnflux: You can switch between them with ruby-switch or update-alternatives.
ecnalyr has quit [Remote host closed the connection]
<hiter_loves_ruby>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<havenwood>
!mute hiter_loves_ruby
<havenwood>
johnflux: If you're developing on 2.1 the Brightbox 2.1 package makes sense.
<drbrain>
whois hiter_loves_ruby
<drbrain>
oops
<zenspider>
haha
<zenspider>
looks like I "missed out"
<adaedra>
time for zenspider to have fun
<zenspider>
I'll bet hiter_loves_ruby is also tora/omfgtora.
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
He/She goes by many names.
jenrzzz has quit [Ping timeout: 240 seconds]
_blizzy_ has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
SuMo_D has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
agocorona has joined #ruby
lucyinthesky has quit [Ping timeout: 255 seconds]
rehat has quit [Remote host closed the connection]
jeadre has quit [Read error: Connection reset by peer]
<zenspider>
it's just petty and pathetic. it'd be sad if I gave a shit
jeadre has joined #ruby
hiter_loves_ruby has left #ruby [#ruby]
<zenspider>
that said: I HAVE PIXELS!
sdwrage has joined #ruby
minimuffins has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
<adaedra>
bravo
iamninja has quit [Ping timeout: 272 seconds]
roolo has quit [Ping timeout: 260 seconds]
<pizzas>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
kinduff has quit []
ckinniburgh has quit [Read error: Connection reset by peer]
<zenspider>
rects and lines and double buffer flipping... now for fancier pixels.
mblagden has joined #ruby
<zenspider>
I love how we've mortally offended a bunch of 14 year old boys.
rushed has quit [Quit: rushed]
krisquigley has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeadre has quit [Remote host closed the connection]
Mendenhall has joined #ruby
<jhack>
zenspider: story?
nkts has quit [Remote host closed the connection]
<zenspider>
not sure why, but periodically gist/github misindents ruby and makes it an unreadable mess. I have to reload to see the code as intended... never have figured this one out
<zenspider>
jhack: asking you for input like the gets isn't on the StringIO you created?
jeadre has joined #ruby
<zenspider>
jhack: why do you have all those allow calls?
<zenspider>
no, I think it is still indented poorly... so it is a combo of the two :)
<jhack>
:X
<zenspider>
line 32 doesn't make sense
kies^ has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
<zenspider>
I think you don't want that, and you need an extra end at the end of the file... not positive tho
<zenspider>
I can't tell your intent yet
<zenspider>
also don't know why you have an after(:each)
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<jhack>
I was testing out different things, new to RSpec
kies^ has joined #ruby
<zenspider>
don't be fancy. do the simplest thing that could possibly work. get it working. refactor from there
<jhack>
But what i want to do is, have the test, test my play? method when the input is no/yes
<jhack>
as of right now
choke has joined #ruby
<zenspider>
sure... but right now you're not even calling play? directly
<zenspider>
stop using indirection. do what you want when you want it. deal with the problems that fall out of that more directly.
<jhack>
Doesn't (game.play?) call the play? method?
Axy has quit [Ping timeout: 255 seconds]
doublemalt_ has joined #ruby
notabott has joined #ruby
<zenspider>
when does after(:each) happen? when is it relative to a before in a sub-describe? does it happen after an after block in a sub-describe? etc
<zenspider>
stop. being. indirect.
notabott has left #ruby [#ruby]
<jhack>
ok
Asher has joined #ruby
zenspidelovescok has joined #ruby
zenspidelovescok has left #ruby [#ruby]
zenspidelovesdik has joined #ruby
zenspidelovesdik has left #ruby [#ruby]
zenspidelovesdik has joined #ruby
zenspidelovesdik has left #ruby [#ruby]
<jhack>
btw, what's the backstory of all these part/joins?
<zenspider>
jackassery. ignore it
<lucyinthesky>
cosplay.
DoubleMalt has quit [Ping timeout: 260 seconds]
rbennacer has quit [Remote host closed the connection]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<ocx>
i am not able to install
Kallis has joined #ruby
momomomomo has quit [Quit: momomomomo]
Kallis has quit [Max SendQ exceeded]
<dfockler>
ocx: looks like ruby can't access your C compiler, it's either not in the path, or not installed
<ocx>
dfockler: i can write gcc it is there
catoblepa has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
devoldmx has joined #ruby
<ocx>
i do have build essentails installed dfockler
n_blownapart has quit [Remote host closed the connection]
AlexAltea has joined #ruby
ledestin has joined #ruby
n_blownapart has joined #ruby
<dfockler>
I'm not sure then, I'd check the the gem_make.out
<al2o3-cr>
ocx: What OS?
<ocx>
al2o3-cr: ubuntu 14.04
<ocx>
i install ruby 2.2.3 using rvm
<ocx>
i also install ruby 2.2.3-dev using rvm
<al2o3-cr>
ocx: Try sudo apt-get install ruby-dev then reun gem install ronn
<al2o3-cr>
*rerun
chipotle has joined #ruby
<ocx>
al2o3-cr: it will install ruby dev 1.9.1
<ocx>
al2o3-cr: i tried now, same error
<havenwood>
ocx: It seems you're using an RVM Ruby for a pre-release 2.2.3-dev. Switch to 2.2.3 now that it has been released.
baweaver has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<zenspider>
holy crap. when clang says -Weverything is _everything_, they mean it
<ocx>
havenwood: sorry i didnt get what to do
RegulationD has quit [Remote host closed the connection]
<zenspider>
jhack: sure
<havenwood>
ocx: A single-user install of RVM in your home dir is recommended unless you have a reason to do elsewise. You get that by imploding and reinstalling RVM without sudo and as a non-root user.
zendrix has quit []
<havenwood>
ocx: Now that Ruby 2.2.3 has been released use it rather than pre-releases or release candidates.
RegulationD has joined #ruby
hs366 has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ocx>
havenwood: i did try installing rvm as a normal user i did rvm install 2.2.3 and rvm install 2.2.3-dev and then gem install ronn same errors
<havenwood>
ocx: I mean `rvm implode` then reinstall RVM without sudo as a non-root user.
<ocx>
rvm implode as root?
<havenwood>
ocx: To completely remove your system instal (follow instructions)l: rvm implode
<havenwood>
(Has you type "yes".)
jenrzzz has quit [Ping timeout: 250 seconds]
<havenwood>
ocx: Then as a non-root user: \curl -sSL https://get.rvm.io | bash
<havenwood>
ocx: And install the latest Ruby (2.2.3): rvm reload && rvm install ruby
Mendenhall has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
devdazed has quit [Ping timeout: 252 seconds]
RandyT_ has joined #ruby
j_mcnally has joined #ruby
denisemccoy has quit [Remote host closed the connection]
Voker57 has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<ocx>
gem install ronn Fetching: mustache-1.0.2.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.9.1 directory. havenwood
<ocx>
if i do a sudo it doesnt work too, complains about having ruby > 2.0
mary5030 has joined #ruby
<havenwood>
ocx: Yes, permissions issue with your global install.
<ocx>
what do i do
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
ocx: You can try to fix permissions with `rvmsudo rvm fix-permissions` but as I've mentioned a single-user install is recommended.
<havenwood>
ocx: rvmsudo rvm implode
<ocx>
sudo chmod 777 /var/lib/gems/1.9.1/ (trusty)pgharios@localhost:~/Downloads$ gem install ronn ERROR: Error installing ronn: mustache requires Ruby version ~> 2.0. havenwood
<havenwood>
:O
freerobby has quit [Quit: Leaving.]
n_blownapart has quit [Remote host closed the connection]
n_blownapart has joined #ruby
bigredbo_ has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
bronson has joined #ruby
Meeh has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 244 seconds]
Meeh has joined #ruby
<ocx>
havenwood: i am trying as a normal user
kies^ has quit [Ping timeout: 240 seconds]
chrisja has quit [Quit: leaving]
stef204 has quit [Remote host closed the connection]
Cache_Money has joined #ruby
stef204 has joined #ruby
marr has quit []
sarkyniin has quit [Remote host closed the connection]
stef204 has quit [Client Quit]
mordocai has joined #ruby
tvw has quit []
hs366 has quit [Ping timeout: 240 seconds]
lucyinthesky has left #ruby ["Leaving"]
choke has joined #ruby
sarkyniin has joined #ruby
sarkyniin has quit [Remote host closed the connection]
<radens>
how do I do a = 1 if maybe_false else 2 in ruby>
<radens>
?
<jhass>
radens: a = condition ? 1 : 2
TheNet has joined #ruby
<jhass>
called ternary
chipotle has joined #ruby
<radens>
derp
<radens>
of course
<jhass>
funny, yesterday or so exactly the same happened :P
Zai00 has quit [Quit: Zai00]
<Porfa>
will rbyfulsoup work on sites with js? dammit, i have this 100001 forms and i can't even touch them with mechanize :'(
tmtwd has joined #ruby
<Aeyrix>
Nokogiri fam
<jhass>
ask for an API?
snockerton has quit [Quit: Leaving.]
kies^ has joined #ruby
safety_cut has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
tomdalling has joined #ruby
hydrozen has joined #ruby
baweaver has left #ruby [#ruby]
baweaver has joined #ruby
pabs has quit [Ping timeout: 252 seconds]
atzorvas has quit [Ping timeout: 260 seconds]
replay has joined #ruby
ghr has joined #ruby
k3asd` has quit [Ping timeout: 252 seconds]
andybernard has quit [Ping timeout: 255 seconds]
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
northfurr has joined #ruby
benlieb has quit [Quit: benlieb]
EllisTAA has joined #ruby
<zenspider>
ocx: what does the error message say?
pabs has joined #ruby
benlieb has joined #ruby
bigredboots has joined #ruby
startupality has quit [Quit: startupality]
ghr has quit [Ping timeout: 250 seconds]
<zenspider>
is there a cleaner way to use rb_scan_args if you have 10+ args?
benaiah is now known as benaiaher
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
or something else is fine too
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 244 seconds]
dfockler has quit [Remote host closed the connection]
choke has joined #ruby
bigredboots has quit [Remote host closed the connection]
benaiaher is now known as benaiah
AlexAltea has quit [Ping timeout: 250 seconds]
nofxx has joined #ruby
Torrieri has quit [Quit: Be back later ...]
<drbrain>
zenspider: how many do you have?
charliesome has joined #ruby
<drbrain>
and what rubies?
minimuffins has joined #ruby
<zenspider>
mmm... ruby 2.0+. currently 10 + 1 optional (which I'm working out of existance)
Asher has quit [Quit: Leaving.]
lucyinthesky has joined #ruby
cjbottaro has joined #ruby
<drbrain>
if you can get rid of the optional I think you can cheat by using "901"
ecnalyr has joined #ruby
<drbrain>
where 9 is "leading mandatory args" and 1 is "trailing mandatory args"
<zenspider>
oh. trailing mandatory?
<drbrain>
you can do def a, b=1, c; end nowadays
<zenspider>
if I can get rid of the optional, then I should just be able to declare an arity of 10 and have named args, right?
<zenspider>
at that point, it should be moot
<zenspider>
still 10 fucking args... but I'm stuck with that
<drbrain>
ugh, but I think that's ruby 2.1+
RobertBirnie has joined #ruby
<drbrain>
the other option is to manually take the first ten arguments from argv, then update argv and argc for rb_scan_args if you still need the optional
<zenspider>
ooh. that's interesting.
<zenspider>
I actually don't want the optional at all. it's only there for compat sake at this point
<zenspider>
but you can't do optional args with declared arity afaik
<drbrain>
you can rb_check_arity()
<drbrain>
ugh, static
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ecnalyr has quit [Ping timeout: 250 seconds]
lucyinthesky has quit [Quit: Leaving]
solocshaw has joined #ruby
<drbrain>
if you're doing argv/argc you have to rb_define_method with a -1 arity anyhow
poli has quit [Ping timeout: 246 seconds]
ocx has quit [Ping timeout: 246 seconds]
<drbrain>
the other option is -2 arity which is VALUE my_method(VALUE obj, VALUE args)
<drbrain>
oh, I misunderstood, yes
<zenspider>
the way I'm currently doing it is "92" instead of "10;1" .. *shrug*
Mendenhall has joined #ruby
<zenspider>
I should have the optionals out in the next day or two
poli has joined #ruby
eightfold has quit [Quit: eightfold]
<Porfa>
gem install headless, success ….
<Porfa>
require 'headless'
<Porfa>
LoadError: cannot load such file -- headless
<Porfa>
????
rcvalle has quit [Quit: rcvalle]
<zenspider>
Porfa: gem contents headless
<drbrain>
Porfa: try `gem contents -l --no-prefix headless` to see what is in the lib/ (requirable) dir
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]