<mroutis>
Radar, I didn't understand, maybe I'm late to the conversation
<Radar>
mroutis: OK. In that gist there's an array. I want you to write some code that takes that array and returns the hash that contains email: "me@ryanbigg.com"
<Radar>
so the return value should be { email: "me@ryanbigg.com", answer: 1 }
<baweaver>
user y'mean?
<baweaver>
or do you also want to mod the key?
<Radar>
uh, yueah
<Radar>
user, not email
<Radar>
keep the key as-is
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<this_dude>
but when my gets is asking for an array of numbers idk how to enter it in my command line without getting an error
<Radar>
popcornnnn\
AnLog has quit [Ping timeout: 240 seconds]
<baweaver>
Radar: be nice
<Radar>
yes boss
<this_dude>
???
<this_dude>
ok guys so
<this_dude>
this is my last problem
<this_dude>
i think i got it but
<this_dude>
i have an issue
<Radar>
?enternotspace
<ruby[bot]>
Radar: I don't know anything about enternotspace
<Radar>
ruby[bot]: c'mon.
<this_dude>
it gives me the right answers
<this_dude>
but
<this_dude>
it does this
<Radar>
this_dude: Stop using enter like a spacebar plzkthx
<this_dude>
sorry ok
<Radar>
this_dude: So with your code... I hope you're formatting it with two-space indentation rather than copying + pasting what you have in those screenshots.
<Radar>
this_dude: and it's better to share code at gist.github.com
<this_dude>
so
<Radar>
this_dude: last warning regarding enter-as-a-spacebar.
mroutis has quit [Remote host closed the connection]
<samort7>
I am trying to learn ftp on a simple ruby file (no rails), but when I do require 'net/ftp' it says "no such file to load" - what am I missing?
<this_dude>
its basically what i was asking about earlier..i tried to look it up..when creating a method that asks for an array as an input i cant seem to get the command line to take in my input as an array instead of a string
<this_dude>
ive tried changing it in the coding as gets.to_a and ive tried inputting it in the command line as [1,2,3]
<this_dude>
but i still get the same error stating that my input is being read as a string
cadillac_ has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
alfiemax_ has joined #ruby
<al2o3-cr>
this_dude: use eval(gets)
<this_dude>
so i would put numbers=eval(gets)?
<al2o3-cr>
this_dude: yep.
<this_dude>
hmm new info..thanks
chouhoulis has quit [Remote host closed the connection]
<this_dude>
oh shoot now its stuck in an endless loop
<this_dude>
oh nvm my code is wrong
braincrash has quit [Quit: bye bye]
humam has quit [Quit: leaving]
braincrash has joined #ruby
<Radar>
wb this_dude
humam has joined #ruby
<Radar>
this_dude: so you failed the test?
<Radar>
this_dude: do you still have a copy of the questions?
gix has quit [Disconnected by services]
<this_dude>
so uh
<this_dude>
it was 3 questions
<this_dude>
i got one wrong which == fail...i just asked a friend about the one i was pretty sure i got wrong
<this_dude>
i forgot to put +1...thats literally it
<this_dude>
im very angry with myself
<Radar>
this_dude: hmmm maybe you should've followed this channel's advice 🤔
<Radar>
oh well too late now 🤷🏻♂️
<this_dude>
which was?
<Radar>
1. Gist.
<Radar>
2. Enter not space.
<Radar>
3. Try your code in IRB.
<this_dude>
i just now learned how to input an array into the command line
<this_dude>
which means i was just now able to check my code from the first question
<Radar>
Can you show me the code from the first question?
<this_dude>
my answer? or the problem
<Radar>
Everything.
<this_dude>
so i dont have a copy of the questions but i remember them and i have my code saved...so the first problem was to create a method that takes in an array and returns a sum of (the numbers in the array times their position in the array)
<this_dude>
and i used this line
<this_dude>
sum = (numbers[i] * i) + sum
<Radar>
Ok. An array like: [1,2,3,4,5], and that would then be: [1 * 0, 2 * 1, 3 * 2, 4 * 3, 5 * 4]?
<this_dude>
when it shouldve been
<this_dude>
sum = (numbers[i] * (i+1)) + sum
<this_dude>
corect
<Radar>
this_dude: but that can'tve been all of your code. Show me the rest please.
<Radar>
For instance, you are not defining `numbers` in that code of yours.
<this_dude>
let me uh...figure out how to use gist again gimme a sec ill paste the link here
<Radar>
this_dude: dpaste.de or hastebin.com is better if you don't have a GH login
matthewd has quit [Read error: Connection reset by peer]
eckhardt has joined #ruby
Apocalypse has quit [Quit: Input/Output Error]
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
scottj has quit [Quit: leaving]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
Apocalypse has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
maryo has joined #ruby
\void has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
quazimodo has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
sauvin has joined #ruby
lxsameer has joined #ruby
akaiiro has quit [Remote host closed the connection]
apeiros_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
maryo has quit [Quit: Leaving]
za1b1tsu has joined #ruby
Tempesta has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
kevinsjoberg has joined #ruby
lxsameer has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
Apocalypse has quit [Quit: Input/Output Error]
za1b1tsu has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
Apocalypse has joined #ruby
blackmesa1 has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
alem0lars has joined #ruby
Inline has quit [Quit: Leaving]
mozzarella has quit [Ping timeout: 248 seconds]
mozzarel1 has joined #ruby
mozzarel1 is now known as mozzarella
snickers has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
Tempesta has joined #ruby
lxsameer has joined #ruby
hays_ has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hays has joined #ruby
pwnd_nsfw has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
hurricanehrndz has quit [Ping timeout: 240 seconds]
p4p0l0 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
p4p0l0 has quit [Ping timeout: 256 seconds]
drale2k_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
bmurt has quit [Client Quit]
lxsameer has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
sysvalve has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
<RootSudo>
I don't know what I'm doing
<RootSudo>
Why am I here
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
alfiemax has joined #ruby
za1b1tsu has joined #ruby
dionysus69 has joined #ruby
clemens3 has joined #ruby
tty has quit [Quit: tty]
vondruch has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
tristanp has joined #ruby
Burgestrand has joined #ruby
alfiemax_ has joined #ruby
desperek has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
TomyWork has left #ruby ["Leaving"]
TomyWork has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
<TomyWork>
sorry about the join spam, i'm not on my own comp here, so i'm authenticating manually, and this +r stuff is killing me
tristanp has quit [Ping timeout: 268 seconds]
<TomyWork>
still preferable to the bot situation though :)
avelldiroll has quit [Quit: WeeChat 1.6]
lxsameer has quit [Ping timeout: 268 seconds]
<ArahaelPi>
+R, you mean.
psychicist__ has joined #ruby
avelldiroll has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
sylario has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
apeiros_ has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
p4p0l0 has joined #ruby
DarthGandalf has joined #ruby
lxsameer has joined #ruby
mikecmpbll has joined #ruby
<TomyWork>
ArahaelPi no, i mean +r on the channel, which blocks unidentified users
vondruch has quit [Read error: Connection reset by peer]
mistym- has joined #ruby
Fridtjof_ has joined #ruby
Biohazard has joined #ruby
bier has joined #ruby
nikivi- has joined #ruby
erratic has joined #ruby
apeiros_ is now known as apeiros
<ArahaelPi>
TomyWork: Ah. Yeah, everyone should be identified, even if with a unique email address.
<TomyWork>
apeiros uh, i still see evidence of the botspam situation here and there. you should leave that on until that blows over
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
<TomyWork>
apeiros uh, i still see evidence of the botspam situation here and there. you should leave that on until that blows over
<apeiros__>
god damit, that cable is feebly connected
apeiros__ is now known as apeiros
<apeiros>
TomyWork: saw your message :)
<apeiros>
I'm around. if necessary I'll reactivate +r
<apeiros>
feel free to ping me
tvw has joined #ruby
eckhardt has quit [Ping timeout: 248 seconds]
Beams has joined #ruby
Kingsy24 has joined #ruby
<Kingsy24>
Christel just posted this "denial" on the freenode blog https://freenode.net/news/spam-shake Why does this blog post mention "10.2 million" THREE times?
Kingsy24 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
mojtaba has joined #ruby
za1b1tsu has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
ferhaty has joined #ruby
<apeiros>
ok, I guess +r it still is :D
<apeiros>
even if Sigyn works great
vondruch has joined #ruby
ansraliant has quit [Quit: Konversation terminated!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Read error: Connection reset by peer]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
alex`` has joined #ruby
dhollin3 has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
<dionysus69>
how do I tell god to restart one of the processes it's handling without restarting the god itself
<apeiros>
you send a prayer (scnr)
<dionysus69>
:D
<TomyWork>
i could
<apeiros>
TomyWork: you're stronger than I :D
drale2k_ has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
<TomyWork>
last thing christel posted on twitter is the handshake release post. after that it's just dozens of retweets. maybe someone is pissed off at handshake for some irrational reason... ex team member?
<TomyWork>
forgot the 2nd premise: the release post is from about the same time as the start of the spambot attack
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tristanp has joined #ruby
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
alex`` has joined #ruby
apeiros has quit []
alfiemax has quit [Remote host closed the connection]
ciro has joined #ruby
drale2k_ has joined #ruby
blackmesa1 has quit [Ping timeout: 240 seconds]
arekushi has quit [Ping timeout: 265 seconds]
lunarkitty7 has quit [Ping timeout: 265 seconds]
lunarkitty7 has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
vondruch has quit [Quit: vondruch]
kevinsjoberg has joined #ruby
Burgestrand has quit [Quit: Closing time!]
alem0lars has quit [Ping timeout: 244 seconds]
sticaz has joined #ruby
blackmesa1 has joined #ruby
<gray_-_wolf>
Is there noticeable performance impact when using refinements? I'm reading the docs on them and all this activating/deactivating on scope change seems expensive
ArahaelPi has quit [Read error: Connection reset by peer]
<gray_-_wolf>
ooooh, so it's `refine ::String.signleton_class do ...` for me
lxsameer has joined #ruby
<gray_-_wolf>
thank you balo :)
Burgestrand has quit [Quit: Closing time!]
yohji has quit [Ping timeout: 256 seconds]
savolla has joined #ruby
<balo>
sure. just for educational purposes, could you share what is your use-case to use refinements and add class methods to String?
savolla has quit [Client Quit]
<gray_-_wolf>
serialization code, I have bunch of types I want to serialize/deserialize (and one of them is ::String), so I'm basically using `"foo".serialize` and `String.deserialize('bar')`; Since I'm putting stuff onto core class I thought refinements would be good idea
Burgestrand has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
arahael1 is now known as ArahaelPi
c0ncealed2 has joined #ruby
beefjoe has quit [Quit: Off to install Windows]
beefjoe has joined #ruby
Burgestrand has quit [Quit: Closing time!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
alex`` has quit [Quit: WeeChat 2.2]
tristanp has joined #ruby
Burgestrand has joined #ruby
yohji has joined #ruby
ur5us has joined #ruby
tristanp has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
arekushi has joined #ruby
alex`` has joined #ruby
gray_-_wolf has quit [Quit: WeeChat 2.2]
za1b1tsu has quit [Ping timeout: 256 seconds]
pulkit4tech has joined #ruby
pulkit4tech has left #ruby [#ruby]
za1b1tsu has joined #ruby
za1b1tsu_ has joined #ruby
apeiros_ has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
apeiros_ is now known as apeiros
beefjoe has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
clemens3 has joined #ruby
za1b1tsu_ has quit [Ping timeout: 265 seconds]
AJA4350 has quit [Quit: AJA4350]
AJA4350 has joined #ruby
Emmanuel_Chanel has joined #ruby
maryo_ has joined #ruby
Dbugger has joined #ruby
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
postmodern has quit [Remote host closed the connection]
dr_blackjack has joined #ruby
fmcgeough has joined #ruby
snuz has joined #ruby
maryo_ has quit [Quit: Leaving]
snuz has quit [Client Quit]
snuz has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snuz has quit [Ping timeout: 265 seconds]
gnufied has joined #ruby
discopatrick has joined #ruby
maryo has joined #ruby
flips has quit [Quit: bbl ...]
flips has joined #ruby
bga57 has quit [Quit: Leaving.]
gnufied has quit [Quit: Leaving]
<dionysus69>
so I was dealing with infinite loops with sleep and sometimes I was getting Interrupt Exception, anyone knows potential reasons?
<apeiros>
ctrl-C
<apeiros>
also if you send it via kill command
<dionysus69>
no way, I didnt do anything with it, it would exit by itself
<apeiros>
interrupts don't happen on their own, you know? :)
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
alem0lars has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
<dionysus69>
it wasn't an interrupt, but interrupt exception, I just did interupt with ctrl-c and it was a totally different error
vondruch has quit [Quit: vondruch]
<dionysus69>
it had regular ruby error trace
InfinityFye has joined #ruby
<apeiros__>
yes, interrupt exceptions happen on interrupts. hence the name.
apeiros__ is now known as apeiros
Miron has quit [Read error: Connection reset by peer]
Dbugger has quit [Ping timeout: 240 seconds]
blackmesa1 has joined #ruby
drale2k_ has joined #ruby
akofink has joined #ruby
akofink has left #ruby ["WeeChat 2.2"]
vondruch has joined #ruby
Dbugger has joined #ruby
gnufied has joined #ruby
gnufied__ has joined #ruby
gnufied has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
jottr has joined #ruby
mojtaba has joined #ruby
dhollin3 is now known as dhollinger
drale2k_ has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 244 seconds]
augcesar has joined #ruby
quazimodo has joined #ruby
mojtaba has quit [Quit: Leaving.]
pulkit4tech has joined #ruby
pulkit4tech has left #ruby [#ruby]
Rapture has joined #ruby
vondruch has quit [Quit: vondruch]
akaiiro has joined #ruby
maryo_ has joined #ruby
nofxx has joined #ruby
maryo_ has quit [Read error: Connection reset by peer]
savolla has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams_ has joined #ruby
maryo_ has joined #ruby
Beams has quit [Ping timeout: 256 seconds]
maryo_ has quit [Quit: Leaving]
akaiiro has quit [Remote host closed the connection]
Beams_ has quit [Quit: .]
akaiiro has joined #ruby
Beams has joined #ruby
apeiros has quit []
maryo has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
k0mpa has joined #ruby
<TvL2386>
hey everybody! I'm reading about metaprogramming here https://viewsourcecode.org/why/hacking/seeingMetaclassesClearly.html and I followed an example which doesn't output what the blog says it does. Unfortunately it has no date, so I am assuming it just works differently on my ruby-2.5.1. Can someone please look at my little gist and tell me why it doesn't output what I'd expect?
<TvL2386>
I've tried to dig through YAML::dump to see if it actually calls :to_yaml_properties somewhere, but I'm lost
apeiros_ has joined #ruby
<dionysus69>
lambdas can't be named with question mark at the end like methods?
<apeiros_>
lambdas can't be named period
<apeiros_>
what you named was a variable
<apeiros_>
and no, those can't have question marks at the end.
<dionysus69>
ok thanks apeiros_
za1b1tsu_ has joined #ruby
rippa has joined #ruby
HoierM has quit [Ping timeout: 248 seconds]
HoierM has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dionysus69 has quit [Ping timeout: 268 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
alem0lars has quit [Ping timeout: 255 seconds]
maryo has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
<havenwood>
TvL2386: Define #to_yaml_properties in MailTrunk, not at top level.
<havenwood>
TvL2386: %i[@driver @route]
<havenwood>
TvL2386: (You'll want `[:@driver, :@route]` instead of `[@driver, @route]`.
<havenwood>
)
ur5us has joined #ruby
snuz has joined #ruby
apeiros_ has joined #ruby
<havenwood>
TvL2386: Oh, I see - you're doing it that way on purpose.
<havenwood>
Defining it on the instance, I mean.
ur5us has quit [Ping timeout: 265 seconds]
<havenwood>
TvL2386: The only problem I see is the way you're providing the instance variables. It looks like #to_yaml_properties was deprecated a while back.
mynameisdebian has joined #ruby
<havenwood>
warn "#{loc}: to_yaml_properties is deprecated, please implement \"encode_with(coder)\""
kevinsjoberg has quit [Read error: Connection reset by peer]
duderonomy has quit [Ping timeout: 240 seconds]
Eiam has joined #ruby
Miron has joined #ruby
maryo has joined #ruby
vasilakisfil has joined #ruby
<vasilakisfil>
if you would accept a proc/lambda in some part of your code as an argument, would you check it using responds_to?(:call) or is_a?(Proc) ? The former has the advantage the you can send whatever as long as it responds to call, what is the advantage of the latter ?
<apeiros_>
vasilakisfil: I'd usually accept a proc as a block argument. no need to perform checks then (beyond block_given?, but I usually save myself even doing that)
apeiros_ is now known as apeiros
<apeiros>
in case you're unaware: using &, you can convert a Proc instance to a block.
<vasilakisfil>
yeah I agree, I do the same when dealing with method arguments. My use case is a hash-based DSL that you can set an option using a symbol or a proc.
<vasilakisfil>
cool I didn't know that
HoierM has quit [Quit: Leaving]
jcarl43 has joined #ruby
snickers has joined #ruby
akaiiro has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
al2o3-cr: the return value of p *args is *args
AJA4351 has joined #ruby
<apeiros>
since `p x, y` is your last expression in the block, the block's return value is [x, y]
<al2o3-cr>
apeiros: why is it different with lambda though?
ur5us has quit [Ping timeout: 260 seconds]
<apeiros>
different auto-unsplatting-rules
AJA4350 has quit [Ping timeout: 256 seconds]
AJA4351 is now known as AJA4350
<al2o3-cr>
apeiros: ah, ok. just thought they would work the same.
<apeiros>
na, procs behave like blocks. and for historic reasons they're rather, lets say, liberal in how they auto-splat
<apeiros>
lambdas otoh behave like defined methods wrt their arguments
<al2o3-cr>
apeiros: that straightened that up then. :)
gnufied__ has joined #ruby
<apeiros>
if you explicitly splat, you can get the same behavior btw.
alex`` has quit [Quit: WeeChat 2.2]
<apeiros>
oh, actually not, since arity is enforced in lambdas 🙈
nowhere_man has joined #ruby
<al2o3-cr>
apeiros: ah, of course yeah.
<al2o3-cr>
proc isn't
<al2o3-cr>
i get it
<al2o3-cr>
oops i'm getting like this dude :(
<baweaver>
apeiros: the auto-unsplatting diff is a bug in 2.4+
<apeiros>
baweaver: huh? you sure?
<baweaver>
should be patched soon iirc.
discopatrick has quit [Quit: Connection closed for inactivity]
<baweaver>
I remember because I was pissed off at it and had to patch Qo to use proc instead everywhere
<baweaver>
I'd been working on 2.3 because RVM shenanigans
akaiiro has quit [Ping timeout: 268 seconds]
rfoust has joined #ruby
<apeiros>
hm
jottr has quit [Ping timeout: 276 seconds]
AJA4350 has quit [Ping timeout: 260 seconds]
tag has joined #ruby
Dbugger has quit [Remote host closed the connection]
wildermind has quit [Quit: Connection closed for inactivity]
jottr has joined #ruby
r29v has joined #ruby
yoshida_ has joined #ruby
kapil___ has joined #ruby
yoshida_ has left #ruby [#ruby]
darkhanb has joined #ruby
jcarl43 has quit [Read error: Connection reset by peer]
blackmesa1 has joined #ruby
jcarl43 has joined #ruby
Inline has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
InfinityFye has quit [Quit: Leaving]
sonne has quit [Ping timeout: 256 seconds]
blackmesa1 has quit [Ping timeout: 256 seconds]
eckhardt has joined #ruby
Creatornator has joined #ruby
sameerynho has joined #ruby
jottr has joined #ruby
reber has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
Creatornator has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
DTZUZU has quit [Quit: WeeChat 1.9]
c0ncealed2 has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
tty has joined #ruby
eldritch has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
linuxdaemon has quit [Ping timeout: 260 seconds]
AJA4351 has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mojtaba has joined #ruby
linuxdaemon has joined #ruby
tdy has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eldritch has joined #ruby
mroutis has quit [Ping timeout: 240 seconds]
Creatornator has joined #ruby
DTZUZU has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
ptx0 has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 240 seconds]
jcalla has quit [Ping timeout: 268 seconds]
blackmesa1 has joined #ruby
Nicmavr has joined #ruby
Dbugger has joined #ruby
eckhardt has joined #ruby
akaiiro has joined #ruby
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
jcalla has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
d^sh has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Rapture has joined #ruby
blackmesa1 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
blackmesa has quit [Ping timeout: 276 seconds]
FernandoBasso has quit [Quit: Page closed]
ptx0_ has joined #ruby
ptx0_ is now known as ptx0
zerowaitstate has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
<zerowaitstate>
I am writing a test case in RSpec, and I need to mock the result of a factory method, but the result of the call needs to be different based upon the input. In RSpec, the mocks provided appear to rely on the order in which the method is called. I need the mock to return a particular output for a given input, irrespective of the order it is called. How do I do that?
r29v has quit [Quit: r29v]
AJA4350 has joined #ruby
mroutis has joined #ruby
duderonomy has joined #ruby
AJA4351 has joined #ruby
dionysus69 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
Creatornator has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver>
al2o3-cr: This means the quality of art in the book just took a massive leap forward.
<baweaver>
and the entire conference talk was practice to get there.
<al2o3-cr>
baweaver: did you go to art school or was it just a natural gift?
apeiros has quit [Remote host closed the connection]
<al2o3-cr>
the only thing i draw is the curtains ;)
<mroutis>
maybe a lot of doodling at school :p
<al2o3-cr>
mroutis: maybe :)
chouhoulis has quit [Ping timeout: 244 seconds]
<al2o3-cr>
some talent that though drawing and ruby!
polishdub has quit [Quit: leaving]
bambanx has joined #ruby
<baweaver>
Funny story on that actually
<al2o3-cr>
'baweaver the reducer'. nice name of a ruby god ;)
<baweaver>
I had a tendency to sketch when I was done with things. One teacher didn't like that too much, so he confiscated the pad and told me to pay attention. By the time he was back at it, I had another pad out to sketch more. He wasn't amused, so he sent me to ISS after confiscating it and my other sketch books.
<baweaver>
Little did he know I had one more up my sleeve.
<baweaver>
Nice try though. Football coaches are always the worst teachers.
<al2o3-cr>
my best teachers were science and maths.
<baweaver>
But no, never had any formal art education. Self-taught. There was one time I was walking around the arts department while the art teacher was giving a presentation on digital work.
<baweaver>
I recognized one of my pieces, so I popped in and said so.
<baweaver>
She stopped class, grabbed me, and forced me to apply for AP art on the spot my Senior year
<baweaver>
seconds -> seconds, minutes, hours, days, years
<this_dude>
hey routis hehe
* this_dude
uses study mode...its was super effective
<baweaver>
this_dude: get good with IRB before you try it
akaiiro has quit [Remote host closed the connection]
<mroutis>
can't agree more ^
<baweaver>
al2o3-cr: stack reduction, much fun.
<this_dude>
is irb anywhere else except in the command line?
<this_dude>
or am i just confused
<al2o3-cr>
baweaver: sure is :)
nofxx has quit [Quit: Leaving]
<baweaver>
There are online REPLs, but IRB locally yeah
<baweaver>
eval.in for instance
<al2o3-cr>
this_dude: use pry dude
<this_dude>
whats uh
<this_dude>
that
<mroutis>
gem install pry
<al2o3-cr>
gem i pry
<this_dude>
;-;
<this_dude>
i still dont know what pry is XD
<mroutis>
it is IRB on steroids
<al2o3-cr>
big muscles
<baweaver>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<this_dude>
oh lord
<this_dude>
much wow
<this_dude>
well
<baweaver>
The problem with IRC is you get the entire fire hose
<this_dude>
the questions were mad easy last time i just made a dumb mistake i think i got this
<al2o3-cr>
and many opinions
<this_dude>
and everyone is here so its a good time
<al2o3-cr>
or is that onions
<this_dude>
XD
<this_dude>
we going into the deep web now?
* this_dude
uses .onion to access secret website with all answers to his exam
* this_dude
cries because this is all fantasy
<al2o3-cr>
nah, just chicken and onions
<this_dude>
hehe
<this_dude>
i took a prescribed xanax so im calm so i wont freak out on the test this tiem
<this_dude>
lets ace this test
<mroutis>
lol, this_dude, are you kidding?
<al2o3-cr>
this_dude: you don't need that dude, just relax
<this_dude>
oh no
<this_dude>
they got harder
duderonomy has joined #ruby
<this_dude>
guys lmao its a scam
<this_dude>
this is the problem (please dont ban me its not a screenshot of code its the problem) http://prntscr.com/kgtoaz
bmurt has joined #ruby
<al2o3-cr>
this_dude: fIzZBuZz
<this_dude>
ahahaha
Alina-malina has quit [Ping timeout: 240 seconds]
<this_dude>
let me code it and then we can see if its right
za1b1tsu has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr>
this_dude: remember the modulo operator ;)
<ruby[bot]>
this_dude: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<havenwood>
?gist_usage this_dude
<ruby[bot]>
this_dude: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting
<this_dude>
in the problem it asks for me a left rotate and a right rotate
<this_dude>
i need it to do both at the same tiem
<this_dude>
time
<havenwood>
sparr: []['group'] #!> TypeError: no implicit conversion of String into Integer
<havenwood>
this_dude: Rotating left and right at the same time would do nothing, right?
<havenwood>
this_dude: Please use text rather than images to represent text when showing example in the channel.
blood has joined #ruby
<sparr>
ok, thanks, I'll try to figure out why by is the wrong type
<this_dude>
no but for example
jdawgaz has joined #ruby
<this_dude>
if i need a 1 left rotation and then 2 right rotation
<this_dude>
so i need it to execute the left_rotation followed by right_rotation
<blood>
I'm using puppet's xml_fragment module which uses REXML and i'm trying to add support to remove a tag along with its parent assuming parent isn't root. Any idea how I can accomplish this?
<galaxie>
What's the equivalent of Python's (or at least flake8's) NOQA comment, allowing the linter to ignore a certain line for whatever reason?
<mroutis>
this_dude, I'm sorry that you couldn't pass the test by your own, but honestly, if you want to improve your coding/ruby skills and getting a job writting code, you don't need a bootcamp neither help from IRC; at least, you'll need to know how to read english, the rest is on the docs, seriously, people have spend tremendously amount of time writing them
<mroutis>
galaxie, depending on the linter you are using, I'm asuming rubocop
<galaxie>
mroutis: Oh, I forgot to mention that. Yes, RuboCop.
<mroutis>
you need to wrap the code in two comments, #rubocop:disable and #rubocop:enable
<galaxie>
mroutis: Wait, there's not a simpler way?