havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
sunya7a__ has joined #ruby
raazdaan has joined #ruby
<bigmac__> this will generate the a hole large list of hash's, but then only pull [0] the first array
<bigmac__> can i speed this up?
<bigmac__> with out generating the hole list
cwong_on_irc has quit [Quit: Leaving.]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hxegon has joined #ruby
sunya7a has quit [Quit: leaving]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
niftylettuce has quit [Quit: Connection closed for inactivity]
Rickmasta has joined #ruby
sunya7a has joined #ruby
Lucky__ has quit [Ping timeout: 240 seconds]
h99h9h88 has quit [Ping timeout: 256 seconds]
<bigmac__> hash.size**200 HUGE
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
carlisiacampos has quit [Quit: Leaving...]
jackjackdripper has quit [Quit: Leaving.]
<eam> bigmac__: hash is an Array in your example?
bmurt has joined #ruby
<bigmac__> yes
<bigmac__> could be 1,2,3
<eam> unless I'm missing something, that simplifies to hash.join
finisherr has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
finisherr has quit [Client Quit]
civil_ has quit [Ping timeout: 260 seconds]
cmoney has joined #ruby
<bigmac__> i guess, if you have a array size of one million... and you wanted to seek to [100]... i hope to not generate the hole million
startupality has quit [Quit: startupality]
tkuchiki has joined #ruby
chouhoulis has joined #ruby
lacrymology has quit [Ping timeout: 260 seconds]
<bigmac__> or... can i read only line 100 from a file? would be a decent solution
jackjackdripper has joined #ruby
passcod has joined #ruby
<bigmac__> with out reading the hole file
<Ox0dea> bigmac__: You'll have to read the first 100.
<bigmac__> i see...
tkuchiki has quit [Remote host closed the connection]
<baweaver> bigmac__: it's whole, not hole
<bigmac__> lol
<Ox0dea> /dev/null is arguably a hole file.
EllisTAA has joined #ruby
<Ox0dea> bigmac__: f = File.open('foo'); 99.times { f.gets }; hundredth_line = f.gets
<baweaver> Ox0dea: you know what I meant :P
<bigmac__> so, trying to read line 1 million, would take a really long time lol
<Ox0dea> > Depends on the size of the chair.
<baweaver> if you're reading millions of lines in Ruby, you're doing something wrong
<bigmac__> millions of array
<eam> reading 80 megabytes is wrong?
<baweaver> 80M, probably not
<EllisTAA> i’m trying to get better @ recursion. i tried to write a method that searches for connections between ppl in groups. can someone offer feedback? https://gist.github.com/ellismarte/0cdf222c317084abc493
<baweaver> but if it gets larger you're in trouble
<eam> baweaver: dunno, ruby scales pretty well
<bigmac__> im working with very large stuff
<bigmac__> 2 very large => hash.repeated_permutation(x).map(&:join)
spider-mario has quit [Read error: Connection reset by peer]
<baweaver> very large is vague
<bigmac__> im trying to run side by side, almost combine together
skweek has joined #ruby
<baweaver> eam: what point do you tend to cut off on it?
<baweaver> I'd think as you approach 500+M
<bigmac__> (2**20)+(95**1)+(95**2)+(95**3)+(95**4)
<baweaver> >> (2**20)+(95**1)+(95**2)+(95**3)+(95**4)
<ruboto> baweaver # => 83365696 (https://eval.in/458932)
<bigmac__> but the string length is increasing
<baweaver> so what exactly are you trying to do?
<baweaver> you're describing a solution
<bigmac__> i have a working example but its so ugly, (the long way around)
<baweaver> that'd be a solution
<baweaver> what's the base problem?
<bigmac__> very stressful when it gets past a size
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bigmac__> the out put im trying to generate, is to stressful... i can make a small scale example
workmad3 has quit [Ping timeout: 260 seconds]
<baweaver> what's the input
<bigmac__> >>puts 'site'
<ruboto> bigmac__ # => site ...check link for more (https://eval.in/458936)
Contigi has joined #ruby
cyle has joined #ruby
<baweaver> can you describe the problem in a sentence?
<baweaver> not the output, not the method of generation, not an example. Just the problem itself
niemcu has joined #ruby
rubyaw has joined #ruby
rubyaw has quit [Client Quit]
konr has quit [Quit: Connection closed for inactivity]
vigintas has quit [Ping timeout: 260 seconds]
<bigmac__> there is a part in my loop that is ran over and over, then multiplies it self then becomes unstable...
<baweaver> bigmac__: what is the issue you are trying to solve with this code?
<bigmac__> like trying to read array[100000000]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> the problem that you are attempting to code for
bollullera has left #ruby [#ruby]
<bigmac__> its just for fun
<baweaver> that's great
<baweaver> but what are you trying to do?
<baweaver> you keep telling me parts of your solution
<Ox0dea> bigmac__: Is this still to do with strings of binary?
<bigmac__> yes
<bigmac__> just part of my examples
<baweaver> now we're getting closer to the base problem
<bigmac__> lol
pwnd_nsfw has quit [Ping timeout: 246 seconds]
<bigmac__> i think about this stuff all day
<baweaver> I can only ask so many times in so many different ways bigmac__
<bigmac__> well, sometimes its embarrassing to share my ideas,
<bigmac__> lol
<baweaver> ....so you share your solution but not the base problem?
<Ox0dea> > base problem
<Ox0dea> pelican.jpg
workmad3 has joined #ruby
<bigmac__> you guys have a way of looking at my ugly function's, and show me a much better way
<baweaver> !xy
<baweaver> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<bigmac__> i tend to take the long way to get somewhere, turns out... there is a one liner to replace my 12 lines
<bigmac__> thanks for your help... i have to go
rideh has quit [Ping timeout: 250 seconds]
<baweaver> bigmac__: next time help us help you. When we ask for something, there's a reason for it.
<bigmac__> ,-)
* baweaver sighs
bricker has quit [Ping timeout: 240 seconds]
gregoriokusowski has joined #ruby
ekinmur has joined #ruby
keen__________ has joined #ruby
bigmac__ has quit [Remote host closed the connection]
keen_________ has quit [Ping timeout: 272 seconds]
rideh has joined #ruby
<EllisTAA> for some reason i never hit lines 38 - 40 … i guess i’m using return inappropriately but im not sure how. could someone help? https://gist.github.com/ellismarte/0cdf222c317084abc493
<Radar> I guess because it's returning before that point
<Radar> time to employ some puts driven development :)
<pipework> Radar: puts, putz, whichever. :D
<baweaver> return is fairly straightforward. It returns
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> EllisTAA: Are you meaning to `break` from the iteration rather than `return` from the method for some of these `return`s I wonder?
Oog has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
<EllisTAA> havenwood: that’s what i was thinking but i thought break wouldn’t send the value back to the method that called the method recursively…
<EllisTAA> lol @ pdd
<havenwood> P-Driven Development, REPL-Driven Development, Hammock-Driven Development, it's so hard to choose...
pwnd_nsfw has joined #ruby
<EllisTAA> i guess i’m wondering, how do i get this value sent back up to the method that called it? https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L15
<Ox0dea> Drive-driven development.
<havenwood> Ox0dea: development driven-driven development
<EllisTAA> i would use return there correct?
<Ox0dea> >> def foo; loop { break 42 }; end; foo # EllisTAA
<ruboto> Ox0dea # => 42 (https://eval.in/458963)
<havenwood> ƚnɘmqolɘvɘᗡ nɘviɿᗡ-Driven Development
astrobunny has joined #ruby
<pipework> havenwood: I'm waiting for chauffeur-driven development.
<eam> baweaver: no limit - I'd switch away from ruby when I need more efficiency (can't fit in my fixed-size OS container) not necessarily due to any limit
h99h9h88 has joined #ruby
<pipework> It's kinda like pairing, but one person just says what they want done and then the other person does it while the first doesn't even really pay attention.
<eam> baweaver: I've certainly processed huge datasets in ruby before (100s of gigs)
<pipework> Maybe I just have a secret yearning for enterprise development, and I'm hiding that fact from myself.
<baweaver> I'd probably switch to JRuby at least by that point.
<baweaver> then again I get impatient
<havenwood> Matz said he was surprised to learn that Ruby was being used in supercomputing.
<eam> I mean, I've used regular old grep on datasets that big too
<pipework> eam: why no ack, ag, or sift?
<havenwood> pipework: now sift i don't know
<pipework> mmm sift
<eam> pipework: I use ag on osx where grep is terrible, but gnu grep's roughly the same speed
<pipework> havenwood: In 99% of cases: sift > ag > ack > grep
<eam> every tool has odd implementation limits
<havenwood> pipework: ooh, colors!
<pipework> And some are just slow except that one odd case where it outperforms all the otherwise fast things.
<havenwood> pipework: :D
<pipework> havenwood: Yeah!
<pipework> purty ones by default.
<eam> I use whatever's easiest in terms of my time while still being acceptably fast
<pipework> eam: sift has the easiest interface, but is also compatible with ag and ack as far as I can tell.
<pipework> havenwood: sift + parallel is great.
startupality has joined #ruby
<havenwood> pipework: i like the sound of that
* pipework loves gnu-parallel
mollusk_ has quit [Remote host closed the connection]
<baweaver> My definition of acceptable time taken is a fairly short chain
diegoaguilar has quit [Remote host closed the connection]
<eam> generally, optimizing only makes sense if you're building something repetitive (like a periodic search, or code in a query path)
<pipework> baweaver: Yet you spend hours figuring out why spark is faster and better than other things. :p
<pipework> eam: Egh, when the tool itself is more or less a swap-in with a few small changes you get used to after a couple times using it, it's just better.
<baweaver> ^
<eam> well sure
<pipework> Investment of switching from grep to sift is small, but larger than ag or ack to sift which is really small.
<eam> but the benefit of switching is also small
<eam> (unless you're on a system with a crippled grep)
<pipework> My time and happiness with the speed in which my tools perform is something I value greatly.
<eam> yeah but gnu grep is roughly as fast as ag
<pipework> And sift is much faster than both!
<havenwood> lack of portability of grep flags is an argument for fleeing itself if portability is needed
Nanuq has quit [Ping timeout: 264 seconds]
<eam> havenwood: all the world's a gnu
<havenwood> eam: gnoooo
bricker has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
<eam> what's sift doing to get that much faster?
<pipework> I have no idea at all, I'm assuming human sacrifice.
Igorshp has quit [Remote host closed the connection]
<pipework> At the bottom of the page: https://sift-tool.org/samples.html
startupality has quit [Quit: startupality]
maletor has quit [Quit: Computer has gone to sleep.]
<pipework> I mean, just look at that interface difference! And supporting sifting through gzip'd files? Awesome.
<eam> well zgrep
<pipework> Yeah, but how much faster do you think you'd arrive at the right invocation of sift vs grep and zgrep?
<eam> I wonder if it does more than just zcat|match
<pipework> Good stuff, that sift.
<eam> a long time ago I had an idea to translate the pattern through the huffman encoding to match files without decompression
<havenwood> pipework: Time to port it to Crystal! :P
<eam> no sure if that's viable
h99h9h88_ has joined #ruby
<eam> but if it is, the speedup would be gigantic
PaulCapestany has quit [Quit: .]
jackjackdripper has quit [Quit: Leaving.]
<pipework> havenwood: I'll have to keep learning and contributing to the documentation first!
PaulCapestany has joined #ruby
ibouvousaime_ has quit [Ping timeout: 256 seconds]
<eam> so sift is threaded
<eam> seems to be the major benefit
<eam> marginally faster than grep -r from what I can see
juanpablo__ has joined #ruby
<pipework> Could compare against `find . -type f | parallel -j+1 grep mypattern`
icarus has quit [Quit: leaving]
<eam> their sample data looks like it's benched against BSD grep, which is known terrible
<eam> parallelism within one large file, that's kinda cool
juanpablo__ has quit [Ping timeout: 250 seconds]
<eam> EllisTAA: re: https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L15, I don't follow the entire method you've got, but it looks like you're returning paths_between_poi_and_target right?
<eam> so you'd shovel onto that?
devoldmx_ has joined #ruby
djellemah_ has joined #ruby
joneshf-laptop has quit [Ping timeout: 265 seconds]
<eam> pipework: lol, gnu grep --mmap beats sift
dopamean_ has quit [Ping timeout: 250 seconds]
<pipework> eam: Will that work sanely with large files?
<eam> absolutely
Oog has quit []
<eam> main trouble with mmap is with files which shrink while you're grepping
d34th4ck3r has joined #ruby
willardg has joined #ruby
<EllisTAA> eam: i’m doing that on line 25 … but for some reason i dont think my method is doing what i want it to do. i’m trying to debug it right now … kinda confusing but i think i might be returning or breaking when i shouldn’t be https://gist.github.com/ellismarte/0cdf222c317084abc493#file-6degreesofbacon-rb-L25
<eam> address space is cheap, the VM will map pages in and out as needed (it's doing that in the filesystem cache anyway on big search jobs)
djellemah has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
<pipework> eam: would mmap be usable for really large datasets?
willardg has quit [Client Quit]
<eam> pipework: yeah, I've worked a bunch with mmap'd huge k/v stores (tens of gigs) based on https://github.com/yahoo/mdbm
<eam> you can mmap essentially any file smaller than your pointer size (modulo reserved address space)
<eam> and even then, you'd just do multiple maps if you needed larger -- say if you're on 32bit
<eam> you'd mmap every 2G or so
<EllisTAA> it actually might be working …
<pipework> So I could safely just always use the mmap option with grep?
h99h9h88_ has quit [Remote host closed the connection]
<eam> pipework: as long as you don't mind an occasional segv if a file gets truncated while you're interacting with it
<eam> ;)
jgpawletko has joined #ruby
l_tonz has joined #ruby
symm- has joined #ruby
aep has quit [Ping timeout: 240 seconds]
<eam> calling read() after a truncate just returns nothing -- but addressing memory after a file shrinks turns into an illegal access
<eam> totally fine on static files though
<eam> (and even then, if a file truncates while you grep it you're gonna get BS anyway)
<eam> btw when I say faster it's less than 1% soooo just use sift if you like it
<eam> kinda amazing that a go app is getting that kind of speed to be honest
EllisTAA has quit [Quit: EllisTAA]
knamehost has joined #ruby
craysiii has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 268 seconds]
n008f4g_ has quit [Ping timeout: 250 seconds]
EllisTAA has joined #ruby
rshetty has joined #ruby
<pipework> I'll look more into that mmap thing. I mean, I know grep options. sift has nicer interface if I were to learn either grep or sift from scratch.
raazdaan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<eam> I bet if someone added the parallelism into gnu grep it'd get significantly faster than sift -- but unless it's >2x I don't care much
txdv has left #ruby [#ruby]
<eam> ... I take that back, most of sift is just Cgo and inlined C
northfurr has quit [Quit: northfurr]
marr has quit [Ping timeout: 250 seconds]
<havenwood> it seems i usually end up turning to mdfind or locate the second grep and friends are slow
<pipework> eam: Whale, in-file parallelism or would gnu parallel be enough?
<eam> well, a tantalizing thought while it lasted
<eam> pipework: I suspect adding parallelism by any means would do it
jdawgaz has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
<pipework> eam: You're sure you didn't see any human sacrifice in the source?
<eam> the details probably matter less as the dataset grows in size
blackmesa has quit [Quit: WeeChat 1.3]
<eam> maybe some day safe languages will be fast *eyes rust*
bricker has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
raazdaan has joined #ruby
<pipework> life is such
RobertBirnie has joined #ruby
mag42c has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
s00pcan has quit [Ping timeout: 272 seconds]
Thomas-0725 has joined #ruby
cyle has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
EmeraldExplorer has joined #ruby
inteq has joined #ruby
DenSchub has quit [Read error: Connection reset by peer]
DenSchub has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hxegon has quit [Ping timeout: 252 seconds]
Thomas-0725 has quit [Quit: Textual IRC Client: www.textualapp.com]
aspiers has joined #ruby
alexdunne has joined #ruby
hxegon has joined #ruby
rshetty has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
mois3x has quit [Quit: mois3x]
tmtwd has joined #ruby
alexdunne has quit [Ping timeout: 255 seconds]
lacrymology has joined #ruby
l_tonz has quit [Remote host closed the connection]
Puck6633 has quit [Read error: Connection reset by peer]
Puck6633 has joined #ruby
jdawgaz has joined #ruby
dopamean_ has joined #ruby
quazimodo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Skull0Inc has joined #ruby
ledestin has joined #ruby
stardiviner has joined #ruby
SamGerber has joined #ruby
ekinmur has quit [Quit: Textual IRC Client: www.textualapp.com]
SamGerber has quit [Client Quit]
ElFerna has joined #ruby
tkuchiki has joined #ruby
ekinmur has joined #ruby
tubuliferous_ has joined #ruby
ElFerna has quit [Client Quit]
hughjasss has quit [Ping timeout: 246 seconds]
hughjasss has joined #ruby
Igorshp has joined #ruby
towski_ has quit [Remote host closed the connection]
maletor has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
davedev24 has joined #ruby
devbug_ has joined #ruby
diegoaguilar has joined #ruby
AccordLTN has quit []
h99h9h88 has joined #ruby
ElFerna has joined #ruby
alexdunne has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
raazdaan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aspiers has quit [Ping timeout: 268 seconds]
ElFerna has quit [Client Quit]
alexdunne has quit [Ping timeout: 240 seconds]
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
hxegon has quit [Quit: leaving]
rbennacer has joined #ruby
cmoney has quit [Remote host closed the connection]
jdawgaz has quit [Read error: Connection reset by peer]
Jardayn has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
juanpablo__ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
rethi has quit [Disconnected by services]
adam| is now known as adam12
juanpablo__ has quit [Ping timeout: 252 seconds]
ElFerna has joined #ruby
l_tonz has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
AccordLTN has joined #ruby
mary5030 has joined #ruby
Oatmeal has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
jdawgaz has joined #ruby
leafybasil has quit [Remote host closed the connection]
mary5030 has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
dorei has quit []
roxtrongo has joined #ruby
ekinmur has quit [Quit: Textual IRC Client: www.textualapp.com]
AccordLTN has quit []
shortdudey123 has quit [Max SendQ exceeded]
shortdudey123 has joined #ruby
jdawgaz has quit [Read error: Connection reset by peer]
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lacrymology has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
Rickmasta has joined #ruby
rbennacer has quit [Remote host closed the connection]
_djbkd has quit [Quit: My people need me...]
leafybasil has quit [Remote host closed the connection]
AccordLTN has joined #ruby
Oatmeal has joined #ruby
m3_del has joined #ruby
mary5030 has quit [Remote host closed the connection]
ddv has quit [Ping timeout: 250 seconds]
axisys has joined #ruby
mary5030 has joined #ruby
ddv has joined #ruby
maletor has joined #ruby
ziprar has quit [Quit: Leaving]
mag42c has quit [Quit: mag42c]
h99h9h88 has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 246 seconds]
rshetty has joined #ruby
kp666 has quit [Read error: Connection reset by peer]
Oatmeal has quit [Max SendQ exceeded]
gregoriokusowski has quit [Quit: gregoriokusowski]
h99h9h88 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
c_nick has joined #ruby
swgillespie has joined #ruby
DiCablo has joined #ruby
maletor has joined #ruby
RegulationD has joined #ruby
DiCablo has left #ruby [#ruby]
GnuYawk has joined #ruby
cmoney has joined #ruby
Oatmeal has joined #ruby
dc_ has joined #ruby
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
ss_much has quit [Quit: Connection closed for inactivity]
jgpawletko has quit [Quit: jgpawletko]
RegulationD has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 264 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick> i found in ruby the Constants and Static Variables are nearly the same
Oatmeal has quit [Ping timeout: 240 seconds]
<c_nick> u can reinitialize the constants and all it does is throw up a warning while Static by definition needs to have the capability to reinitialize just wont require an object / class instance
moeabdol has joined #ruby
finisherr has joined #ruby
Nanuq has joined #ruby
<Ox0dea> c_nick: Could you give an example of your interpretation of "static variable"?
rshetty has quit [Remote host closed the connection]
Bloomer has joined #ruby
aspiers has joined #ruby
baweaver has joined #ruby
<c_nick> static as in like C++ - class variables
FungalRaincloud has joined #ruby
Oatmeal has joined #ruby
<c_nick> so in ruby thats @@
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
shinenelson has quit [Quit: Connection closed for inactivity]
<Ox0dea> Ah, yeah, that's probably the best analogy.
<c_nick> Ox0dea: your scaring me now :P
<Ox0dea> Hm?
favadi has joined #ruby
<Ox0dea> "wont require an object" threw me a little.
_blizzy_ has quit [Ping timeout: 240 seconds]
<Ox0dea> In a sense, class variables are instance variables on singleton classes, but we can't instantiate those, so the relationship doesn't actually exist.
arescorpio has joined #ruby
<c_nick> Ox0dea: yes.
SenpaiSilver has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Oatmeal has quit [Ping timeout: 240 seconds]
<Ox0dea> c_nick: How do you figure class variables "need to have the capability to reinitialize" by definition?
roxtrongo has quit [Remote host closed the connection]
nycjv321 has joined #ruby
DiCablo has joined #ruby
jenrzzz has joined #ruby
avahey has joined #ruby
<Ox0dea> There must be a good reason for that signature, but it's shitting in my cereal right now.
<c_nick> Ox0dea: for me a constant is something i cannot modify or should not modify which a class variable can be re assigned different values if required. I will use a class variable for URLS (which can change later on) but a constant would be like a REGEX or something similar (though this may change too but seldom chances)
solocshaw has quit [Ping timeout: 240 seconds]
nsuke has quit [Read error: Connection reset by peer]
<Ox0dea> c_nick: Sure, that's a decent grokking of the thing, but your wording was a little strange.
moeabdol has quit [Quit: WeeChat 1.3]
benlieb has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
<c_nick> hehe yeah i type in a hurry i should read before pressing enter :D
gregf has quit [Quit: WeeChat 1.3]
<eam> a constant "shouldn't change" in ruby just like a constant "shouldn't change" in C++
<eam> in that it's possible in both, though ill-advised :)
<Ox0dea> >> ARGV << 42 # Oh, hey, no warning.
<ruboto> Ox0dea # => [42] (https://eval.in/458984)
Oatmeal has joined #ruby
Oatmeal has quit [Max SendQ exceeded]
gregf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<c_nick> i thought it did pop out a warning
<c_nick> perhaps ruby version specific
<eam> warning on assignment, not on modifying the value it references
krz has joined #ruby
l_tonz has joined #ruby
roxtrongo has joined #ruby
<eam> >> [ARGV.object_id, (ARGV << 42; ARGV.object_id)]
<ruboto> eam # => [539583730, 539583730] (https://eval.in/458985)
Feyn has joined #ruby
c_nick has quit [Quit: bbl]
dc_ has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit []
arooni has quit [Ping timeout: 246 seconds]
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
darkf has joined #ruby
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cmoney has quit [Remote host closed the connection]
FungalRaincloud has left #ruby [#ruby]
FungalRaincloud has joined #ruby
hmsimha_ has joined #ruby
raazdaan has joined #ruby
raazdaan has quit [Client Quit]
<devbug_> does a dsl for defining objects + relationships (i.e. collections, collections-thru, etc.) exist completly detached from the idea of databases?
<devbug_> to rephrase, I want to compose objects with properties and in hierarchies to stay DRY
<devbug_> my deep trawls have yet to produce anything remotely similar to what I described
<devbug_> the closest, which is still far away, is datamapper--if that makes any sense
segy has joined #ruby
DiCablo has joined #ruby
CBX has joined #ruby
arooni has joined #ruby
fedexo has joined #ruby
leafybasil has joined #ruby
<Ox0dea> devbug_: How close does ECS get?
CCBX has joined #ruby
Igorshp has quit [Ping timeout: 250 seconds]
Skull0Inc has quit [Quit: Skull0Inc]
d34th4ck3r has quit [Quit: zzz]
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
symm- has quit [Ping timeout: 260 seconds]
mordocai has joined #ruby
CBX has quit [Ping timeout: 255 seconds]
kp666 has joined #ruby
leafybasil has quit [Ping timeout: 256 seconds]
CCBX has quit [Ping timeout: 265 seconds]
knamehost has quit [Remote host closed the connection]
ivanskie has joined #ruby
<devbug_> Ox0dea: as in an entity component system?
jmonreal_ has joined #ruby
sphex has joined #ruby
<Ox0dea> devbug_: Yes, that one.
<devbug_> No, not close.
<devbug_> Think, like:
sphex_ has quit [Read error: Connection reset by peer]
<devbug_> <gisting>
<jmonreal_> when using the json module, how can I tell JSON.parse to take the nil as 0 ?
<Ox0dea> jmonreal_: You can't; you'll have to modify the resultant Hash.
The_Phoenix has joined #ruby
<jmonreal_> like if value equal null then zero
<jmonreal_> that?
finisherr has quit [Quit: finisherr]
Antiarc has quit [Ping timeout: 256 seconds]
<jmonreal_> Ox0dea: ^
<Ox0dea> >> require 'json'; JSON.parse('{"a": null, "b": null}').map { |k, v| [k, v.nil? ? 0 : v] }.to_h # jmonreal_
<ruboto> Ox0dea # => {"a"=>0, "b"=>0} (https://eval.in/458986)
<Ox0dea> That'll only work for the first level, though; you'll need to "deep map" if your JSON is nested.
mary5030 has joined #ruby
ruby-lang508 has quit [Ping timeout: 246 seconds]
krz has quit [Quit: WeeChat 1.2]
poguez_ has quit [Quit: Connection closed for inactivity]
diegoaguilar has quit [Remote host closed the connection]
<devbug_> Ox0dea: think some sort of schema-type thing
<Ox0dea> A database, you say?
axiomatic_345 has joined #ruby
<devbug_> Not a database.
rshetty has joined #ruby
<devbug_> Completely detached from the idea of that.
<devbug_> I'm refactoring Ryb, and this is exactly what I need
<devbug_> an ORM-like DSL to keep my code dry
<Ox0dea> Looks delicious.
<devbug_> does this not exist?!
axiomatic_345 has quit [Client Quit]
rshetty has quit [Remote host closed the connection]
<devbug_> well, i guess I'm going to write it then
mary5030 has quit [Ping timeout: 260 seconds]
<Ox0dea> devbug_: What're you going to call it?
<devbug_> Ox0dea: pour
<devbug_> you know, you pour concrete
<Ox0dea> devbug_: No, this new paradigm you've discovered.
<devbug_> Is this really a paradigm?
Antiarc has joined #ruby
<devbug_> I'm open to suggestions o_o
<Ox0dea> What did that bush ever do to you?
rshetty has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
CJKinni_ has quit [Ping timeout: 268 seconds]
m3_del has quit [Remote host closed the connection]
<devbug_> wat
m3_del has joined #ruby
snath has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
rshetty has quit [Ping timeout: 265 seconds]
Coldblackice has quit [Ping timeout: 255 seconds]
mordocai has quit [Remote host closed the connection]
maletor has joined #ruby
m3_del has quit [Ping timeout: 265 seconds]
subscope has joined #ruby
houhoulis has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
mordocai has joined #ruby
astrobunny has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
gener1c has joined #ruby
alexdunne has joined #ruby
<Ox0dea> What fundamental misconception do I need disabused of? https://eval.in/458987
Eiam_ has joined #ruby
dc_ has joined #ruby
m3_del has joined #ruby
snath has left #ruby ["Leaving"]
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
gener1c_ has quit [Ping timeout: 255 seconds]
<agent_white> disabused... that's fancy talk, city boy.
<agent_white> I'll keep it.
juanpablo__ has quit [Ping timeout: 272 seconds]
alexdunne has quit [Ping timeout: 240 seconds]
cmoney has joined #ruby
braincrash has quit [Quit: bye bye]
<Ox0dea> Says the feller what uses a nominative comma on the Internet.
m3_del has quit [Client Quit]
beast has quit [Read error: Connection reset by peer]
musou has quit [Quit: Connection closed for inactivity]
<devbug_> now i get _why
beast has joined #ruby
rshetty has joined #ruby
devoldmx has joined #ruby
l_tonz has quit [Remote host closed the connection]
<agent_white> devbug_: You realized the battlefield named nil? :)
<agent_white> s/realized/found/
<devbug_> Woah, we're gettin' meta.
l_tonz has joined #ruby
benaiah has left #ruby ["WeeChat 0.4.2"]
joneshf-laptop has joined #ruby
<devbug_> Ox0dea: I contend that this is not a new paradigm.
braincrash has joined #ruby
cmoney has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
l_tonz has quit [Remote host closed the connection]
cmoney has joined #ruby
l_tonz has joined #ruby
freerobby has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
h99h9h88 has joined #ruby
jmonreal_ has quit [Quit: leaving]
rshetty has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
astrobunny has joined #ruby
gix has quit [Ping timeout: 250 seconds]
minimalism has joined #ruby
tlaxkit has quit [Quit: ¡Hasta luego!]
nertzy has joined #ruby
Cyther_ has quit [Read error: Connection reset by peer]
yashinbasement has joined #ruby
nycjv321 has quit [Read error: Connection reset by peer]
gix has joined #ruby
Igorshp has joined #ruby
terminalrecluse has joined #ruby
pdoherty has quit [Ping timeout: 252 seconds]
craysiii has joined #ruby
mordocai has quit [Remote host closed the connection]
mordocai has joined #ruby
houhoulis has quit [Remote host closed the connection]
FungalRaincloud has quit [Quit: Leaving.]
d34th4ck3r has joined #ruby
duncannz has joined #ruby
rshetty has joined #ruby
bMalum has joined #ruby
mordocai has quit [Remote host closed the connection]
sosorry has joined #ruby
RegulationD has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
aspiers has quit [Ping timeout: 268 seconds]
h99h9h88 has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fedexo has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tombk has joined #ruby
<Tombk> :)
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
favadi has joined #ruby
leafybasil has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tombk has left #ruby [#ruby]
l_tonz has quit [Remote host closed the connection]
druonysus has quit [Quit: Konversation terminated!]
jatb has quit [Quit: oops]
jatb has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
sosorry is now known as carving
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
avahey has quit [Quit: Connection closed for inactivity]
devoldmx has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
nemo_ has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
rshetty_ has joined #ruby
conrfrmn has quit [Ping timeout: 244 seconds]
bhorn1 has quit [Ping timeout: 244 seconds]
sshuff|gone has quit [Ping timeout: 244 seconds]
slash_nick has quit [Ping timeout: 244 seconds]
Lorn has quit [Ping timeout: 256 seconds]
rshetty_ has quit [Remote host closed the connection]
slash_nick has joined #ruby
cscheib has quit [Ping timeout: 256 seconds]
ericwood_ has quit [Ping timeout: 268 seconds]
sparr has quit [Ping timeout: 256 seconds]
tmtwd has quit [Ping timeout: 260 seconds]
bhorn1|away has joined #ruby
bhorn1|away is now known as bhorn1
rshetty has quit [Ping timeout: 268 seconds]
craysiii has quit [Quit: Leaving.]
towski_ has joined #ruby
sshuff|gone has joined #ruby
ericwood has joined #ruby
conrfrmn has joined #ruby
rshetty has joined #ruby
Lorn has joined #ruby
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
sparr has joined #ruby
diegoaguilar has quit [Ping timeout: 252 seconds]
rshetty has quit [Remote host closed the connection]
towski_ has quit [Ping timeout: 265 seconds]
rshetty has joined #ruby
arooni has quit [Ping timeout: 240 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
haxrbyte_ has quit [Ping timeout: 260 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
towski_ has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
GeissT has quit [Ping timeout: 252 seconds]
arescorpio has quit [Quit: Leaving.]
rshetty_ has joined #ruby
yardenbar has quit [Ping timeout: 272 seconds]
SylarRuby has joined #ruby
dionysus69 has joined #ruby
devbug_ has quit [Remote host closed the connection]
devbug has joined #ruby
maletor has joined #ruby
favadi has joined #ruby
swgillespie has joined #ruby
stardiviner has quit [Ping timeout: 250 seconds]
juanpablo__ has joined #ruby
swgillespie has quit [Client Quit]
moeabdol has joined #ruby
cmoney has quit []
juanpablo__ has quit [Ping timeout: 252 seconds]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
swgillespie has joined #ruby
astrobunny has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
astrobunny has joined #ruby
arup_r has joined #ruby
leafybasil has joined #ruby
alexdunne has joined #ruby
<Ox0dea> I don't normally post pictures of code, but this is scarcely deserving of the title. http://i.imgur.com/94jou4v.png
<Ox0dea> baweaver: I went too far this time.
EllisTAA has quit [Quit: EllisTAA]
<baweaver> oi, you're not going to make me type that all are you?
jenrzzz has quit [Ping timeout: 264 seconds]
leafybasil has quit [Ping timeout: 255 seconds]
<Ox0dea> Can you imagine?
alexdunne has quit [Ping timeout: 264 seconds]
roxtrongo has quit [Ping timeout: 240 seconds]
<baweaver> ....you didn't
tlarevo has joined #ruby
towski_ has quit [Remote host closed the connection]
BTRE has quit [Ping timeout: 240 seconds]
<baweaver> you made a sinatra app
<Ox0dea> I made a Sinatra app.
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 41.0.2/20151014143721]]
yashinbasement has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
Oog has joined #ruby
roxtrongo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<agent_white> Ox0dea: Is it as pretty as they say?
<Ox0dea> https://eval.in/458987 made me briefly consider using something else, but I found a loophole easily enough.
<Ox0dea> agent_white: Pardon?
maletor has joined #ruby
<agent_white> Ox0dea: I've just never used Sinatra... heard good things. :)
<Ox0dea> agent_white: I think you missed the prelude to this exchange. :P
<baweaver> So you derived 60 and 1 so far. Probably ASCII again
<Ox0dea> baweaver: Not a good start.
<baweaver> how do you figure?
<agent_white> Ox0dea: Probably. I'll... find one of the exits... /me bumps into folks
jackjackdripper has joined #ruby
<Ox0dea> >> ___=(_=' '=~/$/)*_+_+_/((__=$$/$$)+__); [_, __, ___] # baweaver
<ruboto> Ox0dea # => [10, 1, 115] (https://eval.in/459024)
jackjackdripper has quit [Client Quit]
mclee_ has quit [Ping timeout: 255 seconds]
<baweaver> >> _=' '=~/$/
<ruboto> baweaver # => 10 (https://eval.in/459025)
<Ox0dea> agent_white: Sinatra is usually a treat to use, but not the way I've done this time around.
rshetty_ has quit [Remote host closed the connection]
<Ox0dea> Click the links for a laugh?
<baweaver> >> 10 * 10 + 10
<ruboto> baweaver # => 110 (https://eval.in/459026)
kerunaru has joined #ruby
l_tonz has joined #ruby
djellemah_ is now known as djellemah
skade has joined #ruby
rshetty has joined #ruby
<baweaver> how is it 115?
towski_ has joined #ruby
<Ox0dea> >> 10 * 10 + 10 + 10 / (1 + 1)
<ruboto> Ox0dea # => 115 (https://eval.in/459028)
l_tonz has quit [Remote host closed the connection]
<baweaver> >> 10 * 10 + 10 + 10
<ruboto> baweaver # => 120 (https://eval.in/459029)
l_tonz has joined #ruby
<baweaver> wait what?
<baweaver> how
tmtwd has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> BODMAS?
<baweaver> are parens evaluated out of order or something or am I just too asleep right now?
l_tonz has quit [Remote host closed the connection]
<Radar> PEMDAS, maybe.
<baweaver> PEMDAS
<Ox0dea> Only one of the parens is for grouping; the other is to capture an assignment.
to_json has quit [Quit: Leaving.]
rshetty has quit [Remote host closed the connection]
<baweaver> it's still grouped though
<baweaver> >> (1 + 1)
<ruboto> baweaver # => 2 (https://eval.in/459031)
BTRE has joined #ruby
<Ox0dea> Holy shit!
mclee_ has joined #ruby
* baweaver is confused
<Radar> >> 10 * 10 + 10 + (10 / (1 + 1))
<ruboto> Radar # => 115 (https://eval.in/459032)
<Radar> Does that help your brain?
xaa has joined #ruby
<baweaver> oh
<baweaver> derp
<Radar> (100) + (10) + (5)
<baweaver> div
<baweaver> yep
<baweaver> tired
<Radar> me too
towski_ has quit [Ping timeout: 244 seconds]
<Radar> almost hometime
l_tonz has joined #ruby
<Ox0dea> baweaver: Well, don't go running it and spoil the surprise. >:)
chrissonar has joined #ruby
<agent_white> baweaver: You must be. I was thinking about when we were talking about 1 == 1 == 1... 15 or so hours ago. Two days of no sleep is probably not good.
<baweaver> it'll take me a while
<Ox0dea> There's... considerable weirdness going on in there.
<Ox0dea> I almost shit when I realized I needed a W.
<Ox0dea> But then I just tacked it on, shifted some thangs around, and all was well.
dhjondoh has joined #ruby
tlarevo has quit [Remote host closed the connection]
last_staff has joined #ruby
tlarevo has joined #ruby
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
nemo__ has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
nemo_ has quit [Ping timeout: 268 seconds]
<baweaver> send as a callable proc
<Ox0dea> Praised (blamed?) be Mon_Ouie.
subscope has joined #ruby
maletor has quit [Ping timeout: 256 seconds]
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
last_staff has quit [Quit: last_staff]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> some type of odd send table
<Ox0dea> I thought you liked Lisp?
<baweaver> I get where it's headed a bit
naftilos76 has joined #ruby
skade has quit [Ping timeout: 255 seconds]
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
tmtwd has quit [Ping timeout: 260 seconds]
<baweaver> so blank string is like a kernel call?
l_tonz has quit [Ping timeout: 250 seconds]
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
<Ox0dea> baweaver: Aye, Kernel methods are private methods on Object.
<Ox0dea> >> ''.send :rand
<ruboto> Ox0dea # => 0.2306887606376492 (https://eval.in/459039)
DoubleMalt has joined #ruby
RegulationD has joined #ruby
yardenbar has joined #ruby
<baweaver> aliasing ___ to get
rshetty has joined #ruby
<Ox0dea> I didn't want to have to. :<
<baweaver> >> $.
<ruboto> baweaver # => 0 (https://eval.in/459040)
Musashi007 has joined #ruby
<Ox0dea> I also hoped that #not_found being the only route would work as a catch-all without having to explicitly redirect, but it's good that it doesn't.
<baweaver> at the routes
rshetty has quit [Remote host closed the connection]
<Ox0dea> > routes
<baweaver> well, GET /
skade has joined #ruby
tagrudev has joined #ruby
yfeldblum has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
<Ox0dea> The original marble did have several routes, but I don't mind my food touching.
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rshetty_ has joined #ruby
<baweaver> getting the params from the binding receiver
dionysus69 has quit [Quit: dionysus69]
<baweaver> not sure about the :_
last_staff has joined #ruby
<Ox0dea> That'd be the param.
<Ox0dea> You're dangerously good at this...
l_tonz has joined #ruby
Pupp3tm4st3r has joined #ruby
<baweaver> send delete_at to the array with true with param as an integer
<baweaver> (not sure what that does yet)
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
kerunaru has joined #ruby
<Ox0dea> Not sure whence came `true`.
<baweaver> $__
<baweaver> [true]
<baweaver> isn't $. 0?
ta has quit [Remote host closed the connection]
<baweaver> ...did I do that backwards too
<Ox0dea> $. is 0 where you're reading, yes.
<baweaver> so an array of false
skade has quit [Read error: Connection reset by peer]
rshetty_ has quit [Remote host closed the connection]
skade has joined #ruby
<baweaver> so if the param is 0 it does something, otherwise redirects back to root with more items
<baweaver> or something like that
diegoaguilar has joined #ruby
shpoont has joined #ruby
amclain has quit [Quit: Leaving]
<baweaver> https://gist.github.com/baweaver/cc0b8aea562366e18bc3 - well, got a good ways through
<baweaver> but sleepy time
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
l_tonz has quit [Remote host closed the connection]
<Ox0dea> baweaver: You're so close!
<baweaver> if there are params do something with them, else what I haven't gotten to yet.
n0xff has left #ruby [#ruby]
<Ox0dea> eval.in's syntax highlighter went crazy; you've got the same code ~3 times.
<baweaver> did it?
* baweaver shrugs
karapetyan has joined #ruby
<baweaver> I'll clean it up later/
<Ox0dea> Well, it'd be impolite to finish the race for you, but nor can I congratulate you at the penultimate turn.
<Ox0dea> Really, though, you've not lost your touch.
duncannz has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
pu22l3r_ has joined #ruby
codecop has joined #ruby
Soda has joined #ruby
duncannz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
benlieb has quit [Quit: benlieb]
rshetty has joined #ruby
alexdunne has joined #ruby
benlieb has joined #ruby
janelleb has joined #ruby
pu22l3r has quit [Ping timeout: 246 seconds]
jamesaxl|2 has quit [Ping timeout: 246 seconds]
devoldmx has quit [Read error: Connection reset by peer]
<baweaver> browser crash of some sort?
devoldmx has joined #ruby
<baweaver> you're redirecting with a form input that autofocuses, but past there I'd need to think more.
<baweaver> and definitely too tired to get that right
<baweaver> seems like some syntax errors too
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> you had a line break in parens towards the end
VeryBewitching has quit [Quit: Konversation terminated!]
alexdunne has quit [Ping timeout: 246 seconds]
<Ox0dea> Line breaks in parens are fine.
rshetty has quit [Remote host closed the connection]
Pupp3tm4_ has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
<baweaver> updated gist to progress
<baweaver> 'night
<Ox0dea> Au revoir.
baweaver has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 272 seconds]
pepperbreath has left #ruby [#ruby]
Pupp3tm4st3r has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
User458764 has joined #ruby
johnny56 has quit [Remote host closed the connection]
johnny56 has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
juanpablo__ has joined #ruby
tlarevo has left #ruby [#ruby]
Oog has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
rshetty has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
juanpablo__ has quit [Ping timeout: 268 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheHodge has joined #ruby
nemo_ has joined #ruby
trautwein has joined #ruby
Pumukel has joined #ruby
nemo__ has quit [Ping timeout: 246 seconds]
dopamean_ has quit [Ping timeout: 240 seconds]
devbug_ has joined #ruby
sagax has quit [Ping timeout: 260 seconds]
aganov has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
jas02 has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
roxtrongo has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
matp_ has joined #ruby
matp has quit [Ping timeout: 264 seconds]
rshetty has quit [Remote host closed the connection]
tujv has joined #ruby
aufi has joined #ruby
dionysus69 has joined #ruby
Feyn has quit [Quit: Leaving]
fuukin_cuunt has joined #ruby
<fuukin_cuunt> hi
<Ox0dea> Everything okay?
ta has joined #ruby
<apeiros> fuukin_cuunt: please change your nick.
l_tonz has joined #ruby
fuukin_cuunt is now known as fuukin_NlGGER
<fuukin_NlGGER> better?
<apeiros> !ban fuukin_NlGGER no
<apeiros> !ban fuukin_NlGGER !P no
fuukin_NlGGER was banned on #ruby by ChanServ [fuukin_NlGGER!*@*]
fuukin_NlGGER was kicked from #ruby by ChanServ [Banned: no]
dionysus69 has quit [Ping timeout: 272 seconds]
quazimodo has quit [Ping timeout: 264 seconds]
nemo_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
tujv has quit [Quit: Leaving...]
benlieb has quit [Quit: benlieb]
TomyWork has joined #ruby
skade has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
SOLDIERz has joined #ruby
devbug_ has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
leafybasil has joined #ruby
rshetty has quit [Remote host closed the connection]
lady3bean has quit [Quit: ZNC - http://znc.in]
gnarf has quit [Quit: ZNC - http://znc.in]
Pupp3tm4_ has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
niemcu has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
SCHAAP137 has joined #ruby
big|bad|wolf has joined #ruby
artmann has quit [Quit: http://quassel-irc.org - Chatta smidigt. Överallt.]
DrCode has quit [Ping timeout: 246 seconds]
purplexed- has joined #ruby
niemcu has quit [Ping timeout: 250 seconds]
agent_white has quit [Quit: passinout]
matp_ is now known as matp
ruurd has joined #ruby
allomov has joined #ruby
Musashi007 has joined #ruby
rshetty has joined #ruby
htmldrum has quit [Ping timeout: 265 seconds]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
johnny56 has quit [Quit: WeeChat 1.4-dev]
shinenelson has joined #ruby
ivanskie has joined #ruby
michae has joined #ruby
timonv has joined #ruby
solars has joined #ruby
howdoi has joined #ruby
dionysus69 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
rshetty has quit [Remote host closed the connection]
johnny56 has joined #ruby
DoubleMalt has joined #ruby
RegulationD has joined #ruby
<adaedra> Bonjour
<`derpy> moin
Musashi007 has joined #ruby
<adaedra> Ah, I forgot this :D
nemo_ has joined #ruby
<apeiros> lol
<apeiros> Bonjour
<`derpy> moin
<apeiros> I see…
<adaedra> I'll remove it, that was not supposed to stay :D
<apeiros> IMO it's fine. up to you :)
kedare has joined #ruby
mgorbach has quit [Ping timeout: 246 seconds]
skade has joined #ruby
<adaedra> I'll see if it gets old or abused
<adaedra> Ugh, I wanted to work on so much things yesterday I ended doing nothing.
RegulationD has quit [Ping timeout: 260 seconds]
mgorbach has joined #ruby
stan has joined #ruby
Peg-leg has joined #ruby
alexdunne has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
startupality has joined #ruby
felixr has joined #ruby
duncannz has joined #ruby
<Ox0dea> Where do data go when they leave the cloud?
roxtrongo has joined #ruby
davidt has quit [Ping timeout: 268 seconds]
<apeiros> they'll rain down on you
yashinbasement has joined #ruby
mark2 has joined #ruby
beauby has joined #ruby
devoldmx has quit [Remote host closed the connection]
<shevy> Ox0dea You can check-out any time you like, but you can never leave
Hounddog has joined #ruby
trash has joined #ruby
lipoqil has joined #ruby
chthon has joined #ruby
<trash> hi, how would I write this condition: if current time is between 0900 and 1700?
haxrbyte has joined #ruby
<apeiros> Time.now.between?(time_at_0900, time_at_1700)
<trash> sounds easy
<apeiros> see Time.mktime/.local to construct a time.
kimegede has joined #ruby
<trash> apeiros: Thanks
<apeiros> yw
<apeiros> the annoying part is constructing the other two times. but it's still trivial.
haxrbyte_ has joined #ruby
joonty has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> >> (9...17).include? Time.now.hour # trash
<ruboto> Ox0dea # => true (https://eval.in/459101)
<Ox0dea> I think that's more what you're going for?
<apeiros> ah, hah
<apeiros> right
Pupeno has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
<apeiros> I'd still use between?, though.
<apeiros> Time.now.hour.between?(9, 17)
<trash> Ox0dea: ha, that even works.
<adaedra> Ox0dea: that includes 17:30, though.
<apeiros> (though that's not equivalent to Ox0dea's code, it'd be equivalent to (9..17).include?, i.e. including 17)
<Ox0dea> adaedra: No, it doesn't.
<adaedra> ah, didn't see the last .
<apeiros> ah, right, you'd have to use .between?(9, 16)
<adaedra> but that exlides 17:00
<adaedra> excludes
marr has joined #ruby
l_tonz has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> There's reason enough to suspect that's what trash wants.
elaptics`away is now known as elaptics
<trash> I think technically between?(9, 16) would be the most exact. That would be 0900..1659
<Ox0dea> As would mine.
<trash> Which is what people usually mean with 9x5.
<trash> ah.
<Ox0dea> ... creates a Range that excludes the end.
<Ox0dea> >> (1...4).to_a
<ruboto> Ox0dea # => [1, 2, 3] (https://eval.in/459102)
<trash> The between is slightly easier to read though (except the 1659 thing) because of using slightly less syntactic sugar.
jcp has quit [Read error: Connection reset by peer]
jcp has joined #ruby
braidn has quit [Ping timeout: 255 seconds]
<Ox0dea> trash: It's true enough that #between? is more intention-revealing in this case, but there was no sugar in my suggestion.
Gnubie_ has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 260 seconds]
sindork_ has quit [Ping timeout: 240 seconds]
<trash> Ox0dea: Depends on whom you are asking :-) I think the (x...y) might count as syntactic sugar.
<Ox0dea> *who
<trash> (always wrong about that)
<Ox0dea> That's just how to create Ranges in Ruby, though...
<adaedra> Isn't it syntaxic sugar for Range.new ?
Gnubie_ has joined #ruby
<Ox0dea> Well, but, come on.
<ddv> syntaxic? :p
<Ox0dea> >> 9..16 === Time.new.hour # trash: This is the "sweet" approach, but wipe it from your memory.
<ruboto> Ox0dea # => bad value for range (ArgumentError) ...check link for more (https://eval.in/459103)
sindork has joined #ruby
<Ox0dea> The precedence of `..` is the worst thing ever.
rshetty has joined #ruby
<trash> Ox0dea: Thanks for further input :)
felixr has quit [Ping timeout: 246 seconds]
g3funk has joined #ruby
rshetty has quit [Remote host closed the connection]
phatypus has joined #ruby
<Ox0dea> trash: Sure thing. Just as something to file away, `===` is the "case equality" operator; it's the "equals on steroids" that makes Ruby's `when` clauses so nice, but you're advised against using it outside of that very narrow scope.
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> (Because tradition or something.)
<shevy> he likes to suggest things you should not use!
<Ox0dea> ^
<Ox0dea> It's like reverse psychology.
bMalum_ has joined #ruby
beauby has quit [Ping timeout: 252 seconds]
rshetty has joined #ruby
<trash> This talk was the classical moment how people know IRC and love. :D
skade has joined #ruby
<adaedra> I thought IRC was all about idling.
<trash> And telling people what not to use.
<adaedra> Don't use IRC.
Igorshp has quit [Ping timeout: 260 seconds]
<adaedra> What now?
<Ox0dea> trash: Don't write to-do apps in Sinatra: http://i.imgur.com/94jou4v.png
<trash> Why would I? I'm myself a person like Ox0dea.
<trash> s/a/am a/
<ljarvis> Ox0dea is not a person
<Ox0dea> ^
<adaedra> Ox0dea: This is at the same time beautiful and revolting.
<trash> Ox0dea: Just looks like the code you gave me above already.
Miron has quit [Ping timeout: 240 seconds]
<Ox0dea> trash: Except there isn't a single letter or number to be found.
gregoriokusowski has joined #ruby
<ljarvis> finally got my internet switched on this morning; it was almost worth the wait http://i.imgur.com/pKcpR5Y.png
DEA7TH has joined #ruby
<adaedra> Ox0dea: isn't that a X in the 3rd line from bottom?
<Ox0dea> ljarvis: Are you sharing the love?
<Ox0dea> adaedra: Hm?
bMalum has quit [Ping timeout: 264 seconds]
bMalum_ is now known as bMalum
<ljarvis> Ox0dea: nope, I'm a jealous lover
rshetty has quit [Remote host closed the connection]
<ljarvis> :/
<ljarvis> why you gotta go and do that
juanpablo__ has joined #ruby
<ljarvis> I was on 30 at best at my previous house
<ljarvis> so I'm happy
rshetty has joined #ruby
<Ox0dea> adaedra: Oh, right. I replaced it with BALLOT X: https://eval.in/459020
<Ox0dea> I trust that doesn't count as an alphanumeric.
<apeiros> trash: oy, nice upspeed
<ljarvis> yeah that upload is nice, that'll happen in the UK in about 20 years
<ljarvis> we'll have 50gb/s down and 3mb/s up
nfk|laptop has joined #ruby
Miron has joined #ruby
<trash> apeiros: Slightly cheated though. We sell and maintain our own dark fibre with upstreams.
<apeiros> dark fibre?
everbot has joined #ruby
<trash> That should have been 10Gb up/down.
arup_r has quit [Quit: Leaving]
agit0 has joined #ruby
<trash> It's rather a matter of how fast this notebook and the other server is.
cjk101010 has quit [Ping timeout: 268 seconds]
rshetty has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 252 seconds]
<apeiros> thanks @ trash
<apeiros> and you work in berlin?
rshetty has joined #ruby
arup_r has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<trash> and live and was born
joncol has joined #ruby
<apeiros> and now you throttle connection between 9:00 and 17:00? :D
juanpablo__ has quit [Ping timeout: 268 seconds]
rshetty has quit [Remote host closed the connection]
<trash> We share the connection between all the customers in this house too
<trash> Like 1000 people I guess
<adaedra> apeiros: it's all about being efficient.
<trash> Oh, misread your question
leafybasil has joined #ruby
<apeiros> I was just kidding
<trash> apeiros: No, the code is used to send SMS sensu notifications for some new kind of setup only between 9x5
<trash> ;)
<joncol> Hi, Is there a way to convert a method to a proc and later using instance_eval to run this proc with another `self`? When I try using `p = obj.method(:fun)`, and call it with `another_obj.instance_eval(&p)`, the `self` in `fun` is still `obj` and not `another_obj`...
chthon has quit [Quit: Ex-Chat]
<Ox0dea> >> 1.method(:to_s).unbind.bind(42).call # joncol
<ruboto> Ox0dea # => "42" (https://eval.in/459112)
<Ox0dea> The Method class has #to_proc, but UnboundMethod does not. :<
zotherstupidguy has joined #ruby
<trash> When I'm already here. What is the best way to write the condition: when a settings['notifications'] hash has nine_to_five value and that value is true, do something? settings['notifications'].include? 'nine_to_five' and settings['notifications']['nine_to_five'] == true can be probably shortend.
<apeiros> just use settings['notifications']['nine_to_five'] == true
<joncol> Ox0dea: Thanks!!
<Ox0dea> joncol: Sure thing.
<apeiros> if the hash doesn't have that key, it'll be nil
leafybasil has quit [Ping timeout: 265 seconds]
<apeiros> which is not == true
<trash> Doesn't seem to work. NoMethodError: undefined method `[]' for nil:NilClass
xaa has left #ruby [#ruby]
<apeiros> that means settings does not have ['notifications']
<trash> Ah wait, missed that in irb.
<apeiros> and then settings['notifications'].include? 'nine_to_five' won't work either
<trash> Yeah, works.
<trash> Thanks.
astrobunny has quit [Ping timeout: 268 seconds]
<joncol> Ox0dea: but it seems the object that you bind to must be a kind_of? the method's original class... That seems a severe limitation? I basically don't use any of my surroundings in the method, so I expected it to be possible to execute it in another context.
<Ox0dea> joncol: It sounds like you might be going about $thing the wrong way; say a little more about what you're trying to do?
<Ox0dea> Do you know about #send?
<apeiros> joncol: yes, it is a severe limitation. the question is why it is a method in the first place if you don't use the receiver.
tvw has joined #ruby
rbowlby has quit [Remote host closed the connection]
stardiviner has joined #ruby
hyperdrive has quit [Ping timeout: 255 seconds]
teclator has joined #ruby
BadRobot has joined #ruby
mdst has joined #ruby
<joncol> Ox0dea: I'm doing an RPC server thing, where I want to register callbacks that should be invoked when an RPC call is received. I pass these callbacks in as blocks to the `register` function. But for esthetical reasons I want to have the callbacks be ordinary methods in a class. Everything worked fine when passing in the callbacks using `&method(:name)`, but I now got the added requirement that I need to acces
<joncol> s the RJR Request object inside my callbacks (to get a hold of the client's IP). Thus I thought a nice solution would be to rebind `self` to the Request object, to access its instance variables.
dionysus70 has joined #ruby
hyperdrive has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 is now known as dionysus69
BadRobot has left #ruby [#ruby]
zwdr has quit [Ping timeout: 255 seconds]
<Ox0dea> joncol: There's #instance_variable_get, mind.
<Ox0dea> Probably better to use that than sticking things where they mightn't belong.
astrobunny has joined #ruby
zwdr has joined #ruby
vigintas has joined #ruby
bluOxigen has joined #ruby
jenrzzz has joined #ruby
<joncol> Ox0dea: OK, I'll look into that.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> joncol: That Ruby doesn't let you stick any ol' object in some other object's context is scarcely a "severe limitation"; I suspect it has saved many a foot.
<joncol> Ox0dea: It seems a bit strange, since Ruby lets you do almost everything else :)
<Ox0dea> joncol: I think I see more or less where you're coming from and what you're going for, but your aesthetic considerations throw a proverbial spanner into the works.
CloCkWeRX has quit [Ping timeout: 240 seconds]
<shevy> Ox0dea, look ruby just got faster! https://github.com/ruby/ruby/blob/trunk/ChangeLog#L8
tlarevo has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has joined #ruby
astrobunny has quit [Remote host closed the connection]
<Ox0dea> shevy: Indeed it did. I wonder about this one: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L287
<Ox0dea> It's like really aggressive inlining or something.
dionysus69 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 252 seconds]
<joncol> Ox0dea: Well, I guess a solution for my problem would be to define the callbacks as "free" Procs, and then call them with whatever `self` fits. Just feels a bit ugly to have all those procs "laying about" at the point where I define them.
<Ox0dea> joncol: Aye, I was just about to suggest something along those lines.
hmsimha_ has quit [Ping timeout: 265 seconds]
<shevy> I shall call Koichi Sasada Mr. Speed henceforthwith and Nobu the patch monster
Pupp3tm4_ has joined #ruby
<Ox0dea> Procs are mighty nifty, but they're really not where you should be sticking all your behavior in an object-oriented language.
tlarevo has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
tlarevo has joined #ruby
terlar has quit [Client Quit]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has joined #ruby
senayar has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Pupp3tm4st3r has quit [Ping timeout: 272 seconds]
<Ox0dea> I don't know if that's meant to be interpreted as ko1's nickname being "the Ruby VM", but it's better than Mr. Speed. :P
dionysus69 has joined #ruby
terlar has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
ibouvousaime has joined #ruby
devoldmx has joined #ruby
beauby has joined #ruby
bMalum has quit [Ping timeout: 246 seconds]
blue_deref has quit [Quit: bbn]
tlarevo has quit [Read error: Connection reset by peer]
htmldrum has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
tlarevo has joined #ruby
CloCkWeRX has joined #ruby
jxs_ has joined #ruby
ruurd has joined #ruby
<shevy> SpeedVM
leafybasil has joined #ruby
skade has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
pandaant has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
bMalum has joined #ruby
tlarevo has joined #ruby
skade has quit [Client Quit]
codecop has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
l_tonz has joined #ruby
rshetty has joined #ruby
skade has joined #ruby
beauby has quit [Read error: Connection reset by peer]
duncannz has quit [Ping timeout: 264 seconds]
joncol has quit [Quit: leaving]
doddok has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 240 seconds]
rshetty has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 240 seconds]
tlarevo_ has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
beauby has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
Igorshp has joined #ruby
tlarevo_ has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
tlarevo has joined #ruby
skade has quit [Ping timeout: 252 seconds]
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
devyn_ has quit [Ping timeout: 268 seconds]
devyn has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
jimms has joined #ruby
shredding has joined #ruby
tlarevo has quit [Read error: No route to host]
tlarevo has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
Cyther has joined #ruby
Ropeney has joined #ruby
tlarevo has joined #ruby
ldnunes has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo_ has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
terlar has quit [Quit: WeeChat 1.3]
zotherstupidguy has joined #ruby
terlar has joined #ruby
ibouvousaime has quit [Ping timeout: 265 seconds]
tomaz_b has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
matp has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby
arup_r has joined #ruby
phatypus has quit [Quit: .>]
Azure has joined #ruby
<zotherstupidguy> how to easily insert a line into a certain linenumber via standardlibrary?
fbidu has quit [Ping timeout: 240 seconds]
tlarevo_ has quit [Read error: Connection reset by peer]
lacrymology has joined #ruby
<Ox0dea> zotherstupidguy: You are not using a filesystem which supports arbitrary append.
<shevy> zotherstupidguy simplest way is to read in the file via File.readlines() then use array manipulation then save back
tlarevo_ has joined #ruby
RegulationD has joined #ruby
matp has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
cjk101010 has joined #ruby
but3k4 has joined #ruby
ibouvousaime has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
SCHAAP137 has quit [Read error: Connection reset by peer]
Ulfalizer has joined #ruby
araujo has quit [Ping timeout: 265 seconds]
ibouvousaime has quit [Ping timeout: 244 seconds]
Thomas-0725 has joined #ruby
niemcu has joined #ruby
ibouvousaime has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
Thomas-0725 has quit [Client Quit]
shadoi has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
The_Phoenix has quit [Quit: Leaving.]
tkuchiki has quit [Remote host closed the connection]
dc_ has quit [Remote host closed the connection]
elaptics has quit [Ping timeout: 252 seconds]
shadoi has quit [Ping timeout: 246 seconds]
<Ox0dea> Happy Boomtime. https://eval.in/459192
ElFerna has joined #ruby
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
sanjayu has joined #ruby
elaptics has joined #ruby
<adaedra> There's a fine line between genius and insane
moeabdol1 has joined #ruby
lsmola_ has quit [Ping timeout: 250 seconds]
<Ox0dea> I'm feeling... Discordian.
ElFerna has quit [Client Quit]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
lsmola has joined #ruby
SCHAAP137 has joined #ruby
l_tonz has joined #ruby
_blizzy_ has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
juanpablo__ has joined #ruby
big|bad|wolf has joined #ruby
ElFerna has joined #ruby
zenguy_pc has joined #ruby
d34th4ck3r has quit [Quit: zzz]
<Ox0dea> >> $, = ' n'; (['utter'] * 2).join # I confess that I'm an...
<ruboto> Ox0dea # => "utter nutter" (https://eval.in/459195)
syath has joined #ruby
big|bad|wolf has quit [Max SendQ exceeded]
CloCkWeRX has left #ruby [#ruby]
krisquigley has joined #ruby
l_tonz has quit [Ping timeout: 265 seconds]
juanpablo__ has quit [Ping timeout: 256 seconds]
<yorickpeterse> don't make me lock you up in the basement again
rikkipitt has joined #ruby
nhhagen has joined #ruby
erbesharat has joined #ruby
<Ox0dea> >> g, i = 'genius', 'insane'; (g.chars & i.chars).each { |c| g.sub! c, ''; i.sub! c, '' }; i.bytes.reduce(:-) - g.bytes.reduce(:-) # adaedra: Fine indeed.
<ruboto> Ox0dea # => 1 (https://eval.in/459197)
yfeldblum has quit [Ping timeout: 246 seconds]
erbesharat has quit [Quit: erbesharat]
erbesharat has joined #ruby
<[spoiler]> yorickpeterse: what if that is where they wanna be
_blizzy_ has quit [Ping timeout: 252 seconds]
krisquigley has quit []
millerti has joined #ruby
millerti has quit [Max SendQ exceeded]
stamina has joined #ruby
quazimodo has joined #ruby
platzhirsch has joined #ruby
<[spoiler]> Ox0dea: I wasn't aware of `$,` being the default separator used by #join! I wasn't even aware `$,` was a thing
sepp2k has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
dc_ has joined #ruby
ruurd has joined #ruby
Raboo has quit [Ping timeout: 240 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
Raboo has joined #ruby
cornerma1 has joined #ruby
dc_ has quit [Client Quit]
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> [spoiler]: The things one learns in basements, eh?
<Ox0dea> &ri String#join
<`derpy> No results
cyanide7 has joined #ruby
<Ox0dea> Derp.
<Ox0dea> &ri Array#join
jas02 has quit [Ping timeout: 255 seconds]
<shevy> I wonder if Ox0dea is ever writing code that he also uses
<shevy> I know he has written about unicode snowmen before. or it was adaedra. or both
Rickmasta has joined #ruby
<cyanide7> shevy: Why write code when you can just copy and paste stackoverflow?
<shevy> :D
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
<cyanide7> "I swear it's mine."
<Ox0dea> shevy: I'm running all kinds of code I wrote to use this very moment.
<Ox0dea> "Write once, run all day."
<adaedra> shevy: unicode snowman is mine, yes.
<Ox0dea> shevy: Rugen does much more than snowmen, mind; it's just that trio was a really good example.
<adaedra> that's a bad joke that went way to far.
ICantCook has quit [Ping timeout: 244 seconds]
<Ox0dea> I don't think it's funny that Ruby doesn't have named Unicode. :<
<shevy> lol
<cyanide7> Is anyone else caught in the issues of writing something to make a job easier, but it turns out that the time to write it takes longer than all the future time it would save?
<shevy> it ain't over until we have a game with unicode snowmen
<adaedra> shevy: code it.
<Ox0dea> !xkcd 1319 @ cyanide7
<adaedra> :|
ICantCook has joined #ruby
elaptics has quit [Ping timeout: 256 seconds]
<cyanide7> Ox0dea: that is my life in a nutshell.
norc has joined #ruby
<Ox0dea> !xkcd 1205 as well.
<norc> Why does rubocop suggest && and || over "and" and "or" ?
<Ox0dea> norc: Because the latter have weird precedence.
haxrbyte_ has quit [Read error: Connection reset by peer]
<adaedra> they have different precedence rules and are confusing.
haxrbyte has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<Ox0dea> norc: That you're "supposed to" use `and` and `or` for flow control should speak volumes.
<norc> Neat thanks
YaknotiS has quit [Ping timeout: 240 seconds]
<Ox0dea> Speedy reader, eh?
<shevy> adaedra one day I shall!
<adaedra> yesterday you said tomorrow
<adaedra> just, do it
cyanide7 has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<[spoiler]> Ox0dea re basement: :D LOL Yeah
<adaedra> I wonder if anyone ever think of doing these lines as a motivational speech. It could go well. Maybe in front of a green background, but I don't know why.
elaptics has joined #ruby
<[spoiler]> adaedra: you mean like Shia LaBleh did?
<adaedra> whoosh
DEA7TH has joined #ruby
<Ox0dea> Actual Cannibal Shia Laboof: https://www.youtube.com/watch?v=o0u4M6vppCI
<Ox0dea> Never mind that the narrator reminds you of tenderlove.
<[spoiler]> I am perpetually doing things tomorrow and it's working out so far
<[spoiler]> LOL
<norc> Ox0dea: Interesting. That whole thing made me discover an unidentified bug.
<adaedra> [spoiler]: [spoiler] it doesn't works forever.
* norc is thankful to ruboto
<adaedra> (no, that is not a double hl)
s00pcan has joined #ruby
<norc> rubocop I mean.
<adaedra> work*
Cyther_ has joined #ruby
<adaedra> norc: hopefully you have tests to catch bugs.
charliesome has joined #ruby
* Ox0dea wonders how to correctly test DecayingBooleans.
<norc> adaedra: rake stat gives me a 1:1.9 code to test ratio.
<norc> Might not be stellar, but its something. :)
Icey has joined #ruby
<norc> Next up Ill put in simplecov to ensure better test coverage.
<adaedra> test size does not say much.
YaknotiS has joined #ruby
<adaedra> I could write `expect(String.new).to be_a(String)` a thousand times.
<norc> Heh.
<Ox0dea> norc: Be advised that "pleasing the compiler" does not a (necessarily) healthy codebase make.
jenrzzz has joined #ruby
Cyther has quit [Ping timeout: 260 seconds]
<[spoiler]> adaedra, Ox0dea: LOL I was joking, tbf. I don't procrastinate that often, but when I do, I procrastinate that thing like a champion
SylarRuby has quit [Remote host closed the connection]
<norc> Ox0dea: You mean I shouldn't overdo it with rubocop?
<Ox0dea> norc: Just don't become a slave to the metagame.
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[spoiler]> Ox0dea: what if norc enjoys coding BDSM? Eh, eh?
<adaedra> You can write code that ruboto likes, you can also write code which works.
<[spoiler]> adaedra: rubucop, don't involve ruboto into this! It is innocent!
<adaedra> s/ruboto/rubocop/
<adaedra> 9_6
<apeiros> ruboto doesn't like code.
<apeiros> it's codeophobic
<adaedra> Isn't it made of it?
<apeiros> sure
<adaedra> That would be like hating blood.
<apeiros> but there's people who have a phobia of blood
<adaedra> True.
ruurd has joined #ruby
<[spoiler]> I just don't use rubocop, because it gave me too much gief about something, then I tried fixing it and it looked like a bird took a shit over that portion of the code
<apeiros> hemophobia :)
SylarRuby has joined #ruby
<adaedra> [spoiler]: I try to put a fine line between do what rubocop says, fix rubocop settings to not bother me, and just fuck it.
<norc> Ox0dea: Oh absolutely not. There is quite a few things I dont agree with (in particular some methods that are 11-15 lines long, but that is only because of splitting arguments over a couple lines)
<[spoiler]> >> puts "Oh no, code! *Exceptions*"
<ruboto> [spoiler] # => Oh no, code! *Exceptions* ...check link for more (https://eval.in/459209)
niemcu has quit [Ping timeout: 246 seconds]
<[spoiler]> i think I got it wrong
<[spoiler]> oh well
Icey has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 272 seconds]
<adaedra> [spoiler]: also, look at all this code on codeclimate that has Fs that are still used. Pleasing automated tools are not always the priority.
rshetty has quit [Read error: Connection reset by peer]
<[spoiler]> adaedra: When I see rubocop comments all over someone's code I just go "Oh god..."
rshetty has joined #ruby
sdothum has joined #ruby
<adaedra> yeah, those are horrid.
<adaedra> I stopped with rubocop personally.
Igorshp has quit [Remote host closed the connection]
<shevy> hah
SylarRuby has quit [Remote host closed the connection]
Icey has joined #ruby
<shevy> I did not like rubocop but it can autocorrect code!!! that's the single best feature it has
<Ox0dea> > correct
<adaedra> I don't like automated processes messing with my code.
<[spoiler]> shevy: I have a love-hate relationship with anything autocorrect
lipoqil has quit [Quit: Connection closed for inactivity]
rikkipitt has quit [Quit: Leaving...]
<[spoiler]> "bought some bats" "bangs" "bandanas" "DUCKING BANANAS"
Icey has quit [Client Quit]
Icey has joined #ruby
<Ulfalizer> is mkmf supposed to respect CC from the environment when compiling test programs with e.g. have_func()? looking into the mkmf.log file generated for a run, it says "gcc -I/home/ ... ", even though CC is set.
ElFerna has joined #ruby
Icey has quit [Changing host]
Icey has joined #ruby
<Ox0dea> Ulfalizer: Did you export it?
Igorshp has joined #ruby
<Ulfalizer> Ox0dea: yep
<[spoiler]> what is CC set to?
<[spoiler]> is it set to GCC?
Icey has quit [Client Quit]
Icey has joined #ruby
Icey has joined #ruby
devoldmx has joined #ruby
<Ox0dea> Ulfalizer: Try using something like `$CFLAGS="CC=clang"` in your `extconf.rb`.
Igorshp has quit [Remote host closed the connection]
<norc> adaedra: Idk, I feel pretty strong about JSLint - it definitely is a huge benefit imo.
<Ulfalizer> [spoiler]: CC=i586-mgu-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/...
ruurd has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 250 seconds]
<Ulfalizer> it's set up by Yocto (a distribution builder thingy)
blackoperat has joined #ruby
z4ph0d has joined #ruby
<Ulfalizer> Ox0dea: unfortunately i'm working off a gem file with 'gem install'. i unpacked it to check what it was doing though, and it has RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] in it.
Pupp3tm4st3r has joined #ruby
<Ox0dea> norc: RuboCop only detects 135 offenses in this code: http://i.imgur.com/94jou4v.png
<Ulfalizer> i'm a ruby noob, so i learn as i go :)
<Ox0dea> Anything less than ∞ is simply unacceptable.
dEPy has joined #ruby
<Ox0dea> Ulfalizer: Ah, well, that certainly should've done it.
shadoi has joined #ruby
Pupp3tm4_ has quit [Read error: Connection reset by peer]
Pupp3tm__ has joined #ruby
<Ulfalizer> it's for nokogiri btw
atomical has joined #ruby
jimms has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 272 seconds]
misterxavier has joined #ruby
juanpablo__ has joined #ruby
<[spoiler]> hmm
<[spoiler]> not sure then
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]> Ox0dea: that image looks beautiful, you're just a primitive ape who doesn't appreciate ascii art!
<[spoiler]> Ox0dea: oh that's code.
<Ox0dea> Ha.
Igorshp has joined #ruby
<Ox0dea> For varying definitions of "beautiful", "ape", "art", and "code", I couldn't agree with you more.
Pupp3tm4st3r has quit [Ping timeout: 264 seconds]
shadoi has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
<shevy> haha
<[spoiler]> :D
<shevy> Ox0dea is a primitive ape :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has quit [Remote host closed the connection]
l_tonz has joined #ruby
* Ox0dea checks to see that he still has his basal ganglia.
<Ox0dea> shevy: You're right!
gusTester has joined #ruby
Pupp3tm4st3r has joined #ruby
civil_ has joined #ruby
erbesharat has quit [Remote host closed the connection]
rbennacer has joined #ruby
ruurd has joined #ruby
erbesharat has joined #ruby
rbennacer has quit [Remote host closed the connection]
<adaedra> Ox0dea: pics or it didn't happen.
<Ox0dea> This is gonna hurt.
misterxavier has quit []
l_tonz has quit [Ping timeout: 246 seconds]
<Ulfalizer> CC=thisshouldfail gem install nokogiri-1.6.6.2.gem succeeds too, when doing some local testing
<Ulfalizer> it builds the extension as part of the install process
<Ulfalizer> so looks like CC is being ignored for some reason :/
<Ox0dea> I vaguely remember learning why this doesn't work, but I've since forgotten. :< https://eval.in/459227
Pupp3tm4_ has joined #ruby
Pupp3tm__ has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
shredding has quit [Ping timeout: 265 seconds]
ldnunes has quit [Ping timeout: 246 seconds]
gusTester has left #ruby [#ruby]
yeticry has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 246 seconds]
ruurd has quit [Read error: Connection reset by peer]
<Ox0dea> Ulfalizer: I just realized I suggested using CC in CFLAGS...
<Ox0dea> I must help you get this sorted as penance.
dEPy has quit [Quit: (null)]
rbennacer has joined #ruby
<Ulfalizer> yeah, thought it looked a bit odd when i looked at it again :)
zapata has quit [Quit: WeeChat 1.3]
<Ulfalizer> would be very appreciated. i'm stumbling around on a couple of days' worth of ruby knowledge.
ESpiney has joined #ruby
prestorium has joined #ruby
nsuke has joined #ruby
sdfgsdfg has joined #ruby
synthroid has joined #ruby
ruurd has joined #ruby
Pupp3tm4_ has quit [Read error: Connection reset by peer]
AMERICAN_PSYCHO has joined #ruby
Pupp3tm4st3r has joined #ruby
<Ulfalizer> oh, wait, it's failing now during local testing
<Ulfalizer> when giving it a broken CC
<Ulfalizer> so i need to investigate the build environment more. very odd since i've verified three times now that it's set there too. :/
<Ulfalizer> (and exported)
Azure has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ruby
htmldrum has quit [Ping timeout: 255 seconds]
blubjr has joined #ruby
trash has left #ruby [#ruby]
alexdunne has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
<Ulfalizer> ah... it doesn't fail during the tests though. only later while building it.
<Ulfalizer> so there's still an issue
rbennacer has joined #ruby
charliesome has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<Ulfalizer> that is, CC isn't respected by have_func() and pals
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
Renich has joined #ruby
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Read error: No route to host]
<Ulfalizer> so the updated question would be how to specify the compiler options used by e.g. have_func() when compiling the test program for the test. it doesn't seem to use CC.
Erik__ has joined #ruby
<Erik__> Hello
postmodern has quit [Quit: Leaving]
<adaedra> hi
<norc> Ox0dea: If only our corporate firewall would allow imgur.
<Ox0dea> norc: Count your blessings.
Archyme has quit [Ping timeout: 240 seconds]
trabulmonkee has joined #ruby
dionysus69 has joined #ruby
ibouvousaime has quit [Ping timeout: 255 seconds]
ruurd has joined #ruby
<Erik__> So I'm trying to define a method so that by_three?(n) returns true if it's divisible by 3, and false if it doesn't. I tried with this without success: https://gist.github.com/anonymous/ebcf78d3236e8952d6d3
Pupeno has quit [Quit: Leaving...]
Quandl has joined #ruby
<ytti> [1] pry(main)> class Fixnum; def by_three?; self % 3 == 0; end; end
<ytti> => :by_three?
<ytti> [2] pry(main)> 3.by_three?
<ytti> => true
<ytti> [3] pry(main)> 4.by_three?
<ytti> => false
<ytti> [4] pry(main)>
dikaio has joined #ruby
<Ox0dea> ~ $ CC=clang ruby -e 'p RbConfig.expand "$(CC)"'
<Ox0dea> "gcc"
<Ox0dea> Ulfalizer: ^ I've no idea, mate. :<
<shevy> ytti! my favourite finnish song https://www.youtube.com/watch?v=4om1rQKPijI
ruurd has quit [Read error: Connection reset by peer]
prestorium_ has joined #ruby
RegulationD has joined #ruby
<Ox0dea> Ulfalizer: It seems mkmf is desperate to hold onto the environment in which Ruby itself was compiled.
<Erik__> Ytti, that's lots of stuff I've not learned yet :o But thanks anyways
<shevy> Erik__ you never modified a core class in ruby yet?
<Erik__> I've not :o
<ytti> shevy, cool
<Ox0dea> Erik__: Right now is the time you learn the modulus operator.
<Erik__> I began like 2 days ago with ruby AND programming :D
<Erik__> What is that?
<Ox0dea> >> 17 % 5 # Erik__
<ruboto> Ox0dea # => 2 (https://eval.in/459271)
<Ox0dea> 17 divided by 5 is 3r2; the % operator gives you the remainder.
<shevy> Erik__ ok, in ruby you can modify behaviour of everything at runtime
blackoperat has quit [Ping timeout: 244 seconds]
<norc> shevy: Almost everything. :D
<Ox0dea> norc: What'd you have in mind?
prestorium has quit [Ping timeout: 252 seconds]
<shevy> well you still have to satisfy the parser of course
<Ox0dea> Syntax isn't behavior.
<Erik__> I've seen % used before to give a remainder, yeah
<shevy> see .?foo versus the time before .?foo was possible
northfurr has joined #ruby
banister has joined #ruby
<havenwood> >> 17.modulo(5).zero?
<ruboto> havenwood # => false (https://eval.in/459272)
workmad3 has quit [Read error: Connection reset by peer]
<norc> Ox0dea: Well Ruby still has keywords.
dionysus69 has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 268 seconds]
<Ox0dea> norc: That's still syntax.
<Ox0dea> I was asking which behavior you reckon we're not able to change.
<norc> Ox0dea: Well, only because that is the implementation. I mean there is no document or ISO that defines the Ruby syntax
<Ox0dea> Yes, there is.
<shevy> syntax limits everything
yashinbasement has quit [Quit: Leaving]
<norc> Ox0dea: I thought the MRI itself is the standard.
<havenwood> norc: Ruby does have an ISO.
<norc> Oh o_o
<Erik__> Are you guys like working as programmers?
<Ulfalizer> Ox0dea: ah, okay, thanks for the help at least
tkuchiki has joined #ruby
<norc> Damn that must have gone by me entirely.
dionysus69 has joined #ruby
<shevy> who here read the ISO spec
dionysus69 has quit [Client Quit]
<shevy> :D
<norc> Id rather know: Who here *paid* for the ISO spec
<Ox0dea> I... looked for it in #bookz.
ruurd has joined #ruby
tkuchiki has quit [Remote host closed the connection]
jas02 has joined #ruby
<shevy> lol
Voker57 has joined #ruby
banister has quit [Read error: Connection reset by peer]
<havenwood> norc: I downloaded the draft ISO before they finalized and started charging.
<shevy> hmm
<havenwood> norc: Not that I ever read it.
<shevy> did he just download it... or did he also read it
<shevy> hahahaha
<norc> havenwood: Heh.
nfk|laptop has quit [Quit: yawn]
_blizzy_ has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
gusTester1 has joined #ruby
yalue has joined #ruby
<Ox0dea> >> ObjectSpace.each_object(String).grep(/core#\w+/)
<ruboto> Ox0dea # => ["core#hash_merge_kwd", "core#hash_merge_ptr", "core#hash_merge_ary", "core#hash_from_ary", "core#se ...check link for more (https://eval.in/459278)
RobertBirnie has joined #ruby
<Ox0dea> norc: As an example, we used to be able to override these methods to do very strange things.
<shevy> so I sense sadness
<shevy> rubyists are tinker toys!
JDiPierro has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Erik__> Will ruby replace other popular alternative languages in the future?
northfurr has quit [Quit: northfurr]
tkuchiki has joined #ruby
<shevy> Erik__ which ones?
<jhass> Erik__: will chainsaw's replace hammers in the future?
<Ox0dea> Got 'im.
<shevy> it takes a long time for a programming language to fade away
_aeris_ has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
charliesome has joined #ruby
<Ox0dea> shevy: Which programming languages are truly gone for good?
<Erik__> Hm, perhaps not replace
shadoi has joined #ruby
<shevy> Ox0dea I don't know all of them, I am sure you'll find lots of those in the 1950s
<Ox0dea> shevy: ALGOL is still very much with us.
allomov has quit [Remote host closed the connection]
CloCkWeRX has quit [Remote host closed the connection]
<Ox0dea> In spirit, if nothing else.
charliesome has quit [Read error: Connection reset by peer]
<shevy> which ALGOL
mclee_ has quit [Ping timeout: 260 seconds]
<Ox0dea> ALL THE ALGOLs!
TDJACR_ has quit [Ping timeout: 246 seconds]
_aeris_ has joined #ruby
<jhass> no.
<shevy> haha
dionysus69 has joined #ruby
<mikecmpbll> today, i learnt about DATA
<shevy> COMPOOL
<shevy> HAHAHA "Freiburger Code"
allomov has joined #ruby
jas02_ has joined #ruby
sankaber has joined #ruby
<Erik__> Is it true that Ruby is harder to learn than for example Java, PHP, JavaScript, Python etc?
<jhass> no
<jhass> who said so?
<Erik__> Articles n stuff
<shevy> Erik__ said so!
<ccooke> I found it a very easy language to learn
<jhass> Erik__: example?
<Erik__> Lemme find 'em
<Ox0dea> mikecmpbll: Do you know that it's actually just a File handle into your script?
ruurd has quit [Read error: Connection reset by peer]
<ccooke> I do think that some of the similarities make whichever of ruby or python you learn *second* a little bit more difficult, but not hugely so.
jas02 has quit [Ping timeout: 268 seconds]
jas02_ is now known as jas02
shadoi has quit [Ping timeout: 256 seconds]
<mikecmpbll> Ox0dea: yeah. i was confused as hell by this gist: https://gist.github.com/jurisgalang/7637348#file-totp_demo-rb
<mikecmpbll> cus i'd never seen DATA before!
<hughjasss> ruby = harder than java?!
Guest53 has joined #ruby
<Ox0dea> mikecmpbll: That's not quite how I meant, though.
<Ox0dea> `DATA.rewind.read.display` is a free quine.
<shevy> is this useful
BadRobot has joined #ruby
<mikecmpbll> i don't even know what that is
<Ox0dea> I like the part where you know how to explore your curiosity.
treehug88 has joined #ruby
<apeiros> Ox0dea: wait, are you saying DATA.rewind rewinds to before __END__?
pu22l3r_ has quit [Remote host closed the connection]
<mikecmpbll> oh, neat.
charliesome has joined #ruby
pu22l3r has joined #ruby
DiCablo has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
davedev2_ has joined #ruby
l_tonz has joined #ruby
<apeiros> fuckme, it does. not sure I find that good…
<apeiros> it's DATA.tap(&:rewind), though
davedev2_ has quit [Read error: Connection reset by peer]
<mikecmpbll> what a funny little nugget.
davedev24 has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
<BadRobot> hi, can I ask a very quick JRuby quesiton (although I am certain its more of ruby)
Erik__ has quit [Ping timeout: 246 seconds]
<yorickpeterse> BadRobot: #jruby is probably a better place to ask JRuby questions
yeticry has joined #ruby
Erik____ has joined #ruby
<Erik____> Okay guys, found it
joonty has quit [Quit: joonty]
<Erik____> "My main beef with Ruby on Rails is that it actually has a steep learning curve. Do not believe the hype that says that it is really easy. They will show you podcasts where you build a simple blog application using scaffolding and voila! Instant website. Nothing could be further from the truth. Rails is seen to be easy because they have automated many things in the framework — this does not make it easy to understand."
dopamean_ has joined #ruby
<BadRobot> yorickpeterse: they are a bit in a whole different world, no one uselly replies there, but its about the gems env options
<apeiros> Erik____: and another one who uses "steep learning curve" wrong :)
sgambino has joined #ruby
ElFerna has quit [Read error: Connection reset by peer]
<BadRobot> what does -rubygems option does?
<jhass> Erik____: Comparing a framework to a language, great
<Ox0dea> apeiros: It's the simplest thing that could possibly work, so why not?
joonty has joined #ruby
cdg has joined #ruby
joonty has quit [Client Quit]
<Ox0dea> BadRobot: The -r flag does a `require`, and `ubygems` is an "alias" to `rubygems`.
<apeiros> Ox0dea: because DATA is supposed to access data after __END__
tlarevo_ has quit [Remote host closed the connection]
<apeiros> Ox0dea: for that reason I don't expect to be able to rewind to before that token
<Erik____> He also says Ruby uses lambdas, I thought only blocks were used?
<Ox0dea> apeiros: But why shouldn't you have that option?
bigmac has joined #ruby
<jhass> Erik____: given such a major misconception, I wouldn't give much on the authors words. And please don't repeat his mistake of equaling Rails and Ruby
<Ox0dea> Erik____: I think you would be much better served by sticking a toe in the water.
<BadRobot> Ox0dea: thank you kindly
<Ox0dea> BadRobot: Sure thing.
<Ox0dea> BadRobot: Cute, right? There's also `-run`.
<apeiros> Ox0dea: because it makes it harder to work with DATA as means to work with stuff after __END__
<Ox0dea> apeiros: How hard is it to store the initial seek position?
dionysus69 has quit [Remote host closed the connection]
<apeiros> Ox0dea: that said, I don't like the way DATA works anyway. I prefer what I do in my Scriptfile gem (access any .rb's __END__ data)
<BadRobot> Ox0dea: oh so does the same thing?
<apeiros> Ox0dea: I expect ruby to do that for me.
<Ox0dea> apeiros: Sure, I do think local DATA would be nice.
<apeiros> there's tons of things which are "not hard"
<apeiros> yet I don't want to reinvent those wheels.
TDJACR has joined #ruby
ruurd has joined #ruby
<apeiros> iow, "is it hard?" is the wrong question
zapata has joined #ruby
<apeiros> the right question is: "is DATA only about the stuff after __END__ or not?"
bigmac is now known as i8igmac
<apeiros> if it is, rewinding to before __END__ is wrong.
<Ox0dea> >> 'un' == 'ubygems' # BadRobot
<ruboto> Ox0dea # => false (https://eval.in/459287)
<apeiros> if it isn't, well, then I like DATA even less.
skade has joined #ruby
<apeiros> Ox0dea: as for "how hard is it?" - the reverse is: "how hard is File.open(__FILE__)"?
<jhass> >> "rubygems" == "ubygems" # Ox0dea
<ruboto> jhass # => false (https://eval.in/459292)
<Ox0dea> jhass: You missed some context.
dravine_ has joined #ruby
<jhass> Ox0dea: nah, I'm just nitpicking
workmad3 has joined #ruby
g3funk is now known as braidn
jimms has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dravine has quit [Ping timeout: 265 seconds]
dravine_ is now known as dravine
Guest53 has joined #ruby
Macaveli has joined #ruby
dionysus69 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
everbot has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
chouhoulis has quit [Remote host closed the connection]
bangir has quit [Quit: Leaving]
tens0r has joined #ruby
__chris has joined #ruby
jas02 has quit [Quit: jas02]
<Ox0dea> ~ $ egrep '(..)\1\1' words | tail -n+3 | paste -sd \
<Ox0dea> larararia logogogue ratatat ratatats unununium unununiums
<Ox0dea> shevy: You made me say "tinkerer" earlier, so I brought you these.
duckpuppy has joined #ruby
jilya has joined #ruby
<Ox0dea> Unununium is the Pluto of the periodic table.
<i8igmac> is there a way i can find the arrays that are reoccurring... almost like array.uniq
dfinninger has joined #ruby
<i8igmac> in order of most popular
Peg-leg has left #ruby [#ruby]
`tim` has joined #ruby
<apeiros> i8igmac: Errno::ENOTENOUGHINFO
rwilcox has joined #ruby
<Ox0dea> I understood.
<Ox0dea> >> Errno::EDOOFUS
<ruboto> Ox0dea # => Errno::NOERROR (https://eval.in/459295)
<norc> i8igmac: [[1], [1], [2]].inject(Hash.new(0)) { |h,e| h[e] += 1; h }.select { |k,v| v > 1 }
<i8igmac> lol
<norc> Im sure you can go on from there.
<i8igmac> ill check it out
n008f4g_ has joined #ruby
<apeiros> Ox0dea: so what's the definition of "most popular"? and "how deeply nested?" and "by what type of equality?"
rshetty_ has joined #ruby
<apeiros> you're just making a tons of assumptions. but sure, fine. if it happens to fit.
<Ox0dea> >> [1,2,2,2,3,3].group_by(&:itself).sort_by { |k, v| -v.size }.map(&:first) # i8igmac
<ruboto> Ox0dea # => [2, 3, 1] (https://eval.in/459296)
<Ox0dea> Is that what you were looking for?
<i8igmac> that looks about right
<Ox0dea> Well, shit, I didn't realize you specified reoccurring arrays; I thought you might've mispoke and meant "elements".
dionysus69 has quit [Quit: dionysus69]
<norc> Ox0dea: Oh wow. Now that is extremely readable.
<apeiros> it'll become even more readable in 2.3 iirc (#count_by)
<Ox0dea> norc: havenwood would've beat me to it; he quite likes `group_by(&:itself)`.
<Ox0dea> I don't blame 'im.
<i8igmac> im sorry, my understanding, the terminology is on a third grade reading level...
rshetty has quit [Ping timeout: 264 seconds]
<i8igmac> i always appreciate your guys help
<i8igmac> i need to read a book
cschorn_ has joined #ruby
deject3d_ has joined #ruby
cschorn_ has left #ruby [#ruby]
<Ox0dea> i8igmac: Oh, hey, did you end up discovering `xdotool`?
<i8igmac> um, ill look into it
dopamean_ has quit [Ping timeout: 250 seconds]
elusiveother has joined #ruby
<i8igmac> oh, cool
<i8igmac> i have been looking for this
Pupp3tm4st3r has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 240 seconds]
jimms has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 240 seconds]
<blubjr> what did ruby actually get from lisp, i hear people say lisp and smalltalk as influences often but now that im looking at ruby i see a lot of smalltalk and no lisp..
Bloomer has quit [Remote host closed the connection]
existensil has quit [Quit: WeeChat 0.4.2]
<norc> blubjr: It certainly did not get Lisps elegant weapons... for a more civilized age...
Guest53 has quit [Read error: Connection reset by peer]
Guest53 has joined #ruby
existensil has joined #ruby
jenrzzz has joined #ruby
Pupp3tm4_ has quit [Ping timeout: 252 seconds]
tens0r has quit [Quit: tens0r]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
jimms has joined #ruby
prestorium_ is now known as prestorium
Pupp3tm4st3r has joined #ruby
<Ox0dea> >> ((((((()))))))
<ruboto> Ox0dea # => nil (https://eval.in/459303)
<Ox0dea> norc: Go try that in your favorite dialect. :P
<Ox0dea> blubjr: Do you know a Lisp well?
DEA7TH has quit [Quit: DEA7TH]
deception1 has joined #ruby
sanjayu has quit [Ping timeout: 252 seconds]
<blubjr> cl and scheme
<Ox0dea> blubjr: So you're quite comfortable with the notion of closures, then?
allomov has quit [Remote host closed the connection]
<blubjr> thats hardly something to pin as a lisp feature
<Ox0dea> Wat.
jenrzzz has quit [Ping timeout: 252 seconds]
malconis has joined #ruby
freerobby has joined #ruby
nemo_ has quit [Remote host closed the connection]
<blubjr> closures = lisp doesnt make any more sense in 2015 than garbage collection = lisp
lacrymology has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 268 seconds]
malconis has quit [Remote host closed the connection]
CJKinni_ has joined #ruby
malconis has joined #ruby
bmurt has joined #ruby
<Ox0dea> blubjr: I suspect you also maintain that JavaScript has nothing to do with Scheme.
decoponio has joined #ruby
cdg has quit [Remote host closed the connection]
raazdaan has joined #ruby
<blubjr> i don't know very much about javascript
shinnya has joined #ruby
<havenwood> blubjr: Closure-Oriented Programming, sounds like let for lambda to me.
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
tomaz_b has quit [Ping timeout: 260 seconds]
bweston has quit [Quit: Leaving]
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
`tim` has quit [Read error: Connection reset by peer]
bweston has joined #ruby
bweston has quit [Remote host closed the connection]
pard has joined #ruby
bweston92 has joined #ruby
<pard> greetin's
<havenwood> pard: good mornin'
<pard> :)
<Ox0dea> pard: How'd 'e do ya?
rshetty_ has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
<Ox0dea> Erm, I don't think that's the right orthography.
<pard> kay o pard, kay o; cow-juice price byn low :)
<Ox0dea> I'll take ten.
<blubjr> its not homoiconic, it doesn't have restarts, its object system is completely different, correct me if im wrong
<blubjr> aren't closures just expected nowadays
<Ox0dea> blubjr: Closures fundamentally pervade the language.
<Ox0dea> That just isn't true of most others.
pathrocle has joined #ruby
devoldmx has joined #ruby
<blubjr> thats still a smalltalk bite anyway
<havenwood> "If ... you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
ibouvousaime has joined #ruby
rwilcox has quit [Quit: WeeChat 1.2-dev]
sigurding has joined #ruby
musou has joined #ruby
<mikecmpbll> i dunno where to ask this, any ideas why in the reference implementation for TOTP codes they drop a bit off the first byte of the hash? https://tools.ietf.org/html/rfc6238
<pard> pardon my impertinence; i guess i've jumpd amid an actual discussion -- i had no intention to
<mikecmpbll> page 13: ((hash[offset] & 0x7f) << 24) | ...
deject3d_ has left #ruby ["Leaving..."]
<mikecmpbll> the mask for the other bytes is 0xff
kfrz has joined #ruby
rwilcox has joined #ruby
<blubjr> hi pard
<pard> hello :)
<mikecmpbll> they get 4 bytes from the hash longer hash, and then convert to binary, but in doing so drop a bit off the first of the four bytes :/
nfk|laptop has joined #ruby
<Ox0dea> mikecmpbll: They're dropping the first four bits.
<mikecmpbll> Ox0dea: where?
devoldmx has quit [Ping timeout: 256 seconds]
<Ox0dea> Gah, sorry. I'll get coffee.
<pard> sorry if what i'm going to ask sounds rather stupid; but, is there any way to download the whole gems corpus at once?
shadoi has joined #ruby
allenn has joined #ruby
<mikecmpbll> heh it's k, i've been poring over this code for ages, just about got my head around it and then this weirdness.
<Ox0dea> mikecmpbll: It must be to leave room for a sign bit.
allenn has quit [Remote host closed the connection]
<mikecmpbll> ah..
rshetty has quit [Ping timeout: 250 seconds]
codecop has quit [Remote host closed the connection]
colli5ion has joined #ruby
deject3d_ has joined #ruby
<pard> (i'm ntending to use it for test purposes)
<pard> thanks a lot
<pard> i'm on it
beauby has quit [Read error: Connection reset by peer]
moeabdol1 has quit [Ping timeout: 250 seconds]
shadoi has quit [Ping timeout: 264 seconds]
sankaber has quit [Remote host closed the connection]
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pard> why now?
jlebrech has joined #ruby
<pard> i mean, _now_ why _now_? :)
sankaber has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has joined #ruby
umdstu has joined #ruby
elusiveother has quit [Changing host]
elusiveother has joined #ruby
<pard> :\
<Ox0dea> pard: What sort of research are you doing that requires such a corpus?
DiCablo has joined #ruby
<umdstu> hey I'm trying to build an rpm for ruby-2.2.2 so that I can install ruby-2.2.2 in addition to 1.9.3 on the system... I used the --program-suffix option so the names would be different. but the libruby.so still conflixts. how do i rename that in the config?
dfinninger has quit [Remote host closed the connection]
mag42c has joined #ruby
<__chris> anyone with ThinkingSphinx experience help me out with this question? http://stackoverflow.com/questions/33394874/thinkingsphinx-with-all-or-query
<pard> i've prototyped a parser
beauby has joined #ruby
<Ox0dea> You're so full of 1F4A9.
<pard> one 'F' for a 9?
danel has joined #ruby
danel has quit [Client Quit]
<pard> got it :)
dhjondoh has quit [Quit: dhjondoh]
<pard> sugar honey iced turkey you meant
ldnunes has joined #ruby
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
<umdstu> no he meant she hit it tenderly
<pard> :\
<Ox0dea> pard: Well, have I made some grievous error in my assessment of your character?
<pard> no
<Ox0dea> Right.
<pard> my dad calld me what approximated to your postulate
<Ox0dea> I quite enjoyed shitting in your cereal after remembering that I had that pipeline lying around somewhere.
<Ox0dea> > plz can dl all teh gemz
<Ox0dea> "You got it, fucker."
<umdstu> kind of wishing i saw the first half of this convo
<pard> .w convo
<umdstu> yours and his
moeabdol1 has joined #ruby
<umdstu> is there a list of all ruby configure options?
dopamean_ has joined #ruby
<umdstu> i need to give my libruby.so a suffix during configure
dionysus69 has joined #ruby
ta has quit [Remote host closed the connection]
<pard> ah thanks;
pdoherty has joined #ruby
<pard> the reason i actually asked was ".... Parser has been extensively tested; in particular, it parses almost entire Rubygems corpus. For every issue, a breakdown of affected gems is offered."
chouhoulis has joined #ruby
CJKinni__ has joined #ruby
Pupp3tm4_ has joined #ruby
<pard> i was just wondering how has its creator testd it against "almost entire Rubygems corpus"
<ytti> automatically?
<ytti> use canonical parser
<ytti> use own parser
<ytti> compare for equality
alexdunne has joined #ruby
CJKinni_ has quit [Ping timeout: 256 seconds]
slawrence00 has joined #ruby
<Ox0dea> umdstu: Looks like you want `--with-soname=foo`.
CJKinni__ has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has quit [Ping timeout: 272 seconds]
Pupp3tm4_ has quit [Read error: Connection reset by peer]
<pard> ytti, my question actually was : how to source test cases, in particular, how has the https://github.com/whitequark/parser creator has testd it against the Rubygems corpus
mordocai has joined #ruby
Pupp3tm4st3r has joined #ruby
ESpiney_ has joined #ruby
diegoaguilar has joined #ruby
<Ox0dea> pard: I bet he downloaded all the gems.
stardiviner has quit [Ping timeout: 252 seconds]
jobewan has joined #ruby
<pard> that's what has actually baffled me -- how?
aspiers has joined #ruby
<Ox0dea> It's impossible.
<pard> :\
ruurd has quit [Read error: Connection reset by peer]
<pard> thanks
alexdunne has quit [Ping timeout: 240 seconds]
<ytti> Ox0dea, why impossible?
dionysus69 has quit [Ping timeout: 260 seconds]
<ytti> or even hard
<ytti> seems trivial to me
tenderlove has joined #ruby
<ytti> ok
ESpiney has quit [Ping timeout: 240 seconds]
<ytti> parallel and jq <3
<ytti> i wish parallel would ship standard in distributions
<pard> strange, it gave me 404
<umdstu> Ox0dea: thanks i'll take a look
kp666 has quit [Quit: Leaving]
<Ox0dea> umdstu: Godspeed.
ruurd has joined #ruby
<umdstu> thanks
raazdaan has quit [Read error: Connection reset by peer]
senayar has quit [Read error: Connection reset by peer]
senayar has joined #ruby
<pard> Ox0dea, thanks
<pard> ytti, thanks
mwlang has quit [Quit: mwlang]
pard has quit [Quit: Leaving]
jonee has joined #ruby
Pupp3tm4st3r has quit [Quit: Leaving...]
rshetty has joined #ruby
bruno- has joined #ruby
elusiveother has quit [Quit: look at me still talking when there's science to do! when i look up there, it makes me glad i'm not you!]
rshetty has quit [Remote host closed the connection]
aryaching has joined #ruby
rshetty has joined #ruby
gusTester1 has left #ruby [#ruby]
nhhagen has quit [Remote host closed the connection]
cdg has joined #ruby
acharnosh1 has joined #ruby
rshetty has quit [Remote host closed the connection]
rgtk has joined #ruby
podman has joined #ruby
dhjondoh has joined #ruby
trabulmonkee has quit [Quit: Connection closed for inactivity]
rshetty has joined #ruby
dnomyar has joined #ruby
aryaching_ has joined #ruby
aryaching_ has quit [Client Quit]
Igorshp has quit [Remote host closed the connection]
RegulationD has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 272 seconds]
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
Regulati_ has joined #ruby
rippa has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
elusiveother has joined #ruby
shredding has joined #ruby
rodfersou is now known as rodfersou|lunch
n008f4g_ has quit [Ping timeout: 260 seconds]
InternetFriend has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Jameser has joined #ruby
Channel6 has joined #ruby
bryanray has joined #ruby
denver has joined #ruby
finisherr has joined #ruby
syath has quit [Quit: WeeChat 1.2]
cdg has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
dhjondoh has joined #ruby
bnagy has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
aryaching has quit [Client Quit]
tmtwd has joined #ruby
aryaching has joined #ruby
Igorshp has joined #ruby
tagrudev has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has quit [Read error: Connection reset by peer]
bnagy has joined #ruby
Mission-Critical has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
aryaching has joined #ruby
aryaching has quit [Client Quit]
mclee_ has joined #ruby
aryaching has joined #ruby
alexdunne has joined #ruby
Fire-Dragon-DoL has joined #ruby
beast has quit [Quit: Leaving]
momomomomo_ has joined #ruby
jlebrech has quit [Remote host closed the connection]
wprice has quit [Quit: wprice]
umgrosscol has joined #ruby
aganov has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 255 seconds]
<BadRobot> hi, I have few gems I am using locally on machine, (ffi and win32/eventlog) and when I promote for production, they do not want to do (gem install <nameofgem>) because all our prod servers are not connected to internet, any other way to do it?
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
mag42c has quit [Ping timeout: 240 seconds]
rshetty has quit [Remote host closed the connection]
momomomomo_ has quit [Ping timeout: 250 seconds]
mag42c has joined #ruby
<shevy> how are these servers getting the gems
<shevy> if you can transfer them in another way, installing local gems is possible: "gem install ./*ffi*gem" should work
rshetty has joined #ruby
nertzy has joined #ruby
<BadRobot> shevy: I am currently using them in my local machine so I have a copy but not sure if it is safe to do it that way
momomomomo_ has joined #ruby
<shevy> perhaps you can teleport the bytes magically with brain power alone
MissionCritical has joined #ruby
<BadRobot> shevy: very usefulll!!!!! now go gem yourself
favadi has joined #ruby
<shevy> hah
the_new_tester has joined #ruby
<shevy> you never said how you were going to put these gems onto the servers
Rollabunna has joined #ruby
Igorshp has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
krz has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chrissonar has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
Igorshp has joined #ruby
<workmad3> BadRobot: if you're deploying an app that manages gems via bundler, you can also use the `bundle pack` command to download all the gem files that the app needs, which will then be used by `bundle install` when deploying
andikr has joined #ruby
wprice has joined #ruby
<shevy> BadRobot how do you get the gems on your servers again?
acharnosh1 has quit [Quit: WeeChat 1.3]
ldnunes has quit [Ping timeout: 246 seconds]
dhjondoh has joined #ruby
ldnunes has joined #ruby
kedare has quit [Ping timeout: 255 seconds]
dhjondoh has quit [Remote host closed the connection]
denver has quit [Killed (Sigyn (Spam is off topic on freenode.))]
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
mary5030 has joined #ruby
<BadRobot> workmad3: trying to avoid installing more stuff on the server, the company has an extreme allergies against good technologies hahahaha and design and programming patterns
<BadRobot> the real world they say!!!
kerunaru has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
jezeniel has joined #ruby
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
mary5030 has joined #ruby
arthurix has joined #ruby
axl_ has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiyosi has joined #ruby
kimegede has quit [Quit: Leaving...]
pdoherty has quit [Remote host closed the connection]
<Erik____> What's the action that makes a |placeholder| multiply by itself?
<Ox0dea> Erik____: You talk funny.
norc has quit [Ping timeout: 246 seconds]
acharnosh1 has joined #ruby
<yorickpeterse> Does anybody here run their own GitLab instance on PostgreSQL?
arthurix_ has quit [Ping timeout: 256 seconds]
<yorickpeterse> (or MySQL otherwise)
<shevy> Ox0dea a common trait of many webchatters I have found :)
<jonee> we run our own gitlab
northfurr has joined #ruby
hrs has joined #ruby
kaleido has joined #ruby
<yorickpeterse> jonee: Pg or MySQL?
skade has quit [Quit: Computer has gone to sleep.]
dionysus69 has joined #ruby
<Erik____> I wanna make n multiply by itself in this block https://gist.github.com/anonymous/12527d9103d2c8b5f35b , how to?
<Erik____> The code I wrote obviously failed :c
<shevy> Erik____ why did it fail? you multiply by itself already there
<rgtk> Erik____: use map() instead of each
<shevy> Erik____ if you wish to modify the array itself, use .map! rather than .each
skade has joined #ruby
yardenbar has quit [Ping timeout: 268 seconds]
<shevy> Erik____ n won't be available outside your {} though
<Ox0dea> Erik____: Hi.
DEA7TH has joined #ruby
<shevy> lol
<Erik____> My result is only a 4 for some reason
<Ox0dea> Erik____: *The* 4.
<Ox0dea> All the 4s are the same in Ruby.
<Erik____> huuuuh?
<Erik____> Why?
<rgtk> nilthing
<Ox0dea> >> 4.object_id == (2 + 2).object_id # Erik____
<ruboto> Ox0dea # => true (https://eval.in/459390)
<Ox0dea> Erik____: Because Fixnums are actually implemented as tagged pointers for efficiency in both time and space.
synthroid has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
beauby has quit [Read error: Connection reset by peer]
nertzy has quit [Quit: This computer has gone to sleep]
the_new_tester has left #ruby [#ruby]
<mikecmpbll> come with us now on a journey through time and space
<Erik____> Okay so I used map, but I still got 4 nil
<shevy> can you update your gist?
kaleido has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> Erik____ yeah, do: p array at the end, you can see that the array was modified. n is not available outside the {} though
hxegon has joined #ruby
<Erik____> Ohhh, thank you
finisherr has quit [Quit: finisherr]
<Erik____> What's the difference between .each and .map! ?
kaleido has joined #ruby
<Ox0dea> Nobody knows.
bruno- has joined #ruby
<Erik____> .map! works perfectly fine, but .each refuses to work for some reason
<shevy> Erik____ youc an think of .each just as iterating over your collection, whereas you can think of .map as "modify in place"
niemcu has joined #ruby
<yorickpeterse> .each => iterate over values
<shevy> or rather, modify on a per-element basis
<yorickpeterse> .map => create a new array for every value in the original array (based on what the block returns)
<yorickpeterse> .map! => do the same, but replace the values of the array it's called on
<zwdr> functions with ! on the end are usually destructive or have side effects :3
roxtrongo has quit [Read error: Connection reset by peer]
<yorickpeterse> >> x = [10, 20]; x.map { |num| num * 2 }
<ruboto> yorickpeterse # => [20, 40] (https://eval.in/459408)
<yorickpeterse> >> x = [10, 20]; x.map { |num| num * 2 }; x
<ruboto> yorickpeterse # => [10, 20] (https://eval.in/459410)
<yorickpeterse> >> x = [10, 20]; x.map! { |num| num * 2 }; x
<ruboto> yorickpeterse # => [20, 40] (https://eval.in/459411)
<Erik____> How would I write the code so I'd get the same result with .each ?
praveen_p has joined #ruby
finisherr has joined #ruby
<hxegon> Erik____: Is there a side effect you are trying to do?
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
praveen_p has left #ruby [#ruby]
elusiveother has quit [Quit: look at me still talking when there's science to do!]
vondruch has quit [Ping timeout: 256 seconds]
roxtrongo has joined #ruby
cwong_on_irc has joined #ruby
noboyd has joined #ruby
<Erik____> I'm learning via codecademy, and they've only taught me .each so far, so it must be some easy way to get the same result with .each aswell, as this is the task :D
finisherr has quit [Client Quit]
noboyd has quit [Client Quit]
<Erik____> there must be*
bricker has joined #ruby
<Ox0dea> Erik____: Get out of there before it's too late.
<hxegon> haha
<Erik____> What do you mean? :o
bruno- has quit [Ping timeout: 268 seconds]
skade has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
<Ox0dea> Erik____: If something which claims to teach you Ruby is advising you to use #each to destructively update an Array, you've taken a wrong turn.
madundead has joined #ruby
<hxegon> Erik____: pretty much
moeabdol1 has quit [Ping timeout: 256 seconds]
ibouvousaime has quit [Read error: Connection reset by peer]
<hxegon> Erik____: I've been trying to come up with a non-shitty example (that uses .each vs .each_with_index or something) but I'm so used to doing map for everything I'm not sure how I would
<Erik____> Wait wait wait, codecademy is bad? :OO
<Erik____> But everyone says it's the best :o
<hxegon> It's not aweful, but I think rubymonk or the koans are better
<hxegon> awful*
skade has joined #ruby
bMalum has quit [Quit: bMalum]
tarspace has joined #ruby
<tarspace> it is channer of ruby stone?
<tarspace> or ruby programmers?
<Ox0dea> tarspace: Either.
<hxegon> >> x = [1, 2]; x.each_with_index { |e, i| x[i] = e*2 }; x
<ruboto> hxegon # => [2, 4] (https://eval.in/459414)
<tarspace> xD
tarspace has left #ruby [#ruby]
dfinninger has joined #ruby
Cyther_ has quit [Read error: Connection reset by peer]
<gregf_> >> [1, 2].map{ |v| v*2 }
<ruboto> gregf_ # => [2, 4] (https://eval.in/459415)
<Erik____> Creator of Ruby is learning ruby on rubymonk :OOOOO
dionysus69 has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
<Ox0dea> >> xs = [1,2,3]; xs.each_index { |i| xs[i] *= xs[i] } # hxegon: If you really must.
<ruboto> Ox0dea # => [1, 4, 9] (https://eval.in/459416)
skade has joined #ruby
<Erik____> Are those some internal jokes I'm not getting get? I got that feeling
<hxegon> Ox0dea: you and your elegant bullshit
devoldmx has joined #ruby
<Erik____> What kind of music do you enjoy listening to while programming?
<adaedra> ?offtopic
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Get 'im!
kirun has joined #ruby
<greenbigfrog> does 'net/http' cache websites? I'm calling a (more or less static) json API but it displays diffrent things if I put it then with my browser
ibouvousaime has joined #ruby
acharnosh1 has quit [Quit: WeeChat 1.3]
<shevy> Erik____ Ox0dea can be very confusing ;)
NeverDie has joined #ruby
<Ox0dea> greenbigfrog: Net::HTTP is not sending the same headers as your browser, and any one of them could technically be the reason for a different response.
sdfgsdfg has quit [Read error: Connection reset by peer]
<greenbigfrog> hmmm
sdfgsdfg has joined #ruby
<Erik____> What programs have you guys made in ruby?
alexdunne has left #ruby [#ruby]
<mikecmpbll> all of them.
DoubleMalt has quit [Remote host closed the connection]
<hxegon> Erik____: mostly sinatra integration server stuff for ecommerce middleware
devoldmx has quit [Ping timeout: 265 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
cwong_on_irc1 has joined #ruby
<Ox0dea> Did somebody say Sinatra? http://i.imgur.com/94jou4v.png
<Erik____> <hxegon> Huh, what's sinatra integration server stuff?
<Zarthus> why are you taking screenshots of your code!
<hxegon> Ox0dea: WHAT IN GODS NAME
<Erik____> What is that :o
<Ox0dea> hxegon: It's probably better you didn't ask.
<mikecmpbll> please make a vine next time.
rcvalle has joined #ruby
lxsameer has quit [Quit: Leaving]
r0bby_ has joined #ruby
rcvalle has quit [Client Quit]
<Ox0dea> Zarthus: Because it's purdy and eval.in shits the bed: https://eval.in/459020
<hxegon> Erik____: sinatra is a simple webserver framework
rcvalle has joined #ruby
agit0 has joined #ruby
<Zarthus> I don't blame it
mrtomme has quit [Ping timeout: 260 seconds]
<Ox0dea> Sure, but I have no idea why it shows the code three separate times.
<Erik____> A framework for ruby, like Rails?
cwong_on_irc1 has quit [Max SendQ exceeded]
<hxegon> Erik____: and ecommerce middleware is stuff like a server that sends/transforms data between an ebay store and quickbooks
cwong_on_irc has quit [Ping timeout: 265 seconds]
<hxegon> Erik____: exactly, but way simpler
prettiestPony11 has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
mrtomme has joined #ruby
cwong_on_irc has joined #ruby
<Erik____> Are you a seasoned programmer or young?
northfurr has quit [Quit: northfurr]
FernandoBasso has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
amclain has joined #ruby
The_Phoenix has joined #ruby
<Zarthus> I program regardless of season
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
banister has joined #ruby
<Erik____> <Zarthus> lmao
<hxegon> Erik____: Youngish, 23, but I've been programming for a while. I wouldn't call myself seasoned, but I'm not a beginner either
cwong_on_irc has joined #ruby
<Erik____> For how long?
cwong_on_irc has quit [Max SendQ exceeded]
moeabdol1 has joined #ruby
GarethAdams has quit [Ping timeout: 256 seconds]
krz has quit [Quit: WeeChat 1.2]
cwong_on_irc has joined #ruby
<hxegon> Erik____: hmm... 6-7 years? I read little brother by Cory Doctorow and thought his description of programming sounded amazing
jimms has quit [Remote host closed the connection]
cwong_on_irc has quit [Max SendQ exceeded]
<hxegon> Erik____: but there really isn't a wrong time to start
rshetty has quit [Remote host closed the connection]
<hxegon> Erik____: on and off though during that time except in the last 2-3 years
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Erik____> How many languages do you know?
cwong_on_irc has joined #ruby
<Erik____> And which ones :D
shadoi has joined #ruby
momomomomo_ has quit [Ping timeout: 272 seconds]
cwong_on_irc has quit [Max SendQ exceeded]
<hxegon> Erik____: only 3 better than just dabling
<hxegon> Erik____: bash/zsh, python and ruby
bweston92 has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
towski_ has joined #ruby
The_Phoenix has quit [Ping timeout: 240 seconds]
jonee has quit [Ping timeout: 240 seconds]
<Erik____> <hxegon> You don't know HTML + CSS?
timonv has joined #ruby
cwong_on_irc1 has joined #ruby
elusiveother has joined #ruby
Jameser has quit [Ping timeout: 240 seconds]
<hxegon> Erik____: I don't really consider those programming languages strictly IMO
<hxegon> Erik____: but yeah
tkuchiki has quit [Remote host closed the connection]
<shevy> Zarthus lol
<eam> win 2
shadoi has quit [Ping timeout: 240 seconds]
<eam> whoops
<Erik____> Is it easier/harder to get job as ruby programmer compared to other languages?
h99h9h88 has quit [Remote host closed the connection]
<shevy> one day I will be able to publish a massive amount of funny quotes from #ruby
GarethAdams has joined #ruby
<shevy> use java to get a job Erik____
cwong_on_irc has quit [Ping timeout: 246 seconds]
bMalum has joined #ruby
<hxegon> Erik____: I've only recently gotten a full time position, before that I was doing freelance projects for small business stuff, so not sure I'm the best person to ask
<adaedra> shevy: that was mean.
<hxegon> Erik____: Don't sell the tech, sell the ability to get shit done
momomomomo_ has joined #ruby
<mikecmpbll> i do ruby and i have a job
mjuszczak has joined #ruby
<adaedra> congrats.
<shevy> adaedra java is the most powerful language according to tiobe!
<zwdr> Hey, CSS3 is turing complete!
krz has joined #ruby
<mikecmpbll> it's wonderful, isn't it.
<adaedra> shevy: if only I cared.
<mikecmpbll> god bless matz.
big|bad|wolf has joined #ruby
<Erik____> Aye, I know that getting shit done and personality is important in the tech world.
polishdub has joined #ruby
<adaedra> get(
dnomyar_ has joined #ruby
<Erik____> def
<mikecmpbll> a getter in ruby? :O
InternetFriend has joined #ruby
aspiers has quit [Ping timeout: 265 seconds]
[Butch] has joined #ruby
<adaedra> I should make a ruby library in unicode.
hrs has joined #ruby
<adaedra> I mean, in emoji.
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
rgtk has quit [Remote host closed the connection]
dnomyar has quit [Ping timeout: 264 seconds]
finisherr has joined #ruby
<adaedra> ✉️.new.tap do |
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
finisherr has left #ruby [#ruby]
aufi has quit [Quit: Konversation terminated!]
synthroid has joined #ruby
Erik____ has quit [Ping timeout: 246 seconds]
jonee has joined #ruby
blueOxigen has joined #ruby
<Ox0dea> adaedra: About that: https://github.com/anowell/emoji-lang
maletor has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
segfalt_ has joined #ruby
segfalt has quit [Quit: segfalt]
segfalt_ is now known as segfalt
<adaedra> Ox0dea: amazing. Why are we using boring US-ASCII characters if we have that then?
ivanskie has joined #ruby
<Ox0dea> adaedra: Sometimes I only use 9, 10, and 32.
<Ox0dea> They're still ASCII, but I don't have to look at them.
<hxegon> adaedra: because we aren't 10xr rockstar ninja gurus
<Ox0dea> Some kind of Zalgo language would be interesting.
<hxegon> haha
ibouvousaime has quit [Ping timeout: 272 seconds]
<adaedra> oh god.
<Ox0dea> It's gonna happen now, isn't it?
AMERICAN_PSYCHO has quit [Ping timeout: 255 seconds]
<hxegon> >> class String; def new; puts 'HES COMING OHOGODOHGODOHGOD'; end; end String.new
<ruboto> hxegon # => /tmp/execpad-e739165ffbdf/source-e739165ffbdf:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/459431)
SCHAAP137 has quit [Remote host closed the connection]
<hxegon> aww
<adaedra> miss a ;
<adaedra> >> class String; def new; puts 'HES COMING OHOGODOHGODOHGOD'; end; end; String.new
<ruboto> adaedra # => "" (https://eval.in/459432)
<adaedra> and it's not new you should be defining.
darkf has quit [Quit: Leaving]
<hxegon> * faceplams
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdfgsdfg has quit [Read error: Connection reset by peer]
malconis has joined #ruby
<mikecmpbll> :D
<hxegon> anytime you parse HTML with a regex, thats zalgo language
benlieb has joined #ruby
<adaedra> ?zalgo
<ruboto> I don't know anything about zalgo
benlieb has joined #ruby
rodfersou|lunch is now known as rodfersou
<karapetyan> can i know index of deleted element in array?
<Ox0dea> karapetyan: I think not. :<
<Ox0dea> Are you sure you need it?
<karapetyan> ok then i can use delete_at and store it.
<Ox0dea> Right.
<karapetyan> Ox0dea: thank you.
<Ox0dea> karapetyan: Sure, but... are you sure?
segfalt has quit [Quit: leaving]
Bloomer has joined #ruby
<Ox0dea> Never mind; a use case or two sprung up.
<karapetyan> Ox0dea: i need remove all elements from array until there will be last element. And next removed element should be +3 index from last deleted element
<karapetyan> ehm, i hope i describe my task correctly.
Quandl has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> karapetyan: Sure, I see what you're going for.
<karapetyan> Ox0dea: i think there is a math trick to make it another way. But i try to iterate array for now)
<Ox0dea> karapetyan: It's the soldiers in a circle or some such, yeah?
<karapetyan> Ox0dea: right )
roxtrongo has quit [Remote host closed the connection]
<Ox0dea> karapetyan: There are certainly cleverer ways to go about it, but you can always refactor.
araujo has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<Ox0dea> Do you know #rotate?
<adaedra> You spin me right round ♪
chouhoulis has joined #ruby
jonee has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
<karapetyan> Ox0dea: yes, for now i trying to figure out can perseverance take over my dullness and can i become developer or not
segfalt has joined #ruby
nemo_ has joined #ruby
prettiestPony11 has quit [Quit: Textual IRC Client: www.textualapp.com]
<karapetyan> and i actually not often make good kata solution on codewars.
<karapetyan> )
Quandl has joined #ruby
mistym- is now known as mistym
mistym has quit [Changing host]
mistym has joined #ruby
<Ox0dea> Just keep sharpening your katana.
<Ox0dea> Even if you only end up being able to slice through butter, you'll be able to make delicious toast.
benlieb has quit [Quit: benlieb]
mclee_ has quit [Ping timeout: 240 seconds]
<hxegon> karapetyan: how do you like codewars? I've been meaning to try it out
<Ox0dea> That wasn't nearly as motivational as I'd intended, but I hope you took the gist.
_djbkd has joined #ruby
stan has quit [Ping timeout: 240 seconds]
mark2 has quit [Remote host closed the connection]
Quandl has quit [Read error: Connection reset by peer]
<karapetyan> hxegon: i like codewars.
<karapetyan> Ox0dea: thanks]
ESpiney__ has joined #ruby
bruno- has joined #ruby
sharkman has joined #ruby
<sharkman> test
cdg has quit [Read error: Connection reset by peer]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<sharkman> if i have a variable, and its either a date, or a range of dates (i.e. Thu, 05 Sep 2013..Fri, 20 Dec 2013) what is a quick way to check that
<sharkman> if i want to verify that it is a single date
tlarevo has joined #ruby
Erik____ has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
Jardayn has joined #ruby
karapetyan has quit [Remote host closed the connection]
rakm has joined #ruby
karapetyan has joined #ruby
ESpiney_ has quit [Ping timeout: 250 seconds]
moeabdol1 has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 240 seconds]
Motoservo has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 268 seconds]
Igorshp has quit [Remote host closed the connection]
<Ox0dea> sharkman: Ask it.
Jameser has joined #ruby
SleepySensei has joined #ruby
<Erik____> What programs do you use to write in Ruby?
karapetyan has quit [Ping timeout: 250 seconds]
<hxegon> sharkman: well you could do dates.is_a? or a case statement
ibouvousaime has joined #ruby
Igorshp has joined #ruby
<hxegon> sharkman: or you could do [dates].flatten to standardize it to an array
Pathfinder has joined #ruby
nemo__ has joined #ruby
<hxegon> sharkman: I'm sure there are better ways, but that's how I've seen it done
hrs has joined #ruby
beauby has quit [Ping timeout: 250 seconds]
bryanray has joined #ruby
<Ox0dea> hxegon: [dates].flatten == Array(dates) == [*dates]
zfez has joined #ruby
<Ox0dea> Yay, Ruby.
beauby has joined #ruby
<hxegon> Ox0dea: thanks, I like [*dates] much better
Jameser has quit [Ping timeout: 244 seconds]
<Ox0dea> Same. <3
troulouliou_div2 has joined #ruby
cdg has quit [Remote host closed the connection]
nemo_ has quit [Ping timeout: 264 seconds]
kaleido has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon> Erik____: vim/neovim and the command line tools
banister has quit [Read error: Connection reset by peer]
<hxegon> Erik____: so pry mostly :)
kaleido has joined #ruby
Fire-Dragon-DoL has quit [Remote host closed the connection]
kaleido has quit [Client Quit]
ibouvousaime has quit [Ping timeout: 246 seconds]
momomomomo_ has quit [Quit: momomomomo_]
erbesharat has quit [Ping timeout: 246 seconds]
SleepySensei has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has quit [Quit: bMalum]
SleepySensei has joined #ruby
tlarevo has left #ruby [#ruby]
TomyWork has quit [Ping timeout: 260 seconds]
<hxegon> Erik____: I would highly recommend learning either emacs or vim
madundead has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
Renich has quit [Ping timeout: 252 seconds]
<shevy> ewww
<Erik____> Okay, what are they good for?
Renich has joined #ruby
<adaedra> shevy: no, they are fine.
northfurr has joined #ruby
<adaedra> Erik____: those are text editors.
<adaedra> /powerfull/ text editors.
<shevy> they have a huge entry barrier
<Erik____> I know, but why them over for example notepad
<hxegon> Erik____: well, I can only speak for vim, but after you learn it everything else seems stupidly painful to use because you edit text in vim the same way you think
umgrosscol has quit [Remote host closed the connection]
dfockler has joined #ruby
T1loc has quit [Quit: crash-test aborted]
<adaedra> shevy: so you stop at the first difficult thing? Pff.
ruurd has quit [Read error: Connection reset by peer]
<shevy> adaedra absolutely not. I make sure that it is worth it. emacs and vim were not worth it at all, ruby is
favadi has quit [Ping timeout: 268 seconds]
<adaedra> lol.
<hxegon> shevy: I feel like the entry barrier is exaturated. For the first week for sure you are floundering, but after that its nothing but gains
<adaedra> add this to you quote collection, "emacs and vim are not worth it at all".
<Ox0dea> > exaturated
jenrzzz has joined #ruby
<hxegon> Erik____: for example, in notepad to delete a word behind your cursor you would mash backspace until its done. in vim, press db
<adaedra> or ^W in insert mode.
<hxegon> Ox0dea: wow thats misspelled
<hxegon> exaggerated*
joonty has joined #ruby
dtraveler has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
<Erik____> No, exaturated saturated.
<adaedra> Erik____: emacs and vim are tools that can be a bit uneasy to learn, but once took in hand are great tools to work with.
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has quit [Client Quit]
<hxegon> Erik____: 2 delete 2 words behind cursor, 2db. you use mnemonic key sequences (2 delete word) to do edits
<Erik____> Alright
InternetFriend has joined #ruby
<Erik____> db= down button?
<shevy> hehe
<adaedra> no, d then b keys.
<hxegon> haha
<shevy> it tampers with your brain
<hxegon> j k h l, don't ask why but they aren't hard to get used to
allomov has joined #ruby
<shevy> that was your cat type it
<hxegon> d is delete, b is back
SleepySensei has joined #ruby
<dtraveler> Hi, I want to replace all occurrences of " [anywordcangohere]" with "-" in a string.
<dtraveler> I am trying to use gsub. But no luck so far. Can someone please help me?
<adaedra> hxegon: I use vim but don't use hjkl.
Eiam_ has joined #ruby
<hxegon> adaedra: you use arrow keys?
<adaedra> dtraveler: what did you try?
<shevy> adaedra you are a sinner! use vim in vi mode
<adaedra> hxegon: yes. It's not the '80 anymore.
<shevy> :D
<dtraveler> adaedra: line.gsub(/\\[(\w+)\\]/, "")
<Erik____> Vim seems pretty nice when you talk about it
northfurr has joined #ruby
Bloomer has quit []
<adaedra> dtraveler: waouh, you went far.
<hxegon> Erik____: I would *never* use anything else unless there was no other choice.
<dtraveler> basically i want to replace it with "" or "-"
<shevy> Erik____ yeah, vim is almost as good as emacs
<adaedra> Erik____: it is! run vimtutor if you have it.
<adaedra> dtraveler: first, do you know rubular?
<Erik____> vim vs emacs, which is best?
<Erik____> :D
<adaedra> DON'T GO THERE.
<hxegon> Erik____: that is a bear your poking
<dtraveler> adaedra: I am new to ruby. :(
gisli has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<adaedra> dtraveler: http://rubular.com will help you with regexps.
<shevy> regexes can be quite difficult
senayar has quit []
<dtraveler> I am trying that.
<Erik____> What does vim have that emacs doesn't have, and vice versa?
<shevy> so your target is " [word]" such as: " [fox]" or " [cat]" ?
<shevy> Erik____ emacs has a lot more
<adaedra> Erik____: vim won't break your fingers.
<eam> neither will emacs
<eam> emacs supports all the vi key bindings
pdoherty has joined #ruby
<shevy> Erik____ emacs-24.5.tar.xz 38M, vim-7.4.tar.xz 7,3M
<dtraveler> shevy: Yes.
<adaedra> Yes, once you M-x C-S-d M-S-X-R-T-
joonty has quit [Ping timeout: 268 seconds]
<eam> vi style keybindings are way better, but you can just load 'em in emacs
<eam> it's the best vi
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> Erik____: best is to try them both and see.
<hxegon> Erik____: basically you can have tetris and browse mail in emacs and it uses key combinations, where as vim is supposed to integate with other tools
<eam> vim, well, might be good for non-programmers
<hxegon> Erik____: what adaedra said
<adaedra> Personally I prefer vim, even after having worked a while with emacs.
dikaio has joined #ruby
<hxegon> same here
<eam> vim has this weird thing called vimscript embedded, emacs has a lisp dialect
<shevy> dtraveler http://rubular.com/r/2XkLBOO0zs - can you give an example string though?
<Erik____> What's lisp even?
ruurd has joined #ruby
<shevy> (this(is(lisp Erik____
<Ox0dea> )))
<shevy> I hate the )
<gisli> Hiya, having problem with some ruby code and being unexperienced in Ruby I'm not sure what the problem is. Although the exec-command returns an exit code of '1' the 'javaORnode' variable is always "java", any ideas? https://gist.github.com/gislifreyr/9872e71673f86dae55c3
<shevy> lisp would be twice as pretty without the )
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
<Ox0dea> shevy: Aye, I've noticed you tend not to `end` your example code.
symm- has joined #ruby
<adaedra> shevy is a python programmer is disguise.
<shevy> Erik____ scheme can be quite a lot of fun, it should be a lisp dialect; the whole world for this game is written in scheme .scm files, have a look if you are curious http://downloads.sourceforge.net/project/nazghul/nazghul/nazghul-0.7.1/nazghul-0.7.1.tar.gz
dnomyar_ has quit [Ping timeout: 268 seconds]
<shevy> Ox0dea I have to use end :(
<shevy> it's one thing I would like about python actually, but only if it is optional
<dtraveler> shevy: Thanks a lot.
shadoi has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
<Erik____> <shevy> The whole page source is listed as "badware"
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Remote host closed the connection]
<Ox0dea> gisli: Do you have to use that monster just to run `which`?
<shevy> the ultimate programming language would be a merge of python and ruby. just think about unifying a philosophy that states that there is more than one way to do things AND to also state at the same time that there would be only one way to do something
<shevy> Erik____ yeah sourceforge fell from grace
nemo__ has quit [Remote host closed the connection]
<shevy> but the nazghul game was fine, I played it years ago up to perhaps the fourth town
<hxegon> Erik____: lisp is an extremely simple language that is stupidly powerful. other language that are technically lisp: clojure, scheme, racket, many many more
<shevy> ultima-nostalgia
<gisli> Ox0dea: The monster being facter?
<Ox0dea> gisli: Sure.
<Ox0dea> I mean, is it doing something special?
kobain has joined #ruby
diegoviola has joined #ruby
NeverDie has quit [Ping timeout: 268 seconds]
<baweaver> Ox0dea: going on vacation tomorrow and date tonight so might not get through that all.
<Ox0dea> baweaver: You've got one line left?!
<shevy> dam party!
<gisli> Ox0dea: I need to have the value of it in a few places in puppet yes. That is, I need to know if java is installed and act on that.
<Ox0dea> gisli: Right, you've not answered my question, though.
<baweaver> I still have to string it all together, and one of your lines doesn't count as one line :P
NeverDie has joined #ruby
<Ox0dea> gisli: `which java`.empty? ? 'node' : 'java'
<dtraveler> Just a quick question, if an expression is present at the last line of a function, it is returned implicitly(without the return keyword)?
<eam> dtraveler: yes
<adaedra> the result, yes
<dtraveler> eam: Thanks
<dtraveler> adaedra: Thanks
<Ox0dea> dtraveler: Thanks.
erbesharat has joined #ruby
<adaedra> Ox0dea: Thanks.
<dtraveler> :P Its okay.
<Ox0dea> dtraveler: Thank you for being thankful.
sigurding has quit [Quit: sigurding]
<Ox0dea> adaedra: Thanks for thanking.
<adaedra> #ruby-canada.
<adaedra> Sorry.
<dtraveler> Ox0dea: :)
nemo_ has joined #ruby
bb010g has joined #ruby
shadoi has quit [Quit: Leaving.]
<Ox0dea> gisli: Will that not do, then?
Igorshp has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> baweaver: Are you going to show your date this wizardry of which you are capable?
<Ox0dea> *Muggle-ry?
<baweaver> -> offtopic
<gisli> Ox0dea: Ahh I see. Although I'm not getting the fact to print...
<Ox0dea> gisli: Are you... printing it?
ibouvousaime has joined #ruby
<adaedra> $stdout.reopen('/dev/lp0')
Eiam_ has quit [Ping timeout: 260 seconds]
<gisli> Ox0dea: well no not really but it should be output when I run facter (sorry for not using the right words, not my 1st language)
sharkman has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> gisli: I don't know anything about Facter, but things tend not to get printed automatically.
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfrz has quit [Quit: Leaving.]
diegoaguilar has joined #ruby
The_Phoenix has joined #ruby
<gisli> Ox0dea: okay, so how would I assign the value 'node' or 'java' to a variable?
<shevy> variable = 'node'
<hxegon> variable = 'node'?
<shevy> hey
<hxegon> jinx
<shevy> did you copy-steal that! :D
<hxegon> no
<shevy> hehe
<Erik____> Guys, I'm unable to download ruby from ruby installer: dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.3.exe because my antivirus refuses to let me see it as they've detected malware. Is there actual malware???
<hxegon> Erik____: no
fmcgeough has joined #ruby
<Ox0dea> Erik____: Yes, your operating system.
<gisli> shevy, hxegon: well yeah but how woudl I do it when I'm doing this? `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' (sorry, ruby noob)
n008f4g_ has joined #ruby
<hxegon> Erik____: what Ox0dea said, but just let it pass
<Ox0dea> gisli: Any expression can be assigned.
<shevy> gisli ah well `` returns something
<Ox0dea> It *evaluates* to something.
<Erik____> You don't like Windows? Do you prefer linux?
bryanray has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
<hxegon> gisli: how would you print it? just put puts in front of it
<shevy> gisli in this case you could do: variable = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java'
<hxegon> Erik____: yeah, been windows free since I was 15
<shevy> and now you are 16!
<hxegon> Erik____: not hating, but it really helped me understand computers more
jezeniel has quit [Quit: Leaving]
<Erik____> Oh, I can't hear you over all the games I can play
<Ox0dea> hxegon: Well done, but irssi is still for masochists.
<shevy> I sorta ditched windows almost hand-in-hand when I was going into ruby (actually, I started with perl first, so perhaps the first two years I did not use ruby)
<Erik____> :D
<hxegon> shevy: actually I'm 14 now. Don't oppress me with you chrononormative BS
<shevy> hxegon :D
<adaedra> Erik____: for dev (except Windows dev), Windows is bad.
<shevy> being young is much cooler than being old
krz has quit [Quit: WeeChat 1.2]
<adaedra> Ox0dea: I get you use it?
<hxegon> Ox0dea: It works good enough for me
<Ox0dea> hxegon: Check your causality at the wormhole, Time Lord.
<gisli> shevy: yeah I'm doing that and returning the value in the next line but I believe this has something to do with facter because it's not picking ut up when I return it. avaORnode = `/usr/bin/which java 2>/dev/null`.empty? ? 'node' : 'java' javaORnode
<Erik____> Hxegon, you're swedish?
<lianj> shevy: which returns non 0 on failure. just use system instead of ``.empty? crap
<gisli> missing a 'j' there
<Ox0dea> adaedra: pelican.jpg, but no.
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
deception1 has quit [Quit: Leaving.]
<hxegon> Erik____: only in spirit (._.), jk AMERICUN AS FUUUUUUCK PARTNER
devoldmx has joined #ruby
<adaedra> Erik____: varför?
cyle has joined #ruby
linduxed has quit [Ping timeout: 240 seconds]
mjuszczak has quit []
<shevy> lianj it is his code - if you wanna help him, please use gisli there
al2o3-cr has joined #ruby
karapetyan has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
rbowlby has joined #ruby
<hxegon> Ox0dea: CAUSALITY TRIGGERS ME SHITLORD!
beauby has quit [Ping timeout: 256 seconds]
umdstu has quit [Ping timeout: 246 seconds]
<hxegon> Ox0dea: you need to tag your messages for us anti-causal folk
northfurr has quit [Quit: northfurr]
zfez has quit [Quit: Page closed]
<Ox0dea> lianj: What's terrible about ```.empty?`?
<pipework> Ox0dea: are you intentionall backticking?
<Ox0dea> pipework: Habit.
karapetyan has quit [Remote host closed the connection]
<Ox0dea> I like to be precise.
<pipework> Ox0dea: Cause I was gonna be all, "Tricksy Ox0dea"
karapetyan has joined #ruby
<adaedra> `%x .empty?`
postmodern has joined #ruby
ochkoffein has joined #ruby
FernandoBasso has quit [Quit: Leaving]
nemo_ has quit [Remote host closed the connection]
northfurr has joined #ruby
p0wn3d__ has joined #ruby
roxtrongo has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
leafybas_ has joined #ruby
bMalum has joined #ruby
Erik____ has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
kaleido has joined #ruby
nemo_ has joined #ruby
<adaedra> It's quiet in here.
roxtrongo has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
<purplexed-> moo?!
<hxegon> \/\/\/\^v^v^v^v^v~~~~~~=======
<gisli> okay guys (no tagging, so many were helping) I figured it out. Facter needs the 'setcode do' line so after I added that it works flawlessly. https://gist.github.com/gislifreyr/9872e71673f86dae55c3
<gisli> Thanks alot for your help ;)
<purplexed-> so I'm wondering about how to best deploy my two applications, that will be working together on a server... Should I be bundling it into a gem, and then gem install on the client server ?
Igorshp has joined #ruby
dopie has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 272 seconds]
leafybas_ has quit [Ping timeout: 244 seconds]
<purplexed-> is that a typical way of installing an application ?
dnomyar has joined #ruby
<purplexed-> maybe, similar to chocolatey on windows ?
Motoservo has joined #ruby
<pipework> purplexed-: You can package your application for the system package manager(s) you want to target.
pocketprotector- has joined #ruby
to_json has quit [Quit: Leaving.]
freerobby has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
Igorshp has joined #ruby
<shevy> gisli \o/
<purplexed-> pipework, my target, for now, will be windows ... except for windows 10, i don't think windows comes with a built in package manager
Pathfinder has quit [Ping timeout: 260 seconds]
<pipework> purplexed-: there's a thing called orca, I think.
<pipework> Windows ain't my thang, so I can't help anymore than that.
<purplexed-> yes, but that requires additional install on the client, doesn't it ?
<purplexed-> but yeah, I heard about orca
moeabdol1 has joined #ruby
ibouvousaime has quit [Ping timeout: 246 seconds]
<purplexed-> ocra is the name.. not orca :D
<pipework> evidence of how in touch I am with windows.
dnomyar has quit [Ping timeout: 246 seconds]
<purplexed-> windows is getting interesting though, with their headless servers and nano servers
<pipework> It's a shame that it's being made by microsoft though.
<pipework> But if it makes you happy or makes you money, I have no qualms with it.
<purplexed-> it think you should spend some time looking at what is going on over at microsoft... they are really changing
<pipework> purplexed-: I stop supporting companies that want to use data on my local network to their benefit and my detriment.
<pipework> I isolate most things that I'm not sure about, but I get rid of things that I am sure about.
lkba has joined #ruby
<shevy> so you isolate your cat
<pipework> My tinfoil hat takes precedence over silly features that have been in other softwares for decades.
<purplexed-> yes, but when things change, so should your opinions. :)
<pipework> purplexed-: They haven't changed yet, and I don't .trust them as a company.
moeabdol1 has quit [Ping timeout: 252 seconds]
<pipework> shevy: My cat isolates me.
troulouliou_div2 has quit [Remote host closed the connection]
<purplexed-> I can identify with your opinions. But i don't think they are as valid as they have been.
djstorm has joined #ruby
<eam> there's really not much compelling about windows at this point, and less so every year
<Ox0dea> > We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors.
<Ox0dea> pipework: ^
<pipework> purplexed-: Then I don't think you're up to date on the situation in windows 10 and that they've backported their 'helpful features' to other OS's
<purplexed-> just want you to know that things are changing, ..
deception1 has joined #ruby
<purplexed-> there are lots of things I don't know either :)
<eam> they're changing because msft is rapidly losing ground and becoming irrelevant
<eam> you can't play the strongarm monopoly card when customers have better alternatives
<purplexed-> is there an echo in here? ;)
<gisli> .quit
gisli has quit [Quit: leaving]
<pipework> I'll stick to open source and companies that at least have the self-awareness to publicly appear as if they defend my privacy.
ta has joined #ruby
<pipework> It takes a lot to repair .trust with me.
<purplexed-> .net is open source isn't it ?
<pipework> purplexed-: One small part to a very large ecosystem.
ochkoffein has quit [Ping timeout: 250 seconds]
<purplexed-> oh well, I'm stuck working with the platform.. but I'm happy about the changes they are making.. ofcourse, Sharepoint still exists, so, they still have to make up for that
<purplexed-> and that will take some time
<pipework> Yeah, if you're already stuck in it, it seems like stockholm syndrome would be the easiest path forward.
towski_ has quit [Remote host closed the connection]
<purplexed-> yes, I'm coding ruby because I have stockholm syndrome
<pipework> People sometimes have moments of clarity. :D
elusiveother has quit [Quit: look at me still talking when there's science to do!]
<purplexed-> and some people are just stuck on their beliefs :p
kfrz has joined #ruby
<pipework> I'm glad you're writing ruby and that there are some people who invest into the platform. I don't think that windows users should be imprisoned by their OS without any lifelines to the world of open source and trustworthy software.
<purplexed-> aaaaanyway
<eam> purplexed-: if you think this perspective is borne from bias you couldn't be more wrong
ivanskie has joined #ruby
<eam> I've worked at msft, I have many friends there
Musashi007 has joined #ruby
<eam> they're rapidly losing ground - that's why the change of direction
bruno- has joined #ruby
<eam> that's just a fact
<purplexed-> yeah, i can see they are losing the cloud race
baweaver has quit [Remote host closed the connection]
<purplexed-> I myself stopped using Azure because I think it sucks
cyle has quit [Quit: leaving]
shpoont has joined #ruby
<eam> the people least happy with their ridgid licensing are msft developers -- it really doesn't impact the oss community too much anymore
<pipework> I'm chums with people on the UX teams, browser team, and lower non-dev stuff. A number of them contribute to open source any way that they can without losing their jobs because they believe in it so earnestly.
<pipework> eam: It causes a funny uproar when msft publishes non-free barely open code to github tough.
<pipework> though*
northfurr has quit [Quit: northfurr]
<purplexed-> btw, I just work with ms stuff, because that's where I ended up... but I'm trying to introduce new stuff at my place of work... ruby is one of them
towski_ has joined #ruby
sigurding has joined #ruby
<pipework> eam: Have you seen those neat libre laptops?
<pipework> Free hardware is the goal, it's really great.
<pipework> as in beer
zenguy_pc has quit [Read error: Connection reset by peer]
kfrz1 has joined #ruby
skweek has joined #ruby
rodfersou has quit [Quit: leaving]
chipotle has quit [Quit: cheerio]
<shadoi> #microrubysoft
Rollabunna has quit [Remote host closed the connection]
<eam> pipework: not gonna happen
<pipework> eam: What do you mean? That you won't use it, or that it won't ever ship?
Rollabunna has joined #ruby
towski_ has quit [Remote host closed the connection]
<eam> high end hardware is never gonna have non-binary blob based hardware. I just checked out https://www.crowdsupply.com/purism/librem-15 if that's what you're talking about and they ship with an nvidia chipset ...
kfrz has quit [Ping timeout: 260 seconds]
<eam> maybe they're saying you can use the non-accelerated driver?
<pipework> eam: They're working on acquiring hardware that can have open source replace the binary blobs.
<eam> yeah, that's what's not gonna work
<eam> don't get me wrong, I wish it would and I love the idea
<pipework> eam: It's better than hardware that can't have the binary blobs replaced.
<eam> sure
<pipework> It opens the door for open source where right miaow most hardware can't have the binary blobs replaced.
AccordLTN has quit []
Motoservo has quit [Read error: Connection reset by peer]
Motoservo has joined #ruby
Guest53 has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
Erik_Underline has joined #ruby
<Erik_Underline> Back
dnomyar has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ochkoffein has joined #ruby
<Erik_Underline> What's the best line of code, to sort an array descendingly(in reverse that is), as opposed to ascendingly with .sort! ?
<Erik_Underline> I'm Erik___ btw :P
rbennacer has quit [Remote host closed the connection]
baweaver has joined #ruby
<Coraline> a.sort.reverse ?
rbennacer has joined #ruby
<Erik_Underline> Huh, it's that simple xD
Motoservo has quit [Read error: Connection reset by peer]
<Erik_Underline> I kept using a.sort! do |x,y| y<=>x end
<havenwood> Erik_Underline: Or: sort_by { |n| -n }
pdoherty has quit [Ping timeout: 272 seconds]
<Ox0dea> Erik_Underline: Do you have a minute?
Channel6 has joined #ruby
<havenwood> Erik_Underline: Never mind my last comment, I need more coffee.
ruurd has quit [Quit: ZZZzzz…]
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
ruurd has joined #ruby
<Erik_Underline> <Ox0dea> Yeah what?
rbennacer has quit [Ping timeout: 256 seconds]
<Ox0dea> Erik_Underline: I'd like to show you why you should strongly consider giving Vim a shot. :)
Motoservo has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shadoi> LOL
<shadoi> Or: Let's restart an ages old religious flamewar!
<Ox0dea> Somebody posted to /r/vim a while back boasting about how Sublime gives them multiple cursors, and that it really speeds up their process: http://i.imgur.com/X8nzX5H.gif
<Erik_Underline> <Ox0dea> I've barely even learned the basics of Ruby and programming :O
<Ox0dea> Please do try to sit through the whole thing; they thought they were really moving.
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> And then watch how it's done in Vim: https://asciinema.org/api/asciicasts/14036
<Ox0dea> Note well that a macro is being used in the latter case, and so the approach essentially scales infinitely.
firstdayonthejob has quit [Ping timeout: 255 seconds]
zenguy_pc has joined #ruby
<Ox0dea> Whether there were four or four million items, the Vimmer could simply say `4000000@@` and be done with it.
<Erik_Underline> Okay, I'll watch them. Do they program in ruby?
NeverDie has joined #ruby
<Ox0dea> The Sublime user would still be holding Ctrl and mashing their Down arrow until the kingdom came.
<eam> uh clearly they should've used ruby metaprogramming to solve that problem
<Ox0dea> Erik_Underline: The language is immaterial for this demonstration.
rgtk has joined #ruby
NeverDie has quit [Max SendQ exceeded]
_djbkd has quit [Remote host closed the connection]
teclator has quit [Ping timeout: 244 seconds]
Igorshp has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<Erik_Underline> Vim was very fast
poguez_ has joined #ruby
chipotle has joined #ruby
<Ox0dea> Erik_Underline: Now that you've seen it, watching the other one is kind of infuriating, no?
<pipework> There's precious few meaningful productivity features that aren't also available in the vim ecosystem.
<Erik_Underline> It is. But that stuff seems pretty advanced for a newb like me
<Erik_Underline> I'm still a squire, I should learn how to fight before I become a knight myself.
<pipework> Erik_Underline: Everything is advanced until you do it though, and then everything you've done is, more or less, quite easy. :D
timonv has quit [Ping timeout: 250 seconds]
<segfalt> I'd been using Emacs for half a year and realized after watching a talk that I missed the power of vim. Now I use Spacemacs, so I get all the pain and benefits of both :-).
<Ox0dea> Erik_Underline: It's dangerous to go alone! Here, take this: A,^Mdesc: ''^[^Wwjy$^WwP3j
AccordLTN has joined #ruby
NeverDie has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
<pipework> segfalt: That neat helm thing is cool.
<Erik_Underline> <Ox0dea> What is that
<Ox0dea> Erik_Underline: That's the macro being used in the Vim demonstration.
<segfalt> pipework: Overall, Spacemacs is very cool. Though it does leave you feeling unsure of how it all works, unlike if you home-brew your own .emacs.d/ collection.
Motoservo has quit [Ping timeout: 250 seconds]
<Ox0dea> Erik_Underline: You record it into a "macro buffer" once, and then you can replay it as often as you like.
<pipework> segfalt: Yeah, but I bet people who copy other people's vimrc's without going and playing with each and every bit feel the same.
<segfalt> I have been having some issues with macros, ironically, I go to replay a macro (or even use '.' in some modes) and I get part of my macro inserted into my buffer. Very frustrating...
<segfalt> pipework: Totally.
_djbkd has joined #ruby
<segfalt> pipework: I never learned Vimscript or whatever, so I just had a huge .vimrc that confused me. I did spend some time learning elisp (It's more approachable in that you can hack on it right in the editor, with context and tab-completion).
Pathfinder has joined #ruby
<Ox0dea> Using somebody else's config files is akin to eating food you've just seen them spit out.
<segfalt> Lol.
<pipework> segfalt: I don't know vimscript either. I just hack stuff together.
<segfalt> Did they look happy when they spit it out? If so, fair game!
dtraveler has left #ruby [#ruby]
<pipework> segfalt: I don't know if I've pushed lately but: https://github.com/Spaceghost/vim-config
Motoservo has joined #ruby
<Erik_Underline> Why's poignant guide to Ruby is really weird
<pipework> Erik_Underline: It's supposed to be rather fun instead of being like a textbook.
baweaver has quit [Remote host closed the connection]
snockerton has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elusiveother has joined #ruby
<Erik_Underline> I love it, something you can finally relate to :D It reminds me of a method of remembering stuff I learned in elementary school, associate the boring stuff with crazy stuff and you'll remember it better :D
ochkoffein has quit [Ping timeout: 240 seconds]
<Ox0dea> Erik_Underline: I did that for pi.
jessemcgilallen has joined #ruby
<hxegon> Erik_Underline: back from being afk reading through history: about the 'i've barely even learned...' comment. I learned vim before I leared ruby. just saying.
bMalum has quit [Quit: bMalum]
startupality has quit [Quit: startupality]
sigurding has quit [Quit: sigurding]
skade has joined #ruby
mg^ has quit [Quit: Leaving]
towski_ has joined #ruby
mclee_ has joined #ruby
hrs has joined #ruby
<Erik_Underline> Wait, vim's a language, ish?
ruurd has quit [Quit: ZZZzzz…]
<hxegon> Erik_Underline: basically
<Erik_Underline> But you can program ruby in vim?
<hxegon> Erik_Underline: thats what I do
ss_much has joined #ruby
postmodern has quit [Quit: Leaving]
dorei has joined #ruby
<hxegon> Erik_Underline: basically you build your own IDE from vim + plugins + your OS + your config
solars has quit [Quit: WeeChat 0.4.2]
diegoviola has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
<Erik_Underline> hxegon: Okay, I'll learn vim when I've learned Ruby then :D Where's good download link for w7 ?
keen___________ has joined #ruby
<hxegon> Erik_Underline: http://www.vim.org/download.php
<Erik_Underline> hxegon: What's an IDE?
<hxegon> Erik_Underline: Integrated Development Environment. For example I have tests running in a split window, a linter running everytime I save that checks my syntax, and pry screw around in and check assumptions about the how language stuff works
<hxegon> Erik_Underline: I also have keybindings that will run rubocop on my files to check for stylistic mistakes.
<pipework> Erik_Underline: Vim is an editor, rubymine is an IDE.
keen__________ has quit [Ping timeout: 244 seconds]
linduxed has joined #ruby
<hxegon> what he said
<hxegon> but you can build an ide up around vim
<segfalt> ^^
devoldmx has quit [Remote host closed the connection]
<pipework> Vim allows much more control so that you can DIY IDE between everything in your OS.
<Erik_Underline> I really need a good IDE. I enjoy the one I find at codecademy, but that's because I've nothing to compare to.
<hxegon> rubymine is nice from what I've heard
<pipework> Erik_Underline: rubymine is the only worthwhile IDE that I know of for ruby.
jamesaxl|2 has joined #ruby
ochkoffein has joined #ruby
<Erik_Underline> Oh, nice, thanks alot
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
<Erik_Underline> It says FREE 30 DAY TRIAL on download page on official page :/
<pipework> Erik_Underline: Yup.
<Erik_Underline> It costs?
karapetyan has quit [Remote host closed the connection]
<pipework> I know many people who don't like buying software that still buy rubymine.
Motoservo has quit [Read error: Connection reset by peer]
<hxegon> (but vim is free <.< >.> )
karapetyan has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
<pipework> If a chum wants an IDE, he can damn whale have himself an IDE.
Trieste has quit [Ping timeout: 268 seconds]
<Erik_Underline> But I can make my own IDE with vim...
<Erik_Underline> "can"
craysiii has joined #ruby
<Erik_Underline> Can learn more specifically
<pipework> You totally could! It's very DIY, but you can also find other people's stuff too.
arocketman has joined #ruby
h99h9h88 has joined #ruby
<hxegon> Erik_Underline: installing syntastic is a good start
<hxegon> Erik_Underline: and vundle to make plugin management easier
`tim` has joined #ruby
Trieste has joined #ruby
<hxegon> Erik_Underline: (syntastic checks for syntax mistakes when you save a file)
`tim` has quit [Client Quit]
Renich has quit [Ping timeout: 246 seconds]
<hxegon> Erik_Underline: I could even whip up a starter vimrc with comments and shit explaining everything
Renich has joined #ruby
<Erik_Underline> I'd love that :D
karapetyan has quit [Ping timeout: 265 seconds]
sigurding has joined #ruby
bMalum has joined #ruby
<Ox0dea> Erik_Underline: Do you have somewhere to put all these fish?
Chaoborid has joined #ruby
<Erik_Underline> Fish?
snockerton has quit [Quit: Leaving.]
<Ox0dea> > Give a man a fish...
<pipework> Ox0dea: Give him many fish and he may die of food poisoning?
<hxegon> Ox0dea: I started with a vimrc with syntastic, so I'm not too woried about it
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Erik_Underline> Master believes in me. I can do it! :D
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework> Dobby can do it!
ibouvousaime has joined #ruby
momomomomo has joined #ruby
SleepySensei has joined #ruby
<Ox0dea> hxegon: The breadth of the net that Google permits students to cast is just ridiculous; it's almost morally reprehensible to duplicate the human effort that the machines can help save us from, and that while convincing a learner that knowledge is a dish best served on spoons.
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
arocketman has quit [Quit: Page closed]
<Erik_Underline> It's interesting how so many people are joining and leaving at the same time, but only a few of us are talking. Are they staring at us... ;-;
Pumukel has quit [Ping timeout: 246 seconds]
Guest53 has joined #ruby
ochkoffein has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
senayar has joined #ruby
northfurr has joined #ruby
<segfalt> Erik_Underline: Lots of people like to idle, and pop in for quick questions they can ask/answer. You're just seeing their computers go to sleep and wake up :)
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Remote host closed the connection]
<Erik_Underline> Oh, okay
kfrz1 has quit [Quit: Leaving.]
h99h9h88 has joined #ruby
northfurr has quit [Client Quit]
musl has quit [Quit: WeeChat 1.1.1]
<Erik_Underline> I think it could improve the interface if those messages were in another bar on the side
kfrz has joined #ruby
jenrzzz has joined #ruby
<hxegon> I use /ignore * JOINS PARTS QUITS
<hxegon> Erik_Underline: which gets rid of that
<Erik_Underline> Nice!
<pipework> I just keep them in because I don't need to read every line in here.
SOLDIERz has joined #ruby
Motoservo has joined #ruby
axl_ has quit [Quit: axl_]
doddok has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 250 seconds]
<hxegon> Ox0dea: the depth and bredth of the vim pond is enormous. I'm not going to send a man/woman into a hurricane without a boat. YOU WON'T TAKE THIS ONE EMACS. NOT ON MY WATCH *shakes fist*
h99h9h88 has quit [Ping timeout: 250 seconds]
Channel6 has quit [Ping timeout: 268 seconds]
SCHAAP137 has joined #ruby
<hxegon> not realistic. that octopos needs more footpetals
<hxegon> octopus*?
big|bad|wolf has joined #ruby
mikeharris22 has joined #ruby
<Ox0dea> Oh, hey, /r/unixporn!
<Erik_Underline> Emacs users at work must be those hackers on TV we see everytime
big|bad|wolf has quit [Client Quit]
<hxegon> Ox0dea: love that sub
tvw has quit [Remote host closed the connection]
<hxegon> xmonad4lyfe
<Ox0dea> Did you mean dwm?
<Ox0dea> (I'm sick.)
<hxegon> Ox0dea: DWM is for people who don't give up after 11 hours of looking at a config
jenrzzz has quit [Ping timeout: 268 seconds]
<hxegon> Ox0dea: who give up*
<adaedra> herbstluftwm <3
_djbkd has quit [Remote host closed the connection]
<Erik_Underline> hxegon /ignore * JOINS PARTS QUITS doesn't work :O Neither when I replace * with JOINS etc
<hxegon> hmm
<Ox0dea> hxegon: I'm not sure I follow. I fuckin' love writing C to customize my WM.
momomomomo has quit [Quit: momomomomo]
<Ox0dea> (See my earlier parenthetical.)
<hxegon> Ox0dea: we both got it bad. xmonads config is straight up haskell code
`tim` has joined #ruby
<Erik_Underline> hxegon, thanks btw for that vim stuff
Soda has quit [Quit: Soda]
momomomomo has joined #ruby
<hxegon> Erik_Underline: no prob. you still have to figure out where to put that, how to install vundle, and how to use vundle to install syntastic though
Hounddog has quit [Remote host closed the connection]
skweek has joined #ruby
mikeharr_ has joined #ruby
<Ox0dea> Erik_Underline: Nice boat. It'd be a shame if something were to happen to it.
<Erik_Underline> Boat...? :o
<hxegon> capiche?
<adaedra> I think the joke sank.
linduxed has quit [Ping timeout: 260 seconds]
<hxegon> it hit an iceburg full of mixed metaphors
<hxegon> wait a minute... thats my iceburg
<pipework> lettuce consider another topic.
<adaedra> what an interesting word, iceberg.
<adaedra> half-english, half-german.
northfurr has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework> p sure berg is South African.
ochkoffein has joined #ruby
dhollinger has joined #ruby
codecop has joined #ruby
<hxegon> english is partially german tho
allcentury has joined #ruby
<hxegon> or it has roots in german
northfurr has quit [Client Quit]
<Ox0dea> I smell PIE.
<adaedra> they're both germanic languages.
<craysiii> ice has german roots too
elusiveother has quit [Quit: Leaving]
Erik_Underline has quit [Ping timeout: 246 seconds]
<hxegon> adaedra: afrikaans? had no idea
<hxegon> I swear this conversation had ruby in it somewhere
<Ox0dea> adaedra: Was it you who pointed out that Proto-Indo-European never fails to make an appearance in linguistic discussions?
<adaedra> Ox0dea: no.
<adaedra> hxegon: isn't afrikaans a mix of different languages?
<adaedra> well, more than others.
<ohcibi> afrikaans is the language the people spoke/speak in dutch colonies
<ohcibi> in africa
The_Phoenix has quit [Ping timeout: 272 seconds]
<ohcibi> thus afrikaans
<hxegon> its west germanic mixed with some dutch according to google
Musashi007 has quit [Quit: Musashi007]
momomomomo has quit [Quit: momomomomo]
<ohcibi> dutch is a mix in general, english french and german
colli5ion has quit []
<adaedra> dutch = (german | english).gsub(/a/) { |a| a + a }
mikeharr_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<adaedra> :p
shinenelson has joined #ruby
<hxegon> theres the ruby.
yfeldblum has joined #ruby
barhum2013 has joined #ruby
Erik_Underline has joined #ruby
momomomomo has joined #ruby
musl has joined #ruby
jxs_ has quit [Remote host closed the connection]
Erik_Underline has quit [Client Quit]
northfurr has joined #ruby
Erik_Underline has joined #ruby
<Erik_Underline> What's the definition of boolean?
lkba has quit [Remote host closed the connection]
<adaedra> well, dutch, german and english have a lot in common (germanic languages), you find things
hrs has joined #ruby
<pipework> Erik_Underline: google may have an idea.
<adaedra> true.
Timba-as has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
babblebre has joined #ruby
Jackneill has joined #ruby
hobo548 has quit [Ping timeout: 244 seconds]
<Ox0dea> Erik_Underline: Why do you ask questions for which you *know* Google will be able to provide you with an immediate answer?
<Ox0dea> I am genuinely interested in the rationale.
rbennacer has joined #ruby
<Erik_Underline> I already got this tab open :D
<Erik_Underline> And you might provide with some "in-the hood" terminology
diegoaguilar has quit [Remote host closed the connection]
Renich has quit [Quit: leaving]
baweaver has joined #ruby
blackmesa has joined #ruby
s00pcan has quit [Remote host closed the connection]
<adaedra> "in-the-hood" terminology around these parts is more axed around criminal offenses.
<Ox0dea> > axed
<Erik_Underline> :c
<Ox0dea> > onouditint
bMalum has quit [Quit: bMalum]
s00pcan has joined #ruby
<adaedra> Erik_Underline: booleans are basically the same in all programming languages.
<adaedra> The main principle, at least.
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<Erik_Underline> Yeah but I don't know any other programming :P
<adaedra> No, but that means google's answer should be ok without looking too far.
diegoviola has quit [Ping timeout: 256 seconds]
<Ox0dea> He's not allowed to use Google on days ending with Y.
moeabdol1 has joined #ruby
DEA7TH has joined #ruby
<Ox0dea> >> Time.now.strftime('%A')[-1] == ?y
<ruboto> Ox0dea # => true (https://eval.in/459578)
<Ox0dea> Shame.
<Ox0dea> Maybe tomorrow.
diego2 has joined #ruby
<adaedra> This works so much better in English.
`tim` is now known as TruthAboutPdev
TruthAboutPdev is now known as sandals
baweaver has quit [Ping timeout: 265 seconds]
<adaedra> ok, your gif game seems on.
Musashi007 has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
<Erik_Underline> :D
<pipework> >>Time.now.strftime('%A').end_with?('y')
<ruboto> pipework # => true (https://eval.in/459579)
<Ox0dea> >> begin; require 'French'; rescue LoadError; :dealwithit; end # adaedra
<ruboto> Ox0dea # => :dealwithit (https://eval.in/459580)
pandaant has quit [Remote host closed the connection]
<adaedra> Too bad French isn't lingua franca anymore.
<pipework> lingua frencha?
<adaedra> lingua diffuculta
elaptics is now known as elaptics`away
moeabdol1 has quit [Ping timeout: 240 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
stannard_ has joined #ruby
moeabdol1 has joined #ruby
Motoservo has joined #ruby
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
<Erik_Underline> Je peux parle francais :P
hrs has joined #ruby
stannard has quit [Ping timeout: 255 seconds]
<adaedra> parler*
lacrymol1gy has joined #ruby
<Ox0dea> I was going to do Welsh in Ruby, but Enumerator#sample isn't a thing. :<
ruurd has joined #ruby
<Ox0dea> I don't see why it shouldn't be.
<Erik_Underline> lol, no that'd be "I can to speak french", as opposed to my sentence meaning " I can speak french"
baweaver has joined #ruby
<Ox0dea> It couldn't guarantee uniform distribution in the general case, but so what.
<pipework> Just to_a first?
<Erik_Underline> Parler is infinitive form
<dreinull75> Ox0dea: I got it: https://eval.in/459582
<dreinull75> Ox0dea that's what I was trying to get.
neersighted has quit [Quit: Connection closed for inactivity]
<dreinull75> I hopee so.
<Ox0dea> pipework: Welsh = consonants.cycle.sample(rand 58).join
<adaedra> Erik_Underline: yeah, and?
kfrz has left #ruby [#ruby]
bMalum has joined #ruby
<dreinull75> feed it whatever you feel like and it'll do: https://eval.in/459587
sigurding has quit [Quit: sigurding]
<Erik_Underline> Je sais pas combien francais tu sais, mais si tu me comprends, t'es probablement un francophone aussi.
stamina has quit [Ping timeout: 246 seconds]
VeryBewitching has joined #ruby
<Ox0dea> dreinull75: That's really quite neat.
<pipework> The only French I know is 'waffle'.
arup_r has quit [Ping timeout: 264 seconds]
<adaedra> Erik_Underline: That's not bad, except before the first comma.
Macaveli has joined #ruby
<dreinull75> Ox0dea thanks for your help again. Even if it was mostly rubberducking :)
<adaedra> \_o<
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Erik_Underline> I know that I'm not speaking "correct" french, but rather day-to-day expression :D
h99h9h88 has joined #ruby
haylon has joined #ruby
senayar has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
<Erik_Underline> Adaedra, do you study french aswell? :o
<adaedra> Erik_Underline: to get back on your first, you already have a conjugated verb "peux", so the second one is infinitive.
_djbkd has joined #ruby
agit0 has joined #ruby
<adaedra> Erik_Underline: worse, I'm French.
<Erik_Underline> Oh wait
<Erik_Underline> SHIT
<Ox0dea> Erik_Underline: You merely adopted the baguettes.
crossbeau has joined #ruby
karapetyan has joined #ruby
skade has quit [Read error: No route to host]
skade has joined #ruby
<crossbeau> hi guys, I am trying to use 'some params filesource="sourcefile" some params' how should I get this to allow the "" inside 'some params filesource=\"source\" some params'
musl has quit [Quit: WeeChat 1.1.1]
musl has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yeticry has quit [Ping timeout: 255 seconds]
_djbkd has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 268 seconds]
_djbkd has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
symm- has joined #ruby
civil_ has quit [Ping timeout: 255 seconds]
<hxegon> "some params filesource=\"source\" ..." not working?
<Ox0dea> >> %q{"Let's use '"q"u'o"t"e's'"} # crossbeau
<ruboto> Ox0dea # => "\"Let's use '\"q\"u'o\"t\"e's'\"" (https://eval.in/459596)
yeticry has joined #ruby
<Ox0dea> %Q if you need interpolation.
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
<adaedra> Erik_Underline: that's ok, you made me laugh.
hashpuppy has joined #ruby
<Ox0dea> crossbeau: And feel free to choose your favorite delimiter(s): idiosyncratic-ruby.com/15-207-ways-to-rome.html
<crossbeau> here let me give some more context, I am writing a chef recipe
hashpuppy has left #ruby [#ruby]
Pathfinder has quit [Ping timeout: 250 seconds]
<pipework> Ox0dea: And %{} for interpolation!
<pipework> >> %|Lol, #{Object.new}|
<crossbeau> 'start /wait msiexec /qn /norestart /i openoffice411.msi SELECT_WORD=0 SELECT_EXCEL=0 SELECT_POWERPOINT=0 INSTALLLOCATION=\"C:\\Program Files (x86)\\OpenOffice 4\" ADDLOCAL=gm_Root" this is failing on the Installocation
<ruboto> pipework # => "Lol, #<Object:0x41df4210>" (https://eval.in/459601)
NeverDie_ has joined #ruby
NeverDie has quit [Ping timeout: 246 seconds]
Macaveli has quit [Read error: Connection reset by peer]
phatypus has joined #ruby
Macaveli has joined #ruby
phatypus has quit [Client Quit]
Testo has joined #ruby
cdg has joined #ruby
<adaedra> Erik_Underline: also, if you want, I can fix your other sentence in -offtopic :p
tvw has joined #ruby
chrislotix has joined #ruby
Guest53 has joined #ruby
<Erik_Underline> Sure
opensource_ninja has joined #ruby
Rollabunna has joined #ruby
bruno- has joined #ruby
NeverDie_ has quit [Max SendQ exceeded]
JDiPierro has quit []
JDiPierro has joined #ruby
lacrymol1gy has quit [Quit: leaving]
<Testo> Hi all, I have yaml file with line: `other: ! "%{count} days"` why `!`? thanks in advanced.
NeverDie has joined #ruby
momomomomo has quit [Quit: momomomomo]
quazimodo has joined #ruby
FrankD_ has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
Puck6633 has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
linduxed has joined #ruby
<chrislotix> Hey folks, I have a question. Ruby docs are quite unclear so i'm trying to make sure. I'm doing "Learn ruby the hard way" and there's a line: txt = open(filename). What does open return that you can store in a variable?
Puck6633 has joined #ruby
crossbeau has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
arthurix_ has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
nemo_ has quit [Read error: Connection reset by peer]
nemo_ has joined #ruby
<mistym> chrislotix: open returns a File object, if you're opening a file.
darthdeus has left #ruby ["Leaving"]
<hxegon> chrislotix: File, so File.read to get contents for example
<Ox0dea> Testo: `!` by itself indicates a "non-specific" tag: http://yaml.org/spec/1.2/spec.html#c-non-specific-tag
FrankD has quit [Ping timeout: 250 seconds]
Testo has quit [Remote host closed the connection]
Testo has joined #ruby
<bricker> chrislotix: it will return some subclass of IO: http://ruby-doc.org/core-2.2.3/IO.html File or StringIO
karapetyan has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 255 seconds]
<chrislotix> mistym, hxegon: I see, thank you. For some reason i thought it returns the content itself and that calling .read on it was uneccessary
<Ox0dea> chrislotix: LRTHW has you opening files without having taught you how to experiment at a REPL? :<
kadoppe has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
arthurix has quit [Ping timeout: 250 seconds]
<chrislotix> Ox0dea: Sorry, what's REPL? I went lesson by lesson and i just found it quite odd.
<chrislotix> I should probably google it...
jenrzzz has quit [Ping timeout: 255 seconds]
<hxegon> Read Eval Print Loop
<hxegon> so for example
<hxegon> >> puts 'this is a repl'
<ruboto> hxegon # => this is a repl ...check link for more (https://eval.in/459602)
<Ox0dea> >> open($0).class # chrislotix
<ruboto> Ox0dea # => File (https://eval.in/459603)
malconis has quit [Ping timeout: 255 seconds]
erbesharat has quit [Quit: erbesharat]
Testo has quit [Remote host closed the connection]
kadoppe has joined #ruby
ldnunes has quit [Quit: Leaving]
Testo has joined #ruby
<pipework> hxegon: I don't think that counts as a repl, actually.
<pipework> Namely the lack of the L.
<hxegon> pipework: true, but close enough
senayar has quit [Remote host closed the connection]
shpoont has joined #ruby
karapetyan has quit [Ping timeout: 272 seconds]
akem has joined #ruby
<hxegon> >> show-doc String#split
<ruboto> hxegon # => /tmp/execpad-e150bcfcaefc/source-e150bcfcaefc:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/459604)
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hxegon> hmm
platzhirsch has left #ruby [#ruby]
bruno- has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
but3k4 has joined #ruby
but3k4 has quit [Client Quit]
<akem> jello
Synthmead has joined #ruby
shpoont has quit [Max SendQ exceeded]
<hxegon> Hola akem, como estas?
shpoont has joined #ruby
<Testo> Hi all.nobie her, why we use `!` in yaml?
madundead has joined #ruby
<akem> not so bad, hxegon, how you doing?
zenguy_pc has quit [Ping timeout: 250 seconds]
<pipework> hxegon: Three out of four letters. good enough
<Ox0dea> Testo: YAML permits tagging values with types.
yfeldblum has quit [Ping timeout: 246 seconds]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<hxegon> akem: not too bad, eating pistachios and refactoring monkey-patches, as always
malconis has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 246 seconds]
fmcgeough has quit [Quit: fmcgeough]
skade has quit [Ping timeout: 252 seconds]
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
Testo has quit [Remote host closed the connection]
Testo has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
<hxegon> pipework: I mostly speak rather than write so it works for me *shrugs*
karapetyan has quit [Remote host closed the connection]
nemo_ has quit [Remote host closed the connection]
AccordLTN has quit []
Motoservo has joined #ruby
<Erik_Underline> trying to call reverse! on arr if rev is true: def alphabetize(arr, rev=false) arr.sort! if rev==true arr.reverse! end
<Erik_Underline> But no success
<Erik_Underline> Help
karapetyan has joined #ruby
Guest53 has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
<adaedra> Erik_Underline https://gist.github.com/anonymous/92dd38d0bfe9f64d8944 (crossposted from -offtopic)
AccordLTN has joined #ruby
<adaedra> the inline if is to be put after the conditional expression, not before
<adaedra> it's like a sentence: do this if that
<hxegon> Eso arr.reverse if rev == true
<adaedra> don't forget the ! if you want it in place :)
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
Testo has quit [Ping timeout: 244 seconds]
skade has joined #ruby
<Erik_Underline> Well, sentences can also say, if this, do that :D
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has joined #ruby
mjuszczak has joined #ruby
<Erik_Underline> ohhh
<Erik_Underline> Do
<Ox0dea> Erik_Underline: It's `if this then` in Ruby, but pretend you didn't read that.
chipotle has quit [Quit: cheerio]
Testo has joined #ruby
<adaedra> Erik_Underline: don't misread, 'do this' was one thing, there's no 'do' keyword.
<Ox0dea> adaedra: Um.
leat has quit [Ping timeout: 244 seconds]
<adaedra> Not in this expression at least.
devoldmx has joined #ruby
<Erik_Underline> Why does then work but not do when do exists in ruby?
rgtk has joined #ruby
<Ox0dea> `if this then do` is awkwardly verbose in a programming language.
<adaedra> do is for blocks.
andikr has quit [Remote host closed the connection]
Testo has quit [Remote host closed the connection]
Testo has joined #ruby
Z00t has joined #ruby
swgillespie has joined #ruby
<Testo> for waht we use `!` in yaml files?
mikeharris22 has quit [Ping timeout: 272 seconds]
bigkevmcd has quit [Ping timeout: 256 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
shpoont has quit [Ping timeout: 264 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<Erik_Underline> Okay, so I did this https://gist.github.com/anonymous/c5ec49f35d3166f325f4 but I face another problem, the method doesn't reverse-alphabetize an arrey when it recieves true as a parameter :c
<Erik_Underline> OH wait
haylon has quit [Quit: Leaving]
<adaedra> protip: in gist, if you put the right file extension in the file name, you have syntax colors.
<Erik_Underline> https://gist.github.com/anonymous/03ddcc0523fd0326ba2f It doesn't default to alphabetizing an array when it doesn't receive a second parameter
arthurix has joined #ruby
rgtk has quit [Remote host closed the connection]
musl has quit [Quit: WeeChat 1.1.1]
ngscheurich has joined #ruby
jpfuentes2 has joined #ruby
allcentury has joined #ruby
musl has joined #ruby
diegoaguilar has joined #ruby
Motoservo has joined #ruby
<adaedra> what is the expected output vs the actual output?
bruno- has joined #ruby
Gi0 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Mateusz_ has joined #ruby
stamina has joined #ruby
arthurix_ has quit [Ping timeout: 240 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<Mateusz_> I have a code that I intented to package as gem. My problem is that this code is using cache (to prevent repeated expensive API requests). Is there guideline where code packaged as gem should keep its cache? Maybe user should be forced to call "set_cache_path(path)" before using any functionality provided by gem?
phil6kites has joined #ruby
<Mateusz_> Is there some guideline how gem should storing their caches?
sepp2k has quit [Quit: Leaving.]
Motoservo has joined #ruby
Coldblackice has joined #ruby
skade has quit [Read error: No route to host]
Pumukel has joined #ruby
<drbrain> Mateusz_: there's no guidelines
bruno- has quit [Ping timeout: 250 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
<drbrain> Mateusz_: if it's a per-process cache, use Dir.mktmpdir or Tempfile
blue_deref has joined #ruby
agit0 has joined #ruby
<drbrain> if it's a cross-file cache, make a ~/.my_library_name/cache directory
ngscheurich has quit [Ping timeout: 250 seconds]
<drbrain> err, cross-process
Testo has quit [Remote host closed the connection]
Testo has joined #ruby
momomomomo has joined #ruby
ledestin has joined #ruby
<Mateusz_> So using "~/.my_library_name/cache" is normal? I though about it but it seemed to be an ugly solution (though I failed to find something better, explicit setting cache leads to really ugly boilerpalte code)
momomomomo has quit [Client Quit]
platzhirsch has joined #ruby
<treehug88> Mateusz_ : yup, that's pretty normal on unix. On Mac and windows they have different conventions
<Mateusz_> drbrain: Thanks!
<adaedra> cache usually goes in /tmp if you don't need it to stay too long.
timonv has joined #ruby
<Mateusz_> treehug88: Thanks! At this moment I want to have it working anywhere, I will worry about Win once/if somebody will want to use it except me :)
<drbrain> it's best to use Tempfile or Dir.mktmpdir if the cache is ephemeral, it'll end up in /tmp and disappear when your process exits
akem has quit [Quit: Bye]
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
<Mateusz_> I found Tempfile and Dir.mktmpdir but I want cache to stay at least for days, maybe longer.
Erik_Underline has quit [Ping timeout: 246 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
ochkoffein has quit [Ping timeout: 260 seconds]
<Mateusz_> So ~/.something/ is the way to go, win/mac will be problematic but I may leave it for later.
synthroid has quit []
<adaedra> Mateusz_: it's ok for mac too.
<Ox0dea> Mateusz_: How about Gem.datadir, then?
<Ox0dea> It's not got the greatest name as a place for cache data, but it's at least cross-platform.
<adaedra> Anyway, if your program is meant to run as daemon, maybe do it a place with right access in /var/cache .
Erik_Underline has joined #ruby
<Ox0dea> adaedra: Write it right.
Musashi007 has quit [Quit: Musashi007]
diegoviola has quit [Ping timeout: 265 seconds]
<adaedra> ?
<Ox0dea> > right access
<treehug88> adaedra 's idea is good too
<Erik_Underline> Why do I keep disconnecting while inactive?
<Ox0dea> Erik_Underline: Get a better client?
diegoaguilar has quit [Remote host closed the connection]
loechel has joined #ruby
rwilcox has quit [Ping timeout: 268 seconds]
<adaedra> Erik_Underline: computer inactive? It may disconnect when going into sleep mode.
<Erik_Underline> Better clients like what?
<Erik_Underline> I'm on other tabs in the browser
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> What year is it?
<Erik_Underline> ...
h99h9h88 has joined #ruby
<Ox0dea> Erik_Underline: You can't have anything running but a browser?
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Erik_Underline> ofc
<adaedra> Erik_Underline: yeah, get a non-web client, first.
<adaedra> Windows choices are mIRC, HexChat, Quassel, among others.
diegoviola has joined #ruby
<Ox0dea> drbrain: Gem.datadir isn't nearly as prevalent as it feels like it ought to be; how come?
<drbrain> few people know about it, and it's for static data usually
<Ox0dea> Fair.
rgtk has joined #ruby
x-light has joined #ruby
mjuszczak has quit []
Erik_Underline has quit [Client Quit]
codecop has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 240 seconds]
h99h9h88 has quit [Ping timeout: 260 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mateusz_> So Gem.datadir is returning existing folder, unique for each game where gem has read/write rights? Unfortunately I failed to find documentation better than http://ruby-doc.org/stdlib-1.9.2/libdoc/rubygems/rdoc/Gem.html#method-c-datadir
SylarRuby has joined #ruby
beanHolez has joined #ruby
enigmaty has joined #ruby
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__chris has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
Testo has quit [Ping timeout: 260 seconds]
Oatmeal has joined #ruby
allomov has quit [Remote host closed the connection]
<Ox0dea> Mateusz_: That's about the size of it, but the directory doesn't automatically exist for each gem.
<beanHolez> I am using a cookie session storage for my app. Sometimes, a user will accidentally open two browser windows when logging in. They will do what it is they need to do and close the window. Another user will come along and attempt to log in with the window the previous user accidentally opened, but because the previous user logged in with both windows open, the new user is now authenticated as the previous one. What are my choices here?
JDiPierro has quit [Remote host closed the connection]
<Mateusz_> Ox0dea: So I need to create it... Can I expect it to work across different OSes?
<Ox0dea> Mateusz_: You create 'data/foo/' in your top directory, and then you've got access to it via Gem.datadir('foo') wherever it ends up getting put on the user's system.
Motoservo_ has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Motoservo_ is now known as Motoservo
<Ox0dea> beanHolez: cookie != session
duckpuppy has quit [Ping timeout: 260 seconds]
unshadow has joined #ruby
unshadow has quit [Client Quit]
northfurr has quit [Quit: northfurr]
sepp2k has joined #ruby
unshadow has joined #ruby
momomomomo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
Z00t has quit [Ping timeout: 240 seconds]
<beanHolez> Ox0dea: A cookie containing the session_id (which is set across all browser windows) is not representative of the session?
Pathfinder has joined #ruby
moeabdol1 has quit [Ping timeout: 250 seconds]
lesshaste has joined #ruby
lesshaste has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
enigmaty has quit [Remote host closed the connection]
to_json has quit [Quit: Leaving.]
<Ox0dea> beanHolez: It is, but you needn't be using the same session_id in different browser windows.
ruurd has joined #ruby
<Ox0dea> You could either invalidate any existing sessions upon login, or else consider a session invalid after a certain period of inactivity.
K1MOS has joined #ruby
karapetyan has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<beanHolez> Ox0dea: Definitely not. The problem, though, is that the cookie is set for both open windows when the first user logs in. Therefore, the second user thinks they are logging in as themselves when they are really piggybacking off of the existing cookie that has already been set.
ESpiney__ has quit [Quit: Leaving]
mjuszczak has joined #ruby
<beanHolez> I thought so as well, but when I clear_session, it doesn't seem to do the job. Was sure I was missing something
davedev2_ has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
shpoont has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
mjuszczak has quit [Client Quit]
pdoherty has joined #ruby
skade has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
niemcu has quit [Ping timeout: 240 seconds]
shpoont has quit [Max SendQ exceeded]
Motoservo has quit [Ping timeout: 264 seconds]
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
shpoont has joined #ruby
Kero has quit [Quit: Lost terminal]
gregoriokusowski has quit [Quit: gregoriokusowski]
Motoservo has joined #ruby
shpoont has quit [Client Quit]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
rbennacer has quit [Remote host closed the connection]
prestorium has quit [Quit: Leaving]
hxegon_ has joined #ruby
rbennacer has joined #ruby
<beanHolez> Hmm, telling me "Can't verify CSRF token authenticity"
SleepySensei has joined #ruby
shpoont has joined #ruby
yfeldblum has joined #ruby
shpoont has quit [Max SendQ exceeded]
<karapetyan> why it is infinity loop https://gist.github.com/karapetyan/7f548e05476ff904ccb3
Azure has joined #ruby
shpoont has joined #ruby
hxegon has quit [Ping timeout: 268 seconds]
Motoservo has quit [Read error: Connection reset by peer]
shpoont has quit [Client Quit]
SleepySensei has quit [Read error: Connection reset by peer]
<beanHolez> karapetyan: Are you certain based on your inputs that circle.size will ever be exactly 1? Usually, you'll want to use >= or <= for those kinds of conditions
<adaedra> This calls for the most basic form of debugging, the "puts-debug"
rbennacer has quit [Ping timeout: 250 seconds]
mjuszczak has joined #ruby
<karapetyan> beanHolez: no, size will be 1 finally. cause inside loop i delete elements untill array.size == 1
<karapetyan> and array.size == 1 is condition for finish loop
jessemcgilallen has joined #ruby
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
<adaedra> karapetyan: what beanHolez says, is that usually the stop is done on the invalid range, not just the edge case. i.e., if you want to go up to 20, until i > 20 rather than until i = 20
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Erik_Underline has joined #ruby
ruby-lang519 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
EmeraldExplorer has joined #ruby
<adaedra> karapetyan: you should put a puts to inspect how your array or maybe other variables behave at each iteration and check if that match indended behavior.
<karapetyan> ok, thank you.
sepp2k1 has joined #ruby
Motoservo has joined #ruby
<ruby-lang519> Hello! In define_singleton_method description(http://apidock.com/ruby/Object/define_singleton_method) it mentions that one could specify method body in a block. Is it possible to specify parameters to that method?
everbot has joined #ruby
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
shpoont has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
<Ox0dea> >> define_method(:foo) { |a, b| a + b }; foo 17, 25 # ruby-lang519
<ruboto> Ox0dea # => 42 (https://eval.in/459610)
CloCkWeRX has joined #ruby
shpoont has quit [Client Quit]
symm- has quit [Ping timeout: 250 seconds]
sepp2k has quit [Ping timeout: 268 seconds]
wprice has quit [Quit: wprice]
Motoservo has joined #ruby
diegoaguilar has joined #ruby
last_staff has quit [Quit: last_staff]
diegoaguilar has quit [Read error: Connection reset by peer]
symm- has joined #ruby
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
momomomomo has quit [Quit: momomomomo]
diegoaguilar has joined #ruby
skade has quit [Ping timeout: 244 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<Erik_Underline> Ey
<Erik_Underline> How long will it take to master ruby?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deception1 has quit [Quit: Leaving.]
<karapetyan> how many times i need to write nested loops to learn it write fast and well
<karapetyan> ?
ruurd has joined #ruby
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<Erik_Underline> Karapetyan, what do you mean?
solocshaw has joined #ruby
<riceandbeans> hey
skade has joined #ruby
<adaedra> Erik_Underline: years and years.
<riceandbeans> if I have method foo that returns type int, and I have some not so bright person that made the type on the other end require a string for whatever reason and I can't fix his code, can I just do foo.to_s or how would I have to do it?
<adaedra> But you don't need to /master/ it.
<karapetyan> Erik_Underline: i have some issues writing nested loops. It's always wrong and i spent 30-60 mins on debugging and fixing. I think it's not impressive
<riceandbeans> bar = foo, bar.to_s ?
Alina-malina has quit [Read error: Connection reset by peer]
<Ox0dea> >> 42.to_s # riceandbeans
<ruboto> Ox0dea # => "42" (https://eval.in/459611)
mjuszczak has quit []
quazimodo has quit [Ping timeout: 246 seconds]
<Erik_Underline> Can you give some gist?
<Ox0dea> karapetyan: You're writing this the hard way on purpose?
<riceandbeans> but can I say the named method.to_s
bruno- has joined #ruby
Alina-malina has joined #ruby
dnomyar has quit [Quit: leaving]
<Ox0dea> riceandbeans: You can call #to_s on any value, and methods return values.
<riceandbeans> if the method is foo, what is the most correct way?
<riceandbeans> ok
<karapetyan> Ox0dea: sorry, don't understand.
<riceandbeans> so foo.to_s is valid
ruby-lang519 has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
<Ox0dea> >> def foo a, b; a + b; end; foo(17, 25).to_s # riceandbeans
<ruboto> Ox0dea # => "42" (https://eval.in/459613)
<Ox0dea> karapetyan: Well, I suggested #rotate earlier and you didn't go for it.
<Ox0dea> You don't really need to bother about remembering indices; everybody's wearing an ID card.
<riceandbeans> Ox0dea: thank you
<karapetyan> Ox0dea: ah, yes. Sure. Syntax sugar it's really handy, but i trying to understand how it works inside
<Ox0dea> karapetyan: #rotate isn't syntactic sugar; it's the perfect method for the Josephus problem.
NeverDie has joined #ruby
Motoservo has joined #ruby
<karapetyan> Ox0dea: i understand. Anyway i want to try solve it by my way first and after using #rotate
<Ox0dea> karapetyan: Imagine you're the Roman general: how would you carry out the proceedings most efficiently?
TheHodge has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 240 seconds]
<karapetyan> Ox0dea: group all warriors by 3 and kill last warrior in each 3 groups (if i correctly understood question)
Thomas-0725 has joined #ruby
<Ox0dea> karapetyan: No, that's completely missing the point of the exercise.
<Ox0dea> What does it mean to "group [them] by 3"?
<Ox0dea> Where do the other two go when they lose their comrade?
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
EllisTAA has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<karapetyan> hm, let me think :)
<Ox0dea> karapetyan: You've got them in a circle, and you're looking at the kth Jew, the first victim.
<Ox0dea> You kill him, and now there's a gap in the circle; what's your next move?
Silverfall has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
blue_deref has quit [Ping timeout: 244 seconds]
<karapetyan> put another victim in a gap?
<Ox0dea> karapetyan: And leave a different gap elsewhere, or?
sankaber has quit [Remote host closed the connection]
<Ox0dea> What happens if you tell them to form up to make the circle complete again?
Erik_Underline has quit [Ping timeout: 246 seconds]
lipoqil has joined #ruby
<karapetyan> narrow a circle ?
sankaber has joined #ruby
<karapetyan> well there will be a circle again with -1 warrior :/
pepperbreath has joined #ruby
<karapetyan> okay i can kill nth warrior and narrow circle after killing
agit0 has joined #ruby
Mateusz_ has quit [Quit: Page closed]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has joined #ruby
<karapetyan> Ox0dea: well, all warriors that stays after victim change their index -1
<Ox0dea> karapetyan: Okay, the first warrior is dead and the circle has been reformed; you're comfortable where you're standing, so what do you tell the Jews to do in order to bring your next kill to you?
_djbkd has quit [Remote host closed the connection]
Thomas-0725 has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
<Ox0dea> "Everybody move a little to the right", but how many times?
leafybasil has joined #ruby
<dreinull75> Is there a better way to check for nil or empty? ("foo".nil? || "foo".empty? ? "bar" : "foo" #=> "foo")
ruurd has joined #ruby
<Ox0dea> dreinull75: ActiveSupport provides #blank?.
<dreinull75> Ox0dea I thought I'm on the #ruby channel???!!!ELF
c355E3B has joined #ruby
<Ox0dea> dreinull75: You asked. :P
<Ox0dea> >> nil.to_s # dreinull75: This should help.
<ruboto> Ox0dea # => "" (https://eval.in/459632)
<dreinull75> Ox0dea I have no association with this Rails thing whatsoever
<Ox0dea> ActiveSupports isn't technically Rails, mind.
Thomas-0725 has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
reichni has joined #ruby
<dreinull75> hm
<karapetyan> Ox0dea: actually i don't know how many times. :(
<karapetyan> there always be a gap
<adaedra> (Importing AS just for #blank? is not really a good idea though.)
<Ox0dea> karapetyan: Just the opposite! Immediately closing the gap makes for a very simple solution.
<Ox0dea> dreinull75: Do it just to spite the Frenchman.
<Ox0dea> adaedra: <3
pu22l3r_ has joined #ruby
cdg has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
yfeldblum has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
reichni has quit [Client Quit]
<karapetyan> i can't close gap in circle. i can do it in line put a last element to gap place
<dreinull75> Ox0dea by now you know I'm not here for simple solutions (TM)
<Ox0dea> karapetyan: If you kill the kth Jew, reform the circle, and then kill the k+kth Jew, the wrong person dies.
mikecmpbll has joined #ruby
Rollabunna has joined #ruby
<Ox0dea> dreinull75: Fair enough. Alas, that nil.to_s is "" gives you one this time. :P
duckpuppy has joined #ruby
skade has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
<Ox0dea> karapetyan: To clarify, you've been using #delete_at to "close the gap" the whole time.
<zenspider> yay! my latest talk is finally up: http://confreaks.tv/presenters/ryan-davis
Motoservo has quit [Read error: Connection reset by peer]
K1MOS has joined #ruby
<zenspider> Ox0dea: what the fuck did I just walk into?
firstdayonthejob has joined #ruby
<dreinull75> Ox0dea the blank? method looks nice though: respond_to?(:empty?) ? !!empty? : !self
<Ox0dea> zenspider: A slightly morbid dive into the Josephus problem.
pu22l3r has quit [Ping timeout: 250 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> dreinull75: Great artists steal.
bruno- has joined #ruby
<zenspider> uh. ok. wow.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
<dreinull75> zenspider now that you're here we'll all behave
<zenspider> I've personally always disliked #blank?. Poorly named and usually a leaky abstraction
Nanuq has quit [Ping timeout: 264 seconds]
K1MOS has quit [Client Quit]
senayar has quit [Remote host closed the connection]
<Ox0dea> karapetyan: I hope you won't take offense.
<Ox0dea> >> def J n, k; c = [*1..n]; c.rotate! k-1 and c.shift until c.size == 2; c end; J 41, 3
<ruboto> Ox0dea # => [16, 31] (https://eval.in/459640)
Rollabunna has quit [Ping timeout: 256 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
<yorickpeterse> My most hated methods are Array#flatten and Array#compact
bMalum has quit [Quit: bMalum]
<yorickpeterse> Not because they are not useful, they are, but because they're incredibly often abuse in Rails code
Motoservo has joined #ruby
rbennacer has joined #ruby
<karapetyan> Ox0dea: well, thank you anyway. Can't say that i understood how to solve this task, but now i'l try
<yorickpeterse> the combination of "flatten.compact" or "compact.flatten" is far too common
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sasi has joined #ruby
skade has joined #ruby
<Ox0dea> yorickpeterse: But which is better?
<yorickpeterse> This thing called an "if statement"
<sasi> I want to use gem_openssl that was downloaded via rubygems.. I'm trying to use check_validity on an object of type OpenSSL:X509:Certificate
Jackneill has quit [Ping timeout: 246 seconds]
Kero has joined #ruby
<yorickpeterse> The combination is often abused when pushing objects that might be nil into an array
<yorickpeterse> so instead of being a good citizen and checking before pushing people just chain 120938109231 methods like it's jQuery
<sasi> I keep getting the error undefined meethod check_validity for OpenSSL:X509:Certificate
<zenspider> I also hate that we don't have a good word for non-empty in english
<sasi> What am I missing>
<sasi> ?
<Ox0dea> zenspider: Occupied.
<yorickpeterse> zenspider: "any?" would be my first thought
ramfjord has joined #ruby
h99h9h88 has joined #ruby
<Ox0dea> yorickpeterse: But [nil] is non-empty.
sdothum has joined #ruby
FungalRaincloud has joined #ruby
<ramfjord> Is there something like module_function for classes? IE a function that declares an instance method from a symbol representing a class method?
<sasi> The method is there in the gem_openssl rubygem
Pumukel has quit [Ping timeout: 252 seconds]
<yorickpeterse> Ox0dea: that was in reference to blank?
<zenspider> yorickpeterse: [false]
<yorickpeterse> zenspider: not sure what blank? would do in that case
<hxegon_> zenspider: Ox0dea inhabited might be better
<yorickpeterse> I rarely use it
<Ox0dea> >> [] + [*4] + [*nil] + [*2] # yorickpeterse: Problem "solved".
<ruboto> Ox0dea # => [4, 2] (https://eval.in/459643)
<yorickpeterse> if ever
Cyther has joined #ruby
<zenspider> best I've come up with is has_stuff?
<zenspider> but damn that's clunky
<zenspider> sometimes English is horrible
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sasi> Can someone help me please?
<Ox0dea> hxegon_: Check your anthropomorphism.
<c355E3B> ramfjord: `ri define_method`
<sasi> It must be a simple question
<Ox0dea> *anthropocentrism
<sasi> I'm using this code:
<zenspider> sasi: nobody can help you with as little info as you've provided
<zenspider> (nobody can help you WELL)
<karapetyan> Ox0dea: well, seems i have not logic mind :) cause i completely don't understand how to solve this Jewish task)
<sasi> Oops.. sorry, I'm including details now..
<karapetyan> :/
<sasi> I have in my code user_cert = OpenSSL::X509::Certificate.new(self.browser_cert_signed)
<zenspider> ...sighs and waits for a full paste...
<yorickpeterse> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
h99h9h88 has quit [Ping timeout: 244 seconds]
<hxegon_> Ox0dea: do you mean anthrocentrism?
<hxegon_> Ox0dea: either way, lol
<Ox0dea> hxegon_: Either way, Objects do not inhabit their collections by their choosing; we force them to occupy these spaces.
senayar has joined #ruby
tvw has quit [Ping timeout: 256 seconds]
<sasi> I'm getting the error undefined method check_validity for OpenSSL:x509:Certificate
<hxegon_> Ox0dea: should we start #occupyunoccupation?
Motoservo has quit [Read error: Connection reset by peer]
startupality has joined #ruby
<zenspider> do you see check_validity in the method list?
<zenspider> what might be more appropriate?
<sasi> I have that gem in my rubygems
tkuchiki has quit [Remote host closed the connection]
beanHolez has quit [Remote host closed the connection]
<sasi> Do I need to do anything else?
tvw has joined #ruby
<zenspider> you see it IN RUBYGEMS itself?
Timba-as has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<zenspider> code to the API, not to random code you find
<sasi> Yeah, its in gem_openssl.rb which is in rubygems/ folder
Timba-as has joined #ruby
<sasi> Sorry for being a completely ruby noob
<zenspider> no prob... just make sure you're using actual api
<sasi> What do you mean? shouldn't I use the gem_openssl.rb?
<Ox0dea> zenspider: Are you telling sasi to copy and paste?
_djbkd has joined #ruby
<zenspider> sasi: no, you shouldn't depend on the internals of some other project. they can change at any time
<zenspider> Ox0dea: are you causing problems?
dhollinger has quit [Quit: Leaving]
<sasi> Oh, I see. I'll see if I can use some method from the class directly. Thanks a lot zenspider!
polishdub has quit [Quit: Leaving]
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
<zenspider> good luck
mjuszczak has joined #ruby
umgrosscol has joined #ruby
Rickmasta has joined #ruby
<Ox0dea> sasi: Might I suggest #verify and the @not_before instance variable?
Motoservo has joined #ruby
mike3 has joined #ruby
FungalRaincloud has quit [Quit: Leaving.]
tvw has quit [Ping timeout: 256 seconds]
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
dopamean_ has quit [Ping timeout: 252 seconds]
p0wn3d__ has quit [Ping timeout: 250 seconds]
blue_deref has joined #ruby
mordocai has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Motoservo has joined #ruby
kriskropd_ has quit [Ping timeout: 260 seconds]
<sasi> Hey zenspider, how do I create an Object of type Certificate?
<sasi> And not OpenSSL:x509:Certificate
<sasi> And one more thing: my project is guaranteed to be on ruby 1.8.7 for life
vF3hNGxc47h8 has joined #ruby
<sasi> Oxodea, thanks, how do I do that?
arthurix_ has joined #ruby
Gi0 has quit [Changing host]
Gi0 has joined #ruby
skinux has joined #ruby
<skinux> Someone in here had stated its' difficult to have an IDE for Ruby because it's interpreted. I would like to know why it's so difficult compared to PHP or Python which are also interpreted languages?
bb010g has quit [Quit: Connection closed for inactivity]
mike3 has quit [Quit: Leaving]
arthurix has quit [Ping timeout: 255 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<c355E3B> skinux: its not so much the interpretation bit as the metaprograming stuff
Motoservo has joined #ruby
<skinux> What exactly is the "meta programming" of Ruby??
<c355E3B> stuff like `define_method` `missing_method` etf
<skinux> When I think of meta I think of HTML <meta name="this" content="that"/ >
<c355E3B> *etc
leafybasil has quit [Remote host closed the connection]
<i8igmac> im trying to insert into a mysql database a single \
<i8igmac> %-UPDATE `compress`.`hash` SET `sub` = '\' WHERE `hash`.`ID` =55; -
<i8igmac> %-UPDATE `compress`.`hash` SET `sub` = "\" WHERE `hash`.`ID` =55; -
<i8igmac> "\" or '\' fails
<c355E3B> skinux: the short of it is that its hard to understand what methods are available by inspecting the source.
dopie has quit [Quit: This computer has gone to sleep]
umgrosscol has quit [Remote host closed the connection]
<i8igmac> '\' => ''
whippythellama has quit [Quit: WeeChat 1.3]
<skinux> Hmm. I thought IDEs used API documentations or some kind of stored lists to know what methods are available.
<i8igmac> "\" => \"\"
vF3hNGxc47h8 has quit [Ping timeout: 246 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<c355E3B> skinux: some do, i think eclipse does that heavily for java
<skinux> Why couldn't it be done for Ruby?
<c355E3B> AFAIK Rubymine has done some of it
yfeldblu_ has quit [Remote host closed the connection]
<c355E3B> you run into issues though on features like jump to method definition
<c355E3B> if the method is really implemented with missing method and has no "real" location in source
<skinux> Oh. Apparently missing_method isn't what I thought it was.
<Ox0dea> skinux: *method_missing
<ytti> meta is about self-referencing
<skinux> I thought missing_method would return true or false depending on whether or not the method exists.
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<ytti> the HTML meta tag means it's metainformation, the HTML page is informatino
<ytti> and the META tag contains information of that information, hence meta
unshadow has quit [Quit: leaving]
<c355E3B> skinux: nope
<skinux> Forgive me for this question, but can Ruby be compiled to native?
<Ox0dea> skinux: There is no such thing as `missing_method`.
<ytti> computer program does something
Motoservo has joined #ruby
<ytti> program which writes the program is metaprogram
ruurd has quit [Quit: ZZZzzz…]
roxtrongo has joined #ruby
loechel has quit [Quit: ChatZilla 0.9.92 [Firefox 41.0.2/20151014143721]]
Motoservo has quit [Read error: Connection reset by peer]
h99h9h88 has joined #ruby
tlaxkit has joined #ruby
Musashi007 has quit [Quit: Musashi007]
chrislotix has quit [Read error: Connection reset by peer]
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
senayar has quit [Remote host closed the connection]
pullcheezy has joined #ruby
charliesome has joined #ruby
everbot has quit [Ping timeout: 252 seconds]
nfk|laptop has quit [Quit: yawn]
skade has quit [Read error: No route to host]
skade has joined #ruby
<i8igmac> %-\- => improper
<i8igmac> "\" =>improper
<i8igmac> '\' =>improper
Chaoborid has quit [Quit: WeeChat 1.3]
quazimodo has joined #ruby
chipotle has joined #ruby
skade has quit [Client Quit]
skade has joined #ruby
<i8igmac> "'\'"=> "''"
h99h9h88 has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
Motoservo has joined #ruby
skade has quit [Client Quit]
karapetyan has joined #ruby
<Ox0dea> i8igmac: You must always escape backslashes unless the backslash is itself being used as an escape character.
aaron has joined #ruby
<adaedra> >> ?\
<ruboto> adaedra # => (NilClass) ...check link for more (https://eval.in/459697)
<adaedra> oh
aaron is now known as Guest93971
<Ox0dea> That's... not what I expected.
<Ox0dea> i8igmac: Sorry, that wasn't quite right, but it's true for your cases where the backslash is escaping the closing delimiter.
stamina has quit [Ping timeout: 252 seconds]
_djbkd has quit [Remote host closed the connection]
<i8igmac> i feel like a dumb dumb lol i cant get it
s00pcan has quit [Remote host closed the connection]
<sasi> Hey @Ox0dea, I got it working with Not_after
<i8igmac> rs = con.query(%-UPDATE `compress`.`hash` SET `sub` = '#{x}' WHERE `hash`.`ID` =#{c+1}; -)
<sasi> But how can I use the check_validity method directly in the code I posteD?
<adaedra> i8igmac: \ is a special character with a special meaning. If you want a \, you have to double it.
s00pcan has joined #ruby
<i8igmac> my script fails when i get to this part of the loob "\\"
leafybasil has joined #ruby
_djbkd has joined #ruby
platzhirsch has quit [Ping timeout: 252 seconds]
<Ox0dea> sasi: So you still want to call the #check_validity method that RubyGems adds to OpenSSL::X509::Certificate?
karapetyan has quit [Ping timeout: 265 seconds]
<sasi> Yeah
<sasi> Not that I still want to, but I want to know how
<sasi> If it's possible
<Ox0dea> It's okay if you want to do something bad.
<Ox0dea> We're not going to tell on you.
haxrbyte_ has joined #ruby
<Ox0dea> sasi: Are you sure you don't want to just copy and paste it into your code?
<sasi> Nope, I am learning here.. will really appreciate it if you can tell me why it's exactly bad?
<sasi> copy paste what??
bruno- has quit [Ping timeout: 260 seconds]
allomov has joined #ruby
DiCablo has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
s00pcan has quit [Remote host closed the connection]
<Ox0dea> sasi: http://git.io/vlec8
x-light has quit [Ping timeout: 260 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
n_blownapart has joined #ruby
<Ox0dea> They're just reopening the OpenSSL::X509::Certificate class and adding an instance method.
<Ox0dea> You're allowed to do that as well.
s00pcan has joined #ruby
Nanuq has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
<sasi> Yeah, but how do I use that particular gem's method..I keep getting undefined method on class OpenSSL::X509::Certificate error..
<Ox0dea> Bruh.
<sasi> Oh, are you saying I have to reopen the class like that, and copy paste that exact code?
Motoservo has joined #ruby
<Ox0dea> sasi: If that is really what you want to do, go for it.
<sasi> Nope, I dont want to copy-paste.. I'm just wondering if I can use that class's method in my code directly
zenguy_pc has quit [Ping timeout: 240 seconds]
<sasi> I mean, invoke it..
diego1 has joined #ruby
diegoviola has quit [Ping timeout: 268 seconds]
moei has left #ruby ["Leaving..."]
rodfersou has joined #ruby
NeverDie has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
allomov has quit [Ping timeout: 272 seconds]
Motoservo has quit [Read error: Connection reset by peer]
<Ox0dea> sasi: You'll have to require 'rubygems/gem_openssl', but that'll execute all the code in that file.
Motoservo has joined #ruby
<sasi> Gotcha..
<sasi> Sorry for being a Ruby noob.. but I understand now
h99h9h88 has joined #ruby
blue_deref has quit [Quit: bbn]
pullcheezy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
s00pcan has quit [Remote host closed the connection]
Motoservo has quit [Read error: Connection reset by peer]
pocketprotector- has quit [Ping timeout: 260 seconds]
s00pcan has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
juanpablo__ has quit [Quit: (null)]
s00pcan has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
juanpablo__ has joined #ruby
Motoservo has joined #ruby
riotjon__ has joined #ruby
s00pcan has joined #ruby
* sasi slaps AdamMeghji around a bit with a large fishbot
Ox0dea has quit [Read error: Connection reset by peer]
<adaedra> ok?
riotjone_ has quit [Ping timeout: 250 seconds]
jamesaxl|2 has quit [Ping timeout: 246 seconds]
zenguy_pc has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
k3asd` has quit [Ping timeout: 265 seconds]
madundead has quit [Quit: WeeChat 1.4-dev]
senayar has quit [Ping timeout: 250 seconds]
juanpablo__ has quit [Ping timeout: 256 seconds]
h99h9h88 has quit [Ping timeout: 255 seconds]
<shevy> a self-slapping webchatster
Regulati_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
`tim` has joined #ruby
tkuchiki has quit [Remote host closed the connection]
`tim` is now known as justbleed
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
roxtrongo has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
dopamean_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
Ropeney has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
pullcheezy has joined #ruby
sankaber has joined #ruby
Motoservo has joined #ruby
x-light has joined #ruby
yfeldblum has joined #ruby
mjuszczak has quit []
jobewan has quit [Quit: Leaving]
Motoservo has quit [Read error: Connection reset by peer]
sphex has quit [Ping timeout: 264 seconds]
phil6kites has quit [Remote host closed the connection]
kobain has joined #ruby
mjuszczak has joined #ruby
sphex has joined #ruby
Pumukel has joined #ruby
ibouvousaime has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Ping timeout: 240 seconds]
pullcheezy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Client Quit]
hiyosi has joined #ruby
<shevy> long live ruby \o/
vigintas has quit [Ping timeout: 252 seconds]
djstorm has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
pathrocle has quit [Read error: Connection reset by peer]
pathrocl_ has joined #ruby
dfinninger has quit [Remote host closed the connection]
Voker57 has quit [Remote host closed the connection]
Nanuq has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quaj has joined #ruby
quaj has left #ruby ["WeeChat 0.4.2"]
SenpaiSilver has quit [Quit: Leaving]
SylarRuby has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 255 seconds]
diegoaguilar has joined #ruby
rcvalle has quit [Quit: rcvalle]
minimalism has quit [Quit: leaving]
skweek has joined #ruby
akem has joined #ruby
Musashi007 has joined #ruby
jcoe has joined #ruby
Nanuq has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]