jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
failshell has joined #ruby
tedstriker has joined #ruby
ItSANgo has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
<nitenq> ok thanks
<zenspider> argh... acm won't cache the pdf in the reading list. I need to save it off to queue it.
<zenspider> this is why I left the acm
<zenspider> that, and they're seemingly not editing papers anymore. crap getting through
<zenspider> chrisseaton: thanks for the read.
allcentury has quit [Ping timeout: 240 seconds]
gabhart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apoplexy has quit [Ping timeout: 245 seconds]
allcentury has joined #ruby
GPrime has joined #ruby
ozialien has quit [Ping timeout: 264 seconds]
failshell has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: WeeChat 1.2]
endash has joined #ruby
fabrice31 has joined #ruby
veinofJebDays is now known as veinofJebBerry
bgmarx has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
fabrice31 has quit [Ping timeout: 246 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
bgmarx has joined #ruby
Scroff has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> >> [].map
<ruboto> Ox0dea # => #<Enumerator: []:map> (https://eval.in/382746)
scottschecter has joined #ruby
<Ox0dea> zenspider: Why not do the same for Enumerator::Lazy?
bronson has joined #ruby
Casty has joined #ruby
<Ox0dea> >> [].lazy.enum_for(:map)
<ruboto> Ox0dea # => #<Enumerator::Lazy: #<Enumerator::Lazy: []>:map> (https://eval.in/382747)
Pisuke has joined #ruby
baweaver has quit [Remote host closed the connection]
<havenwood> >> [1, 2, 3].lazy.enum_for(:map).to_a
<ruboto> havenwood # => [] (https://eval.in/382748)
BanzaiJoe has quit []
svf has joined #ruby
swgillespie has joined #ruby
Scroff has quit [Ping timeout: 252 seconds]
<havenwood> >> [1, 2, 3].lazy.map(&:itself).to_a
<ruboto> havenwood # => [1, 2, 3] (https://eval.in/382749)
crazyhorse18 has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
<Ox0dea> Was that intended to demonstrate that Lazy#map without a block *should* fail?
cndiv has quit []
jcaho has quit [Read error: Connection reset by peer]
jcaho has joined #ruby
gambl0re has joined #ruby
prettiestPony11 has joined #ruby
apoplexy has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
<havenwood> Ox0dea: Just meant to show that `enum_for(:map)` doesn't actually map in that case.
<Ox0dea> Yeah, I guess that's why it works as it does now.
kahuna__ has joined #ruby
<Ox0dea> Thunks are tricky.
Pisuke has joined #ruby
cb__ has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
baweaver has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
charliesome has joined #ruby
x1337807x has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
casadei has quit [Remote host closed the connection]
Lucky__ has joined #ruby
Musashi007 has joined #ruby
MVPhelp has quit [Remote host closed the connection]
crazyhorse18 has joined #ruby
djbkd has quit [Quit: My people need me...]
vikaton has joined #ruby
MVPhelp has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
robustus has joined #ruby
kahuna_ has quit [Disconnected by services]
deric_skibotn has quit [Ping timeout: 244 seconds]
kahuna__ has quit [Quit: leaving]
j4cknewt has joined #ruby
allcentury has joined #ruby
kahuna_ has joined #ruby
dgutierrez1287 has joined #ruby
krisquigley has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Ping timeout: 240 seconds]
drewo has joined #ruby
CpuID has quit [Ping timeout: 265 seconds]
bayed has quit [Quit: Connection closed for inactivity]
michaeldeol has quit [Ping timeout: 272 seconds]
j4cknewt has quit [Ping timeout: 265 seconds]
datanoise has quit [Ping timeout: 255 seconds]
krisquigley has quit [Ping timeout: 244 seconds]
nikhgupta has joined #ruby
pygospa has quit [Ping timeout: 264 seconds]
pygospa has joined #ruby
baweaver has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
cntrx has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
Papierkorb has quit [Ping timeout: 250 seconds]
dgutierrez1287 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
nikhgupta has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
nikhgupta has joined #ruby
drewo has quit [Ping timeout: 256 seconds]
nobitanobi has quit [Remote host closed the connection]
scottschecter has quit [Quit: Leaving]
jenrzzz has joined #ruby
lexun has quit [Remote host closed the connection]
centrx has quit [Ping timeout: 276 seconds]
Agoldfish has quit [Quit: G'Bye]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nikhgupta has quit [Remote host closed the connection]
fujimura has joined #ruby
lavros has quit [Remote host closed the connection]
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
zacts has quit [Quit: leaving]
pygospa has quit [Ping timeout: 264 seconds]
cntrx is now known as centrx
mrmargolis has joined #ruby
pygospa has joined #ruby
but3k4 has quit [Ping timeout: 264 seconds]
Akagi201 has joined #ruby
lexun has joined #ruby
x1337807x has joined #ruby
simplyianm has quit [Remote host closed the connection]
fujimura has quit [Ping timeout: 252 seconds]
nikhgupta has joined #ruby
simplyianm has joined #ruby
bgmarx has quit [Ping timeout: 265 seconds]
simplyianm has quit [Remote host closed the connection]
zacts has joined #ruby
JoshGlzBrk has joined #ruby
svf has quit [Quit: Lost terminal]
aaeron has left #ruby [#ruby]
houhoulis has joined #ruby
nikhgupta has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 264 seconds]
nikhgupta has joined #ruby
failshell has joined #ruby
_seanc_ has quit [Quit: _seanc_]
Channel6 has quit [Quit: Leaving]
nikhgupta has quit [Remote host closed the connection]
nikhgupta has joined #ruby
<bootstrappm> is ruby-install supposed to symlink the binaries if run as root?
<bootstrappm> it didn't for me and I had to do it manually which I found annoying
nikhgupta has quit [Remote host closed the connection]
nikhgupta has joined #ruby
aeze has quit [Quit: aeze]
mdz_ has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
nonparfumee has joined #ruby
aaeron has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
<havenwood> bootstrappm: you can `--system` to install to /usr/local
nikhgupta has quit [Remote host closed the connection]
<bootstrappm> ruby-install --system ruby ?
<havenwood> bootstrappm: yup
<bootstrappm> perfect, thanks
nikhgupta has joined #ruby
<havenwood> bootstrappm: you're welcome
jenrzzz has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
nikhgupta has quit [Remote host closed the connection]
simplyianm has joined #ruby
nikhgupta has joined #ruby
bkxd has joined #ruby
nikhgupta has quit [Remote host closed the connection]
nikhgupta has joined #ruby
dfockler has joined #ruby
nikhgupta has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 265 seconds]
jcoe has joined #ruby
nikhgupta has joined #ruby
simplyianm has quit [Remote host closed the connection]
nikhgupta has quit [Remote host closed the connection]
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nikhgupta has joined #ruby
Adran has quit [Quit: Este é o fim.]
prettiestPony11 has joined #ruby
prettiestPony11 has quit [Max SendQ exceeded]
amclain has joined #ruby
bkxd has quit [Client Quit]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfockler has quit [Ping timeout: 276 seconds]
lexun has quit []
jtdoncas has joined #ruby
CpuID has joined #ruby
Adran has joined #ruby
Parker0 has joined #ruby
Parker0 has quit [Client Quit]
nikhgupta has quit [Remote host closed the connection]
nikhgupta has joined #ruby
evanjs has joined #ruby
Ox0dea has left #ruby ["WeeChat 1.3-dev"]
nikhgupta has quit [Client Quit]
jpfuentes2 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
drocsid has quit [Ping timeout: 244 seconds]
jwilson_ has quit [Read error: Connection reset by peer]
jwilson_ has joined #ruby
bruno- has joined #ruby
nym has quit [Quit: Connection closed for inactivity]
idafyaid has joined #ruby
idafyaid has quit [Changing host]
idafyaid has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
bruno- has quit [Ping timeout: 276 seconds]
_gautam_ has joined #ruby
workmad3 has joined #ruby
drocsid has joined #ruby
cirn0 has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 255 seconds]
<nitenq> how can I use a sudo command with ``
kahuna_ has quit [Quit: Lost terminal]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Aeyrix> `sudo <x>
<Aeyrix> `
Rollabunna has joined #ruby
<nitenq> not wroking
<nitenq> working
x0f has joined #ruby
<Aeyrix> irb(main):004:0> puts `sudo whoami`
<Aeyrix> root
<sevenseacat> thats not helpful.
<Aeyrix> Are you sure?
<nitenq> “sudo: no tty present and no askpass program specified”
<sevenseacat> define 'not working'
<sevenseacat> ok, so you're running it from a script somewhere
cb__ has quit []
<nitenq> exactly
datanoise has joined #ruby
<sevenseacat> good to know this kind of stuff when you ask the initial question :P
<nitenq> ok
oo_ has joined #ruby
* Aeyrix wanders off to not get involved in security semantics.
workmad3 has quit [Ping timeout: 264 seconds]
<nitenq> can I use system instead of `` ?
<Aeyrix> Why do you need sudo?
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<nitenq> cause my command is only working as a sudo
<Aeyrix> What's the command?
<nitenq> fio
tkuchiki_ has joined #ruby
<Aeyrix> Fio does not need to run as root.
<nitenq> sudo fio conf.fio
<nitenq> it does cause i want to write in /etc/
northfurr has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
<Aeyrix> Is this running on a system that anyone other than you has access to?
<nitenq> nop
<Aeyrix> Okay.
<Aeyrix> Modify sudoers to allow that user to execute `fio` without inputting a password.
x0f has quit [Ping timeout: 256 seconds]
<nitenq> hum
<Aeyrix> <user> ALL=(ALL) NOPASSWD: fio
<al2o3-cr> nitenq: this might work: `echo 'yourpassword' | sudo -S command`
<Aeyrix> al2o3-cr: Not anymore.
<Aeyrix> sudo no longer takes input from stdin like that.
<eam> since when?
<al2o3-cr> ah, didn't test
<Aeyrix> Since the last time I tried about a year ago.
yeticry has quit [Ping timeout: 264 seconds]
<eam> sigh
yeticry has joined #ruby
<al2o3-cr> Aeyrix: it does, just tested it
<Aeyrix> What OS?
<al2o3-cr> Aeyrix: arch
<Aeyrix> The fuck?
<Aeyrix> Tested on Debian a year ago. Didn't work.
<Aeyrix> Repeatedly didn't work, because it's a fucking stupid flag that shouldn't exist.
<eam> Aeyrix: did you have one of the configs set that require a terminal?
<al2o3-cr> ah, not got debian to test on :(
<Aeyrix> The fact it exists is kind of disappointing. It shouldn't.
<Aeyrix> Anyway, my suggestion of modifying the sudoers file is more secure.
<eam> why not?
<Aeyrix> Allowing only su execution of that specific binary.
<Aeyrix> eam: lol
<Aeyrix> good one
<eam> Aeyrix: it's fine
<Aeyrix> i'm trying to give serious advice here, eam
<Aeyrix> and you're joking around
<Aeyrix> :(
<eam> any password auth is bad, but supplying the secret via a fd is fine
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nitenq> hum I can’t really do it that way
<nitenq> strange thing is that I have the exact same error when I try to write in /tmp
<eam> nitenq: share the error
<Aeyrix> That's because there's no tty.
<Aeyrix> Because, you know, you're running it from a script.
<nitenq> Aeyrix: even if I don’t run it from a script
<Aeyrix> It can't take or provide user input.
<bootstrappm> nitenq can you elaborate on why you can't really do it that way?
<Aeyrix> nitenq: wait, what
<eam> Aeyrix: that's not necessarily true
<Aeyrix> eam: please stop getting into semantic debates with me, it's tiring
<eam> sudo can access your terminal from within backticks
<eam> Aeyrix: your advice is simply wrong, that's all
<Aeyrix> bootstrappm: Writing to /etc.
<ruboto> nitenq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/874abf4488a0f07563e8
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Aeyrix> That bot is great.
jcoe has joined #ruby
<Aeyrix> nitenq: ls -l /tmp/conf-readwrite-1g.1.0
<eam> if he's running a script from the commandline then backticks and sudo in backticks will properly prompt for his password
<nitenq> hehe
<nitenq> that’s right Aeyrix
<Aeyrix> ya
<Aeyrix> eam: And yet, it doesn't.
<Aeyrix> He pasted the error above.
<eam> Aeyrix: yes due to some other issue, so perhaps don't mislead him
<Aeyrix> “sudo: no tty present and no askpass program specified”
_gautam_ has quit [Quit: Be back later ...]
<nitenq> Oh
<nitenq> no it’s still not working, I deleted the /tmp/conf-readwrite-1g.1.0 and I still have the same error
wookiehangover has joined #ruby
<Aeyrix> Wait why did you delete it?
x0f has joined #ruby
allcentury has joined #ruby
GnuYawk has quit [Remote host closed the connection]
<sevenseacat> lol
fabrice31 has joined #ruby
<nitenq> cause it have been created by the root user
centrx has quit [Quit: Shutting down, Please wait...]
tkuchiki_ has quit [Remote host closed the connection]
RickHull has joined #ruby
<Aeyrix> That is probably gonna happen when you're running a command with `sudo`.
<eam> nitenq: the easy answer is to run your entire script as root, and drop privs where you don't need them
<RickHull> can ARGF play nice with option parsers?
malconis has joined #ruby
<nitenq> Aeyrix: and I don’t run it anymore cause you told me that fio doesn’t need to be root
<eam> there are a few gems that make temporarily giving up root easy
<RickHull> i'm trying to use ARGF with slop, and slop is detecting / consuming a flag, but ARGF still sees it after Slop.parse
<RickHull> i.e. ARGF interprets a slop command line option as a file to be processed
aaeron has quit [Quit: Leaving.]
<Aeyrix> nitenq: It really depends what you're doing. I didn't have the context that you're trying to modify a file in /etc, for instance.
<Aeyrix> You just kind of told us that it wasn't working. It's hard to diagnose an issue without the full picture.
<Aeyrix> For instance, your /etc/sudoers file is probably going to have a line that says `requiretty`.
arescorpio has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
<Aeyrix> I didn't know that before, because that's not default as far as I can remember.
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
<RickHull> ljarvis: what about slopv4 and ARGF?
fabrice31 has quit [Ping timeout: 265 seconds]
<eam> there are two (mostly redundant) flags for that now, requiretty and visiblepw -- both are set by default to foil tty-less sudo
<eam> the latter is only invoked in the PAM stack
x1337807x has quit [Ping timeout: 255 seconds]
malconis has quit [Ping timeout: 276 seconds]
serivichi has joined #ruby
duderonomy has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
<Aeyrix> imo just setuid bit if you want maximum ease
<RickHull> ljarvis: working around this by manipulating ARGV before accessing ARGF
<Aeyrix> Where's Ox0
<eam> RickHull: seems like maybe not using ARGF magic would be in order, in that case
<RickHull> eam: i'm usually not a fan
wallerdev has quit [Quit: wallerdev]
<RickHull> but in this case, ARGF is what i want
serivich has quit [Ping timeout: 265 seconds]
LMity has quit [Ping timeout: 276 seconds]
<eam> RickHull: there's a #replace method it seems
xxneolithicxx has quit [Quit: Leaving.]
<RickHull> hm, for slop?
<eam> on ARGF
simplyianm has joined #ruby
MatthewsFace has joined #ruby
jenrzzz has joined #ruby
evanjs has quit [Remote host closed the connection]
<RickHull> oh, on ARGV
datanoise has quit [Ping timeout: 246 seconds]
symm- has quit [Ping timeout: 276 seconds]
<eam> on ARGF - I suspect on ARGV it may differ in behavior
<RickHull> i'm not sure it helps. a feature of slopv4 is that it doesn't touch ARGV. and ARGF assumes all non-files have been removed from ARGV
<eam> >> ARGF.class
<ruboto> eam # => ARGF.class (https://eval.in/382756)
<eam> what an odd implementation
<RickHull> ARGF is definitely a weirdo
<eam> it's weird in perl too
mdz_ has joined #ruby
<RickHull> i don't see ARGF.replace
justintv90 has joined #ruby
<eam> oh, I misread
<eam> that's a bummer
<eam> RickHull: but, whatever arg parser you're using should give you an array of what's left
<RickHull> oh, good call
<RickHull> ARGV.replace opts.arguments
<eam> yeah something like that
_seanc_ has joined #ruby
<RickHull> thanks, i think that's it!
jenrzzz has quit [Ping timeout: 244 seconds]
<RickHull> funnily enough, i would not have figured out ARGV.replace without your prompting ;)
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
<RickHull> otherwise i was trying to figure out how to make ARGF operate on opts.arguments
<eam> my eyes saw ARGF since that's the doc I was reading and I was like "how odd, what class is that, that's a descriptor kinda, but with #replace"
<eam> I'm still not sure what kind of class it is
mesamoo has quit [Quit: Konversation terminated!]
<RickHull> some perlisms are best not questioned. the answer may raise more questions than it's worth ;)
dorei has quit []
allcentury has quit [Ping timeout: 246 seconds]
RazorX_ has quit [Ping timeout: 256 seconds]
RazorX has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
msnyon has quit [Quit: Textual IRC Client: www.textualapp.com]
crazyhorse18 has quit [Quit: Leaving]
CpuID has quit [Ping timeout: 256 seconds]
towski__ has quit [Remote host closed the connection]
<cj> how do I cat the value in a variable to a file with ruby?
drocsid has quit [Ping timeout: 276 seconds]
<havenwood> cj: File.write 'example.txt', value
tkuchiki_ has joined #ruby
iamninja has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
stardiviner has quit [Ping timeout: 265 seconds]
drocsid has joined #ruby
<eam> >> %w{perlisms can be neat, for example finding the words between the two words}.select {|x| true if (x == "for")..(x == "words") }
<ruboto> eam # => ["for", "example", "finding", "the", "words"] (https://eval.in/382759)
<cj> thansk
datanoise has joined #ruby
<havenwood> eam: Some sort of pseudo-IO Object that's neither a Module nor a Class. :O
sross07 has quit [Ping timeout: 240 seconds]
<eam> it tells me it's a class, but yeah how would I work with that name?
<havenwood> >> ARGF.is_a? Class
<ruboto> havenwood # => false (https://eval.in/382760)
<havenwood> >> ARGF.instance_of? Class
<ruboto> havenwood # => false (https://eval.in/382761)
<eam> >> ARGF.class
<ruboto> eam # => ARGF.class (https://eval.in/382762)
pdoherty has quit [Ping timeout: 255 seconds]
imperator has joined #ruby
thomas is now known as evilthomas
<eam> >> RealClassName = ARGF.class; class RealClassName; def stuff; "hello world"; end; end; ARGF.stuff
fujimura has joined #ruby
<ruboto> eam # => "hello world" (https://eval.in/382763)
<eam> weird
jxpx777 has quit [Quit: Leaving...]
<eam> I can't imagine why it would be special like that
mrmargolis has quit [Remote host closed the connection]
endash has quit [Quit: endash]
<imperator> 'sup
mattp_ has joined #ruby
ReK2 has quit [Remote host closed the connection]
<havenwood> hey
mattp- has quit [Ping timeout: 265 seconds]
hsps_ has quit [Remote host closed the connection]
endash has joined #ruby
endash has quit [Client Quit]
fujimura has quit [Ping timeout: 255 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
mdz_ has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<imperator> havenwood, don't suppose you know C do you?
darkf has joined #ruby
<havenwood> imperator: probably not enough to be of use, whatcha asking about?
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
spider-mario has quit [Ping timeout: 252 seconds]
sross07 has joined #ruby
krisquigley has quit [Ping timeout: 276 seconds]
stardiviner has joined #ruby
iamninja has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nitenq has quit [Quit: nitenq]
araujo_ has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxpx777 has joined #ruby
aeze has joined #ruby
araujo has quit [Ping timeout: 264 seconds]
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> imperator: So `expected 'const wchar_t * __restrict__' but argument is of type 'unsigned int'` then it blows up on?: (wchar_t*)ruby_xmalloc(MAX_WPATH);
revath has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
<zenspider> eam: vvv
<havenwood> imperator: Yeah, I dunno. O.o?
<zenspider> >> def ARGF.woot; p :woot!; end; ARGF.woot
<ruboto> zenspider # => :woot! ...check link for more (https://eval.in/382764)
Yiota has joined #ruby
yqt has quit [Ping timeout: 276 seconds]
failshell has joined #ruby
nonparfumee has joined #ruby
<quazimodo> guys
EllisTAA has joined #ruby
<quazimodo> I need to find a memory leak in one of our prod servers
<quazimodo> problem is
jxpx777 has quit [Quit: Leaving...]
<quazimodo> rbtrace -p 97967 -e 'load "/Users/robertmatesic/Projects/rails/randwick/scripts/heap_dump.rb"' <- always hangs
<imperator> havenwood, looks to me like it's choking on https://github.com/djberg96/win32-xpath/blob/master/ext/win32/xpath.c#L59
<sevenseacat> I hope the guys can help you.
failshell has quit [Ping timeout: 264 seconds]
<quazimodo> heap dump looks like
drewo has joined #ruby
<quazimodo> that thread executes just fine if I do ruby -e
<quazimodo> but rbtrace, no matter what, hangs
tkuchiki_ has joined #ruby
<quazimodo> anyone savvy on this?
bigkevmcd has quit [Ping timeout: 265 seconds]
GPrime has joined #ruby
<quazimodo> rbtrace -p 97967 -e "puts 'hi';" does work
<quazimodo> rbtrace -p 97967 -e "puts 'hi'; puts 'hi'; puts 'hi'; <- hangs
_gautam_ has joined #ruby
<zenspider> are you requiring rbtrace in the production server process?
corehook has joined #ruby
tvw has joined #ruby
<quazimodo> zenspider: not sure, let me see
Zackio has quit [Read error: Connection reset by peer]
<quazimodo> zenspider: no
<quazimodo> am I meant to?
pl1ght has quit [Read error: Connection reset by peer]
<zenspider> I don't think it is possible to just magically connect to a pid and know what its doing
EllisTAA has quit [Quit: EllisTAA]
pl1ght has joined #ruby
<zenspider> look at the doco on https://github.com/tmm1/rbtrace
bb010g has joined #ruby
fujimura has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
GPrime has quit [Ping timeout: 246 seconds]
lkba_ has joined #ruby
jxpx777 has joined #ruby
nobitanobi has quit []
braincra- has quit [Quit: bye bye]
<quazimodo> rm
<quazimodo> hrm
Cust0sLim3n has quit [Read error: Connection timed out]
yfeldblum has joined #ruby
pontiki has joined #ruby
revath has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 256 seconds]
revath has joined #ruby
Randroid has joined #ruby
dwithers has joined #ruby
bootstrappm has left #ruby [#ruby]
Zackio has joined #ruby
djbkd has joined #ruby
Cache_Money has joined #ruby
psy_ has quit [Quit: Leaving]
Cust0sLim3n has joined #ruby
<quazimodo> ok its included now
Randroid has left #ruby [#ruby]
psy_ has joined #ruby
Randroid has joined #ruby
braincrash has joined #ruby
lptm has quit [Quit: fix config]
pl1ght has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby
Randroid has left #ruby [#ruby]
pyon has joined #ruby
* imperator doesn't get what it doesn't like
Randroid has joined #ruby
Randroid has left #ruby [#ruby]
dwithers1 has joined #ruby
Randroid has joined #ruby
cirn0 has joined #ruby
Randroid has left #ruby [#ruby]
Randroid has joined #ruby
corehook has quit [Remote host closed the connection]
dwithers has quit [Ping timeout: 240 seconds]
tkuchiki_ has quit [Remote host closed the connection]
Randroid has left #ruby [#ruby]
<zenspider> imperator: what's up?
revath has quit [Ping timeout: 265 seconds]
<imperator> zenspider, not much, just trying to figure out why devkit hates my swprintf :)
<imperator> what you up to?
<zenspider> trying to write a new language compiler in scheme :)
krz has joined #ruby
gianlucadv has joined #ruby
bruno- has joined #ruby
<imperator> alrighty then ;)
<zenspider> it's going fine, I just don't understand the runtime's load path system
<zenspider> ie, the language part is REALLY clean and easy... making it go? not so much
<zenspider> ah. ok. figured it out. painfully
corehook has joined #ruby
<quazimodo> is the following statement correct: on a single cpu machine, ruby threads behave as most any other languages threads?
<quazimodo> but on a machine with more cpus, then MRI ruby's threading is severly limited
bruno- has quit [Ping timeout: 252 seconds]
Cache_Money has quit [Quit: Cache_Money]
<zenspider> I don't bother with such BS
workmad3 has joined #ruby
pyon is now known as lptm
krz has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
krz has joined #ruby
jwaldrip has joined #ruby
arup_r has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 256 seconds]
<zenspider> yet another website I have to close because they pop up over the text I'm trying to read. GAWD I hate this stupid trend
oo_ has quit [Remote host closed the connection]
Yiota has joined #ruby
fedexo has joined #ruby
at0m has joined #ruby
<at0m> can anyone tell me actually what does the eval do in ruby.. thanks
tkuchiki_ has joined #ruby
<sevenseacat> evaluates code.
<at0m> can i say it can only used in metaprogramming
<shevy> at0m it interpretes what you pass it in like eval "5+5"
<shevy> which will give you back 10
<at0m> got it.
Cache_Money has joined #ruby
jtdoncas has quit [Ping timeout: 272 seconds]
mdz_ has joined #ruby
mdz_ has quit [Remote host closed the connection]
<at0m> how is block differ from method and function?
<shevy> dunno if it is used only in metaprogramming alone ... take irb
<shevy> it has the file called workspace.rb, among other files, with content such as: @binding = eval("proc{binding}.call",
<shevy> blocks are like an additional optional/free argument you can get for every method
<shevy> they are used in e. g. File.open() {} to close the file handle again after you finished manipulating that file
<at0m> then why we not only use block why method?
gix has quit [Ping timeout: 245 seconds]
<at0m> shevy??
sdothum has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
<shevy> can you rephrase that question
<shevy> I am unsure what you are asking
<shevy> a block is associated with a method
<shevy> do you see the {} ?
<shevy> File.open() <--- this is the method {} <--- this is the associated block for that method
<at0m> means why we not only use block , since block and method can do same piece of work.
nitenq has joined #ruby
<shevy> that does not make sense?
<shevy> "only use block"
oo_ has joined #ruby
<shevy> how can you use it without the method?
Cache_Money has quit [Quit: Cache_Money]
<at0m> ohooo i got it.
<shevy> even proc/lambdas have a method called .call()
<at0m> it was little misconception
<shevy> ok
<shevy> blocks just give you additional flexibility
<shevy> you don't have to use them if you don't like them
krz has quit [Ping timeout: 256 seconds]
<at0m> shevy can you give little introduction of yield. and how's differ from lambda
krz has joined #ruby
kfpratt has joined #ruby
<at0m> i know that by using yield our code become shot.. but i want something more/
<shevy> nono
<shevy> forget about lambdas here
Rollabunna has quit [Ping timeout: 255 seconds]
<shevy> with yield you only access the content of a block. that's it
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kfpratt has quit [Remote host closed the connection]
gix has joined #ruby
<shevy> I think you need to test it with code
tkuchiki_ has quit [Remote host closed the connection]
<at0m> and lambda?
<shevy> at0m look here for yield: http://apidock.com/ruby/Kernel/block_given%3F
<shevy> understand yield first
<shevy> lambda, dunno... you have to ask someone who uses them. I still try to find a compelling use case where I need to use them, and where they fit into the rest of my code; you can grep through the source of rack though, rack makes use of lambdas/procs a lot
shock_one has joined #ruby
bigkevmcd has joined #ruby
jxpx777 has quit [Quit: Leaving...]
attlasbot has joined #ruby
<at0m> shevy: i have gone through tut. of code acedmy but when sometimes i start thinking those thing i got confused??
<at0m> it seems all are doing same thing..
<shevy> no
tkuchiki_ has joined #ruby
<shevy> you just have to use them in code
<shevy> lambda/procs are almost the same yes; difference being in regards to mandatory versus non-mandatory arguments
<shevy> and a block, now that's different right? it's attached to a method
<at0m> i am talking about whole cocept of ruby. it is easy but i don't know how to get it in heart all concept
<shevy> yeah there are lots of concepts
CpuID has joined #ruby
<shevy> you should use what you like
<shevy> do you have to know all about lambdas?
shock_one has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
serivich has joined #ruby
<at0m> i got lambda thanks
jxpx777 has joined #ruby
<shevy> hehehe
<shevy> so you understand lambdas
<shevy> but not blocks
<shevy> that is weird :)
CloCkWeRX has quit [Ping timeout: 240 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
gianlucadv has quit [Ping timeout: 264 seconds]
attlasbot is now known as coffee__cup
<at0m> no no i have gone through both and i think i didn't understand anyone of them at that time.
serivichi has quit [Ping timeout: 244 seconds]
Usaur has joined #ruby
Pisuke has quit [Ping timeout: 265 seconds]
Scroff has quit [Ping timeout: 256 seconds]
Spami has quit [Quit: This computer has gone to sleep]
corehook has quit [Remote host closed the connection]
balazs has joined #ruby
snockerton has joined #ruby
Channel6 has joined #ruby
ozialien has joined #ruby
snockerton has quit [Client Quit]
at0m has quit [Ping timeout: 246 seconds]
uri_ has joined #ruby
Pisuke has joined #ruby
bronson has joined #ruby
pontiki has quit [Quit: <poit>]
vikaton has quit [Quit: Connection closed for inactivity]
krz has quit [Read error: Connection reset by peer]
nitenq has quit [Quit: nitenq]
tkuchiki_ has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
balazs has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 276 seconds]
aridere has joined #ruby
balazs has joined #ruby
northfurr has quit [Quit: northfurr]
bronson has joined #ruby
oo_ has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxpx777 has quit [Quit: Leaving...]
yfeldblum has quit [Remote host closed the connection]
jwaldrip has quit [Quit: Be back later ...]
bronson has quit [Client Quit]
<zenspider> blocks/procs are lovely, but they definitely take some getting used to
krisquigley has joined #ruby
pragmatism has joined #ruby
jwaldrip has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 246 seconds]
krisquigley has quit [Ping timeout: 265 seconds]
flughafe1 has quit [Ping timeout: 244 seconds]
dwithers2 has joined #ruby
dwithers1 has quit [Read error: No route to host]
CloCkWeRX has joined #ruby
dwithers3 has joined #ruby
CloCkWeRX1 has joined #ruby
kahuna_ has joined #ruby
dwithers4 has joined #ruby
skade has joined #ruby
dwithers2 has quit [Ping timeout: 252 seconds]
krz has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
chris1 has joined #ruby
dwithers has joined #ruby
daynaskully has quit [Ping timeout: 265 seconds]
tvw has quit []
chris1 has quit [Quit: WeeChat 1.2]
dwithers3 has quit [Read error: No route to host]
northfurr has joined #ruby
dwithers4 has quit [Ping timeout: 240 seconds]
digifiv5e has joined #ruby
digifiv5e is now known as Guest19245
davedev2_ has joined #ruby
jesterfraud_work has joined #ruby
<jesterfraud_work> what's the pattern behind generating hooks?
davedev24_ has quit [Ping timeout: 265 seconds]
<jesterfraud_work> I have a module I include that I want to change the behaviour in one model, but it's an additive change, so I figure a hook is probably the most DRY way to do it
yfeldblum has joined #ruby
coffee__cup has quit [Quit: Leaving]
failshell has joined #ruby
<jesterfraud_work> specifically
<jesterfraud_work> I want a pre-method hook
<jesterfraud_work> or a post-method, haven't decided yet, but I figure it'd be really similar
_gautam_ has quit [Quit: Lingo: www.lingoirc.com]
RegulationD has joined #ruby
failshell has quit [Ping timeout: 255 seconds]
hanmac has quit [Ping timeout: 256 seconds]
aeze has quit [Quit: aeze]
revath has joined #ruby
saadq has joined #ruby
otherj has joined #ruby
saadq has quit [Client Quit]
RegulationD has quit [Ping timeout: 256 seconds]
<jesterfraud_work> I've done this, any feedback? https://gist.github.com/anonymous/d396bc7b4e92177e9de0
aeze has joined #ruby
ZergCoder has joined #ruby
<shevy> hooks are weird
<shevy> I am still trying to understand them but it did not yet make click for me :( http://www.sitepoint.com/hitchhikers-guide-to-metaprogramming-classmodule-hooks/
<jesterfraud_work> shevy: I'm trying to build my own
<jesterfraud_work> it didn't succeed, either, those are instance methods
araujo_ has quit [Quit: Leaving]
<imperator> jesterfraud_work, perhaps https://github.com/deleteman/Conditionator ?
oo_ has joined #ruby
northfurr has quit [Quit: northfurr]
hanmac has joined #ruby
northfurr has joined #ruby
musgravejw has quit [Ping timeout: 246 seconds]
ozialien has quit [Quit: Leaving]
<imperator> i thought ruby-core was going to add some kind of support for that at some point, but i don't know if they ever did
yeticry has quit [Read error: Connection reset by peer]
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ottlikg has joined #ruby
jenrzzz has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
Cust0sLim3n has quit [Read error: Connection timed out]
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sLim3n has joined #ruby
shock_one has joined #ruby
Spami has joined #ruby
konsolebox has joined #ruby
aeze has quit [Quit: aeze]
amclain has quit [Quit: Leaving]
houhoulis has quit [Remote host closed the connection]
ZergCoder has quit []
Volsus has joined #ruby
yeticry has joined #ruby
tkuchiki_ has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
cirn0 has quit [Remote host closed the connection]
closer has joined #ruby
revath has quit [Ping timeout: 276 seconds]
j4cknewt has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
workmad3 has joined #ruby
datanoise has joined #ruby
coffee__cup has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A205B064 has quit [Ping timeout: 265 seconds]
closer has quit [Client Quit]
balazs has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
closer has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
revath has joined #ruby
Deck- has joined #ruby
Deck- has quit [Max SendQ exceeded]
shock_one has quit [Remote host closed the connection]
_ht has joined #ruby
Deck- has joined #ruby
neanderslob has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
neanderslob has joined #ruby
Deck` has quit [Ping timeout: 252 seconds]
neanderslob has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
ramfjord has joined #ruby
agilenav has joined #ruby
aganov has joined #ruby
agilenav has quit [Client Quit]
Deck- has quit [Ping timeout: 264 seconds]
agilenav has joined #ruby
agilenav has quit [Client Quit]
Channel6 has quit [Quit: Leaving]
agilenav has joined #ruby
<flughafen> moinoin
crankharder has quit [Ping timeout: 276 seconds]
frem has quit [Quit: Connection closed for inactivity]
agilenav has quit [Client Quit]
podman has quit [Quit: Connection closed for inactivity]
tagrudev has joined #ruby
konsolebox has joined #ruby
neanderslob has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
Deck- has joined #ruby
neanderslob_ has joined #ruby
<shevy> flughafen!
Rollabunna has joined #ruby
<shevy> will today be the day of great flights to happen?
dhruvsrivastava has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
neanderslob_ has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 276 seconds]
shock_one has joined #ruby
alex88 has joined #ruby
DoubleMalt has joined #ruby
datanoise has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Ping timeout: 264 seconds]
<flughafen> shevy: there will be no flughafening todayu
<shevy> haha
fedexo has quit [Remote host closed the connection]
alex88 has quit [Ping timeout: 256 seconds]
konsolebox has quit [Read error: Connection reset by peer]
balazs has joined #ruby
Xeago has joined #ruby
agent_white has joined #ruby
<agent_white> Evenin'
edwinvdgraaf has quit [Remote host closed the connection]
sandstrom has joined #ruby
revath has quit [Ping timeout: 272 seconds]
balazs has quit [Ping timeout: 240 seconds]
swgillespie has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
michaeldeol has joined #ruby
x0f has quit [Ping timeout: 276 seconds]
simplyianm has quit [Remote host closed the connection]
ascarter has joined #ruby
chussenot has joined #ruby
chinmay_dd has joined #ruby
arup_r has joined #ruby
last_staff has joined #ruby
<certainty> moin
<flughafen> oi oi oi
<certainty> yow flughafen
ottlikg has quit [Ping timeout: 246 seconds]
corehook has joined #ruby
otherj has quit [Quit: .]
x0f has joined #ruby
revath has joined #ruby
_seanc_ has quit [Ping timeout: 276 seconds]
yardenbar has joined #ruby
konsolebox has joined #ruby
yfeldblum has quit [Remote host closed the connection]
corehook has quit [Remote host closed the connection]
krisquigley has joined #ruby
<flughafen> hows' ti going certainty
corehook has joined #ruby
<flughafen> i wrote ruby last night!
anisha has joined #ruby
<certainty> flughafen: not too bad. I didn't write ruby in week now
davedev2_ has quit [Read error: Connection reset by peer]
<certainty> puppet doesn't count
attlas__bot has joined #ruby
<certainty> actually i didn't do any programming xD
shock_one has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<flughafen> hehe
<flughafen> are you going to have to do any python with salt
<certainty> that sucks :)
<certainty> flughafen: likely. At least for orchestration it's almost in here. I'd like to do the entire shift and do CM as well
<certainty> i have to talk some more though to make it happen
corehook has quit [Remote host closed the connection]
corehook has joined #ruby
<certainty> also i'd love to work further on the matasano challenges. Too few time :(
krisquigley has quit [Ping timeout: 256 seconds]
coffee__cup has quit [Ping timeout: 256 seconds]
atomi has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
AndroidLoverInSF has joined #ruby
atomi has joined #ruby
<flughafen> i haven't looked at those
psy_ has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 245 seconds]
<certainty> i only started. I had them on my list for a while and finally got around to actually start
<certainty> i'm doing them in haskell though
atomi has quit [Remote host closed the connection]
keen__________ has joined #ruby
revath has quit [Quit: Leaving.]
oo_ has quit [Remote host closed the connection]
revath has joined #ruby
keen_________ has quit [Read error: Connection reset by peer]
<quazimodo> do we have a 'object orientation design' channel in irc?
AndroidLoverInSF has quit [Ping timeout: 246 seconds]
coffeecup__ has joined #ruby
<quazimodo> where I can ask about abstract patterns and idesa
<flughafen> i don't think so?
AndroidLoverInSF has joined #ruby
<quazimodo> whether or not the ideas scale well etc
<quazimodo> I need to find a pro
<quazimodo> someone to mentor me *without* violating my trust with sexual harassment later
attlas__bot has quit [Ping timeout: 264 seconds]
atomi has joined #ruby
<sevenseacat> ...
atomi has quit [Read error: Connection reset by peer]
mike___1234 has joined #ruby
unshadow has joined #ruby
<certainty> i don't even
unshadow has quit [Client Quit]
Cust0sLim3n has quit [Ping timeout: 252 seconds]
<sevenseacat> that was entirely irrelevant.
ramfjord has joined #ruby
atomi has joined #ruby
skysploi_ has joined #ruby
postmodern has quit [Quit: Leaving]
skysploit has quit [Ping timeout: 276 seconds]
<shevy> lol
<flughafen> my package is still at dhl....
<flughafen> for mroe than a week now
<shevy> flughafen it's time to move on to new adventures
<certainty> that sucks
<shevy> so the airport failed. let's build something grand else
<sevenseacat> maybe theyre waiting for you to fly it to yourself.
sinkensabe has joined #ruby
<flughafen> i'm tempted to just go get it myself, but from what I heard from a coworker, the place has no customer thing for me to pick it up
failshell has joined #ruby
Cust0sLim3n has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
<shevy> hehe
<shevy> simply go through the backdoor
corehook has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
RegulationD has joined #ruby
northfurr has quit [Quit: northfurr]
kiki_lamb has quit [Ping timeout: 255 seconds]
sinkensabe has quit [Remote host closed the connection]
sandelius has joined #ruby
failshell has quit [Ping timeout: 276 seconds]
kiki_lamb has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
corehook has joined #ruby
balazs has joined #ruby
allomov has joined #ruby
<imperator> oh, hell, mingw has some sort of non-conforming version of swprintf
freezevee has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
gluten_hell_ has joined #ruby
<freezevee> how do you keep settings in a separate file ? For example If you want to save 100 links, its titles and the language of the websites, is it sane to save them in a module as constant Hashes or yaml files ?
<sevenseacat> seems like thats what a database would be for
Volsus has quit [Quit: Leaving]
neanderslob has joined #ruby
solars has joined #ruby
<shevy> freezevee you can keep it in a Hash, and then save it in a yaml file
balazs has quit [Ping timeout: 246 seconds]
<shevy> freezevee, for instance: YOUR_YAML_FILE_HERE = 'bla.yml'; File.open(YOUR_YAML_FILE_HERE, "w") {|f| YAML.dump(your_hash_data_here, f) }
<freezevee> shevy: what is more common ? I did it with a config.rb file and calling them as Config::Links::GOOGLE[:url] for example
psy_ has joined #ruby
<shevy> how do you update config.rb
<freezevee> sevenseacat: 100 was a brave number, I am only having 10 of them
<sevenseacat> okay?
roolo has joined #ruby
<freezevee> shevy: what do you mean? it's simple RSS feeds so I am not going to update them all the time
<shevy> sevenseacat keeps a database of mice in the environment
kiki_lamb has quit [Ping timeout: 245 seconds]
Paradox has quit [Quit: off to herp the derps]
<shevy> freezevee I have no idea what you mean. I don't think I ever updated a .rb file dynamically in such a way
corehook has quit [Remote host closed the connection]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<freezevee> shevy: I don't need to update it
<shevy> aha
Scroff has joined #ruby
<shevy> if you hardcoded it anyway then you can just keep it in a .rb file
<shevy> *hardcode
AnoHito_ has joined #ruby
AnoHito has quit [Ping timeout: 272 seconds]
Paradox has joined #ruby
datanoise has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
rubie has quit [Remote host closed the connection]
<freezevee> shevy: the application is a simple RSS parser, meaning that ruby fetches the RSS data and then I display them on a simple html
<freezevee> a fun project
<freezevee> shevy: so I am looking for somewhere to save 10 links with a title and a language, like GOOGLE = { title: "Google", url: "http://...", lang: "en" }
jenrzzz has joined #ruby
<shevy> yes, a hash you have there
<freezevee> and I am reading that either yaml or an .rb module is the same
tkuchiki_ has joined #ruby
alex88 has joined #ruby
<shevy> ruby needs to put the yaml data into ruby data anyway
kiki_lamb has joined #ruby
Scroff has quit [Ping timeout: 272 seconds]
<freezevee> shevy: what is more common in these situations ? I've seen only Rails where there are database.yml and other .yml files for configurations
<freezevee> shevy: it works as a module but should I leave it as is or change it to yaml ?
rubie has joined #ruby
<freezevee> I am just looking for the best practice
fabrice31 has joined #ruby
<freezevee> to use now and on future projects
rubie has quit [Remote host closed the connection]
ReK2 has joined #ruby
ReK2 has joined #ruby
chussenot has quit [Quit: chussenot]
apoplexy has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
<shevy> you are putting so much thought into this
<shevy> put the stuff into a .rb file
<shevy> end of story
<shevy> :)
<jesterfraud_work> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jesterfraud_work> thanks ruboto
edwinvdgraaf has joined #ruby
<shevy> for my larger projects, I tend to have a directory called configuration/
drewo has joined #ruby
<shevy> where every individual user-togglable option becomes a yaml file
<shevy> base_dir.yml
<shevy> /tmp
<shevy> or something like that
strixd has joined #ruby
strixd has quit [Excess Flood]
shock_one has joined #ruby
auzty has joined #ruby
strixd has joined #ruby
strixd has quit [Excess Flood]
jwaldrip has quit [Quit: Be back later ...]
strixd has joined #ruby
yaw has joined #ruby
pyo_ has joined #ruby
svoop has joined #ruby
allomov has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 265 seconds]
<freezevee> shevy: all right
rdark has joined #ruby
<freezevee> thanks
<shevy> \o/
tkuchiki_ has quit [Remote host closed the connection]
chussenot has joined #ruby
araujo has joined #ruby
shock_one has quit [Remote host closed the connection]
oo_ has joined #ruby
datanoise has quit [Ping timeout: 250 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tolnaiz has joined #ruby
j4cknewt has joined #ruby
workmad3 has joined #ruby
kalusn has joined #ruby
imperator has quit [Quit: Valete!]
Tolnaiz has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
skade has joined #ruby
langlands has joined #ruby
blue_deref has quit [Quit: bbn]
edwinvdgraaf has quit [Remote host closed the connection]
hubcaps has joined #ruby
alex88 has quit [Remote host closed the connection]
konieczkow has quit [Ping timeout: 265 seconds]
edwinvdgraaf has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.2-dev]
edwinvdgraaf has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
justintv90 has quit [Remote host closed the connection]
veinofJebBerry has quit [Read error: Connection reset by peer]
dmolina has joined #ruby
krz has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
sandstrom has quit [Quit: My computer has gone to sleep.]
chussenot has quit [Quit: chussenot]
<quazimodo> Leaked 12790 STRING objects of size 99558/39688 at: /Users/robertmatesic/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:168
<quazimodo> is that worrying
<quazimodo> that happened in about 3 minutes
<apeiros> how is that size information supposed to be read? o0
<shevy> your objects try to break free
skysploi_ has quit []
krz has quit [Ping timeout: 240 seconds]
Iskarlar has joined #ruby
<apeiros> if they're truly leaked, I'd say this is worrying, yes. question is whether the tool you use is correct.
konsolebox has quit [Ping timeout: 276 seconds]
andikr has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tolnaiz has joined #ruby
dhjondoh has joined #ruby
svoop has quit [Quit: Textual IRC Client: www.textualapp.com]
drewo has quit [Ping timeout: 250 seconds]
jesterfraud_work has quit [Quit: Page closed]
Zai00 has joined #ruby
nitenq has joined #ruby
ta has joined #ruby
antgel has joined #ruby
Deck- has quit [Quit: Leaving]
alex88 has joined #ruby
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
msgodf has joined #ruby
unshadow has joined #ruby
Mon_Ouie has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
livathinos has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
k3asd` has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
ylla has joined #ruby
konsolebox has joined #ruby
<quazimodo> apeiros: yep
<quazimodo> apeiros: we ran GC.start prior to dumping the heap several times
jenrzzz has joined #ruby
<quazimodo> not sure what tool analysed the heap dumps
<quazimodo> BUT
<ljarvis> moin
<quazimodo> i find it very strange that samething like postgresql database_statements file would have a leak
<quazimodo> something so wel tested
<quazimodo> prolific etc
svoop has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
rbowlby has joined #ruby
RickHull has left #ruby [#ruby]
Mon_Ouie has quit [Ping timeout: 264 seconds]
svoop has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Remote host closed the connection]
yfeldblum has joined #ruby
MatthewsFace has joined #ruby
svoop has joined #ruby
sinkensabe has joined #ruby
dmolina has quit [Quit: Leaving.]
yfeldblu_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
msgodf has quit [Ping timeout: 245 seconds]
nofxx has quit [Ping timeout: 265 seconds]
sandstrom has joined #ruby
<apeiros> quazimodo: indeed
yfeldblum has quit [Ping timeout: 245 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki_ has joined #ruby
shredding has joined #ruby
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
corehook has joined #ruby
edwinvdgraaf has joined #ruby
Rollabunna has joined #ruby
nitenq has left #ruby [#ruby]
sandstro_ has joined #ruby
lkba_ has quit [Remote host closed the connection]
Scroff has joined #ruby
sandstrom has quit [Ping timeout: 245 seconds]
corehook has quit [Ping timeout: 248 seconds]
Rollabunna has quit [Ping timeout: 276 seconds]
havenwood has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
sinkensabe has joined #ruby
coffeecup__ has quit [Quit: Leaving]
Randroid has joined #ruby
fabrice31_ has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
fabrice31 has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
krisquigley has joined #ruby
sinkensabe has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
chussenot has joined #ruby
Forgetful_Lion has joined #ruby
allomov has joined #ruby
senayar has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LMity has joined #ruby
bayed has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
senayar has quit [Remote host closed the connection]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
mikecmpbll has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
svoop has quit [Read error: Connection reset by peer]
konieczkow has joined #ruby
jenrzzz has joined #ruby
haxrbyte has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
stan has joined #ruby
codecop has quit [Client Quit]
konieczkow has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
yqt has joined #ruby
msgodf has joined #ruby
yqt has quit [Max SendQ exceeded]
haxrbyte has quit [Ping timeout: 252 seconds]
skade has joined #ruby
yqt has joined #ruby
revath has left #ruby [#ruby]
skade has quit [Client Quit]
chinmay_dd has quit [Remote host closed the connection]
simplyianm has joined #ruby
Caius has quit [Ping timeout: 276 seconds]
LMity has quit [Ping timeout: 244 seconds]
senayar has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
Hounddog has joined #ruby
Scroff has quit [Remote host closed the connection]
<shevy> trying to compare languages and productivity is very hard
michael_mbp has quit [Excess Flood]
allomov has quit [Remote host closed the connection]
simplyianm has quit [Ping timeout: 255 seconds]
Scroff has joined #ruby
Iskarlar has quit [Read error: Connection reset by peer]
Iskarlar has joined #ruby
failshell has joined #ruby
michael_mbp has joined #ruby
doertedev has joined #ruby
yaw has left #ruby ["Textual IRC Client: www.textualapp.com"]
freezevee has quit []
chinmay_dd has joined #ruby
Caius has joined #ruby
bruno- has joined #ruby
bMalum has joined #ruby
RegulationD has joined #ruby
w1xz has joined #ruby
w1xz has quit [Max SendQ exceeded]
<shevy> like trying to clone mediawiki or phpBB
Usaur has quit [Read error: Connection reset by peer]
failshell has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
tomphp has joined #ruby
quimrstorres has joined #ruby
maxshelley has joined #ruby
lkba has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
x44x45x41x4E has joined #ruby
dfockler has joined #ruby
TheHodge has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby
dmolina has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
fabrice31 has joined #ruby
konieczkow has joined #ruby
dumdedum has joined #ruby
dmolina has left #ruby [#ruby]
dfockler has quit [Ping timeout: 265 seconds]
chussenot has quit [Quit: chussenot]
atom_ has joined #ruby
<atom_> hello what is the process of getting jruby for linux
<atom_> hello what is the process of getting jruby for linux
<atom_> there only i get the package to download when typed jruby -v it says not found?
<ljarvis> you installed it?
<apeiros> "Run JRuby: The JRuby startup script lives in the "bin" directory. Run "bin/jruby -v" to confirm it."
shock_one has joined #ruby
<ljarvis> ^
<apeiros> I mean… it stands like *right fing there*
<yorickpeterse> morning kids
allomov has joined #ruby
<Darkwater> \o
aapole has joined #ruby
<undeadaedra> hi
krz has joined #ruby
chussenot has joined #ruby
<apeiros> but I guess reading a 3 step guide is just 2 steps too much…
KrzaQ has quit [Read error: Connection reset by peer]
<ljarvis> it's a lot of steps to try and keep concentration
<yorickpeterse> ad hominem ad hominem ad hominem!
<atom_> i used sudo apt-get jruby
<ljarvis> why?
KrzaQ has joined #ruby
Pupeno has joined #ruby
<atom_> to install
<ljarvis> why?
<atom_> i think that packge is for linux
<sevenseacat> sudden urge.
<ljarvis> you think?
<yorickpeterse> ljarvis: most distros actually ship jruby
<ljarvis> where did you get that idea? did you read it? did you just guess it?
<ljarvis> yorickpeterse: wot
<sevenseacat> do they ship it any better than they ship MRI ruby?
<atom_> ok then how to install it after download
jcaho has quit [Read error: Connection reset by peer]
<ljarvis> shots fired
<sevenseacat> thats a no
<ljarvis> :D
<ljarvis> atom_: read the instructions
fabrice31_ has joined #ruby
<ljarvis> it literally tells you exactly what to do
<yorickpeterse> 1.5 is from 2010
<yorickpeterse> haha
<ljarvis> impressive
<jhass> so stable
<undeadaedra> Debian, what did you expect?
<ljarvis> such up to date
<yorickpeterse> lol, even unstable has 1.5
<shevy> undeadaedra oh you have your old nick back again
<yorickpeterse> I suppose it's just not maintained because that _is_ pretty odd
<ljarvis> cutting edge
<shevy> debian is slow, we know that
allomov has quit [Read error: Connection reset by peer]
<undeadaedra> shevy: "old". "adaedra" is the original one.
<yorickpeterse> Because they do have MRI 2.2
<jhass> scnr
jcaho has joined #ruby
allomov has joined #ruby
<atom_> m using ubuntu
<atom_> no archlinux
corehook has joined #ruby
Scrofff has joined #ruby
fabrice31_ has quit [Read error: No route to host]
langlands has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
fabrice31_ has joined #ruby
<apeiros> `apt-get install jruby` installs a jruby for me just fine. but it's a horribly old version as yorickpeterse already pointed out
arup_r has quit [Remote host closed the connection]
<undeadaedra> atom_: I don't think that was for you. Did you do what ljarvis gave you?
<apeiros> so IMO stick with that "getting started" page
roolo has quit [Remote host closed the connection]
negev has joined #ruby
<yorickpeterse> if only all distros would use a universal package manager and repository
<yorickpeterse> life would be a heck of a lot easier for us puny users
nikhgupta has joined #ruby
Scroff has quit [Ping timeout: 256 seconds]
<jhass> philosophies are just too different
bMalum has quit [Quit: bMalum]
<yorickpeterse> You mean everybody thinks they're a special snowflake
<jhass> I guess
<yorickpeterse> "ooooh nooo we're Canonical we can use our own fork of apt"
<negev> hi, i want to run ruby via apache. doesn't seem like there's a clean way to do this. don't want to run rails as my app is very very simple and rails is needless bloat. i'm currently using Erubis to execute the ruby scripts as cgi's, but struggling with basic issues like being able to pull in other scripts as subtemplates. can anyone point me at a more elegant solution?
<yorickpeterse> negev: typically ruby apps use Rack and have a proxy (apache/nginx) in front of it
<apeiros> negev: the common way to run ruby is via rack
<ljarvis> negev: the solution would be to use an app
<yorickpeterse> CGI is pretty rarely used nowadays
<apeiros> and via apache the common solution to run rack apps is passenger
<yorickpeterse> negev: http://rack.github.io/
Siyfion has joined #ruby
Cust0sLim3n has quit [Ping timeout: 252 seconds]
<yorickpeterse> hm, whatever happened to Rack 2.0? I recall reading ideas and what not about it a few years back
<krz> i have an array %w[a b c]. how do i replace a (the first element) with z? whts the best way to go about this?
<ljarvis> one can dream
Randroid has quit [Quit: Randroid]
<ljarvis> krz: foo[0] = 'z'
bMalum has joined #ruby
iamninja has quit [Ping timeout: 252 seconds]
<maloik> yorickpeterse: no clue, maybe now is a good time to check with tenderlove about that considering the recent CVE
<maloik> I didn't read anything about it other than his gist or github issue
marr has joined #ruby
nikhgupta has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
Abhijit has joined #ruby
Abhijit has quit [Max SendQ exceeded]
workmad3 has joined #ruby
<yorickpeterse> I think the initial idea was from raggi IIRC
bMalum has quit [Quit: bMalum]
ruby-lang478 has joined #ruby
<yorickpeterse> oh hrm, I think it was a secret gist
<yorickpeterse> so I can't find it
<ruby-lang478> Hello guys
ruby-lang478 is now known as BryanTM
<maloik> yea I'm not sure about the history of it all, his gist was the only I read I think
revath has joined #ruby
revath has left #ruby [#ruby]
bluish has joined #ruby
<yorickpeterse> in unrelated news, I hate the word "Serializable"
<yorickpeterse> it's a PITA to type
nir0 has joined #ruby
<undeadaedra> lot of english words are a PITA to type
workmad3 has quit [Ping timeout: 250 seconds]
<yorickpeterse> "fuck" is pretty easy :D
<undeadaedra> :D
<krz> ty ljarvis
<maloik> reminds me of that 'chaos' poem that was on HN the other day
tedstriker has joined #ruby
<yorickpeterse> "include Fuck" "The Fuck module does X and Y ...."
DEA7TH has joined #ruby
<maloik> (I know I know, it's a classic, but it was getting shared more because of HN)
oo_ has quit [Remote host closed the connection]
<yorickpeterse> maloik: eh, which one?
lkba_ has joined #ruby
<nir0> hi guys! how do i make a PATCH request? like Net::HTTP.post_form and Net::HTTP.get
<maloik> let me check
<nir0> Net::HTTP.patch results in NoMethod
<maloik> Internal Server Error
platzhirsch has joined #ruby
<maloik> nice..
Igorshp has joined #ruby
<maloik> I guess HN broke it
valkyrka has joined #ruby
<maloik> aha here it is yorickpeterse: http://ncf.idallen.com/english.html
Cust0sLim3n has joined #ruby
<undeadaedra> « Engineering » is a hard one :(
platzhirsch has quit [Client Quit]
<maloik> (you need to read it out loud)
platzhirsch1 has joined #ruby
<apeiros> nir0: hm, Net::HTTP::Patch exists
<nir0> apeiros: right, but it needs to be chained i think like .new.patch
<maloik> what's super weird is that I actually know how to pronounce them, despite not being a native speaker
<apeiros> nir0: so I guess it's the long winded way - create an Net::HTTP::Patch request instance and use that with Net::HTTP
lkba has quit [Ping timeout: 272 seconds]
<yorickpeterse> maloik: heh
tkuchiki_ has joined #ruby
<apeiros> nir0: no. let me find that example using a request object…
Siyfion has quit [Read error: Connection reset by peer]
<apeiros> nir0: http://ruby-doc.org/stdlib-2.2.2/libdoc/net/http/rdoc/Net/HTTP.html - go to "How to use Net::HTTP"
<apeiros> there's an example code using Net::HTTP.start
<apeiros> instead of `request = Net::HTTP::Get.new uri`, you'd probably just `request = Net::HTTP::Patch.new uri …`
* apeiros loves the simple and easy-to-guess and -understand API of net/http</sarcasm>
jenrzzz has joined #ruby
<Outlastsheep> HTTP's a pain to work with in my experience.
<Outlastsheep> Especially in one of the rare cases where a request only works with specific languages and their libraries for no explicit reason.
fabrice31_ has quit [Ping timeout: 256 seconds]
mikecmpb_ has joined #ruby
negev has quit [Quit: leaving]
arup_r has joined #ruby
<nir0> apeiros: so req = Net::HTTP::Patch.new(uri)?
alex88_ has joined #ruby
<apeiros> probably you want more arguments to it than just the URI
mikecmpbll has quit [Ping timeout: 256 seconds]
tkuchiki_ has quit [Ping timeout: 244 seconds]
fabrice31 has joined #ruby
<nir0> apeiros: sure, i'll try follow that
<apeiros> good luck
<apeiros> alternatively use another lib than net/http
axsuul has quit [Quit: Textual IRC Client: www.textualapp.com]
terlar has joined #ruby
<yorickpeterse> https://github.com/nahi/httpclient is a decent library
alex88_ has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
fabrice31 has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
arup_r has quit [Ping timeout: 244 seconds]
Siyfion has joined #ruby
<jhass> I like faraday, it's rack from the other side
<jhass> can just swap in whatever client lib works best
<yorickpeterse> We moved away from it due to a bunch of problems we had in the past
<yorickpeterse> lemme see what it actually was
BryanTM has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
fabrice31 has quit [Read error: No route to host]
fabrice31_ has joined #ruby
<yorickpeterse> now if I could only remember the repository where I comitted by rant about Faraday
<jhass> heh
<yorickpeterse> would be nice if I could search Git commits across repositories on Github :/
<jhass> rantdatabase.com ... could be a fun project
<yorickpeterse> it's called twitter.com/yorickpeterse
<jhass> as if 140 chars is anywhere near enough
atom_ has quit [Quit: Page closed]
stamina has joined #ruby
konieczkow has quit [Ping timeout: 252 seconds]
<jhass> also fun stats! average amount of swear words, amount of hours invested into a project deemed wasted etc etc
sevenseacat has quit [Quit: Me dun like you no more.]
yoongkang has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
yoongkang has joined #ruby
<shevy> hmm
<undeadaedra> I also rant on twitter time to time. If I need more than 140 characters, I do multiple tweets.
<shevy> who is the major potty mouth on #ruby
<yorickpeterse> oh shoot, we actually still use Faraday in some places
<yorickpeterse> shevy: I had stats for this, don't think I ported them to my new website
<shevy> haha
<yorickpeterse> nop :<
<shevy> undeadaedra do you at least rant in french?
<yorickpeterse> they were generated using pistg
AlphaAtom has joined #ruby
<yorickpeterse> * pisg
<undeadaedra> merde, shevy
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
<shevy> :D
fujimura has joined #ruby
tekacs has quit [Quit: Disappearing... *poof*]
<undeadaedra> to respond correctly, my twitter is in French, so I rant in French.
<undeadaedra> But now, I have a blog to rant in English and with as many characters as I want! \o/
<shevy> \o/
yaw has joined #ruby
<shevy> omg is this a psychedeliv kermit frog shaking it up
<shevy> *psychedelic
<apeiros> hypnotoad!
fabrice31_ has quit [Remote host closed the connection]
<apeiros> "Dates on this page are in the format %Y-%m-%d, I'll have none of your retarded US formats." <3
fabrice31 has joined #ruby
<shevy> #7 apeiros "most core bang"
<shevy> oh wait
<shevy> that is from #ruby-lang ?
<jhass> apeiros's faithful follower, apeiros_, kicked about 13 people.
<shevy> yeah, double team
<yorickpeterse> shevy: yeah
* apeiros ^5 apeiros_
senayar has joined #ruby
<shevy> lol
<shevy> "workmad3 brings happiness to the world. 30.6% lines contained smiling faces."
fantazo has joined #ruby
<shevy> and analysis of smileys
multi_io has quit [Ping timeout: 264 seconds]
<shevy> with a top ten of different smileys
<apeiros> "yorickpeterse is a very aggressive person. He/She attacked others 38 times" - unexpected :o)
<yorickpeterse> :P
<shevy> :) is by far the most popular smiley it seems
<yorickpeterse> that's /rslap for ya
<shevy> zenspider has a tendency to use ":/" smileys
<shevy> oh... apeiros uses the long smiley... ";-)"
multi_io has joined #ruby
<undeadaedra> we don't have stats in this channel?
<shevy> lol "apeiros is the channel sheriff with 58 deops."
<agent_white> smiley so just means to smiley is so big is goes off the page
<agent_white> ":/" *
<shevy> well, those stats were quite fun to read
znz_jp has quit [Quit: kill -QUIT $$]
* agent_white fixes irc autocomplete
<yorickpeterse> https://gist.github.com/YorickPeterse/9ddf195600090077bfa8 <- the impact of replacing active_model_serializers
<yorickpeterse> dem Gems
<apeiros> oh wow, apeiros+apeiros_ only make it to rank 4 anymore. success, I guess?
corehook has quit [Remote host closed the connection]
<apeiros> (I did want to cut back my irc time)
<yorickpeterse> no more activesupport \0/
<undeadaedra> congrats
tekacs has joined #ruby
konsolebox has quit [Ping timeout: 252 seconds]
dhruvsrivastava has quit [Quit: Page closed]
<agent_white> Any fancy tui libraries to checkout? I used ncursesw last but wondering what's out there.
znz_jp has joined #ruby
<shevy> tui? terminal user interface?
<agent_white> Yessir!
<shevy> not sure... you know of highline already and io-console?
fabrice31 has quit [Ping timeout: 265 seconds]
<shevy> I guess ncurses is as fancy as you can be hmm might be more projects based on it
zotherstupidguy has joined #ruby
fabrice31 has joined #ruby
<agent_white> shevy: Yup I've checked out both! But yeah seems like the wrappers seem to be best.
<ljarvis> lol at those irc stats
<flughafen> i had problems getting ncurses to work well. i wanted an ncurses window for my cuucumber tests
terlar has quit [Read error: No route to host]
<shevy> I hate the API
<shevy> it often is so that the API in ruby projects, based on C, is just a 1:1 direct mapper
neanderslob has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
rubie has joined #ruby
<agent_white> shevy: Me too :( And that's why I wondered why there wasn't.
<agent_white> At least fix the coords to be cartesian!
fabrice31 has quit [Read error: Connection reset by peer]
fabrice31_ has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
Rollabunna has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
<shevy> it's the same with ruby-gnome
<shevy> you can almost literally use the official C API docu as example
<shevy> feels like coding in C with a handicap :)
krisquigley has joined #ruby
<agent_white> Yeah exactly! :P
ndrei has joined #ruby
lkba has joined #ruby
skade has joined #ruby
fabrice31_ has quit [Read error: No route to host]
<agent_white> I'd like to write a ncurses-like library for Ruby someday... even python has some terminal ui libraries out there!
fabrice31 has joined #ruby
arup_r has joined #ruby
lkba_ has quit [Ping timeout: 245 seconds]
Rollabunna has quit [Ping timeout: 244 seconds]
nir0 has left #ruby [#ruby]
<shevy> yeah
hackeron has quit [Ping timeout: 245 seconds]
krisquigley has quit [Ping timeout: 272 seconds]
hackeron has joined #ruby
Cust0sLim3n has quit [Ping timeout: 252 seconds]
mclee has quit [Ping timeout: 250 seconds]
yoongkang has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
c0m0 has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
Outlastsheep is now known as zz_Outlastsheep
<wasamasa> another one?
shock_one has quit [Remote host closed the connection]
fabrice31 has quit [Read error: Connection reset by peer]
<shevy> lots of crap in that list
<shevy> oh
<shevy> tic-tac-toe
sandstro_ has quit [Quit: My computer has gone to sleep.]
fabrice31 has joined #ruby
fujimura has quit [Remote host closed the connection]
chthon has joined #ruby
<undeadaedra> ....X....
ndrei has joined #ruby
<flughafen> i want a terminal version of crysis
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
s2013 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
<platzhirsch1> flughafen: what a name
<yorickpeterse> Try KDE
<yorickpeterse> :>
fujimura_ has joined #ruby
<flughafen> platzhirsch1: dir auch
oo_ has joined #ruby
arup_r has quit [Remote host closed the connection]
<platzhirsch1> the correct form is: du mich auch
<flughafen> tiling wm > kde > no x > gnome
<undeadaedra> stop mit Deutsch, danke
<flughafen> undeadaedra: i like it when you speak deutsch to me
terlar has joined #ruby
<undeadaedra> no, no you don't
<flughafen> hehe
* flughafen needs to walk his dog
intinig has joined #ruby
decoponio has joined #ruby
<bnagy> agent_white: https://github.com/jamescook/rb_termbox I use the Go version of this, it's good
<undeadaedra> Mein Deutsch ist so schelcht :(
dreinull75 has quit [Remote host closed the connection]
Cust0sLim3n has joined #ruby
<bnagy> much simpler than ncurses, but less frills ( no drop-down menus etc etc )
dreinull75 has joined #ruby
<bnagy> looks like there's also an ffi binding
fujimura_ has quit [Ping timeout: 255 seconds]
oo_ has quit [Ping timeout: 245 seconds]
shock_one has joined #ruby
<agent_white> bnagy: Ooo... I'll look into it! Thank you :D
failshell has joined #ruby
yoongkang has joined #ruby
alex88_ has joined #ruby
Akagi201 has quit [Remote host closed the connection]
PaulCapestany has quit [Read error: Connection reset by peer]
bigkevmcd has quit [Read error: Connection reset by peer]
jmferreira has joined #ruby
bigkevmcd has joined #ruby
RegulationD has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
Casty has joined #ruby
fabrice31 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
alex88_ has quit [Ping timeout: 244 seconds]
Zai00 has joined #ruby
aapole has quit [Ping timeout: 252 seconds]
Casty has quit [Client Quit]
serivich has quit [Ping timeout: 272 seconds]
Hounddog has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
<shevy> undeadaedra almost perfect... "schelcht" -> should be "schlecht"; in France, mal, right?
<shevy> malaise... malaire... malbaguette
<undeadaedra> typo
corehook has joined #ruby
<shevy> maltypo
_ixti_ has joined #ruby
<undeadaedra> in this context, « mauvais » will be better, but yes, in general case « mal » is right
mandarinkin has quit [Ping timeout: 272 seconds]
ixti has quit [Ping timeout: 245 seconds]
jds has joined #ruby
<shevy> \o/
<undeadaedra> Biggest problem I have with german now is trying not to mix with swedish
Rollabunna has joined #ruby
Palmer11 has joined #ruby
hakunin has quit [Remote host closed the connection]
j4cknewt has joined #ruby
ndrei has joined #ruby
mister_solo has joined #ruby
futilegames has joined #ruby
lkba_ has joined #ruby
futilegames has quit [Client Quit]
Zai00 has quit [Quit: Zai00]
j4cknewt has quit [Ping timeout: 265 seconds]
TvL2386 has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
ottlikg has joined #ruby
<TvL2386> hi guys, just reading about the SystemTimer gem (https://rubygems.org/gems/SystemTimer/versions/1.2.3).... It seems to be working with blocked system calls as well... It seems like a good way to create timeout facilities if it's not built-in the code you're calling... Anybody got experience on this?
marr has quit [Ping timeout: 264 seconds]
DoubleMalt has quit [Ping timeout: 264 seconds]
arup_r has joined #ruby
revath has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
_jesterfraud has joined #ruby
jesterfraud has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
sdothum has joined #ruby
auzty has quit [Quit: Leaving]
<zotherstupidguy> "Versions are to Software what Subversion is to Git." this is a qoute in almost-sinatra project, i dont understand it! what does it mean?
sandstrom has joined #ruby
rodfersou has joined #ruby
DoubleMalt has joined #ruby
<jhass> zotherstupidguy: you'll understand it soon enough, just keep it in mind
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
Cust0sLim3n has quit [Ping timeout: 245 seconds]
kalusn has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 246 seconds]
gluten_hell_ has joined #ruby
fgo has joined #ruby
<wasamasa> lol
<wasamasa> what do they suggest using instead, git revisions all the time?
<wasamasa> no git tags ever?
ndrei has joined #ruby
krowv has quit [Ping timeout: 250 seconds]
<zotherstupidguy> wasamasa you use git tags?
<wasamasa> zotherstupidguy: yup
<wasamasa> zotherstupidguy: and I tag them with the version left in the file header
_blizzy_ has quit [Ping timeout: 265 seconds]
qwertme has joined #ruby
<wasamasa> zotherstupidguy: it's for emacs packages as there's two package archives with versioning they wander to
msgodf has quit [Ping timeout: 250 seconds]
dzejrou has joined #ruby
<zotherstupidguy> wasamasa i can't follow such strict workflow, i will almost always forget to do all a long series of steps
mwlang has joined #ruby
<wasamasa> fix a bug, commit the change, change the last digit of the version, commit the version bump, tag, push code and tag
<mwlang> does Nokogiri turn "2015-06-03T16:47:14" into Time values?
<workmad3> wasamasa: there's rake tasks that can handle the entire bump/commit/tag/push process too :D
<wasamasa> workmad3: I don't use rake for non-ruby things
<wasamasa> zotherstupidguy: http://semver.org/
tedstriker has quit [Read error: Connection reset by peer]
<zotherstupidguy> yea i know semver
GitGud has joined #ruby
GitGud was kicked from #ruby by ChanServ [Banned: 3d good bye]
<workmad3> wasamasa: there's probably make tasks too :P
allomov has quit [Remote host closed the connection]
denver has joined #ruby
<zotherstupidguy> its kinda bad that there are no repository for common rake tasts :)
tedstriker has joined #ruby
<zotherstupidguy> sad*
platzhirsch1 has quit [Quit: Leaving.]
<workmad3> but yeah, it's not a complicated process in all honesty... I used to have to deal with something like a 25 step release process for a mobile app :(
tkuchiki_ has joined #ruby
<mwlang> nvm, I figured it out — it’s the “nori” gem converting strings to Time (it uses Nokogiri to parse the XML files)
<wasamasa> zotherstupidguy: http://zenhabits.net/doing/
<workmad3> which included getting a physical USB dongle plugged into the machine in order to activate the licence for a proprietary compiler
<wasamasa> oh dear
<wasamasa> that doesn't sound very zen-like :P
<workmad3> wasamasa: it really wasn't :P
Questions has joined #ruby
fujimura has joined #ruby
ahmetkapikiran has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> wasamasa: I managed to automate and script about half of it at one point... in perl :D
<Questions> hi. if its not too much trouble I have a really noob question to ask. i'm learning ruby and I just wanted to know in the >require field at the top of every ruby code i see. does the require thing have to be in teh same directory or does it have to be an installed gem ?
<wasamasa> the latter
<Questions> ok thank you so much
<workmad3> Questions: it needs to be visible in any of the directories you see if you print out $LOAD_PATH
<wasamasa> you usually go for require_relative inside gems
<workmad3> Questions: which doesn't include the current directory by default
<Questions> so to see that i go ruby $LOAD_Path
ndrei has joined #ruby
<Questions> on terminal ?
<workmad3> Questions: ruby -e "puts $LOAD_PATH" would show it to you
<workmad3> Questions: but it can be modified at run-time too
<Questions> ah i see. thank you
nikhgupta has joined #ruby
<Questions> workmad3:ah so you mean. before i run my program there could be a clause that changes it to the directory of the program right?
<jhass> Questions: workmad3 single quotes, no?
<workmad3> Questions: it's an array, so you could add to it... but it's generally not recommended to play with it much
<workmad3> jhass: yeah, I just realised that
<Questions> workmad3: ah i see
<Questions> thank you
<workmad3> jhass: otherwise bash decides that $LOAD_PATH is an env var :D
<jhass> ;)
<Questions> haha
tkuchiki_ has quit [Ping timeout: 276 seconds]
Cust0sLim3n has joined #ruby
<Questions> ok
<Questions> one day i will be able to participate in these conversation
<Questions> and make jokes
<workmad3> Questions: ruby -e 'puts $LOAD_PATH' <-- that's what jhass was meaning
<Questions> oh i know that
<Questions> :)
<agent_white> Like... what did the pirate say on his birthday?
<Questions> require gems ?
<Questions> idk
<agent_white> AYYYYYYEEEMAYEY!
<Questions> oh...
<Questions> i meant ruby jokes
fujimura has quit [Ping timeout: 265 seconds]
<Questions> i can make java jokes though!
<agent_white> He was a rubyist, too, of course!
<workmad3> agent_white: what do you call a pirate with 2 hands and 2 legs?
s2013 has joined #ruby
<agent_white> workmad3: I dunno what?!
tkuchiki has quit [Ping timeout: 256 seconds]
<workmad3> agent_white: n00b
<agent_white> workmad3: :(
<Questions> why can't java programmers get women?
<agent_white> workmad3: What did the baby computer call it's father?
<Questions> because they treat them like objects !
<agent_white> Questions: ohsnahp
<jhass> uhm
<workmad3> agent_white: go on
* jhass senses #ruby-offtopic territory
<agent_white> DADA!
allomov has joined #ruby
dEPy has joined #ruby
<Questions> looks like i'll fit in with the community
<agent_white> Or... DATA.
<Questions> :D
* agent_white shrugs
<workmad3> agent_white: maybe 0xDADA? :D
<agent_white> Questions: Keep the jokes coming. Then make a ruby bot to tell us jokes!
<agent_white> workmad3: YES!
<Questions> aw you guys
<Questions> such gems <3
jmhmccr has quit [Quit: Connection closed for inactivity]
<agent_white> I spose 0XDEADBEEF wouldn't come first :P
<Questions> did you see what i did there?
skade has joined #ruby
<Questions> funny right?
<Questions> :D
* workmad3 watches the channel tumbleweeds
<Questions> :(
<Questions> i thought it was funny
<workmad3> :P
<undeadaedra> 0xNOSORRY
<workmad3> undeadaedra: awesome... none of those are valid hex digits :D
<Questions> they all are tho
revath has quit [Ping timeout: 252 seconds]
<Questions> i thought hex was 0-9 A-F
<Questions> i forgot my digital systems i guess :P
<workmad3> Questions: correct... so NOSORRY doesn't fit hex :P
<Questions> oh nvm!
<Questions> i was looking at DEADBEEF
<Questions> heh
mwlang has quit [Quit: mwlang]
diegoviola has joined #ruby
<workmad3> Questions: heh :) DEADBEEF is a classic hex pattern ;)
platzhirsch has joined #ruby
<Questions> hm
<Questions> didnt know
<diegoviola> I want to parse strings in ruby, like if a string contains the word foo and bar I want to do something else, what method can I use for this?
<undeadaedra> let me find something
shock_one has quit [Remote host closed the connection]
<workmad3> Questions: https://en.wikipedia.org/wiki/Hexspeak has an entry on DEADBEEF
<jhass> diegoviola: that's a bit generic...
revath has joined #ruby
<undeadaedra> 0xcafebabe and 0xfeedface are magics used by OS X's binaries
simplyianm has joined #ruby
<diegoviola> jhass: how so?
<Questions> ok
<Questions> well nice meeting u guys
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<Questions> or girls
CloCkWeRX1 has quit [Ping timeout: 265 seconds]
<jhass> diegoviola: well, it's "I have a string and want to do something depending on some of its contents" in other words
Akagi201 has joined #ruby
<Questions> i'll see u later! :)
Questions has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<diegoviola> jhass: I want to check if a word exist in a string
<jhass> .include?
mikecmpb_ is now known as mikecmpbll
<workmad3> diegoviola: sounds like a job for... REGULAR EXPRESSIONS! https://xkcd.com/208/
revath1 has joined #ruby
CloCkWeRX has joined #ruby
withnale____ has joined #ruby
<jhass> meh -1
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has quit [Remote host closed the connection]
revath has quit [Read error: Connection reset by peer]
<jhass> so far nothing detailed that would require them
<jhass> though I do expect additional requirements to suddenly appear out of this
ndrei has quit [Ping timeout: 276 seconds]
ndrei has joined #ruby
simplyianm has quit [Ping timeout: 276 seconds]
allcentury has joined #ruby
yoongkang has joined #ruby
<workmad3> jhass: :)
senayar has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
yfeldblu_ has quit [Ping timeout: 265 seconds]
kalusn has joined #ruby
Question has joined #ruby
zotherstupidguy has quit [Ping timeout: 265 seconds]
<Question> hello there
<Question> i have a question
<Question> but it may not be related to ruby
<shevy> lol
<shevy> great nick
<Question> is there a way in windows to hide a window programmatically ?
<shevy> #windows
<Question> ah ok
<Question> ok lets say in ruby
<Question> i want to hide a window
<shevy> it's the windows API
<Question> what would i do ?
<shevy> that depends on what you use
<Question> theres such a thing ?
<Question> wow
<shevy> ruby-gnome you can use .show and .hide
stamina has quit [Ping timeout: 252 seconds]
<Question> so if i hide a window, will its icon be on the taskbar ?
<undeadaedra> Question: you mean any window open of another program?
<shevy> Question normally yes
<Question> yes
<Question> so like, lets say i have paint open while i run my ruby script
<shevy> in ruby-gnome this happens through Gtk::Statusbar -> http://ruby-gnome2.osdn.jp/it/hiki.cgi?Gtk%3A%3AStatusbar
<Question> i want to hide the paint window at one point
<undeadaedra> Yeah, you need to go through Win32 api calls
<Question> windows 32 ?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<shevy> you have to look up the API Question
<Question> can it be on windows 64?
<Question> :D
<Question> oh i will dw
<undeadaedra> shevy: ruby-gnome won't help for other programs though
<shevy> you must look at the windows API
<Question> just getting it clear on the scope of this
<undeadaedra> Question: Win32 is the generic name
<bnagy> it gets a lot harder with modern windows
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Question> so its a good investment or not
<bnagy> because of UAC :/
<Question> wat is uac
<shevy> good investment? to spend time with windows? come on Question :D
<Question> i mean like ok
<bnagy> Question: basically you're going to be looking mostly at C examples, unless imperator has something magic
<Question> i'm trying to set up a framework of something
<Question> that requires hiding of the windows
<Question> thats why i'm asking :P
zipace has quit [Quit: Leaving]
<bnagy> yeah but hiding windows belonging to other processes is considered dodgy now
<bnagy> so it requires more privileges etc
Iskarlar has joined #ruby
chinmay_dd has joined #ruby
<undeadaedra> I guess just reducing them should be ok
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> But heh, this is Windows API domain, not Ruby
<bnagy> Question: anyway, this is probably not going to be easy / quick
<shevy> go collect information into a local textfile Question
<shevy> one day you have all necessary info together
Luyt__ has quit [Ping timeout: 240 seconds]
<bnagy> Question: https://github.com/bnagy/ruby-kernel there's a few bits
<bnagy> but mainly just has examples of the kind of scaffolding you'll need, you're going to need to do slightly different stuff
<bnagy> but with that general approach and some C examples you should have a chance
<Question> ok
<Question> well its harder because i'm trying to implement all this in java
<Question> and dont ask
<Question> boss wants me to
shock_one has joined #ruby
<bnagy> ytf are you here then?
<Question> so its not my doing
<Question> jruby
mistym has quit [Remote host closed the connection]
<bnagy> nothing to do with it
<Question> why are you so angry
<Question> holy....
<Question> anyway
<bnagy> jruby uses FFI, so you can do it in jruby fine
<Question> thank you for your help people. didnt mean to anger anyone with jruby
<Question> or java
Question has left #ruby [#ruby]
<bnagy> doing it in java is a whole different kettle of fish
izzol has joined #ruby
<izzol> hello.
<bnagy> and has nothing at all to do with ruby :)
<jhass> bnagy: they left ;)
<izzol> Is it possible to split the long commands which I have on the Open3.popen3() ?
<diegoviola> I want to create a bot, do I have to parse the input to give responses or what?
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<jhass> izzol: yes, press enter
quimrstorres has quit [Remote host closed the connection]
<jhass> diegoviola: usually
<shevy> diegoviola obviously you have to let the bot respond to commands made in a channel
<izzol> jhass: oh, I didn't even thing this is possible. Thanks :_)
<shevy> >> puts 'hey diegoviola I respond to leading >> '
<ruboto> shevy # => hey diegoviola I respond to leading >> ...check link for more (https://eval.in/383158)
krisquigley has joined #ruby
sdothum has joined #ruby
quimrstorres has joined #ruby
ldnunes has joined #ruby
<jhass> diegoviola: IRC bot? take a look at cinch and its examples
fabrice31 has joined #ruby
<diegoviola> jhass: not an irc bot
<diegoviola> just some program on my computer that responds back to commands, so just a regular program
<jhass> alright then I'll stay as vague as you do
<diegoviola> sorry for being vague
Siyfion has quit [Read error: Connection reset by peer]
<apeiros> diegoviola: unless you want it to respond randomly, then yes, obviously you'll have to parse the input
<diegoviola> right
bluish has quit [Quit: bluish]
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> well, I guess some alternatives would not qualify as parsing. e.g. use a hash to look up the response directly from the input.
<bnagy> pretty sure Eliza didn't count as parsing
<jhass> didn't it extract keywords?
<wasamasa> it does
krisquigley has quit [Ping timeout: 264 seconds]
<diegoviola> String#include? parses only for exact words, how do I parse for words regardless if the word is being downcased or not?
<diegoviola> s/words/strings/
maxshelley has joined #ruby
<diegoviola> or is that Array#include? I'm confused
<jhass> you could do .downcase.include? for example
<diegoviola> hrm
al2o3-cr has quit [Ping timeout: 250 seconds]
zotherstupidguy has joined #ruby
al2o3-cr has joined #ruby
ahmetkapikiran has joined #ruby
startupality has joined #ruby
dgutierrez1287 has joined #ruby
<apeiros> String#include? doesn't parse at all
<apeiros> (neither does Array#include?)
strixd has quit [Quit: 500]
iamninja has joined #ruby
droidburgundy has joined #ruby
Soda has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
<undeadaedra> You need a parser to parse.
<diegoviola> String#include? returns true or false if the string contains a given character, isn't that parsing?
s2013 has joined #ruby
corehook has quit [Remote host closed the connection]
nikhgupt has joined #ruby
<diegoviola> so what is it doing to determine if the string contains a character? is it not parsing?
<diegoviola> undeadaedra: I know
* jhass fetches popcorn
<diegoviola> so #gsub
<ljarvis> diegoviola: what are you trying to do?
TheHodge has quit [Quit: Connection closed for inactivity]
<apeiros> no. string comparison is not parsing.
* undeadaedra steals some of jhass's popcorn
* apeiros snatches the rest of jhass' popcorn
<jhass> :(
revath1 has left #ruby [#ruby]
<jhass> I need that for all the definitions of parsing to come!
mclee has joined #ruby
* undeadaedra gets an ULTRA-JUMBO box of popcorn for #ruby
nikhgupta has quit [Ping timeout: 276 seconds]
<bnagy> it's always popcorn tiem here :/
<bnagy> which idiot merged the other channel?
* apeiros points at jhass
<apeiros> 0:-)
* ljarvis points at jh
<ljarvis> :|
<diegoviola> #ruby-lang requires invite? wat/
<diegoviola> ?
* undeadaedra points at popcorn
<ljarvis> such lag
droidburgundy has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> diegoviola: there is no ruby-lang
tkuchiki has joined #ruby
Cust0sLim3n has quit [Ping timeout: 264 seconds]
Soda has joined #ruby
<bnagy> :D
<jhass> we actually just renamed it to #ruby-offtopic
<diegoviola> ljarvis: my employer wants me to write a program that parses user input and give responses based on that input, but they're being vague at best, they mention they need a bot for their clients and they say words like NLP, machine learning and so on
tkuchiki has quit [Remote host closed the connection]
<diegoviola> ljarvis: and I don't think that means anything
<bnagy> NLP and ML definitely mean things
<ljarvis> diegoviola: where will this be used?
<ljarvis> i.e what kind of bot? irc?
<diegoviola> ljarvis: no IRC at all
<wasamasa> diegoviola: have they ever played with chatterbots?
<diegoviola> ljarvis: they want it for their web site, I have to write the HTML / CSS for that
skade has joined #ruby
<diegoviola> wasamasa: not sure, I don't think so
Iskarlar has joined #ruby
<wasamasa> diegoviola: this is the best you'll get: http://www.cleverbot.com/
Abhijit has joined #ruby
<diegoviola> wasamasa: they want something like that
Abhijit has left #ruby [#ruby]
<wasamasa> diegoviola: it doesn't even know about something like established context
<wasamasa> diegoviola: so, you can respond with something more or less fitting, but that's it
j4cknewt has joined #ruby
strixd has joined #ruby
<wasamasa> diegoviola: fooling someone with randomly bad responses into believing it's a human is hard
<diegoviola> wasamasa: right
strixd has quit [Excess Flood]
<apeiros> my cleverbot instance graduated from the academy of gallifrey
<diegoviola> I asked a person here yesterday why they're doing this at all, wouldn't it be easier if they just have some tracking code that they can look for information based on the tracking code?
<ljarvis> diegoviola: isn't it your place to suggest that?
strixd has joined #ruby
aapole has joined #ruby
<workmad3> wasamasa: cutting edge in conversation bots is now able to convince people that it's a human with learning disabilities btw :D
<wasamasa> workmad3: yeah, I've seen the turing test news
msgodf has joined #ruby
<wasamasa> workmad3: it's disappointing that pretending to be a teenage boy is sufficient
nikhgupt has quit [Ping timeout: 245 seconds]
<diegoviola> ljarvis: I don't understand your question?
<diegoviola> my place?
<ljarvis> you're wondering why your employer is doing it?
Ox0dea has joined #ruby
<diegoviola> ljarvis: yes, and I already asked them why, they didn't know how to respond
dg-ratiodata has joined #ruby
<workmad3> wasamasa: it's also a bit disappointing that it took about 60 years to get to that point
<wasamasa> un
<wasamasa> *run
<ljarvis> that's quite the bsiness
<bnagy> diegoviola: maybe they're a bot?
<diegoviola> ljarvis: they said something along the lines of "Uhm... well, this is what we want, and our customers also want it, so uhm... yes, we can't do full-text-search, we need something that appears as human but isn't"
Marsupermammal has joined #ruby
<workmad3> diegoviola: tell them that what they want isn't possible
x44x45x41x4E has quit [Ping timeout: 245 seconds]
<wasamasa> diegoviola: point them to eugene
<workmad3> diegoviola: because what they're asking for is currently beyond the cutting edge of AI research
<ljarvis> :|
shredding has quit [Ping timeout: 276 seconds]
<diegoviola> workmad3: I think they will eventually realize it's not possible
<wasamasa> workmad3: well, if it's on a very specific topic, it can work better
<jhass> tell them full text search is a lot easier
<ljarvis> it's your job to tell them
<ljarvis> don't wait
<workmad3> ^^
<wasamasa> workmad3: like the support agents on certain company websites
droidburgundy has joined #ruby
<workmad3> wasamasa: sure, the more restrictive the domain, the better these things get :)
<wasamasa> workmad3: which come with cute animations and redirect you to the respective support site, but eh, it's easier to make a better search function for your website
aapole has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
<workmad3> wasamasa: you can also get quite far if you're willing to create an RDF ontology and set up inference rules with it nowadays, so that there's more semantic relevance between queries... but that's a fair bit of effort to go through too :D
<workmad3> *between queries and suggestions
<wasamasa> hmm
<workmad3> again, the more limited the domain, the better (and the easier to model your ontology)
HotCoder has joined #ruby
<workmad3> that's not exactly a conversation bot though :D
allcentury has quit [Ping timeout: 265 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 252 seconds]
shock_one has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
RegulationD has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Palmer11 has quit [Quit: Palmer11]
evanjs has joined #ruby
dopie has joined #ruby
ndrei has joined #ruby
Xeago has quit [Remote host closed the connection]
treehug88 has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
evanjs has quit [Remote host closed the connection]
shum has joined #ruby
revath has joined #ruby
Xeago has joined #ruby
<diegoviola> okay
<diegoviola> thanks guys
fgo has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
sdothum has quit [Ping timeout: 240 seconds]
corehook has joined #ruby
ta has quit [Read error: Connection reset by peer]
<Ox0dea> >> [1, 2i, 3.14].all?(Numeric)
<ruboto> Ox0dea # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/383186)
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> I fixed that. :)
skade has joined #ruby
ldnunes has quit [Ping timeout: 255 seconds]
<ljarvis> wat
<Ox0dea> You don't think it makes sense?
<apeiros> hm? you added a literal for imaginaries?
<ljarvis> :D
<Ox0dea> No, Ruby's had that for a while now.
<ljarvis> grep is fine with me
<Ox0dea> I added case equality to Enumerable#any?, #all?, #none?, and #one?.
<apeiros> ah
<Ox0dea> Right, it's the predicate form of #grep.
<apeiros> like grep
<apeiros> I see
<Ox0dea> I was surprised it hadn't been implemented yet.
<apeiros> hm, yeah, why not?
fgo_ has joined #ruby
<ljarvis> but yeah looks good
pepperbreath has joined #ruby
Cust0sLim3n has joined #ruby
hoov has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
but3k4 has joined #ruby
<Ox0dea> That was some pretty scary C.
<Ox0dea> I don't think I got it quite right.
<heftig> >> wat = Object.new; Array.send(:define_method, "all?") { |x=wat,&blk| if wat.equal? x; super(&blk); else; super() { |i| x === i }; end }; [1, 2i, 3.14].all?(Numeric)
<ruboto> heftig # => true (https://eval.in/383188)
<yorickpeterse> "The most active countries in Europe are Germany, the United Kingdom, and France, but if we look at users per capita we see a different story -- Sweden, Finland, and the Netherlands lead the way. London, Paris and Stockholm top the list of European cities most active on GitHub."
<yorickpeterse> hup holland hup
<yorickpeterse> also the UK is a country now?
allomov has quit [Remote host closed the connection]
Rollabunna has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
bmn has quit [Quit: obai]
ta has joined #ruby
dorei has joined #ruby
allomov has joined #ruby
centrx has joined #ruby
dopieee has joined #ruby
<shevy> yes!
<shevy> ruled by a benevolent dictator
dopie has quit [Ping timeout: 245 seconds]
<shevy> this here is even cooler:
<shevy> "Around 32 million people visit GitHub each month, and most of this traffic comes from outside of the United States (74% in fact)."
krz has quit [Quit: WeeChat 1.0.1]
<Ox0dea> heftig: Your approach doesn't work for Enumerable.
mister_solo has quit [Ping timeout: 265 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<heftig> Ox0dea: it was just enough to pass your testcase
<shevy> heheeh
Ropeney has joined #ruby
<shevy> heftig : Ox0dea: 1 : 0
lptm has quit [Ping timeout: 264 seconds]
<shevy> nice colours
<Ox0dea> Anybody familiar enough with MRI to tell me how I've gone about this all wrong?
rubie has joined #ruby
master44 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
sarkyniin has joined #ruby
Hounddog has joined #ruby
imanzarrabian has joined #ruby
AlphaAtom has joined #ruby
St1gma has joined #ruby
Marsupermammal has joined #ruby
master44 has quit [Client Quit]
AlphaAtom has quit [Max SendQ exceeded]
bmn has joined #ruby
<Ox0dea> That shit is just plain scary, but I think I more or less figured it out.
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
ldnunes has joined #ruby
Xeago has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
imanzarrabian has quit [Client Quit]
rubie has quit [Ping timeout: 265 seconds]
ottlikg has quit [Ping timeout: 265 seconds]
davedev24_ has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
revath has quit [Quit: Leaving.]
fabrice31_ has joined #ruby
ringarin has joined #ruby
revath has joined #ruby
Rapier- has joined #ruby
jxpx777 has joined #ruby
tkuchiki has joined #ruby
fabrice31 has quit [Ping timeout: 276 seconds]
michael_mbp has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
Guest19245 has quit [Changing host]
Guest19245 has joined #ruby
ponga has joined #ruby
<ponga> hi
Guest19245 is now known as daynaskully
coderhs has joined #ruby
segfalt has quit [Quit: segfalt]
symm- has joined #ruby
qwertme has joined #ruby
ht__ has joined #ruby
Soda has quit [Remote host closed the connection]
Rollabunna has quit [Quit: Leaving...]
krisquigley has joined #ruby
iwishiwerearobot has joined #ruby
iainjames88 has joined #ruby
iainjames88 has left #ruby [#ruby]
jwaldrip has joined #ruby
penzurx has joined #ruby
penzurx is now known as penzur
fujimura has joined #ruby
veinofstars has joined #ruby
<yorickpeterse> JSON API, HAL and Siren: the SOAP of JSON
<centrx> That title is webscale
<yorickpeterse> and none of them work if you don't have a concept of a resource (e.g. aggregated data that consists out of multiple tables/resources/etc)
<yorickpeterse> BUT OMG HYPERLINKS IN JSON
failshell has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
iwishiwerearobot has quit [Quit: >:(]
aryaching has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
<apeiros> yorickpeterse: can't you consider the aggregate to be a resource itself?
jwaldrip has quit [Ping timeout: 265 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
iwishiwerearobot has joined #ruby
lfox has joined #ruby
<yorickpeterse> Adding IDs/links to that is a bit pointless since you can't view it on its own
fujimura has quit [Ping timeout: 240 seconds]
<yorickpeterse> it's aggregated as in "average rating of X over the past 12 months"
<yorickpeterse> that's not really a resource, at least not in the REST sense
<apeiros> I guess it'd be parametrized, so the params would serve as ID, no?
corehook has quit [Remote host closed the connection]
<apeiros> and afaik REST has a concept of generated resources too, like searches (I'm not to deep in there, so not sure)
skade has joined #ruby
krz has joined #ruby
Papierkorb has joined #ruby
arup_r has quit [Remote host closed the connection]
CloCkWeRX has quit [Remote host closed the connection]
<heftig> Ox0dea: that would behave differently from the C version in case of all?(nil) or all?(false)
<yorickpeterse> apeiros: this is an API that just spits out statistics, not sure how IDs/links/etc would even be useful there
jds has quit [Quit: Connection closed for inactivity]
dgutierrez1287 has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 240 seconds]
hanmac1 has joined #ruby
<hanmac1> >> Gem::Specification.select {|s| s.dependent_gems.empty? && !s.default_gem? && s.homepage !~ /rvm/ }.map(&:name)
revath has quit [Quit: Leaving.]
<ruboto> hanmac1 # => ["minitest"] (https://eval.in/383225)
sandstrom has joined #ruby
thelastinuit has joined #ruby
cajone has joined #ruby
revath has joined #ruby
spyderman4g63 has joined #ruby
cajone has left #ruby [#ruby]
<abyss> I have file: http://pastebin.com/whhQ2U04 and second file id_to_change_uniq is the list of numbers to change. I write small script in ruby and I'd like to for each line which contains one of the number from id_to_change_uniq to increase about 1000. But my script doesn't work. Why?;)
<ruboto> abyss, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/cfa6b29b3d41a3ec20b7
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
shock_one has joined #ruby
aapole has joined #ruby
mikecmpb_ has joined #ruby
oo_ has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
wildroman2 has joined #ruby
failshell has joined #ruby
chthon has quit [Quit: Ex-Chat]
mikecmp__ has joined #ruby
Tolnaiz has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has quit [Ping timeout: 276 seconds]
fabrice31 has joined #ruby
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<apeiros> abyss: readability tip - you can shorten this: (line =~ /INSERT INTO/) || (line =~ /DELETE/) || (line =~ /UPDATE/) || (line =~ /INSERT_ID/)
<apeiros> to this: line =~ /INSERT INTO|DELETE|UPDATE|INSERT_ID/
zenguy_pc has quit [Read error: Connection reset by peer]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexherbo2 has joined #ruby
<abyss> apeiros: ok, thank you. But something doesn't work even there;)
oo_ has quit [Ping timeout: 256 seconds]
zenguy_pc has joined #ruby
InternetFriend has joined #ruby
mdz_ has joined #ruby
nikhgupta has joined #ruby
mikecmpb_ has quit [Ping timeout: 246 seconds]
<shevy> is there a simple (does not have to be 100% fool-proof) way in ruby to determine whether something is a binary file, like a .mp3 file, or a text file, like plain code in a .rb file?
fabrice31_ has quit [Ping timeout: 276 seconds]
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
veinofstars has quit [Quit: veinofstars]
revath has quit [Read error: Connection reset by peer]
revath has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tkuchiki has quit [Remote host closed the connection]
lfox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St1gma has quit [Remote host closed the connection]
<yorickpeterse> shevy: don't think so, you'd need proper MIME type detection
penzur has quit [Ping timeout: 265 seconds]
<yorickpeterse> because technically everything is binary
rindolf has joined #ruby
<rindolf> Hi all.
qwertme has joined #ruby
mujou has joined #ruby
arup_r has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
<shevy> hmm
zenguy_pc has joined #ruby
griffindy has joined #ruby
<abyss> ok I suppose I didn't chomp the \n from lines in array
<apeiros> abyss: sorry. RL disrupted
<apeiros> abyss: define "doesn't work"
<abyss> apeiros: yeah, my english isn't good :(
penzur has joined #ruby
failshell has quit []
<apeiros> I'm sure even with bad english you can do better than "doesn't work". but it seems you found your problem.
<al2o3-cr> shevy: the gem filemagic does it
zenguy_pc has quit [Max SendQ exceeded]
<jmferreira> shevy: i guess you could look for some control characters that exist on most binary files but are rare or non-existent on text files. 0x00 comes to mind.
<abyss> apeiros: sorry. I described what script should to do. And script just freeze I suppose because it doesn't nothing because I didn't chomp lines so even the first if didn't work
enebo has joined #ruby
aapole has quit [Ping timeout: 276 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
Xeago has joined #ruby
<abyss> apeiros: File.readlines("id_to_change_uniq").chomp doesn't work, should I do file.each and then chomp?
<al2o3-cr> abyss: you can't chomp on an array
whippythellama has joined #ruby
casadei has joined #ruby
allcentury has joined #ruby
<djellemah> shevy: http://www.darwinsys.com/file might help. You'd have to shell out to it though.
<shevy> al2o3-cr I can not find such a gem
AlphaAtom has joined #ruby
<shevy> jmferreira I could binread on it and scan for that "0x00"? that would it be?
<al2o3-cr> shevy: gem i ruby-filemagic
<Ox0dea> shevy: Why not just calculate the percentage of characters that are English vowels?
<shevy> al2o3-cr aha
<shevy> Ox0dea no
<Ox0dea> Non-English text?
sgambino has joined #ruby
codecop_ has quit [Remote host closed the connection]
<shevy> hmm filemagic looks bigger than what I require
<al2o3-cr> shevy: Then: require 'filemagic'; FileMagic.new.file(file) # returns simlilar output as file
michaeldeol has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
dblessing has joined #ruby
<abyss> al2o3-cr: can't: private method `chomp' called for #<Array:0x7f8924a30110>
<Ox0dea> shevy: Do you just not realize that my suggestion would actually work?
<shevy> aha
livathinos has quit [Read error: Connection reset by peer]
<shevy> "Audio file with ID3 version 2.4.0, unsynchronized frames, contains: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, Stereo"
revath has quit [Read error: Connection reset by peer]
<shevy> Ox0dea please man
Hounddog has quit [Remote host closed the connection]
nikhgupta has quit [Remote host closed the connection]
darkf_ has joined #ruby
livathinos has joined #ruby
revath has joined #ruby
<shevy> do they classify files somehow?
nikhgupta has joined #ruby
<shevy> like I mean, this is an "audio file" I suppose
<shevy> but what makes a file an audio file exactly, is that specified anywhere?
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
<al2o3-cr> abyss: something like your_arr.map(&:chomp)
phutchins has joined #ruby
<shevy> NoMethodError: undefined method `binary?' for File:Class
<shevy> :(
axl_ has joined #ruby
<abyss> al2o3-cr: oh, I get it
nikhgupta has quit [Remote host closed the connection]
nikhgupta has joined #ruby
<al2o3-cr> shevy: ptool as binary?
pikos has joined #ruby
erts has joined #ruby
mister_solo has joined #ruby
JakFrist has joined #ruby
senayar has quit [Remote host closed the connection]
nikhgupta has quit [Remote host closed the connection]
Abhijit has joined #ruby
nikhgupta has joined #ruby
fgo_ has quit [Ping timeout: 265 seconds]
zz_Outlastsheep is now known as Outlastsheep
ta__ has joined #ruby
yoongkang has quit [Remote host closed the connection]
mister_s_ has joined #ruby
denver has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 276 seconds]
phutchins has quit [Ping timeout: 256 seconds]
ta has quit [Read error: Connection reset by peer]
Forgetful_Lion has quit [Remote host closed the connection]
ta__ has quit [Remote host closed the connection]
mister_solo has quit [Ping timeout: 244 seconds]
jlast has joined #ruby
zotherstupidguy has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality_ has joined #ruby
Janusz1 has joined #ruby
mikecmp__ is now known as mikecmpbll
<apeiros> abyss: "doesn't work" again. drop that. it's useless.
<abyss> ok, I revised script and now it looks like this: https://gist.github.com/anonymous/918cd60ee21471bd8477 Now lines are matched but in lines 14 and 15 I increase id about 1000 and I change this line and I set puts line in 12 line to compare, but the line remains the same... So gsub doesn't change anything
<abyss> apeiros: I threw it out:)
startupality has quit [Ping timeout: 246 seconds]
startupality_ is now known as startupality
Guest11186 has joined #ruby
platzhirsch has left #ruby [#ruby]
senayar has joined #ruby
<apeiros> ,'#{newID}'
vdamewood has joined #ruby
<apeiros> single quotes don't interpolate. you must use double quotes
<apeiros> but "#{expr}" is an (IMO) bad way to write expr.to_s
<yorickpeterse> Yeah, use %Q{expr}
mrmargolis has joined #ruby
<yorickpeterse> errr
<yorickpeterse> derp
<yorickpeterse> %Q{#{expr}} :3
<apeiros> %Q{#{%{#{"#{expr}}}}}
<apeiros> oh, missing "
mwlang has joined #ruby
<Janusz1> Hi. I have problem with encoding, I am using Base64.decode64 in my puppet, and then I am getting variable with encoding ASCII-8BIT, but I need it in utf, so I do .encode("UTF-8") and getting error: Detail: "\xC3" from ASCII-8BIT to UTF-8, could someone help me with it?
<apeiros> %Q{#{%{#{"#{expr}"}}}}
<abyss> and why this isn't increase that id about 1000?;)
musgravejw has joined #ruby
JoshL has joined #ruby
Guest11186 is now known as marr
<apeiros> Janusz1: so you have binary data in your base64 encoded blob
<apeiros> Janusz1: and utf-8 is not suitable for binary data
<apeiros> oh, wait…
<Janusz1> apeiros: I have string in germany language
tkuchiki has joined #ruby
<apeiros> you use encode? wrong tool. force_encoding.
<apeiros> encode will *translate*
<mwlang> So I have a gem that’s converting time strings into DateTime, but unfortunately it’s doing so as a UTC time: #<DateTime: 2015-06-03T16:47:14+00:00 ((2457177j,60434s,0n),+0s,2299161j)> How do I easily shove that DateTime instance to the correct timezone?
<apeiros> you can't translate binary to utf-8.
<undeadaedra> "in germany language"
nonparfumee has joined #ruby
InternetFriend has joined #ruby
<mwlang> (for example, I want to place it in the +05:00 timezone.
<apeiros> undeadaedra: pssht, you francian
nikhgupt has joined #ruby
devdazed has joined #ruby
davedev24_ has joined #ruby
<yorickpeterse> mwlang: DateTime#new_offset can be used to set the time offset
<mwlang> I know I could just re-instantiate with the values of the current DateTime instance, but I was hoping to just say zone = “EST” or something similar.
<yorickpeterse> time offset != timezone
<undeadaedra> apeiros: ssh, you'll wake my head-cutting urges.
gambl0re has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
<mwlang> yorickpeterse: hmmm….just setting the offset should be good enough
revath has quit [Read error: Connection reset by peer]
<yorickpeterse> mwlang: though DateTime#new_offset works with zone names
<yorickpeterse> * also works
nikhgupt has quit [Remote host closed the connection]
<yorickpeterse> e.g.
dionysus69 has joined #ruby
<abyss> ok. Because here I get nil: ID = line.split(' ').find {|item| IDS.include? item }
<yorickpeterse> >> require 'date'; DateTime.now
nikhgupta has quit [Ping timeout: 264 seconds]
<ruboto> yorickpeterse # => #<DateTime: 2015-06-17T13:37:37+00:00 ((2457191j,49057s,326756519n),+0s,2299161j)> (https://eval.in/383282)
bruno- has quit [Quit: Lost terminal]
<yorickpeterse> >> require 'date'; DateTime.now.new_offset('EST')
<ruboto> yorickpeterse # => #<DateTime: 2015-06-17T08:37:43-05:00 ((2457191j,49063s,914759691n),-18000s,2299161j)> (https://eval.in/383283)
revath has joined #ruby
nikhgupta has joined #ruby
maxshelley has quit [Quit: Textual IRC Client: www.textualapp.com]
ndrei has joined #ruby
<mwlang> That’s actually changing the time. I need it to stay 16:47, but with new offset.
Siyfion has joined #ruby
<undeadaedra> Time is changing all the time :o
jmferreira has quit [Ping timeout: 276 seconds]
<Janusz1> apeiros: thank you
<maloik> mwlang: then the gem parsing the strings is probably doing it wrong?
<maloik> which gem are you using?
<mwlang> maloik: nori
dopieee has quit [Ping timeout: 250 seconds]
<maloik> and what does the string look like?
jwaldrip has joined #ruby
<yorickpeterse> mwlang: then you'll need to append it to the input before parsing
hinbody has joined #ruby
mrgrieves has joined #ruby
<yorickpeterse> because it's impossible to find out what the zone is for "2015-06-01 14:51:38"
<yorickpeterse> unless somewhere it's stated that everything is always in zone X
intinig has quit []
<yorickpeterse> (something something always just include the zone/offset in the output)
arup_r has quit []
Zackio has quit [Read error: Connection reset by peer]
<mwlang> yorickpeterse: looking at the source, they’re calling DateTime.parse(x) where x, in my case was "2015-06-03T16:47:14"
nikhgupt has joined #ruby
<mwlang> I guess I’ll just re-instantiate it from the values.
Outlastsheep is now known as zz_Outlastsheep
<abyss> apeiros: I found a mistake in my script the line I trying to change looks like: SET INSERT_ID=2151098/*!*/; I wanted to increase that number about 1000. But ofcourse when I do split(' ') I divide it by space so it mistakes because I'm looking for the figures... Do you have any idea how to achieve that? Catch that number and change it? In id_to_change_uniq I have numbers that I wanted to increase.
<abyss> So the task should be easy, find each line in ID array increase about 1000
kriskropd has quit [Remote host closed the connection]
<abyss> and change in each line
rubie has joined #ruby
<apeiros> abyss: so you want "SET INSERT_ID=2151098/*!*/;" to change to "SET INSERT_ID=2161098/*!*/;" ?
RegulationD has joined #ruby
<mrgrieves> hi, in a string of a number of words what can I used to remove the left side of the string from a "key" word?
sdothum has joined #ruby
nikhgupta has quit [Ping timeout: 264 seconds]
<apeiros> abyss: I'd change the structure of your script. first check whether line =~ /INSERT INTO|DELETE|UPDATE|INSERT_ID/
<apeiros> abyss: then find the id in the string. and don't just test whether it is in there - get which id is in there too.
<mrgrieves> ie "Hello world, my name is daniel" what can I use to delete everything before name so I end up with "name is daniel"
<apeiros> abyss: and then you can directly gsub. no need to extract it
<abyss> apeiros: yes. Thank you for your understanding;) But somewhere in the file ther could be lines like: UPDATE assignmentuser SET state='YToxOntpOjIzNTM7Y' WHERE userid='2151098/' and I wanted to change this to userid='2161098' as well
<apeiros> mrgrieves: see String#[], String#sub and String#gsub
<apeiros> mrgrieves: whoops, String#[]=, not #[]
revath has quit [Read error: Connection reset by peer]
mclee has quit [Ping timeout: 256 seconds]
<apeiros> abyss: yes. that'd still work with the way I suggested.
revath has joined #ruby
<mrgrieves> apeiros: cheers
freerobby has joined #ruby
<abyss> apeiros: I will try;)
<abyss> thank you very much
<apeiros> if your list of id's is large, and your script is too slow - there's ways to go about it a bit differently to improve performance
<abyss> apeiros: to find the id I should use match, yes?
msnyon has joined #ruby
Zackio has joined #ruby
<apeiros> abyss: just use .find instead of .any?
<abyss> apeiros: yes, there's 30000 ids
<apeiros> it'll return which number was found, and not just whether a number was found
<apeiros> yeah, I'd expect your approach to be quite slow then
dionysus69 has quit [Ping timeout: 265 seconds]
Cust0sLim3n has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
kriskropd has joined #ruby
NeverDie has joined #ruby
endash has joined #ruby
Starface has joined #ruby
<Starface> wl Try you Luck Here http://tinyurl.com/p2vb8po
dfockler has joined #ruby
northfurr has joined #ruby
<havenwood> !kick Starface no spam
Starface was kicked from #ruby by ruboto [no spam]
<undeadaedra> He tried his luck
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
corehook has joined #ruby
<abyss> apeiros: 651 match 651727 as well :(
DashNine has joined #ruby
lordkryss has joined #ruby
<abyss> now I have something like this: https://gist.github.com/anonymous/05f67b7f40c695bd0d67
<apeiros> abyss: so you need to improve your regex
paulcsmith has joined #ruby
mikecmpb_ has joined #ruby
<apeiros> abyss: I'll be offline for ~30min, I'll help you a bit after that.
revath has quit [Quit: Leaving.]
evanjs has joined #ruby
<abyss> apeiros: OK. Thank you very much.
revath has joined #ruby
<hanmac1> what the heck is "Aeon ball" ?
dfockler has quit [Ping timeout: 264 seconds]
<abyss> btw: wen I do: ID = IDS.find { |w| line =~ /^#{w}$/ } then nothing is matched;)
<mwlang> It ain’t pretty, but it works: https://gist.github.com/mwlang/f4b0bbcb48269da1b6f4
mikecmpbll has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
corehook has quit [Ping timeout: 248 seconds]
yardenbar has quit [Quit: Leaving]
nikhgupt has quit [Ping timeout: 250 seconds]
skade has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
freerobby has quit [Quit: Leaving.]
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
freerobby has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unshadow has quit [Ping timeout: 276 seconds]
olistik has joined #ruby
<abyss> apeiros: I did: ID = IDS.find { |w| line =~ /\b#{w}\b/ } and it looks like probably works ;) Do you think that script is ok?
symm- has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
<abyss> and how to write this changes in file, lol - please answer when you back
dhjondoh has quit [Quit: dhjondoh]
imperator has joined #ruby
Cust0sLim3n has joined #ruby
fabrice31_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
dhjondoh has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
<abyss> And I still can't increase about 1000 in whole text. The whole text is intact:/ (I compare first puts line with the last)
AlphaAtom has joined #ruby
shinnya has joined #ruby
revath has quit [Quit: Leaving.]
olistik has left #ruby [#ruby]
AlphaAtom has quit [Max SendQ exceeded]
viuo has joined #ruby
revath has joined #ruby
catphish has joined #ruby
AlphaAtom has joined #ruby
pontiki has joined #ruby
<pontiki> hello, all o/
<havenwood> \o
fabrice31 has quit [Ping timeout: 256 seconds]
__butch__ has joined #ruby
lfox has joined #ruby
LMity has joined #ruby
Scroff has joined #ruby
<imperator> "cast to pointer from integer of different size" - i guess NUM2OFFT was the wrong choice
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit [Remote host closed the connection]
<imperator> what's the proper NUM2xxx where the lhv is uintptr_t ?
hoov has quit [Read error: Connection reset by peer]
<pontiki> a general question: Kernel#Array() will usually do the job of turning something into an array. But when you give it a hash, it dutifully turns the hash into an array. But what if you just want to make a hash into an array with a single hash member?
ascarter has joined #ruby
<pontiki> but do so while not necessarily knowing you're getting a hash passed to you?
<pontiki> are back to having to do type checking on this?
[H]unt3r has joined #ruby
<imperator> h = {}; a = [h]?
aryaching_ has joined #ruby
sepp2k has joined #ruby
aryaching has quit [Ping timeout: 250 seconds]
<pontiki> imperator: more like: def xxx(z); Array(z).each {...}; end
<catphish> can anyone point me in the right direction of how I might use this ioctl in ruby? #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
olistik_ has joined #ruby
Scrofff has quit [Ping timeout: 246 seconds]
olistik_ has left #ruby [#ruby]
ht__ has quit [Quit: Konversation terminated!]
mikecmpb_ is now known as mikecmpbll
volty has joined #ruby
<pontiki> so i guess the answer is yes
<catphish> in C it's called as "ioctl(fd, DMX_SET_FILTER, filter)" - i have no problem with the the string param, but the integer part is kind confusing
InternetFriend has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<jhass> catphish: printf it and just copy it over :P
railsraider has joined #ruby
<catphish> jhass: actually yes :)
<catphish> printf("%x") for the win here i think
<jhass> yah
dopie has joined #ruby
<catphish> well it's 0x403c6f2b
Igorshp has joined #ruby
<catphish> i guess i could have calculated that with reference to _IOC but it's a rabbit hole
kfpratt has joined #ruby
dg-ratiodata has quit [Read error: Connection reset by peer]
<catphish> thanks!
<jhass> tbh I do it all the time
<jhass> just not worth the rabbit hole most of the time
fgo_ has joined #ruby
datanoise has joined #ruby
sepp2k has quit [Quit: Leaving.]
<catphish> well it didn't throw an EINVALID :)
sepp2k has joined #ruby
dopie has quit [Client Quit]
<shevy> the perl logo
<shevy> someone took LSD and other drugs
<catphish> haha
mrgrieves has quit [Quit: Lost terminal]
Iskarlar has quit [Read error: Connection reset by peer]
<abyss> apeiros: Ok. I had to add gsub! then I can see the changes;) This is ok? How I can now write this to file? How to expedite the whole script? Thank you.
startupality has quit [Quit: startupality]
momomomomo has joined #ruby
Iskarlar has joined #ruby
northfurr has quit [Quit: northfurr]
Iskarlar has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
dopie has joined #ruby
mary5030 has joined #ruby
kies has joined #ruby
bruno- has joined #ruby
yoongkang has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
Zai00 has joined #ruby
fgo_ has quit [Ping timeout: 276 seconds]
vdamewood has quit [Read error: Connection reset by peer]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
InternetFriend has joined #ruby
yaw has joined #ruby
yaw has quit [Client Quit]
viuo has quit [Quit: leaving]
tagrudev has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
Iskarlar_ has joined #ruby
zudochkin has joined #ruby
Iskarlar_ has quit [Client Quit]
ndrei has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 255 seconds]
quimrstorres has joined #ruby
j4cknewt has joined #ruby
<apeiros> abyss: File.write(path, content)
startupality has joined #ruby
simplyianm has joined #ruby
olistik has joined #ruby
sohrab has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
<apeiros> abyss: yes, ID = IDS.find { |w| line =~ /\b#{w}\b/ } is better. but you should not use constants (variables which start with an uppercase letter are constants).
segfalt has joined #ruby
gambl0re has joined #ruby
Iskarlar has joined #ruby
hinbody has quit [Ping timeout: 264 seconds]
<volty> perl 6 went functional (the examples, of shevy's link above)
quimrstorres has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
mujou has quit [Quit: Leaving...]
<yorickpeterse> Perl 6 is anything but a functional language
_blizzy_ has joined #ruby
<shevy> perl went crazy
sanguisdex has quit [Ping timeout: 276 seconds]
quimrstorres has joined #ruby
<volty> of, course, yorickpeterse, the mine was about those constructs
<ponga> { |w| line =~ /\b#{w}\b/ } looked like all gibberish for a second , it took me a moment to understand what it is ..
<yorickpeterse> constructs?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fujimura has joined #ruby
ottlikg has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> look at quicksort, it seems almost haskell :)
antgel has quit [Ping timeout: 252 seconds]
hinbody has joined #ruby
AlphaAtom has joined #ruby
<volty> construct -- (create by linking linguistic units; "construct a sentence"; "construct a paragraph")
jenrzzz has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
<yorickpeterse> I know what "construct" means...
<shevy> ponga well regexes are never really pretty
<apeiros> I find regexen very pretty :)
AlphaAtom has joined #ruby
<shevy> I try to avoid them when possible, if it is for simple things like "if string.include? substring" or string.start_with? or string.end_with?
sanguisdex has joined #ruby
<volty> nothing more elegant then regexens — and the elegance stays in their power & solution
<shevy> yeah
<shevy> I get horny when I see things like /([A-Za-z\d-]*_{0,1}[_a-z]*)[_-]{1,20}([A-Za-z_\d.]*[-a-z]*[\d]*)/
fujimura has quit [Ping timeout: 244 seconds]
corehook has joined #ruby
<apeiros> shevy scares me
sharpmachine has joined #ruby
oo_ has quit [Remote host closed the connection]
hanmac1 has quit [Quit: Leaving.]
* Aria eyebrows.
<yorickpeterse> http://emailregex.com/ yes, very elegant
<undeadaedra> õ_o
raellear has joined #ruby
<shevy> I scare myself when I notice a mirror!
raellear has left #ruby [#ruby]
<apeiros> yorickpeterse: curious to see a more elegant solution :)
<yorickpeterse> and of course there's this:
<volty> you could subst with descriptive variables, but I find it more useful just commenting below when you have difficulty to grasp it
<yorickpeterse> >> require 'uri'; URI.regexp
<ruboto> yorickpeterse # => / ...check link for more (https://eval.in/383312)
<canton7> that page looks suspect
tkuchiki has joined #ruby
claw has joined #ruby
<canton7> it's not explaining the limitations of the shorter regexes, for starters
mrmargolis has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
olistik has quit [Ping timeout: 246 seconds]
<shevy> the longer the prettier
rubie has joined #ruby
<wasamasa> hmm
<shevy> ponga look at what you have started man
St1gma has joined #ruby
ta has joined #ruby
<wasamasa> maybe I should simplify my mail regex
<yorickpeterse> I have the perfect Email regex
francoi__ has joined #ruby
<yorickpeterse> works 100%
<wasamasa> or maybe not as there's no stage with mail verification
<canton7> .+?
sinkensabe has quit [Remote host closed the connection]
<yorickpeterse> No
<ponga> damn shevy what have i done
<yorickpeterse> >> /\S+@\S+/
<ruboto> yorickpeterse # => /\S+@\S+/ (https://eval.in/383313)
nfk has joined #ruby
<yorickpeterse> >> 'foo@localhost'.match(/\S+@\S+/)
<ruboto> yorickpeterse # => #<MatchData "foo@localhost"> (https://eval.in/383314)
serivich has joined #ruby
<yorickpeterse> >> 'foo@localhost.butts'.match(/\S+@\S+/)
<ruboto> yorickpeterse # => #<MatchData "foo@localhost.butts"> (https://eval.in/383315)
<yorickpeterse> see
<yorickpeterse> perfect
GarethAdams has quit [Ping timeout: 276 seconds]
<yorickpeterse> >> 'foo12378213+wat@localhost.butts'.match(/\S+@\S+/)
<ruboto> yorickpeterse # => #<MatchData "foo12378213+wat@localhost.butts"> (https://eval.in/383316)
<shevy> what is it with your local butt
<volty> now I remember what I wanted to ask. Is it possible to define new character class using single letter (like '\d') ?
<pontiki> >> "Agent Orange <hello.ktty@gmail.com>".match(/\S+@\S+/)
<ruboto> pontiki # => #<MatchData "<hello.ktty@gmail.com>"> (https://eval.in/383318)
jenrzzz has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
<pontiki> that is beautiful
<canton7> >> '" "@example.com'.match(/\S+@\S+/)
<ruboto> canton7 # => #<MatchData "\"@example.com"> (https://eval.in/383319)
mrmargol_ has joined #ruby
<canton7> >> '"a b"@example.com'.match(/\S+@\S+/)
tkuchiki has quit [Ping timeout: 252 seconds]
<ruboto> canton7 # => #<MatchData "b\"@example.com"> (https://eval.in/383320)
<shevy> ponga look at them go man, they are testing ruboto's abilities to match via MatchData
<canton7> there we go ^
<canton7> spaces are valid :)
roolo has joined #ruby
Ropeney has joined #ruby
<catphish> jhass: that didn't work, the constant doesn't match up in strace, maybe i copied it wrong, or ruby is modifying it for some reason
olistik has joined #ruby
kahuna_ has quit [Disconnected by services]
agent_white has quit [Read error: Connection reset by peer]
<catphish> unfortunately, strace seems to resolve the constant to its name, so its hard to check how its wrong
ogpastaling has joined #ruby
<canton7> I think that's a lesson for everyone: don't try and validate email addresses yourself. you will fail :)
simplyianm has quit [Remote host closed the connection]
<apeiros> canton7: I still do :)
<catphish> there are as many email validation regexes as there are programs that process email addresses ;)
<jhass> catphish: mmh, shouldn't there some strace option so it doesn't?
happyface has joined #ruby
quimrstorres has joined #ruby
<sevenseacat> lol, regex for email.
quimrstorres has quit [Remote host closed the connection]
<bougyman> wait, you're in ruby.
<catphish> jhass: you'd think so, but i can't find it, only a guy asking for it on a mailing list :(
<apeiros> because if nobody does, nobody can rely on somebody else's work either
GarethAdams has joined #ruby
quimrstorres has joined #ruby
<ponga> shevy: let them have fun
<catphish> from my C program: ioctl(3, DMX_SET_FILTER, 0x7fff424e0d90) = 0
* ponga looks away
<catphish> from ruby: ioctl(7, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffda7ff8680) = -1 EINVAL (Invalid argument)
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<catphish> jhass: maybe i fat fingered it somehow, its not really clear how i could have messed that up
Zai00 has quit [Quit: Zai00]
kahuna_ has joined #ruby
Zai00 has joined #ruby
agent_white has joined #ruby
simplyianm has joined #ruby
axl_ has quit [Quit: axl_]
<bougyman> i generally use Mail::Address for email parsing.
axl_ has joined #ruby
<apeiros> I think I started out with that. but I really should writing down why I don't use stuff…
agent_white has quit [Read error: Connection reset by peer]
Guest54855 has joined #ruby
Guest54855 has left #ruby [#ruby]
fgo_ has joined #ruby
pyo_ has quit []
momomomomo has quit [Quit: momomomomo]
sharpmachine has quit [Read error: Connection reset by peer]
<catphish> it's working now, i was misreading the strace :)
sharpmachine has joined #ruby
The_Phoenix has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
Abhijit has quit [Quit: Bye.]
agent_white has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
droidburgundy has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
veinofstars has joined #ruby
rbennacer has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
ringarin has quit [Ping timeout: 245 seconds]
droidburgundy has joined #ruby
senayar has quit [Remote host closed the connection]
fantazo has quit [Ping timeout: 272 seconds]
fabrice31 has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
qwertme has joined #ruby
agent_white has joined #ruby
sanguisdex has quit [Ping timeout: 256 seconds]
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
antgel has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
qwertme has quit [Client Quit]
freerobby has joined #ruby
bruno- has joined #ruby
snockerton has joined #ruby
sharpmachine has quit [Remote host closed the connection]
flughafe1 has joined #ruby
pikos has quit [Quit: ...]
dgutierrez1287 has joined #ruby
senayar has joined #ruby
sanguisdex has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
msgodf has quit [Ping timeout: 255 seconds]
InternetFriend has joined #ruby
arup_r has quit [Client Quit]
arup_r has joined #ruby
LMity has quit [Ping timeout: 250 seconds]
revath has quit [Ping timeout: 250 seconds]
nonparfumee has quit [Quit: Textual IRC Client: www.textualapp.com]
codemonkey010101 has joined #ruby
<ericmeds> are there any gems to check what percentage of a codebase is documented
chouhoul_ has joined #ruby
<jhass> yard has that inbuilt
dgutierrez1287 has quit [Ping timeout: 256 seconds]
<apeiros> yupp, yard
<apeiros> maybe rdoc has something too by now
francoi__ has quit [Remote host closed the connection]
<yorickpeterse> YARD has done that for years
DaniG2k has joined #ruby
<ljarvis> eff yard
<Senjai> Morning ruby
<yorickpeterse> oh wait, read that as "maybe yard has something too by now"
<catphish> what's the best (fastest) way to compare a specific byte of a string with an Fixnum of its char value?
<apeiros> yorickpeterse: :-p
<yorickpeterse> ljarvis: YARD itself is fine, the HTML output is meh
<yorickpeterse> But so is rdoc output
<yorickpeterse> and tomdoc output
codemonkey010101 has quit [Client Quit]
mleung has joined #ruby
InternetFriend has quit [Client Quit]
<ljarvis> yorickpeterse: I don't like YARD or Rdoc for actually writing docs, though rdoc is significantly nicer imo
<ericmeds> What is Ruby best practices for in code documentation
<ljarvis> agreed the output is meh
<apeiros> catphish: probably .getbyte
Xeago has joined #ruby
<yorickpeterse> I kinda dislike both
<catphish> apeiros: if that method exists then it's exactly what i want :)
<apeiros> catphish: if you have to do it repeatedly, there might be other ways
<yorickpeterse> e.g. due to having to prefix every line with #
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
<ljarvis> heh
<ljarvis> there's always =begin
<ljarvis> :D
<ericmeds> should every method be documented in Ruby?
<yorickpeterse> https://github.com/YorickPeterse/aeon/blob/master/sketches/array.aeon#L2-L18 <- e.g. something like this (basically Python docblocks minus the """) would be much nicer
<undeadaedra> I like YARD
francois_ has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
<shevy> I like Baguette
<ljarvis> I hate docs inside method bodies
* ljarvis shakes fist at python
<yorickpeterse> ljarvis: there's actually a really good reason to do it this way
* undeadaedra slaps shevy
<ljarvis> sure I don't doubt that
<yorickpeterse> makes it easier to associate (technically) and it actually stays with the method
<ljarvis> the reason won't make me like it, that I know
<undeadaedra> You could also have XML documentation like Microsoft does :D
<yorickpeterse> at the cost of moving the method name further away from the body
<yorickpeterse> but you can always just fold the comments
francois_ has quit [Remote host closed the connection]
<ericmeds> so YARD can tell me what percentage of the code is documented?
<yorickpeterse> ericmeds: yes
<ericmeds> nice!
olistik has left #ruby [#ruby]
<ericmeds> yorickpeterse: and should we document every single function like you would in Python?
umgrosscol has joined #ruby
<ljarvis> why would it be different?
<yorickpeterse> ericmeds: no
<yorickpeterse> document where it makes sense
segfalt has quit [Ping timeout: 265 seconds]
sharpmachine has joined #ruby
<ljarvis> ^ for every language
veinofstars has quit [Quit: veinofstars]
cirn0 has joined #ruby
anisha has quit [Quit: Leaving]
<undeadaedra> ericmeds: it tells you stats when you compile doc, and you can ask it exactly what is left to document.
mister_s_ has quit [Ping timeout: 276 seconds]
kfpratt has quit [Remote host closed the connection]
chouhoulis has joined #ruby
mister_solo has joined #ruby
fgo has joined #ruby
tsvenson|afk has joined #ruby
freerobby has quit [Quit: Leaving.]
stan has quit [Ping timeout: 265 seconds]
tsvenson has quit [Ping timeout: 265 seconds]
fgo_ has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
chouhoul_ has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
segfalt has joined #ruby
diegoviola has quit [Ping timeout: 244 seconds]
apoplexy has joined #ruby
kfpratt has joined #ruby
Cache_Money has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hefest has quit [Quit: leaving]
momomomomo has joined #ruby
sharpmachine has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Remote host closed the connection]
Kricir has joined #ruby
sharpmachine has joined #ruby
<Senjai> ericmeds: If you're developing a library, every public method should be documented
<Senjai> On an internal project, there's usually some room for flexibility
<ericmeds> right - potentially the more complex methods should deserve proper comments/docs
<Senjai> ericmeds: Well, see, thats the thing
<ericmeds> but not sure where the line should be
solars has quit [Ping timeout: 245 seconds]
rcvalle has joined #ruby
<ericmeds> for an internal project
<Senjai> ericmeds: We document libraries because it has to be used by people that may be stupid, or cannot read source code. Or that the source code itself is unusually complex
<Senjai> ericmeds: In a perfect world, your code should be self documeting
<ericmeds> right - straight forward enough to be read and understood
<Senjai> And that you typically want people to use your library, so making it easier to do so is a form of promotion
<Senjai> Usually the documentation for most open source libraries are so terrible, I end up just keeping their source open in a tmux window
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> :D
<shevy> I focus on working examples first
<shevy> when examples work, it's 30% of the deal
<shevy> that's how I learned ruby-gnome
zotherstupidguy has joined #ruby
livathinos has quit [Ping timeout: 276 seconds]
<shevy> if I would have started from the wiki, I would have given up on it soon enough again
<Senjai> I disagree, there should have to be very few examples. You dont need to have examples for how to use every class, just a basic one of how the library functions in the readme, and the rest can be documented.
<Senjai> Thor is a great example of where documentation is really the only way you understand things, or reading the source
<Senjai> Arel is largely a unicorn, despite it being used everywhere
nikhgupta has joined #ruby
<ericmeds> Senjai: what are your recommendations for a super small development team with the potential to grow
francois_ has joined #ruby
<Senjai> Arel is extreeeeemmely useful for development. Yest 99% of active record users dont use it because its unclear how.
<ericmeds> id imagine doc’ing as much as possible but the problem is where is that line
<ericmeds> how do you even make the recommendation
sharpmachine has quit [Read error: Connection reset by peer]
<Senjai> ericmeds: lol, with the potential to grow?
<ericmeds> so it wouldnt be only a few guys for long for example
<Senjai> ericmeds: 100% spec coverage, self documenting code
<ericmeds> or gals
<ericmeds> yeah
<Senjai> ericmeds: Which is what we do
<Senjai> ericmeds: We dont document internal stuff
<Senjai> It's documented by specs and properly named and encapsulated objects
<phat4life> ericmeds: use rubocop, simple-cov
<Senjai> ^
<phat4life> metric_fu is helpful as well
<Senjai> SimpleCov is great, we dont use robocop though, specifically because we have a number of clients with code bases that began outside of our firm
<Senjai> With simplecov you can have a build fail if coverage is less than a certain %
<phat4life> Senjai: you can always configure rubocop to ignore certain directories
<Senjai> on jenkins at least
<Senjai> phat4life: Its totally not worth it :P
<Senjai> phat4life: We get a lot of rescue projects
<phat4life> with have rubcop running in a pre commit hook, but its really fucking annoying
<ericmeds> phat4life: thanks was looking into simplecov also for test coverage
<Senjai> phat4life: rm -rf .git/hooks
<Senjai> phat4life: ftw
<ericmeds> nice
hubcaps has quit [Ping timeout: 256 seconds]
<Senjai> ericmeds: Writing good tests is necessary for the team. Code thats hard to test is hard to use
<phat4life> ericmeds: are you using docker or vagrant
<Senjai> as a rule of thumb
oo_ has joined #ruby
<ericmeds> phat4life: vagrant for now
<phat4life> we use ansible to provision our vagrant dev envronment, which has redis, mysql, a few other things
<Senjai> phat4life: I only have a pre-commit hook for binding.pry's :P, and one for gerrit
<phat4life> ansible is god mode
mclee has joined #ruby
<Senjai> I heard good things about ansible, but I still prefer the vanilla setup
<Senjai> Ubuntu with things set up properly + git lcone
<ericmeds> yeah part of what ive done is implement a framework for integration testing etc and now im onto unit testing coverage
<Senjai> clone*
InternetFriend has joined #ruby
<phat4life> our rails app depneds on jenkins servers, redis, mysql, slanger, pusher, so it a complicated dev environment
keen__________ has quit [Read error: Connection timed out]
<phat4life> to its eaiser to have that running on vagrant
<phat4life> and ansible is the way to go
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
<phat4life> makes deployments easy as well
nikhgupta has quit [Remote host closed the connection]
<yorickpeterse> heh, ansible for deployments
nikhgupta has joined #ruby
<Senjai> phat4life: redis, mysql are apt-get installs, jenkins shouldn't be on every dev box, pusher is an ENV setting that can be used by sharing a development .env with DotEnv
* yorickpeterse shakes cane while mumbling "you kids never learn!"
ericwood has quit [Quit: Changing server]
<phat4life> Senjai: for us it makes sense
* yorickpeterse is actually working on a new deploy tool for $WORK
<phat4life> because the rails app creates, destroys jenkisn projects
<mikecmpbll> i've never used any provisioning tools yet. we hardly ever provision new servers or dev machines and it takes me about 15 mins to do it myself.
<Senjai> phat4life: LOL WHAT
<Senjai> phat4life: That's your problem.
edwinvdgraaf has quit [Ping timeout: 245 seconds]
<Senjai> phat4life: Why is rails coupled to jenkins?
<Senjai> Unless its job is to.. manage jenkins
francois_ has quit [Remote host closed the connection]
keen__________ has joined #ruby
veinofstars has joined #ruby
<phat4life> Senjai: its used to managed jenkins which is used for company wide projects
<Senjai> Ah
<Senjai> That's fair then.
<Senjai> I prefer.. scripts and things
<phat4life> we trigger jobs, manage them
<Senjai> phat4life: Why not just use jenkins to manage jenkins though
<Senjai> Application specific things can be done with cron, or queues
<phat4life> Senjai: the rails app is for internal non techical users
<phat4life> Senjai: most of the jenkins jobs just but static content in s3
<Senjai> So jenkins is like a task runner?
<dorei> isn't jenkins just a modern version of crond?
<phat4life> all jenkins does is compile js, static contect from sourc control
oo_ has quit [Ping timeout: 264 seconds]
<phat4life> Senjai: the rails app is just a front end for jenkins
ddarkpassenger has joined #ruby
blackmesa has joined #ruby
<yorickpeterse> heh, our jenkins does a shit ton
<phat4life> we have 11k jenkins jobs
antgel has quit [Ping timeout: 264 seconds]
<phat4life> with with probably 300+ builds
<phat4life> each
<Senjai> yorickpeterse: Same, but we have like, a build with parameters thing, that makes it pretty simple.
<yorickpeterse> precompile assets, package Gems, package apps, trigger deploys, build Linux binaries for PhantomJS and other things, build Rubinius binaries/nightlies, etc
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> "a shit ton" – and in imperial measurements?
<yorickpeterse> undeadaedra: metrics only
<Senjai> yorickpeterse: lol at the phantomjs, I hate how they're so slow to release binaries on linux
<phat4life> Senjai: creating jenkins projects sometimes only works with xml
<undeadaedra> yorickpeterse: good.
<phat4life> with all the plugins and shit
Synthead has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
<veinofstars> j #emberjs
<yorickpeterse> Senjai: meh, I just started up a beefy EC2 instance and 30 minutes later I had my CentOS binary
<Senjai> phat4life: I'll ask if I can show our tool for setting up jenkins projecst, at the minute its closed source, but not for any particular reason I dont think
<shevy> is the tech world becoming smarter and smarter every year?
railsraider has quit [Quit: railsraider]
<phat4life> shevy: yes
ruby-lang515 has joined #ruby
<Senjai> shevy: yes and no
sevenseacat has quit [Quit: Me dun like you no more.]
<yorickpeterse> shevy: No, it thinks it becomes smarter every year but it stays roughly the same
<Senjai> shevy: The % of smart people in the industry is relatively constant
<yorickpeterse> once in a while it makes a small jump
<Senjai> there is just more people in th eindustry
<Senjai> yorickpeterse: I win :P
yqt has joined #ruby
<shevy> yorickpeterse now that is a very confusing statement :D
<phat4life> there are a lot of shit rails devs being churned out by places like dev boot camp
<shevy> I am just trying to notice the differences to like 1995
<Senjai> shevy: See, there is this thing called javascript, that can allow people to call themselves software engineers, without actually knowing anything about building anything outside of a browser frontend
<phat4life> shevy: the barrier of entry for rails devs is pretty low
<phat4life> sometimes
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
<Senjai> phat4life: Yeah, but if it wasn't for that, I wouldnt be here so..
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> As I got picked up by this company being self taught
francois_ has joined #ruby
<phat4life> Senjai: dev bootcamp?
<Senjai> No
<phat4life> ah self taught
<dorei> i think that programming and software engineering are like two different skills
<shevy> can you code in ruby Senjai?
<shevy> at work
<phat4life> i feel like the self taught ones, can be really good at what they do
<phat4life> not always
<Senjai> shevy: I've been writing ruby, rails, javascript, etc for the past two years
francois_ has quit [Remote host closed the connection]
sharpmachine has joined #ruby
<Senjai> 99% of the people here are self taught. Sure they have degrees, but they all say they were useless
<yorickpeterse> I'm the only dirty dropout at the office
<Senjai> about 50% of our office has degrees
<Senjai> I think
<Darkwater> I don't even have a degree (yet) lol
<Senjai> yorickpeterse: Right, and you're kind of awesome at the things so.
<yorickpeterse> I'm also the coolest one that the office, may or may not be related
Xeago has quit [Remote host closed the connection]
<yorickpeterse> ( •_•) ( •_•)>⌐■-■ (⌐■_■)
<Darkwater> square sunglasses
<yorickpeterse> I kid, I have no idea what I'm doing 99% of the time
icebourg has joined #ruby
<Senjai> Google driven development
Lucky__ has joined #ruby
jlebrech has joined #ruby
<dorei> lol
sandstrom has joined #ruby
<yorickpeterse> haha wtf
<shevy> the dog is cute
olistik has joined #ruby
<yorickpeterse> my crotch isn't that clearly visible
<phat4life> Senjai: the problem i have, is that i would like to see devs be able to read code; like, most of the devs i know, if i show them a recursive function, ask them what it does, they cant
<shevy> lol
<yorickpeterse> or bulge or w/e that is
Sembei has joined #ruby
<shevy> they just stuffed it up
<shevy> have you seen Ronal the Barbarian? that animated movie?
mister_solo has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
<Senjai> phat4life: Recursion is a pretty verbose thing for people new to the industry.
<phat4life> Senjai: a lot of self taught devs have gaps in more computer science stuf
<shevy> they overdid it with the jokes... but I still found some non-overdone things funny, like the invisible potion
<phat4life> maybe dynamic programming
<Senjai> I cant say I fully understand it beyond a function that just calls itself. There's many different ways to recurse over things
<Senjai> phat4life: You have a ton of gaps for sure. The thing is, you should.
momomomomo has quit [Ping timeout: 276 seconds]
<phat4life> yeah true
<yorickpeterse> shevy: nop
jlast has quit [Read error: Connection reset by peer]
<Senjai> phat4life: Having a web developer that has spent 2 years learning math instead of engineering is a waste of time
<Senjai> phat4life: Except in the most exceptional of cases
<phat4life> i love math :(
<phat4life> i don't get to use enough math
Agoldfish has joined #ruby
<Senjai> phat4life: That's fine, but its not the most important thing in a devs toolkit (for this part of the industry)
<shevy> you are not a real person phat4life
djdarkbeat has joined #ruby
<yorickpeterse> if all you do is poop CRUD apps then yeah, it's pretty pointless
<Senjai> now if it was game dev, that's a different story
Pisuke has quit [Ping timeout: 265 seconds]
sdothum has joined #ruby
ndrei has joined #ruby
<Senjai> yorickpeterse: Even complex apps. The hardest thing for a developer to learn is how to manage complexity, everything else is details
mleung has quit [Quit: mleung]
<phat4life> shevy: shadertoy.com
towski_ has joined #ruby
<phat4life> Senjai: yes! managing complexity is hard for inexperienced devs
<shevy> dunno what that is
<yorickpeterse> Not sure, I think writing good Git commit messages is still the #1 hardest thing
<shevy> but I wanted to create 3D objects via ruby programmatically!
<phat4life> shevy: webgl shader sandbox
<yorickpeterse> (for most)
<phat4life> shevy: its all just math
<phat4life> but cool as hell
<ZOMGITSABEAR> puts "Is it true that 3 + 2 < 5 - 7?"
<ZOMGITSABEAR> puts 3 + 2 < 5 - 7
<ZOMGITSABEAR> output = true on bottom line?
<yorickpeterse> "fixed stuff" diffstat: 1293812039819023 additions
<ZOMGITSABEAR> false, i mean
<Senjai> yorickpeterse: HAHAHAHAHAAHA so true
<shevy> dragon = Dragon.new
<phat4life> shevy: yeah 3d graphics with ruby is not a good idea
<ZOMGITSABEAR> how does that work
<Senjai> I stand corrected
<shevy> dragon.colour = 'red'
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> >> 3 + 2 < 5 - 7
<ruboto> yorickpeterse # => false (https://eval.in/383350)
<shevy> dragon.render :to_png
sharpmachine has quit [Ping timeout: 250 seconds]
<ZOMGITSABEAR> nop but i mean
mrmargolis has quit [Remote host closed the connection]
strixd has quit [Quit: 500]
<ZOMGITSABEAR> the output on the second line is true of false
<yorickpeterse> >> (3 + 2 < 5) - 7
<ruboto> yorickpeterse # => undefined method `-' for false:FalseClass (NoMethodError) ...check link for more (https://eval.in/383354)
<ZOMGITSABEAR> yet you're putting in a string of numbers
<yorickpeterse> errr derp
<ZOMGITSABEAR> how does ruby know to automatically put true or false in there
<ZOMGITSABEAR> as the output
mrmargolis has joined #ruby
<ZOMGITSABEAR> that's what i'm trying to learn
<yorickpeterse> ZOMGITSABEAR: can you gist it? It's a bit hard to make up from IRC directly
MatthewsFace has quit [Remote host closed the connection]
diegoviola has joined #ruby
<ZOMGITSABEAR> yorickpeterse: well, the input is a string of numbers as a mathmatical formula.
<ZOMGITSABEAR> the output is true or false
<ZOMGITSABEAR> how does ruby know to use true or false as the output
sharpmachine has joined #ruby
momomomomo has joined #ruby
<Senjai> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<ZOMGITSABEAR> for reference: http://learnrubythehardway.org/book/ex3.html
Yiota has joined #ruby
ottlikg has quit [Ping timeout: 264 seconds]
<Senjai> ZOMGITSABEAR: Comparison operators like > < <= >= == and so on return true or false
<jhass> are zed failed to explain string interpolation prior that example?
<ZOMGITSABEAR> explain
<jhass> *ah,
alex88 has quit []
<ZOMGITSABEAR> i didn't finish high school. math is hard for me
serivich has quit [Ping timeout: 265 seconds]
<ZOMGITSABEAR> i get lesser than, greater than
<volty> comparison yields boolean, + and - have precedence, so the last evaluated is comparison
<ZOMGITSABEAR> but it returns true or false based entirely upon using < or >?
jlast has joined #ruby
<jhass> ZOMGITSABEAR: do you understand method calls yet?
<ZOMGITSABEAR> i just sarted 2 days ago
<abyss> apeiros: ok. Thank you.
<ZOMGITSABEAR> or so
Synthead has joined #ruby
<jhass> "foo".upcase #=> "FOO" ?
<Senjai> ZOMGITSABEAR: Is 5 less than 10?
<ZOMGITSABEAR> yes
<ZOMGITSABEAR> oh i get it
<ZOMGITSABEAR> clever
EllisTAA has joined #ruby
<Senjai> ZOMGITSABEAR: Right, so yes means what in code?
<ZOMGITSABEAR> ^^
<ZOMGITSABEAR> true
<Senjai> yes means true :P
<jhass> ZOMGITSABEAR: < is method calls too, 5.<(4)
<Senjai> :)
AndroidLoverInSF has quit [Ping timeout: 244 seconds]
<Senjai> jhass: I think thats too much for now :P
<EllisTAA> can anyone recommend a fun open source ruby project that i can participate in?
<Senjai> EllisTAA: I need help in cancancan
malconis has quit [Remote host closed the connection]
<Senjai> there is TONS to do
Zai00 has quit [Quit: Zai00]
<ZOMGITSABEAR> i remember reading about a site where users requested a project and programmers could make the project
drewo has joined #ruby
<yorickpeterse> I've seen it before and every time I forget the name
<ZOMGITSABEAR> also, quick question before i go back to studying
<EllisTAA> cancan looks cool
ogpastaling has quit [Remote host closed the connection]
<EllisTAA> any others?
<yorickpeterse> I do recall a lot of stuff tagged as "beginner" on it was really _not_ for beginners
Zai00 has joined #ruby
<ZOMGITSABEAR> how is it that some programmers can make upwards of $100k+
<Senjai> EllisTAA: There are no others, there is only cancan
<ZOMGITSABEAR> a year
iwishiwerearobot has quit [Quit: >:(]
<EllisTAA> lol
<Spaceghostc2c> ZOMGITSABEAR: Magic.
<yorickpeterse> ZOMGITSABEAR: by negotiating good contracts
<Senjai> EllisTAA: Even writing test applications to verify certain issues would be extremely helpful
<ZOMGITSABEAR> no but i mean, are programmers a precious commodity or something?
<yorickpeterse> and working for companies that can afford it
<yorickpeterse> Yes
<EllisTAA> what are test applications?
<yorickpeterse> Good ones are
aapole has joined #ruby
<yorickpeterse> Expertise can be worth a lot of money
<Spaceghostc2c> ZOMGITSABEAR: There's way more work than developers that are worthwhile.
<Senjai> EllisTAA: I sample rails application that reproduces a bug, that is uploaded to github so bugfixers can pull it down and fix it right away
<Spaceghostc2c> So experienced and savvy developers are worth a lot.
<ZOMGITSABEAR> is programming as a career a good choice?
pepperbreath1 has joined #ruby
<Senjai> without haveing to try and reproduce it
<Senjai> having*
<Senjai> I cant type today.
Scroff has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<EllisTAA> ok i’ll start reading cancan source code
<jhass> if your only motivation is money, I'm not sure
<Spaceghostc2c> ZOMGITSABEAR: For as long as the pay is high, the benefits are substantial, and the perks are hard to count, yes.
<ZOMGITSABEAR> my motivation is fulfilling work that challenges me, and allows me to have a comfortable lifestyle
<undeadaedra> can'tcan't
<Senjai> They pretty much wrote the code that causes the error, try putting that into a dummy rails app and uploading it. Then if you want, you can follow what gets called from where and try to fix it if you like :)
Scroff has joined #ruby
<jhass> if you have at least some fun doing, it's fine
<yorickpeterse> ZOMGITSABEAR: if you can stand sitting behind a computer ~9 hours a day yelling at it, sure
<Senjai> undeadaedra: At the moment, yeah. I got plans to make it a lot better
<ZOMGITSABEAR> i know with sysadmin, it's a high stress job
malconis has joined #ruby
<ZOMGITSABEAR> is programming high stress?
<yorickpeterse> varies from company to company
<Spaceghostc2c> ZOMGITSABEAR: Some people just work like 4-8 hours a day and step away after work.
pepperbreath has quit [Ping timeout: 265 seconds]
duoi has quit [Ping timeout: 265 seconds]
<undeadaedra> Senjai: what will you call it? cancancancan?
<Spaceghostc2c> undeadaedra: cannotcannot
dfockler has joined #ruby
<Senjai> undeadaedra: Nope, cancancan version 2 :)
<ZOMGITSABEAR> thanks for all the help, guys
<ZOMGITSABEAR> i really appreciate it
<Spaceghostc2c> ZOMGITSABEAR: Anyone mid-level or better shouldn't be making less than six figures working in a tech hub in the US.
<undeadaedra> Is there a bear in here?
<ZOMGITSABEAR> i am a bear, yes
rindolf has quit [Quit: Leaving]
ogpastaling has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<undeadaedra> Brown or white?
Scroff has quit [Remote host closed the connection]
<ZOMGITSABEAR> oohh
<ZOMGITSABEAR> good question
<undeadaedra> Wait
* yorickpeterse only makes 5 figures :<
<undeadaedra> I just remember that I'm not allowed to ask this in my country
<dfockler> I don't live in a tech hub
<ZOMGITSABEAR> lawl
<yorickpeterse> Then again I don't live in a third world country such as the US
<undeadaedra> :D
<Senjai> yorickpeterse: LOL! Canada here
<ZOMGITSABEAR> >us
<ZOMGITSABEAR> >third world country
<ZOMGITSABEAR> lol?
<jhass> it's true
<undeadaedra> sorry, fourth
<yorickpeterse> Isn't Canada just the US but with the guns replaced with maple syrup?
<ZOMGITSABEAR> i mean, i know shit is bad here, but third world? c'mon
<shevy> and colder weather
<shevy> actually they also have lots of guns
<Senjai> Yes, + public health care and services that actually work
<shevy> stolen from europe!!!
<ZOMGITSABEAR> canadians love their hunting and sport shooting
<yorickpeterse> except the giant potholes in Toronto
<ZOMGITSABEAR> just don't have full auto
<ZOMGITSABEAR> alright, i'm getting distracted. i need to go back to studying
<shevy> do they have polar bears in Canada?
nateberkopec has joined #ruby
<ZOMGITSABEAR> i'll be back in here with more questions, most likely. hahaha
<undeadaedra> shevy: only positive ones.
<ZOMGITSABEAR> ^lol
bruno- has quit [Read error: Connection reset by peer]
pikos has joined #ruby
bruno- has joined #ruby
aapole has quit [Ping timeout: 276 seconds]
duoi has joined #ruby
duoi has quit [Changing host]
duoi has joined #ruby
drocsid has quit [Ping timeout: 252 seconds]
sharpmachine has quit [Read error: Connection reset by peer]
olistik has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
erts has quit [Ping timeout: 265 seconds]
francois_ has joined #ruby
startupality has quit [Read error: Connection reset by peer]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lfox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit []
<mwlang> Shouldn’t the US be like the 9000th world country? I mean, it’s only ~400 years old…surely more than three countries have come before...
sharpmachine has joined #ruby
casadei has quit [Remote host closed the connection]
<undeadaedra> ahah
InternetFriend has joined #ruby
apoplexy is now known as blonde_19f_cali
startupality has joined #ruby
fantazo has joined #ruby
<Senjai> 3.5 minutes for 29 specs *facepalm*
<undeadaedra> Are we a majority of non-US people in here? This discussion goes relatively well, for something criticising the US
<jokke> mwlang: it's probably over 9000
<NeverDie> Wot.
<ZOMGITSABEAR> over... 9000!?
<mwlang> heh…US citizens have thick skin.
<jokke> ZOMGITSABEAR: :)
<ZOMGITSABEAR> OVER 9000!?!
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> undeadaedra: Possibly, but I would imagine US people in #ruby could be a little more aware of their own advantages and disadvantages.
<jokke> over ninethousaaaaaaand!?
<Senjai> Compared to like, youtube
<phat4life> USA USA
<undeadaedra> Senjai: possible.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ZOMGITSABEAR> smell that, guys?
<mwlang> …and we’re getting a new President next year no matter what, soooo…all is well here. :-)
<ZOMGITSABEAR> smells like... freedom
railsraider has joined #ruby
<Senjai> mwlang: If you guys get Trump...
<NeverDie> Vote for Donald Trump
<Senjai> I will lol
<Senjai> all the way
<ZOMGITSABEAR> dude
k3asd` has quit [Ping timeout: 264 seconds]
<phat4life> i almost got job in Germany (i live in the us)
<jokke> mwlang: or a president..ine?
alex88 has joined #ruby
<ZOMGITSABEAR> donald trump is rucking freetarded
Xeago has quit [Remote host closed the connection]
<NeverDie> All the more reason to vote for him.
<undeadaedra> mwlang: we're going to get a new president in some time too. But this scares me.
<phat4life> I wish the USA's health care system was like germanies
<Senjai> ZOMGITSABEAR: And other presidents aren't?
<ZOMGITSABEAR> bernie sandrs, guys
<mwlang> only way I’ll vote for Trump is if he shaves his head. :-)
<ZOMGITSABEAR> sanders*
<ZOMGITSABEAR> he's the best shot
<ZOMGITSABEAR> read up on him
<phat4life> ZOMGITSABEAR: ive vote for him
<jokke> phat4life: that would be considered communism!
<ZOMGITSABEAR> make your vote count
<phat4life> er, i would
<Senjai> lolvotes
<phat4life> its funny, because if you make over 55k in germany, you can get private insurance
<Senjai> We should probably get this off politics though forreals.
<undeadaedra> Communism? In my USA? No way!
<ZOMGITSABEAR> 'MERICA
<ZOMGITSABEAR> FUCK YEAH
<undeadaedra> Could you fuck this poor yeah far away?
<undeadaedra> :)
<ZOMGITSABEAR> ?
<jhass> into #ruby-offtopic you mean?
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ZOMGITSABEAR> haha
sharpmachine has quit [Read error: Connection reset by peer]
<dfockler> why does receiving a block need the & sign?
<ZOMGITSABEAR> that makes a lot of sense, guys
<jhass> dfockler: it doesn't
fujimura has joined #ruby
<jhass> assigning it to a variable does
<ZOMGITSABEAR> which youtube videos do you guys recommend?
lxsameer has quit [Quit: Leaving]
<ZOMGITSABEAR> this one looks promising https://www.youtube.com/watch?v=Dji9ALCgfpM
<phat4life> jhass: does the & create a proc?
quimrstorres has quit [Remote host closed the connection]
<jhass> some say so some say otherwise
<Senjai> ZOMGITSABEAR: Let's not derail the channel :P
<ZOMGITSABEAR> lmfao
<Senjai> phat4life: it calls to_proc
_djbkd has joined #ruby
<jhass> I'd say from a users perspective it does
<Senjai> phat4life: on the symbol
<mwlang> oh, this is the Ruby channel? Ah…if they’d written our voting booth’s system in Ruby….:-)
<phat4life> gotcha
cndiv has joined #ruby
<Senjai> phat4life: &:thing is semantic suguar for :thing.to_proc iirc
<ZOMGITSABEAR> i meant youtube video tutorials
<dfockler> jhass: so def take_block(&blk) can be def take_block(blk) ?
<jhass> dfockler: no
<ZOMGITSABEAR> i linked a video tutorial on ruby
<phat4life> Senjai: gotcha
<jhass> dfockler: but def take_block
<mwlang> sorry, I’ve been working 9.5 hours w/o a break. :-o
DaniG2k has quit [Quit: leaving]
alex88 has quit [Ping timeout: 256 seconds]
quimrstorres has joined #ruby
<Senjai> >> thing = ->{}; thing.is_a?(Proc)
<ruboto> Senjai # => true (https://eval.in/383356)
<Senjai> phat4life: ^
skade has joined #ruby
<mwlang> it’s been a long time since I had to hit 4 different deadlines (four clients) in relatively same space.
evanjs has quit [Remote host closed the connection]
mrmargol_ has joined #ruby
<mwlang> (I don’t recommend it)
<phat4life> mwlang: we had 40 clients launch on a single day
allomov has quit [Remote host closed the connection]
<phat4life> multiple times
<eam> mwlang: better than not hitting the deadlines ;)
<Senjai> LOL, TIL you can assign things to lambda
<Senjai> :/
<mwlang> phat4life: hope you had a team. :-)
<jhass> dfockler: to make it clear, all methods implicitly take a block, def foo(&blk) just "captures" any passed one and assigns it to blk
* imperator despises stabby lambda in ruby
sharpmachine has joined #ruby
<ZOMGITSABEAR> what exactly is an integer?
<ZOMGITSABEAR> a number?
<jhass> a whole number
<ZOMGITSABEAR> ah ok
towski_ has quit [Remote host closed the connection]
<ZOMGITSABEAR> and the name for a number with a decimal place is...?
<elaptics> imperator: what is wrong with stabby lambda's?
<undeadaedra> Float
<ZOMGITSABEAR> gotcha
fgo has quit [Ping timeout: 252 seconds]
<ZOMGITSABEAR> thanks
<Senjai> imperator: why?
fujimura has quit [Ping timeout: 265 seconds]
<undeadaedra> >> [1, 1.1].map(&:class)
<ruboto> undeadaedra # => [Fixnum, Float] (https://eval.in/383357)
<dfockler> jhass: ok, so that allows you to use the block as a variable within the method instead of actually running the block?
bricker has joined #ruby
<undeadaedra> ah, yes, silly Fixnum >_>
<Senjai> >> Fixnum.superclass
<ruboto> Senjai # => Integer (https://eval.in/383358)
<jhass> not sure where the "instead of" is coming from, but yes
nikhgupt has joined #ruby
<mwlang> eam: true, dat.
<imperator> gimmick shoehorned into core by the FP proponents, looks like poo, never see it used in production code
nobitanobi has joined #ruby
<Senjai> imperator: We use it all the time
<elaptics> imperator: you haven't seen my production code then :)
<dfockler> jhass: I was thinking of passing a block and yielding is that incorrect?
mrmargolis has quit [Ping timeout: 250 seconds]
rbowlby has joined #ruby
<Senjai> imperator: IMO its better than saying lambda explicitly
<phat4life> dfockler: yield all the things!
<jhass> dfockler: perhaps? that question is a bit vague
<imperator> should probably switch languages if you want FP then
<phat4life> ocaml ftw
pikos has left #ruby ["..."]
<Senjai> imperator: Lambdas aren't just for FP
<dfockler> jhass: I'm understand it vaguely :P
<dfockler> understanding
<jhass> I guess ;)
<Senjai> We have Procs, lambdas are just stricter procs (kind of)
<imperator> phat4life, got smp?
nikhgupta has quit [Ping timeout: 265 seconds]
<ZOMGITSABEAR> so let's say you've got a ine that says something like puts num_one.to_s
<ZOMGITSABEAR> what is that and what does it do
<imperator> i tried to learn ocaml at one point....jeesh
<mwlang> You know….I’d like to read a good in-depth article on Procs vs. Lambdas…I don’t quite grok their differences.
<ZOMGITSABEAR> i know it's to a string, but what does that mean
<imperator> it's fast, but gawd, that syntax, could not deal
<Senjai> ZOMGITSABEAR: Convert num_one to a string, pass that string to the puts function
<Senjai> puts will print it to stdout, usually the terminal
<ZOMGITSABEAR> um
<ZOMGITSABEAR> ...........
<ZOMGITSABEAR> but what is a string
<wasamasa> not a bear
<undeadaedra> :D
<Senjai> ZOMGITSABEAR: Sorry dude, you should pick up a book, thats the basic of basics :P
<ZOMGITSABEAR> gotcha. now i know ruby
_djbkd has quit [Remote host closed the connection]
<ZOMGITSABEAR> :p
* wasamasa feels uneasy about allcaps nicks
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<Senjai> ZOMGITSABEAR: I recommend programming ruby, by the pragprog guys
<elaptics> imperator: do you just pass lambda as-is in methods then? i.e. method_name lambda { puts "hi" } instead of method_name -> { puts "hi" }
<undeadaedra> ZOMGITSABEAR: Strings are a basic programming structure, almost any language has it.
<ZOMGITSABEAR> ah ok
<wasamasa> except C!
<Senjai> any modern language
_djbkd has joined #ruby
<Senjai> wasamasa: I wouldnt mention that, if he doesnt know what a string is I wouldnt want to bother him with the intricacies around strings vs character arrays, or the subtle differences between languages
imperator has left #ruby ["Leaving"]
evanjs has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
torpig has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
railsraider has quit [Quit: railsraider]
<jhass> 1.9.2 oO
AlphaAtom has joined #ruby
<jhass> ah bad URL :D
quimrstorres has quit [Remote host closed the connection]
<wasamasa> damn these slugs
<dfockler> so like `map { do stuff }` is passing the block as an argument to map?
quimrstorres has joined #ruby
Guest25_ has joined #ruby
erts has joined #ruby
<jhass> dfockler: "as an argument" implies there's another way, which there isn't, but yes
blizzy has joined #ruby
<jhass> every method has this implicit block argument
axl__ has joined #ruby
<dfockler> lol ok
<ZOMGITSABEAR> ok, i'll read that book
<ZOMGITSABEAR> downloading now
<dfockler> jhass: so the implicit block argument allows methods to yield?
ruby-lang515 has quit [Ping timeout: 246 seconds]
The_Phoenix has quit [Quit: Leaving.]
towski_ has quit [Remote host closed the connection]
olistik has joined #ruby
toretore has joined #ruby
<jhass> yield invokes the block passed via the implicit block argument
_ixti_ has quit [Ping timeout: 265 seconds]
<dfockler> and the `&` is just making the block argument explicit
<jhass> pretty much
<jhass> it remains optional though
<dfockler> ok, thanks
<elaptics> dfockler: usually because there's no guarantee a block will have been passed you'll see code like yield if block_given?
_blizzy_ has quit [Ping timeout: 256 seconds]
nateberkope has joined #ruby
bobby1 has joined #ruby
bobby1 has quit [Client Quit]
pontiki has joined #ruby
rgs_ has joined #ruby
mello_ has joined #ruby
corehook has quit [Remote host closed the connection]
railsraider has joined #ruby
drew0 has joined #ruby
rodferso2 has joined #ruby
nikhgupt` has joined #ruby
dmolina1 has joined #ruby
railsraider has quit [Client Quit]
Dopagod has joined #ruby
whippythellama_ has joined #ruby
j4cknewt_ has joined #ruby
[yalue] has joined #ruby
mcclurmc_ has quit [Remote host closed the connection]
mwlang has quit [Quit: mwlang]
Xeago has joined #ruby
jacaho0 has joined #ruby
corehook has joined #ruby
nikhgupt has quit [*.net *.split]
drewo has quit [*.net *.split]
nateberkopec has quit [*.net *.split]
j4cknewt has quit [*.net *.split]
whippythellama has quit [*.net *.split]
rodfersou has quit [*.net *.split]
jcaho has quit [*.net *.split]
GnuYawk has quit [*.net *.split]
slackbotgz has quit [*.net *.split]
yalue has quit [*.net *.split]
mello has quit [*.net *.split]
rgs has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
surs has quit [*.net *.split]
cats has quit [*.net *.split]
drizz has quit [*.net *.split]
j416 has quit [*.net *.split]
MatthewsFace has joined #ruby
RegulationD has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
cats has joined #ruby
_djbkd has joined #ruby
sharpmachine has quit [Ping timeout: 264 seconds]
drizz has joined #ruby
segfalt has quit [Quit: segfalt]
startupality has quit [Quit: startupality]
freerobby has joined #ruby
whippythellama_ has quit [Ping timeout: 264 seconds]
sharpmachine has joined #ruby
bgmarx has joined #ruby
skade has quit [Read error: Connection reset by peer]
JoshGlzBrk has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
EllisTAA has joined #ruby
JoshGlzBrk has quit [Client Quit]
bkxd has quit [Ping timeout: 264 seconds]
skade has joined #ruby
evanjs has quit [Remote host closed the connection]
Spami has joined #ruby
AlphaAtom has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
krisquigley has quit [Remote host closed the connection]
j416 has joined #ruby
krisquigley has joined #ruby
dg-ratiodata has joined #ruby
kalusn has quit [Remote host closed the connection]
towski_ has joined #ruby
agent_white has quit [Remote host closed the connection]
Alina-malina has joined #ruby
doertedev has quit [Quit: leaving]
deric_skibotn has joined #ruby
luksaur has quit [Ping timeout: 276 seconds]
cirn0 has quit [Remote host closed the connection]
cirn0 has joined #ruby
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
Xeago has quit [Remote host closed the connection]
c0m0 has quit [Ping timeout: 245 seconds]
valkyrka has quit [Quit: valkyrka]
duderonomy has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
krisquigley has quit [Ping timeout: 264 seconds]
bootstrappm has joined #ruby
nikhgupt` has quit [Remote host closed the connection]
otherj has joined #ruby
nikhgupt has joined #ruby
josh has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
josh is now known as brainshim
penzur has quit [Quit: Leaving]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
HotCoder has quit [Quit: Leaving]
Scrofff has joined #ruby
episage has joined #ruby
<episage> hi folks
<episage> green_url = e.find_element(:css => "cite").text
torpig has joined #ruby
Xeago has joined #ruby
zudochkin has quit [Remote host closed the connection]
<episage> find_element may raise an exception sometimes, how can I get the text of the elem or nil in case it throws?
nikhgupt has quit [Remote host closed the connection]
wallerdev has joined #ruby
<episage> its selenium
Scroff has quit [Ping timeout: 256 seconds]
nikhgupta has joined #ruby
GPrime has joined #ruby
rubie has quit [Remote host closed the connection]
<bnagy> blah = blah rescue nil
lfox has joined #ruby
<pontiki> nothing will rescue you from the blahs
<bnagy> but I hate doing that :< It's giving in to shitty code
BTRE has joined #ruby
nikhgupta has quit [Remote host closed the connection]
francois_ has quit [Remote host closed the connection]
InternetFriend has joined #ruby
nikhgupta has joined #ruby
dseitz has joined #ruby
francois_ has joined #ruby
<jhass> find_elements().first ?
dumdedum has quit [Quit: foo]
fabrice31 has quit [Ping timeout: 255 seconds]
<episage> jhass: but its not too nice coz code gets bloated with if
nikhgupta has quit [Remote host closed the connection]
<episage> and sometimes i want to get property different to text
<episage> bnagy: hmm ok thanks for advice, im gonna give it
<episage> a try
nikhgupta has joined #ruby
<jhass> episage: why not capybara?
<jhass> wraps that stuff up in a nicer API + more
sharpmachine has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
<jhass> and eh, inline rescue giving you nil or find_elements().first giving you nil... where's the diff?
hsps_ has joined #ruby
<episage> aegh
EllisTAA has joined #ruby
tomphp has joined #ruby
olistik has quit []
lkba has joined #ruby
nikhgupta has quit [Client Quit]
EllisTAA has quit [Client Quit]
postmodern has joined #ruby
ramfjord has joined #ruby
jlebrech has quit [Remote host closed the connection]
coderhs has quit [Ping timeout: 265 seconds]
dmolina1 has quit [Ping timeout: 250 seconds]
rbennacer has quit [Remote host closed the connection]
tomphp_ has joined #ruby
sharpmachine has joined #ruby
tcrypt has joined #ruby
whippythellama_ has joined #ruby
tomphp has quit [Ping timeout: 276 seconds]
episage has quit [Ping timeout: 250 seconds]
dg-ratiodata has quit [Remote host closed the connection]
otherj has quit [Quit: .]
dg-ratiodata has joined #ruby
catphish has quit [Quit: Leaving]
mikecmpbll has joined #ruby
j0n3 has joined #ruby
Ox0dea has quit [Ping timeout: 252 seconds]
dEPy has quit [Quit: (null)]
_ixti_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Remote host closed the connection]
sohrab has quit [Ping timeout: 264 seconds]
happyface has quit [Quit: Connection closed for inactivity]
sharpmachine has quit [Read error: Connection reset by peer]
volty has quit [Quit: Konversation terminated!]
slackbotgz has joined #ruby
rbennacer has joined #ruby
momomomomo has quit [Quit: momomomomo]
_ixti_ has quit [Quit: WeeChat 1.2]
pontiki has quit [Quit: <poit>]
fgo has joined #ruby
sharpmachine has joined #ruby
rushed has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
episage has joined #ruby
gianlucadv has joined #ruby
bgmarx has quit [Remote host closed the connection]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
BanzaiJoe has joined #ruby
rbowlby_ has joined #ruby
episage_ has joined #ruby
ht__ has joined #ruby
nikhgupta has joined #ruby
Scrofff has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
nikhgupta has quit [Remote host closed the connection]
episage has quit [Ping timeout: 255 seconds]
sharpmachine has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 272 seconds]
s2013 has joined #ruby
rbowlby has quit [Ping timeout: 244 seconds]
krz has quit [Quit: WeeChat 1.0.1]
cirn0 has quit [Remote host closed the connection]
sharpmachine has joined #ruby
episage_ has quit [Ping timeout: 265 seconds]
mister_solo has joined #ruby
rbennacer has quit [Remote host closed the connection]
GayBoner has joined #ruby
Zai00 has quit [Quit: Zai00]
<GayBoner> what kind of stuff should people be here for?
blizzy is now known as _blizzy_
<c-c> read topic
<slash_nick> gemstones... mainly rubies
aaeron has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
GayBoner was kicked from #ruby by ruboto [http://ruby-community.com/pages/user_rules#rule_2_10]
GayBoner has joined #ruby
<jhass> GayBoner: one minute to change your nick, see kick reason
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
episage has joined #ruby
jpfuentes2 has joined #ruby
bgmarx has joined #ruby
GayBoner was banned on #ruby by ChanServ [GayBoner!*@*]
GayBoner was kicked from #ruby by ChanServ [Banned: http://ruby-community.com/pages/user_rules#rule_2_10]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AndroidLoverInSF has joined #ruby
<Outlastsheep> Makes you wonder how those people even get by on IRC.
<Outlastsheep> With such a nick you're bound to get banned in most places.
* jhass shrugs
<Outlastsheep> Oh well.
erts has quit [Quit: erts]
segfalt has joined #ruby
aaeron has quit [Client Quit]
<bougyman> maybe it's sarcastic
<jhass> nah, kid trying to offend people, that's all, don't worry about it
Volsus has joined #ruby
<Outlastsheep> Whatever it is, it's gone now.
* Outlastsheep goes back to work.
<hal_9000> what does Outlastsheep mean anyway? :)
failshell has joined #ruby
cirn0 has joined #ruby
corehook has quit [Remote host closed the connection]
episage has quit [Ping timeout: 265 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
<TvL2386> hi guys, anybody familiar with rabbitmq and bunny?
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<TvL2386> -_-
<Outlastsheep> hal_9000: Oh, one sec...
RegulationD has joined #ruby
corehook has joined #ruby
<Outlastsheep> My original name was 'Fiestaguy', which turned into 'Fiestasheep' after I discovered my new favourite animal (They're so fluffy and adorable! ^w^) Then someone gifted me the horror game 'Outlast' on Steam.
lkba_ has joined #ruby
<hal_9000> ah, it all makes sense
<Outlastsheep> I changed my AFK-Nick to 'Outlastsheep' (As-in 'playing outlast'.) I was playing the game so often (and thus used this nick so often) the people in an IRC Channel I staff started knowing me as 'Outlastsheep' rather than 'Fiestasheep' And thus I kept this name.
charliesome has quit [Quit: zzz]
AlphaAtom has joined #ruby
mister_solo has quit [Ping timeout: 256 seconds]
nofxx has quit [Ping timeout: 272 seconds]
<Outlastsheep> Besides, I've stuck with 'Fiesta' for 4 years now. Nice to get a change now and then.
<TvL2386> alrighty: I'm thinking of replacing our proprietary MQ stuff (implementing RPC) with a standard using RabbitMQ and the bunny gem. I'm implementing the RPC server pattern but think it's a bit too complex and would like to make it simpler by hiding the nasty stuff... Not sure how to do that though... I was wondering if anybody ever tried to do the same thing
luksaur has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
kahuna_ has quit [Remote host closed the connection]
aaeron has joined #ruby
jackjackdripper has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
rgs_ has quit [Quit: leaving]
rgs has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
ndrei_ has joined #ruby
claw has quit [Remote host closed the connection]
msgodf has joined #ruby
msgodf has quit [Max SendQ exceeded]
Igorshp has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
bayed has quit [Quit: Connection closed for inactivity]
<bnagy> yes
simplyianm has joined #ruby
msgodf has joined #ruby
<bnagy> probably wouldn't do it again, tbh, there are much more mature options off the shelf now
tvw has quit [Remote host closed the connection]
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
msgodf has quit [Max SendQ exceeded]
<Senjai> TvL2386: You dont gain much from using Rabbit
<TvL2386> bnagy, like what?
ndrei has quit [Ping timeout: 256 seconds]
bricker has quit [Ping timeout: 245 seconds]
<Senjai> Not in ruby at least
failshell has quit [Remote host closed the connection]
whippythellama_ has quit [Quit: WeeChat 1.2]
whippythellama has joined #ruby
renderful has joined #ruby
failshell has joined #ruby
<TvL2386> Senjai, the purpose is to replace a legacy MQ "network" of clients/workers... The current infrastructure is heading into a wall due to being old and soon I will run into backporting legacy libs (libzmq v2)
<TvL2386> Senjai, I need to start looking for a replacement and rabbitmq caught my eye
msgodf has joined #ruby
bMalum has joined #ruby
<TvL2386> it's also in use for mcollective which is doing stuff with puppet (not my project), anyway: we already have rabbitmq and I just thought it would be good to use it
<toretore> TvL2386: what's the reason you want to replace it specifically?
msgodf has quit [Max SendQ exceeded]
withnale____ has quit [Ping timeout: 264 seconds]
francois_ has quit [Remote host closed the connection]
<TvL2386> toretore, because the current MQ infrastructure is made by a single person in the company and is not based on any standards. The workers, clients and broker are all self invented making use of libzmq package, ffi, ffi-rzmq...
dionysus69 has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
msgodf has joined #ruby
mister_solo has joined #ruby
endash has quit [Quit: endash]
<Senjai> TvL2386: Sidekiq, Resque
<TvL2386> it's outdated and needs an upgrade... Instead of investing in this proprietary solution, I'd like to adopt standards and not reinvent the wheel
<Senjai> TvL2386: If its super basic you can go with delayed job
<toretore> TvL2386: and what's wrong with it?
msgodf has quit [Max SendQ exceeded]
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> TvL2386: amqp/rabbitmq is easy, at least if you know how it works already
bricker has joined #ruby
momomomomo has quit [Ping timeout: 244 seconds]
episage has joined #ruby
<toretore> it's like rails, it does most of the things you want out of the box
symbol has joined #ruby
cosmicfires has quit [Quit: bye...]
nikhgupta has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
msgodf has joined #ruby
momomomomo has joined #ruby
ntln has quit [Ping timeout: 265 seconds]
<TvL2386> Senjai, it's not super basic... The workers need to run on certain machines and do things like firewall reload, vpn creation, vm deployment etcetera
sharpmachine has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
edwinvdgraaf has joined #ruby
<Senjai> TvL2386: That sounds basic
<TvL2386> toretore, you're not mentioning bunny
aaeron has quit [Quit: Leaving.]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TvL2386> toretore, gonna checkout amqp
<Senjai> What the job does isn't what makes it complex
<Senjai> Do the workers have to be organized into queues?
shock_one has quit []
msgodf has quit [Remote host closed the connection]
<Senjai> Do they automatically prioritize things? Do things have to wait for workers to finish their jobs?
<Senjai> etc
chinmay_dd has quit []
GPrime has joined #ruby
rcvalle has quit [Ping timeout: 250 seconds]
aapole has joined #ruby
sharpmachine has joined #ruby
<toretore> TvL2386: amqp is the protocol
<TvL2386> well... these workers run on certain machines and only do a single job. The worker on the firewall is able to install the ruleset and reload. The worker running on a management machine interacts with Cisco to create a vpn account. They are connected to a MQ broker awaiting instructions
<toretore> bunne is a ruby library that implements it
<toretore> bunny
sohrab has joined #ruby
episage has quit [Ping timeout: 244 seconds]
Scroff has joined #ruby
aaeron has joined #ruby
<TvL2386> toretore, yeah I checked... ruby-amqp is an existing lib built around event-machine, but they refer to bunny unless event-machine is a requirement
krisquigley has joined #ruby
theery has joined #ruby
<toretore> it's the same thing, one uses em one doesn't
mister_solo has quit [Ping timeout: 245 seconds]
j4cknewt_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<TvL2386> toretore, clear :-)
rubie has joined #ruby
<TvL2386> ah well... time to play with bunny :-)
toretore has quit [Quit: This computer has gone to sleep]
casadei has joined #ruby
sohrab is now known as omosoj
jwaldrip has quit [Quit: Be back later ...]
omosoj is now known as sohrab
keernel has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
jwaldrip has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
<diegoviola> I need to make some HTTP calls from sinatra, i.e. hit some API and return/parse json from it, any ideas how?
<diegoviola> I asked on #sinatra but it's quiet over there
blackmesa has joined #ruby
<jhass> how would you do it outside sinatra?
dgutierrez1287 has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
<diegoviola> via curl
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<Senjai> diegoviola: Use Net::HTTP
<diegoviola> thanks
<diegoviola> I will
simplyianm has joined #ruby
<dfockler> diegoviola: or one of the plethora of other HTTP client libs
rubie has quit [Ping timeout: 265 seconds]
<diegoviola> ok
<Senjai> I recommend Net::HTTP over almost everything else
<diegoviola> ok
<diegoviola> Senjai: why? because it's part of the stdlib?
<Senjai> No, because it works
<Senjai> and doesnt modify any of your classes
<Senjai> and is flexible
Spami has joined #ruby
rbennacer has joined #ruby
<diegoviola> ok thanks
symm- has joined #ruby
centrx has joined #ruby
<Senjai> If I had to suggest one to -avoid- it'd be https://github.com/jnunemaker/httparty
mary5030 has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
InternetFriend has joined #ruby
<centrx> Senjai, Why?
jwaldrip_ has joined #ruby
jwaldrip has quit [Read error: No route to host]
michael_mbp has quit [Excess Flood]
<centrx> "Requirements...You like to party!"
dgutierrez1287 has quit [Ping timeout: 256 seconds]
<diegoviola> Senjai: fair enough, thanks
fujimura has joined #ruby
<Senjai> centrx: That's only half of the reason ;)
<phat4life> centrx: red flag
quimrstorres has quit [Remote host closed the connection]
michael_mbp has joined #ruby
Zai00 has joined #ruby
quimrstorres has joined #ruby
vickleton has joined #ruby
<dfockler> I like rest-client, it has good documentation, and seems to work fine
failshell has quit [Read error: Connection reset by peer]
failshell has joined #ruby
<Senjai> I prefer https://github.com/lostisland/faraday when not using net/http
<Senjai> but thats still rare
fujimura has quit [Ping timeout: 255 seconds]
corehook has quit [Remote host closed the connection]
<phat4life> i have uses faraday
DroidBur_ has joined #ruby
<phat4life> it was ok
DroidBur_ has quit [Remote host closed the connection]
Ponyo has joined #ruby
<Ponyo> Hi there, could someone explain to me why we use a colon infront of the operator in a reduce function? (5..10).reduce(:+) Thanks
<undeadaedra> to make it a symbol
<undeadaedra> >> :+.class
<ruboto> undeadaedra # => Symbol (https://eval.in/383398)
cirn0 has quit [Remote host closed the connection]
<Ponyo> oh ok
jwaldrip_ has quit [Ping timeout: 252 seconds]
droidburgundy has quit [Ping timeout: 252 seconds]
rbowlby_ has quit [Remote host closed the connection]
jphenow has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
idafyaid has quit [Remote host closed the connection]
jenrzzz has joined #ruby
sharpmachine has joined #ruby
<Senjai> >> :+.to_proc
<ruboto> Senjai # => #<Proc:0x40608200> (https://eval.in/383401)
jwaldrip_ has joined #ruby
jxpx777 has quit [Quit: Leaving...]
<Ponyo> thANK YOU :)
droidburgundy has joined #ruby
<phat4life> Ponyo: any string can be a symbol, but somtimes you have to do :"mystring-sdfsd"
<Ponyo> Sorry, thank you :)
symbol has left #ruby ["WeeChat 1.1"]
NightsKing has joined #ruby
davedev2_ has joined #ruby
<Senjai> I hate quoted symbols :P, very rare ly is it ever a necessitry
<phat4life> i hate it too, but sometimes i need a -
<phat4life> like in nokogiri, i had to use lots of :""
<phat4life> because the xml for jenkins is shitty
micmus has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
<undeadaedra> there isn't a % syntax for symbols?
<phat4life> you mean liek %(a b c d)?
paulcsmith has joined #ruby
<Ponyo> Why use a symbol instead of a string?
ReK2 has quit [Ping timeout: 255 seconds]
jwaldrip_ has quit [Ping timeout: 252 seconds]
<Ponyo> Nm, I read :)
closer has quit [Ping timeout: 272 seconds]
<phat4life> Ponyo: symbols are immutable, and a given symbol is guarneteed to always be the same
djdarkbeat has quit [Quit: djdarkbeat]
x1337807x has joined #ruby
cirn0 has joined #ruby
<undeadaedra> phat4life: like %q(text), but that will provide a symbol
<Senjai> >> puts :thing.object_id; puts :thing.object_id
<ruboto> Senjai # => 417458 ...check link for more (https://eval.in/383405)
ReK2 has joined #ruby
<undeadaedra> we have those for strings, regex, shell commands, array, symbol arrays
closer has joined #ruby
<undeadaedra> and surely more I don't know about
keernel has quit [Ping timeout: 245 seconds]
jxpx777 has joined #ruby
<phat4life> wierd that %q works lol
keernel has joined #ruby
<undeadaedra> %q = '', %Q = "" iirc
j4cknewt has joined #ruby
arturhoo has joined #ruby
<phat4life> but is % the same as %Q
<phat4life> ?
swgillespie has joined #ruby
djdarkbeat has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<undeadaedra> >> a = "world"; [ %(Hello #{a}), %q{Hello #{a}}, %Q|Hello #{a}| ]
<ruboto> undeadaedra # => ["Hello world", "Hello \#{a}", "Hello world"] (https://eval.in/383409)
<djellemah> >> %s(this is a symbol)
<ruboto> djellemah # => :"this is a symbol" (https://eval.in/383410)
<undeadaedra> oh
baweaver has joined #ruby
<undeadaedra> TIL \o/
jwaldrip_ has joined #ruby
<Senjai> The only % I use often is the one for an array of symbols
<Senjai> >> %i|one two three four|
<ruboto> Senjai # => [:one, :two, :three, :four] (https://eval.in/383411)
<undeadaedra> This one is practical
<Senjai> Just because arrays of constant symbols are annoying
learath has joined #ruby
cornytoad_ has joined #ruby
ogpastal_ has joined #ruby
hahuang65 has joined #ruby
<learath> is there a clean/correct way to iterate through an array, and return true if [any|all] array elements return [true|false]
<undeadaedra> any? and all?, iirc
<LiquidInsect> [1,2,3].any?{|number| number == 1}
<LiquidInsect> [1,2,3].all?{|number| number == 1}
jwaldrip_ has quit [Ping timeout: 245 seconds]
rdark has quit [Quit: leaving]
jwaldrip_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ponyo> When we use a symbol, we don't define it's value, it's existence is all we care about?
DashNine has quit [Quit: Process terminated]
<learath> LiquidInsect/undeadaedra: thanks
davedev24_ has joined #ruby
ogpastaling has quit [Ping timeout: 256 seconds]
nikhgupta has quit [Remote host closed the connection]
<LiquidInsect> Ponyo: basically, yes. A symbol is just an identifier
davedev2_ has quit [Ping timeout: 265 seconds]
mdw has joined #ruby
otherj has joined #ruby
<Ponyo> Ok I think that helps finally put them in place. I'm still not sure why reduce needs a symbol and not a string, but at least symbols are making more sense :)
rbowlby has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
<undeadaedra> because reduce requires a symbol
<undeadaedra> symbols are used as fixed identifiers, such as method names
drew0 has quit [Remote host closed the connection]
<baweaver> here's the thing though on that
<baweaver> + is a method on numbers
<baweaver> so symbol to proc makes perfect sense there
<baweaver> except
drewo has joined #ruby
<baweaver> it requires an argument
<diegoviola> I have some code that does res = Net::HTTP.get_response(uri) and I get this back with res.body:
<diegoviola> => "{\n \"type\": \"search_results\",\n \"total\": 1,\n \"results\": [\n {\n \"type\": \"article\",\n \"article_id\": 792488,\n \"url\": \"https://demo360.neoassist.com:80/API/kb/articles/792488.json\",\n \"title\": \"Como fa\xC3\xA7o para comprar um presente?\",\n \"body\": \"Lojas<br>Loja Virtual<br>Produtos com possibilidade de
<diegoviola> troca<br>Vale presente\",\n \"category_id\": \"0\",\n \"search_score\": 38.6152505875\n }\n ]\n}"
jwaldrip_ has quit [Ping timeout: 244 seconds]
<Ponyo> ew
<baweaver> One of the shortcomings of being loose with parens
<baweaver> diegoviola: put it in a gist
<diegoviola> how do I get only the body from there? because I need to gsub the hell out of that
<diegoviola> to extract some data from it
<undeadaedra> it looks like JSON data
jwaldrip_ has joined #ruby
<undeadaedra> you can JSON.parse
<baweaver> then it's just a hash
<diegoviola> well
<djellemah> >> :+.to_proc.call(2,3)
<ruboto> djellemah # => 5 (https://eval.in/383412)
<djellemah> >> '+'.to_proc.call(2,3)
<ruboto> djellemah # => undefined method `to_proc' for "+":String (NoMethodError) ...check link for more (https://eval.in/383413)
<baweaver> the point is it's binary
oo_ has joined #ruby
<diegoviola> I get this after I JSON.parse() ithttps://gist.github.com/diegoviola/57e33fb14b52182a5079
<diegoviola> I get this after I JSON.parse() it https://gist.github.com/diegoviola/57e33fb14b52182a5079
<baweaver> most functions you use &:name on are unary
mistnim has joined #ruby
<undeadaedra> diegoviola: you get a hash, so you can access all members of your result
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xiti has quit [Ping timeout: 264 seconds]
<baweaver> >> def plus(y) ->x{x+y} end; (1..5).map(&plus(2))
<ruboto> baweaver # => [3, 4, 5, 6, 7] (https://eval.in/383414)
<diegoviola> undeadaedra: so I have to do hash["results"].first to get teh first and so on?
<baweaver> Why don't you try and find out?
djdarkbeat has quit [Quit: djdarkbeat]
<baweaver> you already have it in a REPL
<diegoviola> right
jwaldrip_ has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
<mdw> hey guys, what is Rails going to do to improve scalability? It seems everyone is ditching Rails once they hit scale (was just reading Parse blog on how the moved to Go from Ruby/Rails). I love Rails when I'm working on side projects (easy to use, convention over configuration, etc) but I'm worried it's going to fade away from relevance if it doesn't address some things.
jwaldrip_ has joined #ruby
oo_ has quit [Ping timeout: 252 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
<jackjackdripper> I'm trying to parse long ass json returned by collins and within the json are some arrays I would like to sort the data in that array. so it will come to doing something like parsed["data"]["Data"][0]["ASSET"]["TAG"] I plan to just go through 0 to what ever until end if it returns nil. in which I get NoMethodError: undefined method `[]' for nil:NilClass. any way I can escape this?
<otherj> mdw, this is a pretty tired question
<otherj> mdw, if you can't scale rails you're doing it wrong
corehook has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<undeadaedra> ?rails mdw
<ruboto> mdw, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
jenrzzz has quit [Ping timeout: 245 seconds]
<otherj> he's not asking there because he knows he can't troll this there
mary5030 has joined #ruby
<mdw> otherj i'm not trolling
<mdw> and I don't think your response is very helpful to be honest
<centrx> mdw, "Everyone" is not ditching Rails for scalability
<centrx> mdw, The most common examples of this are giant Top 10 websites that typically use their own custom implementations of things anyway
<otherj> I'm not sure you should expect a "helpful" answer when you ask a trollish question and obviously without doing any research
kadoppe has quit [Ping timeout: 244 seconds]
<mdw> the truth many people are now moving away from Rails and personally I think it's a bit concerning. I've been following Elixir lang (I link Ruby syntax) and Phoenix promises to do what Rails can't.
<mdw> (I like*)
* otherj yawns
<centrx> There are a lot of unstated assumptions in what you're saying
swgillespie has joined #ruby
frem has joined #ruby
<undeadaedra> meh
sandstrom has joined #ruby
<mdw> well it seems the problem is the one-process per request nature of Rails
<mdw> and things like Eventmachine and JRuby have their own problems
<undeadaedra> wow
kadoppe has joined #ruby
<diegoviola> I don't want to have to do response["results"].first though
<undeadaedra> you don't have to
<Senjai> mdw: Really, I'm pretty sure a lot of people are moving to Rails
wallerdev has quit [Quit: wallerdev]
AlphaAtom has joined #ruby
<Senjai> Rails can be scaled just fine
<diegoviola> undeadaedra: how else do I get the "body" there
<diegoviola> then
ylla has quit [Ping timeout: 252 seconds]
<undeadaedra> depends on what you want to do
<Senjai> If you want websockets, don
<Senjai> don't use rails
<Senjai> Thats a given.
<diegoviola> undeadaedra: access the body from results
konieczkow has joined #ruby
<Senjai> You can have that built in a language meant to solve that problem
<Senjai> and use it with rails
Yiota has joined #ruby
<undeadaedra> Hashes and Arrays have plenty of methods to iterate and transform data, diegoviola
<mdw> Senjai I live in London, I don't see many Rails contracts (though I guess in the US it's different). I would like to see that change but businesses here want scalability.
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jphenow has quit [Quit: Be back later ...]
francois_ has joined #ruby
duderonomy has joined #ruby
aryaching_ is now known as aryaching
<mdw> Senjai yes, Phoenix does websockets much better than Rails
<diegoviola> undeadaedra: that makes sense
<Senjai> mdw: I dont know man, we have clients that are extremely large and operate just fine.
micmus has quit [Ping timeout: 265 seconds]
<Senjai> mdw: Yeah, but you dont need websockets. Very rarely.
dagda1 has joined #ruby
<Senjai> Unless you're developing like a game or something
cornytoad_ has quit []
Scroff has quit [Remote host closed the connection]
<undeadaedra> there's much more to scalability than just rails
ponga has quit [Quit: Connection closed for inactivity]
jphenow has joined #ruby
<mdw> (i'm a mobile app developer usually, and whenever I build side projects for API's I don't care much for the V in the MVC, I just want a headless API).
CorySimmons has joined #ruby
<havenwood> mdw: Take a look at Roda, it's lovely: http://roda.jeremyevans.net/
blackmesa has quit [Ping timeout: 265 seconds]
Scroff has joined #ruby
<undeadaedra> it's a complex topic, that just can't be discussed just by stating source-less statements and non real-cases
<LiquidInsect> you still have a view then... it's just json instead of html templates
<Senjai> mdw: A json rendering is still a view. also what undeadaedra said
<undeadaedra> and choosing a framework or language should not be just based on scalability, there's also other factors
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
<mdw> undeadaedra well scalability isn't why I chose specifically Rails, but I think it's a limitation which should be overcome and not ignored
<mdw> why not make Rails scale?
<Senjai> mdw: Maybe its just a limitation for you?
francois_ has quit [Ping timeout: 244 seconds]
<undeadaedra> ok bye
<Senjai> mdw: You sound like those mongodb proponents. Mysql isnt web scale, mongo is web scale, use mongo
<undeadaedra> ^
<miah> lollllllllllllllllllllllllllllllllllllllllllllllllllllllllll
dblessing has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
jwaldrip_ has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
roger_rabbit has joined #ruby
allomov has joined #ruby
aaeron has quit [Quit: Leaving.]
<havenwood> mdw: Here are some "Hello, World" benchmarks of a single route with various Rack adapters: https://github.com/luislavena/bench-micro#readme
<havenwood> mdw: Or 10, 100, 1000, 10000 routes: https://github.com/jeremyevans/r10k
sandstrom has quit [Quit: My computer has gone to sleep.]
* jhass calls the l factory, nightshift time
<undeadaedra> ?
<mdw> havenwood thanks
aaeron has joined #ruby
failshell has quit [Ping timeout: 265 seconds]
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
pdoherty has joined #ruby
Casty has joined #ruby
<flughafe1> top of the evening to you
episage has joined #ruby
flughafe1 is now known as flughafen_
Zai00 has quit [Ping timeout: 255 seconds]
<jhass> morning
* flughafen_ is tired
jwaldrip_ has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
alex88 has joined #ruby
corehook has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
serivich has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mdw> havenwood Roda looks great :-) thanks
rushed has quit [Quit: rushed]
mistnim has quit [Remote host closed the connection]
phreax_ has quit [Ping timeout: 255 seconds]
micmus has joined #ruby
Igorshp has joined #ruby
simplyianm has quit [Remote host closed the connection]
corehook has joined #ruby
otherj has quit [Quit: .]
jwaldrip_ has quit [Ping timeout: 264 seconds]
alex88 has quit [Ping timeout: 276 seconds]
jwaldrip_ has joined #ruby
nikhgupta has joined #ruby
momomomomo has joined #ruby
arup_r has joined #ruby
endash has joined #ruby
chussenot has quit [Quit: chussenot]
Kricir has quit [Remote host closed the connection]
nikhgupta has quit [Remote host closed the connection]
<mdw> havenwood this was the blog post that Parse made about moving from Rails to Go
<havenwood> mdw: They could have moved from Rails to Roda. I don't know why they're averse to deploying and tuning the JVM.
edwinvdgraaf has quit [Remote host closed the connection]
simplyianm has joined #ruby
dzejrou has quit [Read error: Connection reset by peer]
Scrofff has joined #ruby
jphenow has quit [Quit: Be back later ...]
<dukedave> I feel like there is a better way to express this, but my brain can't form it: `Array(options[:except]).any? { |o| o === self }`
mrmargol_ has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
Scroff has quit [Ping timeout: 250 seconds]
jphenow has joined #ruby
nikhgupta has joined #ruby
wallerdev has joined #ruby
jobewan has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lfox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> dukedave: === doesnt exist in ruby :P
<Senjai> At least I dont think it does
corehook has quit [Remote host closed the connection]
<Senjai> unless you define it
axl_ has quit [Ping timeout: 250 seconds]
<jhass> it does but we pretend it doesn't
dg-ratiodata has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
<Senjai> jhass: DEAR GOD
<jhass> it's for case/when and nothing else
<Senjai> dukedave: Array.wrap(option[:except]).detect {|x| x == self }
<Senjai> But that still weird code to write
<jhass> .wrap is activesupport
<Senjai> Oh
<Senjai> lol
axl_ has joined #ruby
<jhass> dukedave: I feel this lacks context, can you describe it in words?
<Senjai> ^
<Senjai> Or gist the code around it
mcclurmc has joined #ruby
<diegoviola> how I'm supposed to parse this json data? https://gist.github.com/diegoviola/477a246892b567ae9f3b I tried JSON.parse(res.body) and that gives me a hash with an array and a hash... I tried #each like h["results"].each { |x| x["body"] } but then the body comes as an array too
<diegoviola> and I need a string
<diegoviola> what I'm doing wrong here?
corehook has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<jhass> ?pry diegoviola
<ruboto> diegoviola, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
platzhirsch has joined #ruby
sharpmachine has joined #ruby
NightsKing has quit [Quit: WeeChat 1.0.1]
erts has joined #ruby
<jhass> what do you mean by "the body comes as an array too", how did you verify that claim?
DEA7TH has quit [Read error: Connection reset by peer]
corehook has quit [Remote host closed the connection]
<diegoviola> Oops, it's actually a string, I was wrong
Xiti has joined #ruby
<dukedave> jhass: sure! I want to say, is self 'included' options[:except], where 'included' has the same semantics as ===
<diegoviola> sorry about that
<jhass> dukedave: why === ?
renderfu_ has joined #ruby
k3asd` has joined #ruby
renderful has quit [Read error: Connection reset by peer]
renderful has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<dukedave> jhass: well I'm not sure what other method I'd use, other than passing in a Proc.
<dukedave> I think of === as 'does this belong in this bucket'
rubie has joined #ruby
<jhass> now I feel like I lack even more context
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> anyway, alternative, not necessarily superior, just equivalent: Array(options[:except]).grep(self).any?
<jhass> for any more recommendations provide any actual context
Xeago has quit [Remote host closed the connection]
DEA7TH has joined #ruby
arooni-mobile has joined #ruby
<jhass> hrm or did grep do arg === item, I don't even remember
shinnya has quit [Ping timeout: 265 seconds]
ogpastal_ has quit [Remote host closed the connection]
s2013 has joined #ruby
ogpastaling has joined #ruby
renderfu_ has quit [Ping timeout: 272 seconds]
InternetFriend has joined #ruby
<apeiros> jhass: yes, ary.grep(arg) is arg === item
rubie has quit [Ping timeout: 265 seconds]
<jhass> so nvm that
otherj has joined #ruby
gix has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
tvw has joined #ruby
ogpastaling has quit [Read error: Connection reset by peer]
juanpaucar has joined #ruby
ogpastaling has joined #ruby
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
nonparfumee has joined #ruby
momomomomo has quit [Quit: momomomomo]
Al3ks has joined #ruby
rjno has joined #ruby
wallerdev has quit [Quit: wallerdev]
Channel6 has joined #ruby
allomov has quit [Remote host closed the connection]
<jackjackdripper> how can I pass a variable when parsing a hash
gambl0re has quit [Excess Flood]
<jackjackdripper> say my hash has this structure
<jackjackdripper> parsed["data"]["Data"]["{#number}"]["ASSET"]["TAG"]
gambl0re has joined #ruby
nikhgupta has quit [Remote host closed the connection]
CorySimmons has quit [Quit: Bye!]
<jackjackdripper> #number is supposed to be an array
gix has joined #ruby
<jackjackdripper> i want to iterate and get all the tags in that array
troulouliou_dev has joined #ruby
<dukedave> jhass: I'm using it as a filter, where options[:except] lets you define the things to exclude
<Senjai> jackjackdripper: #{number}, not {#number}
allomov has joined #ruby
droidburgundy has quit [Remote host closed the connection]
AndroidLoverInSF has quit [Ping timeout: 256 seconds]
lfox has joined #ruby
<diegoviola> I can see the body as string when doing: h["results"].each { |x| p x["body"] } but how do I save this in a variable so I can gsub the body? sorry for the lame question
baweaver has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
nikhgupta has joined #ruby
<jhass> dukedave: yeah, as long as I have no clue what things is and what self is we're not getting anywhere
Xeago has quit [Remote host closed the connection]
AndroidLoverInSF has joined #ruby
baweaver has quit [Remote host closed the connection]
dopie has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
<dukedave> jhass: well I'm intentionally trying to be general, but my specific case is testing if something is a class
<diegoviola> any ideas?
simplyianm has joined #ruby
ixti has joined #ruby
<jhass> dukedave: then I'd strongly prefer .is_a? over using Module#===
<jhass> latter is for usage by case/when, .grep and similar
levifig has joined #ruby
<_blizzy_> this is stumping me really hard
mrmargol_ has joined #ruby
baweaver has quit [Remote host closed the connection]
<yorickpeterse> maloik: are pirate costumes still allowed at arrrrcamp?
psy_ has quit [Quit: Leaving]
<jhass> diegoviola: .map? .find? depends
<Senjai> dukedave: We also prefer duck typing against type checking
dopie has joined #ruby
krisquigley has joined #ruby
psy_ has joined #ruby
AlphaAtom has joined #ruby
<jackjackdripper> srry i'm getting syntax error I'm trying to essentially arrive to this parsed["data"]["Data"][0]["ASSET"]["TAG"] with this parsed["data"]["Data"][#{number}]["ASSET"]["TAG"]
<_blizzy_> I have an array, and the array has hashes. I'm trying to get the hash with the highest 'foo' value. https://gist.github.com/NotBlizzard/0538cb1bacca0d581765
<_blizzy_> IDK where to even start for this one
<jhass> jackjackdripper: drop the #{ } and all is well
starfox_sf has quit [Ping timeout: 244 seconds]
momomomomo has joined #ruby
<jhass> _blizzy_: .max_by
<yorickpeterse> I'm more a fan of goose typing myself
<yorickpeterse> badum tsh
<jhass> ?rimshot
phizzbuzz has quit [Read error: Connection reset by peer]
nikhgupta has quit [Remote host closed the connection]
rubie has joined #ruby
<dfockler> diegoviola: with map you can do the gsub in the map block
<yorickpeterse> jhass: noooo, that's not the right one
<dukedave> jhass: yeah, so I originally had `Array(options[:except]).include? self.class`, but that means you can only pass in classes to options[:except], and using is_a? has the same restriction.
<dukedave> By comparison if I use ===, then you can pass in a class and get the same behavior, or e.g. a string and get === as defined for strings (i.e. equality)
<diegoviola> dfockler: with #map I get a ["string string string string"]
nikhgupta has joined #ruby
<diegoviola> an array
<al2o3-cr> _blizzy_: a.max_by {|h| h[:foo] }
<dfockler> diegoviola: you've got a collection of items
<_blizzy_> al2o3-cr, jhass, thank you so much
<jhass> diegoviola: well, the json probably is an array because there can be more than one result, perhaps you should handle that?
<jackjackdripper> jhass thanks
simplyianm has quit [Read error: Connection reset by peer]
psy_ has quit [Client Quit]
<dukedave> But based on the confusion I'm causing, perhaps === just shouldn't be used for anything other than a case :)
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> shamelessly stolen from instantrimshot.com
<jhass> yorickpeterse: meh, too lazy
<diegoviola> jhass: hrm
mrmargolis has quit [Ping timeout: 272 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
droidburgundy has joined #ruby
droidburgundy has quit [Remote host closed the connection]
<dukedave> diegoviola: was that for someone else?
krisquigley has quit [Ping timeout: 244 seconds]
simplyianm has quit [Read error: Connection reset by peer]
<diegoviola> sorry, no, just not sure how to handle this
gambl0re has quit [Excess Flood]
<jhass> dukedave: *shrug* if it works for you it works for you, but maybe document that you use === for functionality there instead of style, for fellow developers sanity
simplyianm has joined #ruby
gambl0re has joined #ruby
<dukedave> jhass: yer, I'll just make it an explicit is_a?, rather than sacrifice sanity for generality. Thanks for your input !
vudew has quit [Ping timeout: 276 seconds]
<dfockler> diegoviola: not sure what you are wanting
bgmarx has quit [Remote host closed the connection]
<dfockler> you can do h["results"].map { |x| x["body"].gsub(...) }
bgmarx has joined #ruby
<al2o3-cr> diegoviola: body = h[:results].map {|x| x[:body] }.first.gsub(...) ?
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> diegoviola: body = ["ponies", "unicorns", "cats", "dogs"].sample ?
<centrx> One of these things is not like the other things
<jhass> I know, ponies aren't real
claw has joined #ruby
<dfockler> Unicorns are the only ones with a horn, that's the difference
fujimura has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<jhass> I should've included ponycorns
michaeldeol has quit [Ping timeout: 276 seconds]
serivich has quit [Ping timeout: 272 seconds]
nobitanobi has quit []
<yorickpeterse> > Submit CFP
<yorickpeterse> > Your bio
<yorickpeterse> fuck
<yorickpeterse> I suck at writing bios :<
ixti has quit [Ping timeout: 252 seconds]
<centrx> You're accepting proposals for your bio?
bgmarx has quit [Ping timeout: 265 seconds]
<yorickpeterse> hahah
<diegoviola> thanks
<yorickpeterse> Sure, go ahead
<apeiros> BIO: yorickpeterse, main ranter of #ruby. nuff said.
michaeldeol has joined #ruby
<yorickpeterse> haha
<yorickpeterse> well I did actually include that sorta in the bio
<yorickpeterse> "Yorick is a Ruby programmer from the sunny country of The Netherlands. During the day he works on APIs, web scraping, natural language processing and a lot more. During the night he mainly works on Rubinius and Oga (an XML/HTML parser for Ruby) and occasionally rants in the Ruby IRC channel."
dopie has joined #ruby
evanjs has joined #ruby
Guest25_ has quit [Ping timeout: 255 seconds]
<yorickpeterse> oooh, papercall.io has Vim mode
<jhass> you forgot to highlight your love to the web scaleability of MongoDB
<yorickpeterse> I like
hakunin_ has joined #ruby
<yorickpeterse> jhass: neg, that's behind us now
fujimura has quit [Ping timeout: 256 seconds]
<yorickpeterse> although I do still have one MongoDB cluster running :<
<yorickpeterse> which thankfully only has a tiny bit of fairly boring data
nifoc has joined #ruby
otherj has quit [Quit: .]
<yorickpeterse> bah, this Vim mode isn't actually Vim mode
<yorickpeterse> e.g. it doesn't recognize CTRL + {
<yorickpeterse> and it doesn't clearly show Visual mode
<yorickpeterse> 2/10 would not use again
hakunin has quit [Read error: Connection reset by peer]
<yorickpeterse> I'd actually throw a pile of money at somebody if they could make a Chromium extension that lets me edit text fields using $EDITOR
aaeron has quit [Quit: Leaving.]
galeido has joined #ruby
<yorickpeterse> I think the only one I ever found required some Node.js server running or something like that
quimrstorres has joined #ruby
rushed has joined #ruby
langlands has joined #ruby
nifoc has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
nifoc has joined #ruby
renderfu_ has joined #ruby
treehug88 has joined #ruby
renderful has quit [Ping timeout: 265 seconds]
x1337807x has joined #ruby
quimrstorres has quit [Ping timeout: 276 seconds]
nifoc has quit [Remote host closed the connection]
rcvalle has joined #ruby
francois_ has joined #ruby
nifoc has joined #ruby
fantazo has quit [Quit: Verlassend]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
aaeron has joined #ruby
aaeron has quit [Client Quit]
Scroff has joined #ruby
EllisTAA has joined #ruby
baweaver has joined #ruby
mdw has joined #ruby
rushed has quit [Quit: rushed]
EllisTAA has quit [Client Quit]
blazes816 has joined #ruby
francois_ has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
Scrofff has quit [Ping timeout: 252 seconds]
aaeron has joined #ruby
blackmes1 has joined #ruby
ZergCoder has joined #ruby
Scrofff has joined #ruby
<ZergCoder> This may be a stupid question, but can Ruby do everything Python can do and vice-versa?
baweaver has quit [Remote host closed the connection]
<bougyman> they're both general purpose programming languages.
<bougyman> so: sure.
<yorickpeterse> conceptually, probably
EllisTAA has joined #ruby
dblessing has joined #ruby
tcrypt has quit [Ping timeout: 276 seconds]
<joevandyk> if i have data = [{f: 2, g: 3}]; headers = {f: 1, g: 2}; x = []; headers.each { |k, v| x << data[k] }; does make a copy in memory of everything in data?
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has quit [Ping timeout: 272 seconds]
cabreraM516 has joined #ruby
<jhass> no
<jhass> btw better written with a .map
rushed has joined #ruby
NeverDie has joined #ruby
<ZergCoder> OK thanks bougyman and yorickpeterse
alexherbo2 has quit [Quit: WeeChat 1.2]
dopie has quit [Quit: This computer has gone to sleep]
<ZergCoder> I've gotten familiar with Ruby syntax for the most part and I wanted to start on a personal project
<ZergCoder> I wanted to try making something like this: http://www.kershner.org/scrape but with Ruby
momomomomo has quit [Quit: momomomomo]
dopie has joined #ruby
<bougyman> ok great.
platzhirsch has quit [Ping timeout: 244 seconds]
sharpmachine has joined #ruby
<ZergCoder> does anyone have any resources on learning web scraping with Ruby?
<ZergCoder> have any suggestions for*
nikhgupt has joined #ruby
<jhass> mechanize is a popular library for it
<dfockler> don't use regexs to parse XML
<jhass> searching for mechanize tutorials should yield a bunch of results
<ZergCoder> cool, thanks
nikhgupta has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
Scroff has joined #ruby
nifoc has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 255 seconds]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cabreraM516 has quit [Quit: Textual IRC Client: www.textualapp.com]
nifoc has joined #ruby
sharpmachine has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
sumark has quit [Remote host closed the connection]
ixti has joined #ruby
Scrofff has quit [Ping timeout: 276 seconds]
cabreraM516 has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
Scrofff has joined #ruby
sumark has joined #ruby
sharpmachine has joined #ruby
JoshL has quit []
jenrzzz has joined #ruby
Scroff has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
<ZergCoder> jhass: quick question
triangles has joined #ruby
rbennacer has joined #ruby
<ZergCoder> is making an image scraper like that difficult with vanilla ruby?
<BanzaiJoe> also searching for regex and parsing xml will get you into Dante's 3rd layer of hell
flughafen_ has quit [Ping timeout: 256 seconds]
rjno has quit [Remote host closed the connection]
wallerdev has joined #ruby
Scroff has joined #ruby
<centrx> ZergCoder, if by vanilla Ruby you include Nokogiri or Mechanize, no it's easy
<bougyman> nokogiri is anything but vanilla ruby
<jhass> ZergCoder: "difficult" is relative, it wouldn't be difficult for me I just wouldn't see why I'd need to make it harder than it could be by using a library
<ZergCoder> oh i meant without any libraries or frameworks
<jhass> there's nothing "impure" about using a library
arturhoo has quit [Quit: arturhoo]
cirn0 has quit [Remote host closed the connection]
<bougyman> ZergCoder: a scraper in python without using any libraries would not be any easier or harder, to go back to your initial query.
troulouliou_dev has quit [Quit: Leaving]
<centrx> Yeah not sure what the point of re-implementing everything is
Dreamer3 has quit [Read error: Connection reset by peer]
jxpx777 has quit [Read error: Connection reset by peer]
rjno has joined #ruby
<bougyman> you'd basically write mechanize, and write a parser, instead of using nokogiri and mechanize.
starfox_sf has joined #ruby
jwaldrip_ has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
<BanzaiJoe> crawl, then stand, then walk, then run, then fly, then invent spaceships
blackmes1 has quit [Read error: Connection reset by peer]
EllisTAA has quit [Quit: EllisTAA]
jwaldrip_ has joined #ruby
cirn0 has joined #ruby
deric_skibotn has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
<ZergCoder> I guess I'm just used to completely writing my projects from my own code so I feel like I get a good grasp of the language
<centrx> Does that include the standard library, do you have to reimplement HTTP and TCP too?
centrx has quit [Remote host closed the connection]
<ZergCoder> although my own projects have been pretty simple
Scrofff has quit [Ping timeout: 256 seconds]
premera has quit [Read error: Connection reset by peer]
<BanzaiJoe> ZergCoder there are many people writing or rewriting libraries so that the rest of us don't have to reinvent the wheel
centrx has joined #ruby
<ZergCoder> I see your guy's point
deric_skibotn has joined #ruby
x0f has quit [Ping timeout: 250 seconds]
bihi has quit [Ping timeout: 250 seconds]
<ZergCoder> guys'*
<jhass> *people ;)
premera has joined #ruby
blackmes1 has joined #ruby
<ZergCoder> or that
<ZergCoder> thanks all
<centrx> Robots be with you
<jhass> can rexml parse not well formed html? I never checked
ReK2 has quit [Remote host closed the connection]
oo___ has joined #ruby
dionysus69 has quit [Quit: dionysus69]
<yorickpeterse> No
<yorickpeterse> It can't parse HTML to begin with
Vile` has joined #ruby
sharpmachine has quit [Ping timeout: 267 seconds]
x0f has joined #ruby
<jhass> then there's really no point in doing it library less
preller_ has quit [Ping timeout: 250 seconds]
dudedudeman has quit [Ping timeout: 250 seconds]
<BanzaiJoe> is not well formed html still html... let me mount the meditating stone
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> jhass: *cough* https://github.com/YorickPeterse/oga *cough*
DEA7TH has quit [Read error: Connection reset by peer]
lfox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> yorickpeterse: does it integrate with mechanize yet? :P
<undeadaedra> mmh, did diegoviola told you he cross-posted his issues to #sinatra?
ReK2 has joined #ruby
<jhass> yes
bihi has joined #ruby
<yorickpeterse> jhass: No idea
<jhass> well, the API requests one
yfeldblum has joined #ruby
<BanzaiJoe> yorickpeterse you ever see David Baez video on metaprogramming in python 3?
<yorickpeterse> BanzaiJoe: No, I don't really follow the Python world
rbennacer has quit [Remote host closed the connection]
sharpmachine has joined #ruby
<yorickpeterse> I last wrote Python years ago
Rapier- has quit [Quit: (null)]
dudedudeman has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
oo___ has quit [Ping timeout: 252 seconds]
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
aapole has quit [Remote host closed the connection]
victortyau has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BanzaiJoe> he's been PyCon keynote several times, great speaker, he goes off the deep end, seriously, with metaprogramming, it's the kind of video that's great to put up during washing dishes ( https://www.youtube.com/watch?v=sPiWg5jSoZI&ab_channel=NextDayVideo ), it's 3 hours long, so little chucks at a time
<dfockler> what's a pull parser vs a regular parser?
<diegoviola> undeadaedra: sorry about that
<wasamasa> dfockler: guess it's about inversion of control
<jhass> yeah, a pull parser consumes as the user requests data
<undeadaedra> diegoviola: no worries
yardenbar has joined #ruby
<undeadaedra> found strange that the discussion moved, that's all :)
preller_ has joined #ruby
<wasamasa> the pull parser walks down and emits events you can make use of
<yorickpeterse> dfockler: in the case of a pull parser you usually have to advance the parsing process yourself, allowing you to process input as it comes in
<yorickpeterse> a regular parser parses the whole input and then gives you some sort of result based on it
moshee has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
<yorickpeterse> pull parsers typically use less memory because they (usually) don't keep anything around after they've processed a chunk
<wasamasa> or, hmm
<wasamasa> all this xml parsing is confusing the hell out of me
<yorickpeterse> :P
<wasamasa> it should only matter anyways if you're processing huge amounts
<jhass> wasamasa: no worries, have a JSON pull parser: https://github.com/manastech/crystal/blob/master/src/json/pull_parser.cr
Igorshp has quit [Remote host closed the connection]
<wasamasa> for a one-off parsing task just let your plain old parser return something tree-like you can then dissect as you wish
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dfockler> like processing a stream vs processing a discrete data set
rbennacer has joined #ruby
DEA7TH has joined #ruby
jlast has quit [Remote host closed the connection]
<yorickpeterse> the tl;dr is:
jlast has joined #ruby
<yorickpeterse> DOM: one big massive tree, typically easy to use at the cost of more memory usage
<yorickpeterse> SAX: do everything yourself, typically events are emitted for every node type and you have to construct everything manually. Costs more work, much lower memory usage, more control
<phat4life> what about react
<phat4life> virtual dom
<yorickpeterse> Pull parsing: sorta in the middle of the two. Not as heavy as DOM/tree parsing, not as lightweight as SAX parsing
<wasamasa> phat4life: that's got little to do with that
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> virtual dom = dom, no?
<yorickpeterse> phat4life: unrelated to parsing
<phat4life> gotcha
<Senjai> yorickpeterse: You know too much about parsing
<yorickpeterse> dfockler: typically SAX parsing is used when you want to process GBs of data
Alayde_ has joined #ruby
<undeadaedra> you can not know too much about parsing
<wasamasa> phat4life: it's a nice abstraction for frontend programming in a more declarative way
vudew has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> Senjai: I banged my head against a wall for this for the past year or so :P
sandstrom has joined #ruby
mdz_ has quit [Remote host closed the connection]
<phat4life> i wrote a tokenizer once
<dfockler> yorickpeterse: that makes sense, I'm reading through some of the Oga code
<phat4life> also trees are awesome
<Senjai> yorickpeterse: I will have to pick your brain on things sometime
<yorickpeterse> I still need to write stuff about LL(1) parsing, existing docs are _really_ bad on the subject
mdz_ has joined #ruby
<phat4life> there are all kinds of trees
<phat4life> red/black trees, quad trees
<yorickpeterse> oak trees
<phat4life> balanced trees
<yorickpeterse> :P
gianlucadv has quit [Ping timeout: 264 seconds]
<phat4life> i dont' have enough trees in my life :|
allomov has quit [Remote host closed the connection]
<yorickpeterse> Senjai: feel free to, I'm in here basically 24/7 anyway
sharpmachine has joined #ruby
<phat4life> have you ever recruited someone from irc (ive seen it happen in a different chanel)
Alayde has quit [Ping timeout: 272 seconds]
jlast has quit [Ping timeout: 252 seconds]
Igorshp has joined #ruby
baweaver has quit [Remote host closed the connection]
<yorickpeterse> I've asked people, but never managed to hire someone
slumos has joined #ruby
<yorickpeterse> they either flock to Soundcloud or INRA
<Senjai> phat4life: I was hired from IRC
* yorickpeterse looks sternly at ddfreyne
wildroman2 has quit [Ping timeout: 246 seconds]
<dfockler> yorickpeterse: :P So you have to write an Xpath parser before you can utilize xpath selectors?
<yorickpeterse> dfockler: If they're written in XPath, yes
<yorickpeterse> Because Ruby doesn't know what "/foo/bar[@x="y"]" means
allomov has joined #ruby
_djbkd has quit [Remote host closed the connection]
<dfockler> what does nokogiri do for that?
<ericmeds> simplecov is confusing - it’s showing like 90% coverage - i know that isn’t accurate
<jhass> dfockler: ask libxml2, which it is a binding to
yardenbar has quit [Quit: Leaving]
bruno- has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
_djbkd has joined #ruby
mdz_ has quit [Ping timeout: 276 seconds]
<yorickpeterse> dfockler: delegates all of it to libxml2
<phat4life> sweet who wants to hire me
<undeadaedra> ericmeds: look detailed results, it generates a html report
<yorickpeterse> They have a parser for CSS expressions
<dfockler> ah bummer
<yorickpeterse> they translate that to XPath and then delegate that again
<ericmeds> undeadaedra: yeah it includes the tests in the spec/ dir but shows a high percentage of coverage - is it evaulating the entire app code?
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<Senjai> phat4life: I would go contribute to an open source project in the industry you want to be in
fabrice31 has joined #ruby
<undeadaedra> ericmeds: code loaded after starting SimpleCov
<Senjai> phat4life: Also, feel free to poke CanCanCan >.> <.<
<phat4life> I have an amazing project i am working on already, however finishing it is difficult because it uses technologies i don't fully understand
<undeadaedra> ericmeds: so you should do the SimpleCov.start in your spec_helper
idafyaid has joined #ruby
<dfockler> yorickpeterse: do you think you'll split the xpath parser into another gem?
<ericmeds> yeah I added that
<undeadaedra> and load your code to test *after*
<phat4life> Senjai: i am working on a JS port of milkdrop to webgl
<ericmeds> something just doesnt seem right i dont think we have such great coverage
skade has joined #ruby
<undeadaedra> open the report and see
<phat4life> Senjai: webgl is amazing
<undeadaedra> simplecov report is well done
<ericmeds> do I need to set config.eager_load = true in /config/environments/test.rb
<Senjai> phat4life: Sure, except for the javascript part xD
<ericmeds> -/
<Senjai> phat4life: Wanting to work in browser games or?
<undeadaedra> ah, rails?
pdoherty has quit [Ping timeout: 244 seconds]
<ericmeds> yeah
<ericmeds> rails
<yorickpeterse> dfockler: no
<phat4life> Senjai: maybe
<phat4life> my ultimate goal is to freelance webgl
<yorickpeterse> people can yank the parser out of Oga if they want, but gemifying it will probably do me more harm than good
<phat4life> i might do some backend stuff with sinatra
nikhgupt has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<phat4life> for one of the projects, or slanger specifically
<undeadaedra> ericmeds: ask #RubyOnRails, they may know better.
allomov has quit [Ping timeout: 265 seconds]
senayar has joined #ruby
senayar has joined #ruby
<phat4life> do any of you use slanger?
<Senjai> phat4life: Just use rails
<phat4life> i need websocket
diegoviola has quit [Quit: WeeChat 1.2]
nikhgupta has joined #ruby
<Senjai> phat4life: use elixer or go
<Senjai> :P
<phat4life> rails is over kill
<Senjai> Would not recommend ruby for websockets
rushed has quit [Quit: rushed]
LMity has joined #ruby
<bougyman> i used EM::Websockets and it's been rock solid.
fabrice31 has quit [Ping timeout: 272 seconds]
<bougyman> up and running in a busy prod environment for 6 years.
<Senjai> bougyman: Not saying you cant :P
<Senjai> Just that there are better solutions for it
<bougyman> depending on one's definition of better.
<undeadaedra> ericmeds: when I did it, I put `SimpleCov.start 'rails'` in top of my spec_helper. See SimpleCov documentation, it may have a section for rails.
idafyaid has quit [Remote host closed the connection]
<shevy> now all that it takes is to have ruby instead of javascript
<c-c> Senjai: tell me more?
idafyaid has joined #ruby
<undeadaedra> shevy: opal is one step towards it
mrgrieves has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ericmeds> undeadaedra: i will check it out
idafyaid has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segfalt has quit [Quit: segfalt]
<phat4life> we use it slanger for websockets
quimrstorres has joined #ruby
<mrgrieves> hi, what can I do to print the digits on a string like this "application_name_anysize_1223"
<phat4life> and its currently broken, and i have no idea how to fix it :(
idafyaid has joined #ruby
<phat4life> well,, its rails -> slanger -> pusher
<Senjai> c-c: bougyman: The erlang VM is well suited to websockets, due to how it organizes erlang processes. Each process can have tons of processes, which is ideal for websockets.
Nieralyte has joined #ruby
tomphp has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<jhass> mrgrieves: print? you mean you have a string like that and want to extract a substring for the digits?
<c-c> Senjai: that makes 0 sense to me
<c-c> process that has many processes
<c-c> must be some erlang construct
<jhass> ?ot c-c Senjai bougyman
<ruboto> c-c, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<bougyman> jhass: my side ended a long time ago.
datanoise has joined #ruby
<yorickpeterse> c-c: in Erlang processes are more like coroutines with their own memory
<Senjai> jhass: aye, thats fine
<yorickpeterse> they're not Unix processes
<jhass> bougyman: sorry, have seen you highlighted in the conversation
<bougyman> no worries.
<bougyman> when it gets off-ruby I bail.
<Senjai> To be fair, it didnt go too far off
<Senjai> Use something else, like what?, why?
<Senjai> that's about how far that went
ldnunes has quit [Quit: Leaving]
<jhass> (I'm a bit aggressive about it atm, it's too empty ;P)
<Senjai> empty?
x1337807x has joined #ruby
quimrstorres has quit [Ping timeout: 264 seconds]
<jhass> #ruby-offtopic
<Senjai> Oh
<c-c> well, writing it in ruby get you donee faster, writing it in erlang makes it run faster
<mrgrieves> jhass: yes, extract the digits
<Senjai> c-c: Writing in elixer gets you done faster and makes it run faster
<yorickpeterse> Just use Ruby and use something else when you actually need it
Casty has joined #ruby
<jhass> mrgrieves: for your sample input, .split("_").last would suffice
<Senjai> c-c: Elixer sits on top of erlang
bootstrappm has quit [Quit: bootstrappm]
<yorickpeterse> instead of endless bikeshedding about "OMG USE THIS LANGUAGE BECAUSE WEBSCALE"
bootstrappm has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
<Senjai> yorickpeterse: That's way to occamz razor of you
<c-c> Senjai: is that a ruby interpreter?
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c> ok, nevermind, its scala for the erlang vm
_djbkd has quit [Remote host closed the connection]
<mrgrieves> what I want to do eventually is to have a hash which elements will be application_name_anysize => 1223
davedev24_ has quit [Ping timeout: 256 seconds]
<jhass> though I'd actually love to see all the "language X is so much better than Ruby [for Y]"-stuff in #ruby-offtopic instead of here, it's a bit much of it recently ;)
_djbkd has joined #ruby
<Senjai> jhass: We get it, your lonely :P
sepp2k has quit [Quit: Leaving.]
<Senjai> I still use ruby, for like, everything
<jhass> mrgrieves: always good to ask about your actual problem then, .map {|instance| instance.split(/_(?=\d)/) }.to_h
volty has joined #ruby
cabreraM516 has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
towski_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
starfox_sf has quit [Ping timeout: 256 seconds]
LMity has quit [Ping timeout: 252 seconds]
cirn0 has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
j_mcnally has joined #ruby
starfox_sf has joined #ruby
Guest25_ has joined #ruby
jenrzzz_ has quit [Client Quit]
Leef_ has joined #ruby
mrmargolis has joined #ruby
momomomomo has joined #ruby
nikhgupta has quit [Remote host closed the connection]
momomomomo has quit [Client Quit]
sharpmachine has quit [Ping timeout: 252 seconds]
nikhgupta has joined #ruby
michaeldeol has quit [Ping timeout: 265 seconds]
cabreraM516 has joined #ruby
momomomomo has joined #ruby
<episage> whats the best way to create storage class in ruby?
<jhass> what's a storage class?
<Senjai> episage: lol, storage class?
jenrzzz has quit [Quit: leaving]
aaeron has quit [Quit: Leaving.]
<episage> like i want to store some variables in 1 thing
<Senjai> sorry, the lol was rude, could you explain?
jphenow has quit [Quit: Be back later ...]
jenrzzz has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<episage> a number, string, string , string together
mrmargol_ has quit [Ping timeout: 244 seconds]
<episage> in 1 thing
<episage> (im new)
<Senjai> MyThing = Struct.new(:number, :string1, :string2, :string3)
<apeiros> episage: what make Array, Hash or Struct unsuitable?
vickleton has quit [Quit: Ex-Chat]
sharpmachine has joined #ruby
<episage> apeiros: yeah yeah i see
<episage> Senjai: thanks
bootstrappm has quit [Quit: bootstrappm]
<apeiros> episage: ah, or you're also asking for what exists - not just how to build your own?
jlast has joined #ruby
bootstrappm has joined #ruby
<episage> thats right
<episage> im very new
<episage> started today
<episage> :P
quimrstorres has joined #ruby
gregf has quit [Quit: WeeChat 1.1.1]
<Senjai> episage: Structs are handy for creating generic containers of data. But for objects that have behavior you could either inherit from a struct, or define a class normally
<apeiros> episage: ok. those 3 classes are standard container classes.
sohrab has quit [Quit: leaving]
<Senjai> Array and Hash is probably not recommended IMO, for what you described
<Senjai> Best give each "group" of that data a name
<Senjai> if they're related
<apeiros> episage: and Senjai said the rest :)
GPrime has joined #ruby
_ht has quit [Quit: Konversation terminated!]
<jhass> episage: to add, don't actually name things number, string1, string2 etc, try to describe what they represent
rodferso2 has quit [Quit: leaving]
<jhass> like first_name, last_name, age
<episage> ok
<Senjai> Aye in that case, it'd be proper to have Person
<Senjai> and a Person has a first_name, last_name, and a age
<episage> so should I use structs or classes if the 'thing' does not contain logic?
ndrei_ has quit [Ping timeout: 245 seconds]
<Senjai> You could, or not.
<Senjai> It's a good use case for structs
<Senjai> Adding logic though, I would suggest moving away from that.
<episage> Ok, I will go for structs then
renanoronfle has joined #ruby
<episage> thanks for advice :)
dopie has quit [Quit: This computer has gone to sleep]
Igorshp has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 245 seconds]
bronson has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
cabreraM516 has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
keernel has quit [Ping timeout: 276 seconds]
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby
mdw has joined #ruby
freerobby has quit [Quit: Leaving.]
renanoronfle has quit [Ping timeout: 244 seconds]
Guest78 has joined #ruby
krisquigley has joined #ruby
MatthewsFace has joined #ruby
keernel has joined #ruby
CamonZ has joined #ruby
platzhirsch has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
milesmatthias has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 250 seconds]
<undeadaedra> g'night
<Senjai> Love it when terrible factories are things
momomomomo has quit [Quit: momomomomo]
dagda1 has joined #ruby
pragmatism has joined #ruby
arooni-mobile has quit [Ping timeout: 256 seconds]
<lampd1> anyone familiar with sidekiq-status?
fujimura has joined #ruby
[H]unt3r has quit []
<Senjai> ?use
<ruboto> Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
<lampd1> wondering if there's a way to use a variable's value to store
<Senjai> come again
axl_ has quit [Quit: axl_]
<lampd1> i.e. instead of `store vino: 'veritas'` and having your retrieval key be vino; vino would = 1 and your key would be 1
towski_ has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
ylla has joined #ruby
rbennacer has quit [Remote host closed the connection]
<Senjai> IIRC sidekiq uses redis?
rbennacer has joined #ruby
<Senjai> I sitll dont understand your question
<lampd1> yeah; this is a sidekiq plugin
<Senjai> but you can play around with how redis allows you to store values
<lampd1> ugh
<lampd1> its not raw redis dude
<lampd1> which is _why_ i asked if anyone is familiar with sidekiq-status ;)
hectortrope has quit [Quit: WeeChat 0.4.2]
<Senjai> I dont understand any situation where you want 1 as a retreival key
<lampd1> i want to use the value of a variable as a retriveal key
<lampd1> so i can iterate over items and store them dynamically
fujimura has quit [Ping timeout: 276 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargol_ has joined #ruby
pragmati_ has joined #ruby
benanne has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
dopie has joined #ruby
milesmatthias has quit [Remote host closed the connection]
Scroff has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<Senjai> store variable.to_sym => value
bgmarx has joined #ruby
<Senjai> lampd1: Would that not work?
<Senjai> dont even need the to_sym, really
<lampd1> will try it
<lampd1> ty Senjai; been in C# land :P
decoponio has quit [Read error: Connection reset by peer]
pragmatism has quit [Ping timeout: 272 seconds]
rbennacer has quit [Remote host closed the connection]
decoponio has joined #ruby
<Senjai> lampd1: FYI, wasn't a sidekiq specific question ;)
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
rbennacer has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
rubie has quit [Remote host closed the connection]
allcentury has joined #ruby
ledestin has joined #ruby
michaeldeol has joined #ruby
Guest78 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest78 has joined #ruby
s2013 has joined #ruby
Guest78 has quit [Client Quit]
allcentury has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
DEA7TH has quit [Ping timeout: 256 seconds]
mrmargol_ has quit [Remote host closed the connection]
victortyau has quit [Quit: Leaving]
_djbkd has quit [Remote host closed the connection]
cirn0 has joined #ruby
simplyianm has quit [Remote host closed the connection]
_djbkd has joined #ruby
atomi has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
rubie has joined #ruby
devdazed has quit [Ping timeout: 256 seconds]
simplyianm has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mkosaki_ has joined #ruby
dostoyevsky has joined #ruby
edwinvdg_ has joined #ruby
bgmarx_ has joined #ruby
mkosaki has quit [Ping timeout: 256 seconds]
yqt has quit [Read error: Connection reset by peer]
yqt has joined #ruby
simplyianm has quit [Remote host closed the connection]
<dostoyevsky> someone send me a patch on github for my project, to support vagrant...
ts310 has joined #ruby
badhatter has quit [Remote host closed the connection]
atomi has joined #ruby
<baweaver> Curious, what do people think of Contracts for Ruby?: http://egonschiele.github.io/contracts.ruby/
<baweaver> Musing on using it for some things.
spyderman4g63 has quit []
simplyianm has joined #ruby
Azure has quit [Excess Flood]
<Senjai> baweaver: I havent used it.
edwinvdgraaf has quit [Ping timeout: 264 seconds]
Igorshp has joined #ruby
<Senjai> dostoyevsky: what
rbennacer has quit [Remote host closed the connection]
Azure has joined #ruby
<Senjai> baweaver: I'm not sure I would. I'd just write tests and yard documentation.
bgmarx has quit [Ping timeout: 272 seconds]
_djbkd has quit [Remote host closed the connection]
<baweaver> Oh I do already
<dostoyevsky> So, does anyone know about vagrant? Would it make sense to support that for something like a memdb?
<Senjai> dostoyevsky: Are you sure you're in the correct channel?
ZergCoder has quit [Remote host closed the connection]
<baweaver> About, yes, but you're going to have to do the legwork here.
<dostoyevsky> Senjai: I expected to join #ruby-lang
<baweaver> If you don't know enough about it to discern that, you haven't read into it enough
_djbkd has joined #ruby
<havenwood> dostoyevsky: A gem? Open source, I'm curious if you have a link?
<baweaver> besides, this is a devops topic
<havenwood> Or rather, if it's open source I'm curious.
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> dostoyevsky: Doesnt sound appropriate for there either
mrgrieves has quit [Quit: Lost terminal]
atomi has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
<dostoyevsky> someone send me a patch and I do not know what it's about
<dorei> can I use ConditionVariable outside a mutex.synchronize block?
<baweaver> re Contracts: just another layer of protection allowing for cleaner reasoning for QuickCheck type libraries.
<Senjai> baweaver: It's better than raising ArgumentError I suppose
<baweaver> Yeah, I've used enough Haskell to be fond of the idea
<baweaver> just curious on other thoughts.
atomi has joined #ruby
<Senjai> baweaver: But I wouldn't use it in an application I don't think. Given solid tests and yardoc, I wouldnt want to add another library for something like that
<baweaver> QuickCheck is amazing by the way, check it out if you haven't yet.
bootstrappm has left #ruby [#ruby]
rbennacer has joined #ruby
<ZOMGITSABEAR> guys
<baweaver> The big thing on that is that it kills off nil unless you explicitly allow it.
<ZOMGITSABEAR> vote trump!
<havenwood> ZOMGITSABEAR: #ruby-offtopic
<baweaver> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, zzak, Radar, Mon_Ouie, Havenn, jhass, sevenseacat, workmad3, miah, Coraline, drbrain, zenspider, Aria, rubyhacker1, slyphon, ljarvis
<Senjai> ?ot ZOMGITSABEAR
<ruboto> ZOMGITSABEAR, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<ZOMGITSABEAR> well then
<havenwood> ZOMGITSABEAR: No politics here please.
<ZOMGITSABEAR> i only brought it up because it was discussed here earlier
<ZOMGITSABEAR> my bad
<ZOMGITSABEAR> won't happen again
umgrosscol has quit [Quit: Quit]
AlphaAtom has joined #ruby
<baweaver> Trolls lurk on occasion, I don't tend to check history when something partially inflammatory is posted.
ts310 has quit [Quit: leaving]
moted has joined #ruby
<Senjai> ZOMGITSABEAR: It's a little different when theres an actual conversation going on or not.
AlphaAtom has quit [Max SendQ exceeded]
<volty> it seems that it depends on the time of the day (when you can discuss politics or not) :)
<ZOMGITSABEAR> ah, ok
<apeiros> volty: it does not. but ops don't always see
AlphaAtom has joined #ruby
<phat4life> just clevery inject politics in your ruby gists
<baweaver> I prefer to foldLeft
<dostoyevsky> do you know of any ruby gems that come with a Vagrantfile, is that common these days=
<dostoyevsky> ?
<havenwood> baweaver: ha
<phat4life> isn't inject just an alias for reduce though
vikaton has joined #ruby
<baweaver> which is the same as foldLeft in other languages, yeah
coffee__cup has joined #ruby
benanne has quit [Quit: kbai]
tkuchiki has joined #ruby
<Senjai> dostoyevsky: Idk, look. You're asking a lot of weird context lacking questions.
quimrstorres has quit [Remote host closed the connection]
<volty> apeiros: yes, distracted ops don't see :)
<volty> sometimes you inject, and sometimes you reduce, nice to have both names
<phat4life> it really should just be foldleft
<Senjai> Reduce is the correct term I think
gambl0re has quit [Ping timeout: 245 seconds]
<phat4life> foldleft is more precise
<havenwood> dostoyevsky: Hmm, I've seen vagrant boxes for projects, especially when there's complicated setup - but it's not at all a normal thing for a gem to include.
<phat4life> i think ocaml has fold right as well
<baweaver> you need lazy to really get mileage out of foldright
<Senjai> baweaver: why?
GPrime has joined #ruby
j_mcnally has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
icebourg has quit []
<volty> Senjai: it depends on what you do, on the result, there are occasions when you get as result (e.g) an array that could be much greater, or other structures
j_mcnally has quit [Client Quit]
<volty> when the result is a hash I prefer inject
<volty> (to call it)
<baweaver> it'll SO Scala real fast though
<dostoyevsky> I also see that some links to rubyforge.org are not working anymore...
mdw has quit [Read error: Connection reset by peer]
sharpmachine has quit [Read error: Connection reset by peer]
<vikaton> Opal needs to chnage its compilation target
<vikaton> to WebAssembly!
d10n-work has joined #ruby
<baweaver> Is that actually defined already or just a spec still?
<havenwood> dostoyevsky: rubyforge has been shut down for a little over a year
<havenwood> it is no more
<dostoyevsky> that one's still up though
<havenwood> err, odd
<havenwood> (That was 2014.)
<havenwood> 2013*
enebo has quit [Quit: enebo]
workmad3 has quit [Ping timeout: 256 seconds]
<havenwood> Posted in 2013 regarding May 2014
Leef_ has quit [Quit: Leaving]
hinbody has quit [Quit: leaving]
edwinvdg_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<dostoyevsky> yeah, strange... I wonder if I can retire my project somehow, remove it from the public gem repositories, because I think there are some problems with how I organized data back then
<baweaver> just make a major version change then
workmad3 has joined #ruby
<jhass> you can yank all versions but not delete it
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
_djbkd has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
lfox has joined #ruby
_djbkd has joined #ruby
simplyianm has quit [Remote host closed the connection]
jlast has joined #ruby
asteros has joined #ruby
sharpmachine has joined #ruby
starfox_sf has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> Do we need ban hammer or no?
<Senjai> Radar: Probably a formal warning?
mary5030 has quit [Remote host closed the connection]
renderful has joined #ruby
TvL2386 has quit [Remote host closed the connection]
rjno has quit []
workmad3 has quit [Ping timeout: 272 seconds]
rbennacer has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has quit [Ping timeout: 244 seconds]
* havenwood dons a tophat
<triangles> Is there anything special I need to do when rendering an ERB template that'll use Unicode characters? I get non-descriptive errors when trying to do it, and can't find any useful results on Google about it
renderfu_ has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
ZOMGITSABEAR has quit [Ping timeout: 252 seconds]
<baweaver> Radar: thought troll, apparently regular user I'd never seen continuing a topic that was potential flamebate with no context.
hakunin_ is now known as hakunin
bMalum has quit [Quit: bMalum]
<triangles> dostoyevsky: thanks man
musgravejw has quit [Ping timeout: 265 seconds]
drujensen has joined #ruby
nikhgupta has quit [Ping timeout: 272 seconds]
fgo has quit [Ping timeout: 250 seconds]
tkuchiki has quit [Remote host closed the connection]
mkosaki has joined #ruby
mkosaki_ has quit [Ping timeout: 264 seconds]
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
ogpastal_ has joined #ruby
<juanpaucar> Does anybody knows if there issomething like a read-only mode for active record?
starfox_sf has joined #ruby
Casty has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> juanpaucar: MyModel.where(thing: thing).readonly(true)
<Senjai> juanpaucar: Also, #rubyonrails
<baweaver> #RubyOnRails
<baweaver> gah, too slow again
<Senjai> baweaver: goml ;)
<juanpaucar> sorry guys, i couldn't find it before
<juanpaucar> but thanks
<juanpaucar> :)
qwertme has joined #ruby
tkuchiki has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has quit [Ping timeout: 276 seconds]
<dostoyevsky> are there more pure ruby job offers these days, or is still just rails?
MatthewsFace has quit [Remote host closed the connection]
ogpastaling has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby
MatthewsFace has joined #ruby
<Radar> dostoyevsky: Depends on where you're talking about.
<baweaver> Apple does some SysAdmin work in Ruby
<dorei> https://gist.github.com/egwspiti/6adaac61230cc2607eb3 is there a way to implement wait_ready without using sleep?
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mkosaki has quit [Ping timeout: 265 seconds]
<Senjai> dorei: I would assume without the sleep, the thread would be nonblocking and execute immediately, so waiting would have no effect
<baweaver> Javascript experience \o/
ogpastal_ has quit [Ping timeout: 265 seconds]
<dorei> senayar: is sleep the only way for the thread to block?
arescorpio has joined #ruby
neanderslob has joined #ruby
<Senjai> dorei: For this, yes, because the code executes so quickly
<jhass> dorei: not with a timeout in a thread safe way
<Senjai> dorei: You can do large file IO, wait on network connections, etc. Sleep is the easiest way to force a wait state
rbowlby_ has joined #ruby
<baweaver> You can
dmolina has joined #ruby
dmolina has quit [Client Quit]
<baweaver> Promises are just a cleaner way to do async type code in general
<jhass> well, for specific cases but a general solution...
drujensen has left #ruby [#ruby]
<jhass> dorei: timeout less wait would be with a ConditionVariable (or just joining the thread)
<dorei> so, sleeping and checking is the only way to see if a "result" is available?
drujensen has joined #ruby
<Senjai> dorei: Check first, start thread, Thread.join will block until that thread is done, check
MatthewsFace has quit [Ping timeout: 245 seconds]
<jhass> dorei: oh, actually ConditionVariable#wait takes a timeout
<jhass> dorei: so that would be better IMO
<dorei> can I use CondtionVariable outside mutex.synchronize block?
rbowlby has quit [Ping timeout: 245 seconds]
milesmatthias has joined #ruby
roolo has quit [Remote host closed the connection]
<jhass> signal yes, wait, no
lynx_eyes has joined #ruby
swgillespie has joined #ruby
<jhass> hence Monitor can be useful which packages both but is a bit slower since it's possibly reentrant
<dorei> Monitor ?
<jhass> yes, another class
<dorei> oh, let me check it
milesmat_ has joined #ruby
<dorei> i dont understand it :(
<havenwood> We should add to those docs...
<dorei> i dont want mutual exclusion, i want to be notified when a calculation is ready without having to do something sleep 1 and check if it's ready
<episage> hi folks
<havenwood> episage: hi
<Senjai> dorei: Thread.join on all threads you care about
<BanzaiJoe> juanpaucar there's ROM though I know that doesn't really answer your question
<Senjai> dorei: Thread.join will wait until all the threads you care about are finished
<episage> how to exclude a particular field in a struct from serialization to yaml?
<episage> SerpSnippet = Struct.new(:blue_text, :green_url, :description, :desc_normal, :desc_ad, :is_ad, :index_total, :index_normal, :index_ad, :web_element)
<dorei> senjai: maybe it doesnt finish after the calculation is done
<episage> I want to exclude :web_element
<Senjai> episage: override to_yaml
<Senjai> But I wouldnt suggest that
<Senjai> Instead I would define a method that would return the attributes you want to serialize
cirn0 has quit [Remote host closed the connection]
<Senjai> dorei: Well, then I would need a lot more context :P
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<episage> Senjai: Ok, I will try that
milesmatthias has quit [Ping timeout: 272 seconds]
lynx_eyes has quit [Quit: Leaving]
<dorei> it could be done with something like queue.pop on the thread that should wait, and queue.push on the thread that does the calculation
baweaver has quit [Remote host closed the connection]
<Senjai> dorei: You're starting to get into mailboxes
<Senjai> dorei: Use Celluloid
<jhass> dorei: sounds liek you want a promise indeed
fabrice31 has joined #ruby
milesmat_ has quit [Ping timeout: 256 seconds]
<Senjai> Which yes, is a type of promise
<shevy> anyone happens to know of a ruby alternative to the python youtube-dl? I need no fancy things, only the ability to download a video to local
<drbrain> shevy: I imagine JWZ's perl version is the best one
<Senjai> shevy: Nope, I wouldn't imagine the source is extensive though
francois_ has joined #ruby
<shevy> Senjai yeah I guess I could extract it
cirn0 has joined #ruby
<shevy> I just feel so lazy right now :-)
<drbrain> youtube adds lots of obfuscation to make downloading difficult
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dfockler> ^ yep
<al2o3-cr> ah shit load in fact
<Senjai> But it's just that, obfuscation
<dfockler> the last time I looked at doing that, they were loading the video in segments via AJAX
Xeago has joined #ruby
kaleido has joined #ruby
startupality has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
<volty> shevy's going to write YTUnobfuscate gem
Ropeney has joined #ruby
<Senjai> volty: soyouwanttoyoutubeeh.rb
<drbrain> I'd wrap the perl version in Process.spawn
<Senjai> drbrain: HAHAHA, yeah, thats the best solution
<al2o3-cr> shevy: heres a ruby wrapper against youtube-dl https://github.com/layer8x/youtube-dl.rb
jenrzzz has joined #ruby
<shevy> well that is useless
<shevy> in that case I can already use youtube-dl
<volty> Senjai: donotneedtubes.rb
Yiota has joined #ruby
kies has quit [Ping timeout: 252 seconds]
qwertme has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> shevy: fine.
francois_ has quit [Ping timeout: 264 seconds]
<shevy> al2o3-cr no worries I appreciate the gesture, I just wondered whether I could just use ruby without python
<Senjai> I wouldnt obfuscate it.
<volty> I'm fine with Firefox's download helper. If I needed to download something programatically I would have tried to command firefox
<Senjai> I would just be like NOSHITZGIVEN
<Senjai> volty: phantomjs? or selenium?
<al2o3-cr> shevy: np
* Senjai googles firefoxs download helper
<jhass> http://paste.mrzyx.de/pfzxy6y8n cheap promise just because I'm bored
Igorshp has quit [Remote host closed the connection]
dopie has quit [Quit: This computer has gone to sleep]
Igorshp has joined #ruby
swgillespie has joined #ruby
wallerdev has quit [Quit: wallerdev]
<Senjai> That paste site..
<volty> Senjai: thx a lot. I didn't know it existed.
Jarboe has joined #ruby
Igorshp has quit [Remote host closed the connection]
thomcom has joined #ruby
_blizzy_ has quit [Ping timeout: 256 seconds]
<Senjai> jhass: "cheap promise"
<Senjai> story of my life with you
<jhass> ;P
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty> can you also «click» on pages' elements (filtered) with selenium?
<Senjai> yes
<jhass> pretty much the entire point of it :P
<Senjai> volty: If you're curious. Look at the selenium driver for Capybara
<volty> that's wonderful. going to buy 5 more hd's
<volty> :)
<dorei> okie, futures is what i need, but what from what i understand, it's available only on Actor objects
sharpmachine has quit [Read error: Connection reset by peer]
<volty> Senjai: thx, I take a note to see it later.
<jhass> dorei: see my paste, no warranties though ;)
Xeago has quit [Ping timeout: 252 seconds]
<Senjai> dorei: Making any class an actor is very very easy
<Senjai> dorei: The celluloid wiki is kind of crappy, but its a VERY good library
<Senjai> if you stick with it
<dorei> jhass: thanx, i'll give it a try :)
startupality has quit [Quit: startupality]
<episage> Senjai: I actually decided to do: "WebSerpSnippet = SerpSnippet < Struct.new(:web_element)"
<episage> but it does not work
tkuchiki has quit [Remote host closed the connection]
<episage> it says ndefined method `new' for nil:NilClass (NoMethodError)
<episage> undefined*
danman has joined #ruby
Pupeno has quit [Remote host closed the connection]
<episage> is it possible to extend a stuct?
<jhass> episage: Remove " SerpSnippet <"
<Senjai> WebSerpSnippet < Struct.new
<Senjai> also
<jhass> wat
<Senjai> class WebSerpSnippet < Struct.new
<Senjai> sorry
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> that style is discouraged
<jhass> WebSerpSnippet = Struct.new
<episage> why?
mary5030 has joined #ruby
<jhass> you create a class you never use
<jhass> just to subclass it
<Senjai> jhass: I showed him the = before.
baweaver has joined #ruby
<Senjai> I've used class MyThing < Struct.new in certain scenarios, I don't think there is an issue with it
<jhass> probably not, it's just kinda useless
<jhass> Struct.new creates you a perfectly fine class
<Senjai> Depends, if you dont need to define #initialize, and you only need one or two... formatting methods or something
<Senjai> its totally fine
<jhass> and even takes a block that's instance_eval'd in it
<Senjai> oh sorry
<Senjai> right, the block approach
<episage> hmm but if I have "SerpSnippet = Struct.new(:blue_text)" and i want to exten this to have one extra field named "web_element"
<Senjai> kind of forgot about that
<episage> the WebSerpSnippet < Struct.new will dont do anything
<episage> i guess
sharpmachine has joined #ruby
<jhass> episage: probably not worth the inheritance, just WebSerpSnippet = Struct.new(:blue_text, :web_element)
<Senjai> Heading out
<Senjai> Night guys
<jhass> night
<episage> Senjai: cu, thanks for help
<volty> 'night
michael_mbp has quit [Excess Flood]
<episage> jhass: I actually shortened it. In real this is that long: SerpSnippet = Struct.new(:blue_text, :green_url, :description, :desc_normal, :desc_ad, :is_ad, :index_total, :index_normal, :index_ad)
blue_deref has joined #ruby
<episage> can you tell how to extend this?
<jhass> I'm not sure, why you need both?
<jhass> or how about composition?
quimrstorres has joined #ruby
<jhass> WebSnippet = Struct.new(:snippet, :element)
<jhass> WebSnippet.new(SerpSnippet.new(...), web_element)
<episage> I need the first to serialize it using YAML because when i serialize it with a web_element i get a lot of rubbish in output
michael_mbp has joined #ruby
asteros has quit [Quit: asteros]
<shevy> why isn't openstruct used more often?
<jhass> shevy: because it's slow as hell
simplyianm has joined #ruby
asteros has joined #ruby
<havenwood> shevy: slow, that's a lot of method missings
finisherr has joined #ruby
finisherr has quit [Client Quit]
<jhass> episage: would the composition approach I showed work for you?
<episage> jhass: im about to try it :)
<jhass> cool
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> ^ trying out did_you_mean gem
gambl0re has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
edwinvdg_ has joined #ruby
<havenwood> 'Matz hope to integrate "did_you_mean" gem to Ruby 2.3'
RickHull has joined #ruby
Akagi201 has quit [Remote host closed the connection]
quimrstorres has quit [Ping timeout: 245 seconds]
_djbkd has quit [Remote host closed the connection]
simplyianm has joined #ruby
drujensen has quit [Quit: drujensen]
krisquigley has joined #ruby
<RickHull> i'm having an issue with incomplete stack traces. when an exception is thrown in a gem i am using, i don't get any of that gem's stack trace. the topmost stack entry is the calling code, calling into the gem
<RickHull> incidentally, i authored that (private) gem
_djbkd has joined #ruby
<jhass> any backtrace shortening rails shenigans possible?
edwinvdgraaf has quit [Ping timeout: 245 seconds]
<RickHull> no
j_mcnally has joined #ruby
AndroidLoverInSF has quit [Ping timeout: 272 seconds]
<RickHull> the gem itself is tiny, a wrapper around fog
<jhass> does the issue appear in using fog directly?
j0n3 has quit [Quit: Leaving]
<RickHull> not that i've seen
vkgfx has joined #ruby
AndroidLoverInSF has joined #ruby
<RickHull> let me see if i can generate an exception in irb, requiring the gem
<vkgfx> hey i've got a question about monkey patching a class in a framework i'm working with (vagrant) if anyone has cycles to spare
veinofstars has quit [Quit: veinofstars]
<jhass> does it appear if you copy your gem to a application local directory (and possibly patch up $LOAD_PATH so it's found) ?
lfox has quit [Quit: Textual IRC Client: www.textualapp.com]
krisquigley has quit [Ping timeout: 246 seconds]
<RickHull> jhass: literally the .gem ?
<jhass> RickHull: the contents of the lib dir
<jhass> ?anyone vkgfx
<ruboto> vkgfx, Just ask your question, if anyone has or can, they will respond.
<jhass> though #vagrant might be your better bet
<vkgfx> i've tried in there but there aren't any developers atm
<vkgfx> let me make a gist of what i'm doing
<RickHull> jhass: in irb, i get the exception and proper stack trace both with and without -Ilib
danman has quit [Quit: danman]
<RickHull> and I can see from the stack trace that it is using the repo in the first case and the installed gem in the second
<vkgfx> vagrant executes shell commands from a provisioner by calling "sudo" in its communications object
<vkgfx> i want to overload sudo to fix an option
<vkgfx> vagrant detects an error that doesn't actually exists and shuts down
<vkgfx> there's currently no way to make it stop doing that and so after a few days of this i'm ready to just monkey patch it out
<vkgfx> except i did that and it didn't change the communicator class
_blizzy_ has joined #ruby
<jhass> RickHull: in the app with the problem, I'd rescue the exception and but a binding.pry into the rescue clause, then explore the exception, whether it's somehow a proxy (obj.class === obj == false), has things monkey patched (.method(:backtrace).source_location) etc.
<vkgfx> i should point out that sudo is not a real method, it's an alias to the execute method
<jhass> *put
<RickHull> jhass: oh, in the calling code, it does require 'activesupport/inflector'
<RickHull> i can repro this in the calling code, but not irb
<RickHull> so i am narrowing down the calling code
erts has quit [Quit: erts]
triangles has quit [Quit: Leaving]
idafyaid has quit [Ping timeout: 264 seconds]
<jhass> vkgfx: alias or alias_method?
<vkgfx> let me check
<RickHull> jhass: the calling code is ultimately `rake`
<RickHull> i think that is related
<vkgfx> alias_method
<jhass> RickHull: might be, what I said above should help in finding the offender regardless
<RickHull> the Rakefile requires a lot of lib files, and the one lib file that I can repro the error with
<RickHull> it repros when called via `rake`
fujimura has joined #ruby
<RickHull> but not ruby lib/foo.rb
wallerdev has joined #ruby
<jhass> vkgfx: alias_method copies the target, it doesn't delegate and it doesn't truly alias
<vkgfx> hmm ok
<jhass> vkgfx: so override execute and recall alias_method to catch all
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> ?pry RickHull
<ruboto> RickHull, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<jhass> seriously, give it a try
<vkgfx> jhass: thanks i'll try it out
blackmes1 has quit [Quit: WeeChat 1.2]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Quit: leaving]
jenrzzz has joined #ruby
<RickHull> jhass: looks like a rake "feature" from here. I have a two line Rakefile, require 'my-gem'; MyGem.some_method(:bad_arg)
<RickHull> rake -T, and the exception is thrown with bad stack trace
<jhass> RickHull: --trace ?
<RickHull> aha
<episage> jhass: works!
<jhass> episage: great
<episage> I've got another question
<jhass> episage: composition is to prefer over inheritance anyway ;)
<episage> class GCrawler < Struct.new(:serp)
<RickHull> jhass: nailed it, thanks
<jhass> GCrawler = Struct.new(:serp) you mean
<episage> how can I use the :serp inside GCrawler class?
Al3ks has quit [Read error: Connection reset by peer]
<jhass> episage: if you got logic and a single attribute, just forget about Struct for that instance
<episage> I mean new class with extra field
podman has joined #ruby
<jhass> class GCrawler
fujimura has quit [Ping timeout: 265 seconds]
<jhass> def initialize(serp)
_blizzy_ has quit [Ping timeout: 256 seconds]
<jhass> @serp = serp
<episage> hold on
<jhass> end
<jhass> end
<episage> serp gets updated as I call methods in GCrawler
<episage> so I should keep it updated and accessible to world
<vkgfx> jhass: that's not doing it. i get the feeling that it's not overwriting anything in the "real" communicator class that's running
<vkgfx> maybe there's some fundamental misunderstanding i have about how vagrant fits together, because i've done some patching before and this just doesn't work
<jhass> vkgfx: perhaps load order issues? your patch being loaded first?
<jhass> or vagrant actually invoking itself so the process doesn't even see your patch?
<vkgfx> i'm not certain. the only helpful discussion i've found of this is here: https://stackoverflow.com/questions/27572392/monkeypatching-vagrant-plugin
<episage> jhass: i think u answered that acually :)
<jhass> that's definitely getting into #vagrant territory here :/
<vkgfx> yeah
<jhass> sometimes it just means hanging out 24-48h on a channel
<jhass> repeating the question every 6-12h
<vkgfx> one other hope i have is using the vagrant plugin that connects to a domain (what i'm doing with my provision script) and monkey patching it
AndroidLoverInSF has quit [Ping timeout: 255 seconds]
jpfuentes2 has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cirn0 has quit [Remote host closed the connection]
jpfuentes2 has quit [Client Quit]
cirn0 has joined #ruby
mary5030 has quit [Remote host closed the connection]
thomcom has quit [Quit: Textual IRC Client: www.textualapp.com]
rcvalle has quit [Quit: rcvalle]
renderful has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
GPrime has joined #ruby
theery has quit [Remote host closed the connection]
GPrime has quit [Client Quit]
davec_ has quit [Ping timeout: 250 seconds]
cirn0 has quit [Client Quit]
andywojo has joined #ruby
dfockler has quit []
quazimodo has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
bricker has quit [Ping timeout: 252 seconds]