dilated_dinosaur has quit [Ping timeout: 240 seconds]
NukePuppy has joined #ruby
sunya7a has joined #ruby
Takle_ has quit [Remote host closed the connection]
ddv has quit [Ping timeout: 245 seconds]
thiagofm has quit [Quit: Leaving.]
gigetoo has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 245 seconds]
b00stfr3ak has quit [Remote host closed the connection]
gigetoo has joined #ruby
Martxel has quit [Read error: Connection reset by peer]
ti-wali has quit [Remote host closed the connection]
thiagofm has joined #ruby
ddv has joined #ruby
shiggity__ has joined #ruby
russt has quit [Quit: russt]
russt has joined #ruby
mekajfire has quit [Ping timeout: 265 seconds]
maximski has quit []
thiagofm has quit [Client Quit]
KLVTZ has quit [Ping timeout: 265 seconds]
russt has quit [Quit: russt]
russt has joined #ruby
Doppp has quit [Quit: leaving]
mary5030 has quit [Remote host closed the connection]
Doppp has joined #ruby
baroquebobcat has joined #ruby
timonv has joined #ruby
mary5030 has joined #ruby
ghr has quit [Read error: Connection reset by peer]
ghr has joined #ruby
bradhe has joined #ruby
Doppp has quit [Client Quit]
dik_dak has quit [Quit: Leaving]
Doppp has joined #ruby
thiagofm has joined #ruby
dorei has quit []
timonv has quit [Ping timeout: 240 seconds]
shiggity__ has quit [Quit: shiggity__]
zorak8 has quit [Remote host closed the connection]
nateberkopec has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
<dideler>
when writing a gem and you want to use another gem to help development, do you put that in the gemfile or gemspec? e.g. i want to add the inch gem (https://rubygems.org/gems/inch) for docs coverage, but that doesn't need to be distributed with the gem
<Burgestrand>
dideler: add it as a development dependency
<Burgestrand>
dideler: to your gemspec
<Burgestrand>
dideler: not a runtime dependency, that's a different thing
baroquebobcat has quit [Quit: baroquebobcat]
GriffinHeart has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
nateberkopec has quit [Ping timeout: 240 seconds]
<dideler>
Burgestrand: thanks!
madmub has joined #ruby
madmub has quit [Client Quit]
zorak has joined #ruby
madmub has joined #ruby
abstrakt has joined #ruby
sunya7a has quit [Quit: leaving]
<madmub>
dideler: test
<dideler>
madmub: test
<madmub>
yay
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Ping timeout: 240 seconds]
russt has quit [Quit: russt]
russt has joined #ruby
mikepack has joined #ruby
abstrakt has quit [Quit: Leaving]
<dideler>
Burgestrand: is there a case when you would want to use the gemfile when writing your own gem?
<dideler>
or should it all go in the gemspec?
<Burgestrand>
dideler: I've used the Gemfile in the past for things that I considered "outside of gem development for contributors", but nowadays I'm not sure that was a good idea, and maybe I should put it all in the gemspec.
kalusn has quit [Remote host closed the connection]
yubrew has joined #ruby
<Burgestrand>
dideler: there's also the case where a gem is needed on a specific ruby distribution but not another. As far as I know, you can't solve that problem using the gemspec, but the Gemfile would allow you to only install gems for certain platforms/ruby engines.
dc has quit [Remote host closed the connection]
<dideler>
Burgestrand: i see. do you know what the reason is for using the gemspec file in the first place?
<dideler>
i've just been using it cause "how to write a gem" guides say so, but not sure the reason behind it
<dideler>
(as opposed to using the gemfile for dependencies i mean)
<Burgestrand>
dideler: well, in the past there was no bundler, so you needed a way to document what dependencies were needed for development of your gem, such as test framework and similar
<dideler>
ah
lethe has joined #ruby
<Burgestrand>
dideler: then bundler appeared, and we had another way of doing it, and frankly it's more flexible
radiofrequency has quit [Quit: radiofrequency]
Doppp has quit [Quit: leaving]
yubrew has quit [Ping timeout: 240 seconds]
<Burgestrand>
dideler: you can install development dependencies listed in your gemspec with `gem install yourgem --development`
gruz0[russia] has quit [Quit: This computer has gone to sleep]
Doppp has joined #ruby
thoolihan has quit [Ping timeout: 240 seconds]
Doppp has quit [Client Quit]
Doppp has joined #ruby
sdrew has joined #ruby
Doppp has quit [Client Quit]
nateberkopec has joined #ruby
russt has quit [Quit: russt]
russt has joined #ruby
Doppp has joined #ruby
Doppp has quit [Client Quit]
Doppp has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
dc has joined #ruby
ctp has joined #ruby
thoolihan has joined #ruby
geggam has quit [Remote host closed the connection]
<sdegutis>
Why would we use a gemspec?
<sdegutis>
Oh right, when writing a lib.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Doppp has quit [Quit: leaving]
phoo1234567 has quit [Remote host closed the connection]
Doppp has joined #ruby
Doppp has quit [Client Quit]
Doppp has joined #ruby
shevy has quit [Ping timeout: 276 seconds]
tectonic has quit []
charliesome has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
thiagofm has quit [Quit: Leaving.]
katmandoo has joined #ruby
gaboesquivel has quit [Remote host closed the connection]
fresham has joined #ruby
thoolihan has quit [Ping timeout: 240 seconds]
downtown has joined #ruby
linuxnewb2 has joined #ruby
shevy has joined #ruby
<shevy>
hey
robert__ is now known as robert_
ValicekB has quit [Ping timeout: 265 seconds]
matchaw has quit [Remote host closed the connection]
<dideler>
how do i add a development dependency to the gemspec and not autoload it (i.e. require: false)?
<Burgestrand>
dideler: there should be no autoloading in your gem
<dideler>
Burgestrand: so just adding it without the `require: false` should be sufficient?
<Burgestrand>
dideler: bundler has a feature that requires gems in the gemspec automatically, but you should not be using bundler in any of the files in lib/
<Burgestrand>
sorry, not the gemspec, the Gemfile, not sure how it handles the gemspec… either way it should not be a concern
zorak has quit [Remote host closed the connection]
JokerDoomWork has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
unixpro1970 has joined #ruby
Arkaniad|Laptop has joined #ruby
Kricir has joined #ruby
Mongey has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
gaboesquivel has joined #ruby
<poka>
homomorphic types considered harmful?
binaryhat has quit [Quit: Leaving]
The_NetZ has joined #ruby
spastorino has joined #ruby
<The_NetZ>
howdy
<havenwood>
g'evening
zorak has joined #ruby
Doppp has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
Kricir has quit [Ping timeout: 245 seconds]
dc has quit [Remote host closed the connection]
Mongey has joined #ruby
mr_snowf1ake has joined #ruby
HashNuke has quit [Read error: Connection timed out]
HashNuke has joined #ruby
oorst has quit [Quit: oorst]
dc has joined #ruby
Doppp has quit [Ping timeout: 252 seconds]
starfox_21 has quit [Quit: starfox_21]
<shevy>
benzrf cat on keyboard?
<benzrf>
i have no cat
<shevy>
I like homophobic types poka
oorst has joined #ruby
<benzrf>
most uses of cat are unnecessary anyway
dc_ has joined #ruby
timonv has joined #ruby
bradhe has joined #ruby
Kricir has joined #ruby
dc has quit [Ping timeout: 240 seconds]
Doppp has joined #ruby
test__ has quit [Ping timeout: 260 seconds]
Kricir_ has joined #ruby
radic has quit [Ping timeout: 245 seconds]
kitak has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 276 seconds]
chipotle has joined #ruby
kitak has joined #ruby
radic has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
oorst has quit [Quit: oorst]
<shevy>
lol
Kricir has quit [Ping timeout: 276 seconds]
Kricir_ has quit [Ping timeout: 276 seconds]
kitak has quit [Ping timeout: 256 seconds]
<dideler>
where should the ruby version for a project go? .ruby-version? Gemfile?
GriffinHeart has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
oorst has joined #ruby
<shevy>
I recommend a file called version.rb
<shevy>
this file should have the same main namespace as the project at hand
<havenwood>
.ruby-version
<dideler>
i guess if you were using a service like Heroku, you would (also) need it in the Gemfile? since i believe it would give a warning when building your app
<havenwood>
dideler: ya, for heroku
<dideler>
(i'm not using heroku now though)
<dideler>
aight
oorst has quit [Client Quit]
GriffinHeart has quit [Ping timeout: 252 seconds]
<Burgestrand>
dideler: for your gem?
<Burgestrand>
dideler: or a generic project?
<dideler>
Burgestrand: i was thinking generic project, but it really is for the gem. and in that case i think it should go in the gemspec, right
<dideler>
e.g. spec.required_ruby_version
<Burgestrand>
dideler: it depends, are you hining the version of ruby you are using for development, or are you locking down the version of ruby your gem can be installed on?
<Burgestrand>
s/hining/hinting/
nateberkopec has joined #ruby
<dideler>
i want to do both (though when i initially asked the question, i was thinking of the former)
yubrew has joined #ruby
<Burgestrand>
dideler: if you just want to hint at development ruby version, use .ruby-version as the others suggested (specifying it in bundler will raise an error if bundler is used with the wrong ruby version) — keep in mind that if you support multiple versions of ruby this recommendation does not make much sense to have in your gem
<Burgestrand>
dideler: however, if you *only* want users of ruby 2.0 to install your gem, but not users of ruby 1.9, you can use spec.required_ruby_version
<Burgestrand>
dideler: typically you'd use this if your gem uses features only available in newer versions of ruby
maestrojed has joined #ruby
maestrojed has quit [Client Quit]
<dideler>
Burgestrand: if my gem uses another gem that says, only supports ruby 1.9 and up, then would i have to add that version constraint in my gemspec?
<dideler>
s/says/say/
<Burgestrand>
dideler: no, rubygems will try to install your dependency when your gem is installed, and figure it out by itself if it's not possible
<dideler>
Burgestrand: awesome, thanks for the help
nateberkopec has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
<Burgestrand>
dideler: for example, if your dependency suddenly released a fix making it possible to use it on 1.8, you'd want to be able to use that new one as well if your gem was usable with 1.8 otherwise
<Burgestrand>
hypothetical scenario :)
brian___ has quit [Quit: brian___]
yubrew has quit [Ping timeout: 276 seconds]
<dideler>
yeah good point
rawGem has joined #ruby
radiofrequency has quit [Quit: radiofrequency]
dc_ has quit [Remote host closed the connection]
prepangolin has joined #ruby
dc has joined #ruby
Xeago has joined #ruby
poguez_ has joined #ruby
prepangolin has quit [Ping timeout: 240 seconds]
amargherio has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 240 seconds]
radiofrequency has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
maestrojed has joined #ruby
jhuang has joined #ruby
maestrojed has quit [Client Quit]
prepangolin has joined #ruby
<jhuang>
Is there any way to run Ruby code in isolation with eval() (or some other method)? (i.e. any global variables assigned to in that code are not visible in the calling program)
codezomb has joined #ruby
prepangolin has quit [Read error: Connection reset by peer]
prepangolin has joined #ruby
wallerdev has joined #ruby
oorst has joined #ruby
<jhuang>
Also, is the above possible with ERB?
<wallerdev>
yes
starfox_21 has joined #ruby
radiofrequency has quit [Quit: radiofrequency]
Vivekananda has joined #ruby
LexicalScope has quit [Ping timeout: 265 seconds]
toertore has quit [Quit: This computer has gone to sleep]
<Guest27789>
jhuang: there’s an option you can pass, I think it’s :stdin_data, but look it up, and if you don’t give the ruby process a filename, it will run the stdin data as a ruby program so you don’t have to save it to a file.
<jhuang>
Guest27789: Interesting - thank you.
<jhuang>
The cost (of execution) is effectively that of invoking another ruby interpreter instance from the first then, right?
milkohol has joined #ruby
<Guest27789>
jhuang: then just capture the output. In my case, I rendered the data to pass through YAML.
oorst has quit [Quit: oorst]
Doppp has joined #ruby
<Guest27789>
jhuang: yes, so it can be expensive if you’re running lots of these.
rm__ has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
rm_ has quit [Read error: No route to host]
bradhe has joined #ruby
maestrojed has quit [Client Quit]
<Guest27789>
jhuang: e.g. I was initially checking syntax in this lib by running `ruby -c`, and I check syntax *lots* of times. execution slowed down to seconds. Fortunately I found an awesome lib that could do it for me in the current process.
george2 has joined #ruby
LexicalScope has joined #ruby
<jhuang>
Thank you, Guest27789 - this was helpful. I was hoping there would be a nicer way to have that kind of isolation in-process within the same ruby interpreter instance (e.g. some way to use ERB's result() or otherwise eval() and specify: "give this code its own set of globals and functions, and any modification it does, is not reflected in my calling program"). Using open3 to run another ruby instance will have to do.
<ari-_-e>
do you really need to do this?
<Guest27789>
jhuang: You might be able to get that with Rubinius, but I doubt you could do such a thing in MRI
mercwithamouth has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 245 seconds]
thiagofm has joined #ruby
Doppp has quit [Ping timeout: 265 seconds]
<The_NetZ>
curiosity, what exactly is erb? I've seen it in my ruby bin folder, never had reason to use it though.
JokerDoomWork has joined #ruby
<jhuang>
ari-_-e: Yes. In the sense that I'm writing something that will at runtime load third-party code, and I want that third party code to not be able to effect/break/touch the ruby code that runs it (while giving it the flexibility to do things that $SAFE = 4 would not).
<ari-_-e>
ok
<jhuang>
Guest27789: I'll look into Rubinius too; thank you.
decoponio has joined #ruby
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
newUser1234 has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<jhuang>
Guest27789: One question regarding Open3's .popen3 method: the documentation indicates that it (as expected) takes the executable path for which to run. How do you determine what the Ruby interpreter on a given platform that is currently running is?
<Guest27789>
The_NetZ: Two things, one is a lib that lets you “Embed RuBy” (caps = erb) into documents, the way you might embed php into an html document. The one you see in your bin folder runs these files the same way the `php` command line program runs php files.
codezomb has joined #ruby
guilund has quit [Remote host closed the connection]
<jhuang>
Guest27789: Ah, I see. There's nothing in the Ruby standard library that yields that information, I guess?
Tricon has joined #ruby
<Guest27789>
jhuang: Not that I know of, but if you find something, let me know. Seems reasonable that there might be, now that you say it.
<Guest27789>
jhuang: Maybe try asking in #ruby-lang
nanoyak has joined #ruby
<jhuang>
Ah, apparently 'rbconfig' can be used to obtain that information. I don't know if that's part of the standard library, or a third party module.
Kricir has quit [Ping timeout: 276 seconds]
katmandoo has joined #ruby
yubrew has joined #ruby
oorst has joined #ruby
<jhuang>
File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) according to a cursory glance
cashnguns has quit [Read error: Connection reset by peer]
gaboesquivel has quit [Remote host closed the connection]
<Guest27789>
That’s at least partially old, I think they use RbConfig constant now instead of Config
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sivoais has quit [Ping timeout: 265 seconds]
LACP has quit [Ping timeout: 240 seconds]
starfox_21 has quit [Quit: starfox_21]
<Guest27789>
jhuang: nice, there’s some good info in there!
milkohol has joined #ruby
sivoais has joined #ruby
madmub has joined #ruby
LACP has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
jrhe has quit [Quit: Connection closed for inactivity]
nateberkopec has joined #ruby
stnly has quit [Ping timeout: 252 seconds]
jhn has joined #ruby
stnly has joined #ruby
newUser1_ has joined #ruby
Wolland has quit [Remote host closed the connection]
milkohol has quit [Client Quit]
Wolland has joined #ruby
decoponyo has joined #ruby
vali has quit [Ping timeout: 240 seconds]
newvegas has quit [Read error: Connection reset by peer]
Photism has quit [Read error: Connection reset by peer]
radiofrequency has joined #ruby
radiofrequency has quit [Client Quit]
oorst has joined #ruby
aantix has joined #ruby
radiofrequency has joined #ruby
totoybato has joined #ruby
<totoybato>
hi, new to ruby here which one should I use rbenv or rvm or is there anything better?
<totoybato>
btw, I am mostly familiar with virtualenv of python, just looking for equivalent of it on ruby, tia
<Guest27789>
totoybato: they all have their drawbacks. I’d say rbenv is the easiest, but you have to remember to `rbenv rehash` every time you install a gem (library).
<Guest27789>
totoybato: The one that the most informed people I know like best is chruby, it’s what I’m using now, but it sets a shitload of env vars (they use different approaches, others have their drawbacks, too), and it requires shell integration. Thing I like best about rbenv is that it doesn’t need shell integration, so it actually works better with my shell (fish) than chruby.
<Guest27789>
I think I just talked myself into switching back to rbenv.
<poka>
those are the env-vars ruby already uses
<poka>
i personally jsut set them with some zsh aliases
toastynerd has quit [Remote host closed the connection]
fresham has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
bradhe has joined #ruby
oorst has joined #ruby
The_NetZ has quit [Quit: Leaving]
JokerDoomWork has quit [Ping timeout: 276 seconds]
fresham has joined #ruby
<Guest27789>
poka: With rbenv, I edit PATH and 1 env var, and everything works from then on (except rehashing). With rvm and chruby, I need it integrated into my shell (which isn’t bash or zsh), there’s PATH and also 9 env vars, constantly shifting on me.
comma8 has quit [Ping timeout: 252 seconds]
timonv has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 252 seconds]
<Guest27789>
poka: My shell isn’t compatible with bash, so someone had to write a separate set of code to mimic it. I use the binary wrong often, but it isn’t helpful, prob a consequence of being someone else’s meh integration into my shell, but I think they mimic mainline interface. Hopefully mainline interface has better error messages, multiple times I’ve just opened up the source to figure out how to invoke the thing.
fresham has quit [Ping timeout: 240 seconds]
<Nilium>
What shell do you use?
<Guest27789>
Nilium: Fish. Guy who maintains the integration seems to keep up with it https://github.com/JeanMertz/chruby-fish but still, it gets in my way a lot.
<Nilium>
Kind of unfortunate that switching out shells is mostly undoable a lot of the time
<Nilium>
No, not really.
<Guest27789>
Nilium: Didn’t break that much. They added syntax to allow aliasing to work the same, the scripting language is a lot nicer, so it was pretty easy to rewrite my functions. Any function that didn’t *need* to be a function just graduated to a program so that it was compatible with both and could be invoked from processes. Was a pretty easy change, I’m overall happy with it.
<mozzarella>
how do you transform 166 (base 10) to base 2 in ruby?
glenfe has joined #ruby
jhuang has quit [Quit: Page closed]
LexicalScope has quit [Ping timeout: 240 seconds]
<Nilium>
mozzarella: You mean a string representation of 166 in base 2?
<Guest27789>
mozarella `166.to_s(2)` is probably what you’re thinking.
<ari-_-e>
ori: that operation is usually called "pluck", btw
<Guest27789>
mozzarella: in reality, a number is a quantity and has no base, it’s only when you want to represent as a series of digits that base matters, so base only matters when you convert to strings.
shiggity__ has joined #ruby
<Nilium>
ari-_-e: I think that's just rails terminology.
<Guest27789>
ari-_-e: okay, but in Ruby it’s not usually called pluck, even if ActiveRecord and underscore both chose that name.
<Nilium>
I can't find anything suggesting it doesn't originate from rails
<Guest27789>
ari-_-e: in Ruby, it’s usually called fetch or slice. There’s probably other languages that use this terminology, too.
<ari-_-e>
Guest27789: what calls it fetch or slice?
<Nilium>
Suppose it could've also come from underscore.js or something, but either way, I don't think there's widespread accepted terminology for that specific operation
<Nilium>
Aside from just saying "I want this key from X dictionaries"
thiagofm has quit [Quit: Leaving.]
chrishough has joined #ruby
<Nilium>
fetch is just grabbing the value of a key, slice is a different thing as well.
yubrew has joined #ruby
<Guest27789>
ari-_-e: nvm, I see what you mean.
fuzzyhorns has joined #ruby
Kricir has quit [Ping timeout: 265 seconds]
fuzzyhorns has left #ruby [#ruby]
oorst has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
<Guest27789>
Ruby doesn’t have good enough functional support to do anything shorter.
St_Marx has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
yubrew has quit [Ping timeout: 245 seconds]
<ari-_-e>
you can write a pluck method
baroquebobcat has joined #ruby
St_Marx has joined #ruby
<Nilium>
I have code that can reduce it to hash_ary.value_of { self[key] }
<Nilium>
That said, that code is evil
oorst has quit [Client Quit]
madmub has quit [Quit: Leaving]
<Nilium>
e.g., `[{a: 1}, {a: 2}, {a: 3}, {a: 4}].value_of { a }` would yield [1, 2, 3, 4]
chipotle has joined #ruby
<ari-_-e>
uh
<Guest27789>
For funsies and not for seriousness, you could define Array#to_proc:
<ari-_-e>
why not just define the pluck method...?
<Nilium>
I have a lot of weird experimental code sitting around that I can't imagine I'll ever actually use.
jxf has quit [Ping timeout: 260 seconds]
<Nilium>
Why are you so insistent upon this thing being called pluck?
<Nilium>
This ain't the rails room
nateberkopec has joined #ruby
<ari-_-e>
because we, as humans, like to name things
<Nilium>
We can call it anything. We could call it something magical, like the squiggledrop function.
<ari-_-e>
and convention is sometimes useful
<Nilium>
Or, more realistically, we could name it something that actually communicates what it's doing, unlike pluck
<ari-_-e>
what would you suggest?
<Nilium>
Seeing as there are only two things pluck brings to mind for me (plucking eyeballs and plucking strings), and neither is pulling the value out of dictionaries held by an array.
<Nilium>
value_in_hashes maybe.
<Nilium>
Or value_in_each
<ari-_-e>
Nilium: well, "strings" are just the things that my clothes are made of
<Nilium>
Since the element in the array might not be a hash
<ari-_-e>
cats love it too
<Nilium>
Either way, I don't think pluck is a descriptive name
<ari-_-e>
k
vali has quit [Ping timeout: 240 seconds]
<Nilium>
Now to figure out why pluck is associated with eyeballs..
newUser1_ has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 240 seconds]
<Nilium>
Maybe old fairy tales
<Nilium>
Like a witch who plucks eyeballs from children to make a stew
stnly has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
LACP has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
stnly has joined #ruby
<Guest27789>
Pluck is a good name for it, since people are already used to it meaning that in Rails. But, monkey patching is just for shits and giggles. It’s a bad decision in reality. Even if you don’t inherently agree with me that monkey patching is bad (you’d be wrong on this, btw), you still have to admit that it would conflict with the ActiveRecord::Relation implementation of pluck, and now you suddenly have to know what type of collection you ha
<Guest27789>
in order to know how to use the pluck method.
nanoyak has quit [Quit: Computer has gone to sleep.]
nopolitica has joined #ruby
* Nilium
is actively opposed to rails since he doesn't use it and thinks it's a blight on the Ruby community.
LACP has joined #ruby
vali has joined #ruby
<Nilium>
So I have a sort of negative opinion of adopting any of its idiosyncracies
<Nilium>
At the very least, I'd say pick a good name rather than using one that you have to use Rails to know.
<Guest27789>
“any” is a big word. Rails is a collection of worst practices, but there is still value there. Some of its naming and established conventions are good, and some are just okay, but shouldn’t be discarded simply because they come from Rails.
<Guest27789>
(and some are fucking stupid)
<Guest27789>
;)
oorst has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
musashi1 has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
sivoais has quit [Ping timeout: 276 seconds]
stnly has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
stnly has joined #ruby
sivoais has joined #ruby
radiofrequency has quit [Quit: radiofrequency]
shenk has quit [Ping timeout: 240 seconds]
blahblah has joined #ruby
Royalb15 has joined #ruby
havenwood has quit [Remote host closed the connection]
oorst has quit [Quit: oorst]
AlexRussia has quit [Ping timeout: 260 seconds]
oorst has joined #ruby
etqqkoiflwhb_ has joined #ruby
comma8 has joined #ruby
oorst has quit [Client Quit]
perlsyntax has joined #ruby
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
musashi1 has quit [Quit: Musashi1]
shenk has joined #ruby
sleepee has quit [Quit: Leaving]
NukePuppy has quit [Ping timeout: 240 seconds]
nopolitica has quit [Quit: WeeChat 0.4.2]
alem0lars has joined #ruby
musashi1 has joined #ruby
anarang has joined #ruby
NukePuppy has joined #ruby
chipotle has quit [Quit: cya]
benzrf is now known as benzrf|offline
comma8 has quit [Read error: Connection reset by peer]
yubrew has joined #ruby
perlsyntax has quit []
comma8 has joined #ruby
alem0lars has quit [Quit: Going AFK...]
codezomb has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
iliketurtles has quit [Quit: zzzzz…..]
mary5030 has quit [Remote host closed the connection]
NukePuppy has quit [Ping timeout: 265 seconds]
yubrew has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
Lucky_ has joined #ruby
<RubyPanther>
Plus, rails copied the good stuff from facets, and brought them to a wider audience
Atrumx has quit [Remote host closed the connection]
newUser1234 has quit [Read error: Connection reset by peer]
newUser1234 has joined #ruby
grump has joined #ruby
alem0lars has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
sdouglas has joined #ruby
nateberkopec has quit [Quit: Leaving...]
phrozen77 has joined #ruby
phrozen77 has quit [Changing host]
oo_ has joined #ruby
amclain has quit [Quit: Leaving]
iliketurtles has quit [Quit: zzzzz…..]
jimbauds has quit [Ping timeout: 276 seconds]
akonny has joined #ruby
Channel6 has quit [Quit: Leaving]
wald0 has quit [Quit: Lost terminal]
chipotle has joined #ruby
zkay11 has quit [Quit: Leaving.]
benlieb has joined #ruby
bmurt has quit []
prepangolin has quit [Remote host closed the connection]
Wolland has joined #ruby
jhn has quit []
lazyguru has quit [Ping timeout: 240 seconds]
codezomb has joined #ruby
timonv has joined #ruby
bradhe has joined #ruby
lxsameer has joined #ruby
gensgad has joined #ruby
sdouglas has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 260 seconds]
KLVTZ has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
grump has quit [Remote host closed the connection]
sdouglas_ has joined #ruby
sputnik1_ has joined #ruby
lazyguru has joined #ruby
anarang has quit [Ping timeout: 240 seconds]
GriffinHeart has joined #ruby
musashi1 has left #ruby [#ruby]
musashi1 has joined #ruby
musashi1 has left #ruby [#ruby]
GriffinHeart has quit [Ping timeout: 265 seconds]
yubrew has joined #ruby
<pipework>
Nilium: It's not the worst day job, but lawdy I'd never.
Anarch has joined #ruby
RoryHughes_ has quit [Ping timeout: 264 seconds]
<mozzarella>
guys
<Nilium>
Pluck eyeballs?
<Nilium>
I don't judge witches. They've got it rough.
JBreit has left #ruby ["Leaving"]
<Nilium>
Society looks down on them despite their necessity.
Shidash1 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Shidash has quit [Ping timeout: 240 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
<ari-_-e>
mozzarella: the floating point representation can not represent most numbers precisely
benzrf|offline is now known as benzrf
<Nilium>
Goody, my VM is down to 35 opcodes.
<ari-_-e>
if the number is rational, however, you can represent it precisely by storing the numerator and denominator, which is what Rational does
claymore has quit [Ping timeout: 265 seconds]
shiggity__ has joined #ruby
Shidash1 has quit [Ping timeout: 252 seconds]
shiggity__ has quit [Client Quit]
newUser1_ has quit [Read error: Connection reset by peer]
<Nilium>
0.1r is a literal rational. 0.1 is a literal float. The parser can do whatever it wants with "0.1" without worrying about precision when converting it to a rational.
stephenmac7 has quit [Ping timeout: 240 seconds]
<ari-_-e>
I didn't know about the r suffix, that's neat
newUser1234 has joined #ruby
bradhe has joined #ruby
scx has joined #ruby
<scx>
hello
<scx>
i have problem with corrupted UTF-8 file
<scx>
i tried to replace some strings by another
<scx>
but i getting error: invalid byte sequence in UTF-8
newUser1234 has quit [Read error: Connection reset by peer]
gsvolt has quit [Read error: Connection reset by peer]
gsvolt has joined #ruby
katmandoo has quit [Ping timeout: 240 seconds]
newUser1234 has joined #ruby
<KLVTZ>
What's the proper name of variables in a block. Such as h1.merge(h2) do |key, old, new| {} etc. what is the proper name of the scope variables within the bars. Just scope variables?
<ari-_-e>
block arguments/parameters maybe?
duncannz has quit [Ping timeout: 276 seconds]
relix has joined #ruby
comma8 has quit [Quit: Leaving]
Doppp has quit [Quit: leaving]
<KLVTZ>
ari-_-e: I like that, it describes it having scope and it being an argument/parameter, thank you.
Shidash has joined #ruby
Doppp has joined #ruby
dangerousdave has joined #ruby
kilk_ has joined #ruby
kilk__ has joined #ruby
sdwrage has joined #ruby
<KLVTZ>
exit
KLVTZ has quit [Quit: {K}angaroo {L}eague on a {V}endetta for {T}errifying {Z}ebras]
newUser1234 has quit [Read error: Connection reset by peer]
sdwrage has quit [Quit: This computer has gone to sleep]
newUser1234 has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
pontiki has joined #ruby
ferr has joined #ruby
klaut has joined #ruby
aantix has quit [Quit: aantix]
timonv has joined #ruby
bradhe has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
anarang has quit [Quit: Leaving]
timonv has quit [Ping timeout: 240 seconds]
mijicd has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
robert_ has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 252 seconds]
GriffinHeart has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robert_ has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
newUser1234 has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
robert__ has joined #ruby
<Nilium>
Woo, commit streak now at 17 days.
robert_ has quit [Read error: Connection reset by peer]
IceDragon has quit [Quit: Space~~~]
Marfo has quit [Quit: Wychodzi]
nfk has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
mrnugget has joined #ruby
kireevco has quit [Quit: Leaving.]
andrewlio has joined #ruby
mijicd has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sputnik1_ has joined #ruby
alexju has joined #ruby
<mozzarella>
on github?
alexju has quit [Remote host closed the connection]
sski has joined #ruby
<Nilium>
Yes.
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
BizarreCake has joined #ruby
sputnik1_ has joined #ruby
Grundell has joined #ruby
<Grundell>
Hello, don't really know why that just happened but for some reason i get Failed to build gem native extension. when i try to install gems now...
<Grundell>
Is there a swift way to solve this? what im trying to install is mySql
<mozzarella>
do you have to push your commits to the server everyday to keep your streak?
<Grundell>
me ?
<mozzarella>
or does github look at when the commits we made as opposed to pushed?
<mozzarella>
were made*
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mozzarella>
Grundell: what does the error say
<Grundell>
Could not create Makefile due to some reason, probably lack of necessary
<Grundell>
libraries and/or headers.
bradhe has joined #ruby
moritzs has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
<mozzarella>
use a pastebin
dangerousdave has joined #ruby
<Nilium>
mozzarella: Yes, daily, as far as I know.
<LadyRainicorn>
I vaguely remember having used the return value in some tricky way but I can't think how at the moment.
<horrror>
hi, does anybody know a good speech to text gem or lib to work with?
<horrror>
can handle large files
phinfonet has joined #ruby
bmurt has quit [Client Quit]
Takle has joined #ruby
bluOxigen has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
ColtC has joined #ruby
etqqkoiflwhb_ has joined #ruby
jheg has joined #ruby
prepangolin has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
ponga has joined #ruby
jrhe has joined #ruby
predator117 has joined #ruby
ndrei has joined #ruby
jottr_ is now known as jottr
amargherio has joined #ruby
lewix has quit [Remote host closed the connection]
pskosinski has joined #ruby
spastorino has joined #ruby
ColtC has quit [Quit: Page closed]
mrnugget has quit [Quit: mrnugget]
Eyes has quit [Ping timeout: 240 seconds]
<newvegas>
could someone help me write a simplistic rock/paper/scissors game
etqqkoiflwhb_ has quit [Quit: Computer has gone to sleep.]
darkswordchris has joined #ruby
etqqkoiflwhb_ has joined #ruby
alexju has joined #ruby
<darkswordchris>
Can someone more experienced in ruby tell me what's wrong here please? http://pastebin.com/qSj1peq8
bradhe has joined #ruby
<toretore>
c is nil
prepangolin has quit [Ping timeout: 240 seconds]
<darkswordchris>
So do I just need to add c= before?
<toretore>
need more information to answer that
zaiste has joined #ruby
<darkswordchris>
Alright
etqqkoiflwhb_ has quit [Ping timeout: 265 seconds]
noop has joined #ruby
<hfp>
newvegas: You should check out the CS169.1x course from Berkeley on edX, it covers Rails but also touches Ruby and you have to create an rock paper scissors game in it.
<zaiste>
i'm trying to compose a hash with an array i.e. h = { "a" => 0, "b" => 1 }; arr = ["foo", "bar"]; z = h[arr]; z["a"] => "foo"
bluOxigen has quit []
<zaiste>
not sure how to do it
Eyes has joined #ruby
<zaiste>
z["a"] => "foo" is expected result
<newvegas>
hfp: thanks i'll check it out
jhass is now known as jhass|off
tungd has quit [Quit: Using Circe, the loveliest of all IRC clients]
bradhe has quit [Ping timeout: 265 seconds]
oo__ has quit [Remote host closed the connection]
pskosinski has quit [Quit: Til rivido Idisti!]
radiofrequency has joined #ruby
zly has quit [Changing host]
zly has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
radiofrequency has left #ruby [#ruby]
LadyRainicorn has joined #ruby
oo_ has joined #ruby
timonv has joined #ruby
Eyes has quit [Ping timeout: 252 seconds]
auxbuss has joined #ruby
ddv has joined #ruby
oo_ has quit [Remote host closed the connection]
akonny has joined #ruby
lethe has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Eyes has joined #ruby
oorst has joined #ruby
ferr has joined #ruby
stantona has quit [Remote host closed the connection]
yubrew has joined #ruby
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
<heftig>
zaiste: z = Hash[h.map {|k,v| [k,arr[v]]}]
stantona has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
atmosx has quit [Remote host closed the connection]
end_guy has quit [Read error: Connection reset by peer]
St_Marx has quit [Write error: Connection reset by peer]
tacos1de has quit [Write error: Connection reset by peer]
Boohbah has quit [Write error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
spacebug has quit [*.net *.split]
freannrak has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
spacemud has quit [*.net *.split]
shaman42_ has quit [*.net *.split]
Guest85414______ has quit [*.net *.split]
culturelabs has quit [*.net *.split]
CJD14__ has quit [*.net *.split]
telling has quit [*.net *.split]
LiquidIn1ect has quit [*.net *.split]
cescalante has quit [*.net *.split]
JarJarBinks has quit [*.net *.split]
telling has joined #ruby
spacemud has joined #ruby
shaman42 has joined #ruby
spacebug has joined #ruby
cescalante has joined #ruby
JarJarBinks has joined #ruby
LiquidInsect has joined #ruby
queequeg1 has joined #ruby
freannrak has joined #ruby
Guest85414______ has joined #ruby
CJD14__ has joined #ruby
yfeldblum has joined #ruby
<jheg>
netsplit
<jheg>
pop pop pop pop pop pop pop
<heftig>
or the mutative version, h.each {|k,v| h[k] = arr[v]}
culturelabs has joined #ruby
tungd has joined #ruby
jhass|off is now known as jhass
yubrew has quit [Ping timeout: 252 seconds]
stantona has quit [Ping timeout: 260 seconds]
Beoran_ has quit [Ping timeout: 245 seconds]
emergion has quit [Quit: Connection closed for inactivity]
kitak has joined #ruby
<toretore>
pop is mutating
rawGem has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
<zaiste>
heftig: thanks!
rawGem has joined #ruby
rawGem has quit [Client Quit]
emsilva has joined #ruby
Rainicorn has joined #ruby
etqqkoiflwhb_ has joined #ruby
stantona has joined #ruby
LadyRainicorn has quit [Ping timeout: 276 seconds]
<zaiste>
heftig: is there any way to avoid object creation ? i.e. i'm parsing a large CSV file, my arr is a row, it'd be great to have a kind of "partial application" prepared once
atmosx has joined #ruby
darkswordchris has quit [Ping timeout: 246 seconds]
rm_ has joined #ruby
oorst has quit [Quit: oorst]
Rainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
<heftig>
zaiste: the strings won't be copied in either version
Guest48777 has joined #ruby
<Guest48777>
how do i convert a date (y,m,d) into a time which is midnight of that date in America/Chicago
havenwood has joined #ruby
<Guest48777>
i have the tzinfo gem
<zaiste>
heftig: ok, thanks, i'll test that
<heftig>
Guest48777: take a look at tzinfo's README.md
<matti>
jheg: Obviously, I was just being excited. But have a read anyway.
<jheg>
ha will do thanks
<pontiki>
add stt to your search box on your website
nvmme has joined #ruby
mijicd has quit [Remote host closed the connection]
sski has quit [Ping timeout: 276 seconds]
<pontiki>
but it seems like something that should be part of the standard interface, not something unique to a web app
<pontiki>
as it is on a phone
<matti>
jheg: One more thing to add there - loop {}/do .. end will catch StopIteration for you.
<matti>
jheg: So you can call enum.next there safely.
Vivekananda has joined #ruby
thiagofm has quit [Quit: Leaving.]
timonv has joined #ruby
<jheg>
matti: thanks
vee has joined #ruby
<jheg>
in ruby is anything the is prepended by a period a method?
maestrojed has quit [Quit: Computer has gone to sleep.]
<Hanmac>
matti the blog poster does not know about __method__ ;P
<jheg>
for example if x.odd? with odd? being the method
banisterone has joined #ruby
<pontiki>
generally, period is the syntax between object and message
maximski has joined #ruby
<jheg>
sorry badly worded question ... ... is anything that is prepended ..
<pontiki>
object.message
shiggity__ has quit [Quit: shiggity__]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
nvmme has quit [Quit: nvmme]
<jheg>
oh ok so not necessarily object.method
<matti>
Hanmac: obj.method is evil ugly sister of obj.send ;p
<Hanmac>
matti: i dont mean "method" i mean "__method__"
GriffinHeart has joined #ruby
maletor has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
<matti>
Hanmac: __method__ is the cusin send and method never talk about ;d
<pontiki>
what sort of variables are things like __FILE__, __LINE__, __dir__, __class__, __method__ ?
<matti>
Hanmac: And reminds me of Python :(
<pontiki>
i know what they do, but i don't know wht the collective name is
<Hanmac>
matti like that "return enum_for(:your_method_name_which_is_usually_each) unless block_given?" turned into "return enum_for(__method__) unless block_given?" now say to me what is better
<matti>
Hanmac: I select option C.
<matti>
Hanmac: :)
maximski has quit [Client Quit]
<matti>
Hanmac: Yeah, of course __method__ is more concise.
<matti>
Hanmac: +1 :)
<pontiki>
matti: which is never return an Enumerator?
yubrew has joined #ruby
akonny has joined #ruby
<matti>
pontiki: Hm?
klaut has joined #ruby
<matti>
pontiki: __method__ returns *this* method name as a symbol.
<matti>
pontiki: But I am not sure what where you asking about ;]
GriffinHeart has quit [Ping timeout: 265 seconds]
Notte has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
<pontiki>
i know what they do
yfeldblum has joined #ruby
<pontiki>
i don't what the collective name for all of them is
<matti>
Ah
<pontiki>
collective name like "instance variable", "local variable", "class variable", "global variable", etc
<matti>
pontiki: Ugly methods with underscores?
<matti>
;]
maletor has quit [Quit: Computer has gone to sleep.]
yubrew has quit [Ping timeout: 240 seconds]
<matti>
pontiki: Not sure what is the canonical name.
<pontiki>
actually, they're methods, aren't they
akonny has quit [Client Quit]
<matti>
Yes.
jottr has joined #ruby
<matti>
pontiki: I'd lean towards built-ins.
<pontiki>
good enough
<pontiki>
i don't think they have a name in Perl, either
carraroj has quit [Quit: Konversation terminated!]
Burgestrand has quit [Quit: Burgestrand]
dmitrykorotkov has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 240 seconds]
blahblah has left #ruby [#ruby]
coffeina has joined #ruby
TheCuban has joined #ruby
Shidash has joined #ruby
phutchins has quit [Ping timeout: 276 seconds]
Burgestrand has joined #ruby
sdouglas has quit [Remote host closed the connection]
starfox_21 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ferr has quit [Quit: Leaving.]
benzrf|offline is now known as benzrf
<atmosx>
I don't get it
<atmosx>
There are so many things I don't get about how people process politics
<atmosx>
blah
<abstrakt>
good thing this is #ruby and not #politics
<Nilium>
Meh, python's a stack machine. That's boring.
mercwithamouth has quit [Ping timeout: 240 seconds]
<atmosx>
abstrakt: is it?
<atmosx>
omg
<atmosx>
can we talk about python and not politics?
<atmosx>
that's racist.
<TheCuban>
I'm trying to use dotenv to make a db connection without revealing the password. I confirmed the variables are loading, but oci8 reports a null password is given: https://gist.github.com/mikealbert/ed2e14abc832621b4d0c
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
steeve has quit []
phutchins has joined #ruby
havenwood has quit [Remote host closed the connection]
BBBThunda has joined #ruby
ktun has joined #ruby
ktun has quit [Client Quit]
havenwood has joined #ruby
senayar has quit [Remote host closed the connection]
gaboesquivel has joined #ruby
dEPy has quit [Read error: Connection reset by peer]
h_h has joined #ruby
maximski has joined #ruby
dEPy has joined #ruby
starfox_21 has quit [Quit: starfox_21]
<atmosx>
shit the GP started I was still writing methods :l-(
gaboesquivel has quit [Ping timeout: 240 seconds]
dEPy has quit [Read error: Connection reset by peer]
akonny has joined #ruby
bradhe has joined #ruby
akonny has quit [Client Quit]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
IceDragon has joined #ruby
dEPy has joined #ruby
dEPy has quit [Max SendQ exceeded]
alexju has joined #ruby
dEPy has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
banister has joined #ruby
oo_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
alexju has quit [Ping timeout: 252 seconds]
toastynerd has quit []
timonv has joined #ruby
JokerDoomWork has quit [Ping timeout: 240 seconds]
maestrojed has joined #ruby
timonv_ has joined #ruby
ctp_ has joined #ruby
oo_ has quit [Ping timeout: 276 seconds]
coffeina has quit [Quit: Wychodzi]
sinkensabe has quit [Ping timeout: 260 seconds]
sleepee has quit [Quit: Leaving]
GriffinHeart has joined #ruby
ctp has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 276 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
yubrew has joined #ruby
noop has quit [Ping timeout: 245 seconds]
noop has joined #ruby
mercwithamouth has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
sleepee has joined #ruby
Throlkim has joined #ruby
JokerDoomWork has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has quit [Remote host closed the connection]
dapz has joined #ruby
TheCuban has quit []
timonv has joined #ruby
TheCuban has joined #ruby
byteoverfl0w has quit [Remote host closed the connection]
chipotle has joined #ruby
josh has joined #ruby
nateberkopec has joined #ruby
josh is now known as Guest42887
gruz0[russia] has joined #ruby
sleepee has quit [Quit: Leaving]
starfox_21 has joined #ruby
BBBThunda has quit [Ping timeout: 276 seconds]
timonv has quit [Ping timeout: 260 seconds]
Tricon has joined #ruby
akonny has joined #ruby
maximski has quit []
IceDragon has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
Wolland has joined #ruby
byteoverfl0w has joined #ruby
Blaguvest has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 245 seconds]
bbbthunda_ has joined #ruby
maximski has joined #ruby
bbbthunda_ has quit [Read error: Connection reset by peer]
maximski has quit [Max SendQ exceeded]
BBBThunda has joined #ruby
maximski has joined #ruby
byteoverfl0w has quit [Ping timeout: 260 seconds]
ziyadb has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
<RubyPanther>
Politics is easy! The forces of Good use Emacs, the forces of Evil use Vim, and the aliens we unite against use [some proprietary crap]
wchun has joined #ruby
<csmrfx>
You meant: Politics is honest
<Morrolan>
Us emacs users should just join forces with the vim users, then we'd absolutely crush all the others. :P
<katlogic>
Atom is the blackhole in center of galaxy.
starfox_21 has quit [Quit: starfox_21]
<Morrolan>
And yes, we'd feel filthy afterwards, but at least we'd have won. (:
katmandoo has joined #ruby
<RubyPanther>
I've used vim to edit my .emacs before
<Morrolan>
...
Takle has quit [Remote host closed the connection]
<benzrf>
Morrolan: s/emacs/vim/g
mikepack has quit [Remote host closed the connection]
codezomb has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
nvmme has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Takle has joined #ruby
byteoverfl0w has joined #ruby
<shevy>
Morrolan are you again refusing to take a bath
Guest____ has joined #ruby
<Morrolan>
Yep. Can't convince me!
Guest____ has quit [Client Quit]
<shevy>
just because RMS doesn't do it, other emacs users don't have to copy that!
<Morrolan>
But... I'm pure! Just like Lisp. :)
<Morrolan>
Why'd I need to take a bath?
<shevy>
(lisp(is(not(so(pure
<Morrolan>
Close those brackets. :<
<shevy>
NEVER!
<shevy>
FREEDOM FOR BRACKETS!
nvmme has quit [Quit: nvmme]
<abstrakt>
because )))))))))))))))))))))))))) is like, so readable
<abstrakt>
might as well be brainfuck
byteoverfl0w has quit [Remote host closed the connection]
<shevy>
guys
<shevy>
what is better
<Morrolan>
It's a bit like when you have ten layers of nested conditionals in an OOP language. :P
<shevy>
I have a small class, it reads in a file
<shevy>
I want to call the variable for that
<shevy>
either:
tungd has quit [Ping timeout: 245 seconds]
<shevy>
@data
<shevy>
or
<shevy>
@dataset
<shevy>
what is better?
timonv has joined #ruby
<jhass>
neither
<Morrolan>
P
<jhass>
what kind of files does it read?
<Morrolan>
Whoops.
<shevy>
jhass what would you use?
<jhass>
depends on what it reads
<shevy>
jhass it reads in files, the kind of file is file
<shevy>
files
Guest____ has joined #ruby
<jhass>
that seems useless, we have File for that already
jheg has quit [Quit: jheg]
<shevy>
but not for storing data
kilk__ has quit [Remote host closed the connection]
kilk_ has quit [Remote host closed the connection]
<jhass>
go about the content, for example if it reads geojson files something like @geodata or even @features
<jhass>
@data is marginally better than @x
kilk_ has joined #ruby
<shevy>
oh no, I don't have such files
<shevy>
I only have files
<jhass>
what does your class do?
<shevy>
it reads in files
<shevy>
well actually
kilk_ has quit [Client Quit]
<shevy>
it reads them in and then displays them, but it can also modify the files optionally before displaying
<jhass>
what does it do that File and IO don't?
<shevy>
I neatly have it packed in a specialized class
newUser1234 has joined #ruby
<shevy>
I like the word @dataset more but @data is shorter
<jhass>
that seems like wrong coupling, I see two domains there, knowing how to read in files and how to print / represent them. Actually a third that knows how to modify it
<shevy>
wait
<shevy>
you want to use 3 classes?
<jhass>
sure
IceDragon has quit [Ping timeout: 265 seconds]
<jhass>
one is probably File or IO
dangerousdave has quit [Read error: Connection reset by peer]
IceDragon has joined #ruby
dangerousdave has joined #ruby
<Guest____>
Meine Freundin wirft gerade Halsbonbons gegen den Bildschirm
<jhass>
Guest____: wrong channel I guess ;)
<shevy>
no tell use more about your Freundin
<shevy>
erm
<shevy>
*us
baroquebobcat has joined #ruby
robbyoconnor has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
Guest____ :(
<shevy>
ohhh
<shevy>
Hassbonbons would be even better
<shevy>
jHass
<shevy>
:D
nvmme has joined #ruby
<Guest____>
shevy: Its my most used interface at the moment.
<AntelopeSalad>
this works as intended (from the terminal)
sdouglas has joined #ruby
<AntelopeSalad>
so there seems to be something different going on between using system and running it directly from the terminal?
<RubyPanther>
AntelopeSalad: Yeah, you're being protected from yourself
<Wolland>
shell, permissions, etc
<RubyPanther>
use /usr/bin/env to execute the command
sdouglas has quit [Remote host closed the connection]
<AntelopeSalad>
but the env isn't set
<Wolland>
env is a command
<RubyPanther>
system( 'env', 'Foo="bar"', cmd )
<AntelopeSalad>
i can't inline it like that, the task needs 20 env variables
<AntelopeSalad>
that's why they are located in a file
<RubyPanther>
You will not come close to hitting bash's limits with 20 env vars, but if you separate the Ruby options, it will bypass shell anyways
<Wolland>
why use env at all, and not yaml or whatever to store them?
Burgestrand has joined #ruby
<AntelopeSalad>
i'm not worried about that, i just don't want to parse the file that has export FOO='bar'
<AntelopeSalad>
Wolland: because i have multiple services sourcing that file as is
<RubyPanther>
"I don't wanna" isn't a technical problem, though
<RubyPanther>
you can overcome it with no code changes
<benzrf>
RubyPanther: it is
<AntelopeSalad>
i figured there may have been a way to let me source the file and have it actually persist for the command being ran
<AntelopeSalad>
i guess ruby is not capable of doing that in the way i want
<AntelopeSalad>
so i will move on :<
<Wolland>
why not persist it in the system ENV?
<AntelopeSalad>
i don't want to pollute the system's environment
<Wolland>
put them into /etc/profile.d/app_env.sh or something
<AntelopeSalad>
they are in /etc/foo
<Wolland>
if you are using them, I don't think you are "polluting"
<AntelopeSalad>
i don't want them loading on startup
<atmosx>
yeah I don't wanna polute my views... or my controlles, I should use a helper or construct a long sequel query? I think it can be done as one-liner in views.
<Wolland>
profile.d loads them for you
hpoydar has quit [Read error: Connection reset by peer]
<AntelopeSalad>
yeah i know, i don't want them loaded automatically
<Wolland>
k
<atmosx>
guys Linux related dicussions are strictly prohibited in this channel.
<AntelopeSalad>
i'll just use a bash script to start the rake task, it's not really a big deal
<jheg>
thought I'd just hit an infinite loop but in fact I'd just tried to pass 80 into fibonacci()
<csmrfx>
heh, I can recommend unix programming manual
<AntelopeSalad>
i'm just disappointed i can't do it in ruby
<RubyPanther>
AntelopeSalad: Things are intentionally built the way they are, it is not a lacking capability, just wanting for a different way than was decided
Dysruption has joined #ruby
<atmosx>
csmrfx: the Eric Raymond one? :D
<AntelopeSalad>
RubyPanther: i just wanted a way that works the same as bash
zorak has joined #ruby
<RubyPanther>
it is not supposed to be easy to pollute the environment implicitly, you're _supposed_ to have to do the small amount of work to make it explicit
<RubyPanther>
It is actually a feature
m8 has joined #ruby
jottr_ has joined #ruby
<csmrfx>
atmosx: the one with foreword by Dennis Ritchie
mikepack has joined #ruby
mattmcclure has joined #ruby
<shevy>
AntelopeSalad what I do is use shell functions to load or unset environment variables
<shevy>
AntelopeSalad if you need it available in ruby ENV, you can set it somehow like: FOO=5 ruby bla.rb
sdouglas has joined #ruby
<atmosx>
csmrfx: "The C programming language" ?
<shevy>
on a per-startup basis
Takle has joined #ruby
<atmosx>
that's not just a foreword though
<csmrfx>
atmosx: haha no, I hated that, didn't touch the damn thing for 15 years
<csmrfx>
<csmrfx>
Advanced Programming in the UNIX Environment
<csmrfx>
by W. Richard Stevens and Stephen A.Rago
<csmrfx>
oops, pardon my copypaste
mary5030 has quit [Read error: Connection reset by peer]
garndt has quit [Quit: Connection closed for inactivity]
dik_dak has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
shiggity__ has quit [Quit: shiggity__]
<shevy>
I can feel your level of hate now.
<shevy>
Stephen A. Ragironment
<shevy>
wait
<shevy>
advanced programming
<shevy>
let me guess
<shevy>
they tell you to write shell scripts, right?
<RubyPanther>
"The C Programming Language" is what you read if you're writing a compiler, not what you read to learn to write applications that happen to be in C
<csmrfx>
well it had the goods on posix environment
Channel6 has joined #ruby
<csmrfx>
actually that book may be obsolete by now
auxbuss has joined #ruby
troyready has joined #ruby
* atmosx
Justin Timberlake - What goes around (comes around)
<atmosx>
that you are gonna make me cryyyyy
<atmosx>
I love the lyrics
<atmosx>
lalalalala
<csmrfx>
as long as its not bieber
rsmacapinlac has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<RubyPanther>
When I'm coding I just put "All The Machines" by Grace Slick on repeat
mijicd has joined #ruby
dideler|work has quit [Ping timeout: 260 seconds]
<ari-_-e>
RubyPanther: that's not true
<ari-_-e>
K&R is very useful for programmers
<shevy>
so is ecstasy
absolutezeroff has quit [Remote host closed the connection]
<ari-_-e>
ok?
<RubyPanther>
Well, if half the code is in ASM, then they would also need that level of knowledge
<ari-_-e>
what?
<RubyPanther>
The thing about C is that it is a very complicated language, but the parts that are used in modern times are much, much simpler.
banister_ has joined #ruby
banister_ has quit [Max SendQ exceeded]
<ari-_-e>
um
northfurr has joined #ruby
<ari-_-e>
like what...?
<RubyPanther>
Learning the whole language is foolish unless you're writing a compiler, or optimizing parts down to ASM, because you're learning stuff you shouldn't be doing
banister has quit [Read error: Connection reset by peer]
Wolland has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
<ari-_-e>
C has nothing to do with ASM
banister has joined #ruby
<RubyPanther>
It is one of those things, "if you don't know, just trust me, if you do know, say what you mean, I'm not taking a pop quiz"
<ari-_-e>
I know C
<ari-_-e>
I've done a lot of work with C
<shevy>
but so does RubyPanther!
<ari-_-e>
I don't think you know what you're talking about
Wolland has joined #ruby
<shevy>
eam come join the discussion please
<RubyPanther>
LOL well I sure have done a lot of work with C, certainly enough not to say something like "I know C"
* katlogic
knows enough c to kill people
dideler|work has joined #ruby
<csmrfx>
I always thought C was butt ugly
<csmrfx>
ASM, just annoying
<katlogic>
cHUCK-nORRIS bLACK bELT kNOWLEDGE oF c
<shevy>
csmrfx perhaps you think of C++ <std>KO***GJGACHCAR::charWTF();
<csmrfx>
ok C++ I never got into, I have a life!
<troyready>
So, super dumb question here, but I haven't had much success on Google looking for an answer: I've looked at a couple of web APIs online, and they seem to return results as an array
<shevy>
looks as if ari-_-e got bored with RubyPanther :(
<RubyPanther>
C++ is even bigger, but the amount that is actually used isn't
<troyready>
[{"id":"376334","name":"Fireball"}]. But when I try to get that array via rest-client, the response is formatted as a string and it gets weird with the multiple quotes and whatnot. Is there a simple way to pull in a HTTP response as an array, or is there something fundamental that I'm missing?
<shevy>
troyready simply check what the result is via .class
<shevy>
troyready then convert it into whatever you need
<csmrfx>
troyready: is that json?
mercwithamouth has quit [Ping timeout: 240 seconds]
<havenwood>
yup, json
<shevy>
it sure looks like json put into an [] array
<jhass>
troyready: that's json and you need to parse it. require 'json'; JSON.parse string
<csmrfx>
if its jason, parse it
<ari-_-e>
unless RubyPanther can give some examples of what he's talking about, I am forced to simply assume he is talking out of his ass, and therefore have nothing to respond to
marr has joined #ruby
<shevy>
JASON CUMBERLY!
<RubyPanther>
if it is jason, kill it, if it is json, parse it
<shevy>
lol
<troyready>
ha
<shevy>
csmrfx wants jason
yubrew has joined #ruby
<csmrfx>
you best hope I'm not jason, shevy
<troyready>
Ok, that makes sense -- thanks a ton!
<shevy>
haha
<RubyPanther>
ari-_-e: You're never "forced" to resort to pejoratives. You're also not "forced" to not even make a point because another person doesn't respond to "pop quiz" type of questions that weren't making a point
<RubyPanther>
I stand by what I said as being "101 level" C knowledge; most of the language is only properly used by compiler authors, good C uses a tiny subset of the language, and you can't learn to write actual C applications from giant tomes that teach the whole language
hamed_r has joined #ruby
Wolland has quit [Ping timeout: 259 seconds]
<ari-_-e>
RubyPanther: if you can't justify what you're saying, do not give advice to people
<RubyPanther>
I don't have to "justify" what I say. That is, to be honest, complete _absurd_.
<ari-_-e>
RubyPanther: you are wrong, so please just don't say that, ok?
<RubyPanther>
And even, offensive.
<csmrfx>
RubyPanther: you mean like using just the simplest logic and regex ops? or memory handling on a "low level"?
<RubyPanther>
ari-_-e: Stop telling people what to say, and please stop insulting other people in the channel.
<katlogic>
RubyPanther, dont mistake C for C++
<katlogic>
Its offensive.
<RubyPanther>
katlogic: Did I, or did you make that up? ;)
<csmrfx>
or perhaps the K&R was example of this subset you speak of
<ari-_-e>
RubyPanther: if you are giving advice to people you definitely should be able to justify it
<csmrfx>
oh well, I read that, did some examples and ran! Didn't go back since
aantix has quit [Quit: aantix]
<RubyPanther>
ari-_-e: You are not, you were not, and you will not be the arbiter of what advice I give. I will give professional advice only. Good advice only. I did not, I am not, and I will not, give advice to make you happy.
chipotle has quit [Quit: cya]
<ari-_-e>
RubyPanther: then I reserve the right to say that you are talking out of your ass
coffeina has quit [Quit: Wychodzi]
yubrew has quit [Ping timeout: 245 seconds]
<katlogic>
Such polite language sperging, wow.
<RubyPanther>
Nor does standard mainstream stuff need "justification." If you really didn't know that people only use a subset of C, why strut around like you're so sure of yourself? And if you _did_ know it, then you're not only spewing pejoratives, you're doing so in bad faith.
redondos has quit [Excess Flood]
<csmrfx>
ruby is gettin pretty nice
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
<csmrfx>
with the v 2 'n all
etqqkoiflwhb has joined #ruby
<ari-_-e>
RubyPanther: you obviously don't spend any time at all in ##c, because if you did then you'd know that suggesting to read K&R is EXTREMELY mainstream
<RubyPanther>
ari-_-e: You reserve the right to be non-constructive, aggressive, and to say mean stuff. Of course. I can't force you to engage people in a professional manner. THat is entirely on you.
<katlogic>
RubyPanther: To be honest you indeed made some rather bold claims.
<katlogic>
The only feature not used in C is probably the auto keyword.
<csmrfx>
I guess it's the kind of language I always wanted, if not lisp
<shevy>
csmrfx how perfect in % is ruby to you?
starfox_21 has quit [Quit: starfox_21]
<jhass>
guys relax, you're all ad hominem now, that discussion becomes useless and annoying for everybody
<RubyPanther>
katlogic: Indeed, a bold claim! Except that it is the canon...
<ari-_-e>
RubyPanther: it is not
<shevy>
jhass I love the discussion!
<ari-_-e>
RubyPanther: stop saying that
<csmrfx>
shevy: language provides all needed avenues, and I only have two legs
<jhass>
shevy: that's understandable
<csmrfx>
+the
<RubyPanther>
katlogic: If that is all you can think of, that just says you don't deal with legacy C code.
<jhass>
shevy: doesn't mean it's constructive
hpoydar has joined #ruby
<RubyPanther>
There are a wide variety of techniques and features that are broadly considered harmful
<shevy>
jhass it provides action and entertainment! don't take it away from us :(
<csmrfx>
jruby provides practical portability
<RubyPanther>
In the old days it was common to see even insanity like pointer math
<shevy>
csmrfx well you can't just 100% love ruby... there must be some catch
<ari-_-e>
RubyPanther: pointer math is a valid thing to do in C
<katlogic>
RubyPanther: Oh, I dont :) Sure there are coding standards. But name another C89/C99 feature which is widely discouraged.
<RubyPanther>
These days, people see that and they start shouting, "JEEBUS USE A LIBRARY YOU BLEEPITY BLEEP" it gets ugly fast
<ari-_-e>
in fact, you basically do it every single time you do []
<katlogic>
I'm genuinely curious.
<csmrfx>
shevy: for me, it far surpasses my human capability
<shevy>
hey
<shevy>
2:1 on RubyPanther is no fun, he can't beat everyone silly at the same time ...
<RubyPanther>
ari-_-e: You spew all those pejoratives, and then you claim that pointer math is still perfectly good and normal. And you thought I'd want to justify my teachings... to you?!
<katlogic>
RubyPanther: No K&R style function decls? I am disappoint son.
<katlogic>
That would be one hell of old codebase.
<shevy>
csmrfx I see I see... you have way too much love in your heart ...
<RubyPanther>
I mean, after backing pointer math, it starts looking like it is personal against me, and that you probably aren't even being intellectually honest
nvmme has quit [Ping timeout: 276 seconds]
<shevy>
a liar!
ItSANgo has quit [Quit: Leaving...]
<ari-_-e>
it is obviously something to avoid when possible, but saying that it is "only something compiler writers need to know about" is bullshit
rsmacapinlac has left #ruby [#ruby]
<banisterone>
RubyPanther show any c program with more than 500 lines that doesn't use pointer arithmetic
<katlogic>
Nah, RubyPanther is trolling
oorst has joined #ruby
<katlogic>
I am disappointed he jumped on pointer math though :(
<csmrfx>
I only wish I was better with parsers so as to make dsls faster
<katlogic>
There are worthier causes in C
<katlogic>
like vararg macros
<banisterone>
RubyPanther and btw array syntax in c is just sugar on pointer arithmetic
<RubyPanther>
compiler authors, and consultants wrangling legacy WTFs, but writing new code you don't want to be learning that crap
<csmrfx>
shevy: what, what would you need ruby to do that you cannot?
<banisterone>
RubyPanther you clearly don't know wtf you're talking about as usual
hpoydar has quit [Ping timeout: 240 seconds]
banister has quit [Ping timeout: 240 seconds]
absolutezeroff has joined #ruby
<ari-_-e>
RubyPanther: so what you're saying is that people should simply be completely unaware of the tools available to them and the inner workings of the technologies they're using?
<RubyPanther>
Anybody who actually deals with legacy crap for a living should know what I'm talking about. There is lots of stuff you "can" do that has no use case outside of a compiler
<shvelo>
Rspec stronk?
<katlogic>
RubyPanther has a point, let's all merrily switch to Rust instead :)
<shevy>
csmrfx hmm documentation would be one area; class vs. module distinction I'd do away with... though possibly I'd model it into a more prototypic language based more closely to how cells communicate with other cells in reallife
<katlogic>
Rust^WSwift I mean
<katlogic>
or whatever is hip these days
sdouglas_ has joined #ruby
<banisterone>
RubyPanther i bet you barely even know any c
<shevy>
man
<RubyPanther>
Yes, indeed, C is a huge language, you should not study 5000 pages of C when good apps will use features described in 500 pages
<csmrfx>
shevy: oh no
<shevy>
how many gang on RubyPanther now, is it 10:1 ???
<csmrfx>
no no no
starfox_21 has joined #ruby
<csmrfx>
modules and classes do not mix!
<csmrfx>
...sic
<shevy>
csmrfx but a module gets into the ancestor chain of a class!
<katlogic>
RubyPanther: Please use the full name. Repeat after me: C++, C++, C++
<banisterone>
RubyPanther c is a tiny language...
<shvelo>
pls respond
<ari-_-e>
RubyPanther: let's not teach Ruby people about globals because they're not the best practice, eh?
<csmrfx>
shevy: ancestors schmansestors
<banisterone>
Yeah he's confusing c and c++
<csmrfx>
its just a string
<RubyPanther>
shevy: Who cares, right is right, wrong is wrong, opinion is opinion, subjective is not objective, pejoratives are not valid and prove the person using them to be wrong, so why count? 1 or 100 it is the same.
<jhass>
shvelo: what's the question?
<katlogic>
Such meta.
<shvelo>
Rspec stronk?
<jhass>
that's not english
<shevy>
rspec schlong!
sdouglas has quit [Ping timeout: 240 seconds]
<shevy>
lol jhass
<csmrfx>
and cells, real life what
<RubyPanther>
Yes, indeed, Ruby newbs should not be taught about globals except very briefly because they need to understand $stdout
<shevy>
csmrfx well; they are microprocessors right? and DNA to control all behaviour of them (indirectly, via receptors)
<RubyPanther>
The main thing to teach them is "don't do this, it hurts, but you might see it somewhere"
sean_s has joined #ruby
<ari-_-e>
RubyPanther: you JUST ADMITTED that they need to know about globals in order to use an important aspect of the language
<ari-_-e>
therefore completely undermining your point
<shevy>
csmrfx of course it can not be modelled 1:1 but for instance, the ability to modify every object/cell at runtime is very neat (in ruby too)
<csmrfx>
2 bit processor a good base? cause dna only has 2 bits
<ari-_-e>
good job
<csmrfx>
its processed fast but not in parallel
<RubyPanther>
ari-_-e: No need to go all "Derp! gotcha!" just because it turns out I don't fit in the little box you drew a picture of
<shevy>
csmrfx why only 2 bits?
<csmrfx>
bad
dangerou_ has quit [Read error: Connection reset by peer]
<csmrfx>
shevy thats what a cell is, a DNA processor
vee has joined #ruby
dangerousdave has joined #ruby
banister has joined #ruby
<csmrfx>
DNA pairs only have 2 bits of information
<shevy>
how so
<RubyPanther>
I didn't "undermine" my point, I made exactly the point I was actually making. If it undermined a point, it wasn't _my_ point. Maybe the one you imagined me making...
<shevy>
at every slot you have 4 possibilities available
sean_s has quit [Client Quit]
dik_dak has quit [Remote host closed the connection]
<csmrfx>
00, 01, 10 or 11
hamed_r has quit [Quit: Ex-Chat]
<csmrfx>
as far as I can counts, thats 2 bits
garndt has joined #ruby
<RubyPanther>
0 or 1, that is two bits of information, 1 bit of notation
<shvelo>
I need to store an absolute path to my main file and access it in other files I 'require' from that file, how do I do that
<csmrfx>
7,6 GB/s is cell speed for DNA
<ari-_-e>
RubyPanther: if your point was that people should be taught the best practices, then I completely agree with that, but that is not what you said
<csmrfx>
uh, processing
oorst has quit [Quit: oorst]
<jhass>
shvelo: why do you need to do that, what problem does that solve?
<csmrfx>
And thats too slow for a machine processor
sdouglas_ has quit [Remote host closed the connection]
<shvelo>
jhass, nevermind, I think I found a better solution to my problem
cashnguns has joined #ruby
akonny has quit [Quit: akonny]
<RubyPanther>
ari-_-e: Look, maybe you should just realize I said something, you misunderstood it, and you responded to your own misunderstanding by throwing pejoratives, and that is not OK. If you're willing to throw pejoratives so quickly, you'll be being aggressively anti-social every time you ever misunderstand something. The less you misunderstand things, the more obviously broken that system is.
<csmrfx>
but during replication only half of it is used for processing
bradleyprice has joined #ruby
<csmrfx>
oh well I'm babbling too, maybe a real modified biological cell would actually make a cool computer
Cache_Money has joined #ruby
<RubyPanther>
a pair is 4 bits, and 2 bits are used during replication, because there is not a single chemical that is either up or down (0 or 1) but rather totally different chemicals. It is base 4 not base 2, and replication is XOR
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cache_Money has quit [Client Quit]
sdouglas has joined #ruby
railzFor_ has joined #ruby
Neomex_ has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradleyprice has quit [Client Quit]
bricker`LA has quit [Ping timeout: 265 seconds]
Neomex has quit [Ping timeout: 265 seconds]
bradleyprice has joined #ruby
kirun has quit [Quit: Client exiting]
gruz0[russia] has quit [Quit: Leaving]
OrionKissinger has quit [Remote host closed the connection]
zigomir has quit [Remote host closed the connection]
JokerDoomWork has quit [Ping timeout: 240 seconds]
xiella has joined #ruby
tvw has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 260 seconds]
<atmosx>
%value..
sambao21 has joined #ruby
riotjones has joined #ruby
<atmosx>
%option{value:
<atmosx>
nice
<atmosx>
eee
northfurr has quit [Quit: northfurr]
shiggity__ has joined #ruby
riotjone_ has quit [Ping timeout: 260 seconds]
sambao21 has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
jottr has joined #ruby
mary5030 has joined #ruby
wald0 has joined #ruby
Blaguvest is now known as semtex-h
Notte has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
OrionKissinger has quit [Remote host closed the connection]
yubrew has joined #ruby
goleldar has joined #ruby
jottr has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Ping timeout: 260 seconds]
yubrew has quit [Ping timeout: 240 seconds]
codezomb has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tvw has quit []
jonahR has joined #ruby
auxbuss has quit [Quit: I'm gone.]
jonahR has quit [Client Quit]
sdouglas has quit [Remote host closed the connection]
chipotle has joined #ruby
bricker`LA has joined #ruby
aef has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 276 seconds]
mehlah has quit [Quit: Leaving...]
codezomb has joined #ruby
codezomb has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
mehlah has joined #ruby
oo_ has joined #ruby
LexicalScope has quit [Ping timeout: 276 seconds]
goleldar has quit [Remote host closed the connection]
brandonblack has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
aef has joined #ruby
Atttwww has joined #ruby
dangerousdave has joined #ruby
JokerDoomWork has joined #ruby
oo_ has quit [Ping timeout: 260 seconds]
nanoyak has joined #ruby
The_NetZ has joined #ruby
vifino has quit [Quit: Ze Cat now leaves...]
<The_NetZ>
anyone aware of any ruby gems that use the <string> header?
<ari-_-e>
The_NetZ: like, the one from C++?
<The_NetZ>
ari-_-e: yeah, that one.
<ari-_-e>
how would a gem use something from C++? in a native extension?
<The_NetZ>
yeah
<ari-_-e>
I think most native extensions are written in C
<ari-_-e>
why do you ask?
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
<The_NetZ>
I've narrowed down the issue with a program I'm using; #include <string>\n #include "ruby.h" plus a main that returns 0 will fail to compile
<omosoj>
right now i can query the database if i do, for example, country.i("argument"). i want to be able to do that by doing country.argument. is that possible?
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
<ari-_-e>
omosoj: you can implement method_missing
nfk has quit [Quit: yawn]
<omosoj>
awesome! i was just looking that up but wasn't sure
<ari-_-e>
that gets called when a method is called that doesn't exist
<shiggity__>
i have a question — if i have a regex I am compiling and freezing within a class, for every occurence, would it be better to pull those constant regex’s out of that class and put them in a parent class where they will only get instantiated once? or is it better practice to keep the constants within the class they are being used in, even if it is less efficient?
bradhe has quit [Ping timeout: 240 seconds]
sdouglas has quit [Ping timeout: 260 seconds]
predator117 has quit [Ping timeout: 260 seconds]
<ari-_-e>
omosoj: is it really such a burden to call that method though?
<The_NetZ>
ari-_-e: I know.
<omosoj>
hmm. kinda. i'm trying to query a database of country info while i read the news, so i don't want to have to think much while using it.
<omosoj>
why? are there drawbacks to the method_missing approach?
<ari-_-e>
so this is just for your own personal use or something?
<omosoj>
yeah. at some point it would be cool to make an information app or a gem or something but at this point that's all i'm using it for.
Dekade has joined #ruby
<ari-_-e>
alright, that's probably fine then
AlSquire has quit [Quit: This computer has gone to sleep]
<ari-_-e>
method_missing is one of those things that sort of hides what's actually happening, so, at least IMO, it's best to avoid most of the time
<omosoj>
yeah... in pry i wouldn't be able to see what is available. that's one of the drawbacks i see. also, if anyone else looks at it they might get confused
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
shvelo has quit [Ping timeout: 240 seconds]
bin_bash has joined #ruby
<ari-_-e>
right
bin_bash has left #ruby [#ruby]
<omosoj>
k, thanks again for the help.
SCommette has quit [Quit: SCommette]
kitak has quit [Remote host closed the connection]