havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: leaving]
mint_ has joined #ruby
patarr has quit [Read error: Connection reset by peer]
esObe has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
esObe has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
marr has quit [Ping timeout: 255 seconds]
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
outreachdan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
Cohedri__ has joined #ruby
nofxxx has quit [Remote host closed the connection]
jdawgaz has quit [Client Quit]
hinbody has quit [Quit: leaving]
nofxx has joined #ruby
Cohedrin has quit [Ping timeout: 258 seconds]
agent_white has joined #ruby
chouhoulis has joined #ruby
Cohedri__ has quit [Read error: Connection reset by peer]
hinbody has joined #ruby
Cohedrin has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
rizonz has quit [Remote host closed the connection]
latemus has joined #ruby
<latemus> does ruby have virtual_env equiv
<lupine> chruby, bundler, etc
<latemus> lupine: thanks bro
* lupine feels the broforce
<lupine> nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
* latemus wears dark hood
<latemus> lupine, i am ur father
<latemus> s/father/brahther/
<lupine> something about higher ground. I don't know, star wars isn't my thing
<latemus> mine either lol
hutch34_ has joined #ruby
hutch34_ has quit [Ping timeout: 252 seconds]
ericmathison has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
<latemus> patriarchical lore pffffsh
Cohedrin has joined #ruby
jgt has quit [Ping timeout: 255 seconds]
rakm has joined #ruby
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amclain has quit [Quit: Leaving]
Channel6 has joined #ruby
esObe has joined #ruby
raul782 has joined #ruby
yokel has quit [Remote host closed the connection]
yokel has joined #ruby
esObe has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 258 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 245 seconds]
ElDoggo has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has quit [Ping timeout: 260 seconds]
ericmathison has joined #ruby
Trynemjoel has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
elsevero has joined #ruby
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
gravyflex has quit [Quit: gravyflex]
shwouchk has quit [Quit: Connection closed for inactivity]
duderonomy has joined #ruby
chihhsin has quit [Quit: leaving]
Trynemjoel has quit [Ping timeout: 264 seconds]
Trynemjoel has joined #ruby
Pumukel has joined #ruby
duderonomy has quit [Ping timeout: 252 seconds]
rakm_ has joined #ruby
baweaver_away is now known as baweaver
rakm has quit [Remote host closed the connection]
yokel has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
elsevero has quit [Ping timeout: 240 seconds]
elsevero_ has joined #ruby
elsevero_ has quit [Client Quit]
mrconfused has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
ericmathison has quit [Ping timeout: 260 seconds]
Robtop__ has joined #ruby
minimalism has joined #ruby
<cerulean> hey o////////
<cerulean> i love ruby
<cerulean> i've been coding it since 2010
<cerulean> i JUST discovered event machine. i see people hating on it but i like it more than node. yeah its counter-intuitive, but it works like really well
<cerulean> if you don't understand what deferring a block is, i feel sorry for your mother
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
<Radar> 3 months later: "callbacks are literally the worst"
<cerulean> i love callbacks lmao
<cerulean> why would you say that
<Radar> Because I know better ;)
<cerulean> give me a real reason
<Radar> But hey whatever works for you.
<cerulean> what's your answer to ruby concurrency? don't say use rbx lol please
<Radar> Because callbacks are spooky magic and it can be hard to debug a callback chain where the calls are implicit and not explicit.
<cerulean> oh i see
<cerulean> sometimes there's no other way
<cerulean> i was able to get a pretty good design with my bot, using cinch, event machine, em-twitter, thin and sinatra... tons of asynchronous stuff running in harmony. i guess just don't code it wrong?
<cerulean> go higher in the stack trace to somewhere it makes sense i guess
<cerulean> i like pretty error messages too, but none of us would be here today if "undefined method [] on nil class" or something stopped us dead in our tracks
<cerulean> :D
<Radar> no implicit conversion of string to integer
<cerulean> lol
<cerulean> looks like "nehow nihongo konichiwa" written in kanji to a normal user
<cerulean> and sounds like some rude comment to a programmer
<cerulean> woa, im impressed by concurrent-ruby
<cerulean> thanks havenwood !
Cohedrin has quit [Read error: Connection reset by peer]
Trynemjoel has joined #ruby
Cohedrin has joined #ruby
libastral has quit [Ping timeout: 260 seconds]
libastral has joined #ruby
rakm_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
harfangk has joined #ruby
esObe has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
esObe has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
duderonomy has joined #ruby
Channel6 has quit [Quit: Leaving]
maxirater has joined #ruby
pickle_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
HippoDippo has joined #ruby
<HippoDippo> When you create a temporary variable to hold the original variable's value, how do you protect the value of the temp variable from being changed when you change the original variable?
<pickle_> what type of variable is it?
<HippoDippo> Just a string.
cahoots has joined #ruby
<HippoDippo> when i run a reverse method on the original, it also reverses the temp
<cahoots> hi, how can i tell if a gem was installed by default and without me having to call "gem install ..."? i'm curious about nokogiri
<cahoots> i want to have some remote machines use nokogiri, but installing gems has turned out to be a real pain
<pickle_> sounds like you want the .dup method hippo
<pickle_> i didn't even know ruby behaved like this with strings
enterprisey has quit [Read error: Connection reset by peer]
<HippoDippo> yeahh i havent had that in Js
mrconfused has quit [Ping timeout: 258 seconds]
captain_ has quit [Remote host closed the connection]
<HippoDippo> *that issue
HippoDippo has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mint_ has quit [Ping timeout: 260 seconds]
hutch34_ has joined #ruby
jdawgaz has joined #ruby
<cahoots> any ideas?
mint_ has joined #ruby
binaryplease has quit [Ping timeout: 252 seconds]
hutch34_ has quit [Ping timeout: 252 seconds]
<pickle_> no
mrconfused has joined #ruby
<cahoots> so harsh
<pickle_> it's true though
<pickle_> i'm just a rails beginner
<Radar> cahoots: "but installing gems has turned out to be a real pain" <- how so?
<cahoots> Radar, os x madness
<cahoots> basically i need sudo to install
<Radar> I guess that's because you didn't follow http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
raul782 has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
<cahoots> Radar, this is going to be rolled out to a bunch of developers machines, i don't want to make all of these modifications
Trynemjoel has joined #ruby
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
pickle_ has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
herbmillerjr has quit [Remote host closed the connection]
mint_ has quit [Remote host closed the connection]
gravyflex has joined #ruby
herbmillerjr has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
maxirater has quit [Quit: Leaving]
jameser has joined #ruby
mrconfused has quit [Ping timeout: 258 seconds]
agent_white has quit [Quit: leaving]
bronson has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
agent_white has joined #ruby
herbmillerjr has joined #ruby
cfec0b8d has joined #ruby
nathan420 has joined #ruby
<nathan420> what is your favorite keyboard?
elifoster has joined #ruby
al2o3-cr has quit [Ping timeout: 258 seconds]
nathan420 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
nathan420 has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
preyalone has quit [Quit: Connection closed for inactivity]
pilne has quit [Quit: Quitting!]
xall has joined #ruby
Trynemjoel has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
mooser has quit [Remote host closed the connection]
shinnya has joined #ruby
<cerulean> nathan420: the macbook pro keyboard
<cerulean> so Radar, is it blasphemous if i like Dart-Lang or atleast am impressed by it
<cerulean> why don't we have a JS compiler and AOT compilation again
<cerulean> lol
gix has quit [Ping timeout: 258 seconds]
raul782 has joined #ruby
gix has joined #ruby
jdm has quit [Remote host closed the connection]
mooser has joined #ruby
jdm has joined #ruby
raul782 has quit [Ping timeout: 252 seconds]
esObe has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mooser has quit [Ping timeout: 240 seconds]
babykosh has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
esObe has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
Nilium has quit [Ping timeout: 268 seconds]
gravyflex has quit [Quit: gravyflex]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
nathan420 has quit [Quit: Page closed]
_whitelogger has joined #ruby
hutch34_ has joined #ruby
charliesome has joined #ruby
hutch34_ has quit [Ping timeout: 258 seconds]
babykosh has quit [Ping timeout: 258 seconds]
al2o3-cr has joined #ruby
<cerulean> should i switch to jruby on production?
<cerulean> it's OVER 9000 !!!!!!!!!
<cerulean> !!!!!!!!!!!!!!!!!
xall has quit [Ping timeout: 252 seconds]
vuoto has joined #ruby
<atmosx> I have a "das keyboard" and I'm fairly happy with it.
vuoto has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 252 seconds]
govg has quit [Ping timeout: 240 seconds]
xall has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esObe has joined #ruby
be_______ has joined #ruby
be_______ has quit [Remote host closed the connection]
<cerulean> does it come with das techno
<cerulean> untz untz untz untz
ben__ has joined #ruby
<cerulean> woohoo guys, come to the rubymotion community. huge party, under new leadership
<cerulean> free pizza
<cerulean> girls
<cerulean> maybe girls idk
<cerulean> probably
<cerulean> isn't there girls everywhere? so probably there as well
<cerulean> bring some girls
<cerulean> etc
randomness_ has joined #ruby
<cerulean> i'd be in trouble for this post if i had a job
<randomness_> hello guys
<cerulean> heyo
esObe has quit [Ping timeout: 240 seconds]
<randomness_> Is this IRC ruby on rails related?
<randomness_> .join RubyOnRails
ben__ has quit [Ping timeout: 258 seconds]
r3m has quit [Remote host closed the connection]
<cerulean> this is ruby-in-general
<havenwood> ?rails randomness_
<ruby[bot]> randomness_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<randomness_> @cerulean ok :)
<havenwood> cerulean: please stop with the "girls" stuff, it's not appropriate for this forum
<havenwood> cerulean: we try really hard to be welcoming to all
<cahoots> if you're going to talk about girls, make sure to also express interest in guys
<cerulean> <3 guys
<cerulean> etc
<cerulean> yeah sorry havenwood it slipped off of my finger tips due to the excitement about the motion management change
<cerulean> the project got really stale, lrz never talked to any of us... idk
<cahoots> was rubymotion ever good
<randomness_> What do you guys think of rubymotion?
<randomness_> Is it as good as Ionic?
<cerulean> it's always been good and the latest versions have been very good but at the final version laurent failed to support an xcode upgrade for over 2 weeks, then sold company
<cerulean> Ionic is simply an upgraded phonegap right? they aren't that similar as you think
<cerulean> for very webpage like apps, I recommend Ionic
wlanboy_ has quit [Changing host]
wlanboy_ has joined #ruby
<randomness_> That's right
<cerulean> for Native type apps, I recommend rubymotion or xcode
<cahoots> but like, did anyone use it at scale and find that it worked well in the long haul
mooser has joined #ruby
<cerulean> well the new owner did
<cerulean> the author of the ios game A Dark Room
<cerulean> and he has a book
<cerulean> he said share it
<cerulean> so here you go
<randomness_> I havn't seen any popular app made with rubymotion
<cerulean> you wouldn't really know
<cerulean> they run exactly the same as a native app would
<cahoots> i'd imagine though that using ruby's core library is very slow
<randomness_> That's true, but normally people brag when their hybrid is that good
<cerulean> it doesn't have corelib actually
<cerulean> it's only ruby + APIs + AOT
<cahoots> so it's sort of a translator from ruby syntax into objc syntax, then that gets compiled like a normal app
<cerulean> the bad parts were slow development cycle, lack of enthusiasm from lrz
<cahoots> is "3 + 3" as fast in rubymotion as objc/c?
<cerulean> ruby -> LLVM IR -> OPCODES
<cerulean> yes
<havenwood> cahoots: your String is really an NSString, etc
<cerulean> it uses clang, same thing xcode uses
<cerulean> yes
<cahoots> makes sense, no more "@"s all over the place
<cerulean> it's a good tool but it had a few problems
<cerulean> lack of adoption
<cerulean> slow dev cycle
<cerulean> not open source
<randomness_> and paid
<cerulean> everything else is a 9/10 on that
<cerulean> yes and paid
<cahoots> without ruby's core library, i don't see that big of a benefit to it. it just sounds like a syntax upgrade from objc, and not that much better than swift
<cahoots> but with ruby's core lib in use, it'd be slow
<cerulean> there's tons of rubymotion libraries, now, i'm the author of one of them
<cerulean> it has it's own gem ecosystem
<havenwood> cahoots: Apple was considering it as an alternative future path to Swift at one point.
<havenwood> cahoots: It was grown in-house.
<cerulean> i consider it to be a lot better than swift... i promote ruby-everywhere
<cahoots> better why
<cerulean> it's not slow. ruby's core lib isn't needed. iOS and OS X APIs are used and wrapped by the gems i talked about
<cerulean> #BetterBecauseRuby
<randomness_> I also promote ruby everywhere but unfortunately, it's popularity is fading
Tharbakim has quit [Ping timeout: 260 seconds]
<cerulean> who cares, stick with what you like
<cerulean> i like ruby
<cerulean> i like early 90s techno nobody else likes too
<cerulean> people like to go outside
<cerulean> i like ruby and basement
<cerulean> etc
<randomness_> :D
<cahoots> haha
<cerulean> :D
<cerulean> swift is whatevs. i really just wish apple picked up rubymotion instead
<cerulean> ive seen a lot of cool swift projects, and the deal is this, you can even use them from within ruby code with RM
<havenwood> randomness_: That's not true. Even the bizarre TIOBE ranking has Ruby on the rise.
<cerulean> if you felt like it, you can mix rubymotion, objective-c and swift code in the same project with native speed
Tharbakim has joined #ruby
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
<cerulean> swift and objective-c benefitted from cocoapods anyways no matter what
<havenwood> randomness_: If by popularity you mean mentions on Hacker News rather than use, fine.
<randomness_> I last I checked TIOBE, ruby's ranked decreased by two
<cerulean> haha true havenwood
<randomness_> *the last I
<randomness_> It's relieving that ruby is still in motion
<havenwood> Ruby 3 is planned for 2020.
<havenwood> Less than three years away. 2020 seems like it should be farther.
<randomness_> Any promising features to look up-to in ruby 3?
cahoots has quit [Ping timeout: 240 seconds]
<havenwood> True multi-threaded parallelism with "guilds." Three times faster than Ruby 2.
<randomness_> Nice
<havenwood> Here's one interesting discussion on the progress: https://blog.heroku.com/ruby-3-by-3
<cerulean> ruby 2.4 is the best ruby ever imo
<cerulean> everyone make sure we all don't get killed and blown up so we can fucking release this shit
<cerulean> no chicago no iraq
Tharbakim has quit [Excess Flood]
<cerulean> we must secure the remaining ruby developers
Tharbakim has joined #ruby
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<randomness_> I am teaching ruby to a class, creating a new breed, serving the cause :D
Nilium has joined #ruby
<cerulean> wooo hooo !!!! good deal. where at ?!
<randomness_> In a university
<cerulean> im suprised any university teaches ruby, that's cool
marxarelli|afk is now known as marxarelli
<randomness_> That wanted me to teach php, I told them it sucks and I am not going to do that :D
marxarelli is now known as marxarelli|afk
<randomness_> *They
Nilium_ has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 252 seconds]
Nilium has quit [Ping timeout: 240 seconds]
Nilium_ is now known as Nilium
claw has quit [Ping timeout: 252 seconds]
<cerulean> good job
<cerulean> you did you duty as a netizen at a SCHOOL
<cerulean> no sarcasm
<cerulean> i'm a mere open source programmer
<cerulean> you're pushing REAL FREE THOUGHT in REALITY. big up man
<cerulean> i just don't believe in paamayim nekudotaayims
<cerulean> i like how in ruby, the japanese stays japanese. etc
Tharbakim has quit [Ping timeout: 258 seconds]
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
Tharbakim has joined #ruby
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
claw has joined #ruby
Nilium has joined #ruby
Tharbakim has quit [Max SendQ exceeded]
Nilium has quit [Client Quit]
Silthias1 has left #ruby [#ruby]
Cohedrin has joined #ruby
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
Tharbakim has joined #ruby
Nilium has joined #ruby
stee_3 has quit [Remote host closed the connection]
pickle_ has joined #ruby
stee_3 has joined #ruby
dviola has quit [Quit: WeeChat 1.7]
elifoster has quit [Quit: zzz]
stee_3 has quit [Remote host closed the connection]
djbkd_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stee_3 has joined #ruby
esObe has joined #ruby
charliesome has joined #ruby
ElDoggo has joined #ruby
claw has quit [Ping timeout: 252 seconds]
djbkd_ has quit []
esObe has quit [Ping timeout: 252 seconds]
ElDoggo has quit [Ping timeout: 252 seconds]
raul782 has joined #ruby
r3m has joined #ruby
tmtwd has joined #ruby
tmtwd has quit [Client Quit]
bkxd has joined #ruby
r3m has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
raul782 has quit [Remote host closed the connection]
r3m has joined #ruby
armyriad has quit [Quit: Leaving]
claw has joined #ruby
ramfjord has joined #ruby
xall has quit [Ping timeout: 268 seconds]
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
pickle_ has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
jgnagy has quit [Remote host closed the connection]
hutch34_ has joined #ruby
claw has quit [Ping timeout: 252 seconds]
jgnagy has joined #ruby
tolerablyjake has joined #ruby
govg has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
tolerablyjake has quit [Client Quit]
StoneCypher has joined #ruby
<samuel02> hi I have a question about how ENV is handled when calling a ruby method defined by a native extension
<samuel02> I'm using the ruby-odbc gem which implements all its methods in C
<samuel02> one of the methods rely implicitly on the LD_LIBRARY_PATH being set correctly
ElDoggo has joined #ruby
<samuel02> if I set the variable when starting the process, i.e. `$ LD_LIBRARY_PATH=foo ruby script.rb` it works
<samuel02> but when I set the ENV variable within the script, i.e. ENV['LD_LIBRARY_PATH'] = foo, and $ ruby script.rb it doesn't work
<samuel02> why?
<samuel02> what am I missing?
taharushain has joined #ruby
StoneCypher has quit [Ping timeout: 260 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
randomness_ has quit [Quit: Page closed]
ElDoggo has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
raul782 has joined #ruby
bkxd has joined #ruby
rippa has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
nebiros has quit [Quit: 🤷‍♂️]
raul782 has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby
claw has joined #ruby
_whitelogger has joined #ruby
taharushain has left #ruby [#ruby]
<cerulean> samuel02: use export
<cerulean> actually
<cerulean> ENV is a constant, read-only
<cerulean> you can't modify it
<Mon_Ouie> The fact ENV is a constant does not mean you can't change environment variables through it.
<cerulean> o
<Mon_Ouie> It just means you can't assign another object to 'ENV' without a warning
<cerulean> o
<samuel02> well I still don't understand why it works this way
<samuel02> no matter which strategy I use, right before the method (ODBC.connect, which calls native code) I can check ENV and in both cases it is set to the same thing
<samuel02> but like I said if I set the ENV variable within the script it doesn't work
<samuel02> because the "native code" doesn't seem to get that environment
sleetdrop has quit [Remote host closed the connection]
<Mon_Ouie> Wait, you are setting LD_LIBRARY_PATH after requiring ruby-odbc?
<samuel02> no
<samuel02> or at least I don't think so :)
<samuel02> I'm gonna double-check that :)
jamesaxl has joined #ruby
<samuel02> yes, can confirm it is set before requiring
<samuel02> I assumed that the environment would just be passed along to the native extension
<samuel02> but that seems to be a wrong assumption
<samuel02> but I still don't understand :/
gottcha has quit [Ping timeout: 240 seconds]
<Mon_Ouie> Environment variables are a property of each process. Whether you are in a C extension or Ruby code, you see the same environment variables in the same process.
<Mon_Ouie> However, the documentation for dlopen says "If, at the time that the program was started, the environment variable LD_LIBRARY_PATH was defined (...)"
claw has quit [Ping timeout: 252 seconds]
<Mon_Ouie> Which suggests to me that changing it during the execution does not have the desired effect
jgt has joined #ruby
claw has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
<samuel02> ah, interesting
<samuel02> so since dlopen is run in this process the process itself is not allowed to set that ENV var?
<samuel02> and thus no matter what I need to set this "at the time that the program" starts
<Mon_Ouie> It can set it, but as I understand it, the value relevant for dlopen is the one when the program was started, not the one set during the execution.
nofxxx has joined #ruby
<samuel02> hmm..
<Mon_Ouie> But if say you called system("some_other_process"), that process should be able to load the libraries in LD_LIBRARY_PATH.
<samuel02> yeah, makes sense
<samuel02> so that means I have to set the variable before starting the process every time
<samuel02> then comes my next problem
<samuel02> which is that if I want to set this permanently I should use ldconfig
<samuel02> but ldconfig only picks up files with names starting with lib*
<samuel02> but the driver that needs to be on the path is called ivoa25.so
<Mon_Ouie> You should be able to e.g. have 'export LD_LIBRARY_PATH=foo' in your .bashrc
<samuel02> yeah
<samuel02> and that works for most cases
jamesaxl has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
<samuel02> except when doing this in a background job, where the worker is controlled by god (http://godrb.com/) which is run as root
<samuel02> then it doesn't pick that variable up
jamesaxl has quit [Client Quit]
<samuel02> I assume because LD_LIBRARY_PATH cannot be set explicitly for non-interactive shells (https://help.ubuntu.com/community/EnvironmentVariables)
<samuel02> "Note: You can only set this environment variable inside an interactive shell"
<samuel02> regarding LD_LIBRARY_PATH
<Mon_Ouie> Another approach is to have a wrapper shell script or ruby script that just calls your real script with the environment set up properly
jamesaxl has joined #ruby
<samuel02> yeah, I know
<samuel02> but then it's getting more complicated
<samuel02> I said earlier this is a script just to simplify my issue
<samuel02> but in reality this is a Rails application + Resque workers
claw has quit [Ping timeout: 255 seconds]
<samuel02> and my dream is to just be able to set it in a .env
<samuel02> and be done with it :)
<samuel02> but it seems like it's impossible to keep it that simple
<samuel02> do you know if Rake::Task['foo'].invoke spawns a new process?
claw has joined #ruby
<samuel02> I'm thinking about wrapping Resque's rake task that starts up a worker
<Mon_Ouie> The block 'task 'foo' do … end' is executed in the same ruby process
<Mon_Ouie> The task itself might spawn a new process
armyriad has joined #ruby
<samuel02> ah, ok
mooser has quit [Remote host closed the connection]
esObe has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
bkxd has joined #ruby
agent_white has quit [Quit: agent_white]
nebiros has joined #ruby
nebiros has joined #ruby
nebiros has quit [Changing host]
claw has quit [Ping timeout: 252 seconds]
zacts has quit [Quit: WeeChat 1.7]
zacts has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
A124 has quit [Read error: No route to host]
Guest96 has quit [Remote host closed the connection]
ericmathison has joined #ruby
A124 has joined #ruby
j2k has joined #ruby
claw has joined #ruby
Guest96 has joined #ruby
Guest96 has quit [Remote host closed the connection]
papillom has joined #ruby
Qchmqs has joined #ruby
claw has quit [Ping timeout: 252 seconds]
hutch34_ has joined #ruby
claw has joined #ruby
Guest96 has joined #ruby
babykosh has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
hutch34_ has quit [Ping timeout: 252 seconds]
StoneCypher has joined #ruby
Pumukel has quit [Remote host closed the connection]
bkxd has joined #ruby
StoneCypher has quit [Ping timeout: 252 seconds]
claw has quit [Ping timeout: 252 seconds]
papillom has quit [Quit: Leaving.]
papillom has joined #ruby
Mon_Ouie has quit [Read error: No route to host]
Mon_Ouie has joined #ruby
claw has joined #ruby
Lartza_ is now known as Lartza
papillom has quit [Read error: Connection reset by peer]
papillom has joined #ruby
claw has quit [Ping timeout: 252 seconds]
raul782 has joined #ruby
shinnya has joined #ruby
claw has joined #ruby
lxsameer has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
marr has joined #ruby
xall has joined #ruby
bkxd has quit [Quit: leaving]
bkxd has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
babykosh has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
claw has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
libastral has quit [Quit: ZNC - http://znc.in]
jamesaxl has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 240 seconds]
claw has joined #ruby
libastral has joined #ruby
grh has joined #ruby
mooser has joined #ruby
mooser has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 240 seconds]
chichou has joined #ruby
bkxd has joined #ruby
ericmathison has quit [Ping timeout: 268 seconds]
grh has quit [Ping timeout: 260 seconds]
papillom has quit [Quit: Leaving.]
be_______ has joined #ruby
be_______ has quit [Remote host closed the connection]
be_______ has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
jdm has quit [Remote host closed the connection]
jdm has joined #ruby
be_______ has quit [Ping timeout: 258 seconds]
Pumukel has joined #ruby
pickle_ has joined #ruby
BaroMeter has joined #ruby
Burgestrand has joined #ruby
hutch34_ has joined #ruby
kies has quit [Ping timeout: 260 seconds]
elsevero has joined #ruby
samuel02 has quit [Quit: Connection closed for inactivity]
xall has quit [Ping timeout: 260 seconds]
hutch34_ has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
pickle_ has quit [Read error: Connection reset by peer]
pickle_ has joined #ruby
claw has quit [Ping timeout: 252 seconds]
claw has joined #ruby
domgetter has quit [Ping timeout: 240 seconds]
kies has joined #ruby
elsevero_ has joined #ruby
elsevero has quit [Ping timeout: 260 seconds]
elsevero_ is now known as elsevero
StoneCypher has joined #ruby
jamesaxl has joined #ruby
binaryplease has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shwouchk has joined #ruby
StoneCypher has quit [Ping timeout: 268 seconds]
papillom has joined #ruby
davidmichaelkarr has quit [Quit: Connection closed for inactivity]
claw has quit [Ping timeout: 252 seconds]
ElDoggo has joined #ruby
esObe has quit [Remote host closed the connection]
davic has joined #ruby
claw has joined #ruby
ElDoggo has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
nadir has quit [Quit: Connection closed for inactivity]
jakkn has joined #ruby
bsartek has joined #ruby
ziarkaen has joined #ruby
Sweetlie_ has joined #ruby
Sweetlie has quit [Ping timeout: 260 seconds]
<jakkn> I am using FakeFS to test a script that touches the filesystem. It works, but I'm running into trouble when the script does system calls to use libraries and run Rake tasks. Is it possible to have the fake filesystem persist for these system calls or am I taking a wrong approach?
StoneCypher has joined #ruby
dagelf has left #ruby ["http://quassel-irc.org - Backlogs! Always! Yay!"]
StoneCypher has quit [Ping timeout: 240 seconds]
nofxxx has quit [Ping timeout: 255 seconds]
nofxxx has joined #ruby
dar123 has quit [Read error: Network is unreachable]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<ineb> jakkn: maybe working with /tmp would suffice?
latemus has quit [Quit: Lost terminal]
manjaro-kde5 has joined #ruby
<ineb> jakkn: what system calls are causing trouble? if you wrap the script around FakeFS, FileUtils and co should work accordingly
esObe has joined #ruby
<ineb> oh i see, FakeFS only replaces File and FileUtils. Stuff like system("mkdir") is circumventing it
synthroid has joined #ruby
jhack has joined #ruby
<ineb> Dir#chroot might be an option
qsx has joined #ruby
esObe has quit [Ping timeout: 240 seconds]
<qsx> hi
<qsx> i’m beginning to learn ruby and i’m a bit confused about naming modules and classes
<qsx> do i get this right that file path and module name are only the same by convention, and lib/foo/bar.rb can just as well Baz::Qux?
bkxd has quit [Ping timeout: 260 seconds]
<ineb> qsx: that is correct. those two do not correlate like its the case with java
dionysus69 has quit [Ping timeout: 252 seconds]
<ineb> but when you use require_relative to include a file from somewhere else, the path must be correct ofc
<qsx> and with a simple require 'foo/bar', the first <libdir>/foo/bar.rb is taken (for all directories of the search path)?
synthroi_ has joined #ruby
<ineb> yes, you can show the search paths with ruby -e 'puts $:'
<qsx> i see, thanks
<ineb> however, i do not what happens when there are multiple foo/bar.rb in the search path
bkxd has joined #ruby
synthroid has quit [Ping timeout: 255 seconds]
manjaro-kde5 has quit [Ping timeout: 260 seconds]
ledestin has quit [Ping timeout: 260 seconds]
Pumukel has quit [Remote host closed the connection]
<jakkn> ineb: well the issues occur on lines that go like 'system "somelibrary --somearguments"'
Pumukel has joined #ruby
hutch34_ has joined #ruby
<jakkn> ineb: where the file aruments do not exist. So I'm assuming the system calls are not within the scope of FakeFS
<ineb> jakkn: yes, because FakeFS only replaces File and FileUtils
<jakkn> yes exactly
<jakkn> so you think chroot might work?
<ineb> i dont know your exact scenario
<ineb> i guessed you wanted to test a script if it creates a correct file structure
<ineb> and you cannot modify that script
<jakkn> yes that's it
<ineb> so you could create a chroot environment and run the script inside it.
Pumukel has quit [Ping timeout: 260 seconds]
<ineb> however you might get issues with missing libraries inside the chroot and so on. i have not done it before
<ineb> if you want to test your script only for correct system calls without actually creating the files, you could also mock your way around
<jakkn> I guess I would need to install all deps first
claw has quit [Ping timeout: 255 seconds]
raul782 has joined #ruby
raul782 has quit [Client Quit]
<jakkn> Mocks could work, I'll look more into that too
claw has joined #ruby
elsevero has quit [Ping timeout: 268 seconds]
<ineb> yes and if its super sophisticated, you could spawn a container (docker,lxc), run the script, make the tests, dispose container.
Puffball has quit [Ping timeout: 240 seconds]
<ineb> but i guess thats overengineering
ski7777 has quit [Remote host closed the connection]
claw has quit [Ping timeout: 252 seconds]
ski7777 has joined #ruby
hutch34_ has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
Xiti has joined #ruby
papillom1 has joined #ruby
pickle_ has quit [Remote host closed the connection]
papillom has quit [Ping timeout: 258 seconds]
armin has quit [Quit: WeeChat 1.6]
claw has joined #ruby
nadir has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
dionysus69 has joined #ruby
govg has quit [Ping timeout: 268 seconds]
jrafanie has joined #ruby
elsevero has joined #ruby
esObe has joined #ruby
esObe has quit [Ping timeout: 260 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elsevero has quit [Quit: elsevero]
ElDoggo has joined #ruby
aep has quit [Ping timeout: 240 seconds]
ElDoggo has quit [Ping timeout: 258 seconds]
Arpanet69 has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
ncthom91 has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
BaroMeter has quit [Remote host closed the connection]
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
chrisseaton has joined #ruby
shwouchk has quit [Quit: Connection closed for inactivity]
mooser has joined #ruby
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
papillom1 has left #ruby [#ruby]
hutch34_ has joined #ruby
electrostat has quit [Quit: uwotm8]
jameser has joined #ruby
electrostat has joined #ruby
ElDoggo has joined #ruby
synthroid has joined #ruby
govg has joined #ruby
harfangk has joined #ruby
armin has joined #ruby
jameser has quit [Max SendQ exceeded]
synthroi_ has quit [Ping timeout: 268 seconds]
<dyyylan> is there a styleguide somewhere for when to use parentheses around function arguments? it seems pretty arbitrary
jameser has joined #ruby
greengriminal has joined #ruby
mrconfused has joined #ruby
<greengriminal> Hi All, just switched over from 2.3 -> 2.4 and noticed that the rounding has changed, and now supplies a series of options such as :up, :down. I have a situation where in Ruby 2.3 I had: `1.015.round(2)` which would return `1.01` and now in Ruby 2.4 I get 1.02. This is simply because Ruby 2.4 #round rounds to the nearest even number. My question simply is how can I get `1.015.round(2)` to return 1.01 in Ruby 2.4
esObe has joined #ruby
Guest96 has quit [Remote host closed the connection]
<elomatreb> >> 1.015.round(2, half: :down)
<ruby[bot]> elomatreb: # => wrong number of arguments (given 2, expected 0..1) (ArgumentError) ...check link for more (https://eval.in/776833)
<greengriminal> ah see, i did not know that `#round` took a 2nd arg that was a hash.
<greengriminal> Thanks.
Guest96 has joined #ruby
<elomatreb> It doesn't, as demonstrated by the eval error
Guest96 has quit [Remote host closed the connection]
<ineb> dyyylan: there are multiple guidelines suggesting different things. pick one style and stick with it. and if you want, choose this one: https://paste.xinu.at/jQhe/rb
<elomatreb> I misread the docs, the half: thing is for deciding what to do with the precise middle
Guest96 has joined #ruby
<greengriminal> elomatreb, you sure it doesn't work ;/ - https://gist.github.com/davidpatters0n/a9e2b6c90756ecd16ca08fe0b5680bf9
be_______ has joined #ruby
<elomatreb> Uh, right
Guest96 has quit [Remote host closed the connection]
<elomatreb> >> RUBY_VERSION
<ruby[bot]> elomatreb: # => "2.3.0" (https://eval.in/776834)
<dyyylan> perfect thanks ineb
mrconfused has quit [Ping timeout: 258 seconds]
esObe has quit [Ping timeout: 260 seconds]
Guest96 has joined #ruby
Guest96 has quit [Remote host closed the connection]
<greengriminal> elomatreb, - Strange that the ruby docs for 2.4 here - https://ruby-doc.org/core-2.4.0/Float.html#method-i-round suggest that #round only takes 1 arg.
be_______ has quit [Remote host closed the connection]
<elomatreb> In the docs for 2.4.1 it is mentioned
ben__ has joined #ruby
Guest96 has joined #ruby
<greengriminal> Ahh thanks, was slightly mislead then.
<elomatreb> The feature is in 2.4.0 though, idk why it isn't documented
<dyyylan> ineb: how does the ruby community feel about trailing commas in arrays and hashes?
mooser has quit [Remote host closed the connection]
Guest96 has quit [Remote host closed the connection]
<elomatreb> dyyylan: In many cases you can use % array literals to avoid the need for them
ResidentBiscuit has joined #ruby
ben__ has quit [Ping timeout: 255 seconds]
Guest96 has joined #ruby
<dyyylan> what about when you don't
<elomatreb> The probably most popular styleguide recommends you avoid them (https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas), but that's your choice
<dyyylan> aha I guess I should have tried ctrl+F first. thanks :)
hutch34_ has quit [Ping timeout: 240 seconds]
chichou has quit [Quit: WeeChat 1.7]
mzo has joined #ruby
<cerulean> hey fam
xall has joined #ruby
<cerulean> dyyylan: use () on arguments only when it isn't obvious it's an argument, or you need it because of operator precendence order or to call chained functions
<cerulean> dyyylan: NEVER used trailing commas on arrays and hash. it's there in case you mess up
<elomatreb> That is one option, some people prefer them even when they're optional to be more explicit
<dyyylan> yeah i noticed in some places its foo(x) and in rails you have f.ex: validates :foo, :bar => { :baz }
<cerulean> yes, but according to my non existant styleguide, that sucks and is non-rubonic
<dyyylan> but i see people are calling some rails things "DSL"
<cerulean> it's others
<cerulean> lack of parentheses doesn't make it DSL
<elomatreb> cerulean: Good thing there isn't the One True Way to write Ruby then :P
<cerulean> the validates :keyname, :value => { :blah } is DSL
<cerulean> you'll find my method is best. parentheses to make it obvious makes sense
<cerulean> parentheses just because, makes no sense. why not program in C# or javascript then
<mzo> hi cerulean
<cerulean> sup mazo
<elomatreb> DSL (Domain Specific Language) is basically a set of methods/an interface designed to solve a specific problem
<cerulean> mzo*
<cerulean> that's correct elomatreb
<mzo> not much cerulean. how are you?
<cerulean> but that DSLs can be called with () or without
<cerulean> good good :)
noobineer has joined #ruby
<cerulean> and you
<cerulean> here's a quick question see if i'm wrong elomatreb and dyyylan
<cerulean> do you prefer
<cerulean> puts "hi"
<cerulean> or puts("hi")
<elomatreb> Counterquestion: do you prefer ` a(b(c(d)))` or `a b c d`?
nemish has quit [Quit: nemish]
<cerulean> a(b(cd()))) is what im saying to use
<mzo> i'm ok thanks cerulean
<cerulean> i'm saying about a b c d
<cerulean> avoid it
<cerulean> parens there make obviousness good
<cerulean> a b d c d wont even compile, ruby will get confused if operator load order is wrong
<cerulean> good good mzo
<allisio> cerulean: Huh?
<cerulean> parentheses on a chained call is what i'm saying is good to do. or if you do some evaluation in the arguments such as math or magic string interpolation
bdonnahue has quit [Ping timeout: 258 seconds]
* mzo waves to allisio
<cerulean> parentheses for no reason because you're from javascript and C# or C++ and just because it "feels good" is wrong
<allisio> There's an obvious argument to be made for consistency.
<cerulean> you can code ruby with parentheses and semicolon on every function call and statement ... but do people do it? no.
<cerulean> be consistent with the rest of the ruby language, and not the language you came from
<cerulean> () and ; are optional for a reason
impermanence has joined #ruby
<mzo> i write method arguemnts haskell-style
<allisio> Parentheses are not always optional.
<mzo> arguments too
<cerulean> i'm saying WHEN it's optional, don't force the usage. this makes for bad rooby
<elomatreb> There are other approaches, bbatsovs guide recommends a semantic distinction between calling with and without parentheses
<cerulean> the distinction is what i told you. it forces operator order
<cerulean> if it can't be called without parentheses, use parentheses. if it looks wrong without parentheses, use parentheses. otherwise don't
ericmathison has joined #ruby
<elomatreb> "semantic" as in call public (external interface) methods with parentheses, internal without
<impermanence> I know this is probably a silly question, but: how does variable assignment work in Ruby given that it's purely OOP: in other words: if I assigned something to a variable: is that variable a pointer to that something or is the thing I assigned now stored with that variable object as part of its object storage or...?
jgnagy has quit [Remote host closed the connection]
<elomatreb> What does "look wrong" mean *PRECISELY*?
<cerulean> elomatreb: i don't think that's correct
jgnagy has joined #ruby
<cerulean> looks wrong means it looks bad to you
<elomatreb> How do I teach my linter that?
<cerulean> ok forget the "looks wrong" i basically never run into that
<cerulean> just worry about the first and last rules
<cerulean> it's not a linter issue
<elomatreb> Yes, as I said, that's the popular choice. But the alternative isn't less valid
<cerulean> it's a programmer happiness code readability issue
<mzo> >How do I teach my linter that?
<mzo> that's your problem
<cerulean> it's not less VALID but it's worse to read
<mzo> figure it out
<cerulean> teach your linter this: no parentheses unless i need it
<cerulean> solved, case closed
<elomatreb> "worse to read" is entirely subjective
<cerulean> impermanence: don't worry about where or how a variable is storage. read up on ruby variable scope
<cerulean> ok, add more characters to every call for no reason, have fun. when other rubyists laugh at you for doing what i said not to do, don't cry to me
<elomatreb> Anyway, arguing about codestyle is the most pointless thing next to arguing about editors
<allisio> impermanence: Some values are "reference types", to use the standard nomenclature.
<cerulean> yes, extra () in every line is going to annoy me when i read your code, ruby isn't python
<cerulean> but
<cerulean> do whatever you want
<cerulean> that's why it's ruby!
<elomatreb> But please don't tell people they're writing "bad Ruby" if they're using parentheses, there is no official style
<allisio> >> a = [1,2,3]; b = a; b.clear; a # impermanence
<ruby[bot]> allisio: # => [] (https://eval.in/776859)
<cerulean> i'm not saying it's bad ruby.
<cerulean> you can do either, so just do what feels right. certainly it doesn't make sense to do it all one way or the other. i don't
<elomatreb> "cerulean> i'm saying WHEN it's optional, don't force the usage. this makes for bad rooby" well
<allisio> Y'all sure the bikeshed needs a seventh coat of paint?
<elomatreb> But what about the color though
<cerulean> i'm saying use it whenever you want, but don't use it for 100% of method calls everywhere i guess
<impermanence> allision: k. yeah, I was asking about the reference type topic. So a variable is a reference type in ruby...
<impermanence> allisio.
kent\n has quit [Quit: No Ping reply in 180 seconds.]
DLSteve has joined #ruby
<cerulean> i looked at my code and i use () more often that not and only omit it sometimes
<cerulean> so.. just do whatever feels good
<allisio> impermanence: No, some *values* are references. Variable assignment just creates a binding; it gives you a name by which to refer to the value.
<cerulean> There's More Than One Way To Do It
<impermanence> allisio: k. I'll read up on it.
<cerulean> here's my new updated style good: do whatever works that you like
<cerulean> guide*
kent\n has joined #ruby
<elomatreb> impermanence: See also: https://eval.in/776862
<cerulean> you're not gonna call every method like
<cerulean> method args,args
<cerulean> neither am i
<cerulean> so wateva
<allisio> cerulean: You took great pains to get to that anticlimactic punchline.
<impermanence> elomatreb: k
synthroi_ has joined #ruby
<cerulean> allisio: yeah, true. well i still believe my original point, no () unless necessary, but i dont even seem to follow my own rule so fuk it
binaryplease has quit [Ping timeout: 255 seconds]
<cerulean> the best thing about ruby is the lack of rules like that
<cerulean> if we in python, there'd be no argument since the guy arguing against () would have a broken program
<toretore> what a wonderful world
xall has quit [Read error: Connection reset by peer]
<elomatreb> Python also has an official styleguide, Ruby does not
<toretore> it would be
synthroid has quit [Ping timeout: 260 seconds]
<mzo> because ruby doesn't need one
<mzo> the right style is obvious
<cerulean> i like python. but... ruby is better at too much stuff
<cerulean> yeah mzo i agree
* elomatreb does not care about Ruby vs X
<cerulean> 90% of rubyists ive worked with code similarily
<cerulean> ruby is good because it's forgiving and permissive. python just breaks
<cerulean> i'm saying it's good we can even have this fight
<cerulean> or discussion
<cerulean> There Is Only One Way To Do It sucks
kobain has joined #ruby
<elomatreb> "There are infinitely many ways to do it slightly wrong" isn't exactly ideal either
<cerulean> what language or thing are you referring to
<cerulean> perl - "There are a lot of bad ways to do it"
<elomatreb> I'm not having a language vs X discussion, sorry
<cerulean> C - "there's lots of ways to do it, and you will probably fuck up"
<cerulean> im curious what language has infinite ways to do stuff slightly wrong
<cerulean> no idea what you're referring to in that case
Qchmqs has quit [Ping timeout: 252 seconds]
<cerulean> just do it the way you like and makes sense to you in your own code
<cerulean> And Nothing Else Matters \m/
<cerulean> use python if you'd like guido to decide for you how to code
<elomatreb> What style you choose is irrelevant in the end, as long as you're consistent
<cerulean> yes pretty much
<cerulean> i laugh at style guides
<cerulean> i use the same style as the other 90% of ruby coders
<cerulean> indent 2 spaces and use ruby features when possible
<elomatreb> Style guides become almost necessary when you work with a team, if your team is 10 programmers you likely already have one that does not code like the 90% of Ruby coders
LastWhisper____ has joined #ruby
<mzo> i indent 8 spaces
<mzo> wait no
<mzo> i use tab characters
<elomatreb> ^ case in point
<elomatreb> And if you mix two indentation styles you get unusably large git commits, for example
<cerulean> here's my company. i'm the boss. you don't code like a regular rubyist? *hands u a pink slip* bye
<cerulean> you mix indent? *shows u the door*
<cerulean> solved
<cerulean> i've been on teams near that size and nobody ever coded ruby strangely
<cerulean> i can't relate
allisio has quit [Quit: WeeChat 1.7]
<mzo> would you hand me a pink slip for using tabs?
<cerulean> if u need a style guide, u no can have job at my company. lol
<havenwood> ?tabs mzo
<ruby[bot]> mzo: Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
<mzo> hi havenwood
<mzo> how are you?
ElDoggo has quit [Remote host closed the connection]
<havenwood> Just two-space, soft-tabbing my Saturday away!
ruby-lang315 has joined #ruby
<havenwood> ?styleguides
<ruby[bot]> here are three popular styleguides, you should read and follow at least one: https://github.com/styleguide/ruby https://github.com/bbatsov/ruby-style-guide https://github.com/thoughtbot/guides/tree/master/style/ruby
<cerulean> good shit havenwood
<mzo> haha
<cerulean> >> cerulean_style_guides = []; puts cerulean_style_guides
<cerulean> here's some more
ruby-lang315 has quit [Client Quit]
<elomatreb> You need to be authed to use the bot
<cerulean> oh
<cerulean> to services?
ruby-lang600 has joined #ruby
<elomatreb> freenode's NickServ
esObe has joined #ruby
<cerulean> haha
<ruby-lang600> how to solve paperclip no file chosen?
<cerulean> just found out someone else owns the name who never comes on
<ruby-lang600> ??
<cerulean> sorry
<cerulean> not related to your question
<cerulean> ?rails
<cerulean> .rails
<cerulean> havenwood: help
<elomatreb> That's the same bot
<havenwood> ?rails cerulean
<ruby[bot]> cerulean: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<cerulean> ruby-lang600: ^
<ruby-lang600> the link is not working
<cerulean> do /join #RubyOnRails
<ruby-lang600> ya the link is not working, when i lick
<ruby-lang600> click
<cerulean> for paperclip, you need to specify the file you're uploading in a file upload form
<elomatreb> cerulean: If the person who registered that name hasn't been online in a long time you may take over the account, IDK what the specific freenode rules are
<cerulean> there's no link. it's a chat room. do /join #RubyOnRails <enter>
<cerulean> nice elomatreb
<cerulean> i'm in #help asking
ruby-lang600 has quit [Client Quit]
<mzo> it's complicated iirc
jamesaxl has quit [Read error: Connection reset by peer]
<mzo> the older the nick, the more time you have to wait before you can take it
jamesaxl has joined #ruby
<cerulean> interesting
<mzo> it's like X weeks + Y weeks per year the nick has been registered
ruby-lang332 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<ruby-lang332> how to join rails chat room?
esObe has quit [Ping timeout: 260 seconds]
<mzo> /j #rubyonrails
ruby-lang332 has quit [Client Quit]
Pumukel has quit [Remote host closed the connection]
<havenwood> /msg NickServ HELP
mooser has joined #ruby
Pumukel has joined #ruby
ruby-lang641 has joined #ruby
<impermanence> This is not a criticism of anyone in here: but when first learning Ruby did any ever feel like the core documentation really sucks? It's not even that its written poorly grammatically (it is): it's like it doesn't map any of the related concepts well. Like just trying to understand the relationships between open, read and write seems so poorly la
<impermanence> id out.
ResidentBiscuit has quit [Remote host closed the connection]
<ruby-lang641> i can't enter the rails chat room?
houhoulis has joined #ruby
<ruby-lang641> any idea why?
<havenwood> ruby-lang641: You'll need to register a nick. See: /msg NickServ HELP
<cerulean> impermanence: use it as a reference. find better english documentation for what you want
ResidentBiscuit has joined #ruby
<ruby-lang641> lol where to register?
<havenwood> ruby-lang641: /msg NickServ HELP REGISTER
<impermanence> cerulean: I guess that's the key. It's just when I google stuff the implementation or approach is of course different from the text I'm studying. Oh well.
<cerulean> read ALL the implementations and pick the best one impermanence
<cerulean> use as little code as possible
Pumukel has quit [Ping timeout: 268 seconds]
<impermanence> cerulean: kk.
ResidentBiscuit has quit [Ping timeout: 245 seconds]
blackwind_123 has quit [Read error: Connection reset by peer]
greengriminal has quit [Quit: Leaving]
nowhereFast has joined #ruby
ruby-lang797 has joined #ruby
ruby-lang641 has quit [Ping timeout: 260 seconds]
ruby-lang797 has quit [Client Quit]
SteenJobs has joined #ruby
suresh321 has joined #ruby
blackwind_123 has joined #ruby
mrconfused has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xall has joined #ruby
gravyflex has joined #ruby
xall has quit [Read error: Connection reset by peer]
mooser has quit [Remote host closed the connection]
aki has joined #ruby
<aki> hi
<havenwood> aki: hi
bdonnahue has joined #ruby
<aki> i want help actually i have to built a rest api serever in ruby using socket library and i am using socket.gets to read request but socket.gets only reading half request
nowhereFast has left #ruby [#ruby]
<aki> like my api request is api/connid=12andtimeout=10
<aki> it is only reading api/connid=12
<aki> can anyone help me its urgent
Limix has joined #ruby
s2013 has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
jhack_ has joined #ruby
<aki> ??
vuoto has joined #ruby
<impermanence> havenwood: sorry for the late response. That is clarifying.
charliesome has joined #ruby
suresh321 has quit [Ping timeout: 260 seconds]
<Papierkorb> aki: Use a proper http server library.
lacour has joined #ruby
jhack has quit [Ping timeout: 268 seconds]
xall has joined #ruby
<impermanence> irb: file1.out = "some text" then throws NoMethodError: undefined method `out=' for "some text":String
<impermanence> How can I do some testing in irb for files that have extensions?
<cerulean> << puts "cerulean is #{rand(1000).to_i}x cooler than you"
cerulean has left #ruby [#ruby]
cerulean has joined #ruby
<cerulean> << puts "test"
<cerulean> i'm identified, still can't use bot
Puskinas_ has joined #ruby
<Papierkorb> >> "Please don't spam #ruby"
<mzo> its >> not <<
<cerulean> oh
gravyflex has quit [Quit: gravyflex]
<cerulean> >> puts 'hi from corulen'
<ruby[bot]> cerulean: # => hi from corulen ...check link for more (https://eval.in/776877)
<cerulean> woohoo
<cerulean> >> { put "stupid code}.call
<ruby[bot]> cerulean: # => /tmp/execpad-78bbd42600db/source-78bbd42600db:2: syntax error, unexpected tSTRING_BEG, expecting key ...check link for more (https://eval.in/776878)
<cerulean> >> { puts "stupid code" }.call
<ruby[bot]> cerulean: # => /tmp/execpad-71a35bdab6f2/source-71a35bdab6f2:2: syntax error, unexpected tSTRING_BEG, expecting key ...check link for more (https://eval.in/776879)
<cerulean> >> { puts("stupid code") }.call
<Papierkorb> cerulean: Please use a local irb or pry session instead
<cerulean> lol just curious
<cerulean> never used that bad
<cerulean> used that bot*
<aki> actually it is a task and i have to socket lib
Xiti has quit [Quit: Xiti]
ziarkaen has quit [Ping timeout: 240 seconds]
<aki> is there any way to do this with socket lib
<Papierkorb> of course there is. you just have to implement HTTP (to some degree)
<aki> can you provide some links
<Papierkorb> HTTP/1.1 is described in RFC2616
<Papierkorb> The socket library in the ruby documentation
ericmathison has quit [Ping timeout: 240 seconds]
<cerulean> why rewrite an HTTP/1.1 server again?
<cerulean> are they asking you to "prove yourself"
libastral has quit [Quit: ZNC - http://znc.in]
libastral has joined #ruby
shinnya has quit [Ping timeout: 258 seconds]
vuoto has quit [Quit: Lost terminal]
vuoto has joined #ruby
libastral has quit [Client Quit]
libastral has joined #ruby
vuoto has quit [Client Quit]
eboaz has quit [Ping timeout: 260 seconds]
vuoto has joined #ruby
<cerulean> why do employers ask you to reinvent the wheel to prove yourself
<cerulean> should we rebuild the Apollo missions and prove we can go to the moon as well
<cerulean> "reimplment #sort" "no" *gets up and leaves*
<Mon_Ouie> I don't think those two projects are even remotely on the same scale
<apeiros> yeah, going to the moon is much easier
ziarkaen has joined #ruby
esObe has joined #ruby
Limix has quit [Quit: Limix]
graft has joined #ruby
hotpancakes has joined #ruby
graft has left #ruby [#ruby]
<cerulean> :D
t-recx has joined #ruby
<cerulean> i just mean we already went to the moon once, we proved we could do it. corporate interviews are like "ok prove we can go to the moon again"
jdawgaz has joined #ruby
ziarkaen has quit [Ping timeout: 260 seconds]
graft has joined #ruby
aki has quit [Quit: Page closed]
Sembei has joined #ruby
houhoulis has quit [Remote host closed the connection]
<graft> hey all, parsing some JSON and wondering how i can best transform date-formatted strings to actual dates when i parse them out
<cerulean> it's not important to be able to rewrite #sort to use ruby. just like ASM knowledge isn't important to use C
<havenwood> graft: example of the format?
<cerulean> graft: Time.parse()
<jhass> hopefully just iso8601
<havenwood> ^
<graft> havenwood: let's say i don't know, i just have a JSON blob and somewhere in there are some strings is iso8601
<cerulean> Time.parse()
<jhass> don't Time.parse if you don't need its guessing feature
<graft> in javascript JSON.parse takes a function argument through which you can pass key/value pairs
<Papierkorb> cerulean: The point is usually not to check that you can write quicksort without thinking much, but to see how you tackle the task
<graft> i can't find something equivalent in ruby
Pisuke has quit [Ping timeout: 260 seconds]
<cerulean> Papierkorb: oh, i see
<graft> so i guess i have to crawl through the blob by hand and look for date strings?
<cerulean> Time.parse will probably do what you want
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<cerulean> !rubydocs Time#parse
<graft> it's not the date parsing that i'm worried about
<cerulean> what u worried about
<Papierkorb> cerulean: Even failing is fine as long you realise that you failed, what the issue was and how a correct solution might have looked
<Papierkorb> cerulean: "failing is fine" - your mileage may vary™
<graft> how to catch all date strings anywhere in the json blob when i parse it
<cerulean> for sure Papierkorb, do you work somewhere that uses this style?
claw has quit [Ping timeout: 255 seconds]
<cerulean> graft: regular expressions
claw has joined #ruby
<cerulean> or parse and regex each value
<graft> and just what, recursive iteration?
<cerulean> either regex the text or regex each key
<Papierkorb> cerulean: Had an interview recently doing that, yup. Well, wasn't "implement sort".
<cerulean> just walk the tree, idk if recursive is important
<cerulean> regex and parsing is what you want
<cerulean> there also might be some gems that can read a date out of text
<graft> if the json is deeply nested, recursion seems necessary
<cerulean> Papierkorb: how did they do? pass/fail?
<cerulean> yes recursion will be necessarily unless you do something clever like regex the whole text then walk to the top or something weird. i recommend recursion
<graft> yeah so there's no ruby methods that handle the recursion through a json parse for me
<graft> like there is with javascript JSON.parse
<cerulean> make a method that calls itself
<cerulean> call it on the root node
<graft> sure, i can write it myself, just wondering if there is an existing paradigm for this sort of thing
<cerulean> in the method, check all keys of the node for the date
<graft> seems like it must be fairly common
<cerulean> i don't think that's that common
<cerulean> roll-your-own
<Papierkorb> cerulean: I failed that part but did state the issue and most likely correct solution (we were out of time). Moved onto the next stage however. Can't have been that bad. (however, this is getting #ruby-offtopic material)
<cerulean> google it up, sure
<graft> google is useless
<cerulean> Papierkorb: sure. sounds like you got lucky. we can cut it here. i'll move to #ruby-offtopic at some point
<graft> i guess i'll just roll my own
<cerulean> graft :+1:
libastral has quit [Quit: ZNC - http://znc.in]
<cerulean> you will find a gem for most popular tasks
<cerulean> you will find you make the stuff you want best
<cerulean> yourself
<cerulean> when no one else has done it
<cerulean> but always make sure some genius hasn't done it with 300+ stars on github
<graft> believe me, i already suffer from the sin of writing it myself too often
<cerulean> it's a good sin
<cerulean> usually
<graft> usually
<cerulean> dont write too much yourself. just only when there's no good solution in existence
<cerulean> its OK to write it one way then switch it later
<cerulean> we're not Releasing To Manufacturers here
<cerulean> instead of trying to be sure all my pushes never break my website and bot, if a push breaks it, i just try to fix it quick.
<cerulean> i like this approach instead of being under huge stress to deliver a working deploy the first time
<cerulean> longest my site's ever been down because of this: 10 minutes
libastral has joined #ruby
<cerulean> my app development has been super fast because i avoided stuff like agile/scrum, automated testing, capistrano (i use git-deploy)
* cerulean waits for the attack dogs
<cerulean> why is a design process where some arbitrary controllers control code production 100% of the time better? if the design changes a lot, there's a chance that it's not really a design at all, and just a purple pony with a cute name
bsartek has quit [Quit: Quitte]
<cerulean> agile is the headless horse model of development. a better approach is a mix of agile and waterfall
<foxxx0> hey, how do i properly construct and initialize large classes (i.e. quite many attributes), proper formattings, how to initialize, etc.?
bsartek has joined #ruby
<cerulean> attr_accessor with multi-line symbols arg list for the attributes
<foxxx0> i haven't even added all the attributes and rubocop is complaining already and it looks quite ugly
<cerulean> def initialize(option)
<cerulean> for initalizer
<elomatreb> If you're sure you really need many attributes during initialization, keyword arguments are nice
<cerulean> YourClass.new(options)
<cerulean> to initialize
<foxxx0> i think you can spot my problem quite easily :D
<cerulean> no. i can't
<cerulean> what is it
<foxxx0> Assignment Branch Condition size for initialize is too high. [19.24/15]
<foxxx0> Method has too many lines. [15/12]
<foxxx0> :S
hotpancakes has quit []
<elomatreb> The length one is probably best disabled here
<cerulean> oh this is rubocop
<foxxx0> should i just disable these cops for certain classes?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<elomatreb> You can disable them for just certain code regions with special comments, i.e. # rubocop:disable Some/Linter
<cerulean> idk what Assignment Branch Condition size is
<foxxx0> yes, so there is no special trick to magically make this code pretty? :D
<cerulean> oh too many assignments
<elomatreb> The ABC violation probably comes from all the destructuring
<cerulean> since you use a lot of variables and setters, not really
ryan_notabot has joined #ruby
<cerulean> do this
<elomatreb> I'd probably use keyword arguments and not a giant hash (also gets you validation) and just assign all the members one after another
<cerulean> options.each do |option| instance_variable_set(option.key, option.value) end
<foxxx0> so one assignment per line?
<cerulean> nah do what i said
<foxxx0> oh
<cerulean> rubycop wont see 19 assignments that way
<cerulean> and itll be 1 line
<foxxx0> YES
<cerulean> :D
<elomatreb> That is dangerously fragile, it won't catch typos and you can accidentally overwrite other instance variables
<foxxx0> that's exactly what i was looking for
workmad3 has joined #ruby
<foxxx0> mh
DARPA has joined #ruby
<cerulean> if you wanna avoid what elomatreb said, add a condition checking if the instance var exists
<cerulean> and is already set
<foxxx0> and just raise an exception in that case?
<cerulean> options.each do |option| instance_variable_set(option.key, option.value) unless instance_variable_get(option.key) && !instance_variable_get(option.key).nil? end
<cerulean> fixed
<elomatreb> Still doesn't handle typos, they will silently set a wrong ivar
<cerulean> options.each do |option| instance_variable_set(option.key, option.value) if instance_variable_get(option.key) && !instance_variable_get(option.key).nil? end
<cerulean> add the conditions properly yourself
<cerulean> i believe in your programming ability
<cerulean> it can be fixed and stil be better than what you sent
jamesaxl has quit [Read error: Connection reset by peer]
lxsameer has quit [Quit: WeeChat 1.5]
<cerulean> 1. check against a list of all accepted attributes 2. check to make sure you don't overwrite a variable on initialize
<elomatreb> The best thing would be to tackle the problem at its root and avoid having a class with that many attributes, if that is possible in any way
<cerulean> 1a. maybe check against the attr_readers symbol list if you can access it
jamesaxl has joined #ruby
binaryplease has joined #ruby
ericmathison has joined #ruby
<elomatreb> You could for example create a value class for all properties involved with :quota, and another (possible nested) one for all :quota_mail ones
Arpanet69 has quit [Ping timeout: 240 seconds]
Arpanet69 has joined #ruby
<cerulean> options.each do |option| instance_variable_set(option.key, option.value) if ALLOWED_ATTRIBUTES.include?(option.key) && instance_variable_get(option.key).nil? end
<cerulean> do that
mrconfused has quit [Ping timeout: 260 seconds]
<cerulean> set ALLOWED_ATTRIBUTES to the stuff you defined in your attr_reader methods
<foxxx0> that's what is was going to do now
<cerulean> only lets allowed attributes to be set
<foxxx0> still thinking about elomatreb's hint with nested subclasses
<cerulean> and only if the variable is nil
<cerulean> you'll be fine
<elomatreb> If you're creating a list of attributes like that you can also use destructuring to avoid having to duplicate it for the attr_*
<cerulean> yep
<havenwood> foxxx0: explicit keyword arguments are nice, and fewer of them
<havenwood> +1 extract quota
<cerulean> ALLOWED_ATTRIBUTES.each do |attr| attr_accessor attr end
<foxxx0> logically i could split the quota stuff into different quota groups
<elomatreb> Or just `attr_accessor *ALLOWED_ATTRIBUTES`
<cerulean> nice loincloth
<cerulean> elomatreb*
<elomatreb> ?
<havenwood> foxxx0: What's the minimum interface you need? Which group nicely?
<cerulean> nice code i meant
<cerulean> the splay
<cerulean> splat*
DARPA has quit [Ping timeout: 260 seconds]
<havenwood> foxxx0: One method could expose a Hash or Struct of related things.
<cerulean> if the attributes belong to that object... it wont make sense to make more classes. and they will take more memory
<cerulean> it's like an extra lookup
<cerulean> if you wanna save nanoseconds, dont do thois
DARPA has joined #ruby
<cerulean> +1 Hash/Struct
lxsameer has joined #ruby
<cerulean> i think Hash makes more sense than making this new object, but i could be wrong
<cerulean> doesn't Hash do the same thing as his class but with ANY parameters?
<elomatreb> Struct would do validation, as it just accepts the defined keys
Arpanet69 has quit [Ping timeout: 260 seconds]
<cerulean> oh i see
<havenwood> >> MailQuota = Struct.new :domains, :sources; quota = MailQuota.new([1, 2], [3, 4]); quota.domains
<ruby[bot]> havenwood: # => [1, 2] (https://eval.in/776897)
<havenwood> quota.x #!> undefined method `x' for #<struct MailQuota domains=[1, 2], sources=[3, 4]>
<cerulean> what is this trippy magic you just did with arrays and structs
<cerulean> a struct gave me an array output when i passed the arguments as arrays? wha?
<havenwood> cerulean: I just set the Struct value to be an Array.
<cerulean> nutty
<cerulean> nuttynice
<cerulean> ive never done that
adgtl- has left #ruby ["Textual IRC Client: www.textualapp.com"]
<cerulean> do all arrays have to be same size?
<elomatreb> Nope, Arrays have very little rules in Ruby
<cerulean> what happens if i do
<cerulean> >> MailQuota = Struct.new :domains, :sources; quota = MailQuota.new([1, 2], [3]); quota.domains
<ruby[bot]> cerulean: # => [1, 2] (https://eval.in/776898)
<cerulean> oh
<cerulean> its not magic
<cerulean> nvm
* cerulean goes to the eye doctor
lxsameer has quit [Quit: WeeChat 1.5]
<impermanence> Why does this use of File.truncate() throw a No such file or directory error? https://gist.github.com/jonassteinberg1/ddfc2a615392759b55d8d3efdbbe3667
<elomatreb> You're passing a String, not your variable
rakm has joined #ruby
<impermanence> elomatreb: that makes sense.
<havenwood> impermanence: Don't use File.open without a block. If you aren't sure that you need it, don't use it at all.
<foxxx0> alright
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<foxxx0> so, how about: https://paste.foxxx0.de/yolCe/
<foxxx0> apart from the typos
jdawgaz has joined #ruby
<foxxx0> and it's not tested/validated
tolerablyjake has joined #ruby
jdawgaz has quit [Client Quit]
<elomatreb> You're basically re-implementing what a Struct already does I think (https://ruby-doc.org/core-2.4.1/Struct.html)
jdawgaz has joined #ruby
tolerablyjake has quit [Client Quit]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
<foxxx0> oh well, now i understand what havenwood wanted to show
synthroid has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
<foxxx0> so, more like: https://paste.foxxx0.de/y1RbQ/
synthroi_ has quit [Ping timeout: 258 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
lxsameer has joined #ruby
Arpanet69 has joined #ruby
DARPA has quit [Ping timeout: 240 seconds]
<foxxx0> if i understand your hints correctly?!
<foxxx0> still not sure though :D
kies has quit [Ping timeout: 240 seconds]
kies has joined #ruby
mazeinmaze_ has quit [Ping timeout: 268 seconds]
elsevero has joined #ruby
elsevero has quit [Client Quit]
graft has quit [Ping timeout: 252 seconds]
Arpanet69 has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naprimer_2 has joined #ruby
jidar has quit [Quit: brb]
jidar has joined #ruby
adgtl- has joined #ruby
PatriqueEtoile has quit [Ping timeout: 245 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
bkxd has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
chihhsin has joined #ruby
<flips> Maybe one of you could point in a direction to help me figure out what kinda basic principle/mechanism I'm not getting when working with classes/objects/OO stuff(?): https://gist.github.com/flips/8782b613be168ad3500bc917e222ac58 :-)
<havenwood> foxxx0: It's boring, but easy to read, explicit and the strictness helps percolate errors to the top quickly.
xall has quit [Ping timeout: 252 seconds]
bdonnahue1 has joined #ruby
binaryplease has quit [Ping timeout: 260 seconds]
bdonnahue has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zapata has quit [Quit: WeeChat 1.7]
__Yiota has joined #ruby
Bock is now known as Sauvin
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest96_ has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
zapata has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
Guest96 has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
soppe has joined #ruby
soppe has quit [Client Quit]
Rr4sT has joined #ruby
bdonnahue1 has quit [Read error: Connection reset by peer]
bdonnahue has joined #ruby
<havenwood> flips: I commented on your gist: https://gist.github.com/flips/8782b613be168ad3500bc917e222ac58
dionysus69 has quit [Ping timeout: 260 seconds]
<flips> havenwood: Thank you! Had just started reading that ruby-doc page ... :)
domgetter has joined #ruby
yoones has joined #ruby
<yoones> Hi. is it ok to ask a question about a rails gem?
finisherr has joined #ruby
<havenwood> yoones: Yup, no prob. Though depending on the gem it might be better suited to the #RubyOnRails channel.
<yoones> ok I'll try on the rails channel, thanks
Arpanet69 has joined #ruby
hkdsun has joined #ruby
hkdsun has quit [Quit: hkdsun]
t-recx has quit [Ping timeout: 260 seconds]
hkdsun has joined #ruby
t-recx has joined #ruby
dionysus69 has joined #ruby
s2013 has joined #ruby
ElDoggo has joined #ruby
ElDoggo has quit [Remote host closed the connection]
ElDoggo has joined #ruby
s2013 has quit [Client Quit]
babykosh has joined #ruby
luluapple has quit [Remote host closed the connection]
kirun has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
synthroi_ has joined #ruby
fusta has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
yoones has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rutix has quit []
<foxxx0> havenwood: mh okay, but just to clarify: these quota attributes are asll integers, think of them as "limits" not the actual used/assigned objects
domgetter has quit [Ping timeout: 260 seconds]
bdonnahue has quit [Ping timeout: 260 seconds]
<cerulean> am i unethical if i sell my app to both girl-haters and feminists
<cerulean> im just tryin to make a livin, man
<cerulean> *plays cards with a "deck" of money*
sepp2k1 has quit [Read error: Connection reset by peer]
<cerulean> it works in firearm manufacturing so why not
<cerulean> guns are great because EVERYONE needs a gun because someone might have a GUN
<cerulean> that's how you an tell it's a good invention
<cerulean> you need one BECAUSE it exists
* cerulean goes to ruby-offtopic
Cohedrin has joined #ruby
<impermanence> If a file object contains text is the text stored on disk at essentially the same location as the file object?
SteenJobs has quit [Quit: SteenJobs]
mooser has joined #ruby
jamesaxl has quit [Ping timeout: 260 seconds]
jamesaxl has joined #ruby
<impermanence> That was asked poorly, lol.
s2013 has joined #ruby
klgilbert has joined #ruby
<hkdsun> A file object is a file handle at the end of the day, which means it has nothing to do with the content of your file no matter what the file content are
<hkdsun> However, maybe I didn't understand your question well impermanence
klgilbert has quit [Client Quit]
vuoto has quit [Remote host closed the connection]
klgilbert has joined #ruby
papillom has joined #ruby
<foxxx0> havenwood: and the plan was to use this class as the domain specific class, which will be populated by the database/ORM layer
noobineer has quit [Remote host closed the connection]
shinenelson has joined #ruby
hkdsun has quit [Quit: hkdsun]
hkdsun has joined #ruby
__Yiota has joined #ruby
be_______ has joined #ruby
be_______ has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
tolerablyjake has joined #ruby
tolerablyjake has quit [Client Quit]
Channel6 has joined #ruby
tolerablyjake has joined #ruby
dionysus69 has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
shinenelson has quit [Quit: WeeChat 1.8-dev]
enterprisey has joined #ruby
Guest96_ has quit [Remote host closed the connection]
Guest96 has joined #ruby
JoshS has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
esObe has quit [Remote host closed the connection]
synthroid has joined #ruby
synthroi_ has quit [Ping timeout: 260 seconds]
s2013 has joined #ruby
Cohedrin has joined #ruby
Arpanet69 has quit [Quit: Leaving]
enterprisey has quit [Ping timeout: 252 seconds]
enterprisey has joined #ruby
Channel6 has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claw has quit [Ping timeout: 260 seconds]
claw has joined #ruby
__Yiota has joined #ruby
elsevero has joined #ruby
hkdsun has quit [Quit: hkdsun]
ElDoggo has quit [Remote host closed the connection]
hkdsun has joined #ruby
ElDoggo has joined #ruby
__Yiota has quit [Client Quit]
ericmathison has quit [Quit: leaving]
Rr4sT has quit [Quit: Connection closed for inactivity]
ResidentBiscuit has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
hndk has joined #ruby
arfed has joined #ruby
VladGh has quit [Ping timeout: 240 seconds]
arfed has quit [Client Quit]
ElDoggo has quit [Ping timeout: 260 seconds]
Puskinas_ has quit [Quit: Leaving]
mooser has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
arfed has joined #ruby
mooser has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
arfed has quit [Client Quit]
vuoto has quit [Remote host closed the connection]
klgilbert has quit [Quit: klgilbert]
vuoto has joined #ruby
jakkn has quit [Ping timeout: 240 seconds]
Guest96 has quit [Remote host closed the connection]
VladGh has joined #ruby
Guest96 has joined #ruby
synthroid has quit []
pytuger has quit [Quit: "I will be back later. got to go."]
vuoto has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
ElDoggo has joined #ruby
babykosh has quit [Quit: babykosh]
mooser has quit [Ping timeout: 240 seconds]
ryan_notabot has quit [Remote host closed the connection]
ryan_notabot has joined #ruby
mooser has joined #ruby
esObe has joined #ruby
pilne has joined #ruby
A124 has quit [Quit: '']
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
esObe has quit [Ping timeout: 240 seconds]
houhoulis has joined #ruby
elsevero has quit [Ping timeout: 240 seconds]
elsevero has joined #ruby
Channel6 has joined #ruby
fusta has quit [Read error: Connection reset by peer]
linetrace has quit [Read error: Connection reset by peer]
linetrace has joined #ruby
patarr has joined #ruby
ericmathison has joined #ruby
LastWhisper____ has joined #ruby
enterprisey has joined #ruby
ericmathison has quit [Read error: Connection reset by peer]
ericmathison has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hutch34_ has joined #ruby
hutch34_ has quit [Ping timeout: 258 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sneakerhax has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
bsartek has quit [Quit: Quitte]
bsartek has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
papillom has quit [Ping timeout: 260 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
bdonnahue has joined #ruby
esObe has joined #ruby
mrconfused has joined #ruby
ddrmanxbxfr has quit [Remote host closed the connection]
tolerablyjake has quit [Quit: Textual IRC Client: www.textualapp.com]
esObe has quit [Ping timeout: 240 seconds]
herbmillerjr has joined #ruby
<impermanence> hkdsun: that answered my question.
coatezy has quit [Ping timeout: 264 seconds]
<impermanence> hkdsun: sorry for the late response. was hacking with volume off.
<hkdsun> impermanence: glad to hear. good luck
workmad3 has joined #ruby
mrconfused has quit [Ping timeout: 258 seconds]
djbkd has quit [Remote host closed the connection]
coatezy has joined #ruby
herbmillerjr has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
SteenJobs has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
herbmillerjr has joined #ruby
hkdsun has quit [Quit: hkdsun]
LastWhisper____ has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.7]
mrconfused has joined #ruby
finisherr has quit [Ping timeout: 260 seconds]
lacour has quit [Quit: Leaving]
Counterfeit has joined #ruby
Derperperd has quit [Ping timeout: 260 seconds]
Counterfeit has left #ruby [#ruby]
Blacink has joined #ruby
Blacink has quit [Client Quit]
mooser has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
Xiti has joined #ruby
mrconfused has quit [Ping timeout: 260 seconds]
mrconfused has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
finisherr has joined #ruby
finisherr has quit [Client Quit]
skweek has quit [Ping timeout: 240 seconds]
<cerulean> GRiMES - REALiTi is my favorite song of all time
<mzo> cerulean: lol
<al2o3-cr> hey, me too
volty has joined #ruby
<mzo> cerulean: i feel bad for you if that's true
<mzo> it's a nice song but favorite of all time? you are missing out on some amazing music
<al2o3-cr> mzo: name some of yours :)
<mzo> al2o3-cr: i would have to say my favorite of all time is https://www.youtube.com/watch?v=z0GKGpObgPY
<al2o3-cr> i'll start you off; l.a women - the doors
<al2o3-cr> mzo: not bad
<al2o3-cr> i wouldn't say amazing music :p
<al2o3-cr> but that is my opinion of course
cfec0b8d has quit [Ping timeout: 252 seconds]
mrconfused has quit [Ping timeout: 258 seconds]
<al2o3-cr> kashmir - led zeppelin
<al2o3-cr> i like all sorts of music
<al2o3-cr> and anything by r.e.m
ElDoggo has quit [Remote host closed the connection]
<mzo> al2o3-cr: i was joking
mooser has joined #ruby
ElDoggo has joined #ruby
<mzo> that song was released like a week ago
<mzo> of course it can't be my favorite of all time
<al2o3-cr> idk
patarr has quit [Ping timeout: 260 seconds]
<al2o3-cr> and that's a warm up
<al2o3-cr> nailed it!
ElDoggo has quit [Ping timeout: 240 seconds]
<ytti> not judging here, but bit odd that people say favorite of all time is from 2015 or even 2017
enterprisey has joined #ruby
<ytti> i guess it nice to keep it fresh
<mzo> ytti: exactly
patarr has joined #ruby
<mzo> do you really think it's just a coincidence that there are decades and decades of good music out there, and your favorite of all time is from 2015?
<mzo> probably it's not really that great and you'll forget about it before long
<al2o3-cr> mzo: i actually think it's not that bad
esObe has joined #ruby
<volty> are you developing an AI Guess What Music I Like ?
<volty> (application)
<al2o3-cr> but my favorite of all time is... wanted man
mrconfused has joined #ruby
<ytti> mzo, should i presume you were sarcastic about your youtube link then?
<ytti> i'm not honestly sure
<al2o3-cr> ytti: i'd say yes
esObe has quit [Ping timeout: 240 seconds]
<al2o3-cr> but who knows?
<ytti> there was behavioural science test of online music service
<ytti> but instead of putting people in same world in terms of like/dislike/download, people were divided into separate worlds
<ytti> outcome was, that entirely different set of songs were best songs
<al2o3-cr> best cover song then?
<ytti> i.e. there is very little objetivity in music, mostly we like what we like, because we like the people who like that music
<volty> like, dislike, download and the implied "not interested".
kirun has quit [Quit: Konversation terminated!]
<ytti> the music itself could be pretty much anything, and we'd still like it
<ytti> as long as correct set of people like it
<al2o3-cr> this: all along the watchtower
ben__ has joined #ruby
<al2o3-cr> ytti: is this a set of deaf people?
<ytti> al2o3-cr, no
ben__ has quit [Remote host closed the connection]
<al2o3-cr> just checking ;)
<ytti> you can read about in duncan watt's drunkards walk or daniel kahneman's thinking, fast and slow
<al2o3-cr> i like what i like because i like it
patarr has quit [Ping timeout: 240 seconds]
<ytti> no
ben__ has joined #ruby
<ytti> almost every decision we make is extremely flinsy and could have gone either way
<al2o3-cr> i disagree
<ytti> judgeds give pardon's if they're asked to flip coin with red and green sides
<ytti> and ignore the result
<ytti> they pardon more people after flipping green side
<cerulean> *sees Harry Styles*
<cerulean> *closes tab*
<al2o3-cr> then they're biased
<ytti> quite, but everyone is
<al2o3-cr> same with food, you either like it or not
<ytti> and it doesn't even help when systematic bias we suffer from is explained to us, we still make the mistake
lxsameer has quit [Quit: WeeChat 1.5]
<ytti> sure, but what we like and what you don't, are decided by factors we are unaware about
<ytti> and the decision itself is fragile and could have gone either way with small changes to environemnt, which we had not even noticed
ben__ has quit [Ping timeout: 258 seconds]
<al2o3-cr> same with music (in my opinion)
<ytti> absolutely, wine, beer, anthing subjective
<al2o3-cr> everything in life is subject to scrutinity
<volty> we are still biased - since bias isn't a mistake but a condition of essence
<ytti> after we've made decision, by arguments we don't know, we develope narrative to justify the decision
SteenJobs has quit [Quit: peaceee]
<ytti> and then we believe that was the reason we chose it
<al2o3-cr> anyway, happy days!
<volty> we pretend to believe - too often people are not ready to argue about their narrative
<al2o3-cr> volty: i don't believe in sweet fa
<al2o3-cr> volty: dta
<volty> dta? I can't get it. Not used with the jargon (or it's just to late for me)
<al2o3-cr> don't trust anyone
GodFather has quit [Ping timeout: 252 seconds]
<volty> ah, of course :) :)
<volty> never trusted. Neither myself.
hkdsun has joined #ruby
hutch34_ has joined #ruby
<al2o3-cr> the only thing i know for certain is death && diane sauce with ribeye
<volty> have a nice music & philosophy. going to bed and dream about eternity
volty has left #ruby ["Konversation terminated!"]
hkdsun has quit [Client Quit]
<al2o3-cr> oh, and ruby is awesome. tia
elsevero has quit [Quit: elsevero]
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
binaryplease has joined #ruby
houhoulis has joined #ruby
jdawgaz has joined #ruby
mooser has quit [Remote host closed the connection]
nchambers has left #ruby [#ruby]
hkdsun has joined #ruby
skweek has joined #ruby
t-recx has quit [Quit: t-recx]
armyriad has quit [Ping timeout: 252 seconds]
hutch34_ has quit [Ping timeout: 268 seconds]