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/
robbyoconnor has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
bricker has joined #ruby
baweaver has quit [Remote host closed the connection]
Nieralyte has quit [Quit: Nieralyte]
jwaldrip_ has quit [Quit: Be back later ...]
_blizzy_ has joined #ruby
sharpmachine has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
RegulationD has quit [Remote host closed the connection]
<episage> lol :)
<episage> how to execute a method in ruby which from inside the class?
<episage> @parse_serp does not work
<RickHull> the @ indicates an ivar, a variable not a method
bronson has quit [Remote host closed the connection]
rbowlby_ has quit [Remote host closed the connection]
baweaver has joined #ruby
<episage> RickHull: so it must be w/o @
<episage> yeah, works now
senayar has quit []
<episage> so cool
code1o6 has quit [Read error: Connection reset by peer]
<episage> ruby is cool
<episage> <3
cabreraM516 has joined #ruby
cabreraM516 has quit [Client Quit]
saadq has joined #ruby
baweaver has quit [Remote host closed the connection]
cabreraM516 has joined #ruby
bkxd has joined #ruby
pragmati_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
cndiv has quit []
bgmarx_ has quit [Remote host closed the connection]
rbowlby has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
sandstrom has quit [Quit: My computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
davec_ has joined #ruby
cabreraM516 has quit [Client Quit]
jpfuentes2 has joined #ruby
fgo has joined #ruby
Guest25_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbowlby_ has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GitGud has joined #ruby
GitGud has quit [Changing host]
GitGud has joined #ruby
rbowlby has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 256 seconds]
bricker has quit [Quit: leaving]
<andywojo> Does anyone use ruby not for rails / web, but purely as a sysadmin tool for automation / scripts?
<andywojo> I do
pontiki has joined #ruby
<andywojo> It's awesome.
<mozzarella> I use it primarily for scripts
<mozzarella> but I must admit that I've used rails a few times
<mozzarella> I don't like webdev though
growlove has joined #ruby
<pontiki> you don't like moving and displaying data?
workmad3 has joined #ruby
<mozzarella> no
stardiviner has quit [Ping timeout: 256 seconds]
<miah> i only use ruby for sysadmin / script / tools kinda stuff.
<pontiki> good choice :)
<episage> how to conver struct to CSV file?
_djbkd has quit [Remote host closed the connection]
<volty> andy I can't imagine something better than Ruby for sysadmin. There's a book around, google (or emule, or torrent)
asteros has quit [Quit: asteros]
<episage> emule still lives?
<episage> jezzz
<episage> its soooo oldd
<episage> DC++
<episage> Kazaa
<pontiki> volty: the awesome command line one?
<miah> i used to have that 'ruby for sysadmins' book; it was alright. i think that 'working with unix processes' was better though
ayonkhan has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
charliesome has joined #ruby
davec_ has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<volty> pontiki: are you asking about the book's name (sorry, I am quite fuzzy) ?
saadq has quit [Remote host closed the connection]
<pontiki> yeah, i can't think of the full title
quimrstorres has joined #ruby
AndroidLoverInSF has joined #ruby
GitGud has quit [Ping timeout: 245 seconds]
snockerton has quit [Quit: Leaving.]
<volty> «Everyday scripting with Ruby», Pragmatic programmers
<pontiki> "build awesome command line applications in ruby" dave copeland
shazaum_ has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
marr has quit [Ping timeout: 255 seconds]
<volty> file:///home/volty/_links/books/prog/ruby/pdf/Ruby for System Administration, Apress (2007).pdf
<volty> (though the link won't work :) )
x1337807x has joined #ruby
<pontiki> that looks like it would be good intro, too
robustus has quit [Ping timeout: 255 seconds]
theery has joined #ruby
quimrstorres has quit [Ping timeout: 246 seconds]
<miah> ah ya, everyday scripting. it was better than the practical systems admin w/ ruby book
theery has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
juanpaucar has quit [Remote host closed the connection]
simplyianm has quit [Read error: Connection reset by peer]
theery has joined #ruby
<volty> pity I know enough (for what I need) and won't read them. Though I read something and if I remember well miah is right
<miah> build awesome command line apps was alright too.
robustus|Off has joined #ruby
robustus|Off is now known as robustus
<pontiki> everyone seems to want to learn rails (which i don't mind so much) but a book like that, about learning ruby to solve your own problems, i think is a much better into to the language
simplyianm has joined #ruby
<miah> agreed
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 276 seconds]
<volty> pontiki: absolutely !
<andywojo> I'm really awesome at ruby sysadmin type scripts, like I've done some pretty gnarly automation working with large datasets and complex stuff but... I cannot for the life of me wrap my head around rails / webdev
pragmatism has joined #ruby
<pontiki> learning how to systematically and *practically* solve problems is the essence of programming and the craft of software, to me
<miah> i have written a bunch of nagios/sensu checks. started out with mixlib-shellout and such but i've learned option parser pretty well now
CloCkWeRX has joined #ruby
<pontiki> yeah
<miah> thor is neat too, used that a few times
<volty> so many people think that programming could be learn the way they learned their phones, touching & clicking
<pontiki> i've been using thor a lot lately
<volty> learned
<miah> but option parser is stdlib so its easy to grab
<pontiki> it is
<pontiki> just basically good to know
<miah> ya
<pontiki> copeland
<pontiki> oops
<pontiki> copeland's gems are kinda nifty, too, but i've moved away from them
cabreraM516 has joined #ruby
<miah> which ones?
<pontiki> methadone and GLI
<miah> oh i used gli while reading the book
<miah> but never again
BanzaiJoe has quit [Ping timeout: 265 seconds]
<pontiki> for the scripts i've done that are that multi-command thing, i like thor better
<miah> i usually just 'bundle gem <foo>' and work from there
stardiviner has joined #ruby
<miah> otherwise methadone looks neat
<miah> i am hacking some ldap management tools, have a ton of cli options and environment variables to deal with
cabreraM516 has quit [Client Quit]
* pontiki nods
<miah> been hard to be... concise? with option parser
<pontiki> i decided methadone put too much emphasis on testing via the command line
<miah> ah
<miah> i just write units with minitest
oo___ has joined #ruby
<pontiki> right
<miah> argv is just an array, easy to pass in what you want without actually having to ./foo.rb
<pontiki> yep
<episage> Is it possible to convert a struct to an array?
<pontiki> if you write a to_a method for it
<volty> everything could be converted to an array
<episage> ok but there is no automatic mechanism so i have to write to_a as pontiki sugessted
<pontiki> there's already one in the Struct class, if you just want the instance vars, you should be set
fujimura has joined #ruby
mcclurmc_ has joined #ruby
nietzschette has joined #ruby
<pontiki> a hash seems more useful than an array, tho
<miah> ya
duderonomy has joined #ruby
mcclurmc has quit [Ping timeout: 264 seconds]
milesmatthias has joined #ruby
theery has quit [Remote host closed the connection]
<volty> if you need the keys
<nietzschette> I usually just use numbers to identify, so I don't really need hashes
<miah> interesting
pyon has joined #ruby
<pontiki> how are you creating the Struct?
milesmatthias has quit [Remote host closed the connection]
wallerdev has joined #ruby
simplyianm has quit [Remote host closed the connection]
<nietzschette> with great ambiguity
amclain has joined #ruby
fujimura has quit [Ping timeout: 250 seconds]
Akagi201 has joined #ruby
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
nietzschette has left #ruby ["Leaving"]
volty has quit [Quit: Konversation terminated!]
jenrzzz has joined #ruby
rhizome has quit [Quit: Lost terminal]
dstarh has joined #ruby
blackmesa has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
endash has quit [Quit: endash]
drewo has quit [Ping timeout: 256 seconds]
blonde_19f_cali is now known as apoplexy
<episage> miah: pontiki : thanks guys, you saved a lot of my time :) <33
LMity has joined #ruby
keernel has quit [Quit: Leaving.]
Lucky__ has joined #ruby
Lucky__ has quit [Client Quit]
allomov has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
musgravejw has joined #ruby
lkba has joined #ruby
fabrice31 has joined #ruby
jenrzzz has joined #ruby
simplyianm has joined #ruby
lkba_ has quit [Ping timeout: 272 seconds]
allomov has quit [Ping timeout: 244 seconds]
swills has joined #ruby
rbowlby_ has quit [Remote host closed the connection]
x1337807x has quit [Ping timeout: 265 seconds]
mary5030 has quit [Ping timeout: 256 seconds]
Lucky__ has joined #ruby
bronson has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
Cust0sLim3n has quit [Max SendQ exceeded]
rubie has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
rubie has joined #ruby
Cust0sLim3n has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<episage> how to disable printing "UTC" in Time.now.utc?
<episage> (at the end)
hahuang65 has quit [Ping timeout: 265 seconds]
coffee__cup has quit [Quit: Leaving]
datanoise has quit [Ping timeout: 276 seconds]
BanzaiJoe has joined #ruby
sharpmachine has joined #ruby
_whitelogger has joined #ruby
<al2o3-cr> hmm, quite a bit faster :)
<BanzaiJoe> lol, did the double fist pump for victory, then realized I forgot what I was trying to do
nahtnam has joined #ruby
episage has quit [Remote host closed the connection]
<al2o3-cr> :D
quimrstorres has quit [Ping timeout: 272 seconds]
pyon is now known as lptm
* al2o3-cr gotta start using tr
<miah> check this out
dstarh has quit [Read error: Connection reset by peer]
fgo has joined #ruby
nofxx has joined #ruby
<al2o3-cr> miah: awesome :)
bruno- has quit [Ping timeout: 252 seconds]
drewo has joined #ruby
veinofstars has joined #ruby
<postmodern> why am i getting uninitialized constant JSON::Iconv
<postmodern> with the json gem 0.4.3
blazes816 has quit [Remote host closed the connection]
<postmodern> under ruby-2.1.6
<miah> no idea
<al2o3-cr> because it doesn't exist?
<BanzaiJoe> I'm cornfused.....
<BanzaiJoe> Time.at(someNumber) is class Time. Assign it to a variable -> class Time
rubie has quit [Ping timeout: 265 seconds]
<BanzaiJoe> add a variable of Time to Time.at(someNumber) get type error.... I'm innocent , go easy on me
<postmodern> miah, al2o3-cr, http://pastebin.com/Q36UWj4J
<ruboto> postmodern, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8e56e087758b553f78b6
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
rubie has joined #ruby
<BanzaiJoe> >> a = Time.at(100); a + Time.at(777);
<ruboto> BanzaiJoe # => time + time? (TypeError) ...check link for more (https://eval.in/383467)
<BanzaiJoe> what am I thinking incorrectly?
<shevy> yes
<mozzarella> time != duration
<miah> isnt that a wicked old version? 0.4.3 is from 2007?
<shevy> now = Time.now # => 2015-06-18 03:39:40 +0200
<mozzarella> doesn't make sense to add two times together
<shevy> now + 5 # => 2015-06-18 03:39:45 +0200
<shevy> we added 5 seconds
<shevy> to a class Time object
<BanzaiJoe> ahhhhhh, gotcha, thank you
<miah> 0.4.3 isn't even tagged in json github
<shevy> but if we add now + now
<shevy> we will get "TypeError: time + time?"
<BanzaiJoe> my brain is still recovering
<BanzaiJoe> let's not add now + now ;)
<shevy> hmm there must be some way to convert this into seconds
fgo has quit [Ping timeout: 276 seconds]
<shevy> .to_i perhaps?
<Aeyrix> I can't tell if you're doing incremental teaching
<shevy> or perhaps not, I have no idea
<Aeyrix> or if you're actually asking a question
<Aeyrix> because to_i is what you want
<Aeyrix> it converts time to a unix timestamp
<shevy> I am extending our collective minds Aeyrix
<Aeyrix> which is seconds since Jan 1 1970
<Aeyrix> oh ok
<shevy> we are like the BORG now
<BanzaiJoe> you can Time.mktime and subtract it
<shevy> see? ^^^ he is becoming smarter and smarter by the second
<shevy> soon he will teach us
<BanzaiJoe> ba-doomp-doomp
renderfu_ has joined #ruby
drewo has quit [Ping timeout: 256 seconds]
<shevy> I need some way to assess how many non-bots download gems
<shevy> would it be logical to assume that if you add a gem that states "useless for others", 30.000 downloads would happen
<eam> a much harder challenge is to figure out how to do a time delta with subsecond precision, without losing precision
milesmatthias has joined #ruby
Agoldfish has quit [Quit: G'Bye]
<eam> I'm not sure if Time can do it
<eam> ah yes it can
dorei has quit []
<elektronaut> yeah, it takes floats
<eam> elektronaut: floats can't do it
<eam> it'll take two separate subtractions
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
<eam> if you use floats for time intervals you'll quickly notice that the times don't add up
renderfu_ has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
msnyon has quit [Quit: Textual IRC Client: www.textualapp.com]
dgutierrez1287 has joined #ruby
drewo has joined #ruby
<pontiki> Time, the Avenger
<eam> >> t = Time.now;sleep 0.1; t2 = Time.now; sec_delta, nsec_delta = t2.sec - t.sec, t2.nsec - t.nsec
<ruboto> eam # => [0, 100470638] (https://eval.in/383471)
milesmatthias has quit [Ping timeout: 245 seconds]
<eam> lots of time values which are valid as absolute nsec, but not valid as base 2 fractions of 1 sec
drdave has joined #ruby
fgo has joined #ruby
drdave has quit [Client Quit]
drdave has joined #ruby
<eam> oh, actually #sec doesn't give you time_t so that won't even do it, uhhhh
<eam> I guess you use t.to_i and t.nsec
<eam> that's somewhat incongruent
BanzaiJoe has quit [Ping timeout: 252 seconds]
<elektronaut> yeah
dgutierrez1287 has quit [Remote host closed the connection]
<eam> ah it's got tv_sec and tv_usec for the direct timeval values -- that's what you need
rubie has quit [Ping timeout: 265 seconds]
rubie has joined #ruby
RegulationD has joined #ruby
darkf has joined #ruby
s2013 has joined #ruby
growlove has quit [Quit: Leaving]
ixti has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
wallerdev has quit [Ping timeout: 256 seconds]
NeverDie has joined #ruby
NeverDie has quit [Max SendQ exceeded]
larrylv has joined #ruby
NeverDie has joined #ruby
larrylv has left #ruby [#ruby]
Spami has quit [Quit: This computer has gone to sleep]
dgutierrez1287 has joined #ruby
laurentide has joined #ruby
arya_ has joined #ruby
arya_ has quit [Client Quit]
penzur has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
eggoez has quit [Ping timeout: 265 seconds]
<drdave> does anyone know of an alternative to rplot to do basic graphic in ruby?
<drdave> something that would preferably also use libplot or have a very similar syntax?
workmad3 has joined #ruby
<drdave> trying to get an old codebase running and have to give up on trying to install rplot…
datanoise has joined #ruby
andywojo has quit [Read error: Connection reset by peer]
balazs has joined #ruby
x1337807x has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
nfk has quit [Quit: yawn]
<RickHull> https://packages.debian.org/jessie/ruby-gsl # might be interesting
<drdave> RickHull: rplot is the one used by the code...
<drdave> but it seems terminally broken...
sharpmachine has joined #ruby
<drdave> or more exactly, the install is...
<drdave> i spent a while trying to figure why it wasn’t detecting the lib and i’m about to give up
yqt has quit [Ping timeout: 246 seconds]
<RickHull> did you install the prereqs?
<drdave> i’ll have a look at ruby-gsl, but i’m afraid it’s more science functions than graphics...
eggoez has joined #ruby
<drdave> oh, i did… but for whatever reason, it just won’t find them… looked at the extconf.rb and it is definitely looking at the right lib dir
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drdave> i’m starting to suspect that the routine it is looking for might not even exist any more (libplot doc tells me it is legacy but still provided…)
jpfuentes2 has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
hahuang65 has joined #ruby
j4cknewt has joined #ruby
hahuang65 has quit [Client Quit]
jwaldrip_ has joined #ruby
hahuang65 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
fujimura has joined #ruby
quimrstorres has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
A205B064 has joined #ruby
oo_ has quit [Remote host closed the connection]
spacemud has quit [Quit: ZNC - http://znc.in]
ramfjord has quit [Ping timeout: 265 seconds]
nateberkope has quit [Quit: Leaving...]
ItSANg___ has joined #ruby
sdwrage has joined #ruby
fujimura has quit [Ping timeout: 264 seconds]
quimrstorres has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
jtdoncas has joined #ruby
ItSANgo has quit [Ping timeout: 265 seconds]
ItSANg___ has quit [Max SendQ exceeded]
ItSANgo has joined #ruby
datanoise has quit [Ping timeout: 276 seconds]
ayonkhan has quit []
ItSANgo has quit [Max SendQ exceeded]
Volsus has quit [Ping timeout: 265 seconds]
ItSANgo has joined #ruby
Volsus has joined #ruby
deric_skibotn has quit [Ping timeout: 252 seconds]
ItSANgo has quit [Max SendQ exceeded]
ItSANgo has joined #ruby
kahuna_ has joined #ruby
kLooaa has joined #ruby
<kLooaa> Do you realize that basically after age 20 your body starts rotting, being worse and worser at everything? and that includes your brain too? you will eventually be stupid and naive just like children. or worse - you can get alzheimer's disease. If you are alive now, I guarantee you that you will die eventually. And it can be really painful dying. Just read news or statistics how many people die in what ways DAILY. You will become one of them eventually. One
<kLooaa> of that statistics number. nothing more.
platzhirsch has left #ruby [#ruby]
<kahuna_> kLooaa: dont you think that's looking at the cup as half empty?
<kLooaa> kahuna_: thats looking at reality
<kLooaa> without purple glasses on
<kahuna_> kLooaa: reality is how you precieve it
<kLooaa> I perceive it without FILTERS and brainwashing
<kLooaa> im external oberver
<kahuna_> ok
<kLooaa> and I look at people, they suffer
<RickHull> brainwashing prevents alzheimers. you just gotta hose it down every once in a while
<kahuna_> And others enjoy an incredible life
drewo has quit [Ping timeout: 276 seconds]
ItSANgo has quit [Max SendQ exceeded]
francoi__ has joined #ruby
shazaum_ has quit [Quit: Leaving]
jwaldrip_ has quit [Quit: Be back later ...]
milesmatthias has joined #ruby
ItSANgo has joined #ruby
<kLooaa> kahuna_: until they have horrible accident or get old
<kLooaa> its only temporary
<shevy> well you always have filters, all the time
<kLooaa> eventually all humans end very badly
<kLooaa> shevy: I destroyed filters
<shevy> your own perception filters information or how your own brain tricks you; remember those eye-tricks about 3D vs. 2D sketches
<RickHull> no shevy, kLooaa is beyond filters
<RickHull> he perceives reality directly and is here to tell us about it
davedev24_ has quit []
<shevy> he is a limited system
<shevy> without food he could not even type
symm- has quit [Ping timeout: 276 seconds]
<kLooaa> shevy: Yes but I was talking about THINKING filters
<kLooaa> not seeing filters
<shevy> illusions
<kLooaa> people are optimistic
<shevy> the river of DNA goes on and on
<kLooaa> so they see bad things as good
<RickHull> what bad things do you see as good, kLooaa?
ItSANgo has quit [Max SendQ exceeded]
<kLooaa> RickHull: NOT ME. humans
<RickHull> oh right
<RickHull> what are you then?
ItSANgo has joined #ruby
francoi__ has quit [Ping timeout: 276 seconds]
<kLooaa> RickHull: observer
milesmatthias has quit [Ping timeout: 276 seconds]
<RickHull> do you have blood? is it pumped by a heart?
<shevy> he is a pessimist
<shevy> so he has a filter that downgrades input
idafyaid has joined #ruby
<kLooaa> RickHull: I hate it
<kLooaa> shevy: input is so shitty, doesnt need to downgrade it more
ItSANgo has quit [Max SendQ exceeded]
<shevy> but you filter it, all the time
<shevy> you don't have all objective information given to you in the first case
<shevy> like if you are short-sighted
<shevy> and everything is a blur
<drdave> does anyone have experience using mkmf?
ItSANgo has joined #ruby
<kLooaa> I have much more than others
<drdave> this is driving me a bit bonkers…
<kLooaa> others just ignore their death and suffering
<drdave> lib most definitely have binding (i created a test C project that links and uses it fine), but ‘have_library(‘lib’, ‘func’) returns false for anything but main
<drdave> any tip on how i could debug that?
<drdave> (i suppose the only explanation is that somehow it is not finding the right library)
podman has quit [Quit: Connection closed for inactivity]
<kLooaa> drdave: Do you realize that basically after age 20 your body starts rotting, being worse and worser at everything? and that includes your brain too? you will eventually be stupid and naive just like children. or worse - you can get alzheimer's disease. If you are alive now, I guarantee you that you will die eventually. And it can be really painful dying. Just read news or statistics how many people die in what ways DAILY. You will become one of them eventua
<kLooaa> lly. One of that statistics number. nothing more.
<sevenseacat> !mute kLooaa
stryek has quit [Quit: leaving]
ItSANgo has quit [Max SendQ exceeded]
<sevenseacat> bye now.
<drdave> thanks
balazs has quit [Remote host closed the connection]
psy_ has joined #ruby
ItSANgo has joined #ruby
kahuna_ has quit [Ping timeout: 276 seconds]
<hoelzro> drdave: which OS are you on? what library is mkmf failing to find?
<drdave> hoelzro: OSX and libplot
<drdave> it’s definitely there...
<hoelzro> drdave: is libplot installed to /usr/local?
<drdave> and it actually finds it (or at least returns true for the ‘main’ binding)
<drdave> yup
<hoelzro> that's probably why
<drdave> how so?
Spami has joined #ruby
ItSANgo has quit [Max SendQ exceeded]
<drdave> if it did not find it at all, i would indeed suspect a path issue (but i’m setting it)
<hoelzro> I'm not an OS X expert, but I'm guessing /usr/local/include is not in the default ld search path
<hoelzro> drdave: it finds main because main is a symbol in the test program
<hoelzro> it doesn't come from libplot
<drdave> I have a LIB_DIRS = [ ‘/usr/local/lib’] in there
<hoelzro> hmm
<drdave> shouldn’t it only look for main *in* the library?
<drdave> i thought that was what the doc said...
ItSANgo has joined #ruby
<drdave> otherwise what would be the point of have/find_library(‘lib’, nil)?
<hoelzro> drdave: usually how those programs work is they compile something like this:
<hoelzro> #include <mylib.h> int main(void) { void *sym = {{symbol_name}}; return 0 }
<hoelzro> where symbol_name is the second argument to have_library
<drdave> i see..
<drdave> i’m looking at mkmf log now...
LMity has quit [Ping timeout: 264 seconds]
ItSANgo has quit [Max SendQ exceeded]
kahuna_ has joined #ruby
RobertBirnie has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
mdz_ has joined #ruby
ItSANgo has joined #ruby
kLooaa has left #ruby [#ruby]
<drdave> hmn. i’m starting to suspect a 32/64 bit thing...
ItSANgo has quit [Max SendQ exceeded]
damien1 has joined #ruby
RobertBirnie has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby
krz has joined #ruby
Cache_Money has joined #ruby
braincrash has quit [Quit: bye bye]
RobertBirnie has joined #ruby
arooni-mobile has joined #ruby
<shevy> oh sevenseacat you are here, lookie:
<shevy> It is now verified through scientific methods, that cat videos are good for the people: http://www.eurekalert.org/pub_releases/2015-06/iu-npv061615.php
penzur has quit [Quit: brb]
fujimura has joined #ruby
<shevy> "the most popular sites for viewing cat videos were Facebook, YouTube, Buzzfeed and I Can Has Cheezburger"
<damien1> Hey guys, I'm trying to regex "'s" out of a string. So far I have str.gsub(/\'+s/, "") but that doesn't work. can anyone help?
Cache_Money has quit [Client Quit]
<eam> damien1: why the + after the single quote?
<eam> damien1: also, are you saying str = str.gsub() or are you just saying str.gsub() ?
<shevy> >> "abcdef'shij's".tr("'s",'')
<ruboto> shevy # => "abcdefhij" (https://eval.in/383485)
<shevy> hmm
<shevy> let me test
<shevy> >> "sabcdef'shij's".tr("'s",'')
<ruboto> shevy # => "abcdefhij" (https://eval.in/383486)
<shevy> ah yes, damn
<ponga> what's this tr is faster than gsub ?
krisquigley has joined #ruby
<shevy> yeah
<shevy> .gsub is slowest
<eam> it oughta be
<shevy> .delete and .tr will be faster
<shevy> >> "sabcdef'shij's".gsub(/'s/,'')
<ruboto> shevy # => "sabcdefhij" (https://eval.in/383487)
<shevy> damien1 that works? ^^^
<ponga> tr does similar job as gsub?
haasn has joined #ruby
<shevy> not completely
<eam> ponga: different mechanics
<shevy> .gsub is the most powerful one
<shevy> .delete is the simplest
<shevy> .tr is somewhere in between
<shevy> there is also .sub
robbyoconnor has quit [Quit: Konversation terminated!]
<ponga> so gsub is versatile one
<eam> yeah gsub uses regex, the others do not
Ox0dea has joined #ruby
<haasn> I'm not very familiar with ruby. I found a project on the internet that I would like to modify, but I can't figure out how to test my changes. I can use `gem build project.gemspec` in order to successfully build the project (and I can also use `rake` to.. do something. There's a Rakefile. Seems to be some kind of test framework?), but I can't figure out how to run the project now that I've build it (and
<haasn> produced a .gem file)
<damien1> shevy: unfortunately it doesn't.. O.o
<shevy> why not
<damien1> I must have mistyped something
<damien1> one sec
<haasn> Is it possible to run the project without having to install it first?
braincrash has joined #ruby
<shevy> did it not remove all 's in the example string above
<shevy> haasn you have built a .gem file
houhoulis has joined #ruby
<shevy> that is like an archive
<shevy> now you must install it
<eam> haasn: run rake -T
<shevy> e. g. gem install ./name-of-gem-file-here.gem
mdz_ has quit [Remote host closed the connection]
<ponga> thank you shevo i was going to tell him exact same thing
baweaver has joined #ruby
<eam> well that's not entirely true
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<eam> odds are it has tests he can run before installing the gem
<haasn> eam: Ah, useful; there's `rake build`, `rake install`, `rake install:local`, `rake release` and `rake spec`; but apparently nothing like `rake run` :(
<eam> haasn: spec is a testing framework, give that a spin
krisquigley has quit [Ping timeout: 265 seconds]
mrmargolis has quit [Remote host closed the connection]
<haasn> eam: Yeah that seems to work well enough, I guess what I should be doing is modifying the spec file to add tests for the new functionality I'm adding, so I can test it through `rake spec`?
<damien1> shevy: it works in IRB, but not in my .rb file.. can I pastebin?
<eam> yes
<shevy> damien1 gist
<shevy> not pastebin :D
<shevy> btw if it works in IRB
<shevy> then it should work in your .rb file
<haasn> I would still just really like the ability to just say “hey, run this file for me please” without having to install it into my global/local environment, sort of like running `make && ./binary` but not `make install` in a traditional C program
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> haasn you can provide the path to ruby via e. g. ruby -r
<eam> haasn: rspec will run the tests on your local source tree
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> RUBYLIB=/path/to/your/sources/lib whatever.rb
bMalum has joined #ruby
<haasn> eam: That works exactly as expected, thanks
mdz_ has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> haasn: if you come from C, consider RUBYLIB as ruby's equiv to LD_LIBRARY_PATH
ItSANgo has quit [Max SendQ exceeded]
baweaver has quit [Ping timeout: 252 seconds]
<haasn> Right, makes sense. Incidentally, does ruby have something like Cabal's “sandboxes”? where I can just say eg. “cabal sandbox init” and then get a virtual local environment into which I can “cabal install” dependencies without cluttering up my system
<haasn> (and even “cabal install” the local program itself)
<eam> yes, bundler and rvm are common tools for that in development
bruno- has joined #ruby
sdothum has quit [Ping timeout: 276 seconds]
<eam> rvm will help you manage multiple rubies (different versions per project perhaps) and bundler manages gemsets, you'll create a Gemfile for a project outlining exactly the gems to use
j4cknewt has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
sharpmachine has joined #ruby
<Ox0dea> Is rvm no longer catching flak for mucking about with the standard utilities?
maknz has joined #ruby
WildBamboo-Josh has quit [Read error: Connection reset by peer]
<eam> Ox0dea: I hope not
ItSANgo has joined #ruby
<Ox0dea> It does it well enough as to rarely present a problem, but redefining `cd` is still unnecessarily invasive.
jenrzzz has joined #ruby
<eam> yeah it's ugly
mdz_ has quit [Remote host closed the connection]
sarkyniin has quit [Quit: Quit]
<eam> (but I feel the same way about bundler and gem so ... :)
mois3x has joined #ruby
ItSANgo has quit [Max SendQ exceeded]
ItSANgo has joined #ruby
<eam> if I had my way I'd do away with gems entirely and rely on $:
claptor has joined #ruby
<eam> but, you know, Sustrik's Law
<drdave> hoelzro: think i fixed it!
<hoelzro> yeah? how'd you do it?
bruno- has quit [Ping timeout: 256 seconds]
<drdave> hoelzro: for future reference, problem came from PoS rvm trying to install 32bits and the lib being 64bits only
sharpmachine has quit [Ping timeout: 265 seconds]
frem has quit [Quit: Connection closed for inactivity]
<drdave> no idea why it wouldn’t install in 64… but rebuilding the lib to have both seems to have done the trick
<drdave> thanks for holding my hand through it...
ramfjord has joined #ruby
<hoelzro> ahhhh
<hoelzro> I didn't do much, I'm afraid
<drdave> without pointing out that the ‘main’ returning true was meaningless, it’d still be there
ItSANgo has quit [Max SendQ exceeded]
<drdave> the log was a mess to read, but the mention of warning regarding incompatible binary did put me on the track
swgillespie has joined #ruby
<hoelzro> :+1:
EllisTAA has joined #ruby
<drdave> now i just have to make sense of the mess of gem directories on osx, but that’s the easy part
<damien1> Can anyone help me troubleshoot removing a "'s" in a string? https://gist.github.com/damienr74/7f999ebd4416c35496fe
swgillespie has quit [Max SendQ exceeded]
ItSANgo__ has joined #ruby
<Ox0dea> Ruby's test suite contains 2,236,237 assertions.
<Ox0dea> That's a lot.
iamse7en has joined #ruby
swgillespie has joined #ruby
<ponga> >> "string".delete("s")
<ruboto> ponga # => "tring" (https://eval.in/383488)
nietzschette has joined #ruby
freerobby has joined #ruby
<ponga> damien1:
<ponga> does this suit you?
<Ox0dea> >> 'strings'.delete('s')
<ruboto> Ox0dea # => "tring" (https://eval.in/383489)
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<eam> damien1: @@passage = @@passage.tr()
ItSANgo__ has quit [Max SendQ exceeded]
<eam> damien1: OR, you can say @@passage.tr!()
<eam> the version with a ! modifies its receiver, the version without returns a new string with the changes (which you're ignoring)
datanoise has joined #ruby
<damien1> eam: now it removes any "s"
psy_ has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
<haasn> eam: Hmm, unfortunately the RUBYLIB= trick does not work on my server (the machine that I was going to test it on), it only works locally. On the server, it complains about require not being able to find 'json', even though both bundler and gem agree that json is installed just fine; *and* the program works fine when I run it normally (after gem install)!
<eam> damien1: yeah, tr "abc", "" will remove any a, b or c
<eam> damien1: you'll need gsub to remove patterns
whippythellama has quit [Quit: WeeChat 1.2]
<damien1> eam: I used to have that, but still couldn't make it work
<eam> damien1: share the code?
<Ox0dea> haasn: Which version of Ruby is your server running?
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<eam> haasn: what Ox0dea said, I would guess you have something playing with your environment there
ItSANgo__ has joined #ruby
<haasn> Ox0dea: 1.8.7 and nothing else
<damien1> .gsub(/\'s/, "")
<damien1> eam: .gsub(/\'s/, "")
<haasn> (The machine on which it works has 1.9, 2.0, 2.1 and 2.2)
<eam> damien1: same rules as with tr() and tr!(), gsub() and gsub!()
<damien1> eam: yeah that was good too haha
datanoise has quit [Ping timeout: 245 seconds]
penzur has joined #ruby
<damien1> eam: Ohh i had "'+s"
jack_rabbit has quit [Ping timeout: 264 seconds]
<eam> you know, we were talking about gsub being slower than tr, but a good implementation of gsub can be extremely faster than tr in certain datasets
penzur has quit [Client Quit]
<damien1> thanks y'all <3
<eam> because gsub doesn't necessarily have to examine every character in the source string, but tr does
penzur has joined #ruby
armyriad has joined #ruby
closer has quit [Ping timeout: 272 seconds]
Koshian has quit [Quit: Tiarra 0.1+svn-39209: SIGTERM received; exit]
closer has joined #ruby
tkuchiki has joined #ruby
gix has quit [Ping timeout: 255 seconds]
CloCkWeRX has joined #ruby
damien1 has quit [Quit: WeeChat 1.1.1]
iamse7en has quit [Quit: I'm out like a black kid in a spelling bee.]
mgorbach has quit [Ping timeout: 276 seconds]
<Ox0dea> haasn: You have to explicitly require 'rubygems' on 1.8.7.
<Ox0dea> I take it you're doing that?
sdwrage has quit [Quit: Leaving]
<eam> supporting 1.8.7 warms my heart
gix has joined #ruby
<Ox0dea> It's like compiling your C programs with -ansi -pedantic.
<eam> it's like compiling your C programs with a pre-ansi k&r compiler
<eam> sorta the same language, but not really
<Ox0dea> The only differences are syntactic ones, no?
<eam> I mean, is there a different kind?
<Ox0dea> What?
<eam> making a joke, but there's all kinds of crazy changes. Scoping behavior, methods change behavior, added, removed, etc
vikaton has quit [Quit: Connection closed for inactivity]
<eam> and new syntaxes
<haasn> How can I figure out what constants something defines? Specifically, Socket::Constants. I can't seem to find documentation on this anywhere
<Ox0dea> haasn: Socket::Constants.constants
<Ox0dea> Totally unintuitive, I know. :P
jack_rabbit has joined #ruby
michaeldeol has joined #ruby
<haasn> Ah, that works - thanks. Strange that ruby-doc doesn't list them anywhere!
<haasn> (Or maybe I just can't find them)
arquebus has joined #ruby
oo_ has quit [Remote host closed the connection]
mgorbach has joined #ruby
<eam> haasn: it's a method on Module
<eam> navigating rubydocs are a bit of a pain as they're organized by class so it's hard to find things implemented by a superclass
<haasn> Yeah, and also the documentation for the thing that actually needs it (in this case, class IPAddr), doesn't contain so much as a *link* to the definition of the AF_* constants
oo_ has joined #ruby
<haasn> just literally says “family = Socket::AF_UNSPEC” and that's it. Not clickable either. :(
musgravejw has left #ruby ["Leaving"]
<eam> haasn: ruby culture isn't very doc oriented, it's very experimentation oriented. Lots of folks rely on stuff like tab completion for API discovery
<haasn> Ah, okay. That's the complete opposite of what I'm used to :)
<eam> me too
mistym has joined #ruby
<haasn> (And doesn't make a lot of sense either, how does experimentation scale to anything past hobby projects?)
<nietzschette> searching the source code is just as good as docs
yfeldblum has quit [Remote host closed the connection]
<haasn> nietzschette: That's actually what I was trying to do, but I can't find a ‘source code’ link on this page: http://ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html
<eam> nietzschette: I don't really agree, but it is easier to read ruby than most other languages
<haasn> Did I just miss it?
pontiki has quit [Quit: <poit>]
arquebus has quit [Client Quit]
saadq has joined #ruby
stryek has joined #ruby
<eam> haasn: there's a gem called 'pry' that'll help: http://pryrepl.org/
<nietzschette> I wrote a program - metasearch I called it - to scan every file in every lower directory for a key word and return an array of instances of that word. I use it quite often
<haasn> I'm wondering about what's more idiomatic: The code I'm editing does stuff like Logger.new(config['logfile']), but as I understand it those parentheses are redundant? Why not just write Logger.new config['logfile'] ?
<eam> haasn: no parens is common
<saadq> Is there a way to automatically install needed gems when running a ruby program that requires them through terminal?
balazs has joined #ruby
<eam> method parens aren't redundant with precedence parens, oddly enough
<havenwood> saadq: In Pry to install then require you can: gem-install foo
<eam> f(x) is different from f((x)) for various expressions of x
<haasn> eam: that seems odd, what kind of expressions ‘x’ trigger this?
<havenwood> saadq: Or do you mean something else by from the terminal? Maybe say more about what you mean?
<haasn> (stuff like this reminds me of php's crazy parser)
<eam> >> def f(x); x; end; f((not true))
<ruboto> eam # => false (https://eval.in/383490)
<eam> >> def f(x); x; end; f(not true)
<ruboto> eam # => /tmp/execpad-67f20c74064c/source-67f20c74064c:2: syntax error, unexpected keyword_true, expecting '( ...check link for more (https://eval.in/383491)
<nietzschette> could you write a gem installation method in a rescue block?
surs has joined #ruby
<haasn> eam: As a non-ruby programmer, that makes no sense to me. Isn't “not true” a valid expression on its own?
<eam> pretty sure it's a bug
sleungcy has joined #ruby
<nietzschette> !true
<nietzschette> = false
<Ox0dea> saadq: You should consider whether you really want to install arbitrary dependencies.
<havenwood> >> def f(x); x; end; f(not(true))
<ruboto> havenwood # => false (https://eval.in/383492)
workmad3 has joined #ruby
<eam> >> def f(x); x; end; f (not true)
<ruboto> eam # => false (https://eval.in/383493)
<eam> (because those parens are precedence parens, not method parens)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
krz has quit [Quit: WeeChat 1.0.1]
<eam> paren-less method call
starfox_sf has quit [Ping timeout: 265 seconds]
Koshian has joined #ruby
serivich has joined #ruby
<Ox0dea> >> p(! true)
<ruboto> Ox0dea # => false ...check link for more (https://eval.in/383494)
nisstyre has quit [Ping timeout: 244 seconds]
<Ox0dea> So the problem is the precedence of the "not" keyword.
icebourg has joined #ruby
<Ox0dea> Which should only be used for control flow and ideally not at all.
<eam> not quite, it's a parser bug but precedence isn't why
<eam> >> [true and false]
<ruboto> eam # => /tmp/execpad-1eb8f8b10250/source-1eb8f8b10250:2: syntax error, unexpected keyword_and, expecting ']' ...check link for more (https://eval.in/383495)
<Ox0dea> Oh, wow.
balazs has quit [Ping timeout: 264 seconds]
<eam> common to all the bool keywords
<Ox0dea> >> [(true and false)]
<ruboto> Ox0dea # => [false] (https://eval.in/383496)
evanjs has quit [Remote host closed the connection]
<Ox0dea> Does anyone know of a parser that's scarier than MRI's?
hubcaps has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
<eam> I generally prefer the keywords to the symbols for readability (in perl) but I avoid them in ruby
Volsus has quit [Quit: Leaving]
ledestin has joined #ruby
tkuchiki has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
Spami has quit [Quit: This computer has gone to sleep]
tkuchiki has joined #ruby
bronson has joined #ruby
<eam> >> x = methods.sample; send x, *Array.new(method(x).arity.abs) { ObjectSpace.each_object.to_a.sample }
CalvinnHobbes has joined #ruby
<ruboto> eam # => undefined method `found_spec' for class `Object' (NameError) ...check link for more (https://eval.in/383497)
<eam> hm bad luck
<nietzschette> I got bored and started piping several instances of IRB into each other. to test it, I type 5 into the first
<nietzschette> I got 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555. . . . .
<nietzschette> I'm wondering if it would be possible map interpretors as some sort of AI?
<nietzschette> give each instance a set of associations of keywords
<nietzschette> anyone have any experience with that sort of thing?
bronson has quit [Ping timeout: 256 seconds]
joneshf-laptop has quit [Read error: Connection reset by peer]
joneshf-laptop has joined #ruby
<eam> nietzschette: sounds like you want a megahal
AndroidLoverInSF has joined #ruby
starfox_sf has joined #ruby
<nietzschette> interesting search results
j4cknewt has joined #ruby
<eam> popular markov chain bot
<eam> there's a ruby gem for it I think
mois3x has quit [Quit: mois3x]
<saadq> havenwood: Sorry here's an example: http://pastebin.com/xshifYMr
<ruboto> saadq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/143fd0bc1e48d3544c49
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<saadq> oh lol
<saadq> but yeah I basically have a file named title.rb with this code: https://gist.github.com/anonymous/143fd0bc1e48d3544c49
mattyohe has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Remote host closed the connection]
<saadq> When I run `ruby test.rb`
<saadq> is there a way to make that mechanize gem install before the program runs automatically?
<eam> saadq: possibly, but you probably shouldn't
<nietzschette> I have mech on another computer. . . .
<saadq> Okay, was just curious if there was something everyone did that I was unaware of
<eam> anything you do has good odds of breaking different environments
tkuchiki has joined #ruby
<havenwood> saadq: You could cut it into a gem so the dependencies install along with the script. Or you can specify the deps in a Gemfile or gem.deps.rb file and run `gem i -g` to install.
j4cknewt has quit [Ping timeout: 265 seconds]
Jarboe has quit []
<nietzschette> I just find it funny you want mechanize to install automatically
<haasn> (pastebin.com has ads!?)
<nietzschette> I mean, do you even USE a keyboard?
<saadq> That was just an example
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
drocsid has joined #ruby
<saadq> so when most people create something in Ruby that has dependencies, do they usually expect the user to manually install those dependencies itself?
<saadq> themselves*
auzty has joined #ruby
<havenwood> saadq: They usually create a gem so the deps install along with the gem.
<saadq> Oh, I see that's basically what I was asking about haha thanks
<havenwood> saadq: Or, a Gemfile for easy installation.
jenrzzz has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
<nietzschette> I'm almost ready to write a gem!
<saadq> Thanks havenwood and everyone else
kp666 has joined #ruby
<drocsid> I installed rvm and have been trying to run a script I wrote from my crontab. Similar to /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby /home/user/script/create_indices.rb . When I login I can run the script fine. It looks like the error I'm getting from cron is /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:i
<drocsid> +n `require': cannot load such file -- elasticsearch (LoadError)
<drocsid> looks like it is having issues with the gem when I'm not logged in. I'm no ruby expert, does anybody know what's going on?
<havenwood> drocsid: Cron drops your env, you'll probably want to use wrappers: https://rvm.io/deployment/cron
<havenwood> drocsid: See: rvm help wrapper
<drocsid> havenwood: thanks
<havenwood> drocsid: no prob
towski__ has joined #ruby
vikaton has joined #ruby
krz has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
towski_ has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
nisstyre has joined #ruby
oo_ has quit [Remote host closed the connection]
kahuna_ has left #ruby [#ruby]
c0ncealed has joined #ruby
milesmatthias has joined #ruby
Musashi007 has joined #ruby
<havenwood> saadq: For resolving and installing app deps, try creating a `gem.deps.rb` file with the content `gem 'mechanize'` and run `gem i -g`.
<havenwood> saadq: echo "gem 'mechanize'" >> gem.deps.rb && gem i -g
<havenwood> saadq: Then if you shipped to someone else they type `gem i -g` and get the exact same gem versions
<saadq> oh cool
<saadq> thanks, I'll def read up on gems too to get a better understanding
<havenwood> saadq: It creates a gem.deps.rb.lock file that you check into git for apps, so all other devs use the same versions you're on
<havenwood> saadq: RubyGems, which ships with Ruby, can do this now. The traditional way has been to use the Bundler gem.
<havenwood> saadq: I'd suggest reading up on RubyGems!
<saadq> appreciate it dude
<havenwood> saadq: you're welcome
Cust0sLim3n has quit [Max SendQ exceeded]
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
saadq has quit [Remote host closed the connection]
<havenwood> saadq: `gem.deps.rb` is the new name for `Gemfile`, which you'll probably see in most projects
dgutierrez1287 has joined #ruby
Cust0sLim3n has joined #ruby
milesmatthias has quit [Ping timeout: 255 seconds]
<Rager> I've got a method not acting the way I think it should
<Rager> how would I use reflection to find out what the interface is?
<havenwood> ?pry Rager
<ruboto> Rager, 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
<havenwood> Rager: gem install pry pry-doc
<havenwood> Rager: Then use `pry` instead of `irb` for your REPL.
mleung has joined #ruby
<havenwood> Rager: Try: ls method_you_want_to_look_at
<Rager> hm
<Rager> no way to use some class to enumerate the declared args or whatnot?
<Rager> ok
<Rager> I'll try pry
shadoi has joined #ruby
fabrice31 has joined #ruby
<havenwood> Rager: There are ways, absolutely.
danman has joined #ruby
icebourg has quit []
Dopagod has quit [Read error: No route to host]
dgutierrez1287 has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
<havenwood> Rager: I'm not quite clear on what you're wanting to do, but you can get at what Pry is showing. It makes it easy.
hanmac has quit [Ping timeout: 265 seconds]
mleung_ has joined #ruby
<havenwood> >> 5.public_methods(false).last 5
<ruboto> havenwood # => [:bit_length, :zero?, :odd?, :even?, :succ] (https://eval.in/383499)
<nietzschette> I'll often just insert puts "#{some value or expression}"
<nietzschette> throughout my code
<havenwood> nietzschette: use `p` instead of `puts` for debugging
mleung has quit [Ping timeout: 255 seconds]
mleung_ is now known as mleung
<nietzschette> why use p?
<havenwood> nietzschette: obj.inspect will save some headache when the puts output makes you cry
<havenwood> >> puts [1, 2, 3]
<ruboto> havenwood # => 1 ...check link for more (https://eval.in/383500)
<havenwood> >> p [1, 2, 3]
<ruboto> havenwood # => [1, 2, 3] ...check link for more (https://eval.in/383501)
fedexo has joined #ruby
<havenwood> nietzschette: ^ so there #puts first prints `1` while #p prints `[1, 2, 3]`.
fabrice31 has quit [Ping timeout: 265 seconds]
micmus has quit [Ping timeout: 256 seconds]
drdave has quit [Quit: drdave]
<nietzschette> I see that
<havenwood> nietzschette: So litter your code with p instead of puts. ;)
EllisTAA has quit [Quit: EllisTAA]
<nietzschette> but puts("#{[1,2,3]}") issame
c0ncealed has quit [Quit: WeeChat 1.2]
c0ncealed has joined #ruby
<nietzschette> but it is less to type so there's that
<havenwood> >> puts [1, 2, 3].inspect
<ruboto> havenwood # => [1, 2, 3] ...check link for more (https://eval.in/383502)
<havenwood> nietzschette: there are a few reasons. you only use p for debugging, so easy to spot them. they handle other inspect cases. etc.
<havenwood> nietzschette: it's what it's for
<nietzschette> gtk
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
unshadow has joined #ruby
Lucky__ has joined #ruby
dg-ratiodata has joined #ruby
serivichi has joined #ruby
<eam> when you're first learning ruby you'll end up with p everywhere
datanoise has joined #ruby
<Ox0dea> And when you're learning Ruby's C codebase, you end up with dp() everywhere.
unshadow has quit [Client Quit]
petruchito has joined #ruby
<Ox0dea> charliesome: Any chance eval.in will ever support trunk?
<charliesome> Ox0dea: hmm, probably not. it moves too quickly
<Ox0dea> That it does.
<charliesome> Ox0dea: in the past I've put preview releases of MRI on eval.in
serivich has quit [Ping timeout: 265 seconds]
Spami has joined #ruby
oo_ has joined #ruby
krisquigley has joined #ruby
mleung has quit [Quit: mleung]
hanmac has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
skade has joined #ruby
dg-ratiodata has quit [Ping timeout: 272 seconds]
<petruchito> hi all, i'm playing with ruby's GC here, just wondered does GC_DEBUG and RGENGC_CHECK_MODE is working in ruby_2_2 branch?
tenderlove has quit [Remote host closed the connection]
AndroidLoverInSF has quit [Ping timeout: 256 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
<al2o3-cr> hehe this megahal is awesome :)
<nietzschette> i know, right?
<al2o3-cr> just made a plugin for my bot it's gone crazy :D
dg-ratiodata has joined #ruby
<petruchito> im getting core dumped trying to `make` with those features enabled, from generic.erb
AndroidLoverInSF has joined #ruby
danman has quit [Quit: danman]
arooni-mobile has quit [Ping timeout: 265 seconds]
catcher has joined #ruby
bMalum has quit [Quit: bMalum]
shadoi has quit [Quit: Leaving.]
catcher is now known as rubynuby
rubynuby is now known as sailor
sailor is now known as slair
slair has quit [Client Quit]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndroidLoverInSF has quit [Ping timeout: 264 seconds]
lokulin has quit [Max SendQ exceeded]
dg-ratiodata has quit [Ping timeout: 272 seconds]
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nietzschette> I bet I could make a random comic book generator with chatterbots and rubysdl
ItSANgo__ has quit [Ping timeout: 265 seconds]
<eam> like jerkcity?
Cust0sLim3n has quit [Max SendQ exceeded]
jgpawletko has quit [Quit: jgpawletko]
Cust0sLim3n has joined #ruby
arooni-mobile has joined #ruby
mleung has joined #ruby
<nietzschette> eam, I don't even know what's going on with this site
jtdoncas has quit [Ping timeout: 252 seconds]
<nietzschette> jerkcity does not pass turning test
revath has joined #ruby
revath has left #ruby [#ruby]
djbkd_ has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
lokulin has joined #ruby
AlphaAtom has joined #ruby
ndrei has joined #ruby
ItSANgo__ has joined #ruby
dg-ratiodata has joined #ruby
tkuchiki has quit [Remote host closed the connection]
gianlucadv has joined #ruby
ItSANgo__ has quit [Max SendQ exceeded]
alphaatom|pc has joined #ruby
sophiedeziel has joined #ruby
yardenbar has joined #ruby
djbkd_ has quit [Remote host closed the connection]
qiukun has joined #ruby
drewo has joined #ruby
<qiukun> after using method(), have i call the method by call()?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
spinozahacker has joined #ruby
<eam> qiukun: yes
<Ox0dea> qiukun: send()
<spinozahacker> Hey, I just deleted /usr/bin/ruby from my Mac, how do I reinstall ruby?
<flughafen> moin guys
<Ox0dea> qiukun: Never mind; I misunderstood your question.
<eam> >> method(:puts).call "hello world"
<ruboto> eam # => hello world ...check link for more (https://eval.in/383510)
<eam> well, send works too
<al2o3-cr> can also use [] or .()
<qiukun> so the usual way to call is a hack?
<RickHull> spinozahacker: homebrew maybe. otherwise see the options here: https://www.ruby-lang.org/en/downloads/
<spinozahacker> homebrew requires ruby to instal
<eam> qiukun: unclear what distinction you're drawing
bronson has quit [Remote host closed the connection]
<eam> spinozahacker: you can use the osx recovery stuff I think
mleung has quit [Quit: mleung]
<Ox0dea> spinozahacker: RickHull gave you an else branch, mate.
<eam> you probably want to install apple's ruby there
ndrei has quit [Ping timeout: 256 seconds]
<RickHull> where do you get apple's ruby?
<eam> with osx?
<qiukun> eam: see, after we use method to get a method in order to pass it around
<qiukun> eam: we lost the abiity to call it by the usual syntax
<RickHull> eam: right, but he deleted it
<sophiedeziel> the question you might not want anybody to ask: why did you delete it?
nickfausnight has joined #ruby
<eam> RickHull: yes, OSX has recovery tools for restoring missing system files of any kind
<qiukun> so send and call is general, the usual syntax is a hack
<spinozahacker> apple's ruby is just older ruby as far as I know
<Ox0dea> qiukun: No, they're just not symmetric.
<eam> spinozahacker: yes, but compatibility is pretty important
<RickHull> eam: spinozahacker: then yeah, try osx recovery tools
ndrei has joined #ruby
<RickHull> if you want newer ruby, i'd look at rvm / rbenv / chruby
<qiukun> Ox0dea: quite annoying
GnuYawk has joined #ruby
<spinozahacker> it's an infinite loop haha. rvm requires homebrew which requires ruby
workmad3 has joined #ruby
<RickHull> restore your system :)
<spinozahacker> Yeah, i'll do it. Thanks guys!
spinozahacker has left #ruby [#ruby]
arooni-mobile has quit [Ping timeout: 265 seconds]
RickHull has left #ruby [#ruby]
spider-mario has quit [Ping timeout: 252 seconds]
<bnagy> wtf
<bnagy> they left :(
workmad3 has quit [Ping timeout: 272 seconds]
<bnagy> ports doesn't require ruby :(
casadei has quit [Remote host closed the connection]
<bnagy> top advice guys _b
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qiukun has quit [Quit: qiukun]
skade has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Ruinside has joined #ruby
tkuchiki has joined #ruby
spider-mario has joined #ruby
amclain has quit [Quit: Leaving]
<nietzschette> what's the name of that constant you declare to capture the lines of required modules?
alphaatom|pc has quit [Ping timeout: 252 seconds]
alphaatom|pc has joined #ruby
galeido has quit [Remote host closed the connection]
balazs has joined #ruby
mcclurmc has joined #ruby
fedexo has quit [Ping timeout: 265 seconds]
Ruinside has quit [Quit: Leaving...]
<certainty> moin
mcclurmc_ has quit [Ping timeout: 264 seconds]
datanoise has quit [Ping timeout: 245 seconds]
balazs has quit [Ping timeout: 245 seconds]
ahmetkapikiran has joined #ruby
<shevy> nietzschette constant? sure?
AndroidLoverInSF has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
<nietzschette> could have been a global variable
<shevy> I know of a global variable, an array, $LOAD_PATH - I think $: or so is the alias
Ruinside has joined #ruby
<nietzschette> that's it
AlphaAtom has joined #ruby
hubcaps has quit [Ping timeout: 245 seconds]
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
Norrin has joined #ruby
AlphaAtom has quit [Client Quit]
pepperbreath1 has left #ruby [#ruby]
drewo has quit [Ping timeout: 244 seconds]
Norrin has left #ruby ["Dueces"]
<certainty> shevy: wow, I couldn't guess what he/she might mean and tried. You're some kind of mindreader
RazorX has quit [Ping timeout: 246 seconds]
<certainty> s/and tried/, and I have really tried/
<nietzschette> google couldn't even catch my meaning
bMalum has joined #ruby
<certainty> xD
tagrudev has joined #ruby
<Ox0dea> >> global_variables.group_by { |g| eval(g.to_s).class }.map { |c, a| [c, a.size] }
<ruboto> Ox0dea # => (eval):1: warning: variable $= is no longer effective ...check link for more (https://eval.in/383531)
_ht has joined #ruby
futilegames has joined #ruby
<Ox0dea> Grr.
rbowlby has joined #ruby
futilegames has quit [Client Quit]
<Ox0dea> >> ARGF.class
<ruboto> Ox0dea # => ARGF.class (https://eval.in/383532)
RazorX has joined #ruby
<Ox0dea> What's up with that?
<Ox0dea> >> [File < 10, ARGF.class < IO]
keen__________ has quit [Read error: Connection reset by peer]
<ruboto> Ox0dea # => compared with non class/module (TypeError) ...check link for more (https://eval.in/383534)
<Ox0dea> >> [File < IO, ARGF.class < IO]
<ruboto> Ox0dea # => [true, nil] (https://eval.in/383535)
<Ox0dea> I know ARGF is magic, but it's pretty weird that it doesn't inherit anything from IO.
hahuang65 has quit [Ping timeout: 256 seconds]
keen__________ has joined #ruby
havenwood has quit [Ping timeout: 276 seconds]
<al2o3-cr> why is it not set to a constant
sigurding has joined #ruby
<nietzschette> ARGV.class => ARGV.class
<Ox0dea> nietzschette: ARGV is just an Array.
Ruinside has quit [Quit: Leaving...]
<Ox0dea> ARGF contains all of the "file-like" arguments supplied on the command line.
<nietzschette> sorry, replace V with F
<nietzschette> it has many methods in common with IO
<flughafen> shevy: nothing is taking off right now. burn me down! i'm worthless
<Ox0dea> Indeed it does, and yet it's apparently having them all defined bespoke.
sharpmachine has joined #ruby
<Ox0dea> flughafen: You're actually an airport?
<flughafen> flughafen is germnan for airport
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> >> "Germ#{0.0/0}"
francoi__ has joined #ruby
<ruboto> Ox0dea # => "GermNaN" (https://eval.in/383537)
<eam> I'm on a train, now we just need someone in an automobile
<flughafen> haha
<nietzschette> ARGF.kind_of?(Object) => true <= *emits sigh of relief*
<flughafen> germanphobe
<shevy> flughafen I have faith in you. One day you will the world that you are FINISHED
<shevy> *will show to the world
corehook has joined #ruby
<eam> GermNaN is what you get when you drop the bread on the floor
<shevy> certainty well I sort of ignored the word "constant" there, and reduced the question to "obtain lines of required modules", which to my brain only made sense in the way as "how to get all loaded modules in ruby", which is a question that is quite often asked here actually
sandstrom has joined #ruby
<shevy> eam admit it - you like german stuff. like beer from bavaria: look at them! http://whyfiles.org/wp-content/uploads/2010/10/old_men_lederhosen.jpg
hahuang65 has joined #ruby
akkad has quit [Remote host closed the connection]
<eam> shevy: I *am* german stuff
<shevy> they wear so silly things... but the beer is cool. and brezels are also ok (once you have beer that is; without beer they are dry)
<shevy> hehe
sharpmachine has quit [Ping timeout: 256 seconds]
hanmac1 has joined #ruby
<nietzschette> also bauhaus
<hanmac1> apeiros & shevy checkout the new "NameError#receiver" method ;P
<shevy> what is that
<shevy> I can't keep up with how quickly ruby changes
francoi__ has quit [Ping timeout: 252 seconds]
<shevy> #receiver what does it receive
<eam> I had a weihenstephaner with dinner last night
<Ox0dea> It returns the receiver of the method that couldn't be resolved.
<Ox0dea> `42.foo rescue $!.receiver` is 42 in trunk.
<shevy> wait
<shevy> my brain does not yet understand that
<shevy> a method that could not be resolved? what does that mean?
<Ox0dea> >> 42.foo
<ruboto> Ox0dea # => undefined method `foo' for 42:Fixnum (NoMethodError) ...check link for more (https://eval.in/383538)
<shevy> so it works on NoMethodError?
datanoise has joined #ruby
<Ox0dea> >> NoMethodError < NameError
<ruboto> Ox0dea # => true (https://eval.in/383539)
<shevy> and it returns NoMethodError?
<shevy> and that is useful because ... ?
<eam> well what if 42 is x
fabrice31 has joined #ruby
<Ox0dea> It'll return x?
<nietzschette> x is not a constant
<eam> right I'm explaining for shevy
<shevy> x = 42
<eam> you might want the error raised to explain which receiver object didn't have the method
<Ox0dea> shevy: NameError#receiver's raison d'être is to make it easier for the did_you_mean gem to do its thing.
<shevy> hmm
hahuang65 has quit [Ping timeout: 272 seconds]
chinmay_dd has joined #ruby
<Ox0dea> It's a lot cleaner than method_missing.
rubie has quit [Remote host closed the connection]
<eam> what's ruby's worst feature
<nietzschette> ambiguity about what's an object and what's a pointer
moretti has joined #ruby
corehook has quit [Remote host closed the connection]
<nietzschette> or that's it's best feature
fabrice31 has quit [Ping timeout: 272 seconds]
<Ox0dea> eam: The flip-flop operator seems to have exactly one (questionable) use case.
<bnagy> @@classvars
atom_ has joined #ruby
<eam> how about nearly arbitrary characters as string delimiters with %
avahey has quit [Quit: Connection closed for inactivity]
ndrei has joined #ruby
<bnagy> flip-flop is awful but it's too confusing to ever be used in real-world code
hahuang65 has joined #ruby
<shevy> eam hard question. method_missing can be useful sometimes. I use it to simulate LPC in one project, where methods never fail but instead, when they don't exist, return false
<shevy> I dislike @@vars as well. dunno if they are the worst though
<shevy> arbitrary characters don't affect me much because I just use ... %w() !
<shevy> and others use.... %w[]
<shevy> those are the two most commonly used variants
<shevy> everyone else is an unbeliever
<Ox0dea> eam: Have you ever actually seen somebody use a delimiter that confused you?
<shevy> hanmac did
<nietzschette> you could also search ruby source for that method and dynamically GIVE it to the object when the error is raised
<eam> I have myself, yes
bjornar has quit [Ping timeout: 250 seconds]
<shevy> that is eam's dark perl past
<Ox0dea> eam: Which was it?
<Ox0dea> Space?
<shevy> admit that it was _
crdpink2 has joined #ruby
<shevy> _ = %w _ a b c _
<shevy> oops
<shevy> SyntaxError
crdpink has quit [Ping timeout: 265 seconds]
<eam> >> % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %%%%% %%%% % %%%%%%% %%%% % %
<ruboto> eam # => /tmp/execpad-ec0a6f6d5ba1/source-ec0a6f6d5ba1:4: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/383553)
<eam> whoooa ruboto
bjornar has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> wtf
<Ox0dea> eam: It strips trailing whitespace.
<shevy> does not work!
<eam> >> % %%%%%%% %%%% % %%%%% %%%% # shorter
<ruboto> eam # => "%" (https://eval.in/383554)
<eam> I just went over the irc char limit
moretti has quit [Quit: Leaving...]
<shevy> hmm
Xeago has joined #ruby
<shevy> what happened to the other %
<eam> >> "#{%}#{%}#{%}#{%}#{%} }}}}}}}}}}"
<ruboto> eam # => " " (https://eval.in/383555)
nEosAg has joined #ruby
ta has quit [Remote host closed the connection]
<eam> I like that one because of the asymmetry
<nEosAg> trying to install ruby on centos 6.2 x86_64
<nietzschette> "#{%%}"%
<nEosAg> error: Failed dependencies: libz.so.1(ZLIB_1.2.2)(64bit) is needed by ruby-2.1.2-1.el6.x86_64
<eam> I'm gonna say my least favorite feature of ruby is how block scoped variables are declared
<shevy> why
<shevy> just give them a longer name
<nEosAg> but rpm -ql zlib gives /lib64/libz.so.1 /lib64/libz.so.1.2.3
<nietzschette> why isn't zlib already everywhere?
svoop has joined #ruby
bronson has joined #ruby
Cust0sLim3n has quit [Max SendQ exceeded]
<shevy> perhaps because centos is incompetent
<shevy> that is a centos ruby-package right
<nEosAg> yes
krisquigley has joined #ruby
<eam> no one ever uses ; inside ||
<nietzschette> I'd say the GLI is my least favorite
serivichi has quit [Ping timeout: 265 seconds]
<shevy> nEosAg not sure how many people here use centos :)
<eam> they totally should use the same syntax as methods
<nEosAg> ruby-2.1.2-1.el6.x86_64.rpm got from some site
<eam> nEosAg: are you mixing up your repos?
<eam> you need to use the ruby built for that particular centos version
<nEosAg> eam : like?
<bnagy> nietzschette: not a ruby feature, that's an implementation decision :P
simplyaubs has joined #ruby
fabrice31 has joined #ruby
Cust0sLim3n has joined #ruby
<nEosAg> eam : i am using same ..centos 6 64 bit
<eam> 6 dot what?
<nEosAg> 6.2
<eam> is that what your rpm was built for?
hubcaps has joined #ruby
hubcaps has joined #ruby
<eam> rpm -qpi ruby-2.1.2-1.el6.x86_64.rpm
<nEosAg> ok let me check
tvw has joined #ruby
andikr has joined #ruby
<eam> I'm assuming it's from epel, those are all pretty broken
dg-ratiodata has quit [Remote host closed the connection]
<eam> shevy: rhel/centos is the only linux distro worth using
<nEosAg> oops
<shevy> hehe
<flughafen> eam: i'll disagree. suse is the best suse is the best suse is the best suse is the best
<nEosAg> sorry for typo
<eam> flughafen: hmm german you say? :)
<shevy> I have followed gobolinux appdirs. all who do not use appdirs are not worthy to be used
dg-ratiodata has joined #ruby
simplyaubs has quit [Client Quit]
simplyianm has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
<nEosAg> eam : can you share any trusted source for ruby rpms
<eam> and that's my train stop, night all
<flughafen> eam: i might work for a certain company ;)
<eam> nEosAg: there isn't a good one
<eam> build your own ruby
<eam> flughafen: aha ;)
krisquigley has quit [Ping timeout: 256 seconds]
jmhmccr has joined #ruby
<flughafen> microsoft is the best linux distro
ndrei has quit [Ping timeout: 256 seconds]
<nietzschette> my eyes
ndrei has joined #ruby
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flughafen> microsoft is the best linux distro
<nietzschette> eesypeezyFTW
<flughafen> eesypeezy?
f3lp has joined #ruby
bruno- has joined #ruby
nEosAg has quit [Ping timeout: 246 seconds]
fabrice31_ has joined #ruby
nEosAg has joined #ruby
<nEosAg> sorry got disconnected
<shevy> nEosAg URL for ruby is ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz
fabrice31 has quit [Ping timeout: 264 seconds]
<nEosAg> shevy ..i have built it from source
balazs has joined #ruby
<shevy> really?
<nEosAg> *i have to
<shevy> compiling from source would be ideal
<shevy> you may have to get some other things though
spacemud has joined #ruby
<shevy> upgrading zlib for instance
<nEosAg> like gcc-c++
<nEosAg> oops
<shevy> perhaps, not sure how crippled centos is by default
<nEosAg> my box is messed up with multiple glibc
<shevy> cool
<nEosAg> its pretty much crippled
<shevy> there are often ways to uncripple
<shevy> on debiant, you can use apt-get to get all required dev-packages for instance
<nEosAg> like
<shevy> *debian
<shevy> not debiant :)
<nEosAg> i know ..its on my laptop
<shevy> dunno... the biggest hurdle is to find out the name of the package in question
<shevy> I hate that different distributions given different names
<nEosAg> but to convince to my seniors on my production m/c is another nightmare
iwishiwerearobot has joined #ruby
towski__ has quit [Remote host closed the connection]
<nietzschette> debian is sweet
<nEosAg> does smartpm will help
bruno- has quit [Ping timeout: 252 seconds]
<Ox0dea> nietzschette: Are you a Debian user?
<nietzschette> often
<Ox0dea> Will you be switching to Devuan when it's ready?
<Ox0dea> /s
<wasamasa> lol
<shevy> I heard that debian wants to perform reproducible builds
balazs has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 244 seconds]
lokulin has quit [Changing host]
lokulin has joined #ruby
datanoise has quit [Ping timeout: 264 seconds]
gambl0re has quit [Remote host closed the connection]
gambl0re has joined #ruby
solars has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<nietzschette> I'll try it. I've got an old junk computer I used to test OS builds.
mike___1234 has quit [Ping timeout: 265 seconds]
cyong has joined #ruby
<nietzschette> I like apt-get though. it's as easy as ruby gems
mister_solo has joined #ruby
dhjondoh has joined #ruby
oo_ has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 245 seconds]
renderfu_ has joined #ruby
ndrei has joined #ruby
<Ox0dea> pacaur über alles.
charliesome has joined #ruby
dhjondoh has quit [Remote host closed the connection]
Contigi has quit [Ping timeout: 255 seconds]
sdwrage has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
atom_ has quit [Quit: Page closed]
dhjondoh has joined #ruby
mike___1234 has joined #ruby
renderfu_ has quit [Ping timeout: 252 seconds]
sophiedeziel has quit [Quit: Konversation terminated!]
sandstrom has quit [Quit: My computer has gone to sleep.]
antgel has joined #ruby
oo_ has joined #ruby
Macaveli has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
sandstrom has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
mister_solo has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
strixd has joined #ruby
dg-ratiodata has quit [Remote host closed the connection]
ndrei has joined #ruby
anisha has joined #ruby
corehook has joined #ruby
wildroman2 has joined #ruby
Iskarlar has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
GnuYawk has quit [Quit: WeeChat 1.0]
GnuYawk has joined #ruby
sdwrage has quit [Quit: Leaving]
ta has joined #ruby
posixpascal has joined #ruby
skade has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
darkf has quit [Ping timeout: 256 seconds]
kalusn has joined #ruby
lptm has quit [Read error: Connection reset by peer]
lkba has quit [Remote host closed the connection]
pyon has joined #ruby
konsolebox has joined #ruby
Xeago has joined #ruby
AndroidLoverInSF has quit [Ping timeout: 264 seconds]
corehook has quit [Remote host closed the connection]
nietzschette has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
dgutierrez1287 has joined #ruby
rubie has joined #ruby
corehook has joined #ruby
pwnz0r has joined #ruby
corehook_ has joined #ruby
dumdedum has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
francoi__ has joined #ruby
GitGud has joined #ruby
corehook has quit [Read error: Connection reset by peer]
dgutierrez1287 has quit [Ping timeout: 252 seconds]
rubie has quit [Ping timeout: 265 seconds]
francoi__ has quit [Remote host closed the connection]
lkba has joined #ruby
haraoka has joined #ruby
<undeadaedra> Hello
GitGud has quit [Changing host]
GitGud has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
corehook_ has quit [Remote host closed the connection]
<jhass> morning
lkba has quit [Remote host closed the connection]
corehook has joined #ruby
corehook has quit [Client Quit]
sandstrom has joined #ruby
francoi__ has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
aganov has joined #ruby
RegulationD has joined #ruby
Dopagod has joined #ruby
Dopagod has quit [Changing host]
Dopagod has joined #ruby
pleiosaur has quit [Remote host closed the connection]
pyon has quit [Quit: I have irrefutable proof that D < 0. It follows trivially from 2D > 3D, which is obviously true.]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
ReK2 has quit [Quit: Konversation terminated!]
ta has quit [Remote host closed the connection]
GitGud has quit [Quit: Leaving]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agent_white has joined #ruby
GitGud has joined #ruby
tomaz_b has joined #ruby
starfox_sf has quit [Ping timeout: 250 seconds]
pyon has joined #ruby
<agent_white> Today you are you, this is truer than true, there is noone alive who is youer than you.
Scroff has joined #ruby
bigkevmcd has joined #ruby
mister_solo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dg-ratiodata has joined #ruby
<jhass> - The 8 ball
Scroff has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
<agent_white> jhass: It always told me "try again" :(
tomphp has joined #ruby
Scroff has joined #ruby
<jhass> make a better one
<jhass> in ruby
bigkevmcd has quit [Client Quit]
RegulationD has quit [Ping timeout: 252 seconds]
bigkevmcd has joined #ruby
<undeadaedra> >> ["Try again"].sample
<ruboto> undeadaedra # => "Try again" (https://eval.in/383582)
Voker57 has quit [Ping timeout: 250 seconds]
pleiosaur has joined #ruby
<agent_white> jhass: I could write a "fortune" program in ruby for terminals... but it'd be Dr.Seuss quotes :D
dumdedum has quit [Ping timeout: 246 seconds]
skade has joined #ruby
langlands has joined #ruby
allomov has joined #ruby
_blizzy_ has joined #ruby
livathinos has joined #ruby
<jhass> apparently I did a python version https://gist.github.com/jhass/2762698
konsolebox has quit [Quit: Leaving]
ndrei has joined #ruby
roolo has joined #ruby
revath has joined #ruby
strixd has quit [Quit: 500]
senayar has joined #ruby
senayar has joined #ruby
alem0lars__ has joined #ruby
ahmetkapikiran has joined #ruby
_blizzy_ has quit [Ping timeout: 256 seconds]
apoplexy has quit [Ping timeout: 265 seconds]
<agent_white> jhass: Ooo!
Spami has quit [Quit: This computer has gone to sleep]
<agent_white> That's actually a good idea for a lil project. I haven't programmed in... 3-4 months. Need some good lil starter stuff to work on :D
darkf has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
<agent_white> jhass: I'll fork it. There's an issue that it doesn't include the fortune "It'
<agent_white> "It's 5 o'clock somewhere." :P
ta has joined #ruby
<jhass> sure
keernel has joined #ruby
mikecmpbll has joined #ruby
<maloik> yorickpeterse: pirate costumes are encouraged!
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
rdark has joined #ruby
workmad3 has joined #ruby
<undeadaedra> yarr
Xeago has quit [Remote host closed the connection]
valkyrka has joined #ruby
dhjondoh has joined #ruby
krisquigley has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<abyss> I have a script: https://gist.github.com/anonymous/386e9f03f859cdb4c692 It for each line check if line contain one of the figure in ids array if yes do this between if and else if not then just print line... The question is, how I can expedite this script. I have about 3M lines and 30k id in array...
Xeago has joined #ruby
Hounddog has joined #ruby
alex88 has joined #ruby
sevensea_ has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
zenguy_pc has joined #ruby
dumdedum has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<bnagy> abyss: you need to check each of 3M lines for 30k values?
<bnagy> that's just going to be slow, I'm afraid
c0m0 has joined #ruby
<bnagy> you could try making the match into a single regexp
<bnagy> although I kind of threw up in my mouth suggesting it
<bnagy> there's Regexp.union
<bnagy> or you could sort your ids into ranges, possibly
sevenseacat has quit [Ping timeout: 264 seconds]
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
<ljarvis> I love Ruby, but it's really not a good fit for your job
<bnagy> I don't know if regexp unions will do that for you.. they might, actually
ta has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<bnagy> abyss: not creating your regexps in the read path will help, as well, those are expensive
jenrzzz has joined #ruby
<abyss> the files that I want to modify looks like this one: http://pastebin.com/whhQ2U04 but unfortunatelly UPDATE or INSERT can be divided into few lines.
<ruboto> abyss, as I told you already, please use https://gist.github.com
<ljarvis> ruboto: <3
haraoka has quit [Remote host closed the connection]
<jhass> abyss: for starters you can avoid matching each line twice by passing a block to gsub
nEosAg has quit [Quit: Page closed]
devyn_ has quit [Ping timeout: 264 seconds]
stardiviner has joined #ruby
mister_solo has quit [Ping timeout: 276 seconds]
<bnagy> well that's post-match, though, so it's a suboptimisation :P
arup_r has joined #ruby
<jhass> huh?
michael_mbp has joined #ruby
<bnagy> well the if is what's guaranteed to run 3 million times
ndrei has quit [Ping timeout: 252 seconds]
<bnagy> I don't know how many times the gsub will run
<jhass> I'm saying don't do the if
<bnagy> oic.. yeah that's probably good
<bnagy> can reuse the block then as well
fabrice31_ has joined #ruby
<bnagy> I think pre-creating the regexes is going to be big, though
<bnagy> followed by combining them
<jhass> regexp = /\b(#{Regexp.union(ids)})\b/; ... file2.write(line.gsub(regexp) { $1.to_i+1000 })
<abyss> I'm using ruby 1.8 btw;)
<ddfreyne> yorickpeterse: SoundCloud > your company
<jhass> abyss: well, don't
<jhass> abyss: just upgrade. now.
<ddfreyne> abyss: Upgrade!!!
<abyss> ;)
<sevensea_> lol ruby1.8
<ljarvis> !
<abyss> yeah, the system I do this is old
<jhass> doesn't matter. upgrade.
<ljarvis> all together now
<undeadaedra> eh, maybe you're talking with someone in the past!
<undeadaedra> see any dinosaurs?
k3asd` has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhjondoh has quit [Quit: dhjondoh]
fabrice31 has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<bnagy> >> Regexp.union %w(10 20 30 40 50 60) # boo :(
<ruboto> bnagy # => /10|20|30|40|50|60/ (https://eval.in/383588)
<jhass> after you upgraded, reading larger chunks than a line should help too
<bnagy> hoped it would be able to build ranges
dhjondoh has joined #ruby
<bnagy> guess I still don't know what the internal engine builds
sevensea_ is now known as sevenseacat
marr has joined #ruby
<jhass> bnagy: pretty sure Regexp.union is just a Regexp.new(args.join("|"))
sharpmachine has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ndrei has joined #ruby
<bnagy> but that should compile into something inside the regexp engine, no?
j4cknewt has joined #ruby
<jhass> uh perhaps but you'll never see that version
tkuchiki has joined #ruby
dmolina has joined #ruby
Dopagod has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Ping timeout: 244 seconds]
ta has joined #ruby
senayar has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 246 seconds]
<abyss> to sum it up, first I should using newer ruby but second I should somehow put regexp = /\b(#{Regexp.union(ids)})\b/; ... file2.write(line.gsub(regexp) { $1.to_i+1000 }) in my code, yes?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
Ropeney has joined #ruby
Xeago has quit [Remote host closed the connection]
<jhass> well, that should be faster, yes, albeit it might bloat memory too much, we're not sure yet
iwishiwerearobot has quit [Quit: Be back later ...]
<jhass> 3) read larger chunks than a line, I'd try 64Kb or 128Kb
last_staff has joined #ruby
oo_ has joined #ruby
Xeago has joined #ruby
pwnz0r has quit [Remote host closed the connection]
Ropeney has quit [Client Quit]
<bnagy> going to have some issues then I think at the chunk borders
_jesterfraud is now known as jesterfraud
<jhass> hm, true
<bnagy> nothing insurmountable, but needs to be done
<jhass> now I want to write an optimized parser for that in crystal but it's no fun without the data :/
Ropeney has joined #ruby
<bnagy> :D
Ropeney has quit [Client Quit]
dhjondoh has quit [Quit: dhjondoh]
Xeago has quit [Read error: Connection reset by peer]
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
Xeago_ has joined #ruby
Pupeno has joined #ruby
<jhass> I mean you don't need much, flag to check whether you're inside the word boundary, consume digits into a temp buffer, replace digits if match else write input to target
chussenot has joined #ruby
<jhass> use BufferedIO and done
spider-mario has quit [Remote host closed the connection]
Zai00 has joined #ruby
houhoulis has quit [Remote host closed the connection]
chussenot has quit [Client Quit]
workmad3 has joined #ruby
Rarikon has joined #ruby
Xoro has quit [Ping timeout: 244 seconds]
Xeago_ has quit [Remote host closed the connection]
nEosAg has joined #ruby
nEosAg has quit [Client Quit]
senayar has joined #ruby
chussenot has joined #ruby
DEA7TH has joined #ruby
chussenot has quit [Client Quit]
GPrime has joined #ruby
stan has joined #ruby
GitGud has left #ruby ["Leaving"]
workmad3 has quit [Ping timeout: 250 seconds]
<abyss> jhass: I don't know what you mean with that chunks sorry:(
Xeago has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
<bnagy> abyss: try the other stuff first
<bnagy> when you're checking 30k things per line the cost of reading one line is not the first thing you optimise
zotherstupidguy has joined #ruby
quimrstorres has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
mdih has joined #ruby
nickfausnight has quit [Quit: Connection closed for inactivity]
<jhass> well, my thought by increasing the chunk size is more less transitions Ruby <-> C <-> Oniguruma
iwishiwerearobot has joined #ruby
<ljarvis> all that glorious memory
<bnagy> jhass: not saying it's a bad idea :)
<bnagy> tbh I would just read everything into memory. :D
chussenot has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
<bnagy> who cares about code for poor people with < 16G RAM?
<yorickpeterse> morning
<yorickpeterse> ddfreyne: boooo
<ljarvis> bnagy: yeah but then Ruby will shit itself when it tries to do anything with all of it :D
charliesome has quit [Quit: zzz]
<bnagy> jruby! \o/
<bnagy> I used to love running jruby -Xmx 100g :P
fabrice31_ has quit [Remote host closed the connection]
<undeadaedra> wat
<apeiros> that's a nice home computer you have :D
haxrbyte has joined #ruby
fabrice31 has joined #ruby
<ljarvis> a nice home supercomputer
<bnagy> it actually has more ram than ssd :/
<maloik> lol
Axy has quit [Read error: Connection reset by peer]
<ljarvis> how does that even get used
<bnagy> running 100 windows VMs
<ljarvis> mother of god
edwinvdg_ has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
__main__ has quit [Ping timeout: 272 seconds]
<bnagy> not at the same time as jruby, obvs ^_^
edwinvdgraaf has joined #ruby
sleungcy has quit [Quit: Connection closed for inactivity]
<apeiros> I guess I should ask what hardware our VM hosts use
<undeadaedra> computer hardware.
<apeiros> -.-
<apeiros> imaginary hardware
sepp2k has joined #ruby
<bnagy> true story - when I first set it up I found a bunch of kvm kernel bugs due to unneccessary lock contention
subtwo has joined #ruby
<bnagy> just nobody had run across it before :/
Mia has joined #ruby
Mia has joined #ruby
jenrzzz has joined #ruby
<bnagy> anyway, those boxes are old now :`( new moar tin
tomaz_b has quit [Quit: Leaving]
haxrbyte has quit [Ping timeout: 256 seconds]
GreatSUN has joined #ruby
<GreatSUN> hi all
<GreatSUN> short question onto documentation
<GreatSUN> if you have a method def test(var1, var2, &block)
devyn has joined #ruby
<GreatSUN> would you document &block?
<undeadaedra> yes
<GreatSUN> how?
<GreatSUN> as a param?
<undeadaedra> depends on what you use for documentation
<GreatSUN> yard
<undeadaedra> yard has tags for yield
<GreatSUN> aha? ok, I didn't see that
<GreatSUN> thx
mister_solo has joined #ruby
lee-jon has joined #ruby
fabrice31_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
balazs has joined #ruby
fgo has joined #ruby
rindolf has joined #ruby
khebbie has joined #ruby
Al3ks has joined #ruby
__main__ has joined #ruby
LMity has joined #ruby
agent_white has joined #ruby
skade has joined #ruby
oo_ has joined #ruby
giuseppesolinas has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
fgo has quit [Ping timeout: 244 seconds]
balazs has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
withnale_ has joined #ruby
workmad3 has joined #ruby
dhjondoh has joined #ruby
<abyss> jhass, bnagy: ok thank you, I will try to do different approach
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<apeiros> abyss: still working on your problem from yesterday?
yh has joined #ruby
<apeiros> GreatSUN: btw., don't use &block if you don't pass the block on to another method. use yield/block_given? instead.
<yh> Hi guys, can anyone recommend a good way of storing data in memory across multiple invocations of a Ruby application?
<abyss> apeiros: yes;) Now the script is too slow;) I have something like this: https://gist.github.com/anonymous/8e8bb7f376fce8d3cef1 Unfortunatelly I had cut off checking by INSERT UPDATE etc because INSERTS UPDATES can be divided into few lines, not only one:(
<abyss> *I had to cut off
<yorickpeterse> yh: yes: don't store it in memory
<apeiros> abyss: are all numbers which can occur in the file IDs?
<yorickpeterse> yh: when the process dies so does the memory, so you have to store it externally somewhere
<yorickpeterse> that can either be a file, a database, etc
bMalum has quit [Quit: bMalum]
<abyss> apeiros: sorry I don't know what you're asking about :(
LMity has quit [Ping timeout: 265 seconds]
<apeiros> abyss: in your "dump-to-database-test-1" file, are there numbers in it which are not IDs?
<abyss> but I checking each line if contain one of the figure in ids array
<abyss> dump-to-database-test-1 is the file after changing it's outcome
msgodf has joined #ruby
auzty has quit [Quit: Leaving]
<apeiros> abyss: right. correction: in your "test.sql" file, are there numbers in it which are not IDs?
<yh> yorickpeterse: ah, was thinking stuff like POSIX shm_open
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
<abyss> apeiros: yes, there are. File looks like this one: https://gist.github.com/anonymous/4f80127d871bf60c771a but ofcourse in that extract there's no updates/insert divided to many lines (but in main files there are)
<bnagy> yh: I don't know if it's debian specific, but those create a /dev/shm automatically
jas02 has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
<bnagy> for osx a regular user can mount a ramdisk
<yh> bnagy: is that a problem?
<apeiros> abyss: so you just hope that you don't accidentally change another number?
<bnagy> no, it's good
<yorickpeterse> yh: IIRC Ruby has some stuff in stdlib for in-memory storage that can be backed up to a file/loaded from it
<yorickpeterse> lemme see if I can find it
allomov has quit [Remote host closed the connection]
bMalum has joined #ruby
<abyss> so I need to change everything in SET INSERT_ID and insert/updates/deletes that contain some of the figure from ids array, but updates/insert can be divided into few lines
<abyss> apeiros: yes;)
<apeiros> abyss: that sounds very brittle
<yorickpeterse> Ah yes found it
<yorickpeterse> probably not webscale though
<bnagy> probably not anything-scale
<bnagy> anyway I thought pstore persisted to disk, aren't we talking about persisting to ram?
edwinvdg_ has joined #ruby
svoop has joined #ruby
<apeiros> abyss: SET INSERT_ID always has this form: "SET INSERT_ID=<number>"?
migbar has joined #ruby
<abyss> apeiros: yeah, but I presume that it unlikely to ease the pain;)
<abyss> apeiros: yes
<apeiros> abyss: btw., you can edit gists. that way they have a revision and we can see how the file changed
<apeiros> instead of pasting a new gist every time
roshanavand has joined #ruby
<abyss> oh, I didn't know that, thank you.
hectortrope has joined #ruby
roshanavand has quit [Max SendQ exceeded]
<apeiros> abyss: do the others have a fixed format too?
ponga has quit [Quit: Connection closed for inactivity]
<abyss> apeiros: but I need to log in?
roshanavand has joined #ruby
<apeiros> abyss: or keep the browser session open, yes
<apeiros> at least I think anonymous can edit during a session
timonv has joined #ruby
<abyss> apeiros: INSERT INTO, DELETE, UPDATE always begin the same, but the rest is arbitrary I mean for example it can be divided into separe lines etc
edwinvdgraaf has quit [Ping timeout: 256 seconds]
<Ox0dea> abyss: Sounds like you need a SQL parser.
A205B064 has quit [Ping timeout: 264 seconds]
<apeiros> abyss: can you make 3 examples of UPDATE which differ a lot in your opinion?
<jhass> abyss: maybe we're approaching this in a completely wrong way. Why do you have to change the IDs?
mgeek has joined #ruby
<mgeek> Hey, have you heard about WebAssembly?
<jhass> abyss: and why do you need to do it on the dump opposed to say importing it into a (temporary) DB and changing the data there?
<jhass> ?ot mgeek
<ruboto> mgeek, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
konieczkow has quit [Ping timeout: 256 seconds]
<hanmac1> its very fun when someones who has NO exp with html are working on something like joomla ;P
ZOMGITSABEAR has joined #ruby
<jhass> hanmac1: ^ too
<ZOMGITSABEAR> hey guys
multi_io has quit [Ping timeout: 245 seconds]
<mgeek> Suddenly, we keep ##ruby clean, lol ok.
bigkevmcd has quit [Remote host closed the connection]
<jhass> nah, you can do whatever you ant in ##ruby :P
<hanmac1> recently i found that they put the <input> inside <label> elements ... that this doesnt work had no one tested before it seems ;P
<jhass> *want
<abyss> apeiros: it's how the divided line can looks like: https://gist.github.com/anonymous/25c29a297de2c61d350e
<mgeek> Actually, I was gonna ask if WebAssembly will provide Ruby and what you think about it.
bigkevmcd has joined #ruby
<ZOMGITSABEAR> what is ##ruby?
<apeiros> mgeek: didn't jhass just tell you to ask that in #ruby-offtopic?
<mgeek> apeiros: No, this is a difference question.
multi_io has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Copperfield has joined #ruby
<apeiros> mgeek: ok. true, I only read until webassembly and sighed there :)
<abyss> jhass: I have databases old database which shouldn't be restored unfortunately the client spot this after few days so into that database some operations has been done. Now I have the right database from 1.06.2015
railsraider has joined #ruby
<jhass> mgeek: I think opal will be able to draw some optimizations from it, maybe someone gets mruby to run but I don't think MRI will happen
<apeiros> mgeek: I doubt full ruby is suitable for webassembly. but mruby might be a good fit.
<abyss> now everything from 1.06.2015 to today I need move to that database from 1.06.2015
<apeiros> eh, seems jhass shares my opinion :D
tkuchiki has joined #ruby
ZOMGITSABEAR has left #ruby [#ruby]
<jhass> abyss: I'm sorry but I'm not sure I follow
zotherstupidguy has quit [Read error: Connection reset by peer]
<apeiros> abyss: oy, what's ^M again? I'm not a vim/emacs/whatevereditorthatis user
<jhass> your explanation seems to assume some application context
<abyss> apeiros: oh, now I see you asked about that sql that changing something in my opinion. Do you need more examples?
<jhass> abyss: and again, why is importing to a temporary DB not an option?
GitGud has joined #ruby
<GitGud> people here are such gems <3
<apeiros> abyss: would be good. especially ones which differ in your opinion (but same type of query - that is, all should be e.g. INSERTs)
zotherstupidguy has joined #ruby
<GitGud> i'm going to learn ruby
lee-jon has quit [Quit: lee-jon]
<jhass> good
sigurding has quit [Quit: sigurding]
<abyss> apeiros: new lines, I can remove it. Don't worry about that:)
<apeiros> abyss: ^M is \n? ok
<wasamasa> and ^J is \r
<abyss> apeiros: yes
zudochkin has joined #ruby
<abyss> jhass: I didn't say that:) Each option is ok if I able to restore the data;)
<apeiros> temporary db sounds actually like an excellent way
<jhass> yep
<apeiros> that way you can manipulate the data using sql
<apeiros> then dump again
<apeiros> and import that
nofxx has quit [Ping timeout: 276 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
<abyss> jhass: but it will not so easy because customers set up again theirs accounts because they didn't know about issue. So I will have duplicates.
starfox_sf has joined #ruby
<jhass> abyss: and you don't have by editing the dump because...?
giuseppesolinas has quit [Quit: Leaving]
<abyss> yeah, but it's about 20000 inserts and something about similar with deletes and updates:( restoring binlog to clear database and do something on it is almost I suppose impossible.
quimrstorres has quit [Ping timeout: 265 seconds]
<abyss> jhass: yeah, I will edit dump instead of binlog, it would be easier. Great idea.
hanmac1 has left #ruby [#ruby]
sdothum has joined #ruby
quimrstorres has joined #ruby
<jhass> eh
<abyss> what?;)
startupality has joined #ruby
RegulationD has joined #ruby
<jhass> no, I better bail from this, sorry for wasting your time
<jhass> but I just don't get what your issue is and what you're doing at all
<jhass> not a single bit
dionysus69 has joined #ruby
lee-jon has joined #ruby
<yorickpeterse> "Get autosacling group" ok I need more sugar in my tea
* apeiros puts sugar in yorickpeterse's tea
<abyss> jhass: sorry, my english isn't so good, maybe I didn't catch something... But you and apeiros ease my pain because I didn't sink in that I can do it by restore binlog, dump that data from binlog, increase ids, and then merge this. Thank you.
* undeadaedra puts tea in yorickpeterse's sugar
starfox_sf has quit [Ping timeout: 250 seconds]
<yorickpeterse> D:
Squarepy has joined #ruby
<undeadaedra> >:]
zudochkin has quit [Remote host closed the connection]
ylla has quit [Ping timeout: 252 seconds]
bMalum has quit [Quit: bMalum]
RegulationD has quit [Ping timeout: 276 seconds]
skade has joined #ruby
codecop has joined #ruby
mojsmiesznynick has joined #ruby
oo_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
cyong has quit [Quit: Leaving.]
ndrei has joined #ruby
kayloos has joined #ruby
kayloos has quit [Read error: Connection reset by peer]
kayloos has joined #ruby
kayloos has quit [Read error: Connection reset by peer]
kalusn has quit [Ping timeout: 276 seconds]
vondruch has quit [Ping timeout: 276 seconds]
rikkipitt has joined #ruby
kayloos has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
dEPy has joined #ruby
petruchito has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
sigurding has joined #ruby
f3lp has quit [Quit: Leaving]
bMalum has joined #ruby
Cust0sLim3n has quit [Ping timeout: 272 seconds]
x44x45x41x4E has joined #ruby
lavros has joined #ruby
oo_ has joined #ruby
<shevy> guys
ndrei has quit [Ping timeout: 245 seconds]
<shevy> please don't spit in each other's tea
lordkryss has joined #ruby
<arup_r> hahaha
<arup_r> shevy: why so ?
* undeadaedra steals shevy tea
anisha has quit [Quit: Leaving]
bMalum has quit [Quit: bMalum]
x44x45x41x4E has quit [Ping timeout: 246 seconds]
bMalum has joined #ruby
svoop has quit [Read error: Connection reset by peer]
Cust0sLim3n has joined #ruby
Igorshp has joined #ruby
<kitallis> is there a library that can detect mime types of remote files without having to download the entire thing?
<kitallis> mimemagic does it, but for remote, you have to feed it the entire blob
<kitallis> something like fastimage but for any file
<yorickpeterse> If it's over HTTP you can do a HEAD request and check the Content-Type header
<ljarvis> ^
<kitallis> fastimage is clever because it only partially reads the file, header
unshadow has joined #ruby
<jhass> kitallis: some file formats you can only recognize by looking at the last few bytes
<undeadaedra> but file format information are not always at beginning of file
ndrei has joined #ruby
<kitallis> yeah, I meant fastimage does that, because images usually have it in the header (I believe)
mister_solo has quit [Ping timeout: 265 seconds]
<undeadaedra> because image file formats usually have information in the first bytes, yes
CamonZ has joined #ruby
<undeadaedra> but there's no determined “header” format, each file format choose how to format information
fujimura has quit [Remote host closed the connection]
gheegh has joined #ruby
fujimura has joined #ruby
froots_0xff has joined #ruby
stamina has joined #ruby
Papierkorb has joined #ruby
dgutierrez1287 has joined #ruby
yh has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
JimBurns83 has quit [Ping timeout: 265 seconds]
Jimtemp has joined #ruby
Jimtemp has quit [Client Quit]
migbar has quit [Remote host closed the connection]
migbar has joined #ruby
allomov has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
allomov has joined #ruby
migbar has quit [Read error: No route to host]
fujimura has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
fujimura has joined #ruby
oo_ has joined #ruby
startupality has quit [Quit: startupality]
rikkipitt has quit [Quit: Leaving...]
atomical_ has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
x44x45x41x4E has joined #ruby
atomical has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
bruno- has joined #ruby
fujimura has quit [Ping timeout: 245 seconds]
anisha has joined #ruby
lavros has quit [Ping timeout: 272 seconds]
lavros has joined #ruby
scx has joined #ruby
<scx> hello
yaw has joined #ruby
<scx> what is the best way to implement singleton class in ruby?
platzhirsch has joined #ruby
<yorickpeterse> include Singleton
vondruch has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
bruno- is now known as Guest24828
Akagi201 has quit [Remote host closed the connection]
Copperfield has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 250 seconds]
vondruch_ has quit [Ping timeout: 276 seconds]
sigurding has quit [Quit: sigurding]
konieczkow has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
oo_ has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
konieczkow has quit [Ping timeout: 252 seconds]
hakunin has quit [Remote host closed the connection]
sharpmachine has joined #ruby
__main__ has quit [Ping timeout: 246 seconds]
migbar has joined #ruby
hakunin has joined #ruby
fabrice31 has joined #ruby
califerno has joined #ruby
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has quit [Ping timeout: 256 seconds]
mandarinkin has joined #ruby
fgo has joined #ruby
lavros has quit [Quit: leaving]
jmferreira has joined #ruby
ndrei has joined #ruby
hakunin has quit [Ping timeout: 265 seconds]
sharpmachine has quit [Ping timeout: 276 seconds]
wookiehangover has quit [Ping timeout: 252 seconds]
<scx> yorickpeterse: Is it necessary to use Mysingletonclass.instance.mymethod? Why just not use Mysingletonclass.mymethod?
<apeiros> scx: with the latter you'd have to ensure it's instantiated before the first call
<apeiros> but sure, you can do it: `MySingleton = MySingletonClass.instance` now you can use `MySingleton.my_method`
lxsameer has quit [Ping timeout: 246 seconds]
<apeiros> alternatively you can delegate
galeido has joined #ruby
jmferreira has quit [Client Quit]
platzhirsch has quit [Ping timeout: 256 seconds]
dg-ratiodata has quit [Remote host closed the connection]
lxsameer has joined #ruby
segfalt has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
aridere has quit [Ping timeout: 256 seconds]
datanoise has joined #ruby
dg-ratiodata has joined #ruby
skade has joined #ruby
ndrei has joined #ruby
zudochkin has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lee-jon has quit [Quit: lee-jon]
hakunin has joined #ruby
startupality has joined #ruby
mister_solo has joined #ruby
mister_solo has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
zudochkin has quit []
tedstriker has joined #ruby
lee-jon has joined #ruby
mister_solo has joined #ruby
datanoise has quit [Ping timeout: 276 seconds]
lee-jon has quit [Client Quit]
zudochkin has joined #ruby
Musashi007 has quit [Quit: Musashi007]
lee-jon has joined #ruby
yh has joined #ruby
Iskarlar has joined #ruby
ahmetkapikiran has joined #ruby
penzur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mister_solo has quit [Ping timeout: 265 seconds]
khebbie has joined #ruby
roshanavand has quit [Remote host closed the connection]
hakunin has quit [Remote host closed the connection]
<ljarvis> it's sad that I never really thought to assign the instance to a constant
<ljarvis> although I rarely use singleton
lee-jon has quit [Quit: lee-jon]
arup_r has joined #ruby
lee-jon has joined #ruby
ylla has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Max SendQ exceeded]
roshanavand has joined #ruby
terlar has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 264 seconds]
ponga has joined #ruby
roshanavand has quit [Remote host closed the connection]
<apeiros> ljarvis: actually using const_missing it could even be initialized lazily
<ljarvis> aye
chinmay_dd has quit [Remote host closed the connection]
sigurding has joined #ruby
shock_one has joined #ruby
lee-jon has quit [Client Quit]
__main__ has joined #ruby
lee-jon has joined #ruby
chinmay_dd has joined #ruby
francoi__ has quit [Remote host closed the connection]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
dzejrou has joined #ruby
rodfersou has joined #ruby
lee-jon has quit [Client Quit]
ndrei has joined #ruby
balazs has joined #ruby
Siyfion has joined #ruby
<GreatSUN> apeiros: thanks for mentioning, in this case I am passing it on into another method
wookiehangover has joined #ruby
segfalt has quit [Quit: segfalt]
zotherstupidguy has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
zotherstupidguy has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
krz has quit [Quit: WeeChat 1.0.1]
NeverDie has joined #ruby
ponga has quit []
ponga has joined #ruby
livathinos has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
senayar has joined #ruby
zotherstupidguy has quit [Read error: Connection reset by peer]
zotherstupidguy has joined #ruby
wookiehangover has quit [Ping timeout: 265 seconds]
rubie has joined #ruby
wookiehangover has joined #ruby
barkerd427 is now known as zz_barkerd427
dgutierrez1287 has joined #ruby
Macaveli has joined #ruby
postmodern has quit [Quit: Leaving]
Al3ks has quit [Ping timeout: 276 seconds]
rodferso1 has joined #ruby
wldcordeiro_ has joined #ruby
wldcordeiro has quit [Ping timeout: 264 seconds]
zacts has quit [Ping timeout: 265 seconds]
<scx> I want to use OptionParser with subcommands. Is it good example or I should search something else?: https://gist.github.com/rkumar/445735
symm- has joined #ruby
zacts has joined #ruby
zacts has quit [Changing host]
zacts has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
arup_r has quit []
mister_solo has joined #ruby
k3asd` has quit [Remote host closed the connection]
<ljarvis> scx: thor is good for this kind of thing
krz has joined #ruby
rodfersou has quit [Ping timeout: 252 seconds]
k3asd` has joined #ruby
zenguy_pc has quit [Ping timeout: 264 seconds]
zenguy_pc has joined #ruby
_blizzy_ has joined #ruby
<bnagy> wat thor?
skade has quit [Quit: Computer has gone to sleep.]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
ponga has left #ruby [#ruby]
<bnagy> huh, looks cool. :)
erts has joined #ruby
WeebleWobble has joined #ruby
<WeebleWobble> r
<jhass> s
jgpawletko has joined #ruby
<agent_white> Using Curses in ruby, should I have the executable initialize the Curses stuff (init_screen,start_color,nonl,cbreak,noecho... etc.) ?
starfox_sf has joined #ruby
<WeebleWobble> Is Starfox Command worth buying
<agent_white> I'm just writing a simple inventory app, pretty much.
<jhass> ?ot WeebleWobble
<ruboto> WeebleWobble, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<WeebleWobble> I heard it was coming out for Virtual Console on the Wii U video game system
<WeebleWobble> i'm asking starfox_sf
<WeebleWobble> the animal voices in Starfox Command seem really off and horrible
<WeebleWobble> also is Starfox Command compatible with the Nintendo WiFi network
<WeebleWobble> fuck you jhass
<jhass> and by
<jhass> !ban WeebleWobble !T 1w troll
WeebleWobble was banned on #ruby by ChanServ [WeebleWobble!*@*]
WeebleWobble was kicked from #ruby by ChanServ [Banned: troll]
Wobble has joined #ruby
Wobble was kicked from #ruby by ChanServ [Banned: troll]
<agent_white> I wish there were more examples of Curses programs, other than ones from 3 years ago D:
<bnagy> surely you can find older ones than that, did you even try??
<agent_white> bnagy: Do I dare to? ;)
RegulationD has joined #ruby
<agent_white> Is it OK to initialize ncurses stuff in the binary, rather than in the first/main object I create?
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy> srsly though, just read C apps, probably
sharpmachine has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
<agent_white> bnagy: Yeah this is my second go-round of attempting ncurses in Ruby. Just trying to get it right. It _does_ seem most initialize ncurses in main().
rodferso1 has quit [Quit: leaving]
<agent_white> That way the screen is setup, as well as its modifiers...
rodfersou has joined #ruby
* agent_white solved his own question, with bnagy's help
<ljarvis> termbox <3
<agent_white> ;P
<bnagy> agent_white: ^^ I still +1 termbox
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has joined #ruby
starfox_sf has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
<agent_white> bnagy: Only thing that worries me is the last commit being from over a year ago :(
<bnagy> the ruby stuff? It's probably a binding
<agent_white> Curses, though turned into a gem, has last update from 8 days ago.
<bnagy> I only update bindings when they're broken *shrug*
<bnagy> or when upstream changes API or something
<agent_white> Ah true... but I'm still very new to programming. Haven't touched code in 4 months as-is, and before I was still new :D
<agent_white> So whatever is most reliable without me tinkering in the back-end is awesome.
<bnagy> I seem to recall there was an ffi binding as well, imvho I would look at that first, but w/e
<agent_white> I did use ncursesw before.
<bnagy> if you want nice menu-ey stuff curses is probably richer anyway
<agent_white> But checking out just curses this time.
RegulationD has quit [Ping timeout: 265 seconds]
sharpmachine has quit [Ping timeout: 252 seconds]
<agent_white> Yeah... TBH I'm honestly tempted to just go straight to coding it in C to avoid it all. I need a good excuse to learn it/crack open K&R anyways.
<agent_white> ;P
<agent_white> s/honestly//
<bnagy> hahahah hahah
<bnagy> C
* bnagy cries
<agent_white> I've wanted to learn it for a long time :)
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<shevy> agent_white still fighting with ncurses?
<agent_white> Classes in my university (at least... when I go back) are taught in C/C++.
<agent_white> shevy: Nope! Just starting :D
<undeadaedra> int main() { int problem_count = 99; }
<shevy> its name was wisely chosen
<agent_white> undeadaedra: But a bitch ain't one?
<undeadaedra> #include <bitch.h>
<agent_white> Ruby and C are languages I want to put into my coffee in the morning.
<apeiros> agent_white, undeadaedra: please don't.
<agent_white> apeiros: I'm good. Mom's spaghetti has filled my tummy quite enough.
<shevy> that b....!
<agent_white> bnagy: Why not C, though? It birthed Ruby, afterall?
bronson has joined #ruby
<apeiros> agent_white: I'm referring to your bitch joke. that's stuff for your regulars table, not here.
<agent_white> apeiros: I'm not sure what you mean. But I won't continue it.
<agent_white> :P
<shevy> agent_white what will you actually build with curses?
yh has quit [Ping timeout: 264 seconds]
<shevy> I tried the tic-tac-toe-example; that gem does not seem to work
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
skade has quit [Quit: Computer has gone to sleep.]
<agent_white> shevy: Basically just a minor inventory system :) I mix my own liquids for vaporizors/electronic cigs, so just making a simple recipe calculator and inventory-of-flavors thingy.
<shevy> cool
<agent_white> Ones out there require me to run Windows in some VM, so I'd rather just have it in a terminal here. :P
diegoviola has joined #ruby
senayar has quit [Remote host closed the connection]
commondream has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
<diegoviola> I'm trying to consume an API over HTTP / JSON, and I get a hash with an array that contains the hash, after I JSON.parse(res.body) I see lots of \r\n and so on
<diegoviola> should I get rid of those?
<undeadaedra> We must get rid of CRLF at once.
chussenot has quit [Quit: chussenot]
<Darkwater> s/\r\n/\n/g
<diegoviola> I'm also not sure why I get => ["type", "article_id", "url", "title", "body", "category_id", "search_score"] for j["results"][0].keys
<undeadaedra> what do you expect?
<agent_white> undeadaedra: I have markers in vim because I spent a few hours tryin to debug code with CRLF in it.
<diegoviola> shouldn't I get symbols instead?
<diegoviola> like :title, :body, and so on?
ahmetkapikiran has joined #ruby
<undeadaedra> no
<Darkwater> only if you set json to use symbols
<undeadaedra> hash keys can be anything, not only symbols
<diegoviola> how do I get symbols instead?
<ljarvis> but in json they can only be strings
<ljarvis> diegoviola: when you parse it, check the json docs
<diegoviola> ok
<ljarvis> >> JSON.parse("{'foo' => 'bar'}", symbols: true)
<ruboto> ljarvis # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/383714)
<ljarvis> >> require 'json'; JSON.parse("{'foo' => 'bar'}", symbols: true)
<ruboto> ljarvis # => 757: unexpected token at '{'foo' => 'bar'}' (JSON::ParserError) ...check link for more (https://eval.in/383715)
<ljarvis> MEH
<undeadaedra> :D
<Darkwater> lol
<undeadaedra> >> JSON.parse(%({"foo": "bar"}), symbols: true)
<ruboto> undeadaedra # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/383716)
<undeadaedra> erf
x44x45x41x4E has quit [Ping timeout: 265 seconds]
<undeadaedra> >> require 'json'; JSON.parse(%({"foo": "bar"}), symbols: true)
<ruboto> undeadaedra # => {"foo"=>"bar"} (https://eval.in/383717)
<ljarvis> oh I use a hash rocket LOL
<ljarvis> meh that's not the option name. It was a long shot
<Darkwater> oh no, it's because json doesn't accept ''
<Darkwater> i think
<Darkwater> just ""
<ljarvis> symbolize_names
tkuchiki has quit [Remote host closed the connection]
<undeadaedra> yeah, json is stupid
<undeadaedra> ljarvis: Active Support, iirc
<ljarvis> require 'json'; JSON.parse(%({"foo": "bar"}), symbolize_names: true)
<ljarvis> no
<yorickpeterse> yay 2nd aeron chair
<Darkwater> yeah that should work
* yorickpeterse feels posh
<ljarvis> >> require 'json'; JSON.parse(%({"foo": "bar"}), symbolize_names: true)
<ruboto> ljarvis # => {:foo=>"bar"} (https://eval.in/383718)
<Darkwater> boom
<ljarvis> ^
<Darkwater> 5 tries later
chussenot has joined #ruby
<ljarvis> yorickpeterse: you need two chairs?
<yorickpeterse> one at home, one at the office
<ljarvis> ah
<ljarvis> so "yes"
<ljarvis> nice one
<ljarvis> my chair is shit
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> peasant coworkers are all jelly
<undeadaedra> twist: working from home
<ljarvis> my sofa is quite comfy
<yorickpeterse> I pity your neck
<ljarvis> yorickpeterse: jesus fuck they're expensive
<yorickpeterse> :D
<yorickpeterse> my back is worth more than an aeron
<ljarvis> yeah I'll sit on my soap box
<bnagy> yorickpeterse: are you still talking about your chairs??
<bnagy> man it's been days o_0
<ljarvis> :D
Cust0sLim3n has quit [Ping timeout: 276 seconds]
<bnagy> you should try a swift dose of buddhism :P
<ljarvis> or a swift dose of stfu
<yorickpeterse> wut
Iskarlar has joined #ruby
tkuchiki_ has quit [Ping timeout: 265 seconds]
<shevy> lol
<shevy> do weight-lifting against your bad back yorickpeterse!
<yorickpeterse> oh hm, I should totally take a photo to show off
<bnagy> kids these days, it's all aerons, Rust and monads :<
nateberkopec has joined #ruby
aridere has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
phutchins has joined #ruby
edwinvdgraaf has joined #ruby
chipotle has joined #ruby
zudochkin has quit [Remote host closed the connection]
<yorickpeterse> s/Rust/Go
DroidBurgundy has joined #ruby
<yorickpeterse> my chair is pretty monadic though
<bnagy> . o O ( he knows my weak spot )
<yorickpeterse> no side effects too
<yorickpeterse> besides a higher social status
<bnagy> hahah
Xeago has quit [Remote host closed the connection]
ldnunes has joined #ruby
chussenot has quit [Quit: chussenot]
Al3ks has joined #ruby
arturhoo has joined #ruby
<shock_one> yorickpeterse: you know that if your chair is monadic, you can't get out of it, right? However, if you're sitting on a chair on a chair, you can join those two.
dwithers is now known as pl1ght
senayar has joined #ruby
svoop has joined #ruby
francoi__ has joined #ruby
<bnagy> we have now reached Peak Bay Area Humour
<yorickpeterse> hmmmmmm
x44x45x41x4E has joined #ruby
<yorickpeterse> hmmmm
Cust0sLim3n has joined #ruby
edwinvdg_ has joined #ruby
<yorickpeterse> shock_one: this chair and I will be one
k3asd` has quit [Ping timeout: 256 seconds]
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arturhoo has quit [Ping timeout: 250 seconds]
ItSANgo__ has joined #ruby
startupality has quit [Quit: startupality]
arturhoo has joined #ruby
centrx has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
zudochkin has joined #ruby
<shevy> lol
<shevy> love letters to a chair
<shevy> the monitor is quite far away though
<yorickpeterse> well, it's probably the only thing that gets to touch my butt ~9 hours a day
<yorickpeterse> my monitor is just a voyeur
<yorickpeterse> but yeah, I pulled it closer a bit
<yorickpeterse> My previous chair was a bit less long (forward wise)
<yorickpeterse> So I could sit closer to it
<undeadaedra> ( ͡° ͜ʖ ͡°)
<yorickpeterse> heheh
<yorickpeterse> "oh aeron you're so big"
but3k4 has joined #ruby
<shock_one> Speaking of monads, can anybody explain me how the Y combinator works? I've been trying to understand it for hours, and now can even write it from the top of my head, but I still don't get all those bindings. https://gist.github.com/shockone/47431c0096964abe14d1
<yorickpeterse> shock_one: they work by donating money to crappy startups
* yorickpeterse runs
<shock_one> :|
micmus has joined #ruby
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
charliesome has joined #ruby
<yorickpeterse> shock_one: but what part is confusing you in this Gist?
endash has joined #ruby
stardiviner has quit [Ping timeout: 245 seconds]
<abyss> apeiros: jhass guys I think operating on binlog will be easier, because it's hard to do something or merge inserts only (and some inserts don't have autoincrement fileds:/). I need updates and deletes as well...
migbar has quit []
<shock_one> Let's start from the simplest question: line 9 and the function passed on the lines 11-13 are identical (because if you wrap the former one in a function and call it, you'll get the same result). How can I define it in one place and then use twice?
<shock_one> yorickpeterse: also, I know that somewhere we pass a parameter which is never used. Where is that?
<diegoviola> #map always returns an array, no?
<shock_one> diegoviola: yes.
<diegoviola> okay
mojsmiesznynick has quit [Quit: Page closed]
<diegoviola> I thought it was the same as each, that it just printed the result instead
hoov has joined #ruby
<yorickpeterse> shock_one: all params are used
charliesome has quit [Ping timeout: 265 seconds]
endash has quit [Ping timeout: 256 seconds]
serivichi has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
<shock_one> yorickpeterse: correct. But on one of the iterations one of the params is not.
<yorickpeterse> You also can't re-use any functions here, since they all do different things (as far as I can tell)
<yorickpeterse> shock_one: per jshint all params are used
endash has joined #ruby
<yorickpeterse> so I'm fairly sure they are :P
mengu has joined #ruby
mister_solo has quit [Ping timeout: 252 seconds]
<shock_one> yorickpeterse: I've updated the gist to better show the identical functions.
allomov has quit [Remote host closed the connection]
hildgrim has joined #ruby
x44x45x41x4E has quit [Ping timeout: 244 seconds]
tsvenson|afk has quit [Quit: Leaving]
<apeiros> diegoviola: Array#map, Enumerable#map and Hash#map do. other than that - it's an ordinary method and returns whatever the implementor makes it return…
tsvenson has joined #ruby
allomov has joined #ruby
dg-ratiodata has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 264 seconds]
<yorickpeterse> ah
denver has joined #ruby
<shock_one> yorickpeterse: It calls itself recursively, right? On one of the iterations f is not evaluated. Which f is that?
claptor has quit [Quit: this channel is bakas]
<hildgrim> Stupid question; how can i manage to combine strings in arrays like this http://pastebin.com/9q2NDNjE
<ruboto> hildgrim, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3a5b956709c1880def3c
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<yorickpeterse> shock_one: how do you know it's not evaluated?
<hildgrim> oops
ndrei has joined #ruby
<shock_one> hildgrim: a.zip(b).map(&:join)
<hildgrim> shock_one: aha! .zip!
<hildgrim> thank you very much
senayar has quit [Remote host closed the connection]
<shock_one> hildgrim: beware that arrays must be of the same length.
<diegoviola> apeiros: ok ty
Xeago has joined #ruby
<shock_one> yorickpeterse: I've read a couple of tutorials, and they say there is a point when the parameter is not evaluated.
<hildgrim> shock_one: aha :(
<yorickpeterse> shock_one: looking at this Gist I can only think that those tutorials are full of shit
konieczkow has joined #ruby
<yorickpeterse> unless I'm blind all parameters are being used
<shock_one> yorickpeterse: and it's a big deal, because otherwise it would evaluate infinitely.
iamninja has quit [Ping timeout: 256 seconds]
<yorickpeterse> shock_one: No
milesmatthias has joined #ruby
<yorickpeterse> https://gist.github.com/shockone/47431c0096964abe14d1#file-y-js-L3 here on line 3 if x <= 1 it will unwind the call stack
<abyss> apeiros: do you have maybe idea how to change this updates with couples lines?
<apeiros> abyss: still waiting for your examples
<apeiros> because IMO with the file modification approach, you should change completely how you go about it. but that depends on your actual input.
lessless has joined #ruby
j4cknewt has joined #ruby
<abyss> apeiros: yeah? I gave one. OK, I'm going to paste some. I will give in one file some examples with long updates and normal in one file.
<diegoviola> what happened with #ruby-lang?
dzejrou has quit [Ping timeout: 264 seconds]
<apeiros> one is not sufficient. the question is how regular your input is
<apeiros> diegoviola: it got merged
<diegoviola> apeiros: finally
ahmetkapikiran_ has joined #ruby
<diegoviola> really?
dumdedum has quit [Ping timeout: 246 seconds]
<diegoviola> I will not believe that until they add a redirect #ruby-lang > #ruby
failshell has joined #ruby
<apeiros> -.-
ahmetkapikiran has quit [Ping timeout: 244 seconds]
ahmetkapikiran_ is now known as ahmetkapikiran
Rapier- has joined #ruby
<diegoviola> sorry
<apeiros> diegoviola: that is in place for weeks now.
konieczkow has quit [Ping timeout: 256 seconds]
<apeiros> a redirect
<diegoviola> #ruby-lang: Cannot join channel (+i) - you must be invited
<jhass> diegoviola: it doesn't happen if you're already in the target channel
<diegoviola> I'm getting this
quimrstorres has quit [Read error: Connection reset by peer]
<diegoviola> hrm, let's see
diegoviola has left #ruby ["WeeChat 1.2"]
diegoviola has joined #ruby
<diegoviola> oh wow...
<apeiros> congrats
chinmay_dd has quit [Remote host closed the connection]
quimrstorres has joined #ruby
valkyrka has quit [Quit: valkyrka]
dhjondoh has joined #ruby
<lessless> folks, how to get an array of associated record ids?
zz_barkerd427 is now known as barkerd427
<apeiros> lessless: context.
micmus has quit [Quit: Leaving]
<shock_one> lessless: what is that?
<lessless> this.get('model.association_ids') returns nothing
sharpmachine has joined #ruby
<apeiros> lessless: wrong channel?
<shock_one> #pluck
<apeiros> ruby doesn't have `this`
<lessless> yeah
<jhass> lessless: welcome to the Ruby programming language channel
<lessless> :)
<jhass> your sample looks like ember.js
mdih has quit [Ping timeout: 265 seconds]
micmus has joined #ruby
quimrstorres has quit [Remote host closed the connection]
micmus has quit [Client Quit]
ahmetkapikiran has quit [Client Quit]
micmus has joined #ruby
<abyss> apeiros: https://gist.github.com/anonymous/64514e6991b57a8b294c this is better example?
senayar has joined #ruby
senayar has joined #ruby
startupality has joined #ruby
yardenbar has quit [Quit: Leaving]
hildgrim has left #ruby [#ruby]
sharpmachine has quit [Ping timeout: 246 seconds]
<abyss> apeiros: the file is not regular at all. But there is always something between begin and commit. And I need to chagne id = '11446' (in that long update) for example if this id is in my array.
last_staff has quit [Quit: last_staff]
al2o3-cr has quit [Ping timeout: 245 seconds]
startupality has quit [Client Quit]
chinmay_dd has joined #ruby
startupality has joined #ruby
yh has joined #ruby
NeverDie has quit [Remote host closed the connection]
dgutierrez1287 has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
stardiviner has joined #ruby
lee-jon has joined #ruby
skade has joined #ruby
<apeiros> abyss: from where do you have your id's list then?
<apeiros> I mean from where do you know which id's you have to increment?
chussenot has joined #ruby
dumdedum has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
<abyss> I put everything to separate file and I did something like this: awk -F'=' '/INSERT_ID/ {print $2}' binlog-restore-20150614-1230-slice|sed 's/\/\*\!\*\/\;//g' > id_to_change so I put everything from INSERT_ID=figure and put to file
edwinvdgraaf has joined #ruby
<abyss> each number from SET INSERT_ID=number should be increased.
yh has quit [Read error: Connection reset by peer]
yh has joined #ruby
spyderman4g63 has joined #ruby
ahmetkapikiran has joined #ruby
veinofstars has quit [Quit: veinofstars]
<apeiros> ok. that gets me back to regularity. I doubt it's irregular. you have a couple of tables. and it'll always be `INSERT INTO <table> (<columns>) VALUES (<values>)`
veinofstars has joined #ruby
<apeiros> and IMO you should collect all the different tables and how their INSERT/UPDATE queries look like
<apeiros> and figure which of their columns are ID columns which need replacement
ahmetkapikiran has quit [Client Quit]
<apeiros> because then you can process the file much more efficiently
jonathanwallace_ has quit [Ping timeout: 252 seconds]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has quit [Quit: bMalum]
anisha has quit [Quit: Leaving]
francoi__ has quit [Remote host closed the connection]
zudochkin has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
davedev24_ has joined #ruby
zudochkin has joined #ruby
jefus has left #ruby ["Leaving"]
Xeago has quit [Remote host closed the connection]
guillaume-rb has joined #ruby
yh has quit [Ping timeout: 264 seconds]
francoi__ has joined #ruby
commondream has quit [Remote host closed the connection]
sgambino has joined #ruby
Xeago has joined #ruby
<abyss> apeiros: you mean I should extract all insert/update/delete and then do something with this file?
<apeiros> no
Cust0sLim3n has quit [Ping timeout: 276 seconds]
<apeiros> I mean you should figure out the pattern. and use that. instead of hoping that you don't accidentally change the wrong number.
yh has joined #ruby
<apeiros> abyss: how many tables do you insert into/update in that file?
<abyss> previously it was impossible because I didn't know that I can extract binlog for separate database. So I needed all begin use somedatabase commit, now I can do that bacause I found an option in mysqlbinlog ;)
langland_ has joined #ruby
edwinvdg_ has joined #ruby
<abyss> 10290 - inserts, update- 25922, delete - 1482
Hounddog has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 272 seconds]
sts is now known as Guest62664
lee-jon has quit [Quit: lee-jon]
<abyss> but it will be more because it's binlog from last week
Xeago has joined #ruby
valkyrka has joined #ruby
valkyrka has quit [Client Quit]
serivichi has quit [Ping timeout: 255 seconds]
langlands has quit [Ping timeout: 265 seconds]
haxrbyte_ has quit [Remote host closed the connection]
zudochkin has quit [Remote host closed the connection]
jlast has joined #ruby
haxrbyte has joined #ruby
ponga has joined #ruby
troulouliou_dev has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
griffindy has joined #ruby
haxrbyte has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
zudochkin has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
haxrbyte has joined #ruby
vondruch has quit [Quit: Ex-Chat]
<apeiros> abyss: I don't ask for the number of *records*
<apeiros> I ask for the number of *tables*
techsethi has joined #ruby
<apeiros> like "user", "codes" etc.
segfalt has joined #ruby
lxsameer has quit [Remote host closed the connection]
evanjs has joined #ruby
chussenot has quit [Quit: chussenot]
<abyss> apeiros: oh, ok, sorry 114 tables for the first database, 5 for second, 123 for next, 26 for next database.
ZOMGITSABEAR has joined #ruby
evanjs has quit [Client Quit]
balazs has joined #ruby
zudochkin has quit [Ping timeout: 244 seconds]
Cust0sLim3n has joined #ruby
k3asd` has joined #ruby
revath has quit [Ping timeout: 256 seconds]
<apeiros> ok, that sounds like a bit of work :)
<apeiros> I'm a bit busy atm, sorry
msnyon has joined #ruby
haxrbyte has quit [Remote host closed the connection]
<abyss> apeiros: ok, thank you for your help:)
haxrbyte has joined #ruby
DexterLB has quit [Ping timeout: 252 seconds]
brettnem has joined #ruby
<brettnem> hey all
<brettnem> I have two gems that both declare “Cassandra”. Is there anyway I can use them at the same time?
Akagi201 has joined #ruby
DexterLB has joined #ruby
sarkyniin has joined #ruby
<jhass> if you're lucky it works
wahben has joined #ruby
<jhass> but there's no general yes
nonparfumee has joined #ruby
mdz_ has joined #ruby
chussenot has joined #ruby
zudochkin has joined #ruby
Palmer11 has joined #ruby
langlands has joined #ruby
balazs has quit [Ping timeout: 245 seconds]
sandstrom has joined #ruby
<brettnem> well, it doesn’t work
CamonZ has quit [Ping timeout: 264 seconds]
<brettnem> is there an easy way to explicity declare the gem so one could be like Cassandra1 and the other could be Cassandra2?
<jhass> still asking for luck, but require "gem_a"; Cassandra2 = Cassandra; Object.const_remove(:Cassandra); require "gem_b"
<jhass> if that doesn't work swap them around
<brettnem> that is an interesting idea
<jhass> but it's brittle and may break at any point
charliesome has joined #ruby
<brettnem> what makes that brittle?
<brettnem> seems to make sense?
haxrbyte has quit [Remote host closed the connection]
<jhass> the gem might very well have a Cassandra::Foo somewhere
<DefV> That's considering Cassandra gem doesn't use Cassandra constant
<brettnem> *oh*
<wahben> Hey anyone knows how to suppress these warnings? "warning: assigned but unused variable - e". I'm using ruby 2.2.2p95
haxrbyte has joined #ruby
<ljarvis> yes, use the variable or dont assign it
<ljarvis> fixed!
lee-jon has joined #ruby
NeverDie has joined #ruby
<ljarvis> or use _e
<apeiros> brettnem: you could collect all files the gem loads and use a custom loader
<wahben> In a Gem I don't control
langland_ has quit [Ping timeout: 265 seconds]
<ljarvis> then no
<ljarvis> sorry
<wahben> ugh.. alright. well thanks! and have a nice day.
<apeiros> e..g module Isolated; end; Isolated.module_eval(File.read(file), file, 1)
<ljarvis> (we have lots of gem deps that throw off warnings that are just as frustrating)
InternetFriend has joined #ruby
wahben has left #ruby [#ruby]
<brettnem> apeiros: I’m kinda new to ruby, is there some reading material on that?
<apeiros> not really
<ljarvis> wahben: fwiw.. you could submit a pull request to fix the warning in the gem
x44x45x41x4E has joined #ruby
dEPy has quit [Quit: (null)]
dhjondoh has joined #ruby
<apeiros> brettnem: sadly, the only real answer is "this will not work". everything else are desperate tries.
<brettnem> (facepalm)
<jhass> brettnem: open an issue with either gem to change their namespace
<brettnem> seems odd that namespaces are global yet not in any way regulated (shrug)
starfox_sf has joined #ruby
galeido has quit [Ping timeout: 272 seconds]
thelastinuit has joined #ruby
chussenot has quit [Quit: chussenot]
charliesome has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
commondream has joined #ruby
<apeiros> brettnem: I agree. but seems most people think something akin to java's reverse-dns style namespaces was "too bothersome" :-/
RegulationD has joined #ruby
<yorickpeterse> everything in Java is too bothersome
nonparfumee has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
yqt has joined #ruby
zenguy_pc has quit [Quit: Leaving]
starfox_sf has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
mdz_ has quit [Remote host closed the connection]
CamonZ has joined #ruby
<brettnem> apeiros: seems like there should at least be some sort of registry for namespaces.. (shrug) so devs can be sure they arn’t stepping on someone else without knowing every namespace in existance
sepp2k has quit [Quit: Leaving.]
oo_ has quit [Remote host closed the connection]
<apeiros> brettnem: again, I agree.
<brettnem> and who gets to “win” the “cassandra” namespace
commondream has quit [Ping timeout: 276 seconds]
<brettnem> oh well
<undeadaedra> namespaces are derived from gem name, no?
<apeiros> gem names and used namespaces currently don't need to correspond the slightest.
<brettnem> heh, I don’t think they are undeadaedra
<apeiros> undeadaedra: that's only a convention
<undeadaedra> no, they don't need to, but it's usually the case
<brettnem> it’s just like 90% less confusing when they do, I’ve seen plenty of gems where they arn’t even close
<brettnem> ok so
<brettnem> if I want to fix this myself
<brettnem> can I like, find/replace inside the gem? or is it more complicated than that?
RegulationD has quit [Ping timeout: 272 seconds]
catphish_ has joined #ruby
tedstriker has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> brettnem: it is more complicated than that. but search/replace should cover 99% of the cases.
<apeiros> more complicated: stuff like const_get and friends
<brettnem> oh hell I don’t even use that 1%
rbennacer has joined #ruby
<catphish_> does anyone know if it's possible to get field types (or any other raw result data) with mysql2?
<catphish_> ie before all the casting to a nice ruby hash
revath has joined #ruby
mister_solo has joined #ruby
coderhs has joined #ruby
serivich has joined #ruby
erts has quit [Quit: erts]
lee-jon has quit [Quit: lee-jon]
allomov has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
bMalum has joined #ruby
dblessing has joined #ruby
<yh> If a gem writes to a file "foo.txt", where will that file be?
<yh> The same directory that executed ruby ?
rbennacer has joined #ruby
<yh> (This gem is being required by a script)
lee-jon has joined #ruby
zenguy_pc has joined #ruby
sharpmachine has joined #ruby
techsethi has quit [Quit: techsethi]
mdz_ has joined #ruby
allomov has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
ta has quit [Remote host closed the connection]
coderhs has joined #ruby
startupality_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
commondream has joined #ruby
jphenow has joined #ruby
coderhs has quit [Client Quit]
gkra has quit [Ping timeout: 256 seconds]
devdazed has joined #ruby
<yorickpeterse> The current working directory
zudochkin has quit [Remote host closed the connection]
startupality has quit [Ping timeout: 256 seconds]
startupality_ is now known as startupality
DroidBur_ has joined #ruby
jlast has quit [Remote host closed the connection]
veinofstars has quit [Quit: veinofstars]
charliesome has joined #ruby
zudochkin has joined #ruby
malconis has joined #ruby
quimrstorres has joined #ruby
mrmargolis has joined #ruby
DroidBurgundy has quit [Ping timeout: 272 seconds]
sharpmachine has quit [Ping timeout: 265 seconds]
malconis has quit [Remote host closed the connection]
chinmay_dd has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 252 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
malconis has joined #ruby
bMalum has quit [Quit: bMalum]
<yorickpeterse> lol, I like recruiter Emails
<yorickpeterse> especially their signatures that state "YOU MAY NOT DISCLOSE THIS BLA BLABLA "
<undeadaedra> Generic signatures
<yorickpeterse> oh really? I wasn't aware your made up laws are automatically applied the moment I read this Email
hinbody has joined #ruby
<yorickpeterse> also loL:
<yorickpeterse> "and you are strongly advised to check for the latest viruses on its receipt."
<undeadaedra> I don't have those kind of mails :(
<apeiros> brettnem: problem is more when/if the gem uses that 1% ;-)
<yorickpeterse> I hate how they just ignore my website though
<yorickpeterse> " Although I appreciate the interest I am not interested in job offers at the moment."
<yorickpeterse> I might have to put that in a <marquee> after all
<undeadaedra> marquee still works?
jhwhite has joined #ruby
<yorickpeterse> Of course it does
zudochkin has quit [Ping timeout: 246 seconds]
<yorickpeterse> it's still part of HTML 5.1
<undeadaedra> o_O
bMalum has joined #ruby
<undeadaedra> I thought this thing was burried
<yorickpeterse> nop
chinmay_dd has joined #ruby
agent_white has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
dstarh has joined #ruby
dede has joined #ruby
ryba has joined #ruby
mdz_ has quit []
JoshL has joined #ruby
Marsupermammal has joined #ruby
ta has joined #ruby
enebo has joined #ruby
chinmay_dd has quit [Ping timeout: 265 seconds]
chussenot has joined #ruby
<shevy> how dare you undeadaedra
<shevy> <marquee>baguette</marquee>
edwinvdg_ has quit [Remote host closed the connection]
rubie has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
atomical has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
* undeadaedra burries shevy
sevenseacat has joined #ruby
last_staff has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
senayar has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
Iskarlar has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp_ has joined #ruby
Al3ks has quit [Ping timeout: 265 seconds]
fmcgeough has joined #ruby
axl_ has joined #ruby
ta has quit [Remote host closed the connection]
DaniG2k has joined #ruby
InternetFriend has joined #ruby
senayar has joined #ruby
galeido has joined #ruby
Xeago has joined #ruby
paulcsmith has joined #ruby
ebarrett has quit [Ping timeout: 255 seconds]
revath has quit [Ping timeout: 276 seconds]
jwilson_ has quit [Read error: Connection reset by peer]
atom_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
commondream has quit [Remote host closed the connection]
jwilson_ has joined #ruby
ebarrett has joined #ruby
gambl0re has quit [Ping timeout: 252 seconds]
mrmargolis has quit [Ping timeout: 256 seconds]
pandaant has joined #ruby
commondream has joined #ruby
mrmargolis has joined #ruby
casadei has joined #ruby
blue_deref has quit [Quit: bbn]
dhjondoh has quit [Quit: dhjondoh]
lupine has quit [Max SendQ exceeded]
drdave has joined #ruby
yh has quit [Ping timeout: 252 seconds]
lupine has joined #ruby
Mojo_Nixon has joined #ruby
dhjondoh has joined #ruby
charliesome has quit [Quit: zzz]
drdave has quit [Client Quit]
yh has joined #ruby
commondream has quit [Remote host closed the connection]
<centrx> The synergy is blowing up.
commondream has joined #ruby
mrmargolis has quit [Ping timeout: 244 seconds]
last_staff has quit [Remote host closed the connection]
DroidBur_ is now known as droidburgundy
mrmargolis has joined #ruby
d10n-work has joined #ruby
lupine has quit [Ping timeout: 256 seconds]
dopie has joined #ruby
chussenot has quit [Quit: chussenot]
endash has quit [Quit: endash]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
dmmoody has joined #ruby
Kricir has joined #ruby
kaleido has joined #ruby
RegulationD has joined #ruby
Squarepy has quit [Quit: Leaving]
chussenot has joined #ruby
startupality has joined #ruby
Xeago has quit [Remote host closed the connection]
charliesome has joined #ruby
Regulati_ has joined #ruby
edwinvdg_ has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has quit [Ping timeout: 264 seconds]
atomical has joined #ruby
startupality has quit [Ping timeout: 276 seconds]
mrmargolis has joined #ruby
tkuchiki has joined #ruby
konieczkow has joined #ruby
shinnya has joined #ruby
edwinvdgraaf has quit [Ping timeout: 255 seconds]
decoponio has joined #ruby
InternetFriend has joined #ruby
jonathanwallace has joined #ruby
veleno has joined #ruby
lkba has joined #ruby
lkba has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
lkba has joined #ruby
<veleno> hello. a program is crashing without telling which line number it crashes to. it only says: “W, [2015-06-18 16:23:07 #4362] WARN -- : NoMethodError: undefined method `[]' for #<Splayd:0x007fe9c0afa350>”
glcx has joined #ruby
<abyss> apeiros: I've changed if to: if ( line !~ /thread_id|BEGIN|COMMIT|end_log_pos/ ) && ( id = ids.find { |w| line =~ /\b#{w}\b/ } ) It should ease a pain a little;)
ta has joined #ruby
chipotle has quit [Quit: cheerio]
<havenwood> veleno: Link to the code?
dorei has joined #ruby
renderful has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
konieczkow has quit [Ping timeout: 246 seconds]
droidburgundy has quit [Remote host closed the connection]
mary5030 has joined #ruby
tedstriker has joined #ruby
flughafen_ has joined #ruby
revath has joined #ruby
juanpaucar has joined #ruby
datanoise has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> veleno: @splayd is nil
fgo has joined #ruby
<ljarvis> its actually undefined
hahuang65 has joined #ruby
<ljarvis> (ivar values default to nil)
quazimodo has quit [Ping timeout: 245 seconds]
<veleno> but which line ?
<veleno> i don’t see it..
revath has left #ruby [#ruby]
<ljarvis> line 129
<jhass> bah, tab indentation
<ljarvis> well
renderful has quit [Ping timeout: 257 seconds]
chouhoulis has joined #ruby
<ljarvis> tbh it could be any line, but @splayd isn't instantiated in some instances
<jhass> empty parens, 1kloc file, @@class_vars, $globals....
<ljarvis> the code is just really hard to read, which is why you're having trouble
* jhass closes tab
<ljarvis> ^
<veleno> jhass: i agree
segfalt_ has joined #ruby
Iskarlar has joined #ruby
<veleno> the auth(..) method initialized @splayd at line 163
<ljarvis> on top of that, there are SO many race conditions
<ljarvis> veleno: kill it with fire
<veleno> ljarvis: that’s also one option….
segfalt has quit [Ping timeout: 276 seconds]
segfalt_ is now known as segfalt
<yorickpeterse> ljarvis: ehm, I think I found a nice bug in Slop
<ljarvis> nice?
* ljarvis intrigued
jonathanwallace has quit [Ping timeout: 245 seconds]
<yorickpeterse> https://gist.github.com/YorickPeterse/77ade5f3f566eeb6fd17 if you run this with "ruby test.rb --version" you get /home/yorickpeterse/.gem/ruby/2.2.0/gems/slop-4.1.0/lib/slop/parser.rb:105:in `try_process': unknown option `--version' (Slop::UnknownOption)
<yorickpeterse> but!
<yorickpeterse> it works fine if you remove the "puts"
<yorickpeterse> so Slop#to_s apparently poops itself
<yorickpeterse> which is wack because it shouldn't even be called
<yorickpeterse> oh hm, seems to break in "parse" even
<ljarvis> why wouldn't it be called?
<ljarvis> orly
<yorickpeterse> because of the exit
dmmoody has quit [Remote host closed the connection]
<ljarvis> right
<yorickpeterse> maybe I have the dumbz though
dmmoody has joined #ruby
<ljarvis> that error is definitely weird
<yorickpeterse> haha what the fuck, this gets even better
<yorickpeterse> if you do "puts Slop.parse { .... }" it gives a basic output
droidburgundy has joined #ruby
j_mcnally has joined #ruby
yoongkang has quit [Remote host closed the connection]
<yorickpeterse> If you define your own options and all that, it will still give the basic output
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> hrm, so how do you meaningfully benchmark an asynchronous job queue server? :)
<yorickpeterse> if you do "opts = Slop.parse { ... }; puts opts" you get teh full output
<yorickpeterse> that makes....no sense
<ljarvis> :D
<ljarvis> you found the best feature!
<ljarvis> it is no bug!
laurentide has quit [Quit: Leaving]
<ljarvis> etc
<ljarvis> please 2 report
<atom_> k
<ljarvis> oO
<ljarvis> apeiros: you.. dont!
<ljarvis> :)
ndrei has quit [Ping timeout: 272 seconds]
<yorickpeterse> oooooooho wait
<apeiros> ljarvis: but… but… that's not an option!
<yorickpeterse> I think it's the fucking block that gets passed to "puts"
<yorickpeterse> yup
<yorickpeterse> fuck you parse.y
<ljarvis> right yep
hanmac1 has joined #ruby
<ljarvis> puts (Slop.parse) ...
* yorickpeterse breaks out the slapping rod and looks sternly at yorickpeterse
<yorickpeterse> dang it, I was hoping it was the parse.y one
<apeiros> yorickpeterse: dude! learn precedence! ;-p
<ljarvis> I guess also Slop.parse really shouldn't allow no args and no block
<apeiros> {} and do/end differ there
dmmoody has quit [Remote host closed the connection]
<ljarvis> since it's pointless
<ljarvis> i think
charliesome has quit [Quit: zzz]
<apeiros> foo bar {} --> foo(bar {})
<apeiros> foo bar do … end --> foo(bar) do … end
<yorickpeterse> apeiros: I'm aware of the difference, just didn't take it into account here
rippa has joined #ruby
<hanmac1> shevy & apeiros you guys always disliked $SAFE right? because "$SAFE=2 to 4 are obsolete" ;P
icebourg has joined #ruby
<shevy> wat
<shevy> wat is going on
<apeiros> hanmac1: I didn't dislike $SAFE itself. I only found it underdocumented and hence barely useful.
<shevy> the language is changing faster than my underwear
<yorickpeterse> shevy: stop being a 4 year old then
<hanmac1> shevy "once a year"? ;P
<yorickpeterse> or get diapers
<shevy> well there was another change not so long ago
Outlastsheep is now known as zz_Outlastsheep
<shevy> Nobuyoshi Nakada: * error.c (name_err_receiver): add NameError#receiver method. [Feature #10881]
<shevy> also today
simplyianm has joined #ruby
<ljarvis> yorickpeterse: I can push a release if you want it now
<yorickpeterse> :D
<yorickpeterse> yes please
<ljarvis> 2secs
<shevy> 1sec
ruv has joined #ruby
<ljarvis> yorickpeterse: have at it
<yorickpeterse> ヽ(´ー`)ノ
<yorickpeterse> (っ´ω`)っ
<yorickpeterse> (つ。◕‿‿‿‿◕。)つ
<yorickpeterse> (つ。◕‿◕。)つ
dmmoody has joined #ruby
<yorickpeterse> wow, I have a lot of those
<ljarvis> for this version: 0
<yorickpeterse> :hug5:
<yorickpeterse> dang it
<ljarvis> BE THE FIRST
<yorickpeterse> D:
<yorickpeterse> done
<ljarvis> 2
<ljarvis> maybe you weren't the first
<ljarvis> maybe next time
umgrosscol has joined #ruby
rubie has joined #ruby
<ljarvis> also lol at skewed download counts
InternetFriend has joined #ruby
dgutierrez1287 has joined #ruby
<ljarvis> 4.1 only got 15k downloads, prolly due to people being mad i dropped support for pre Ruby 2
<yorickpeterse> too edgy
floodP has joined #ruby
<yorickpeterse> https://tommorris.org/posts/9317 also this is great
michaeldeol has joined #ruby
michaeldeol has quit [Client Quit]
<floodP> anybody has experience with Savon?
<yorickpeterse> 38. Bitcoin is a technical fix for a societal problem.
<yorickpeterse> 39. apt-get install bitcoin-qt solves the usability problems of Bitcoin. (I’m not making this one up.)
<yorickpeterse> :D
ta has quit [Remote host closed the connection]
<DaniG2k> Solr or Elastic? which to use
<DaniG2k> :\
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
<floodP> how to set SOAP 1.2 in Savon 2?
<yorickpeterse> DaniG2k: that's like asking whether to turn left or right
<yorickpeterse> DaniG2k: do research, see what fits your use cases, experiment, etc
ringarin has joined #ruby
<ljarvis> failing that, eenie meenie miney mo
<shevy> hey wait
<DaniG2k> yorickpeterse nah its not that drastic. its like asking whether to go left at a 45 degree angle or left at a 47 degree angle
<shevy> whether to turn left or right, now that is easier
<DaniG2k> ljarvis: yeah more like that I think
<shevy> I don't even know what is Solr or Elastic
<shevy> he could write a third project :)
<bougyman> search tools.
ta has joined #ruby
<DaniG2k> they are search engines that use Lucene as a base
<bougyman> elasticsearch
<bougyman> ES is pretty nice.
<bougyman> I used solr before, too, it was less friendly to use.
<shevy> actually, that xkcd should also mention the problem of standards that are substandard quality
rubie has quit [Ping timeout: 265 seconds]
axl_ has quit [Quit: axl_]
platzhirsch has joined #ruby
droidburgundy has quit [Remote host closed the connection]
<DaniG2k> bougyman: problem with elastic is that the docs are terrible
dgutierrez1287 has quit [Ping timeout: 246 seconds]
jordanm has quit [Ping timeout: 265 seconds]
<DefV> I think the ES docs are pretty exhaustive
bMalum has quit [Quit: bMalum]
floodP has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
axl_ has joined #ruby
<DefV> I prefer those above the Solr ones
<bougyman> I agree.
<bougyman> the ELK docs are quite complete
<ljarvis> +1
<DaniG2k> maybe I'm dumb :'(
senayar has quit [Remote host closed the connection]
<DaniG2k> but reading this doesn't help me understand how i can send updated objects to be indexed, nor how i can integrate the search itself
<bougyman> i'm not interested in reading anything -rails
<DaniG2k> hahah
<bougyman> I thought we were talking about ruby integration
thelastinuit has joined #ruby
platzhirsch1 has joined #ruby
platzhirsch has quit [Client Quit]
<DaniG2k> well, i was thinking of using it with rails
<bougyman> and that has nothing to do with the elasticsearch docs.
bMalum has joined #ruby
<DaniG2k> non-existent
<DaniG2k> meh
<bougyman> that one shows you how to index, query, and search data
vdamewood has joined #ruby
danzilio has joined #ruby
Xeago has joined #ruby
ringarin has quit [Ping timeout: 252 seconds]
ogpastaling has joined #ruby
<DaniG2k> maybe I should write my own full text search engine
senayar has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
msgodf has quit [Ping timeout: 252 seconds]
<yorickpeterse> oh hm, TIL anonymous classes aren't really so anonymous
<yorickpeterse> e.g. constants are apparently not local to the Class.new { ... } block
CloCkWeRX has quit [Remote host closed the connection]
<yorickpeterse> >> Class.new { A = 10 }; Class.new { A = 5 }
sandstrom has quit [Quit: My computer has gone to sleep.]
<ruboto> yorickpeterse # => /tmp/execpad-ea4779f7ff29/source-ea4779f7ff29:2: warning: already initialized constant A ...check link for more (https://eval.in/383835)
Xeago has quit [Remote host closed the connection]
<yorickpeterse> like wtf
<jhass> oh, interesting
mengu has quit []
lee-jon has quit [Quit: lee-jon]
JakFrist has joined #ruby
phizzbuzz has joined #ruby
<yorickpeterse> ....but using const_set works
<undeadaedra> because block does not changes constant scope
railsraider has quit [Quit: railsraider]
endash has joined #ruby
<yorickpeterse> undeadaedra: depends on how the block is evaluated
paulcsmith has quit [Quit: Be back later ...]
startupality has joined #ruby
droidburgundy has joined #ruby
gambl0re has joined #ruby
<yorickpeterse> oh hm interesting, seems it doesn't even do that when using instance_eval/instance_exec
Xeago has joined #ruby
<jhass> >> [Class.new {|c| c::A = 1 }::A; Class.new {|c| c::A = 2 }::A]
<ruboto> jhass # => /tmp/execpad-9a4a59e7b2c7/source-9a4a59e7b2c7:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/383840)
starfox_sf has joined #ruby
<jhass> >> [Class.new {|c| c::A = 1 }::A, Class.new {|c| c::A = 2 }::A]
<ruboto> jhass # => [1, 2] (https://eval.in/383841)
<bougyman> yorickpeterse: it puts the constant on Class
<yorickpeterse> stupid Ruby
paulcsmith has joined #ruby
JakFrist has quit [Client Quit]
<bougyman> Class::A shows it, even.
ta has quit [Remote host closed the connection]
TheMoonMaster is now known as blake
ylla has quit []
Xeago has quit [Remote host closed the connection]
startupality has quit [Client Quit]
preyalone has joined #ruby
milesmatthias has quit []
atom_ has quit [Ping timeout: 246 seconds]
startupality has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
jwilson_ has quit [Read error: Connection reset by peer]
jwilson_ has joined #ruby
edwinvdgraaf has joined #ruby
fabrice31 has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
starfox_sf has quit [Ping timeout: 265 seconds]
yh has quit [Ping timeout: 244 seconds]
ta has joined #ruby
[H]unt3r has joined #ruby
<ljarvis> it puts the lotion on the class
mikecmpb_ has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
brettnem has quit [Quit: brettnem]
agent_white has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
LMity has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
haxrbyte_ has quit [Ping timeout: 256 seconds]
galeido has quit [Read error: Connection reset by peer]
yh has joined #ruby
hectortrope has quit [Quit: WeeChat 0.4.2]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmmoody has quit []
lee-jon has joined #ruby
bhorn1 has joined #ruby
<bhorn1> Hey guys, I'm looking into creating guis with Ruby. Does anyone have any recommendations on what to use in terms of libraries to get started?
snockerton has joined #ruby
<ljarvis> bhorn1: what kind of gui?
<apeiros> .gsub(/(?!\A)^/, ' ') # indent all but the first line :D
zudochkin has joined #ruby
slash_nick has quit [Ping timeout: 252 seconds]
<bhorn1> A relatively simple user-friendly front end with different pages of buttons to perform various tasks from opening webpages to running scripts in the background.
ahmetkapikiran has joined #ruby
<ljarvis> Ruby isn't great at this stuff. Shoes is popular but it's more of a toy. I would probably lean on java tools via jruby (the latest version of shoes does this)
Spami has joined #ruby
aryaching has joined #ruby
ahmetkapikiran has quit [Client Quit]
<ljarvis> bhorn1: well, check out shoes. Otherwise I'd go swing/jwt
mandarinkin has quit [Ping timeout: 245 seconds]
<bhorn1> ljarvis: I'm very familiar with java/swing, I've just been tasked recently with using ruby to do this instead. I generally agree with your opinion but am not well versed enough in Ruby to construct a very good argument for my case.
<bhorn1> ljarvis: Thank you for your input, though!
* jhass still has to play with ruby-gir
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> bhorn1: you could still do it in Ruby, just using swing :)
rbowlby has quit [Read error: Connection reset by peer]
<phat4life> bhorn1: why not scala instead
mandarinkin has joined #ruby
roger_rabbit has quit [Ping timeout: 245 seconds]
rbowlby has joined #ruby
<ljarvis> but yeah bit pointless if you know java better..
DaniG2k has quit [Quit: leaving]
<phat4life> still jvm though
<ljarvis> so?
ta has quit [Remote host closed the connection]
ItSANgo__ has quit [Ping timeout: 265 seconds]
<bhorn1> phat4life: I say why not java instead, personally. Like I said I've just been tasked by a higher up to attempt to use ruby instead.
<bhorn1> Thanks a ton for your input, though guys! Have a good day.
<phat4life> meh, use the right tool for the right job
metalic has joined #ruby
<phat4life> i can only imagine pain later on trying to do gui stuff with ruby
<ljarvis> or the right tool for the wrong job
<phat4life> my company was like that, once one team did everything in ruby, the whole company was like, lets rewrite EVERYTHING to ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
livathinos has quit []
<jhass> I think GUIs could be great with Ruby, if somebody sat down and wrote an API actually utilizing its powers (and with a result that doesn't look like a kids toy...)
<ljarvis> pretty much yep
<shock_one> yorickpeterse: ho-ho, I found a picture of a man sitting on a chair on a chair. https://hsto.org/files/4df/1f2/cf3/4df1f2cf33604c98bd5d21da8424da87.jpg
<bhorn1> Yeah, I see the potential it's just not something that's relevant at this point in time I feel.
Marsupermammal has joined #ruby
<phat4life> just use qt
krowv has joined #ruby
commondream has quit [Remote host closed the connection]
<ljarvis> oh god
<ljarvis> just cut your foot off with an axe
<phat4life> lol
<phat4life> what other gui libraries are there
quazimodo has joined #ruby
<undeadaedra> Qt's not so bad itself
<jhass> Gtk, WxWidgets, Tk (*cough*)
<shock_one> phat4life: HTML.
mister_solo has quit [Ping timeout: 272 seconds]
<kaleido> html5 ftw?
<phat4life> i guess desktop apps are less relavant
<jhass> the enlightment stuff
jordanm has joined #ruby
<phat4life> do it in flash heueueueu
<undeadaedra> mmh, too bad I don't have rslap anymore
ItSANgo__ has joined #ruby
rubie has joined #ruby
LMity has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
* hanmac1 point at rwx for wxWidgets in ruby for phat4life
chinmay_dd has joined #ruby
sharpmachine has joined #ruby
<phat4life> interesting
<jhass> is it usable "already"?
dr-richard has joined #ruby
platzhirsch1 has quit [Ping timeout: 245 seconds]
bMalum has quit [Quit: bMalum]
<hanmac1> jhass: it does have specs and samples ... for the most stuff its "usable" ... but need to be build from source because the gem is not updated for long
cumorris has joined #ruby
jpfuentes2 has joined #ruby
diegoviola has quit [Ping timeout: 276 seconds]
<jhass> release early, release often! ;P
<ljarvis> that docs
mike___1234 has quit [Remote host closed the connection]
michaeldeol has quit [Client Quit]
JoshL has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
JoshL has joined #ruby
startupality has quit [Read error: Connection reset by peer]
hubcaps has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
jhwhite has quit [Ping timeout: 252 seconds]
yoongkang has joined #ruby
startupality has joined #ruby
hanmac1 has quit [Quit: Leaving.]
j4cknewt has quit [Remote host closed the connection]
freerobby has joined #ruby
rbennace_ has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
athos_diddy has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
rbennacer has quit [Read error: Connection reset by peer]
<athos_diddy> good afternoon, can someone check my comments and just tell me if I clearly understand immutability and hash table corruption? https://gist.github.com/genericlady/4ac464c1f2b71d4984c2
zotherstupidguy has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
paulcsmith has joined #ruby
aganov has quit [Remote host closed the connection]
commondream has joined #ruby
<athos_diddy> even simpler immutability means it's id won't change. it's static?
svoop has quit [Read error: Connection reset by peer]
<jhass> athos_diddy: okay, from the start
sharpmachine has quit [Remote host closed the connection]
<jhass> {foo: bar} is equivalent to {:foo => bar}
<athos_diddy> right
<jhass> it's using the symbol :foo as key
<jhass> that you defined a local variable named foo too doesn't matter with this syntax
tagrudev has quit [Remote host closed the connection]
<athos_diddy> oh
<athos_diddy> hah
<athos_diddy> smh
<jhass> where it would matter is if you did {foo => bar}
<apeiros> athos_diddy: hash table corruption happens when the hash value of a key changes
<apeiros> athos_diddy: and the hash value of a key is a product of its value
nikhgupta has joined #ruby
<phat4life> aren't there certina cases where foo: bar becomes ambiguous
wookiehangover has quit [Ping timeout: 256 seconds]
mdih has joined #ruby
darkf has quit [Quit: Leaving]
<jhass> phat4life: perhaps your thinking about keyword arguments and accepting an options argument too?
<apeiros> athos_diddy: when a hash-table performs a lookup, it does so by calculating the hash value of the key, that number is used to find a "bucket"
<jhass> elsewhere I can't imagine
<apeiros> athos_diddy: with a different hash value, it'll find a different bucket - so the correct one can't be found anymore.
<athos_diddy> ok
starfox_sf has joined #ruby
<apeiros> example:
<apeiros> >> key = "hello"; hash = {key => "value"}; key.upcase!; hash["HELLO"]
<ruboto> apeiros # => nil (https://eval.in/383857)
<apeiros> and now after rehashing:
<apeiros> >> key = "hello"; hash = {key => "value"}; key.upcase!; hash.rehash; hash["HELLO"]
<ruboto> apeiros # => nil (https://eval.in/383858)
sigurding has quit [Quit: sigurding]
<apeiros> o0
* apeiros swears :D
<Senjai> Good morning ruby
<Senjai> apeiros: lolwhat
<apeiros> oh dear, right, string keys are special cased
<Senjai> apeiros: Isnt key copied?
<apeiros> of course, *the only* key which is special cased
<apeiros> Senjai: no
camilasan has quit [Remote host closed the connection]
droidburgundy has quit [Read error: Connection reset by peer]
<apeiros> Senjai: except for - drumrolls - string keys. they are copied and frozen.
<Senjai> That's what I thought :P
<Senjai> It kinda makes sense, no?
<apeiros> no
droidburgundy has joined #ruby
rcvalle has joined #ruby
<Senjai> I would probably rather have it copy over than just be a reference. Specifically because it's -hard- in ruby to understand when things are actually passed by value vs by reference
<athos_diddy> apeiros thank you
<apeiros> athos_diddy: new example, using a non-special-cased key:
<apeiros> >> k = ["some", "array"]; h = {k => "value"}; h[k] # normal
<ruboto> apeiros # => "value" (https://eval.in/383859)
<athos_diddy> i just copied it and am saving it to my wiki i'm going to go over and i'll regist
<apeiros> >> k = ["some", "array"]; h = {k => "value"}; k << "change"; h[k] # won't work because k.hash changed
<ruboto> apeiros # => nil (https://eval.in/383860)
BanzaiJoe has joined #ruby
<apeiros> k = ["some", "array"]; h = {k => "value"}; k << "change"; h.rehash; h[k] # finds it again because the hash h updates all .hash values for all keys
wookiehangover has joined #ruby
<apeiros> >> k = ["some", "array"]; h = {k => "value"}; k << "change"; h.rehash; h[k] # finds it again because the hash h updates all .hash values for all keys
<ruboto> apeiros # => "value" (https://eval.in/383861)
<Senjai> apeiros: TIL.
x44x45x41x4E has quit [Ping timeout: 272 seconds]
<Senjai> Hope I never have to run into that
nb_bez___ has joined #ruby
<apeiros> athos_diddy: anyway, in short: you should just not use objects as keys which you mutate
<Senjai> Generally shouldn't be mutating things
<apeiros> Hash#rehash is expensive
<Senjai> ^
mandarinkin has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
bMalum has joined #ruby
<athos_diddy> apeiros would this be different in the case of fp
<apeiros> what's fp got to do with this?
<apeiros> also, don't use abbreviations without introducing them.
<athos_diddy> nothing i guess i'm just wondering if it has a similar caveat when using their version of hash tables which would be object literals?
<athos_diddy> sorry
* apeiros assumes fp = functional programming
dionysus69 has quit [Client Quit]
endash has joined #ruby
<apeiros> a hash table in fp doesn't work differently. I doubt the problem arises, though, since strict fp does not allow mutable objects. so you can't have mutable keys to begin with.
<athos_diddy> ahhh
dionysus69 has joined #ruby
veleno has quit [Ping timeout: 276 seconds]
yh has quit [Ping timeout: 265 seconds]
alex88 has quit []
<athos_diddy> funny i guess the work around in rails is to always rehash. possibly in one of the functions in ActionPack since this will interface with model and view
<apeiros> no
<apeiros> totally and utterly no
<apeiros> if you use Hash#rehash you almost certainly did something wrong.
<Senjai> athos_diddy: NOOO
<athos_diddy> hahaha
yh has joined #ruby
<Senjai> athos_diddy: You can exist in life without ever using rehash
<Senjai> I did
<Senjai> and still have
towski_ has joined #ruby
<apeiros> I'm not even sure there are valid use-cases for rehash
<Senjai> apeiros: Beyond cus ruby?
happyface has joined #ruby
<apeiros> Senjai: ¿que?
<Senjai> athos_diddy: What was this originally meant to solve?
senayar has quit []
<Senjai> apeiros: Just that in ruby, everything is mutable.
<apeiros> Senjai: so?
aphprentice has quit [Remote host closed the connection]
<apeiros> just because it *can* be mutated, doesn't mean *it will be*
<Senjai> apeiros: I'm not saying it should be there, I'm just saying thats probably why
<athos_diddy> i'm solidfying my understand of proper data structures in Ruby
<apeiros> also, not everything is mutable.
<undeadaedra> What's #rehash?
<apeiros> Senjai: I understand why it exists.
michaeldeol has joined #ruby
<athos_diddy> a practical example could be a counted collection of objects
SHyx0rmZ has joined #ruby
<apeiros> Senjai: what I say is that I don't think there's any case where it's correct to actually use it.
<Senjai> apeiros: Ok, that's fair.
danzilio has quit [Quit: My computer has fallen asleep!]
<athos_diddy> the key should be immutable not a mutable object that is pointing to a number
<athos_diddy> i can gist an example
<apeiros> or put differently: I think if you use #rehash, I'm convinced there's a better solution without using #rehash :)
<Senjai> ^
<Senjai> which is why I'm asking what problem you're trying to solve
<athos_diddy> Senjair it's an abstract lesson
<apeiros> undeadaedra: Hash#rehash
jbisnett has joined #ruby
mandarinkin has joined #ruby
<Senjai> athos_diddy: But .. no.
<apeiros> undeadaedra: "Rebuilds the hash based on the current hash values for each key." (straight from the docs ;-p)
<apeiros> athos_diddy: yes, gist
kayloos has quit []
<undeadaedra> wuuuuuuuuuuuuuuuuuuuut
ta has joined #ruby
sarkyniin has quit [Ping timeout: 265 seconds]
andikr has quit [Remote host closed the connection]
<athos_diddy> ok give me a second, thank you
finisherr has joined #ruby
<jbisnett> does anyone know how one would go about linking a custom memory allocation suite into ruby?
chussenot has quit [Quit: chussenot]
<apeiros> Kernel.trap("INT") do Thread.new do … end; end # <-- sooo sad that this is necessary…
juanpaucar has quit [Remote host closed the connection]
<Senjai> apeiros: ? :( what
<apeiros> Senjai: can't use mutexes and other stuff in trap context
drewvanstone has joined #ruby
ndrei has joined #ruby
drewvanstone has quit [Client Quit]
<Senjai> Orly. You're just full of the TIL's today :)
drewo has joined #ruby
<apeiros> s/today/everyday/
posixpascal has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> just listen!
<apeiros> (or read)
francoi__ has quit [Remote host closed the connection]
<Senjai> Nah not errday. Some days you're totally lurker apeiros
<apeiros> you're just reading the wrong places at those days :-p
zenguy_pc has quit [Read error: Connection reset by peer]
<undeadaedra> apeiros, the ruby god
<Senjai> I'm in every channel that matters! Am I not in a channel that matters?
x44x45x41x4E has joined #ruby
wpp has joined #ruby
<undeadaedra> you're not in #matter
<Senjai> undeadaedra: I think I'll pass on that one ;)
<apeiros> #marshall
tkuchiki has quit [Remote host closed the connection]
<apeiros> because, you know, marshall matters!
<Senjai> Registered : Oct 20 06:51:13 2005 (9y 34w 5d ago)
<apeiros> huehue
<Senjai> apeiros: You're old mang
<Senjai> I only got 4 years 17 weeks
<apeiros> I'm not old
<apeiros> I'm ancient
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfockler has joined #ruby
flughafen_ has quit [Ping timeout: 272 seconds]
<undeadaedra> Time to use some carbon 14
<apeiros> I'm the source of all that is. don't they teach you kids philosophy anymore?
zudochkin has quit [Read error: Connection reset by peer]
yh has quit [Ping timeout: 276 seconds]
DroidBur_ has joined #ruby
<apeiros> ok, granted, I'm only the male aspect, otherwise I'd be apeiron :)
* Senjai trying to picture what apeiros would be like in '05
ta has quit [Remote host closed the connection]
danzilio has joined #ruby
zudochkin has joined #ruby
<undeadaedra> 1905?
jhwhite has joined #ruby
<undeadaedra> :p
Nowaker has quit [Ping timeout: 256 seconds]
paulcsmith has quit [Quit: Be back later ...]
<dfockler> haha
shock_one has quit [Remote host closed the connection]
dzejrou has joined #ruby
withnale_ has quit [Quit: Be back later ...]
<apeiros> 00.000.000.005?
timonv has quit [Ping timeout: 265 seconds]
sarkyniin has joined #ruby
<dfockler> IRC thinks that's a weird IP address
ryba is now known as simi
diegoviola has joined #ruby
<apeiros> irc became sentient? when did that happen? :D
<dfockler> when it underlined that ip address
<apeiros> ok, athos_diddy's second is up. getting dinnger.
droidburgundy has quit [Ping timeout: 246 seconds]
<apeiros> *dinner
<undeadaedra> bon ap
<athos_diddy> ok!
<athos_diddy> have a good dinner will u be back
<apeiros> certainly
<athos_diddy> ok! great! ty
ta has joined #ruby
gregf has joined #ruby
startupality has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
piet_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
startupality has joined #ruby
piet_ has quit [Client Quit]
<Senjai> dfockler: Doesnt underline it for me
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
mleung has joined #ruby
jackjackdripper has joined #ruby
<dfockler> I guess just my IRC client is sentient
yqt has quit [Ping timeout: 256 seconds]
yqt has joined #ruby
veinofstars has joined #ruby
catphish_ has quit [Quit: Leaving]
paulcsmith has joined #ruby
bgmarx has joined #ruby
krisquigley has quit [Remote host closed the connection]
jackjackdripper1 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Al3ks has joined #ruby
yh has joined #ruby
zenguy_pc has joined #ruby
The_Phoenix has joined #ruby
adamjleonard has joined #ruby
<jbisnett> has anyone tried linking a different malloc to ruby?
apoplexy has joined #ruby
jackjackdripper has quit [Ping timeout: 252 seconds]
<undeadaedra> what do you mean?
konieczkow has joined #ruby
<undeadaedra> ruby has been linked to different malloc implementations as it works on different systems
sharpmachine has joined #ruby
<jbisnett> im trying to link doug lea's malloc in and its building but failing tests apparently randomly
Xeago has joined #ruby
dagda1_ has joined #ruby
mleung has quit [Quit: mleung]
DrShoggoth has joined #ruby
<jbisnett> i also have a custom malloc im trying to link in but it seems like ruby is overwriting its headers
mrmargolis has quit [Remote host closed the connection]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gkra has joined #ruby
mrmargolis has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
yh has quit [Ping timeout: 255 seconds]
konieczkow has quit [Ping timeout: 244 seconds]
mleung has joined #ruby
<jbisnett> i tried configuring with jemalloc but i cant figure out how that works
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shock_one has joined #ruby
simplyianm has joined #ruby
mleung has quit [Read error: Connection reset by peer]
mallu has joined #ruby
<mallu> I have a hash like this. https://dpaste.de/qeSH. Can you please tell me how to get dev password for janitor
jas02 has left #ruby [#ruby]
bMalum has quit [Quit: bMalum]
chinmay_dd has quit [Remote host closed the connection]
<apeiros> mallu: what have you tried?
tkuchiki has quit [Remote host closed the connection]
<ZOMGITSABEAR> you guys know anyone that needs sysadmin work, web design, or help with a project?
<mallu> test['dev']['janiotor']['password']
<apeiros> mallu: apart from the typo, that looks correct
<ZOMGITSABEAR> sorry, wrong channel
wookiehangover has quit [Ping timeout: 265 seconds]
<apeiros> mallu: is your paste a config file? or actual output from your hash?
<mallu> test['dev']['janitor']['password']
<mallu> NoMethodError: undefined method `[]' for nil:NilClass
spider-mario has joined #ruby
dblessing has quit [Ping timeout: 244 seconds]
vdamewood has quit [Quit: Life beckons.]
michaeldeol has joined #ruby
<apeiros> mallu: is your paste a config file? or actual output from your hash?
<mallu> aperios: it is an actual hash from a databag
<mallu> I should say from a json file
mwlang has joined #ruby
<apeiros> mallu: my nick is not aperios. use tab completion for nicks.
<apeiros> mallu: how did you generate that output?
zudochkin has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
<mwlang> I may need to find a SOAP channel to ask this, but hopefully there are other SOAP users lurking here: Doesn’t the SOAP protocol disallow two different variations of the same-named complex data type within the same namespace?
Notte has joined #ruby
mister_solo has joined #ruby
DroidBur_ is now known as droidburgundy
tkuchiki has joined #ruby
wookiehangover has joined #ruby
Narzew has joined #ruby
cndiv has joined #ruby
mdw has joined #ruby
mikecmpb_ has quit [Quit: i've nodded off.]
kb3ien has joined #ruby
guillaume-rb has quit [Quit: guillaume-rb]
hectortrope has joined #ruby
Spami has joined #ruby
<kb3ien> I'm trying to make a ruby on rails app, running under Apache use a proxy for its outgoing connections. Setenv http_proxy http://127.1:8888 in the virtualhost file isn't doing the trick. Is there a better way?
RobertBirnie has joined #ruby
<undeadaedra> \o
dblessing has joined #ruby
guillaume-rb has joined #ruby
pwnz0r has joined #ruby
hectortrope has quit [Client Quit]
<kb3ien> its using passenger
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang> kb3ien: since it’s an outgoing connection, you’re presumably using Faraday, mechanize, HTTPClient, RestClient, or similar, right?
<Senjai> mwlang: Thank you for not wanting to party hard
<kb3ien> the call is generated thusly : req = Net::HTTP::Post.new(uri.request_uri)
<havenwood> ye ole Net::HTTP
Spami has quit [Quit: This computer has gone to sleep]
<Senjai> Net::HTTP fo lyfe
<kb3ien> more like the death of me.
<mwlang> Senjai: :-)
wookiehangover has quit [Ping timeout: 265 seconds]
pwnz0r has quit [Ping timeout: 256 seconds]
lessless has joined #ruby
antgel has quit [Ping timeout: 265 seconds]
xxneolithicxx has joined #ruby
<mwlang> kb3ien: I’d suggest using a gem that abstracts the Net::HTTP stuff away. Faraday’s been my go-to choice of late and it’s easy to tell it how to proxy: http://www.intridea.com/blog/2012/3/12/faraday-one-http-client-to-rule-them-all provides a decent intro.
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
<kb3ien> Is there no environment variable that will be honoured ?
<Senjai> Faraday is great, but I would still suggest Net::HTPP
<Senjai> Net::HTTP*
diegoviola is now known as Guest12616
<Senjai> Especially if you don't understand the things just yet
diego3 is now known as diegoviola
<kb3ien> Can it take a proxy argument. I want to edit as little of this code as I can, for future maintainers.
<havenwood> kb3ien: Are you exporting the http_proxy env?
<havenwood> "Net::HTTP will automatically create a proxy from the http_proxy environment variable if it is present."
Guest12616 has quit [Ping timeout: 250 seconds]
<dfockler> https://gist.github.com/dfockler/9823cfeba71b8fcf7f7c Why doesn't the first syntax work with yield?
glcx has quit [Max SendQ exceeded]
<mwlang> dfockler: try output << yield(element)
glcx has joined #ruby
wookiehangover has joined #ruby
<dfockler> mwlang: that's on there and it works, just wondering why the other way didn't
shock_one has quit []
<havenwood> kb3ien: Check?: ENV['http_proxy']
fabrice31 has joined #ruby
<kb3ien> I've been down that road, but will try again.
<mwlang> dfockler: I think operator precedence…without the parentheses, ruby wants to handle “output << yield” first, but then doesn’t know what to do with element next.
<dfockler> ahh ok
ramfjord has joined #ruby
<mwlang> dfockler: sorry for the quick fire answer…I actually didn’t read the whole gist. :-p
Xeago has quit [Remote host closed the connection]
Fooster has joined #ruby
<dfockler> no it's cool, it's wasn't a real problem I was having anyways
bootstrappm has joined #ruby
<athos_diddy> i'm having problems trying to corrupt the hash table with my example https://gist.github.com/genericlady/de9e73a686efc775266f
mister_solo has quit [Ping timeout: 264 seconds]
lee-jon has quit [Quit: lee-jon]
mister_solo has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<athos_diddy> recently i was practicing data structures and have been building counted collections. so i'm reading what Yuki said about corruption and i'm wanting to understand what's the best way to build this counted collection
sinkensabe has joined #ruby
Cust0sLim3n has quit [Ping timeout: 245 seconds]
<athos_diddy> originally i just used structs as keys and it's easy to compare and update it's value. using an immutable object as a key i find it more difficult to build the counted collection
<athos_diddy> a word counter would be simpler to keep count of
<athos_diddy> but this is more complex
aryaching has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
fabrice31 has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
c0m0 has quit [Ping timeout: 246 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
adamjleonard has quit [Quit: Leaving...]
bMalum has joined #ruby
jlast has joined #ruby
freerobby has joined #ruby
<dfockler> athos_diddy: well you aren't actually putting the brick object into the backpack
wpp has quit []
francois_ has joined #ruby
revath has joined #ruby
Zai00 has quit [Quit: Zai00]
commondream has quit [Remote host closed the connection]
postmodern has joined #ruby
pietr0 has joined #ruby
stan has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Quit: dionysus69]
chinmay_dd has joined #ruby
<athos_diddy> i'm putting what it was containing which is a hash
<athos_diddy> an object is like a pointer to something, right
ogpastal_ has joined #ruby
califerno has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
preyalone has quit [Quit: Connection closed for inactivity]
<claw> hey there
<jhass> athos_diddy: no, the object is the something, a variable is the pointer
failshell has quit [Remote host closed the connection]
AndroidLoverInSF has joined #ruby
<claw> i have a hash with 10 keys. how can i get a new hash with only 3 of them ? (nice ruby magic way)
mister_s_ has joined #ruby
<dfockler> claw: depends on your criteria for the 3 key value pairs
<jhass> claw: activesupport by any chance?
<jhass> (are you inside Rails for example)
<claw> no jhass no activesupport
ogpastaling has quit [Ping timeout: 244 seconds]
<jhass> >> {a: 1, b: 2, c: 3, e: 4}.select {|k, v| %i[a b c].include? k }
<ruboto> jhass # => {:a=>1, :b=>2, :c=>3} (https://eval.in/383879)
Cust0sLim3n has joined #ruby
mister_solo has quit [Ping timeout: 255 seconds]
francois_ has quit [Ping timeout: 252 seconds]
Igorshp has quit [Remote host closed the connection]
<claw> i guess thats fine jhass thanks
livathinos has joined #ruby
wallerdev has joined #ruby
drocsid has quit [Ping timeout: 265 seconds]
wookiehangover has quit [Quit: i'm out]
<dfockler> athos_diddy: in jafrog's example she is mutating the value that the reference in the hash is pointing to
wookiehangover has joined #ruby
livathinos has quit [Client Quit]
wallerdev has quit [Client Quit]
<dfockler> so the hash of the reference has changed when you go to check for it again
mister_s_ has quit [Ping timeout: 264 seconds]
<dfockler> it comes down to how ruby is calculating the hash value of the object you want to store in the hash
<dfockler> and whether that hash value can change
rushed has joined #ruby
stamina has quit [Quit: WeeChat 1.2]
qwertme has joined #ruby
allomov has quit [Remote host closed the connection]
wallerdev has joined #ruby
symm- has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
ndrei has joined #ruby
<athos_diddy> jhass thank you for clarifying
<athos_diddy> dfockler thank you for the explanation
denver has quit [Remote host closed the connection]
<kb3ien> seems that it does follow the bidding of the setenv, but it did not until after I did ` bundle exec rake` first. Not sure why.
duderonomy has quit [Ping timeout: 264 seconds]
krisquigley has joined #ruby
jackjackdripper has joined #ruby
<mwlang> boy, I’m glad I never think to use mutable objects as hash keys. :-)
Spami has joined #ruby
_djbkd has joined #ruby
sharpmachine has joined #ruby
<dfockler> hopefully it would never come up
danzilio has quit [Quit: My computer has fallen asleep!]
DrShoggoth has quit [Ping timeout: 272 seconds]
chinmay_dd has quit [Remote host closed the connection]
<havenwood> kb3ien: well, that's odd - hrm
jackjackdripper1 has quit [Ping timeout: 255 seconds]
<kb3ien> The bigger issue, for now, is that I want to use an external cache for these requests, most of which are HTTPS are are therefore implemented as a CONNECT rather than a GET or POST.
<kb3ien> I'm assuming that there is no way simpler that to edit the https: and change it to http: ?
danzilio has joined #ruby
<kb3ien> again. simple code changes that anyone can maintain.
simplyianm has quit [Read error: Connection reset by peer]
dmolina has quit [Quit: Leaving.]
droidburgundy has quit [Read error: Connection reset by peer]
dmolina has joined #ruby
sarmiena_ has joined #ruby
chinmay_dd has joined #ruby
Fooster_ has joined #ruby
Fooster has quit [Read error: Connection reset by peer]
<sarmiena_> is there a standard way of doing a net::http post for multipart data without loading an entire attachment into memory?
simplyianm has joined #ruby
<sarmiena_> i’m transferring video data & don’t have gigs of ram on the machine to spare
droidburgundy has joined #ruby
axl__ has quit [Ping timeout: 245 seconds]
<chridal> Any way to avoid the INSANELY annoying automatic string escaping in Ruby?
<Senjai> chridal: What
<chridal> Hang on. I'll gist it.
nikhgupt has joined #ruby
nofxx has joined #ruby
<Senjai> sarmiena_: I'm going to go with yes. I believe you can send chunks
<sarmiena_> Senjai: i found the documentation for reading in chunks, but haven’t found anything about sending in chunks :/
constantinexvi has quit [Quit: Exiting]
<Senjai> sarmiena_: or read in chunks, sorry. Is this a web form?
mrmargol_ has joined #ruby
<chridal> It's so damn annoying I am nearly exploding
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chridal> Long day at work, and now this shit.
<Senjai> chridal: lol, that's because of inspect man
dmolina has quit [Ping timeout: 244 seconds]
<kb3ien> no its gone back to no proxy.
<chridal> Senjai: Say what?
<Senjai> chridal: Dude, chill. Pry automatically calls #inspect on everything
<sarmiena_> Senjai: no. i’m uploading videos from my raspberry pi to flickr account. some videos are about 1GB, but pi only has 1GB total
<chridal> Senjai: Still doesn't work in staging
<sarmiena_> so i can’t load the whole video into memory to send
<Senjai> chridal: In order to display a string to the screen, it escapes it
aphprentice has joined #ruby
<jhass> chridal: are you building JSON with string concatenations? ...
<Senjai> chridal: JSON iteself is a string
<chridal> jhass: I believe I have to? Have a look at the result I need
<Senjai> chridal: In order for JSON to be parsed, quotes have to be escaped
<Senjai> Lol
<chridal> notice that the inner "aps" needs to be wrapped in " "
nikhgupta has quit [Ping timeout: 272 seconds]
<jhass> ah, give whoever designed that API a huge slap from me
<Senjai> chridal: padded_message = { "APS_SANBOX" => inner }.to_json
denver has joined #ruby
<kb3ien> wondering if its easier to use `ip` commands to reroute the traffic.
<jhass> anyway, you want {"APNS_SANDBOX" => inner.to_json }.to_json
MatthewsFace has joined #ruby
edwinvdg_ has joined #ruby
<Senjai> jhass: Dont need inner.to_json
<chridal> that one is going to escape into escape hell though
sinkensabe has quit [Remote host closed the connection]
<jhass> eh, well, removing the one above of course
<chridal> and lead to three x \\\
<kb3ien> needs more \.
<jhass> chridal: note that pry calls .inspect
<jhass> chridal: compare with puts
<Senjai> chridal: Is this an API that has to accept a string of json as a value, in a string of json?
<chridal> aha! So that's why that was happening.
serivich has quit [Ping timeout: 265 seconds]
<chridal> Senjai: Correct
<Senjai> chridal: I SAID that...
mrmargolis has quit [Ping timeout: 250 seconds]
<Senjai> :/
<chridal> Senjai: I noticed
The_Phoenix has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 245 seconds]
<Senjai> jhass: People just listen to you more I suppose :P
<chridal> but this is causing three \\\
dopie has quit [Quit: This computer has gone to sleep]
sdothum has joined #ruby
<chridal> That's the part I was confused about
<jhass> Senjai: nah, it's the repetition
<chridal> ^
bgmarx has quit [Remote host closed the connection]
<chridal> Anyhow.
andikr has joined #ruby
<Senjai> My favorite is when people define inspect methods on objects
<chridal> So { APNS_SANDBOX: inner }.to_json should produce the wanted output?
<mwlang> Senjai: nah, it’s not that….jhass has the annoying habit of chiming in after you’ve done did said your piece and start reading instead of typing.
<jhass> chridal: yeah
<kb3ien> iptables. whatever.
<chridal> Will have a go! Thanks.
<chridal> any way to have pry not do .inspect?
<jhass> mwlang: heh
<jhass> chridal: use puts
edwinvdgraaf has quit [Ping timeout: 255 seconds]
lexun has joined #ruby
<chridal> Thanks. Will try.
sharpmachine has quit [Remote host closed the connection]
Scroff has quit [Remote host closed the connection]
<Senjai> jhass: Pry still calls inspect on the string
Regulati_ has quit [Remote host closed the connection]
<Senjai> chridal: No, this is how pry works
lexun has left #ruby [#ruby]
jackjackdripper has quit [Read error: Connection reset by peer]
<jhass> Senjai: no, on the nil returned by puts
jackjackdripper has joined #ruby
<Senjai> chridal: If you want to see the raw format, write it out to a file
RegulationD has joined #ruby
<Senjai> jhass: Ah, right
<Senjai> sorry
<chridal> I guess the reason I am so pissed is I couldn't properly test this without pushing through CI to staging ...
Notte has quit [Remote host closed the connection]
<chridal> bad environment atm
adamjleonard has joined #ruby
balazs has joined #ruby
<chridal> because to_json
<Senjai> chridal: That's a you problem, not a String/JSON/Rails/ActiveSupport problem though :P
<Senjai> The odds of you finding a bug in to_json is extreeeeemeely rare.
constantinexvi has joined #ruby
Fooster_ has quit [Remote host closed the connection]
<chridal> is in active_support and I couldn't require it
tfitts has joined #ruby
stylus has quit [Ping timeout: 255 seconds]
<chridal> shouldn't that be possible outside of rails btw? in a .rb file?
<Senjai> chridal: You can use Oj manually without active support
<Senjai> chridal: JSON.dump
<Senjai> I believe JSON is stdlib
<chridal> aha. So JSON.dump(insert_json_here) will produce the same?
<chridal> as to_json?
<jhass> uh, require "json" adds to_json methods, no?
tcrypt has joined #ruby
<Senjai> JSON.dump(hash)
<chridal> does it?
<jhass> >> require "json"; {a: 1}.to_json
<ruboto> jhass # => "{\"a\":1}" (https://eval.in/383924)
<tfitts> Given this array [["A1DTX7RSSYHHWC", 17], ["A2YPCK6GWDEH36", 18], ["A1X9E31IPCZV5I", 19]] is there a one-line way to turn it into a hash such that hash["A1X9E31IPCZV5I"] returns 19
<Senjai> chridal: If I had the choice, I'd use Oj though
<chridal> Hold my cyanide while I kick myself in the face.
<Senjai> ?gist tfitts
<ruboto> tfitts, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<jhass> tfitts: call .to_h on it
<tfitts> jhass: I knew I was missing something easy/obvious, thanks
sandstrom has quit [Quit: My computer has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
segfalt has quit [Quit: segfalt]
mwlang has quit [Quit: mwlang]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dumdedum has quit [Quit: foo]
k3asd`_ has joined #ruby
<sarmiena_> So any insight on doing chunked multi part post via net::http to avoid loading the entire file from disk?
DrShoggoth has joined #ruby
dopie has joined #ruby
rdark has quit [Quit: leaving]
<Senjai> sarmiena_: You didnt answer my question
commondream has joined #ruby
<Senjai> sarmiena_: Is this a web form?
<sarmiena_> Senjai: you must have missed it :) i did. sec lemme scroll up
<sarmiena_> “no. i’m uploading videos from my raspberry pi to flickr account. some videos are about 1GB, but pi only has 1GB total”
mikecmpbll has joined #ruby
tkuchiki has quit [Remote host closed the connection]
failshell has joined #ruby
k3asd` has quit [Ping timeout: 276 seconds]
sinkensabe has joined #ruby
<jhass> sarmiena_: I googled and I'd guess the first result being https://github.com/nicksieger/multipart-post is not without reason...
bgmarx has joined #ruby
<sarmiena_> yeah i saw that. but it’s pretty old and based on old ruby version. so wondering if there’s a more standard way of doing this
<sarmiena_> …before i plugin an old non-maintained gem
segfalt has joined #ruby
djellemah has quit [Quit: Leaving]
commondream has quit [Ping timeout: 265 seconds]
sharpmachine has joined #ruby
psy_ has joined #ruby
chouhoul_ has joined #ruby
dgutierrez1287 has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
<Senjai> sarmiena_: IIRC You use start
<Senjai> and you can take over how the request is sent
<Senjai> from there
<Senjai> You might need to do some source diving
s2013 has joined #ruby
Cust0sLim3n has quit [Ping timeout: 252 seconds]
troulouliou_dev has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
lav has joined #ruby
dopie has quit [Ping timeout: 276 seconds]
Al3ks has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Ping timeout: 255 seconds]
<sarmiena_> :O
<jhass> http://stackoverflow.com/a/30087289/2199687 looks interesting, I wonder if it works for S3 too
dgutierrez1287 has quit [Ping timeout: 255 seconds]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago has quit [Remote host closed the connection]
dopie has joined #ruby
Notte has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konieczkow has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
jlast has joined #ruby
duderonomy has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
qwertme has joined #ruby
konieczkow has quit [Ping timeout: 250 seconds]
<lav> is there any ffi tut. on ruby?
jacaballero has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler> lav: the github wiki on the ffi lib is decent, unless you are looking for something more specific
glcx has quit [Ping timeout: 250 seconds]
denver has quit [Remote host closed the connection]
<dfockler> s/lib/gem
Cust0sLim3n has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
<sarmiena_> jhass: couple questions about that SO answer. how is the file being chunked? i see the line that says req.body = f.read, but how big is that chunk by default?
Ruinside has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
adamjleonard has quit [Quit: Leaving...]
<jhass> right, that's a bit weird
nym has joined #ruby
nofxxx has joined #ruby
wookiehangover has quit [Ping timeout: 265 seconds]
nofxx has quit [Disconnected by services]
nofxxx is now known as nofxx
nofxx has quit [Changing host]
nofxx has joined #ruby
<jhass> no idea, I don't think it's a fully working sample
Lucky__ has joined #ruby
stylus has joined #ruby
lav has quit [Ping timeout: 246 seconds]
nb_bez___ has quit [Quit: Connection closed for inactivity]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
<Ruinside> Hello Room:)
<sarmiena_> yeah i can follow the concept, but don’t see how the chunking is actually happening. is it per byte? per kilobyte? and also the fact that it appears to open up a new connection every time seems wasteful if you’re doing this thousands of times
Morrolan has quit [Quit: ZNC: Shutting down.]
<sarmiena_> not aiming these questions directly at you. just questions i have hehe
Al3ks has joined #ruby
<Ruinside> Anyone having trouble installing Rails on Mac os 10.10.3?
wookiehangover has joined #ruby
<sarmiena_> Ruinside: what error are you getting? and how are you trying to install it?
<nofxx> There;s this nice gem, stringex, for the #to_url method. Very useful but I'm going to call it 2, at most 3 times in all the project. And the gem only works as string ext, was going to suggest a more functional approach: Stringex.to_url("") instead of "".to_url. I mean why have that in all my strings? Am I beign too methodical/systematic?
DrShoggoth has quit [Ping timeout: 256 seconds]
Ruinside has quit [Quit: Leaving...]
sandstrom has joined #ruby
DrShoggoth has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
chouhoul_ has quit [Ping timeout: 246 seconds]
paulcsmith has quit [Quit: Be back later ...]
paulcsmith has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lexun has joined #ruby
pietr0 has quit [Quit: pietr0]
kb3ien has quit [Ping timeout: 265 seconds]
michael_mbp has quit [Excess Flood]
sinkensabe has quit [Remote host closed the connection]
swgillespie has joined #ruby
pietr0 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<ericmeds> what is recommended for measuring code documentation?
<ericmeds> yardstick?
sdwrage has joined #ruby
jackjackdripper has joined #ruby
michael_mbp has joined #ruby
lkba_ has joined #ruby
Casty has joined #ruby
<sarmiena_> this looks promising: https://gist.github.com/sasimpson/1112739
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
Casty has quit [Client Quit]
dr-richard has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
<Senjai> ericmeds: Yard, yeah
adamjleonard has joined #ruby
endash has quit [Quit: endash]
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
jackjackdripper1 has joined #ruby
k3asd`_ has quit [Ping timeout: 252 seconds]
uptownhr has joined #ruby
rbowlby has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Ping timeout: 246 seconds]
x1337807x has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
wookiehangover has quit [Ping timeout: 256 seconds]
tedstriker has quit [Quit: Anti-Fraping status set.]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xxneolithicxx has quit [Ping timeout: 255 seconds]
Narzew has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
Nowaker has joined #ruby
davedev24_ has quit [Ping timeout: 276 seconds]
jblancett has quit [Remote host closed the connection]
whippythellama has joined #ruby
<SebastianThorn> ruby is great, meet a guy today that thought my code was psudo-code :)
<jhass> :D
<nofxx> SebastianThorn, that's the idea. Also a sign it's good code =D
InternetFriend has joined #ruby
<jbisnett> does anyone one know how to link jemalloc with ruby
vdamewood has joined #ruby
andywojo has joined #ruby
wookiehangover has joined #ruby
<SebastianThorn> nofxx: nofx fan? (the band)
jackjackdripper has joined #ruby
Xeago has joined #ruby
commondream has joined #ruby
lexun has quit []
uptownhr has quit [Quit: uptownhr]
jackjackdripper1 has quit [Ping timeout: 256 seconds]
j4cknewt has joined #ruby
simplyianm has quit [Remote host closed the connection]
Agoldfish has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
arescorpio has joined #ruby
axilla has quit [Ping timeout: 272 seconds]
<nofxx> SebastianThorn, yeah, sex, drugs & punk rock teenages. Nowdays code is included in drugs =P
chouhoulis has joined #ruby
wildroman2 has quit [Remote host closed the connection]
metalic has quit [Quit: Leaving]
<SebastianThorn> nofxx: im gonna see them next friday, but it seems as my merch has been lost in the mail :(
Xiti has quit [Ping timeout: 252 seconds]
tennis_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<miah> jealous. would <3 to see nofx
Xeago has quit [Remote host closed the connection]
bgmarx has quit [Remote host closed the connection]
<miah> ericmeds: rdoc can; rdoc -C1
jpfuentes2 has joined #ruby
[H]unt3r has quit []
<miah> rdoc will show you all the code that needs docs, as well as a summary
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adamjleonard has quit [Quit: Leaving...]
nonparfumee has joined #ruby
adamjleonard has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
fabrice31 has joined #ruby
lkba has joined #ruby
Xiti has joined #ruby
Xiti has quit [Max SendQ exceeded]
bgmarx has joined #ruby
dagda1 has joined #ruby
Xiti has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
mdw has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
podman has joined #ruby
commondream has quit [Remote host closed the connection]
revath has quit [Ping timeout: 244 seconds]
<ericmeds> miah: ty
Stany has joined #ruby
frem has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
MasterPiece has joined #ruby
Tamae has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
shadoi has joined #ruby
revath has joined #ruby
kirun has joined #ruby
francoi__ has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
_blizzy_ has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
grubernaut has quit []
tennis_ has quit [Ping timeout: 245 seconds]
jackjackdripper1 has joined #ruby
jhwhite has quit [Ping timeout: 244 seconds]
jhwhite has joined #ruby
micmus has quit [Ping timeout: 265 seconds]
jphenow has quit [Quit: Be back later ...]
pragmatism has joined #ruby
jackjackdripper has quit [Ping timeout: 265 seconds]
rushed has quit [Quit: rushed]
mikecmpbll has quit [Quit: i've nodded off.]
francoi__ has quit [Ping timeout: 252 seconds]
krisquigley has joined #ruby
jphenow has joined #ruby
mikecmpbll has joined #ruby
s2013 has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop_ has joined #ruby
simplyianm has joined #ruby
lkba_ has joined #ruby
lkba_ has joined #ruby
shadoi has quit [Quit: Leaving.]
sharpmachine has quit [Remote host closed the connection]
crdpink has joined #ruby
last_staff has joined #ruby
TheHodge has joined #ruby
crdpink2 has quit [Ping timeout: 265 seconds]
krisquigley has quit [Ping timeout: 276 seconds]
finisherr has quit [Quit: finisherr]
revath has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 256 seconds]
chinmay_dd has quit [Remote host closed the connection]
wookiehangover has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 250 seconds]
vikaton has joined #ruby
hoov has quit [Quit: Leaving]
revath has joined #ruby
commondream has joined #ruby
kahuna_ has joined #ruby
micmus has joined #ruby
Kricir has quit []
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
wookiehangover has joined #ruby
adamjleonard has quit [Quit: Leaving...]
Casty has joined #ruby
iamninja has joined #ruby
kahuna_ has quit [Quit: leaving]
sarkyniin has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
bgmarx has quit [Remote host closed the connection]
but3k4 has quit [Read error: Connection reset by peer]
y0da has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
Xeago has joined #ruby
GitGud has quit [Read error: Connection reset by peer]
bgmarx has joined #ruby
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Quit: WeeChat 1.2]
diegoviola has joined #ruby
perrier has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axilla has joined #ruby
perrier has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
freerobby has quit [Quit: Leaving.]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
Xeago has quit [Remote host closed the connection]
centrx has joined #ruby
failshell has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 264 seconds]
balazs has quit [Ping timeout: 265 seconds]
droidburgundy has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wookiehangover has quit [Ping timeout: 265 seconds]
simplyianm has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
finisherr has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24_ has quit [Ping timeout: 256 seconds]
lkba has joined #ruby
simplyianm has quit [Remote host closed the connection]
ndhamecom has joined #ruby
_djbkd has quit [Remote host closed the connection]
Yiota has joined #ruby
InternetFriend has joined #ruby
rbowlby has joined #ruby
GitGud has joined #ruby
wookiehangover has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
mistergibson has joined #ruby
mengu has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
uptownhr has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
davedev24_ has joined #ruby
[H]unt3r has joined #ruby
symm- has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
DLSteve has joined #ruby
k3asd` has joined #ruby
kahuna_ has joined #ruby
skade has joined #ruby
j_mcnally has joined #ruby
simplyianm has joined #ruby
axl_ has left #ruby [#ruby]
bMalum has quit [Quit: bMalum]
workmad3 has joined #ruby
skade has quit [Ping timeout: 276 seconds]
Mojo_Nixon has joined #ruby
konieczkow has joined #ruby
roger_rabbit has joined #ruby
jmignault has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jpfuentes2 has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
konieczkow has quit [Ping timeout: 256 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
simplyianm has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
DrShoggoth has quit [Quit: Leaving]
skade has joined #ruby
<jbisnett> does anyone know what my cause an "uninitialized constant TOPLEVEL_BINDING" error. I'm currently trying to link a memory allocator to ruby and I am getting that error when linking miniruby
<jbisnett> might*
danzilio has joined #ruby
simplyianm has joined #ruby
dhjondoh has quit [Remote host closed the connection]
jphenow has quit [Quit: Be back later ...]
jpfuentes2 has quit [Client Quit]
rindolf has quit [Quit: Leaving]
PaulCapestany has joined #ruby
danzilio has quit [Max SendQ exceeded]
wookiehangover has quit [Ping timeout: 256 seconds]
sandelius has joined #ruby
danzilio has joined #ruby
finisherr has quit [Quit: finisherr]
fgo has joined #ruby
momomomomo has joined #ruby
skade has quit [Ping timeout: 244 seconds]
jphenow has joined #ruby
sdothum has quit [Ping timeout: 250 seconds]
_djbkd has joined #ruby
_ht has quit [Quit: Konversation terminated!]
Morrolan has joined #ruby
jackjackdripper has joined #ruby
__butch__ has joined #ruby
finisherr has joined #ruby
wookiehangover has joined #ruby
freerobby has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
<jhass> ?ot yorickpeterse
<ruboto> yorickpeterse, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
edwinvdgraaf has joined #ruby
<jhass> yorickpeterse: and this time I mean, it's not the place and it will not go anywhere to discuss it
swgillespie has joined #ruby
<jhass> anybody that responds to this topic in this channel will be removed until 8am CET
edwinvdgraaf has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
ndrei has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
<yorickpeterse> what the fuck
rbennace_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<yorickpeterse> this channel turned sour pretty quickly
<jhass> it's prone to shitstorm, sorry but being hard is the only way
jpfuentes2 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> ehm no, with all due respect this is called censorship
<apeiros> yorickpeterse: jhass wants to avoid that #ruby catches on the shitstorm. and he offers an alternative venue.
<jhass> if you want to discuss join #ruby-offtopic, last word
skade has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
paulcsmith_ has joined #ruby
skade has quit [Client Quit]
dopie has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
zudochkin has joined #ruby
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
danzilio has quit [Quit: My computer has fallen asleep!]
sinkensabe has joined #ruby
freerobby has joined #ruby
rbennacer has joined #ruby
ndrei has joined #ruby
<athos_diddy> back
<athos_diddy> apeiros did you ever respond this irc client only goes back 300 lines
peter_paule has joined #ruby
<athos_diddy> turned off join\leave
<jhass> ?logs
<ruboto> I don't know anything about logs
<jhass> meh
<apeiros> athos_diddy: my last status was that you wanted to gist something - did I miss that?
<apeiros> mkfact!
<jhass> on it
<yorickpeterse> there's irclog.whitequark.org
<yorickpeterse> which is logging this channel
<athos_diddy> yeah i was getting one together
<athos_diddy> someone responded but i had to run out and could use a little more clarity
<jhass> !fact mk logs You can find a log of this channel at http://irclog.whitequark.org/ruby/
<ruboto> jhass, I will remember that logs is You can find a log of this channel at http://irclog.whitequark.org/ruby/
momomomomo has quit [Quit: momomomomo]
terlar has joined #ruby
pragmatism has joined #ruby
<yorickpeterse> athos_diddy: oh hey, you're coding again?
<apeiros> athos_diddy: remind me - we were discussing Hash and #rehash, right?
<athos_diddy> yes!
<apeiros> phew, brain isn't dead yet :D
<athos_diddy> i can repost the chat in a gist i saved where we left off
eggoez has quit [Ping timeout: 252 seconds]
<apeiros> backpack.hash_key? # <- that should be .has_key?, right?
<athos_diddy> ::gags::
<athos_diddy> yes
InternetFriend has joined #ruby
roolo has quit [Remote host closed the connection]
<athos_diddy> ah yes my point is that sure a word counter is easy you can turn a string to a key and point to an integer, voila counted collection of words
<athos_diddy> but if it's something more complex that's mutable what should we do
peter_paule has quit [Ping timeout: 265 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
Iskarlar has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
happyface has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby
weaksauce has joined #ruby
<apeiros> athos_diddy: if it's mutable, the question is what do you want the key to be
<apeiros> the current state? or the object itself
<bhorn1> Why, when attempting to use the RGBA values to change the color of the background of a gui, does it not return the proper color?
<bhorn1> Nevermind fixed.
<bhorn1> Sorry!
<apeiros> i.e., `key = [1,2,3]; {key => "one two three"}; key << 4` - do you want key still to refer to "one two three"? or should that now be key to another value?
ldnunes has quit [Quit: Leaving]
<athos_diddy> yes i want it to still point to [1,2,3] in this case
<athos_diddy> well i don't know if i want to or not i suppose both have different answers
eggoez has joined #ruby
<Senjai> athos_diddy: Again, whats the problem you're trying to solve
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> athos_diddy: but it never pointed to [1,2,3], it pointed to "one two three"
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> nvm
<dfockler> I was testing Struct and it has the same hash regardless of the value of the fields in the object
<Senjai> found the gist
omegahm has quit [Quit: YourBNC - (https://yourbnc.co.uk)]
ldnunes has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
terlar has quit [Ping timeout: 252 seconds]
<Ponyo> Hi there, I'm playing with classes and instances in Ruby as a training lesson in Classes and class inheritance. https://gist.github.com/FuzzySunshine/e9f2bf673c91a0398306 I'm wondering if there is an easy way in the class Spades to call Deck's initialize when it's initialize but with players 4 instead of players 2?
konieczkow has joined #ruby
MasterPiece has quit [Quit: Leaving]
<apeiros> dfockler: um, then something went wrong
<athos_diddy> ahhhh
<athos_diddy> right
<apeiros> dfockler: struct's hash depends on class & values
ndrei has joined #ruby
<dfockler> well I was changing an Object generated from a struct
GBrawl has joined #ruby
bgmarx has quit [Remote host closed the connection]
<dfockler> so not exactly the Struct itself
<apeiros> yes, that should change its hash
<dfockler> hmmm
<apeiros> >> S = Struct.new(:a, :b); x = S.new(1, 2); h1 = x.hash; x.a = 20; h2 = x.hash; [h1, h2]
<ruboto> apeiros # => [91319188, 1012531762] (https://eval.in/383980)
<apeiros> dfockler: different hashes. same object.
<athos_diddy> what a brilliant way to use an irc bot
<athos_diddy> that was cool
commondream has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> Ponyo: sure, just call super inside Spades initialize, it's a normal method after all
<athos_diddy> so the actual hash is never pointing to the value
<Ponyo> oh ok, that's where super comes into this, thanks!
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
<athos_diddy> it's the variable holding the hash
<apeiros> dfockler: I'm curious - want to gist your code? maybe we can figure why the hash didn't change for you?
yfeldblum has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<athos_diddy> which you can use for comparisons
mdw has joined #ruby
<athos_diddy> and that should be fine and not lead to corruption
<apeiros> athos_diddy: since ruby (sadly) calls the class Hash - do you mean the key's .hash value?
<athos_diddy> yes sorry
<athos_diddy> wait
<athos_diddy> i meant
startupality has joined #ruby
<athos_diddy> it's the variable holding the Struct
<dfockler> ahhh apeiros you're right, error on my part
qwertme has joined #ruby
chussenot has joined #ruby
maknz has joined #ruby
<apeiros> athos_diddy: heh, now I'm confused. let me read your gist (mind you, I'm slightly tired with a bit of a headache, but I hope I can still give you the information you need to figure out how all works together)
commondream has joined #ruby
fabrice31 has quit [Ping timeout: 276 seconds]
subtwo has quit [Ping timeout: 276 seconds]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
inspiron has joined #ruby
valeriansaliou has joined #ruby
Pupeno has quit [Remote host closed the connection]
<apeiros> athos_diddy: I see a few misconceptions. let me think how to best unravel them.
<Ponyo> I'm confused about class inheritance and instance variables, https://gist.github.com/FuzzySunshine/63719c97463dd37d6ae0 shouldn't an instance variable defined by the super be accessible by what called it? I'm getting undefined local variable when I try to inherit the class and run it's functions locally. Error code at the bottom. Thanks
<athos_diddy> apeiros line 17 should that never be done? brick is a variable (pointing or holding) a struct. In the example it is being used a key pointing to a hash
<inspiron> i did a: sudo gem uninstall the_gem and it ran. when i type: the_gem at the console it says /usr/bin/the_gem: No such file or directory... How does it sill now about it? how can I completely remove all traces of it
valeriansaliou has quit [Client Quit]
<athos_diddy> thank you yes i know i'm missing something
<apeiros> athos_diddy: it's viable and makes sense. what you should not do is change any attribute of brick later in the code.
kb3ien has joined #ruby
<athos_diddy> right
<athos_diddy> because that would be bad right?
<athos_diddy> it lead to corruption
<apeiros> athos_diddy: if we had the time, the best would probably be to implement a tiny hash class ourselves. that'd explain everything. but not sure I'll stay awake long enough.
<athos_diddy> so it's this case i was wondering if we should rehash
<athos_diddy> tomorrow when you wake up i can just show you the project on my github
nonparfumee has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> well, lets do it anyway
jhwhite has quit [Quit: Lost terminal]
<athos_diddy> i'm just working on understanding the caveats of the language and best practice for data collections
<apeiros> thought it'd go in that direction from the structs' contents ;-)
<athos_diddy> how to build an interface for it and why I am doing so
<apeiros> ah, that's not language related. hash tables work like that in every language :)
<athos_diddy> :)
<athos_diddy> yes i'm trying to understand that
<athos_diddy> i'm learning the baseline of programming
<apeiros> you understand arrays?
<jhass> Ponyo: take a look at the line mentioned in the error, line 19
<athos_diddy> yes
<apeiros> ok
<jhass> Ponyo: hands is twice there, but it's not the same in both
<apeiros> you also understand arrays of arrays?
<Senjai> I wouldn't get to caught up on this stuff athos_diddy. If you're just learning its probably best to not worry about the low level deets. Unless you want to become an apeiros
<athos_diddy> sure
<athos_diddy> can we call them 2d arrays
<athos_diddy> is that appropriate
<Senjai> It's usually better to just make things in the beginning :P
<yorickpeterse> ooooooh, apeiros got served
railsraider has joined #ruby
<Senjai> yorickpeterse: apeiros knows way too much
pwnz0r has joined #ruby
akkad has joined #ruby
<athos_diddy> it's best to know all
francoi__ has joined #ruby
<athos_diddy> =P
<Senjai> athos_diddy: Not when you're first starting out it isnt
<apeiros> athos_diddy: not really. 2d arrays are often considered to be "rectangles", i.e. all arrays have the same size. that's not necessarily the case with arrays of arrays.
<athos_diddy> i'm not first starting out
<athos_diddy> this is what i'm up to
<Senjai> You said your learning the basics of programming
<athos_diddy> no
<athos_diddy> baseline
<Senjai> Oh, so you already know how to program then?
<athos_diddy> being a language po9lygot
mhb has joined #ruby
<athos_diddy> i know ruby and js
<yorickpeterse> wait, there's the perfect article for this
<athos_diddy> i learned ruby the first year, then went into JS.. now back to ruby
railsraider has quit [Client Quit]
<athos_diddy> i've been diving pretty deep past few months
TvL2386 has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
tomphp has joined #ruby
<athos_diddy> i'd call myself intermediate
allomov has joined #ruby
x1337807x has joined #ruby
<Ponyo> jhass: oh you are very right, thank you for that
x1337807x has quit [Max SendQ exceeded]
<Ponyo> Thanks that works well
x1337807x has joined #ruby
pwnz0r has quit [Ping timeout: 252 seconds]
krisquigley has joined #ruby
francoi__ has quit [Ping timeout: 272 seconds]
wildroman2 has joined #ruby
<apeiros> damn ruby's #hash being randomly seeded
Papierkorb has joined #ruby
crdpink2 has joined #ruby
zudochkin has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> hrmpf: the bane of talk proposals: "is this too nerdy y/n"
crdpink has quit [Ping timeout: 256 seconds]
rbennacer has quit [Ping timeout: 244 seconds]
<Senjai> yorickpeterse: What?
<BanzaiJoe> always no, dive, dive, dive!
momomomomo has quit [Quit: momomomomo]
<yorickpeterse> Senjai: trying to write down a talk proposal for Arrrrcamp, unsure if it's too hardcore or not
<Senjai> yorickpeterse: What's your topic?
<athos_diddy> yorickpeterse good article
nikhgupt has quit [Ping timeout: 250 seconds]
krisquigley has quit [Ping timeout: 265 seconds]
crdpink2 has quit [Remote host closed the connection]
<yorickpeterse> Senjai: I want to focus on parsing/performance in the context of Oga and such, since that's what I've been doing mostly in the past year or so
<BanzaiJoe> yorickpeterse isn't Arrrrcamp more hardcore to start with?
<yorickpeterse> Not specifically Oga, but it would involve some bits related to it
<yorickpeterse> BanzaiJoe: No idea, never went there
crdpink2 has joined #ruby
workmad3 has joined #ruby
<Senjai> yorickpeterse: I dont think parsing would be too bad.
<apeiros> athos_diddy: work in progress: https://gist.github.com/apeiros/13bc322e93707a41f653
railsraider has joined #ruby
<athos_diddy> age_of_people is considered a hash table?
<yorickpeterse> if only I could get my shit on Rbx before then I could do a pretty interesting talk on that
<yorickpeterse> since that has so far been at least 2 years of work
<yorickpeterse> if it wasn't for fkn openssl
<yorickpeterse> You fix one Gem and another 5 broken ones pop up
<apeiros> athos_diddy: yes, a crude emulation of a hash table
phizzbuzz has quit [Ping timeout: 245 seconds]
rbowlby has quit [Remote host closed the connection]
rbowlby has joined #ruby
<undeadaedra> respect tables
<yorickpeterse> Hm, I should probably dig into this again tomorrow
crdpink has joined #ruby
commondream has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
ledestin has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
simplyianm has joined #ruby
rbowlby_ has joined #ruby
mrmargolis has joined #ruby
crdpink2 has quit [Ping timeout: 256 seconds]
failshell has joined #ruby
qwertme has quit [Read error: Connection reset by peer]
Rapier- has quit [Quit: (null)]
<athos_diddy> i didn't even know find could use a block
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
<athos_diddy> this is like what i was doing
j_mcnally has joined #ruby
Notte has quit [Remote host closed the connection]
<Ox0dea> athos_diddy: Every method takes an implicit block, and most of the ones that could make use of it do so.
ascarter has joined #ruby
<athos_diddy> ok good to remember
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> athos_diddy: if there's something in the example you can't follow, you tell me
mrmargol_ has quit [Ping timeout: 246 seconds]
diegoviola has quit [Quit: WeeChat 1.2]
rbowlby has quit [Ping timeout: 256 seconds]
pragmatism has joined #ruby
<athos_diddy> ok
<athos_diddy> but what if john was a struct.. in this case it's just a string
<dukedave> Does the '+' appended to this filename have some special meaning? https://github.com/sstephenson/sprockets/blob/1566cd10486b677d52d93c74f489ad7a8d2acd79/lib/sprockets/asset.rb#L146
<athos_diddy> so should we not do that?
* dukedave thought such modifiers were supposed to go on the mode string, not the filename
<apeiros> athos_diddy: it works the same. a hash value is calculated from the struct's value.
<athos_diddy> right
<athos_diddy> so the question is
<athos_diddy> should we never do that?
rjno has joined #ruby
<athos_diddy> because Yuki talked about data corruption
<dukedave> Ah, I see, it moves the file after, nvm
<apeiros> we can do that, it's ok and there's plenty of cases where that's making a lot of sense
<athos_diddy> because that is in fact a mutable object
<athos_diddy> OK!!!
<apeiros> you can make it immutable by using .freeze e.g.
failshell has quit [Ping timeout: 244 seconds]
<undeadaedra> "Mr".freeze
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<athos_diddy> or private
<apeiros> what you should not do is change any value in the struct
<apeiros> because from what you can see from the emulation - if you change the value, the hash changes too
rbowlby_ has quit [Remote host closed the connection]
<apeiros> but the associated value is already stored in a bucket, using the old hash value
<athos_diddy> i know i'll end up using this in real world cases possibly with rails
kerrizor has joined #ruby
rbowlby has joined #ruby
<apeiros> so it can never be found with the new hash value. it'll look in the wrong bucket
bgmarx has joined #ruby
<athos_diddy> ok
<athos_diddy> so if just write a function with logic comparing equality we are fine
<athos_diddy> since it's flexible with changes
jackjackdripper has quit [Read error: Connection reset by peer]
<apeiros> what rehash does is remove all key/value pairs from all buckets, and then put them back into the correct bucket according to their current .hash value
jackjackdripper has joined #ruby
<athos_diddy> this could be considered polymorphism?
<athos_diddy> if we start talking about subtype poly?
<athos_diddy> oohhh!!!
<athos_diddy> rehash will update all the keys of the collection
JoshL has quit []
<athos_diddy> this can be considered garbage collection
<athos_diddy> ?
<apeiros> re rehash: yes. which is why it is expensive
<apeiros> no, nothing is collected
<athos_diddy> expensive meaning less profit.. system overhead
nickfausnight has joined #ruby
<athos_diddy> like in pop
<athos_diddy> principals of programming
commondream has joined #ruby
commondream has quit [Remote host closed the connection]
fgo has joined #ruby
GBrawl has quit [Quit: (null)]
bkxd has quit [Ping timeout: 252 seconds]
<yorickpeterse> Senjai: so re parsers, what would you be interested in learning about them?
<yorickpeterse> other than "how they work" because that's too abstract
ramfjord has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: last_staff]
lostcuaz has quit [Read error: Connection reset by peer]
<undeadaedra> AbstractParser
<Senjai> yorickpeterse: Generally that is what you'd want to know. There's a large number of concepts that come into play with parsing.
lostcuaz_km has joined #ruby
phizzbuzz has joined #ruby
<athos_diddy> apeiros merci! that was awesome
<apeiros> athos_diddy: expensive as in overhead, lots of CPU cycles
<undeadaedra> « merci »
<athos_diddy> ok cpu cycles got it
<Senjai> Going through how a parser would be able to find a value in a dom tree, even a simple one would be worth knowing
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> I bet there's also lots to learn specifically about recursion, and lookup optimization as well
<Senjai> Speaking from someone who knows very little aobut parsing
<athos_diddy> wow so i wonder how it would look if the key was an immutable string pointing to a hash containing the struct and another hash
<yorickpeterse> Yeah, though that I can't all fit in ~30 minutes
<yorickpeterse> though I intend to spread that out over some articles
ramfjord has joined #ruby
<yorickpeterse> once I get to it...next year or something :P
sgambino has joined #ruby
<yorickpeterse> I really hope cloning picks up in the coming decade, having a few clones of myself wouldn't be a bad idea
<athos_diddy> i think i may avoid that rabbit hole and practice rails for a possible interview... and learn more about polymorphism. thank you everyone for the help today
<apeiros> athos_diddy: you're welcome. I hope it helped your understanding
<athos_diddy> it helped greatly and i saved the discussion earlier and i'm about to save this gist example too!
frem has quit [Quit: Connection closed for inactivity]
<Senjai> yorickpeterse: You should be able to keep it at a high leve right? possibly?
tomphp has joined #ruby
<yorickpeterse> oh sure, but that means I can't go into too many details
<yorickpeterse> which is part of the art of writing a good talk, but at the same time stupid difficult
<Senjai> How you store data once parsed and how lookups are done on that data is pretty interesting. Specifically if there's a lot of ways to do it wrong
<yorickpeterse> actually the storing of results is the boring part :P
<Senjai> yorickpeterse: The best thing I could learn from parsing, is the ability to write more configuration files in different ways for my programs and not be terrible at interpreting them
micmus has quit [Ping timeout: 264 seconds]
ldnunes has quit [Quit: Leaving]
<Senjai> though I'd probably just use the standard formats, unless it was for like a game, or something more involved
ascarte__ has joined #ruby
<Senjai> like toml or something
dagda1 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
ascarte__ has quit [Client Quit]
<miah> environment variables ftw
fgo has quit [Ping timeout: 246 seconds]
dopie has joined #ruby
<Senjai> miah: Moreso about more involved applications then web apps
<Senjai> We also use Dotenv for our projects
chinmay_dd has joined #ruby
<miah> ya
<miah> chpst =)
hakunin has joined #ruby
<yorickpeterse> 12factor is decent except for the logging chapter
<yorickpeterse> that one is utter bullshit
lostcuaz_km has quit [Quit: ZNC - http://znc.in]
subtwo has joined #ruby
<yorickpeterse> "It should not attempt to write to or manage logfiles. Instead, each running process writes its event stream, unbuffered, to stdout."
<yorickpeterse> STDOUT?
<yorickpeterse> STDOUT?????!!!
lostcuaz has joined #ruby
<yorickpeterse> At _least_ use STDERR
<yorickpeterse> or just use Syslog
griffindy has joined #ruby
codecop_ has quit [Remote host closed the connection]
phutchins has joined #ruby
<Senjai> yorickpeterse: The only problem I have with every log aggregator ever is the sorting of incoming events by timestamp
<Senjai> otherwise I just use paralell
<Senjai> ssh into all the boxes, paralell tail dem things
freerobby has quit [Quit: Leaving.]
mrmargol_ has joined #ruby
<yorickpeterse> sorting by timestamp?
<yorickpeterse> You mean services not sorting them?
maknz has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has joined #ruby
<Senjai> Yeah, that and I think there are issues with some services and log entires > 1 line
chinmay_dd has quit [Ping timeout: 255 seconds]
danzilio has joined #ruby
nietzschette has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
endash has joined #ruby
<yorickpeterse> Hm, we use logentries.com and it sorts things just fine
<yorickpeterse> We don't have multi-line log messages though
mrmargolis has quit [Ping timeout: 252 seconds]
<Senjai> Aye, we would need it to be delimited by newline.
<Senjai> Which is not something current services do well
<miah> syslog has limitations
<Senjai> as we log on a per request basis
ndrei has joined #ruby
<miah> its pretty horrible imho
<yorickpeterse> Senjai: Ah, you're logging entire Rails logs?
<yorickpeterse> miah: Sure, but everything else is worse
<miah> the key part about that is, to not make the app handle writing the log to disk
<Senjai> yorickpeterse: If we used an aggregator, yes
<Senjai> At the moment we simply tail our boxes. Most of our clients only have 2 - 10 boxes
<Senjai> and not all of them are web facing
<miah> we ship logs with kafka
<miah> its much better than syslog =)
camilasan has joined #ruby
<Senjai> miah: We actually havent looked into kafka
<miah> heka + kafka
<Senjai> miah: That might actually be pretty decent
andikr has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
<miah> its awesome
<miah> the only part not awesome is elasticsearch
LMity has joined #ruby
<Senjai> miah: I'm just going to add you to my list of people worth talking to.
<miah> because of their 'roll your own' distributed system that breaks all the time
<miah> =)
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx> miah, was going to ask that... kibana/logstash experience is great, when it comes to ES its just pain and agony
<Senjai> brb
<yorickpeterse> the complexity of systems like kafka scares the crap out of me
camilasan has joined #ruby
micmus has joined #ruby
<nofxx> but it's java, I would be surprise if it was good.
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<miah> the problem is they didnt use like, raft or something. they built their own 'disco' iirc
jpfuentes2 has joined #ruby
<yorickpeterse> miah: I think they recently fixed most of their issues
<yorickpeterse> at least after aphyr got his hands on it
workmad3 has joined #ruby
<miah> they fixed _some_ of their issues for _certain_ cases
<miah> i dont think 1.6.0 is _quite_ there yet
<yorickpeterse> Granted we ditched ES a while ago
<yorickpeterse> haven't really kept up since
<yorickpeterse> We stopped using it prior to 1.0
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<miah> i was reading the changelog the other day, we havent updated to it yet
<nofxx> those services I too damn expensive... and the limit is a slap in the face: 10gb/month. But it'll not drop the old ones to get you the new ones.
<miah> its certainly gotten better. but i think it still has a ways to go
<yorickpeterse> nofxx: which services?
jgpawletko has quit [Quit: jgpawletko]
<nofxx> yorickpeterse, use something for text search?
<nofxx> yorickpeterse, log aggregrators
<yorickpeterse> Oh right
<yorickpeterse> logentries isn't that bad
<yorickpeterse> though their interface is a bit dodgy
<yorickpeterse> typical JS app: shits itself half the time
evilthomas is now known as thomas
<miah> i work for a bank, we're not going to ship our logs offsite..
<nofxx> yorickpeterse, they at least drop the old ones if I happen to overflow my limit?
<yorickpeterse> nofxx: not sure, haven't had that problem yet
<yorickpeterse> we only log a few GB/month
kadoppe has quit [Ping timeout: 250 seconds]
<nofxx> yorickpeterse, gonna check it out.
<yorickpeterse> I'm not super stoked about logentries, the main reason we use it is due to its alerting system
jackjackdripper1 has joined #ruby
jackjackdripper2 has joined #ruby
<yorickpeterse> miah: oh yeah, that makes sense
<yorickpeterse> we don't really log sensitive information
wildroman2 has quit [Remote host closed the connection]
<yorickpeterse> mostly stuff like "Alice edited user #12381923" and such
<miah> ya
<miah> we're working on ensuring that heka filters that stuff out
kadoppe has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Ping timeout: 256 seconds]
sharpmachine has joined #ruby
<yorickpeterse> welp, in the mean time I managed to whip together an excerpt it seems
<miah> cool
allomov has quit [Remote host closed the connection]
<yorickpeterse> oh the wonders of paper and pen
<yorickpeterse> I really need a better fountain pen though
ogpastal_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ogpastaling has joined #ruby
rubie has joined #ruby
omegahm has joined #ruby
jackjackdripper1 has quit [Ping timeout: 264 seconds]
davedev2_ has joined #ruby
paulcsmith_ has quit [Quit: Be back later ...]
startupality has quit [Quit: startupality]
umgrosscol has quit [Remote host closed the connection]
Casty has joined #ruby
startupality has joined #ruby
commondream has joined #ruby
davedev24_ has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
<ljarvis> yorickpeterse: u see dis? https://github.com/seppo0010/rsedis
<yorickpeterse> Yeah, saw it on /r/rust
slash_nick has quit [Ping timeout: 264 seconds]
Carnage\ has quit []
<yorickpeterse> it's not complete unless its author is just as sketchy as antirez
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> :troll:
<ljarvis> build redis "to learn rust" :|
<ljarvis> hah, antirez is awesome
ogpastaling has quit [Ping timeout: 256 seconds]
jmignault has quit [Quit: Textual IRC Client: www.textualapp.com]
paulcsmith__ has joined #ruby
zz_barkerd427 is now known as barkerd427
nym has quit [Quit: Connection closed for inactivity]
<yorickpeterse> I think it's worse than I can actually read that for the most part
<ljarvis> yep that'll do it
<ljarvis> what's [..], slice coerce?
bMalum has quit [Quit: bMalum]
<yorickpeterse> Hm, that I'm not sure about actually
commondream has quit [Ping timeout: 265 seconds]
rodfersou has quit [Quit: leaving]
<ljarvis> apart from that I can read it
<ljarvis> though it's really not pleasant
<yorickpeterse> you have become one with Rust young padawan
<yorickpeterse> unwrap() you must
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> I haven't actually found a use for it yet, so I would be just re-writing something way less epic than redis
RobertBirnie has quit [Ping timeout: 264 seconds]
<ljarvis> do you even try!
<yorickpeterse> Funny enough I might actually have to port over ruby-ll to Rust at some point
<yorickpeterse> rust-peg sucks since it requires nightly builds
<yorickpeterse> and the only real other alternative is a parsing combinator, not a generator
A205B064 has joined #ruby
cumorris has quit [Remote host closed the connection]
<yorickpeterse> I can never get a break from all this yak shaving :<
<ljarvis> I have too much unfinished crap to deal with new things :(
jphenow has quit [Quit: Be back later ...]
pragmatism has joined #ruby
<yorickpeterse> Currently my list is: Oga (usualy stuff), OpenSSL/Digest multi-threading crap on Rubinius, proglang in Rust, fixing the Socket lib for Rubinius
<yorickpeterse> I think that's all
<yorickpeterse> which is like 5 years worth of work
<yorickpeterse> and 1512930812093 blog posts
crdpink2 has joined #ruby
Mojo_Nixon has joined #ruby
<ljarvis> I need to get back on track with Mechanize, and then finish my proglang also
RobertBirnie has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crdpink has quit [Ping timeout: 256 seconds]
<yorickpeterse> In other news, https://gist.github.com/YorickPeterse/4fcd870cf7877d9e7905 comments on this summary would be appreciated
jamesaxl has joined #ruby
<ljarvis> eh "finish" = get it good enough to not suck
Mojo_Nixon has quit [Client Quit]
rjno has quit []
<ljarvis> yorickpeterse: I'm not sure I'd agree with your first sentence, though I might be biased because I spent months and months writing parsers
platzhirsch has joined #ruby
<ljarvis> I like the idea of exploring different algs
jgpawletko has joined #ruby
<yorickpeterse> ljarvis: you've obtained the status of "person who knows parsing"
<yorickpeterse> which is like 1% of the total programmer population :P
<ljarvis> I thought it was popular
<yorickpeterse> oh?
<ljarvis> although.. i have always struggled to find really good docs
<ljarvis> so maybe not
<yorickpeterse> From what I gather it's the opposite: people treat it as a black box
devdazed has quit [Ping timeout: 276 seconds]
<ljarvis> people end up avoiding hand writing parsers because they're lazy or don't know how to do it. Or, they know exactly how to do it and they know how mind numbing and time consuming it is
<ljarvis> I *love* writing hand-written parsers, but i'm weird as fuck so *shrug*
<yorickpeterse> heh, I'm too lazy for that
<yorickpeterse> ain't got no time fo that
<ljarvis> see point 1
simplyianm has quit [Read error: Connection reset by peer]
<yorickpeterse> heh
<ljarvis> I enjoy it. I have a crap load of things I've built with relation to parsing that I haven't released though :( relapse (the only ruby related project) seriously needs to gtfo
<yorickpeterse> why write a parser when you can write code to generate a parser? :P
<ljarvis> meh
platzhirsch has left #ruby [#ruby]
<yorickpeterse> (answer: because that takes a few months and makes you hate yourself)
<ljarvis> parser generators suck at fine grained error reporting
<ljarvis> and im just a parser nerd
<yorickpeterse> and hate all those academic nuts out there who only upload .ppt files that don't explain shit
<yorickpeterse> ljarvis: actually LL(1) has pretty good error reporting
simplyianm has joined #ruby
<yorickpeterse> LALR is just a joke
<yorickpeterse> (error wise)
<ljarvis> there's a lot of pretenciousness when you dig deep enough
<ljarvis> pretentiousness*
<bougyman> CREATE INDEX CONCURRENTLY idx_measurement_readings_compound ON measurement_readings USING btree (asset_id, measurement_tag_type_id, reported_at);
<bougyman> er
<ljarvis> wrong window yo
<yorickpeterse> bougyman: CREATE INDEX
<yorickpeterse> :D
[H]unt3r has quit []
<ljarvis> CONCURRENTLY
<yorickpeterse> oh shit you're right
<ljarvis> ^ my favourite thing
<bougyman> :)
<Aria> Parsers? Marpa.
<yorickpeterse> I recently had our DB shit itself
<yorickpeterse> because in Sequel I use :concurrent instead of :concurrently
<yorickpeterse> so did my tests
<bougyman> ugh
<yorickpeterse> so they passed just fine
<ljarvis> heh
<yorickpeterse> :<
chussenot has quit [Quit: chussenot]
zenguy_pc has quit [Read error: Connection reset by peer]
<ljarvis> I've done it before too
<ljarvis> I did it once
<ljarvis> then scared myself
<yorickpeterse> it worked fine for weeks
<yorickpeterse> then suddenly it raced
decoponio has quit [Quit: Leaving...]
<ljarvis> did it win?
<yorickpeterse> (as in, for weeks it didn't do it concurrently without problems, then somehow it got stuck)
chussenot has joined #ruby
<ljarvis> add_index, algorithm: :concurrently <- my jam
j4cknewt has joined #ruby
<yorickpeterse> now for the hardest part of a talk: the title
shadoi has quit [Quit: Leaving.]
workmad3 has joined #ruby
skade has joined #ruby
paulcsmith__ has quit [Quit: Be back later ...]
jacaballero has quit [Ping timeout: 265 seconds]
rbowlby has quit [Ping timeout: 276 seconds]
<undeadaedra> Use GitHub project name generator.
__butch__ has quit [Read error: Connection reset by peer]
i831533 has joined #ruby
<yorickpeterse> "How about turbo-octo-bear." k
<undeadaedra> :D
<yorickpeterse> "How about north-american-happiness." oooooooh
i831533 has quit [Client Quit]
<yorickpeterse> "How about massive-hipster." hahahahaha
<undeadaedra> I got one with '-yolo-swag' once
__butch__ has joined #ruby
<yorickpeterse> "How about spawncamping-sansa." somebody was salty
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
<nietzschette> Is there a list somewhere of ENV keys by OS?
mengu has joined #ruby
<shevy> don't think so
<shevy> isn't ENV typically empty anyway?
<yorickpeterse> nietzschette: No, because the list is not fixed
<bougyman> no
<bougyman> ENV should always be populated.
<yorickpeterse> But you can get the currently set env variables using just ENV.keys
arturhoo has quit [Quit: arturhoo]
<bougyman> but you never know what will be in it.
<yorickpeterse> (their names that is)
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy> >> p ENV
<ruboto> shevy # => {"LIBC_FATAL_STDERR_"=>"1", "LANG"=>"en_US.UTF-8", "HOME"=>"/tmp/execpad-c918369fc6bc"} ...check link for more (https://eval.in/384003)
momomomomo has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
<yorickpeterse> boom, proposal sent
wildroman2 has joined #ruby
ruurd has joined #ruby
guillaume-rb has quit [Quit: guillaume-rb]
<yorickpeterse> even have my eyes set on a pirate costume :D
uptownhr has quit [Quit: uptownhr]
skade has quit [Quit: Computer has gone to sleep.]
micmus has quit [Quit: Leaving]
rbowlby_ has joined #ruby
zenguy_pc has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
<yorickpeterse> well, if I could actually find it that is
<nietzschette> um, is it close to Halloween in your timezone?
railsraider has quit [Quit: railsraider]
<yorickpeterse> No
ruurd has quit [Client Quit]
dede has quit [Quit: Connection closed for inactivity]
zenguy_pc has quit [Read error: Connection reset by peer]
<undeadaedra> Define 'close'
<undeadaedra> at ±12 months, it is
rbowlby has quit [Read error: Connection reset by peer]
<nietzschette> too true
icebourg has quit []
<shevy> tomorrow
keernel has quit [Ping timeout: 256 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
keernel has joined #ruby
<Senjai> yorickpeterse: I can sees proposal?
fabrice31 has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keernel1 has joined #ruby
revath has quit [Ping timeout: 276 seconds]
keernel has quit [Ping timeout: 276 seconds]
mengu has quit [Ping timeout: 252 seconds]
ruurd has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
DEA7TH has quit [Ping timeout: 252 seconds]
Pupeno has joined #ruby
jenrzzz has joined #ruby
LMity has quit [Ping timeout: 256 seconds]
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
icebourg has joined #ruby
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
veinofstars has quit [Quit: veinofstars]
Pupeno has quit [Ping timeout: 252 seconds]
zenguy_pc has joined #ruby
tercenya has quit [Read error: Connection reset by peer]
jbisnett has quit [Ping timeout: 246 seconds]
tercenya has joined #ruby
cndiv has quit []
krisquigley has joined #ruby
ogpastaling has joined #ruby
jlast has quit [Remote host closed the connection]
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEA7TH has joined #ruby
RobertBirnie has quit [Ping timeout: 250 seconds]
dgutierrez1287 has joined #ruby
jackjackdripper has joined #ruby
<kb3ien> Well the efforts to get ruby (passenger) to use http_proxy are largely not working. I'm okay with modifying the code as all the requests that I care about originate in one .rb file.
jfarmer has joined #ruby
cndiv has joined #ruby
cndiv has quit [Changing host]
cndiv has joined #ruby
jackjackdripper1 has joined #ruby
segfalt has quit [Read error: Connection reset by peer]
segfalt has joined #ruby
danman has joined #ruby
mgorbach has quit [Quit: ZNC - http://znc.in]
jackjackdripper2 has quit [Read error: Connection reset by peer]
Jarboe has joined #ruby
krisquigley has quit [Ping timeout: 255 seconds]
icebourg has quit []
<kb3ien> I've copied the file from '/usr/local/lib/ruby/gems/2.0.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb
mgorbach has joined #ruby
RobertBirnie has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<kb3ien> ' to /var/www/local_gems/ebsco-discovery-service-api-1.0.4/lib/ , updated the Gemfile with the path thusly "gem "ebsco-discovery-service-api", "1.0.4" , :path => '/var/www/local_gems/ebsco-discovery-service-api-1.0.4/lib/' -- but it's notworking should not there be a *.gem file involved ?
ericmeds has quit [Read error: Connection reset by peer]
commondream has joined #ruby
phizzbuzz has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Ping timeout: 272 seconds]
tcrypt has quit [Read error: Connection reset by peer]
dzejrou has quit [Ping timeout: 252 seconds]
PaulCapestany has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 276 seconds]
tcrypt has joined #ruby
<kb3ien> because the error is now "uninitialized constant Blacklight::ArticlesHelperBehavior::EDSApi" , which the the Controller define in that file.
kb3ien has left #ruby [#ruby]
eam has quit [Ping timeout: 265 seconds]
_phwelo has quit [Ping timeout: 245 seconds]
eam has joined #ruby
ericmeds has joined #ruby
PaulCapestany has joined #ruby
stonith has quit [Quit: No Ping reply in 180 seconds.]
startupality has quit [Quit: startupality]
blaines has joined #ruby
sivoais has quit [Ping timeout: 256 seconds]
nwhirschfeld has quit [Ping timeout: 256 seconds]
michaelreid has quit [Ping timeout: 252 seconds]
A205B064 has quit [Ping timeout: 250 seconds]
atomi has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
nwhirschfeld has joined #ruby
axisys has quit [Ping timeout: 256 seconds]
mahlon has quit [Read error: Connection reset by peer]
ozzloy has quit [Ping timeout: 264 seconds]
existensil has quit [Ping timeout: 256 seconds]
axisys has joined #ruby
stonith has joined #ruby
tomphp has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
atomi has joined #ruby
AlexAltea has quit [Ping timeout: 272 seconds]
sivoais has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
sanguisdex has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
failshell has joined #ruby
sharpmachine has joined #ruby
<zenspider> you left before getting a response... idgi
matp_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgpawletko has quit [Quit: jgpawletko]
PaulCapestany has quit [Max SendQ exceeded]
mahlon has joined #ruby
ogpastaling has quit [Remote host closed the connection]
existensil has joined #ruby
jackjackdripper has joined #ruby
ogpastaling has joined #ruby
crdpink2 has quit [Remote host closed the connection]
jackjackdripper2 has joined #ruby
crdpink2 has joined #ruby
swgillespie has joined #ruby
<dfockler> they were on here earlier
<nietzschette> Scope resolution, maybe?
marienz has quit [Ping timeout: 608 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
<nietzschette> I'm not one of the gurus
matp has quit [Ping timeout: 252 seconds]
tomaw has quit [*.net *.split]
rubie has quit [*.net *.split]
jpfuentes2 has quit [*.net *.split]
_djbkd has quit [*.net *.split]
symm- has quit [*.net *.split]
Agoldfish has quit [*.net *.split]
MatthewsFace has quit [*.net *.split]
Spami has quit [*.net *.split]
spider-mario has quit [*.net *.split]
jwilson_ has quit [*.net *.split]
datanoise has quit [*.net *.split]
Akagi201 has quit [*.net *.split]
ZOMGITSABEAR has quit [*.net *.split]
iwishiwerearobot has quit [*.net *.split]
Rarikon has quit [*.net *.split]
RazorX has quit [*.net *.split]
alphaatom|pc has quit [*.net *.split]
surs has quit [*.net *.split]
sumark has quit [*.net *.split]
cats has quit [*.net *.split]
systemd0wn has quit [*.net *.split]
meatchicken has quit [*.net *.split]
scottstamp has quit [*.net *.split]
S_Walker has quit [*.net *.split]
WillAmes has quit [*.net *.split]
quarcu_ has quit [*.net *.split]
avelldiroll has quit [*.net *.split]
mr_rich101 has quit [*.net *.split]
aytch has quit [*.net *.split]
unreal has quit [*.net *.split]
TinkerTyper has quit [*.net *.split]
Kharma has quit [*.net *.split]
mrsolow has quit [*.net *.split]
fold has quit [*.net *.split]
thomas has quit [*.net *.split]
gregf_ has quit [*.net *.split]
tdy has quit [*.net *.split]
EnergyCoffee has quit [*.net *.split]
mansel has quit [*.net *.split]
oz has quit [*.net *.split]
zz_Outlastsheep has quit [*.net *.split]
ccooke has quit [*.net *.split]
Steve_Jobs has quit [*.net *.split]
maloik has quit [*.net *.split]
tris has quit [*.net *.split]
closer has quit [*.net *.split]
RTG` has quit [*.net *.split]
eshy has quit [*.net *.split]
cibs has quit [*.net *.split]
nfsnobody has quit [*.net *.split]
yaw has joined #ruby
A205B064 has joined #ruby
yaw has left #ruby [#ruby]
_phwelo has joined #ruby
failshell has quit [Ping timeout: 244 seconds]
michaelreid has joined #ruby
s2013 has joined #ruby
jackjackdripper1 has quit [Ping timeout: 264 seconds]
j_mcnally has joined #ruby
jackjackdripper2 has quit [Read error: Connection reset by peer]
danzilio has quit [Quit: Baiii!]
swgillespie has quit [Client Quit]
jackjackdripper1 has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
bigmac_ has joined #ruby
bigmac_ is now known as i8igmac
Igorshp has joined #ruby
arcanez has joined #ruby
<arcanez> is there an easy/short way to take { :foo => 'bar', :baz => 'quux' } and make a string "foo=bar baz=quux"
DEA7TH has quit [Ping timeout: 272 seconds]
hinbody has quit [Read error: Connection reset by peer]
<arcanez> params.each_pair { |k,v| s += "#{k}=#{v} " } seems wrong
jackjackdripper has quit [Ping timeout: 264 seconds]
ogpastaling has quit [Ping timeout: 276 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
sarkyniin has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
<jfarmer> That example code doesn't produce the example output you just gave.
<nietzschette> each_pair{|k, v| "#{k}=#{v}"}.join(" ")
<jfarmer> Oh
<jfarmer> the space at the end
<jfarmer> nvm
ruurd has quit [Quit: Zzzzz z zz ...]
s2013 has quit [Ping timeout: 252 seconds]
<nietzschette> wait, i'm off my face
sanguisdex has joined #ruby
chipotle has joined #ruby
<jfarmer> nietzschette No, that works.
<jfarmer> params.each_pair { |k,v| "#{k}=#{v}" }.join(" ")
<jfarmer> Although if you're actually using that query string, you should escape the keys and values.
marienz has joined #ruby
<jfarmer> require "cgi"; params.each_pair { |k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}" }.join(" ")
<arcanez> params.to_query.gsub('&', '')
<arcanez> since I have rails available
<nietzschette> you could hash.to_a.collect{|x| x.collect{|y| y.join('=')}}.join(' ')
<jfarmer> That's...
mary5030 has joined #ruby
<arcanez> but I think i just insulted someone
<jfarmer> That's not really escaping. :)
<arcanez> escaping, who needs that :)
phizzbuzz has joined #ruby
workmad3 has joined #ruby
<jhass> what's wrong with .map {|k, v| "#{k}=#{v}" }.join(" ") ...
d10n-work has quit [Quit: Connection closed for inactivity]
<nietzschette> does a hash mix in enumerator?
<centrx> Enumerable
<nietzschette> yes that
simplyianm has quit [Remote host closed the connection]
<centrx> yes
jenrzzz has quit [Read error: Connection reset by peer]
alem0lars__ has quit [Read error: Connection reset by peer]
<centrx> I mean yes
simplyianm has joined #ruby
rubie has joined #ruby
jpfuentes2 has joined #ruby
_djbkd has joined #ruby
symm- has joined #ruby
jwilson_ has joined #ruby
aytch has joined #ruby
Agoldfish has joined #ruby
mr_rich101 has joined #ruby
Akagi201 has joined #ruby
ccooke has joined #ruby
avelldiroll has joined #ruby
gregf_ has joined #ruby
RTG` has joined #ruby
mrsolow has joined #ruby
RazorX has joined #ruby
Spami has joined #ruby
WillAmes has joined #ruby
scottstamp has joined #ruby
sumark has joined #ruby
fold has joined #ruby
Rarikon has joined #ruby
unreal has joined #ruby
datanoise has joined #ruby
MatthewsFace has joined #ruby
iwishiwerearobot has joined #ruby
mansel has joined #ruby
TinkerTyper has joined #ruby
nfsnobody has joined #ruby
meatchicken has joined #ruby
Kharma has joined #ruby
tomaw has joined #ruby
closer has joined #ruby
quarcu_ has joined #ruby
Steve_Jobs has joined #ruby
tris has joined #ruby
surs has joined #ruby
zz_Outlastsheep has joined #ruby
eshy has joined #ruby
cibs has joined #ruby
systemd0wn has joined #ruby
ZOMGITSABEAR has joined #ruby
thomas has joined #ruby
tdy has joined #ruby
cats has joined #ruby
maloik has joined #ruby
oz has joined #ruby
alphaatom|pc has joined #ruby
S_Walker has joined #ruby
EnergyCoffee has joined #ruby
<jfarmer> Er, yes
<jfarmer> not each_pair, but map
simplyianm has quit [Remote host closed the connection]
<jfarmer> silly me, was on autopilot
cats has quit [Max SendQ exceeded]
Akagi201 has quit [Max SendQ exceeded]
unreal has quit [Max SendQ exceeded]
<arcanez> each_pair doesn't return does it? map does
vdamewood has quit [Quit: Life beckons.]
<jhass> each_pair should be an alias to .each which returns the receiver
cats has joined #ruby
unreal has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
swgillespie has joined #ruby
Akagi201 has joined #ruby
<jfarmer> arcanez Every function in Ruby returns something.
lkba has joined #ruby
<arcanez> well right, but not the result of the block
<jfarmer> But in this case, it's not returning what we want. Yes, correct.
<jfarmer> map is what you want
workmad3 has quit [Ping timeout: 252 seconds]
<jfarmer> You want to go: {"foo" => "bar", "baz" => "quux"} ---map---> ["foo=bar", "baz=quux"] ---join---> "foo=bar baz=quux"
simplyianm has joined #ruby
alphaatom|pc has quit [Ping timeout: 265 seconds]
MatthewsFace has quit [Remote host closed the connection]
scx_ has joined #ruby
<jfarmer> Also, you probably want to sort the key/value pairs in a consistent order
<elektronaut> hashes are ordered in ruby 1.9+
<arcanez> is map an alias for collect (or vice versa)
<jfarmer> So I might consider params.map { |k,v| ... }.sort.join("&")
<jfarmer> Yes, they're aliases of each other
GPrime has joined #ruby
jenrzzz has joined #ruby
<jfarmer> elektronaut That's true but not why you'd want to sort the query string.
<jfarmer> You'd want to sort it for two reasons:
gkra has quit [Remote host closed the connection]
<jhass> I don't think it's a query string
<jfarmer> ok
gkra has joined #ruby
<arcanez> it's "not"
<jhass> I mean it would be invalid
<jfarmer> Well, regardless
<jfarmer> Consider:
chussenot has quit [Quit: chussenot]
<jfarmer> Let's call it a "waffle string" then, whatever.
<jhass> it's not like arcanez couldn't tell us what it is ;P
<jfarmer> 1. to_waffle(params1) == to_waffle(params2) if and only if params1 == params2
alphaatom|pc has joined #ruby
<jfarmer> you want that invariant to hold
<arcanez> jhass: really bad, is what it is :)
<jfarmer> Hashes are ordered and will give you the key/value pairs back in a consistent order, but Hash equality == is order-agnostic.
GitGud has quit [Ping timeout: 264 seconds]
<nietzschette> hsh.keys.zip(hsh.values).collect{|t| t.join("=")}.join(' ')
scx has quit [Ping timeout: 272 seconds]
<zenspider> gah
<nietzschette> should work if they're ordered
<zenspider> why?
<jhass> nietzschette: why is that superior?
<jfarmer> nietzschette You can just do hash.to_a to get back an array of key/value pairs
<nietzschette> it's not
northfurr has joined #ruby
<jhass> also
<jhass> >> {a: :b}.map {|i| i }
<ruboto> jhass # => [[:a, :b]] (https://eval.in/384023)
<jhass> it's already yielded as an array if that's what the zip is about
scx has joined #ruby
scx_ has quit [Ping timeout: 265 seconds]
kirun has quit [Quit: Client exiting]
nietzschette has quit [Quit: Leaving]
nahtnam has quit [Quit: Connection closed for inactivity]
Channel6 has joined #ruby
tkuchiki has joined #ruby
<jhass> uh, I hope we didn't scare them away
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jfarmer> boo
<jfarmer> arcanez u scared?
atomical_ has joined #ruby
atomical has quit [Ping timeout: 248 seconds]
<arcanez> no, I'm here :)
finisherr has quit [Quit: finisherr]
Igorshp has quit [Remote host closed the connection]
d5sx43 has joined #ruby
volty has joined #ruby
mandarinkin has quit [Ping timeout: 255 seconds]
<arcanez> though I think you'd be scared seeing some of this code
<arcanez> that I have to deal with
atomical has joined #ruby
<centrx> heh
fulgore_ has joined #ruby
Palmer11 has quit [Quit: Palmer11]
mhb has quit [Quit: WeeChat 1.2]
<arcanez> the new code has gotten better.. but the old code.. is old code
simplyianm has quit [Read error: Connection reset by peer]
<arcanez> I won't mention I started on perl (and we have perl devs) so some of our ruby is perlish
[yalue] has quit [Quit: return 0;]
<Senjai> arcanez: Can't be worse than some of the stuff I have to deal with
hakunin has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Akagi201 has quit [Remote host closed the connection]
simplyianm has joined #ruby
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<arcanez> I imagine there is always someone that has it worse
<arcanez> being stuck on ruby 1.9.3 and rails 2 isn't fun
atomical_ has quit [Ping timeout: 248 seconds]
<elektronaut> hah. i still have 5 projects stuck on 1.8.7 / rails 2
<elektronaut> hopefully 2015 will be the year i can finally retire 1.8.7 from production
<arcanez> sucks when you google for how to do something in AR and you find the 3/4 results.. then realize you can't do that in 2 :(
et09 has joined #ruby
<et09> how do i get comprehensive class info/derivation etc. for a variable?
fgo has joined #ruby
<elektronaut> fortunately, there's not that much you can do in 2, so it's easy to keep in your head
<elektronaut> although i'm getting rusty on that
rubie has quit [Remote host closed the connection]
<jfarmer> arcanez You....really should upgrade.
renderfu_ has joined #ruby
<arcanez> not my decision sadly
<Senjai> arcanez: Tell the person who can make the decision if they dont they're stupid
<Senjai> Rails 2 is just .. no
<jfarmer> There are maybe more effective ways to convince them, haha.
paulcsmith__ has joined #ruby
<arcanez> I can't imagine how many 2isms we have though
paulcsmith__ has quit [Client Quit]
<jfarmer> But Rails 2 is not just out of date — it's obsolete.
tkuchiki has quit [Remote host closed the connection]
<jfarmer> There's no support for it, there are almost certainly security holes
<Ox0dea> Is it possible to simulate -> lambdas in Ruby 1.0?
<Senjai> jfarmer: 1.8 is terribly scary
<arcanez> is there a backcompat layer or way to find incompatible things in your code before you upgrade 2->3 or 2->4?
<elektronaut> there was a gem, i can't remember what it's called
<jfarmer> arcanez Maybe. This is something that most people dealt with 3-4 years ago.
<arcanez> :)
x1337807x has quit [Ping timeout: 256 seconds]
<elektronaut> rails_upgrade
volty has quit [Quit: Konversation terminated!]
eggoez has quit [Ping timeout: 256 seconds]
francois_ has joined #ruby
renderfu_ has quit [Ping timeout: 255 seconds]
<zenspider> everything is obsolete pretty much as soon as its published
<arcanez> zenspider: I think it's more that there aren't any security patches provided
inspiron has quit [Quit: Leaving]
Musashi007 has joined #ruby
kb3ien has joined #ruby
<elektronaut> there's rails LTS at least
<kb3ien> I'm still stumped forcing a ruby on rails app to consistently use a proxy.
<elektronaut> haven't tried it. but i imagine there's quite a few projects still stuck on rails 2 out there.
eggoez has joined #ruby
commondream has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
<kb3ien> I did the 'SetEnv http_proxy http://127.1:8888' thing in the VirtualHost ; I told apache to use a shell script that injected that into the environment, but seems that apache doesnt actually launch roby directly most of the time, but rather users Passenger. How does one make Passenger set the http_proxy env var ?
commondream has joined #ruby
FernandoBasso has joined #ruby
blue_deref has joined #ruby
<Senjai> kb3ien: Could always use Nginx :P
<zenspider> argh. I have a rails/AR default_scope question... and MAN i don't want to go to #rubyonrails to ask it. :P
jwilson_ has quit [Quit: bye bye]
d5sx43 has quit [Quit: Leaving...]
idafyaid has quit [Ping timeout: 246 seconds]
<kb3ien> Ah, well its taken me long enough to learn apache well enough for everything I use. I'd hate to switch. how does one set the environment for Passenger ?
blaines has quit [Ping timeout: 276 seconds]
<kb3ien> actually I did set the env by editing /etc/apache2/mods-enabled/passenger.conf to use a wrapper too.
commondream has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 265 seconds]
Lucky__ has joined #ruby
francois_ has quit [Ping timeout: 245 seconds]
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
fgo has quit [Ping timeout: 256 seconds]
andywojo has quit [Quit: Lost terminal]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kb3ien> I did confirm that the ENV['http_proxy'] is set by the ruby-wrapper I wrote : I envoked it and ran STDOUT.puts ENV['http_proxy'] and got the expected value.
swgillespie has joined #ruby
Ropeney has joined #ruby
Yiota has joined #ruby
swgillespie has quit [Client Quit]
dmolina has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
sdothum has joined #ruby
<zenspider> that was relatively painless
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
uptownhr has joined #ruby
<arcanez> Senjai: ++ for nginx
brainshim has quit [Ping timeout: 276 seconds]
<arcanez> is passenger still a good thing to use?
<Senjai> kb3ien: Apache is terrible, so is passenger @_@
mdw has joined #ruby
<kb3ien> Passenger is terrible. Might not the problem be in NET::Http , which is also none too clean ?
<et09> what's betterthanpassenger
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
<Senjai> et09: unicorn, mostly
<et09> how so?
axl_ has joined #ruby
<Senjai> et09: Ruby thrives in a process based model, threads are highly overrated
quazimodo has joined #ruby
wallerdev has quit [Quit: wallerdev]
mdw has quit [Client Quit]
<Senjai> It works swimmingly with nginx
<et09> hmm
uptownhr has quit [Client Quit]
<et09> passenger runs them in threads?
<Senjai> and each unicorn 'master' acts as a load balancer, that can kill each sub process if it fails
<et09> i have severalpassenger procs on the server
<Senjai> or eats too much memory
ramfjord has quit [Ping timeout: 244 seconds]
<et09> what about "Raptor" passenger
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
<bougyman> nginx in front of a pile of thins never did me wrong.
failshell has joined #ruby
<bougyman> i'm on the fence about unicorn. with a good config it can be tame enough.
uptownhr has joined #ruby
dfockler has quit [Remote host closed the connection]
uptownhr has quit [Client Quit]
<Senjai> bougyman: What do you use in place of unicorn?
datanoise has joined #ruby
<bougyman> Senjai: thins
<bougyman> at the dayjob I have to work with unicorn.
<bougyman> but I suggest thin and use thin for all my own stuff.
dmolina has quit [Quit: Leaving.]
<Senjai> bougyman: So on one server, you have one thin?
<bougyman> unicorn is not a well behaved unix process.
<Senjai> Or several behind nginx?
<bougyman> no, you missed my statement "nginx in front of a pile of thins"
icebourg has joined #ruby
<bougyman> those thins can be on one or many servers.
<bougyman> and many per server, of course.
<Senjai> Oh I thought you meant things
<Senjai> sorry
_blizzy_ has joined #ruby
<elektronaut> yeah, i read that as well. damn brain autocorrect.
<bougyman> passenger is a non-starter because I never put the web app on the same box as the web server (nginx)
<Senjai> I've never had issues with with managing unicorn
CloCkWeRX has joined #ruby
<Senjai> bougyman: Ah, see, we use ELB for load balancing, sometimes with HAProxies, but we always have nginx running on serving boxes
CloCkWeRX has left #ruby [#ruby]
pietr0 has quit [Quit: pietr0]
jpfuentes2 has joined #ruby
casadei has quit [Remote host closed the connection]
<bougyman> we have one nginx and multiple app servers.
<bougyman> no need for a proxy in front of nginx, it's never seen load.
<bougyman> we have redundancy, of course.
<bougyman> but nothing that has to balance.
dorei has quit []
<bougyman> that nginx serves quite a few apps, too.
<bougyman> nginx is a pretty good proxy, really.
NeverDie has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eggoez has quit [Ping timeout: 265 seconds]