<xybre>
Sometimes you want a subclass, sometimes you just want an instance with certain initialization.
ornerymoose_ has joined #ruby
jun_ has quit [Remote host closed the connection]
ornerymoose has quit [Ping timeout: 265 seconds]
ornerymoose_ is now known as ornerymoose
<hxegon>
Maybe Dog.shitzu would be better then. I just want named, certain initialization.
<Ox0dea>
hxegon: Initialization or instantiation?
synthroid has quit []
InvGhost has quit [Ping timeout: 260 seconds]
calderonroberto has joined #ruby
devbug has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
<hxegon>
Ox0dea, pretty sure initialize. I don't really need a separate dog, just certain values in a Dog object. Does that make sense?
<hxegon>
Ox0dea, good question.
devoldmx has joined #ruby
akem2 has quit [Read error: No route to host]
<Ox0dea>
hxegon: Certain values and no additional behavior?
akem has joined #ruby
JakeSays has joined #ruby
<JakeSays>
?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?
<Ox0dea>
!cops
<JakeSays>
hey guys
<Ox0dea>
I'm phoning the authorities.
CloCkWeRX has quit [Ping timeout: 260 seconds]
cassioscabral has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
* havenwood
makes siren noises
tulak has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 260 seconds]
<hxegon>
Ox0dea, hmmm... I don't think it'd need additional behavior, but probably could use blocks for anything I would need in my case.
FernandoBasso has quit [Quit: Leaving]
<Ox0dea>
Perl 6 has objects of type Block. :<
devbug has quit [Ping timeout: 255 seconds]
akem has quit [Read error: No route to host]
akem has joined #ruby
eytanfb has quit [Remote host closed the connection]
<hxegon>
Ox0dea, what would your suggestion be if it did need additional behavior?
<Ox0dea>
hxegon: A subclass, of course.
DEATHTOAMERICA has joined #ruby
<DEATHTOAMERICA>
الله أكبر
<DEATHTOAMERICA>
type /join ISIL for freedom
<hxegon>
DEATHTOAMERICA, whats up kyle
calderonroberto has quit [Ping timeout: 260 seconds]
DEATHTOAMERICA has quit [K-Lined]
akem has quit [Read error: No route to host]
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
<hxegon>
DEATHTOAMERICA, probably not the best way to get your ideas across with that nick
<eam>
Translate
<eam>
can I ask rails questions in here?
akem has joined #ruby
paradisaeidae has quit [Read error: Connection reset by peer]
<eam>
oops
<Radar>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<eam>
يمكن لي أن أطلب القضبان الأسئلة في هذا المجال؟
cdg has quit [Remote host closed the connection]
<eam>
Radar: oh I just beefed the joke
<Radar>
eam: Can I ask questions bars in this area?
<JakeSays>
so if i were to say "hey fuckturds" - that better than "hey guys"?
<eam>
are we gonna play the translation convergence game
<jbrhbr>
eam: i appreciate the attempt :p
<hxegon>
JakeSays, no, people don't usually identify with fuckturd
Musashi007 has quit [Quit: Musashi007]
<eam>
we can say "beefed" though
<Radar>
JakeSays: First warning.
DEATHTOINFIDEL has joined #ruby
<DEATHTOINFIDEL>
type /join #ISIL for freedom
<DEATHTOINFIDEL>
الله أكبر
<Radar>
Sigh.
ruid has joined #ruby
<hxegon>
?ot DEATHTOINFIDEL
<ruboto>
DEATHTOINFIDEL, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
DEATHTOINFIDEL was kicked from #ruby by Radar [No thanks]
DEATHTOINFIDEL has joined #ruby
<shevy>
xybre ^^^ another webchatter bites the dust :D
<hxegon>
aww, I like how he took my suggestion lol
<azgil2>
alah mudak
colegatron has quit [Ping timeout: 265 seconds]
<DEATHTOINFIDEL>
الله أكبر
<JakeSays>
well i was just curious as to what the limits were to social correctness.
DEATHTOINFIDEL was banned on #ruby by ChanServ [DEATHTOINFIDEL!*@*]
DEATHTOINFIDEL was kicked from #ruby by ChanServ [User is banned from this channel]
<azgil2>
pls dont kick alahdicksuckers
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
Setting +m until we sort out this shit.
<Radar>
Please standby.
RegulationD has joined #ruby
<Radar>
Thanks for your patience.
<Radar>
Users must be reigstered in order to talk in this channel now. If you can't send messages to the channel, please make sure you register with Nickserv first.
skade has quit [Quit: Computer has gone to sleep.]
<Ebok>
That annoyed me, and I wasnt even here for it
arescorpio has joined #ruby
<Ox0dea>
The end times might be coming. Look busy or something.
<Ebok>
lol
<Ebok>
How're you doing Ox0dea?
<Ox0dea>
Ebok: Well enough, thanks. Yourself?
jackjackdripper1 has joined #ruby
<Ebok>
Good good. I havent touched the language for the last three weeks though. Guilty of fallout4 :/ Need to get back into things.
<Ox0dea>
Alas. Have you gotten quite good with Enumerable yet?
<Ebok>
I love enumerables.
<Ox0dea>
Hm? There is only one.
<Ebok>
I was refering to its collective methods
<Ox0dea>
Er, sorry. I take your meaning now.
<Ebok>
Yeah xD
<Ox0dea>
What's your favorite?
<Ox0dea>
You can't say #map or #reduce.
jackjackdripper has quit [Ping timeout: 256 seconds]
ruid has quit [Ping timeout: 260 seconds]
<Ebok>
Aww. Map is certainly my favorite to use xD But lets see. Well Im going to exclude each and its blatant iterations because useful shouldnt be as weighed heavily as the most fun.
<Ebok>
Honestly. I dont know!
<Ox0dea>
Well, let's see...
<Ox0dea>
>> Enumerable.instance_methods.sample 3
<Ebok>
inject probably, but thats cause I'm doing a lot of really basic problems for class prep, and inject is just saving me time
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
druonysus has quit [Ping timeout: 256 seconds]
lnx has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has quit [Ping timeout: 265 seconds]
Arnvald has joined #ruby
* ja
really starts to feel like a noob when around folks like Ox0dea (didn’t even know #pred was a thing :X — I’ve often needed it to go with my #succ’ing)
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
<ja>
weird, String has #succ but not #pred
<jbrhbr>
Ox0dea: i don't know how all the wires are connected internally and otherwise, but .lazy doesn't seem like it should be necessary on an enumerable like 0..Float::Infinity, nor does it seem like map should care whether or not something is infinite
<jbrhbr>
so i say it seems warty because the handling of streams seems to have some inconsistencies, at least in my naive observations
<ja>
what’s “pred” even meant to abbriviate, I wonder?
<jbrhbr>
predicate
<Ox0dea>
jbrhbr: Predecessor.
Juanchito has quit [Quit: Connection closed for inactivity]
<Ox0dea>
ja: In line with successor, of course.
<jbrhbr>
woops, context helps
<ja>
oh, right, of course “Predecessor” — that word had completely escaped my mind
* ja
should probably sleep
<ja>
Ox0dea: Of course
<Ox0dea>
These were the words used when Peano went about proving that 1 and 1 is, in fact, 2.
<jbrhbr>
the end of infinity is infinity, mindblown!
hxegon has joined #ruby
jas02 has joined #ruby
<jbrhbr>
Ox0dea: and i'm reading it correctly that .lazy effectively gives the preceding stuff a different definition of all of a lot of the built-in enumerable functions, right?
<jbrhbr>
if so, that brings up the second issue which is that you need two definitions of those things, rather than one that know to consume a more generic enumerable interface (of which anything that can be iterated over would be a member)
ruu_ has quit []
rdavila has joined #ruby
jas02 has quit [Ping timeout: 260 seconds]
<Ox0dea>
jbrhbr: I certainly concede that it'd be nice if Ruby were more like Haskell in this regard, but it doesn't actually ever get in the way that it isn't.
Arnvald has joined #ruby
<jbrhbr>
most of my observations and ramblings are more pedantic than they are real practical issues
<jbrhbr>
but yes, haskell, java's new 1.8 stuff and python3 handle it pretty well, for comparison
Arnvald has quit [Remote host closed the connection]
<jbrhbr>
thinking through these kinds of distinctions leads to better understanding, for me at least :) and anyone bored enough to read
<Ox0dea>
>> evens = Enumerator.new { |y| n = 0; loop { y << n += 2 } }; evens.take 10 # jbrhbr
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
Rickmasta has joined #ruby
boxofrox has joined #ruby
<cscheib>
anyone have suggestions for good things to practice Ruby skills with/on? I've done all of the Koans, and I'm working through most of what exercism.io has, and done quite a bit on codewars... are there other resources that have good exercises, or particular OSS projects that are a good entry point?
eytanfb has quit [Remote host closed the connection]
<Ox0dea>
cscheib: Scratch an itch.
hahuang65 has quit [Ping timeout: 240 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Ping timeout: 240 seconds]
goodcodeguy has joined #ruby
tds5016 has quit [Quit: Page closed]
babblebre has quit [Quit: Connection closed for inactivity]
dlitvak has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
<jbrhbr>
Ox0dea: yup, that's one of the first things i looked for in ruby :p
<cscheib>
Ox0dea: yea, I've got some stuff in mind... I've just got a long way to go before I have all the tools/design patterns figured out to get what I want to do into code
djbkd has quit [Quit: My people need me...]
<Ox0dea>
cscheib: Dip sufficiently many toes in the water and you'll inevitably realize you're swimming. :)
bb010g has quit [Quit: Connection closed for inactivity]
howdoicomputer has quit [Ping timeout: 240 seconds]
calderonroberto has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
jun_ has joined #ruby
pika_pika has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ElFerna has quit [Ping timeout: 272 seconds]
arooni_______ has joined #ruby
seitensei has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<jbrhbr>
heh that's a nice saying
<havenwood>
Or that your toes have become wrinkled.
<havenwood>
I guess you should take them out of the water intermittently on the path to swimming!
seitensei has quit [Ping timeout: 246 seconds]
<jbrhbr>
which, outside of the land of metaphor, means… beer?
weemsledeux has joined #ruby
rdavila has joined #ruby
pawnbox has joined #ruby
sneakerhax has joined #ruby
rdavila has quit [Client Quit]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdwrage_ is now known as sdwrage
paradisaeidae has quit [Read error: Connection reset by peer]
paradisaeidae has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
replay has quit []
Azure has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 255 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
avahey has joined #ruby
goodcodeguy has joined #ruby
auzty has joined #ruby
_whitelogger has joined #ruby
_whitelogger has joined #ruby
<Coraline>
Neat
hahuang65 has joined #ruby
Yiota has quit [Ping timeout: 240 seconds]
drys has quit [Remote host closed the connection]
drys has joined #ruby
nateberkopec has quit [Quit: Leaving...]
lacuna has joined #ruby
dlitvak has joined #ruby
ohaibbq has quit [Quit: Leaving...]
lacuna has quit [Remote host closed the connection]
pika_pika has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]
blackmesa has joined #ruby
lacuna has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
jun_ has quit [Remote host closed the connection]
akem2 has quit [Remote host closed the connection]
spt0 has quit [Ping timeout: 265 seconds]
spt0 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
danscho has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
sankaber has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
solocshaw has joined #ruby
jun_ has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Remote host closed the connection]
devoldmx has joined #ruby
dsdeiz has quit [Ping timeout: 240 seconds]
techsethi has joined #ruby
jessemcgilallen has joined #ruby
fcser has quit [Ping timeout: 272 seconds]
devoldmx has quit [Ping timeout: 265 seconds]
agent_zzz has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
braincrash has quit [Quit: bye bye]
krz has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zast has joined #ruby
jun_ has quit [Remote host closed the connection]
chipotle has joined #ruby
colleenmcguckin has joined #ruby
chipotle_ has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
julian-delphiki has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has quit [Remote host closed the connection]
heftig has quit [Read error: Connection reset by peer]
heftig has joined #ruby
gamov has joined #ruby
medvedu has quit [Quit: he will be back]
Coral has joined #ruby
Coral is now known as Guest88454
terlar has joined #ruby
Pupp3tm4st3r has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
tesuji has joined #ruby
aufi has joined #ruby
Rickmasta has joined #ruby
jessemcgilallen has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
devbug has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
symm- has quit [Ping timeout: 240 seconds]
zeroDivisible has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
bweston92 has quit [Ping timeout: 240 seconds]
mikenovikov has quit [Max SendQ exceeded]
Dimik has joined #ruby
skade has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
blaxter has joined #ruby
Hounddog has joined #ruby
hectortrope has joined #ruby
<Cork>
is this the most efficient way to check what files in an array exist? files.select {|file| File.exists?(file) }
<Cork>
or is there a better way to do that?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 255 seconds]
tomphp has joined #ruby
tejasmanohar has quit [Ping timeout: 240 seconds]
ec has quit [Ping timeout: 240 seconds]
<apeiros>
Cork: probably
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
<Cork>
heh probably the best way or probably there are one? :D
ckrailo has quit [Ping timeout: 240 seconds]
InvGhost has joined #ruby
tomphp has quit [Max SendQ exceeded]
<apeiros>
the former
<Cork>
ok, thx
cardoni has quit [Ping timeout: 260 seconds]
ckrailo has joined #ruby
incomprehensibly has quit [Ping timeout: 250 seconds]
boxrick1 has quit [Ping timeout: 255 seconds]
tvw has quit [Remote host closed the connection]
jmhmccr has quit [Ping timeout: 250 seconds]
jhill has quit [Ping timeout: 240 seconds]
jpinnix______ has quit [Read error: Connection reset by peer]
jbrhbr has quit [Quit: Leaving.]
bweston92 has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
andersh has quit [Ping timeout: 260 seconds]
vcoinminer_ has quit [Ping timeout: 255 seconds]
c0m0 has joined #ruby
mroth has quit [Ping timeout: 240 seconds]
jabreity__ has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
siddharth has quit [Ping timeout: 240 seconds]
<adaedra>
Hello
jas02 has quit [Quit: jas02]
<blub>
hi adaedra
ec has joined #ruby
seitensei has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
jpinnix______ has joined #ruby
incomprehensibly has joined #ruby
norc_ has joined #ruby
acadavid has quit [Ping timeout: 240 seconds]
andersh has joined #ruby
jhill has joined #ruby
tomphp has quit [Max SendQ exceeded]
cardoni has joined #ruby
ckrailo has quit [Ping timeout: 240 seconds]
mroth has joined #ruby
vcoinminer_ has joined #ruby
dEPy has joined #ruby
tomphp has joined #ruby
siddharth has joined #ruby
startupality has joined #ruby
jabreity__ has joined #ruby
huyderman has joined #ruby
boxrick1 has joined #ruby
tvw has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
calderonroberto has quit [Ping timeout: 260 seconds]
mroth has quit [Ping timeout: 240 seconds]
Arctaire has quit [Ping timeout: 250 seconds]
vcoinminer_ has quit [Ping timeout: 255 seconds]
ec has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
jabreity__ has quit [Ping timeout: 265 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
acadavid has joined #ruby
blaxter has joined #ruby
azgil2 has joined #ruby
jpinnix______ has quit [Ping timeout: 246 seconds]
<dEPy>
Anybody using activemodel serializers? I'm wondering if I can set it up so it fails if you try have has_many of has_one defined in the serializer but is not yet loaded.
gagrio_ has quit [Ping timeout: 246 seconds]
frog0909 has joined #ruby
edwinvdg_ has joined #ruby
cardoni has quit [Ping timeout: 256 seconds]
danzilio has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
jpinnix______ has joined #ruby
ckrailo has joined #ruby
jhill has quit [Ping timeout: 240 seconds]
Arctaire has joined #ruby
devoldmx has joined #ruby
jmhmccr has joined #ruby
tomphp has quit [Ping timeout: 272 seconds]
edwinvdgraaf has quit [Ping timeout: 256 seconds]
joonty has joined #ruby
danzilio has joined #ruby
startupality has joined #ruby
medvedu has joined #ruby
andersh has quit [Ping timeout: 260 seconds]
dukedave has quit [Ping timeout: 260 seconds]
incomprehensibly has quit [Ping timeout: 255 seconds]
mroth has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
deeprave has quit [Read error: Connection reset by peer]
<jhass>
?crosspost dEPy
<ruboto>
dEPy, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
boxrick1 has quit [Ping timeout: 256 seconds]
drptbl has joined #ruby
jpinnix______ has quit [Ping timeout: 260 seconds]
bogn has quit [Ping timeout: 260 seconds]
cardoni has joined #ruby
tulak has joined #ruby
Arctaire has quit [Ping timeout: 255 seconds]
startupality has quit [Client Quit]
ta has joined #ruby
ec has joined #ruby
knowtheory has quit [Ping timeout: 255 seconds]
dukedave has joined #ruby
startupality has joined #ruby
andersh has joined #ruby
akahn has quit [Ping timeout: 260 seconds]
jhill has joined #ruby
chthon has joined #ruby
jmhmccr has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
rflot has quit [Read error: Connection reset by peer]
vondruch has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
auzty has quit [Quit: Leaving]
vcoinminer_ has joined #ruby
ckrailo has quit [Ping timeout: 255 seconds]
mroth has quit [Ping timeout: 240 seconds]
dukedave has quit [Ping timeout: 255 seconds]
senayar has joined #ruby
pawnbox has joined #ruby
jhill has quit [Ping timeout: 255 seconds]
siddharth has quit [Ping timeout: 255 seconds]
gagrio_ has joined #ruby
jun_ has joined #ruby
roshanavand has joined #ruby
lxsameer has joined #ruby
roshanavand has quit [Remote host closed the connection]
danzilio has quit [Ping timeout: 256 seconds]
cardoni has quit [Ping timeout: 272 seconds]
<shevy>
he evil!
dlitvak has quit [Ping timeout: 260 seconds]
elaptics`away is now known as elaptics
marr has joined #ruby
pawnbox_ has joined #ruby
vcoinminer_ has quit [Ping timeout: 240 seconds]
pawnbox has quit [Read error: No route to host]
andersh has quit [Ping timeout: 260 seconds]
acadavid has quit [Ping timeout: 255 seconds]
jun_ has quit [Ping timeout: 240 seconds]
ec has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
startupality has quit [Quit: startupality]
mark3 has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
emrox has joined #ruby
disanoint has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
gregf_ has quit [Read error: No route to host]
yfeldblum has joined #ruby
emrox has quit [Client Quit]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 246 seconds]
dmolina has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
tulak has quit [Remote host closed the connection]
BSaboia has joined #ruby
ddubs has quit [Ping timeout: 250 seconds]
ddubs has joined #ruby
dsdeiz has joined #ruby
rodfersou has joined #ruby
krzkrzkrz has joined #ruby
krzkrz has quit [Read error: Connection reset by peer]
knowtheory has joined #ruby
gregf_ has joined #ruby
<Cork>
is there a somewhat lean way to do something similar to `tr -dc A-Za-z0-9 < /dev/urandom | head -c 8` without system functions?
<Cork>
meaning without calling tr or head
ec has joined #ruby
<jhass>
what does it even do
disanoint has quit [Ping timeout: 255 seconds]
jpinnix______ has joined #ruby
jmhmccr has joined #ruby
<shevy>
hehe
<Cork>
it taps into urandom and filters out a-zA-Z0-9
<Cork>
and grabs 8 characters
senayar has joined #ruby
danzilio has joined #ruby
<Cork>
so basically a random string generator
rflot has joined #ruby
deeprave has joined #ruby
<apeiros>
Cork: SecureRandom + tr
akahn has joined #ruby
acadavid has joined #ruby
jhill has joined #ruby
bogn has joined #ruby
vcoinminer_ has joined #ruby
<Cork>
apeiros: ya, but how would i use SecureRandom as a stream?
<jhass>
or if removing A-Z from the set is okay, just SecureRandom.hex
<adaedra>
Anyway, let's talk power abuse and bad quality videos in -offtopic.
dukedave has joined #ruby
jmhmccr has joined #ruby
skade has joined #ruby
aryaching has joined #ruby
nfk|laptop has joined #ruby
mikecmpbll has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
ElFerna has joined #ruby
mroth has joined #ruby
Macaveli_ has joined #ruby
slackr has quit [Ping timeout: 272 seconds]
slackr has joined #ruby
akahn has quit [Ping timeout: 240 seconds]
dseitz has joined #ruby
Macaveli has quit [Ping timeout: 240 seconds]
deeprave has joined #ruby
ec has joined #ruby
CloCkWeRX has joined #ruby
Macaveli has joined #ruby
danzilio has quit [Ping timeout: 255 seconds]
CloCkWeRX has quit [Client Quit]
CloCkWeRX1 has joined #ruby
dukedave has quit [Ping timeout: 260 seconds]
Macaveli has quit [Client Quit]
dEPy has quit [Quit: (null)]
astrobun_ has quit [Remote host closed the connection]
Macaveli_ has quit [Ping timeout: 240 seconds]
mroth has quit [Ping timeout: 240 seconds]
kstuart has joined #ruby
CloCkWeRX1 has quit [Client Quit]
CloCkWeRX has joined #ruby
rflot has quit [Ping timeout: 240 seconds]
prestorium has joined #ruby
UniFreak has joined #ruby
UniFreak has left #ruby ["Leaving"]
UniFreak has joined #ruby
zotherstupidguy has quit [Ping timeout: 240 seconds]
incomprehensibly has quit [Ping timeout: 240 seconds]
<UniFreak>
so I changed the file C:\cygwin64\home\FangHao\.rvm\gems\ruby-2.2.1\gems\wdm-0.1.1\ext\wdm\extconf.rb by adding a line `have_library("msvcrt") and` into it
<UniFreak>
but still the error occur with the same error
ddfreyne_ has quit [Remote host closed the connection]
<jhass>
UniFreak: it might be worth to repeat the initial problem description
angryhippo has left #ruby [#ruby]
CloCkWeRX has quit [Ping timeout: 256 seconds]
<apeiros>
Zarthus: sorry, ruboto won't be open source any time soon. parts of it will eventually be, making contributions possible.
<Zarthus>
apeiros: not as much interested in contributing as just looking at the source. I'm always interested in browsing the source of some popular projects written in ruby, but haven't found many of them that I can glue together and fully understand how it works. considering it's in cinch I was also interested in seeing how and where the code diverges from mine.
<jhass>
UniFreak: to me that sounds like it doesn't include a needed header file on windows, nothing you can fix through modifying extconf.rb. I don't know enough about windows to get any more specific, sorry
<UniFreak>
jhass: is there a way I can skip the gem when doing `bundle install`?
roshanavand has joined #ruby
<jhass>
UniFreak: maybe, post your Gemfile and Gemfile.lock please
<jhass>
UniFreak: alright, given what it is, just dropping the last (gem 'wdm' ...) line from the Gemfile should be fine
jmhmccr has joined #ruby
vcoinminer_ has joined #ruby
<jhass>
any live reload functionality probably won't work, but better than nothing
CloCkWeRX has joined #ruby
tulak has quit [Read error: Connection reset by peer]
tulak has joined #ruby
mroth has joined #ruby
DeXterbed has joined #ruby
dlitvak has quit [Remote host closed the connection]
kirun has joined #ruby
dlitvak has joined #ruby
jhill has joined #ruby
astrobun_ has joined #ruby
deeprave has joined #ruby
rflot has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
tejasmanohar has joined #ruby
knowtheory has joined #ruby
ckrailo has joined #ruby
zotherstupidguy has joined #ruby
kobain has joined #ruby
ec has joined #ruby
siddharth has joined #ruby
bogn has joined #ruby
cardoni has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
Macaveli has quit [Ping timeout: 240 seconds]
Bloomer has quit [Remote host closed the connection]
boxrick1 has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
jabreity__ has joined #ruby
toretore has joined #ruby
Macaveli has joined #ruby
passerine has left #ruby [#ruby]
ruby-lang729 has joined #ruby
blackmesa has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
tvw has joined #ruby
jun_ has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
saneax is now known as Guest42445
UniFreak has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
andersh has joined #ruby
akahn has joined #ruby
astrobun_ has quit [Remote host closed the connection]
danzilio has joined #ruby
govg has quit [Ping timeout: 265 seconds]
jpinnix______ has joined #ruby
dukedave has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
jun_ has quit [Ping timeout: 260 seconds]
moeabdol has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Macaveli_ has joined #ruby
DeXterbed has quit [Ping timeout: 246 seconds]
colegatron has quit [Ping timeout: 240 seconds]
Macaveli_ has quit [Client Quit]
startupality has quit [Quit: startupality]
CloCkWeRX has quit [Ping timeout: 246 seconds]
DeXterbed has joined #ruby
mostlybadfly has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
Mr_Psmith has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krzkrzkrz has joined #ruby
DeXterbed has quit [Ping timeout: 246 seconds]
<zotherstupidguy>
is there a basic auth twitter gem ?
<PaulePanter>
Hi. My class deals with durations of multiples of 15 minutes. But arbitrary non-negative integers can be added. So there is a method doing `duration_15_minutes != real_durations`.
<PaulePanter>
What’s the suggested name for the method: uncommon_duration? or has_uncommon_duration?
<adaedra>
there's no enforced rule, but the ? should be enough to denote it's a boolean, no need for is_ or has_ prefixes.
<PaulePanter>
And would you suggest: common_duration? or uncommon_duration? ? Try to use the shorter one? But in if statements I probably would need a lot of negations then.
<PaulePanter>
adaedra: Understood. Thank you for the clarifications.
millerti has joined #ruby
beast has joined #ruby
seitensei has quit [Ping timeout: 255 seconds]
sigurding has joined #ruby
colegatron has joined #ruby
jpank has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
pdoherty has joined #ruby
attyz is now known as plsk
Guest42445 is now known as saneax_AFK
shredding has joined #ruby
synthroid has joined #ruby
blaxter has quit [Quit: foo]
CloCkWeRX has joined #ruby
startupality has joined #ruby
pika_pika has joined #ruby
dukedave has quit []
dukedave has joined #ruby
boboc has joined #ruby
jhill has quit []
jhill has joined #ruby
ruby-lang856 has joined #ruby
mroth has quit []
<ruby-lang856>
how can i get an invite to join #ruby-lang?
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
ruby-lang856: there is no ruby-lang
<ljarvis>
there is #ruby
<ljarvis>
and you're here already \o/
ec has quit []
akaiiro has quit [Ping timeout: 240 seconds]
<GinoManWorks>
ruby.live long
<GinoManWorks>
ruby.live :long
acadavid has quit []
ec has joined #ruby
jpinnix______ has quit []
acadavid has joined #ruby
ckrailo has quit []
<boboc>
guys i have a question, i have an exercise to compare 2 classes and return my value? for ex if i subclass the String and have MyString < String, if i do MyString > String to return true. is this possible?
jpinnix______ has joined #ruby
ckrailo has joined #ruby
<apeiros>
ruby.live :long, and: "prosper"
akahn has quit []
akahn has joined #ruby
<apeiros>
boboc: if you mean instance_of_MyString > instance_of_String, then yes
davedev24 has joined #ruby
<apeiros>
boboc: if you literally mean MyString > String, then no, because Subclass is always < ParentClass
<apeiros>
boboc: also, you shouldn't inherit from classes you don't control. composition over inheritance there.
baweaver has joined #ruby
<apeiros>
I hope you get thought accordingly :)
jmhmccr has quit []
jmhmccr has joined #ruby
dotix has joined #ruby
startupality has quit [Quit: startupality]
<boboc>
apeiros: not the instance, the class itself. and i know it doesn't make sense, is just an exercise i have and i'm not sure if the Comparable module can be extended somehow so i could control this > response :)
dotix has quit [Client Quit]
incomprehensibly has quit []
bithon has quit [Quit: WeeChat 1.3]
<apeiros>
boboc: you can override MyString.<
<apeiros>
that's horrible, though.
incomprehensibly has joined #ruby
knowtheory has quit []
<apeiros>
i.e. you can make *any* method return *anything* you want.
knowtheory has joined #ruby
<ljarvis>
within reason
<ljarvis>
</pedant>
vcoinminer_ has quit []
<apeiros>
>> class String; def <(*); "hello, this makes no sense"; end; end; "foo" < 42
<apeiros>
ljarvis: I'd argue even beyond reason, see ^ :D
vcoinminer_ has joined #ruby
deeprave has joined #ruby
ruby-lang856 has quit [Ping timeout: 252 seconds]
cassioscabral has joined #ruby
rflot has quit []
rflot has joined #ruby
ornerymoose has joined #ruby
abyss has joined #ruby
rgtk has quit [Remote host closed the connection]
vasilakisfil has joined #ruby
Rickmasta has joined #ruby
baweaver has quit [Ping timeout: 255 seconds]
knowtheory_ has joined #ruby
<vasilakisfil>
in my gem, in hashes as a value I can either have a regular value or a lambda or an object that responds to a #call method.. so instead of trying to figure out if the value of a specific key responds_to? :call everytime, I would like to create a new hash class that does that automatically
lurch_ has joined #ruby
<vasilakisfil>
should I inherit the Hash or use composition ?
ruby-lang729 has quit [Quit: Page closed]
ornerymoose_ has joined #ruby
vcoinminer__ has joined #ruby
UniFreak has joined #ruby
bithon has joined #ruby
InvGhost has joined #ruby
<apeiros>
vasilakisfil: as I just said above: do NOT inherit classes you don't control. use composition.
deeprave___ has joined #ruby
<vasilakisfil>
ook
rflot_ has joined #ruby
ornerymoose has quit [Ping timeout: 240 seconds]
ornerymoose_ is now known as ornerymoose
<apeiros>
vasilakisfil: take a look at Forwardable stdlib module
kalopsian has joined #ruby
<apeiros>
and Delegator/SimpleDelegator. they make that quite easy.
<vasilakisfil>
alright!
joonty has joined #ruby
astrobun_ has joined #ruby
cardoni has quit []
cardoni has joined #ruby
boxrick1 has quit []
arturaz has joined #ruby
boxrick1 has joined #ruby
dstarh has joined #ruby
sgambino has joined #ruby
<gregf_>
fg
<gregf_>
:|
<gregf_>
sorry
<apeiros>
^Z
jabreity__ has quit []
d0nn1e has quit [Ping timeout: 240 seconds]
roshanavand has quit [Remote host closed the connection]
jabreity__ has joined #ruby
<ljarvis>
heh
cardoni_ has joined #ruby
troulouliou_div2 has joined #ruby
d0nn1e has joined #ruby
roshanavand has joined #ruby
danzilio has quit []
CloCkWeRX has quit [Ping timeout: 256 seconds]
danzilio has joined #ruby
Arctaire has quit []
andersh has quit []
Arctaire has joined #ruby
astrobun_ has quit [Remote host closed the connection]
andersh has joined #ruby
pdoherty has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 240 seconds]
<vasilakisfil>
why google still keeps ruby 1.9.3 docs as top results :/
maxmanders has quit [Ping timeout: 256 seconds]
danzilio_ has joined #ruby
boxrick1_ has joined #ruby
ruid has quit [Ping timeout: 265 seconds]
danzilio has quit [Client Quit]
danzilio_ is now known as danzilio
platzhirsch has left #ruby [#ruby]
astrobu__ has joined #ruby
astrobu__ has quit [Remote host closed the connection]
maxmanders has joined #ruby
jabreity___ has joined #ruby
sankaber has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
tejasmanohar has quit []
blackmesa has joined #ruby
tejasmanohar has joined #ruby
arturaz has joined #ruby
nfk|laptop is now known as it_tard
grepwood has joined #ruby
<grepwood>
hi everyone
danzilio_ has joined #ruby
<grepwood>
anyone here familiar with C's fwrite function? I kinda need something similar
<apeiros>
hi grepwood
ramortegui has joined #ruby
<grepwood>
hi apeiros, how are you? :)
<apeiros>
fine, fine
<apeiros>
what properties of fwrite do you need?
Arctaire_ has joined #ruby
<vasilakisfil>
can't I define a method called real_[] ? :/
<grepwood>
I have a byte array and I need to write down exactly 64 bytes from it
<apeiros>
vasilakisfil: no
rgtk has joined #ruby
<vasilakisfil>
what's the actual limitation?
<apeiros>
vasilakisfil: you can define a method real_, which returns an object which responds to []
<vasilakisfil>
ah right
<apeiros>
vasilakisfil: [] can't be part of a method name, it's only allowed in [] and []=
cassioscabral has quit [Quit: cassioscabral]
andersh_ has joined #ruby
<grepwood>
each time that 64 bytes are written down, I need to putc('\n') in there too
<grepwood>
if you're asking why this is oddly similar to creating a RSA key file... it's because it is exactly that
Mon_Ouie has joined #ruby
<vasilakisfil>
yeah I get that, but why is is not allowed by the ruby "specs" ? it wouldn't hurt, I think
f4cl3y has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
<apeiros>
grepwood: puts *objects
<grepwood>
apeiros, but what about the 64?
<apeiros>
assuming objects is an array of 64byte strings (or objects which return 64byte strings when calling to_s)
<grepwood>
oh dear no
<apeiros>
if that's not the case, you'll have to elaborate on what you have
<grepwood>
sure
<grepwood>
the string is actually
arturaz has quit [Ping timeout: 272 seconds]
<apeiros>
vasilakisfil: because how do you differ between obj.foo[0] and object.foo[0]? (once being .foo.[](0) and once being foo[](0))
dlitvak_ has joined #ruby
<apeiros>
vasilakisfil: or to answer: because it'd be ambiguous.
<grepwood>
what you get when you `grep -v ^\- | tr -d '\n'` your RSA key
<grepwood>
so that's a really long base64
<grepwood>
the reason it has to be stored in this way, is because I'm keeping it in a Chef server, so it has to be stored in a link-safe format (like base64 withoiut newlines)
<apeiros>
base64 writes a newline after 60 chars, no?
tejasmanohar_ has joined #ruby
<grepwood>
after 64, I counted
dlitvak has quit [Ping timeout: 272 seconds]
<grepwood>
at least for SSL certs and RSA keys
<apeiros>
Base64.encode64 will write a newline every 60 chars by default.
<apeiros>
and doesn't seem to have an argument
<apeiros>
grepwood: anway - you have a string containing base64 without newlines and you want to have newlines every 64 chars?
<grepwood>
apeiros, yes, exactly
<apeiros>
ok, then almost what I said above:
<grepwood>
that way I can write it back into a file on the server and pretend it's the RSA key I originally had
<apeiros>
puts longstring.scan(/.{,64}/)
<apeiros>
assuming it *really* doesn't contain \n :)
<apeiros>
sorry, puts longstring.scan(/.{1,64}/)
<apeiros>
otherwise you might have an empty line in it
<grepwood>
I can swear on my pinkie it has no newlines
<grepwood>
Chef wouldn't accept it if it had
cassioscabral has joined #ruby
rgtk has quit [Remote host closed the connection]
<grepwood>
you're the best apeiros :D
<apeiros>
you say as if that wasn't obvious ;-p
<apeiros>
+that
<apeiros>
bleh
<apeiros>
can't type
<apeiros>
but meeting incoming so slightly stressed :D
<kfrz>
Hi, I'm wondering how to properly manage ruby on OSX El Capitan. I'm a developer, but I'm transitioning to separating all of my projects into Docker containers for many reasons. I'm now more concerned with how to manage local rubys, for example if I want to gem install tmuxinator I get permissions errors
valetudo has joined #ruby
<kfrz>
which ruby is /usr/local/bin/ruby - is that accurate?
Drakevr has joined #ruby
kfrz has left #ruby [#ruby]
araujo has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
norc_ has quit [Ping timeout: 252 seconds]
<ljarvis>
there's no wrong answer, really
araujo has quit [Max SendQ exceeded]
monumentlike has joined #ruby
<ljarvis>
it's wherever you want it to be since the path can be custom. I would consider using a version manager (such as chruby)
devbug has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
freerobby has quit [Quit: Leaving.]
<Bish>
the f is tmuxiator, another great thing i have to look into!??!
roshanav_ has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish>
coooooooooooooool
roshanavand has joined #ruby
<Lewix>
apeiros: where do you work again
<adaedra>
re
nertzy has joined #ruby
<ljarvis>
for the lords of a pie ros
akaiiro has joined #ruby
jas02_ has joined #ruby
fcser has joined #ruby
<Lewix>
ljarvis: I thought that was for an ape I rose
jas02 has quit [Ping timeout: 272 seconds]
jas02_ is now known as jas02
moeabdol has quit [Quit: WeeChat 1.3]
skade has quit [Quit: Computer has gone to sleep.]
Jardayn has joined #ruby
<Bish>
are there more cool gems that i should know of?
<linelevel>
Hello. I am running Redmine via Puma on an Ubuntu 14.04 server. After editing a config file, I could not get the new changes to take effect. As a last resort, I tried rebooting the entire server (obviously I could never do this on a production server), and it worked. So clearly I was not restarting Redmine properly to reload the new config. I had been attempting to restart it via upstart, which essentially runs `bundle exec puma --config config/p
<apeiros>
but point taken, I'll add `zeroload rename_files [GLOB]`
<grepwood>
is Ruby known for disregarding the order of lines in its programs?
<adaedra>
no?
<apeiros>
grepwood: no.
<adaedra>
what is your problem?
<apeiros>
grepwood: unless you make it so.
<grepwood>
I have a function that does 2 things that interest us
cjbottaro has joined #ruby
<grepwood>
1. downloads a remote file to a known location
<grepwood>
2. uses said file to do stuff
agent_white has quit [Read error: Connection reset by peer]
scripore has joined #ruby
<grepwood>
what happens is that Ruby is trying to do #2 ahead of #1
Rodya_ has quit [Remote host closed the connection]
<apeiros>
yorickpeterse: that looks quite interesting!
<adaedra>
maybe your download is done async? what do you use?
<adaedra>
also, code.
<apeiros>
grepwood: ruby does precisely what you tell it to do
<apeiros>
it's not a guessing language
weemsledeux has joined #ruby
<yorickpeterse>
apeiros: Yeah I'm happy with it so far, still gotta test it properly in GitLab itself
hectortrope has quit [Read error: Connection reset by peer]
<yorickpeterse>
hopefully it doesn't slow things down too much
<apeiros>
grepwood: note that I had cases such as filesystems reporting a file to be written when it wasn't. that's unrelated to ruby, though.
<yorickpeterse>
oh durrr, messed up the Gem
<apeiros>
yorickpeterse: might fit in very well into an instrumentation part for my framework :)
<grepwood>
apeiros, I might be getting it really wrong then because this is the 2nd time I get this issue, with similar looking code
<apeiros>
?code grepwood
<ruboto>
grepwood, We can't help you without your code, please post it to https://gist.github.com
rkazak has joined #ruby
hectortrope has joined #ruby
<grepwood>
oh wait, I forgot you guys hate pastebin
<grepwood>
give me a sec
agent_white has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
not just the guys, the ladies even more so! (I think)
sameerynho has quit [Quit: Leaving]
skade has joined #ruby
jcoe has joined #ruby
<apeiros>
but yeah, speaking for myself: I won't read a pastebin.
<grepwood>
and with my other embarassing pastebins
senayar has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: Leaving]
<apeiros>
grepwood: and which is now done before which, despite line orders?
<grepwood>
apeiros, #16 is done before #12-14
<adaedra>
apeiros: depends on your definition of fast. But it may be slowed down by the entry into switzerland.
skade has quit [Read error: Connection reset by peer]
<apeiros>
grepwood: ok. well, let's explain what we know and what we don't know
<apeiros>
grepwood: I can *guarantee* you, that `remote_file` is invoked before `system `
<grepwood>
ouch, that hurts
chriscoffee has joined #ruby
<apeiros>
grepwood: but since `remote_file` is NOT a core/stdlib ruby method, we do NOT know what it does or when it does what it does
<grepwood>
right
<grepwood>
I'll ask chef people because this is a chef thing
rgtk has joined #ruby
<apeiros>
grepwood: i.e., without knowing its implementation, it's perfectly possible that this method spins up a thread and does it *whenever*
chriscoffee has quit [Client Quit]
<apeiros>
grepwood: and yes, that's the right consequence of that :)
<apeiros>
(asking in #chef)
araujo has quit [Ping timeout: 265 seconds]
ElFerna has quit [Ping timeout: 260 seconds]
<apeiros>
adaedra: if it's fast, then pastebin raw is a ton better than pastebin :)
skade has joined #ruby
<apeiros>
adaedra: still worse than gist
<apeiros>
(line numbers and being able to highlight them is useful, multiple files too)
<adaedra>
I have mixed feelings about gist.
<apeiros>
what's the cons?
* grepwood
wonders if gist is just as badly abused by doxers like pastebin is
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
tesuji has quit [Ping timeout: 265 seconds]
<adaedra>
?offtopic adaedra
<ruboto>
adaedra, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<adaedra>
right
<apeiros>
not sure I agree on this being ot, but we can move there anyway :)
scripore has quit [Quit: This computer has gone to sleep]
treehug88 has joined #ruby
rgtk has quit [Ping timeout: 246 seconds]
<grepwood>
well #chef is looking quite uninterested
scripore has joined #ruby
<adaedra>
?patience
<ruboto>
looks like nobody with an an answer to your question is around. Just stick around for a couple of hours, many people check the backlog.
<grepwood>
>a couple of hours
<grepwood>
it hz
<grepwood>
I'll try to separate the remote_file bits from the function, put them into another, and make that run from main()
<apeiros>
grepwood: you can study the docs in the meantime
<apeiros>
grepwood: also you can try to debug, as in add code to verify when what happens
<apeiros>
and there's other venues, like ML, SO
psy_ has joined #ruby
skade has quit [Ping timeout: 246 seconds]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
smactive has joined #ruby
dlitvak_ has joined #ruby
scripore has quit [Client Quit]
kies^ has joined #ruby
steffkes has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 256 seconds]
smactive has quit [Ping timeout: 255 seconds]
skade has joined #ruby
scripore has quit [Client Quit]
pdoherty has quit [Ping timeout: 240 seconds]
<grepwood>
no it's still screwed
UniFreak has quit [Ping timeout: 255 seconds]
aufi has quit [Quit: Konversation terminated!]
nixmaniack has quit [Read error: Connection reset by peer]
Icey has quit [Remote host closed the connection]
Icey has joined #ruby
mostlybadfly has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jessemcgilallen has quit [Read error: Connection reset by peer]
ElFerna has quit [Read error: Connection reset by peer]
codecop has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
grepwood has quit [Remote host closed the connection]
sgambino has joined #ruby
treehug88 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Madhur_ has joined #ruby
ashemark has joined #ruby
madcodes has quit [Ping timeout: 256 seconds]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
govg has joined #ruby
jessemcgilallen has joined #ruby
cwong_on_irc has joined #ruby
dlitvak has joined #ruby
treehug88 has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
roshanav_ has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
huyderman has joined #ruby
tvw has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
<camus>
What is a Hashie struct?
[Butch] has joined #ruby
root_murdoc has joined #ruby
root_murdoc has quit [Max SendQ exceeded]
baweaver has joined #ruby
root_murdoc has joined #ruby
<jhass>
?context
<ruboto>
Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
roshanav_ has quit [Read error: Connection reset by peer]
kknight has quit [Max SendQ exceeded]
roshanavand has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kknight has joined #ruby
joonty has quit [Quit: joonty]
kknight has quit [Max SendQ exceeded]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
kknight has joined #ruby
The_Phoenix has joined #ruby
alex88 has joined #ruby
yardenbar has quit [Ping timeout: 272 seconds]
mark3 has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
nixmaniack has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
senayar has quit []
jas02 has joined #ruby
nixmaniack has joined #ruby
jas02 has quit [Client Quit]
akem has joined #ruby
Xiti has quit [Quit: Xiti]
build22_ has joined #ruby
dlitvak has joined #ruby
lacuna has quit [Remote host closed the connection]
sneakerhax has joined #ruby
akem has quit [Read error: No route to host]
kristianpaul has quit [Remote host closed the connection]
akem has joined #ruby
dlitvak has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fcser has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby
dlitvak has joined #ruby
ElFerna has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
vasilakisfil has quit [Quit: Konversation terminated!]
seitensei has joined #ruby
seitensei has joined #ruby
FooMunki has quit [Quit: FooMunki]
jbrhbr has quit [Quit: Leaving.]
fcser has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
FooMunki has joined #ruby
Tempesta_ has joined #ruby
mbeasley has left #ruby ["WeeChat 0.4.2"]
ElFerna has joined #ruby
n1x has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has quit [Ping timeout: 250 seconds]
lurch_ has quit [Quit: lurch_]
arooni_______ has joined #ruby
akem has quit [Read error: No route to host]
akem2 has joined #ruby
roshanavand has quit [Remote host closed the connection]
nixmaniack has quit [Ping timeout: 240 seconds]
seitensei has quit [Ping timeout: 246 seconds]
<shevy>
hashie and cashie!
fantazo has joined #ruby
Snowy has quit []
monthy has joined #ruby
andikr has quit [Remote host closed the connection]
akem2 has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
rkazak has joined #ruby
rdavila has joined #ruby
karapetyan has joined #ruby
araujo_ has quit [Quit: Leaving]
benhuda has joined #ruby
eytanfb has joined #ruby
lacuna has joined #ruby
Xiti has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
steffkes has joined #ruby
Tricon has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
akkad has joined #ruby
nertzy has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
<alex88>
hi there, I've this sample array https://repl.it/B9RU/2 and I've wrote the next part to create and array of array following its ancestors, is there a way to make it shorter/cleaner?
atomical has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
c0m0 has quit [Ping timeout: 256 seconds]
eytanfb has quit [Ping timeout: 265 seconds]
tlaxkit has quit [Quit: ¡Hasta luego!]
nertzy has quit [Client Quit]
n1x has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
krzkrzkrz has quit [Quit: WeeChat 1.2]
dlitvak has joined #ruby
nertzy has joined #ruby
rkazak has quit [Ping timeout: 256 seconds]
howdoicomputer has joined #ruby
poguez_ has joined #ruby
nixmaniack has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
kknight has quit [Remote host closed the connection]
pandaant has joined #ruby
wldcordeiro has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix>
alex88: i think if you put an example input and desired_output it'll be helpful
pandaant has quit [Remote host closed the connection]
<Papierkorb>
alex88: you're basically replacing the Hash object by the id in the ancestors array?
dlitvak has quit [Remote host closed the connection]
pandaant has joined #ruby
<alex88>
Lewix: oh sry, well the input example is the first line object, the output is the result you get running the script
wldcordeiro has quit [Client Quit]
wldcordeiro has joined #ruby
<alex88>
Papierkorb: well I'm creating a tree, so go in each sub-array when I find that ancestors array is not empty
<alex88>
and then append the current element
<Papierkorb>
your code is really complicated
<Papierkorb>
which would be okay-ish if it would do complicated things
<alex88>
good
eytanfb has joined #ruby
<alex88>
in this version, first I sort by the ancestors array length, so I can create first the root level elements, then the 1st level ones and so on
<alex88>
then I go trough each of those and add them in the right place in the resulting array
<Papierkorb>
alex88: so, what is the code supposed to do?
monthy has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 260 seconds]
<alex88>
absolutely not
drbernardi has joined #ruby
<shevy>
please do :)
hxegon has joined #ruby
<alex88>
so in my code, I first sort the array by ancestors length, then in the foreach I first add the elements with 0 ancestors to the root array, then if the ancestors array is not empty, I search for the first parent in the root array, then if there are no more ancestors I put the element in the first parent I've just found, otherwise I search for the second level parent and so on
antgel has quit [Ping timeout: 255 seconds]
<alex88>
in your code, you replace the ancestors, in mine, I actually add a "children" array to each element and I put the children thene
<Papierkorb>
xy problem. What are you really trying to do? How should your input array be turned into a 'tree' ?
Channel6 has joined #ruby
<Papierkorb>
Well, doing that modification shouldn't be hard
firstdayonthejob has joined #ruby
rgtk has quit [Ping timeout: 246 seconds]
hobodave has quit [Quit: Computer has gone to sleep.]
nixmaniack has quit [Remote host closed the connection]
pglombardo has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
<Papierkorb>
Yep. slight variaton of my version
<alex88>
each element has an array with the ids of its ancestors, so create a tree from that, putting each element in the ancestor's "children" array
diegoviola has quit [Quit: WeeChat 1.3]
dlitvak has joined #ruby
aryaching has joined #ruby
colleenmcguckin has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
startupality has joined #ruby
drbernardibis has joined #ruby
zast has joined #ruby
troulouliou_div2 has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 265 seconds]
drbernardibis has quit [Client Quit]
goodcodeguy has joined #ruby
berserk_ren has joined #ruby
f00bar-32 has joined #ruby
tulak has joined #ruby
build22_ has left #ruby [#ruby]
darkf has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
ascarter has joined #ruby
<drbernardi>
SET HIDEMAIL ON
pdoherty has joined #ruby
<drbernardi>
SET PRIVATE ON
nertzy has quit [Quit: This computer has gone to sleep]
blackmesa has joined #ruby
jun_ has joined #ruby
tulak has quit []
_djbkd has joined #ruby
last_staff1 has joined #ruby
synthroi_ has joined #ruby
nixmaniack has joined #ruby
berserk_ren has quit [Remote host closed the connection]
colleenmcguckin has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
icarus has joined #ruby
synthroi_ has quit [Remote host closed the connection]
synthroid has quit [Read error: No route to host]
synthroid has joined #ruby
colleenmcguckin has joined #ruby
synthroid has quit [Remote host closed the connection]
<shevy>
ok...
berserk_ren has joined #ruby
last_staff has quit [Ping timeout: 265 seconds]
last_staff1 is now known as last_staff
nixmaniack has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
berserk_ren has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
pawnbox has joined #ruby
karapetyan has quit []
PedramT has joined #ruby
karapetyan has joined #ruby
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
dh64 has joined #ruby
jun_ has quit [Remote host closed the connection]
blackjid has quit [Max SendQ exceeded]
InvGhost has quit [Ping timeout: 260 seconds]
blackjid has joined #ruby
PedramT has quit [Ping timeout: 240 seconds]
steffkes has quit [Ping timeout: 265 seconds]
Dimik has joined #ruby
medvedu has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 246 seconds]
nixmaniack has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
siddharth has quit [Ping timeout: 240 seconds]
colleenmcguckin has joined #ruby
banister has joined #ruby
RegulationD has joined #ruby
siddharth has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
The_Phoenix has joined #ruby
konsolebox has quit [Quit: Leaving]
dlitvak has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
collembolic has joined #ruby
Macaveli has joined #ruby
dlitvak has joined #ruby
baweaver has quit [Remote host closed the connection]
collembolic has quit [Changing host]
collembolic has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colegatron has quit [Ping timeout: 265 seconds]
n1x has joined #ruby
spider-mario has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
<linelevel>
Hello. I am running Redmine via Puma on an Ubuntu 14.04 server. After editing a config file, I could not get the new changes to take effect. As a last resort, I tried rebooting the entire server (obviously I could never do this on a production server), and it worked. So clearly I was not restarting Redmine properly to reload the new config. I had been attempting to restart it via upstart, which essentially runs `bundle exec puma --config config/p
jun_ has joined #ruby
jbrhbr has joined #ruby
Bloomer has quit [Remote host closed the connection]
diegoviola has joined #ruby
n1x has quit [Read error: Connection reset by peer]
devbug has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
baweaver has joined #ruby
<apeiros>
linelevel: when you don't get an answer, one reason can be that you didn't provide sufficient info
Waheedi has joined #ruby
<apeiros>
linelevel: while I'm not familiar with upstart, I noticed some things about your question:
<Waheedi>
I'm trying to do a post request using net::http
<apeiros>
you don't say *how* exactly you tried to reboot it via upstart. you say "essentially runs X", why not exactly what?
dlitvak has quit [Remote host closed the connection]
<Waheedi>
I'm trying to find out the best way I can pass Query String Params and Form data in the same request
PedramT has joined #ruby
<Waheedi>
I'm aware of the set_form_data and I know i can use it to pass form data but not sure about the Query String params though
<apeiros>
linelevel: unrelated to that: stopping and starting puma absolutely should reload the config. so I'd assume that there's indeed something wrong with the way you reboot via upstart.
harushimo has joined #ruby
<harushimo>
I've got rbenv but I can't seem to get 2.2.3 on the list as installation source
<harushimo>
why is that
<hxegon>
is there a way to explode arrays in block params?
<hxegon>
like [[1, 2], [3, 4]].each do |(a,b)|...
<jhass>
doesn't work?
<linelevel>
apeiros: in Ubuntu, you restart services via upstart by running `service <service_name> upstart`. In this case, <service_name> is `redmine`, so I ran `service redmine restart`. This runs an upstart init script which sets up the environment, then runs the `bundle exec puma --config config/puma.rb`.
timonv has quit [Ping timeout: 265 seconds]
<linelevel>
apeiros: I meant to write `service <service_name> restart` in the first sentence, of course.
<harushimo>
i installed using apt-get
<shevy>
damn
ascarter has joined #ruby
<jhass>
harushimo: if you want to use a packaged ruby, don't use rbenv
n1x has joined #ruby
<diegoviola>
I've installed ruby to /usr/local with ruby-install, is there a way to remove this?
<jhass>
if you want to use rbenv, don't use a packaged ruby
<diegoviola>
I don't think there's a make uninstall in the src
<harushimo>
oh really? why not
rdark has quit [Ping timeout: 256 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
<harushimo>
jhass: I'm curious
colleenmcguckin has quit [Read error: Connection reset by peer]
<jhass>
because those don't work well together
<hxegon>
jhass, hmm... ah. just realized I'm actually working with [{}], not [[]]
synthroid has joined #ruby
<shevy>
diegoviola can you delete manually
<jhass>
harushimo: maybe you're looking for something like chruby
<harushimo>
jhass: I'm getting ruby for CF
colleenmcguckin has joined #ruby
<harushimo>
jhass: what do you recommend?
<diegoviola>
shevy: how though? and how do I know which files in /usr/local were installed from ruby
<diegoviola>
and which ones don't
<jhass>
CF?
<shevy>
diegoviola what do you mean how, are you not using linux
<diegoviola>
shevy: I want to delete all files that were installed from ruby
<shevy>
yes
<harushimo>
jhass: it was a part of an instruction set that was given to me
<jhass>
so ask whoever gave it to you for support?
<shevy>
diegoviola the bin/ files from a default ruby should be: ruby, irb, ri, erb, gem, rake, rdoc
<diegoviola>
shevy: there's more to that
<shevy>
diegoviola not to bin/
<shevy>
did you get rid of these files yet
scripore has joined #ruby
<shevy>
next will be lib/ by default all that will be *ruby* there
<diegoviola>
shevy: ok
<shevy>
in particular lib/ruby/ and lib/libruby.so.2.2.0 (and some other so-named ones)
<harushimo>
jhass: relax..I'm just wondering
<shevy>
and once you got rid of this, you are about 80% complete already
colegatron has joined #ruby
<diegoviola>
shevy: thanks
<harushimo>
jhass: I did this same tutorial a few mons before I rebuilt my computer.
devbug has quit [Read error: Connection reset by peer]
<shevy>
there should be an include aka /usr/local/include/ruby-2.2.0/ but only one directory
wjimenez5271 has quit [Ping timeout: 272 seconds]
<shevy>
you can also get rid of /usr/local/share/ri/ if you want to
<jhass>
harushimo: if it no longer works you probably skipped a step of it then
<diegoviola>
shevy: ty
<harushimo>
jhass: yep
PedramT has quit []
baweaver has quit [Remote host closed the connection]
<harushimo>
jhass: sorry if I offending anyone. I'm just learning here
<shevy>
and share/doc/ruby/ but these really should not be any problem, the newer installed ruby has all information it needs normally e. g. in RbConfig or gem env
<shevy>
now it's 100% done!
devbug has joined #ruby
dsdeiz has quit [Ping timeout: 240 seconds]
<jhass>
harushimo: and I'm just saying that trying to use a packaged ruby through rbenv is rather untypical. While I'm not familiar enough with rbenv to say for sure, I highly doubt it's even possible
Amnez777 has quit [Ping timeout: 260 seconds]
Amnez777 has joined #ruby
Amnez777 has quit [Max SendQ exceeded]
<harushimo>
jhass: I prefer doing it that way
<jhass>
then better figure out which step you skipped if it worked in the past
<harushimo>
jhass: I prefer doing it from source if I can. I'm not liking the package managers
dolf has joined #ruby
Amnez777 has joined #ruby
<jhass>
harushimo: now you're contradicting yourself
wjimenez5271 has joined #ruby
minimalism has joined #ruby
<shevy>
lol
<shevy>
poor jhass, has to deal with constantly changing specs from harushimo :)
<linelevel>
apeiros: I have now tried it manually, and can confirm that restarting Puma does NOT reload the Redmine config.
<harushimo>
I'm not changing anything here
<harushimo>
hehe
<shevy>
first rbenv... then suddenly apt-get ... now source
<shevy>
come on harushimo
<shevy>
what is the next ... rvm?
<harushimo>
yes rvm heeh
<apeiros>
linelevel: when you stopped redmine, was it indeed gone? as in, no longer reachable via the browser?
<harushimo>
In all honesty, I'll usually do it from source but I use the package managers if I'm feeling lazy
<harushimo>
package managers are my back up option
<shevy>
I do it from source too
cjbottaro has joined #ruby
<jhass>
curious, for me it's the other way around
<jhass>
I usually write a package before using the source, unless I'm super lazy
<linelevel>
apeiros: Yes, I checked that after `service redmine stop`. I got a bad gateway error from nginx. Then I did `service redmine start`, and the site loaded, but the config had not reloaded.
nettoweb has joined #ruby
<harushimo>
haha..nice. I've run into problems when installing ruby through apt-get because it doesn't get updated
<jhass>
I can imagine, most distros suck there
<shevy>
yeah debian can be scary
TinkerTyper has joined #ruby
<harushimo>
they do
<shevy>
jhass have you had a look at voidlinux yet? (I only know that it exists, I have not tried it myself)
<jhass>
the name rings a bell but I forgot everything about it
<shevy>
hehe
<shevy>
harushimo so have you finally decided on the one true way to use ruby yet
<jhass>
is that the folks using nix?
n1x has quit [Read error: Connection reset by peer]
<harushimo>
I've done ruby installs in the past so many times
<harushimo>
what do you one true way?
<harushimo>
what do you mean by one true way? is there one?
<shevy>
source of course ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.xz but if you have to fight the underlying base system then it may not be worth it
axl_ has quit [Quit: axl_]
<harushimo>
right
TinkerTyper has joined #ruby
<shevy>
on debian typically some bindings will not be compiled such as readline, unless you have readline-dev there
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
ur5us has joined #ruby
[Butch]_ has joined #ruby
davedev2_ has quit [Ping timeout: 260 seconds]
zeroDivisible has quit [Client Quit]
Authenticator has quit [Remote host closed the connection]
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
zast has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
[Butch] has quit [Ping timeout: 255 seconds]
[Butch]_ is now known as [Butch]
jackjackdripper has joined #ruby
dmolina1 has quit [Ping timeout: 265 seconds]
cdg has quit [Remote host closed the connection]
Anderson69s has joined #ruby
seitensei has quit [Ping timeout: 240 seconds]
yes`r has quit [Read error: Connection reset by peer]
hobodave has quit [Quit: Computer has gone to sleep.]
scripore has quit [Quit: This computer has gone to sleep]
yeshacker has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
nixmaniack has quit [Client Quit]
cassioscabral has quit [Read error: Connection reset by peer]
rikai has joined #ruby
cassioscabral has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 260 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
hobodave has joined #ruby
s00pcan has joined #ruby
frem has joined #ruby
roshanavand has joined #ruby
jxs_ has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
roshanavand has quit [Remote host closed the connection]
hahuang65 has joined #ruby
jdm has joined #ruby
<ZeeNoodley>
undefined method `signame' for Signal:Module (NoMethodError)
<ZeeNoodley>
wat
roshanavand has joined #ruby
gr33n7007h has joined #ruby
yqt has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
dotix has joined #ruby
dotix has joined #ruby
seitensei has joined #ruby
mchu has joined #ruby
TomPeed has joined #ruby
duncannz has quit [Ping timeout: 265 seconds]
mchu has left #ruby [#ruby]
gr33n7007h is now known as al2o3-cr
huyderman has quit [Remote host closed the connection]
ruby-lang960 has joined #ruby
roshanavand has quit [Remote host closed the connection]
cassioscabral has joined #ruby
dlitvak has quit [Remote host closed the connection]
ruby-lang960 has quit [Ping timeout: 252 seconds]
cjbottaro has joined #ruby
rgtk has joined #ruby
cajone has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
AncientAmateur has joined #ruby
nunchuck has joined #ruby
startupality has quit [Quit: startupality]
kalopsian has joined #ruby
karapetyan has quit [Remote host closed the connection]
<harushimo>
i got rbenv working again
baweaver has joined #ruby
rgtk has quit [Ping timeout: 246 seconds]
ElFerna has joined #ruby
<Waheedi>
I'm still looking for some help figuring out if I can send a query string params and a form data in one post request
cajone has joined #ruby
yardenbar has joined #ruby
yardenbar has quit [Remote host closed the connection]
cornerma1 has joined #ruby
shock_one has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
baweaver has quit [Ping timeout: 265 seconds]
yardenbar has joined #ruby
devbug has quit [Read error: Connection reset by peer]
mchu has joined #ruby
devbug has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mchu has left #ruby [#ruby]
last_staff has quit [Quit: last_staff]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TomyWork>
what's a good way to make conditional parts in an erb template? <% if blahblah %> seems wordy
sparr has left #ruby ["WeeChat 1.0"]
ramfjord has joined #ruby
roshanavand has joined #ruby
s00pcan has quit [Ping timeout: 265 seconds]
cassioscabral has quit [Quit: cassioscabral]
blackmesa has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 255 seconds]
<shevy>
TomyWork but that is regular ruby code
<TomyWork>
shevy well i know at least one template languages where you can make a part conditional on the existence of all variables references in it
<TomyWork>
referenced*
davedev2_ has joined #ruby
eytanfb has quit [Remote host closed the connection]
Vitor has joined #ruby
<mg^>
I'm not sure I'd call erb a "template language"... it's a template system and the language is ruby
poguez_ has quit [Quit: Connection closed for inactivity]
<TomyWork>
it certainly is a language in the same way aba*bb* is a language :)
roshanavand has quit [Ping timeout: 256 seconds]
<TomyWork>
well it's a regular expression generating a language...
<mg^>
semantics at this point, I think
colegatron has quit [Ping timeout: 240 seconds]
<TomyWork>
well there might be semantic sugar
rmrrn has quit [Ping timeout: 245 seconds]
<shevy>
there are not many things you can do in erb on top of ruby; there is... what was it... <= or something... and one more I think, but that was it
<TomyWork>
other than <%= foo %> == <% puts foo %>, that is
<shevy>
but you still have to use regular ruby inside :)
davedev24 has quit [Ping timeout: 260 seconds]
<shevy>
that documentation is pretty bad actually :\
cjbottaro has joined #ruby
jpfuentes2 has joined #ruby
<mg^>
yeah
bin7me has joined #ruby
davedev2_ has quit []
eytanfb has joined #ruby
<mg^>
I write a lot of erb templates thanks to puppet
<TomyWork>
hehe
<TomyWork>
that's what got me started with erb
idefine has joined #ruby
<TomyWork>
but right now i'm writing a tiny sinatra app
<TomyWork>
a gitlab webhook
malconis has quit [Read error: Connection reset by peer]
<TomyWork>
(yay more ruby)
malconis has joined #ruby
yfeldblum has joined #ruby
kappy has quit [Quit: Lost terminal]
baweaver has joined #ruby
Waheedi has quit [Quit: Waheedi]
<shevy>
you could probably write your own template replacement thingy that allows you to use a shorter syntax style
renemaya has quit [Quit: Re has gone to sleep. ZZZzzz…]
Dimik has quit [Ping timeout: 255 seconds]
calderonroberto has joined #ruby
eytanfb has quit [Ping timeout: 265 seconds]
<Papierkorb>
Or extend upon others. I do that (not your issue) with HAML.
FooMunki has quit [Quit: FooMunki]
avahey has joined #ruby
eytanfb has joined #ruby
dlitvak has joined #ruby
colegatron has joined #ruby
jinie_ has joined #ruby
s00pcan has joined #ruby
jinie has quit [Remote host closed the connection]
jinie_ is now known as jinie
henrikthomasson has joined #ruby
bin7me has quit [Quit: Leaving]
symm- has quit [Ping timeout: 240 seconds]
bin7me has joined #ruby
rmrrn has joined #ruby
rmrrn has quit [Changing host]
rmrrn has joined #ruby
freerobby has quit [Quit: Leaving.]
kalopsian has quit [Ping timeout: 256 seconds]
alex88 has quit [Remote host closed the connection]
ferr has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
ferr has quit [Client Quit]
gamename has joined #ruby
symm- has joined #ruby
drbernardi has quit [Quit: Leaving]
devbug has quit [Ping timeout: 255 seconds]
jdm has quit [Quit: Leaving]
jdm has joined #ruby
jbrhbr has quit [Quit: Leaving.]
InvGhost has joined #ruby
f00bar-32 has quit [Ping timeout: 246 seconds]
<gamename>
hi guys. I'm not a ruby programmer, but I need to do something pretty trivial in it. I need to look for all files in .ssh which contain '---BEGIN .* PRIVATE KEY---' and return those file name paths in an array. Got any examples you can point me to?
<TomyWork>
apeiros it is covered, but the backref style described there doesnt work
aryaching has quit []
<bithon>
clear
<TomyWork>
it shows up as a literal \g<comment>
<mg^>
there was some limitation to using references in certain circumstances, but it's been a while since I encountered them
<mg^>
I believe those were solved by using the block form
TheSuper has joined #ruby
TheSuper has left #ruby [#ruby]
<apeiros>
TomyWork: are you using an ancient ruby?
slackbotgz has joined #ruby
<apeiros>
TomyWork: um, it's not documented as *\g*, it's *\k*
auxbuss has joined #ruby
<apeiros>
"Named groups can be backreferenced with \k<name>, where name is the group name."
f00bar-32 has joined #ruby
auxbuss has quit [Client Quit]
dlitvak has quit [Ping timeout: 265 seconds]
devbug has joined #ruby
<TomyWork>
oh, \g is a subexpression *call*
<TomyWork>
thanks
kappy has joined #ruby
synthroid has quit []
pwnd_nsfw has quit [Ping timeout: 240 seconds]
eytanfb has joined #ruby
beast has quit [Quit: Leaving]
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dotix has quit [Ping timeout: 272 seconds]
DavidDudson has joined #ruby
eytanfb has quit [Ping timeout: 240 seconds]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
eytanfb has joined #ruby
karapetyan has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
<TomyWork>
crap. my gitlab webhook gets one POST request for every branch pushed. So if i push one commit to multiple branches, I get multiple simultaneous requests. sinatra apparently is able to serve those simultaneously too
<TomyWork>
so... is there a simple way to mutex those? :)
<TomyWork>
i'm using sinatra
Waheedi has joined #ruby
<jhass>
uh
<jhass>
Mutex?
<TomyWork>
yeah i just found it. it's so simple, it doesnt even need any sugar :)
<TomyWork>
i'm just so used to other languages where the on-board stuff is usually ugly
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arthurix has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
TinkerTyper has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
pwnd_nsfw has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
TinkerTyper has quit [Max SendQ exceeded]
_djbkd has quit [Remote host closed the connection]
mchu has joined #ruby
passerine has joined #ruby
renemaya has joined #ruby
cdg has joined #ruby
hobodave has joined #ruby
mchu has left #ruby [#ruby]
hxegon has quit [Quit: Leaving]
TinkerTyper has joined #ruby
rodferso1 has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
rodfersou has quit [Ping timeout: 240 seconds]
Idakyne has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
<hfp>
Hi all, is there a more idiomatic way to write `Hash.reject { |el| !foo.include? el }' ?
ornerymoose has quit [Quit: ornerymoose]
<jhass>
hfp: select and skip the !
<jhass>
with more context there might be a way to avoid it altogether
<maletor>
jhass: where did i go wrong on that gist?
<jhass>
oh
<jhass>
why don't you just use map?
<maletor>
i changed to map and i have the same issue
<jhass>
.each shall return the original collection
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
<jhass>
I'm not sure whether what you want makes any sense tbh
smactive has joined #ruby
<maletor>
gotcha, can you try and help me make sense of what i'm trying to do lol
<jhass>
maletor: could you show some more context and example uses with desired behavior described?
slackbotgz has quit [Remote host closed the connection]
<maletor>
i have a collection obj. a skilleduserlist that i want to include enumerable in. i'll be passing users in here. when i iterate through the collection i want instances of skilledusers. a decorator around a user.
<jhass>
maletor: so just results.each do |result| yield SkilledUser.new(result) end ?
<maletor>
ah yield
yfeldblum has quit [Ping timeout: 240 seconds]
akem has joined #ruby
<jhass>
maletor: well, block.call(SkilledUser.new(result)) would be basically equivalent
<jhass>
behavior wise anyway
InvGhost has quit [Ping timeout: 260 seconds]
jun_ has quit [Remote host closed the connection]
<maletor>
do you mean results.map?
<maletor>
or results.each
<jhass>
.each
smactive has quit [Ping timeout: 265 seconds]
<maletor>
jhass, merry christmas that works
nertzy has joined #ruby
howdoicomputer has joined #ruby
_djbkd has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun_ has joined #ruby
InvGhostt has quit [Ping timeout: 260 seconds]
AKASkip has quit [Ping timeout: 272 seconds]
<toretore>
anyone ever run across "fiber called across stack rewinding barrier (FiberError)"?
<fsfsfs>
adaedra, thanks. I dislike navigating between term and text editor every minute.
howdoi has quit [Quit: Connection closed for inactivity]
freerobby has quit [Quit: Leaving.]
nertzy has quit [Quit: This computer has gone to sleep]
n008f4g_ has quit [Ping timeout: 240 seconds]
snoozelose has joined #ruby
snoozelose has quit [Changing host]
snoozelose has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
valetudo has quit [Remote host closed the connection]
<delsol>
adaedra, apeiros: it was umask... :)
<adaedra>
That's strange.
<adaedra>
System?
<delsol>
and thats why you should assume everyone is talking to you... sometimes you get a second answer... :)
<delsol>
slackware
krobzaur has quit [Ping timeout: 272 seconds]
<adaedra>
So Linux
<delsol>
yeah
<adaedra>
Ruby version?
Vitor has quit [Ping timeout: 255 seconds]
kaleido has joined #ruby
<delsol>
2.suck.sucks_more
<delsol>
2.0.0p353
<adaedra>
Because I just tried on my Linux, and even with a 022 umask, it allows me to chmod 0777
sneakerhax has quit [Ping timeout: 272 seconds]
<delsol>
I've got new ruby compiled, and running on test machine, with rails 3.2.x that still runs everything, but haven't tested enough to deploy....
fantazo has quit [Ping timeout: 265 seconds]
sneakers has joined #ruby
<mg^>
yeah umask should only restrict the default modes for file creation
pandaant has joined #ruby
<mg^>
explicit mode setting should be fine
<adaedra>
And installing a 2.0 just for that, thanks but no thanks.
jessemcgilallen has joined #ruby
<delsol>
adaedra: yeah... once I get more testing done, I'll be moving to 2.2.3
renemaya has quit [Quit: Re has gone to sleep. ZZZzzz…]
<delsol>
anyways, thanks for the help!
<shevy>
does rails make you lazy!
renemaya has joined #ruby
<adaedra>
funny, your sentence looks like a question, but ends with !.
ElFerna has quit [Ping timeout: 255 seconds]
chipotle has quit [Ping timeout: 240 seconds]
<delsol>
shevy: yes. Before you know it, instead of writing one SQL query by hand, you'll let activerecord make 750 queries on the same row.... for the same answer..... and It'll be OK...
<delsol>
LOL
<adaedra>
You don't need ActiveRecord for that, tbh.
<delsol>
its easier in activerecord though.
<adaedra>
And if you look at your console, you notice it quickly.
ElFerna has joined #ruby
<adaedra>
But lazy developers are a good thing.
<shevy>
ruby 1.8
<adaedra>
get out with your dinosaur.
<shevy>
lol
<delsol>
in PHP, even doing a query in a query in a while() loop...
ta has quit [Remote host closed the connection]
dlitvak has joined #ruby
<delsol>
your inside query is generally not a query with joins and all sorts of other insanity...
<shevy>
php is now at version 7
karapetyan has quit [Remote host closed the connection]
<kaleido>
php looks funny
karapetyan has joined #ruby
<AncientAmateur>
@shevy take that as a warning sign and run
<AncientAmateur>
err kaleido that is
<shevy>
I'll run with kaleido!
sankaber has quit [Remote host closed the connection]
<adaedra>
You should.
<AncientAmateur>
just...php...not even once.
<delsol>
nothing wrong with PHP....
<AncientAmateur>
I'm not a fan
<adaedra>
plenty of things, but that's not the topic of this channel.
<adaedra>
?ot
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
dhollinger has quit [Quit: WeeChat 1.3]
devbug has quit [Ping timeout: 272 seconds]
mchu has joined #ruby
chipotle has joined #ruby
<shevy>
ruby is better than php
<kaleido>
().indeed
<adaedra>
that includes you, shevy.
ramortegui has quit [Quit: Ex-Chat]
karapetyan has quit [Ping timeout: 246 seconds]
chipotle_ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
hxegon has joined #ruby
chipotle has quit [Ping timeout: 256 seconds]
jgpawletko has quit [Ping timeout: 272 seconds]
snoozelose has quit [Quit: Leaving]
kstuart has quit [Quit: WeeChat 1.3]
Channel6 has quit [Ping timeout: 260 seconds]
neanderslob has quit [Ping timeout: 260 seconds]
_djbkd has quit [Ping timeout: 256 seconds]
dlitvak has quit [Remote host closed the connection]
neanderslob has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
jessemcgilallen has joined #ruby
klafka has joined #ruby
calderonroberto has quit [Remote host closed the connection]
steffkes has quit [Ping timeout: 265 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
<klafka>
hi I'm trying to use a SortedSet to maintain a list of the top 5 dates as I iterate through an array of dates - https://gist.github.com/jtmcmc/2e22235642c8d891137c however the outcome here is that only one item is ever removed. It's weird because when I play with SortedSet on console it acts as expected but not in this script - any ideas?
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n_blownapart has joined #ruby
bogn has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
siddharth has quit [Ping timeout: 240 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<klafka>
using while > 5 rather than if works - but I don't understand why really
fsfsfs has quit [Quit: Leaving]
ferr has joined #ruby
ramfjord has joined #ruby
|3|ackn|gg3|2 has joined #ruby
<toretore>
.to_a create another object
ferr has quit [Client Quit]
<toretore>
your original SortedSet remains unchanged
<|3|ackn|gg3|2>
to_a = array
bogn has joined #ruby
glenny has joined #ruby
<|3|ackn|gg3|2>
an array is a thing that holds multiple things
hobodave has joined #ruby
siddharth has joined #ruby
nofxx has quit [Ping timeout: 255 seconds]
jdm has quit [Read error: Connection reset by peer]
<klafka>
what's weird though is that the behavior isn't that within the IRB (if you see the comment I put in the gist) which is confusing. perhaps the delta here is around understanding how methods feed into each other / mutate objects
<adaedra>
!ban |3|ackn|gg3|2 !P Unacceptable nick
|3|ackn|gg3|2 was kicked from #ruby by ChanServ [Banned: Unacceptable nick]
zenlot2 has joined #ruby
pandaant has quit [Remote host closed the connection]
akaiiro has joined #ruby
zenlot1 has quit [Ping timeout: 256 seconds]
<toretore>
klafka, the output in your comment isn't visible
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<toretore>
set.to_a.shift will not mutate set
Bellthoven has joined #ruby
Bellthoven has quit [Client Quit]
colleenmcguckin has quit []
<klafka>
aah i see i didn't copy far enough - my bad
colleenmcguckin has joined #ruby
Bellthoven has joined #ruby
eytanfb has quit [Remote host closed the connection]
Guest69624 has quit []
<delsol>
adaedra: So, it turns out....... another developer had " `chmod -R 755 #{ROOT_PATH}/log/exceptions` if i_am_server? "
<hxegon>
ChameleonSix, what channel are you in right now?
snoozelose has joined #ruby
<ChameleonSix>
yes
<ChameleonSix>
javascript
<ChameleonSix>
anyway
<apeiros>
this is not #javascript.
<ChameleonSix>
twitter is built on ruby?
<ChameleonSix>
ik
dionysus69 has quit [Ping timeout: 265 seconds]
<hxegon>
nor is this #s/ /\n
<apeiros>
ChameleonSix: I'm quite close to kick you
gizmore has quit [Ping timeout: 256 seconds]
snoozelose has quit [Remote host closed the connection]
<ChameleonSix>
my spirit will haunt yoy
<ChameleonSix>
ok sorry
<apeiros>
do some shit on your own, seriously. we're not a general information desk.
<ChameleonSix>
ok
snoozelose has joined #ruby
<ChameleonSix>
you look like a master programmer
gizmore has joined #ruby
<ChameleonSix>
that is a compliment
<apeiros>
that won't get you anywhere.
<jbrhbr>
ChameleonSix: but to throw you a bone, irc tends to be good for specific questions, unless you can somehow phrase a general question in a specific way. so far you've done neither, so you can't really expect much
<ChameleonSix>
i know you are cold harted
<ChameleonSix>
ok
<apeiros>
ChameleonSix: next thing you say which is not a specific ruby question means I kick you.
snoozelose has quit [Client Quit]
<hxegon>
apeiros, you are not cold hearted :D
<apeiros>
no, I'm short tempered.
<ChameleonSix>
how do i ask the opearting system (windows ) to check for the free ram amount via cmd
snoozelose has joined #ruby
<ChameleonSix>
using ruby script
<apeiros>
!kick ChameleonSix not a ruby question. use a search engine as you have been told.
<hxegon>
jesus fucking christ.
ChameleonSix was kicked from #ruby by ruboto [not a ruby question. use a search engine as you have been told.]
ChameleonSix has joined #ruby
<ChameleonSix>
i said using ruby script
snoozelose has quit [Remote host closed the connection]
ChameleonSix was kicked from #ruby by ruboto [harebrained skulduggery]
ChameleonSix has joined #ruby
snoozelose has joined #ruby
<apeiros>
"how do I build a house, using ruby script", still not a ruby question.
<apeiros>
and next time, it's a ban.
freerobby has joined #ruby
<ChameleonSix>
without the cmd part sorry
<ChameleonSix>
but i read something that i need to link ruby to cmd
<jbrhbr>
ChameleonSix: what have you tried so far?
gizless has quit [Ping timeout: 240 seconds]
<ChameleonSix>
so it is impossible with ruby alone?
kaleido has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby
<ChameleonSix>
im in the learning process
<hxegon>
ChameleonSix, have you done any research at all yourself, or tried anything in pry or irb yet?
<ChameleonSix>
and i have no idea how to do that
<ChameleonSix>
uhh
shanemcd has joined #ruby
<ChameleonSix>
what can i try
<hxegon>
so no and no then.
CloCkWeRX has joined #ruby
<ChameleonSix>
i just learned something about ruby objects
freerobby has quit [Client Quit]
CloCkWeRX has left #ruby [#ruby]
<adaedra>
And yet ask for something completely unrelated.
<ChameleonSix>
how do i summon the operating system
snoozelose has quit [Client Quit]
<jbrhbr>
arcane magics
<apeiros>
!ban ChameleonSix !T 3d do some research. come back in 3 days. have some sensible questions by then.
ChameleonSix was banned on #ruby by ChanServ [ChameleonSix!*@*]
ChameleonSix was kicked from #ruby by ChanServ [Banned: do some research. come back in 3 days. have some sensible questions by then.]
mistermocha has joined #ruby
<hxegon>
first you draw a pentagram, then you google it.
snoozelose has joined #ruby
* apeiros
out of patience.
<jbrhbr>
i laughed harder at that than i should have
fantazo has joined #ruby
fantazo has quit [Read error: Connection reset by peer]
<apeiros>
maybe should have suggested to tackle a problem they can actually solve for a starter.
<apeiros>
but well, too late.
<adaedra>
Well, after a bit of research, it's not surprising he/she doesn't find anything using DuckDuckGo. This thing is nuts.
<jbrhbr>
well he claims he was learning ruby through treehouse, so they should have that under control
bitcycle has quit [Read error: Connection reset by peer]
snoozelose has quit [Client Quit]
<hxegon>
jbrhbr, it was charming at first, but he/she will learn googling/etiquette no matter how nicely you tell them to stop using enter instead of space.
hahuang65 has quit [Ping timeout: 260 seconds]
<jbrhbr>
yea
<apeiros>
hxegon: this is like the 6th day I see this person with the same silly type of questions
<apeiros>
they're told again and again.
<hxegon>
ddg is pretty cool, but that isn't an answer to 'what have you looked up so far' :P
<apeiros>
wow. I tried. took me all of 5s to find a standard windows tool to query for the cpu.
* apeiros
afk, have a nice day y'all
<jbrhbr>
cya
<hxegon>
peace
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
people wanted to release ruby memory back then
jgpawletko has quit [Quit: jgpawletko]
<cscheib>
perhaps "available" memory is a better search
<hxegon>
part of the reason for that is ddg doesn't track metadata, so it doesn't know any of your previous searches are related
snoozelose has joined #ruby
<cscheib>
^^ google spends a lot of time figuring out what you mean rather than what you actually searched for
<adaedra>
cscheib: right, tried with duckduckgo, 5th result is relevant. It tells me to do %x(free).
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaleido has joined #ruby
kaleido has quit [Client Quit]
<adaedra>
hxegon: right too, results are a bit less relevant in private browser, but it stills nails it way better.
shaileshg has joined #ruby
bubbys has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
snoozelose has quit [Changing host]
snoozelose has joined #ruby
kalopsian has joined #ruby
bubbys has joined #ruby
<mg^>
That's a funny screenshot
<bradland>
looking for some guidance in the form of libraries i could look at or names of patterns/search terms i could use to learn a little more about processing network streams