<choke>
then all the apt-get stuff after thats done
KineticX_ has quit [Read error: Connection reset by peer]
Kinetic__ has quit [Ping timeout: 250 seconds]
devoldmx has quit [Remote host closed the connection]
KineticX_ has joined #ruby
<Unicorn|>
Thanks a ton :)
KineticX_ has quit [Read error: Connection reset by peer]
dlitvak_ has joined #ruby
KineticX_ has joined #ruby
<choke>
yep
KineticX_ has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
jottr_ has joined #ruby
KineticX has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
<choke>
glad i remembered kinda how to do it... i rely on my salt configuration to do all that for me -- so it's been a while since i've done any configurations
KineticX has joined #ruby
j4cknewt_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
dlitvak has quit [Ping timeout: 272 seconds]
KineticX has joined #ruby
j4cknewt has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 246 seconds]
KineticX_ has joined #ruby
<Unicorn|>
oh, I guess that removed all my gems... :P
j4cknewt has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
dorei has quit []
KineticX_ has joined #ruby
Kinetic__ has joined #ruby
Kineti___ has joined #ruby
Kinetic__ has quit [Read error: Connection reset by peer]
j4cknewt_ has quit [Ping timeout: 256 seconds]
programmerq has joined #ruby
ElFerna has joined #ruby
KineticX has quit [Ping timeout: 250 seconds]
Kineti___ has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
beast has joined #ruby
govg has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
<Unicorn|>
now I get this error: `rescue in load_backend': Couldn't load backend Shoes::Swt'. Error: cannot load such file -- /var/lib/gems/2.2.0/gems/swt-4.4/vendor/swt/swt-linux64 (LoadError)
pawnbox has joined #ruby
<Unicorn|>
does that mean that I don't have swt-linux64?
KineticX_ has quit [Ping timeout: 240 seconds]
KineticX has joined #ruby
<Unicorn|>
nope, not in any repository
KineticX_ has joined #ruby
j4cknewt has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
bkxd has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
KineticX_ has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
n00bdev has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 245 seconds]
djbkd has quit [Quit: Leaving...]
KineticX_ has quit [Read error: Connection reset by peer]
KineticX has quit [Ping timeout: 260 seconds]
gizmore has joined #ruby
KineticX has joined #ruby
choke has joined #ruby
j4cknewt_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
j4cknewt has quit [Ping timeout: 240 seconds]
KineticX has joined #ruby
darkxploit has quit [Ping timeout: 246 seconds]
bkxd has quit [Ping timeout: 265 seconds]
KineticX has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
<choke>
Unicorn| in gem list is swt installed? try gem update if it is and gem install swt if it isnt
bkxd has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
<Unicorn|>
well
gizless has quit [Ping timeout: 245 seconds]
<Unicorn|>
that would do it.
j4cknewt has joined #ruby
KineticX has joined #ruby
colegatron has quit [Ping timeout: 264 seconds]
ibouvousaime has quit [Ping timeout: 246 seconds]
yqt has quit [Ping timeout: 250 seconds]
<Unicorn|>
still doesn't work.
<choke>
try restarting your shell
KineticX has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
PlasmaStar has quit [Ping timeout: 264 seconds]
KineticX has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
KineticX has joined #ruby
j4cknewt_ has quit [Ping timeout: 264 seconds]
KineticX has quit [Read error: Connection reset by peer]
dlitvak_ has quit [Ping timeout: 255 seconds]
KineticX has joined #ruby
KineticX_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
davedev24 has quit [Remote host closed the connection]
KineticX has joined #ruby
devoldmx has quit []
KineticX has quit [Read error: Connection reset by peer]
<Unicorn|>
I think I got things working.
<choke>
cool cool
<Unicorn|>
thanks for the help! :)
<choke>
no problem man
KineticX has joined #ruby
<shevy>
choke what is a "salt configuration"?
krobzaur has quit [Ping timeout: 255 seconds]
KineticX has quit [Read error: Connection reset by peer]
KineticX has quit [Read error: Connection reset by peer]
symm- has joined #ruby
KineticX has joined #ruby
vdamewood has quit [Ping timeout: 250 seconds]
kalopsian has joined #ruby
<Ox0dea>
Butch128: Huh? MyClass::VERSION is a String. What would it mean for it to inherit InheritMe?
KineticX_ has joined #ruby
<Ox0dea>
There is almost certainly a way to do what you're trying to do, but it's unclear what exactly that is just yet.
Kinetic__ has joined #ruby
<choke>
I'm relatively new to ruby, but re-declaring the same class two different ways seems odd to me... wouldn't you just declare it with the < InheritMe and set the version constant there?
<Ox0dea>
Aye, that'd be the reasonable thing to do.
pawnbox has quit [Ping timeout: 255 seconds]
axsuul has quit [Ping timeout: 255 seconds]
<Ox0dea>
I think it may be the case that Butch128 is operating in an environment where they don't own the initial definition of MyClass.
<Butch128>
I want A::MyClass::VERSION to be declared in lib/my_class/version.rb, and A::MyClass to be defined in lib/my_class.rb - so that my gemspec can include lib/my_class/version.rb and utalize A::MyClass::VERSION without including all of InheritMe
djbkd has quit [Quit: Leaving...]
Kineti___ has joined #ruby
jdawgaz has joined #ruby
<Butch128>
Ox0dea: yes
krobzaur has joined #ruby
<Ox0dea>
Butch128: Do you solemnly swear that you're up to no good?
<Butch128>
I do
<Ox0dea>
<3
<Ox0dea>
You want #remove_const.
<Butch128>
i have never seen that before... thank you
<Ox0dea>
Happy to help.
KineticX has quit [Ping timeout: 250 seconds]
<Butch128>
In my description above - does what I'm doing ... make sense?
<Butch128>
is my goal a reasonable one?
Kineti___ has quit [Read error: No route to host]
KineticX has joined #ruby
<Ox0dea>
Hard to say. :/
KineticX_ has quit [Ping timeout: 240 seconds]
KineticX_ has joined #ruby
karapetyan has joined #ruby
Kinetic__ has quit [Ping timeout: 250 seconds]
KineticX_ has quit [Read error: Connection reset by peer]
<shevy>
lol
<Butch128>
gem generation always includes a version.rb file - and uses that in the gemspec. If the gem I'm generating inherits from some other dependency gem class (in this case activerecord::Base), this breaks unless i also make MyGem::NameSpaced also inherit from that dependency gem class
KineticX_ has joined #ruby
axsuul has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
<shevy>
using a version.rb file is fine
KineticX_ has joined #ruby
<shevy>
I use the same for my .gemspec files usually (unless it's like a tiny class where creating a version.rb file would yield like 30% of the gem content!)
KineticX_ has quit [Read error: Connection reset by peer]
<Ox0dea>
Butch128: To be clear, is this actually about VERSION, or is that a confusing example?
<Butch128>
let me make a more concise gist
KineticX_ has joined #ruby
KineticX has quit [Ping timeout: 250 seconds]
KineticX_ has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KineticX has joined #ruby
TheMoonMaster has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
KineticX has quit [Read error: Connection reset by peer]
KineticX_ has quit [Read error: Connection reset by peer]
Yzguy has joined #ruby
<Ox0dea>
Where `String` -> `ActiveRecord::Base` for your nefarious purposes.
KineticX has joined #ruby
<Butch128>
Ox0dea: looks interesting
<Ox0dea>
You stop that.
Yzguy has quit [Client Quit]
<Butch128>
hah, ya I was thinking other things - but... i could make myself use it
KineticX_ has joined #ruby
<Ox0dea>
Modules should not be instantiable, even superficially.
<Butch128>
yea, i think I'm going to go with the ::Model option
KineticX_ has quit [Read error: Connection reset by peer]
<Ox0dea>
Er, that should've been `M::A.new.ancestors`, but I trust you caught the gist.
KineticX_ has joined #ruby
braincrash has quit [Quit: bye bye]
TheHodge has quit [Quit: Connection closed for inactivity]
n00bdev has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
Kinetic__ has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
KineticX has quit [Ping timeout: 240 seconds]
<Ox0dea>
Butch128: There's all kinds of ways to (ab)use Ruby if you want to provide a prettier interface.
Kinetic__ has quit [Read error: Connection reset by peer]
<Butch128>
Ox0dea: Yea - the pretty interface is what I was aiming for, and I do enjoy abusing ruby...
KineticX has joined #ruby
axsuul has quit [Ping timeout: 256 seconds]
cyfr0n has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
KineticX_ has joined #ruby
<Ox0dea>
Butch128: You could have MyGem.A (the method) return MyGem::A::Model, for instance.
<Butch128>
And creating really weird code that's hard to understand in the name of pretty interfaces is a past time of mine
j4cknewt has quit [Ping timeout: 256 seconds]
<choke>
I've never written a gem myself ( some day when I write better ruby ) but looking @ source of like device they use the module module class method all over the place
j4cknewt has joined #ruby
KineticX_ has quit [Read error: Connection reset by peer]
framling has quit [Ping timeout: 246 seconds]
KineticX has joined #ruby
iateadonut has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
KineticX has joined #ruby
KineticX_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
KineticX_ has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
KineticX_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
j4cknewt_ has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
KineticX_ has quit [Read error: Connection reset by peer]
frog0909 has quit [Ping timeout: 276 seconds]
KineticX has joined #ruby
braincrash has joined #ruby
ayonkhan has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
n00bdev has quit [Remote host closed the connection]
<Butch128>
Ox0dea: Implemented your suggestion. it's nice but the MyGem.A instead of MyGem::A . it bugs me.
<Ox0dea>
Butch128: Nothing to be done for it. :/
shadoi has quit [Quit: Leaving.]
<Ox0dea>
:: is another way to invoke methods, but not if it'll bump into a constant of the same name first.
<Butch128>
I read it, and it makes absolutely no sense to me at first glance, as it should be
monoprotic has joined #ruby
monoprotic has joined #ruby
Kinetic__ has joined #ruby
<Ox0dea>
It's no more complex than it needs to be.
rkazak has joined #ruby
j4cknewt_ has quit [Ping timeout: 260 seconds]
Kinetic__ has quit [Read error: Connection reset by peer]
<Ox0dea>
Well, the Context check in #to_proc is excessive, but it permits `[1,2,3].map(&_ * _) == [1,4,9]`, and I think that's sexy.
kalopsian has quit [Ping timeout: 276 seconds]
Kinetic__ has joined #ruby
j4cknewt has joined #ruby
Kineti___ has joined #ruby
KineticX has quit [Ping timeout: 260 seconds]
KineticX has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
KineticX_ has quit [Ping timeout: 260 seconds]
KineticX_ has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
<choke>
Yeah that's a bit advanced for me Ox0dea... Don't think I'll be writing anything like that for a while, mainly 'cause I don't understand it all lol
KineticX_ has quit [Read error: Connection reset by peer]
KineticX has joined #ruby
Kinetic__ has quit [Ping timeout: 264 seconds]
<Ox0dea>
choke: In your defense, it uses some pretty high-level concepts.
Kineti___ has quit [Ping timeout: 240 seconds]
davedev2_ has joined #ruby
senayar has joined #ruby
<Ox0dea>
As for me, there is no justification. :P
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<choke>
And also in my defense, I learned too much in a short period: Ruby, Rails, SaltStack, Redis, Mongo all within the last year
KineticX has quit [Read error: No route to host]
bkxd has joined #ruby
<Ox0dea>
What means "learned too much"?
KineticX has joined #ruby
<choke>
to me, it means learning too many topics over a short period of time not allowing you to fully grasp even the basic concepts of one.
KineticX has quit [Read error: Connection reset by peer]
<Ox0dea>
Then you should not have used the word "learned".
KineticX has joined #ruby
<Ox0dea>
Only teasing, mind.
KineticX has quit [Read error: Connection reset by peer]
<choke>
But I did learn them -- just not to the level that if I focus on one for a while and really delve into it that I would.
davedev__ has joined #ruby
<Ox0dea>
Sure, I know whence you're coming.
KineticX has joined #ruby
<choke>
But I had to learn them all at once, we bought an app and the api was written in rails. instead of re-inventing the wheel, i took it as a chance to finally sit down and learn the ruby language ( which i tried to do in the past but it seemed too confusing )
KineticX has quit [Read error: Connection reset by peer]
davedev24 has quit [Ping timeout: 260 seconds]
<Ox0dea>
Hardly the most conducive environment. :<
<choke>
Now, I wonder why I Didn't make the switch from PHP sooner lol
<Butch128>
+1
KineticX has joined #ruby
<choke>
Yeah -- I work all day on the api.. and at home I do nothing but research and tinkering to learn new things
symm- has quit [Quit: Leaving...]
KineticX has quit [Read error: Connection reset by peer]
<choke>
fiance yells at me all the time 'cause i'm always on the computer "writing stuff i dont understand" as she puts it
KineticX has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
KineticX has quit [Read error: Connection reset by peer]
senayar has quit [Ping timeout: 246 seconds]
<Ox0dea>
Fun fact: the Greeks say "it's all Chinese to me".
KineticX has quit [Remote host closed the connection]
scripore has quit [Read error: Connection reset by peer]
scripore has joined #ruby
ohaibbq has joined #ruby
Dimik has quit [Ping timeout: 255 seconds]
scripore has quit [Max SendQ exceeded]
droptone_ is now known as droptone
scripore has joined #ruby
djbkd has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
aspire has quit [Quit: Leaving]
ayonkhan has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 265 seconds]
PedramT has joined #ruby
veg__ has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has quit [Ping timeout: 256 seconds]
veg has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
baweaver has joined #ruby
ayonkhan has joined #ruby
lemur has joined #ruby
djbkd has quit [Remote host closed the connection]
sorbo_ has quit [Ping timeout: 265 seconds]
vikaton has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
sorbo_ has joined #ruby
DynamicM` has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
ghox has quit [Ping timeout: 240 seconds]
ellistaa has joined #ruby
<ellistaa>
i want to write a program that logs all http requests made from my laptop. any ideas on how i’d go about diong this?
<Ox0dea>
ellistaa: From "scratch"?
<ellistaa>
Ox0dea: yeah
<Ox0dea>
ellistaa: How "scratch"?
n00bdev has joined #ruby
<ellistaa>
mmm well id like to do it using ruby
gh has joined #ruby
brixen has quit [Excess Flood]
<ellistaa>
is there like some way to access my network card (idk anything about networks)
<Ox0dea>
Well, there's ruby-pcap for packet capture.
<Ox0dea>
Do you want to go lower-level than that?
<ellistaa>
Ox0dea: i’m not sure since i don’t know how low that is. i’m looking at this page http://www.rubydoc.info/gems/pcap/0.7.0 but its not clear what it does, could you explain?
brixen has joined #ruby
lxsameer has joined #ruby
<Ox0dea>
ellistaa: Your network card sends and receives "packets" to do TCP/IP.
<ellistaa>
Ox0dea: awesome so is there a way to just tell the network card to log all requests to a file?
senayar has joined #ruby
<Ox0dea>
Well, yes.
<ellistaa>
what should i start googling to figure out how to do that?
houhoulis has quit [Remote host closed the connection]
<choke>
why rebuild it? just install postman and postman-interceptor and let it do it's thing
gh has quit [Quit: Leaving]
decoponio has joined #ruby
<ellistaa>
hmm idk i guess for fun
<Ox0dea>
I figured it was a learning exercise.
<ellistaa>
yeah
minimalism has quit [Quit: minimalism]
<choke>
Well in that case, I'll shut up 'cause I've no clue.
j4cknewt_ has joined #ruby
j4cknewt has quit [Ping timeout: 256 seconds]
<xybre>
BTW you'll get thousands of packets really quick, I hope you have a lot of hard drive space.
<DEA7TH>
Ox0dea: I haven't even tried them, just checking; letting an under-developed library to handle a big task for you might lead to loads of work.
<Ox0dea>
> Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
Xiti has quit [Quit: Xiti]
RobertBirnie has quit [Ping timeout: 264 seconds]
BTRE has joined #ruby
<DEA7TH>
it has 101 commits :D sounded non-trivial
<Ox0dea>
"This thing looks heavy enough to fly!"
<shevy>
rantly is much bigger
Maxed has joined #ruby
<Ox0dea>
== much better, amirite?
<shevy>
more keystrokes more time spent
Xiti has joined #ruby
<Ox0dea>
Someone needs a Rich Hickey presentation.
bsget has quit [Quit: Leaving.]
<DEA7TH>
Well, it can be bad in more ways also. I'd get lucky if I find someone who's tried QuickCheck in Ruby and saves me the experience.
<Ox0dea>
DEA7TH: It's not really the done thing.
j4cknewt_ has joined #ruby
adgtl has quit [Remote host closed the connection]
TheMoonMaster has quit [Ping timeout: 240 seconds]
alakra has quit [Ping timeout: 265 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
j4cknewt_ has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
speakingcode has joined #ruby
Waheedi has quit [Quit: Waheedi]
j4cknewt has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
j4cknewt_ has quit [Ping timeout: 260 seconds]
jeaye has joined #ruby
senayar has joined #ruby
jeaye has left #ruby ["WeeChat 1.3"]
framling has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
kalopsian has joined #ruby
howdoi has joined #ruby
rippa has joined #ruby
cantaberry has joined #ruby
pawnbox has joined #ruby
kalopsian has quit [Quit: Lost terminal]
yfeldblum has quit [Ping timeout: 260 seconds]
kfpratt has quit [Remote host closed the connection]
ibouvousaime has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
duckpuppy has joined #ruby
j4cknewt has quit []
djbkd has quit [Quit: Leaving...]
Maxed has quit []
nerium has quit [Quit: nerium]
karapetyan has quit [Ping timeout: 272 seconds]
duckpuppy has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
arup_r has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
hahuang61 has joined #ruby
djbkd has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
davedev__ has quit []
nullwarp has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
adgtl has joined #ruby
TheMoonMaster has joined #ruby
adgtl has quit [Read error: Connection reset by peer]
adgtl has joined #ruby
arup_r has joined #ruby
ibouvousaime has quit [Ping timeout: 255 seconds]
PedramT has joined #ruby
ledestin has joined #ruby
rgb-one has left #ruby [#ruby]
adgtl has quit [Ping timeout: 264 seconds]
alakra has joined #ruby
pawnbox_ has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
PedramT has quit [Read error: No route to host]
PedramT has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
radgeRayden has joined #ruby
ocx has joined #ruby
<ocx>
hello all, a.inject do |x| ... is the same as a.inject { |x| ... ?
adgtl has joined #ruby
<ocx>
it is only a sytax difference? { } vs do end ?
<blub>
mostly
<blub>
they have different precedences
f00dMonsta has joined #ruby
senayar has joined #ruby
ohaibbq has quit [Remote host closed the connection]
ohaibbq has joined #ruby
PedramT has quit [Remote host closed the connection]
<choke>
yep the bracket syntax has a higher precedence than do..end. So when you use the latter you're passing the block as an additional parameter but the brackets you pass the black as the first parameter in the results of the method invocations.. in your example, they do essentially the same thing
krobzaur has quit [Ping timeout: 245 seconds]
adgtl_ has joined #ruby
<choke>
take: 1.upto 5 do |n| puts n end and 1.upto 5 { |n| puts n } the second woulds fail unless you did 1.upto(5) { or 1.send(:upto, 5) {
chipotle has joined #ruby
ohaibbq has quit [Ping timeout: 240 seconds]
adgtl has quit [Ping timeout: 250 seconds]
senayar has quit [Ping timeout: 255 seconds]
Petazz has joined #ruby
shaman42 has joined #ruby
arup_r has quit [Remote host closed the connection]
karapetyan has joined #ruby
arup_r has joined #ruby
PedramT has joined #ruby
<ocx>
so mainly what is the difference in passing parameter 1.upto 5 and 1.upto(5)? the first passes optional param an the other explicitely the 5 as a first param?
ohaibbq has joined #ruby
<ocx>
passes*
<blub>
parentheses are optional, that's all
TheMoonMaster has quit [Ping timeout: 256 seconds]
<blub>
you can say 'def f x' or 'def f(x)' too just the same
nullwarp has quit [Ping timeout: 260 seconds]
<ocx>
yes but as choke said 1.upto 5 { |n| puts n } the second woulds fail unless you did 1.upto(5)
<blub>
or you can use do end
<ocx>
yes but why would it fail if i dont use the optional () ?
<choke>
I've learned that for small things I'll use the bracket syntax, for other things I'll use do..end
<blub>
it's just ruby's clumsy parser and precedence rules, that's all
alakra has quit [Ping timeout: 265 seconds]
<ocx>
thank you
<choke>
so something like some_collection.each { |e| puts e } for something simple... and 1.upto(10) do |x| add_some_num = x + rand(10) puts '*' * add_some_num end for something more complex
ohaibbq has quit [Ping timeout: 260 seconds]
arup_r has quit [Ping timeout: 265 seconds]
tvon has joined #ruby
arup_r has joined #ruby
codecop has joined #ruby
<shevy>
it's a bit awkward since you can have DSLs work better with do/end than with the {}
<choke>
took a long answer to explain the short answer :(
<blub>
i changed my name to 'short answer' because i was sick of people boring me
<choke>
i made my name choke just to see how many times it comes up in daily conversation with programmers lol
<choke>
more often than you'd think
<shevy>
choke is a pretty violent nick
<shevy>
blub on the other hand sounds more like "the peaceful water in the ocean"
<shevy>
well, in german at least
MattV has joined #ruby
<choke>
I can't remember how I was given it, but I did create a site like right after called "chokehub" that was for dev tutorials ( mostly php 'cause i didnt know ruby/rails yet )... after a year, i figured -- eh sounds too much like a porn site
<choke>
so i shut it down
futilegames has joined #ruby
<shevy>
lol
futilegames has quit [Client Quit]
<blub>
lol
<shevy>
to be honest, I would not have associated chokehub with that
<choke>
and i just remembered how i got the nick choke
<choke>
i remembered, 'cause it just happened and it reminded me
<blub>
chokehub sounds very 2002 i think
<choke>
not 2002, it was closer to like 2010-2012...
<shevy>
geocities! angelfire! marquee tag!
CloCkWeRX has joined #ruby
zenspider_ has quit [Remote host closed the connection]
<blub>
i can picture the big letters on a black background already
<choke>
but i got the nick at work... someone made me laugh, and something is weird with my throat where when i laugh too hard -- too much air goes into my throat and i choke... so they just started calling me choke
<shevy>
now he is back, armed and dangerous, to avenge the loss of his voice
bb010g has quit [Quit: Connection closed for inactivity]
<jackcom>
if i do python well, then i don’t need to learn ruby?
<choke>
you don't NEED to learn anything really... the question is, do you WANT to
<jackcom>
anything? :(
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<jackcom>
just sleeping all day long everyday? :(
<choke>
i wrote php for 20 years. I didn't need to learn ruby or rails, or mongo, or redis, or anything else... i did, because i wanted the knowledge
<jackcom>
choke:
<choke>
jackcom sure you could sleep all day long... works for 60% of america... if they can do it, you can too!
<jackcom>
you make me choke, i can’t breath because of you. choke
<choke>
sorry, didn't realize you couldn't deep throat
chipotle has quit [Ping timeout: 245 seconds]
<choke>
work on those gag reflexes
<jackcom>
choke: anyway what is good for ruby?
zenspider has joined #ruby
<choke>
the question which you seek is actually "what is ruby NOT good for?"
<choke>
the answer is: I haven't found anything yet
<jackcom>
yeah
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
Trieste has quit [Ping timeout: 240 seconds]
Trieste has joined #ruby
futilegames has joined #ruby
djbkd has quit [Remote host closed the connection]
<shevy>
jackcom you are not being serious again
<jackcom>
:)
<jackcom>
i m serious now
<shevy>
and you don't know python anyway!
<shevy>
choke 3D games!
<shevy>
damn... that reads almost like a sentence
<jackcom>
oh yeah
<shevy>
matz has it covered - mruby for the rescue, take that lua
<jackcom>
shevy: you see StarWars?
futilegames_ has joined #ruby
futilegames has quit [Ping timeout: 264 seconds]
futilegames_ is now known as futilegames
<choke>
I saw it, wasn't as good as I was hoping it'd be
<shevy>
jackcom too much cgi
djbkd has joined #ruby
<jackcom>
then i will not see it thanks shevy
Xeago has joined #ruby
<jackcom>
choke: oh you are rich.
<jackcom>
i will see it from torrent
<choke>
I even prepped for it by re-watching all other 6 episodes... i was let down :(
nullwarp has joined #ruby
<jackcom>
oh great
<jackcom>
anyway i watched it from youtube now.
<shevy>
choke it's a similar trend with games
<jackcom>
excute order 66, choke
<shevy>
games today seem like an endless clone of who-got-the-better-3D
<jackcom>
we don’t need jedi anymore, excute order 66. choke
<shevy>
I think he has fallen in love with your nick choke
ocx has quit [Ping timeout: 265 seconds]
TheMoonMaster has joined #ruby
duckpuppy has joined #ruby
<choke>
Yeah, I stopped playing pretty much all games online... I do however still play games like Uncle Wiggily, Melissa & Doug Smarty Pants, and the like
<choke>
I think so too shevy
<jackcom>
my friend do ‘TF2’. choke
djbkd has quit [Client Quit]
<choke>
Yeah, that's a little advanced for my 4 year old daughter lol
arup_r has quit [Read error: Connection reset by peer]
tockitj has joined #ruby
<shevy>
dtordable happy new year to you too
spider-mario has joined #ruby
<tockitj>
where to place method that acts over array of objects of given type?
govg has quit [Ping timeout: 272 seconds]
<jhass>
tockitj: hard to tell without knowing about your application and what the method does
<tockitj>
what would be logical place to put it (say that I am author of class C, and that method m acts over Array of C instances)
<dtordable>
Ah, my beloved shevy...
<jhass>
?fake tockitj
<ruboto>
tockitj, Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<tockitj>
well I have met this problem in number of different contexts
krobzaur has joined #ruby
<shevy>
tockitj if it is a project then put it into the main namespace of that project, e. g. if you have toplevel: module Foo, just put it somewhere into Foo
<jhass>
and I'm saying I don't think there's "best" solution for all cases
senayar has joined #ruby
<tockitj>
there is no code - this is question about programming practice and ruby
<jhass>
it depends on the context
<tockitj>
shevy, that is very very bad
<shevy>
tockitj lol
duckpuppy has joined #ruby
sandstrom has joined #ruby
<zotherstupidguy>
tockitj do you get an error?
* tockitj
sigh
<zotherstupidguy>
tockitj i am guessing your question is about design then
<tockitj>
about solving this design level issue in ruby
<tockitj>
ruby has quite specific implementation of oop
<tockitj>
every language has
<zotherstupidguy>
tockitj any design is a matter of taste! for programming, its a matter of collective taste, meaning see how a popular project you like do it, and follow their convention
<tockitj>
no it is not matter of taste
karapetyan has quit []
<tockitj>
that is silly statement
<zotherstupidguy>
no it is not
<dtordable>
Tockitj use an RE/R view!
<tockitj>
why do i have a feeling that students are answering my question
<dtordable>
Or an E/R one!
senayar has quit [Ping timeout: 240 seconds]
<tockitj>
is there an bit more advanced ruby channel?
<zotherstupidguy>
tockitj wait for the US to wakeup then
<tockitj>
though there are quite a few documentation gems for sinatra api
ta_ has quit [Remote host closed the connection]
<tockitj>
what is wrong with just using yard to document this?
adgtl has joined #ruby
underplank has joined #ruby
adgtl_ has quit [Ping timeout: 255 seconds]
underplank has quit [Client Quit]
sergey_makagon has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
<Nilium>
Free tea?
<zenspider>
already had tea...
pawnbox has joined #ruby
* zenspider
shrugs
<zenspider>
just reading dtordable above
<dtordable>
Me?
* zenspider
goes to bed
<dtordable>
Nilium is cold now I think...
arup_r has quit [Read error: Connection reset by peer]
<Nilium>
Oh well.
* Nilium
goes back to locking down a server.
<dtordable>
Need a server...
arup_r has joined #ruby
beast has quit [Ping timeout: 250 seconds]
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
p_shcheglov has quit [Ping timeout: 246 seconds]
arup_r has quit [Client Quit]
<dtordable>
shevy this week will I win the lottery?
codecop has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
RalfJ has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
sergey_makagon has quit [Remote host closed the connection]
<RalfJ>
Hi all - I updated my system ruby, and now the files in ~/.gem/ruby/2.1.0/bin/ do not work any more (since ruby 2.1 is no longer installed), but no corresponding files have been created in ~/.gem/ruby/2.2.0/bin/ even though I did "gem update --user-install". What do I have to do to (re-)install all the gems I used to have on the old ruby version?
lictor36 has joined #ruby
<ruurd>
I think so.
DEA7TH has quit [Quit: DEA7TH]
<ruurd>
You really want to stay away from system ruby and use rvm or rbenv to manage them.
qq4891 has joined #ruby
<ruurd>
I would advise you to use rvm. (cue rvm haters)
samba_ has joined #ruby
<ruurd>
AFAIR it also supports upgrading rubies to newer versions and migrating any gemsets along with that.
<ruurd>
And IARU if rbenv will do that for you also.
<RalfJ>
ruurd: do I dont. I dont want to have to track any mailing list or anything to learn about ruby updates, nor have to bother with figuring out how to do all that without becoming root and withut bloating my home folder with several entire ruby installations.
<samba_>
playing first time with the Time class, I'd like to convert a string in time, which method should I use ?
<RalfJ>
having a system-wide package manager is *really* convenient, and I rather think scripting languages and distros should get their act together and figure out how to let the two interact better ;-)
<ruurd>
RalfJ well you can't have both. Being able to run multiple ruby versions is a real boon for developers
<RalfJ>
ruurd: Im not a ruby dev ;-) . all I want to do is run jekyll. Im not saying it should be impossible to have multiple ruby versions or whatever. Im saying it should be possible not to have that.
<ruurd>
RalfJ and rvm does not require root
qq4891 has left #ruby [#ruby]
<ruurd>
And anyway - you don't need to take my advice.
arup_r has joined #ruby
<RalfJ>
ruurd: I didnt mean to disrespect you, sorry. Indeed I dont have to take your advise, I just wanted to give some reasons for why I rather wouldn't.
<shevy>
RalfJ all gems that were installed will also be available in cache/ subdirectory; you can reinstall the local gems from there too
senayar has joined #ruby
sergey_makagon has joined #ruby
<shevy>
so PREFIX/lib/ruby/gems/2.3.0/cache/ where 2.3.0 would be 2.1.0 or 2.2.0 in your case
duckpuppy has joined #ruby
<RalfJ>
shevy: I see, so I can "gem install" those files?
<shevy>
yes, in that dir you should be able to do: "gem install ./*.gem" the ./ may not be necessary but better safe
<shevy>
ah
<shevy>
perhaps you may also use an ignore dependencies switch
<shevy>
I actually have it aliased to "gem install --ignore-dependencies -no-ri -no-rdoc" when I run a local gem install
bradleyprice has quit [Remote host closed the connection]
<shevy>
but just have a look if you can find that directory first
<RalfJ>
shevy: hm, so far it seems to work without any additional switches. thanks :)
<samba_>
guys, I'd like to convert a string in time format, but Time.new("2 January 2016 10:38:55 CET (19.5 hrs)") doens't works as expected, what's wrong?
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<Insti>
ah, reduce is what I want I think
<Insti>
padded = pad_rosters(players)
<Insti>
padded[0].zip(padded[1])
<ruurd>
RalfJ I am OK with that. I don't think that is disrespectful. After all YOU know best what your problem is and what the preferred solution is. The best I can do is give you honest advice.
spider-mario has quit [Quit: No Ping reply in 180 seconds.]
pawnbox has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
ht__ has joined #ruby
spider-mario has joined #ruby
<zotherstupidguy>
tockitj THANKS, i am checking sinatra yard now
ht__ has quit [Client Quit]
ht__ has joined #ruby
<zotherstupidguy>
dtordable ec2 micro for a server?
dtordable has quit [Ping timeout: 245 seconds]
FernandoBasso has joined #ruby
<zotherstupidguy>
shevy "gem install ./*.gem" is cool
ht__ has quit [Client Quit]
ht__ has joined #ruby
dtordable has joined #ruby
Xeago has joined #ruby
krobzaur has quit [Ping timeout: 256 seconds]
joneshf-laptop has quit [Read error: Connection reset by peer]
joneshf-laptop has joined #ruby
adgtl_ has quit [Read error: Connection reset by peer]
adgtl has joined #ruby
dlitvak has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<atmosx>
jhass: You here?
holbach has quit [Quit: holbach]
TheMoonMaster has quit [Ping timeout: 246 seconds]
smactive has joined #ruby
TheMoonMaster has joined #ruby
shibly has joined #ruby
<shibly>
Is ruby source code maintained through github?
senayar has joined #ruby
duckpuppy has joined #ruby
smactive has quit [Ping timeout: 265 seconds]
adgtl_ has joined #ruby
TomyLobo has joined #ruby
senayar has quit [Ping timeout: 260 seconds]
kobain has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
gregf has joined #ruby
DEA7TH has joined #ruby
adgtl has quit [Ping timeout: 272 seconds]
adgtl has joined #ruby
adgtl_ has quit [Ping timeout: 276 seconds]
adgtl has quit [Read error: Connection reset by peer]
adgtl has joined #ruby
krobzaur has joined #ruby
mary5030 has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
adgtl_ has joined #ruby
<jhass>
atmosx: why?
adgtl has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
hieu has joined #ruby
dlitvak has joined #ruby
PedramT has joined #ruby
p_shcheglov has joined #ruby
lxsameer has quit [Quit: Leaving]
dlitvak has quit [Remote host closed the connection]
scripore has joined #ruby
dlitvak has joined #ruby
adgtl_ has quit [Remote host closed the connection]
dtordable has quit [Ping timeout: 256 seconds]
Spleeze has quit [Ping timeout: 260 seconds]
Azzurrio has joined #ruby
dwfait has joined #ruby
ruby942 has joined #ruby
* ruby942
slaps Affix around a bit with a large fishbot
shibly has left #ruby [#ruby]
ruby942 has quit [Client Quit]
toretore has joined #ruby
n00bdev has quit []
Spleeze has joined #ruby
spider-mario has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Remote host closed the connection]
Azzurrio has quit [Ping timeout: 255 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zotherstupidguy>
shibly check #ruby-core , i think there is a repo for it, but the magic happens in a svn one i guess, oldschool
adgtl has joined #ruby
mary5030 has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
RegulationD has joined #ruby
krobzaur has quit [Ping timeout: 246 seconds]
dtordable has joined #ruby
no_gravity has joined #ruby
aryaching has joined #ruby
<no_gravity>
Hello! Do you guys prefer to ssh into a server and code on it or mount it via sshfs and use a local editor?
dtordable has quit [Client Quit]
dtordable has joined #ruby
axsuul has joined #ruby
solocshaw has joined #ruby
dlitvak has joined #ruby
chipotle has quit [Quit: cheerio]
RegulationD has quit [Ping timeout: 264 seconds]
PedramT has quit [Remote host closed the connection]
Jardayn has joined #ruby
sankaber has joined #ruby
spider-mario has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
f00dMonsta_ has joined #ruby
stannard has joined #ruby
Jekert has joined #ruby
f00dMonsta has quit [Ping timeout: 276 seconds]
<jhass>
no_gravity: I prefer to run a development setup locally
<no_gravity>
i see
<Papierkorb>
no_gravity: Why would you want to code on a remote server if your local computer is (most likely) perfectly capable of running the rails app?
spider-mario has quit [Remote host closed the connection]
senayar has joined #ruby
<no_gravity>
Papierkorb: because i am not tied to a specific machine then.
duckpuppy has joined #ruby
bradleyprice has joined #ruby
<no_gravity>
also my dev servers have a pretty controlled environment with same OS as production, scheduled backups etc.
<Papierkorb>
no_gravity: but to a good network/internet connection. You can carry your laptop around with you.
<no_gravity>
if the dev system is on my laptop. but i often prefer to code on my desktop machine.
<Papierkorb>
no_gravity: Those are issues with your local development then. You could use VMs (Vagrant, Docker, ...) to use the same locally though
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
spider-mario has joined #ruby
<Papierkorb>
*local dev environment
DanKnox[away] has joined #ruby
<no_gravity>
with a VM, still i would always have to power up the machine where the VM is on.
<shevy>
RalfJ strange error. psych is the libyaml wrapper, I use syck myself
dorei has joined #ruby
PedramT has joined #ruby
<Papierkorb>
no_gravity: Those are all non-issues. What I mean is, if you really want to code on a remote server, do it?
<RalfJ>
shevy: whatever it was, I fixed it by just using jekyll from the debian repos. its the latest version right now. if/when the debian version is ever too old, I'll just re-install it from the gem repos... after deleting ~/.gem, just to be sure.
<no_gravity>
Papierkorb: i do it. i never asked about doing it / not doing it.
<Papierkorb>
no_gravity: You even know about sshfs, which *many* have never heard of, so I guess in that sense you're qualified to choose :P
<Papierkorb>
no_gravity: And to the desktop computer issue: You can, and should?, hook up a bunch of displays and mouse/keyboard to your laptop too.
<Papierkorb>
Throw in a docking station into the mix and you get the best of both worlds IMO
f00dMonsta_ has quit [Ping timeout: 264 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
bradleyprice has quit [Ping timeout: 250 seconds]
<no_gravity>
i worked like that for a couple of years.
<no_gravity>
even then i used a dev server.
<no_gravity>
it has many advantages.
<Papierkorb>
Do you work with other people on that project?
<toretore>
are you a php developer?
<no_gravity>
on the current one no other coders are involved.
ht__ has quit [Quit: Konversation terminated!]
<no_gravity>
the backend of the current project is php, yes.
<toretore>
lol
<Papierkorb>
no_gravity: then it's as if you were using your local computer. with multiple people, it wouldn't work.
PedramT has quit [Ping timeout: 250 seconds]
<no_gravity>
some of my projects had teams of up to 8 coders.
<Papierkorb>
I just never trust my network enough, or rather, I trust lo more then eth0 to work at all times
al2o3-cr has quit [Ping timeout: 250 seconds]
ht__ has joined #ruby
blur3d has quit [Quit: blur3d]
__chris has joined #ruby
jdawgaz has joined #ruby
<no_gravity>
the only times i really encounter network probs is on the train.
<no_gravity>
and then i do other stuff.
nertzy has joined #ruby
PedramT has joined #ruby
deuterium has joined #ruby
krobzaur has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
ibouvousaime has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
PedramT has quit [Remote host closed the connection]
Meow-J has joined #ruby
dlitvak has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
<Jekert>
Hi, it's necessary to install linux? or windows(8) is enough to program and test in ruby and ruby on rails?
aryaching has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
aryaching has quit [Read error: Connection reset by peer]
howdoi has quit [Quit: Connection closed for inactivity]
<Zarthus>
Jekert: for ruby in general? Windows works fine. Rails is also pretty much Windows compatible (used to be horrible years ago; if the stories are to be believed)
<Zarthus>
I do find myself jumping through several unnecessary hoops though.
<Zarthus>
specifically with devkit gems
Danielss89_ is now known as Danielss89
PedramT has joined #ruby
aryaching has joined #ruby
<Jekert>
Zarthus: Ok, thanks.
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
adgtl has quit [Remote host closed the connection]
stannard has quit [Read error: Connection reset by peer]
build22 has left #ruby [#ruby]
stannard has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
dwfait has quit [Quit: dwfait]
adgtl_ has joined #ruby
no_gravity has quit [Quit: leaving]
Jekert has quit [Quit: Leaving]
moeSeth has joined #ruby
adgtl has quit [Ping timeout: 250 seconds]
sonne has quit [Ping timeout: 272 seconds]
ruboto has quit [Ping timeout: 272 seconds]
ruboto has joined #ruby
dfoolz_ has quit [Ping timeout: 272 seconds]
dfoolz has joined #ruby
Xeago_ has joined #ruby
bkxd has joined #ruby
sonne has joined #ruby
FooMunki has quit [Quit: FooMunki]
konsolebox has joined #ruby
dlitvak has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 240 seconds]
Jordan_yx has joined #ruby
dlitvak has joined #ruby
minimalism has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
aibot has quit [Ping timeout: 260 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
dlitvak has quit [Ping timeout: 240 seconds]
roa has joined #ruby
RobertBirnie has joined #ruby
krobzaur has quit [Quit: WeeChat 1.2]
ElFerna has joined #ruby
dfinninger has joined #ruby
duckpuppy has joined #ruby
c355e3b has joined #ruby
yardenbar has joined #ruby
senayar has quit [Remote host closed the connection]
krobzaur has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
duckpuppy has quit [Ping timeout: 250 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
aibot has joined #ruby
samba_ has quit [Ping timeout: 265 seconds]
Sembei has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
Jordan_yx has quit []
hiyosi has joined #ruby
kknight has joined #ruby
sergey_makagon has joined #ruby
hieu has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
<kknight>
how far the concurrent server request in ruby is donr
<kknight>
done?
TheMoonMaster has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
alakra has quit [Ping timeout: 276 seconds]
<kknight>
anyone there?
aspire has joined #ruby
<toretore>
yes, but i don't understand your question
krobzaur_ has joined #ruby
yardenbar has quit [Ping timeout: 272 seconds]
krobzaur has quit [Ping timeout: 264 seconds]
<kknight>
is it possible to compute concurrent server request in ruby
<kknight>
how far it can be done
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore>
i still don't understand it
pwnd_nsfw has joined #ruby
<kknight>
have you understand what is concurrent server request?
<kknight>
do you know it?
<toretore>
your question is meaningless; you have to be more specific. of course it's possible to "compute concurrent server request" in ruby, like most other languages
<toretore>
define: 1) concurrent 2) server request
mary5030 has joined #ruby
<toretore>
3) compute
sergey_makagon has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mark__ has joined #ruby
twinpeaks has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
puria has quit [Ping timeout: 246 seconds]
veg__ has joined #ruby
nerium has quit [Quit: nerium]
Mark__ has quit [Client Quit]
veg has quit [Ping timeout: 265 seconds]
MarkSun has joined #ruby
arup_r has quit [Remote host closed the connection]
ElFerna has quit [Ping timeout: 272 seconds]
stannard has quit [Remote host closed the connection]
jdawgaz has joined #ruby
hololeap has joined #ruby
scripore has joined #ruby
puria has joined #ruby
MarkSun has quit [Remote host closed the connection]
peeja has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
samba_ has quit [Ping timeout: 240 seconds]
justicefries has left #ruby [#ruby]
al2o3-cr has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sunfjun has joined #ruby
kfpratt has quit [Remote host closed the connection]
sunfjun has quit [Client Quit]
PedramT has quit []
kfpratt has joined #ruby
davedev24 has joined #ruby
tvon has joined #ruby
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby
TheMoonMaster has quit [Ping timeout: 272 seconds]
alakra has quit [Ping timeout: 240 seconds]
<toretore>
"if nobody's going to give me a simple answer to my vague question about a complex subject i'm outta here"
arup_r has joined #ruby
xemcd has joined #ruby
kfpratt has quit [Remote host closed the connection]
duckpuppy has joined #ruby
varunwachaspati has joined #ruby
senayar has joined #ruby
radgeRayden has quit [Quit: Leaving]
Waheedi has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
<zotherstupidguy>
toretore is your name related to the japanese word tiger?
<toretore>
nope
<zotherstupidguy>
yeah its tora not tore
<zotherstupidguy>
tora tora tora :)
nanoz has joined #ruby
senayar has quit [Ping timeout: 255 seconds]
dopie has quit [Quit: Lost terminal]
<Ox0dea>
zotherstupidguy: Uma.
<Ox0dea>
Also tako.
diegoviola has joined #ruby
ghox has joined #ruby
ghox has quit [Remote host closed the connection]
vasilakisfil has joined #ruby
<vasilakisfil>
how is this implemented? uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413") I mean passing an option to the class name instead of Uri.new(...)
<Ox0dea>
vasilakisfil: URI is just a method.
<vasilakisfil>
ah ok
<Ox0dea>
vasilakisfil: If you're looking to do something similar, you *could* just define yours at the top level, but it's better to make it an instance method on Kernel.
<adaedra>
>> method(:URI)
<ruboto>
adaedra # => undefined method `URI' for class `Object' (NameError) ...check link for more (https://eval.in/496342)
<George_>
Hey guys, I am trying to find a memory leak using the latest stable ruby version by analyzing a ObjectSpace.dump_all
<shevy>
I can't find it hololeap :(
<George_>
Is it normal for there to be unlimited GC generations for objects? This does not seem right
<hololeap>
shevy: its all good. do you know if the "extra features" of the gem are included by default in ruby23?
<George_>
I have objects which are in the 12833 generation already
<shevy>
it was a discussion on the ruby issue tracker by the did you mean gem author https://bugs.ruby-lang.org/projects/ruby-trunk - if I remember it correctly, he explained some workaround that he was using, and suggested to, rather than use the workaround, add something to ruby to allow him to drop that workaround
<shevy>
what I do know is that the errors sent to the user are different now, in 90% of the time I found it to be helpful
scripore has quit [Quit: This computer has gone to sleep]
vikaton has joined #ruby
TomPeed has joined #ruby
<hololeap>
i just tested and it doesn't look like it automatically requires did_you_mean/extra_features. i was kinda hoping it would just for the detection of a misspelled "def initialize"
<hololeap>
but its a cool feature nonetheless
<shevy>
aaaah
<George_>
Are my messages actually making it to this channel?
<shevy>
so you mean like if someone writes "def intialize"
<hololeap>
George_: yes
<hololeap>
shevy: yes
<George_>
Thanks
<shevy>
cool... yeah, no idea why that does not get included, perhaps it may at a later time
<George_>
Something about having an infinite number of GC generations seems very very wrong, but I just started using ruby 2.2.4, so for all I know this is intended behaviour. Does anyone know?
<havenwood>
hololeap: Good for a .irbrc or .pryrc file.
<shevy>
I do that in a few of my own gems too :)
<hololeap>
havenwood: yeah
<havenwood>
George_: Hmm.
Z3r0C00l has joined #ruby
<havenwood>
George_: So you're wondering why it continues to sweep or?
<Ox0dea>
It's just the number of times the collector has run.
FernandoBasso has joined #ruby
Meow-J has joined #ruby
<George_>
So row["generation"] is not the actual generation, but the GC count when it was moved into a new generation?
<George_>
That does not seem right
<Ox0dea>
Oh, I see how you mean.
<Ox0dea>
I wonder whether the same term is being used for two different concepts.
moeSeth has quit [Quit: Connection closed for inactivity]
<Ox0dea>
Are you expecting row["generation"] to contain "old" or "young"...?
<George_>
No, just a much lower number than 10000 or 20000
<George_>
I thought there would be < 10 generations total
bkxd has quit [Ping timeout: 265 seconds]
<Ox0dea>
Why?
rkazak_ has joined #ruby
<George_>
Because I've never heard of a generation garbage collector which has an infinite number or generations, I've only heard of implementations which have a handful
<George_>
*of generations
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruid has quit [Ping timeout: 260 seconds]
__chris has joined #ruby
xlegoman has quit [Quit: xlegoman]
cpup has quit [Ping timeout: 246 seconds]
sergey_makagon has quit []
<George_>
Another thing I'm wondering is why is there a blank generation? Is that technically generation 0?
cpup has joined #ruby
KineticX has quit []
ta0 has joined #ruby
<Ox0dea>
Seems a reasonable enough conclusion.
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
colegatron has quit [Ping timeout: 256 seconds]
kies^ has joined #ruby
<George_>
I first assumed there was a major bug with the generational GC causing an infinite number of generations, but if it is by design, then I'd be interested to hear why that design decision was made
duckpuppy has joined #ruby
mattwildig has joined #ruby
TheMoonMaster has joined #ruby
<George_>
It seems like there should be some upper limit to the number of generations, since what happens if a process has years of uptime?
firstdayonthejob has joined #ruby
tvon has quit []
senayar has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
sp1rs has joined #ruby
arup___ has quit []
arup_r has joined #ruby
senayar has quit [Ping timeout: 250 seconds]
TheMoonMaster has quit [Ping timeout: 245 seconds]
Ishido has quit [Remote host closed the connection]
nocd has joined #ruby
Ishido has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
colegatron has joined #ruby
codingcan has joined #ruby
DLSteve has joined #ruby
arup_r has quit [Remote host closed the connection]
smactive has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
yardenbar has joined #ruby
xemcd has quit []
kmckelvin has joined #ruby
smactive has quit [Ping timeout: 256 seconds]
ibouvousaime has quit [Ping timeout: 264 seconds]
sp1rs has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
TheHodge has joined #ruby
codecop has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
cfa6rtx8 has joined #ruby
roshanavand has joined #ruby
KineticX has joined #ruby
<KineticX>
hello there
<KineticX>
got a question about instance variables in rails
<KineticX>
lets say i have a variable (not based on a model) called @foo
<KineticX>
I can easily set this via @foo = 1234
<KineticX>
but lets say i want to populate it with sub items
<KineticX>
@foo.bar = 1234
<adaedra>
You can't.
<KineticX>
my idea is that i want to take the contents of dir.glob (file name, date, size etc.)
<adaedra>
You have to set it to something more "compilcated" than a number.
<adaedra>
But you can set the variable to anything, including a custom-made object.
<adaedra>
And then, call methods on this object.
<KineticX>
so given that i have a for each directory glob
<KineticX>
is there a succinct way to populate an instance variable during that loop with the data points i need?
<adaedra>
You can save the results of glob in an instance variable if you want.
<KineticX>
i need more than just the raw glob info though
<Papierkorb>
KineticX: it's used to transform every element of the Enumerable in some way. Internally, it creates a new array. it then fills this array by calling the block you've given on each element and using the result of your block as new element. And then it returns this new array.
<KineticX>
ok cool thank you that makes sense.
RegulationD has quit [Ping timeout: 255 seconds]
<KineticX>
I feel like what im trying to do has probably been done before... get the contents of a directory, and details about each file (name, size, modified date etc.)
<ruboto>
ruby-lang671, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<Ox0dea>
That's not great, but it demonstrates the principle.
amazon_ has joined #ruby
PedramT has quit [Remote host closed the connection]
<Ox0dea>
Naming the method #give_call improves the clarity a bit, but then it sounds weird.
PedramT has joined #ruby
<ruby-lang671>
Ox0dea: thanks! that helps. I definitely need to practice using yield and blocks a lot more. It still looks a like magic to me at the moment but that's something I need to learn :)
<Ox0dea>
ruby-lang671: Sure thing (on all counts :P).
<ruby-lang671>
:)
Azure has joined #ruby
nanoz has quit [Ping timeout: 260 seconds]
amazon_ has quit [Quit: Leaving]
roshanavand has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
yardenbar has joined #ruby
_tc has joined #ruby
last_staff has joined #ruby
konsolebox has quit [Quit: Leaving]
patal-loka has joined #ruby
Jet4Fire has joined #ruby
<patal-loka>
I want to daemonize a simple ruby-block, ideally without loop.. how can I do that?
Jet4Fire has quit [Client Quit]
Jet4Fire has joined #ruby
cdg has joined #ruby
<Ox0dea>
patal-loka: Just a block and not the whole script?
last_staff has quit [Client Quit]
<patal-loka>
sleep( <long int value> ) is also an option, but not very-elegant.
<patal-loka>
yes, just a block.
<Ox0dea>
Sounds like you want a Thread.
<patal-loka>
hmm, could be thread .. but actually I'm not doing much in main-thread, so I'm not sure I really need thread.
<patal-loka>
In this example, callback is registered. Internally PubNub-object uses EventMachine, hence it will keep checking things periodically as long as that process is active.
davedev24 has quit [Remote host closed the connection]
<patal-loka>
now all I need to do is to daemonize this, such that this block doesn't quit.
<patal-loka>
so, we have many options - loop, sleep, thread, b/g jobs ... what I need to learn is, how this can be done elegantly?
Maxed has quit [Read error: Connection reset by peer]
dfinninger has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 265 seconds]
jdawgaz has joined #ruby
<Ox0dea>
It does seem like you'd benefit from using something like Sidekiq.
dfinninger has joined #ruby
<patal-loka>
Ox0dea: IMHO - I find sidekiq is overkill, all I need is just to keep this process live. Since PubNub already is using EventMachine, why should we use one more overhead?
Jet4Fire has quit []
<patal-loka>
Ox0dea: no offence to your approach, just my 2 cents.
roshanavand has joined #ruby
<Ox0dea>
patal-loka: Well, the root problem is that it's dying with work left to be done; why's that happening?
Jet4Fire has joined #ruby
<patal-loka>
because its a pub-sub service, if new messages are there, then service provider will push the changes.
<patal-loka>
if not, then it quits.
<patal-loka>
it's not dying in-between really, it's just - it lives till it has something to do, else it quits.
Jekert_ has joined #ruby
<Ox0dea>
That seems perfectly in order?
<patal-loka>
no putting a sleep() at the end makes it live longer, but I don't find it nice.
<patal-loka>
*now putting
<patal-loka>
yes, it's in order.
<patal-loka>
I can share you a workable example, which you can try at your end, give me a minute.
<Ox0dea>
Does PubNub not provide an interface for determining whether or not it's busy?
FernandoBasso has quit [Quit: Leaving]
<patal-loka>
nope.
<Ox0dea>
Hmm.
<patal-loka>
here is sample example, you can copy-paste and try in your terminal
dfinninger has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
<patal-loka>
in the provided example - if you publish multiple records, you will see your subsriber-callback in another terminal got the update.
ibouvousaime has joined #ruby
Nilium has quit [Remote host closed the connection]
<patal-loka>
FYI - PubNub internally does regular and periodic refresh using EventMachine (as far as I understood, reading their code)
roshanavand has quit [Remote host closed the connection]
PedramT has joined #ruby
codingcan has quit [Remote host closed the connection]
<patal-loka>
Ox0dea: are you able to walk thru, using given snippet?
paperhouse has joined #ruby
eToThePiIPower has joined #ruby
<patal-loka>
Just want to make it simple, let's cut PubNub case -- what I'm more interested in is, how to daemonize ruby-script without using loop or sleep.
senayar has joined #ruby
<patal-loka>
or how can we replace sleep(), with something else? Certainly not looking for CPU hungry loops. :)
PedramT has quit [Remote host closed the connection]
govg has joined #ruby
<xybre>
patal-loka: select?
paperhouse has left #ruby [#ruby]
<patal-loka>
xybre: select, not sure what is that.. let me google.
<patal-loka>
are you taking the same, or something else?
cdg has quit [Remote host closed the connection]
<patal-loka>
*you talking
paperhouse has quit [Quit: Leaving]
<Ox0dea>
patal-loka: Sorry, I stepped away for a bit, but that's secondary to my regrettable habit of backing out of providing help when there are external dependencies. :/
Nilium has joined #ruby
<Ox0dea>
I believe xybre was referring to Kernel#select, which is a better way to poll some IO for activity.
<patal-loka>
Ox0dea: no-problem mate, I got one more connection in that meanwhile. :)
<patal-loka>
yes, got that one - but how that select will be helpful is something I'm not sure?
<patal-loka>
how that can block the execution-flow or could replace the purpose of sleep?
The_Phoenix has quit [Quit: Leaving.]
davedev24 has joined #ruby
<Ox0dea>
Well, there's obviously some IO going on, but you'll have to muck about in internals if the library doesn't expose that directly.
<Ox0dea>
You'd #select on that IO and respond to it's having finished, rather than blindly busy-looping.
<Ox0dea>
*its
<patal-loka>
ok.
<patal-loka>
that make much more sense, hmm.
<patal-loka>
but that library is using EventMachine periodic-timer, so its a blind and periodically called block.
kfpratt has joined #ruby
<Ox0dea>
That's certainly a problem. :<
<Ox0dea>
You're kind of at the library's whim as to how and when your callback is invoked, no?
dfinninger has joined #ruby
<patal-loka>
yes
<patal-loka>
that callback will be called by library itself.
<patal-loka>
Since EventMachine is already getting used by this library, hence I would like to avoid using more more job-runner overhead.
arup_r has quit [Remote host closed the connection]
arup_r has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<patal-loka>
but yes, we need something to say wait on something, now what is that something could be timer, loop, sleep, IO, interrupt.
<patal-loka>
now since library is not providing anything, we can't do anything, since there is nothing like inifinite_sleep()
<Ox0dea>
Sure there is.
<Ox0dea>
`sleep` with no argument means forever.
<patal-loka>
?
<patal-loka>
ohh .. never realized that, cool.. let me check.
<Ox0dea>
Hardly a solution, mind. :/
<patal-loka>
:-)
jdawgaz has joined #ruby
<ta0>
jhass i never completed your stupid prime number challenge and I recently realized that there's a script in my junk folder that will never work because it's impossible
<Ox0dea>
XML is just syntactic salt for S-expressions.
<shevy>
ta0 ack, you are studying to become wiser in the libary! :)
<shevy>
but instead you are IRC chatting :D
mattwildig has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
ta0 has quit [Ping timeout: 272 seconds]
crazydiamond has joined #ruby
Zggb has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
ohaibbq has quit [Read error: Connection reset by peer]
ohaibbq has joined #ruby
symm- has joined #ruby
cdg has joined #ruby
senayar has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
zenspider has quit [Quit: bye]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Elysia has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Elysia has joined #ruby
Zamerick has joined #ruby
symm- has quit [Quit: Leaving...]
_tc has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 265 seconds]
moei has quit [Quit: Leaving...]
tockitj has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
yardenbar has joined #ruby
yardenbar has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<George_>
Ok, so it turns out there was no memory leak at all, Ruby 2.2's GC is just crazy
<George_>
It allows an application to use almost 2GB of ram before collecting most garbage
ruid has joined #ruby
ruid has joined #ruby
<George_>
Now the application on one of my boxes is suddenly back down to 281MB, from 1.8GB, with no changes to anything at all
<George_>
The identical application doing the exact same stuff on another box has been at a stable 35.3MB for hours
ta has joined #ruby
cfa6rtx8 has quit [Read error: Connection reset by peer]
agit0 has quit [Read error: Connection reset by peer]
<shevy>
George_ are you the next twitter?
<George_>
I wasn't the last time I checked :P
<shevy>
how many lines of code does this app have or use? just a rough estimate
dgynn has quit [Quit: dgynn]
<George_>
Around ~1200
<George_>
It's a small daemon which is used by other applications via an IPC to spawn and manage processes
codecop has quit [Remote host closed the connection]
<George_>
It forwards events and output when needed
tockitj has joined #ruby
<George_>
I just really can't make much sense of this GC, coming from 1.9, it seems all over the place
dlitvak has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgynn has joined #ruby
<George_>
I have the same application on another box using 2.5GB ram right now
<George_>
Profiling doesn't really show any leaks, and it'll eventually collect most of that at some random point, when it feels like it
mattwildig has joined #ruby
<Ox0dea>
George_: You can manually invoke GC whenever you want, for what that's worth.
ruid has quit [Ping timeout: 245 seconds]
<Ox0dea>
Are you sure some aspect of your thing isn't written in a way that makes the collector's job prohibitively difficult?
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
pandaant has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
<George_>
I ported the application from 1.9, it's a slightly stripped down version of what I've been using for many years already, without any leaks or crazy GC issues
elton has quit [Remote host closed the connection]
symm- has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<George_>
I have the application running on 1.9 on one of my boxes with a few years uptime, no leaks
elton has joined #ruby
<George_>
No insane ram spikes either for that matter
<shevy>
hmm
elton has quit [Ping timeout: 245 seconds]
haraigoshi has joined #ruby
zotherstupidguy has left #ruby ["WeeChat 1.3"]
kstuart has quit [Ping timeout: 250 seconds]
s2013 has joined #ruby
haraigo has quit [Ping timeout: 240 seconds]
<George_>
Manually running GC makes very little difference, it can still hold onto over 3GB of ram in certain cases
TheMoonMaster has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
<DeezCodez>
What does a guy do after he's learned all the basics of Ruby? I know the answer is to build something. But I don't want to just hack together a rails project, I want to do some in depth Ruby programming.
RobertBirnie has joined #ruby
<DeezCodez>
Any ideas? or Help? I have an idea, but no idea where to start.
Waheedi has quit [Quit: Waheedi]
<George_>
DeezCodez: Learn EventMachine
senayar has joined #ruby
roshanavand has joined #ruby
<DeezCodez>
??
<George_>
It's like node.js, but Ruby
<DeezCodez>
I see. But I feel like that is a little above my head at the moment.
<DeezCodez>
I need to learn how to break problems down and really get good at the Object Oriented(ness) of Ruby.
<DeezCodez>
I know what a hash is and what an array is and how to write or define methods and all that, but I don't know what to do with it. I have an idea to code the Farkle dice game, but have no idea where to start.
<George_>
Fair enough, sounds like you should start simple then and work your way up
<George_>
I recommend starting without Rails
senayar has quit [Ping timeout: 240 seconds]
<George_>
If you want to build a web app, Sinatra is a great place to get started
DeezCodez_ has joined #ruby
<DeezCodez_>
Sorry, im in the middle east, and my internet is pretty dodgy at the moment.
DeezCodez has quit [Ping timeout: 252 seconds]
CorySimmons has joined #ruby
john__ has joined #ruby
DeezCodez_ has quit [Ping timeout: 252 seconds]
ta has joined #ruby
sandbags has joined #ruby
RobertBirnie has quit [Ping timeout: 260 seconds]
vasilakisfil_ has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
pmlee has joined #ruby
vasilakisfil has quit [Read error: Connection reset by peer]
john__ has quit [Client Quit]
Jackneill_ has joined #ruby
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
jdawgaz has joined #ruby
Jackneill has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
mattwildig has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
mattwildig has joined #ruby
marr has joined #ruby
roshanavand has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
sergey_makagon has quit []
RobertBirnie has joined #ruby
terminalrecluse has joined #ruby
mattwildig has quit []
CMD has joined #ruby
Darmani has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
<Darmani>
Hi everyone! Quick question,
<Darmani>
So I wrote some code that pulls out the vowels from a sentence.
<Darmani>
I wanted to modify it to map the vowels to a hash.
<Darmani>
So I would look like "a" => 2, "b"=> 1
<Darmani>
How would I do that?
nocd has quit [Quit: nocd]
djbkd has joined #ruby
<shevy>
iterate over your sentence
<shevy>
whenever you find a match, add up the count in your hash
CorySimmons has quit [Quit: Bye!]
<Darmani>
I'm not very good with hashes yet though...
mary5030 has joined #ruby
<shevy>
do you know how to create a new hash?
<Darmani>
hsh = {}
<Darmani>
right?
cpup has quit [Read error: Connection reset by peer]
<shevy>
yeah
scripore has quit [Quit: This computer has gone to sleep]
<shevy>
but just call the variable hash
<shevy>
no need to kill the vowels in your variable
<shevy>
sntncs my lk vry strng othrws
<George_>
Maybe he just hates vowels that much
<shevy>
haha
<existensil>
they cost too much
<Darmani>
lmao
<George_>
That would explain why he wants to write code to pull them out of a sentence
<shevy>
Darmani ok do you know how to add to a hash?
<existensil>
don't you know how wheel of fortune works?