jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
godzillaenlacasa has joined #ruby
jkahn has quit [Ping timeout: 260 seconds]
sp4rrow has joined #ruby
pawnbox has joined #ruby
stannard_ has quit [Read error: Connection reset by peer]
mleung has quit [Quit: mleung]
pawnbox has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
[gmi] has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
[gmi] has quit [Quit: Leaving]
ensyde__ has joined #ruby
dling has joined #ruby
jkahn has joined #ruby
ensyde__ is now known as ensyde
linoj has joined #ruby
ensyde_ has quit [Ping timeout: 268 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
binaryplease1 has joined #ruby
Abrin_AWAY2 has joined #ruby
sdwrage has quit [Quit: Leaving]
dopamean_ has quit [Ping timeout: 244 seconds]
binaryplease has quit [Ping timeout: 264 seconds]
binaryplease1 has quit [Client Quit]
godzillaenlacasa has quit [Quit: ZZZZZ....]
binaryplease has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
trosborn has quit [Quit: trosborn]
hxegon is now known as hxegon_AFK
Abrin_AWAY has quit [Ping timeout: 276 seconds]
tummy has joined #ruby
trosborn has joined #ruby
trosborn has quit [Client Quit]
d0nn1e has quit [Ping timeout: 252 seconds]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sneakerhax has joined #ruby
vikas027 has joined #ruby
hahuang65 has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
hxegon_AFK is now known as hxegon
ben_vulpes has joined #ruby
nerium has quit [Quit: nerium]
CloCkWeRX has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ruby
tummy has quit [Ping timeout: 248 seconds]
Don_John has joined #ruby
<ben_vulpes> i have a the dumb question: would like to run a gem with a specific, non-system version of ruby on a server. would really like to not use rbenv or the like, because this is going to get called via shelling out from another language entirely. is there a decent way to get a ruby (say 2.3.0) on a system and then `/opt/the-ruby-i-want gem *args`?
last_staff has quit [Quit: *poof*]
<havenwood> ben_vulpes: +1 ruby-install
robbyoconnor has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Don_John_ has joined #ruby
ruby-lang188 has joined #ruby
<ruby-lang188> Does anyone know how to install reuters models for the treat gem?
skweek has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
skweek has quit [Remote host closed the connection]
zeroDivisible has quit [Quit: WeeChat 1.3]
Gasher has quit [Quit: Leaving]
Don_John_ has quit [Max SendQ exceeded]
diegoviola has quit [Ping timeout: 260 seconds]
marchelzo has joined #ruby
Don_John has quit [Ping timeout: 240 seconds]
<havenwood> ruby-lang188: see if this comment or followup are relevant: https://github.com/louismullie/treat/issues/7#issuecomment-5639192
<marchelzo> hi could someone write a program in ruby that reads from stdin line by line, splits the line on whitespace, filters to keep only words matching /\w+/, and increments the value in a hashmap with that word as the key. then at the end, print the top 10 words in the format '<word>: count'
<Ox0dea> marchelzo: You could! :)
<Ox0dea> Sounds like you've got all the ingredients.
<marchelzo> Ox0dea: I don't know ruby very well
<Ox0dea> marchelzo: But it seems you know it enough.
<marchelzo> I want to make sure it's written in an idiomatic style, because I'd like to compare its performance against implementations in a couple of other languages.
<ben_vulpes> neat Ox0dea
<ruby-lang188> Thanks for responding havenwood. That website is currently down. Would you happen to know anywhere else I could get those files?
<marchelzo> I will write one, and could you tell me if it looks good?
<ruby-lang188> Also there isn't an archive on account of the robots.txt for that site so thats a no go
<Ox0dea> marchelzo: Sounds good.
d0nn1e has quit [Ping timeout: 248 seconds]
fullofca_ has joined #ruby
<Ox0dea> marchelzo: If you're familiar with Python's defaultdict, we just pass a value to Hash.new to get (roughly) the same semantics in Ruby.
<marchelzo> I used defaultdict(int) for the python implementation :)
<Ox0dea> marchelzo: That'll be `Hash.new(0)` in the Ruby one. :)
<havenwood> marchelzo: Check in here with Gists if you run into problems!
d0nn1e has joined #ruby
fullofcaffeine has quit [Ping timeout: 240 seconds]
<havenwood> Or questions or whatever else.
bronson has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<havenwood> ruby-lang188: Nope, sorry I don't.
Didac has quit [Ping timeout: 240 seconds]
<ruby-lang188> Ah, thanks anyway
swills has joined #ruby
tenderlove has quit [Quit: Leaving...]
CloCkWeRX has joined #ruby
sapslaj has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
tenderlove has joined #ruby
stannard has quit [Remote host closed the connection]
Moosashi has quit [Quit: Moosashi]
bezhermoso has quit [Quit: Zzzzz...]
fullofca_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
<marchelzo> How does this look? http://sprunge.us/giBF?ruby
Moosashi has joined #ruby
stannard has joined #ruby
pawnbox has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<drbrain> marchelzo: looks good
cdg has quit [Remote host closed the connection]
<marchelzo> is there anything I could do to significantly increase performance?
cdg has joined #ruby
<ben_vulpes> Ox0dea: how does one then execute a gem with a specific version of ruby? $HOME/.rubies/.../ruby $(which my-gem) doesn't work as expected.
gbgdev_ has joined #ruby
ruby-lang188 has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby
<drbrain> ben_vulpes: if the gem is installed in a version-specific ruby directory you'll need to set GEM_HOME too
<marchelzo> I changed the sort_by to sort_by! and it takes slightly longer. That is odd, isn't it?
crowell has quit [Ping timeout: 244 seconds]
sapslaj has quit [Read error: Connection reset by peer]
<ben_vulpes> drbrain: nah it's in /usr/local/bin
<Ox0dea> marchelzo: You might not be benchmarking properly.
<drbrain> ben_vulpes: the executable is, but the library stuff
Spami has quit [Quit: This computer has gone to sleep]
gbgdev has quit [Ping timeout: 264 seconds]
<ben_vulpes> li...brary stuff?
<drbrain> marchelzo: you can get another speed boost by using String#scan
<marchelzo> drbrain: ah, good idea
stannard has quit [Ping timeout: 248 seconds]
<drbrain> ben_vulpes: the executable is a stub that points into the gem install directory
<drbrain> where the, err, "library stuff" exists
Xeago has joined #ruby
<marchelzo> wow, that's a _huge_ speed up
<drbrain> yeah, you don't create nearly as many objects that way
pawnbox has quit [Ping timeout: 248 seconds]
graffix has quit [Ping timeout: 276 seconds]
binaryplease has quit [Ping timeout: 240 seconds]
<ben_vulpes> drbrain: so GEM_HOME needs to be ~/.rubies/2.3.0/<whatnow?>
cdg has quit [Ping timeout: 244 seconds]
jkahn has quit [Ping timeout: 260 seconds]
<drbrain> ben_vulpes: `gem env home` with the ruby you used to install the gem will spit out the right value
<drbrain> marchelzo: you might get another speed boost by replacing L10 with ws = d.sort_by { |w,| -d[w] }
<ben_vulpes> i should probably rip that gem out and reinstall it with the correct version of ruby though, right?
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> How do I get BigDecimal to show me the "full" version of it?
<Radar> >> 12971293712871239871239871239817239.to_d
<ruby[bot]> Radar: # => undefined method `to_d' for 12971293712871239871239871239817239:Bignum ...check link for more (https://eval.in/537218)
Ebok has quit [Quit: Leaving]
<Radar> >> require 'bigdecimal/util'; 12971293712871239871239871239817239.to_d
<ruby[bot]> Radar: # => undefined method `BigDecimal' for 12971293712871239871239871239817239:Bignum (NoMethodError) ...check link for more (https://eval.in/537219)
<marchelzo> drbrain: what does that do?
<ben_vulpes> drbrain: ^^
<Radar> ruby[bot]: I thought you loved me :(
<havenwood> >> require 'bigdecimal'; require 'bigdecimal/util'; 12971293712871239871239871239817239.to_d
<ruby[bot]> havenwood: # => #<BigDecimal:40597a78,'0.1297129371 2871239871 2398712398 17239E35',36(45)> (https://eval.in/537220)
<drbrain> ben_vulpes: it would make your life easier
ramortegui has joined #ruby
<ben_vulpes> sure great next step telling gem to use the new ruby
<drbrain> marchelzo: d.keys.sort_by makes a new Array with all the keys in it then sorts that
<drbrain> d.sort_by avoids that
Didac has joined #ruby
<marchelzo> drbrain: I see, and the comma just means "ignore the value" in the block?
<drbrain> I think it returns an array of arrays, so line 12 would change too, to: do |word, count|
<drbrain> marchelzo: correct
crowell has joined #ruby
[gmi] has joined #ruby
<havenwood> Radar: What would the full output be? Like a String representation that included all the decimal digits?
<Radar> havenwood: yes
<Ox0dea> marchelzo: My take: https://eval.in/537222
<Ox0dea> Radar: Isn't that what `to_s('F')` is for?
gmi_ has joined #ruby
<Radar> Ox0dea: I love you (in a purely platonic way)
<Ox0dea> <3
graffix has joined #ruby
beergineer has quit [Quit: Page closed]
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aaeron has joined #ruby
sp4rrow_ has joined #ruby
sp4rrow has quit [Read error: Connection reset by peer]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<marchelzo> Ox0dea: very nice
jenrzzz has quit [Ping timeout: 248 seconds]
<Ox0dea> Danke.
gmi_ has quit [Client Quit]
Us54er has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Moosashi has quit [Quit: Moosashi]
Xeago has quit [Read error: Connection reset by peer]
aaeron has quit [Client Quit]
aaeron has joined #ruby
rkazak has joined #ruby
Xeago has joined #ruby
`tim` has joined #ruby
decoponio has quit [Quit: Leaving...]
chouhoulis has joined #ruby
<Ox0dea> Performance-wise, there's nothing to be done for it that wouldn't violate Knuth's premature optimization rule.
<marchelzo> scan vs splt then filter is huge
<marchelzo> split*
jkahn has joined #ruby
<Ox0dea> If your input was massive, it might be worth maintaining some kind of sliding window into the ten most frequent words.
Mon_Ouie has joined #ruby
<marchelzo> I just changed my other implementation to use that, and it cut the time in half.
<Ox0dea> How are you benchmarking?
Vingador has joined #ruby
frustrum has joined #ruby
<marchelzo> just using a large input and doing a bunch of runs with time(1)
poerror has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
sp4rrow_ has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
<marchelzo> it's not perfect, but with a large enough input you can easily learn things
sp4rrow has joined #ruby
Xeago has quit [Ping timeout: 248 seconds]
solocshaw has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
Guest96677 has quit [Changing host]
Guest96677 has joined #ruby
uglybandersnatch has quit [Ping timeout: 268 seconds]
Guest96677 is now known as duracrisis
Us54er has quit [Quit: Leaving]
uglybandersnatch has joined #ruby
aaeron has left #ruby [#ruby]
frustrum has quit [Ping timeout: 240 seconds]
bjpenn has quit [Ping timeout: 250 seconds]
TechToniK has joined #ruby
<TechToniK> hello
pawnbox has quit [Ping timeout: 244 seconds]
johnmilton has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
Burnzoire has joined #ruby
sp4rrow has quit [Read error: Connection reset by peer]
<Burnzoire> #rails doesn't exist anymore?
tenderlove has quit [Remote host closed the connection]
sp4rrow has joined #ruby
A124 has quit [Quit: '']
<havenwood> Burnzoire: #rubyonrails
<havenwood> TechToniK: hi
<Burnzoire> thanks o7
<TechToniK> has anyone experienced any issues with openssl since the latest update?
<TechToniK> hi havenwood
<havenwood> TechToniK: Use the latest version of Ruby for your MAJOR.MINOR.
<havenwood> TechToniK: 2.1.8, 2.2.4 or 2.3.0
poerror has joined #ruby
A124 has joined #ruby
mistermocha has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 264 seconds]
<TechToniK> i'm trying to use 2.2.4 because the gems i'm using don't work in 2.3
<havenwood> TechToniK: What error are you running into?
solocshaw has quit [Quit: solocshaw]
neanderslob has joined #ruby
jkahn has quit [Ping timeout: 250 seconds]
<TechToniK> sorry the long post.. /opt/ruby2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': /opt/ruby2.2/lib/ruby/2.2.0/x86_64-linux/openssl.so: undefined symbol: SSLv2_method - /opt/ruby2.2/lib/ruby/2.2.0/x86_64-linux/openssl.so (LoadError)
ramortegui has quit [Quit: Ex-Chat]
<Ox0dea> TechToniK: Distro?
ReK2 has quit [Remote host closed the connection]
Burnzoire has left #ruby [#ruby]
sp4rrow_ has joined #ruby
tenderlove has joined #ruby
<havenwood> Radar: Or #to_digits
EdwardIII has quit [Ping timeout: 276 seconds]
sp4rrow_ has quit [Client Quit]
<Ox0dea> havenwood: On BigDecimal?
<TechToniK> netrunner rolling
<Radar> havenwood: neato
<TechToniK> based off of majaro
sp4rrow has quit [Ping timeout: 248 seconds]
<TechToniK> manjaro sorry
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
<Ox0dea> So, yeah, your OpenSSL is "too new".
phredus has joined #ruby
<TechToniK> i should be able to "roll back" yes?
<Ox0dea> Do you want to?
<havenwood> Ox0dea: yeah, i ran my "Ferret" code finding code and it came up with: [[:to_digits], [:to_s, "F"], [:to_s, "f"]]
fullofcaffeine has quit [Remote host closed the connection]
<TechToniK> Ox0dea: if i can run my code then yea ... :)
<phredus> Hello, I've unistalled rails, bundler Trying to start fresh. I ran gem update I get
EdwardIII has joined #ruby
<Ox0dea> havenwood: Ah, right, it's from '/util'.
<havenwood> Ox0dea: :)
<Ox0dea> TechToniK: Well, better would be to use a Ruby compiled against your new OpenSSL.
<Ox0dea> Maybe raise an issue with the Netrunner folks and ask for a rebuild?
<phredus> Hello, I've unistalled rails, bundler Trying to start fresh. I ran gem update I get "ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String"
<TechToniK> Ox0dea: a Ruby compiled OpeenSSL ?
Us54er has joined #ruby
<Ox0dea> TechToniK: That function was recently removed from the OpenSSL package shipped by Arch and friends. All of the relevant packages should've received an upgrade.
solocshaw has joined #ruby
tjbiddle has joined #ruby
mnrmnaugh has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
<TechToniK> Ox0dea: yes there was just an upgrade, how can i use a Ruby Compiled OpenSSL?
mnrmnaugh has joined #ruby
moeabdol has joined #ruby
linoj has quit [Quit: linoj]
marr has quit [Ping timeout: 250 seconds]
dopie has joined #ruby
Uo9er_ has joined #ruby
<darix> TechToniK: just reinstall ruby
<TechToniK> darix: that will recompile OpenSLL ?
fullofcaffeine has quit [Ping timeout: 244 seconds]
<darix> you need to recompile the openssl extension for ruby
<darix> not openssl itself
<TechToniK> hmm ok
maletor has joined #ruby
<havenwood> TechToniK: When Ruby builds it statically or dynamically links against libraries.
Us54er has quit [Ping timeout: 260 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
<darix> havenwood: statically linked he wouldnt have that problem.
fullofcaffeine has joined #ruby
jkahn has joined #ruby
<havenwood> darix: aye
<darix> anyway... lots of discussion about something with a very simple solution
graffix has quit [Ping timeout: 276 seconds]
<Ox0dea> Recompilation does seem very simple from behind the veil of knowledge.
sneakerhax has quit [Quit: back later]
<havenwood> Simply recite the exact incantation required!
<Ox0dea> Twice, maybe.
<havenwood> -j8
<Ox0dea> *-j0
Tref has joined #ruby
<havenwood> *-j
<Ox0dea> We have a winner.
DmitryBochkarev has joined #ruby
jenrzzz has joined #ruby
dopie has quit [Quit: Lost terminal]
<TechToniK> heheh
<phredus> Hello is anyone here?
<havenwood> phredus: they are!
graffix has joined #ruby
<Tref> Hey guys, I have been tasked with writing a Ruby program that: (1) Assembles a collection of student records by parsing data from 3 different files (delimeted by the following delimeters: "," "|" and "$". And (2) Displays the collection 3 times, sorted 3 different ways. From an OOP organizational perspective what's the best way to do this? I was thinking a "Student" class that either extends or includes an "Importer" module.
<phredus> havenwood: Hello there, new at this dont know much correct etiquette on asking questions.
<Tref> But I generally have a hard time figuring out whether or not my module should be extended or included in my including class.
<havenwood> phredus: ask away
<Ox0dea> tref: `include` is for instance methods.
<Ox0dea> They start with the same two letters, so it's easy to remember. :)
<phredus> I've unistalled rails and bundler, I'm trying to start fresh. I ran gem update I get "ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String"
<havenwood> phredus: the etiquette is to say if you crosspost in multiple channels, Gist more than three lines, and try to show the code and errors :)
<Tref> Ox0dea: well that makes it easy to remember
<havenwood> phredus: What version of Ruby and Rails?
<Tref> Ox0dea: but from a higher level does this seem like the right way to go?
<havenwood> phredus: Oh, starting fresh? You're getting that from?: gem update
<Ox0dea> tref: You should certainly have a Student class, but Importer is a little suspect.
<Tref> Or should I have a separate StudentImporter class that simply requires the Student model and performs these operations?
BSaboia has quit [Ping timeout: 240 seconds]
<Ox0dea> tref: Well, what you really have is a Parser, wouldn't you say?
<Tref> Ox0dea: yeah so im importing three files, parsing and sorting them
<havenwood> phredus: show us?: gem update --backtrace
<phredus> havenwood: Thank I will follow the rules. ruby 2.1.7p400, No rails yet, starting fresh but want latest rails. I ran "gem update" to make sure all is well with ruby before installing rails.
<Tref> Ox0dea: here are the requirements https://gist.github.com/Tref/7c2b8c1ac9d424fb1170
<Ox0dea> tref: Is it three files per student, or each student appears in all three files?
<phredus> havenwood: I have been tinkering with ruby, rails, and bundler las couple of days, now uninstalled rails and bundler and want to make sure ruby is not broken before I proceed
<Tref> Ox0dea: we can skip the testing portion for now
<havenwood> phredus: what do you get for?: gem update --backtrace
<phredus> havenwood: doing it now thanks
chouhoulis has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 244 seconds]
<Ox0dea> tref: Are you meant to avoid using the CSV library in your solution?
chouhoulis has joined #ruby
<Tref> Ox0dea: no, since CSV is part of the std lib
<Tref> Ox0dea: and I can just specify :col_sep for the delimeter
<phredus> havenwood: http://wklej.org/id/2116401 I've remoded and installed a few gems in an effort to get past the errors, How do restore the originals, I want to go back to default?
<Tref> Ox0dea: i’m less concerned about the implementation of the parser than I am about the overall design
<phredus> havenwood: *removed
mallu has joined #ruby
<havenwood> phredus: Rails 5 requires Ruby 2.2.2+.
<Tref> Ox0dea: but if you see in the description each of the data sources has a different column order
<phredus> havenwood: I want to stay with 2.1
<havenwood> phredus: Then no Rails 5 for you!
<Ox0dea> tref: Ah, I was going to say that Importer might be overkill, but the disparity in column order changes that somewhat.
johnmilton has quit [Ping timeout: 276 seconds]
<havenwood> phredus: (It's just a hard dep.)
<Tref> Ox0dea: Right, for good measure I want to separate the Importer/Parser from the Student model
<phredus> havenwood: yes, I just want to go back to fresh starting point before I install rails and its ok I will stay with 2.1 for a while. hard dep?
<Tref> Ox0dea: I’m just unsure what it should be, Class or Module (included or extended)
babblebre has quit [Quit: Connection closed for inactivity]
<Ox0dea> tref: Student doesn't need to know anything about Importer.
<havenwood> phredus: An option is to: gem uninstall --all
<Tref> Ox0dea: but importer needs to know about student
<phredus> havenwood: is there a simple way to refresh ruby and especially the gems it comes with default gems?
<Ox0dea> tref: It needs to know how to initialize one, sure.
<havenwood> phredus: If by "refresh" you mean "nuke from orbit" then: gem uninstall --all
duckpuppy has quit [Ping timeout: 268 seconds]
<phredus> havenwood: ok just saw that gem uninstall --all, ok. Then how do I put the default ones back?
<Ox0dea> tref: OpenStruct is also in the standard library. :)
<havenwood> phredus: Another option that wouldn't work in this case is: gem pristine --all
<havenwood> phredus: The default ones won't go away.
<Tref> that looks like a good starting point
stannard has joined #ruby
<Tref> Ox0dea: but its from 2012
<phredus> havenwood: I gem pristine --all, all night and installed and removed gems over 20 by hand then I gave up and unistalled rails and bundler.
<havenwood> phredus: If you want to restore the gems to factory default you'll want to: gem uninstall --all
mwlang has quit [Quit: mwlang]
<phredus> havenwood: ok doing that now, thanks
mdih has joined #ruby
<Ox0dea> tref: Yeah, seems good. I was going to advise against actually using OpenStruct and have Students be initializable from Hashes, which is what they're advocating for here with CSVParser#rows.
<Tref> Ox0dea: So they’re not using modules here at all
<Ox0dea> tref: Well, other than ActiveModel.
ruby-lang428 has joined #ruby
<Tref> Ox0dea: What are they using ActiveModel::Conversion for?
stannard has quit [Ping timeout: 240 seconds]
ramortegui has joined #ruby
<Tref> Ox0dea: Since I wont have access to rails modules I wont have that available to me
pawnbox has joined #ruby
<Ox0dea> tref: They're not. I guess that just kinda slipped in.
lessless has joined #ruby
<Tref> Ox0dea: thaaaaaats what she said….
<Tref> Ox0dea: sorry, couldnt help it
<Tref> yeah I wasnt seeing it being used but it seems like you’re ahead of me on understanding how this whole thing works
c355e3b has quit [Quit: Connection closed for inactivity]
<Tref> Ox0dea: I see them using `if valid?`
arescorpio has joined #ruby
<Tref> Ox0dea: but what’s this import_factory
<Ox0dea> tref: That's from ActiveModel::Validations, though.
<Tref> Ox0dea: yeah that’s what i meant
<Tref> I don’t necessarily need that and I can write my own validator for that
ramortegui_ has joined #ruby
<Tref> Ox0dea: I see where they’re defining import_factory
<Tref> overlooked that
<Ox0dea> Importer is written to only import valid "types", and it's using the passed "type" to resolve to an actual Class.
mdih has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
<Ox0dea> Using disparate "types" to refer to your different input formats would be overkill.
mnrmnaugh has quit [Quit: Leaving]
<Tref> Ox0dea: but since i’m only working with one type `Student` that seems to be superfluous
<Tref> right
ramortegui has quit [Ping timeout: 260 seconds]
<phredus> havenwood: http://wklej.org/id/2116460 ok "gem uninstall --all" ran w/o issues. I expected more default gems only 3, and I think I installed these 3 manually.
fexilal has quit [Ping timeout: 248 seconds]
<Tref> Ox0dea: and since there’s no requirement to parse any of the files separately im wondering if I need the CSVParser class
mnrmnaugh has joined #ruby
<Tref> Ox0dea: and where / how to include the implementation of the different row orders
<Ox0dea> tref: The row orders don't actually matter if you have your importer return an Array of Hashes, and you should definitely do that.
<Tref> Ox0dea: Sorry I dont mean row orders
<Tref> Ox0dea: I mean column orders
freerobby has joined #ruby
tjbiddle has quit [Ping timeout: 264 seconds]
<Ox0dea> tref: And that's how I interpreted your question. :)
wilbert has joined #ruby
<Ox0dea> Keying into a Hash is order-independent.
mdih has joined #ruby
<Tref> Ox0dea: Im unclear on how Im supposed to assign the proper keys to the proper attributes then if theyre coming in different orders
mdih has quit [Max SendQ exceeded]
<Tref> Ox0dea: right but the files have no headers
<Tref> And therefore no column names
mdih has joined #ruby
<Ox0dea> tref: Oh, right. That is something you'll need an abstraction for, then.
Guest97782 has quit [Changing host]
Guest97782 has joined #ruby
Guest97782 is now known as paultreny
tjbiddle has joined #ruby
<Tref> Ox0dea: I’ve done this in the past using something like this https://gist.github.com/Tref/763f6d8bd1a77201ef4e but it seems hideous
<Tref> Ox0dea: Take it easy on me, I’m still fairly new ;)
<Tref> Ox0dea: :) not ;)
<Ox0dea> tref: That is a little unpleasant, but it's the damned input's fault for not having headers. :P
ruby-lang428 has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
ensyde has quit [Read error: Connection reset by peer]
DrCode has joined #ruby
<Tref> Ox0dea: well that’s part of the exercise
<Tref> It was done that way intentionally
<Tref> Its for a class
ensyde has joined #ruby
<Tref> Ox0dea: Do you see a cleaner way to do it?
<Ox0dea> I've gathered as much, but the deliberate lack of headers borders on the sadistic.
ensyde has quit [Read error: Connection reset by peer]
linoj has joined #ruby
ensyde has joined #ruby
AnoHito_ has joined #ruby
[afk]chocoelho is now known as chocoelho
tjbiddle has quit [Client Quit]
mdih has quit [Ping timeout: 260 seconds]
<TechToniK> thanks all .. worked like a charm!!
<Ox0dea> tref: OpenStruct would let you initialize students with arbitrary data, but your keys have to come from somewhere.
huddy has quit [Ping timeout: 264 seconds]
<TechToniK> Ox0dea: +1
<TechToniK> darix: +
<TechToniK> 1
<TechToniK> :)
<TechToniK> i'm off have a good night all!!
<Ox0dea> TechToniK: Glad you got it sorted. :)
TechToniK has quit [Quit: night time :)]
ade has joined #ruby
mleung has joined #ruby
huddy has joined #ruby
ade has quit [Client Quit]
blackmesa has quit [Ping timeout: 268 seconds]
AnoHito has quit [Ping timeout: 264 seconds]
<i8igmac> i feelstupid, while true <--- fails
Abrin_AWAY has joined #ruby
johnmilton has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
BrianJ has joined #ruby
Sucks has joined #ruby
<BrianJ> I'm trying to make a rest API call to a teamcity server and I'm getting #<Net::HTTPBadRequest:0x007fcd595c0138> Can anyone take a quick look at my code and let me know if I'm doing something obviously wrong? https://gist.github.com/BrianJakovich/afcb65cc636836d6a76a
Abrin_AWAY2 has quit [Ping timeout: 264 seconds]
<Tref> Ox0dea: Alright then I think that might be enough for me to get started on this
mleung has quit [Quit: mleung]
<Ox0dea> tref: Importer#initialize(columns, delimiter) + Importer#load(filename) -> [Hash] -> [Student]
ensyde has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
Chagel has joined #ruby
mistermocha has quit [Remote host closed the connection]
c_nick has joined #ruby
<c_nick> how can we represent a number based on the significant bits Eg:- 456897.12358 i want to represent this in only 3 significant difits
ensyde has joined #ruby
<Ox0dea> tref: Throw OpenStruct and Forwardable in there if you're feeling fancy. :)
mistermocha has joined #ruby
<Tref> Ox0dea: not familiar with Forwardable but I can look it up
Nawn has quit [Quit: Leaving]
<Tref> Ox0dea: and not familiar with OpenStruct if that’s different than Struct
<Tref> but I’ll look both of them up
<Ox0dea> c_nick: Rounding okay?
chocoelho is now known as [afk]chocoelho
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Ox0dea> tref: OpenStruct lets you not specify the attributes explicitly, but all conveniences their price.
<Tref> Ox0dea: you lost me on the last part
Uber|Dragon has joined #ruby
<c_nick> Ox0dea, the number has 11 significant bits i need to make this 3 .. if i round it off it wll still be 456897.0 6 bits
mdih has joined #ruby
<Ox0dea> c_nick: You're not using the word "bits" correctly, and it's confusing things.
ropeney has joined #ruby
pawnbox has joined #ruby
<Ox0dea> You want to go from 456897.12358 to...?
<Ox0dea> tref: Well, OpenStruct lets you do things "willy-nilly", which makes errors harder to catch if you're not careful.
<c_nick> Ox0dea, significant bits in 456897.12358 are 11 (width). I want this to be down to 3
<Tref> Ox0dea: ah so you dont have to predefine the structure of OpenStructs
<Ox0dea> tref: Right, they're essentially Hashes with accessors defined in terms of the keys.
<Ox0dea> It's nice, but it's got teeth.
<Tref> Ox0dea: in this instance im not sure of the benefit that would provide me over a regular Struct since I already know what the order is
Suntzu has quit [Read error: Connection reset by peer]
jackjackdripper1 has quit [Quit: Leaving.]
<Ox0dea> tref: You've got three different Structs in your example there; that's arguably two too many.
<c_nick> Ox0dea, eg: 1.434 i want this down to 2 then that would be 1.4
pawnbox has quit [Ping timeout: 260 seconds]
<c_nick> its just set width but without losing out on the numbers
<Ox0dea> c_nick: So in your original example, you want to go from 456897.12358 to... 456?
<Tref> Ox0dea: I’m not sure how I would reduce that down to 1
U7se6 has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<c_nick> Ox0dea, thats the thing 456 is not really the number if i round off i still have 456897.0 so we will lose out on 897
<c_nick> i could always do a string parsing and only pick up for first 3 chars but that would lose out on info
<c_nick> what if i make everything to e^ (scientific) ones
stannard has joined #ruby
poerror has quit [Ping timeout: 248 seconds]
<Ox0dea> tref: You only need the one Student class, initialized with a Hash (from Importer#load).
linoj has quit [Quit: linoj]
hahuang61 has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
Uo9er_ has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 260 seconds]
johnmilton has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
maletor has quit [Quit: Computer has gone to sleep.]
Moosashi has joined #ruby
Chagel has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
Chagel has joined #ruby
Moosashi has quit [Client Quit]
linoj has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
hxegon has quit [Ping timeout: 250 seconds]
ramortegui_ has quit [Remote host closed the connection]
mleung has joined #ruby
djbkd has quit [Remote host closed the connection]
mleung has quit [Client Quit]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
tjbiddle has joined #ruby
linoj has quit [Quit: linoj]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trosborn has joined #ruby
Moosashi has joined #ruby
Suntzu has joined #ruby
Moosashi has quit [Client Quit]
Chagel has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
Chagel has joined #ruby
kam270 has quit [Ping timeout: 248 seconds]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
frustrum has joined #ruby
Chagel has quit [Remote host closed the connection]
x77686d has joined #ruby
wreet has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
Chagel has joined #ruby
frustrum has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
wreet has quit [Quit: Leaving]
Xeago has joined #ruby
dopamean_ has joined #ruby
dopamean_ has quit [Client Quit]
whippythellama has quit [Quit: WeeChat 1.2]
Moosashi has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
eljimmy has quit [Quit: Leaving]
c_nick has quit [Quit: Ex-Chat]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
spacemud has quit [Quit: ZNC - http://znc.in]
stannard has joined #ruby
Uo9er_ has joined #ruby
Uo9er_ has quit [Max SendQ exceeded]
frustrum has joined #ruby
U7se6 has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
Pupp3tm4st3r has joined #ruby
Us54er has joined #ruby
mistermocha has joined #ruby
poerror has joined #ruby
jenrzzz has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
wilbert has quit [Ping timeout: 276 seconds]
poerror has quit [Ping timeout: 244 seconds]
<rik> hello ruby people! i have need to download a gem, and compile it against non-standard libraries. how do i do that?
mistermocha has quit [Ping timeout: 260 seconds]
dmarr_ has left #ruby [#ruby]
duncannz has joined #ruby
LoneHermit has joined #ruby
jenrzzz_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
RegulationD has joined #ruby
zast has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Moosashi has quit [Quit: Moosashi]
jenrzzz_ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
Moosashi has joined #ruby
ruind has joined #ruby
safe has quit [Quit: Leaving]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Us54er has quit [Ping timeout: 260 seconds]
Uo9er_ has joined #ruby
ukazap has joined #ruby
<ukazap> hello rubyists, greetings from indonesia
htmldrum has quit [Ping timeout: 244 seconds]
nanoz has joined #ruby
godzillaenlacasa has joined #ruby
sesquipedalian has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.4]
configged- has joined #ruby
kith_ has joined #ruby
Keltia_ has quit [Read error: Connection reset by peer]
Keltia has joined #ruby
plonk has joined #ruby
plonk has quit [Changing host]
plonk has joined #ruby
heinrich5991 has quit [Ping timeout: 260 seconds]
configged has quit [Ping timeout: 244 seconds]
braincrash has quit [Quit: bye bye]
plonk_ has quit [Ping timeout: 260 seconds]
inukshuk has quit [Ping timeout: 248 seconds]
jokke has quit [Ping timeout: 264 seconds]
kith has quit [Ping timeout: 250 seconds]
jokke has joined #ruby
fedexo has joined #ruby
inukshuk has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
<ukazap> nobody want to talk?
jenrzzz has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<havenwood> ukazap: hi
Xeago has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<ukazap> havenwood: hi there
heinrich5991 has joined #ruby
braincrash has joined #ruby
Chagel has quit [Remote host closed the connection]
godzillaenlacasa has quit [Quit: ZZZZZ....]
<rik> it does appearto be quite quiet
<ukazap> rik: let's burn this place down to make it noisy (kidding)
blackmesa has joined #ruby
<rik> well, i need help with making a gem do wht i want ...
<rik> so i don't want to burn this place down yet
Chagel has joined #ruby
ijij has joined #ruby
<ukazap> rik: hey, i made a gem
<rik> exellent
<rik> i want DataMapper's sqlite provider to use sqlcipher, instead of sqlite.
<rik> but i have no idea how to achieve this.
<ukazap> so what do you want to accomplish with your gem?
<ukazap> never heard sqlcipher
<rik> (it's backwards compatible, but i don't know how to get it to build against it)
davee_ has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
<rik> aha
<rik> i hav efound it, i think.
arescorpio has quit [Quit: Leaving.]
tvon has quit []
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
blackmesa has quit [Ping timeout: 244 seconds]
<ukazap> dm sqlcipher adapter?
aupadhye has joined #ruby
barajasfab has joined #ruby
Chagel has quit [Remote host closed the connection]
treaki__ has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHermit has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
treaki_ has quit [Ping timeout: 264 seconds]
ruind has quit [Read error: Connection reset by peer]
Moosashi has quit [Quit: Moosashi]
konsolebox has joined #ruby
trosborn has quit [Quit: trosborn]
codezomb has joined #ruby
shevy has joined #ruby
Moosashi has joined #ruby
fullofca_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
fullofcaffeine has quit [Ping timeout: 248 seconds]
marchelzo has quit [Quit: WeeChat 1.0.1]
merida has joined #ruby
norc has joined #ruby
bronson has joined #ruby
Uber|Dragon has quit [Ping timeout: 244 seconds]
ruind has joined #ruby
Eaven has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has quit [Ping timeout: 246 seconds]
yqt has quit [Ping timeout: 248 seconds]
codezomb has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
gbgdev_ has quit [Remote host closed the connection]
uglybandersnatch has quit [Ping timeout: 248 seconds]
rkazak has quit [Quit: Sleep.....ing....]
uglybandersnatch has joined #ruby
Chagel has joined #ruby
Rickmasta has quit [Ping timeout: 246 seconds]
hahuang61 has joined #ruby
moeabdol has joined #ruby
bronson has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Ping timeout: 268 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
frustrum has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Xeago has joined #ruby
Babos has joined #ruby
Rickmasta has joined #ruby
<Babos> Hi
Babos has left #ruby [#ruby]
Pupp3tm4st3r has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
ukazap has quit [Quit: Leaving]
norc has quit [Ping timeout: 244 seconds]
Chagel_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Chagel has quit [Ping timeout: 268 seconds]
maletor has joined #ruby
freerobby has quit [Quit: Leaving.]
biberu has joined #ruby
blackmesa has joined #ruby
Chagel_ has quit [Remote host closed the connection]
Chagel has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
Moosashi has quit [Quit: Moosashi]
howdoi has joined #ruby
hxegon has joined #ruby
frustrum has joined #ruby
LoneHermit has joined #ruby
dikaio has quit [Ping timeout: 246 seconds]
Moosashi has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
poerror has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
LoneHermit has quit [Ping timeout: 252 seconds]
rkazak has joined #ruby
infra-red has joined #ruby
sauvin has quit [Ping timeout: 264 seconds]
spacemud has joined #ruby
niksrc has joined #ruby
infra-red has quit [Remote host closed the connection]
infra-red has joined #ruby
poerror has quit [Ping timeout: 276 seconds]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
tomatoes has joined #ruby
yeoh has joined #ruby
yeoh has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0/20160304115216]]
merida has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 268 seconds]
merida has joined #ruby
Moosashi has quit [Quit: Moosashi]
astrobun_ has joined #ruby
ur5us has quit [Remote host closed the connection]
sauvin has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
konsolebox has quit [Quit: Leaving]
totalkunt6969 has joined #ruby
<totalkunt6969> is this chat dead?
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
grill has joined #ruby
stannard has joined #ruby
<mozzarella> no
paatalaBhairavi has joined #ruby
paatalaBhairavi has quit [Max SendQ exceeded]
tomatoes has quit [Quit: Bye]
paatalaBhairavi has joined #ruby
davee_ has quit [Quit: Leaving]
hyperdrive has quit [Read error: Connection reset by peer]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
bronson has quit [Remote host closed the connection]
ruind has quit [Ping timeout: 248 seconds]
stannard has quit [Ping timeout: 260 seconds]
mahk has joined #ruby
fullofca_ has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
hyperdrive has joined #ruby
biberu has quit [Ping timeout: 248 seconds]
tjbiddle has quit [Quit: tjbiddle]
<Radar> !ban totalkunt6969
totalkunt6969 was kicked from #ruby by ruby[bot] [bannable offense, see http://ruby-community.com/pages/user_rules]
PlasmaStar has quit [Ping timeout: 268 seconds]
U7se6 has joined #ruby
PlasmaStar has joined #ruby
baweaver has joined #ruby
Tref has quit [Quit: tref]
aufi has joined #ruby
infra-re_ has joined #ruby
yeoh has joined #ruby
mburns has quit [Ping timeout: 264 seconds]
Uo9er_ has quit [Ping timeout: 260 seconds]
Tref has joined #ruby
infra-red has quit [Ping timeout: 248 seconds]
mburns has joined #ruby
<Tref> hey guys having a hard time getting started with some boilerplate for this exercise: https://gist.github.com/Tref/7c2b8c1ac9d424fb1170
yardenbar has quit [Ping timeout: 260 seconds]
infra-red has joined #ruby
rffleaie has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
uglybandersnatch has joined #ruby
infra-re_ has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
bricker has quit [Ping timeout: 240 seconds]
<baweaver> tref: what have you tried so far?
astrobun_ has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
nando293921 has joined #ruby
djbkd has quit [Quit: My people need me...]
paatala_bhairavi has joined #ruby
<baweaver> Show us what you have so far.
iMadper has joined #ruby
jolts has joined #ruby
<Tref> baweaver: let me post it
<Tref> I’ll create a new repo
paatala_bhairavi has quit [Client Quit]
<Tref> baweaver: I dont have much. Like I said Im having a hard time with structure and getting started
hyperdrive has quit [Ping timeout: 268 seconds]
<Tref> baweaver: Im not really planning on using what I have https://github.com/Tref/delimeter_parser
<Tref> so theres not much point in looking just yet
ur5us has joined #ruby
paatalaBhairavi has quit [Ping timeout: 244 seconds]
<Tref> the only thing in there that’s of any use so far is https://github.com/Tref/delimeter_parser/blob/master/bin/import.rb
rkazak has quit [Quit: Sleep.....ing....]
<baweaver> That'll help us step through some of it together
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
htmldrum has joined #ruby
hyperdrive has joined #ruby
<Tref> Im more having difficulty with file organization, what should go where, modules vs classes etc
mistermocha has joined #ruby
kp666 has quit [Remote host closed the connection]
n00bdev has joined #ruby
aganov has joined #ruby
rffleaie has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ohaibbq has joined #ruby
pawnbox has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
jenrzzz has joined #ruby
infra-red has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 250 seconds]
Ahmer has joined #ruby
amclain has quit [Quit: Leaving]
x77686d has quit [Quit: x77686d]
ereslibre has quit [Ping timeout: 240 seconds]
aalmenar has quit [Ping timeout: 276 seconds]
jud has quit [Ping timeout: 246 seconds]
kp666 has joined #ruby
Ahmer has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kp666 has quit [Remote host closed the connection]
Vingador has quit [Ping timeout: 252 seconds]
yeoh has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0/20160304115216]]
mistermocha has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
Moosashi has joined #ruby
rmulliga` has quit [Remote host closed the connection]
rmulliga` has joined #ruby
terminal_ has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
last_staff has joined #ruby
ereslibre has joined #ruby
<ben_vulpes> how do i shell out to a ruby gem, specifying ruby executeable and gem?
<ben_vulpes> as in from an entirely non-ruby stack
blackmesa has quit [Ping timeout: 240 seconds]
niksrc has quit [Ping timeout: 240 seconds]
kp666 has joined #ruby
chipotle has quit [Ping timeout: 244 seconds]
terminal_ has joined #ruby
terminal_ has quit [Client Quit]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has joined #ruby
bronson has joined #ruby
tvw has joined #ruby
moeabdol has joined #ruby
chipotle has joined #ruby
Chagel has quit [Remote host closed the connection]
n00bdev has quit []
pawnbox has joined #ruby
nanoz has joined #ruby
skade has joined #ruby
Pupp3tm4st3r has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
janzo has quit []
Chagel has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
solars_ has joined #ruby
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
duncannz has quit [Remote host closed the connection]
lxsameer has joined #ruby
djbkd has joined #ruby
<Ox0dea> tref: Is a delimeter for measuring sandwiches?
<Tref> Ox0dea: My sausage is 12 delimeters
<Ox0dea> Not bad.
<Ox0dea> Google is resisting my efforts to have that converted to Planck lengths. :/
voidsta has left #ruby [#ruby]
beergineer has joined #ruby
Eaven has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bricker has joined #ruby
infra-red has joined #ruby
schaary has left #ruby [#ruby]
mrgrieves has joined #ruby
infra-red has quit [Remote host closed the connection]
emesa has joined #ruby
ayonkhan has joined #ruby
bricker has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
toretore has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 250 seconds]
iMadper is now known as FaPiao
Moosashi has quit [Quit: Moosashi]
_blizzy_ has joined #ruby
pawnbox has joined #ruby
nerium has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
kam270 has joined #ruby
mahk has quit [Quit: mahk]
hk238 has joined #ruby
beergineer has quit [Ping timeout: 252 seconds]
reprazent has joined #ruby
mrgrieves has quit [Ping timeout: 244 seconds]
a11 has joined #ruby
kam270 has quit [Max SendQ exceeded]
terlar has joined #ruby
kam270 has joined #ruby
a11 has quit [Client Quit]
fedexo has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
EdwardIII has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
jenrzzz has joined #ruby
firstdayonthejob has joined #ruby
andikr has joined #ruby
EdwardIII has joined #ruby
elifoster has quit [Ping timeout: 268 seconds]
Moosashi has joined #ruby
poerror has joined #ruby
davee_ has joined #ruby
anisha has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
cpup has joined #ruby
biberu has joined #ruby
sphex has quit [Read error: Connection reset by peer]
sphex has joined #ruby
graffix has quit [Ping timeout: 276 seconds]
poerror has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
polysics_ has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
blackmesa has joined #ruby
systemsgotyou has quit [Read error: Connection reset by peer]
darkf has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
systemsgotyou has joined #ruby
polysics has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
Chagel has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 264 seconds]
ruby-lang151 has joined #ruby
<ruby-lang151>
ruby-lang151 has quit [Client Quit]
ohaibbq has quit [Quit: Leaving...]
blackmesa has quit [Ping timeout: 248 seconds]
tomchapi_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 276 seconds]
Suntzu has quit [Read error: Connection reset by peer]
emilkarl has quit [Read error: Connection reset by peer]
Chagel has joined #ruby
hxegon has quit [Quit: BRB]
baweaver has quit [Remote host closed the connection]
blackms has joined #ruby
Couch has joined #ruby
jas02 has joined #ruby
rmulliga` has quit [Ping timeout: 248 seconds]
emilkarl has joined #ruby
merida has quit [Remote host closed the connection]
binaryplease has joined #ruby
Ishido has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
mrgrieves has joined #ruby
jaruga has joined #ruby
yardenbar has joined #ruby
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
atmosx has joined #ruby
roshanavand has joined #ruby
graffix has joined #ruby
GriffinHeart has joined #ruby
fexilal has joined #ruby
roshanavand has quit [Client Quit]
uglybandersnatch has quit [Ping timeout: 260 seconds]
emilkarl has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
ensyde has quit [Read error: Connection reset by peer]
ensyde has joined #ruby
Uo9er_ has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
mrgrieves has quit [Ping timeout: 252 seconds]
Tref has quit [Quit: tref]
roshanavand has quit [Client Quit]
duncannz has joined #ruby
emilkarl has joined #ruby
U7se6 has quit [Ping timeout: 246 seconds]
ruby-lang708 has joined #ruby
rdark has joined #ruby
roshanavand has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
Acontius has joined #ruby
atmosx has quit [Quit: This is aparting message!]
ruby-lang708 has quit [Ping timeout: 252 seconds]
Acontius has quit [Client Quit]
jenrzzz has quit [Ping timeout: 250 seconds]
emilkarl is now known as emilkarl[away]
Suntzu has joined #ruby
SCHAAP137 has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mja has joined #ruby
mja is now known as Guest99095
astrobun_ has quit [Remote host closed the connection]
kedare1 has quit [Quit: WeeChat 1.3]
bronson has quit [Remote host closed the connection]
ropeney has joined #ruby
<kireevco> anyone has an idea how to convert a python dict object to a valid json in ruby?
kedare has joined #ruby
ropeney has quit [Remote host closed the connection]
vdamewood has joined #ruby
emilkarl has joined #ruby
astrobun_ has joined #ruby
<danjack_> Hey guys, I want to install a gem, but the extconf fails
CloCkWeRX has joined #ruby
<danjack_> I thought of changing the extconf script to not fail, but if I try to rerun 'gem install' it just overwrites my changes
<danjack_> any thoughts on how I could just run the configuration of already downloaded gem?
nerium has quit [Quit: nerium]
Moosashi has quit [Quit: Moosashi]
roshanavand has quit [Quit: This computer has gone to sleep]
binaryplease has joined #ruby
roshanavand has joined #ruby
matp has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
codecop_ has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 260 seconds]
Abrin_AWAY has quit [Ping timeout: 268 seconds]
<Ox0dea> kireevco: Ew. Just have the Python script emit JSON.
<kireevco> I can't. I'm parsing a log, can't control input
TvL2386 has joined #ruby
<Ox0dea> danjack_: You can say `gem install some_local_file.gem`.
Pupp3tm4st3r has quit [Remote host closed the connection]
Moosashi has joined #ruby
Dreamer3_ has quit [Quit: Leaving...]
matp has joined #ruby
<Ox0dea> You'll want to do that after `gem build foo.gemspec`, of course.
<b|ackwolf> is it possible that a class has more than one constructor?
<b|ackwolf> for example; Date.parse() and Date.new().
<kireevco> b|ackwolf: can't you just have one canonical and call it from an alias method?
<kireevco> or oyu want different ones?
<kireevco> make an alias to call your canonical constructor with a parameter
roshanavand has quit [Quit: This computer has gone to sleep]
<Ox0dea> b|ackwolf: Date.parse calls Date.new, the latter being the only "constructor" in the technical sense.
<b|ackwolf> Ox0dea, thanks
<gregf_> b|ackwolf: if you've got a constructor like so def initialize *args, **kwargs;end <== is that not sufficient
queequeg1 has quit [Ping timeout: 264 seconds]
<b|ackwolf> gregf_, kireevco: thanks to you too. that's reasonable.
roshanavand has joined #ruby
<Ox0dea> Appropriately named convenience "constructors" are fine, but they should pretty much always delegate to the "real" constructor at the end.
firstdayonthejob has quit [Ping timeout: 240 seconds]
ben_vulpes has left #ruby ["WeeChat 1.1.1"]
<Ox0dea> That said, "If you have a procedure with 10 parameters, you probably missed some."
Xeago has joined #ruby
riotjones has joined #ruby
roshanavand has quit [Client Quit]
htmldrum has quit [Ping timeout: 260 seconds]
igam has joined #ruby
Xeago has quit [Ping timeout: 248 seconds]
agit0 has joined #ruby
AnoHito has joined #ruby
blackmesa has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
norc has joined #ruby
barajasfab has quit [Quit: Leaving]
AnoHito_ has quit [Ping timeout: 240 seconds]
<norc> So Im wondering how to people here interactively develop their gems? Do you just create a separate bundle specifying your gem via a local path, and then just fire up a pry shell from there?
queequeg1 has joined #ruby
ta_ has quit [Remote host closed the connection]
anthony has joined #ruby
ta_ has joined #ruby
anthony is now known as Guest14383
DoubleMalt has joined #ruby
sphex_ has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
_blizzy_ has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
sphex has quit [Ping timeout: 252 seconds]
ta__ has joined #ruby
tjbiddle has joined #ruby
ensyde has quit [Ping timeout: 250 seconds]
merida has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
skade has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
elaptics`away is now known as elaptics
n008f4g_ has joined #ruby
bricker has joined #ruby
<soahccc> norc: Depends but I've done that before. I think it was our capistrano wrapper where I used that method a lot
Snowy has joined #ruby
bricker has quit [Ping timeout: 260 seconds]
<norc> In my last gem I tried to avoid interactive shells entirely, spending the time to specify the behaviour I intend to test in RSpec instead.
<norc> But at some point I realized I was testing far more than I should have.
y2mq37 has quit [Quit: Leaving]
the_drow has joined #ruby
minimalism has quit [Quit: minimalism]
moeabdol has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
emilkarl has quit [Ping timeout: 244 seconds]
gbgdev has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
skade has joined #ruby
mark3 has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
emilkarl has joined #ruby
decaff has quit [Ping timeout: 246 seconds]
cpup has quit [Ping timeout: 252 seconds]
decaff has joined #ruby
<adaedra> Hello
cpup has joined #ruby
stan has quit [Remote host closed the connection]
bluOxigen has joined #ruby
the_drow has quit [Quit: Leaving]
stan has joined #ruby
anisha has quit [Quit: Leaving]
htmldrum has joined #ruby
bronson has joined #ruby
mrgrieves has joined #ruby
ur5us has quit [Remote host closed the connection]
forgot has joined #ruby
GreyHands has joined #ruby
drptbl has joined #ruby
gbgdev has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 260 seconds]
scepticulous has joined #ruby
triangles has joined #ruby
ta__ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
the_drow has joined #ruby
ta_ has joined #ruby
marr has joined #ruby
Pupp3tm4st3r has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has joined #ruby
blackmesa has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
Moosashi has quit [Quit: Moosashi]
kam270 has quit [Ping timeout: 248 seconds]
Snowy has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Read error: No route to host]
Pupp3tm4_ has joined #ruby
Snowy has joined #ruby
andrewvos has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
last_staff has quit [Quit: last_staff]
Guest99095 has quit [Read error: Connection reset by peer]
mja has joined #ruby
mja is now known as Guest86774
duncannz has quit [Remote host closed the connection]
nocontrol has joined #ruby
devoid has joined #ruby
Xeago has joined #ruby
<devoid> I've discovered that using @varname for instance variables means that if I mistype a variable name it's not detected, and just resolves to an empty string. The only alternative seems to be to define an accessor and use that, even from class member functions. Is that right?
Gasher has joined #ruby
platzhirsch has joined #ruby
<Ox0dea> devoid: Undefined instance variables evaluate to `nil`, but you should have tests that explode if you misspell one.
platzhirsch has left #ruby [#ruby]
ziyadb has joined #ruby
<devoid> Yes, but if you use it in a string "hello #{@varname}" and @varname isn't defined, it expands silently to an empty string. Where "hello #{undefined_var}" causes an error immediately
<Ox0dea> >> nil.to_s # devoid
<ruby[bot]> Ox0dea: # => "" (https://eval.in/537398)
ready has joined #ruby
pec has joined #ruby
<Ox0dea> If you want to catch misspellings at runtime rather than test time, that's your prerogative.
Pupp3tm4_ has quit [Remote host closed the connection]
kam270 has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
stannard has joined #ruby
Cohedrin has joined #ruby
<devoid> it's the different behaviour between undefined instance variables '@xxx' and undefined local variables 'xxx' is the problem. Is there some other way to detect mistyped member var names? you can never guarantee that all such cases will be caught in tests.
ta_ has joined #ruby
Rahul_Roy has joined #ruby
Dimik has joined #ruby
<Ox0dea> devoid: There are IDEs that'll red-flag misspellings, but if all your tests pass even if you've used a bad instance variable, that's a paddlin'.
sepp2k has joined #ruby
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
<devoid> true but it's something so easy to check in the parser. One of the bugs today was in a log message. The log message was missing an important bit of information, which didn't affect the program operation in any way, but an external process was expecting to see the message at regular intervals.
stannard has quit [Ping timeout: 240 seconds]
<Ox0dea> In the parser, you say?
mikhael_k33hl has joined #ruby
<mikhael_k33hl> is there anyway to enable ci_reporter without using rake?
platzhirsch has joined #ruby
<Ox0dea> mikhael_k33hl: Looks pretty Rake-oriented.
<devoid> so the only way to get ruby to detect accesses to variables that have never been initialised seems to be to define an accessor for every instance variable and use those rather than the '@' variables for all accesses to the data.
baweaver has quit [Remote host closed the connection]
<Ox0dea> Or write tests.
<Ox0dea> Ruby is inherently resistant to static analysis.
drptbl_ has joined #ruby
Xeago has quit [Remote host closed the connection]
evidex has joined #ruby
<shevy> devoid I sorta tend to do that anyway, seems easier to keep track of when any ivar is changed. problem is that method calls are slower than when one directly uses @foo = 5
drptbl has quit [Ping timeout: 240 seconds]
<devoid> I have tests, but tests are never complete. You build them up over time as you discover more things that go wrong. Detecting access to a variable that's never been initialised should be trivial?? Going the accessor route will mean that mistyped var names should never be missed.
<Ox0dea> Well, they won't be variable names anymore, but yes, you'll get runtime errors.
<devoid> performance isn't a problem for the things we're using ruby for. predictability is more of a problem.
maner has joined #ruby
<devoid> I would prefer a visible error than silent surprises. It depends what you're doing I guess.
<shevy> the did-you-mean gem can detect a few misspellings, perhaps you can dig into it when you need to test things https://github.com/yuki24/did_you_mean#displaying-a-warning-when-initialize-is-incorrectly-typed
lsmola has joined #ruby
<Ox0dea> devoid: It's hardly as trivial as you seem to think; instance variables can be defined all sorts of ways at any time.
<Ox0dea> We have #instance_variable_{get,set,defined?} for doing all sorts of wacky things.
TheIdea has joined #ruby
Pupp3tm4st3r has joined #ruby
<norc> devoid: Think in terms of interfaces and test only then.
<devoid> Yep, I have no idea how ruby internals work, but it must maintain some type of symbol table at runtime that could be used to detect accesses? Anyway, for me now I just want a way to make it more likely that a mistyped @var name will show up as an error during testing, rather than slipping through into production
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
<norc> devoid: If you access an uninitialized variable whether it throws a variable or not, it probably has an effect on your interface somehow.
U7se6 has joined #ruby
hamed_r has joined #ruby
<norc> devoid: There is some real whacky magic going on under the hood when it comes to dispatching methods and variable access in CRuby.
<Ox0dea> devoid: Right, an object's instance variable table is essentially just a Hash under the hood; undefined ivars resolve to `nil` the same way Hash#[] does with a nonexistent key.
Snowy has quit [Remote host closed the connection]
<devoid> norc: these scripts are being used for backend processes that churn away all day every day. So problems may not get noticed for a while.
Dimik has quit [Ping timeout: 248 seconds]
<Ox0dea> They should get noticed as soon as you run your tests.
<norc> Which is my point. Test your interfaces, not the internals.
Uo9er_ has quit [Ping timeout: 248 seconds]
noway_ has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
<norc> Ox0dea: honestly though, Im not a big fan of access to non initialized ivars not throwing a NameError.
poerror has joined #ruby
Sero has joined #ruby
<norc> asm>> @f
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/537433
ta_ has joined #ruby
<Ox0dea> norc: Would that be trivial to amend?
<devoid> tests are great but in my experience never perfect. given that and the fact that we can't guarantee that ruby will throw an error for a @varname typo, I guess the accessor thing is the only way.
<shevy> \o/
drptbl_ has quit [Ping timeout: 264 seconds]
<devoid> actually the main cause of the error is that nil.to_s returns "". If that threw an error, the problem may be solved?
<TheIdea> I kind of have found a concept that I belive could solve a lot of our problems worldwide but it could also have very negative effects. Since my IQ is not too high I'd like to discuss this with some smart individuals. It involves cryptocurrencies, crowdfunding, voting, organizing, copyrights etc. It could enable people to earn money by just doing the things thay love to do but also making sure that everything else is done. Anyone here up for it
<TheIdea> ? If not it would be awesome if you could redirect me somewhere where I can discuss it.
<norc> devoid: If you turn Ruby into verbose mode you should get a warning at least.
<norc> Ox0dea: Fairly trivial.
<norc> Ox0dea: Looks like just a small patch to vm_insnhelper.c would be needed.
stardiviner has joined #ruby
<norc> devoid: no that actually is working as intended.
<norc> devoid: If you have some behavior you rely on, put it behind an interface. And test it.
<norc> Tests catch these things.
<Ox0dea> norc: But surely the same semantics would need to be applied to class variables and globals?
<norc> If you do not write tests, you might as well pick another language.
<norc> >> @@f
<ruby[bot]> norc: # => /tmp/execpad-eb7ec3d7aad3/source-eb7ec3d7aad3:2: warning: class variable access from toplevel ...check link for more (https://eval.in/537446)
<Ox0dea> Derp.
<Ox0dea> Just globals, then.
<norc> ;)
<Ox0dea> Well, no.
<norc> Well, yes.
<Ox0dea> Yeah. :P
<norc> :)
drptbl has joined #ruby
<Ox0dea> The ivar magic is quite deliberate, then; I wonder at the rationale.
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Ox0dea: Lazy people. Uninitialized lvar makes perfect sense to throw an error because its scoped to a small space.
<devoid> I am pedantic about tests. I write them first and run them before I even start entering the program. But I am not the only one working on this code. So tests are of varying quality, and as I have said before they are never perfect.
<norc> Ox0dea: But to initialize every damn variable, well coming from C++ I know that it can be annoying at times.
<norc> Which is why MSVC is so great because it automatically does all that boilerplate for oyu.
TheIdea has left #ruby ["Leaving"]
<norc> devoid: If your team has problems with good test coverage, that is your real problem then.
<norc> Not some Ruby quirks. ;-)
<shevy> you people need to write better code
<Ox0dea> devoid: If you really think blowing up on interpolated `nil` would help, you might consider doing it with a refinement.
<Ox0dea> Redefining NilClass#to_s to explode, to clarify.
<manveru> or just use #to_str
Spami has joined #ruby
<devoid> that is A problem. but tools can help! and tools can be made more consistent that humans. I don't have a problem with however ruby wants to do things. but if I can have a tool that spots problems, that is better than relying on humans to spot them.
<manveru> then you probably want another tool than ruby :)
<shevy> C#
<devoid> that would make things easier. I've been running rubocop over all the code and it doesn't spot access to undefined @vars.
<manveru> because @vars can come from elsewhere too
<ready> shit offtopic
andrewvos has quit [Ping timeout: 276 seconds]
FooMunki has joined #ruby
<norc> devoid: You basically want some data-flow analysis functionality baked into Rubocop there. ;-)
decaff has quit [Ping timeout: 260 seconds]
<manveru> there are so many languages that give you those guarantees... and it's not something you can analyze very well in ruby
<norc> manveru: Really? C/C++ is a rather popular language that does not give you a guarantee here. ;-)
<norc> *two rather popular langauges.
<manveru> i didn't talk about popular, nor about C/C++
<norc> Fair enough.
<manveru> i don't consider those very soundly typed... more like syntactic sugar on top of ASM
andrewvos has joined #ruby
decaff has joined #ruby
<manveru> >> ObjectSpace.each_object{|o| o.instance_variable_set(:@hi, :there) unless o.frozen? }; ARGV.instance_variable_get(:@hi)
<ruby[bot]> manveru: # => :there (https://eval.in/537452)
<norc> To consider C++ not very soundly typed is a bold statement, but I do not feel like arguing over this.
<manveru> :)
<manveru> likewise
<devoid> manveru: yep but scripts these days seem to be done in ruby, python or bash. I've never liked C of any variant. I don't like python because of the ways that different developers with different vim settings can screw up the indenting. compiled software is where I came from, but scripting languages are useful and responsive. But coming from a place where typos are detecting, to somewhere they are not, seems to be a step backwards.
mr_robot_ has joined #ruby
gbgdev has joined #ruby
Felix444 has quit [Ping timeout: 264 seconds]
<norc> >> const_get("fatal")
<ruby[bot]> norc: # => undefined method `const_get' for main:Object (NoMethodError) ...check link for more (https://eval.in/537454)
<norc> >> Module.const_get("fatal")
<ruby[bot]> norc: # => wrong constant name fatal (NameError) ...check link for more (https://eval.in/537455)
<norc> ruby[bot]: Now you just hate me...
<Ox0dea> norc: Er, it's not a constant, is it?
<norc> Ox0dea: What is it then?
atmosx has quit [Quit: This is aparting message!]
<Ox0dea> norc: Well, I know it's the name of a class.
<Ox0dea> So I guess it must be?
<norc> Think we should try and find where its defined to be sure
<manveru> devoid: yeah, when i want something like that i usually use Go
<Ox0dea> norc: rb_eFatal = rb_define_class("fatal", rb_eException);
<norc> Ox0dea: and rb_define_class uses rb_const_set
<Ox0dea> Too right you are.
<norc> >> raise ObjectSpace.each_object(Class).find { |c| c.name == "fatal" }
<ruby[bot]> norc: # => fatal (fatal) ...check link for more (https://eval.in/537456)
<norc> There we go!
<norc> Cant hide it from me.
FooMunki has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
<Ox0dea> trunk $ ag rb_obj_hide | wc -l
<Ox0dea> 32
<Ox0dea> :(
Chagel has quit [Remote host closed the connection]
<norc> Ox0dea: Well, as long as its still in memory its still accessible via Fiddle. ;-)
joonty has joined #ruby
Guest14383 has quit [Quit: Leaving]
<flughafen> hello
<norc> And you can safely poke the entire memory now that we have a way to rescue from SegFaults.
<norc> :-)
<Ox0dea> Just so.
<Ox0dea> Still, so finicky.
decaff has quit [Ping timeout: 244 seconds]
FooMunki has quit [Client Quit]
FooMunki has joined #ruby
<norc> Ox0dea: Neat, never knew about silver searcher.
c355e3b has joined #ruby
<norc> That is definitely gonna be a helpful tool. :)
DEac- has quit [Quit: leaving]
<Ox0dea> Wha?!
DEac- has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
Chagel has joined #ruby
Moosashi has joined #ruby
<norc> Well, I spent a lot of time working with MSVC - that gives you a different perspective on tooling.
Moosashi has quit [Client Quit]
<Ox0dea> I suppose that's fair.
<norc> It was not until a few weeks ago that I truly began to use tmux everywhere, after I got finally fed up with the shortcomings of iTerm2.
<norc> But on the brightside, it gives me this wonderful experience to constantl discover "new and amazing" things. ;-)
<norc> Things you might take for granted.
GioVdK has joined #ruby
nando293921 has quit [Ping timeout: 268 seconds]
lenwood has joined #ruby
<GioVdK> Hello, I read that Iconv is deprecated in the newest versions of Ruby, is this correct?
<Ox0dea> GioVdK: It's not been part of the standard library since 2.0.
Pupp3tm4st3r has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
johnmilton has joined #ruby
<GioVdK> thanks Ox0dea and I should use string.encode instead, right?
<Ox0dea> GioVdK: There are a few other relevant methods, but yeah, that's the big'n.
<adaedra> I think apeiros has a whole guide on Ruby and encodings
<Ox0dea> He totally does.
<GioVdK> thanks, going to have a look
ukazap has joined #ruby
baweaver has joined #ruby
<GioVdK> what I'm trying to do is convert the body part of an email, and with Iconv I found this snippet that worked: Iconv.conv('UTF-8', email.html_part.charset, email.html_part.body.to_s)
<GioVdK> but email.html_part.body.to_s.encode(Encoding::UTF_8) isn't as happy
decaff has joined #ruby
TheHodge has joined #ruby
rodfersou has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
bricker has joined #ruby
baweaver has quit [Ping timeout: 268 seconds]
mariano_ has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
trinaldi has joined #ruby
<GioVdK> ok found it -> .encode(Encoding::UTF_8, @email.html_part.charset)
<GioVdK> I initially missed the second parameter: encode(dst_encoding, src_encoding [, options] ) ;)
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bricker has quit [Ping timeout: 276 seconds]
uglybandersnatch has quit [Ping timeout: 244 seconds]
arlek has joined #ruby
ukazap has quit [Ping timeout: 248 seconds]
mdih has quit [Ping timeout: 248 seconds]
last_staff has joined #ruby
FooMunki has quit [Quit: FooMunki]
Snowy has joined #ruby
FooMunki has joined #ruby
mfaeh has joined #ruby
b|ackwolf has quit [Ping timeout: 240 seconds]
n008f4g_ has quit [Ping timeout: 248 seconds]
mahk has joined #ruby
duckpuppy has joined #ruby
CloCkWeRX has quit [Ping timeout: 276 seconds]
Felix444 has joined #ruby
workmad3_ is now known as workmad3
drptbl_ has joined #ruby
drptbl has quit [Ping timeout: 240 seconds]
poerror has quit [Ping timeout: 252 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
tjbiddle has quit [Quit: tjbiddle]
binaryplease has quit [Ping timeout: 250 seconds]
last_staff has quit [Quit: last_staff]
<shevy> >> "\x68\x65\x6c\x6c\x6f".b + ' world!'
<Ox0dea> Ten points from Gryffindor.
poerror has joined #ruby
krz has joined #ruby
<shevy> Ox0dea you made me google for Gryffindor... now I am reading up on hairy potter ... :(
ldnunes has joined #ruby
vdamewood has quit [Quit: Life beckons.]
CloCkWeRX has joined #ruby
<adaedra> Ox0dea: did you mean Hufflepuff?
<Ox0dea> shevy: I believe you. :(
<Ox0dea> adaedra: His nick's red here.
<adaedra> Fair enough.
mahk has quit [Ping timeout: 240 seconds]
<Ox0dea> I see whence you came, though.
ukazap has joined #ruby
<adaedra> Yer a gorilla, Hairy.
emilkarl has joined #ruby
mfaeh has quit []
<Ox0dea> Oh, wow, MuggleNet is still a thing.
unseatingbread has joined #ruby
<workmad3> Ox0dea: I'm not sure how much I'd class "Has an image on a CDN still" as "Still a thing" :)
<Ox0dea> workmad3: Well, no, but the site does indeed still exist.
<Ox0dea> Internet 2.0 has not been kind to it, in my estimation.
krz has quit [Ping timeout: 260 seconds]
<workmad3> :)
<shevy> workmad3 hah
RegulationD has joined #ruby
atmosx has joined #ruby
stannard has joined #ruby
ukazap has quit [Ping timeout: 248 seconds]
hanmac has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
lenwood has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
stannard has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 248 seconds]
moeabdol has joined #ruby
decaff has quit [Ping timeout: 248 seconds]
astrobu__ has joined #ruby
Pupp3tm4st3r has joined #ruby
astrobun_ has quit [Ping timeout: 244 seconds]
Coldblackice has quit [Ping timeout: 240 seconds]
but3k4 has joined #ruby
merida has quit [Quit: Leaving...]
moeabdol has quit [Ping timeout: 260 seconds]
Pupp3tm4st3r has quit [Ping timeout: 268 seconds]
mg^ has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
vondruch has joined #ruby
Guest86774 has quit [Quit: Lost terminal]
hanmac has joined #ruby
unseatingbread has quit [Ping timeout: 250 seconds]
Pupp3tm4st3r has joined #ruby
nanoz] has joined #ruby
bricker has joined #ruby
decaff has joined #ruby
merida has joined #ruby
ukazap has joined #ruby
godzillaenlacasa has joined #ruby
aryaching has joined #ruby
nanoz has quit [Ping timeout: 244 seconds]
blackgoat has quit [Quit: WeeChat 1.4]
blackmesa has quit [Ping timeout: 250 seconds]
nanoz] has quit [Read error: Connection reset by peer]
tvw has joined #ruby
Uo9er_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Spami has quit [Read error: Connection reset by peer]
Spami_ has joined #ruby
<norc> I have a set of objects that give me a slight delay when I try to invoke a not existing method. No method_missing was defined, and the only thing I can see being related to this is that deeper down in the instance variables there is a telnet connection somewhere that is a bit slow.
bricker has quit [Ping timeout: 248 seconds]
<norc> How can I sensibly get to the bottom of this?
nanoz] has joined #ruby
synthroid has joined #ruby
U7se6 has quit [Ping timeout: 248 seconds]
hs366 has joined #ruby
mg^ has joined #ruby
<andrewvos> use pry maybe
<shevy> weird error
third has joined #ruby
<shevy> do these objects read any data from a harddisc at runtime?
<andrewvos> how slight of a delay
torarne has quit [Quit: Leaving.]
aryaching_ has joined #ruby
freakcoder has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
patrick_star_2 has joined #ruby
nanoz] has quit [Ping timeout: 276 seconds]
patrick_star has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby
tk__ has joined #ruby
guest805 has joined #ruby
decaff has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
emilkarl has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 276 seconds]
chouhoul_ has joined #ruby
emilkarl has joined #ruby
rapha has joined #ruby
<rapha> Hi!
<rapha> Is it possible that the return value of such an expression: "(plans & plan_types[locale.to_sym]).empty?" has changed somewhere between Ruby 1.8 and 2.3?
<darix> rapha: you would need to tell us the types of the variables
chouhoulis has quit [Ping timeout: 252 seconds]
<rapha> darix: sorry, plans is an array containing integers. plan_types is a hash containing arrays containing integers. locale may be a string or a symbol.
bronson has joined #ruby
guest805 has quit [Ping timeout: 248 seconds]
JohnBat26 has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
ukazap has quit [Read error: Connection reset by peer]
stannard has quit [Ping timeout: 268 seconds]
arlek has quit [Ping timeout: 248 seconds]
<darix> uhm
hs366 has quit [Quit: Leaving]
freakcoder has quit [Quit: Leaving.]
Pupp3tm4st3r has joined #ruby
jottr has joined #ruby
<rapha> darix: i'm trying to figure out why in the world I wrote "unless (plans & plan_types[locale.to_sym]).empty?" and expected it to get me into the unless's block when "plans" contained the right number or numbers.
blackmesa has joined #ruby
drptbl_ has quit [Quit: My MAC has gone to sleep. zZz..]
Pupp3tm4st3r has quit [Remote host closed the connection]
liquid-silence has joined #ruby
liquid-silence has joined #ruby
nfk|laptop has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<rapha> hmm wait it does exactly what it's supposed to do, and even does it correctly
* rapha hates debugging his own years-old self
<shevy> rapha hah
<shevy> I hate doing rewrites of large old codebases the most
ukazap has joined #ruby
guest805 has joined #ruby
decaff has joined #ruby
<ddv> u love it
<ddv> it makes u feel like a special snowflake
<shevy> it takes so much time away!
<adaedra> that's why you're stuck with ISO-8859-1 and CGI?
<rapha> hmm
tvw has quit [Remote host closed the connection]
<rapha> i would actually *love* to be able to rewrite this whole thing. just i wanna be paid to do it. but i'm only being paid to maintain it.
drptbl has joined #ruby
guest8051 has joined #ruby
guest805 has quit [Ping timeout: 244 seconds]
<norc> adaedra: Things are really dire when you turn around and your collegue is pulling out a brand new PDH service unit out of the closet as a replacement... that is when you look at your outdated codebase and still smile.
<shevy> adaedra why do you write "stuck"?
MrDoctor has joined #ruby
freakcoder has joined #ruby
<shevy> rapha I found that especially in the late stage of a rewrite, I tend to more readily throw away the few things that seem too boring to still port
<rapha> lol
skade has quit [Quit: Computer has gone to sleep.]
<rapha> shevy: let's call it "evolution through minimisation"
decaff has quit [Ping timeout: 248 seconds]
<shevy> for instance, I once had a disco prompt in something that interactively reads user input
<shevy> but I question how useful this really is...
jottr has quit [Ping timeout: 276 seconds]
polysics_ has quit []
davee_ has quit [Ping timeout: 252 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
meinside has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
safe has joined #ruby
lxsameer has quit [Quit: Leaving]
callen92 has joined #ruby
JohnBat26 has joined #ruby
nocontrol has quit []
skade has joined #ruby
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Changing host]
zotherstupidguy has joined #ruby
rahc has joined #ruby
<rahc> $ sudo su -c 'RAILS_ENV="production" RAILS_ROOT="/srv/www/obs/webui/" rake -v --trace db:setup' www-data
<rahc> This account is currently not available.
<rahc> wut?
<rahc> how can I get more useful information about what rake is failing to do?
<rahc> I've searched the web and the rake documentation but I can't find anything helpful
merida has quit [Remote host closed the connection]
freerobby has joined #ruby
<rahc> hmm$ sudo su -c 'RAILS_ENV="production" RAILS_ROOT="/srv/www/obs/webui/" ls' www-data
<rahc> This account is currently not available.
<rahc> nm :-)
irick has quit [Ping timeout: 260 seconds]
thomasfedb_ has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 244 seconds]
irick has joined #ruby
brixen_ has quit [Ping timeout: 260 seconds]
Dreamer3 has quit [Ping timeout: 260 seconds]
<n1colas> o/
drptbl has joined #ruby
merida has joined #ruby
jaruga has quit [Ping timeout: 244 seconds]
matp has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
lessless has joined #ruby
thomasfedb has joined #ruby
thomasfedb has joined #ruby
Chagel has joined #ruby
sesquipedalian has joined #ruby
Dreamer3 has joined #ruby
brixen has joined #ruby
mnms_ has joined #ruby
tvw has joined #ruby
Uo9er_ has quit [Ping timeout: 248 seconds]
Dreamer3 has quit [Max SendQ exceeded]
Dreamer3 has joined #ruby
matp has joined #ruby
nanoz] has joined #ruby
baweaver has joined #ruby
Xeago has quit [Remote host closed the connection]
vondruch_ has joined #ruby
gbgdev has quit [Remote host closed the connection]
<rapha> darix: shevy: figured it out. Apparently the code wasn't really at fault, but I was being too intolerant about time and didn't take into account that the user's clock might be out of sync with the server's clock.
mr_robot_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
third has quit [Ping timeout: 260 seconds]
<mnms_> Hi. I use sambal gem and I get "Unknown Process Failed!! (can't get Master/Slave device)". What could be the cause ? Permission problem ?
baweaver has quit [Ping timeout: 248 seconds]
<mnms_> I get this when I try to connect to samba resource
xaxisx has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
joxer has joined #ruby
mfaeh has joined #ruby
davedev24 has joined #ruby
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gbgdev has joined #ruby
aupadhye has quit [Ping timeout: 248 seconds]
shredding has joined #ruby
joonty has quit [Ping timeout: 268 seconds]
Pupp3tm4st3r has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
freakcoder has quit [Quit: Leaving.]
<shevy> rapha a simple bug is a better bug than a heisenberg schroedinger-cat bug!
hogetaro_ has quit [Quit: Leaving...]
freakcoder has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
liquid-silence has joined #ruby
liquid-silence has joined #ruby
<shevy> mnms_ I don't think many people here know how the sandal gem works
Xeago has joined #ruby
nerium has joined #ruby
<mnms_> shevy: I was counting that someone use this gem :)
<mnms_> shevy: this line is problematic
<mnms_> PTY.spawn("COLUMNS=#{options[:columns]} smbclient \"//#{options[:host]}/#{options[:share]}\" '#{options[:password]}' -W \"#{options[:domain]}\" -U \"#{options[:user]}\" -p #{options[:port]}")
xaxisx has quit [Quit: xaxisx]
dionysus69 has joined #ruby
astrobu__ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
hs366 has joined #ruby
MrDoctor has quit [Quit: Konversation terminated!]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
merida has quit [Remote host closed the connection]
vondruch_ has quit [Quit: Ex-Chat]
vondruch has joined #ruby
Xeago_ has joined #ruby
yeticry_ has joined #ruby
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
anagha_ has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> mnms_ it is best to build up into a variable, then output it so that all these interpolations are replaced
Xeago has quit [Ping timeout: 268 seconds]
GriffinHeart has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
Xeago_ has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 268 seconds]
third has joined #ruby
<norc> Hi. Given these two (simplified) tables, how can I select all ports, left joining only the last (largest by id) port_data rows? https://gist.github.com/anonymous/d94c5e3e069e2f81ff4f
<norc> Oh. Wrong channel indeed.
solars_ has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby
rbennacer has joined #ruby
malconis has joined #ruby
guest805 has joined #ruby
nanoz] has quit [Ping timeout: 276 seconds]
guest8051 has quit [Ping timeout: 252 seconds]
swills has joined #ruby
GriffinHeart has quit []
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
jrafanie has joined #ruby
Pupp3tm4st3r has joined #ruby
victortyau has joined #ruby
drptbl has joined #ruby
grill has joined #ruby
`tim` has joined #ruby
stannard has joined #ruby
freerobby has quit [Quit: Leaving.]
Acontius has joined #ruby
skweek has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
bluOxigen_ has joined #ruby
CloCkWeRX has joined #ruby
guest805 is now known as unseatingbread
freakcoder has quit [Quit: Leaving.]
yeticry has joined #ruby
sdothum has quit [Client Quit]
RegulationD has joined #ruby
emilkarl has joined #ruby
sdothum has joined #ruby
blandflakes has joined #ruby
davedev2_ has joined #ruby
bluOxigen has quit [Ping timeout: 268 seconds]
griffindy has joined #ruby
kith_ is now known as kith
davedev__ has joined #ruby
freakcoder has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
ferr has joined #ruby
yeticry_ has joined #ruby
paatala_bhairavi has joined #ruby
paatalaBhairavi has joined #ruby
paatalaBhairavi has quit [Client Quit]
paatala_bhairavi has quit [Read error: Connection reset by peer]
hxegon has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
davedev2_ has quit [Ping timeout: 250 seconds]
aegis3121 has joined #ruby
davedev__ has quit []
davedev24 has joined #ruby
eurialo has joined #ruby
whippythellama has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
pietr0 has quit [Quit: pietr0]
devoid has quit [Quit: Leaving]
moeabdol has quit [Quit: WeeChat 1.4]
Xeago has joined #ruby
zarubin has joined #ruby
qhp_ has joined #ruby
SenpaiSilver_ has joined #ruby
aryaching_ has quit [Read error: Connection reset by peer]
idle_task has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
bricker has joined #ruby
idletask has quit [Ping timeout: 268 seconds]
Abrin_AWAY has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
SenpaiSilver_ has quit [Max SendQ exceeded]
dgncn has quit [Ping timeout: 244 seconds]
qhp has quit [Ping timeout: 244 seconds]
SenpaiSilver_ has joined #ruby
aryaching has joined #ruby
ruind has joined #ruby
emilkarl has quit [Read error: Connection reset by peer]
haylon has joined #ruby
norc has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
hxegon has quit [Ping timeout: 252 seconds]
zarubin has quit [Quit: leaving]
zarubin has joined #ruby
zarubin has quit [Client Quit]
bricker has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
dgncn has joined #ruby
freerobby has joined #ruby
emilkarl has joined #ruby
spintronic has joined #ruby
Chagel has quit [Ping timeout: 248 seconds]
jgpawletko has joined #ruby
poerror has quit [Ping timeout: 268 seconds]
Snowy has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
Snowy has joined #ruby
hxegon has joined #ruby
joonty has joined #ruby
Skelz0r has quit [Ping timeout: 268 seconds]
skweek has quit [Ping timeout: 276 seconds]
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
FooMunki has quit [Client Quit]
codecop has quit [Remote host closed the connection]
FooMunki has joined #ruby
jottr has joined #ruby
poerror has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
Snowy has quit [Ping timeout: 276 seconds]
spintronic has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 276 seconds]
VeryBewitching has joined #ruby
tvw has quit [Read error: Connection reset by peer]
iamvery has quit [Ping timeout: 276 seconds]
poerror has quit [Ping timeout: 260 seconds]
<VeryBewitching> G'day folks.
fullofcaffeine has joined #ruby
bry4n_ has joined #ruby
cpup has joined #ruby
freakcoder has quit [Quit: Leaving.]
tk__ has quit [Quit: ばいばい]
Snowy has joined #ruby
nando293921 has joined #ruby
iamvery has joined #ruby
andikr has quit [Remote host closed the connection]
andrewvos has quit [Ping timeout: 244 seconds]
* Acontius waves at VeryBewitching
bronson has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
roshanavand has joined #ruby
kies has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 250 seconds]
LiquidInsect has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 276 seconds]
LiquidInsect has joined #ruby
freerobby has quit [Quit: Leaving.]
bronson has quit [Ping timeout: 252 seconds]
krz has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
daivyk has joined #ruby
nando293921 has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Karix has joined #ruby
dionysus69 has joined #ruby
hxegon has joined #ruby
<shevy> <yorickpeterse> omg stop casting spells on us
mrmortondk has joined #ruby
ruind has quit [Ping timeout: 260 seconds]
spintronic has joined #ruby
victortyau has quit [Quit: Leaving]
beergineer has joined #ruby
crowell has quit [Ping timeout: 268 seconds]
mallu has joined #ruby
<beergineer> hey, what's the difference between class A; def self.method; end ;end and class << self; def method; end; end? What are the use common use cases of each?
saneax is now known as saneax_AFK
fostertheweb has joined #ruby
kam270 has quit [Ping timeout: 244 seconds]
freakcoder has joined #ruby
tjohnson has joined #ruby
DaniG2k has joined #ruby
spintronic has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
<workmad3> beergineer: between those examples? nothing (they both define a method on the singleton class of A). `class << self` lets you do some extra stuff though, like `class A; class << self; attr_accessor :foobar; end; end` for setting up A.foobar and A.foobar=
DmitryBochkarev has joined #ruby
gbgdev has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
roshanavand has quit [Quit: This computer has gone to sleep]
crowell has joined #ruby
Xentil has joined #ruby
idle_task is now known as idletask
<beergineer> workmad3: hmmn, but can't I do the same with to class A; attr_accesor :foobar; end as well?
<beergineer> beergineer: is it just a matter of syntax preference or there's more into it?
emesa has quit [Ping timeout: 268 seconds]
maletor has joined #ruby
<workmad3> beergineer: that would define foobar and foobar= on instances of A, not on A itself
Xeago has joined #ruby
<beergineer> workmad3: aahh, that make sense. thanks
<workmad3> beergineer: or, in normal convention, A#foobar and A#foobar= rather than A.foobar and A.foobar= :)
Xeago has quit [Remote host closed the connection]
spintronic has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
<beergineer> workmad3: so, class A; def self.foobar=(x); end; def self.foobar; end; end is the same as class << self attr_accessor :foobar ;end?
andrewvos has joined #ruby
<workmad3> beergineer: essentially, yes
pawnbox has quit [Remote host closed the connection]
<beergineer> workmad3: gotcha, wonderful. One blunder cleared :)
iamvery has quit [Ping timeout: 240 seconds]
freakcoder has quit [Quit: Leaving.]
pawnbox has joined #ruby
iamvery has joined #ruby
<rik> anyone wanna build me a marginally-custom gem?
riotjones has quit []
marxarelli has joined #ruby
zz_flazz is now known as flazz
flazz has left #ruby ["WeeChat 1.4"]
<rik> or teach me how?
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
krz has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
polishdub has joined #ruby
halfamind has joined #ruby
rippa has joined #ruby
tomatoes has joined #ruby
merida has joined #ruby
axl_ has quit [Quit: axl_]
[afk]chocoelho is now known as chocoelho
baweaver has joined #ruby
resin has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
frustrum has quit [Ping timeout: 248 seconds]
hogetaro has joined #ruby
krz has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
aegis3121 has joined #ruby
freakcoder has joined #ruby
<andrewvos> what
<andrewvos> ?
skade has joined #ruby
chocoelho is now known as [afk]chocoelho
_stu_ has joined #ruby
mnms_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
baweaver has quit [Ping timeout: 240 seconds]
[afk]chocoelho is now known as chocoelho
vondruch_ has joined #ruby
spintronic has quit [Quit: Mutter: www.mutterirc.com]
uglybandersnatch has joined #ruby
chocoelho is now known as [afk]chocoelho
vondruch has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
roshanavand has joined #ruby
bricker has joined #ruby
<EdwardIII> sorry for the baity question but... is there a rough consensus on which tool to use to get a nice new version of ruby running? i've used chruby on my app, but i'm now preparing ansible (and maybe cap) jobs to deploy into prod
hxegon has quit [Ping timeout: 260 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
<apeiros> EdwardIII: no
platzhirsch has quit [Quit: Leaving.]
<EdwardIII> so just pick one and use it then i guess
uglybandersnatch has quit [Ping timeout: 260 seconds]
<apeiros> there's rough consensus that you should use one of (I think) 3, but there's little to no consensus on which to use
<havenwood> EdwardIII: Usually one only needs a single version of Ruby in production so there's no need for a Ruby version switcher. A nice modern package manager Ruby is preferred. Or you can ruby-install to /usr/local with: ruby-install --latest --system
madhatter has joined #ruby
<apeiros> I think chruby is nowadays the most "advertized"
<havenwood> And best! :P
<apeiros> I myself use rvm and am happy with it
<EdwardIII> hrm with ubuntu lts i'm not going to get a nice modern version fo ruby
Snowy_ has joined #ruby
platzhirsch has joined #ruby
<apeiros> and rbenv is the one I hear about the thirdmost about it. not sure about how good it is.
<havenwood> EdwardIII: Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<EdwardIII> one thing about chruby that i'm not so wild about, everyone seems to use it as root-by-default, whereas local::lib and virtualenv are always my-user-by-default
shinnya has joined #ruby
<apeiros> and +1 re havenwood's ruby-install if you're on a prod box which only needs a single ruby
<havenwood> EdwardIII: Create a .ruby-version file.
<EdwardIII> (or perlbrew might be a better comparision)
<EdwardIII> apeiros: ruby-install... without chruby?
<EdwardIII> apeiros: and just install as root?
<apeiros> EdwardIII: not necessarily as root. havenwood certainly has a better idea there.
x77686d has joined #ruby
<EdwardIII> mmm brightbox looks like quite a nice solution
<havenwood> EdwardIII: ruby-install --system to install Ruby into /usr/local (where it will be in your PATH)
<havenwood> EdwardIII: Brightbox is a nice solution!
Snowy has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
<rik> andrewvos: oops. sorry - just switched back. HAve you seen sqlcipher? It's a fork of sqlite that adds some pragma commands to deal with block encryption on the whole database.
zotherstupidguy has quit [Quit: WeeChat 1.3]
[afk]chocoelho is now known as chocoelho
ukazap has quit [Ping timeout: 268 seconds]
<rik> i would very much like to make use of this with Sequel.
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has left #ruby [#ruby]
<rik> it *should* be as simple as linking against the sqlcipher libraries and using their headers, with no code changes - at least from me browsing the C headers last night.
reprazent has quit [Ping timeout: 244 seconds]
<rik> but i've never made a ruby gem before, and it's not what i want to get side-tracked learning right now.
aganov has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 248 seconds]
p0p0pr37 has quit [Ping timeout: 244 seconds]
agit0 has joined #ruby
mfaeh has quit [Remote host closed the connection]
slawrence00 has joined #ruby
<EdwardIII> yeah let's use brightbox hehe
woodruffw has joined #ruby
* EdwardIII uninstalls chruby
iamvery has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
DaniG2k_ has joined #ruby
neilhwatson has joined #ruby
`tim` has joined #ruby
gbgdev has joined #ruby
DaniG2k has quit [Ping timeout: 264 seconds]
nfk|laptop has quit [Quit: yawn]
Pupp3tm4st3r has joined #ruby
kies has joined #ruby
Felix444 has quit [Quit: Leaving]
hxegon has joined #ruby
<manveru> EdwardIII: nix :)
<andrewvos> chruby is the best
<andrewvos> it's never given me even the tiniest bit of a problem
Skelz0r has joined #ruby
<havenwood> :)
dhollinger has joined #ruby
<andrewvos> also ruby-install
* manveru uses nix-shell + direnv for all development
jas02 has quit [Quit: jas02]
<manveru> and nix + nixops for deployment
<andrewvos> don't listen to manveru
<andrewvos> <3
synthroid has quit [Remote host closed the connection]
washt has joined #ruby
<duderonomy> are there use cases where rbenv has pain points that do not exist in chruby ?
<andrewvos> use rbenv if you want to be unhappy
Abrin_AWAY has quit [Ping timeout: 260 seconds]
<andrewvos> probably don't use a version manager in production though
<andrewvos> actually definitely don't
<manveru> why's that?
DaniG2k_ has quit [Quit: leaving]
cdg has joined #ruby
DaniG2k has joined #ruby
Snowy_ has quit [Ping timeout: 240 seconds]
<andrewvos> cause then your provisioning becomes more painful?
<manveru> :)
<rik> hm
djbkd has joined #ruby
Snowy has joined #ruby
nando293921 has joined #ruby
<manveru> yours, sure
<andrewvos> unless you like working with ansible or puppet or whatever is in vogue atm
<rik> y'know those times where you realize ... maybe you've been going about something the wrong way?
<manveru> i specify even the checksums for the gems i use
<rik> i think i just realized that.
snockerton has joined #ruby
<havenwood> duderonomy: Having to reshim, slowness when shimming over so much that rbenv ships with a C ext replacing a shell builtin, shipping it's own openssl ignoring your package manager's, etc.
weemsledeux has joined #ruby
rahc has left #ruby [#ruby]
<havenwood> its*
<andrewvos> doesn't sound like fun that manveru :)
<andrewvos> is nix-shell nice/
<andrewvos> ?
<manveru> i wrote https://github.com/manveru/bundix for that
mleung has joined #ruby
<manveru> sure, it basically gives you completely separate environments for each project
<duderonomy> thanks havenwood
freerobby has quit [Quit: Leaving.]
<andrewvos> sounds nice
CloCkWeRX has quit [Ping timeout: 276 seconds]
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
unreal has quit [Quit: Very funny Scotty. Now beam down my clothes!]
<manveru> and direnv has the `use nix` directive, which makes it start automatically when you cd into the directory
mikhael_k33hl has quit [Remote host closed the connection]
safe has quit [Quit: Leaving]
<andrewvos> how does it isolate apps?
<manveru> from there i spawn a tmux for each project
<andrewvos> I mean dependencies
<manveru> it builds them and stores them in /nix/store
<manveru> each dependency is hashed so there are no collisions
Abrin_AWAY has joined #ruby
<andrewvos> so, like, this uses a package manager or it has its own?
freakcoder has quit [Quit: Leaving.]
<manveru> so you can build nokogiri against 5 different libxml versions and just use a specific one
<andrewvos> it's not using containers is it?
<manveru> no, just an insane amount of symlinks
<manveru> and yes, it uses the nix package manager
<manveru> i'm also running NixOS, but was using the same before on Void Linux and OSX
fostertheweb has quit [Quit: Textual IRC Client: www.textualapp.com]
<manveru> and this way my development and deployment flow really nicely :)
<manveru> no need for containers
b|ackwolf has joined #ruby
emilkarl has joined #ruby
<b|ackwolf> is there any name for #{} token?
<havenwood> I thought it was trolling when I first saw that rbenv was replacing realpath with a C extension... but nope: https://github.com/rbenv/rbenv/tree/master/src
<andrewvos> very cool
<andrewvos> imagine it would be hard if you're freelance and jumping around a few projects though
<adaedra> b|ackwolf: interpolation?
<EdwardIII> i'm working iwth ansible
<EdwardIII> switched from chef, i've had some good results
<manveru> andrewvos: yeah, it's probably not for the faint of heart
<b|ackwolf> adaedra, not the subject. I mean a name for the symbol.
platzhirsch has joined #ruby
<EdwardIII> i'd go insane without some kind of tool like that to bring systems into sync
ixti has joined #ruby
<b|ackwolf> adaedra, like, hash rocket =>.
<manveru> andrewvos: but i like making nixops definitions of a clients deployment and run them in a container or virtualbox locallyy
mleung has quit [Quit: mleung]
<EdwardIII> man i've not even heard of nix package manager
<EdwardIII> brew-killer!?
<manveru> mostly it's just stuff like {services = {redis.enable = true; memcached.enable = true; ...}
<EdwardIII> that's be nice, there's been a big gap for something like this in the 'market' for a loooong time
DoubleMalt has quit [Remote host closed the connection]
<manveru> EdwardIII: yeah, osx support is better than ever :)
<EdwardIII> i'm kinda married to brew now though
<manveru> understandable
<manveru> it also doesn't have a lot of brews packages yet
dikaio has joined #ruby
<manveru> and you need a case sensitive drive
resin has quit [Remote host closed the connection]
whippythellama has quit [Ping timeout: 246 seconds]
whippythellama has joined #ruby
kobain has joined #ruby
astrobun_ has quit [Remote host closed the connection]
dikaio_ has joined #ruby
Uber|Dragon has joined #ruby
<manveru> i should write some tutorials for ruby :)
dikaio has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 240 seconds]
<rik> well ... damn
<rik> looks like i was going about things the hard way.
andrewvos has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
Xeago has joined #ruby
digitalcakes has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axl_ has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unreal has joined #ruby
Pupp3tm4st3r has joined #ruby
`tim` has joined #ruby
kappy has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
pawnbox_ has joined #ruby
norc has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
dikaio_ has quit [Ping timeout: 260 seconds]
jgpawletko has left #ruby [#ruby]
merida has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
merida has joined #ruby
Abrin_AWAY has quit [Ping timeout: 268 seconds]
d0nn1e has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
amclain has joined #ruby
mfaeh has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TvL2386 has quit [Quit: Ex-Chat]
d0nn1e has joined #ruby
dikaio has joined #ruby
atmosx has quit [Quit: This is aparting message!]
chocoelho is now known as [afk]chocoelho
<shevy> manveru oh i see you have found the gobolinux way :) though granted that nixos is more sophisticated
`tim` has joined #ruby
dikaio has quit [Max SendQ exceeded]
<manveru> shevy: yeah :)
<manveru> nixos is gobolinux done right
Xeago has quit [Remote host closed the connection]
dikaio has joined #ruby
<manveru> also, it's less dead
mostlybadfly has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 276 seconds]
mark3 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :QUIT :Leaving."]
dopamean_ has joined #ruby
frustrum has joined #ruby
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
babblebre has joined #ruby
Snowy has quit [Remote host closed the connection]
beergineer has quit [Ping timeout: 252 seconds]
stunder001 has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
callen92 has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
fostertheweb has joined #ruby
dgncn has quit [Excess Flood]
callen92 has joined #ruby
jottr has joined #ruby
bluOxigen_ has quit [Ping timeout: 246 seconds]
olspookishmagus has quit [Ping timeout: 246 seconds]
dgncn has joined #ruby
andrewvos has joined #ruby
bluOxigen has joined #ruby
ixti has quit [Quit: WeeChat 1.4]
mallu has joined #ruby
ixti has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
aryaching has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
iamvery has joined #ruby
mistermocha has joined #ruby
mrgrieve1 has joined #ruby
<crayon> how can i run wpscan for example as a hosted service that end users can call from a web page?
siaw has joined #ruby
nerium has quit [Quit: nerium]
fullofcaffeine has quit [Remote host closed the connection]
<apeiros> crayon: I've seen this question before and pondered to answer. in case you wonder why nobody replies, here's why that's probably the case:
mrgrieves has quit [Ping timeout: 264 seconds]
<apeiros> the question is far too broad
<apeiros> it's similar to the famous "how do I build a videogame" question.
<crayon> i disagree. i think it's quite straightforward. i want to host a command line tool, wpscan namely, as a web accessible service.
<apeiros> ok then, here a similarly broad answer as your question:
<siaw> hello. i want to write a method that will do execute e method after say every hour without using #sleep. this is what i have so far. https://gist.github.com/siaw23/3e3f6a6e97b14ef42b01 how can i accomplish this easy task?
<siaw> that will execute a method****
<crayon> i'm not sure how to go about doing this because wpscan is a cli ruby tool and is not normally deployed as a web service
<apeiros> build a webapp using any of the many available frameworks, then run either shell out to the executable from it, or use the library code directly.
mrgrieve1 has quit [Quit: leaving]
<crayon> that answers my question
BrianJ has joined #ruby
<apeiros> *then either shell out to run… - somehow when rearranging the phrase, the word kept stuck.
<apeiros> crayon: you can disagree with me all you want - fact is you didn't get an answer. and there's usually two options for that: nobody knows, or your question is bad.
<andrewvos> there's probably a french word for that
<shevy> siaw you can use .send to invoke a method on any given object
SenpaiSilver_ has quit [Quit: Leaving]
<apeiros> s/.send/.public_send/ please
<apeiros> siaw: what's that arbitrary "without sleep" requirement?
<siaw> apeiros: i want to do the same thing, prolly with a “more effiecient” method than #sleep if there is
DaniG2k has quit [Quit: leaving]
<apeiros> what makes you think sleep was inefficient?
<shevy> sleep is very efficient
<shevy> it does nothing but wait for the specified duration!
<apeiros> it actually does something - it informs the scheduler that it doesn't need to be scheduled. which makes it tons better than a busyloop.
<siaw> apeiros: i was thinking, that if i use this in my code. and there are say 20million users on my site using this method, i’ll have some problems, no?
<apeiros> if 20 million users hit that code, then yes, and then you're doing something wrong. you want to background that.
<apeiros> things like sidekiq, resque etc. are your friends for that
<siaw> exactly! that’s why i asked. i’m no expect (not yet :p)
<siaw> thanks anyway apeiros and shevy :)
tamole has joined #ruby
bluOxigen_ has joined #ruby
<apeiros> siaw: but do you have 20mio users? or will it be 2?
bronson has joined #ruby
<siaw> apeiros: 0 users actually. i’m just playing :D :D
<apeiros> also - users? so that code is in a webapp?
<siaw> apeiros: i’m trying to use the Twitter api to post to a twitter account from a list of tweets, after say each hour
zacts has quit [Remote host closed the connection]
<apeiros> and from where? cli app? webapp? something else?
<siaw> cli app
trinaldi has quit [Ping timeout: 250 seconds]
<apeiros> then you won't have 20mio users
<siaw> no i won't
<siaw> it’s a test app
<apeiros> you'll have precisely *one*
<siaw> i’m building it slowly
<siaw> from cli
Snowy has joined #ruby
<siaw> later to web
bluOxigen has quit [Ping timeout: 248 seconds]
<siaw> so i’m learning to build the api client by testing functionality first, in the cli and later to heroku
tomchapin has joined #ruby
ferr has quit [Ping timeout: 260 seconds]
<apeiros> siaw: ok. then I'd make sure you cleanly separate the scheduling part from the API interaction part.
bronson has quit [Ping timeout: 252 seconds]
<siaw> and if i do separate it, that’s when sidekiq comes in right?
<apeiros> whichever scheduler works on heroku.
<apeiros> heroku will probably be the limiting factor there. so best you figure out what will work there and what won't.
crameth_ has quit [Read error: Connection reset by peer]
<siaw> cool
<siaw> :)
elifoster has joined #ruby
yqt has joined #ruby
sneakerhax has joined #ruby
davee_ has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
djbkd has quit [Remote host closed the connection]
crowell has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
joxer has quit [Remote host closed the connection]
mfaeh has quit []
bluOxigen has joined #ruby
bluOxigen_ has quit [Read error: Connection reset by peer]
andrewvos has quit [Ping timeout: 268 seconds]
scepticulous has quit [Ping timeout: 248 seconds]
andrewvos has joined #ruby
roshanavand has quit [Ping timeout: 248 seconds]
trinaldi has joined #ruby
htmldrum has joined #ruby
bezhermoso has joined #ruby
peteykun has joined #ruby
tubulife- has joined #ruby
nerium has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
decaff has joined #ruby
nerium has quit [Client Quit]
aegis3121 has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
crowell has joined #ruby
crowell has joined #ruby
washt has quit [Ping timeout: 246 seconds]
joonty has quit [Quit: Leaving]
blackmesa has joined #ruby
freakcoder has joined #ruby
minimalism has joined #ruby
woodruffw has quit [Ping timeout: 276 seconds]
washt has joined #ruby
bMalum has joined #ruby
aufi has quit [Ping timeout: 244 seconds]
Karunamon has joined #ruby
agit0 has joined #ruby
snockerton has quit [Quit: Leaving.]
rodfersou is now known as rodfersou|lunch
chouhoul_ has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
fullofcaffeine has joined #ruby
Sucks has joined #ruby
woodruffw has joined #ruby
poerror has joined #ruby
tomatoes has quit [Ping timeout: 268 seconds]
pietr0 has joined #ruby
tamole has quit [Quit: bye]
chouhoulis has quit [Ping timeout: 244 seconds]
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kalopsian has joined #ruby
lxsameer has joined #ruby
mallu has joined #ruby
andrewvos has quit [Ping timeout: 250 seconds]
bzb has joined #ruby
freakcoder has quit [Quit: Leaving.]
bzb has quit [Remote host closed the connection]
djbkd has joined #ruby
terminal_ has joined #ruby
baweaver has joined #ruby
Couch has quit [Ping timeout: 264 seconds]
choke has joined #ruby
washt has quit [Ping timeout: 276 seconds]
agit0 has quit [Quit: zzzZZZ….]
washt has joined #ruby
weemsledeux has joined #ruby
symm- has joined #ruby
infra-red has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
wldcordeiro has quit [Ping timeout: 240 seconds]
aspiers has quit [Ping timeout: 246 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
aegis3121 has joined #ruby
optimaleatscout has joined #ruby
baweaver has quit [Remote host closed the connection]
aspiers has joined #ruby
Uo9er_ has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
GreyHands has quit [Quit: Textual IRC Client: www.textualapp.com]
dionysus69 has quit [Ping timeout: 260 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Xeago has joined #ruby
Devalo has joined #ruby
joonty has joined #ruby
SenpaiSilver has joined #ruby
tubulife- has quit [Ping timeout: 260 seconds]
<Devalo> I'm making a little hangman game, where I want to reveal the letters of the word once the player guesses the right letter. I have a method called reveal_some_of_word with puts @word.gsub(@word, "-" * @word.length). How can I change one of the '-' to the correct letter?
boontdustie has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 268 seconds]
chouhoul_ has quit [Remote host closed the connection]
<canton7> instead of substituting @word, instead substitute only letters which the user hasn't guessed yet
<shevy> Devalo many ways. one is to store your word as array instead
<darix> @word.gsub(/[^#{guessed_letters}]*/, '-')
<canton7> alternatively, loop through each letter in the word, and either add it or "-" to the string to display the user
chouhoulis has joined #ruby
<darix> maybe
<darix> @word.gsub(/[^#{guessed_letters}]*/g, '-')
<darix> you will find out
joonty has quit [Quit: Leaving]
bronson has joined #ruby
Karix has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Karix has joined #ruby
emilkarl has joined #ruby
emilkarl is now known as emilkarl[away]
emilkarl[away] is now known as emilkarl
emilkarl is now known as emilkarl[away]
emilkarl[away] is now known as emilkarl
emilkarl is now known as emilkarl[away]
emilkarl[away] has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 276 seconds]
drale2k has quit [Quit: ZNC - http://znc.in]
tvw has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
aegis3121 has joined #ruby
siaw has quit [Quit: siaw]
maner has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
Uber|Dragon has quit [Ping timeout: 246 seconds]
bMalum has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 246 seconds]
<Devalo> darix: thanks. First one is almost working.
baweaver has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<darix> Devalo: before setting guessed_letters i would check if it is actually contained in @word
wreet has joined #ruby
<Devalo> darix: yep. I'm calling this method after I've checked that the word contains the letter
SCHAAP137 has joined #ruby
<apeiros> Devalo: str.tr("^#{guessed}", "-")
<apeiros> similar to gsub
evidex has quit [Ping timeout: 276 seconds]
stunder001 has quit [Ping timeout: 252 seconds]
Xeago has quit [Read error: Connection reset by peer]
<apeiros> fexilal: interesting at least
wreet has quit [Quit: Leaving]
symm- has joined #ruby
Mon_Ouie has joined #ruby
<Devalo> apeiros: Didnt know about tr. That's fantastic. Thanks.
weemsledeux has joined #ruby
nofxx has joined #ruby
blackmesa has joined #ruby
triangles has quit [Quit: Leaving]
jackjackdripper has joined #ruby
Elenka has joined #ruby
<Elenka> What's the website called
<Elenka> where you can check
<Elenka> internet
<Elenka> etc
<Elenka> internet flaws etc like security
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
mox has joined #ruby
freakcoder has joined #ruby
<apeiros> Elenka: https://cve.mitre.org ?
rbennacer has joined #ruby
trinaldi has quit [Ping timeout: 246 seconds]
pec has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
rodfersou|lunch is now known as rodfersou
elifoster has quit [Ping timeout: 248 seconds]
diegoviola has joined #ruby
<halfamind> Hi. I am curious if anyone's customized IRB to be copy+paste-able into runnable Ruby. E.g., with the outputs printed as comments.
<halfamind> Alternatively, I'd love to get pointers to help me build such a thing.
rbennacer has quit [Ping timeout: 260 seconds]
<halfamind> (I find myself editing IRB transcripts to be syntax-highlightable and runnable as ruby.)
<apeiros> halfamind: a) use pry, b) in both pry & irb you can change the printed value
codecop has joined #ruby
codecop_ has joined #ruby
mr_robot_ has joined #ruby
stunder001 has joined #ruby
_ChiefAlexander has joined #ruby
drale2k has joined #ruby
wldcordeiro has joined #ruby
_ChiefAlexander has quit [Client Quit]
_blizzy_ has joined #ruby
<halfamind> apeiros: Thanks, interesting. I've done a little IRB customization for https://github.com/joeyAghion/console_color, but didn't see clear ways to reach into all of the output formatting.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> halfamind: for irb, http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html has some pointers. search for inspect mode
ChiefAlexander has joined #ruby
<apeiros> for pry, just read the wiki. iirc it has an entry on how to modify the inspect mode.
shredding has quit [Ping timeout: 248 seconds]
<halfamind> Thanks will check it out.
anagha_ has quit [Quit: Connection closed for inactivity]
GioVdK has quit [Ping timeout: 244 seconds]
choke has joined #ruby
<apeiros> hm, interesting. seems I never updated my pryrc the way I did my irbrc. I had "=> <inspect>" replaced with "# => <inspect>" back in irb days.
zast has quit [Remote host closed the connection]
<apeiros> which would actually be exactly what you're asking for.
woodruffw has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Ping timeout: 244 seconds]
stunder001 has quit [Ping timeout: 248 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<halfamind> Yes, exactly. Plus, would need to modify the prompt, and maybe a few other things.
WebDawg has quit [Ping timeout: 240 seconds]
trinaldi has joined #ruby
hyperdrive has quit [Quit: ZNC - http://znc.in]
mr_robot_ has quit [Quit: Textual IRC Client: www.textualapp.com]
stunder001 has joined #ruby
mox has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
ruby2016 has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
Pupp3tm4st3r has joined #ruby
poerror has quit [Ping timeout: 240 seconds]
davedev24 has quit [Remote host closed the connection]
<ruby2016> basically I get errors with this $ ruby 212e.rb input | ruby 212e2.rb | cmp input && echo 'It works!'
last_staff has joined #ruby
<apeiros> "I get errors" is a horribly bad description.
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> when you get errors - *always* gist the full exception.
<manveru> ruby2016: and then ping Ox0dea :)
janzo has joined #ruby
firstdayonthejob has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<apeiros> oh. wow. til /[[] && []]/
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> how come I never knew that?
<Zarthus> apeiros: as a regex?
<Zarthus> to me that seems redundant :P
hyperdrive has joined #ruby
<apeiros> Zarthus: useful if one is a negation and the other isn't
<apeiros> though…
<Zarthus> yeah, that's not a valid regex
<apeiros> it is
<Zarthus> I get warnings
<apeiros> >> "hello" =~ /[[^aeiou] && [a-z]]/
<ruby[bot]> apeiros: # => 0 (https://eval.in/537669)
<Zarthus> ooh, it's not supposed to be used as empty
ChiefAlexander has joined #ruby
<riceandbeans> headius: I'm not sure about the jruby version, it's loading as a jar if that changes anything
siaw has joined #ruby
<riceandbeans> drbrain: I can't post the yaml file because it has secrets in it needed for the vendor software
<Zarthus> >> Regexp.new('[[^aeiou] && [a-z]]').to_s
<apeiros> ruby2016: ok, I guess the problem is not important to you.
* apeiros off
<Zarthus> ruby[bot]: :(
kriskropd has quit [Quit: WeeChat 0.4.2]
<apeiros> grmbl, I need to fix that
<Zarthus> => "(?-mix:[[^aeiou] && [a-z]])"
<Zarthus> can't say I've come across that before
ruby[bot] has left #ruby ["leaving"]
ruby[bot] has joined #ruby
<apeiros> Zarthus: try again
<Zarthus> >> Regexp.new('[[^aeiou] && [a-z]]').to_s
<ruby[bot]> Zarthus: # => "(?-mix:[[^aeiou] && [a-z]])" (https://eval.in/537680)
cjbottaro has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<apeiros> (?-mix: … ) is // with -imx flags
<apeiros> (?mix: … ) would be //mix
mallu has joined #ruby
kriskropd has joined #ruby
kriskropd has quit [Changing host]
kriskropd has joined #ruby
<Zarthus> ah, of course. I thought it was a special keyword
igam has quit [Ping timeout: 264 seconds]
<apeiros> >> a = /foo/m; b = /bar/i; c = /#{a}#{b}/; [a, b, c]
<ruby[bot]> apeiros: # => [/foo/m, /bar/i, /(?m-ix:foo)(?i-mx:bar)/] (https://eval.in/537683)
<apeiros> ergh
<apeiros> >> a = /foo/m; b = /bar/i; c = /#{a}#{b}/; [/#{a}/, /#{b}/, c]
<ruby[bot]> apeiros: # => [/(?m-ix:foo)/, /(?i-mx:bar)/, /(?m-ix:foo)(?i-mx:bar)/] (https://eval.in/537684)
Snowy has quit [Remote host closed the connection]
<apeiros> there :)
<fexilal> o nice
<apeiros> allows you to compose regexen
<apeiros> very handy.
weemsledeux has joined #ruby
<apeiros> that's the way I build my ~20 line regexen (where I have them - so far only irc & email)
<Zarthus> I feel like I've written too much PCRE that I don't appreciate whatever special regex ruby might support
<apeiros> I'm not even sure it's special
<apeiros> (?:) is non-capturing in most
solars has quit [Ping timeout: 268 seconds]
<Zarthus> I don't think [[] && []] is in PCRE
<apeiros> and I could imagine that (?flags-negflags:…) is also supported by others. I don't know, though.
kriskropd has quit [Client Quit]
<apeiros> ah, yeah, that might well not be PCRE :)
<ruby2016> Hey Im sorry for my bad english, can someone help me out with this https://www.reddit.com/r/dailyprogrammer/comments/341c03/20150427_challenge_212_easy_r%C3%B6varspr%C3%A5ket/cqqc85a
IrishGringo has joined #ruby
skade has joined #ruby
<ruby2016> I keep getting an error for '$ ruby 212e.rb input | ruby 212e2.rb | cmp input && echo 'It works!''
SenpaiSilver has quit [Ping timeout: 244 seconds]
poerror has joined #ruby
* apeiros rolls eyes
<darix> apeiros: for things like parsing protocols ... he mentioned a tool that takes RFC ebnf and outputs validation code https://www.youtube.com/watch?v=GenjU6iRb6o
<apeiros> darix: for protocols I tend to stick with smaller regexen and use strscan
AlexRussia has joined #ruby
<darix> apeiros: just validating email addresses with regexp can be fun already :p
<apeiros> oh, it is
kriskropd has joined #ruby
<apeiros> I have a list of emails my regex rejects
kriskropd has quit [Client Quit]
jenrzzz has joined #ruby
ruby2016 has quit [Quit: Page closed]
<apeiros> specifically emails with comments (valid), with whitespace (valid) with only a local part (valid), and some others
<apeiros> and in the default config it only validates the length of the domain name, not the format. instead of doing that it does a dns lookup for AAAA, A, C and MX.
kobain has quit [Ping timeout: 260 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sauvin has quit [Read error: Connection reset by peer]
toretore has joined #ruby
Vlat- has joined #ruby
arlek has joined #ruby
elaptics is now known as elaptics`away
spider-mario has joined #ruby
rbennacer has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Vlat-> hi! sorry for maybe newbie question, but is there a way in Ruby to pass same argument to multiple functions? Like ->> in Clojure or .Set method in C# (or with statement in pascal flavors) ?
crowell has quit [Ping timeout: 276 seconds]
emilkarl has joined #ruby
x77686d has quit [Quit: x77686d]
bronson has joined #ruby
arlek has quit [Ping timeout: 244 seconds]
solars has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
jenrzzz_ has joined #ruby
wreet has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<Ox0dea> Vlat-: We tend to just chain method calls.
ldnunes has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
<riceandbeans> quick question, anyone here used monit/god/bluepill?
jenrzzz has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 252 seconds]
<riceandbeans> I've used monit/god and I'm just curious about opinions on bluepill in comparison to them
<Vlat-> Ox0dea: thx
Pupp3tm4st3r has quit [Quit: Leaving...]
Xeago has joined #ruby
<Ox0dea> >> 0.upto(Float::INFINITY).lazy.map { |x| x * x }.select(&:even?).take(10).reduce(:+)
<ruby[bot]> Ox0dea: # => 1140 (https://eval.in/537686)
callen92 has quit [Quit: Leaving]
<Ox0dea> Vlat-: There's a translation of the first example from https://clojuredocs.org/clojure.core/-%3E%3E
<riceandbeans> clojure?!?!
<Papierkorb> And I thought Erlang has insane syntax
<riceandbeans> I failed pretty bad at clojure, also leinengen runtimes made me cry
<Papierkorb> erlang is still worse though
<Ox0dea> riceandbeans: Drip helps.
<riceandbeans> drip?
<Vlat-> Ox0dea: in fact I did the same in my ruby project. Just missed a neat clojure-ish "->" macro in ruby. But blocks do the same in fact, just with other syntax
crowell has joined #ruby
<riceandbeans> I think clojure is just too functional for my brain
<Ox0dea> riceandbeans: For running on a persistent JVM.
<riceandbeans> ah
LoneHerm_ has joined #ruby
<Ox0dea> Ruby is extremely functional if you want it to be.
<riceandbeans> I found rust much easier to comprehend
ldnunes has joined #ruby
haylon_ has joined #ruby
<riceandbeans> I tried ocaml too, had a hell of a time with that
<riceandbeans> you can't write ruby like you can something in the ML family
<Ox0dea> How do you mean?
<riceandbeans> or if you can, I've never seen it or heard of it
<Vlat-> riceandbeans: I think clojure is just too functional for my brain
<Vlat-> high five :)
<Vlat-> I love clojure, but I caught myself, that I'm spending three hours of thinking, about how to write function the most functional way
<riceandbeans> Vlat-: I'm not saying I dislike clojure, I'm just saying I couldn't get it when I tried, I'll probably come back to it later, for now though my free time is learning rust
<riceandbeans> rust is kinda functional but not full on ML functional
yqt has quit [Ping timeout: 264 seconds]
<Ox0dea> I feel like you must not be doing Ruby right if you find yourself with so tenuous a grasp of functional programming. :(
<Vlat-> In ruby I can do the same thing in 15 minutes.
<Vlat-> But... after clojure ruby seems too imperative. :)
siaw has quit [Ping timeout: 260 seconds]
haylon has quit [Ping timeout: 260 seconds]
<Ox0dea> Vlat-: The translation I posted is "functional" in every meaningful sense of the term.
IrishGringo has joined #ruby
poerror has quit [Ping timeout: 260 seconds]
<Ox0dea> Ruby just gives us what feels like a firmer foundation (objects).
siaw has joined #ruby
[Butch] has joined #ruby
yuung has joined #ruby
olspookishmagus has joined #ruby
polishdub has quit [Quit: Leaving]
<Vlat-> Ox0dea: oh, I didn't meant to offend Ruby :) It's my most favorite non-esoteric lang. :) And I completely agree with that functional code can be written in Ruby. It's all about language expressiveness.
KanKava has joined #ruby
KanKava has left #ruby [#ruby]
KanKava has joined #ruby
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Ox0dea> You done done it now. What's your favorite esolang?
maletor has joined #ruby
<Vlat-> Ox0dea: well... Common Lisp :)
<Ox0dea> Cheeky. :P
<yuung> why is lisp an esoteric language?
<Vlat-> prefix notation maybe
<Vlat-> but after couple of weeks it become your best friend, in fact
crowell has quit [Ping timeout: 276 seconds]
merida has quit [Remote host closed the connection]
<yuung> Vlat- i would argue that it's been around too long to be an esoteric language
<yuung> Vlat- /used by a lot of institutions. but idk, it's a subjective term
dopamean_ has quit [Quit: WeeChat 1.3]
<Vlat-> yuung: well, IMHO "esoteric" term is only a question of belief. If someone feels comfortable with brainf*ck - it's can't count as "esoteric" for such one. I rely on wikipedia, which counts lisp-family as "esoteric"
<Ox0dea> ?
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
blandflakes has joined #ruby
bakedb has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
_blizzy_ has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
jackjackdripper has joined #ruby
blandflakes has quit [Client Quit]
<Vlat-> btw, never supposed, that my dumb question about stacking methods will cause such polemic. :)
<Ox0dea> Vlat-: Do you read Wikipedia in a language other than English?
<Vlat-> Ox0dea: yep, it was in russian section
fexilal has quit [Ping timeout: 246 seconds]
<Vlat-> functional programming -> russian
crowell has joined #ruby
zapata has quit [Quit: WeeChat 1.4]
freakcoder has quit [Quit: Leaving.]
baweaver has quit [Ping timeout: 250 seconds]
<Ox0dea> Vlat-: https://eval.in/537692
zapata has joined #ruby
<Ox0dea> (->> cake have eat)
<Vlat-> btw, my bad. I re-read russian version of FP now, and can't find a mention about lisp family is esotheric.
stunder001 has quit [Ping timeout: 276 seconds]
<Ox0dea> Do be careful about turning your biases into "facts".
jackjackdripper has quit [Quit: Leaving.]
mostlybadfly has quit [Quit: Connection closed for inactivity]
jackjackdripper has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
<Vlat-> I was 100% sure. But too much (or few) coffee can make a bad favor for one like me
<Vlat-> sorry for disinformation anyway
skade has quit [Quit: Computer has gone to sleep.]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
ChiefAlexander has joined #ruby
_blizzy_ has joined #ruby
woodruffw has quit [Ping timeout: 264 seconds]
<Vlat-> Ox0dea: the code you sent is just great :) hope I can master ruby such way one day :)
<Ox0dea> Shame about the backslashes. :\
<Ox0dea> Could just mush it all on one line, but that's not as powerful an illusion.
IrishGringo has quit [Ping timeout: 248 seconds]
<Vlat-> really, almost oneliner turn ruby into lisp-dialect, it's awesome
<Vlat-> I did read "Metaprogramming Ruby 2 (2nd edition)" couple of month ago, but never suppsed that method_missing can be used such interesting way
<Ox0dea> #method_missing is Voldemort.
cdg has quit [Remote host closed the connection]
<djellemah> Ox0dea: why do you regard objects as a firmer foundation? (I have some ideas along those lines, but I'm curious to hear your thinking)
woodruffw has joined #ruby
<Ox0dea> djellemah: It's difficult to say precisely, and I do realize that all the paradigms are equivalently powerful.
<Ox0dea> Just kinda feels like there's some implicit structure to begin molding.
digitalcakes has quit [Quit: Leaving.]
dionysus69 has joined #ruby
bjpenn has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
blandflakes has joined #ruby
<Ox0dea> If your thinking's the other way round, I'm interested. :)
crowell has quit [Ping timeout: 276 seconds]
uglybandersnatch has joined #ruby
Xeago has joined #ruby
WebDawg has joined #ruby
tomatoes has joined #ruby
<Ox0dea> Vlat-: More chameleon code: https://eval.in/537695
<Vlat-> about objects... in CL there's CLOS, which is one of the most advanced object model. In functional pardigm.
skade has joined #ruby
<djellemah> In one sentence - objects have an inside and an outside.
<Vlat-> Ox0dea: you rock. :)
uglybandersnatch has quit [Ping timeout: 244 seconds]
davedev2_ has joined #ruby
<Ox0dea> ^_^
stunder001 has joined #ruby
<Ox0dea> djellemah: I suppose that's fair, but closures do the same thing; it's just the wall "feels" thinner.
PedramT has joined #ruby
<Ox0dea> To my mind, at any rate.
bjpenn has quit [Ping timeout: 276 seconds]
hxegon is now known as hxegon_AFK
jbueza has joined #ruby
crowell has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
<djellemah> After that an object can be used in many ways - as a closure over a specified subset of values (the params to initialize), as auto-multi-monad (every method can take a block), as partially-applied function (and relatedly as a locus for memoisation), as a container for state.
bakedb has joined #ruby
nano- has joined #ruby
stunder001 has quit [Ping timeout: 260 seconds]
<Ox0dea> This Ruby thing sounds really good! :)
Mon_Ouie has quit [Ping timeout: 244 seconds]
U7se6 has joined #ruby
wreet has quit [Quit: Leaving]
<nano-> Trying to use rdoc to document a some C bindings that are split across multiple files. Noticed that it's broken - only a fraction of the methods are included in the docs. Tried workaround to cat everything into the same file which does generate docs for everything, but everything is in the top level namespace rather than in sub modules.
davedev24 has joined #ruby
emilkarl_ has joined #ruby
<Vlat-> about memoisation... can Ruby play into laziness? :)
<djellemah> But I also find it difficult to say precisely.
fostertheweb has joined #ruby
<nano-> I found this workaround from 2013 - https://jmkeyes.github.io/post/using-rdoc-with-ruby-c-extensions/ .. but that looks hacky - hoping there's another way.
yqt has joined #ruby
<nano-> or is it fine to define the same module multiple times?
emilkarl has quit [Ping timeout: 246 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Uo9er_ has quit [Ping timeout: 268 seconds]
<Ox0dea> nano-: Reopening a module is totally kosher.
darkf has joined #ruby
_stu_ has quit [Quit: _stu_]
<Ox0dea> Ah, but you're talking about invoking rb_define_module() with the same name.
platzhirsch has joined #ruby
<djellemah> Vlat-: class Locus; def lazy; @lazy ||= :some_value end end is one way to do memoisation (except the value is nil). There are also lazy collections see docs for Enumerable#lazy
<djellemah> *when the value is nil
<Ox0dea> Vlat-: Memoization is quite different from laziness, mind, but Ruby certainly supports both.
<nano-> Ox0dea: yeah.. if that can exist there without the ifdef. I would like to avoid the ifdef there if possible to remove extra noise for the buildsystem.
<nano-> But maybe that messes up the type system.
marxarelli is now known as marxarelli|afk
bjpenn has joined #ruby
<Vlat-> djellemah & Ox0dea thx
<Ox0dea> nano-: TFA explains why this hack is necessary, but I couldn't say whether it's since been obviated.
choke has joined #ruby
<Ox0dea> (Probably not. :P)
emilkarl_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Vlat-> really apreciate your help for newbie.
siaw has quit [Quit: siaw]
<Vlat-> and a final question. Is there anything like lisp "macros" in Ruby, to completely fsck up with AST ? :)
<nano-> Ox0dea: TFA? I understand the workaround - was just hoping for a better solution. And lack of one, I was pondering if it would be an issue to define the top module always - rather than only for rdoc - thus avoiding the ifdef. But I guess I could just try it out instead of bothering people here with silly questions.
Snowy has joined #ruby
stunder001 has joined #ruby
baweaver has joined #ruby
<Ox0dea> nano-: TFA is "the fuzzy article".
aegis3121 has joined #ruby
bjpenn has quit [Ping timeout: 276 seconds]
fmcgeough has joined #ruby
<Ox0dea> Since RDoc doesn't understand C, you have to play by its rules and give it an rb_define_module() to match before it'll proceed to document the relevant methods.
huddy has quit [Quit: Connection closed for inactivity]
stunder001 has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
freakcoder has joined #ruby
duckpuppy has quit [Ping timeout: 268 seconds]
<Ox0dea> Vlat-: You can play with virtually everything but the AST.
<djellemah> Vlat-: No macros - http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/179642 but you can do a lot with method_missing and instance_eval and define_method and so on.
<adaedra> Poor C, no one understand it.
jackjackdripper has quit [Ping timeout: 252 seconds]
yuung has quit [Ping timeout: 248 seconds]
baweaver has quit [Remote host closed the connection]
washt has quit [Ping timeout: 248 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
<Vlat-> djellemah: I'll save this link. It describe Ruby by a few words, but worth a 100+ page book. :)
marxarelli|afk is now known as marxarelli
washt has joined #ruby
linoj has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
<djellemah> adaedra: C is OK, provided you have #include "ruby.h" :-p
<adaedra> hah.
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
stunder001 has joined #ruby
<Ox0dea> Vlat-: Memoization and laziness in a neat little bundle: https://eval.in/537715
Coldblackice has joined #ruby
<Ox0dea> It only calculates the next in the sequence when you ask it to (but it'll do so forever), and it uses Hash.new's block form (maybe my favorite method) to avoid re-computing known values.
<Vlat-> Ox0dea: now that was a quite 'functional' :)
jbueza has left #ruby ["Textual IRC Client: www.textualapp.com"]
hxegon_AFK has quit [Quit: BRB]
<Ox0dea> Vlat-: Ah, well, I am re-assigning `i` there, but close enough. :P
jottr has quit [Quit: WeeChat 1.4]
bjpenn has joined #ruby
wreet has joined #ruby
<ljames> any way to load a file (like 'require') as if it was typed directly into irb - keeping the local variables as is? some sort of instance_eval or module_eval?
<shevy> ljames not sure
<Ox0dea> ljames: Er, why not just `eval`? Also, please reconsider.
<shevy> you could have a look how irb loads ruby code
peteykun has quit [Remote host closed the connection]
agit0 has joined #ruby
stunder001 has quit [Ping timeout: 240 seconds]
<Vlat-> Ox0dea: however, I think we both can admit, that it's a dirty hack :)
<Papierkorb> ljames: *cough* binding.eval
<Ox0dea> Vlat-: No, I can't say I agree there.
<Vlat-> Ox0dea: yep, it works, but the whole language concept will protest about such code
freakcoder has quit [Quit: Leaving.]
<Ox0dea> Vlat-: I concede that it doesn't align terribly well with convention, but it's not out of place either.
<shevy> Ox0dea suggested eval before!
tomatoes has quit [Ping timeout: 268 seconds]
<Ox0dea> Papierkorb: That doesn't permit the introduction of new locals.
bluOxigen has quit [Ping timeout: 264 seconds]
Suntzu has quit [Read error: Connection reset by peer]
al2o3-cr has quit [Quit: WeeChat 1.4 %t]
skade has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Ping timeout: 260 seconds]
bjpenn has quit [Ping timeout: 264 seconds]
htmldrum has joined #ruby
<Ox0dea> >> foo = 1; binding.eval 'foo = 2; bar = 3'; [foo, (bar rescue :/)]
<ruby[bot]> Ox0dea: # => [2, :/] (https://eval.in/537731)
benlieb has joined #ruby
hamed_r has quit [Quit: Leaving]
jackjackdripper has quit [Quit: Leaving.]
al2o3-cr has joined #ruby
roshanavand has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
<adaedra> neat.
jackjackdripper has joined #ruby
baweaver has joined #ruby
callen92 has joined #ruby
<Ox0dea> The Elixir folks really like that stream operator; they use it in a lot of their artwork.
moeabdol has joined #ruby
<Ox0dea> (I don't blame them. :x)
wreet has quit [Changing host]
wreet has joined #ruby
yuung has joined #ruby
htmldrum has quit [Ping timeout: 268 seconds]
stunder001 has joined #ruby
aegis3121 has quit [Ping timeout: 248 seconds]
<Vlat-> Ox0dea: one know about Erlang^W Elexir! Can I ask you about your oppinion of the language?
Terens has joined #ruby
<Terens> hello
<Ox0dea> Vlat-: I don't know it past the surface.
<Terens> I am having a problem. I am trying to downgrade rubygems
<Terens> when I do everything brakes
bjpenn has joined #ruby
<Ox0dea> Terens: How come?
<Vlat-> Terens: please, define "everything". What exactly doesn't act as supposed to act?
blackmesa has joined #ruby
siaw has joined #ruby
<Terens> Sorry I am trying 4 hours to solve it
baweaver has quit [Remote host closed the connection]
swills has quit [Ping timeout: 244 seconds]
<Terens> rails:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
<Terens>         from /home/vagrant/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
<Terens>         from /home/vagrant/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
IrishGringo has joined #ruby
<Terens> whatever I call
<Terens> gem install X i get this
trinaldi has quit [Quit: WeeChat 1.5-dev]
stunder001 has quit [Ping timeout: 244 seconds]
jenrzzz_ has quit [Ping timeout: 240 seconds]
woodruffw has quit [Ping timeout: 264 seconds]
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
jenrzzz has joined #ruby
govg has joined #ruby
icey has quit [Remote host closed the connection]
icey has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Vlat-> Terens: gem install rubygems-update ?
poerror has joined #ruby
<Terens> didnt try that...
bjpenn has quit [Ping timeout: 276 seconds]
<Vlat-> or rvm reinstall <version> (it's all from stackoverflow, i did never faced such error)
<Vlat-> version is about your ruby runtime
Abrin_AWAY has joined #ruby
SG045734 has joined #ruby
SenpaiSilver has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
skade has joined #ruby
<Terens> this is the reason for downgrade
solars has quit [Ping timeout: 244 seconds]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
stunder001 has joined #ruby
linoj has quit [Quit: linoj]
washt has quit [Ping timeout: 248 seconds]
poerror has quit [Ping timeout: 260 seconds]
skade has quit [Client Quit]
siaw has quit [Quit: siaw]
digitalcakes has joined #ruby
infra-red has quit []
FooMunki has quit [Read error: Connection reset by peer]
washt has joined #ruby
mrgrieves has joined #ruby
al2o3-cr1 has joined #ruby
al2o3-cr is now known as Guest99750
Guest99750 has quit [Read error: Connection reset by peer]
al2o3-cr1 is now known as al2o3-cr
bjpenn has joined #ruby
nano- has left #ruby [#ruby]
jottr has joined #ruby
cjbottaro has joined #ruby
al2o3-cr has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
Suntzu has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
_stu_ has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
mistermo_ has joined #ruby
krz has quit [Ping timeout: 260 seconds]
solars has joined #ruby
bjpenn has quit [Ping timeout: 260 seconds]
callen92 has quit [Ping timeout: 244 seconds]
bjpenn has joined #ruby
wreet has left #ruby ["Leaving"]
hxegon has joined #ruby
ixti has joined #ruby
postmodern has quit [Quit: Leaving]
ur5us has joined #ruby
Vlat- has quit [Quit: Vlat-]
al2o3-cr has joined #ruby
Vlat- has joined #ruby
mistermo_ has quit [Ping timeout: 264 seconds]
gbgdev has quit [Remote host closed the connection]
freakcoder has joined #ruby
cdg has joined #ruby
pawnbox has joined #ruby
mistermo_ has joined #ruby
nando293921 has quit [Ping timeout: 252 seconds]
LoneHerm_ has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
aryaching_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
johnmilton has quit [Remote host closed the connection]
bronson has joined #ruby
djbkd has quit [Remote host closed the connection]
Xeago has joined #ruby
<darix> Terens: to which version of rubygems did you downgrade?
<darix> i would probably stick to the rubygems version that comes with 2.3
ldnunes_ has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
ldnunes has quit [Ping timeout: 252 seconds]
unseatingbread has quit [Ping timeout: 260 seconds]
<darix> Terens: tbh i would use tenderlove's monkey patch :p
rhg135 has quit [Read error: Connection reset by peer]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
LoneHerm_ has quit [Remote host closed the connection]
rhg135 has joined #ruby
rhg135 has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
mwlang has joined #ruby
rhg135 has joined #ruby
guest805 has joined #ruby
Sucks has quit [Remote host closed the connection]
siaw has joined #ruby
mistermo_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
<shevy> would someone stop patching those poor monkeys!
Karix has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
neilhwatson has quit [Quit: leaving]
kobain has joined #ruby
MalcolmReynolds has quit [Max SendQ exceeded]
IanMalcolm has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
Snowy has quit [Remote host closed the connection]
baweaver has joined #ruby
synthroid has quit []
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bricker has quit [Ping timeout: 240 seconds]
chrisja has joined #ruby
lemur has joined #ruby
guest805 has quit [Ping timeout: 240 seconds]
guest805 has joined #ruby
biberu has quit []
LoneHermit has joined #ruby
hxegon has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 246 seconds]
lemur is now known as baweaver
woodruffw has quit [Ping timeout: 248 seconds]
ChiefAlexander has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
third has quit [Read error: Connection reset by peer]
IrishGringo has quit [Ping timeout: 250 seconds]
codecop has quit [Quit: Išeinu]
codecop_ has quit [Quit: Išeinu]
poerror has joined #ruby
guest805 has quit [Ping timeout: 248 seconds]
mostlybadfly has joined #ruby
woodruffw has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
roshanavand has quit [Quit: This computer has gone to sleep]
rodfersou has quit [Quit: leaving]
varesa has quit [Remote host closed the connection]
bjpenn has quit [Ping timeout: 260 seconds]
aryaching_ has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
Xeago has quit [Remote host closed the connection]
guest805 has joined #ruby
poerror has quit [Ping timeout: 276 seconds]
bricker has joined #ruby
Xeago has joined #ruby
drptbl has joined #ruby
varesa has joined #ruby
_stu_ has quit [Quit: _stu_]
washt has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 244 seconds]
Uber|Dragon has joined #ruby
ChiefAlexander has joined #ruby
ldnunes_ has quit [Quit: Leaving]
jwinder has joined #ruby
bjpenn has joined #ruby
_stu_ has joined #ruby
Uo9er_ has joined #ruby
ctrlrsf has quit [Ping timeout: 268 seconds]
Cohedrin has joined #ruby
flopsec has quit [Ping timeout: 244 seconds]
Devalo has quit [Remote host closed the connection]
LoneHermit has quit [Remote host closed the connection]
U7se6 has quit [Ping timeout: 244 seconds]
bjpenn has quit [Ping timeout: 276 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
Don_John has joined #ruby
choke has joined #ruby
<jottr> How could I do something like this: User.find(1..10) ? < This is obviously not possible, but is there some similar construct?
ziyadb has quit [Quit: Connection closed for inactivity]
<Ox0dea> jottr: You... want the first 10 Users?
LoneHermit has joined #ruby
<jottr> Ox0dea: yep
<Ox0dea> jottr: I bet there's a dedicated method for that. ;)
<jottr> Ox0dea: you bet, or know?
<Ox0dea> jottr: Note the winky face.
rattatmatt has joined #ruby
freakcoder has quit [Quit: Leaving.]
<jottr> Ah. first takes a parameter
<jottr> ...
<jottr> Good to know. :)
<jottr> One more question:
<Ox0dea> jottr: I suppose that is a little surprising the first time round; #take is a little more appropriate without any context.
djbkd has joined #ruby
platzhirsch has quit [Ping timeout: 250 seconds]
<jottr> neat
flopsec has joined #ruby
<jottr> So, I do the following: F.all.each do |u| hsh = { uid: user.id }
<jottr> sorry. let me try again:
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<Ox0dea> Sounds like you might want #map.
<jottr> Foo.all.each do |f| hsh = { foo_id: foo.id, count: foo.users.count } end
<Ox0dea> Why count the users more than once?
skade has joined #ruby
ctrlrsf has joined #ruby
slash_nick is now known as slash_mode
<jottr> This is just a conrtived example. What I want is to iterate over Foo, and store each foo.id and the number of users associated with foo in a hash.
jzigmund has quit [Ping timeout: 244 seconds]
tvon has joined #ruby
vondruch_ has quit [Ping timeout: 260 seconds]
lsmola has quit [Ping timeout: 260 seconds]
gagrio has quit [Ping timeout: 268 seconds]
blackgoat has joined #ruby
jzigmund has joined #ruby
<jottr> Ox0dea: ^
<Ox0dea> jottr: Needs less contrivance.
fmcgeough has quit [Quit: fmcgeough]
flopsec has quit [Ping timeout: 244 seconds]
ctrlrsf has quit [Ping timeout: 268 seconds]
PedramT has quit [Remote host closed the connection]
johnmilton has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
[Butch] has quit [Quit: I'm out . . .]
kalopsian has quit [Ping timeout: 246 seconds]
tvw has quit [Remote host closed the connection]
johnmilton has quit [Ping timeout: 250 seconds]
mrgrieves has quit [Ping timeout: 276 seconds]
stannard has quit [Remote host closed the connection]
wreet has joined #ruby
wreet has joined #ruby
lsmola has joined #ruby
vondruch_ has joined #ruby
gagrio has joined #ruby
pawnbox has joined #ruby
jwinder has quit [Ping timeout: 268 seconds]
poerror has joined #ruby
fostertheweb has quit [Ping timeout: 246 seconds]
ruby312 has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
roshanavand has quit [Quit: This computer has gone to sleep]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uglybandersnatch has joined #ruby
<ruby312> not sure if this is the right place for this. new to Ruby. if I have multiple versions of rbenv installed. which is the appropriate directory if I'm using zshrc -- usr/local/bin or Users/admin?
RegulationD has joined #ruby
<adaedra> Multiple versions of _rbenv_? Why?
jottr has quit [Ping timeout: 244 seconds]
<ruby312> not sure how it happened...
<adaedra> Maybe you want to clean all this mess
<adaedra> Because it sounds like the best idea to have problems
johnmilton has joined #ruby
junixbr has joined #ruby
<junixbr> hi there
<ruby312> but I'm trying to upgrade my Ruby build and I'm not able to get access to the latest build...
Xentil has quit [Ping timeout: 268 seconds]
noway_ has quit [Ping timeout: 246 seconds]
<ruby312> so if I were starting from scratch what directory path would I use for rbenv?
<junixbr> I'm trying to install rails in my server, but when I try to install "gem install bundler", I've got the error: 'ERROR: While executing gem ... (OpenSSL::BNError) PRNG not seeded'
<junixbr> some tip?
coyo has quit []
<adaedra> You seem to be on a mac, I think homebrew (if you use it) can take care of installing it for you, iirc
<junixbr> doesn't matter my source
<junixbr> https or not
mintux has joined #ruby
<ruby312> yeah, used Homebrew, but still having the problem...
<adaedra> junixbr: you seem to have something eating your entropy or not having enough entropy source.
<ruby312> when I run `brew upgrade rbenv ruby-build` its not giving me access to all the builds... 2.3.0 is still the dev version...
RegulationD has quit [Ping timeout: 240 seconds]
<ruby312> need 2.3.0
<ruby312> getting 2.3.0-dev
<junixbr> adaedra: this is a chrooted environment
<adaedra> what does `which rbenv` gives, ruby312?
<adaedra> junixbr: have you mounted /dev in it or at least provided /dev/{,u}random ?
WebDawg has quit [Ping timeout: 276 seconds]
platzhirsch has joined #ruby
<junixbr> adaedra: I have no random
gregf has quit [Quit: WeeChat 1.4]
Noxilex has joined #ruby
flopsec has joined #ruby
<adaedra> junixbr: seems like this is your problem here. Either bind mount a /dev, either create {,u}random devices in your chrooted environment.
ctrlrsf has joined #ruby
<junixbr> adaedra: thanks, I'm gonna try
roshanavand has joined #ruby
<ruby312> not getting a path when I run 'which rbenv'
<adaedra> ruby312: try `/usr/bin/which rbenv`
<adaedra> should bypass the function
axl_ has quit [Quit: axl_]
<adaedra> anyway, I would recommend you to find and destroy all rbenv installed, then do a clean, brew controller install of it (or better — but I'm being partial here — switch to chruby)
baweaver has joined #ruby
<junixbr> adaedra: /proc/sys/kernel/random/entropy_avail is 167
SG045734 has quit [Ping timeout: 248 seconds]
<ruby312> getting /usr/local/bin/rbenv
davee_ has quit [Quit: Leaving]
Uber|Dragon has quit [Ping timeout: 264 seconds]
<adaedra> junixbr: if your chrooted environment has no access to the random device, this is no use
<junixbr> adaedra: ok
<junixbr> I'll fix it
<adaedra> ruby312: sounds like brew-controlled one. Did you try updating ruby-build too?
woodruffw has quit [Ping timeout: 252 seconds]
<ruby312> which is one of the paths I get when I curl rbenv-doctor...
stannard has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<ruby312> yep, ran 'brew update' first... then `brew upgrade rbenv ruby-build`
<adaedra> and still no 2.3.0 available in rbenv?
<ruby312> then `rbenv install -l`
<ruby312> nope only got 2.3.0-dev
<adaedra> and if you do rbenv install 2.3.0 anyway?
<ruby312> yep, threw and error.
guest8051 has joined #ruby
<adaedra> I don't remember rbenv well enough at this point.
<Ox0dea> Definitely a bug, right? https://eval.in/537751
<Ox0dea> Refinements aren't supposed to active for "indirect" invocations, but that seems pretty direct by my lights.
baweaver has quit [Ping timeout: 252 seconds]
<ruby312> I get this when I run `rbenv install 2.3.0` -- `ruby-build: definition not found: 2.3.0 The following versions contain `2.3.0' in the name: 2.3.0-dev rbx-2.3.0 See all available versions with `rbenv install --list'. If the version you need is missing, try upgrading ruby-build:`
stannard has quit [Ping timeout: 240 seconds]
<darix> junixbr: install haveged
<ruby312> also force uninstalled ruby-build and reinstalled. still no dice...
<junixbr> darix: in chroot?
<darix> on the host probably
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
<ruby312> got adaedra, thx for trying to help tho...
woodruffw has joined #ruby
<ruby312> got you adaedra, thx for trying to help tho...
<adaedra> ruby312: what I said about chruby (and its friend ruby-install) still holds :p
skade has joined #ruby
<ruby312> missed that part. could you repeat... :-)
braincrash has quit [Ping timeout: 276 seconds]
<adaedra> You can remove rbenv (and ruby-build) totally and switch to chruby+ruby-install.
<adaedra> It's even capable of using your rbenv installed rubies.
Xeago has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<ruby312> aha, got you. thx, I'll look into that.
guest805 has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
Atrox has quit [Ping timeout: 276 seconds]
platzhirsch has left #ruby [#ruby]
rvchangue has quit [Ping timeout: 248 seconds]
braincrash has joined #ruby
norc has quit [Ping timeout: 244 seconds]
DylanJ has quit [Ping timeout: 276 seconds]
Koshian has quit [Ping timeout: 276 seconds]
amclain_ has joined #ruby
hplar_ has joined #ruby
Karunamon has quit [Excess Flood]
badeball has quit [Ping timeout: 277 seconds]
iNeedHelp has joined #ruby
canton7_ has joined #ruby
zenlot has joined #ruby
badeball has joined #ruby
Karunamon has joined #ruby
FifthWall_ has joined #ruby
rvchangue has joined #ruby
tvon has quit [Remote host closed the connection]
hplar has quit [Ping timeout: 260 seconds]
UserInNeed has quit [Ping timeout: 260 seconds]
Koshian_ has joined #ruby
canton7 has quit [Ping timeout: 260 seconds]
FifthWall has quit [Ping timeout: 260 seconds]
zenlot6 has quit [Ping timeout: 260 seconds]
canton7_ is now known as canton7
FifthWall_ is now known as FifthWall
DylanJ has joined #ruby
tvon has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mintux has left #ruby [#ruby]
mleung has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
<shevy> ruby ruby ruby
<shevy> what is up with jhass ... he is so quiet since like 8 months... :(
haylon_ has quit [Read error: Connection reset by peer]
ChiefAlexander has quit [Remote host closed the connection]
amclain has quit [Ping timeout: 276 seconds]
Queeniebee has joined #ruby
tigarcia has joined #ruby
Elenka has quit [Quit: Page closed]
uglybandersnatch has quit [Ping timeout: 248 seconds]
dwyn has joined #ruby
Noxilex has quit [Ping timeout: 246 seconds]
<junixbr> adaedra: mount -o bind /dev /virtual/dev/ solve my problem
<junixbr> thank you
<darix> shevy: you scared jhass
<junixbr> thank you darix
<junixbr> =)
<darix> junixbr: uhm
<darix> junixbr: mknod would have been enough i think
<darix> with just dev/urandom
baweaver has joined #ruby
tvon has quit [Ping timeout: 268 seconds]
<darix> + /dev/null /dev/zero
_grill is now known as mane
<junixbr> darix: probably
<adaedra> depending on the requirements, the full bind may be quicker for the same results
<darix> adaedra: maybe
tvon has joined #ruby
<darix> i usually "chroot" apps with apparmor+syscall filter
<adaedra> if you have a chroot for security requirements, on the other hand, rather go for manual creation, sure
<adaedra> but at least, this could confirm what the problem is :)
<darix> i would still install haveged ... your entropy_avail was low
<darix> and it will help with that.
wldcordeiro has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
DylanJ has quit [Read error: Connection timed out]
DylanJ has joined #ruby
WebDawg has joined #ruby
freakcoder has joined #ruby
govg has quit [Ping timeout: 248 seconds]
<Ox0dea> Could've just twiddled his mouse a bit.
endash has quit [Quit: endash]
<Ox0dea> How many bits of entropy to the mickey?
govg has joined #ruby
<adaedra> Depends, they may be between a ssh.
<adaedra> behind*
kobain has quit [Ping timeout: 260 seconds]
htmldrum has joined #ruby
<Ox0dea> Mickeys on the Wire.
<darix> Minnie doesnt like when Mickey is on the wire. she always screams
Xeago has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
solocshaw has joined #ruby
LoneHermit has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
ruby312 has quit [Ping timeout: 252 seconds]
tigarcia has quit []
<adaedra> Bye
dwyn has quit [Remote host closed the connection]
rnda has joined #ruby
htmldrum has quit [Ping timeout: 260 seconds]
rnda has quit [Client Quit]
urunda has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
urunda is now known as rnda
zenlot6 has joined #ruby
LoneHermit has joined #ruby
ziyadb has joined #ruby
freakcoder has quit [Quit: Leaving.]
last_staff has quit [Quit: last_staff]
nando293921 has joined #ruby
zenlot has quit [Ping timeout: 244 seconds]
snockerton has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yuung has quit [Ping timeout: 268 seconds]
Mattx has joined #ruby
yuung has joined #ruby
jaruga has joined #ruby
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
weemsledeux has joined #ruby
Mattx has quit [Quit: Leaving]
bry4n_ has quit [Ping timeout: 276 seconds]
mrgrieves has joined #ruby
Queeniebee has quit [Remote host closed the connection]
Mattx has joined #ruby
baweaver has quit [Remote host closed the connection]
govg has quit [Ping timeout: 244 seconds]
gregf has joined #ruby
digitalcakes has left #ruby [#ruby]
uglybandersnatch has joined #ruby
rnda has quit [Ping timeout: 276 seconds]
junixbr has quit [Quit: Leaving]
govg has joined #ruby
yuung has quit [Ping timeout: 244 seconds]
Mattx has quit [Client Quit]
tvon has quit [Remote host closed the connection]
WebDawg has quit [Remote host closed the connection]
tvon has joined #ruby
wldcordeiro has joined #ruby
uglybandersnatch has quit [Ping timeout: 260 seconds]
uglybandersnatch has joined #ruby
jkahn has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
jottr has joined #ruby
_stu_ has quit [Quit: _stu_]
tvon has quit [Ping timeout: 244 seconds]
johnmilton has quit [Ping timeout: 260 seconds]
woodruffw has quit [Ping timeout: 248 seconds]
wldcordeiro has quit [Client Quit]
govg has quit [Ping timeout: 264 seconds]
Moosashi has joined #ruby
chrisja has quit [Quit: leaving]
jdreaver has joined #ruby
PlasmaStar has quit [Ping timeout: 240 seconds]
<jdreaver> I'm trying to use standalone_migrations to make a migration, and for some reason it ignores a "GRANT USAGE" command. Has anyone used this tool for GRANT USAGE?
woodruffw has joined #ruby
dikaio has quit [Ping timeout: 260 seconds]
tubulife- has joined #ruby
bezhermo_ has joined #ruby
mrgrieves has quit [Ping timeout: 244 seconds]
maletor has quit [Read error: Connection reset by peer]
bezhermoso has quit [Ping timeout: 244 seconds]
tvon has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
<lxsameer> how can i get time in microsecond
dikaio has joined #ruby
solars has quit [Ping timeout: 250 seconds]
rbennacer has quit [Remote host closed the connection]
aeterne has joined #ruby
<Ox0dea> >> Time.now.to_f # lxsameer
<ruby[bot]> Ox0dea: # => 1458170108.8641977 (https://eval.in/537770)
rbennacer has joined #ruby
<Ox0dea> Or even #to_r if you need Rationality.
rbennacer has quit [Remote host closed the connection]
<lxsameer> Ox0dea: thanks
<havenwood> >> time = Time.now; [time.to_f, time.tv_usec]
<ruby[bot]> havenwood: # => [1458170163.2357304, 235730] (https://eval.in/537771)
rbennacer has joined #ruby
jkahn has joined #ruby
kalopsian has joined #ruby
johnmilton has joined #ruby
rbennacer has quit [Remote host closed the connection]
<Ox0dea> Leaky.
DLSteve has joined #ruby
rbennacer has joined #ruby
intrigueD has joined #ruby
guest805 has joined #ruby
guest8051 has quit [Read error: No route to host]
intrigueD has quit [Changing host]
intrigueD has joined #ruby
<havenwood> >> time = Time.now; [time.usec, time.tv_usec, time.strftime('%6N').to_i]
<ruby[bot]> havenwood: # => [997169, 997169, 997169] (https://eval.in/537772)
U7se6 has joined #ruby
nullFxn has joined #ruby
rbennacer has quit [Ping timeout: 240 seconds]
PlasmaStar has joined #ruby
Uo9er_ has quit [Ping timeout: 240 seconds]
LoneHermit has quit [Remote host closed the connection]
woodruffw has quit [Ping timeout: 246 seconds]
nfk has joined #ruby
symm- has quit [Ping timeout: 252 seconds]
rattatmatt has quit []
<phredus> havenwood: Thank you very mudch for the help yesterday, the discussion with you helped me understand how rails is put together. I was able to get my system working well and without errors.
<phredus> I also found this great video https://www.youtube.com/watch?v=4DqzaqeeMgY detailed explanation of what Bundler does. Thanks again
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kam270 has joined #ruby
nullFxn has quit [Quit: leaving]
nano- has joined #ruby
<nano-> How do I convince rdoc to generate documentation for constants?
symm- has joined #ruby
<nano-> I like the default theme, but it doesn't emit any constants. If I change to another theme, I get constants - but they look nasty.
<nano-> Am I missing any option?
benlieb has quit [Quit: benlieb]
sondnm has joined #ruby
Gasher^ has joined #ruby
Gasher has quit [Ping timeout: 248 seconds]
woodruffw has joined #ruby
babblebre has joined #ruby
wldcordeiro has joined #ruby
jottr has joined #ruby
guest8051 has joined #ruby
<darix> tried yard or sdoc?
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
guest805 has quit [Ping timeout: 240 seconds]
platzhirsch has left #ruby [#ruby]
cdg has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 268 seconds]
gbgdev has joined #ruby
rkazak has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
woodruffw has quit [Ping timeout: 276 seconds]
n008f4g_ has quit [Ping timeout: 244 seconds]
<nano-> darix: yes, yard looked like crap. should look at sdoc then.
<nano-> darix: do you know of any page that reviews yard templates?
n008f4g_ has joined #ruby
<nano-> darix: sdoc doesn't emit constants either. although yard does.
marchelz1 has joined #ruby
mleung has quit [Quit: mleung]
htmldrum has joined #ruby
radgeRayden has joined #ruby
<marchelz1> hi, what is the point of the each_with_object method on Array? is there some in particular that makes it interesting/necessary, or is it just a convenience thing?
<marchelz1> s/some/something/
ljames has quit []
endash has joined #ruby
<havenwood> >> [].public_method(:each_with_object).owner
<ruby[bot]> havenwood: # => Enumerable (https://eval.in/537780)
yuung has joined #ruby
<marchelz1> ok, Enumerable
Pathfinder has joined #ruby
jaruga has quit [Quit: jaruga]
uglybandersnatch has quit [Ping timeout: 240 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<Ox0dea> marchelz1: It's "just" a convenience.
<Ox0dea> It's good for "pipelines" and the like.
wreet has quit [Ping timeout: 260 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yuung has quit [Client Quit]
<havenwood> marchelz1: When you want the same arbitrary object for each iteration that then gets returned at the end.
kobain has joined #ruby
<marchelz1> I see
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> And don't like mutable state without referential transparency.
rkazak has quit [Quit: Sleep.....ing....]
roshanavand has joined #ruby
CloCkWeRX has joined #ruby
tomatoes has joined #ruby
pawnbox has joined #ruby
Nawn has joined #ruby
ropeney has joined #ruby
jyaworski has joined #ruby
Nawn has quit [Client Quit]
roshanavand has quit [Client Quit]